1#! /bin/sh
2# From configure.in Revision: 1.454 .
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by Autoconf 2.52.20080325.
5#
6# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7# Free Software Foundation, Inc.
8# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
10
11# Avoid depending upon Character Ranges.
12as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15as_cr_digits='0123456789'
16as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18# Sed expression to map a string onto a valid variable name.
19as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21# Sed expression to map a string onto a valid CPP name.
22as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24# Be Bourne compatible
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26  emulate sh
27  NULLCMD=:
28elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29  set -o posix
30fi
31
32# Name of the executable.
33as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35if expr a : '\(a\)' >/dev/null 2>&1; then
36  as_expr=expr
37else
38  as_expr=false
39fi
40
41rm -f conf$$ conf$$.exe conf$$.file
42echo >conf$$.file
43if ln -s conf$$.file conf$$ 2>/dev/null; then
44  # We could just check for DJGPP; but this test a) works b) is more generic
45  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46  if test -f conf$$.exe; then
47    # Don't use ln at all; we don't have any links
48    as_ln_s='cp -p'
49  else
50    as_ln_s='ln -s'
51  fi
52elif ln conf$$.file conf$$ 2>/dev/null; then
53  as_ln_s=ln
54else
55  as_ln_s='cp -p'
56fi
57rm -f conf$$ conf$$.exe conf$$.file
58
59as_executable_p="test -f"
60
61# Support unset when possible.
62if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63  as_unset=unset
64else
65  as_unset=false
66fi
67
68# NLS nuisances.
69$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78# IFS
79# We need space, tab and new line, in precisely that order.
80as_nl='
81'
82IFS=" 	$as_nl"
83
84# CDPATH.
85$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87# Name of the host.
88# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89# so uname gets run too.
90ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92exec 6>&1
93
94#
95# Initializations.
96#
97ac_default_prefix=/usr/local
98cross_compiling=no
99subdirs=
100MFLAGS= MAKEFLAGS=
101SHELL=${CONFIG_SHELL-/bin/sh}
102
103# Maximum number of lines to put in a shell here document.
104# This variable seems obsolete.  It should probably be removed, and
105# only ac_max_sed_lines should be used.
106: ${ac_max_here_lines=38}
107
108ac_unique_file="ncurses/base/lib_initscr.c"
109# Factoring default headers for most tests.
110ac_includes_default="\
111#include <stdio.h>
112#if HAVE_SYS_TYPES_H
113# include <sys/types.h>
114#endif
115#if HAVE_SYS_STAT_H
116# include <sys/stat.h>
117#endif
118#if STDC_HEADERS
119# include <stdlib.h>
120# include <stddef.h>
121#else
122# if HAVE_STDLIB_H
123#  include <stdlib.h>
124# endif
125#endif
126#if HAVE_STRING_H
127# if !STDC_HEADERS && HAVE_MEMORY_H
128#  include <memory.h>
129# endif
130# include <string.h>
131#endif
132#if HAVE_STRINGS_H
133# include <strings.h>
134#endif
135#if HAVE_INTTYPES_H
136# include <inttypes.h>
137#else
138# if HAVE_STDINT_H
139#  include <stdint.h>
140# endif
141#endif
142#if HAVE_UNISTD_H
143# include <unistd.h>
144#endif"
145
146# Initialize some variables set by options.
147ac_init_help=
148ac_init_version=false
149# The variables have the same names as the options, with
150# dashes changed to underlines.
151cache_file=/dev/null
152exec_prefix=NONE
153no_create=
154no_recursion=
155prefix=NONE
156program_prefix=NONE
157program_suffix=NONE
158program_transform_name=s,x,x,
159silent=
160site=
161srcdir=
162verbose=
163x_includes=NONE
164x_libraries=NONE
165
166# Installation directory options.
167# These are left unexpanded so users can "make install exec_prefix=/foo"
168# and all the variables that are supposed to be based on exec_prefix
169# by default will actually change.
170# Use braces instead of parens because sh, perl, etc. also accept them.
171bindir='${exec_prefix}/bin'
172sbindir='${exec_prefix}/sbin'
173libexecdir='${exec_prefix}/libexec'
174datadir='${prefix}/share'
175sysconfdir='${prefix}/etc'
176sharedstatedir='${prefix}/com'
177localstatedir='${prefix}/var'
178libdir='${exec_prefix}/lib'
179includedir='${prefix}/include'
180oldincludedir='/usr/include'
181infodir='${prefix}/info'
182mandir='${prefix}/man'
183
184# Identity of this package.
185PACKAGE_NAME=
186PACKAGE_TARNAME=
187PACKAGE_VERSION=
188PACKAGE_STRING=
189PACKAGE_BUGREPORT=
190
191ac_prev=
192for ac_option
193do
194  # If the previous option needs an argument, assign it.
195  if test -n "$ac_prev"; then
196    eval "$ac_prev=\$ac_option"
197    ac_prev=
198    continue
199  fi
200
201  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203  # Accept the important Cygnus configure options, so we can diagnose typos.
204
205  case $ac_option in
206
207  -bindir | --bindir | --bindi | --bind | --bin | --bi)
208    ac_prev=bindir ;;
209  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210    bindir=$ac_optarg ;;
211
212  -build | --build | --buil | --bui | --bu)
213    ac_prev=build_alias ;;
214  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215    build_alias=$ac_optarg ;;
216
217  -cache-file | --cache-file | --cache-fil | --cache-fi \
218  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219    ac_prev=cache_file ;;
220  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222    cache_file=$ac_optarg ;;
223
224  --config-cache | -C)
225    cache_file=config.cache ;;
226
227  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228    ac_prev=datadir ;;
229  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230  | --da=*)
231    datadir=$ac_optarg ;;
232
233  -disable-* | --disable-*)
234    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235    # Reject names that are not valid shell variable names.
236    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238   { (exit 1); exit 1; }; }
239    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240    eval "enable_$ac_feature=no" ;;
241
242  -enable-* | --enable-*)
243    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244    # Reject names that are not valid shell variable names.
245    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247   { (exit 1); exit 1; }; }
248    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249    case $ac_option in
250      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251      *) ac_optarg=yes ;;
252    esac
253    eval "enable_$ac_feature='$ac_optarg'" ;;
254
255  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257  | --exec | --exe | --ex)
258    ac_prev=exec_prefix ;;
259  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261  | --exec=* | --exe=* | --ex=*)
262    exec_prefix=$ac_optarg ;;
263
264  -gas | --gas | --ga | --g)
265    # Obsolete; use --with-gas.
266    with_gas=yes ;;
267
268  -help | --help | --hel | --he | -h)
269    ac_init_help=long ;;
270  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271    ac_init_help=recursive ;;
272  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273    ac_init_help=short ;;
274
275  -host | --host | --hos | --ho)
276    ac_prev=host_alias ;;
277  -host=* | --host=* | --hos=* | --ho=*)
278    host_alias=$ac_optarg ;;
279
280  -includedir | --includedir | --includedi | --included | --include \
281  | --includ | --inclu | --incl | --inc)
282    ac_prev=includedir ;;
283  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284  | --includ=* | --inclu=* | --incl=* | --inc=*)
285    includedir=$ac_optarg ;;
286
287  -infodir | --infodir | --infodi | --infod | --info | --inf)
288    ac_prev=infodir ;;
289  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290    infodir=$ac_optarg ;;
291
292  -libdir | --libdir | --libdi | --libd)
293    ac_prev=libdir ;;
294  -libdir=* | --libdir=* | --libdi=* | --libd=*)
295    libdir=$ac_optarg ;;
296
297  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298  | --libexe | --libex | --libe)
299    ac_prev=libexecdir ;;
300  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301  | --libexe=* | --libex=* | --libe=*)
302    libexecdir=$ac_optarg ;;
303
304  -localstatedir | --localstatedir | --localstatedi | --localstated \
305  | --localstate | --localstat | --localsta | --localst \
306  | --locals | --local | --loca | --loc | --lo)
307    ac_prev=localstatedir ;;
308  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311    localstatedir=$ac_optarg ;;
312
313  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314    ac_prev=mandir ;;
315  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316    mandir=$ac_optarg ;;
317
318  -nfp | --nfp | --nf)
319    # Obsolete; use --without-fp.
320    with_fp=no ;;
321
322  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323  | --no-cr | --no-c)
324    no_create=yes ;;
325
326  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328    no_recursion=yes ;;
329
330  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332  | --oldin | --oldi | --old | --ol | --o)
333    ac_prev=oldincludedir ;;
334  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337    oldincludedir=$ac_optarg ;;
338
339  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340    ac_prev=prefix ;;
341  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342    prefix=$ac_optarg ;;
343
344  -program-prefix | --program-prefix | --program-prefi | --program-pref \
345  | --program-pre | --program-pr | --program-p)
346    ac_prev=program_prefix ;;
347  -program-prefix=* | --program-prefix=* | --program-prefi=* \
348  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349    program_prefix=$ac_optarg ;;
350
351  -program-suffix | --program-suffix | --program-suffi | --program-suff \
352  | --program-suf | --program-su | --program-s)
353    ac_prev=program_suffix ;;
354  -program-suffix=* | --program-suffix=* | --program-suffi=* \
355  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356    program_suffix=$ac_optarg ;;
357
358  -program-transform-name | --program-transform-name \
359  | --program-transform-nam | --program-transform-na \
360  | --program-transform-n | --program-transform- \
361  | --program-transform | --program-transfor \
362  | --program-transfo | --program-transf \
363  | --program-trans | --program-tran \
364  | --progr-tra | --program-tr | --program-t)
365    ac_prev=program_transform_name ;;
366  -program-transform-name=* | --program-transform-name=* \
367  | --program-transform-nam=* | --program-transform-na=* \
368  | --program-transform-n=* | --program-transform-=* \
369  | --program-transform=* | --program-transfor=* \
370  | --program-transfo=* | --program-transf=* \
371  | --program-trans=* | --program-tran=* \
372  | --progr-tra=* | --program-tr=* | --program-t=*)
373    program_transform_name=$ac_optarg ;;
374
375  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376  | -silent | --silent | --silen | --sile | --sil)
377    silent=yes ;;
378
379  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380    ac_prev=sbindir ;;
381  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382  | --sbi=* | --sb=*)
383    sbindir=$ac_optarg ;;
384
385  -sharedstatedir | --sharedstatedir | --sharedstatedi \
386  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387  | --sharedst | --shareds | --shared | --share | --shar \
388  | --sha | --sh)
389    ac_prev=sharedstatedir ;;
390  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393  | --sha=* | --sh=*)
394    sharedstatedir=$ac_optarg ;;
395
396  -site | --site | --sit)
397    ac_prev=site ;;
398  -site=* | --site=* | --sit=*)
399    site=$ac_optarg ;;
400
401  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402    ac_prev=srcdir ;;
403  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404    srcdir=$ac_optarg ;;
405
406  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407  | --syscon | --sysco | --sysc | --sys | --sy)
408    ac_prev=sysconfdir ;;
409  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411    sysconfdir=$ac_optarg ;;
412
413  -target | --target | --targe | --targ | --tar | --ta | --t)
414    ac_prev=target_alias ;;
415  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416    target_alias=$ac_optarg ;;
417
418  -v | -verbose | --verbose | --verbos | --verbo | --verb)
419    verbose=yes ;;
420
421  -version | --version | --versio | --versi | --vers | -V)
422    ac_init_version=: ;;
423
424  -with-* | --with-*)
425    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426    # Reject names that are not valid shell variable names.
427    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428      { echo "$as_me: error: invalid package name: $ac_package" >&2
429   { (exit 1); exit 1; }; }
430    ac_package=`echo $ac_package| sed 's/-/_/g'`
431    case $ac_option in
432      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433      *) ac_optarg=yes ;;
434    esac
435    eval "with_$ac_package='$ac_optarg'" ;;
436
437  -without-* | --without-*)
438    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439    # Reject names that are not valid shell variable names.
440    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441      { echo "$as_me: error: invalid package name: $ac_package" >&2
442   { (exit 1); exit 1; }; }
443    ac_package=`echo $ac_package | sed 's/-/_/g'`
444    eval "with_$ac_package=no" ;;
445
446  --x)
447    # Obsolete; use --with-x.
448    with_x=yes ;;
449
450  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451  | --x-incl | --x-inc | --x-in | --x-i)
452    ac_prev=x_includes ;;
453  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455    x_includes=$ac_optarg ;;
456
457  -x-libraries | --x-libraries | --x-librarie | --x-librari \
458  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459    ac_prev=x_libraries ;;
460  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462    x_libraries=$ac_optarg ;;
463
464  -*) { echo "$as_me: error: unrecognized option: $ac_option
465Try \`$0 --help' for more information." >&2
466   { (exit 1); exit 1; }; }
467    ;;
468
469  *=*)
470    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471    # Reject names that are not valid shell variable names.
472    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474   { (exit 1); exit 1; }; }
475    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476    eval "$ac_envvar='$ac_optarg'"
477    export $ac_envvar ;;
478
479  *)
480    # FIXME: should be removed in autoconf 3.0.
481    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485    ;;
486
487  esac
488done
489
490if test -n "$ac_prev"; then
491  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492  { echo "$as_me: error: missing argument to $ac_option" >&2
493   { (exit 1); exit 1; }; }
494fi
495
496# Be sure to have absolute paths.
497for ac_var in exec_prefix prefix
498do
499  eval ac_val=$`echo $ac_var`
500  case $ac_val in
501    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503   { (exit 1); exit 1; }; };;
504  esac
505done
506
507# Be sure to have absolute paths.
508for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509              localstatedir libdir includedir oldincludedir infodir mandir
510do
511  eval ac_val=$`echo $ac_var`
512  case $ac_val in
513    [\\/$]* | ?:[\\/]* ) ;;
514    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515   { (exit 1); exit 1; }; };;
516  esac
517done
518
519# There might be people who depend on the old broken behavior: `$host'
520# used to hold the argument of --host etc.
521build=$build_alias
522host=$host_alias
523target=$target_alias
524
525# FIXME: should be removed in autoconf 3.0.
526if test "x$host_alias" != x; then
527  if test "x$build_alias" = x; then
528    cross_compiling=maybe
529    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530    If a cross compiler is detected then cross compile mode will be used." >&2
531  elif test "x$build_alias" != "x$host_alias"; then
532    cross_compiling=yes
533  fi
534fi
535
536ac_tool_prefix=
537test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539test "$silent" = yes && exec 6>/dev/null
540
541# Find the source files, if location was not specified.
542if test -z "$srcdir"; then
543  ac_srcdir_defaulted=yes
544  # Try the directory containing this script, then its parent.
545  ac_prog=$0
546  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548  srcdir=$ac_confdir
549  if test ! -r $srcdir/$ac_unique_file; then
550    srcdir=..
551  fi
552else
553  ac_srcdir_defaulted=no
554fi
555if test ! -r $srcdir/$ac_unique_file; then
556  if test "$ac_srcdir_defaulted" = yes; then
557    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558   { (exit 1); exit 1; }; }
559  else
560    { echo "$as_me: error: cannot find sources in $srcdir" >&2
561   { (exit 1); exit 1; }; }
562  fi
563fi
564srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565ac_env_build_alias_set=${build_alias+set}
566ac_env_build_alias_value=$build_alias
567ac_cv_env_build_alias_set=${build_alias+set}
568ac_cv_env_build_alias_value=$build_alias
569ac_env_host_alias_set=${host_alias+set}
570ac_env_host_alias_value=$host_alias
571ac_cv_env_host_alias_set=${host_alias+set}
572ac_cv_env_host_alias_value=$host_alias
573ac_env_target_alias_set=${target_alias+set}
574ac_env_target_alias_value=$target_alias
575ac_cv_env_target_alias_set=${target_alias+set}
576ac_cv_env_target_alias_value=$target_alias
577ac_env_CC_set=${CC+set}
578ac_env_CC_value=$CC
579ac_cv_env_CC_set=${CC+set}
580ac_cv_env_CC_value=$CC
581ac_env_CFLAGS_set=${CFLAGS+set}
582ac_env_CFLAGS_value=$CFLAGS
583ac_cv_env_CFLAGS_set=${CFLAGS+set}
584ac_cv_env_CFLAGS_value=$CFLAGS
585ac_env_LDFLAGS_set=${LDFLAGS+set}
586ac_env_LDFLAGS_value=$LDFLAGS
587ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588ac_cv_env_LDFLAGS_value=$LDFLAGS
589ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590ac_env_CPPFLAGS_value=$CPPFLAGS
591ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593ac_env_CPP_set=${CPP+set}
594ac_env_CPP_value=$CPP
595ac_cv_env_CPP_set=${CPP+set}
596ac_cv_env_CPP_value=$CPP
597ac_env_CXX_set=${CXX+set}
598ac_env_CXX_value=$CXX
599ac_cv_env_CXX_set=${CXX+set}
600ac_cv_env_CXX_value=$CXX
601ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602ac_env_CXXFLAGS_value=$CXXFLAGS
603ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605ac_env_CXXCPP_set=${CXXCPP+set}
606ac_env_CXXCPP_value=$CXXCPP
607ac_cv_env_CXXCPP_set=${CXXCPP+set}
608ac_cv_env_CXXCPP_value=$CXXCPP
609
610#
611# Report the --help message.
612#
613if test "$ac_init_help" = "long"; then
614  # Omit some internal or obsolete options to make the list less imposing.
615  # This message is too long to be a string in the A/UX 3.1 sh.
616  cat <<EOF
617\`configure' configures this package to adapt to many kinds of systems.
618
619Usage: $0 [OPTION]... [VAR=VALUE]...
620
621To assign environment variables (e.g., CC, CFLAGS...), specify them as
622VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624Defaults for the options are specified in brackets.
625
626Configuration:
627  -h, --help              display this help and exit
628      --help=short        display options specific to this package
629      --help=recursive    display the short help of all the included packages
630  -V, --version           display version information and exit
631  -q, --quiet, --silent   do not print \`checking...' messages
632      --cache-file=FILE   cache test results in FILE [disabled]
633  -C, --config-cache      alias for \`--cache-file=config.cache'
634  -n, --no-create         do not create output files
635      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637EOF
638
639  cat <<EOF
640Installation directories:
641  --prefix=PREFIX         install architecture-independent files in PREFIX
642                          [$ac_default_prefix]
643  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                          [PREFIX]
645
646By default, \`make install' will install all the files in
647\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649for instance \`--prefix=\$HOME'.
650
651For better control, use the options below.
652
653Fine tuning of the installation directories:
654  --bindir=DIR            user executables [EPREFIX/bin]
655  --sbindir=DIR           system admin executables [EPREFIX/sbin]
656  --libexecdir=DIR        program executables [EPREFIX/libexec]
657  --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661  --libdir=DIR            object code libraries [EPREFIX/lib]
662  --includedir=DIR        C header files [PREFIX/include]
663  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664  --infodir=DIR           info documentation [PREFIX/info]
665  --mandir=DIR            man documentation [PREFIX/man]
666EOF
667
668  cat <<\EOF
669
670Program names:
671  --program-prefix=PREFIX            prepend PREFIX to installed program names
672  --program-suffix=SUFFIX            append SUFFIX to installed program names
673  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675System types:
676  --build=BUILD           configure for building on BUILD [guessed]
677  --host=HOST       build programs to run on HOST [BUILD]
678  --target=TARGET   configure for building compilers for TARGET [HOST]
679EOF
680fi
681
682if test -n "$ac_init_help"; then
683
684  cat <<\EOF
685
686Optional Packages:
687  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690Optional Features:
691  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694  --with-rel-version=XXX  override derived release version
695  --with-abi-version=XXX  override derived ABI version
696  --with-system-type=XXX  test: override derived host system-type
697  --without-cxx           do not adjust ncurses bool to match C++
698  --without-cxx-binding   do not build C++ binding and demo
699  --without-ada           suppress check for Ada95, don't build demo
700  --without-progs         suppress build with programs (e.g., tic)
701  --without-curses-h      install curses.h as ncurses.h only
702  --enable-mixed-case     tic should assume mixed-case filenames
703  --with-install-prefix   prefixes actual install-location ($DESTDIR)
704Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
705  --with-build-cc=XXX     the build C compiler ($BUILD_CC)
706  --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
707  --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
708  --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
709  --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
710  --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
711Options to Specify the Libraries Built/Used:
712  --with-libtool          generate libraries with libtool
713  --with-shared           generate shared-libraries
714  --with-normal           generate normal-libraries (default)
715  --with-debug            generate debug-libraries (default)
716  --with-profile          generate profile-libraries
717  --with-termlib          generate separate terminfo library
718  --with-ticlib           generate separate tic library
719  --with-gpm              use Alessandro Rubini's GPM library
720  --without-dlsym         do not use dlsym() to load GPM dynamically
721  --with-sysmouse         use sysmouse (FreeBSD console)
722  --enable-rpath          use rpath option when generating shared libraries
723  --disable-relink        relink shared libraries during install
724  --with-shlib-version=X  Specify rel or abi version for shared libs
725Fine-Tuning Your Configuration:
726  --disable-overwrite     leave out the link to -lcurses
727  --disable-database      do not use terminfo, only fallbacks/termcap
728  --with-database=XXX     specify terminfo source to install
729  --with-hashed-db        specify hashed-database library
730  --with-fallbacks=XXX    specify list of fallback terminal descriptions
731  --without-xterm-new     specify if xterm terminfo should be old version
732  --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
733  --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
734  --disable-big-core      assume machine has little memory
735  --disable-big-strings   assume compiler has only standard-size strings
736  --enable-termcap        compile in termcap fallback support
737  --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
738  --enable-getcap         fast termcap load, no xrefs to terminfo
739  --enable-getcap-cache   cache translated termcaps in ~/.terminfo
740  --disable-home-terminfo drop ~/.terminfo from terminfo search-path
741  --disable-root-environ  restrict environment when running as root
742  --enable-symlinks       make tic use symbolic links not hard links
743  --enable-broken_linker  compile with broken-linker support code
744  --enable-bsdpad         recognize BSD-style prefix padding
745  --enable-widec          compile with wide-char/UTF-8 code
746  --disable-lp64          allow chtype to be long (ignore _LP64)
747  --disable-largefile     omit support for large files
748  --disable-tparm-varargs compile tparm() without varargs interface
749  --disable-tic-depends   link tic library without explicit dependency on ncurses library
750  --with-bool=TYPE        override fallback type of bool variable
751  --with-caps=alt         compile with alternate Caps file
752  --with-chtype=TYPE      override type of chtype
753  --with-ospeed=TYPE      override type of ospeed variable
754  --with-mmask-t=TYPE     override type of mmask_t
755  --with-rcs-ids          compile-in RCS identifiers
756Options to Specify How Manpages are Installed:
757  --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
758                          optionally formatted/catonly, e.g., gzip,formatted
759  --with-manpage-renames  specify manpage-renaming
760  --with-manpage-aliases  specify manpage-aliases using .so
761  --with-manpage-symlinks specify manpage-aliases using symlinks
762  --with-manpage-tbl      specify manpage processing with tbl
763Extensions:
764  --disable-ext-funcs     disable function-extensions
765  --enable-const          compile with extra/non-standard const
766  --enable-ext-colors     compile for 256-color support
767  --enable-ext-mouse      compile for extended mouse-encoding
768  --enable-no-padding     compile with $NCURSES_NO_PADDING code
769  --enable-signed-char    compile using signed Boolean's in term.h
770  --enable-sigwinch       compile with SIGWINCH handler
771  --enable-tcap-names     compile with user-definable terminal capabilities
772Development Code:
773  --without-develop       disable development options
774  --enable-hard-tabs      compile with hard-tabs code
775  --enable-xmc-glitch     compile with support for xmc (magic-cookie)
776Experimental Code:
777  --disable-assumed-color do not assume anything about default-colors
778  --disable-hashmap       compile without hashmap scrolling-optimization
779  --enable-colorfgbg      compile with $COLORFGBG code
780  --with-pthread          use POSIX thread library
781  --enable-weak-symbols   enable weak-symbols for pthreads
782  --enable-reentrant      compile with experimental reentrant code
783  --enable-safe-sprintf   compile with experimental safe-sprintf code
784  --disable-scroll-hints  compile without scroll-hints code
785  --enable-wgetch-events  compile with experimental wgetch-events code
786Testing/development Options:
787  --enable-echo           build: display "compiling" commands (default)
788  --enable-warnings       build: turn on GCC compiler warnings
789  --enable-assertions     test: turn on generation of assertion code
790  --with-dmalloc          test: use Gray Watson's dmalloc library
791  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
792  --with-valgrind         test: use valgrind
793  --disable-leaks         test: free permanent memory, analyze leaks
794  --enable-expanded       test: generate functions for certain macros
795  --disable-macros        test: use functions rather than macros
796  --with-trace            test: add trace() function to all models of ncurses
797Ada95 Binding Options:
798  --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
799  --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
800  --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
801
802Some influential environment variables:
803  CC          C compiler command
804  CFLAGS      C compiler flags
805  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
806              nonstandard directory <lib dir>
807  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
808              headers in a nonstandard directory <include dir>
809  CPP         C preprocessor
810  CXX         C++ compiler command
811  CXXFLAGS    C++ compiler flags
812  CXXCPP      C++ preprocessor
813
814Use these variables to override the choices made by `configure' or to help
815it to find libraries and programs with nonstandard names/locations.
816
817EOF
818fi
819
820if test "$ac_init_help" = "recursive"; then
821  # If there are subdirs, report their specific --help.
822  ac_popdir=`pwd`
823  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
824    cd $ac_subdir
825    # A "../" for each directory in /$ac_subdir.
826    ac_dots=`echo $ac_subdir |
827             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
828
829    case $srcdir in
830    .) # No --srcdir option.  We are building in place.
831      ac_sub_srcdir=$srcdir ;;
832    [\\/]* | ?:[\\/]* ) # Absolute path.
833      ac_sub_srcdir=$srcdir/$ac_subdir ;;
834    *) # Relative path.
835      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
836    esac
837
838    # Check for guested configure; otherwise get Cygnus style configure.
839    if test -f $ac_sub_srcdir/configure.gnu; then
840      echo
841      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
842    elif test -f $ac_sub_srcdir/configure; then
843      echo
844      $SHELL $ac_sub_srcdir/configure  --help=recursive
845    elif test -f $ac_sub_srcdir/configure.ac ||
846           test -f $ac_sub_srcdir/configure.in; then
847      echo
848      $ac_configure --help
849    else
850      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
851    fi
852    cd $ac_popdir
853  done
854fi
855
856test -n "$ac_init_help" && exit 0
857if $ac_init_version; then
858  cat <<\EOF
859
860Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
861Free Software Foundation, Inc.
862This configure script is free software; the Free Software Foundation
863gives unlimited permission to copy, distribute and modify it.
864EOF
865  exit 0
866fi
867exec 5>config.log
868cat >&5 <<EOF
869This file contains any messages produced by compilers while
870running configure, to aid debugging if configure makes a mistake.
871
872It was created by $as_me, which was
873generated by GNU Autoconf 2.52.20080325.  Invocation command line was
874
875  $ $0 $@
876
877EOF
878{
879cat <<_ASUNAME
880## ---------- ##
881## Platform.  ##
882## ---------- ##
883
884hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
885uname -m = `(uname -m) 2>/dev/null || echo unknown`
886uname -r = `(uname -r) 2>/dev/null || echo unknown`
887uname -s = `(uname -s) 2>/dev/null || echo unknown`
888uname -v = `(uname -v) 2>/dev/null || echo unknown`
889
890/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
891/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
892
893/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
894/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
895/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
896hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
897/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
898/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
899/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
900
901PATH = $PATH
902
903_ASUNAME
904} >&5
905
906cat >&5 <<EOF
907## ------------ ##
908## Core tests.  ##
909## ------------ ##
910
911EOF
912
913# Keep a trace of the command line.
914# Strip out --no-create and --no-recursion so they do not pile up.
915# Also quote any args containing shell meta-characters.
916ac_configure_args=
917ac_sep=
918for ac_arg
919do
920  case $ac_arg in
921  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
922  | --no-cr | --no-c) ;;
923  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
924  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
925  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
926    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
927    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
928    ac_sep=" " ;;
929  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
930     ac_sep=" " ;;
931  esac
932  # Get rid of the leading space.
933done
934
935# When interrupted or exit'd, cleanup temporary files, and complete
936# config.log.  We remove comments because anyway the quotes in there
937# would cause problems or look ugly.
938trap 'exit_status=$?
939  # Save into config.log some information that might help in debugging.
940  echo >&5
941  echo "## ----------------- ##" >&5
942  echo "## Cache variables.  ##" >&5
943  echo "## ----------------- ##" >&5
944  echo >&5
945  # The following way of writing the cache mishandles newlines in values,
946{
947  (set) 2>&1 |
948    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
949    *ac_space=\ *)
950      sed -n \
951        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
952    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
953      ;;
954    *)
955      sed -n \
956        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
957      ;;
958    esac;
959} >&5
960  sed "/^$/d" confdefs.h >conftest.log
961  if test -s conftest.log; then
962    echo >&5
963    echo "## ------------ ##" >&5
964    echo "## confdefs.h.  ##" >&5
965    echo "## ------------ ##" >&5
966    echo >&5
967    cat conftest.log >&5
968  fi
969  (echo; echo) >&5
970  test "$ac_signal" != 0 &&
971    echo "$as_me: caught signal $ac_signal" >&5
972  echo "$as_me: exit $exit_status" >&5
973  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
974    exit $exit_status
975     ' 0
976for ac_signal in 1 2 13 15; do
977  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
978done
979ac_signal=0
980
981# confdefs.h avoids OS command line length limits that DEFS can exceed.
982rm -rf conftest* confdefs.h
983# AIX cpp loses on an empty file, so make sure it contains at least a newline.
984echo >confdefs.h
985
986# Let the site file select an alternate cache file if it wants to.
987# Prefer explicitly selected file to automatically selected ones.
988if test -z "$CONFIG_SITE"; then
989  if test "x$prefix" != xNONE; then
990    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
991  else
992    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
993  fi
994fi
995for ac_site_file in $CONFIG_SITE; do
996  if test -r "$ac_site_file"; then
997    { echo "$as_me:997: loading site script $ac_site_file" >&5
998echo "$as_me: loading site script $ac_site_file" >&6;}
999    cat "$ac_site_file" >&5
1000    . "$ac_site_file"
1001  fi
1002done
1003
1004if test -r "$cache_file"; then
1005  # Some versions of bash will fail to source /dev/null (special
1006  # files actually), so we avoid doing that.
1007  if test -f "$cache_file"; then
1008    { echo "$as_me:1008: loading cache $cache_file" >&5
1009echo "$as_me: loading cache $cache_file" >&6;}
1010    case $cache_file in
1011      [\\/]* | ?:[\\/]* ) . $cache_file;;
1012      *)                      . ./$cache_file;;
1013    esac
1014  fi
1015else
1016  { echo "$as_me:1016: creating cache $cache_file" >&5
1017echo "$as_me: creating cache $cache_file" >&6;}
1018  >$cache_file
1019fi
1020
1021# Check that the precious variables saved in the cache have kept the same
1022# value.
1023ac_cache_corrupted=false
1024for ac_var in `(set) 2>&1 |
1025               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1026  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1027  eval ac_new_set=\$ac_env_${ac_var}_set
1028  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1029  eval ac_new_val="\$ac_env_${ac_var}_value"
1030  case $ac_old_set,$ac_new_set in
1031    set,)
1032      { echo "$as_me:1032: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1033echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1034      ac_cache_corrupted=: ;;
1035    ,set)
1036      { echo "$as_me:1036: error: \`$ac_var' was not set in the previous run" >&5
1037echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1038      ac_cache_corrupted=: ;;
1039    ,);;
1040    *)
1041      if test "x$ac_old_val" != "x$ac_new_val"; then
1042        { echo "$as_me:1042: error: \`$ac_var' has changed since the previous run:" >&5
1043echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1044        { echo "$as_me:1044:   former value:  $ac_old_val" >&5
1045echo "$as_me:   former value:  $ac_old_val" >&2;}
1046        { echo "$as_me:1046:   current value: $ac_new_val" >&5
1047echo "$as_me:   current value: $ac_new_val" >&2;}
1048        ac_cache_corrupted=:
1049      fi;;
1050  esac
1051  # Pass precious variables to config.status.  It doesn't matter if
1052  # we pass some twice (in addition to the command line arguments).
1053  if test "$ac_new_set" = set; then
1054    case $ac_new_val in
1055    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1056      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1057      ac_configure_args="$ac_configure_args '$ac_arg'"
1058      ;;
1059    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1060       ;;
1061    esac
1062  fi
1063done
1064if $ac_cache_corrupted; then
1065  { echo "$as_me:1065: error: changes in the environment can compromise the build" >&5
1066echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1067  { { echo "$as_me:1067: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1068echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1069   { (exit 1); exit 1; }; }
1070fi
1071
1072ac_ext=c
1073ac_cpp='$CPP $CPPFLAGS'
1074ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1075ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1076ac_compiler_gnu=$ac_cv_c_compiler_gnu
1077ac_main_return=return
1078
1079case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1080  *c*,-n*) ECHO_N= ECHO_C='
1081' ECHO_T='	' ;;
1082  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1083  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1084esac
1085echo "#! $SHELL" >conftest.sh
1086echo  "exit 0"   >>conftest.sh
1087chmod +x conftest.sh
1088if { (echo "$as_me:1088: PATH=\".;.\"; conftest.sh") >&5
1089  (PATH=".;."; conftest.sh) 2>&5
1090  ac_status=$?
1091  echo "$as_me:1091: \$? = $ac_status" >&5
1092  (exit $ac_status); }; then
1093  ac_path_separator=';'
1094else
1095  ac_path_separator=:
1096fi
1097PATH_SEPARATOR="$ac_path_separator"
1098rm -f conftest.sh
1099
1100ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1101
1102top_builddir=`pwd`
1103
1104echo "$as_me:1104: checking for egrep" >&5
1105echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1106if test "${ac_cv_prog_egrep+set}" = set; then
1107  echo $ECHO_N "(cached) $ECHO_C" >&6
1108else
1109  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1110    then ac_cv_prog_egrep='grep -E'
1111    else ac_cv_prog_egrep='egrep'
1112    fi
1113fi
1114echo "$as_me:1114: result: $ac_cv_prog_egrep" >&5
1115echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1116 EGREP=$ac_cv_prog_egrep
1117
1118test -z "$EGREP" && { { echo "$as_me:1118: error: No egrep program found" >&5
1119echo "$as_me: error: No egrep program found" >&2;}
1120   { (exit 1); exit 1; }; }
1121
1122NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[ 	]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1123NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[ 	]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1124NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[ 	]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1125cf_cv_abi_version=${NCURSES_MAJOR}
1126cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1127cf_cv_timestamp=`date`
1128echo "$as_me:1128: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1129echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1130
1131test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1132
1133# Check whether --with-rel-version or --without-rel-version was given.
1134if test "${with_rel_version+set}" = set; then
1135  withval="$with_rel_version"
1136  { echo "$as_me:1136: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1137echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1138 cf_cv_rel_version=$withval
1139fi;
1140
1141 NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1142 NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1143
1144if test -n "$NCURSES_MAJOR" ; then
1145  case $NCURSES_MAJOR in #(vi
1146  [0-9]*) #(vi
1147 	;;
1148  *)
1149	{ { echo "$as_me:1149: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1150echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1151   { (exit 1); exit 1; }; }
1152 	;;
1153  esac
1154else
1155  { { echo "$as_me:1155: error: Release major-version value is empty" >&5
1156echo "$as_me: error: Release major-version value is empty" >&2;}
1157   { (exit 1); exit 1; }; }
1158fi
1159
1160if test -n "$NCURSES_MINOR" ; then
1161  case $NCURSES_MINOR in #(vi
1162  [0-9]*) #(vi
1163 	;;
1164  *)
1165	{ { echo "$as_me:1165: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1166echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1167   { (exit 1); exit 1; }; }
1168 	;;
1169  esac
1170else
1171  { { echo "$as_me:1171: error: Release minor-version value is empty" >&5
1172echo "$as_me: error: Release minor-version value is empty" >&2;}
1173   { (exit 1); exit 1; }; }
1174fi
1175
1176test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1177
1178# Check whether --with-abi-version or --without-abi-version was given.
1179if test "${with_abi_version+set}" = set; then
1180  withval="$with_abi_version"
1181  { echo "$as_me:1181: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1182echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1183 cf_cv_abi_version=$withval
1184fi;
1185
1186if test -n "$cf_cv_abi_version" ; then
1187  case $cf_cv_abi_version in #(vi
1188  [0-9]*) #(vi
1189 	;;
1190  *)
1191	{ { echo "$as_me:1191: error: ABI version is not a number: $cf_cv_abi_version" >&5
1192echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1193   { (exit 1); exit 1; }; }
1194 	;;
1195  esac
1196else
1197  { { echo "$as_me:1197: error: ABI version value is empty" >&5
1198echo "$as_me: error: ABI version value is empty" >&2;}
1199   { (exit 1); exit 1; }; }
1200fi
1201
1202ac_aux_dir=
1203for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1204  if test -f $ac_dir/install-sh; then
1205    ac_aux_dir=$ac_dir
1206    ac_install_sh="$ac_aux_dir/install-sh -c"
1207    break
1208  elif test -f $ac_dir/install.sh; then
1209    ac_aux_dir=$ac_dir
1210    ac_install_sh="$ac_aux_dir/install.sh -c"
1211    break
1212  elif test -f $ac_dir/shtool; then
1213    ac_aux_dir=$ac_dir
1214    ac_install_sh="$ac_aux_dir/shtool install -c"
1215    break
1216  fi
1217done
1218if test -z "$ac_aux_dir"; then
1219  { { echo "$as_me:1219: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1220echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1221   { (exit 1); exit 1; }; }
1222fi
1223ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1224ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1225ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1226
1227# Make sure we can run config.sub.
1228$ac_config_sub sun4 >/dev/null 2>&1 ||
1229  { { echo "$as_me:1229: error: cannot run $ac_config_sub" >&5
1230echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1231   { (exit 1); exit 1; }; }
1232
1233echo "$as_me:1233: checking build system type" >&5
1234echo $ECHO_N "checking build system type... $ECHO_C" >&6
1235if test "${ac_cv_build+set}" = set; then
1236  echo $ECHO_N "(cached) $ECHO_C" >&6
1237else
1238  ac_cv_build_alias=$build_alias
1239test -z "$ac_cv_build_alias" &&
1240  ac_cv_build_alias=`$ac_config_guess`
1241test -z "$ac_cv_build_alias" &&
1242  { { echo "$as_me:1242: error: cannot guess build type; you must specify one" >&5
1243echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1244   { (exit 1); exit 1; }; }
1245ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1246  { { echo "$as_me:1246: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1247echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1248   { (exit 1); exit 1; }; }
1249
1250fi
1251echo "$as_me:1251: result: $ac_cv_build" >&5
1252echo "${ECHO_T}$ac_cv_build" >&6
1253build=$ac_cv_build
1254build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1255build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1256build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1257
1258echo "$as_me:1258: checking host system type" >&5
1259echo $ECHO_N "checking host system type... $ECHO_C" >&6
1260if test "${ac_cv_host+set}" = set; then
1261  echo $ECHO_N "(cached) $ECHO_C" >&6
1262else
1263  ac_cv_host_alias=$host_alias
1264test -z "$ac_cv_host_alias" &&
1265  ac_cv_host_alias=$ac_cv_build_alias
1266ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1267  { { echo "$as_me:1267: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1268echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1269   { (exit 1); exit 1; }; }
1270
1271fi
1272echo "$as_me:1272: result: $ac_cv_host" >&5
1273echo "${ECHO_T}$ac_cv_host" >&6
1274host=$ac_cv_host
1275host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1276host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1277host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1278
1279if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1280	echo "$as_me:1280: checking target system type" >&5
1281echo $ECHO_N "checking target system type... $ECHO_C" >&6
1282if test "${ac_cv_target+set}" = set; then
1283  echo $ECHO_N "(cached) $ECHO_C" >&6
1284else
1285  ac_cv_target_alias=$target_alias
1286test "x$ac_cv_target_alias" = "x" &&
1287  ac_cv_target_alias=$ac_cv_host_alias
1288ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1289  { { echo "$as_me:1289: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1290echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1291   { (exit 1); exit 1; }; }
1292
1293fi
1294echo "$as_me:1294: result: $ac_cv_target" >&5
1295echo "${ECHO_T}$ac_cv_target" >&6
1296target=$ac_cv_target
1297target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1298target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1299target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1300
1301# The aliases save the names the user supplied, while $host etc.
1302# will get canonicalized.
1303test -n "$target_alias" &&
1304  test "$program_prefix$program_suffix$program_transform_name" = \
1305    NONENONEs,x,x, &&
1306  program_prefix=${target_alias}-
1307	system_name="$host_os"
1308else
1309	system_name="`(uname -s -r) 2>/dev/null`"
1310	if test -z "$system_name" ; then
1311		system_name="`(hostname) 2>/dev/null`"
1312	fi
1313fi
1314test -n "$system_name" && cat >>confdefs.h <<EOF
1315#define SYSTEM_NAME "$system_name"
1316EOF
1317
1318if test "${cf_cv_system_name+set}" = set; then
1319  echo $ECHO_N "(cached) $ECHO_C" >&6
1320else
1321  cf_cv_system_name="$system_name"
1322fi
1323
1324test -z "$system_name" && system_name="$cf_cv_system_name"
1325test -n "$cf_cv_system_name" && echo "$as_me:1325: result: Configuring for $cf_cv_system_name" >&5
1326echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1327
1328if test ".$system_name" != ".$cf_cv_system_name" ; then
1329	echo "$as_me:1329: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1330echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1331	{ { echo "$as_me:1331: error: \"Please remove config.cache and try again.\"" >&5
1332echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1333   { (exit 1); exit 1; }; }
1334fi
1335
1336# Check whether --with-system-type or --without-system-type was given.
1337if test "${with_system_type+set}" = set; then
1338  withval="$with_system_type"
1339  { echo "$as_me:1339: WARNING: overriding system type to $withval" >&5
1340echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1341 cf_cv_system_name=$withval
1342fi;
1343
1344###	Save the given $CFLAGS to allow user-override.
1345cf_user_CFLAGS="$CFLAGS"
1346
1347###	Default install-location
1348
1349echo "$as_me:1349: checking for prefix" >&5
1350echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1351if test "x$prefix" = "xNONE" ; then
1352	case "$cf_cv_system_name" in
1353		# non-vendor systems don't have a conflict
1354	openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1355		prefix=/usr
1356		;;
1357	*)	prefix=$ac_default_prefix
1358		;;
1359	esac
1360fi
1361echo "$as_me:1361: result: $prefix" >&5
1362echo "${ECHO_T}$prefix" >&6
1363
1364if test "x$prefix" = "xNONE" ; then
1365echo "$as_me:1365: checking for default include-directory" >&5
1366echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1367test -n "$verbose" && echo 1>&6
1368for cf_symbol in \
1369	$includedir \
1370	$includedir/ncurses \
1371	$prefix/include \
1372	$prefix/include/ncurses \
1373	/usr/local/include \
1374	/usr/local/include/ncurses \
1375	/usr/include \
1376	/usr/include/ncurses
1377do
1378	cf_dir=`eval echo $cf_symbol`
1379	if test -f $cf_dir/curses.h ; then
1380	if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1381		includedir="$cf_symbol"
1382		test -n "$verbose"  && echo $ac_n "	found " 1>&6
1383		break
1384	fi
1385	fi
1386	test -n "$verbose"  && echo "	tested $cf_dir" 1>&6
1387done
1388echo "$as_me:1388: result: $includedir" >&5
1389echo "${ECHO_T}$includedir" >&6
1390fi
1391
1392###	Checks for programs.
1393ac_ext=c
1394ac_cpp='$CPP $CPPFLAGS'
1395ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1396ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1397ac_compiler_gnu=$ac_cv_c_compiler_gnu
1398ac_main_return=return
1399if test -n "$ac_tool_prefix"; then
1400  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1401set dummy ${ac_tool_prefix}gcc; ac_word=$2
1402echo "$as_me:1402: checking for $ac_word" >&5
1403echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1404if test "${ac_cv_prog_CC+set}" = set; then
1405  echo $ECHO_N "(cached) $ECHO_C" >&6
1406else
1407  if test -n "$CC"; then
1408  ac_cv_prog_CC="$CC" # Let the user override the test.
1409else
1410  ac_save_IFS=$IFS; IFS=$ac_path_separator
1411ac_dummy="$PATH"
1412for ac_dir in $ac_dummy; do
1413  IFS=$ac_save_IFS
1414  test -z "$ac_dir" && ac_dir=.
1415  $as_executable_p "$ac_dir/$ac_word" || continue
1416ac_cv_prog_CC="${ac_tool_prefix}gcc"
1417echo "$as_me:1417: found $ac_dir/$ac_word" >&5
1418break
1419done
1420
1421fi
1422fi
1423CC=$ac_cv_prog_CC
1424if test -n "$CC"; then
1425  echo "$as_me:1425: result: $CC" >&5
1426echo "${ECHO_T}$CC" >&6
1427else
1428  echo "$as_me:1428: result: no" >&5
1429echo "${ECHO_T}no" >&6
1430fi
1431
1432fi
1433if test -z "$ac_cv_prog_CC"; then
1434  ac_ct_CC=$CC
1435  # Extract the first word of "gcc", so it can be a program name with args.
1436set dummy gcc; ac_word=$2
1437echo "$as_me:1437: checking for $ac_word" >&5
1438echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1439if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1440  echo $ECHO_N "(cached) $ECHO_C" >&6
1441else
1442  if test -n "$ac_ct_CC"; then
1443  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1444else
1445  ac_save_IFS=$IFS; IFS=$ac_path_separator
1446ac_dummy="$PATH"
1447for ac_dir in $ac_dummy; do
1448  IFS=$ac_save_IFS
1449  test -z "$ac_dir" && ac_dir=.
1450  $as_executable_p "$ac_dir/$ac_word" || continue
1451ac_cv_prog_ac_ct_CC="gcc"
1452echo "$as_me:1452: found $ac_dir/$ac_word" >&5
1453break
1454done
1455
1456fi
1457fi
1458ac_ct_CC=$ac_cv_prog_ac_ct_CC
1459if test -n "$ac_ct_CC"; then
1460  echo "$as_me:1460: result: $ac_ct_CC" >&5
1461echo "${ECHO_T}$ac_ct_CC" >&6
1462else
1463  echo "$as_me:1463: result: no" >&5
1464echo "${ECHO_T}no" >&6
1465fi
1466
1467  CC=$ac_ct_CC
1468else
1469  CC="$ac_cv_prog_CC"
1470fi
1471
1472if test -z "$CC"; then
1473  if test -n "$ac_tool_prefix"; then
1474  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1475set dummy ${ac_tool_prefix}cc; ac_word=$2
1476echo "$as_me:1476: checking for $ac_word" >&5
1477echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1478if test "${ac_cv_prog_CC+set}" = set; then
1479  echo $ECHO_N "(cached) $ECHO_C" >&6
1480else
1481  if test -n "$CC"; then
1482  ac_cv_prog_CC="$CC" # Let the user override the test.
1483else
1484  ac_save_IFS=$IFS; IFS=$ac_path_separator
1485ac_dummy="$PATH"
1486for ac_dir in $ac_dummy; do
1487  IFS=$ac_save_IFS
1488  test -z "$ac_dir" && ac_dir=.
1489  $as_executable_p "$ac_dir/$ac_word" || continue
1490ac_cv_prog_CC="${ac_tool_prefix}cc"
1491echo "$as_me:1491: found $ac_dir/$ac_word" >&5
1492break
1493done
1494
1495fi
1496fi
1497CC=$ac_cv_prog_CC
1498if test -n "$CC"; then
1499  echo "$as_me:1499: result: $CC" >&5
1500echo "${ECHO_T}$CC" >&6
1501else
1502  echo "$as_me:1502: result: no" >&5
1503echo "${ECHO_T}no" >&6
1504fi
1505
1506fi
1507if test -z "$ac_cv_prog_CC"; then
1508  ac_ct_CC=$CC
1509  # Extract the first word of "cc", so it can be a program name with args.
1510set dummy cc; ac_word=$2
1511echo "$as_me:1511: checking for $ac_word" >&5
1512echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1513if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1514  echo $ECHO_N "(cached) $ECHO_C" >&6
1515else
1516  if test -n "$ac_ct_CC"; then
1517  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1518else
1519  ac_save_IFS=$IFS; IFS=$ac_path_separator
1520ac_dummy="$PATH"
1521for ac_dir in $ac_dummy; do
1522  IFS=$ac_save_IFS
1523  test -z "$ac_dir" && ac_dir=.
1524  $as_executable_p "$ac_dir/$ac_word" || continue
1525ac_cv_prog_ac_ct_CC="cc"
1526echo "$as_me:1526: found $ac_dir/$ac_word" >&5
1527break
1528done
1529
1530fi
1531fi
1532ac_ct_CC=$ac_cv_prog_ac_ct_CC
1533if test -n "$ac_ct_CC"; then
1534  echo "$as_me:1534: result: $ac_ct_CC" >&5
1535echo "${ECHO_T}$ac_ct_CC" >&6
1536else
1537  echo "$as_me:1537: result: no" >&5
1538echo "${ECHO_T}no" >&6
1539fi
1540
1541  CC=$ac_ct_CC
1542else
1543  CC="$ac_cv_prog_CC"
1544fi
1545
1546fi
1547if test -z "$CC"; then
1548  # Extract the first word of "cc", so it can be a program name with args.
1549set dummy cc; ac_word=$2
1550echo "$as_me:1550: checking for $ac_word" >&5
1551echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1552if test "${ac_cv_prog_CC+set}" = set; then
1553  echo $ECHO_N "(cached) $ECHO_C" >&6
1554else
1555  if test -n "$CC"; then
1556  ac_cv_prog_CC="$CC" # Let the user override the test.
1557else
1558  ac_prog_rejected=no
1559  ac_save_IFS=$IFS; IFS=$ac_path_separator
1560ac_dummy="$PATH"
1561for ac_dir in $ac_dummy; do
1562  IFS=$ac_save_IFS
1563  test -z "$ac_dir" && ac_dir=.
1564  $as_executable_p "$ac_dir/$ac_word" || continue
1565if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1566  ac_prog_rejected=yes
1567  continue
1568fi
1569ac_cv_prog_CC="cc"
1570echo "$as_me:1570: found $ac_dir/$ac_word" >&5
1571break
1572done
1573
1574if test $ac_prog_rejected = yes; then
1575  # We found a bogon in the path, so make sure we never use it.
1576  set dummy $ac_cv_prog_CC
1577  shift
1578  if test $# != 0; then
1579    # We chose a different compiler from the bogus one.
1580    # However, it has the same basename, so the bogon will be chosen
1581    # first if we set CC to just the basename; use the full file name.
1582    shift
1583    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1584    shift
1585    ac_cv_prog_CC="$@"
1586  fi
1587fi
1588fi
1589fi
1590CC=$ac_cv_prog_CC
1591if test -n "$CC"; then
1592  echo "$as_me:1592: result: $CC" >&5
1593echo "${ECHO_T}$CC" >&6
1594else
1595  echo "$as_me:1595: result: no" >&5
1596echo "${ECHO_T}no" >&6
1597fi
1598
1599fi
1600if test -z "$CC"; then
1601  if test -n "$ac_tool_prefix"; then
1602  for ac_prog in cl
1603  do
1604    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1605set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1606echo "$as_me:1606: checking for $ac_word" >&5
1607echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1608if test "${ac_cv_prog_CC+set}" = set; then
1609  echo $ECHO_N "(cached) $ECHO_C" >&6
1610else
1611  if test -n "$CC"; then
1612  ac_cv_prog_CC="$CC" # Let the user override the test.
1613else
1614  ac_save_IFS=$IFS; IFS=$ac_path_separator
1615ac_dummy="$PATH"
1616for ac_dir in $ac_dummy; do
1617  IFS=$ac_save_IFS
1618  test -z "$ac_dir" && ac_dir=.
1619  $as_executable_p "$ac_dir/$ac_word" || continue
1620ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1621echo "$as_me:1621: found $ac_dir/$ac_word" >&5
1622break
1623done
1624
1625fi
1626fi
1627CC=$ac_cv_prog_CC
1628if test -n "$CC"; then
1629  echo "$as_me:1629: result: $CC" >&5
1630echo "${ECHO_T}$CC" >&6
1631else
1632  echo "$as_me:1632: result: no" >&5
1633echo "${ECHO_T}no" >&6
1634fi
1635
1636    test -n "$CC" && break
1637  done
1638fi
1639if test -z "$CC"; then
1640  ac_ct_CC=$CC
1641  for ac_prog in cl
1642do
1643  # Extract the first word of "$ac_prog", so it can be a program name with args.
1644set dummy $ac_prog; ac_word=$2
1645echo "$as_me:1645: checking for $ac_word" >&5
1646echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1647if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1648  echo $ECHO_N "(cached) $ECHO_C" >&6
1649else
1650  if test -n "$ac_ct_CC"; then
1651  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1652else
1653  ac_save_IFS=$IFS; IFS=$ac_path_separator
1654ac_dummy="$PATH"
1655for ac_dir in $ac_dummy; do
1656  IFS=$ac_save_IFS
1657  test -z "$ac_dir" && ac_dir=.
1658  $as_executable_p "$ac_dir/$ac_word" || continue
1659ac_cv_prog_ac_ct_CC="$ac_prog"
1660echo "$as_me:1660: found $ac_dir/$ac_word" >&5
1661break
1662done
1663
1664fi
1665fi
1666ac_ct_CC=$ac_cv_prog_ac_ct_CC
1667if test -n "$ac_ct_CC"; then
1668  echo "$as_me:1668: result: $ac_ct_CC" >&5
1669echo "${ECHO_T}$ac_ct_CC" >&6
1670else
1671  echo "$as_me:1671: result: no" >&5
1672echo "${ECHO_T}no" >&6
1673fi
1674
1675  test -n "$ac_ct_CC" && break
1676done
1677
1678  CC=$ac_ct_CC
1679fi
1680
1681fi
1682
1683test -z "$CC" && { { echo "$as_me:1683: error: no acceptable cc found in \$PATH" >&5
1684echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1685   { (exit 1); exit 1; }; }
1686
1687# Provide some information about the compiler.
1688echo "$as_me:1688:" \
1689     "checking for C compiler version" >&5
1690ac_compiler=`set X $ac_compile; echo $2`
1691{ (eval echo "$as_me:1691: \"$ac_compiler --version </dev/null >&5\"") >&5
1692  (eval $ac_compiler --version </dev/null >&5) 2>&5
1693  ac_status=$?
1694  echo "$as_me:1694: \$? = $ac_status" >&5
1695  (exit $ac_status); }
1696{ (eval echo "$as_me:1696: \"$ac_compiler -v </dev/null >&5\"") >&5
1697  (eval $ac_compiler -v </dev/null >&5) 2>&5
1698  ac_status=$?
1699  echo "$as_me:1699: \$? = $ac_status" >&5
1700  (exit $ac_status); }
1701{ (eval echo "$as_me:1701: \"$ac_compiler -V </dev/null >&5\"") >&5
1702  (eval $ac_compiler -V </dev/null >&5) 2>&5
1703  ac_status=$?
1704  echo "$as_me:1704: \$? = $ac_status" >&5
1705  (exit $ac_status); }
1706
1707cat >conftest.$ac_ext <<_ACEOF
1708#line 1708 "configure"
1709#include "confdefs.h"
1710
1711int
1712main ()
1713{
1714
1715  ;
1716  return 0;
1717}
1718_ACEOF
1719ac_clean_files_save=$ac_clean_files
1720ac_clean_files="$ac_clean_files a.out a.exe"
1721# Try to create an executable without -o first, disregard a.out.
1722# It will help us diagnose broken compilers, and finding out an intuition
1723# of exeext.
1724echo "$as_me:1724: checking for C compiler default output" >&5
1725echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1726ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1727if { (eval echo "$as_me:1727: \"$ac_link_default\"") >&5
1728  (eval $ac_link_default) 2>&5
1729  ac_status=$?
1730  echo "$as_me:1730: \$? = $ac_status" >&5
1731  (exit $ac_status); }; then
1732  # Find the output, starting from the most likely.  This scheme is
1733# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1734# resort.
1735for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1736                ls a.out conftest 2>/dev/null;
1737                ls a.* conftest.* 2>/dev/null`; do
1738  case $ac_file in
1739    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1740    a.out ) # We found the default executable, but exeext='' is most
1741            # certainly right.
1742            break;;
1743    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1744          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1745          export ac_cv_exeext
1746          break;;
1747    * ) break;;
1748  esac
1749done
1750else
1751  echo "$as_me: failed program was:" >&5
1752cat conftest.$ac_ext >&5
1753{ { echo "$as_me:1753: error: C compiler cannot create executables" >&5
1754echo "$as_me: error: C compiler cannot create executables" >&2;}
1755   { (exit 77); exit 77; }; }
1756fi
1757
1758ac_exeext=$ac_cv_exeext
1759echo "$as_me:1759: result: $ac_file" >&5
1760echo "${ECHO_T}$ac_file" >&6
1761
1762# Check the compiler produces executables we can run.  If not, either
1763# the compiler is broken, or we cross compile.
1764echo "$as_me:1764: checking whether the C compiler works" >&5
1765echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1766# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1767# If not cross compiling, check that we can run a simple program.
1768if test "$cross_compiling" != yes; then
1769  if { ac_try='./$ac_file'
1770  { (eval echo "$as_me:1770: \"$ac_try\"") >&5
1771  (eval $ac_try) 2>&5
1772  ac_status=$?
1773  echo "$as_me:1773: \$? = $ac_status" >&5
1774  (exit $ac_status); }; }; then
1775    cross_compiling=no
1776  else
1777    if test "$cross_compiling" = maybe; then
1778	cross_compiling=yes
1779    else
1780	{ { echo "$as_me:1780: error: cannot run C compiled programs.
1781If you meant to cross compile, use \`--host'." >&5
1782echo "$as_me: error: cannot run C compiled programs.
1783If you meant to cross compile, use \`--host'." >&2;}
1784   { (exit 1); exit 1; }; }
1785    fi
1786  fi
1787fi
1788echo "$as_me:1788: result: yes" >&5
1789echo "${ECHO_T}yes" >&6
1790
1791rm -f a.out a.exe conftest$ac_cv_exeext
1792ac_clean_files=$ac_clean_files_save
1793# Check the compiler produces executables we can run.  If not, either
1794# the compiler is broken, or we cross compile.
1795echo "$as_me:1795: checking whether we are cross compiling" >&5
1796echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1797echo "$as_me:1797: result: $cross_compiling" >&5
1798echo "${ECHO_T}$cross_compiling" >&6
1799
1800echo "$as_me:1800: checking for executable suffix" >&5
1801echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1802if { (eval echo "$as_me:1802: \"$ac_link\"") >&5
1803  (eval $ac_link) 2>&5
1804  ac_status=$?
1805  echo "$as_me:1805: \$? = $ac_status" >&5
1806  (exit $ac_status); }; then
1807  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1808# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1809# work properly (i.e., refer to `conftest.exe'), while it won't with
1810# `rm'.
1811for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1812  case $ac_file in
1813    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1814    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1815          export ac_cv_exeext
1816          break;;
1817    * ) break;;
1818  esac
1819done
1820else
1821  { { echo "$as_me:1821: error: cannot compute EXEEXT: cannot compile and link" >&5
1822echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1823   { (exit 1); exit 1; }; }
1824fi
1825
1826rm -f conftest$ac_cv_exeext
1827echo "$as_me:1827: result: $ac_cv_exeext" >&5
1828echo "${ECHO_T}$ac_cv_exeext" >&6
1829
1830rm -f conftest.$ac_ext
1831EXEEXT=$ac_cv_exeext
1832ac_exeext=$EXEEXT
1833echo "$as_me:1833: checking for object suffix" >&5
1834echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1835if test "${ac_cv_objext+set}" = set; then
1836  echo $ECHO_N "(cached) $ECHO_C" >&6
1837else
1838  cat >conftest.$ac_ext <<_ACEOF
1839#line 1839 "configure"
1840#include "confdefs.h"
1841
1842int
1843main ()
1844{
1845
1846  ;
1847  return 0;
1848}
1849_ACEOF
1850rm -f conftest.o conftest.obj
1851if { (eval echo "$as_me:1851: \"$ac_compile\"") >&5
1852  (eval $ac_compile) 2>&5
1853  ac_status=$?
1854  echo "$as_me:1854: \$? = $ac_status" >&5
1855  (exit $ac_status); }; then
1856  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1857  case $ac_file in
1858    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1859    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1860       break;;
1861  esac
1862done
1863else
1864  echo "$as_me: failed program was:" >&5
1865cat conftest.$ac_ext >&5
1866{ { echo "$as_me:1866: error: cannot compute OBJEXT: cannot compile" >&5
1867echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1868   { (exit 1); exit 1; }; }
1869fi
1870
1871rm -f conftest.$ac_cv_objext conftest.$ac_ext
1872fi
1873echo "$as_me:1873: result: $ac_cv_objext" >&5
1874echo "${ECHO_T}$ac_cv_objext" >&6
1875OBJEXT=$ac_cv_objext
1876ac_objext=$OBJEXT
1877echo "$as_me:1877: checking whether we are using the GNU C compiler" >&5
1878echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1879if test "${ac_cv_c_compiler_gnu+set}" = set; then
1880  echo $ECHO_N "(cached) $ECHO_C" >&6
1881else
1882  cat >conftest.$ac_ext <<_ACEOF
1883#line 1883 "configure"
1884#include "confdefs.h"
1885
1886int
1887main ()
1888{
1889#ifndef __GNUC__
1890       choke me
1891#endif
1892
1893  ;
1894  return 0;
1895}
1896_ACEOF
1897rm -f conftest.$ac_objext
1898if { (eval echo "$as_me:1898: \"$ac_compile\"") >&5
1899  (eval $ac_compile) 2>&5
1900  ac_status=$?
1901  echo "$as_me:1901: \$? = $ac_status" >&5
1902  (exit $ac_status); } &&
1903         { ac_try='test -s conftest.$ac_objext'
1904  { (eval echo "$as_me:1904: \"$ac_try\"") >&5
1905  (eval $ac_try) 2>&5
1906  ac_status=$?
1907  echo "$as_me:1907: \$? = $ac_status" >&5
1908  (exit $ac_status); }; }; then
1909  ac_compiler_gnu=yes
1910else
1911  echo "$as_me: failed program was:" >&5
1912cat conftest.$ac_ext >&5
1913ac_compiler_gnu=no
1914fi
1915rm -f conftest.$ac_objext conftest.$ac_ext
1916ac_cv_c_compiler_gnu=$ac_compiler_gnu
1917
1918fi
1919echo "$as_me:1919: result: $ac_cv_c_compiler_gnu" >&5
1920echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1921GCC=`test $ac_compiler_gnu = yes && echo yes`
1922ac_test_CFLAGS=${CFLAGS+set}
1923ac_save_CFLAGS=$CFLAGS
1924CFLAGS="-g"
1925echo "$as_me:1925: checking whether $CC accepts -g" >&5
1926echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1927if test "${ac_cv_prog_cc_g+set}" = set; then
1928  echo $ECHO_N "(cached) $ECHO_C" >&6
1929else
1930  cat >conftest.$ac_ext <<_ACEOF
1931#line 1931 "configure"
1932#include "confdefs.h"
1933
1934int
1935main ()
1936{
1937
1938  ;
1939  return 0;
1940}
1941_ACEOF
1942rm -f conftest.$ac_objext
1943if { (eval echo "$as_me:1943: \"$ac_compile\"") >&5
1944  (eval $ac_compile) 2>&5
1945  ac_status=$?
1946  echo "$as_me:1946: \$? = $ac_status" >&5
1947  (exit $ac_status); } &&
1948         { ac_try='test -s conftest.$ac_objext'
1949  { (eval echo "$as_me:1949: \"$ac_try\"") >&5
1950  (eval $ac_try) 2>&5
1951  ac_status=$?
1952  echo "$as_me:1952: \$? = $ac_status" >&5
1953  (exit $ac_status); }; }; then
1954  ac_cv_prog_cc_g=yes
1955else
1956  echo "$as_me: failed program was:" >&5
1957cat conftest.$ac_ext >&5
1958ac_cv_prog_cc_g=no
1959fi
1960rm -f conftest.$ac_objext conftest.$ac_ext
1961fi
1962echo "$as_me:1962: result: $ac_cv_prog_cc_g" >&5
1963echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1964if test "$ac_test_CFLAGS" = set; then
1965  CFLAGS=$ac_save_CFLAGS
1966elif test $ac_cv_prog_cc_g = yes; then
1967  if test "$GCC" = yes; then
1968    CFLAGS="-g -O2"
1969  else
1970    CFLAGS="-g"
1971  fi
1972else
1973  if test "$GCC" = yes; then
1974    CFLAGS="-O2"
1975  else
1976    CFLAGS=
1977  fi
1978fi
1979# Some people use a C++ compiler to compile C.  Since we use `exit',
1980# in C++ we need to declare it.  In case someone uses the same compiler
1981# for both compiling C and C++ we need to have the C++ compiler decide
1982# the declaration of exit, since it's the most demanding environment.
1983cat >conftest.$ac_ext <<_ACEOF
1984#ifndef __cplusplus
1985  choke me
1986#endif
1987_ACEOF
1988rm -f conftest.$ac_objext
1989if { (eval echo "$as_me:1989: \"$ac_compile\"") >&5
1990  (eval $ac_compile) 2>&5
1991  ac_status=$?
1992  echo "$as_me:1992: \$? = $ac_status" >&5
1993  (exit $ac_status); } &&
1994         { ac_try='test -s conftest.$ac_objext'
1995  { (eval echo "$as_me:1995: \"$ac_try\"") >&5
1996  (eval $ac_try) 2>&5
1997  ac_status=$?
1998  echo "$as_me:1998: \$? = $ac_status" >&5
1999  (exit $ac_status); }; }; then
2000  for ac_declaration in \
2001   ''\
2002   '#include <stdlib.h>' \
2003   'extern "C" void std::exit (int) throw (); using std::exit;' \
2004   'extern "C" void std::exit (int); using std::exit;' \
2005   'extern "C" void exit (int) throw ();' \
2006   'extern "C" void exit (int);' \
2007   'void exit (int);'
2008do
2009  cat >conftest.$ac_ext <<_ACEOF
2010#line 2010 "configure"
2011#include "confdefs.h"
2012#include <stdlib.h>
2013$ac_declaration
2014int
2015main ()
2016{
2017exit (42);
2018  ;
2019  return 0;
2020}
2021_ACEOF
2022rm -f conftest.$ac_objext
2023if { (eval echo "$as_me:2023: \"$ac_compile\"") >&5
2024  (eval $ac_compile) 2>&5
2025  ac_status=$?
2026  echo "$as_me:2026: \$? = $ac_status" >&5
2027  (exit $ac_status); } &&
2028         { ac_try='test -s conftest.$ac_objext'
2029  { (eval echo "$as_me:2029: \"$ac_try\"") >&5
2030  (eval $ac_try) 2>&5
2031  ac_status=$?
2032  echo "$as_me:2032: \$? = $ac_status" >&5
2033  (exit $ac_status); }; }; then
2034  :
2035else
2036  echo "$as_me: failed program was:" >&5
2037cat conftest.$ac_ext >&5
2038continue
2039fi
2040rm -f conftest.$ac_objext conftest.$ac_ext
2041  cat >conftest.$ac_ext <<_ACEOF
2042#line 2042 "configure"
2043#include "confdefs.h"
2044$ac_declaration
2045int
2046main ()
2047{
2048exit (42);
2049  ;
2050  return 0;
2051}
2052_ACEOF
2053rm -f conftest.$ac_objext
2054if { (eval echo "$as_me:2054: \"$ac_compile\"") >&5
2055  (eval $ac_compile) 2>&5
2056  ac_status=$?
2057  echo "$as_me:2057: \$? = $ac_status" >&5
2058  (exit $ac_status); } &&
2059         { ac_try='test -s conftest.$ac_objext'
2060  { (eval echo "$as_me:2060: \"$ac_try\"") >&5
2061  (eval $ac_try) 2>&5
2062  ac_status=$?
2063  echo "$as_me:2063: \$? = $ac_status" >&5
2064  (exit $ac_status); }; }; then
2065  break
2066else
2067  echo "$as_me: failed program was:" >&5
2068cat conftest.$ac_ext >&5
2069fi
2070rm -f conftest.$ac_objext conftest.$ac_ext
2071done
2072rm -f conftest*
2073if test -n "$ac_declaration"; then
2074  echo '#ifdef __cplusplus' >>confdefs.h
2075  echo $ac_declaration      >>confdefs.h
2076  echo '#endif'             >>confdefs.h
2077fi
2078
2079else
2080  echo "$as_me: failed program was:" >&5
2081cat conftest.$ac_ext >&5
2082fi
2083rm -f conftest.$ac_objext conftest.$ac_ext
2084ac_ext=c
2085ac_cpp='$CPP $CPPFLAGS'
2086ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2087ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2088ac_compiler_gnu=$ac_cv_c_compiler_gnu
2089ac_main_return=return
2090
2091GCC_VERSION=none
2092if test "$GCC" = yes ; then
2093	echo "$as_me:2093: checking version of $CC" >&5
2094echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2095	GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2096	test -z "$GCC_VERSION" && GCC_VERSION=unknown
2097	echo "$as_me:2097: result: $GCC_VERSION" >&5
2098echo "${ECHO_T}$GCC_VERSION" >&6
2099fi
2100
2101ac_ext=c
2102ac_cpp='$CPP $CPPFLAGS'
2103ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2104ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2105ac_compiler_gnu=$ac_cv_c_compiler_gnu
2106ac_main_return=return
2107echo "$as_me:2107: checking how to run the C preprocessor" >&5
2108echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2109# On Suns, sometimes $CPP names a directory.
2110if test -n "$CPP" && test -d "$CPP"; then
2111  CPP=
2112fi
2113if test -z "$CPP"; then
2114  if test "${ac_cv_prog_CPP+set}" = set; then
2115  echo $ECHO_N "(cached) $ECHO_C" >&6
2116else
2117      # Double quotes because CPP needs to be expanded
2118    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2119    do
2120      ac_preproc_ok=false
2121for ac_c_preproc_warn_flag in '' yes
2122do
2123  # Use a header file that comes with gcc, so configuring glibc
2124  # with a fresh cross-compiler works.
2125  # On the NeXT, cc -E runs the code through the compiler's parser,
2126  # not just through cpp. "Syntax error" is here to catch this case.
2127  cat >conftest.$ac_ext <<_ACEOF
2128#line 2128 "configure"
2129#include "confdefs.h"
2130#include <assert.h>
2131                     Syntax error
2132_ACEOF
2133if { (eval echo "$as_me:2133: \"$ac_cpp conftest.$ac_ext\"") >&5
2134  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2135  ac_status=$?
2136  egrep -v '^ *\+' conftest.er1 >conftest.err
2137  rm -f conftest.er1
2138  cat conftest.err >&5
2139  echo "$as_me:2139: \$? = $ac_status" >&5
2140  (exit $ac_status); } >/dev/null; then
2141  if test -s conftest.err; then
2142    ac_cpp_err=$ac_c_preproc_warn_flag
2143  else
2144    ac_cpp_err=
2145  fi
2146else
2147  ac_cpp_err=yes
2148fi
2149if test -z "$ac_cpp_err"; then
2150  :
2151else
2152  echo "$as_me: failed program was:" >&5
2153  cat conftest.$ac_ext >&5
2154  # Broken: fails on valid input.
2155continue
2156fi
2157rm -f conftest.err conftest.$ac_ext
2158
2159  # OK, works on sane cases.  Now check whether non-existent headers
2160  # can be detected and how.
2161  cat >conftest.$ac_ext <<_ACEOF
2162#line 2162 "configure"
2163#include "confdefs.h"
2164#include <ac_nonexistent.h>
2165_ACEOF
2166if { (eval echo "$as_me:2166: \"$ac_cpp conftest.$ac_ext\"") >&5
2167  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2168  ac_status=$?
2169  egrep -v '^ *\+' conftest.er1 >conftest.err
2170  rm -f conftest.er1
2171  cat conftest.err >&5
2172  echo "$as_me:2172: \$? = $ac_status" >&5
2173  (exit $ac_status); } >/dev/null; then
2174  if test -s conftest.err; then
2175    ac_cpp_err=$ac_c_preproc_warn_flag
2176  else
2177    ac_cpp_err=
2178  fi
2179else
2180  ac_cpp_err=yes
2181fi
2182if test -z "$ac_cpp_err"; then
2183  # Broken: success on invalid input.
2184continue
2185else
2186  echo "$as_me: failed program was:" >&5
2187  cat conftest.$ac_ext >&5
2188  # Passes both tests.
2189ac_preproc_ok=:
2190break
2191fi
2192rm -f conftest.err conftest.$ac_ext
2193
2194done
2195# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2196rm -f conftest.err conftest.$ac_ext
2197if $ac_preproc_ok; then
2198  break
2199fi
2200
2201    done
2202    ac_cv_prog_CPP=$CPP
2203
2204fi
2205  CPP=$ac_cv_prog_CPP
2206else
2207  ac_cv_prog_CPP=$CPP
2208fi
2209echo "$as_me:2209: result: $CPP" >&5
2210echo "${ECHO_T}$CPP" >&6
2211ac_preproc_ok=false
2212for ac_c_preproc_warn_flag in '' yes
2213do
2214  # Use a header file that comes with gcc, so configuring glibc
2215  # with a fresh cross-compiler works.
2216  # On the NeXT, cc -E runs the code through the compiler's parser,
2217  # not just through cpp. "Syntax error" is here to catch this case.
2218  cat >conftest.$ac_ext <<_ACEOF
2219#line 2219 "configure"
2220#include "confdefs.h"
2221#include <assert.h>
2222                     Syntax error
2223_ACEOF
2224if { (eval echo "$as_me:2224: \"$ac_cpp conftest.$ac_ext\"") >&5
2225  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2226  ac_status=$?
2227  egrep -v '^ *\+' conftest.er1 >conftest.err
2228  rm -f conftest.er1
2229  cat conftest.err >&5
2230  echo "$as_me:2230: \$? = $ac_status" >&5
2231  (exit $ac_status); } >/dev/null; then
2232  if test -s conftest.err; then
2233    ac_cpp_err=$ac_c_preproc_warn_flag
2234  else
2235    ac_cpp_err=
2236  fi
2237else
2238  ac_cpp_err=yes
2239fi
2240if test -z "$ac_cpp_err"; then
2241  :
2242else
2243  echo "$as_me: failed program was:" >&5
2244  cat conftest.$ac_ext >&5
2245  # Broken: fails on valid input.
2246continue
2247fi
2248rm -f conftest.err conftest.$ac_ext
2249
2250  # OK, works on sane cases.  Now check whether non-existent headers
2251  # can be detected and how.
2252  cat >conftest.$ac_ext <<_ACEOF
2253#line 2253 "configure"
2254#include "confdefs.h"
2255#include <ac_nonexistent.h>
2256_ACEOF
2257if { (eval echo "$as_me:2257: \"$ac_cpp conftest.$ac_ext\"") >&5
2258  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2259  ac_status=$?
2260  egrep -v '^ *\+' conftest.er1 >conftest.err
2261  rm -f conftest.er1
2262  cat conftest.err >&5
2263  echo "$as_me:2263: \$? = $ac_status" >&5
2264  (exit $ac_status); } >/dev/null; then
2265  if test -s conftest.err; then
2266    ac_cpp_err=$ac_c_preproc_warn_flag
2267  else
2268    ac_cpp_err=
2269  fi
2270else
2271  ac_cpp_err=yes
2272fi
2273if test -z "$ac_cpp_err"; then
2274  # Broken: success on invalid input.
2275continue
2276else
2277  echo "$as_me: failed program was:" >&5
2278  cat conftest.$ac_ext >&5
2279  # Passes both tests.
2280ac_preproc_ok=:
2281break
2282fi
2283rm -f conftest.err conftest.$ac_ext
2284
2285done
2286# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2287rm -f conftest.err conftest.$ac_ext
2288if $ac_preproc_ok; then
2289  :
2290else
2291  { { echo "$as_me:2291: error: C preprocessor \"$CPP\" fails sanity check" >&5
2292echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2293   { (exit 1); exit 1; }; }
2294fi
2295
2296ac_ext=c
2297ac_cpp='$CPP $CPPFLAGS'
2298ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2299ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2300ac_compiler_gnu=$ac_cv_c_compiler_gnu
2301ac_main_return=return
2302
2303if test $ac_cv_c_compiler_gnu = yes; then
2304    echo "$as_me:2304: checking whether $CC needs -traditional" >&5
2305echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2306if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2307  echo $ECHO_N "(cached) $ECHO_C" >&6
2308else
2309    ac_pattern="Autoconf.*'x'"
2310  cat >conftest.$ac_ext <<_ACEOF
2311#line 2311 "configure"
2312#include "confdefs.h"
2313#include <sgtty.h>
2314int Autoconf = TIOCGETP;
2315_ACEOF
2316if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2317  egrep "$ac_pattern" >/dev/null 2>&1; then
2318  ac_cv_prog_gcc_traditional=yes
2319else
2320  ac_cv_prog_gcc_traditional=no
2321fi
2322rm -f conftest*
2323
2324  if test $ac_cv_prog_gcc_traditional = no; then
2325    cat >conftest.$ac_ext <<_ACEOF
2326#line 2326 "configure"
2327#include "confdefs.h"
2328#include <termio.h>
2329int Autoconf = TCGETA;
2330_ACEOF
2331if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2332  egrep "$ac_pattern" >/dev/null 2>&1; then
2333  ac_cv_prog_gcc_traditional=yes
2334fi
2335rm -f conftest*
2336
2337  fi
2338fi
2339echo "$as_me:2339: result: $ac_cv_prog_gcc_traditional" >&5
2340echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2341  if test $ac_cv_prog_gcc_traditional = yes; then
2342    CC="$CC -traditional"
2343  fi
2344fi
2345
2346echo "$as_me:2346: checking whether $CC understands -c and -o together" >&5
2347echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2348if test "${cf_cv_prog_CC_c_o+set}" = set; then
2349  echo $ECHO_N "(cached) $ECHO_C" >&6
2350else
2351
2352cat > conftest.$ac_ext <<CF_EOF
2353#include <stdio.h>
2354int main()
2355{
2356	${cf_cv_main_return:-return}(0);
2357}
2358CF_EOF
2359# We do the test twice because some compilers refuse to overwrite an
2360# existing .o file with -o, though they will create one.
2361ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2362if { (eval echo "$as_me:2362: \"$ac_try\"") >&5
2363  (eval $ac_try) 2>&5
2364  ac_status=$?
2365  echo "$as_me:2365: \$? = $ac_status" >&5
2366  (exit $ac_status); } &&
2367  test -f conftest2.$ac_objext && { (eval echo "$as_me:2367: \"$ac_try\"") >&5
2368  (eval $ac_try) 2>&5
2369  ac_status=$?
2370  echo "$as_me:2370: \$? = $ac_status" >&5
2371  (exit $ac_status); };
2372then
2373  eval cf_cv_prog_CC_c_o=yes
2374else
2375  eval cf_cv_prog_CC_c_o=no
2376fi
2377rm -f conftest*
2378
2379fi
2380if test $cf_cv_prog_CC_c_o = yes; then
2381  echo "$as_me:2381: result: yes" >&5
2382echo "${ECHO_T}yes" >&6
2383else
2384  echo "$as_me:2384: result: no" >&5
2385echo "${ECHO_T}no" >&6
2386fi
2387
2388echo "$as_me:2388: checking for POSIXized ISC" >&5
2389echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2390if test -d /etc/conf/kconfig.d &&
2391   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2392then
2393  echo "$as_me:2393: result: yes" >&5
2394echo "${ECHO_T}yes" >&6
2395  ISC=yes # If later tests want to check for ISC.
2396
2397cat >>confdefs.h <<\EOF
2398#define _POSIX_SOURCE 1
2399EOF
2400
2401  if test "$GCC" = yes; then
2402    CC="$CC -posix"
2403  else
2404    CC="$CC -Xp"
2405  fi
2406else
2407  echo "$as_me:2407: result: no" >&5
2408echo "${ECHO_T}no" >&6
2409  ISC=
2410fi
2411
2412echo "$as_me:2412: checking for ${CC-cc} option to accept ANSI C" >&5
2413echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2414if test "${cf_cv_ansi_cc+set}" = set; then
2415  echo $ECHO_N "(cached) $ECHO_C" >&6
2416else
2417
2418cf_cv_ansi_cc=no
2419cf_save_CFLAGS="$CFLAGS"
2420cf_save_CPPFLAGS="$CPPFLAGS"
2421# Don't try gcc -ansi; that turns off useful extensions and
2422# breaks some systems' header files.
2423# AIX			-qlanglvl=ansi
2424# Ultrix and OSF/1	-std1
2425# HP-UX			-Aa -D_HPUX_SOURCE
2426# SVR4			-Xc
2427# UnixWare 1.2		(cannot use -Xc, since ANSI/POSIX clashes)
2428for cf_arg in "-DCC_HAS_PROTOS" \
2429	"" \
2430	-qlanglvl=ansi \
2431	-std1 \
2432	-Ae \
2433	"-Aa -D_HPUX_SOURCE" \
2434	-Xc
2435do
2436
2437cf_fix_cppflags=no
2438cf_new_cflags=
2439cf_new_cppflags=
2440cf_new_extra_cppflags=
2441
2442for cf_add_cflags in $cf_arg
2443do
2444case $cf_fix_cppflags in
2445no)
2446	case $cf_add_cflags in #(vi
2447	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2448		case $cf_add_cflags in
2449		-D*)
2450			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2451
2452			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2453			&& test -z "${cf_tst_cflags}" \
2454			&& cf_fix_cppflags=yes
2455
2456			if test $cf_fix_cppflags = yes ; then
2457				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2458				continue
2459			elif test "${cf_tst_cflags}" = "\"'" ; then
2460				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2461				continue
2462			fi
2463			;;
2464		esac
2465		case "$CPPFLAGS" in
2466		*$cf_add_cflags) #(vi
2467			;;
2468		*) #(vi
2469			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2470			;;
2471		esac
2472		;;
2473	*)
2474		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2475		;;
2476	esac
2477	;;
2478yes)
2479	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2480
2481	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2482
2483	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2484	&& test -z "${cf_tst_cflags}" \
2485	&& cf_fix_cppflags=no
2486	;;
2487esac
2488done
2489
2490if test -n "$cf_new_cflags" ; then
2491
2492	CFLAGS="$CFLAGS $cf_new_cflags"
2493fi
2494
2495if test -n "$cf_new_cppflags" ; then
2496
2497	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2498fi
2499
2500if test -n "$cf_new_extra_cppflags" ; then
2501
2502	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2503fi
2504
2505	cat >conftest.$ac_ext <<_ACEOF
2506#line 2506 "configure"
2507#include "confdefs.h"
2508
2509#ifndef CC_HAS_PROTOS
2510#if !defined(__STDC__) || (__STDC__ != 1)
2511choke me
2512#endif
2513#endif
2514
2515int
2516main ()
2517{
2518
2519	int test (int i, double x);
2520	struct s1 {int (*f) (int a);};
2521	struct s2 {int (*f) (double a);};
2522  ;
2523  return 0;
2524}
2525_ACEOF
2526rm -f conftest.$ac_objext
2527if { (eval echo "$as_me:2527: \"$ac_compile\"") >&5
2528  (eval $ac_compile) 2>&5
2529  ac_status=$?
2530  echo "$as_me:2530: \$? = $ac_status" >&5
2531  (exit $ac_status); } &&
2532         { ac_try='test -s conftest.$ac_objext'
2533  { (eval echo "$as_me:2533: \"$ac_try\"") >&5
2534  (eval $ac_try) 2>&5
2535  ac_status=$?
2536  echo "$as_me:2536: \$? = $ac_status" >&5
2537  (exit $ac_status); }; }; then
2538  cf_cv_ansi_cc="$cf_arg"; break
2539else
2540  echo "$as_me: failed program was:" >&5
2541cat conftest.$ac_ext >&5
2542fi
2543rm -f conftest.$ac_objext conftest.$ac_ext
2544done
2545CFLAGS="$cf_save_CFLAGS"
2546CPPFLAGS="$cf_save_CPPFLAGS"
2547
2548fi
2549echo "$as_me:2549: result: $cf_cv_ansi_cc" >&5
2550echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2551
2552if test "$cf_cv_ansi_cc" != "no"; then
2553if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2554
2555cf_fix_cppflags=no
2556cf_new_cflags=
2557cf_new_cppflags=
2558cf_new_extra_cppflags=
2559
2560for cf_add_cflags in $cf_cv_ansi_cc
2561do
2562case $cf_fix_cppflags in
2563no)
2564	case $cf_add_cflags in #(vi
2565	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2566		case $cf_add_cflags in
2567		-D*)
2568			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2569
2570			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2571			&& test -z "${cf_tst_cflags}" \
2572			&& cf_fix_cppflags=yes
2573
2574			if test $cf_fix_cppflags = yes ; then
2575				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2576				continue
2577			elif test "${cf_tst_cflags}" = "\"'" ; then
2578				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2579				continue
2580			fi
2581			;;
2582		esac
2583		case "$CPPFLAGS" in
2584		*$cf_add_cflags) #(vi
2585			;;
2586		*) #(vi
2587			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2588			;;
2589		esac
2590		;;
2591	*)
2592		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2593		;;
2594	esac
2595	;;
2596yes)
2597	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2598
2599	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2600
2601	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2602	&& test -z "${cf_tst_cflags}" \
2603	&& cf_fix_cppflags=no
2604	;;
2605esac
2606done
2607
2608if test -n "$cf_new_cflags" ; then
2609
2610	CFLAGS="$CFLAGS $cf_new_cflags"
2611fi
2612
2613if test -n "$cf_new_cppflags" ; then
2614
2615	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2616fi
2617
2618if test -n "$cf_new_extra_cppflags" ; then
2619
2620	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2621fi
2622
2623else
2624	cat >>confdefs.h <<\EOF
2625#define CC_HAS_PROTOS 1
2626EOF
2627
2628fi
2629fi
2630
2631if test "$cf_cv_ansi_cc" = "no"; then
2632	{ { echo "$as_me:2632: error: Your compiler does not appear to recognize prototypes.
2633You have the following choices:
2634	a. adjust your compiler options
2635	b. get an up-to-date compiler
2636	c. use a wrapper such as unproto" >&5
2637echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2638You have the following choices:
2639	a. adjust your compiler options
2640	b. get an up-to-date compiler
2641	c. use a wrapper such as unproto" >&2;}
2642   { (exit 1); exit 1; }; }
2643fi
2644
2645case $cf_cv_system_name in
2646os2*)
2647    CFLAGS="$CFLAGS -Zmt"
2648    CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2649    CXXFLAGS="$CXXFLAGS -Zmt"
2650    # autoconf's macro sets -Zexe and suffix both, which conflict:w
2651    LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2652    ac_cv_exeext=.exe
2653    ;;
2654esac
2655
2656PROG_EXT="$EXEEXT"
2657
2658test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2659#define PROG_EXT "$PROG_EXT"
2660EOF
2661
2662if test "$cross_compiling" = yes ; then
2663  LDCONFIG=:
2664else
2665case "$cf_cv_system_name" in #(vi
2666freebsd*) #(vi
2667  test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2668  ;;
2669*) LDPATH=$PATH:/sbin:/usr/sbin
2670  # Extract the first word of "ldconfig", so it can be a program name with args.
2671set dummy ldconfig; ac_word=$2
2672echo "$as_me:2672: checking for $ac_word" >&5
2673echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2674if test "${ac_cv_path_LDCONFIG+set}" = set; then
2675  echo $ECHO_N "(cached) $ECHO_C" >&6
2676else
2677  case $LDCONFIG in
2678  [\\/]* | ?:[\\/]*)
2679  ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2680  ;;
2681  *)
2682  ac_save_IFS=$IFS; IFS=$ac_path_separator
2683ac_dummy="$LDPATH"
2684for ac_dir in $ac_dummy; do
2685  IFS=$ac_save_IFS
2686  test -z "$ac_dir" && ac_dir=.
2687  if $as_executable_p "$ac_dir/$ac_word"; then
2688   ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2689   echo "$as_me:2689: found $ac_dir/$ac_word" >&5
2690   break
2691fi
2692done
2693
2694  ;;
2695esac
2696fi
2697LDCONFIG=$ac_cv_path_LDCONFIG
2698
2699if test -n "$LDCONFIG"; then
2700  echo "$as_me:2700: result: $LDCONFIG" >&5
2701echo "${ECHO_T}$LDCONFIG" >&6
2702else
2703  echo "$as_me:2703: result: no" >&5
2704echo "${ECHO_T}no" >&6
2705fi
2706
2707  ;;
2708esac
2709fi
2710
2711echo "$as_me:2711: checking if you want to ensure bool is consistent with C++" >&5
2712echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2713
2714# Check whether --with-cxx or --without-cxx was given.
2715if test "${with_cxx+set}" = set; then
2716  withval="$with_cxx"
2717  cf_with_cxx=$withval
2718else
2719  cf_with_cxx=yes
2720fi;
2721echo "$as_me:2721: result: $cf_with_cxx" >&5
2722echo "${ECHO_T}$cf_with_cxx" >&6
2723if test "X$cf_with_cxx" = Xno ; then
2724	CXX=""
2725	GXX=""
2726else
2727	# with autoconf 2.13, we can change the error to a warning:
2728		ac_ext=cc
2729ac_cpp='$CXXCPP $CPPFLAGS'
2730ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2731ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2732ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2733ac_main_return=return
2734if test -n "$ac_tool_prefix"; then
2735  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2736  do
2737    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2738set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2739echo "$as_me:2739: checking for $ac_word" >&5
2740echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2741if test "${ac_cv_prog_CXX+set}" = set; then
2742  echo $ECHO_N "(cached) $ECHO_C" >&6
2743else
2744  if test -n "$CXX"; then
2745  ac_cv_prog_CXX="$CXX" # Let the user override the test.
2746else
2747  ac_save_IFS=$IFS; IFS=$ac_path_separator
2748ac_dummy="$PATH"
2749for ac_dir in $ac_dummy; do
2750  IFS=$ac_save_IFS
2751  test -z "$ac_dir" && ac_dir=.
2752  $as_executable_p "$ac_dir/$ac_word" || continue
2753ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2754echo "$as_me:2754: found $ac_dir/$ac_word" >&5
2755break
2756done
2757
2758fi
2759fi
2760CXX=$ac_cv_prog_CXX
2761if test -n "$CXX"; then
2762  echo "$as_me:2762: result: $CXX" >&5
2763echo "${ECHO_T}$CXX" >&6
2764else
2765  echo "$as_me:2765: result: no" >&5
2766echo "${ECHO_T}no" >&6
2767fi
2768
2769    test -n "$CXX" && break
2770  done
2771fi
2772if test -z "$CXX"; then
2773  ac_ct_CXX=$CXX
2774  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2775do
2776  # Extract the first word of "$ac_prog", so it can be a program name with args.
2777set dummy $ac_prog; ac_word=$2
2778echo "$as_me:2778: checking for $ac_word" >&5
2779echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2780if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2781  echo $ECHO_N "(cached) $ECHO_C" >&6
2782else
2783  if test -n "$ac_ct_CXX"; then
2784  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2785else
2786  ac_save_IFS=$IFS; IFS=$ac_path_separator
2787ac_dummy="$PATH"
2788for ac_dir in $ac_dummy; do
2789  IFS=$ac_save_IFS
2790  test -z "$ac_dir" && ac_dir=.
2791  $as_executable_p "$ac_dir/$ac_word" || continue
2792ac_cv_prog_ac_ct_CXX="$ac_prog"
2793echo "$as_me:2793: found $ac_dir/$ac_word" >&5
2794break
2795done
2796
2797fi
2798fi
2799ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2800if test -n "$ac_ct_CXX"; then
2801  echo "$as_me:2801: result: $ac_ct_CXX" >&5
2802echo "${ECHO_T}$ac_ct_CXX" >&6
2803else
2804  echo "$as_me:2804: result: no" >&5
2805echo "${ECHO_T}no" >&6
2806fi
2807
2808  test -n "$ac_ct_CXX" && break
2809done
2810test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2811
2812  CXX=$ac_ct_CXX
2813fi
2814
2815# Provide some information about the compiler.
2816echo "$as_me:2816:" \
2817     "checking for C++ compiler version" >&5
2818ac_compiler=`set X $ac_compile; echo $2`
2819{ (eval echo "$as_me:2819: \"$ac_compiler --version </dev/null >&5\"") >&5
2820  (eval $ac_compiler --version </dev/null >&5) 2>&5
2821  ac_status=$?
2822  echo "$as_me:2822: \$? = $ac_status" >&5
2823  (exit $ac_status); }
2824{ (eval echo "$as_me:2824: \"$ac_compiler -v </dev/null >&5\"") >&5
2825  (eval $ac_compiler -v </dev/null >&5) 2>&5
2826  ac_status=$?
2827  echo "$as_me:2827: \$? = $ac_status" >&5
2828  (exit $ac_status); }
2829{ (eval echo "$as_me:2829: \"$ac_compiler -V </dev/null >&5\"") >&5
2830  (eval $ac_compiler -V </dev/null >&5) 2>&5
2831  ac_status=$?
2832  echo "$as_me:2832: \$? = $ac_status" >&5
2833  (exit $ac_status); }
2834
2835echo "$as_me:2835: checking whether we are using the GNU C++ compiler" >&5
2836echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2837if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2838  echo $ECHO_N "(cached) $ECHO_C" >&6
2839else
2840  cat >conftest.$ac_ext <<_ACEOF
2841#line 2841 "configure"
2842#include "confdefs.h"
2843
2844int
2845main ()
2846{
2847#ifndef __GNUC__
2848       choke me
2849#endif
2850
2851  ;
2852  return 0;
2853}
2854_ACEOF
2855rm -f conftest.$ac_objext
2856if { (eval echo "$as_me:2856: \"$ac_compile\"") >&5
2857  (eval $ac_compile) 2>&5
2858  ac_status=$?
2859  echo "$as_me:2859: \$? = $ac_status" >&5
2860  (exit $ac_status); } &&
2861         { ac_try='test -s conftest.$ac_objext'
2862  { (eval echo "$as_me:2862: \"$ac_try\"") >&5
2863  (eval $ac_try) 2>&5
2864  ac_status=$?
2865  echo "$as_me:2865: \$? = $ac_status" >&5
2866  (exit $ac_status); }; }; then
2867  ac_compiler_gnu=yes
2868else
2869  echo "$as_me: failed program was:" >&5
2870cat conftest.$ac_ext >&5
2871ac_compiler_gnu=no
2872fi
2873rm -f conftest.$ac_objext conftest.$ac_ext
2874ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2875
2876fi
2877echo "$as_me:2877: result: $ac_cv_cxx_compiler_gnu" >&5
2878echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2879GXX=`test $ac_compiler_gnu = yes && echo yes`
2880ac_test_CXXFLAGS=${CXXFLAGS+set}
2881ac_save_CXXFLAGS=$CXXFLAGS
2882CXXFLAGS="-g"
2883echo "$as_me:2883: checking whether $CXX accepts -g" >&5
2884echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2885if test "${ac_cv_prog_cxx_g+set}" = set; then
2886  echo $ECHO_N "(cached) $ECHO_C" >&6
2887else
2888  cat >conftest.$ac_ext <<_ACEOF
2889#line 2889 "configure"
2890#include "confdefs.h"
2891
2892int
2893main ()
2894{
2895
2896  ;
2897  return 0;
2898}
2899_ACEOF
2900rm -f conftest.$ac_objext
2901if { (eval echo "$as_me:2901: \"$ac_compile\"") >&5
2902  (eval $ac_compile) 2>&5
2903  ac_status=$?
2904  echo "$as_me:2904: \$? = $ac_status" >&5
2905  (exit $ac_status); } &&
2906         { ac_try='test -s conftest.$ac_objext'
2907  { (eval echo "$as_me:2907: \"$ac_try\"") >&5
2908  (eval $ac_try) 2>&5
2909  ac_status=$?
2910  echo "$as_me:2910: \$? = $ac_status" >&5
2911  (exit $ac_status); }; }; then
2912  ac_cv_prog_cxx_g=yes
2913else
2914  echo "$as_me: failed program was:" >&5
2915cat conftest.$ac_ext >&5
2916ac_cv_prog_cxx_g=no
2917fi
2918rm -f conftest.$ac_objext conftest.$ac_ext
2919fi
2920echo "$as_me:2920: result: $ac_cv_prog_cxx_g" >&5
2921echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2922if test "$ac_test_CXXFLAGS" = set; then
2923  CXXFLAGS=$ac_save_CXXFLAGS
2924elif test $ac_cv_prog_cxx_g = yes; then
2925  if test "$GXX" = yes; then
2926    CXXFLAGS="-g -O2"
2927  else
2928    CXXFLAGS="-g"
2929  fi
2930else
2931  if test "$GXX" = yes; then
2932    CXXFLAGS="-O2"
2933  else
2934    CXXFLAGS=
2935  fi
2936fi
2937for ac_declaration in \
2938   ''\
2939   '#include <stdlib.h>' \
2940   'extern "C" void std::exit (int) throw (); using std::exit;' \
2941   'extern "C" void std::exit (int); using std::exit;' \
2942   'extern "C" void exit (int) throw ();' \
2943   'extern "C" void exit (int);' \
2944   'void exit (int);'
2945do
2946  cat >conftest.$ac_ext <<_ACEOF
2947#line 2947 "configure"
2948#include "confdefs.h"
2949#include <stdlib.h>
2950$ac_declaration
2951int
2952main ()
2953{
2954exit (42);
2955  ;
2956  return 0;
2957}
2958_ACEOF
2959rm -f conftest.$ac_objext
2960if { (eval echo "$as_me:2960: \"$ac_compile\"") >&5
2961  (eval $ac_compile) 2>&5
2962  ac_status=$?
2963  echo "$as_me:2963: \$? = $ac_status" >&5
2964  (exit $ac_status); } &&
2965         { ac_try='test -s conftest.$ac_objext'
2966  { (eval echo "$as_me:2966: \"$ac_try\"") >&5
2967  (eval $ac_try) 2>&5
2968  ac_status=$?
2969  echo "$as_me:2969: \$? = $ac_status" >&5
2970  (exit $ac_status); }; }; then
2971  :
2972else
2973  echo "$as_me: failed program was:" >&5
2974cat conftest.$ac_ext >&5
2975continue
2976fi
2977rm -f conftest.$ac_objext conftest.$ac_ext
2978  cat >conftest.$ac_ext <<_ACEOF
2979#line 2979 "configure"
2980#include "confdefs.h"
2981$ac_declaration
2982int
2983main ()
2984{
2985exit (42);
2986  ;
2987  return 0;
2988}
2989_ACEOF
2990rm -f conftest.$ac_objext
2991if { (eval echo "$as_me:2991: \"$ac_compile\"") >&5
2992  (eval $ac_compile) 2>&5
2993  ac_status=$?
2994  echo "$as_me:2994: \$? = $ac_status" >&5
2995  (exit $ac_status); } &&
2996         { ac_try='test -s conftest.$ac_objext'
2997  { (eval echo "$as_me:2997: \"$ac_try\"") >&5
2998  (eval $ac_try) 2>&5
2999  ac_status=$?
3000  echo "$as_me:3000: \$? = $ac_status" >&5
3001  (exit $ac_status); }; }; then
3002  break
3003else
3004  echo "$as_me: failed program was:" >&5
3005cat conftest.$ac_ext >&5
3006fi
3007rm -f conftest.$ac_objext conftest.$ac_ext
3008done
3009rm -f conftest*
3010if test -n "$ac_declaration"; then
3011  echo '#ifdef __cplusplus' >>confdefs.h
3012  echo $ac_declaration      >>confdefs.h
3013  echo '#endif'             >>confdefs.h
3014fi
3015
3016ac_ext=c
3017ac_cpp='$CPP $CPPFLAGS'
3018ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3019ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3020ac_compiler_gnu=$ac_cv_c_compiler_gnu
3021ac_main_return=return
3022
3023		# autoconf 2.5x removed the error - by hardcoding it to g++.
3024	if test "$CXX" = "g++" ; then
3025		# Extract the first word of "g++", so it can be a program name with args.
3026set dummy g++; ac_word=$2
3027echo "$as_me:3027: checking for $ac_word" >&5
3028echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3029if test "${ac_cv_path_CXX+set}" = set; then
3030  echo $ECHO_N "(cached) $ECHO_C" >&6
3031else
3032  case $CXX in
3033  [\\/]* | ?:[\\/]*)
3034  ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3035  ;;
3036  *)
3037  ac_save_IFS=$IFS; IFS=$ac_path_separator
3038ac_dummy="$PATH"
3039for ac_dir in $ac_dummy; do
3040  IFS=$ac_save_IFS
3041  test -z "$ac_dir" && ac_dir=.
3042  if $as_executable_p "$ac_dir/$ac_word"; then
3043   ac_cv_path_CXX="$ac_dir/$ac_word"
3044   echo "$as_me:3044: found $ac_dir/$ac_word" >&5
3045   break
3046fi
3047done
3048
3049  ;;
3050esac
3051fi
3052CXX=$ac_cv_path_CXX
3053
3054if test -n "$CXX"; then
3055  echo "$as_me:3055: result: $CXX" >&5
3056echo "${ECHO_T}$CXX" >&6
3057else
3058  echo "$as_me:3058: result: no" >&5
3059echo "${ECHO_T}no" >&6
3060fi
3061
3062	fi
3063	if test "$CXX" = "g++" ; then
3064		{ echo "$as_me:3064: WARNING: ignoring hardcoded g++" >&5
3065echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3066		cf_with_cxx=no; CXX=""; GXX="";
3067	fi
3068fi
3069
3070GXX_VERSION=none
3071if test "$GXX" = yes; then
3072	echo "$as_me:3072: checking version of g++" >&5
3073echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3074	GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3075	test -z "$GXX_VERSION" && GXX_VERSION=unknown
3076	echo "$as_me:3076: result: $GXX_VERSION" >&5
3077echo "${ECHO_T}$GXX_VERSION" >&6
3078fi
3079
3080case $GXX_VERSION in
30811*|2.[0-6]*)
3082	# GXX=""; CXX=""; ac_cv_prog_gxx=no
3083	# cf_cxx_library=no
3084	{ echo "$as_me:3084: WARNING: templates do not work" >&5
3085echo "$as_me: WARNING: templates do not work" >&2;}
3086	;;
3087esac
3088
3089echo "$as_me:3089: checking if you want to build C++ binding and demo" >&5
3090echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3091
3092# Check whether --with-cxx-binding or --without-cxx-binding was given.
3093if test "${with_cxx_binding+set}" = set; then
3094  withval="$with_cxx_binding"
3095  cf_with_cxx_binding=$withval
3096else
3097  cf_with_cxx_binding=$cf_with_cxx
3098fi;
3099echo "$as_me:3099: result: $cf_with_cxx_binding" >&5
3100echo "${ECHO_T}$cf_with_cxx_binding" >&6
3101
3102echo "$as_me:3102: checking if you want to build with Ada95" >&5
3103echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3104
3105# Check whether --with-ada or --without-ada was given.
3106if test "${with_ada+set}" = set; then
3107  withval="$with_ada"
3108  cf_with_ada=$withval
3109else
3110  cf_with_ada=yes
3111fi;
3112echo "$as_me:3112: result: $cf_with_ada" >&5
3113echo "${ECHO_T}$cf_with_ada" >&6
3114
3115echo "$as_me:3115: checking if you want to build programs such as tic" >&5
3116echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3117
3118# Check whether --with-progs or --without-progs was given.
3119if test "${with_progs+set}" = set; then
3120  withval="$with_progs"
3121  cf_with_progs=$withval
3122else
3123  cf_with_progs=yes
3124fi;
3125echo "$as_me:3125: result: $cf_with_progs" >&5
3126echo "${ECHO_T}$cf_with_progs" >&6
3127
3128echo "$as_me:3128: checking if you wish to install curses.h" >&5
3129echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3130
3131# Check whether --with-curses-h or --without-curses-h was given.
3132if test "${with_curses_h+set}" = set; then
3133  withval="$with_curses_h"
3134  with_curses_h=$withval
3135else
3136  with_curses_h=yes
3137fi;
3138echo "$as_me:3138: result: $with_curses_h" >&5
3139echo "${ECHO_T}$with_curses_h" >&6
3140
3141modules_to_build="ncurses"
3142if test "X$cf_with_progs" != Xno ; then
3143modules_to_build="$modules_to_build progs tack"
3144fi
3145modules_to_build="$modules_to_build panel menu form"
3146
3147test "$program_prefix" != NONE &&
3148  program_transform_name="s,^,$program_prefix,;$program_transform_name"
3149# Use a double $ so make ignores it.
3150test "$program_suffix" != NONE &&
3151  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3152# Double any \ or $.  echo might interpret backslashes.
3153# By default was `s,x,x', remove it if useless.
3154cat <<\_ACEOF >conftest.sed
3155s/[\\$]/&&/g;s/;s,x,x,$//
3156_ACEOF
3157program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3158rm conftest.sed
3159
3160for ac_prog in mawk gawk nawk awk
3161do
3162  # Extract the first word of "$ac_prog", so it can be a program name with args.
3163set dummy $ac_prog; ac_word=$2
3164echo "$as_me:3164: checking for $ac_word" >&5
3165echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3166if test "${ac_cv_prog_AWK+set}" = set; then
3167  echo $ECHO_N "(cached) $ECHO_C" >&6
3168else
3169  if test -n "$AWK"; then
3170  ac_cv_prog_AWK="$AWK" # Let the user override the test.
3171else
3172  ac_save_IFS=$IFS; IFS=$ac_path_separator
3173ac_dummy="$PATH"
3174for ac_dir in $ac_dummy; do
3175  IFS=$ac_save_IFS
3176  test -z "$ac_dir" && ac_dir=.
3177  $as_executable_p "$ac_dir/$ac_word" || continue
3178ac_cv_prog_AWK="$ac_prog"
3179echo "$as_me:3179: found $ac_dir/$ac_word" >&5
3180break
3181done
3182
3183fi
3184fi
3185AWK=$ac_cv_prog_AWK
3186if test -n "$AWK"; then
3187  echo "$as_me:3187: result: $AWK" >&5
3188echo "${ECHO_T}$AWK" >&6
3189else
3190  echo "$as_me:3190: result: no" >&5
3191echo "${ECHO_T}no" >&6
3192fi
3193
3194  test -n "$AWK" && break
3195done
3196
3197test -z "$AWK" && { { echo "$as_me:3197: error: No awk program found" >&5
3198echo "$as_me: error: No awk program found" >&2;}
3199   { (exit 1); exit 1; }; }
3200
3201echo "$as_me:3201: checking for egrep" >&5
3202echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3203if test "${ac_cv_prog_egrep+set}" = set; then
3204  echo $ECHO_N "(cached) $ECHO_C" >&6
3205else
3206  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3207    then ac_cv_prog_egrep='grep -E'
3208    else ac_cv_prog_egrep='egrep'
3209    fi
3210fi
3211echo "$as_me:3211: result: $ac_cv_prog_egrep" >&5
3212echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3213 EGREP=$ac_cv_prog_egrep
3214
3215test -z "$EGREP" && { { echo "$as_me:3215: error: No egrep program found" >&5
3216echo "$as_me: error: No egrep program found" >&2;}
3217   { (exit 1); exit 1; }; }
3218
3219# Find a good install program.  We prefer a C program (faster),
3220# so one script is as good as another.  But avoid the broken or
3221# incompatible versions:
3222# SysV /etc/install, /usr/sbin/install
3223# SunOS /usr/etc/install
3224# IRIX /sbin/install
3225# AIX /bin/install
3226# AmigaOS /C/install, which installs bootblocks on floppy discs
3227# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3228# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3229# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3230# ./install, which can be erroneously created by make from ./install.sh.
3231echo "$as_me:3231: checking for a BSD compatible install" >&5
3232echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3233if test -z "$INSTALL"; then
3234if test "${ac_cv_path_install+set}" = set; then
3235  echo $ECHO_N "(cached) $ECHO_C" >&6
3236else
3237    ac_save_IFS=$IFS; IFS=$ac_path_separator
3238  for ac_dir in $PATH; do
3239    IFS=$ac_save_IFS
3240    # Account for people who put trailing slashes in PATH elements.
3241    case $ac_dir/ in
3242    / | ./ | .// | /cC/* \
3243    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3244    | /usr/ucb/* ) ;;
3245    *)
3246      # OSF1 and SCO ODT 3.0 have their own names for install.
3247      # Don't use installbsd from OSF since it installs stuff as root
3248      # by default.
3249      for ac_prog in ginstall scoinst install; do
3250        if $as_executable_p "$ac_dir/$ac_prog"; then
3251	  if test $ac_prog = install &&
3252            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3253	    # AIX install.  It has an incompatible calling convention.
3254	    :
3255	  elif test $ac_prog = install &&
3256	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3257	    # program-specific install script used by HP pwplus--don't use.
3258	    :
3259	  else
3260	    ac_cv_path_install="$ac_dir/$ac_prog -c"
3261	    break 2
3262	  fi
3263	fi
3264      done
3265      ;;
3266    esac
3267  done
3268
3269fi
3270  if test "${ac_cv_path_install+set}" = set; then
3271    INSTALL=$ac_cv_path_install
3272  else
3273    # As a last resort, use the slow shell script.  We don't cache a
3274    # path for INSTALL within a source directory, because that will
3275    # break other packages using the cache if that directory is
3276    # removed, or if the path is relative.
3277    INSTALL=$ac_install_sh
3278  fi
3279fi
3280echo "$as_me:3280: result: $INSTALL" >&5
3281echo "${ECHO_T}$INSTALL" >&6
3282
3283# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3284# It thinks the first close brace ends the variable substitution.
3285test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3286
3287test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3288
3289test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3290
3291case $INSTALL in
3292/*)
3293  ;;
3294*)
3295  cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3296  test -z "$cf_dir" && cf_dir=.
3297  INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3298  ;;
3299esac
3300
3301for ac_prog in tdlint lint alint
3302do
3303  # Extract the first word of "$ac_prog", so it can be a program name with args.
3304set dummy $ac_prog; ac_word=$2
3305echo "$as_me:3305: checking for $ac_word" >&5
3306echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3307if test "${ac_cv_prog_LINT+set}" = set; then
3308  echo $ECHO_N "(cached) $ECHO_C" >&6
3309else
3310  if test -n "$LINT"; then
3311  ac_cv_prog_LINT="$LINT" # Let the user override the test.
3312else
3313  ac_save_IFS=$IFS; IFS=$ac_path_separator
3314ac_dummy="$PATH"
3315for ac_dir in $ac_dummy; do
3316  IFS=$ac_save_IFS
3317  test -z "$ac_dir" && ac_dir=.
3318  $as_executable_p "$ac_dir/$ac_word" || continue
3319ac_cv_prog_LINT="$ac_prog"
3320echo "$as_me:3320: found $ac_dir/$ac_word" >&5
3321break
3322done
3323
3324fi
3325fi
3326LINT=$ac_cv_prog_LINT
3327if test -n "$LINT"; then
3328  echo "$as_me:3328: result: $LINT" >&5
3329echo "${ECHO_T}$LINT" >&6
3330else
3331  echo "$as_me:3331: result: no" >&5
3332echo "${ECHO_T}no" >&6
3333fi
3334
3335  test -n "$LINT" && break
3336done
3337
3338echo "$as_me:3338: checking whether ln -s works" >&5
3339echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3340LN_S=$as_ln_s
3341if test "$LN_S" = "ln -s"; then
3342  echo "$as_me:3342: result: yes" >&5
3343echo "${ECHO_T}yes" >&6
3344else
3345  echo "$as_me:3345: result: no, using $LN_S" >&5
3346echo "${ECHO_T}no, using $LN_S" >&6
3347fi
3348
3349echo "$as_me:3349: checking for long file names" >&5
3350echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3351if test "${ac_cv_sys_long_file_names+set}" = set; then
3352  echo $ECHO_N "(cached) $ECHO_C" >&6
3353else
3354  ac_cv_sys_long_file_names=yes
3355# Test for long file names in all the places we know might matter:
3356#      .		the current directory, where building will happen
3357#      $prefix/lib	where we will be installing things
3358#      $exec_prefix/lib	likewise
3359# eval it to expand exec_prefix.
3360#      $TMPDIR		if set, where it might want to write temporary files
3361# if $TMPDIR is not set:
3362#      /tmp		where it might want to write temporary files
3363#      /var/tmp		likewise
3364#      /usr/tmp		likewise
3365if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3366  ac_tmpdirs=$TMPDIR
3367else
3368  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3369fi
3370for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3371  test -d $ac_dir || continue
3372  test -w $ac_dir || continue # It is less confusing to not echo anything here.
3373  ac_xdir=$ac_dir/cf$$
3374  (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3375  ac_tf1=$ac_xdir/conftest9012345
3376  ac_tf2=$ac_xdir/conftest9012346
3377  (echo 1 >$ac_tf1) 2>/dev/null
3378  (echo 2 >$ac_tf2) 2>/dev/null
3379  ac_val=`cat $ac_tf1 2>/dev/null`
3380  if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3381    ac_cv_sys_long_file_names=no
3382    rm -rf $ac_xdir 2>/dev/null
3383    break
3384  fi
3385  rm -rf $ac_xdir 2>/dev/null
3386done
3387fi
3388echo "$as_me:3388: result: $ac_cv_sys_long_file_names" >&5
3389echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3390if test $ac_cv_sys_long_file_names = yes; then
3391
3392cat >>confdefs.h <<\EOF
3393#define HAVE_LONG_FILE_NAMES 1
3394EOF
3395
3396fi
3397
3398echo "$as_me:3398: checking if we should assume mixed-case filenames" >&5
3399echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3400
3401# Check whether --enable-mixed-case or --disable-mixed-case was given.
3402if test "${enable_mixed_case+set}" = set; then
3403  enableval="$enable_mixed_case"
3404  enable_mixedcase=$enableval
3405else
3406  enable_mixedcase=auto
3407fi;
3408echo "$as_me:3408: result: $enable_mixedcase" >&5
3409echo "${ECHO_T}$enable_mixedcase" >&6
3410if test "$enable_mixedcase" = "auto" ; then
3411
3412echo "$as_me:3412: checking if filesystem supports mixed-case filenames" >&5
3413echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3414if test "${cf_cv_mixedcase+set}" = set; then
3415  echo $ECHO_N "(cached) $ECHO_C" >&6
3416else
3417
3418if test "$cross_compiling" = yes ; then
3419	case $target_alias in #(vi
3420	*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3421		cf_cv_mixedcase=no
3422		;;
3423	*)
3424		cf_cv_mixedcase=yes
3425		;;
3426	esac
3427else
3428	rm -f conftest CONFTEST
3429	echo test >conftest
3430	if test -f CONFTEST ; then
3431		cf_cv_mixedcase=no
3432	else
3433		cf_cv_mixedcase=yes
3434	fi
3435	rm -f conftest CONFTEST
3436fi
3437
3438fi
3439echo "$as_me:3439: result: $cf_cv_mixedcase" >&5
3440echo "${ECHO_T}$cf_cv_mixedcase" >&6
3441test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3442#define MIXEDCASE_FILENAMES 1
3443EOF
3444
3445else
3446    cf_cv_mixedcase=$enable_mixedcase
3447    if test "$enable_mixedcase" = "yes" ; then
3448        cat >>confdefs.h <<\EOF
3449#define MIXEDCASE_FILENAMES 1
3450EOF
3451
3452    fi
3453fi
3454
3455# do this after mixed-case option (tags/TAGS is not as important as tic).
3456echo "$as_me:3456: checking whether ${MAKE-make} sets \${MAKE}" >&5
3457echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3458set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3459if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3460  echo $ECHO_N "(cached) $ECHO_C" >&6
3461else
3462  cat >conftest.make <<\EOF
3463all:
3464	@echo 'ac_maketemp="${MAKE}"'
3465EOF
3466# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3467eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3468if test -n "$ac_maketemp"; then
3469  eval ac_cv_prog_make_${ac_make}_set=yes
3470else
3471  eval ac_cv_prog_make_${ac_make}_set=no
3472fi
3473rm -f conftest.make
3474fi
3475if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3476  echo "$as_me:3476: result: yes" >&5
3477echo "${ECHO_T}yes" >&6
3478  SET_MAKE=
3479else
3480  echo "$as_me:3480: result: no" >&5
3481echo "${ECHO_T}no" >&6
3482  SET_MAKE="MAKE=${MAKE-make}"
3483fi
3484
3485# Extract the first word of "ctags", so it can be a program name with args.
3486set dummy ctags; ac_word=$2
3487echo "$as_me:3487: checking for $ac_word" >&5
3488echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3489if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3490  echo $ECHO_N "(cached) $ECHO_C" >&6
3491else
3492  if test -n "$MAKE_LOWER_TAGS"; then
3493  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3494else
3495  ac_save_IFS=$IFS; IFS=$ac_path_separator
3496ac_dummy="$PATH"
3497for ac_dir in $ac_dummy; do
3498  IFS=$ac_save_IFS
3499  test -z "$ac_dir" && ac_dir=.
3500  $as_executable_p "$ac_dir/$ac_word" || continue
3501ac_cv_prog_MAKE_LOWER_TAGS="yes"
3502echo "$as_me:3502: found $ac_dir/$ac_word" >&5
3503break
3504done
3505
3506  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3507fi
3508fi
3509MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3510if test -n "$MAKE_LOWER_TAGS"; then
3511  echo "$as_me:3511: result: $MAKE_LOWER_TAGS" >&5
3512echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3513else
3514  echo "$as_me:3514: result: no" >&5
3515echo "${ECHO_T}no" >&6
3516fi
3517
3518if test "$cf_cv_mixedcase" = yes ; then
3519	# Extract the first word of "etags", so it can be a program name with args.
3520set dummy etags; ac_word=$2
3521echo "$as_me:3521: checking for $ac_word" >&5
3522echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3523if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3524  echo $ECHO_N "(cached) $ECHO_C" >&6
3525else
3526  if test -n "$MAKE_UPPER_TAGS"; then
3527  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3528else
3529  ac_save_IFS=$IFS; IFS=$ac_path_separator
3530ac_dummy="$PATH"
3531for ac_dir in $ac_dummy; do
3532  IFS=$ac_save_IFS
3533  test -z "$ac_dir" && ac_dir=.
3534  $as_executable_p "$ac_dir/$ac_word" || continue
3535ac_cv_prog_MAKE_UPPER_TAGS="yes"
3536echo "$as_me:3536: found $ac_dir/$ac_word" >&5
3537break
3538done
3539
3540  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3541fi
3542fi
3543MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3544if test -n "$MAKE_UPPER_TAGS"; then
3545  echo "$as_me:3545: result: $MAKE_UPPER_TAGS" >&5
3546echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3547else
3548  echo "$as_me:3548: result: no" >&5
3549echo "${ECHO_T}no" >&6
3550fi
3551
3552else
3553	MAKE_UPPER_TAGS=no
3554fi
3555
3556if test "$MAKE_UPPER_TAGS" = yes ; then
3557	MAKE_UPPER_TAGS=
3558else
3559	MAKE_UPPER_TAGS="#"
3560fi
3561
3562if test "$MAKE_LOWER_TAGS" = yes ; then
3563	MAKE_LOWER_TAGS=
3564else
3565	MAKE_LOWER_TAGS="#"
3566fi
3567
3568echo "$as_me:3568: checking for makeflags variable" >&5
3569echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3570if test "${cf_cv_makeflags+set}" = set; then
3571  echo $ECHO_N "(cached) $ECHO_C" >&6
3572else
3573
3574	cf_cv_makeflags=''
3575	for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3576	do
3577		cat >cf_makeflags.tmp <<CF_EOF
3578SHELL = /bin/sh
3579all :
3580	@ echo '.$cf_option'
3581CF_EOF
3582		cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[ 	]*$,,'`
3583		case "$cf_result" in
3584		.*k)
3585			cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3586			case "$cf_result" in
3587			.*CC=*)	cf_cv_makeflags=
3588				;;
3589			*)	cf_cv_makeflags=$cf_option
3590				;;
3591			esac
3592			break
3593			;;
3594		.-)	;;
3595		*)	echo "given option \"$cf_option\", no match \"$cf_result\""
3596			;;
3597		esac
3598	done
3599	rm -f cf_makeflags.tmp
3600
3601fi
3602echo "$as_me:3602: result: $cf_cv_makeflags" >&5
3603echo "${ECHO_T}$cf_cv_makeflags" >&6
3604
3605if test -n "$ac_tool_prefix"; then
3606  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3607set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3608echo "$as_me:3608: checking for $ac_word" >&5
3609echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3610if test "${ac_cv_prog_RANLIB+set}" = set; then
3611  echo $ECHO_N "(cached) $ECHO_C" >&6
3612else
3613  if test -n "$RANLIB"; then
3614  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3615else
3616  ac_save_IFS=$IFS; IFS=$ac_path_separator
3617ac_dummy="$PATH"
3618for ac_dir in $ac_dummy; do
3619  IFS=$ac_save_IFS
3620  test -z "$ac_dir" && ac_dir=.
3621  $as_executable_p "$ac_dir/$ac_word" || continue
3622ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3623echo "$as_me:3623: found $ac_dir/$ac_word" >&5
3624break
3625done
3626
3627fi
3628fi
3629RANLIB=$ac_cv_prog_RANLIB
3630if test -n "$RANLIB"; then
3631  echo "$as_me:3631: result: $RANLIB" >&5
3632echo "${ECHO_T}$RANLIB" >&6
3633else
3634  echo "$as_me:3634: result: no" >&5
3635echo "${ECHO_T}no" >&6
3636fi
3637
3638fi
3639if test -z "$ac_cv_prog_RANLIB"; then
3640  ac_ct_RANLIB=$RANLIB
3641  # Extract the first word of "ranlib", so it can be a program name with args.
3642set dummy ranlib; ac_word=$2
3643echo "$as_me:3643: checking for $ac_word" >&5
3644echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3645if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3646  echo $ECHO_N "(cached) $ECHO_C" >&6
3647else
3648  if test -n "$ac_ct_RANLIB"; then
3649  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3650else
3651  ac_save_IFS=$IFS; IFS=$ac_path_separator
3652ac_dummy="$PATH"
3653for ac_dir in $ac_dummy; do
3654  IFS=$ac_save_IFS
3655  test -z "$ac_dir" && ac_dir=.
3656  $as_executable_p "$ac_dir/$ac_word" || continue
3657ac_cv_prog_ac_ct_RANLIB="ranlib"
3658echo "$as_me:3658: found $ac_dir/$ac_word" >&5
3659break
3660done
3661
3662  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3663fi
3664fi
3665ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3666if test -n "$ac_ct_RANLIB"; then
3667  echo "$as_me:3667: result: $ac_ct_RANLIB" >&5
3668echo "${ECHO_T}$ac_ct_RANLIB" >&6
3669else
3670  echo "$as_me:3670: result: no" >&5
3671echo "${ECHO_T}no" >&6
3672fi
3673
3674  RANLIB=$ac_ct_RANLIB
3675else
3676  RANLIB="$ac_cv_prog_RANLIB"
3677fi
3678
3679if test -n "$ac_tool_prefix"; then
3680  # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3681set dummy ${ac_tool_prefix}ld; ac_word=$2
3682echo "$as_me:3682: checking for $ac_word" >&5
3683echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3684if test "${ac_cv_prog_LD+set}" = set; then
3685  echo $ECHO_N "(cached) $ECHO_C" >&6
3686else
3687  if test -n "$LD"; then
3688  ac_cv_prog_LD="$LD" # Let the user override the test.
3689else
3690  ac_save_IFS=$IFS; IFS=$ac_path_separator
3691ac_dummy="$PATH"
3692for ac_dir in $ac_dummy; do
3693  IFS=$ac_save_IFS
3694  test -z "$ac_dir" && ac_dir=.
3695  $as_executable_p "$ac_dir/$ac_word" || continue
3696ac_cv_prog_LD="${ac_tool_prefix}ld"
3697echo "$as_me:3697: found $ac_dir/$ac_word" >&5
3698break
3699done
3700
3701fi
3702fi
3703LD=$ac_cv_prog_LD
3704if test -n "$LD"; then
3705  echo "$as_me:3705: result: $LD" >&5
3706echo "${ECHO_T}$LD" >&6
3707else
3708  echo "$as_me:3708: result: no" >&5
3709echo "${ECHO_T}no" >&6
3710fi
3711
3712fi
3713if test -z "$ac_cv_prog_LD"; then
3714  ac_ct_LD=$LD
3715  # Extract the first word of "ld", so it can be a program name with args.
3716set dummy ld; ac_word=$2
3717echo "$as_me:3717: checking for $ac_word" >&5
3718echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3719if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3720  echo $ECHO_N "(cached) $ECHO_C" >&6
3721else
3722  if test -n "$ac_ct_LD"; then
3723  ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3724else
3725  ac_save_IFS=$IFS; IFS=$ac_path_separator
3726ac_dummy="$PATH"
3727for ac_dir in $ac_dummy; do
3728  IFS=$ac_save_IFS
3729  test -z "$ac_dir" && ac_dir=.
3730  $as_executable_p "$ac_dir/$ac_word" || continue
3731ac_cv_prog_ac_ct_LD="ld"
3732echo "$as_me:3732: found $ac_dir/$ac_word" >&5
3733break
3734done
3735
3736  test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3737fi
3738fi
3739ac_ct_LD=$ac_cv_prog_ac_ct_LD
3740if test -n "$ac_ct_LD"; then
3741  echo "$as_me:3741: result: $ac_ct_LD" >&5
3742echo "${ECHO_T}$ac_ct_LD" >&6
3743else
3744  echo "$as_me:3744: result: no" >&5
3745echo "${ECHO_T}no" >&6
3746fi
3747
3748  LD=$ac_ct_LD
3749else
3750  LD="$ac_cv_prog_LD"
3751fi
3752
3753if test -n "$ac_tool_prefix"; then
3754  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3755set dummy ${ac_tool_prefix}ar; ac_word=$2
3756echo "$as_me:3756: checking for $ac_word" >&5
3757echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3758if test "${ac_cv_prog_AR+set}" = set; then
3759  echo $ECHO_N "(cached) $ECHO_C" >&6
3760else
3761  if test -n "$AR"; then
3762  ac_cv_prog_AR="$AR" # Let the user override the test.
3763else
3764  ac_save_IFS=$IFS; IFS=$ac_path_separator
3765ac_dummy="$PATH"
3766for ac_dir in $ac_dummy; do
3767  IFS=$ac_save_IFS
3768  test -z "$ac_dir" && ac_dir=.
3769  $as_executable_p "$ac_dir/$ac_word" || continue
3770ac_cv_prog_AR="${ac_tool_prefix}ar"
3771echo "$as_me:3771: found $ac_dir/$ac_word" >&5
3772break
3773done
3774
3775fi
3776fi
3777AR=$ac_cv_prog_AR
3778if test -n "$AR"; then
3779  echo "$as_me:3779: result: $AR" >&5
3780echo "${ECHO_T}$AR" >&6
3781else
3782  echo "$as_me:3782: result: no" >&5
3783echo "${ECHO_T}no" >&6
3784fi
3785
3786fi
3787if test -z "$ac_cv_prog_AR"; then
3788  ac_ct_AR=$AR
3789  # Extract the first word of "ar", so it can be a program name with args.
3790set dummy ar; ac_word=$2
3791echo "$as_me:3791: checking for $ac_word" >&5
3792echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3793if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3794  echo $ECHO_N "(cached) $ECHO_C" >&6
3795else
3796  if test -n "$ac_ct_AR"; then
3797  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3798else
3799  ac_save_IFS=$IFS; IFS=$ac_path_separator
3800ac_dummy="$PATH"
3801for ac_dir in $ac_dummy; do
3802  IFS=$ac_save_IFS
3803  test -z "$ac_dir" && ac_dir=.
3804  $as_executable_p "$ac_dir/$ac_word" || continue
3805ac_cv_prog_ac_ct_AR="ar"
3806echo "$as_me:3806: found $ac_dir/$ac_word" >&5
3807break
3808done
3809
3810  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3811fi
3812fi
3813ac_ct_AR=$ac_cv_prog_ac_ct_AR
3814if test -n "$ac_ct_AR"; then
3815  echo "$as_me:3815: result: $ac_ct_AR" >&5
3816echo "${ECHO_T}$ac_ct_AR" >&6
3817else
3818  echo "$as_me:3818: result: no" >&5
3819echo "${ECHO_T}no" >&6
3820fi
3821
3822  AR=$ac_ct_AR
3823else
3824  AR="$ac_cv_prog_AR"
3825fi
3826
3827if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3828  echo $ECHO_N "(cached) $ECHO_C" >&6
3829else
3830
3831echo "$as_me:3831: checking for archiver options (symbol AR_OPTS)" >&5
3832echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3833
3834if test -z "$AR_OPTS" ; then
3835	AR_OPTS=rv
3836
3837fi
3838
3839cf_cv_subst_AR_OPTS=$AR_OPTS
3840echo "$as_me:3840: result: $AR_OPTS" >&5
3841echo "${ECHO_T}$AR_OPTS" >&6
3842
3843fi
3844
3845echo "$as_me:3845: checking if you have specified an install-prefix" >&5
3846echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3847
3848# Check whether --with-install-prefix or --without-install-prefix was given.
3849if test "${with_install_prefix+set}" = set; then
3850  withval="$with_install_prefix"
3851  case "$withval" in #(vi
3852	yes|no) #(vi
3853		;;
3854	*)	DESTDIR="$withval"
3855		;;
3856	esac
3857fi;
3858echo "$as_me:3858: result: $DESTDIR" >&5
3859echo "${ECHO_T}$DESTDIR" >&6
3860
3861###############################################################################
3862
3863# If we're cross-compiling, allow the user to override the tools and their
3864# options.  The configure script is oriented toward identifying the host
3865# compiler, etc., but we need a build compiler to generate parts of the source.
3866
3867if test "$cross_compiling" = yes ; then
3868
3869	# defaults that we might want to override
3870	: ${BUILD_CFLAGS:=''}
3871	: ${BUILD_CPPFLAGS:=''}
3872	: ${BUILD_LDFLAGS:=''}
3873	: ${BUILD_LIBS:=''}
3874	: ${BUILD_EXEEXT:='$x'}
3875	: ${BUILD_OBJEXT:='o'}
3876
3877# Check whether --with-build-cc or --without-build-cc was given.
3878if test "${with_build_cc+set}" = set; then
3879  withval="$with_build_cc"
3880  BUILD_CC="$withval"
3881else
3882  for ac_prog in gcc cc cl
3883do
3884  # Extract the first word of "$ac_prog", so it can be a program name with args.
3885set dummy $ac_prog; ac_word=$2
3886echo "$as_me:3886: checking for $ac_word" >&5
3887echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3888if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3889  echo $ECHO_N "(cached) $ECHO_C" >&6
3890else
3891  if test -n "$BUILD_CC"; then
3892  ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3893else
3894  ac_save_IFS=$IFS; IFS=$ac_path_separator
3895ac_dummy="$PATH"
3896for ac_dir in $ac_dummy; do
3897  IFS=$ac_save_IFS
3898  test -z "$ac_dir" && ac_dir=.
3899  $as_executable_p "$ac_dir/$ac_word" || continue
3900ac_cv_prog_BUILD_CC="$ac_prog"
3901echo "$as_me:3901: found $ac_dir/$ac_word" >&5
3902break
3903done
3904
3905fi
3906fi
3907BUILD_CC=$ac_cv_prog_BUILD_CC
3908if test -n "$BUILD_CC"; then
3909  echo "$as_me:3909: result: $BUILD_CC" >&5
3910echo "${ECHO_T}$BUILD_CC" >&6
3911else
3912  echo "$as_me:3912: result: no" >&5
3913echo "${ECHO_T}no" >&6
3914fi
3915
3916  test -n "$BUILD_CC" && break
3917done
3918
3919fi;
3920	echo "$as_me:3920: checking for native build C compiler" >&5
3921echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3922	echo "$as_me:3922: result: $BUILD_CC" >&5
3923echo "${ECHO_T}$BUILD_CC" >&6
3924
3925	echo "$as_me:3925: checking for native build C preprocessor" >&5
3926echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3927
3928# Check whether --with-build-cpp or --without-build-cpp was given.
3929if test "${with_build_cpp+set}" = set; then
3930  withval="$with_build_cpp"
3931  BUILD_CPP="$withval"
3932else
3933  BUILD_CPP='${BUILD_CC} -E'
3934fi;
3935	echo "$as_me:3935: result: $BUILD_CPP" >&5
3936echo "${ECHO_T}$BUILD_CPP" >&6
3937
3938	echo "$as_me:3938: checking for native build C flags" >&5
3939echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3940
3941# Check whether --with-build-cflags or --without-build-cflags was given.
3942if test "${with_build_cflags+set}" = set; then
3943  withval="$with_build_cflags"
3944  BUILD_CFLAGS="$withval"
3945fi;
3946	echo "$as_me:3946: result: $BUILD_CFLAGS" >&5
3947echo "${ECHO_T}$BUILD_CFLAGS" >&6
3948
3949	echo "$as_me:3949: checking for native build C preprocessor-flags" >&5
3950echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3951
3952# Check whether --with-build-cppflags or --without-build-cppflags was given.
3953if test "${with_build_cppflags+set}" = set; then
3954  withval="$with_build_cppflags"
3955  BUILD_CPPFLAGS="$withval"
3956fi;
3957	echo "$as_me:3957: result: $BUILD_CPPFLAGS" >&5
3958echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3959
3960	echo "$as_me:3960: checking for native build linker-flags" >&5
3961echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3962
3963# Check whether --with-build-ldflags or --without-build-ldflags was given.
3964if test "${with_build_ldflags+set}" = set; then
3965  withval="$with_build_ldflags"
3966  BUILD_LDFLAGS="$withval"
3967fi;
3968	echo "$as_me:3968: result: $BUILD_LDFLAGS" >&5
3969echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3970
3971	echo "$as_me:3971: checking for native build linker-libraries" >&5
3972echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3973
3974# Check whether --with-build-libs or --without-build-libs was given.
3975if test "${with_build_libs+set}" = set; then
3976  withval="$with_build_libs"
3977  BUILD_LIBS="$withval"
3978fi;
3979	echo "$as_me:3979: result: $BUILD_LIBS" >&5
3980echo "${ECHO_T}$BUILD_LIBS" >&6
3981
3982	# this assumes we're on Unix.
3983	BUILD_EXEEXT=
3984	BUILD_OBJEXT=o
3985
3986	: ${BUILD_CC:='${CC}'}
3987
3988	if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3989		{ { echo "$as_me:3989: error: Cross-build requires two compilers.
3990Use --with-build-cc to specify the native compiler." >&5
3991echo "$as_me: error: Cross-build requires two compilers.
3992Use --with-build-cc to specify the native compiler." >&2;}
3993   { (exit 1); exit 1; }; }
3994	fi
3995
3996else
3997	: ${BUILD_CC:='${CC}'}
3998	: ${BUILD_CPP:='${CPP}'}
3999	: ${BUILD_CFLAGS:='${CFLAGS}'}
4000	: ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4001	: ${BUILD_LDFLAGS:='${LDFLAGS}'}
4002	: ${BUILD_LIBS:='${LIBS}'}
4003	: ${BUILD_EXEEXT:='$x'}
4004	: ${BUILD_OBJEXT:='o'}
4005fi
4006
4007###############################################################################
4008
4009### Options to allow the user to specify the set of libraries which are used.
4010### Use "--without-normal --with-shared" to allow the default model to be
4011### shared, for example.
4012cf_list_models=""
4013
4014LIBTOOL=
4015
4016# common library maintenance symbols that are convenient for libtool scripts:
4017LIB_CREATE='${AR} -cr'
4018LIB_OBJECT='${OBJECTS}'
4019LIB_SUFFIX=.a
4020LIB_PREP="$RANLIB"
4021
4022# symbols used to prop libtool up to enable it to determine what it should be
4023# doing:
4024LIB_CLEAN=
4025LIB_COMPILE=
4026LIB_LINK='${CC}'
4027LIB_INSTALL=
4028LIB_UNINSTALL=
4029
4030echo "$as_me:4030: checking if you want to build libraries with libtool" >&5
4031echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4032
4033# Check whether --with-libtool or --without-libtool was given.
4034if test "${with_libtool+set}" = set; then
4035  withval="$with_libtool"
4036  with_libtool=$withval
4037else
4038  with_libtool=no
4039fi;
4040echo "$as_me:4040: result: $with_libtool" >&5
4041echo "${ECHO_T}$with_libtool" >&6
4042if test "$with_libtool" != "no"; then
4043
4044 	if test "$with_libtool" != "yes" ; then
4045
4046if test "x$prefix" != xNONE; then
4047  cf_path_syntax="$prefix"
4048else
4049  cf_path_syntax="$ac_default_prefix"
4050fi
4051
4052case ".$with_libtool" in #(vi
4053.\$\(*\)*|.\'*\'*) #(vi
4054  ;;
4055..|./*|.\\*) #(vi
4056  ;;
4057.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4058  ;;
4059.\${*prefix}*) #(vi
4060  eval with_libtool="$with_libtool"
4061  case ".$with_libtool" in #(vi
4062  .NONE/*)
4063    with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4064    ;;
4065  esac
4066  ;; #(vi
4067.no|.NONE/*)
4068  with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4069  ;;
4070*)
4071  { { echo "$as_me:4071: error: expected a pathname, not \"$with_libtool\"" >&5
4072echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4073   { (exit 1); exit 1; }; }
4074  ;;
4075esac
4076
4077		LIBTOOL=$with_libtool
4078	else
4079 		# Extract the first word of "libtool", so it can be a program name with args.
4080set dummy libtool; ac_word=$2
4081echo "$as_me:4081: checking for $ac_word" >&5
4082echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4083if test "${ac_cv_path_LIBTOOL+set}" = set; then
4084  echo $ECHO_N "(cached) $ECHO_C" >&6
4085else
4086  case $LIBTOOL in
4087  [\\/]* | ?:[\\/]*)
4088  ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4089  ;;
4090  *)
4091  ac_save_IFS=$IFS; IFS=$ac_path_separator
4092ac_dummy="$PATH"
4093for ac_dir in $ac_dummy; do
4094  IFS=$ac_save_IFS
4095  test -z "$ac_dir" && ac_dir=.
4096  if $as_executable_p "$ac_dir/$ac_word"; then
4097   ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4098   echo "$as_me:4098: found $ac_dir/$ac_word" >&5
4099   break
4100fi
4101done
4102
4103  ;;
4104esac
4105fi
4106LIBTOOL=$ac_cv_path_LIBTOOL
4107
4108if test -n "$LIBTOOL"; then
4109  echo "$as_me:4109: result: $LIBTOOL" >&5
4110echo "${ECHO_T}$LIBTOOL" >&6
4111else
4112  echo "$as_me:4112: result: no" >&5
4113echo "${ECHO_T}no" >&6
4114fi
4115
4116 	fi
4117 	if test -z "$LIBTOOL" ; then
4118 		{ { echo "$as_me:4118: error: Cannot find libtool" >&5
4119echo "$as_me: error: Cannot find libtool" >&2;}
4120   { (exit 1); exit 1; }; }
4121 	fi
4122	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4123	LIB_OBJECT='${OBJECTS:.o=.lo}'
4124	LIB_SUFFIX=.la
4125	LIB_CLEAN='${LIBTOOL} --mode=clean'
4126	LIB_COMPILE='${LIBTOOL} --mode=compile'
4127	LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4128	LIB_INSTALL='${LIBTOOL} --mode=install'
4129	LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4130	LIB_PREP=:
4131
4132	# Show the version of libtool
4133	echo "$as_me:4133: checking version of libtool" >&5
4134echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4135
4136	# Save the version in a cache variable - this is not entirely a good
4137	# thing, but the version string from libtool is very ugly, and for
4138	# bug reports it might be useful to have the original string.
4139	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4140	echo "$as_me:4140: result: $cf_cv_libtool_version" >&5
4141echo "${ECHO_T}$cf_cv_libtool_version" >&6
4142	if test -z "$cf_cv_libtool_version" ; then
4143		{ { echo "$as_me:4143: error: This is not GNU libtool" >&5
4144echo "$as_me: error: This is not GNU libtool" >&2;}
4145   { (exit 1); exit 1; }; }
4146	fi
4147
4148	# special hack to add --tag option for C++ compiler
4149	case $cf_cv_libtool_version in
4150	1.[5-9]*|[2-9]*)
4151		LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4152		LIBTOOL="$LIBTOOL --tag=CC"
4153		;;
4154	*)
4155		LIBTOOL_CXX="$LIBTOOL"
4156		;;
4157	esac
4158else
4159	LIBTOOL=""
4160	LIBTOOL_CXX=""
4161fi
4162
4163test -z "$LIBTOOL" && ECHO_LT=
4164
4165if test "$with_libtool" != "no" ; then
4166
4167cf_list_models="$cf_list_models libtool"
4168
4169else
4170
4171echo "$as_me:4171: checking if you want to build shared libraries" >&5
4172echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4173
4174# Check whether --with-shared or --without-shared was given.
4175if test "${with_shared+set}" = set; then
4176  withval="$with_shared"
4177  with_shared=$withval
4178else
4179  with_shared=no
4180fi;
4181echo "$as_me:4181: result: $with_shared" >&5
4182echo "${ECHO_T}$with_shared" >&6
4183test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4184
4185echo "$as_me:4185: checking if you want to build static libraries" >&5
4186echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4187
4188# Check whether --with-normal or --without-normal was given.
4189if test "${with_normal+set}" = set; then
4190  withval="$with_normal"
4191  with_normal=$withval
4192else
4193  with_normal=yes
4194fi;
4195echo "$as_me:4195: result: $with_normal" >&5
4196echo "${ECHO_T}$with_normal" >&6
4197test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4198
4199echo "$as_me:4199: checking if you want to build debug libraries" >&5
4200echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4201
4202# Check whether --with-debug or --without-debug was given.
4203if test "${with_debug+set}" = set; then
4204  withval="$with_debug"
4205  with_debug=$withval
4206else
4207  with_debug=yes
4208fi;
4209echo "$as_me:4209: result: $with_debug" >&5
4210echo "${ECHO_T}$with_debug" >&6
4211test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4212
4213echo "$as_me:4213: checking if you want to build profiling libraries" >&5
4214echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4215
4216# Check whether --with-profile or --without-profile was given.
4217if test "${with_profile+set}" = set; then
4218  withval="$with_profile"
4219  with_profile=$withval
4220else
4221  with_profile=no
4222fi;
4223echo "$as_me:4223: result: $with_profile" >&5
4224echo "${ECHO_T}$with_profile" >&6
4225test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4226
4227fi
4228
4229###############################################################################
4230
4231echo "$as_me:4231: checking for specified models" >&5
4232echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4233test -z "$cf_list_models" && cf_list_models=normal
4234test "$with_libtool" != "no" && cf_list_models=libtool
4235echo "$as_me:4235: result: $cf_list_models" >&5
4236echo "${ECHO_T}$cf_list_models" >&6
4237
4238### Use the first model as the default, and save its suffix for use in building
4239### up test-applications.
4240echo "$as_me:4240: checking for default model" >&5
4241echo $ECHO_N "checking for default model... $ECHO_C" >&6
4242DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4243echo "$as_me:4243: result: $DFT_LWR_MODEL" >&5
4244echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4245
4246DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4247
4248TICS_NAME=tic
4249
4250TINFO_NAME=tinfo
4251
4252LIB_NAME=ncurses
4253
4254LIB_DIR=../lib
4255LIB_2ND=../../lib
4256
4257	case $cf_cv_system_name in #(vi
4258	OS/2*|os2*) #(vi
4259        LIB_PREFIX=''
4260        ;;
4261	*)	LIB_PREFIX='lib'
4262        ;;
4263	esac
4264cf_prefix=$LIB_PREFIX
4265
4266LIB_PREFIX=$cf_prefix
4267
4268LIB_SUFFIX=
4269
4270###############################################################################
4271
4272echo "$as_me:4272: checking if you want to build a separate terminfo library" >&5
4273echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4274
4275# Check whether --with-termlib or --without-termlib was given.
4276if test "${with_termlib+set}" = set; then
4277  withval="$with_termlib"
4278  with_termlib=$withval
4279else
4280  with_termlib=no
4281fi;
4282echo "$as_me:4282: result: $with_termlib" >&5
4283echo "${ECHO_T}$with_termlib" >&6
4284
4285echo "$as_me:4285: checking if you want to build a separate tic library" >&5
4286echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4287
4288# Check whether --with-ticlib or --without-ticlib was given.
4289if test "${with_ticlib+set}" = set; then
4290  withval="$with_ticlib"
4291  with_ticlib=$withval
4292else
4293  with_ticlib=no
4294fi;
4295echo "$as_me:4295: result: $with_ticlib" >&5
4296echo "${ECHO_T}$with_ticlib" >&6
4297
4298### Checks for special libraries, must be done up-front.
4299SHLIB_LIST=""
4300
4301echo "$as_me:4301: checking if you want to link with the GPM mouse library" >&5
4302echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4303
4304# Check whether --with-gpm or --without-gpm was given.
4305if test "${with_gpm+set}" = set; then
4306  withval="$with_gpm"
4307  with_gpm=$withval
4308else
4309  with_gpm=maybe
4310fi;
4311echo "$as_me:4311: result: $with_gpm" >&5
4312echo "${ECHO_T}$with_gpm" >&6
4313
4314if test "$with_gpm" != no ; then
4315	echo "$as_me:4315: checking for gpm.h" >&5
4316echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4317if test "${ac_cv_header_gpm_h+set}" = set; then
4318  echo $ECHO_N "(cached) $ECHO_C" >&6
4319else
4320  cat >conftest.$ac_ext <<_ACEOF
4321#line 4321 "configure"
4322#include "confdefs.h"
4323#include <gpm.h>
4324_ACEOF
4325if { (eval echo "$as_me:4325: \"$ac_cpp conftest.$ac_ext\"") >&5
4326  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4327  ac_status=$?
4328  egrep -v '^ *\+' conftest.er1 >conftest.err
4329  rm -f conftest.er1
4330  cat conftest.err >&5
4331  echo "$as_me:4331: \$? = $ac_status" >&5
4332  (exit $ac_status); } >/dev/null; then
4333  if test -s conftest.err; then
4334    ac_cpp_err=$ac_c_preproc_warn_flag
4335  else
4336    ac_cpp_err=
4337  fi
4338else
4339  ac_cpp_err=yes
4340fi
4341if test -z "$ac_cpp_err"; then
4342  ac_cv_header_gpm_h=yes
4343else
4344  echo "$as_me: failed program was:" >&5
4345  cat conftest.$ac_ext >&5
4346  ac_cv_header_gpm_h=no
4347fi
4348rm -f conftest.err conftest.$ac_ext
4349fi
4350echo "$as_me:4350: result: $ac_cv_header_gpm_h" >&5
4351echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4352if test $ac_cv_header_gpm_h = yes; then
4353
4354		cat >>confdefs.h <<\EOF
4355#define HAVE_GPM_H 1
4356EOF
4357
4358		if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4359			test -n "$verbose" && echo "	assuming we really have GPM library" 1>&6
4360
4361echo "${as_me-configure}:4361: testing assuming we really have GPM library ..." 1>&5
4362
4363			cat >>confdefs.h <<\EOF
4364#define HAVE_LIBGPM 1
4365EOF
4366
4367		else
4368			echo "$as_me:4368: checking for Gpm_Open in -lgpm" >&5
4369echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4370if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4371  echo $ECHO_N "(cached) $ECHO_C" >&6
4372else
4373  ac_check_lib_save_LIBS=$LIBS
4374LIBS="-lgpm  $LIBS"
4375cat >conftest.$ac_ext <<_ACEOF
4376#line 4376 "configure"
4377#include "confdefs.h"
4378
4379/* Override any gcc2 internal prototype to avoid an error.  */
4380#ifdef __cplusplus
4381extern "C"
4382#endif
4383/* We use char because int might match the return type of a gcc2
4384   builtin and then its argument prototype would still apply.  */
4385char Gpm_Open ();
4386int
4387main ()
4388{
4389Gpm_Open ();
4390  ;
4391  return 0;
4392}
4393_ACEOF
4394rm -f conftest.$ac_objext conftest$ac_exeext
4395if { (eval echo "$as_me:4395: \"$ac_link\"") >&5
4396  (eval $ac_link) 2>&5
4397  ac_status=$?
4398  echo "$as_me:4398: \$? = $ac_status" >&5
4399  (exit $ac_status); } &&
4400         { ac_try='test -s conftest$ac_exeext'
4401  { (eval echo "$as_me:4401: \"$ac_try\"") >&5
4402  (eval $ac_try) 2>&5
4403  ac_status=$?
4404  echo "$as_me:4404: \$? = $ac_status" >&5
4405  (exit $ac_status); }; }; then
4406  ac_cv_lib_gpm_Gpm_Open=yes
4407else
4408  echo "$as_me: failed program was:" >&5
4409cat conftest.$ac_ext >&5
4410ac_cv_lib_gpm_Gpm_Open=no
4411fi
4412rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4413LIBS=$ac_check_lib_save_LIBS
4414fi
4415echo "$as_me:4415: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4416echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4417if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4418  :
4419else
4420
4421				{ { echo "$as_me:4421: error: Cannot link with GPM library" >&5
4422echo "$as_me: error: Cannot link with GPM library" >&2;}
4423   { (exit 1); exit 1; }; }
4424		fi
4425		with_gpm=yes
4426
4427fi
4428
4429else
4430
4431		test "$with_gpm" != maybe && { echo "$as_me:4431: WARNING: Cannot find GPM header" >&5
4432echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4433		with_gpm=no
4434
4435fi
4436
4437fi
4438
4439if test "$with_gpm" != no ; then
4440	echo "$as_me:4440: checking if you want to load GPM dynamically" >&5
4441echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4442
4443# Check whether --with-dlsym or --without-dlsym was given.
4444if test "${with_dlsym+set}" = set; then
4445  withval="$with_dlsym"
4446  with_dlsym=$withval
4447else
4448  with_dlsym=yes
4449fi;
4450	echo "$as_me:4450: result: $with_dlsym" >&5
4451echo "${ECHO_T}$with_dlsym" >&6
4452	if test "$with_dlsym" = yes ; then
4453
4454cf_have_dlsym=no
4455echo "$as_me:4455: checking for dlsym" >&5
4456echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4457if test "${ac_cv_func_dlsym+set}" = set; then
4458  echo $ECHO_N "(cached) $ECHO_C" >&6
4459else
4460  cat >conftest.$ac_ext <<_ACEOF
4461#line 4461 "configure"
4462#include "confdefs.h"
4463/* System header to define __stub macros and hopefully few prototypes,
4464    which can conflict with char dlsym (); below.  */
4465#include <assert.h>
4466/* Override any gcc2 internal prototype to avoid an error.  */
4467#ifdef __cplusplus
4468extern "C"
4469#endif
4470/* We use char because int might match the return type of a gcc2
4471   builtin and then its argument prototype would still apply.  */
4472char dlsym ();
4473char (*f) ();
4474
4475int
4476main ()
4477{
4478/* The GNU C library defines this for functions which it implements
4479    to always fail with ENOSYS.  Some functions are actually named
4480    something starting with __ and the normal name is an alias.  */
4481#if defined (__stub_dlsym) || defined (__stub___dlsym)
4482choke me
4483#else
4484f = dlsym;
4485#endif
4486
4487  ;
4488  return 0;
4489}
4490_ACEOF
4491rm -f conftest.$ac_objext conftest$ac_exeext
4492if { (eval echo "$as_me:4492: \"$ac_link\"") >&5
4493  (eval $ac_link) 2>&5
4494  ac_status=$?
4495  echo "$as_me:4495: \$? = $ac_status" >&5
4496  (exit $ac_status); } &&
4497         { ac_try='test -s conftest$ac_exeext'
4498  { (eval echo "$as_me:4498: \"$ac_try\"") >&5
4499  (eval $ac_try) 2>&5
4500  ac_status=$?
4501  echo "$as_me:4501: \$? = $ac_status" >&5
4502  (exit $ac_status); }; }; then
4503  ac_cv_func_dlsym=yes
4504else
4505  echo "$as_me: failed program was:" >&5
4506cat conftest.$ac_ext >&5
4507ac_cv_func_dlsym=no
4508fi
4509rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4510fi
4511echo "$as_me:4511: result: $ac_cv_func_dlsym" >&5
4512echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4513if test $ac_cv_func_dlsym = yes; then
4514  cf_have_dlsym=yes
4515else
4516
4517cf_have_libdl=no
4518echo "$as_me:4518: checking for dlsym in -ldl" >&5
4519echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4520if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4521  echo $ECHO_N "(cached) $ECHO_C" >&6
4522else
4523  ac_check_lib_save_LIBS=$LIBS
4524LIBS="-ldl  $LIBS"
4525cat >conftest.$ac_ext <<_ACEOF
4526#line 4526 "configure"
4527#include "confdefs.h"
4528
4529/* Override any gcc2 internal prototype to avoid an error.  */
4530#ifdef __cplusplus
4531extern "C"
4532#endif
4533/* We use char because int might match the return type of a gcc2
4534   builtin and then its argument prototype would still apply.  */
4535char dlsym ();
4536int
4537main ()
4538{
4539dlsym ();
4540  ;
4541  return 0;
4542}
4543_ACEOF
4544rm -f conftest.$ac_objext conftest$ac_exeext
4545if { (eval echo "$as_me:4545: \"$ac_link\"") >&5
4546  (eval $ac_link) 2>&5
4547  ac_status=$?
4548  echo "$as_me:4548: \$? = $ac_status" >&5
4549  (exit $ac_status); } &&
4550         { ac_try='test -s conftest$ac_exeext'
4551  { (eval echo "$as_me:4551: \"$ac_try\"") >&5
4552  (eval $ac_try) 2>&5
4553  ac_status=$?
4554  echo "$as_me:4554: \$? = $ac_status" >&5
4555  (exit $ac_status); }; }; then
4556  ac_cv_lib_dl_dlsym=yes
4557else
4558  echo "$as_me: failed program was:" >&5
4559cat conftest.$ac_ext >&5
4560ac_cv_lib_dl_dlsym=no
4561fi
4562rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4563LIBS=$ac_check_lib_save_LIBS
4564fi
4565echo "$as_me:4565: result: $ac_cv_lib_dl_dlsym" >&5
4566echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4567if test $ac_cv_lib_dl_dlsym = yes; then
4568
4569	cf_have_dlsym=yes
4570	cf_have_libdl=yes
4571fi
4572
4573fi
4574
4575if test "$cf_have_dlsym" = yes ; then
4576	test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4577
4578	echo "$as_me:4578: checking whether able to link to dl*() functions" >&5
4579echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4580	cat >conftest.$ac_ext <<_ACEOF
4581#line 4581 "configure"
4582#include "confdefs.h"
4583#include <dlfcn.h>
4584int
4585main ()
4586{
4587
4588		void *obj;
4589		if ((obj = dlopen("filename", 0)) != 0) {
4590			if (dlsym(obj, "symbolname") == 0) {
4591			dlclose(obj);
4592			}
4593		}
4594  ;
4595  return 0;
4596}
4597_ACEOF
4598rm -f conftest.$ac_objext conftest$ac_exeext
4599if { (eval echo "$as_me:4599: \"$ac_link\"") >&5
4600  (eval $ac_link) 2>&5
4601  ac_status=$?
4602  echo "$as_me:4602: \$? = $ac_status" >&5
4603  (exit $ac_status); } &&
4604         { ac_try='test -s conftest$ac_exeext'
4605  { (eval echo "$as_me:4605: \"$ac_try\"") >&5
4606  (eval $ac_try) 2>&5
4607  ac_status=$?
4608  echo "$as_me:4608: \$? = $ac_status" >&5
4609  (exit $ac_status); }; }; then
4610
4611		cat >>confdefs.h <<\EOF
4612#define HAVE_LIBDL 1
4613EOF
4614
4615else
4616  echo "$as_me: failed program was:" >&5
4617cat conftest.$ac_ext >&5
4618
4619		{ { echo "$as_me:4619: error: Cannot link test program for libdl" >&5
4620echo "$as_me: error: Cannot link test program for libdl" >&2;}
4621   { (exit 1); exit 1; }; }
4622fi
4623rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4624	echo "$as_me:4624: result: ok" >&5
4625echo "${ECHO_T}ok" >&6
4626else
4627	{ { echo "$as_me:4627: error: Cannot find dlsym function" >&5
4628echo "$as_me: error: Cannot find dlsym function" >&2;}
4629   { (exit 1); exit 1; }; }
4630fi
4631
4632		if test "$with_gpm" != yes ; then
4633			test -n "$verbose" && echo "	assuming soname for gpm is $with_gpm" 1>&6
4634
4635echo "${as_me-configure}:4635: testing assuming soname for gpm is $with_gpm ..." 1>&5
4636
4637			cf_cv_gpm_soname="$with_gpm"
4638		else
4639
4640echo "$as_me:4640: checking for soname of gpm library" >&5
4641echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4642if test "${cf_cv_gpm_soname+set}" = set; then
4643  echo $ECHO_N "(cached) $ECHO_C" >&6
4644else
4645
4646cf_cv_gpm_soname=unknown
4647if test "$cross_compiling" != yes ; then
4648cat >conftest.$ac_ext <<CF_EOF
4649#include <gpm.h>
4650int main()
4651{
4652if (Gpm_Open(0,0)) Gpm_Close();
4653	${cf_cv_main_return:-return}(0);
4654}
4655CF_EOF
4656cf_save_LIBS="$LIBS"
4657	LIBS="-lgpm $LIBS"
4658	if { (eval echo "$as_me:4658: \"$ac_compile\"") >&5
4659  (eval $ac_compile) 2>&5
4660  ac_status=$?
4661  echo "$as_me:4661: \$? = $ac_status" >&5
4662  (exit $ac_status); } ; then
4663		if { (eval echo "$as_me:4663: \"$ac_link\"") >&5
4664  (eval $ac_link) 2>&5
4665  ac_status=$?
4666  echo "$as_me:4666: \$? = $ac_status" >&5
4667  (exit $ac_status); } ; then
4668			cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4669			test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4670		fi
4671	fi
4672rm -f conftest*
4673LIBS="$cf_save_LIBS"
4674fi
4675
4676fi
4677echo "$as_me:4677: result: $cf_cv_gpm_soname" >&5
4678echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4679
4680		fi
4681		test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4682#define LIBGPM_SONAME "$cf_cv_gpm_soname"
4683EOF
4684
4685		SHLIB_LIST="-ldl $SHLIB_LIST"
4686	else
4687		SHLIB_LIST="-lgpm $SHLIB_LIST"
4688	fi
4689	cat >>confdefs.h <<\EOF
4690#define HAVE_LIBGPM 1
4691EOF
4692
4693echo "$as_me:4693: checking for Gpm_Wgetch in -lgpm" >&5
4694echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4695if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4696  echo $ECHO_N "(cached) $ECHO_C" >&6
4697else
4698  ac_check_lib_save_LIBS=$LIBS
4699LIBS="-lgpm  $LIBS"
4700cat >conftest.$ac_ext <<_ACEOF
4701#line 4701 "configure"
4702#include "confdefs.h"
4703
4704/* Override any gcc2 internal prototype to avoid an error.  */
4705#ifdef __cplusplus
4706extern "C"
4707#endif
4708/* We use char because int might match the return type of a gcc2
4709   builtin and then its argument prototype would still apply.  */
4710char Gpm_Wgetch ();
4711int
4712main ()
4713{
4714Gpm_Wgetch ();
4715  ;
4716  return 0;
4717}
4718_ACEOF
4719rm -f conftest.$ac_objext conftest$ac_exeext
4720if { (eval echo "$as_me:4720: \"$ac_link\"") >&5
4721  (eval $ac_link) 2>&5
4722  ac_status=$?
4723  echo "$as_me:4723: \$? = $ac_status" >&5
4724  (exit $ac_status); } &&
4725         { ac_try='test -s conftest$ac_exeext'
4726  { (eval echo "$as_me:4726: \"$ac_try\"") >&5
4727  (eval $ac_try) 2>&5
4728  ac_status=$?
4729  echo "$as_me:4729: \$? = $ac_status" >&5
4730  (exit $ac_status); }; }; then
4731  ac_cv_lib_gpm_Gpm_Wgetch=yes
4732else
4733  echo "$as_me: failed program was:" >&5
4734cat conftest.$ac_ext >&5
4735ac_cv_lib_gpm_Gpm_Wgetch=no
4736fi
4737rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4738LIBS=$ac_check_lib_save_LIBS
4739fi
4740echo "$as_me:4740: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4741echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4742if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4743
4744echo "$as_me:4744: checking if GPM is weakly bound to curses library" >&5
4745echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4746if test "${cf_cv_check_gpm_wgetch+set}" = set; then
4747  echo $ECHO_N "(cached) $ECHO_C" >&6
4748else
4749
4750cf_cv_check_gpm_wgetch=unknown
4751if test "$cross_compiling" != yes ; then
4752
4753cat >conftest.$ac_ext <<CF_EOF
4754#include <gpm.h>
4755int main()
4756{
4757	Gpm_Wgetch();
4758	${cf_cv_main_return:-return}(0);
4759}
4760CF_EOF
4761
4762	cf_save_LIBS="$LIBS"
4763	# This only works if we can look at the symbol table.  If a shared
4764	# library is stripped for install, we cannot use that.  So we're forced
4765	# to rely on the static library, noting that some packagers may not
4766	# include it.
4767	LIBS="-static -lgpm -dynamic $LIBS"
4768	if { (eval echo "$as_me:4768: \"$ac_compile\"") >&5
4769  (eval $ac_compile) 2>&5
4770  ac_status=$?
4771  echo "$as_me:4771: \$? = $ac_status" >&5
4772  (exit $ac_status); } ; then
4773		if { (eval echo "$as_me:4773: \"$ac_link\"") >&5
4774  (eval $ac_link) 2>&5
4775  ac_status=$?
4776  echo "$as_me:4776: \$? = $ac_status" >&5
4777  (exit $ac_status); } ; then
4778			cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
4779			test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
4780			test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
4781		fi
4782	fi
4783	rm -f conftest*
4784	LIBS="$cf_save_LIBS"
4785fi
4786
4787fi
4788echo "$as_me:4788: result: $cf_cv_check_gpm_wgetch" >&5
4789echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
4790
4791if test "$cf_cv_check_gpm_wgetch" != yes ; then
4792	{ echo "$as_me:4792: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4793echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4794fi
4795
4796fi
4797
4798fi
4799
4800# not everyone has "test -c"
4801if test -c /dev/sysmouse 2>/dev/null ; then
4802echo "$as_me:4802: checking if you want to use sysmouse" >&5
4803echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4804
4805# Check whether --with-sysmouse or --without-sysmouse was given.
4806if test "${with_sysmouse+set}" = set; then
4807  withval="$with_sysmouse"
4808  cf_with_sysmouse=$withval
4809else
4810  cf_with_sysmouse=maybe
4811fi;
4812	if test "$cf_with_sysmouse" != no ; then
4813	cat >conftest.$ac_ext <<_ACEOF
4814#line 4814 "configure"
4815#include "confdefs.h"
4816
4817#include <osreldate.h>
4818#if (__FreeBSD_version >= 400017)
4819#include <sys/consio.h>
4820#include <sys/fbio.h>
4821#else
4822#include <machine/console.h>
4823#endif
4824
4825int
4826main ()
4827{
4828
4829	struct mouse_info the_mouse;
4830	ioctl(0, CONS_MOUSECTL, &the_mouse);
4831
4832  ;
4833  return 0;
4834}
4835_ACEOF
4836rm -f conftest.$ac_objext
4837if { (eval echo "$as_me:4837: \"$ac_compile\"") >&5
4838  (eval $ac_compile) 2>&5
4839  ac_status=$?
4840  echo "$as_me:4840: \$? = $ac_status" >&5
4841  (exit $ac_status); } &&
4842         { ac_try='test -s conftest.$ac_objext'
4843  { (eval echo "$as_me:4843: \"$ac_try\"") >&5
4844  (eval $ac_try) 2>&5
4845  ac_status=$?
4846  echo "$as_me:4846: \$? = $ac_status" >&5
4847  (exit $ac_status); }; }; then
4848  cf_with_sysmouse=yes
4849else
4850  echo "$as_me: failed program was:" >&5
4851cat conftest.$ac_ext >&5
4852cf_with_sysmouse=no
4853fi
4854rm -f conftest.$ac_objext conftest.$ac_ext
4855	fi
4856echo "$as_me:4856: result: $cf_with_sysmouse" >&5
4857echo "${ECHO_T}$cf_with_sysmouse" >&6
4858test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4859#define USE_SYSMOUSE 1
4860EOF
4861
4862fi
4863
4864if test X"$CC_G_OPT" = X"" ; then
4865	CC_G_OPT='-g'
4866	test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4867fi
4868
4869if test X"$CXX_G_OPT" = X"" ; then
4870	CXX_G_OPT='-g'
4871	test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4872fi
4873
4874echo "$as_me:4874: checking for default loader flags" >&5
4875echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4876case $DFT_LWR_MODEL in
4877libtool) LD_MODEL=''   ;;
4878normal)  LD_MODEL=''   ;;
4879debug)   LD_MODEL=$CC_G_OPT ;;
4880profile) LD_MODEL='-pg';;
4881shared)  LD_MODEL=''   ;;
4882esac
4883echo "$as_me:4883: result: $LD_MODEL" >&5
4884echo "${ECHO_T}$LD_MODEL" >&6
4885
4886case $DFT_LWR_MODEL in
4887shared)
4888
4889echo "$as_me:4889: checking if rpath option should be used" >&5
4890echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4891
4892# Check whether --enable-rpath or --disable-rpath was given.
4893if test "${enable_rpath+set}" = set; then
4894  enableval="$enable_rpath"
4895  cf_cv_ld_rpath=$enableval
4896else
4897  cf_cv_ld_rpath=no
4898fi;
4899echo "$as_me:4899: result: $cf_cv_ld_rpath" >&5
4900echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4901
4902echo "$as_me:4902: checking if shared libraries should be relinked during install" >&5
4903echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
4904
4905# Check whether --enable-relink or --disable-relink was given.
4906if test "${enable_relink+set}" = set; then
4907  enableval="$enable_relink"
4908  cf_cv_do_relink=$enableval
4909else
4910  cf_cv_do_relink=yes
4911fi;
4912echo "$as_me:4912: result: $cf_cv_do_relink" >&5
4913echo "${ECHO_T}$cf_cv_do_relink" >&6
4914	;;
4915esac
4916
4917	LOCAL_LDFLAGS=
4918	LOCAL_LDFLAGS2=
4919	LD_SHARED_OPTS=
4920	INSTALL_LIB="-m 644"
4921
4922	cf_cv_do_symlinks=no
4923
4924	echo "$as_me:4924: checking if release/abi version should be used for shared libs" >&5
4925echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4926
4927# Check whether --with-shlib-version or --without-shlib-version was given.
4928if test "${with_shlib_version+set}" = set; then
4929  withval="$with_shlib_version"
4930  test -z "$withval" && withval=auto
4931	case $withval in #(vi
4932	yes) #(vi
4933		cf_cv_shlib_version=auto
4934		;;
4935	rel|abi|auto|no) #(vi
4936		cf_cv_shlib_version=$withval
4937		;;
4938	*)
4939		{ { echo "$as_me:4939: error: option value must be one of: rel, abi, auto or no" >&5
4940echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4941   { (exit 1); exit 1; }; }
4942		;;
4943	esac
4944
4945else
4946  cf_cv_shlib_version=auto
4947fi;
4948	echo "$as_me:4948: result: $cf_cv_shlib_version" >&5
4949echo "${ECHO_T}$cf_cv_shlib_version" >&6
4950
4951	cf_cv_rm_so_locs=no
4952
4953	# Some less-capable ports of gcc support only -fpic
4954	CC_SHARED_OPTS=
4955	if test "$GCC" = yes
4956	then
4957		echo "$as_me:4957: checking which $CC option to use" >&5
4958echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4959		cf_save_CFLAGS="$CFLAGS"
4960		for CC_SHARED_OPTS in -fPIC -fpic ''
4961		do
4962			CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4963			cat >conftest.$ac_ext <<_ACEOF
4964#line 4964 "configure"
4965#include "confdefs.h"
4966#include <stdio.h>
4967int
4968main ()
4969{
4970int x = 1
4971  ;
4972  return 0;
4973}
4974_ACEOF
4975rm -f conftest.$ac_objext
4976if { (eval echo "$as_me:4976: \"$ac_compile\"") >&5
4977  (eval $ac_compile) 2>&5
4978  ac_status=$?
4979  echo "$as_me:4979: \$? = $ac_status" >&5
4980  (exit $ac_status); } &&
4981         { ac_try='test -s conftest.$ac_objext'
4982  { (eval echo "$as_me:4982: \"$ac_try\"") >&5
4983  (eval $ac_try) 2>&5
4984  ac_status=$?
4985  echo "$as_me:4985: \$? = $ac_status" >&5
4986  (exit $ac_status); }; }; then
4987  break
4988else
4989  echo "$as_me: failed program was:" >&5
4990cat conftest.$ac_ext >&5
4991fi
4992rm -f conftest.$ac_objext conftest.$ac_ext
4993		done
4994		echo "$as_me:4994: result: $CC_SHARED_OPTS" >&5
4995echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4996		CFLAGS="$cf_save_CFLAGS"
4997	fi
4998
4999	cf_cv_shlib_version_infix=no
5000
5001	case $cf_cv_system_name in
5002	beos*)
5003		MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5004		;;
5005	cygwin*)
5006		CC_SHARED_OPTS=
5007		MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5008		cf_cv_shlib_version=cygdll
5009		cf_cv_shlib_version_infix=cygdll
5010		cat >mk_shared_lib.sh <<-CF_EOF
5011		#!/bin/sh
5012		SHARED_LIB=\$1
5013		IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5014		shift
5015		cat <<-EOF
5016		Linking shared library
5017		** SHARED_LIB \$SHARED_LIB
5018		** IMPORT_LIB \$IMPORT_LIB
5019EOF
5020		exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5021CF_EOF
5022		chmod +x mk_shared_lib.sh
5023		;;
5024	darwin*)
5025		EXTRA_CFLAGS="-no-cpp-precomp"
5026		CC_SHARED_OPTS="-dynamic"
5027		MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5028		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5029		cf_cv_shlib_version_infix=yes
5030		echo "$as_me:5030: checking if ld -search_paths_first works" >&5
5031echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5032if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5033  echo $ECHO_N "(cached) $ECHO_C" >&6
5034else
5035
5036			cf_save_LDFLAGS=$LDFLAGS
5037			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5038			cat >conftest.$ac_ext <<_ACEOF
5039#line 5039 "configure"
5040#include "confdefs.h"
5041
5042int
5043main ()
5044{
5045int i;
5046  ;
5047  return 0;
5048}
5049_ACEOF
5050rm -f conftest.$ac_objext conftest$ac_exeext
5051if { (eval echo "$as_me:5051: \"$ac_link\"") >&5
5052  (eval $ac_link) 2>&5
5053  ac_status=$?
5054  echo "$as_me:5054: \$? = $ac_status" >&5
5055  (exit $ac_status); } &&
5056         { ac_try='test -s conftest$ac_exeext'
5057  { (eval echo "$as_me:5057: \"$ac_try\"") >&5
5058  (eval $ac_try) 2>&5
5059  ac_status=$?
5060  echo "$as_me:5060: \$? = $ac_status" >&5
5061  (exit $ac_status); }; }; then
5062  cf_cv_ldflags_search_paths_first=yes
5063else
5064  echo "$as_me: failed program was:" >&5
5065cat conftest.$ac_ext >&5
5066cf_cv_ldflags_search_paths_first=no
5067fi
5068rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5069				LDFLAGS=$cf_save_LDFLAGS
5070fi
5071echo "$as_me:5071: result: $cf_cv_ldflags_search_paths_first" >&5
5072echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5073		if test $cf_cv_ldflags_search_paths_first = yes; then
5074			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5075		fi
5076		;;
5077	hpux*)
5078		# (tested with gcc 2.7.2 -- I don't have c89)
5079		if test "$GCC" = yes; then
5080			LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5081		else
5082			CC_SHARED_OPTS='+Z'
5083			LD_SHARED_OPTS='-Wl,+b,${libdir}'
5084		fi
5085		MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5086		# HP-UX shared libraries must be executable, and should be
5087		# readonly to exploit a quirk in the memory manager.
5088		INSTALL_LIB="-m 555"
5089		;;
5090	irix*)
5091		if test "$cf_cv_ld_rpath" = yes ; then
5092			if test "$GCC" = yes; then
5093				cf_ld_rpath_opt="-Wl,-rpath,"
5094				EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5095			else
5096				cf_ld_rpath_opt="-rpath "
5097				EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5098			fi
5099		fi
5100		# tested with IRIX 5.2 and 'cc'.
5101		if test "$GCC" != yes; then
5102			CC_SHARED_OPTS='-KPIC'
5103			MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5104		else
5105			MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5106		fi
5107		cf_cv_rm_so_locs=yes
5108		;;
5109	linux*|gnu*|k*bsd*-gnu)
5110		if test "$DFT_LWR_MODEL" = "shared" ; then
5111			LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5112			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5113		fi
5114		if test "$cf_cv_ld_rpath" = yes ; then
5115			cf_ld_rpath_opt="-Wl,-rpath,"
5116			EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5117		fi
5118
5119	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5120	if test "$cf_cv_shlib_version" = rel; then
5121		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5122	else
5123		cf_cv_shared_soname='`basename $@`'
5124	fi
5125
5126		MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5127		;;
5128	openbsd[2-9].*)
5129		if test "$DFT_LWR_MODEL" = "shared" ; then
5130			LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5131			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5132		fi
5133		if test "$cf_cv_ld_rpath" = yes ; then
5134			cf_ld_rpath_opt="-Wl,-rpath,"
5135			EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5136		fi
5137		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5138
5139	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5140	if test "$cf_cv_shlib_version" = rel; then
5141		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5142	else
5143		cf_cv_shared_soname='`basename $@`'
5144	fi
5145
5146		MK_SHARED_LIB='${CC} ${CFLAGS} -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5147		;;
5148	nto-qnx*|openbsd*|freebsd[12].*)
5149		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5150		MK_SHARED_LIB='${LD} -Bshareable -o $@'
5151		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5152		;;
5153	freebsd*)
5154		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5155		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5156			LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5157			LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5158			cf_ld_rpath_opt="-rpath "
5159			EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5160		fi
5161
5162	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5163	if test "$cf_cv_shlib_version" = rel; then
5164		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5165	else
5166		cf_cv_shared_soname='`basename $@`'
5167	fi
5168
5169		MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5170		;;
5171	netbsd*)
5172		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5173		test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5174		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5175			LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5176			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5177			EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5178			if test "$cf_cv_shlib_version" = auto; then
5179			if test -f /usr/libexec/ld.elf_so; then
5180				cf_cv_shlib_version=abi
5181			else
5182				cf_cv_shlib_version=rel
5183			fi
5184			fi
5185
5186	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5187	if test "$cf_cv_shlib_version" = rel; then
5188		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5189	else
5190		cf_cv_shared_soname='`basename $@`'
5191	fi
5192
5193			MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5194		else
5195			MK_SHARED_LIB='${LD} -Bshareable -o $@'
5196		fi
5197		;;
5198	osf*|mls+*)
5199		# tested with OSF/1 V3.2 and 'cc'
5200		# tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5201		# link with shared libs).
5202		MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5203		case $host_os in
5204		osf4*)
5205			MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5206			;;
5207		esac
5208		MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5209		if test "$DFT_LWR_MODEL" = "shared" ; then
5210			LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5211			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5212		fi
5213		if test "$cf_cv_ld_rpath" = yes ; then
5214			cf_ld_rpath_opt="-rpath"
5215			# EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5216		fi
5217		cf_cv_rm_so_locs=yes
5218		;;
5219	sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5220		# tested with osr5.0.5
5221		if test "$GCC" != yes; then
5222			CC_SHARED_OPTS='-belf -KPIC'
5223		fi
5224		MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5225		if test "$cf_cv_ld_rpath" = yes ; then
5226			# only way is to set LD_RUN_PATH but no switch for it
5227			RUN_PATH=$libdir
5228		fi
5229		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5230		LINK_PROGS='LD_RUN_PATH=${libdir}'
5231		LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5232		;;
5233	sunos4*)
5234		# tested with SunOS 4.1.1 and gcc 2.7.0
5235		if test "$GCC" != yes; then
5236			CC_SHARED_OPTS='-KPIC'
5237		fi
5238		MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5239		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5240		;;
5241	solaris2*)
5242		# tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5243		# tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5244		if test "$DFT_LWR_MODEL" = "shared" ; then
5245			LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5246			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5247		fi
5248		if test "$cf_cv_ld_rpath" = yes ; then
5249			cf_ld_rpath_opt="-R"
5250			EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5251		fi
5252
5253	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5254	if test "$cf_cv_shlib_version" = rel; then
5255		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5256	else
5257		cf_cv_shared_soname='`basename $@`'
5258	fi
5259
5260		if test "$GCC" != yes; then
5261			CC_SHARED_OPTS='-xcode=pic32'
5262			MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5263		else
5264			MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5265		fi
5266		;;
5267	sysv5uw7*|unix_sv*)
5268		# tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5269		if test "$GCC" != yes; then
5270			CC_SHARED_OPTS='-KPIC'
5271		fi
5272		MK_SHARED_LIB='${LD} -d y -G -o $@'
5273		;;
5274	*)
5275		CC_SHARED_OPTS='unknown'
5276		MK_SHARED_LIB='echo unknown'
5277		;;
5278	esac
5279
5280	# This works if the last tokens in $MK_SHARED_LIB are the -o target.
5281	case "$cf_cv_shlib_version" in #(vi
5282	rel|abi)
5283		case "$MK_SHARED_LIB" in #(vi
5284		*'-o $@')
5285			test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5286			;;
5287		*)
5288			{ echo "$as_me:5288: WARNING: ignored --with-shlib-version" >&5
5289echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5290			;;
5291		esac
5292		;;
5293	esac
5294
5295	if test -n "$cf_ld_rpath_opt" ; then
5296		echo "$as_me:5296: checking if we need a space after rpath option" >&5
5297echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5298		cf_save_LIBS="$LIBS"
5299		LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5300		cat >conftest.$ac_ext <<_ACEOF
5301#line 5301 "configure"
5302#include "confdefs.h"
5303
5304int
5305main ()
5306{
5307
5308  ;
5309  return 0;
5310}
5311_ACEOF
5312rm -f conftest.$ac_objext conftest$ac_exeext
5313if { (eval echo "$as_me:5313: \"$ac_link\"") >&5
5314  (eval $ac_link) 2>&5
5315  ac_status=$?
5316  echo "$as_me:5316: \$? = $ac_status" >&5
5317  (exit $ac_status); } &&
5318         { ac_try='test -s conftest$ac_exeext'
5319  { (eval echo "$as_me:5319: \"$ac_try\"") >&5
5320  (eval $ac_try) 2>&5
5321  ac_status=$?
5322  echo "$as_me:5322: \$? = $ac_status" >&5
5323  (exit $ac_status); }; }; then
5324  cf_rpath_space=no
5325else
5326  echo "$as_me: failed program was:" >&5
5327cat conftest.$ac_ext >&5
5328cf_rpath_space=yes
5329fi
5330rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5331		LIBS="$cf_save_LIBS"
5332		echo "$as_me:5332: result: $cf_rpath_space" >&5
5333echo "${ECHO_T}$cf_rpath_space" >&6
5334		test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5335		MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5336	fi
5337
5338if test "$CC_SHARED_OPTS" = "unknown"; then
5339	for model in $cf_list_models; do
5340		if test "$model" = "shared"; then
5341			{ { echo "$as_me:5341: error: Shared libraries are not supported in this version" >&5
5342echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5343   { (exit 1); exit 1; }; }
5344		fi
5345	done
5346fi
5347
5348###############################################################################
5349
5350###	use option --disable-overwrite to leave out the link to -lcurses
5351echo "$as_me:5351: checking if you wish to install ncurses overwriting curses" >&5
5352echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5353
5354# Check whether --enable-overwrite or --disable-overwrite was given.
5355if test "${enable_overwrite+set}" = set; then
5356  enableval="$enable_overwrite"
5357  with_overwrite=$enableval
5358else
5359  if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5360fi;
5361echo "$as_me:5361: result: $with_overwrite" >&5
5362echo "${ECHO_T}$with_overwrite" >&6
5363
5364echo "$as_me:5364: checking if external terminfo-database is used" >&5
5365echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5366
5367# Check whether --enable-database or --disable-database was given.
5368if test "${enable_database+set}" = set; then
5369  enableval="$enable_database"
5370  use_database=$enableval
5371else
5372  use_database=yes
5373fi;
5374echo "$as_me:5374: result: $use_database" >&5
5375echo "${ECHO_T}$use_database" >&6
5376
5377case $host_os in #(vi
5378os2*) #(vi
5379	TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5380	;;
5381*) #(vi
5382	TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5383	;;
5384esac
5385
5386	case $cf_cv_system_name in
5387	os2*)	PATHSEP=';'  ;;
5388	*)	PATHSEP=':'  ;;
5389	esac
5390
5391if test "$use_database" != no ; then
5392	cat >>confdefs.h <<\EOF
5393#define USE_DATABASE 1
5394EOF
5395
5396	echo "$as_me:5396: checking which terminfo source-file will be installed" >&5
5397echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5398
5399# Check whether --enable-database or --disable-database was given.
5400if test "${enable_database+set}" = set; then
5401  enableval="$enable_database"
5402  TERMINFO_SRC=$withval
5403fi;
5404	echo "$as_me:5404: result: $TERMINFO_SRC" >&5
5405echo "${ECHO_T}$TERMINFO_SRC" >&6
5406
5407	echo "$as_me:5407: checking whether to use hashed database instead of directory/tree" >&5
5408echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5409
5410# Check whether --with-hashed-db or --without-hashed-db was given.
5411if test "${with_hashed_db+set}" = set; then
5412  withval="$with_hashed_db"
5413
5414else
5415  with_hashed_db=no
5416fi;
5417	echo "$as_me:5417: result: $with_hashed_db" >&5
5418echo "${ECHO_T}$with_hashed_db" >&6
5419else
5420	with_hashed_db=no
5421fi
5422
5423echo "$as_me:5423: checking for list of fallback descriptions" >&5
5424echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5425
5426# Check whether --with-fallbacks or --without-fallbacks was given.
5427if test "${with_fallbacks+set}" = set; then
5428  withval="$with_fallbacks"
5429  with_fallback=$withval
5430else
5431  with_fallback=
5432fi;
5433echo "$as_me:5433: result: $with_fallback" >&5
5434echo "${ECHO_T}$with_fallback" >&6
5435FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5436
5437echo "$as_me:5437: checking if you want modern xterm or antique" >&5
5438echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5439
5440# Check whether --with-xterm-new or --without-xterm-new was given.
5441if test "${with_xterm_new+set}" = set; then
5442  withval="$with_xterm_new"
5443  with_xterm_new=$withval
5444else
5445  with_xterm_new=yes
5446fi;
5447case $with_xterm_new in
5448no)	with_xterm_new=xterm-old;;
5449*)	with_xterm_new=xterm-new;;
5450esac
5451echo "$as_me:5451: result: $with_xterm_new" >&5
5452echo "${ECHO_T}$with_xterm_new" >&6
5453WHICH_XTERM=$with_xterm_new
5454
5455MAKE_TERMINFO=
5456if test "$use_database" = no ; then
5457	TERMINFO="${datadir}/terminfo"
5458	MAKE_TERMINFO="#"
5459else
5460
5461echo "$as_me:5461: checking for list of terminfo directories" >&5
5462echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5463
5464# Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5465if test "${with_terminfo_dirs+set}" = set; then
5466  withval="$with_terminfo_dirs"
5467
5468else
5469  withval=${TERMINFO_DIRS-${datadir}/terminfo}
5470fi;
5471IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5472cf_dst_path=
5473for cf_src_path in $withval
5474do
5475
5476if test "x$prefix" != xNONE; then
5477  cf_path_syntax="$prefix"
5478else
5479  cf_path_syntax="$ac_default_prefix"
5480fi
5481
5482case ".$cf_src_path" in #(vi
5483.\$\(*\)*|.\'*\'*) #(vi
5484  ;;
5485..|./*|.\\*) #(vi
5486  ;;
5487.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5488  ;;
5489.\${*prefix}*) #(vi
5490  eval cf_src_path="$cf_src_path"
5491  case ".$cf_src_path" in #(vi
5492  .NONE/*)
5493    cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5494    ;;
5495  esac
5496  ;; #(vi
5497.no|.NONE/*)
5498  cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5499  ;;
5500*)
5501  { { echo "$as_me:5501: error: expected a pathname, not \"$cf_src_path\"" >&5
5502echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5503   { (exit 1); exit 1; }; }
5504  ;;
5505esac
5506
5507  test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5508  cf_dst_path="${cf_dst_path}${cf_src_path}"
5509done
5510IFS="$ac_save_ifs"
5511
5512eval 'TERMINFO_DIRS="$cf_dst_path"'
5513
5514echo "$as_me:5514: result: $TERMINFO_DIRS" >&5
5515echo "${ECHO_T}$TERMINFO_DIRS" >&6
5516test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5517#define TERMINFO_DIRS "$TERMINFO_DIRS"
5518EOF
5519
5520echo "$as_me:5520: checking for default terminfo directory" >&5
5521echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5522
5523# Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5524if test "${with_default_terminfo_dir+set}" = set; then
5525  withval="$with_default_terminfo_dir"
5526
5527else
5528  withval="${TERMINFO-${datadir}/terminfo}"
5529fi; if test -n "${datadir}/terminfo" ; then
5530
5531if test "x$prefix" != xNONE; then
5532  cf_path_syntax="$prefix"
5533else
5534  cf_path_syntax="$ac_default_prefix"
5535fi
5536
5537case ".$withval" in #(vi
5538.\$\(*\)*|.\'*\'*) #(vi
5539  ;;
5540..|./*|.\\*) #(vi
5541  ;;
5542.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5543  ;;
5544.\${*prefix}*) #(vi
5545  eval withval="$withval"
5546  case ".$withval" in #(vi
5547  .NONE/*)
5548    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5549    ;;
5550  esac
5551  ;; #(vi
5552.no|.NONE/*)
5553  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5554  ;;
5555*)
5556  { { echo "$as_me:5556: error: expected a pathname, not \"$withval\"" >&5
5557echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5558   { (exit 1); exit 1; }; }
5559  ;;
5560esac
5561
5562fi
5563TERMINFO="$withval"
5564
5565echo "$as_me:5565: result: $TERMINFO" >&5
5566echo "${ECHO_T}$TERMINFO" >&6
5567cat >>confdefs.h <<EOF
5568#define TERMINFO "$TERMINFO"
5569EOF
5570
5571fi
5572
5573###	use option --disable-big-core to make tic run on small machines
5574###	We need 4Mb, check if we can allocate 50% more than that.
5575echo "$as_me:5575: checking if big-core option selected" >&5
5576echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5577
5578# Check whether --enable-big-core or --disable-big-core was given.
5579if test "${enable_big_core+set}" = set; then
5580  enableval="$enable_big_core"
5581  with_big_core=$enableval
5582else
5583  if test "$cross_compiling" = yes; then
5584  with_big_core=no
5585else
5586  cat >conftest.$ac_ext <<_ACEOF
5587#line 5587 "configure"
5588#include "confdefs.h"
5589
5590#include <stdlib.h>
5591#include <string.h>
5592int main() {
5593	unsigned long n = 6000000L;
5594	char *s = malloc(n);
5595	if (s != 0)
5596		s[0] = s[n-1] = 0;
5597	${cf_cv_main_return:-return}(s == 0);
5598}
5599_ACEOF
5600rm -f conftest$ac_exeext
5601if { (eval echo "$as_me:5601: \"$ac_link\"") >&5
5602  (eval $ac_link) 2>&5
5603  ac_status=$?
5604  echo "$as_me:5604: \$? = $ac_status" >&5
5605  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5606  { (eval echo "$as_me:5606: \"$ac_try\"") >&5
5607  (eval $ac_try) 2>&5
5608  ac_status=$?
5609  echo "$as_me:5609: \$? = $ac_status" >&5
5610  (exit $ac_status); }; }; then
5611  with_big_core=yes
5612else
5613  echo "$as_me: program exited with status $ac_status" >&5
5614echo "$as_me: failed program was:" >&5
5615cat conftest.$ac_ext >&5
5616with_big_core=no
5617fi
5618rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5619fi
5620fi;
5621echo "$as_me:5621: result: $with_big_core" >&5
5622echo "${ECHO_T}$with_big_core" >&6
5623test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5624#define HAVE_BIG_CORE 1
5625EOF
5626
5627### ISO C only guarantees 512-char strings, we have tables which load faster
5628### when constructed using "big" strings.  More than the C compiler, the awk
5629### program is a limit on most vendor UNIX systems.  Check that we can build.
5630echo "$as_me:5630: checking if big-strings option selected" >&5
5631echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5632
5633# Check whether --enable-big-strings or --disable-big-strings was given.
5634if test "${enable_big_strings+set}" = set; then
5635  enableval="$enable_big_strings"
5636  with_big_strings=$enableval
5637else
5638
5639    case x$AWK in #(vi
5640    x)
5641        eval with_big_strings=no
5642        ;;
5643    *) #(vi
5644        if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
5645            | $AWK '{ printf "%d\n", length($0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
5646            eval with_big_strings=yes
5647        else
5648            eval with_big_strings=no
5649        fi
5650        ;;
5651    esac
5652
5653fi;
5654echo "$as_me:5654: result: $with_big_strings" >&5
5655echo "${ECHO_T}$with_big_strings" >&6
5656
5657USE_BIG_STRINGS=0
5658test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5659
5660###	use option --enable-termcap to compile in the termcap fallback support
5661echo "$as_me:5661: checking if you want termcap-fallback support" >&5
5662echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5663
5664# Check whether --enable-termcap or --disable-termcap was given.
5665if test "${enable_termcap+set}" = set; then
5666  enableval="$enable_termcap"
5667  with_termcap=$enableval
5668else
5669  with_termcap=no
5670fi;
5671echo "$as_me:5671: result: $with_termcap" >&5
5672echo "${ECHO_T}$with_termcap" >&6
5673
5674if test "$with_termcap" != "yes" ; then
5675	if test "$use_database" = no ; then
5676		if test -z "$with_fallback" ; then
5677			{ { echo "$as_me:5677: error: You have disabled the database w/o specifying fallbacks" >&5
5678echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5679   { (exit 1); exit 1; }; }
5680		fi
5681	fi
5682	cat >>confdefs.h <<\EOF
5683#define PURE_TERMINFO 1
5684EOF
5685
5686else
5687
5688if test "$with_ticlib" != no ; then
5689	{ { echo "$as_me:5689: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5690echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5691   { (exit 1); exit 1; }; }
5692fi
5693
5694cat >>confdefs.h <<\EOF
5695#define USE_TERMCAP 1
5696EOF
5697
5698echo "$as_me:5698: checking for list of termcap files" >&5
5699echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5700
5701# Check whether --with-termpath or --without-termpath was given.
5702if test "${with_termpath+set}" = set; then
5703  withval="$with_termpath"
5704
5705else
5706  withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5707fi;
5708IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5709cf_dst_path=
5710for cf_src_path in $withval
5711do
5712
5713if test "x$prefix" != xNONE; then
5714  cf_path_syntax="$prefix"
5715else
5716  cf_path_syntax="$ac_default_prefix"
5717fi
5718
5719case ".$cf_src_path" in #(vi
5720.\$\(*\)*|.\'*\'*) #(vi
5721  ;;
5722..|./*|.\\*) #(vi
5723  ;;
5724.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5725  ;;
5726.\${*prefix}*) #(vi
5727  eval cf_src_path="$cf_src_path"
5728  case ".$cf_src_path" in #(vi
5729  .NONE/*)
5730    cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5731    ;;
5732  esac
5733  ;; #(vi
5734.no|.NONE/*)
5735  cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5736  ;;
5737*)
5738  { { echo "$as_me:5738: error: expected a pathname, not \"$cf_src_path\"" >&5
5739echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5740   { (exit 1); exit 1; }; }
5741  ;;
5742esac
5743
5744  test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5745  cf_dst_path="${cf_dst_path}${cf_src_path}"
5746done
5747IFS="$ac_save_ifs"
5748
5749eval 'TERMPATH="$cf_dst_path"'
5750
5751echo "$as_me:5751: result: $TERMPATH" >&5
5752echo "${ECHO_T}$TERMPATH" >&6
5753test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5754#define TERMPATH "$TERMPATH"
5755EOF
5756
5757###	use option --enable-getcap to use a hacked getcap for reading termcaps
5758echo "$as_me:5758: checking if fast termcap-loader is needed" >&5
5759echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5760
5761# Check whether --enable-getcap or --disable-getcap was given.
5762if test "${enable_getcap+set}" = set; then
5763  enableval="$enable_getcap"
5764  with_getcap=$enableval
5765else
5766  with_getcap=no
5767fi;
5768echo "$as_me:5768: result: $with_getcap" >&5
5769echo "${ECHO_T}$with_getcap" >&6
5770test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5771#define USE_GETCAP 1
5772EOF
5773
5774echo "$as_me:5774: checking if translated termcaps will be cached in ~/.terminfo" >&5
5775echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5776
5777# Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5778if test "${enable_getcap_cache+set}" = set; then
5779  enableval="$enable_getcap_cache"
5780  with_getcap_cache=$enableval
5781else
5782  with_getcap_cache=no
5783fi;
5784echo "$as_me:5784: result: $with_getcap_cache" >&5
5785echo "${ECHO_T}$with_getcap_cache" >&6
5786test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5787#define USE_GETCAP_CACHE 1
5788EOF
5789
5790fi
5791
5792###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5793echo "$as_me:5793: checking if ~/.terminfo is wanted" >&5
5794echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5795
5796# Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5797if test "${enable_home_terminfo+set}" = set; then
5798  enableval="$enable_home_terminfo"
5799  with_home_terminfo=$enableval
5800else
5801  with_home_terminfo=yes
5802fi;
5803echo "$as_me:5803: result: $with_home_terminfo" >&5
5804echo "${ECHO_T}$with_home_terminfo" >&6
5805test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5806#define USE_HOME_TERMINFO 1
5807EOF
5808
5809echo "$as_me:5809: checking if you want to use restricted environment when running as root" >&5
5810echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5811
5812# Check whether --enable-root-environ or --disable-root-environ was given.
5813if test "${enable_root_environ+set}" = set; then
5814  enableval="$enable_root_environ"
5815  with_root_environ=$enableval
5816else
5817  with_root_environ=yes
5818fi;
5819echo "$as_me:5819: result: $with_root_environ" >&5
5820echo "${ECHO_T}$with_root_environ" >&6
5821test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5822#define USE_ROOT_ENVIRON 1
5823EOF
5824
5825###   Use option --enable-symlinks to make tic use symlinks, not hard links
5826###   to reduce storage requirements for the terminfo database.
5827
5828for ac_func in \
5829	remove \
5830	unlink
5831do
5832as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5833echo "$as_me:5833: checking for $ac_func" >&5
5834echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5835if eval "test \"\${$as_ac_var+set}\" = set"; then
5836  echo $ECHO_N "(cached) $ECHO_C" >&6
5837else
5838  cat >conftest.$ac_ext <<_ACEOF
5839#line 5839 "configure"
5840#include "confdefs.h"
5841/* System header to define __stub macros and hopefully few prototypes,
5842    which can conflict with char $ac_func (); below.  */
5843#include <assert.h>
5844/* Override any gcc2 internal prototype to avoid an error.  */
5845#ifdef __cplusplus
5846extern "C"
5847#endif
5848/* We use char because int might match the return type of a gcc2
5849   builtin and then its argument prototype would still apply.  */
5850char $ac_func ();
5851char (*f) ();
5852
5853int
5854main ()
5855{
5856/* The GNU C library defines this for functions which it implements
5857    to always fail with ENOSYS.  Some functions are actually named
5858    something starting with __ and the normal name is an alias.  */
5859#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5860choke me
5861#else
5862f = $ac_func;
5863#endif
5864
5865  ;
5866  return 0;
5867}
5868_ACEOF
5869rm -f conftest.$ac_objext conftest$ac_exeext
5870if { (eval echo "$as_me:5870: \"$ac_link\"") >&5
5871  (eval $ac_link) 2>&5
5872  ac_status=$?
5873  echo "$as_me:5873: \$? = $ac_status" >&5
5874  (exit $ac_status); } &&
5875         { ac_try='test -s conftest$ac_exeext'
5876  { (eval echo "$as_me:5876: \"$ac_try\"") >&5
5877  (eval $ac_try) 2>&5
5878  ac_status=$?
5879  echo "$as_me:5879: \$? = $ac_status" >&5
5880  (exit $ac_status); }; }; then
5881  eval "$as_ac_var=yes"
5882else
5883  echo "$as_me: failed program was:" >&5
5884cat conftest.$ac_ext >&5
5885eval "$as_ac_var=no"
5886fi
5887rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5888fi
5889echo "$as_me:5889: result: `eval echo '${'$as_ac_var'}'`" >&5
5890echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5891if test `eval echo '${'$as_ac_var'}'` = yes; then
5892  cat >>confdefs.h <<EOF
5893#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5894EOF
5895
5896fi
5897done
5898
5899if test "$cross_compiling" = yes ; then
5900
5901for ac_func in \
5902		link \
5903		symlink
5904do
5905as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5906echo "$as_me:5906: checking for $ac_func" >&5
5907echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5908if eval "test \"\${$as_ac_var+set}\" = set"; then
5909  echo $ECHO_N "(cached) $ECHO_C" >&6
5910else
5911  cat >conftest.$ac_ext <<_ACEOF
5912#line 5912 "configure"
5913#include "confdefs.h"
5914/* System header to define __stub macros and hopefully few prototypes,
5915    which can conflict with char $ac_func (); below.  */
5916#include <assert.h>
5917/* Override any gcc2 internal prototype to avoid an error.  */
5918#ifdef __cplusplus
5919extern "C"
5920#endif
5921/* We use char because int might match the return type of a gcc2
5922   builtin and then its argument prototype would still apply.  */
5923char $ac_func ();
5924char (*f) ();
5925
5926int
5927main ()
5928{
5929/* The GNU C library defines this for functions which it implements
5930    to always fail with ENOSYS.  Some functions are actually named
5931    something starting with __ and the normal name is an alias.  */
5932#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5933choke me
5934#else
5935f = $ac_func;
5936#endif
5937
5938  ;
5939  return 0;
5940}
5941_ACEOF
5942rm -f conftest.$ac_objext conftest$ac_exeext
5943if { (eval echo "$as_me:5943: \"$ac_link\"") >&5
5944  (eval $ac_link) 2>&5
5945  ac_status=$?
5946  echo "$as_me:5946: \$? = $ac_status" >&5
5947  (exit $ac_status); } &&
5948         { ac_try='test -s conftest$ac_exeext'
5949  { (eval echo "$as_me:5949: \"$ac_try\"") >&5
5950  (eval $ac_try) 2>&5
5951  ac_status=$?
5952  echo "$as_me:5952: \$? = $ac_status" >&5
5953  (exit $ac_status); }; }; then
5954  eval "$as_ac_var=yes"
5955else
5956  echo "$as_me: failed program was:" >&5
5957cat conftest.$ac_ext >&5
5958eval "$as_ac_var=no"
5959fi
5960rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5961fi
5962echo "$as_me:5962: result: `eval echo '${'$as_ac_var'}'`" >&5
5963echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5964if test `eval echo '${'$as_ac_var'}'` = yes; then
5965  cat >>confdefs.h <<EOF
5966#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5967EOF
5968
5969fi
5970done
5971
5972else
5973	echo "$as_me:5973: checking if link/symlink functions work" >&5
5974echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5975if test "${cf_cv_link_funcs+set}" = set; then
5976  echo $ECHO_N "(cached) $ECHO_C" >&6
5977else
5978
5979		cf_cv_link_funcs=
5980		for cf_func in link symlink ; do
5981			if test "$cross_compiling" = yes; then
5982
5983			eval 'ac_cv_func_'$cf_func'=error'
5984else
5985  cat >conftest.$ac_ext <<_ACEOF
5986#line 5986 "configure"
5987#include "confdefs.h"
5988
5989#include <sys/types.h>
5990#include <sys/stat.h>
5991#ifdef HAVE_UNISTD_H
5992#include <unistd.h>
5993#endif
5994int main()
5995{
5996	int fail = 0;
5997	char *src = "config.log";
5998	char *dst = "conftest.chk";
5999	struct stat src_sb;
6000	struct stat dst_sb;
6001
6002	stat(src, &src_sb);
6003	fail = ($cf_func("config.log", "conftest.chk") < 0)
6004	    || (stat(dst, &dst_sb) < 0)
6005	    || (dst_sb.st_mtime != src_sb.st_mtime);
6006#ifdef HAVE_UNLINK
6007	unlink(dst);
6008#else
6009	remove(dst);
6010#endif
6011	${cf_cv_main_return:-return} (fail);
6012}
6013
6014_ACEOF
6015rm -f conftest$ac_exeext
6016if { (eval echo "$as_me:6016: \"$ac_link\"") >&5
6017  (eval $ac_link) 2>&5
6018  ac_status=$?
6019  echo "$as_me:6019: \$? = $ac_status" >&5
6020  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6021  { (eval echo "$as_me:6021: \"$ac_try\"") >&5
6022  (eval $ac_try) 2>&5
6023  ac_status=$?
6024  echo "$as_me:6024: \$? = $ac_status" >&5
6025  (exit $ac_status); }; }; then
6026
6027			cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6028			eval 'ac_cv_func_'$cf_func'=yes'
6029else
6030  echo "$as_me: program exited with status $ac_status" >&5
6031echo "$as_me: failed program was:" >&5
6032cat conftest.$ac_ext >&5
6033
6034			eval 'ac_cv_func_'$cf_func'=no'
6035fi
6036rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6037fi
6038		done
6039		test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6040
6041fi
6042echo "$as_me:6042: result: $cf_cv_link_funcs" >&5
6043echo "${ECHO_T}$cf_cv_link_funcs" >&6
6044	test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6045#define HAVE_LINK 1
6046EOF
6047
6048	test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6049#define HAVE_SYMLINK 1
6050EOF
6051
6052fi
6053
6054with_links=no
6055with_symlinks=no
6056
6057# soft links (symbolic links) are useful for some systems where hard links do
6058# not work, or to make it simpler to copy terminfo trees around.
6059if test "$ac_cv_func_symlink" = yes ; then
6060    echo "$as_me:6060: checking if tic should use symbolic links" >&5
6061echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6062
6063# Check whether --enable-symlinks or --disable-symlinks was given.
6064if test "${enable_symlinks+set}" = set; then
6065  enableval="$enable_symlinks"
6066  with_symlinks=$enableval
6067else
6068  with_symlinks=no
6069fi;
6070    echo "$as_me:6070: result: $with_symlinks" >&5
6071echo "${ECHO_T}$with_symlinks" >&6
6072fi
6073
6074# If we have hard links and did not choose to use soft links instead, there is
6075# no reason to make this choice optional - use the hard links.
6076if test "$with_symlinks" = no ; then
6077    echo "$as_me:6077: checking if tic should use hard links" >&5
6078echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6079    if test "$ac_cv_func_link" = yes ; then
6080	with_links=yes
6081    else
6082	with_links=no
6083    fi
6084    echo "$as_me:6084: result: $with_links" >&5
6085echo "${ECHO_T}$with_links" >&6
6086fi
6087
6088test "$with_links" = yes && cat >>confdefs.h <<\EOF
6089#define USE_LINKS 1
6090EOF
6091
6092test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6093#define USE_SYMLINKS 1
6094EOF
6095
6096###   use option --enable-broken-linker to force on use of broken-linker support
6097echo "$as_me:6097: checking if you want broken-linker support code" >&5
6098echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6099
6100# Check whether --enable-broken_linker or --disable-broken_linker was given.
6101if test "${enable_broken_linker+set}" = set; then
6102  enableval="$enable_broken_linker"
6103  with_broken_linker=$enableval
6104else
6105  with_broken_linker=${BROKEN_LINKER-no}
6106fi;
6107echo "$as_me:6107: result: $with_broken_linker" >&5
6108echo "${ECHO_T}$with_broken_linker" >&6
6109
6110BROKEN_LINKER=0
6111if test "$with_broken_linker" = yes ; then
6112	cat >>confdefs.h <<\EOF
6113#define BROKEN_LINKER 1
6114EOF
6115
6116	BROKEN_LINKER=1
6117elif test "$DFT_LWR_MODEL" = shared ; then
6118	case $cf_cv_system_name in #(vi
6119	cygwin*)
6120		cat >>confdefs.h <<\EOF
6121#define BROKEN_LINKER 1
6122EOF
6123
6124		BROKEN_LINKER=1
6125		test -n "$verbose" && echo "	cygwin linker is broken anyway" 1>&6
6126
6127echo "${as_me-configure}:6127: testing cygwin linker is broken anyway ..." 1>&5
6128
6129		;;
6130	esac
6131fi
6132
6133###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6134echo "$as_me:6134: checking if tputs should process BSD-style prefix padding" >&5
6135echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6136
6137# Check whether --enable-bsdpad or --disable-bsdpad was given.
6138if test "${enable_bsdpad+set}" = set; then
6139  enableval="$enable_bsdpad"
6140  with_bsdpad=$enableval
6141else
6142  with_bsdpad=no
6143fi;
6144echo "$as_me:6144: result: $with_bsdpad" >&5
6145echo "${ECHO_T}$with_bsdpad" >&6
6146test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6147#define BSD_TPUTS 1
6148EOF
6149
6150###   use option --enable-widec to turn on use of wide-character support
6151NCURSES_CH_T=chtype
6152NCURSES_LIBUTF8=0
6153
6154NEED_WCHAR_H=0
6155NCURSES_MBSTATE_T=0
6156NCURSES_WCHAR_T=0
6157NCURSES_WINT_T=0
6158
6159# Check to define _XOPEN_SOURCE "automatically"
6160
6161echo "$as_me:6161: checking if $CC -U and -D options work together" >&5
6162echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6163if test "${cf_cv_cc_u_d_options+set}" = set; then
6164  echo $ECHO_N "(cached) $ECHO_C" >&6
6165else
6166
6167	cf_save_CPPFLAGS="$CPPFLAGS"
6168	CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6169	cat >conftest.$ac_ext <<_ACEOF
6170#line 6170 "configure"
6171#include "confdefs.h"
6172
6173int
6174main ()
6175{
6176
6177#ifndef U_D_OPTIONS
6178make an undefined-error
6179#endif
6180#ifdef  D_U_OPTIONS
6181make a defined-error
6182#endif
6183
6184  ;
6185  return 0;
6186}
6187_ACEOF
6188rm -f conftest.$ac_objext
6189if { (eval echo "$as_me:6189: \"$ac_compile\"") >&5
6190  (eval $ac_compile) 2>&5
6191  ac_status=$?
6192  echo "$as_me:6192: \$? = $ac_status" >&5
6193  (exit $ac_status); } &&
6194         { ac_try='test -s conftest.$ac_objext'
6195  { (eval echo "$as_me:6195: \"$ac_try\"") >&5
6196  (eval $ac_try) 2>&5
6197  ac_status=$?
6198  echo "$as_me:6198: \$? = $ac_status" >&5
6199  (exit $ac_status); }; }; then
6200
6201	cf_cv_cc_u_d_options=yes
6202else
6203  echo "$as_me: failed program was:" >&5
6204cat conftest.$ac_ext >&5
6205
6206	cf_cv_cc_u_d_options=no
6207fi
6208rm -f conftest.$ac_objext conftest.$ac_ext
6209	CPPFLAGS="$cf_save_CPPFLAGS"
6210
6211fi
6212echo "$as_me:6212: result: $cf_cv_cc_u_d_options" >&5
6213echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6214
6215cf_XOPEN_SOURCE=500
6216cf_POSIX_C_SOURCE=199506L
6217
6218case $host_os in #(vi
6219aix[45]*) #(vi
6220	CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6221	;;
6222freebsd*|dragonfly*) #(vi
6223	# 5.x headers associate
6224	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6225	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6226	cf_POSIX_C_SOURCE=200112L
6227	cf_XOPEN_SOURCE=600
6228	CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6229	;;
6230hpux*) #(vi
6231	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6232	;;
6233irix[56].*) #(vi
6234	CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6235	;;
6236linux*|gnu*|k*bsd*-gnu) #(vi
6237
6238echo "$as_me:6238: checking if we must define _GNU_SOURCE" >&5
6239echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6240if test "${cf_cv_gnu_source+set}" = set; then
6241  echo $ECHO_N "(cached) $ECHO_C" >&6
6242else
6243
6244cat >conftest.$ac_ext <<_ACEOF
6245#line 6245 "configure"
6246#include "confdefs.h"
6247#include <sys/types.h>
6248int
6249main ()
6250{
6251
6252#ifndef _XOPEN_SOURCE
6253make an error
6254#endif
6255  ;
6256  return 0;
6257}
6258_ACEOF
6259rm -f conftest.$ac_objext
6260if { (eval echo "$as_me:6260: \"$ac_compile\"") >&5
6261  (eval $ac_compile) 2>&5
6262  ac_status=$?
6263  echo "$as_me:6263: \$? = $ac_status" >&5
6264  (exit $ac_status); } &&
6265         { ac_try='test -s conftest.$ac_objext'
6266  { (eval echo "$as_me:6266: \"$ac_try\"") >&5
6267  (eval $ac_try) 2>&5
6268  ac_status=$?
6269  echo "$as_me:6269: \$? = $ac_status" >&5
6270  (exit $ac_status); }; }; then
6271  cf_cv_gnu_source=no
6272else
6273  echo "$as_me: failed program was:" >&5
6274cat conftest.$ac_ext >&5
6275cf_save="$CPPFLAGS"
6276	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6277	 cat >conftest.$ac_ext <<_ACEOF
6278#line 6278 "configure"
6279#include "confdefs.h"
6280#include <sys/types.h>
6281int
6282main ()
6283{
6284
6285#ifdef _XOPEN_SOURCE
6286make an error
6287#endif
6288  ;
6289  return 0;
6290}
6291_ACEOF
6292rm -f conftest.$ac_objext
6293if { (eval echo "$as_me:6293: \"$ac_compile\"") >&5
6294  (eval $ac_compile) 2>&5
6295  ac_status=$?
6296  echo "$as_me:6296: \$? = $ac_status" >&5
6297  (exit $ac_status); } &&
6298         { ac_try='test -s conftest.$ac_objext'
6299  { (eval echo "$as_me:6299: \"$ac_try\"") >&5
6300  (eval $ac_try) 2>&5
6301  ac_status=$?
6302  echo "$as_me:6302: \$? = $ac_status" >&5
6303  (exit $ac_status); }; }; then
6304  cf_cv_gnu_source=no
6305else
6306  echo "$as_me: failed program was:" >&5
6307cat conftest.$ac_ext >&5
6308cf_cv_gnu_source=yes
6309fi
6310rm -f conftest.$ac_objext conftest.$ac_ext
6311	CPPFLAGS="$cf_save"
6312
6313fi
6314rm -f conftest.$ac_objext conftest.$ac_ext
6315
6316fi
6317echo "$as_me:6317: result: $cf_cv_gnu_source" >&5
6318echo "${ECHO_T}$cf_cv_gnu_source" >&6
6319test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6320
6321	;;
6322mirbsd*) #(vi
6323	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6324	;;
6325netbsd*) #(vi
6326	# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6327	;;
6328openbsd*) #(vi
6329	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6330	;;
6331osf[45]*) #(vi
6332	CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6333	;;
6334nto-qnx*) #(vi
6335	CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6336	;;
6337sco*) #(vi
6338	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6339	;;
6340solaris*) #(vi
6341	CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6342	;;
6343*)
6344	echo "$as_me:6344: checking if we should define _XOPEN_SOURCE" >&5
6345echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6346if test "${cf_cv_xopen_source+set}" = set; then
6347  echo $ECHO_N "(cached) $ECHO_C" >&6
6348else
6349
6350	cat >conftest.$ac_ext <<_ACEOF
6351#line 6351 "configure"
6352#include "confdefs.h"
6353#include <sys/types.h>
6354int
6355main ()
6356{
6357
6358#ifndef _XOPEN_SOURCE
6359make an error
6360#endif
6361  ;
6362  return 0;
6363}
6364_ACEOF
6365rm -f conftest.$ac_objext
6366if { (eval echo "$as_me:6366: \"$ac_compile\"") >&5
6367  (eval $ac_compile) 2>&5
6368  ac_status=$?
6369  echo "$as_me:6369: \$? = $ac_status" >&5
6370  (exit $ac_status); } &&
6371         { ac_try='test -s conftest.$ac_objext'
6372  { (eval echo "$as_me:6372: \"$ac_try\"") >&5
6373  (eval $ac_try) 2>&5
6374  ac_status=$?
6375  echo "$as_me:6375: \$? = $ac_status" >&5
6376  (exit $ac_status); }; }; then
6377  cf_cv_xopen_source=no
6378else
6379  echo "$as_me: failed program was:" >&5
6380cat conftest.$ac_ext >&5
6381cf_save="$CPPFLAGS"
6382	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6383	 cat >conftest.$ac_ext <<_ACEOF
6384#line 6384 "configure"
6385#include "confdefs.h"
6386#include <sys/types.h>
6387int
6388main ()
6389{
6390
6391#ifdef _XOPEN_SOURCE
6392make an error
6393#endif
6394  ;
6395  return 0;
6396}
6397_ACEOF
6398rm -f conftest.$ac_objext
6399if { (eval echo "$as_me:6399: \"$ac_compile\"") >&5
6400  (eval $ac_compile) 2>&5
6401  ac_status=$?
6402  echo "$as_me:6402: \$? = $ac_status" >&5
6403  (exit $ac_status); } &&
6404         { ac_try='test -s conftest.$ac_objext'
6405  { (eval echo "$as_me:6405: \"$ac_try\"") >&5
6406  (eval $ac_try) 2>&5
6407  ac_status=$?
6408  echo "$as_me:6408: \$? = $ac_status" >&5
6409  (exit $ac_status); }; }; then
6410  cf_cv_xopen_source=no
6411else
6412  echo "$as_me: failed program was:" >&5
6413cat conftest.$ac_ext >&5
6414cf_cv_xopen_source=$cf_XOPEN_SOURCE
6415fi
6416rm -f conftest.$ac_objext conftest.$ac_ext
6417	CPPFLAGS="$cf_save"
6418
6419fi
6420rm -f conftest.$ac_objext conftest.$ac_ext
6421
6422fi
6423echo "$as_me:6423: result: $cf_cv_xopen_source" >&5
6424echo "${ECHO_T}$cf_cv_xopen_source" >&6
6425	if test "$cf_cv_xopen_source" != no ; then
6426
6427# remove _XOPEN_SOURCE symbol from $CFLAGS
6428CFLAGS=`echo "$CFLAGS" | \
6429	sed	-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
6430		-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?$//g'`
6431
6432# remove _XOPEN_SOURCE symbol from $CPPFLAGS
6433CPPFLAGS=`echo "$CPPFLAGS" | \
6434	sed	-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
6435		-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?$//g'`
6436
6437		test "$cf_cv_cc_u_d_options" = yes && \
6438			CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6439		CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6440	fi
6441
6442cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6443
6444cf_save_CFLAGS="$CFLAGS"
6445cf_save_CPPFLAGS="$CPPFLAGS"
6446
6447# remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6448cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6449	sed	-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
6450		-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?$//g'`
6451
6452# remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6453cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6454	sed	-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
6455		-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?$//g'`
6456
6457echo "$as_me:6457: checking if we should define _POSIX_C_SOURCE" >&5
6458echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6459if test "${cf_cv_posix_c_source+set}" = set; then
6460  echo $ECHO_N "(cached) $ECHO_C" >&6
6461else
6462
6463echo "${as_me-configure}:6463: testing if the symbol is already defined go no further ..." 1>&5
6464
6465	cat >conftest.$ac_ext <<_ACEOF
6466#line 6466 "configure"
6467#include "confdefs.h"
6468#include <sys/types.h>
6469int
6470main ()
6471{
6472
6473#ifndef _POSIX_C_SOURCE
6474make an error
6475#endif
6476  ;
6477  return 0;
6478}
6479_ACEOF
6480rm -f conftest.$ac_objext
6481if { (eval echo "$as_me:6481: \"$ac_compile\"") >&5
6482  (eval $ac_compile) 2>&5
6483  ac_status=$?
6484  echo "$as_me:6484: \$? = $ac_status" >&5
6485  (exit $ac_status); } &&
6486         { ac_try='test -s conftest.$ac_objext'
6487  { (eval echo "$as_me:6487: \"$ac_try\"") >&5
6488  (eval $ac_try) 2>&5
6489  ac_status=$?
6490  echo "$as_me:6490: \$? = $ac_status" >&5
6491  (exit $ac_status); }; }; then
6492  cf_cv_posix_c_source=no
6493else
6494  echo "$as_me: failed program was:" >&5
6495cat conftest.$ac_ext >&5
6496cf_want_posix_source=no
6497	 case .$cf_POSIX_C_SOURCE in #(vi
6498	 .[12]??*) #(vi
6499		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6500		;;
6501	 .2) #(vi
6502		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6503		cf_want_posix_source=yes
6504		;;
6505	 .*)
6506		cf_want_posix_source=yes
6507		;;
6508	 esac
6509	 if test "$cf_want_posix_source" = yes ; then
6510		cat >conftest.$ac_ext <<_ACEOF
6511#line 6511 "configure"
6512#include "confdefs.h"
6513#include <sys/types.h>
6514int
6515main ()
6516{
6517
6518#ifdef _POSIX_SOURCE
6519make an error
6520#endif
6521  ;
6522  return 0;
6523}
6524_ACEOF
6525rm -f conftest.$ac_objext
6526if { (eval echo "$as_me:6526: \"$ac_compile\"") >&5
6527  (eval $ac_compile) 2>&5
6528  ac_status=$?
6529  echo "$as_me:6529: \$? = $ac_status" >&5
6530  (exit $ac_status); } &&
6531         { ac_try='test -s conftest.$ac_objext'
6532  { (eval echo "$as_me:6532: \"$ac_try\"") >&5
6533  (eval $ac_try) 2>&5
6534  ac_status=$?
6535  echo "$as_me:6535: \$? = $ac_status" >&5
6536  (exit $ac_status); }; }; then
6537  :
6538else
6539  echo "$as_me: failed program was:" >&5
6540cat conftest.$ac_ext >&5
6541cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6542fi
6543rm -f conftest.$ac_objext conftest.$ac_ext
6544	 fi
6545
6546echo "${as_me-configure}:6546: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6547
6548	 CFLAGS="$cf_trim_CFLAGS"
6549	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6550
6551echo "${as_me-configure}:6551: testing if the second compile does not leave our definition intact error ..." 1>&5
6552
6553	 cat >conftest.$ac_ext <<_ACEOF
6554#line 6554 "configure"
6555#include "confdefs.h"
6556#include <sys/types.h>
6557int
6558main ()
6559{
6560
6561#ifndef _POSIX_C_SOURCE
6562make an error
6563#endif
6564  ;
6565  return 0;
6566}
6567_ACEOF
6568rm -f conftest.$ac_objext
6569if { (eval echo "$as_me:6569: \"$ac_compile\"") >&5
6570  (eval $ac_compile) 2>&5
6571  ac_status=$?
6572  echo "$as_me:6572: \$? = $ac_status" >&5
6573  (exit $ac_status); } &&
6574         { ac_try='test -s conftest.$ac_objext'
6575  { (eval echo "$as_me:6575: \"$ac_try\"") >&5
6576  (eval $ac_try) 2>&5
6577  ac_status=$?
6578  echo "$as_me:6578: \$? = $ac_status" >&5
6579  (exit $ac_status); }; }; then
6580  :
6581else
6582  echo "$as_me: failed program was:" >&5
6583cat conftest.$ac_ext >&5
6584cf_cv_posix_c_source=no
6585fi
6586rm -f conftest.$ac_objext conftest.$ac_ext
6587	 CFLAGS="$cf_save_CFLAGS"
6588	 CPPFLAGS="$cf_save_CPPFLAGS"
6589
6590fi
6591rm -f conftest.$ac_objext conftest.$ac_ext
6592
6593fi
6594echo "$as_me:6594: result: $cf_cv_posix_c_source" >&5
6595echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6596
6597if test "$cf_cv_posix_c_source" != no ; then
6598	CFLAGS="$cf_trim_CFLAGS"
6599	CPPFLAGS="$cf_trim_CPPFLAGS"
6600	if test "$cf_cv_cc_u_d_options" = yes ; then
6601		cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6602				sed -e 's/-D/-U/g' -e 's/=[^ 	]*//g'`
6603		CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6604	fi
6605	CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6606fi
6607
6608	;;
6609esac
6610
6611# Work around breakage on OS X
6612
6613echo "$as_me:6613: checking if SIGWINCH is defined" >&5
6614echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6615if test "${cf_cv_define_sigwinch+set}" = set; then
6616  echo $ECHO_N "(cached) $ECHO_C" >&6
6617else
6618
6619	cat >conftest.$ac_ext <<_ACEOF
6620#line 6620 "configure"
6621#include "confdefs.h"
6622
6623#include <sys/types.h>
6624#include <sys/signal.h>
6625
6626int
6627main ()
6628{
6629int x = SIGWINCH
6630  ;
6631  return 0;
6632}
6633_ACEOF
6634rm -f conftest.$ac_objext
6635if { (eval echo "$as_me:6635: \"$ac_compile\"") >&5
6636  (eval $ac_compile) 2>&5
6637  ac_status=$?
6638  echo "$as_me:6638: \$? = $ac_status" >&5
6639  (exit $ac_status); } &&
6640         { ac_try='test -s conftest.$ac_objext'
6641  { (eval echo "$as_me:6641: \"$ac_try\"") >&5
6642  (eval $ac_try) 2>&5
6643  ac_status=$?
6644  echo "$as_me:6644: \$? = $ac_status" >&5
6645  (exit $ac_status); }; }; then
6646  cf_cv_define_sigwinch=yes
6647else
6648  echo "$as_me: failed program was:" >&5
6649cat conftest.$ac_ext >&5
6650cat >conftest.$ac_ext <<_ACEOF
6651#line 6651 "configure"
6652#include "confdefs.h"
6653
6654#undef _XOPEN_SOURCE
6655#undef _POSIX_SOURCE
6656#undef _POSIX_C_SOURCE
6657#include <sys/types.h>
6658#include <sys/signal.h>
6659
6660int
6661main ()
6662{
6663int x = SIGWINCH
6664  ;
6665  return 0;
6666}
6667_ACEOF
6668rm -f conftest.$ac_objext
6669if { (eval echo "$as_me:6669: \"$ac_compile\"") >&5
6670  (eval $ac_compile) 2>&5
6671  ac_status=$?
6672  echo "$as_me:6672: \$? = $ac_status" >&5
6673  (exit $ac_status); } &&
6674         { ac_try='test -s conftest.$ac_objext'
6675  { (eval echo "$as_me:6675: \"$ac_try\"") >&5
6676  (eval $ac_try) 2>&5
6677  ac_status=$?
6678  echo "$as_me:6678: \$? = $ac_status" >&5
6679  (exit $ac_status); }; }; then
6680  cf_cv_define_sigwinch=maybe
6681else
6682  echo "$as_me: failed program was:" >&5
6683cat conftest.$ac_ext >&5
6684cf_cv_define_sigwinch=no
6685fi
6686rm -f conftest.$ac_objext conftest.$ac_ext
6687
6688fi
6689rm -f conftest.$ac_objext conftest.$ac_ext
6690
6691fi
6692echo "$as_me:6692: result: $cf_cv_define_sigwinch" >&5
6693echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6694
6695if test "$cf_cv_define_sigwinch" = maybe ; then
6696echo "$as_me:6696: checking for actual SIGWINCH definition" >&5
6697echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6698if test "${cf_cv_fixup_sigwinch+set}" = set; then
6699  echo $ECHO_N "(cached) $ECHO_C" >&6
6700else
6701
6702cf_cv_fixup_sigwinch=unknown
6703cf_sigwinch=32
6704while test $cf_sigwinch != 1
6705do
6706	cat >conftest.$ac_ext <<_ACEOF
6707#line 6707 "configure"
6708#include "confdefs.h"
6709
6710#undef _XOPEN_SOURCE
6711#undef _POSIX_SOURCE
6712#undef _POSIX_C_SOURCE
6713#include <sys/types.h>
6714#include <sys/signal.h>
6715
6716int
6717main ()
6718{
6719
6720#if SIGWINCH != $cf_sigwinch
6721make an error
6722#endif
6723int x = SIGWINCH
6724  ;
6725  return 0;
6726}
6727_ACEOF
6728rm -f conftest.$ac_objext
6729if { (eval echo "$as_me:6729: \"$ac_compile\"") >&5
6730  (eval $ac_compile) 2>&5
6731  ac_status=$?
6732  echo "$as_me:6732: \$? = $ac_status" >&5
6733  (exit $ac_status); } &&
6734         { ac_try='test -s conftest.$ac_objext'
6735  { (eval echo "$as_me:6735: \"$ac_try\"") >&5
6736  (eval $ac_try) 2>&5
6737  ac_status=$?
6738  echo "$as_me:6738: \$? = $ac_status" >&5
6739  (exit $ac_status); }; }; then
6740  cf_cv_fixup_sigwinch=$cf_sigwinch
6741	 break
6742else
6743  echo "$as_me: failed program was:" >&5
6744cat conftest.$ac_ext >&5
6745fi
6746rm -f conftest.$ac_objext conftest.$ac_ext
6747
6748cf_sigwinch=`expr $cf_sigwinch - 1`
6749done
6750
6751fi
6752echo "$as_me:6752: result: $cf_cv_fixup_sigwinch" >&5
6753echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6754
6755	if test "$cf_cv_fixup_sigwinch" != unknown ; then
6756		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6757	fi
6758fi
6759
6760# Checks for CODESET support.
6761
6762  echo "$as_me:6762: checking for nl_langinfo and CODESET" >&5
6763echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6764if test "${am_cv_langinfo_codeset+set}" = set; then
6765  echo $ECHO_N "(cached) $ECHO_C" >&6
6766else
6767  cat >conftest.$ac_ext <<_ACEOF
6768#line 6768 "configure"
6769#include "confdefs.h"
6770#include <langinfo.h>
6771int
6772main ()
6773{
6774char* cs = nl_langinfo(CODESET);
6775  ;
6776  return 0;
6777}
6778_ACEOF
6779rm -f conftest.$ac_objext conftest$ac_exeext
6780if { (eval echo "$as_me:6780: \"$ac_link\"") >&5
6781  (eval $ac_link) 2>&5
6782  ac_status=$?
6783  echo "$as_me:6783: \$? = $ac_status" >&5
6784  (exit $ac_status); } &&
6785         { ac_try='test -s conftest$ac_exeext'
6786  { (eval echo "$as_me:6786: \"$ac_try\"") >&5
6787  (eval $ac_try) 2>&5
6788  ac_status=$?
6789  echo "$as_me:6789: \$? = $ac_status" >&5
6790  (exit $ac_status); }; }; then
6791  am_cv_langinfo_codeset=yes
6792else
6793  echo "$as_me: failed program was:" >&5
6794cat conftest.$ac_ext >&5
6795am_cv_langinfo_codeset=no
6796fi
6797rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6798
6799fi
6800echo "$as_me:6800: result: $am_cv_langinfo_codeset" >&5
6801echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6802  if test $am_cv_langinfo_codeset = yes; then
6803
6804cat >>confdefs.h <<\EOF
6805#define HAVE_LANGINFO_CODESET 1
6806EOF
6807
6808  fi
6809
6810# use these variables to work around a defect in gcc's fixincludes.
6811NCURSES_OK_WCHAR_T=
6812NCURSES_OK_WINT_T=
6813
6814echo "$as_me:6814: checking if you want wide-character code" >&5
6815echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6816
6817# Check whether --enable-widec or --disable-widec was given.
6818if test "${enable_widec+set}" = set; then
6819  enableval="$enable_widec"
6820  with_widec=$enableval
6821else
6822  with_widec=no
6823fi;
6824echo "$as_me:6824: result: $with_widec" >&5
6825echo "${ECHO_T}$with_widec" >&6
6826if test "$with_widec" = yes ; then
6827	cat >>confdefs.h <<\EOF
6828#define USE_WIDEC_SUPPORT 1
6829EOF
6830
6831echo "$as_me:6832: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6832echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6833cat >conftest.$ac_ext <<_ACEOF
6834#line 6835 "configure"
6835#include "confdefs.h"
6836#include <sys/types.h>
6837
6838int
6839main ()
6840{
6841
6842#ifndef _XOPEN_SOURCE_EXTENDED
6843make an error
6844#endif
6845  ;
6846  return 0;
6847}
6848_ACEOF
6849rm -f conftest.$ac_objext
6850if { (eval echo "$as_me:6851: \"$ac_compile\"") >&5
6851  (eval $ac_compile) 2>&5
6852  ac_status=$?
6853  echo "$as_me:6854: \$? = $ac_status" >&5
6854  (exit $ac_status); } &&
6855         { ac_try='test -s conftest.$ac_objext'
6856  { (eval echo "$as_me:6857: \"$ac_try\"") >&5
6857  (eval $ac_try) 2>&5
6858  ac_status=$?
6859  echo "$as_me:6860: \$? = $ac_status" >&5
6860  (exit $ac_status); }; }; then
6861  cf_result=no
6862else
6863  echo "$as_me: failed program was:" >&5
6864cat conftest.$ac_ext >&5
6865cf_result=yes
6866fi
6867rm -f conftest.$ac_objext conftest.$ac_ext
6868echo "$as_me:6869: result: $cf_result" >&5
6869echo "${ECHO_T}$cf_result" >&6
6870
6871if test "$cf_result" = yes ; then
6872	CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6873elif test "x" != "x" ; then
6874	echo "$as_me:6875: checking checking for compatible value versus " >&5
6875echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6876	cat >conftest.$ac_ext <<_ACEOF
6877#line 6878 "configure"
6878#include "confdefs.h"
6879#include <sys/types.h>
6880
6881int
6882main ()
6883{
6884
6885#if _XOPEN_SOURCE_EXTENDED- < 0
6886make an error
6887#endif
6888  ;
6889  return 0;
6890}
6891_ACEOF
6892rm -f conftest.$ac_objext
6893if { (eval echo "$as_me:6894: \"$ac_compile\"") >&5
6894  (eval $ac_compile) 2>&5
6895  ac_status=$?
6896  echo "$as_me:6897: \$? = $ac_status" >&5
6897  (exit $ac_status); } &&
6898         { ac_try='test -s conftest.$ac_objext'
6899  { (eval echo "$as_me:6900: \"$ac_try\"") >&5
6900  (eval $ac_try) 2>&5
6901  ac_status=$?
6902  echo "$as_me:6903: \$? = $ac_status" >&5
6903  (exit $ac_status); }; }; then
6904  cf_result=yes
6905else
6906  echo "$as_me: failed program was:" >&5
6907cat conftest.$ac_ext >&5
6908cf_result=no
6909fi
6910rm -f conftest.$ac_objext conftest.$ac_ext
6911	echo "$as_me:6912: result: $cf_result" >&5
6912echo "${ECHO_T}$cf_result" >&6
6913	if test "$cf_result" = no ; then
6914		# perhaps we can override it - try...
6915		CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6916	fi
6917fi
6918
6919	# with_overwrite=no
6920	NCURSES_CH_T=cchar_t
6921
6922for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
6923do
6924as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6925echo "$as_me:6926: checking for $ac_func" >&5
6926echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6927if eval "test \"\${$as_ac_var+set}\" = set"; then
6928  echo $ECHO_N "(cached) $ECHO_C" >&6
6929else
6930  cat >conftest.$ac_ext <<_ACEOF
6931#line 6932 "configure"
6932#include "confdefs.h"
6933/* System header to define __stub macros and hopefully few prototypes,
6934    which can conflict with char $ac_func (); below.  */
6935#include <assert.h>
6936/* Override any gcc2 internal prototype to avoid an error.  */
6937#ifdef __cplusplus
6938extern "C"
6939#endif
6940/* We use char because int might match the return type of a gcc2
6941   builtin and then its argument prototype would still apply.  */
6942char $ac_func ();
6943char (*f) ();
6944
6945int
6946main ()
6947{
6948/* The GNU C library defines this for functions which it implements
6949    to always fail with ENOSYS.  Some functions are actually named
6950    something starting with __ and the normal name is an alias.  */
6951#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6952choke me
6953#else
6954f = $ac_func;
6955#endif
6956
6957  ;
6958  return 0;
6959}
6960_ACEOF
6961rm -f conftest.$ac_objext conftest$ac_exeext
6962if { (eval echo "$as_me:6963: \"$ac_link\"") >&5
6963  (eval $ac_link) 2>&5
6964  ac_status=$?
6965  echo "$as_me:6966: \$? = $ac_status" >&5
6966  (exit $ac_status); } &&
6967         { ac_try='test -s conftest$ac_exeext'
6968  { (eval echo "$as_me:6969: \"$ac_try\"") >&5
6969  (eval $ac_try) 2>&5
6970  ac_status=$?
6971  echo "$as_me:6972: \$? = $ac_status" >&5
6972  (exit $ac_status); }; }; then
6973  eval "$as_ac_var=yes"
6974else
6975  echo "$as_me: failed program was:" >&5
6976cat conftest.$ac_ext >&5
6977eval "$as_ac_var=no"
6978fi
6979rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6980fi
6981echo "$as_me:6982: result: `eval echo '${'$as_ac_var'}'`" >&5
6982echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6983if test `eval echo '${'$as_ac_var'}'` = yes; then
6984  cat >>confdefs.h <<EOF
6985#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6986EOF
6987
6988fi
6989done
6990
6991	if test "$ac_cv_func_putwc" != yes ; then
6992
6993echo "$as_me:6994: checking for multibyte character support" >&5
6994echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6995if test "${cf_cv_utf8_lib+set}" = set; then
6996  echo $ECHO_N "(cached) $ECHO_C" >&6
6997else
6998
6999	cf_save_LIBS="$LIBS"
7000	cat >conftest.$ac_ext <<_ACEOF
7001#line 7002 "configure"
7002#include "confdefs.h"
7003
7004#include <stdlib.h>
7005int
7006main ()
7007{
7008putwc(0,0);
7009  ;
7010  return 0;
7011}
7012_ACEOF
7013rm -f conftest.$ac_objext conftest$ac_exeext
7014if { (eval echo "$as_me:7015: \"$ac_link\"") >&5
7015  (eval $ac_link) 2>&5
7016  ac_status=$?
7017  echo "$as_me:7018: \$? = $ac_status" >&5
7018  (exit $ac_status); } &&
7019         { ac_try='test -s conftest$ac_exeext'
7020  { (eval echo "$as_me:7021: \"$ac_try\"") >&5
7021  (eval $ac_try) 2>&5
7022  ac_status=$?
7023  echo "$as_me:7024: \$? = $ac_status" >&5
7024  (exit $ac_status); }; }; then
7025  cf_cv_utf8_lib=yes
7026else
7027  echo "$as_me: failed program was:" >&5
7028cat conftest.$ac_ext >&5
7029
7030# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7031# will be set on completion of the AC_TRY_LINK below.
7032cf_cv_header_path_utf8=
7033cf_cv_library_path_utf8=
7034
7035echo "${as_me-configure}:7036: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7036
7037cat >conftest.$ac_ext <<_ACEOF
7038#line 7039 "configure"
7039#include "confdefs.h"
7040
7041#include <libutf8.h>
7042int
7043main ()
7044{
7045putwc(0,0);
7046  ;
7047  return 0;
7048}
7049_ACEOF
7050rm -f conftest.$ac_objext conftest$ac_exeext
7051if { (eval echo "$as_me:7052: \"$ac_link\"") >&5
7052  (eval $ac_link) 2>&5
7053  ac_status=$?
7054  echo "$as_me:7055: \$? = $ac_status" >&5
7055  (exit $ac_status); } &&
7056         { ac_try='test -s conftest$ac_exeext'
7057  { (eval echo "$as_me:7058: \"$ac_try\"") >&5
7058  (eval $ac_try) 2>&5
7059  ac_status=$?
7060  echo "$as_me:7061: \$? = $ac_status" >&5
7061  (exit $ac_status); }; }; then
7062  cf_cv_find_linkage_utf8=yes
7063else
7064  echo "$as_me: failed program was:" >&5
7065cat conftest.$ac_ext >&5
7066
7067    cf_cv_find_linkage_utf8=no
7068
7069echo "${as_me-configure}:7070: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7070
7071    cf_save_CPPFLAGS="$CPPFLAGS"
7072    cf_test_CPPFLAGS="$CPPFLAGS"
7073
7074    cf_search=""
7075
7076test "/usr" != "$prefix" && \
7077test -d "/usr" && \
7078(test $prefix = NONE || test -d $prefix) && {
7079	test -n "$verbose" && echo "	... testing for include-directories under /usr"
7080	test -d /usr/include &&          cf_search="$cf_search /usr/include"
7081	test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7082	test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7083	test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7084	test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7085}
7086
7087test "$prefix" != "NONE" && \
7088test -d "$prefix" && \
7089 {
7090	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
7091	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7092	test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7093	test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7094	test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7095	test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7096}
7097
7098test "/usr/local" != "$prefix" && \
7099test -d "/usr/local" && \
7100(test $prefix = NONE || test -d $prefix) && {
7101	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
7102	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7103	test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7104	test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7105	test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7106	test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7107}
7108
7109test "/opt" != "$prefix" && \
7110test -d "/opt" && \
7111(test $prefix = NONE || test -d $prefix) && {
7112	test -n "$verbose" && echo "	... testing for include-directories under /opt"
7113	test -d /opt/include &&          cf_search="$cf_search /opt/include"
7114	test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7115	test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7116	test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7117	test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7118}
7119
7120test "$HOME" != "$prefix" && \
7121test -d "$HOME" && \
7122(test $prefix = NONE || test -d $prefix) && {
7123	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
7124	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7125	test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7126	test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7127	test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7128	test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7129}
7130
7131test "$includedir" != NONE && \
7132test "$includedir" != "/usr/include" && \
7133test -d "$includedir" && {
7134	test -d $includedir &&    cf_search="$cf_search $includedir"
7135	test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7136}
7137
7138test "$oldincludedir" != NONE && \
7139test "$oldincludedir" != "/usr/include" && \
7140test -d "$oldincludedir" && {
7141	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7142	test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7143}
7144
7145    for cf_cv_header_path_utf8 in $cf_search
7146    do
7147      if test -d $cf_cv_header_path_utf8 ; then
7148        test -n "$verbose" && echo "	... testing $cf_cv_header_path_utf8" 1>&6
7149
7150echo "${as_me-configure}:7151: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7151
7152        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7153        cat >conftest.$ac_ext <<_ACEOF
7154#line 7155 "configure"
7155#include "confdefs.h"
7156
7157#include <libutf8.h>
7158int
7159main ()
7160{
7161putwc(0,0);
7162  ;
7163  return 0;
7164}
7165_ACEOF
7166rm -f conftest.$ac_objext
7167if { (eval echo "$as_me:7168: \"$ac_compile\"") >&5
7168  (eval $ac_compile) 2>&5
7169  ac_status=$?
7170  echo "$as_me:7171: \$? = $ac_status" >&5
7171  (exit $ac_status); } &&
7172         { ac_try='test -s conftest.$ac_objext'
7173  { (eval echo "$as_me:7174: \"$ac_try\"") >&5
7174  (eval $ac_try) 2>&5
7175  ac_status=$?
7176  echo "$as_me:7177: \$? = $ac_status" >&5
7177  (exit $ac_status); }; }; then
7178
7179            test -n "$verbose" && echo "	... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7180
7181echo "${as_me-configure}:7182: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7182
7183            cf_cv_find_linkage_utf8=maybe
7184            cf_test_CPPFLAGS="$CPPFLAGS"
7185            break
7186else
7187  echo "$as_me: failed program was:" >&5
7188cat conftest.$ac_ext >&5
7189
7190            CPPFLAGS="$cf_save_CPPFLAGS"
7191
7192fi
7193rm -f conftest.$ac_objext conftest.$ac_ext
7194      fi
7195    done
7196
7197    if test "$cf_cv_find_linkage_utf8" = maybe ; then
7198
7199echo "${as_me-configure}:7200: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7200
7201      cf_save_LIBS="$LIBS"
7202      cf_save_LDFLAGS="$LDFLAGS"
7203
7204      if test "$cf_cv_find_linkage_utf8" != yes ; then
7205        cf_search=""
7206
7207test "/usr" != "$prefix" && \
7208test -d "/usr" && \
7209(test $prefix = NONE || test -d $prefix) && {
7210	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
7211	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7212	test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7213	test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7214	test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7215	test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7216}
7217
7218test "$prefix" != "NONE" && \
7219test -d "$prefix" && \
7220 {
7221	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
7222	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7223	test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7224	test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7225	test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7226	test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7227}
7228
7229test "/usr/local" != "$prefix" && \
7230test -d "/usr/local" && \
7231(test $prefix = NONE || test -d $prefix) && {
7232	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
7233	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7234	test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7235	test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7236	test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7237	test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7238}
7239
7240test "/opt" != "$prefix" && \
7241test -d "/opt" && \
7242(test $prefix = NONE || test -d $prefix) && {
7243	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
7244	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7245	test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7246	test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7247	test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7248	test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7249}
7250
7251test "$HOME" != "$prefix" && \
7252test -d "$HOME" && \
7253(test $prefix = NONE || test -d $prefix) && {
7254	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
7255	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7256	test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7257	test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7258	test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7259	test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7260}
7261
7262        for cf_cv_library_path_utf8 in $cf_search
7263        do
7264          if test -d $cf_cv_library_path_utf8 ; then
7265            test -n "$verbose" && echo "	... testing $cf_cv_library_path_utf8" 1>&6
7266
7267echo "${as_me-configure}:7268: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7268
7269            CPPFLAGS="$cf_test_CPPFLAGS"
7270            LIBS="-lutf8  $cf_save_LIBS"
7271            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7272            cat >conftest.$ac_ext <<_ACEOF
7273#line 7274 "configure"
7274#include "confdefs.h"
7275
7276#include <libutf8.h>
7277int
7278main ()
7279{
7280putwc(0,0);
7281  ;
7282  return 0;
7283}
7284_ACEOF
7285rm -f conftest.$ac_objext conftest$ac_exeext
7286if { (eval echo "$as_me:7287: \"$ac_link\"") >&5
7287  (eval $ac_link) 2>&5
7288  ac_status=$?
7289  echo "$as_me:7290: \$? = $ac_status" >&5
7290  (exit $ac_status); } &&
7291         { ac_try='test -s conftest$ac_exeext'
7292  { (eval echo "$as_me:7293: \"$ac_try\"") >&5
7293  (eval $ac_try) 2>&5
7294  ac_status=$?
7295  echo "$as_me:7296: \$? = $ac_status" >&5
7296  (exit $ac_status); }; }; then
7297
7298                test -n "$verbose" && echo "	... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7299
7300echo "${as_me-configure}:7301: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7301
7302                cf_cv_find_linkage_utf8=yes
7303                cf_cv_library_file_utf8="-lutf8"
7304                break
7305else
7306  echo "$as_me: failed program was:" >&5
7307cat conftest.$ac_ext >&5
7308
7309                CPPFLAGS="$cf_save_CPPFLAGS"
7310                LIBS="$cf_save_LIBS"
7311                LDFLAGS="$cf_save_LDFLAGS"
7312
7313fi
7314rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7315          fi
7316        done
7317        LIBS="$cf_save_LIBS"
7318        CPPFLAGS="$cf_save_CPPFLAGS"
7319        LDFLAGS="$cf_save_LDFLAGS"
7320      fi
7321
7322    else
7323      cf_cv_find_linkage_utf8=no
7324    fi
7325
7326fi
7327rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7328
7329if test "$cf_cv_find_linkage_utf8" = yes ; then
7330cf_cv_utf8_lib=add-on
7331else
7332cf_cv_utf8_lib=no
7333fi
7334
7335fi
7336rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7337fi
7338echo "$as_me:7339: result: $cf_cv_utf8_lib" >&5
7339echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7340
7341# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7342# ncurses/ncursesw:
7343if test "$cf_cv_utf8_lib" = "add-on" ; then
7344	cat >>confdefs.h <<\EOF
7345#define HAVE_LIBUTF8_H 1
7346EOF
7347
7348if test -n "$cf_cv_header_path_utf8" ; then
7349  for cf_add_incdir in $cf_cv_header_path_utf8
7350  do
7351	while test $cf_add_incdir != /usr/include
7352	do
7353	  if test -d $cf_add_incdir
7354	  then
7355		cf_have_incdir=no
7356		if test -n "$CFLAGS$CPPFLAGS" ; then
7357		  # a loop is needed to ensure we can add subdirs of existing dirs
7358		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7359			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7360			  cf_have_incdir=yes; break
7361			fi
7362		  done
7363		fi
7364
7365		if test "$cf_have_incdir" = no ; then
7366          if test "$cf_add_incdir" = /usr/local/include ; then
7367			if test "$GCC" = yes
7368			then
7369			  cf_save_CPPFLAGS=$CPPFLAGS
7370			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7371			  cat >conftest.$ac_ext <<_ACEOF
7372#line 7373 "configure"
7373#include "confdefs.h"
7374#include <stdio.h>
7375int
7376main ()
7377{
7378printf("Hello")
7379  ;
7380  return 0;
7381}
7382_ACEOF
7383rm -f conftest.$ac_objext
7384if { (eval echo "$as_me:7385: \"$ac_compile\"") >&5
7385  (eval $ac_compile) 2>&5
7386  ac_status=$?
7387  echo "$as_me:7388: \$? = $ac_status" >&5
7388  (exit $ac_status); } &&
7389         { ac_try='test -s conftest.$ac_objext'
7390  { (eval echo "$as_me:7391: \"$ac_try\"") >&5
7391  (eval $ac_try) 2>&5
7392  ac_status=$?
7393  echo "$as_me:7394: \$? = $ac_status" >&5
7394  (exit $ac_status); }; }; then
7395  :
7396else
7397  echo "$as_me: failed program was:" >&5
7398cat conftest.$ac_ext >&5
7399cf_have_incdir=yes
7400fi
7401rm -f conftest.$ac_objext conftest.$ac_ext
7402			  CPPFLAGS=$cf_save_CPPFLAGS
7403			fi
7404		  fi
7405		fi
7406
7407		if test "$cf_have_incdir" = no ; then
7408		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
7409
7410echo "${as_me-configure}:7411: testing adding $cf_add_incdir to include-path ..." 1>&5
7411
7412		  CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
7413
7414          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7415          test "$cf_top_incdir" = "$cf_add_incdir" && break
7416          cf_add_incdir="$cf_top_incdir"
7417		else
7418		  break
7419		fi
7420	  fi
7421	done
7422  done
7423fi
7424
7425if test -n "$cf_cv_library_path_utf8" ; then
7426  for cf_add_libdir in $cf_cv_library_path_utf8
7427  do
7428    if test $cf_add_libdir = /usr/lib ; then
7429      :
7430    elif test -d $cf_add_libdir
7431    then
7432      cf_have_libdir=no
7433      if test -n "$LDFLAGS$LIBS" ; then
7434        # a loop is needed to ensure we can add subdirs of existing dirs
7435        for cf_test_libdir in $LDFLAGS $LIBS ; do
7436          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7437            cf_have_libdir=yes; break
7438          fi
7439        done
7440      fi
7441      if test "$cf_have_libdir" = no ; then
7442        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
7443
7444echo "${as_me-configure}:7445: testing adding $cf_add_libdir to library-path ..." 1>&5
7445
7446        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7447      fi
7448    fi
7449  done
7450fi
7451
7452	LIBS="-lutf8 $LIBS"
7453fi
7454
7455		if test "$cf_cv_utf8_lib" != no ; then
7456			NCURSES_LIBUTF8=1
7457		fi
7458	fi
7459
7460# This is needed on Tru64 5.0 to declare mbstate_t
7461echo "$as_me:7462: checking if we must include wchar.h to declare mbstate_t" >&5
7462echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7463if test "${cf_cv_mbstate_t+set}" = set; then
7464  echo $ECHO_N "(cached) $ECHO_C" >&6
7465else
7466
7467cat >conftest.$ac_ext <<_ACEOF
7468#line 7469 "configure"
7469#include "confdefs.h"
7470
7471#include <stdlib.h>
7472#include <stdarg.h>
7473#include <stdio.h>
7474#ifdef HAVE_LIBUTF8_H
7475#include <libutf8.h>
7476#endif
7477int
7478main ()
7479{
7480mbstate_t state
7481  ;
7482  return 0;
7483}
7484_ACEOF
7485rm -f conftest.$ac_objext
7486if { (eval echo "$as_me:7487: \"$ac_compile\"") >&5
7487  (eval $ac_compile) 2>&5
7488  ac_status=$?
7489  echo "$as_me:7490: \$? = $ac_status" >&5
7490  (exit $ac_status); } &&
7491         { ac_try='test -s conftest.$ac_objext'
7492  { (eval echo "$as_me:7493: \"$ac_try\"") >&5
7493  (eval $ac_try) 2>&5
7494  ac_status=$?
7495  echo "$as_me:7496: \$? = $ac_status" >&5
7496  (exit $ac_status); }; }; then
7497  cf_cv_mbstate_t=no
7498else
7499  echo "$as_me: failed program was:" >&5
7500cat conftest.$ac_ext >&5
7501cat >conftest.$ac_ext <<_ACEOF
7502#line 7503 "configure"
7503#include "confdefs.h"
7504
7505#include <stdlib.h>
7506#include <stdarg.h>
7507#include <stdio.h>
7508#include <wchar.h>
7509#ifdef HAVE_LIBUTF8_H
7510#include <libutf8.h>
7511#endif
7512int
7513main ()
7514{
7515mbstate_t value
7516  ;
7517  return 0;
7518}
7519_ACEOF
7520rm -f conftest.$ac_objext
7521if { (eval echo "$as_me:7522: \"$ac_compile\"") >&5
7522  (eval $ac_compile) 2>&5
7523  ac_status=$?
7524  echo "$as_me:7525: \$? = $ac_status" >&5
7525  (exit $ac_status); } &&
7526         { ac_try='test -s conftest.$ac_objext'
7527  { (eval echo "$as_me:7528: \"$ac_try\"") >&5
7528  (eval $ac_try) 2>&5
7529  ac_status=$?
7530  echo "$as_me:7531: \$? = $ac_status" >&5
7531  (exit $ac_status); }; }; then
7532  cf_cv_mbstate_t=yes
7533else
7534  echo "$as_me: failed program was:" >&5
7535cat conftest.$ac_ext >&5
7536cf_cv_mbstate_t=unknown
7537fi
7538rm -f conftest.$ac_objext conftest.$ac_ext
7539fi
7540rm -f conftest.$ac_objext conftest.$ac_ext
7541fi
7542echo "$as_me:7543: result: $cf_cv_mbstate_t" >&5
7543echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7544
7545if test "$cf_cv_mbstate_t" = yes ; then
7546	cat >>confdefs.h <<\EOF
7547#define NEED_WCHAR_H 1
7548EOF
7549
7550	NEED_WCHAR_H=1
7551fi
7552
7553# if we do not find mbstate_t in either place, use substitution to provide a fallback.
7554if test "$cf_cv_mbstate_t" = unknown ; then
7555	NCURSES_MBSTATE_T=1
7556fi
7557
7558# This is needed on Tru64 5.0 to declare wchar_t
7559echo "$as_me:7560: checking if we must include wchar.h to declare wchar_t" >&5
7560echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7561if test "${cf_cv_wchar_t+set}" = set; then
7562  echo $ECHO_N "(cached) $ECHO_C" >&6
7563else
7564
7565cat >conftest.$ac_ext <<_ACEOF
7566#line 7567 "configure"
7567#include "confdefs.h"
7568
7569#include <stdlib.h>
7570#include <stdarg.h>
7571#include <stdio.h>
7572#ifdef HAVE_LIBUTF8_H
7573#include <libutf8.h>
7574#endif
7575int
7576main ()
7577{
7578wchar_t state
7579  ;
7580  return 0;
7581}
7582_ACEOF
7583rm -f conftest.$ac_objext
7584if { (eval echo "$as_me:7585: \"$ac_compile\"") >&5
7585  (eval $ac_compile) 2>&5
7586  ac_status=$?
7587  echo "$as_me:7588: \$? = $ac_status" >&5
7588  (exit $ac_status); } &&
7589         { ac_try='test -s conftest.$ac_objext'
7590  { (eval echo "$as_me:7591: \"$ac_try\"") >&5
7591  (eval $ac_try) 2>&5
7592  ac_status=$?
7593  echo "$as_me:7594: \$? = $ac_status" >&5
7594  (exit $ac_status); }; }; then
7595  cf_cv_wchar_t=no
7596else
7597  echo "$as_me: failed program was:" >&5
7598cat conftest.$ac_ext >&5
7599cat >conftest.$ac_ext <<_ACEOF
7600#line 7601 "configure"
7601#include "confdefs.h"
7602
7603#include <stdlib.h>
7604#include <stdarg.h>
7605#include <stdio.h>
7606#include <wchar.h>
7607#ifdef HAVE_LIBUTF8_H
7608#include <libutf8.h>
7609#endif
7610int
7611main ()
7612{
7613wchar_t value
7614  ;
7615  return 0;
7616}
7617_ACEOF
7618rm -f conftest.$ac_objext
7619if { (eval echo "$as_me:7620: \"$ac_compile\"") >&5
7620  (eval $ac_compile) 2>&5
7621  ac_status=$?
7622  echo "$as_me:7623: \$? = $ac_status" >&5
7623  (exit $ac_status); } &&
7624         { ac_try='test -s conftest.$ac_objext'
7625  { (eval echo "$as_me:7626: \"$ac_try\"") >&5
7626  (eval $ac_try) 2>&5
7627  ac_status=$?
7628  echo "$as_me:7629: \$? = $ac_status" >&5
7629  (exit $ac_status); }; }; then
7630  cf_cv_wchar_t=yes
7631else
7632  echo "$as_me: failed program was:" >&5
7633cat conftest.$ac_ext >&5
7634cf_cv_wchar_t=unknown
7635fi
7636rm -f conftest.$ac_objext conftest.$ac_ext
7637fi
7638rm -f conftest.$ac_objext conftest.$ac_ext
7639fi
7640echo "$as_me:7641: result: $cf_cv_wchar_t" >&5
7641echo "${ECHO_T}$cf_cv_wchar_t" >&6
7642
7643if test "$cf_cv_wchar_t" = yes ; then
7644	cat >>confdefs.h <<\EOF
7645#define NEED_WCHAR_H 1
7646EOF
7647
7648	NEED_WCHAR_H=1
7649fi
7650
7651# if we do not find wchar_t in either place, use substitution to provide a fallback.
7652if test "$cf_cv_wchar_t" = unknown ; then
7653	NCURSES_WCHAR_T=1
7654fi
7655
7656# if we find wchar_t in either place, use substitution to provide a fallback.
7657if test "$cf_cv_wchar_t" != unknown ; then
7658	NCURSES_OK_WCHAR_T=1
7659fi
7660
7661# This is needed on Tru64 5.0 to declare wint_t
7662echo "$as_me:7663: checking if we must include wchar.h to declare wint_t" >&5
7663echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7664if test "${cf_cv_wint_t+set}" = set; then
7665  echo $ECHO_N "(cached) $ECHO_C" >&6
7666else
7667
7668cat >conftest.$ac_ext <<_ACEOF
7669#line 7670 "configure"
7670#include "confdefs.h"
7671
7672#include <stdlib.h>
7673#include <stdarg.h>
7674#include <stdio.h>
7675#ifdef HAVE_LIBUTF8_H
7676#include <libutf8.h>
7677#endif
7678int
7679main ()
7680{
7681wint_t state
7682  ;
7683  return 0;
7684}
7685_ACEOF
7686rm -f conftest.$ac_objext
7687if { (eval echo "$as_me:7688: \"$ac_compile\"") >&5
7688  (eval $ac_compile) 2>&5
7689  ac_status=$?
7690  echo "$as_me:7691: \$? = $ac_status" >&5
7691  (exit $ac_status); } &&
7692         { ac_try='test -s conftest.$ac_objext'
7693  { (eval echo "$as_me:7694: \"$ac_try\"") >&5
7694  (eval $ac_try) 2>&5
7695  ac_status=$?
7696  echo "$as_me:7697: \$? = $ac_status" >&5
7697  (exit $ac_status); }; }; then
7698  cf_cv_wint_t=no
7699else
7700  echo "$as_me: failed program was:" >&5
7701cat conftest.$ac_ext >&5
7702cat >conftest.$ac_ext <<_ACEOF
7703#line 7704 "configure"
7704#include "confdefs.h"
7705
7706#include <stdlib.h>
7707#include <stdarg.h>
7708#include <stdio.h>
7709#include <wchar.h>
7710#ifdef HAVE_LIBUTF8_H
7711#include <libutf8.h>
7712#endif
7713int
7714main ()
7715{
7716wint_t value
7717  ;
7718  return 0;
7719}
7720_ACEOF
7721rm -f conftest.$ac_objext
7722if { (eval echo "$as_me:7723: \"$ac_compile\"") >&5
7723  (eval $ac_compile) 2>&5
7724  ac_status=$?
7725  echo "$as_me:7726: \$? = $ac_status" >&5
7726  (exit $ac_status); } &&
7727         { ac_try='test -s conftest.$ac_objext'
7728  { (eval echo "$as_me:7729: \"$ac_try\"") >&5
7729  (eval $ac_try) 2>&5
7730  ac_status=$?
7731  echo "$as_me:7732: \$? = $ac_status" >&5
7732  (exit $ac_status); }; }; then
7733  cf_cv_wint_t=yes
7734else
7735  echo "$as_me: failed program was:" >&5
7736cat conftest.$ac_ext >&5
7737cf_cv_wint_t=unknown
7738fi
7739rm -f conftest.$ac_objext conftest.$ac_ext
7740fi
7741rm -f conftest.$ac_objext conftest.$ac_ext
7742fi
7743echo "$as_me:7744: result: $cf_cv_wint_t" >&5
7744echo "${ECHO_T}$cf_cv_wint_t" >&6
7745
7746if test "$cf_cv_wint_t" = yes ; then
7747	cat >>confdefs.h <<\EOF
7748#define NEED_WCHAR_H 1
7749EOF
7750
7751	NEED_WCHAR_H=1
7752fi
7753
7754# if we do not find wint_t in either place, use substitution to provide a fallback.
7755if test "$cf_cv_wint_t" = unknown ; then
7756	NCURSES_WINT_T=1
7757fi
7758
7759# if we find wint_t in either place, use substitution to provide a fallback.
7760if test "$cf_cv_wint_t" != unknown ; then
7761	NCURSES_OK_WINT_T=1
7762fi
7763
7764	if test "$NCURSES_MBSTATE_T" != 0; then
7765		cat >>confdefs.h <<\EOF
7766#define NEED_MBSTATE_T_DEF 1
7767EOF
7768
7769	fi
7770fi
7771
7772###   use option --disable-lp64 to allow long chtype
7773case $cf_cv_abi_version in
7774[345]*)
7775	default_with_lp64=no
7776	;;
7777*)
7778	default_with_lp64=yes
7779	;;
7780esac
7781
7782echo "$as_me:7783: checking whether to enable _LP64 definition in curses.h" >&5
7783echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7784
7785# Check whether --enable-lp64 or --disable-lp64 was given.
7786if test "${enable_lp64+set}" = set; then
7787  enableval="$enable_lp64"
7788  with_lp64=$enableval
7789else
7790  with_lp64=$default_with_lp64
7791fi;
7792echo "$as_me:7793: result: $with_lp64" >&5
7793echo "${ECHO_T}$with_lp64" >&6
7794
7795if test "$with_lp64" = yes ; then
7796	cf_cv_enable_lp64=1
7797else
7798	cf_cv_enable_lp64=0
7799fi
7800
7801# Check whether --enable-largefile or --disable-largefile was given.
7802if test "${enable_largefile+set}" = set; then
7803  enableval="$enable_largefile"
7804
7805fi;
7806if test "$enable_largefile" != no; then
7807
7808  echo "$as_me:7809: checking for special C compiler options needed for large files" >&5
7809echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7810if test "${ac_cv_sys_largefile_CC+set}" = set; then
7811  echo $ECHO_N "(cached) $ECHO_C" >&6
7812else
7813  ac_cv_sys_largefile_CC=no
7814     if test "$GCC" != yes; then
7815       ac_save_CC=$CC
7816       while :; do
7817     	 # IRIX 6.2 and later do not support large files by default,
7818     	 # so use the C compiler's -n32 option if that helps.
7819         cat >conftest.$ac_ext <<_ACEOF
7820#line 7821 "configure"
7821#include "confdefs.h"
7822#include <sys/types.h>
7823 /* Check that off_t can represent 2**63 - 1 correctly.
7824    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7825    since some C++ compilers masquerading as C compilers
7826    incorrectly reject 9223372036854775807.  */
7827#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7828  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7829		       && LARGE_OFF_T % 2147483647 == 1)
7830		      ? 1 : -1];
7831int
7832main ()
7833{
7834
7835  ;
7836  return 0;
7837}
7838_ACEOF
7839     	 rm -f conftest.$ac_objext
7840if { (eval echo "$as_me:7841: \"$ac_compile\"") >&5
7841  (eval $ac_compile) 2>&5
7842  ac_status=$?
7843  echo "$as_me:7844: \$? = $ac_status" >&5
7844  (exit $ac_status); } &&
7845         { ac_try='test -s conftest.$ac_objext'
7846  { (eval echo "$as_me:7847: \"$ac_try\"") >&5
7847  (eval $ac_try) 2>&5
7848  ac_status=$?
7849  echo "$as_me:7850: \$? = $ac_status" >&5
7850  (exit $ac_status); }; }; then
7851  break
7852else
7853  echo "$as_me: failed program was:" >&5
7854cat conftest.$ac_ext >&5
7855fi
7856rm -f conftest.$ac_objext
7857     	 CC="$CC -n32"
7858     	 rm -f conftest.$ac_objext
7859if { (eval echo "$as_me:7860: \"$ac_compile\"") >&5
7860  (eval $ac_compile) 2>&5
7861  ac_status=$?
7862  echo "$as_me:7863: \$? = $ac_status" >&5
7863  (exit $ac_status); } &&
7864         { ac_try='test -s conftest.$ac_objext'
7865  { (eval echo "$as_me:7866: \"$ac_try\"") >&5
7866  (eval $ac_try) 2>&5
7867  ac_status=$?
7868  echo "$as_me:7869: \$? = $ac_status" >&5
7869  (exit $ac_status); }; }; then
7870  ac_cv_sys_largefile_CC=' -n32'; break
7871else
7872  echo "$as_me: failed program was:" >&5
7873cat conftest.$ac_ext >&5
7874fi
7875rm -f conftest.$ac_objext
7876         break
7877       done
7878       CC=$ac_save_CC
7879       rm -f conftest.$ac_ext
7880    fi
7881fi
7882echo "$as_me:7883: result: $ac_cv_sys_largefile_CC" >&5
7883echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7884  if test "$ac_cv_sys_largefile_CC" != no; then
7885    CC=$CC$ac_cv_sys_largefile_CC
7886  fi
7887
7888  echo "$as_me:7889: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7889echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7890if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7891  echo $ECHO_N "(cached) $ECHO_C" >&6
7892else
7893  while :; do
7894  ac_cv_sys_file_offset_bits=no
7895  cat >conftest.$ac_ext <<_ACEOF
7896#line 7897 "configure"
7897#include "confdefs.h"
7898#include <sys/types.h>
7899 /* Check that off_t can represent 2**63 - 1 correctly.
7900    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7901    since some C++ compilers masquerading as C compilers
7902    incorrectly reject 9223372036854775807.  */
7903#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7904  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7905		       && LARGE_OFF_T % 2147483647 == 1)
7906		      ? 1 : -1];
7907int
7908main ()
7909{
7910
7911  ;
7912  return 0;
7913}
7914_ACEOF
7915rm -f conftest.$ac_objext
7916if { (eval echo "$as_me:7917: \"$ac_compile\"") >&5
7917  (eval $ac_compile) 2>&5
7918  ac_status=$?
7919  echo "$as_me:7920: \$? = $ac_status" >&5
7920  (exit $ac_status); } &&
7921         { ac_try='test -s conftest.$ac_objext'
7922  { (eval echo "$as_me:7923: \"$ac_try\"") >&5
7923  (eval $ac_try) 2>&5
7924  ac_status=$?
7925  echo "$as_me:7926: \$? = $ac_status" >&5
7926  (exit $ac_status); }; }; then
7927  break
7928else
7929  echo "$as_me: failed program was:" >&5
7930cat conftest.$ac_ext >&5
7931fi
7932rm -f conftest.$ac_objext conftest.$ac_ext
7933  cat >conftest.$ac_ext <<_ACEOF
7934#line 7935 "configure"
7935#include "confdefs.h"
7936#define _FILE_OFFSET_BITS 64
7937#include <sys/types.h>
7938 /* Check that off_t can represent 2**63 - 1 correctly.
7939    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7940    since some C++ compilers masquerading as C compilers
7941    incorrectly reject 9223372036854775807.  */
7942#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7943  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7944		       && LARGE_OFF_T % 2147483647 == 1)
7945		      ? 1 : -1];
7946int
7947main ()
7948{
7949
7950  ;
7951  return 0;
7952}
7953_ACEOF
7954rm -f conftest.$ac_objext
7955if { (eval echo "$as_me:7956: \"$ac_compile\"") >&5
7956  (eval $ac_compile) 2>&5
7957  ac_status=$?
7958  echo "$as_me:7959: \$? = $ac_status" >&5
7959  (exit $ac_status); } &&
7960         { ac_try='test -s conftest.$ac_objext'
7961  { (eval echo "$as_me:7962: \"$ac_try\"") >&5
7962  (eval $ac_try) 2>&5
7963  ac_status=$?
7964  echo "$as_me:7965: \$? = $ac_status" >&5
7965  (exit $ac_status); }; }; then
7966  ac_cv_sys_file_offset_bits=64; break
7967else
7968  echo "$as_me: failed program was:" >&5
7969cat conftest.$ac_ext >&5
7970fi
7971rm -f conftest.$ac_objext conftest.$ac_ext
7972  break
7973done
7974fi
7975echo "$as_me:7976: result: $ac_cv_sys_file_offset_bits" >&5
7976echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7977if test "$ac_cv_sys_file_offset_bits" != no; then
7978
7979cat >>confdefs.h <<EOF
7980#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7981EOF
7982
7983fi
7984rm -f conftest*
7985  echo "$as_me:7986: checking for _LARGE_FILES value needed for large files" >&5
7986echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7987if test "${ac_cv_sys_large_files+set}" = set; then
7988  echo $ECHO_N "(cached) $ECHO_C" >&6
7989else
7990  while :; do
7991  ac_cv_sys_large_files=no
7992  cat >conftest.$ac_ext <<_ACEOF
7993#line 7994 "configure"
7994#include "confdefs.h"
7995#include <sys/types.h>
7996 /* Check that off_t can represent 2**63 - 1 correctly.
7997    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7998    since some C++ compilers masquerading as C compilers
7999    incorrectly reject 9223372036854775807.  */
8000#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8001  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8002		       && LARGE_OFF_T % 2147483647 == 1)
8003		      ? 1 : -1];
8004int
8005main ()
8006{
8007
8008  ;
8009  return 0;
8010}
8011_ACEOF
8012rm -f conftest.$ac_objext
8013if { (eval echo "$as_me:8014: \"$ac_compile\"") >&5
8014  (eval $ac_compile) 2>&5
8015  ac_status=$?
8016  echo "$as_me:8017: \$? = $ac_status" >&5
8017  (exit $ac_status); } &&
8018         { ac_try='test -s conftest.$ac_objext'
8019  { (eval echo "$as_me:8020: \"$ac_try\"") >&5
8020  (eval $ac_try) 2>&5
8021  ac_status=$?
8022  echo "$as_me:8023: \$? = $ac_status" >&5
8023  (exit $ac_status); }; }; then
8024  break
8025else
8026  echo "$as_me: failed program was:" >&5
8027cat conftest.$ac_ext >&5
8028fi
8029rm -f conftest.$ac_objext conftest.$ac_ext
8030  cat >conftest.$ac_ext <<_ACEOF
8031#line 8032 "configure"
8032#include "confdefs.h"
8033#define _LARGE_FILES 1
8034#include <sys/types.h>
8035 /* Check that off_t can represent 2**63 - 1 correctly.
8036    We can't simply define LARGE_OFF_T to be 9223372036854775807,
8037    since some C++ compilers masquerading as C compilers
8038    incorrectly reject 9223372036854775807.  */
8039#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8040  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8041		       && LARGE_OFF_T % 2147483647 == 1)
8042		      ? 1 : -1];
8043int
8044main ()
8045{
8046
8047  ;
8048  return 0;
8049}
8050_ACEOF
8051rm -f conftest.$ac_objext
8052if { (eval echo "$as_me:8053: \"$ac_compile\"") >&5
8053  (eval $ac_compile) 2>&5
8054  ac_status=$?
8055  echo "$as_me:8056: \$? = $ac_status" >&5
8056  (exit $ac_status); } &&
8057         { ac_try='test -s conftest.$ac_objext'
8058  { (eval echo "$as_me:8059: \"$ac_try\"") >&5
8059  (eval $ac_try) 2>&5
8060  ac_status=$?
8061  echo "$as_me:8062: \$? = $ac_status" >&5
8062  (exit $ac_status); }; }; then
8063  ac_cv_sys_large_files=1; break
8064else
8065  echo "$as_me: failed program was:" >&5
8066cat conftest.$ac_ext >&5
8067fi
8068rm -f conftest.$ac_objext conftest.$ac_ext
8069  break
8070done
8071fi
8072echo "$as_me:8073: result: $ac_cv_sys_large_files" >&5
8073echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8074if test "$ac_cv_sys_large_files" != no; then
8075
8076cat >>confdefs.h <<EOF
8077#define _LARGE_FILES $ac_cv_sys_large_files
8078EOF
8079
8080fi
8081rm -f conftest*
8082fi
8083
8084    if test "$enable_largefile" != no ; then
8085	echo "$as_me:8086: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8086echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8087if test "${ac_cv_sys_largefile_source+set}" = set; then
8088  echo $ECHO_N "(cached) $ECHO_C" >&6
8089else
8090  while :; do
8091  ac_cv_sys_largefile_source=no
8092  cat >conftest.$ac_ext <<_ACEOF
8093#line 8094 "configure"
8094#include "confdefs.h"
8095#include <stdio.h>
8096int
8097main ()
8098{
8099return !fseeko;
8100  ;
8101  return 0;
8102}
8103_ACEOF
8104rm -f conftest.$ac_objext
8105if { (eval echo "$as_me:8106: \"$ac_compile\"") >&5
8106  (eval $ac_compile) 2>&5
8107  ac_status=$?
8108  echo "$as_me:8109: \$? = $ac_status" >&5
8109  (exit $ac_status); } &&
8110         { ac_try='test -s conftest.$ac_objext'
8111  { (eval echo "$as_me:8112: \"$ac_try\"") >&5
8112  (eval $ac_try) 2>&5
8113  ac_status=$?
8114  echo "$as_me:8115: \$? = $ac_status" >&5
8115  (exit $ac_status); }; }; then
8116  break
8117else
8118  echo "$as_me: failed program was:" >&5
8119cat conftest.$ac_ext >&5
8120fi
8121rm -f conftest.$ac_objext conftest.$ac_ext
8122  cat >conftest.$ac_ext <<_ACEOF
8123#line 8124 "configure"
8124#include "confdefs.h"
8125#define _LARGEFILE_SOURCE 1
8126#include <stdio.h>
8127int
8128main ()
8129{
8130return !fseeko;
8131  ;
8132  return 0;
8133}
8134_ACEOF
8135rm -f conftest.$ac_objext
8136if { (eval echo "$as_me:8137: \"$ac_compile\"") >&5
8137  (eval $ac_compile) 2>&5
8138  ac_status=$?
8139  echo "$as_me:8140: \$? = $ac_status" >&5
8140  (exit $ac_status); } &&
8141         { ac_try='test -s conftest.$ac_objext'
8142  { (eval echo "$as_me:8143: \"$ac_try\"") >&5
8143  (eval $ac_try) 2>&5
8144  ac_status=$?
8145  echo "$as_me:8146: \$? = $ac_status" >&5
8146  (exit $ac_status); }; }; then
8147  ac_cv_sys_largefile_source=1; break
8148else
8149  echo "$as_me: failed program was:" >&5
8150cat conftest.$ac_ext >&5
8151fi
8152rm -f conftest.$ac_objext conftest.$ac_ext
8153  break
8154done
8155fi
8156echo "$as_me:8157: result: $ac_cv_sys_largefile_source" >&5
8157echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8158if test "$ac_cv_sys_largefile_source" != no; then
8159
8160cat >>confdefs.h <<EOF
8161#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8162EOF
8163
8164fi
8165rm -f conftest*
8166
8167# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8168# in glibc 2.1.3, but that breaks too many other things.
8169# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8170echo "$as_me:8171: checking for fseeko" >&5
8171echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8172if test "${ac_cv_func_fseeko+set}" = set; then
8173  echo $ECHO_N "(cached) $ECHO_C" >&6
8174else
8175  cat >conftest.$ac_ext <<_ACEOF
8176#line 8177 "configure"
8177#include "confdefs.h"
8178#include <stdio.h>
8179int
8180main ()
8181{
8182return fseeko && fseeko (stdin, 0, 0);
8183  ;
8184  return 0;
8185}
8186_ACEOF
8187rm -f conftest.$ac_objext conftest$ac_exeext
8188if { (eval echo "$as_me:8189: \"$ac_link\"") >&5
8189  (eval $ac_link) 2>&5
8190  ac_status=$?
8191  echo "$as_me:8192: \$? = $ac_status" >&5
8192  (exit $ac_status); } &&
8193         { ac_try='test -s conftest$ac_exeext'
8194  { (eval echo "$as_me:8195: \"$ac_try\"") >&5
8195  (eval $ac_try) 2>&5
8196  ac_status=$?
8197  echo "$as_me:8198: \$? = $ac_status" >&5
8198  (exit $ac_status); }; }; then
8199  ac_cv_func_fseeko=yes
8200else
8201  echo "$as_me: failed program was:" >&5
8202cat conftest.$ac_ext >&5
8203ac_cv_func_fseeko=no
8204fi
8205rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8206fi
8207echo "$as_me:8208: result: $ac_cv_func_fseeko" >&5
8208echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8209if test $ac_cv_func_fseeko = yes; then
8210
8211cat >>confdefs.h <<\EOF
8212#define HAVE_FSEEKO 1
8213EOF
8214
8215fi
8216
8217	# Normally we would collect these definitions in the config.h,
8218	# but (like _XOPEN_SOURCE), some environments rely on having these
8219	# defined before any of the system headers are included.  Another
8220	# case comes up with C++, e.g., on AIX the compiler compiles the
8221	# header files by themselves before looking at the body files it is
8222	# told to compile.  For ncurses, those header files do not include
8223	# the config.h
8224	test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8225	test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8226	test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8227
8228	echo "$as_me:8229: checking whether to use struct dirent64" >&5
8229echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8230if test "${cf_cv_struct_dirent64+set}" = set; then
8231  echo $ECHO_N "(cached) $ECHO_C" >&6
8232else
8233
8234		cat >conftest.$ac_ext <<_ACEOF
8235#line 8236 "configure"
8236#include "confdefs.h"
8237
8238#include <sys/types.h>
8239#include <dirent.h>
8240
8241int
8242main ()
8243{
8244
8245		/* if transitional largefile support is setup, this is true */
8246		extern struct dirent64 * readdir(DIR *);
8247		struct dirent64 *x = readdir((DIR *)0);
8248		struct dirent *y = readdir((DIR *)0);
8249		int z = x - y;
8250
8251  ;
8252  return 0;
8253}
8254_ACEOF
8255rm -f conftest.$ac_objext
8256if { (eval echo "$as_me:8257: \"$ac_compile\"") >&5
8257  (eval $ac_compile) 2>&5
8258  ac_status=$?
8259  echo "$as_me:8260: \$? = $ac_status" >&5
8260  (exit $ac_status); } &&
8261         { ac_try='test -s conftest.$ac_objext'
8262  { (eval echo "$as_me:8263: \"$ac_try\"") >&5
8263  (eval $ac_try) 2>&5
8264  ac_status=$?
8265  echo "$as_me:8266: \$? = $ac_status" >&5
8266  (exit $ac_status); }; }; then
8267  cf_cv_struct_dirent64=yes
8268else
8269  echo "$as_me: failed program was:" >&5
8270cat conftest.$ac_ext >&5
8271cf_cv_struct_dirent64=no
8272fi
8273rm -f conftest.$ac_objext conftest.$ac_ext
8274
8275fi
8276echo "$as_me:8277: result: $cf_cv_struct_dirent64" >&5
8277echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8278	test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8279#define HAVE_STRUCT_DIRENT64 1
8280EOF
8281
8282    fi
8283
8284###   use option --disable-tparm-varargs to make tparm() conform to X/Open
8285echo "$as_me:8286: checking if you want tparm not to use X/Open fixed-parameter list" >&5
8286echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
8287
8288# Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
8289if test "${enable_tparm_varargs+set}" = set; then
8290  enableval="$enable_tparm_varargs"
8291  with_tparm_varargs=$enableval
8292else
8293  with_tparm_varargs=yes
8294fi;
8295echo "$as_me:8296: result: $with_tparm_varargs" >&5
8296echo "${ECHO_T}$with_tparm_varargs" >&6
8297NCURSES_TPARM_VARARGS=0
8298test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
8299
8300###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
8301if test "$with_ticlib" != no ; then
8302echo "$as_me:8303: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
8303echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
8304
8305# Check whether --enable-tic-depends or --disable-tic-depends was given.
8306if test "${enable_tic_depends+set}" = set; then
8307  enableval="$enable_tic_depends"
8308  with_tic_depends=$enableval
8309else
8310  with_tic_depends=yes
8311fi;
8312echo "$as_me:8313: result: $with_tic_depends" >&5
8313echo "${ECHO_T}$with_tic_depends" >&6
8314else
8315	with_tic_depends=no
8316fi
8317
8318###   use option --with-bool to override bool's type
8319echo "$as_me:8320: checking for type of bool" >&5
8320echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
8321
8322# Check whether --with-bool or --without-bool was given.
8323if test "${with_bool+set}" = set; then
8324  withval="$with_bool"
8325  NCURSES_BOOL="$withval"
8326else
8327  NCURSES_BOOL=auto
8328fi;
8329echo "$as_me:8330: result: $NCURSES_BOOL" >&5
8330echo "${ECHO_T}$NCURSES_BOOL" >&6
8331
8332echo "$as_me:8333: checking for alternate terminal capabilities file" >&5
8333echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
8334
8335# Check whether --with-caps or --without-caps was given.
8336if test "${with_caps+set}" = set; then
8337  withval="$with_caps"
8338  TERMINFO_CAPS=Caps.$withval
8339else
8340  TERMINFO_CAPS=Caps
8341fi;
8342test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
8343echo "$as_me:8344: result: $TERMINFO_CAPS" >&5
8344echo "${ECHO_T}$TERMINFO_CAPS" >&6
8345
8346###   use option --with-chtype to override chtype's type
8347echo "$as_me:8348: checking for type of chtype" >&5
8348echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
8349
8350# Check whether --with-chtype or --without-chtype was given.
8351if test "${with_chtype+set}" = set; then
8352  withval="$with_chtype"
8353  NCURSES_CHTYPE="$withval"
8354else
8355  NCURSES_CHTYPE=auto
8356fi;
8357echo "$as_me:8358: result: $NCURSES_CHTYPE" >&5
8358echo "${ECHO_T}$NCURSES_CHTYPE" >&6
8359
8360###   use option --with-ospeed to override ospeed's type
8361echo "$as_me:8362: checking for type of ospeed" >&5
8362echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
8363
8364# Check whether --with-ospeed or --without-ospeed was given.
8365if test "${with_ospeed+set}" = set; then
8366  withval="$with_ospeed"
8367  NCURSES_OSPEED="$withval"
8368else
8369  NCURSES_OSPEED=short
8370fi;
8371echo "$as_me:8372: result: $NCURSES_OSPEED" >&5
8372echo "${ECHO_T}$NCURSES_OSPEED" >&6
8373
8374###   use option --with-mmask-t to override mmask_t's type
8375echo "$as_me:8376: checking for type of mmask_t" >&5
8376echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
8377
8378# Check whether --with-mmask-t or --without-mmask-t was given.
8379if test "${with_mmask_t+set}" = set; then
8380  withval="$with_mmask_t"
8381  NCURSES_MMASK_T="$withval"
8382else
8383  NCURSES_MMASK_T=auto
8384fi;
8385echo "$as_me:8386: result: $NCURSES_MMASK_T" >&5
8386echo "${ECHO_T}$NCURSES_MMASK_T" >&6
8387
8388### Enable compiling-in rcs id's
8389echo "$as_me:8390: checking if RCS identifiers should be compiled-in" >&5
8390echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8391
8392# Check whether --with-rcs-ids or --without-rcs-ids was given.
8393if test "${with_rcs_ids+set}" = set; then
8394  withval="$with_rcs_ids"
8395  with_rcs_ids=$withval
8396else
8397  with_rcs_ids=no
8398fi;
8399echo "$as_me:8400: result: $with_rcs_ids" >&5
8400echo "${ECHO_T}$with_rcs_ids" >&6
8401test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8402#define USE_RCS_IDS 1
8403EOF
8404
8405###############################################################################
8406
8407echo "$as_me:8408: checking format of man-pages" >&5
8408echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
8409
8410# Check whether --with-manpage-format or --without-manpage-format was given.
8411if test "${with_manpage_format+set}" = set; then
8412  withval="$with_manpage_format"
8413  MANPAGE_FORMAT=$withval
8414else
8415  MANPAGE_FORMAT=unknown
8416fi;
8417
8418test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
8419MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
8420
8421cf_unknown=
8422
8423case $MANPAGE_FORMAT in
8424unknown)
8425  if test -z "$MANPATH" ; then
8426    MANPATH="/usr/man:/usr/share/man"
8427  fi
8428
8429  # look for the 'date' man-page (it's most likely to be installed!)
8430  MANPAGE_FORMAT=
8431  cf_preform=no
8432  cf_catonly=yes
8433  cf_example=date
8434
8435  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
8436  for cf_dir in $MANPATH; do
8437    test -z "$cf_dir" && cf_dir=/usr/man
8438    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
8439    do
8440      cf_test=`echo $cf_name | sed -e 's/*//'`
8441      if test "x$cf_test" = "x$cf_name" ; then
8442
8443	case "$cf_name" in
8444	*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
8445	*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
8446	*.0)	MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
8447	*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
8448	esac
8449
8450	case "$cf_name" in
8451	$cf_dir/man*)
8452	  cf_catonly=no
8453	  ;;
8454	$cf_dir/cat*)
8455	  cf_preform=yes
8456	  ;;
8457	esac
8458	break
8459      fi
8460
8461      # if we found a match in either man* or cat*, stop looking
8462      if test -n "$MANPAGE_FORMAT" ; then
8463	cf_found=no
8464	test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
8465	test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
8466	case "$cf_name" in
8467	$cf_dir/cat*)
8468	  cf_found=yes
8469	  ;;
8470	esac
8471	test $cf_found=yes && break
8472      fi
8473    done
8474    # only check the first directory in $MANPATH where we find manpages
8475    if test -n "$MANPAGE_FORMAT" ; then
8476       break
8477    fi
8478  done
8479  # if we did not find the example, just assume it is normal
8480  test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8481  IFS="$ac_save_ifs"
8482  ;;
8483*)
8484  for cf_option in $MANPAGE_FORMAT; do
8485     case $cf_option in #(vi
8486     gzip|compress|BSDI|normal|formatted|catonly)
8487       ;;
8488     *)
8489       cf_unknown="$cf_unknown $cf_option"
8490       ;;
8491     esac
8492  done
8493  ;;
8494esac
8495
8496echo "$as_me:8497: result: $MANPAGE_FORMAT" >&5
8497echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8498if test -n "$cf_unknown" ; then
8499  { echo "$as_me:8500: WARNING: Unexpected manpage-format $cf_unknown" >&5
8500echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8501fi
8502
8503echo "$as_me:8504: checking for manpage renaming" >&5
8504echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8505
8506# Check whether --with-manpage-renames or --without-manpage-renames was given.
8507if test "${with_manpage_renames+set}" = set; then
8508  withval="$with_manpage_renames"
8509  MANPAGE_RENAMES=$withval
8510else
8511  MANPAGE_RENAMES=yes
8512fi;
8513
8514case ".$MANPAGE_RENAMES" in #(vi
8515.no) #(vi
8516  ;;
8517.|.yes)
8518  # Debian 'man' program?
8519  if test -f /etc/debian_version ; then
8520    MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8521  else
8522    MANPAGE_RENAMES=no
8523  fi
8524  ;;
8525esac
8526
8527if test "$MANPAGE_RENAMES" != no ; then
8528  if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8529    MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8530  elif test ! -f $MANPAGE_RENAMES ; then
8531    { { echo "$as_me:8532: error: not a filename: $MANPAGE_RENAMES" >&5
8532echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8533   { (exit 1); exit 1; }; }
8534  fi
8535
8536  test ! -d man && mkdir man
8537
8538  # Construct a sed-script to perform renaming within man-pages
8539  if test -n "$MANPAGE_RENAMES" ; then
8540    test ! -d man && mkdir man
8541    sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8542  fi
8543fi
8544
8545echo "$as_me:8546: result: $MANPAGE_RENAMES" >&5
8546echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8547
8548echo "$as_me:8549: checking if manpage aliases will be installed" >&5
8549echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8550
8551# Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8552if test "${with_manpage_aliases+set}" = set; then
8553  withval="$with_manpage_aliases"
8554  MANPAGE_ALIASES=$withval
8555else
8556  MANPAGE_ALIASES=yes
8557fi;
8558
8559echo "$as_me:8560: result: $MANPAGE_ALIASES" >&5
8560echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8561
8562if test "$LN_S" = "ln -s"; then
8563	cf_use_symlinks=yes
8564else
8565	cf_use_symlinks=no
8566fi
8567
8568MANPAGE_SYMLINKS=no
8569if test "$MANPAGE_ALIASES" = yes ; then
8570echo "$as_me:8571: checking if manpage symlinks should be used" >&5
8571echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8572
8573# Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8574if test "${with_manpage_symlinks+set}" = set; then
8575  withval="$with_manpage_symlinks"
8576  MANPAGE_SYMLINKS=$withval
8577else
8578  MANPAGE_SYMLINKS=$cf_use_symlinks
8579fi;
8580
8581if test "$$cf_use_symlinks" = no; then
8582if test "$MANPAGE_SYMLINKS" = yes ; then
8583	{ echo "$as_me:8584: WARNING: cannot make symlinks" >&5
8584echo "$as_me: WARNING: cannot make symlinks" >&2;}
8585	MANPAGE_SYMLINKS=no
8586fi
8587fi
8588
8589echo "$as_me:8590: result: $MANPAGE_SYMLINKS" >&5
8590echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8591fi
8592
8593echo "$as_me:8594: checking for manpage tbl" >&5
8594echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8595
8596# Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8597if test "${with_manpage_tbl+set}" = set; then
8598  withval="$with_manpage_tbl"
8599  MANPAGE_TBL=$withval
8600else
8601  MANPAGE_TBL=no
8602fi;
8603
8604echo "$as_me:8605: result: $MANPAGE_TBL" >&5
8605echo "${ECHO_T}$MANPAGE_TBL" >&6
8606
8607  if test "$prefix" = "NONE" ; then
8608     cf_prefix="$ac_default_prefix"
8609  else
8610     cf_prefix="$prefix"
8611  fi
8612
8613  case "$MANPAGE_FORMAT" in # (vi
8614  *catonly*) # (vi
8615    cf_format=yes
8616    cf_inboth=no
8617    ;;
8618  *formatted*) # (vi
8619    cf_format=yes
8620    cf_inboth=yes
8621    ;;
8622  *)
8623    cf_format=no
8624    cf_inboth=no
8625    ;;
8626  esac
8627
8628test ! -d man && mkdir man
8629
8630cf_so_strip=
8631cf_compress=
8632case "$MANPAGE_FORMAT" in #(vi
8633*compress*) #(vi
8634	cf_so_strip="Z"
8635	cf_compress=compress
8636  ;;
8637*gzip*) #(vi
8638	cf_so_strip="gz"
8639	cf_compress=gzip
8640  ;;
8641esac
8642
8643cf_edit_man=./edit_man.sh
8644cf_man_alias=`pwd`/man_alias.sed
8645
8646cat >$cf_edit_man <<CF_EOF
8647#! /bin/sh
8648# this script is generated by the configure-script CF_MAN_PAGES macro.
8649
8650prefix="$cf_prefix"
8651datadir="$datadir"
8652
8653NCURSES_MAJOR="$NCURSES_MAJOR"
8654NCURSES_MINOR="$NCURSES_MINOR"
8655NCURSES_PATCH="$NCURSES_PATCH"
8656
8657NCURSES_OSPEED="$NCURSES_OSPEED"
8658TERMINFO="$TERMINFO"
8659
8660MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
8661
8662INSTALL="$INSTALL"
8663INSTALL_DATA="$INSTALL_DATA"
8664
8665transform="$program_transform_name"
8666
8667TMP=\${TMPDIR-/tmp}/man\$\$
8668trap "rm -f \$TMP" 0 1 2 5 15
8669
8670form=\$1
8671shift || exit 1
8672
8673verb=\$1
8674shift || exit 1
8675
8676mandir=\$1
8677shift || exit 1
8678
8679srcdir=\$1
8680top_srcdir=\$srcdir/..
8681shift || exit 1
8682
8683if test "\$form" = normal ; then
8684	if test "$cf_format" = yes ; then
8685	if test "$cf_inboth" = no ; then
8686		sh \$0 format \$verb \$mandir \$srcdir \$*
8687		exit $?
8688	fi
8689	fi
8690	cf_subdir=\$mandir/man
8691	cf_tables=$MANPAGE_TBL
8692else
8693	cf_subdir=\$mandir/cat
8694	cf_tables=yes
8695fi
8696
8697# process the list of source-files
8698for i in \$* ; do
8699case \$i in #(vi
8700*.orig|*.rej) ;; #(vi
8701*.[0-9]*)
8702	section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8703	if test \$verb = installing ; then
8704	if test ! -d \$cf_subdir\${section} ; then
8705		\$MKDIRS \$cf_subdir\$section
8706	fi
8707	fi
8708
8709	# replace variables in man page
8710	if test ! -f $cf_man_alias ; then
8711cat >>$cf_man_alias <<-CF_EOF2
8712		s,@DATADIR@,\$datadir,g
8713		s,@TERMINFO@,\$TERMINFO,g
8714		s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
8715		s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
8716		s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
8717		s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
8718CF_EOF
8719
8720	for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8721	do
8722		cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8723		cf_name=`echo $cf_name|sed "$program_transform_name"`
8724cat >>$cf_edit_man <<-CF_EOF
8725		s,@$cf_NAME@,$cf_name,
8726CF_EOF
8727	done
8728
8729cat >>$cf_edit_man <<CF_EOF
8730CF_EOF2
8731		echo "...made $cf_man_alias"
8732	fi
8733
8734	aliases=
8735	cf_source=\`basename \$i\`
8736	inalias=\$cf_source
8737	test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8738	if test ! -f \$inalias ; then
8739		echo .. skipped \$cf_source
8740		continue
8741	fi
8742CF_EOF
8743
8744if test "$MANPAGE_ALIASES" != no ; then
8745cat >>$cf_edit_man <<CF_EOF
8746	aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8747CF_EOF
8748fi
8749
8750if test "$MANPAGE_RENAMES" = no ; then
8751cat >>$cf_edit_man <<CF_EOF
8752	# perform program transformations for section 1 man pages
8753	if test \$section = 1 ; then
8754		cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8755	else
8756		cf_target=\$cf_subdir\${section}/\$cf_source
8757	fi
8758CF_EOF
8759else
8760cat >>$cf_edit_man <<CF_EOF
8761	cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8762	if test -z "\$cf_target" ; then
8763		echo '? missing rename for '\$cf_source
8764		cf_target="\$cf_source"
8765	fi
8766	cf_target="\$cf_subdir\${section}/\${cf_target}"
8767
8768CF_EOF
8769fi
8770
8771cat >>$cf_edit_man <<CF_EOF
8772	sed	-f $cf_man_alias \\
8773CF_EOF
8774
8775if test -f $MANPAGE_RENAMES ; then
8776cat >>$cf_edit_man <<CF_EOF
8777		< \$i | sed -f `pwd`/edit_man.sed >\$TMP
8778CF_EOF
8779else
8780cat >>$cf_edit_man <<CF_EOF
8781		< \$i >\$TMP
8782CF_EOF
8783fi
8784
8785cat >>$cf_edit_man <<CF_EOF
8786if test \$cf_tables = yes ; then
8787	tbl \$TMP >\$TMP.out
8788	mv \$TMP.out \$TMP
8789fi
8790CF_EOF
8791
8792if test $with_curses_h != yes ; then
8793cat >>$cf_edit_man <<CF_EOF
8794	sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8795	mv \$TMP.out \$TMP
8796CF_EOF
8797fi
8798
8799cat >>$cf_edit_man <<CF_EOF
8800	if test \$form = format ; then
8801		nroff -man \$TMP >\$TMP.out
8802		mv \$TMP.out \$TMP
8803	fi
8804CF_EOF
8805
8806if test -n "$cf_compress" ; then
8807cat >>$cf_edit_man <<CF_EOF
8808	if test \$verb = installing ; then
8809	if ( $cf_compress -f \$TMP )
8810	then
8811		mv \$TMP.$cf_so_strip \$TMP
8812	fi
8813	fi
8814	cf_target="\$cf_target.$cf_so_strip"
8815CF_EOF
8816fi
8817
8818case "$MANPAGE_FORMAT" in #(vi
8819*BSDI*)
8820cat >>$cf_edit_man <<CF_EOF
8821	if test \$form = format ; then
8822		# BSDI installs only .0 suffixes in the cat directories
8823		cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8824	fi
8825CF_EOF
8826  ;;
8827esac
8828
8829cat >>$cf_edit_man <<CF_EOF
8830	suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8831	if test \$verb = installing ; then
8832		echo \$verb \$cf_target
8833		\$INSTALL_DATA \$TMP \$cf_target
8834		test -d \$cf_subdir\${section} &&
8835		test -n "\$aliases" && (
8836			cd \$cf_subdir\${section} && (
8837				cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8838				test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8839				cf_target=\`basename \$cf_target\`
8840				for cf_alias in \$aliases
8841				do
8842					if test \$section = 1 ; then
8843						cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8844					fi
8845
8846					if test "$MANPAGE_SYMLINKS" = yes ; then
8847						if test -f \$cf_alias\${suffix} ; then
8848							if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8849							then
8850								continue
8851							fi
8852						fi
8853						echo .. \$verb alias \$cf_alias\${suffix}
8854						rm -f \$cf_alias\${suffix}
8855						$LN_S \$cf_target \$cf_alias\${suffix}
8856					elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8857						echo ".so \$cf_source" >\$TMP
8858CF_EOF
8859if test -n "$cf_compress" ; then
8860cat >>$cf_edit_man <<CF_EOF
8861						if test -n "$cf_so_strip" ; then
8862							$cf_compress -f \$TMP
8863							mv \$TMP.$cf_so_strip \$TMP
8864						fi
8865CF_EOF
8866fi
8867cat >>$cf_edit_man <<CF_EOF
8868						echo .. \$verb alias \$cf_alias\${suffix}
8869						rm -f \$cf_alias\${suffix}
8870						\$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8871					fi
8872				done
8873			)
8874		)
8875	elif test \$verb = removing ; then
8876		test -f \$cf_target && (
8877			echo \$verb \$cf_target
8878			rm -f \$cf_target
8879		)
8880		test -d \$cf_subdir\${section} &&
8881		test -n "\$aliases" && (
8882			cd \$cf_subdir\${section} && (
8883				for cf_alias in \$aliases
8884				do
8885					if test \$section = 1 ; then
8886						cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8887					fi
8888
8889					echo .. \$verb alias \$cf_alias\${suffix}
8890					rm -f \$cf_alias\${suffix}
8891				done
8892			)
8893		)
8894	else
8895#		echo ".hy 0"
8896		cat \$TMP
8897	fi
8898	;;
8899esac
8900done
8901
8902if test $cf_inboth = yes ; then
8903if test \$form != format ; then
8904	sh \$0 format \$verb \$mandir \$srcdir \$*
8905fi
8906fi
8907
8908exit 0
8909CF_EOF
8910chmod 755 $cf_edit_man
8911
8912###############################################################################
8913
8914### Note that some functions (such as const) are normally disabled anyway.
8915echo "$as_me:8916: checking if you want to build with function extensions" >&5
8916echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8917
8918# Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8919if test "${enable_ext_funcs+set}" = set; then
8920  enableval="$enable_ext_funcs"
8921  with_ext_funcs=$enableval
8922else
8923  with_ext_funcs=yes
8924fi;
8925echo "$as_me:8926: result: $with_ext_funcs" >&5
8926echo "${ECHO_T}$with_ext_funcs" >&6
8927if test "$with_ext_funcs" = yes ; then
8928	NCURSES_EXT_FUNCS=1
8929	cat >>confdefs.h <<\EOF
8930#define HAVE_CURSES_VERSION 1
8931EOF
8932
8933	cat >>confdefs.h <<\EOF
8934#define HAVE_HAS_KEY 1
8935EOF
8936
8937	cat >>confdefs.h <<\EOF
8938#define HAVE_RESIZETERM 1
8939EOF
8940
8941	cat >>confdefs.h <<\EOF
8942#define HAVE_RESIZE_TERM 1
8943EOF
8944
8945	cat >>confdefs.h <<\EOF
8946#define HAVE_USE_DEFAULT_COLORS 1
8947EOF
8948
8949	cat >>confdefs.h <<\EOF
8950#define HAVE_WRESIZE 1
8951EOF
8952
8953	cat >>confdefs.h <<\EOF
8954#define NCURSES_EXT_FUNCS 1
8955EOF
8956
8957else
8958	NCURSES_EXT_FUNCS=0
8959fi
8960
8961###   use option --enable-const to turn on use of const beyond that in XSI.
8962echo "$as_me:8963: checking for extended use of const keyword" >&5
8963echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8964
8965# Check whether --enable-const or --disable-const was given.
8966if test "${enable_const+set}" = set; then
8967  enableval="$enable_const"
8968  with_ext_const=$enableval
8969else
8970  with_ext_const=no
8971fi;
8972echo "$as_me:8973: result: $with_ext_const" >&5
8973echo "${ECHO_T}$with_ext_const" >&6
8974NCURSES_CONST='/*nothing*/'
8975if test "$with_ext_const" = yes ; then
8976	NCURSES_CONST=const
8977fi
8978
8979###   use option --enable-ext-colors to turn on use of colors beyond 16.
8980echo "$as_me:8981: checking if you want to use extended colors" >&5
8981echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
8982
8983# Check whether --enable-ext-colors or --disable-ext-colors was given.
8984if test "${enable_ext_colors+set}" = set; then
8985  enableval="$enable_ext_colors"
8986  with_ext_colors=$enableval
8987else
8988  with_ext_colors=no
8989fi;
8990echo "$as_me:8991: result: $with_ext_colors" >&5
8991echo "${ECHO_T}$with_ext_colors" >&6
8992NCURSES_EXT_COLORS=0
8993if test "$with_ext_colors" = yes ; then
8994	if test "$with_widec" != yes ; then
8995		{ { echo "$as_me:8996: error: This option applies only to wide-character library" >&5
8996echo "$as_me: error: This option applies only to wide-character library" >&2;}
8997   { (exit 1); exit 1; }; }
8998	else
8999		# cannot be ABI 5 since it changes sizeof(cchar_t)
9000
9001if test "${with_abi_version+set}" != set; then
9002	case $cf_cv_rel_version in
9003	5.*)
9004		cf_cv_rel_version=6.0
9005		cf_cv_abi_version=6
9006		{ echo "$as_me:9007: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9007echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9008		;;
9009	esac
9010fi
9011
9012	fi
9013	NCURSES_EXT_COLORS=1
9014	cat >>confdefs.h <<\EOF
9015#define NCURSES_EXT_COLORS 1
9016EOF
9017
9018fi
9019
9020###   use option --enable-ext-mouse to modify coding to support 5-button mice
9021echo "$as_me:9022: checking if you want to use extended mouse encoding" >&5
9022echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9023
9024# Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9025if test "${enable_ext_mouse+set}" = set; then
9026  enableval="$enable_ext_mouse"
9027  with_ext_mouse=$enableval
9028else
9029  with_ext_mouse=no
9030fi;
9031echo "$as_me:9032: result: $with_ext_mouse" >&5
9032echo "${ECHO_T}$with_ext_mouse" >&6
9033NCURSES_MOUSE_VERSION=1
9034if test "$with_ext_mouse" = yes ; then
9035	NCURSES_MOUSE_VERSION=2
9036
9037if test "${with_abi_version+set}" != set; then
9038	case $cf_cv_rel_version in
9039	5.*)
9040		cf_cv_rel_version=6.0
9041		cf_cv_abi_version=6
9042		{ echo "$as_me:9043: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9043echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9044		;;
9045	esac
9046fi
9047
9048fi
9049
9050echo "$as_me:9051: checking if you want \$NCURSES_NO_PADDING code" >&5
9051echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9052
9053# Check whether --enable-no-padding or --disable-no-padding was given.
9054if test "${enable_no_padding+set}" = set; then
9055  enableval="$enable_no_padding"
9056  with_no_padding=$enableval
9057else
9058  with_no_padding=$with_ext_funcs
9059fi;
9060echo "$as_me:9061: result: $with_no_padding" >&5
9061echo "${ECHO_T}$with_no_padding" >&6
9062test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9063#define NCURSES_NO_PADDING 1
9064EOF
9065
9066echo "$as_me:9067: checking for ANSI C header files" >&5
9067echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9068if test "${ac_cv_header_stdc+set}" = set; then
9069  echo $ECHO_N "(cached) $ECHO_C" >&6
9070else
9071  cat >conftest.$ac_ext <<_ACEOF
9072#line 9073 "configure"
9073#include "confdefs.h"
9074#include <stdlib.h>
9075#include <stdarg.h>
9076#include <string.h>
9077#include <float.h>
9078
9079_ACEOF
9080if { (eval echo "$as_me:9081: \"$ac_cpp conftest.$ac_ext\"") >&5
9081  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9082  ac_status=$?
9083  egrep -v '^ *\+' conftest.er1 >conftest.err
9084  rm -f conftest.er1
9085  cat conftest.err >&5
9086  echo "$as_me:9087: \$? = $ac_status" >&5
9087  (exit $ac_status); } >/dev/null; then
9088  if test -s conftest.err; then
9089    ac_cpp_err=$ac_c_preproc_warn_flag
9090  else
9091    ac_cpp_err=
9092  fi
9093else
9094  ac_cpp_err=yes
9095fi
9096if test -z "$ac_cpp_err"; then
9097  ac_cv_header_stdc=yes
9098else
9099  echo "$as_me: failed program was:" >&5
9100  cat conftest.$ac_ext >&5
9101  ac_cv_header_stdc=no
9102fi
9103rm -f conftest.err conftest.$ac_ext
9104
9105if test $ac_cv_header_stdc = yes; then
9106  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9107  cat >conftest.$ac_ext <<_ACEOF
9108#line 9109 "configure"
9109#include "confdefs.h"
9110#include <string.h>
9111
9112_ACEOF
9113if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9114  egrep "memchr" >/dev/null 2>&1; then
9115  :
9116else
9117  ac_cv_header_stdc=no
9118fi
9119rm -f conftest*
9120
9121fi
9122
9123if test $ac_cv_header_stdc = yes; then
9124  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9125  cat >conftest.$ac_ext <<_ACEOF
9126#line 9127 "configure"
9127#include "confdefs.h"
9128#include <stdlib.h>
9129
9130_ACEOF
9131if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9132  egrep "free" >/dev/null 2>&1; then
9133  :
9134else
9135  ac_cv_header_stdc=no
9136fi
9137rm -f conftest*
9138
9139fi
9140
9141if test $ac_cv_header_stdc = yes; then
9142  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9143  if test "$cross_compiling" = yes; then
9144  :
9145else
9146  cat >conftest.$ac_ext <<_ACEOF
9147#line 9148 "configure"
9148#include "confdefs.h"
9149#include <ctype.h>
9150#if ((' ' & 0x0FF) == 0x020)
9151# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9152# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9153#else
9154# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9155                     || ('j' <= (c) && (c) <= 'r') \
9156                     || ('s' <= (c) && (c) <= 'z'))
9157# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9158#endif
9159
9160#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9161int
9162main ()
9163{
9164  int i;
9165  for (i = 0; i < 256; i++)
9166    if (XOR (islower (i), ISLOWER (i))
9167        || toupper (i) != TOUPPER (i))
9168      $ac_main_return(2);
9169  $ac_main_return (0);
9170}
9171_ACEOF
9172rm -f conftest$ac_exeext
9173if { (eval echo "$as_me:9174: \"$ac_link\"") >&5
9174  (eval $ac_link) 2>&5
9175  ac_status=$?
9176  echo "$as_me:9177: \$? = $ac_status" >&5
9177  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9178  { (eval echo "$as_me:9179: \"$ac_try\"") >&5
9179  (eval $ac_try) 2>&5
9180  ac_status=$?
9181  echo "$as_me:9182: \$? = $ac_status" >&5
9182  (exit $ac_status); }; }; then
9183  :
9184else
9185  echo "$as_me: program exited with status $ac_status" >&5
9186echo "$as_me: failed program was:" >&5
9187cat conftest.$ac_ext >&5
9188ac_cv_header_stdc=no
9189fi
9190rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9191fi
9192fi
9193fi
9194echo "$as_me:9195: result: $ac_cv_header_stdc" >&5
9195echo "${ECHO_T}$ac_cv_header_stdc" >&6
9196if test $ac_cv_header_stdc = yes; then
9197
9198cat >>confdefs.h <<\EOF
9199#define STDC_HEADERS 1
9200EOF
9201
9202fi
9203
9204# On IRIX 5.3, sys/types and inttypes.h are conflicting.
9205
9206for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9207                  inttypes.h stdint.h unistd.h
9208do
9209as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9210echo "$as_me:9211: checking for $ac_header" >&5
9211echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9212if eval "test \"\${$as_ac_Header+set}\" = set"; then
9213  echo $ECHO_N "(cached) $ECHO_C" >&6
9214else
9215  cat >conftest.$ac_ext <<_ACEOF
9216#line 9217 "configure"
9217#include "confdefs.h"
9218$ac_includes_default
9219#include <$ac_header>
9220_ACEOF
9221rm -f conftest.$ac_objext
9222if { (eval echo "$as_me:9223: \"$ac_compile\"") >&5
9223  (eval $ac_compile) 2>&5
9224  ac_status=$?
9225  echo "$as_me:9226: \$? = $ac_status" >&5
9226  (exit $ac_status); } &&
9227         { ac_try='test -s conftest.$ac_objext'
9228  { (eval echo "$as_me:9229: \"$ac_try\"") >&5
9229  (eval $ac_try) 2>&5
9230  ac_status=$?
9231  echo "$as_me:9232: \$? = $ac_status" >&5
9232  (exit $ac_status); }; }; then
9233  eval "$as_ac_Header=yes"
9234else
9235  echo "$as_me: failed program was:" >&5
9236cat conftest.$ac_ext >&5
9237eval "$as_ac_Header=no"
9238fi
9239rm -f conftest.$ac_objext conftest.$ac_ext
9240fi
9241echo "$as_me:9242: result: `eval echo '${'$as_ac_Header'}'`" >&5
9242echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9243if test `eval echo '${'$as_ac_Header'}'` = yes; then
9244  cat >>confdefs.h <<EOF
9245#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9246EOF
9247
9248fi
9249done
9250
9251echo "$as_me:9252: checking for signed char" >&5
9252echo $ECHO_N "checking for signed char... $ECHO_C" >&6
9253if test "${ac_cv_type_signed_char+set}" = set; then
9254  echo $ECHO_N "(cached) $ECHO_C" >&6
9255else
9256  cat >conftest.$ac_ext <<_ACEOF
9257#line 9258 "configure"
9258#include "confdefs.h"
9259$ac_includes_default
9260int
9261main ()
9262{
9263if ((signed char *) 0)
9264  return 0;
9265if (sizeof (signed char))
9266  return 0;
9267  ;
9268  return 0;
9269}
9270_ACEOF
9271rm -f conftest.$ac_objext
9272if { (eval echo "$as_me:9273: \"$ac_compile\"") >&5
9273  (eval $ac_compile) 2>&5
9274  ac_status=$?
9275  echo "$as_me:9276: \$? = $ac_status" >&5
9276  (exit $ac_status); } &&
9277         { ac_try='test -s conftest.$ac_objext'
9278  { (eval echo "$as_me:9279: \"$ac_try\"") >&5
9279  (eval $ac_try) 2>&5
9280  ac_status=$?
9281  echo "$as_me:9282: \$? = $ac_status" >&5
9282  (exit $ac_status); }; }; then
9283  ac_cv_type_signed_char=yes
9284else
9285  echo "$as_me: failed program was:" >&5
9286cat conftest.$ac_ext >&5
9287ac_cv_type_signed_char=no
9288fi
9289rm -f conftest.$ac_objext conftest.$ac_ext
9290fi
9291echo "$as_me:9292: result: $ac_cv_type_signed_char" >&5
9292echo "${ECHO_T}$ac_cv_type_signed_char" >&6
9293
9294echo "$as_me:9295: checking size of signed char" >&5
9295echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
9296if test "${ac_cv_sizeof_signed_char+set}" = set; then
9297  echo $ECHO_N "(cached) $ECHO_C" >&6
9298else
9299  if test "$ac_cv_type_signed_char" = yes; then
9300  if test "$cross_compiling" = yes; then
9301  # Depending upon the size, compute the lo and hi bounds.
9302cat >conftest.$ac_ext <<_ACEOF
9303#line 9304 "configure"
9304#include "confdefs.h"
9305$ac_includes_default
9306int
9307main ()
9308{
9309int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
9310  ;
9311  return 0;
9312}
9313_ACEOF
9314rm -f conftest.$ac_objext
9315if { (eval echo "$as_me:9316: \"$ac_compile\"") >&5
9316  (eval $ac_compile) 2>&5
9317  ac_status=$?
9318  echo "$as_me:9319: \$? = $ac_status" >&5
9319  (exit $ac_status); } &&
9320         { ac_try='test -s conftest.$ac_objext'
9321  { (eval echo "$as_me:9322: \"$ac_try\"") >&5
9322  (eval $ac_try) 2>&5
9323  ac_status=$?
9324  echo "$as_me:9325: \$? = $ac_status" >&5
9325  (exit $ac_status); }; }; then
9326  ac_lo=0 ac_mid=0
9327  while :; do
9328    cat >conftest.$ac_ext <<_ACEOF
9329#line 9330 "configure"
9330#include "confdefs.h"
9331$ac_includes_default
9332int
9333main ()
9334{
9335int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9336  ;
9337  return 0;
9338}
9339_ACEOF
9340rm -f conftest.$ac_objext
9341if { (eval echo "$as_me:9342: \"$ac_compile\"") >&5
9342  (eval $ac_compile) 2>&5
9343  ac_status=$?
9344  echo "$as_me:9345: \$? = $ac_status" >&5
9345  (exit $ac_status); } &&
9346         { ac_try='test -s conftest.$ac_objext'
9347  { (eval echo "$as_me:9348: \"$ac_try\"") >&5
9348  (eval $ac_try) 2>&5
9349  ac_status=$?
9350  echo "$as_me:9351: \$? = $ac_status" >&5
9351  (exit $ac_status); }; }; then
9352  ac_hi=$ac_mid; break
9353else
9354  echo "$as_me: failed program was:" >&5
9355cat conftest.$ac_ext >&5
9356ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
9357fi
9358rm -f conftest.$ac_objext conftest.$ac_ext
9359  done
9360else
9361  echo "$as_me: failed program was:" >&5
9362cat conftest.$ac_ext >&5
9363ac_hi=-1 ac_mid=-1
9364  while :; do
9365    cat >conftest.$ac_ext <<_ACEOF
9366#line 9367 "configure"
9367#include "confdefs.h"
9368$ac_includes_default
9369int
9370main ()
9371{
9372int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
9373  ;
9374  return 0;
9375}
9376_ACEOF
9377rm -f conftest.$ac_objext
9378if { (eval echo "$as_me:9379: \"$ac_compile\"") >&5
9379  (eval $ac_compile) 2>&5
9380  ac_status=$?
9381  echo "$as_me:9382: \$? = $ac_status" >&5
9382  (exit $ac_status); } &&
9383         { ac_try='test -s conftest.$ac_objext'
9384  { (eval echo "$as_me:9385: \"$ac_try\"") >&5
9385  (eval $ac_try) 2>&5
9386  ac_status=$?
9387  echo "$as_me:9388: \$? = $ac_status" >&5
9388  (exit $ac_status); }; }; then
9389  ac_lo=$ac_mid; break
9390else
9391  echo "$as_me: failed program was:" >&5
9392cat conftest.$ac_ext >&5
9393ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
9394fi
9395rm -f conftest.$ac_objext conftest.$ac_ext
9396  done
9397fi
9398rm -f conftest.$ac_objext conftest.$ac_ext
9399# Binary search between lo and hi bounds.
9400while test "x$ac_lo" != "x$ac_hi"; do
9401  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9402  cat >conftest.$ac_ext <<_ACEOF
9403#line 9404 "configure"
9404#include "confdefs.h"
9405$ac_includes_default
9406int
9407main ()
9408{
9409int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9410  ;
9411  return 0;
9412}
9413_ACEOF
9414rm -f conftest.$ac_objext
9415if { (eval echo "$as_me:9416: \"$ac_compile\"") >&5
9416  (eval $ac_compile) 2>&5
9417  ac_status=$?
9418  echo "$as_me:9419: \$? = $ac_status" >&5
9419  (exit $ac_status); } &&
9420         { ac_try='test -s conftest.$ac_objext'
9421  { (eval echo "$as_me:9422: \"$ac_try\"") >&5
9422  (eval $ac_try) 2>&5
9423  ac_status=$?
9424  echo "$as_me:9425: \$? = $ac_status" >&5
9425  (exit $ac_status); }; }; then
9426  ac_hi=$ac_mid
9427else
9428  echo "$as_me: failed program was:" >&5
9429cat conftest.$ac_ext >&5
9430ac_lo=`expr $ac_mid + 1`
9431fi
9432rm -f conftest.$ac_objext conftest.$ac_ext
9433done
9434ac_cv_sizeof_signed_char=$ac_lo
9435else
9436  if test "$cross_compiling" = yes; then
9437  { { echo "$as_me:9438: error: cannot run test program while cross compiling" >&5
9438echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9439   { (exit 1); exit 1; }; }
9440else
9441  cat >conftest.$ac_ext <<_ACEOF
9442#line 9443 "configure"
9443#include "confdefs.h"
9444$ac_includes_default
9445int
9446main ()
9447{
9448FILE *f = fopen ("conftest.val", "w");
9449if (!f)
9450  $ac_main_return (1);
9451fprintf (f, "%d", (sizeof (signed char)));
9452fclose (f);
9453  ;
9454  return 0;
9455}
9456_ACEOF
9457rm -f conftest$ac_exeext
9458if { (eval echo "$as_me:9459: \"$ac_link\"") >&5
9459  (eval $ac_link) 2>&5
9460  ac_status=$?
9461  echo "$as_me:9462: \$? = $ac_status" >&5
9462  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9463  { (eval echo "$as_me:9464: \"$ac_try\"") >&5
9464  (eval $ac_try) 2>&5
9465  ac_status=$?
9466  echo "$as_me:9467: \$? = $ac_status" >&5
9467  (exit $ac_status); }; }; then
9468  ac_cv_sizeof_signed_char=`cat conftest.val`
9469else
9470  echo "$as_me: program exited with status $ac_status" >&5
9471echo "$as_me: failed program was:" >&5
9472cat conftest.$ac_ext >&5
9473fi
9474rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9475fi
9476fi
9477rm -f conftest.val
9478else
9479  ac_cv_sizeof_signed_char=0
9480fi
9481fi
9482echo "$as_me:9483: result: $ac_cv_sizeof_signed_char" >&5
9483echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
9484cat >>confdefs.h <<EOF
9485#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9486EOF
9487
9488if test "$ac_cv_sizeof_signed_char" = 1 ; then
9489	NCURSES_SBOOL="signed char"
9490else
9491	NCURSES_SBOOL="char"
9492fi
9493echo "$as_me:9494: checking if you want to use signed Boolean array in term.h" >&5
9494echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
9495
9496# Check whether --enable-signed-char or --disable-signed-char was given.
9497if test "${enable_signed_char+set}" = set; then
9498  enableval="$enable_signed_char"
9499  with_signed_char=$enableval
9500else
9501  with_signed_char=no
9502fi;
9503echo "$as_me:9504: result: $with_signed_char" >&5
9504echo "${ECHO_T}$with_signed_char" >&6
9505test "$with_signed_char" != yes && NCURSES_SBOOL="char"
9506
9507###   use option --enable-sigwinch to turn on use of SIGWINCH logic
9508echo "$as_me:9509: checking if you want SIGWINCH handler" >&5
9509echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
9510
9511# Check whether --enable-sigwinch or --disable-sigwinch was given.
9512if test "${enable_sigwinch+set}" = set; then
9513  enableval="$enable_sigwinch"
9514  with_sigwinch=$enableval
9515else
9516  with_sigwinch=$with_ext_funcs
9517fi;
9518echo "$as_me:9519: result: $with_sigwinch" >&5
9519echo "${ECHO_T}$with_sigwinch" >&6
9520test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
9521#define USE_SIGWINCH 1
9522EOF
9523
9524###   use option --enable-tcap-names to allow user to define new capabilities
9525echo "$as_me:9526: checking if you want user-definable terminal capabilities like termcap" >&5
9526echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
9527
9528# Check whether --enable-tcap-names or --disable-tcap-names was given.
9529if test "${enable_tcap_names+set}" = set; then
9530  enableval="$enable_tcap_names"
9531  with_tcap_names=$enableval
9532else
9533  with_tcap_names=$with_ext_funcs
9534fi;
9535echo "$as_me:9536: result: $with_tcap_names" >&5
9536echo "${ECHO_T}$with_tcap_names" >&6
9537NCURSES_XNAMES=0
9538test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9539
9540###############################################################################
9541# These options are relatively safe to experiment with.
9542
9543echo "$as_me:9544: checking if you want all development code" >&5
9544echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9545
9546# Check whether --with-develop or --without-develop was given.
9547if test "${with_develop+set}" = set; then
9548  withval="$with_develop"
9549  with_develop=$withval
9550else
9551  with_develop=no
9552fi;
9553echo "$as_me:9554: result: $with_develop" >&5
9554echo "${ECHO_T}$with_develop" >&6
9555
9556###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9557echo "$as_me:9558: checking if you want hard-tabs code" >&5
9558echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9559
9560# Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9561if test "${enable_hard_tabs+set}" = set; then
9562  enableval="$enable_hard_tabs"
9563
9564else
9565  enable_hard_tabs=$with_develop
9566fi;
9567echo "$as_me:9568: result: $enable_hard_tabs" >&5
9568echo "${ECHO_T}$enable_hard_tabs" >&6
9569test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9570#define USE_HARD_TABS 1
9571EOF
9572
9573###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9574echo "$as_me:9575: checking if you want limited support for xmc" >&5
9575echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9576
9577# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9578if test "${enable_xmc_glitch+set}" = set; then
9579  enableval="$enable_xmc_glitch"
9580
9581else
9582  enable_xmc_glitch=$with_develop
9583fi;
9584echo "$as_me:9585: result: $enable_xmc_glitch" >&5
9585echo "${ECHO_T}$enable_xmc_glitch" >&6
9586test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9587#define USE_XMC_SUPPORT 1
9588EOF
9589
9590###############################################################################
9591# These are just experimental, probably should not be in a package:
9592
9593echo "$as_me:9594: checking if you do not want to assume colors are white-on-black" >&5
9594echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9595
9596# Check whether --enable-assumed-color or --disable-assumed-color was given.
9597if test "${enable_assumed_color+set}" = set; then
9598  enableval="$enable_assumed_color"
9599  with_assumed_color=$enableval
9600else
9601  with_assumed_color=yes
9602fi;
9603echo "$as_me:9604: result: $with_assumed_color" >&5
9604echo "${ECHO_T}$with_assumed_color" >&6
9605test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9606#define USE_ASSUMED_COLOR 1
9607EOF
9608
9609###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9610echo "$as_me:9611: checking if you want hashmap scrolling-optimization code" >&5
9611echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9612
9613# Check whether --enable-hashmap or --disable-hashmap was given.
9614if test "${enable_hashmap+set}" = set; then
9615  enableval="$enable_hashmap"
9616  with_hashmap=$enableval
9617else
9618  with_hashmap=yes
9619fi;
9620echo "$as_me:9621: result: $with_hashmap" >&5
9621echo "${ECHO_T}$with_hashmap" >&6
9622test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9623#define USE_HASHMAP 1
9624EOF
9625
9626###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9627echo "$as_me:9628: checking if you want colorfgbg code" >&5
9628echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9629
9630# Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9631if test "${enable_colorfgbg+set}" = set; then
9632  enableval="$enable_colorfgbg"
9633  with_colorfgbg=$enableval
9634else
9635  with_colorfgbg=no
9636fi;
9637echo "$as_me:9638: result: $with_colorfgbg" >&5
9638echo "${ECHO_T}$with_colorfgbg" >&6
9639test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9640#define USE_COLORFGBG 1
9641EOF
9642
9643# This is still experimental (20080329), but should ultimately be moved to
9644# the script-block --with-normal, etc.
9645
9646echo "$as_me:9647: checking if you want to link with the pthread library" >&5
9647echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9648
9649# Check whether --with-pthread or --without-pthread was given.
9650if test "${with_pthread+set}" = set; then
9651  withval="$with_pthread"
9652  with_pthread=$withval
9653else
9654  with_pthread=no
9655fi;
9656echo "$as_me:9657: result: $with_pthread" >&5
9657echo "${ECHO_T}$with_pthread" >&6
9658
9659if test "$with_pthread" != no ; then
9660    echo "$as_me:9661: checking for pthread.h" >&5
9661echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9662if test "${ac_cv_header_pthread_h+set}" = set; then
9663  echo $ECHO_N "(cached) $ECHO_C" >&6
9664else
9665  cat >conftest.$ac_ext <<_ACEOF
9666#line 9667 "configure"
9667#include "confdefs.h"
9668#include <pthread.h>
9669_ACEOF
9670if { (eval echo "$as_me:9671: \"$ac_cpp conftest.$ac_ext\"") >&5
9671  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9672  ac_status=$?
9673  egrep -v '^ *\+' conftest.er1 >conftest.err
9674  rm -f conftest.er1
9675  cat conftest.err >&5
9676  echo "$as_me:9677: \$? = $ac_status" >&5
9677  (exit $ac_status); } >/dev/null; then
9678  if test -s conftest.err; then
9679    ac_cpp_err=$ac_c_preproc_warn_flag
9680  else
9681    ac_cpp_err=
9682  fi
9683else
9684  ac_cpp_err=yes
9685fi
9686if test -z "$ac_cpp_err"; then
9687  ac_cv_header_pthread_h=yes
9688else
9689  echo "$as_me: failed program was:" >&5
9690  cat conftest.$ac_ext >&5
9691  ac_cv_header_pthread_h=no
9692fi
9693rm -f conftest.err conftest.$ac_ext
9694fi
9695echo "$as_me:9696: result: $ac_cv_header_pthread_h" >&5
9696echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9697if test $ac_cv_header_pthread_h = yes; then
9698
9699        cat >>confdefs.h <<\EOF
9700#define HAVE_PTHREADS_H 1
9701EOF
9702
9703        echo "$as_me:9704: checking if we can link with the pthread library" >&5
9704echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
9705        cf_save_LIBS="$LIBS"
9706        LIBS="-lpthread $LIBS"
9707        cat >conftest.$ac_ext <<_ACEOF
9708#line 9709 "configure"
9709#include "confdefs.h"
9710
9711#include <pthread.h>
9712
9713int
9714main ()
9715{
9716
9717        int rc = pthread_create(0,0,0,0);
9718
9719  ;
9720  return 0;
9721}
9722_ACEOF
9723rm -f conftest.$ac_objext conftest$ac_exeext
9724if { (eval echo "$as_me:9725: \"$ac_link\"") >&5
9725  (eval $ac_link) 2>&5
9726  ac_status=$?
9727  echo "$as_me:9728: \$? = $ac_status" >&5
9728  (exit $ac_status); } &&
9729         { ac_try='test -s conftest$ac_exeext'
9730  { (eval echo "$as_me:9731: \"$ac_try\"") >&5
9731  (eval $ac_try) 2>&5
9732  ac_status=$?
9733  echo "$as_me:9734: \$? = $ac_status" >&5
9734  (exit $ac_status); }; }; then
9735  with_pthread=yes
9736else
9737  echo "$as_me: failed program was:" >&5
9738cat conftest.$ac_ext >&5
9739with_pthread=no
9740fi
9741rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9742        LIBS="$cf_save_LIBS"
9743        echo "$as_me:9744: result: $with_pthread" >&5
9744echo "${ECHO_T}$with_pthread" >&6
9745
9746        if test "$with_pthread" = yes ; then
9747            LIBS="-lpthread $LIBS"
9748            cat >>confdefs.h <<\EOF
9749#define HAVE_LIBPTHREADS 1
9750EOF
9751
9752        else
9753            { { echo "$as_me:9754: error: Cannot link with pthread library" >&5
9754echo "$as_me: error: Cannot link with pthread library" >&2;}
9755   { (exit 1); exit 1; }; }
9756        fi
9757
9758fi
9759
9760fi
9761
9762echo "$as_me:9763: checking if you want to use weak-symbols for pthreads" >&5
9763echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9764
9765# Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9766if test "${enable_weak_symbols+set}" = set; then
9767  enableval="$enable_weak_symbols"
9768  use_weak_symbols=$withval
9769else
9770  use_weak_symbols=no
9771fi;
9772echo "$as_me:9773: result: $use_weak_symbols" >&5
9773echo "${ECHO_T}$use_weak_symbols" >&6
9774if test "$use_weak_symbols" = yes ; then
9775
9776echo "$as_me:9777: checking if $CC supports weak symbols" >&5
9777echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9778if test "${cf_cv_weak_symbols+set}" = set; then
9779  echo $ECHO_N "(cached) $ECHO_C" >&6
9780else
9781
9782cat >conftest.$ac_ext <<_ACEOF
9783#line 9784 "configure"
9784#include "confdefs.h"
9785
9786#include <stdio.h>
9787int
9788main ()
9789{
9790
9791#if defined(__GNUC__)
9792#  if defined __USE_ISOC99
9793#    define _cat_pragma(exp)	_Pragma(#exp)
9794#    define _weak_pragma(exp)	_cat_pragma(weak name)
9795#  else
9796#    define _weak_pragma(exp)
9797#  endif
9798#  define _declare(name)	__extension__ extern __typeof__(name) name
9799#  define weak_symbol(name)	_weak_pragma(name) _declare(name) __attribute__((weak))
9800#endif
9801
9802weak_symbol(fopen);
9803
9804  ;
9805  return 0;
9806}
9807_ACEOF
9808rm -f conftest.$ac_objext
9809if { (eval echo "$as_me:9810: \"$ac_compile\"") >&5
9810  (eval $ac_compile) 2>&5
9811  ac_status=$?
9812  echo "$as_me:9813: \$? = $ac_status" >&5
9813  (exit $ac_status); } &&
9814         { ac_try='test -s conftest.$ac_objext'
9815  { (eval echo "$as_me:9816: \"$ac_try\"") >&5
9816  (eval $ac_try) 2>&5
9817  ac_status=$?
9818  echo "$as_me:9819: \$? = $ac_status" >&5
9819  (exit $ac_status); }; }; then
9820  cf_cv_weak_symbols=yes
9821else
9822  echo "$as_me: failed program was:" >&5
9823cat conftest.$ac_ext >&5
9824cf_cv_weak_symbols=no
9825fi
9826rm -f conftest.$ac_objext conftest.$ac_ext
9827
9828fi
9829echo "$as_me:9830: result: $cf_cv_weak_symbols" >&5
9830echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9831
9832else
9833    cf_cv_weak_symbols=no
9834fi
9835
9836if test $cf_cv_weak_symbols = yes ; then
9837    cat >>confdefs.h <<\EOF
9838#define USE_WEAK_SYMBOLS 1
9839EOF
9840
9841fi
9842
9843PTHREAD=
9844if test "$with_pthread" = "yes" ; then
9845    cat >>confdefs.h <<\EOF
9846#define USE_PTHREADS 1
9847EOF
9848
9849    enable_reentrant=yes
9850    if test $cf_cv_weak_symbols = yes ; then
9851        PTHREAD=-lpthread
9852    fi
9853fi
9854
9855# Reentrant code has to be opaque; there's little advantage to making ncurses
9856# opaque outside of that, so there is no --enable-opaque option.  We can use
9857# this option without --with-pthreads, but this will be always set for
9858# pthreads.
9859echo "$as_me:9860: checking if you want experimental reentrant code" >&5
9860echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9861
9862# Opaque structures make binaries less likely to be incompatable with
9863# future versions of ncurses.
9864cf_cv_enable_opaque="NCURSES_INTERNALS"
9865NCURSES_OPAQUE=1
9866
9867# Check whether --enable-reentrant or --disable-reentrant was given.
9868if test "${enable_reentrant+set}" = set; then
9869  enableval="$enable_reentrant"
9870  with_reentrant=$enableval
9871else
9872  with_reentrant=no
9873fi;
9874echo "$as_me:9870: result: $with_reentrant" >&5
9875echo "${ECHO_T}$with_reentrant" >&6
9876if test "$with_reentrant" = yes ; then
9877	cf_cv_enable_reentrant=1
9878	cf_cv_enable_opaque="NCURSES_INTERNALS"
9879	NCURSES_OPAQUE=1
9880	NCURSES_SIZE_T=int
9881    if test $cf_cv_weak_symbols = yes ; then
9882
9883# remove pthread library from $LIBS
9884LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ 	]//g' -e 's/-lpthread$//'`
9885
9886    else
9887        LIB_SUFFIX="t${LIB_SUFFIX}"
9888    fi
9889	cat >>confdefs.h <<\EOF
9890#define USE_REENTRANT 1
9891EOF
9892
9893if test "${with_abi_version+set}" != set; then
9894	case $cf_cv_rel_version in
9895	5.*)
9896		cf_cv_rel_version=6.0
9897		cf_cv_abi_version=6
9898		{ echo "$as_me:9894: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9899echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9900		;;
9901	esac
9902fi
9903
9904else
9905	cf_cv_enable_reentrant=0
9906	cf_cv_enable_opaque="NCURSES_OPAQUE"
9907	NCURSES_OPAQUE=1
9908	NCURSES_SIZE_T=short
9909fi
9910
9911echo "$as_me:9907: checking if you want experimental safe-sprintf code" >&5
9912echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9913
9914# Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9915if test "${enable_safe_sprintf+set}" = set; then
9916  enableval="$enable_safe_sprintf"
9917  with_safe_sprintf=$enableval
9918else
9919  with_safe_sprintf=no
9920fi;
9921echo "$as_me:9917: result: $with_safe_sprintf" >&5
9922echo "${ECHO_T}$with_safe_sprintf" >&6
9923test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9924#define USE_SAFE_SPRINTF 1
9925EOF
9926
9927###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9928# when hashmap is used scroll hints are useless
9929if test "$with_hashmap" = no ; then
9930echo "$as_me:9926: checking if you want to experiment without scrolling-hints code" >&5
9931echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9932
9933# Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9934if test "${enable_scroll_hints+set}" = set; then
9935  enableval="$enable_scroll_hints"
9936  with_scroll_hints=$enableval
9937else
9938  with_scroll_hints=yes
9939fi;
9940echo "$as_me:9936: result: $with_scroll_hints" >&5
9941echo "${ECHO_T}$with_scroll_hints" >&6
9942test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9943#define USE_SCROLL_HINTS 1
9944EOF
9945
9946fi
9947
9948echo "$as_me:9944: checking if you want experimental wgetch-events code" >&5
9949echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9950
9951# Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9952if test "${enable_wgetch_events+set}" = set; then
9953  enableval="$enable_wgetch_events"
9954  with_wgetch_events=$enableval
9955else
9956  with_wgetch_events=no
9957fi;
9958echo "$as_me:9954: result: $with_wgetch_events" >&5
9959echo "${ECHO_T}$with_wgetch_events" >&6
9960test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9961#define NCURSES_WGETCH_EVENTS 1
9962EOF
9963
9964###############################################################################
9965
9966###	use option --disable-echo to suppress full display compiling commands
9967echo "$as_me:9963: checking if you want to display full commands during build" >&5
9968echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9969
9970# Check whether --enable-echo or --disable-echo was given.
9971if test "${enable_echo+set}" = set; then
9972  enableval="$enable_echo"
9973  with_echo=$enableval
9974else
9975  with_echo=yes
9976fi;
9977if test "$with_echo" = yes; then
9978	ECHO_LINK=
9979else
9980	ECHO_LINK='@ echo linking $@ ... ;'
9981	test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9982	test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
9983fi
9984echo "$as_me:9980: result: $with_echo" >&5
9985echo "${ECHO_T}$with_echo" >&6
9986
9987###	use option --enable-warnings to turn on all gcc warnings
9988echo "$as_me:9984: checking if you want to see compiler warnings" >&5
9989echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9990
9991# Check whether --enable-warnings or --disable-warnings was given.
9992if test "${enable_warnings+set}" = set; then
9993  enableval="$enable_warnings"
9994  with_warnings=$enableval
9995fi;
9996echo "$as_me:9992: result: $with_warnings" >&5
9997echo "${ECHO_T}$with_warnings" >&6
9998
9999if test "x$with_warnings" = "xyes"; then
10000 	ADAFLAGS="$ADAFLAGS -gnatg"
10001
10002INTEL_COMPILER=no
10003
10004if test "$GCC" = yes ; then
10005	case $host_os in
10006	linux*|gnu*)
10007		echo "$as_me:10003: checking if this is really Intel C compiler" >&5
10008echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10009		cf_save_CFLAGS="$CFLAGS"
10010		CFLAGS="$CFLAGS -no-gcc"
10011		cat >conftest.$ac_ext <<_ACEOF
10012#line 10008 "configure"
10013#include "confdefs.h"
10014
10015int
10016main ()
10017{
10018
10019#ifdef __INTEL_COMPILER
10020#else
10021make an error
10022#endif
10023
10024  ;
10025  return 0;
10026}
10027_ACEOF
10028rm -f conftest.$ac_objext
10029if { (eval echo "$as_me:10025: \"$ac_compile\"") >&5
10030  (eval $ac_compile) 2>&5
10031  ac_status=$?
10032  echo "$as_me:10028: \$? = $ac_status" >&5
10033  (exit $ac_status); } &&
10034         { ac_try='test -s conftest.$ac_objext'
10035  { (eval echo "$as_me:10031: \"$ac_try\"") >&5
10036  (eval $ac_try) 2>&5
10037  ac_status=$?
10038  echo "$as_me:10034: \$? = $ac_status" >&5
10039  (exit $ac_status); }; }; then
10040  INTEL_COMPILER=yes
10041cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10042
10043else
10044  echo "$as_me: failed program was:" >&5
10045cat conftest.$ac_ext >&5
10046fi
10047rm -f conftest.$ac_objext conftest.$ac_ext
10048		CFLAGS="$cf_save_CFLAGS"
10049		echo "$as_me:10045: result: $INTEL_COMPILER" >&5
10050echo "${ECHO_T}$INTEL_COMPILER" >&6
10051		;;
10052	esac
10053fi
10054
10055cat > conftest.$ac_ext <<EOF
10056#line 10052 "${as_me-configure}"
10057int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10058EOF
10059
10060if test "$INTEL_COMPILER" = yes
10061then
10062# The "-wdXXX" options suppress warnings:
10063# remark #1419: external declaration in primary source file
10064# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10065# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10066# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10067# remark #193: zero used for undefined preprocessing identifier
10068# remark #593: variable "curs_sb_left_arrow" was set but never used
10069# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10070# remark #869: parameter "tw" was never referenced
10071# remark #981: operands are evaluated in unspecified order
10072# warning #269: invalid format string conversion
10073
10074	{ echo "$as_me:10070: checking for $CC warning options..." >&5
10075echo "$as_me: checking for $CC warning options..." >&6;}
10076	cf_save_CFLAGS="$CFLAGS"
10077	EXTRA_CFLAGS="-Wall"
10078	for cf_opt in \
10079		wd1419 \
10080		wd1682 \
10081		wd1683 \
10082		wd1684 \
10083		wd193 \
10084		wd279 \
10085		wd593 \
10086		wd810 \
10087		wd869 \
10088		wd981
10089	do
10090		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10091		if { (eval echo "$as_me:10087: \"$ac_compile\"") >&5
10092  (eval $ac_compile) 2>&5
10093  ac_status=$?
10094  echo "$as_me:10090: \$? = $ac_status" >&5
10095  (exit $ac_status); }; then
10096			test -n "$verbose" && echo "$as_me:10092: result: ... -$cf_opt" >&5
10097echo "${ECHO_T}... -$cf_opt" >&6
10098			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10099		fi
10100	done
10101	CFLAGS="$cf_save_CFLAGS"
10102
10103elif test "$GCC" = yes
10104then
10105	{ echo "$as_me:10101: checking for $CC warning options..." >&5
10106echo "$as_me: checking for $CC warning options..." >&6;}
10107	cf_save_CFLAGS="$CFLAGS"
10108	EXTRA_CFLAGS="-W -Wall"
10109	cf_warn_CONST=""
10110	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10111	for cf_opt in \
10112		Wbad-function-cast \
10113		Wcast-align \
10114		Wcast-qual \
10115		Winline \
10116		Wmissing-declarations \
10117		Wmissing-prototypes \
10118		Wnested-externs \
10119		Wpointer-arith \
10120		Wshadow \
10121		Wstrict-prototypes \
10122		Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10123	do
10124		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10125		if { (eval echo "$as_me:10121: \"$ac_compile\"") >&5
10126  (eval $ac_compile) 2>&5
10127  ac_status=$?
10128  echo "$as_me:10124: \$? = $ac_status" >&5
10129  (exit $ac_status); }; then
10130			test -n "$verbose" && echo "$as_me:10126: result: ... -$cf_opt" >&5
10131echo "${ECHO_T}... -$cf_opt" >&6
10132			case $cf_opt in #(vi
10133			Wcast-qual) #(vi
10134				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10135				;;
10136			Winline) #(vi
10137				case $GCC_VERSION in
10138				[34].*)
10139					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
10140
10141echo "${as_me-configure}:10137: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10142
10143					continue;;
10144				esac
10145				;;
10146			esac
10147			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10148		fi
10149	done
10150	CFLAGS="$cf_save_CFLAGS"
10151fi
10152rm -f conftest*
10153
10154	if test "$cf_with_cxx" = yes ; then
10155
10156INTEL_CPLUSPLUS=no
10157
10158if test "$GCC" = yes ; then
10159	case $host_os in
10160	linux*|gnu*)
10161		echo "$as_me:10157: checking if this is really Intel C++ compiler" >&5
10162echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10163		cf_save_CFLAGS="$CXXFLAGS"
10164		CXXFLAGS="$CXXFLAGS -no-gcc"
10165		cat >conftest.$ac_ext <<_ACEOF
10166#line 10162 "configure"
10167#include "confdefs.h"
10168
10169int
10170main ()
10171{
10172
10173#ifdef __INTEL_COMPILER
10174#else
10175make an error
10176#endif
10177
10178  ;
10179  return 0;
10180}
10181_ACEOF
10182rm -f conftest.$ac_objext
10183if { (eval echo "$as_me:10179: \"$ac_compile\"") >&5
10184  (eval $ac_compile) 2>&5
10185  ac_status=$?
10186  echo "$as_me:10182: \$? = $ac_status" >&5
10187  (exit $ac_status); } &&
10188         { ac_try='test -s conftest.$ac_objext'
10189  { (eval echo "$as_me:10185: \"$ac_try\"") >&5
10190  (eval $ac_try) 2>&5
10191  ac_status=$?
10192  echo "$as_me:10188: \$? = $ac_status" >&5
10193  (exit $ac_status); }; }; then
10194  INTEL_CPLUSPLUS=yes
10195cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10196
10197else
10198  echo "$as_me: failed program was:" >&5
10199cat conftest.$ac_ext >&5
10200fi
10201rm -f conftest.$ac_objext conftest.$ac_ext
10202		CXXFLAGS="$cf_save_CFLAGS"
10203		echo "$as_me:10199: result: $INTEL_CPLUSPLUS" >&5
10204echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
10205		;;
10206	esac
10207fi
10208
10209ac_ext=cc
10210ac_cpp='$CXXCPP $CPPFLAGS'
10211ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10212ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10213ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10214ac_main_return=return
10215
10216cat > conftest.$ac_ext <<EOF
10217#line 10213 "configure"
10218int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10219EOF
10220
10221if test "$INTEL_CPLUSPLUS" = yes
10222then
10223# The "-wdXXX" options suppress warnings:
10224# remark #1419: external declaration in primary source file
10225# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10226# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10227# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10228# remark #193: zero used for undefined preprocessing identifier
10229# remark #593: variable "curs_sb_left_arrow" was set but never used
10230# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10231# remark #869: parameter "tw" was never referenced
10232# remark #981: operands are evaluated in unspecified order
10233# warning #269: invalid format string conversion
10234
10235	{ echo "$as_me:10231: checking for $CC warning options..." >&5
10236echo "$as_me: checking for $CC warning options..." >&6;}
10237	cf_save_CXXFLAGS="$CXXFLAGS"
10238	EXTRA_CXXFLAGS="-Wall"
10239	for cf_opt in \
10240		wd1419 \
10241		wd1682 \
10242		wd1683 \
10243		wd1684 \
10244		wd193 \
10245		wd279 \
10246		wd593 \
10247		wd810 \
10248		wd869 \
10249		wd981
10250	do
10251		CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
10252		if { (eval echo "$as_me:10248: \"$ac_compile\"") >&5
10253  (eval $ac_compile) 2>&5
10254  ac_status=$?
10255  echo "$as_me:10251: \$? = $ac_status" >&5
10256  (exit $ac_status); }; then
10257			test -n "$verbose" && echo "$as_me:10253: result: ... -$cf_opt" >&5
10258echo "${ECHO_T}... -$cf_opt" >&6
10259			EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10260		fi
10261	done
10262	CXXFLAGS="$cf_save_CXXFLAGS"
10263
10264elif test "$GXX" = yes
10265then
10266	{ echo "$as_me:10262: checking for $CXX warning options..." >&5
10267echo "$as_me: checking for $CXX warning options..." >&6;}
10268	cf_save_CXXFLAGS="$CXXFLAGS"
10269	EXTRA_CXXFLAGS="-W -Wall"
10270	cf_gxx_extra_warnings=""
10271	test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
10272	case "$GCC_VERSION" in
10273	[1-2].*)
10274		;;
10275	*)
10276		cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
10277		;;
10278	esac
10279	for cf_opt in \
10280		Wabi \
10281		fabi-version=0 \
10282		Woverloaded-virtual \
10283		Wsign-promo \
10284		Wsynth \
10285		Wold-style-cast \
10286		Wcast-align \
10287		Wcast-qual \
10288		Wmissing-prototypes \
10289		Wpointer-arith \
10290		Wshadow \
10291		Wstrict-prototypes \
10292		Wundef $cf_gxx_extra_warnings Wno-unused
10293	do
10294		CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
10295		if { (eval echo "$as_me:10291: \"$ac_compile\"") >&5
10296  (eval $ac_compile) 2>&5
10297  ac_status=$?
10298  echo "$as_me:10294: \$? = $ac_status" >&5
10299  (exit $ac_status); }; then
10300			test -n "$verbose" && echo "$as_me:10296: result: ... -$cf_opt" >&5
10301echo "${ECHO_T}... -$cf_opt" >&6
10302			EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10303		else
10304			test -n "$verbose" && echo "$as_me:10300: result: ... no -$cf_opt" >&5
10305echo "${ECHO_T}... no -$cf_opt" >&6
10306		fi
10307	done
10308	CXXFLAGS="$cf_save_CXXFLAGS"
10309fi
10310
10311rm -f conftest*
10312ac_ext=c
10313ac_cpp='$CPP $CPPFLAGS'
10314ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10315ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10316ac_compiler_gnu=$ac_cv_c_compiler_gnu
10317ac_main_return=return
10318
10319	fi
10320fi
10321
10322if test "$GCC" = yes
10323then
10324cat > conftest.i <<EOF
10325#ifndef GCC_PRINTF
10326#define GCC_PRINTF 0
10327#endif
10328#ifndef GCC_SCANF
10329#define GCC_SCANF 0
10330#endif
10331#ifndef GCC_NORETURN
10332#define GCC_NORETURN /* nothing */
10333#endif
10334#ifndef GCC_UNUSED
10335#define GCC_UNUSED /* nothing */
10336#endif
10337EOF
10338if test "$GCC" = yes
10339then
10340	{ echo "$as_me:10336: checking for $CC __attribute__ directives..." >&5
10341echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10342cat > conftest.$ac_ext <<EOF
10343#line 10339 "${as_me-configure}"
10344#include "confdefs.h"
10345#include "conftest.h"
10346#include "conftest.i"
10347#if	GCC_PRINTF
10348#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10349#else
10350#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10351#endif
10352#if	GCC_SCANF
10353#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10354#else
10355#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10356#endif
10357extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10358extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10359extern void foo(void) GCC_NORETURN;
10360int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10361EOF
10362	for cf_attribute in scanf printf unused noreturn
10363	do
10364
10365cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10366
10367		cf_directive="__attribute__(($cf_attribute))"
10368		echo "checking for $CC $cf_directive" 1>&5
10369		case $cf_attribute in
10370		scanf|printf)
10371		cat >conftest.h <<EOF
10372#define GCC_$cf_ATTRIBUTE 1
10373EOF
10374			;;
10375		*)
10376		cat >conftest.h <<EOF
10377#define GCC_$cf_ATTRIBUTE $cf_directive
10378EOF
10379			;;
10380		esac
10381		if { (eval echo "$as_me:10377: \"$ac_compile\"") >&5
10382  (eval $ac_compile) 2>&5
10383  ac_status=$?
10384  echo "$as_me:10380: \$? = $ac_status" >&5
10385  (exit $ac_status); }; then
10386			test -n "$verbose" && echo "$as_me:10382: result: ... $cf_attribute" >&5
10387echo "${ECHO_T}... $cf_attribute" >&6
10388			cat conftest.h >>confdefs.h
10389		fi
10390	done
10391else
10392	fgrep define conftest.i >>confdefs.h
10393fi
10394rm -rf conftest*
10395fi
10396
10397###	use option --enable-assertions to turn on generation of assertion code
10398echo "$as_me:10394: checking if you want to enable runtime assertions" >&5
10399echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10400
10401# Check whether --enable-assertions or --disable-assertions was given.
10402if test "${enable_assertions+set}" = set; then
10403  enableval="$enable_assertions"
10404  with_assertions=$enableval
10405else
10406  with_assertions=no
10407fi;
10408echo "$as_me:10404: result: $with_assertions" >&5
10409echo "${ECHO_T}$with_assertions" >&6
10410if test -n "$GCC"
10411then
10412	if test "$with_assertions" = no
10413	then
10414		cat >>confdefs.h <<\EOF
10415#define NDEBUG 1
10416EOF
10417
10418		CPPFLAGS="$CPPFLAGS -DNDEBUG"
10419	else
10420		ADAFLAGS="$ADAFLAGS -gnata"
10421	fi
10422fi
10423
10424###	use option --disable-leaks to suppress "permanent" leaks, for testing
10425
10426echo "$as_me:10422: checking if you want to use dmalloc for testing" >&5
10427echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
10428
10429# Check whether --with-dmalloc or --without-dmalloc was given.
10430if test "${with_dmalloc+set}" = set; then
10431  withval="$with_dmalloc"
10432  cat >>confdefs.h <<\EOF
10433#define USE_DMALLOC 1
10434EOF
10435
10436	: ${with_cflags:=-g}
10437	: ${with_no_leaks:=yes}
10438	 with_dmalloc=yes
10439else
10440  with_dmalloc=
10441fi;
10442echo "$as_me:10438: result: ${with_dmalloc:-no}" >&5
10443echo "${ECHO_T}${with_dmalloc:-no}" >&6
10444
10445case .$with_cflags in #(vi
10446.*-g*)
10447	case .$CFLAGS in #(vi
10448	.*-g*) #(vi
10449		;;
10450	*)
10451
10452cf_fix_cppflags=no
10453cf_new_cflags=
10454cf_new_cppflags=
10455cf_new_extra_cppflags=
10456
10457for cf_add_cflags in -g
10458do
10459case $cf_fix_cppflags in
10460no)
10461	case $cf_add_cflags in #(vi
10462	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10463		case $cf_add_cflags in
10464		-D*)
10465			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10466
10467			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10468			&& test -z "${cf_tst_cflags}" \
10469			&& cf_fix_cppflags=yes
10470
10471			if test $cf_fix_cppflags = yes ; then
10472				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10473				continue
10474			elif test "${cf_tst_cflags}" = "\"'" ; then
10475				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10476				continue
10477			fi
10478			;;
10479		esac
10480		case "$CPPFLAGS" in
10481		*$cf_add_cflags) #(vi
10482			;;
10483		*) #(vi
10484			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10485			;;
10486		esac
10487		;;
10488	*)
10489		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10490		;;
10491	esac
10492	;;
10493yes)
10494	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10495
10496	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10497
10498	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10499	&& test -z "${cf_tst_cflags}" \
10500	&& cf_fix_cppflags=no
10501	;;
10502esac
10503done
10504
10505if test -n "$cf_new_cflags" ; then
10506
10507	CFLAGS="$CFLAGS $cf_new_cflags"
10508fi
10509
10510if test -n "$cf_new_cppflags" ; then
10511
10512	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10513fi
10514
10515if test -n "$cf_new_extra_cppflags" ; then
10516
10517	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10518fi
10519
10520		;;
10521	esac
10522	;;
10523esac
10524
10525if test "$with_dmalloc" = yes ; then
10526	echo "$as_me:10522: checking for dmalloc.h" >&5
10527echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
10528if test "${ac_cv_header_dmalloc_h+set}" = set; then
10529  echo $ECHO_N "(cached) $ECHO_C" >&6
10530else
10531  cat >conftest.$ac_ext <<_ACEOF
10532#line 10528 "configure"
10533#include "confdefs.h"
10534#include <dmalloc.h>
10535_ACEOF
10536if { (eval echo "$as_me:10532: \"$ac_cpp conftest.$ac_ext\"") >&5
10537  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10538  ac_status=$?
10539  egrep -v '^ *\+' conftest.er1 >conftest.err
10540  rm -f conftest.er1
10541  cat conftest.err >&5
10542  echo "$as_me:10538: \$? = $ac_status" >&5
10543  (exit $ac_status); } >/dev/null; then
10544  if test -s conftest.err; then
10545    ac_cpp_err=$ac_c_preproc_warn_flag
10546  else
10547    ac_cpp_err=
10548  fi
10549else
10550  ac_cpp_err=yes
10551fi
10552if test -z "$ac_cpp_err"; then
10553  ac_cv_header_dmalloc_h=yes
10554else
10555  echo "$as_me: failed program was:" >&5
10556  cat conftest.$ac_ext >&5
10557  ac_cv_header_dmalloc_h=no
10558fi
10559rm -f conftest.err conftest.$ac_ext
10560fi
10561echo "$as_me:10557: result: $ac_cv_header_dmalloc_h" >&5
10562echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10563if test $ac_cv_header_dmalloc_h = yes; then
10564
10565echo "$as_me:10561: checking for dmalloc_debug in -ldmalloc" >&5
10566echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10567if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10568  echo $ECHO_N "(cached) $ECHO_C" >&6
10569else
10570  ac_check_lib_save_LIBS=$LIBS
10571LIBS="-ldmalloc  $LIBS"
10572cat >conftest.$ac_ext <<_ACEOF
10573#line 10569 "configure"
10574#include "confdefs.h"
10575
10576/* Override any gcc2 internal prototype to avoid an error.  */
10577#ifdef __cplusplus
10578extern "C"
10579#endif
10580/* We use char because int might match the return type of a gcc2
10581   builtin and then its argument prototype would still apply.  */
10582char dmalloc_debug ();
10583int
10584main ()
10585{
10586dmalloc_debug ();
10587  ;
10588  return 0;
10589}
10590_ACEOF
10591rm -f conftest.$ac_objext conftest$ac_exeext
10592if { (eval echo "$as_me:10588: \"$ac_link\"") >&5
10593  (eval $ac_link) 2>&5
10594  ac_status=$?
10595  echo "$as_me:10591: \$? = $ac_status" >&5
10596  (exit $ac_status); } &&
10597         { ac_try='test -s conftest$ac_exeext'
10598  { (eval echo "$as_me:10594: \"$ac_try\"") >&5
10599  (eval $ac_try) 2>&5
10600  ac_status=$?
10601  echo "$as_me:10597: \$? = $ac_status" >&5
10602  (exit $ac_status); }; }; then
10603  ac_cv_lib_dmalloc_dmalloc_debug=yes
10604else
10605  echo "$as_me: failed program was:" >&5
10606cat conftest.$ac_ext >&5
10607ac_cv_lib_dmalloc_dmalloc_debug=no
10608fi
10609rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10610LIBS=$ac_check_lib_save_LIBS
10611fi
10612echo "$as_me:10608: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
10613echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
10614if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
10615  cat >>confdefs.h <<EOF
10616#define HAVE_LIBDMALLOC 1
10617EOF
10618
10619  LIBS="-ldmalloc $LIBS"
10620
10621fi
10622
10623fi
10624
10625fi
10626
10627echo "$as_me:10623: checking if you want to use dbmalloc for testing" >&5
10628echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
10629
10630# Check whether --with-dbmalloc or --without-dbmalloc was given.
10631if test "${with_dbmalloc+set}" = set; then
10632  withval="$with_dbmalloc"
10633  cat >>confdefs.h <<\EOF
10634#define USE_DBMALLOC 1
10635EOF
10636
10637	: ${with_cflags:=-g}
10638	: ${with_no_leaks:=yes}
10639	 with_dbmalloc=yes
10640else
10641  with_dbmalloc=
10642fi;
10643echo "$as_me:10639: result: ${with_dbmalloc:-no}" >&5
10644echo "${ECHO_T}${with_dbmalloc:-no}" >&6
10645
10646case .$with_cflags in #(vi
10647.*-g*)
10648	case .$CFLAGS in #(vi
10649	.*-g*) #(vi
10650		;;
10651	*)
10652
10653cf_fix_cppflags=no
10654cf_new_cflags=
10655cf_new_cppflags=
10656cf_new_extra_cppflags=
10657
10658for cf_add_cflags in -g
10659do
10660case $cf_fix_cppflags in
10661no)
10662	case $cf_add_cflags in #(vi
10663	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10664		case $cf_add_cflags in
10665		-D*)
10666			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10667
10668			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10669			&& test -z "${cf_tst_cflags}" \
10670			&& cf_fix_cppflags=yes
10671
10672			if test $cf_fix_cppflags = yes ; then
10673				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10674				continue
10675			elif test "${cf_tst_cflags}" = "\"'" ; then
10676				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10677				continue
10678			fi
10679			;;
10680		esac
10681		case "$CPPFLAGS" in
10682		*$cf_add_cflags) #(vi
10683			;;
10684		*) #(vi
10685			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10686			;;
10687		esac
10688		;;
10689	*)
10690		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10691		;;
10692	esac
10693	;;
10694yes)
10695	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10696
10697	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10698
10699	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10700	&& test -z "${cf_tst_cflags}" \
10701	&& cf_fix_cppflags=no
10702	;;
10703esac
10704done
10705
10706if test -n "$cf_new_cflags" ; then
10707
10708	CFLAGS="$CFLAGS $cf_new_cflags"
10709fi
10710
10711if test -n "$cf_new_cppflags" ; then
10712
10713	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10714fi
10715
10716if test -n "$cf_new_extra_cppflags" ; then
10717
10718	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10719fi
10720
10721		;;
10722	esac
10723	;;
10724esac
10725
10726if test "$with_dbmalloc" = yes ; then
10727	echo "$as_me:10723: checking for dbmalloc.h" >&5
10728echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10729if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10730  echo $ECHO_N "(cached) $ECHO_C" >&6
10731else
10732  cat >conftest.$ac_ext <<_ACEOF
10733#line 10729 "configure"
10734#include "confdefs.h"
10735#include <dbmalloc.h>
10736_ACEOF
10737if { (eval echo "$as_me:10733: \"$ac_cpp conftest.$ac_ext\"") >&5
10738  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10739  ac_status=$?
10740  egrep -v '^ *\+' conftest.er1 >conftest.err
10741  rm -f conftest.er1
10742  cat conftest.err >&5
10743  echo "$as_me:10739: \$? = $ac_status" >&5
10744  (exit $ac_status); } >/dev/null; then
10745  if test -s conftest.err; then
10746    ac_cpp_err=$ac_c_preproc_warn_flag
10747  else
10748    ac_cpp_err=
10749  fi
10750else
10751  ac_cpp_err=yes
10752fi
10753if test -z "$ac_cpp_err"; then
10754  ac_cv_header_dbmalloc_h=yes
10755else
10756  echo "$as_me: failed program was:" >&5
10757  cat conftest.$ac_ext >&5
10758  ac_cv_header_dbmalloc_h=no
10759fi
10760rm -f conftest.err conftest.$ac_ext
10761fi
10762echo "$as_me:10758: result: $ac_cv_header_dbmalloc_h" >&5
10763echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10764if test $ac_cv_header_dbmalloc_h = yes; then
10765
10766echo "$as_me:10762: checking for debug_malloc in -ldbmalloc" >&5
10767echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10768if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10769  echo $ECHO_N "(cached) $ECHO_C" >&6
10770else
10771  ac_check_lib_save_LIBS=$LIBS
10772LIBS="-ldbmalloc  $LIBS"
10773cat >conftest.$ac_ext <<_ACEOF
10774#line 10770 "configure"
10775#include "confdefs.h"
10776
10777/* Override any gcc2 internal prototype to avoid an error.  */
10778#ifdef __cplusplus
10779extern "C"
10780#endif
10781/* We use char because int might match the return type of a gcc2
10782   builtin and then its argument prototype would still apply.  */
10783char debug_malloc ();
10784int
10785main ()
10786{
10787debug_malloc ();
10788  ;
10789  return 0;
10790}
10791_ACEOF
10792rm -f conftest.$ac_objext conftest$ac_exeext
10793if { (eval echo "$as_me:10789: \"$ac_link\"") >&5
10794  (eval $ac_link) 2>&5
10795  ac_status=$?
10796  echo "$as_me:10792: \$? = $ac_status" >&5
10797  (exit $ac_status); } &&
10798         { ac_try='test -s conftest$ac_exeext'
10799  { (eval echo "$as_me:10795: \"$ac_try\"") >&5
10800  (eval $ac_try) 2>&5
10801  ac_status=$?
10802  echo "$as_me:10798: \$? = $ac_status" >&5
10803  (exit $ac_status); }; }; then
10804  ac_cv_lib_dbmalloc_debug_malloc=yes
10805else
10806  echo "$as_me: failed program was:" >&5
10807cat conftest.$ac_ext >&5
10808ac_cv_lib_dbmalloc_debug_malloc=no
10809fi
10810rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10811LIBS=$ac_check_lib_save_LIBS
10812fi
10813echo "$as_me:10809: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10814echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10815if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10816  cat >>confdefs.h <<EOF
10817#define HAVE_LIBDBMALLOC 1
10818EOF
10819
10820  LIBS="-ldbmalloc $LIBS"
10821
10822fi
10823
10824fi
10825
10826fi
10827
10828echo "$as_me:10824: checking if you want to use valgrind for testing" >&5
10829echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10830
10831# Check whether --with-valgrind or --without-valgrind was given.
10832if test "${with_valgrind+set}" = set; then
10833  withval="$with_valgrind"
10834  cat >>confdefs.h <<\EOF
10835#define USE_VALGRIND 1
10836EOF
10837
10838	: ${with_cflags:=-g}
10839	: ${with_no_leaks:=yes}
10840	 with_valgrind=yes
10841else
10842  with_valgrind=
10843fi;
10844echo "$as_me:10840: result: ${with_valgrind:-no}" >&5
10845echo "${ECHO_T}${with_valgrind:-no}" >&6
10846
10847case .$with_cflags in #(vi
10848.*-g*)
10849	case .$CFLAGS in #(vi
10850	.*-g*) #(vi
10851		;;
10852	*)
10853
10854cf_fix_cppflags=no
10855cf_new_cflags=
10856cf_new_cppflags=
10857cf_new_extra_cppflags=
10858
10859for cf_add_cflags in -g
10860do
10861case $cf_fix_cppflags in
10862no)
10863	case $cf_add_cflags in #(vi
10864	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10865		case $cf_add_cflags in
10866		-D*)
10867			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10868
10869			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10870			&& test -z "${cf_tst_cflags}" \
10871			&& cf_fix_cppflags=yes
10872
10873			if test $cf_fix_cppflags = yes ; then
10874				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10875				continue
10876			elif test "${cf_tst_cflags}" = "\"'" ; then
10877				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10878				continue
10879			fi
10880			;;
10881		esac
10882		case "$CPPFLAGS" in
10883		*$cf_add_cflags) #(vi
10884			;;
10885		*) #(vi
10886			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10887			;;
10888		esac
10889		;;
10890	*)
10891		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10892		;;
10893	esac
10894	;;
10895yes)
10896	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10897
10898	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10899
10900	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10901	&& test -z "${cf_tst_cflags}" \
10902	&& cf_fix_cppflags=no
10903	;;
10904esac
10905done
10906
10907if test -n "$cf_new_cflags" ; then
10908
10909	CFLAGS="$CFLAGS $cf_new_cflags"
10910fi
10911
10912if test -n "$cf_new_cppflags" ; then
10913
10914	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10915fi
10916
10917if test -n "$cf_new_extra_cppflags" ; then
10918
10919	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10920fi
10921
10922		;;
10923	esac
10924	;;
10925esac
10926
10927echo "$as_me:10923: checking if you want to perform memory-leak testing" >&5
10928echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10929
10930# Check whether --enable-leaks or --disable-leaks was given.
10931if test "${enable_leaks+set}" = set; then
10932  enableval="$enable_leaks"
10933  with_no_leaks=yes
10934else
10935  : ${with_no_leaks:=no}
10936fi;
10937echo "$as_me:10933: result: $with_no_leaks" >&5
10938echo "${ECHO_T}$with_no_leaks" >&6
10939
10940if test "$with_no_leaks" = yes ; then
10941	cat >>confdefs.h <<\EOF
10942#define NO_LEAKS 1
10943EOF
10944
10945fi
10946
10947cat >>confdefs.h <<\EOF
10948#define HAVE_NC_ALLOC_H 1
10949EOF
10950
10951###	use option --enable-expanded to generate certain macros as functions
10952
10953# Check whether --enable-expanded or --disable-expanded was given.
10954if test "${enable_expanded+set}" = set; then
10955  enableval="$enable_expanded"
10956  test "$enableval" = yes && cat >>confdefs.h <<\EOF
10957#define NCURSES_EXPANDED 1
10958EOF
10959
10960fi;
10961
10962###	use option --disable-macros to suppress macros in favor of functions
10963
10964# Check whether --enable-macros or --disable-macros was given.
10965if test "${enable_macros+set}" = set; then
10966  enableval="$enable_macros"
10967  test "$enableval" = no && cat >>confdefs.h <<\EOF
10968#define NCURSES_NOMACROS 1
10969EOF
10970
10971fi;
10972
10973# Normally we only add trace() to the debug-library.  Allow this to be
10974# extended to all models of the ncurses library:
10975cf_all_traces=no
10976case "$CFLAGS $CPPFLAGS" in
10977*-DTRACE*)
10978	cf_all_traces=yes
10979	;;
10980esac
10981
10982echo "$as_me:10978: checking whether to add trace feature to all models" >&5
10983echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10984
10985# Check whether --with-trace or --without-trace was given.
10986if test "${with_trace+set}" = set; then
10987  withval="$with_trace"
10988  cf_with_trace=$withval
10989else
10990  cf_with_trace=$cf_all_traces
10991fi;
10992echo "$as_me:10988: result: $cf_with_trace" >&5
10993echo "${ECHO_T}$cf_with_trace" >&6
10994
10995if test "$cf_with_trace" = yes ; then
10996	LIB_TRACING=all
10997	ADA_TRACE=TRUE
10998
10999cf_fix_cppflags=no
11000cf_new_cflags=
11001cf_new_cppflags=
11002cf_new_extra_cppflags=
11003
11004for cf_add_cflags in -DTRACE
11005do
11006case $cf_fix_cppflags in
11007no)
11008	case $cf_add_cflags in #(vi
11009	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11010		case $cf_add_cflags in
11011		-D*)
11012			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11013
11014			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11015			&& test -z "${cf_tst_cflags}" \
11016			&& cf_fix_cppflags=yes
11017
11018			if test $cf_fix_cppflags = yes ; then
11019				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11020				continue
11021			elif test "${cf_tst_cflags}" = "\"'" ; then
11022				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11023				continue
11024			fi
11025			;;
11026		esac
11027		case "$CPPFLAGS" in
11028		*$cf_add_cflags) #(vi
11029			;;
11030		*) #(vi
11031			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11032			;;
11033		esac
11034		;;
11035	*)
11036		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11037		;;
11038	esac
11039	;;
11040yes)
11041	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11042
11043	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11044
11045	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11046	&& test -z "${cf_tst_cflags}" \
11047	&& cf_fix_cppflags=no
11048	;;
11049esac
11050done
11051
11052if test -n "$cf_new_cflags" ; then
11053
11054	CFLAGS="$CFLAGS $cf_new_cflags"
11055fi
11056
11057if test -n "$cf_new_cppflags" ; then
11058
11059	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11060fi
11061
11062if test -n "$cf_new_extra_cppflags" ; then
11063
11064	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11065fi
11066
11067else
11068	LIB_TRACING=DEBUG
11069	ADA_TRACE=FALSE
11070fi
11071
11072###	Checks for libraries.
11073echo "$as_me:11069: checking for gettimeofday" >&5
11074echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11075if test "${ac_cv_func_gettimeofday+set}" = set; then
11076  echo $ECHO_N "(cached) $ECHO_C" >&6
11077else
11078  cat >conftest.$ac_ext <<_ACEOF
11079#line 11075 "configure"
11080#include "confdefs.h"
11081/* System header to define __stub macros and hopefully few prototypes,
11082    which can conflict with char gettimeofday (); below.  */
11083#include <assert.h>
11084/* Override any gcc2 internal prototype to avoid an error.  */
11085#ifdef __cplusplus
11086extern "C"
11087#endif
11088/* We use char because int might match the return type of a gcc2
11089   builtin and then its argument prototype would still apply.  */
11090char gettimeofday ();
11091char (*f) ();
11092
11093int
11094main ()
11095{
11096/* The GNU C library defines this for functions which it implements
11097    to always fail with ENOSYS.  Some functions are actually named
11098    something starting with __ and the normal name is an alias.  */
11099#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11100choke me
11101#else
11102f = gettimeofday;
11103#endif
11104
11105  ;
11106  return 0;
11107}
11108_ACEOF
11109rm -f conftest.$ac_objext conftest$ac_exeext
11110if { (eval echo "$as_me:11106: \"$ac_link\"") >&5
11111  (eval $ac_link) 2>&5
11112  ac_status=$?
11113  echo "$as_me:11109: \$? = $ac_status" >&5
11114  (exit $ac_status); } &&
11115         { ac_try='test -s conftest$ac_exeext'
11116  { (eval echo "$as_me:11112: \"$ac_try\"") >&5
11117  (eval $ac_try) 2>&5
11118  ac_status=$?
11119  echo "$as_me:11115: \$? = $ac_status" >&5
11120  (exit $ac_status); }; }; then
11121  ac_cv_func_gettimeofday=yes
11122else
11123  echo "$as_me: failed program was:" >&5
11124cat conftest.$ac_ext >&5
11125ac_cv_func_gettimeofday=no
11126fi
11127rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11128fi
11129echo "$as_me:11125: result: $ac_cv_func_gettimeofday" >&5
11130echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
11131if test $ac_cv_func_gettimeofday = yes; then
11132  cat >>confdefs.h <<\EOF
11133#define HAVE_GETTIMEOFDAY 1
11134EOF
11135
11136else
11137
11138echo "$as_me:11134: checking for gettimeofday in -lbsd" >&5
11139echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
11140if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
11141  echo $ECHO_N "(cached) $ECHO_C" >&6
11142else
11143  ac_check_lib_save_LIBS=$LIBS
11144LIBS="-lbsd  $LIBS"
11145cat >conftest.$ac_ext <<_ACEOF
11146#line 11142 "configure"
11147#include "confdefs.h"
11148
11149/* Override any gcc2 internal prototype to avoid an error.  */
11150#ifdef __cplusplus
11151extern "C"
11152#endif
11153/* We use char because int might match the return type of a gcc2
11154   builtin and then its argument prototype would still apply.  */
11155char gettimeofday ();
11156int
11157main ()
11158{
11159gettimeofday ();
11160  ;
11161  return 0;
11162}
11163_ACEOF
11164rm -f conftest.$ac_objext conftest$ac_exeext
11165if { (eval echo "$as_me:11161: \"$ac_link\"") >&5
11166  (eval $ac_link) 2>&5
11167  ac_status=$?
11168  echo "$as_me:11164: \$? = $ac_status" >&5
11169  (exit $ac_status); } &&
11170         { ac_try='test -s conftest$ac_exeext'
11171  { (eval echo "$as_me:11167: \"$ac_try\"") >&5
11172  (eval $ac_try) 2>&5
11173  ac_status=$?
11174  echo "$as_me:11170: \$? = $ac_status" >&5
11175  (exit $ac_status); }; }; then
11176  ac_cv_lib_bsd_gettimeofday=yes
11177else
11178  echo "$as_me: failed program was:" >&5
11179cat conftest.$ac_ext >&5
11180ac_cv_lib_bsd_gettimeofday=no
11181fi
11182rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11183LIBS=$ac_check_lib_save_LIBS
11184fi
11185echo "$as_me:11181: result: $ac_cv_lib_bsd_gettimeofday" >&5
11186echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
11187if test $ac_cv_lib_bsd_gettimeofday = yes; then
11188  cat >>confdefs.h <<\EOF
11189#define HAVE_GETTIMEOFDAY 1
11190EOF
11191
11192	LIBS="$LIBS -lbsd"
11193fi
11194
11195fi
11196
11197echo "$as_me:11193: checking if -lm needed for math functions" >&5
11198echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
11199if test "${cf_cv_need_libm+set}" = set; then
11200  echo $ECHO_N "(cached) $ECHO_C" >&6
11201else
11202
11203	cat >conftest.$ac_ext <<_ACEOF
11204#line 11200 "configure"
11205#include "confdefs.h"
11206
11207	#include <stdio.h>
11208	#include <math.h>
11209
11210int
11211main ()
11212{
11213double x = rand(); printf("result = %g\n", sin(x))
11214  ;
11215  return 0;
11216}
11217_ACEOF
11218rm -f conftest.$ac_objext conftest$ac_exeext
11219if { (eval echo "$as_me:11215: \"$ac_link\"") >&5
11220  (eval $ac_link) 2>&5
11221  ac_status=$?
11222  echo "$as_me:11218: \$? = $ac_status" >&5
11223  (exit $ac_status); } &&
11224         { ac_try='test -s conftest$ac_exeext'
11225  { (eval echo "$as_me:11221: \"$ac_try\"") >&5
11226  (eval $ac_try) 2>&5
11227  ac_status=$?
11228  echo "$as_me:11224: \$? = $ac_status" >&5
11229  (exit $ac_status); }; }; then
11230  cf_cv_need_libm=no
11231else
11232  echo "$as_me: failed program was:" >&5
11233cat conftest.$ac_ext >&5
11234cf_cv_need_libm=yes
11235fi
11236rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11237fi
11238echo "$as_me:11234: result: $cf_cv_need_libm" >&5
11239echo "${ECHO_T}$cf_cv_need_libm" >&6
11240if test "$cf_cv_need_libm" = yes
11241then
11242MATH_LIB=-lm
11243fi
11244
11245###	Checks for header files.
11246echo "$as_me:11242: checking for ANSI C header files" >&5
11247echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11248if test "${ac_cv_header_stdc+set}" = set; then
11249  echo $ECHO_N "(cached) $ECHO_C" >&6
11250else
11251  cat >conftest.$ac_ext <<_ACEOF
11252#line 11248 "configure"
11253#include "confdefs.h"
11254#include <stdlib.h>
11255#include <stdarg.h>
11256#include <string.h>
11257#include <float.h>
11258
11259_ACEOF
11260if { (eval echo "$as_me:11256: \"$ac_cpp conftest.$ac_ext\"") >&5
11261  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11262  ac_status=$?
11263  egrep -v '^ *\+' conftest.er1 >conftest.err
11264  rm -f conftest.er1
11265  cat conftest.err >&5
11266  echo "$as_me:11262: \$? = $ac_status" >&5
11267  (exit $ac_status); } >/dev/null; then
11268  if test -s conftest.err; then
11269    ac_cpp_err=$ac_c_preproc_warn_flag
11270  else
11271    ac_cpp_err=
11272  fi
11273else
11274  ac_cpp_err=yes
11275fi
11276if test -z "$ac_cpp_err"; then
11277  ac_cv_header_stdc=yes
11278else
11279  echo "$as_me: failed program was:" >&5
11280  cat conftest.$ac_ext >&5
11281  ac_cv_header_stdc=no
11282fi
11283rm -f conftest.err conftest.$ac_ext
11284
11285if test $ac_cv_header_stdc = yes; then
11286  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11287  cat >conftest.$ac_ext <<_ACEOF
11288#line 11284 "configure"
11289#include "confdefs.h"
11290#include <string.h>
11291
11292_ACEOF
11293if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11294  egrep "memchr" >/dev/null 2>&1; then
11295  :
11296else
11297  ac_cv_header_stdc=no
11298fi
11299rm -f conftest*
11300
11301fi
11302
11303if test $ac_cv_header_stdc = yes; then
11304  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11305  cat >conftest.$ac_ext <<_ACEOF
11306#line 11302 "configure"
11307#include "confdefs.h"
11308#include <stdlib.h>
11309
11310_ACEOF
11311if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11312  egrep "free" >/dev/null 2>&1; then
11313  :
11314else
11315  ac_cv_header_stdc=no
11316fi
11317rm -f conftest*
11318
11319fi
11320
11321if test $ac_cv_header_stdc = yes; then
11322  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11323  if test "$cross_compiling" = yes; then
11324  :
11325else
11326  cat >conftest.$ac_ext <<_ACEOF
11327#line 11323 "configure"
11328#include "confdefs.h"
11329#include <ctype.h>
11330#if ((' ' & 0x0FF) == 0x020)
11331# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11332# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11333#else
11334# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11335                     || ('j' <= (c) && (c) <= 'r') \
11336                     || ('s' <= (c) && (c) <= 'z'))
11337# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11338#endif
11339
11340#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11341int
11342main ()
11343{
11344  int i;
11345  for (i = 0; i < 256; i++)
11346    if (XOR (islower (i), ISLOWER (i))
11347        || toupper (i) != TOUPPER (i))
11348      $ac_main_return(2);
11349  $ac_main_return (0);
11350}
11351_ACEOF
11352rm -f conftest$ac_exeext
11353if { (eval echo "$as_me:11349: \"$ac_link\"") >&5
11354  (eval $ac_link) 2>&5
11355  ac_status=$?
11356  echo "$as_me:11352: \$? = $ac_status" >&5
11357  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11358  { (eval echo "$as_me:11354: \"$ac_try\"") >&5
11359  (eval $ac_try) 2>&5
11360  ac_status=$?
11361  echo "$as_me:11357: \$? = $ac_status" >&5
11362  (exit $ac_status); }; }; then
11363  :
11364else
11365  echo "$as_me: program exited with status $ac_status" >&5
11366echo "$as_me: failed program was:" >&5
11367cat conftest.$ac_ext >&5
11368ac_cv_header_stdc=no
11369fi
11370rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11371fi
11372fi
11373fi
11374echo "$as_me:11370: result: $ac_cv_header_stdc" >&5
11375echo "${ECHO_T}$ac_cv_header_stdc" >&6
11376if test $ac_cv_header_stdc = yes; then
11377
11378cat >>confdefs.h <<\EOF
11379#define STDC_HEADERS 1
11380EOF
11381
11382fi
11383
11384ac_header_dirent=no
11385for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11386  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11387echo "$as_me:11383: checking for $ac_hdr that defines DIR" >&5
11388echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11389if eval "test \"\${$as_ac_Header+set}\" = set"; then
11390  echo $ECHO_N "(cached) $ECHO_C" >&6
11391else
11392  cat >conftest.$ac_ext <<_ACEOF
11393#line 11389 "configure"
11394#include "confdefs.h"
11395#include <sys/types.h>
11396#include <$ac_hdr>
11397
11398int
11399main ()
11400{
11401if ((DIR *) 0)
11402return 0;
11403  ;
11404  return 0;
11405}
11406_ACEOF
11407rm -f conftest.$ac_objext
11408if { (eval echo "$as_me:11404: \"$ac_compile\"") >&5
11409  (eval $ac_compile) 2>&5
11410  ac_status=$?
11411  echo "$as_me:11407: \$? = $ac_status" >&5
11412  (exit $ac_status); } &&
11413         { ac_try='test -s conftest.$ac_objext'
11414  { (eval echo "$as_me:11410: \"$ac_try\"") >&5
11415  (eval $ac_try) 2>&5
11416  ac_status=$?
11417  echo "$as_me:11413: \$? = $ac_status" >&5
11418  (exit $ac_status); }; }; then
11419  eval "$as_ac_Header=yes"
11420else
11421  echo "$as_me: failed program was:" >&5
11422cat conftest.$ac_ext >&5
11423eval "$as_ac_Header=no"
11424fi
11425rm -f conftest.$ac_objext conftest.$ac_ext
11426fi
11427echo "$as_me:11423: result: `eval echo '${'$as_ac_Header'}'`" >&5
11428echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11429if test `eval echo '${'$as_ac_Header'}'` = yes; then
11430  cat >>confdefs.h <<EOF
11431#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11432EOF
11433
11434ac_header_dirent=$ac_hdr; break
11435fi
11436
11437done
11438# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11439if test $ac_header_dirent = dirent.h; then
11440  echo "$as_me:11436: checking for opendir in -ldir" >&5
11441echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
11442if test "${ac_cv_lib_dir_opendir+set}" = set; then
11443  echo $ECHO_N "(cached) $ECHO_C" >&6
11444else
11445  ac_check_lib_save_LIBS=$LIBS
11446LIBS="-ldir  $LIBS"
11447cat >conftest.$ac_ext <<_ACEOF
11448#line 11444 "configure"
11449#include "confdefs.h"
11450
11451/* Override any gcc2 internal prototype to avoid an error.  */
11452#ifdef __cplusplus
11453extern "C"
11454#endif
11455/* We use char because int might match the return type of a gcc2
11456   builtin and then its argument prototype would still apply.  */
11457char opendir ();
11458int
11459main ()
11460{
11461opendir ();
11462  ;
11463  return 0;
11464}
11465_ACEOF
11466rm -f conftest.$ac_objext conftest$ac_exeext
11467if { (eval echo "$as_me:11463: \"$ac_link\"") >&5
11468  (eval $ac_link) 2>&5
11469  ac_status=$?
11470  echo "$as_me:11466: \$? = $ac_status" >&5
11471  (exit $ac_status); } &&
11472         { ac_try='test -s conftest$ac_exeext'
11473  { (eval echo "$as_me:11469: \"$ac_try\"") >&5
11474  (eval $ac_try) 2>&5
11475  ac_status=$?
11476  echo "$as_me:11472: \$? = $ac_status" >&5
11477  (exit $ac_status); }; }; then
11478  ac_cv_lib_dir_opendir=yes
11479else
11480  echo "$as_me: failed program was:" >&5
11481cat conftest.$ac_ext >&5
11482ac_cv_lib_dir_opendir=no
11483fi
11484rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11485LIBS=$ac_check_lib_save_LIBS
11486fi
11487echo "$as_me:11483: result: $ac_cv_lib_dir_opendir" >&5
11488echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
11489if test $ac_cv_lib_dir_opendir = yes; then
11490  LIBS="$LIBS -ldir"
11491fi
11492
11493else
11494  echo "$as_me:11490: checking for opendir in -lx" >&5
11495echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11496if test "${ac_cv_lib_x_opendir+set}" = set; then
11497  echo $ECHO_N "(cached) $ECHO_C" >&6
11498else
11499  ac_check_lib_save_LIBS=$LIBS
11500LIBS="-lx  $LIBS"
11501cat >conftest.$ac_ext <<_ACEOF
11502#line 11498 "configure"
11503#include "confdefs.h"
11504
11505/* Override any gcc2 internal prototype to avoid an error.  */
11506#ifdef __cplusplus
11507extern "C"
11508#endif
11509/* We use char because int might match the return type of a gcc2
11510   builtin and then its argument prototype would still apply.  */
11511char opendir ();
11512int
11513main ()
11514{
11515opendir ();
11516  ;
11517  return 0;
11518}
11519_ACEOF
11520rm -f conftest.$ac_objext conftest$ac_exeext
11521if { (eval echo "$as_me:11517: \"$ac_link\"") >&5
11522  (eval $ac_link) 2>&5
11523  ac_status=$?
11524  echo "$as_me:11520: \$? = $ac_status" >&5
11525  (exit $ac_status); } &&
11526         { ac_try='test -s conftest$ac_exeext'
11527  { (eval echo "$as_me:11523: \"$ac_try\"") >&5
11528  (eval $ac_try) 2>&5
11529  ac_status=$?
11530  echo "$as_me:11526: \$? = $ac_status" >&5
11531  (exit $ac_status); }; }; then
11532  ac_cv_lib_x_opendir=yes
11533else
11534  echo "$as_me: failed program was:" >&5
11535cat conftest.$ac_ext >&5
11536ac_cv_lib_x_opendir=no
11537fi
11538rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11539LIBS=$ac_check_lib_save_LIBS
11540fi
11541echo "$as_me:11537: result: $ac_cv_lib_x_opendir" >&5
11542echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11543if test $ac_cv_lib_x_opendir = yes; then
11544  LIBS="$LIBS -lx"
11545fi
11546
11547fi
11548
11549echo "$as_me:11545: checking whether time.h and sys/time.h may both be included" >&5
11550echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11551if test "${ac_cv_header_time+set}" = set; then
11552  echo $ECHO_N "(cached) $ECHO_C" >&6
11553else
11554  cat >conftest.$ac_ext <<_ACEOF
11555#line 11551 "configure"
11556#include "confdefs.h"
11557#include <sys/types.h>
11558#include <sys/time.h>
11559#include <time.h>
11560
11561int
11562main ()
11563{
11564if ((struct tm *) 0)
11565return 0;
11566  ;
11567  return 0;
11568}
11569_ACEOF
11570rm -f conftest.$ac_objext
11571if { (eval echo "$as_me:11567: \"$ac_compile\"") >&5
11572  (eval $ac_compile) 2>&5
11573  ac_status=$?
11574  echo "$as_me:11570: \$? = $ac_status" >&5
11575  (exit $ac_status); } &&
11576         { ac_try='test -s conftest.$ac_objext'
11577  { (eval echo "$as_me:11573: \"$ac_try\"") >&5
11578  (eval $ac_try) 2>&5
11579  ac_status=$?
11580  echo "$as_me:11576: \$? = $ac_status" >&5
11581  (exit $ac_status); }; }; then
11582  ac_cv_header_time=yes
11583else
11584  echo "$as_me: failed program was:" >&5
11585cat conftest.$ac_ext >&5
11586ac_cv_header_time=no
11587fi
11588rm -f conftest.$ac_objext conftest.$ac_ext
11589fi
11590echo "$as_me:11586: result: $ac_cv_header_time" >&5
11591echo "${ECHO_T}$ac_cv_header_time" >&6
11592if test $ac_cv_header_time = yes; then
11593
11594cat >>confdefs.h <<\EOF
11595#define TIME_WITH_SYS_TIME 1
11596EOF
11597
11598fi
11599
11600echo "$as_me:11596: checking for regular-expression headers" >&5
11601echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
11602if test "${cf_cv_regex+set}" = set; then
11603  echo $ECHO_N "(cached) $ECHO_C" >&6
11604else
11605
11606cat >conftest.$ac_ext <<_ACEOF
11607#line 11603 "configure"
11608#include "confdefs.h"
11609#include <sys/types.h>
11610#include <regex.h>
11611int
11612main ()
11613{
11614
11615	regex_t *p;
11616	int x = regcomp(p, "", 0);
11617	int y = regexec(p, "", 0, 0, 0);
11618	regfree(p);
11619
11620  ;
11621  return 0;
11622}
11623_ACEOF
11624rm -f conftest.$ac_objext conftest$ac_exeext
11625if { (eval echo "$as_me:11621: \"$ac_link\"") >&5
11626  (eval $ac_link) 2>&5
11627  ac_status=$?
11628  echo "$as_me:11624: \$? = $ac_status" >&5
11629  (exit $ac_status); } &&
11630         { ac_try='test -s conftest$ac_exeext'
11631  { (eval echo "$as_me:11627: \"$ac_try\"") >&5
11632  (eval $ac_try) 2>&5
11633  ac_status=$?
11634  echo "$as_me:11630: \$? = $ac_status" >&5
11635  (exit $ac_status); }; }; then
11636  cf_cv_regex="regex.h"
11637else
11638  echo "$as_me: failed program was:" >&5
11639cat conftest.$ac_ext >&5
11640
11641	cat >conftest.$ac_ext <<_ACEOF
11642#line 11638 "configure"
11643#include "confdefs.h"
11644#include <regexp.h>
11645int
11646main ()
11647{
11648
11649		char *p = compile("", "", "", 0);
11650		int x = step("", "");
11651
11652  ;
11653  return 0;
11654}
11655_ACEOF
11656rm -f conftest.$ac_objext conftest$ac_exeext
11657if { (eval echo "$as_me:11653: \"$ac_link\"") >&5
11658  (eval $ac_link) 2>&5
11659  ac_status=$?
11660  echo "$as_me:11656: \$? = $ac_status" >&5
11661  (exit $ac_status); } &&
11662         { ac_try='test -s conftest$ac_exeext'
11663  { (eval echo "$as_me:11659: \"$ac_try\"") >&5
11664  (eval $ac_try) 2>&5
11665  ac_status=$?
11666  echo "$as_me:11662: \$? = $ac_status" >&5
11667  (exit $ac_status); }; }; then
11668  cf_cv_regex="regexp.h"
11669else
11670  echo "$as_me: failed program was:" >&5
11671cat conftest.$ac_ext >&5
11672
11673		cf_save_LIBS="$LIBS"
11674		LIBS="-lgen $LIBS"
11675		cat >conftest.$ac_ext <<_ACEOF
11676#line 11672 "configure"
11677#include "confdefs.h"
11678#include <regexpr.h>
11679int
11680main ()
11681{
11682
11683			char *p = compile("", "", "");
11684			int x = step("", "");
11685
11686  ;
11687  return 0;
11688}
11689_ACEOF
11690rm -f conftest.$ac_objext conftest$ac_exeext
11691if { (eval echo "$as_me:11687: \"$ac_link\"") >&5
11692  (eval $ac_link) 2>&5
11693  ac_status=$?
11694  echo "$as_me:11690: \$? = $ac_status" >&5
11695  (exit $ac_status); } &&
11696         { ac_try='test -s conftest$ac_exeext'
11697  { (eval echo "$as_me:11693: \"$ac_try\"") >&5
11698  (eval $ac_try) 2>&5
11699  ac_status=$?
11700  echo "$as_me:11696: \$? = $ac_status" >&5
11701  (exit $ac_status); }; }; then
11702  cf_cv_regex="regexpr.h"
11703else
11704  echo "$as_me: failed program was:" >&5
11705cat conftest.$ac_ext >&5
11706LIBS="$cf_save_LIBS"
11707fi
11708rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11709fi
11710rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11711fi
11712rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11713
11714fi
11715
11716echo "$as_me:11712: result: $cf_cv_regex" >&5
11717echo "${ECHO_T}$cf_cv_regex" >&6
11718case $cf_cv_regex in
11719	regex.h)   cat >>confdefs.h <<\EOF
11720#define HAVE_REGEX_H_FUNCS 1
11721EOF
11722 ;;
11723	regexp.h)  cat >>confdefs.h <<\EOF
11724#define HAVE_REGEXP_H_FUNCS 1
11725EOF
11726 ;;
11727	regexpr.h) cat >>confdefs.h <<\EOF
11728#define HAVE_REGEXPR_H_FUNCS 1
11729EOF
11730 ;;
11731esac
11732
11733for ac_header in \
11734fcntl.h \
11735getopt.h \
11736limits.h \
11737locale.h \
11738poll.h \
11739sys/bsdtypes.h \
11740sys/ioctl.h \
11741sys/param.h \
11742sys/poll.h \
11743sys/select.h \
11744sys/time.h \
11745sys/times.h \
11746ttyent.h \
11747unistd.h \
11748wctype.h \
11749
11750do
11751as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11752echo "$as_me:11748: checking for $ac_header" >&5
11753echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11754if eval "test \"\${$as_ac_Header+set}\" = set"; then
11755  echo $ECHO_N "(cached) $ECHO_C" >&6
11756else
11757  cat >conftest.$ac_ext <<_ACEOF
11758#line 11754 "configure"
11759#include "confdefs.h"
11760#include <$ac_header>
11761_ACEOF
11762if { (eval echo "$as_me:11758: \"$ac_cpp conftest.$ac_ext\"") >&5
11763  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11764  ac_status=$?
11765  egrep -v '^ *\+' conftest.er1 >conftest.err
11766  rm -f conftest.er1
11767  cat conftest.err >&5
11768  echo "$as_me:11764: \$? = $ac_status" >&5
11769  (exit $ac_status); } >/dev/null; then
11770  if test -s conftest.err; then
11771    ac_cpp_err=$ac_c_preproc_warn_flag
11772  else
11773    ac_cpp_err=
11774  fi
11775else
11776  ac_cpp_err=yes
11777fi
11778if test -z "$ac_cpp_err"; then
11779  eval "$as_ac_Header=yes"
11780else
11781  echo "$as_me: failed program was:" >&5
11782  cat conftest.$ac_ext >&5
11783  eval "$as_ac_Header=no"
11784fi
11785rm -f conftest.err conftest.$ac_ext
11786fi
11787echo "$as_me:11783: result: `eval echo '${'$as_ac_Header'}'`" >&5
11788echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11789if test `eval echo '${'$as_ac_Header'}'` = yes; then
11790  cat >>confdefs.h <<EOF
11791#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11792EOF
11793
11794fi
11795done
11796
11797# check for ISC (this may also define _POSIX_SOURCE)
11798# Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
11799if test "$ISC" = yes ; then
11800
11801echo "$as_me:11797: checking for main in -lcposix" >&5
11802echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
11803if test "${ac_cv_lib_cposix_main+set}" = set; then
11804  echo $ECHO_N "(cached) $ECHO_C" >&6
11805else
11806  ac_check_lib_save_LIBS=$LIBS
11807LIBS="-lcposix  $LIBS"
11808cat >conftest.$ac_ext <<_ACEOF
11809#line 11805 "configure"
11810#include "confdefs.h"
11811
11812int
11813main ()
11814{
11815main ();
11816  ;
11817  return 0;
11818}
11819_ACEOF
11820rm -f conftest.$ac_objext conftest$ac_exeext
11821if { (eval echo "$as_me:11817: \"$ac_link\"") >&5
11822  (eval $ac_link) 2>&5
11823  ac_status=$?
11824  echo "$as_me:11820: \$? = $ac_status" >&5
11825  (exit $ac_status); } &&
11826         { ac_try='test -s conftest$ac_exeext'
11827  { (eval echo "$as_me:11823: \"$ac_try\"") >&5
11828  (eval $ac_try) 2>&5
11829  ac_status=$?
11830  echo "$as_me:11826: \$? = $ac_status" >&5
11831  (exit $ac_status); }; }; then
11832  ac_cv_lib_cposix_main=yes
11833else
11834  echo "$as_me: failed program was:" >&5
11835cat conftest.$ac_ext >&5
11836ac_cv_lib_cposix_main=no
11837fi
11838rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11839LIBS=$ac_check_lib_save_LIBS
11840fi
11841echo "$as_me:11837: result: $ac_cv_lib_cposix_main" >&5
11842echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11843if test $ac_cv_lib_cposix_main = yes; then
11844  cat >>confdefs.h <<EOF
11845#define HAVE_LIBCPOSIX 1
11846EOF
11847
11848  LIBS="-lcposix $LIBS"
11849
11850fi
11851
11852	echo "$as_me:11848: checking for bzero in -linet" >&5
11853echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11854if test "${ac_cv_lib_inet_bzero+set}" = set; then
11855  echo $ECHO_N "(cached) $ECHO_C" >&6
11856else
11857  ac_check_lib_save_LIBS=$LIBS
11858LIBS="-linet  $LIBS"
11859cat >conftest.$ac_ext <<_ACEOF
11860#line 11856 "configure"
11861#include "confdefs.h"
11862
11863/* Override any gcc2 internal prototype to avoid an error.  */
11864#ifdef __cplusplus
11865extern "C"
11866#endif
11867/* We use char because int might match the return type of a gcc2
11868   builtin and then its argument prototype would still apply.  */
11869char bzero ();
11870int
11871main ()
11872{
11873bzero ();
11874  ;
11875  return 0;
11876}
11877_ACEOF
11878rm -f conftest.$ac_objext conftest$ac_exeext
11879if { (eval echo "$as_me:11875: \"$ac_link\"") >&5
11880  (eval $ac_link) 2>&5
11881  ac_status=$?
11882  echo "$as_me:11878: \$? = $ac_status" >&5
11883  (exit $ac_status); } &&
11884         { ac_try='test -s conftest$ac_exeext'
11885  { (eval echo "$as_me:11881: \"$ac_try\"") >&5
11886  (eval $ac_try) 2>&5
11887  ac_status=$?
11888  echo "$as_me:11884: \$? = $ac_status" >&5
11889  (exit $ac_status); }; }; then
11890  ac_cv_lib_inet_bzero=yes
11891else
11892  echo "$as_me: failed program was:" >&5
11893cat conftest.$ac_ext >&5
11894ac_cv_lib_inet_bzero=no
11895fi
11896rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11897LIBS=$ac_check_lib_save_LIBS
11898fi
11899echo "$as_me:11895: result: $ac_cv_lib_inet_bzero" >&5
11900echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11901if test $ac_cv_lib_inet_bzero = yes; then
11902  LIBS="$LIBS -linet"
11903fi
11904fi
11905
11906echo "$as_me:11902: checking if sys/time.h works with sys/select.h" >&5
11907echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11908if test "${cf_cv_sys_time_select+set}" = set; then
11909  echo $ECHO_N "(cached) $ECHO_C" >&6
11910else
11911
11912cat >conftest.$ac_ext <<_ACEOF
11913#line 11909 "configure"
11914#include "confdefs.h"
11915
11916#include <sys/types.h>
11917#ifdef HAVE_SYS_TIME_H
11918#include <sys/time.h>
11919#endif
11920#ifdef HAVE_SYS_SELECT_H
11921#include <sys/select.h>
11922#endif
11923
11924int
11925main ()
11926{
11927
11928  ;
11929  return 0;
11930}
11931_ACEOF
11932rm -f conftest.$ac_objext
11933if { (eval echo "$as_me:11929: \"$ac_compile\"") >&5
11934  (eval $ac_compile) 2>&5
11935  ac_status=$?
11936  echo "$as_me:11932: \$? = $ac_status" >&5
11937  (exit $ac_status); } &&
11938         { ac_try='test -s conftest.$ac_objext'
11939  { (eval echo "$as_me:11935: \"$ac_try\"") >&5
11940  (eval $ac_try) 2>&5
11941  ac_status=$?
11942  echo "$as_me:11938: \$? = $ac_status" >&5
11943  (exit $ac_status); }; }; then
11944  cf_cv_sys_time_select=yes
11945else
11946  echo "$as_me: failed program was:" >&5
11947cat conftest.$ac_ext >&5
11948cf_cv_sys_time_select=no
11949fi
11950rm -f conftest.$ac_objext conftest.$ac_ext
11951
11952fi
11953
11954echo "$as_me:11950: result: $cf_cv_sys_time_select" >&5
11955echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11956test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11957#define HAVE_SYS_TIME_SELECT 1
11958EOF
11959
11960###	checks for compiler characteristics
11961ac_ext=c
11962ac_cpp='$CPP $CPPFLAGS'
11963ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11964ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11965ac_compiler_gnu=$ac_cv_c_compiler_gnu
11966ac_main_return=return
11967
11968echo "$as_me:11964: checking for $CC option to accept ANSI C" >&5
11969echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11970if test "${ac_cv_prog_cc_stdc+set}" = set; then
11971  echo $ECHO_N "(cached) $ECHO_C" >&6
11972else
11973  ac_cv_prog_cc_stdc=no
11974ac_save_CC=$CC
11975cat >conftest.$ac_ext <<_ACEOF
11976#line 11972 "configure"
11977#include "confdefs.h"
11978#include <stdarg.h>
11979#include <stdio.h>
11980#include <sys/types.h>
11981#include <sys/stat.h>
11982/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11983struct buf { int x; };
11984FILE * (*rcsopen) (struct buf *, struct stat *, int);
11985static char *e (p, i)
11986     char **p;
11987     int i;
11988{
11989  return p[i];
11990}
11991static char *f (char * (*g) (char **, int), char **p, ...)
11992{
11993  char *s;
11994  va_list v;
11995  va_start (v,p);
11996  s = g (p, va_arg (v,int));
11997  va_end (v);
11998  return s;
11999}
12000int test (int i, double x);
12001struct s1 {int (*f) (int a);};
12002struct s2 {int (*f) (double a);};
12003int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12004int argc;
12005char **argv;
12006int
12007main ()
12008{
12009return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12010  ;
12011  return 0;
12012}
12013_ACEOF
12014# Don't try gcc -ansi; that turns off useful extensions and
12015# breaks some systems' header files.
12016# AIX			-qlanglvl=ansi
12017# Ultrix and OSF/1	-std1
12018# HP-UX 10.20 and later	-Ae
12019# HP-UX older versions	-Aa -D_HPUX_SOURCE
12020# SVR4			-Xc -D__EXTENSIONS__
12021for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12022do
12023  CC="$ac_save_CC $ac_arg"
12024  rm -f conftest.$ac_objext
12025if { (eval echo "$as_me:12021: \"$ac_compile\"") >&5
12026  (eval $ac_compile) 2>&5
12027  ac_status=$?
12028  echo "$as_me:12024: \$? = $ac_status" >&5
12029  (exit $ac_status); } &&
12030         { ac_try='test -s conftest.$ac_objext'
12031  { (eval echo "$as_me:12027: \"$ac_try\"") >&5
12032  (eval $ac_try) 2>&5
12033  ac_status=$?
12034  echo "$as_me:12030: \$? = $ac_status" >&5
12035  (exit $ac_status); }; }; then
12036  ac_cv_prog_cc_stdc=$ac_arg
12037break
12038else
12039  echo "$as_me: failed program was:" >&5
12040cat conftest.$ac_ext >&5
12041fi
12042rm -f conftest.$ac_objext
12043done
12044rm -f conftest.$ac_ext conftest.$ac_objext
12045CC=$ac_save_CC
12046
12047fi
12048
12049case "x$ac_cv_prog_cc_stdc" in
12050  x|xno)
12051    echo "$as_me:12047: result: none needed" >&5
12052echo "${ECHO_T}none needed" >&6 ;;
12053  *)
12054    echo "$as_me:12050: result: $ac_cv_prog_cc_stdc" >&5
12055echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12056    CC="$CC $ac_cv_prog_cc_stdc" ;;
12057esac
12058
12059echo "$as_me:12055: checking for an ANSI C-conforming const" >&5
12060echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12061if test "${ac_cv_c_const+set}" = set; then
12062  echo $ECHO_N "(cached) $ECHO_C" >&6
12063else
12064  cat >conftest.$ac_ext <<_ACEOF
12065#line 12061 "configure"
12066#include "confdefs.h"
12067
12068int
12069main ()
12070{
12071/* FIXME: Include the comments suggested by Paul. */
12072#ifndef __cplusplus
12073  /* Ultrix mips cc rejects this.  */
12074  typedef int charset[2];
12075  const charset x;
12076  /* SunOS 4.1.1 cc rejects this.  */
12077  char const *const *ccp;
12078  char **p;
12079  /* NEC SVR4.0.2 mips cc rejects this.  */
12080  struct point {int x, y;};
12081  static struct point const zero = {0,0};
12082  /* AIX XL C 1.02.0.0 rejects this.
12083     It does not let you subtract one const X* pointer from another in
12084     an arm of an if-expression whose if-part is not a constant
12085     expression */
12086  const char *g = "string";
12087  ccp = &g + (g ? g-g : 0);
12088  /* HPUX 7.0 cc rejects these. */
12089  ++ccp;
12090  p = (char**) ccp;
12091  ccp = (char const *const *) p;
12092  { /* SCO 3.2v4 cc rejects this.  */
12093    char *t;
12094    char const *s = 0 ? (char *) 0 : (char const *) 0;
12095
12096    *t++ = 0;
12097  }
12098  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12099    int x[] = {25, 17};
12100    const int *foo = &x[0];
12101    ++foo;
12102  }
12103  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12104    typedef const int *iptr;
12105    iptr p = 0;
12106    ++p;
12107  }
12108  { /* AIX XL C 1.02.0.0 rejects this saying
12109       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12110    struct s { int j; const int *ap[3]; };
12111    struct s *b; b->j = 5;
12112  }
12113  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12114    const int foo = 10;
12115  }
12116#endif
12117
12118  ;
12119  return 0;
12120}
12121_ACEOF
12122rm -f conftest.$ac_objext
12123if { (eval echo "$as_me:12119: \"$ac_compile\"") >&5
12124  (eval $ac_compile) 2>&5
12125  ac_status=$?
12126  echo "$as_me:12122: \$? = $ac_status" >&5
12127  (exit $ac_status); } &&
12128         { ac_try='test -s conftest.$ac_objext'
12129  { (eval echo "$as_me:12125: \"$ac_try\"") >&5
12130  (eval $ac_try) 2>&5
12131  ac_status=$?
12132  echo "$as_me:12128: \$? = $ac_status" >&5
12133  (exit $ac_status); }; }; then
12134  ac_cv_c_const=yes
12135else
12136  echo "$as_me: failed program was:" >&5
12137cat conftest.$ac_ext >&5
12138ac_cv_c_const=no
12139fi
12140rm -f conftest.$ac_objext conftest.$ac_ext
12141fi
12142echo "$as_me:12138: result: $ac_cv_c_const" >&5
12143echo "${ECHO_T}$ac_cv_c_const" >&6
12144if test $ac_cv_c_const = no; then
12145
12146cat >>confdefs.h <<\EOF
12147#define const
12148EOF
12149
12150fi
12151
12152echo "$as_me:12148: checking for inline" >&5
12153echo $ECHO_N "checking for inline... $ECHO_C" >&6
12154if test "${ac_cv_c_inline+set}" = set; then
12155  echo $ECHO_N "(cached) $ECHO_C" >&6
12156else
12157  ac_cv_c_inline=no
12158for ac_kw in inline __inline__ __inline; do
12159  cat >conftest.$ac_ext <<_ACEOF
12160#line 12156 "configure"
12161#include "confdefs.h"
12162#ifndef __cplusplus
12163static $ac_kw int static_foo () {return 0; }
12164$ac_kw int foo () {return 0; }
12165#endif
12166
12167_ACEOF
12168rm -f conftest.$ac_objext
12169if { (eval echo "$as_me:12165: \"$ac_compile\"") >&5
12170  (eval $ac_compile) 2>&5
12171  ac_status=$?
12172  echo "$as_me:12168: \$? = $ac_status" >&5
12173  (exit $ac_status); } &&
12174         { ac_try='test -s conftest.$ac_objext'
12175  { (eval echo "$as_me:12171: \"$ac_try\"") >&5
12176  (eval $ac_try) 2>&5
12177  ac_status=$?
12178  echo "$as_me:12174: \$? = $ac_status" >&5
12179  (exit $ac_status); }; }; then
12180  ac_cv_c_inline=$ac_kw; break
12181else
12182  echo "$as_me: failed program was:" >&5
12183cat conftest.$ac_ext >&5
12184fi
12185rm -f conftest.$ac_objext conftest.$ac_ext
12186done
12187
12188fi
12189echo "$as_me:12185: result: $ac_cv_c_inline" >&5
12190echo "${ECHO_T}$ac_cv_c_inline" >&6
12191case $ac_cv_c_inline in
12192  inline | yes) ;;
12193  no)
12194cat >>confdefs.h <<\EOF
12195#define inline
12196EOF
12197 ;;
12198  *)  cat >>confdefs.h <<EOF
12199#define inline $ac_cv_c_inline
12200EOF
12201 ;;
12202esac
12203
12204NCURSES_INLINE=
12205if test "$ac_cv_c_inline" != no ; then
12206  NCURSES_INLINE=inline
12207  if test "$INTEL_COMPILER" = yes
12208  then
12209    :
12210  elif test "$GCC" = yes
12211  then
12212    echo "$as_me:12208: checking if gcc supports options to tune inlining" >&5
12213echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
12214if test "${cf_cv_gcc_inline+set}" = set; then
12215  echo $ECHO_N "(cached) $ECHO_C" >&6
12216else
12217
12218      cf_save_CFLAGS=$CFLAGS
12219      CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
12220      cat >conftest.$ac_ext <<_ACEOF
12221#line 12217 "configure"
12222#include "confdefs.h"
12223inline int foo(void) { return 1; }
12224int
12225main ()
12226{
12227${cf_cv_main_return:-return} foo()
12228  ;
12229  return 0;
12230}
12231_ACEOF
12232rm -f conftest.$ac_objext
12233if { (eval echo "$as_me:12229: \"$ac_compile\"") >&5
12234  (eval $ac_compile) 2>&5
12235  ac_status=$?
12236  echo "$as_me:12232: \$? = $ac_status" >&5
12237  (exit $ac_status); } &&
12238         { ac_try='test -s conftest.$ac_objext'
12239  { (eval echo "$as_me:12235: \"$ac_try\"") >&5
12240  (eval $ac_try) 2>&5
12241  ac_status=$?
12242  echo "$as_me:12238: \$? = $ac_status" >&5
12243  (exit $ac_status); }; }; then
12244  cf_cv_gcc_inline=yes
12245else
12246  echo "$as_me: failed program was:" >&5
12247cat conftest.$ac_ext >&5
12248cf_cv_gcc_inline=no
12249fi
12250rm -f conftest.$ac_objext conftest.$ac_ext
12251      CFLAGS=$cf_save_CFLAGS
12252
12253fi
12254echo "$as_me:12250: result: $cf_cv_gcc_inline" >&5
12255echo "${ECHO_T}$cf_cv_gcc_inline" >&6
12256    if test "$cf_cv_gcc_inline" = yes ; then
12257
12258cf_fix_cppflags=no
12259cf_new_cflags=
12260cf_new_cppflags=
12261cf_new_extra_cppflags=
12262
12263for cf_add_cflags in --param max-inline-insns-single=1200
12264do
12265case $cf_fix_cppflags in
12266no)
12267	case $cf_add_cflags in #(vi
12268	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12269		case $cf_add_cflags in
12270		-D*)
12271			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12272
12273			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12274			&& test -z "${cf_tst_cflags}" \
12275			&& cf_fix_cppflags=yes
12276
12277			if test $cf_fix_cppflags = yes ; then
12278				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12279				continue
12280			elif test "${cf_tst_cflags}" = "\"'" ; then
12281				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12282				continue
12283			fi
12284			;;
12285		esac
12286		case "$CPPFLAGS" in
12287		*$cf_add_cflags) #(vi
12288			;;
12289		*) #(vi
12290			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12291			;;
12292		esac
12293		;;
12294	*)
12295		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12296		;;
12297	esac
12298	;;
12299yes)
12300	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12301
12302	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12303
12304	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12305	&& test -z "${cf_tst_cflags}" \
12306	&& cf_fix_cppflags=no
12307	;;
12308esac
12309done
12310
12311if test -n "$cf_new_cflags" ; then
12312
12313	CFLAGS="$CFLAGS $cf_new_cflags"
12314fi
12315
12316if test -n "$cf_new_cppflags" ; then
12317
12318	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
12319fi
12320
12321if test -n "$cf_new_extra_cppflags" ; then
12322
12323	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12324fi
12325
12326    fi
12327  fi
12328fi
12329
12330echo "$as_me:12326: checking for signal global datatype" >&5
12331echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
12332if test "${cf_cv_sig_atomic_t+set}" = set; then
12333  echo $ECHO_N "(cached) $ECHO_C" >&6
12334else
12335
12336	for cf_type in \
12337		"volatile sig_atomic_t" \
12338		"sig_atomic_t" \
12339		"int"
12340	do
12341	cat >conftest.$ac_ext <<_ACEOF
12342#line 12338 "configure"
12343#include "confdefs.h"
12344
12345#include <sys/types.h>
12346#include <signal.h>
12347#include <stdio.h>
12348
12349extern $cf_type x;
12350$cf_type x;
12351static void handler(int sig)
12352{
12353	x = 5;
12354}
12355int
12356main ()
12357{
12358signal(SIGINT, handler);
12359		 x = 1
12360  ;
12361  return 0;
12362}
12363_ACEOF
12364rm -f conftest.$ac_objext
12365if { (eval echo "$as_me:12361: \"$ac_compile\"") >&5
12366  (eval $ac_compile) 2>&5
12367  ac_status=$?
12368  echo "$as_me:12364: \$? = $ac_status" >&5
12369  (exit $ac_status); } &&
12370         { ac_try='test -s conftest.$ac_objext'
12371  { (eval echo "$as_me:12367: \"$ac_try\"") >&5
12372  (eval $ac_try) 2>&5
12373  ac_status=$?
12374  echo "$as_me:12370: \$? = $ac_status" >&5
12375  (exit $ac_status); }; }; then
12376  cf_cv_sig_atomic_t=$cf_type
12377else
12378  echo "$as_me: failed program was:" >&5
12379cat conftest.$ac_ext >&5
12380cf_cv_sig_atomic_t=no
12381fi
12382rm -f conftest.$ac_objext conftest.$ac_ext
12383		test "$cf_cv_sig_atomic_t" != no && break
12384	done
12385
12386fi
12387
12388echo "$as_me:12384: result: $cf_cv_sig_atomic_t" >&5
12389echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
12390test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
12391#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
12392EOF
12393
12394if test $NCURSES_CHTYPE = auto ; then
12395
12396echo "$as_me:12392: checking for type of chtype" >&5
12397echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12398if test "${cf_cv_typeof_chtype+set}" = set; then
12399  echo $ECHO_N "(cached) $ECHO_C" >&6
12400else
12401
12402		if test "$cross_compiling" = yes; then
12403  cf_cv_typeof_chtype=long
12404else
12405  cat >conftest.$ac_ext <<_ACEOF
12406#line 12402 "configure"
12407#include "confdefs.h"
12408
12409#define WANT_BITS 31
12410#include <stdio.h>
12411int main()
12412{
12413	FILE *fp = fopen("cf_test.out", "w");
12414	if (fp != 0) {
12415		char *result = "long";
12416		if (sizeof(unsigned long) > sizeof(unsigned int)) {
12417			int n;
12418			unsigned int x, y;
12419			for (n = 0; n < WANT_BITS; n++) {
12420				x = (1 << n);
12421				y = (x >> n);
12422				if (y != 1 || x == 0) {
12423					x = 0;
12424					break;
12425				}
12426			}
12427			/*
12428			 * If x is nonzero, an int is big enough for the bits
12429			 * that we want.
12430			 */
12431			result = (x != 0) ? "int" : "long";
12432		}
12433		fputs(result, fp);
12434		fclose(fp);
12435	}
12436	${cf_cv_main_return:-return}(0);
12437}
12438
12439_ACEOF
12440rm -f conftest$ac_exeext
12441if { (eval echo "$as_me:12437: \"$ac_link\"") >&5
12442  (eval $ac_link) 2>&5
12443  ac_status=$?
12444  echo "$as_me:12440: \$? = $ac_status" >&5
12445  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12446  { (eval echo "$as_me:12442: \"$ac_try\"") >&5
12447  (eval $ac_try) 2>&5
12448  ac_status=$?
12449  echo "$as_me:12445: \$? = $ac_status" >&5
12450  (exit $ac_status); }; }; then
12451  cf_cv_typeof_chtype=`cat cf_test.out`
12452else
12453  echo "$as_me: program exited with status $ac_status" >&5
12454echo "$as_me: failed program was:" >&5
12455cat conftest.$ac_ext >&5
12456cf_cv_typeof_chtype=long
12457fi
12458rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12459fi
12460		rm -f cf_test.out
12461
12462fi
12463
12464echo "$as_me:12460: result: $cf_cv_typeof_chtype" >&5
12465echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
12466
12467cat >>confdefs.h <<EOF
12468#define TYPEOF_CHTYPE $cf_cv_typeof_chtype
12469EOF
12470
12471else
12472	cf_cv_typeof_chtype=$NCURSES_CHTYPE
12473fi
12474test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
12475
12476echo "$as_me:12472: checking if unsigned literals are legal" >&5
12477echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
12478if test "${cf_cv_unsigned_literals+set}" = set; then
12479  echo $ECHO_N "(cached) $ECHO_C" >&6
12480else
12481
12482	cat >conftest.$ac_ext <<_ACEOF
12483#line 12479 "configure"
12484#include "confdefs.h"
12485
12486int
12487main ()
12488{
12489long x = 1L + 1UL + 1U + 1
12490  ;
12491  return 0;
12492}
12493_ACEOF
12494rm -f conftest.$ac_objext
12495if { (eval echo "$as_me:12491: \"$ac_compile\"") >&5
12496  (eval $ac_compile) 2>&5
12497  ac_status=$?
12498  echo "$as_me:12494: \$? = $ac_status" >&5
12499  (exit $ac_status); } &&
12500         { ac_try='test -s conftest.$ac_objext'
12501  { (eval echo "$as_me:12497: \"$ac_try\"") >&5
12502  (eval $ac_try) 2>&5
12503  ac_status=$?
12504  echo "$as_me:12500: \$? = $ac_status" >&5
12505  (exit $ac_status); }; }; then
12506  cf_cv_unsigned_literals=yes
12507else
12508  echo "$as_me: failed program was:" >&5
12509cat conftest.$ac_ext >&5
12510cf_cv_unsigned_literals=no
12511fi
12512rm -f conftest.$ac_objext conftest.$ac_ext
12513
12514fi
12515
12516echo "$as_me:12512: result: $cf_cv_unsigned_literals" >&5
12517echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
12518
12519cf_cv_1UL="1"
12520test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
12521test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
12522
12523if test $NCURSES_MMASK_T = auto ; then
12524	cf_cv_typeof_mmask_t=long
12525else
12526	cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
12527fi
12528test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
12529
12530###	Checks for external-data
12531
12532echo "$as_me:12528: checking if external errno is declared" >&5
12533echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
12534if test "${cf_cv_dcl_errno+set}" = set; then
12535  echo $ECHO_N "(cached) $ECHO_C" >&6
12536else
12537
12538    cat >conftest.$ac_ext <<_ACEOF
12539#line 12535 "configure"
12540#include "confdefs.h"
12541
12542#ifdef HAVE_STDLIB_H
12543#include <stdlib.h>
12544#endif
12545#include <stdio.h>
12546#include <sys/types.h>
12547#include <errno.h>
12548int
12549main ()
12550{
12551int x = (int) errno
12552  ;
12553  return 0;
12554}
12555_ACEOF
12556rm -f conftest.$ac_objext
12557if { (eval echo "$as_me:12553: \"$ac_compile\"") >&5
12558  (eval $ac_compile) 2>&5
12559  ac_status=$?
12560  echo "$as_me:12556: \$? = $ac_status" >&5
12561  (exit $ac_status); } &&
12562         { ac_try='test -s conftest.$ac_objext'
12563  { (eval echo "$as_me:12559: \"$ac_try\"") >&5
12564  (eval $ac_try) 2>&5
12565  ac_status=$?
12566  echo "$as_me:12562: \$? = $ac_status" >&5
12567  (exit $ac_status); }; }; then
12568  cf_cv_dcl_errno=yes
12569else
12570  echo "$as_me: failed program was:" >&5
12571cat conftest.$ac_ext >&5
12572cf_cv_dcl_errno=no
12573fi
12574rm -f conftest.$ac_objext conftest.$ac_ext
12575
12576fi
12577echo "$as_me:12573: result: $cf_cv_dcl_errno" >&5
12578echo "${ECHO_T}$cf_cv_dcl_errno" >&6
12579
12580if test "$cf_cv_dcl_errno" = no ; then
12581
12582cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12583
12584    cat >>confdefs.h <<EOF
12585#define $cf_result 1
12586EOF
12587
12588fi
12589
12590# It's possible (for near-UNIX clones) that the data doesn't exist
12591
12592echo "$as_me:12588: checking if external errno exists" >&5
12593echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
12594if test "${cf_cv_have_errno+set}" = set; then
12595  echo $ECHO_N "(cached) $ECHO_C" >&6
12596else
12597
12598    cat >conftest.$ac_ext <<_ACEOF
12599#line 12595 "configure"
12600#include "confdefs.h"
12601
12602#undef errno
12603extern int errno;
12604
12605int
12606main ()
12607{
12608errno = 2
12609  ;
12610  return 0;
12611}
12612_ACEOF
12613rm -f conftest.$ac_objext conftest$ac_exeext
12614if { (eval echo "$as_me:12610: \"$ac_link\"") >&5
12615  (eval $ac_link) 2>&5
12616  ac_status=$?
12617  echo "$as_me:12613: \$? = $ac_status" >&5
12618  (exit $ac_status); } &&
12619         { ac_try='test -s conftest$ac_exeext'
12620  { (eval echo "$as_me:12616: \"$ac_try\"") >&5
12621  (eval $ac_try) 2>&5
12622  ac_status=$?
12623  echo "$as_me:12619: \$? = $ac_status" >&5
12624  (exit $ac_status); }; }; then
12625  cf_cv_have_errno=yes
12626else
12627  echo "$as_me: failed program was:" >&5
12628cat conftest.$ac_ext >&5
12629cf_cv_have_errno=no
12630fi
12631rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12632
12633fi
12634echo "$as_me:12630: result: $cf_cv_have_errno" >&5
12635echo "${ECHO_T}$cf_cv_have_errno" >&6
12636
12637if test "$cf_cv_have_errno" = yes ; then
12638
12639cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12640
12641    cat >>confdefs.h <<EOF
12642#define $cf_result 1
12643EOF
12644
12645fi
12646
12647echo "$as_me:12643: checking if data-only library module links" >&5
12648echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
12649if test "${cf_cv_link_dataonly+set}" = set; then
12650  echo $ECHO_N "(cached) $ECHO_C" >&6
12651else
12652
12653	rm -f conftest.a
12654	cat >conftest.$ac_ext <<EOF
12655#line 12651 "configure"
12656int	testdata[3] = { 123, 456, 789 };
12657EOF
12658	if { (eval echo "$as_me:12654: \"$ac_compile\"") >&5
12659  (eval $ac_compile) 2>&5
12660  ac_status=$?
12661  echo "$as_me:12657: \$? = $ac_status" >&5
12662  (exit $ac_status); } ; then
12663		mv conftest.o data.o && \
12664		( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
12665	fi
12666	rm -f conftest.$ac_ext data.o
12667	cat >conftest.$ac_ext <<EOF
12668#line 12664 "configure"
12669int	testfunc()
12670{
12671#if defined(NeXT)
12672	${cf_cv_main_return:-return}(1);	/* I'm told this linker is broken */
12673#else
12674	extern int testdata[3];
12675	return testdata[0] == 123
12676	   &&  testdata[1] == 456
12677	   &&  testdata[2] == 789;
12678#endif
12679}
12680EOF
12681	if { (eval echo "$as_me:12677: \"$ac_compile\"") >&5
12682  (eval $ac_compile) 2>&5
12683  ac_status=$?
12684  echo "$as_me:12680: \$? = $ac_status" >&5
12685  (exit $ac_status); }; then
12686		mv conftest.o func.o && \
12687		( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
12688	fi
12689	rm -f conftest.$ac_ext func.o
12690	( eval $RANLIB conftest.a ) 2>&5 >/dev/null
12691	cf_saveLIBS="$LIBS"
12692	LIBS="conftest.a $LIBS"
12693	if test "$cross_compiling" = yes; then
12694  cf_cv_link_dataonly=unknown
12695else
12696  cat >conftest.$ac_ext <<_ACEOF
12697#line 12693 "configure"
12698#include "confdefs.h"
12699
12700	int main()
12701	{
12702		extern int testfunc();
12703		${cf_cv_main_return:-return} (!testfunc());
12704	}
12705
12706_ACEOF
12707rm -f conftest$ac_exeext
12708if { (eval echo "$as_me:12704: \"$ac_link\"") >&5
12709  (eval $ac_link) 2>&5
12710  ac_status=$?
12711  echo "$as_me:12707: \$? = $ac_status" >&5
12712  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12713  { (eval echo "$as_me:12709: \"$ac_try\"") >&5
12714  (eval $ac_try) 2>&5
12715  ac_status=$?
12716  echo "$as_me:12712: \$? = $ac_status" >&5
12717  (exit $ac_status); }; }; then
12718  cf_cv_link_dataonly=yes
12719else
12720  echo "$as_me: program exited with status $ac_status" >&5
12721echo "$as_me: failed program was:" >&5
12722cat conftest.$ac_ext >&5
12723cf_cv_link_dataonly=no
12724fi
12725rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12726fi
12727	LIBS="$cf_saveLIBS"
12728
12729fi
12730
12731echo "$as_me:12727: result: $cf_cv_link_dataonly" >&5
12732echo "${ECHO_T}$cf_cv_link_dataonly" >&6
12733
12734if test "$cf_cv_link_dataonly" = no ; then
12735	cat >>confdefs.h <<\EOF
12736#define BROKEN_LINKER 1
12737EOF
12738
12739	BROKEN_LINKER=1
12740fi
12741
12742###	Checks for library functions.
12743
12744for ac_func in \
12745getcwd \
12746getegid \
12747geteuid \
12748getttynam \
12749issetugid \
12750poll \
12751remove \
12752select \
12753setbuf \
12754setbuffer \
12755setvbuf \
12756sigaction \
12757sigvec \
12758strdup \
12759strstr \
12760tcgetpgrp \
12761times \
12762vsnprintf \
12763
12764do
12765as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12766echo "$as_me:12762: checking for $ac_func" >&5
12767echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12768if eval "test \"\${$as_ac_var+set}\" = set"; then
12769  echo $ECHO_N "(cached) $ECHO_C" >&6
12770else
12771  cat >conftest.$ac_ext <<_ACEOF
12772#line 12768 "configure"
12773#include "confdefs.h"
12774/* System header to define __stub macros and hopefully few prototypes,
12775    which can conflict with char $ac_func (); below.  */
12776#include <assert.h>
12777/* Override any gcc2 internal prototype to avoid an error.  */
12778#ifdef __cplusplus
12779extern "C"
12780#endif
12781/* We use char because int might match the return type of a gcc2
12782   builtin and then its argument prototype would still apply.  */
12783char $ac_func ();
12784char (*f) ();
12785
12786int
12787main ()
12788{
12789/* The GNU C library defines this for functions which it implements
12790    to always fail with ENOSYS.  Some functions are actually named
12791    something starting with __ and the normal name is an alias.  */
12792#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12793choke me
12794#else
12795f = $ac_func;
12796#endif
12797
12798  ;
12799  return 0;
12800}
12801_ACEOF
12802rm -f conftest.$ac_objext conftest$ac_exeext
12803if { (eval echo "$as_me:12799: \"$ac_link\"") >&5
12804  (eval $ac_link) 2>&5
12805  ac_status=$?
12806  echo "$as_me:12802: \$? = $ac_status" >&5
12807  (exit $ac_status); } &&
12808         { ac_try='test -s conftest$ac_exeext'
12809  { (eval echo "$as_me:12805: \"$ac_try\"") >&5
12810  (eval $ac_try) 2>&5
12811  ac_status=$?
12812  echo "$as_me:12808: \$? = $ac_status" >&5
12813  (exit $ac_status); }; }; then
12814  eval "$as_ac_var=yes"
12815else
12816  echo "$as_me: failed program was:" >&5
12817cat conftest.$ac_ext >&5
12818eval "$as_ac_var=no"
12819fi
12820rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12821fi
12822echo "$as_me:12818: result: `eval echo '${'$as_ac_var'}'`" >&5
12823echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12824if test `eval echo '${'$as_ac_var'}'` = yes; then
12825  cat >>confdefs.h <<EOF
12826#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12827EOF
12828
12829fi
12830done
12831
12832if test "$with_getcap" = "yes" ; then
12833
12834echo "$as_me:12830: checking for terminal-capability database functions" >&5
12835echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
12836if test "${cf_cv_cgetent+set}" = set; then
12837  echo $ECHO_N "(cached) $ECHO_C" >&6
12838else
12839
12840cat >conftest.$ac_ext <<_ACEOF
12841#line 12837 "configure"
12842#include "confdefs.h"
12843
12844#include <stdlib.h>
12845int
12846main ()
12847{
12848
12849	char temp[128];
12850	char *buf = temp;
12851	char *db_array = temp;
12852	cgetent(&buf, /* int *, */ &db_array, "vt100");
12853	cgetcap(buf, "tc", '=');
12854	cgetmatch(buf, "tc");
12855
12856  ;
12857  return 0;
12858}
12859_ACEOF
12860rm -f conftest.$ac_objext conftest$ac_exeext
12861if { (eval echo "$as_me:12857: \"$ac_link\"") >&5
12862  (eval $ac_link) 2>&5
12863  ac_status=$?
12864  echo "$as_me:12860: \$? = $ac_status" >&5
12865  (exit $ac_status); } &&
12866         { ac_try='test -s conftest$ac_exeext'
12867  { (eval echo "$as_me:12863: \"$ac_try\"") >&5
12868  (eval $ac_try) 2>&5
12869  ac_status=$?
12870  echo "$as_me:12866: \$? = $ac_status" >&5
12871  (exit $ac_status); }; }; then
12872  cf_cv_cgetent=yes
12873else
12874  echo "$as_me: failed program was:" >&5
12875cat conftest.$ac_ext >&5
12876cf_cv_cgetent=no
12877fi
12878rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12879
12880fi
12881
12882echo "$as_me:12878: result: $cf_cv_cgetent" >&5
12883echo "${ECHO_T}$cf_cv_cgetent" >&6
12884test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
12885#define HAVE_BSD_CGETENT 1
12886EOF
12887
12888fi
12889
12890echo "$as_me:12886: checking for isascii" >&5
12891echo $ECHO_N "checking for isascii... $ECHO_C" >&6
12892if test "${cf_cv_have_isascii+set}" = set; then
12893  echo $ECHO_N "(cached) $ECHO_C" >&6
12894else
12895
12896	cat >conftest.$ac_ext <<_ACEOF
12897#line 12893 "configure"
12898#include "confdefs.h"
12899#include <ctype.h>
12900int
12901main ()
12902{
12903int x = isascii(' ')
12904  ;
12905  return 0;
12906}
12907_ACEOF
12908rm -f conftest.$ac_objext conftest$ac_exeext
12909if { (eval echo "$as_me:12905: \"$ac_link\"") >&5
12910  (eval $ac_link) 2>&5
12911  ac_status=$?
12912  echo "$as_me:12908: \$? = $ac_status" >&5
12913  (exit $ac_status); } &&
12914         { ac_try='test -s conftest$ac_exeext'
12915  { (eval echo "$as_me:12911: \"$ac_try\"") >&5
12916  (eval $ac_try) 2>&5
12917  ac_status=$?
12918  echo "$as_me:12914: \$? = $ac_status" >&5
12919  (exit $ac_status); }; }; then
12920  cf_cv_have_isascii=yes
12921else
12922  echo "$as_me: failed program was:" >&5
12923cat conftest.$ac_ext >&5
12924cf_cv_have_isascii=no
12925fi
12926rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12927
12928fi
12929echo "$as_me:12925: result: $cf_cv_have_isascii" >&5
12930echo "${ECHO_T}$cf_cv_have_isascii" >&6
12931test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
12932#define HAVE_ISASCII 1
12933EOF
12934
12935if test "$ac_cv_func_sigaction" = yes; then
12936echo "$as_me:12932: checking whether sigaction needs _POSIX_SOURCE" >&5
12937echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
12938cat >conftest.$ac_ext <<_ACEOF
12939#line 12935 "configure"
12940#include "confdefs.h"
12941
12942#include <sys/types.h>
12943#include <signal.h>
12944int
12945main ()
12946{
12947struct sigaction act
12948  ;
12949  return 0;
12950}
12951_ACEOF
12952rm -f conftest.$ac_objext
12953if { (eval echo "$as_me:12949: \"$ac_compile\"") >&5
12954  (eval $ac_compile) 2>&5
12955  ac_status=$?
12956  echo "$as_me:12952: \$? = $ac_status" >&5
12957  (exit $ac_status); } &&
12958         { ac_try='test -s conftest.$ac_objext'
12959  { (eval echo "$as_me:12955: \"$ac_try\"") >&5
12960  (eval $ac_try) 2>&5
12961  ac_status=$?
12962  echo "$as_me:12958: \$? = $ac_status" >&5
12963  (exit $ac_status); }; }; then
12964  sigact_bad=no
12965else
12966  echo "$as_me: failed program was:" >&5
12967cat conftest.$ac_ext >&5
12968
12969cat >conftest.$ac_ext <<_ACEOF
12970#line 12966 "configure"
12971#include "confdefs.h"
12972
12973#define _POSIX_SOURCE
12974#include <sys/types.h>
12975#include <signal.h>
12976int
12977main ()
12978{
12979struct sigaction act
12980  ;
12981  return 0;
12982}
12983_ACEOF
12984rm -f conftest.$ac_objext
12985if { (eval echo "$as_me:12981: \"$ac_compile\"") >&5
12986  (eval $ac_compile) 2>&5
12987  ac_status=$?
12988  echo "$as_me:12984: \$? = $ac_status" >&5
12989  (exit $ac_status); } &&
12990         { ac_try='test -s conftest.$ac_objext'
12991  { (eval echo "$as_me:12987: \"$ac_try\"") >&5
12992  (eval $ac_try) 2>&5
12993  ac_status=$?
12994  echo "$as_me:12990: \$? = $ac_status" >&5
12995  (exit $ac_status); }; }; then
12996  sigact_bad=yes
12997	 cat >>confdefs.h <<\EOF
12998#define SVR4_ACTION 1
12999EOF
13000
13001else
13002  echo "$as_me: failed program was:" >&5
13003cat conftest.$ac_ext >&5
13004sigact_bad=unknown
13005fi
13006rm -f conftest.$ac_objext conftest.$ac_ext
13007fi
13008rm -f conftest.$ac_objext conftest.$ac_ext
13009echo "$as_me:13005: result: $sigact_bad" >&5
13010echo "${ECHO_T}$sigact_bad" >&6
13011fi
13012
13013echo "$as_me:13009: checking if nanosleep really works" >&5
13014echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
13015if test "${cf_cv_func_nanosleep+set}" = set; then
13016  echo $ECHO_N "(cached) $ECHO_C" >&6
13017else
13018
13019if test "$cross_compiling" = yes; then
13020  cf_cv_func_nanosleep=unknown
13021else
13022  cat >conftest.$ac_ext <<_ACEOF
13023#line 13019 "configure"
13024#include "confdefs.h"
13025
13026#include <stdio.h>
13027#include <errno.h>
13028#include <time.h>
13029
13030#ifdef HAVE_SYS_TIME_H
13031#include <sys/time.h>
13032#endif
13033
13034int main() {
13035	struct timespec ts1, ts2;
13036	int code;
13037	ts1.tv_sec  = 0;
13038	ts1.tv_nsec = 750000000;
13039	ts2.tv_sec  = 0;
13040	ts2.tv_nsec = 0;
13041	errno = 0;
13042	code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
13043	${cf_cv_main_return:-return}(code != 0);
13044}
13045
13046_ACEOF
13047rm -f conftest$ac_exeext
13048if { (eval echo "$as_me:13044: \"$ac_link\"") >&5
13049  (eval $ac_link) 2>&5
13050  ac_status=$?
13051  echo "$as_me:13047: \$? = $ac_status" >&5
13052  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13053  { (eval echo "$as_me:13049: \"$ac_try\"") >&5
13054  (eval $ac_try) 2>&5
13055  ac_status=$?
13056  echo "$as_me:13052: \$? = $ac_status" >&5
13057  (exit $ac_status); }; }; then
13058  cf_cv_func_nanosleep=yes
13059else
13060  echo "$as_me: program exited with status $ac_status" >&5
13061echo "$as_me: failed program was:" >&5
13062cat conftest.$ac_ext >&5
13063cf_cv_func_nanosleep=no
13064fi
13065rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13066fi
13067fi
13068echo "$as_me:13064: result: $cf_cv_func_nanosleep" >&5
13069echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
13070
13071test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
13072#define HAVE_NANOSLEEP 1
13073EOF
13074
13075for ac_header in \
13076termio.h \
13077termios.h \
13078unistd.h \
13079
13080do
13081as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13082echo "$as_me:13078: checking for $ac_header" >&5
13083echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13084if eval "test \"\${$as_ac_Header+set}\" = set"; then
13085  echo $ECHO_N "(cached) $ECHO_C" >&6
13086else
13087  cat >conftest.$ac_ext <<_ACEOF
13088#line 13084 "configure"
13089#include "confdefs.h"
13090#include <$ac_header>
13091_ACEOF
13092if { (eval echo "$as_me:13088: \"$ac_cpp conftest.$ac_ext\"") >&5
13093  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13094  ac_status=$?
13095  egrep -v '^ *\+' conftest.er1 >conftest.err
13096  rm -f conftest.er1
13097  cat conftest.err >&5
13098  echo "$as_me:13094: \$? = $ac_status" >&5
13099  (exit $ac_status); } >/dev/null; then
13100  if test -s conftest.err; then
13101    ac_cpp_err=$ac_c_preproc_warn_flag
13102  else
13103    ac_cpp_err=
13104  fi
13105else
13106  ac_cpp_err=yes
13107fi
13108if test -z "$ac_cpp_err"; then
13109  eval "$as_ac_Header=yes"
13110else
13111  echo "$as_me: failed program was:" >&5
13112  cat conftest.$ac_ext >&5
13113  eval "$as_ac_Header=no"
13114fi
13115rm -f conftest.err conftest.$ac_ext
13116fi
13117echo "$as_me:13113: result: `eval echo '${'$as_ac_Header'}'`" >&5
13118echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13119if test `eval echo '${'$as_ac_Header'}'` = yes; then
13120  cat >>confdefs.h <<EOF
13121#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13122EOF
13123
13124fi
13125done
13126
13127if test "$ISC" = yes ; then
13128
13129for ac_header in sys/termio.h
13130do
13131as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13132echo "$as_me:13128: checking for $ac_header" >&5
13133echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13134if eval "test \"\${$as_ac_Header+set}\" = set"; then
13135  echo $ECHO_N "(cached) $ECHO_C" >&6
13136else
13137  cat >conftest.$ac_ext <<_ACEOF
13138#line 13134 "configure"
13139#include "confdefs.h"
13140#include <$ac_header>
13141_ACEOF
13142if { (eval echo "$as_me:13138: \"$ac_cpp conftest.$ac_ext\"") >&5
13143  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13144  ac_status=$?
13145  egrep -v '^ *\+' conftest.er1 >conftest.err
13146  rm -f conftest.er1
13147  cat conftest.err >&5
13148  echo "$as_me:13144: \$? = $ac_status" >&5
13149  (exit $ac_status); } >/dev/null; then
13150  if test -s conftest.err; then
13151    ac_cpp_err=$ac_c_preproc_warn_flag
13152  else
13153    ac_cpp_err=
13154  fi
13155else
13156  ac_cpp_err=yes
13157fi
13158if test -z "$ac_cpp_err"; then
13159  eval "$as_ac_Header=yes"
13160else
13161  echo "$as_me: failed program was:" >&5
13162  cat conftest.$ac_ext >&5
13163  eval "$as_ac_Header=no"
13164fi
13165rm -f conftest.err conftest.$ac_ext
13166fi
13167echo "$as_me:13163: result: `eval echo '${'$as_ac_Header'}'`" >&5
13168echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13169if test `eval echo '${'$as_ac_Header'}'` = yes; then
13170  cat >>confdefs.h <<EOF
13171#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13172EOF
13173
13174fi
13175done
13176
13177fi
13178if test "$ac_cv_header_termios_h" = yes ; then
13179	case "$CFLAGS $CPPFLAGS" in
13180	*-D_POSIX_SOURCE*)
13181		termios_bad=dunno ;;
13182	*)	termios_bad=maybe ;;
13183	esac
13184	if test "$termios_bad" = maybe ; then
13185	echo "$as_me:13181: checking whether termios.h needs _POSIX_SOURCE" >&5
13186echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
13187	cat >conftest.$ac_ext <<_ACEOF
13188#line 13184 "configure"
13189#include "confdefs.h"
13190#include <termios.h>
13191int
13192main ()
13193{
13194struct termios foo; int x = foo.c_iflag
13195  ;
13196  return 0;
13197}
13198_ACEOF
13199rm -f conftest.$ac_objext
13200if { (eval echo "$as_me:13196: \"$ac_compile\"") >&5
13201  (eval $ac_compile) 2>&5
13202  ac_status=$?
13203  echo "$as_me:13199: \$? = $ac_status" >&5
13204  (exit $ac_status); } &&
13205         { ac_try='test -s conftest.$ac_objext'
13206  { (eval echo "$as_me:13202: \"$ac_try\"") >&5
13207  (eval $ac_try) 2>&5
13208  ac_status=$?
13209  echo "$as_me:13205: \$? = $ac_status" >&5
13210  (exit $ac_status); }; }; then
13211  termios_bad=no
13212else
13213  echo "$as_me: failed program was:" >&5
13214cat conftest.$ac_ext >&5
13215
13216		cat >conftest.$ac_ext <<_ACEOF
13217#line 13213 "configure"
13218#include "confdefs.h"
13219
13220#define _POSIX_SOURCE
13221#include <termios.h>
13222int
13223main ()
13224{
13225struct termios foo; int x = foo.c_iflag
13226  ;
13227  return 0;
13228}
13229_ACEOF
13230rm -f conftest.$ac_objext
13231if { (eval echo "$as_me:13227: \"$ac_compile\"") >&5
13232  (eval $ac_compile) 2>&5
13233  ac_status=$?
13234  echo "$as_me:13230: \$? = $ac_status" >&5
13235  (exit $ac_status); } &&
13236         { ac_try='test -s conftest.$ac_objext'
13237  { (eval echo "$as_me:13233: \"$ac_try\"") >&5
13238  (eval $ac_try) 2>&5
13239  ac_status=$?
13240  echo "$as_me:13236: \$? = $ac_status" >&5
13241  (exit $ac_status); }; }; then
13242  termios_bad=unknown
13243else
13244  echo "$as_me: failed program was:" >&5
13245cat conftest.$ac_ext >&5
13246termios_bad=yes cat >>confdefs.h <<\EOF
13247#define SVR4_TERMIO 1
13248EOF
13249
13250fi
13251rm -f conftest.$ac_objext conftest.$ac_ext
13252
13253fi
13254rm -f conftest.$ac_objext conftest.$ac_ext
13255	echo "$as_me:13251: result: $termios_bad" >&5
13256echo "${ECHO_T}$termios_bad" >&6
13257	fi
13258fi
13259
13260echo "$as_me:13256: checking for tcgetattr" >&5
13261echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
13262if test "${cf_cv_have_tcgetattr+set}" = set; then
13263  echo $ECHO_N "(cached) $ECHO_C" >&6
13264else
13265
13266cat >conftest.$ac_ext <<_ACEOF
13267#line 13263 "configure"
13268#include "confdefs.h"
13269
13270#include <sys/types.h>
13271#ifdef HAVE_UNISTD_H
13272#include <unistd.h>
13273#endif
13274#ifdef HAVE_TERMIOS_H
13275#include <termios.h>
13276#define TTY struct termios
13277#else
13278#ifdef HAVE_TERMIO_H
13279#include <termio.h>
13280#define TTY struct termio
13281#endif
13282#endif
13283
13284int
13285main ()
13286{
13287
13288TTY foo;
13289tcgetattr(1, &foo);
13290  ;
13291  return 0;
13292}
13293_ACEOF
13294rm -f conftest.$ac_objext conftest$ac_exeext
13295if { (eval echo "$as_me:13291: \"$ac_link\"") >&5
13296  (eval $ac_link) 2>&5
13297  ac_status=$?
13298  echo "$as_me:13294: \$? = $ac_status" >&5
13299  (exit $ac_status); } &&
13300         { ac_try='test -s conftest$ac_exeext'
13301  { (eval echo "$as_me:13297: \"$ac_try\"") >&5
13302  (eval $ac_try) 2>&5
13303  ac_status=$?
13304  echo "$as_me:13300: \$? = $ac_status" >&5
13305  (exit $ac_status); }; }; then
13306  cf_cv_have_tcgetattr=yes
13307else
13308  echo "$as_me: failed program was:" >&5
13309cat conftest.$ac_ext >&5
13310cf_cv_have_tcgetattr=no
13311fi
13312rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13313fi
13314echo "$as_me:13310: result: $cf_cv_have_tcgetattr" >&5
13315echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
13316test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
13317#define HAVE_TCGETATTR 1
13318EOF
13319
13320echo "$as_me:13316: checking for vsscanf function or workaround" >&5
13321echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
13322if test "${cf_cv_func_vsscanf+set}" = set; then
13323  echo $ECHO_N "(cached) $ECHO_C" >&6
13324else
13325
13326cat >conftest.$ac_ext <<_ACEOF
13327#line 13323 "configure"
13328#include "confdefs.h"
13329
13330#include <stdarg.h>
13331#include <stdio.h>
13332int
13333main ()
13334{
13335
13336	va_list ap;
13337	vsscanf("from", "%d", ap)
13338  ;
13339  return 0;
13340}
13341_ACEOF
13342rm -f conftest.$ac_objext conftest$ac_exeext
13343if { (eval echo "$as_me:13339: \"$ac_link\"") >&5
13344  (eval $ac_link) 2>&5
13345  ac_status=$?
13346  echo "$as_me:13342: \$? = $ac_status" >&5
13347  (exit $ac_status); } &&
13348         { ac_try='test -s conftest$ac_exeext'
13349  { (eval echo "$as_me:13345: \"$ac_try\"") >&5
13350  (eval $ac_try) 2>&5
13351  ac_status=$?
13352  echo "$as_me:13348: \$? = $ac_status" >&5
13353  (exit $ac_status); }; }; then
13354  cf_cv_func_vsscanf=vsscanf
13355else
13356  echo "$as_me: failed program was:" >&5
13357cat conftest.$ac_ext >&5
13358
13359cat >conftest.$ac_ext <<_ACEOF
13360#line 13356 "configure"
13361#include "confdefs.h"
13362
13363#include <stdarg.h>
13364#include <stdio.h>
13365int
13366main ()
13367{
13368
13369    FILE strbuf;
13370    char *str = "from";
13371
13372    strbuf._flag = _IOREAD;
13373    strbuf._ptr = strbuf._base = (unsigned char *) str;
13374    strbuf._cnt = strlen(str);
13375    strbuf._file = _NFILE;
13376    return (vfscanf(&strbuf, "%d", ap))
13377  ;
13378  return 0;
13379}
13380_ACEOF
13381rm -f conftest.$ac_objext conftest$ac_exeext
13382if { (eval echo "$as_me:13378: \"$ac_link\"") >&5
13383  (eval $ac_link) 2>&5
13384  ac_status=$?
13385  echo "$as_me:13381: \$? = $ac_status" >&5
13386  (exit $ac_status); } &&
13387         { ac_try='test -s conftest$ac_exeext'
13388  { (eval echo "$as_me:13384: \"$ac_try\"") >&5
13389  (eval $ac_try) 2>&5
13390  ac_status=$?
13391  echo "$as_me:13387: \$? = $ac_status" >&5
13392  (exit $ac_status); }; }; then
13393  cf_cv_func_vsscanf=vfscanf
13394else
13395  echo "$as_me: failed program was:" >&5
13396cat conftest.$ac_ext >&5
13397
13398cat >conftest.$ac_ext <<_ACEOF
13399#line 13395 "configure"
13400#include "confdefs.h"
13401
13402#include <stdarg.h>
13403#include <stdio.h>
13404int
13405main ()
13406{
13407
13408    FILE strbuf;
13409    char *str = "from";
13410
13411    strbuf._flag = _IOREAD;
13412    strbuf._ptr = strbuf._base = (unsigned char *) str;
13413    strbuf._cnt = strlen(str);
13414    strbuf._file = _NFILE;
13415    return (_doscan(&strbuf, "%d", ap))
13416  ;
13417  return 0;
13418}
13419_ACEOF
13420rm -f conftest.$ac_objext conftest$ac_exeext
13421if { (eval echo "$as_me:13417: \"$ac_link\"") >&5
13422  (eval $ac_link) 2>&5
13423  ac_status=$?
13424  echo "$as_me:13420: \$? = $ac_status" >&5
13425  (exit $ac_status); } &&
13426         { ac_try='test -s conftest$ac_exeext'
13427  { (eval echo "$as_me:13423: \"$ac_try\"") >&5
13428  (eval $ac_try) 2>&5
13429  ac_status=$?
13430  echo "$as_me:13426: \$? = $ac_status" >&5
13431  (exit $ac_status); }; }; then
13432  cf_cv_func_vsscanf=_doscan
13433else
13434  echo "$as_me: failed program was:" >&5
13435cat conftest.$ac_ext >&5
13436
13437cf_cv_func_vsscanf=no
13438fi
13439rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13440fi
13441rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13442fi
13443rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13444fi
13445echo "$as_me:13441: result: $cf_cv_func_vsscanf" >&5
13446echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
13447
13448case $cf_cv_func_vsscanf in #(vi
13449vsscanf) cat >>confdefs.h <<\EOF
13450#define HAVE_VSSCANF 1
13451EOF
13452;; #(vi
13453vfscanf) cat >>confdefs.h <<\EOF
13454#define HAVE_VFSCANF 1
13455EOF
13456;; #(vi
13457_doscan) cat >>confdefs.h <<\EOF
13458#define HAVE__DOSCAN 1
13459EOF
13460;;
13461esac
13462
13463echo "$as_me:13459: checking for working mkstemp" >&5
13464echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13465if test "${cf_cv_func_mkstemp+set}" = set; then
13466  echo $ECHO_N "(cached) $ECHO_C" >&6
13467else
13468
13469rm -f conftest*
13470if test "$cross_compiling" = yes; then
13471  echo "$as_me:13467: checking for mkstemp" >&5
13472echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13473if test "${ac_cv_func_mkstemp+set}" = set; then
13474  echo $ECHO_N "(cached) $ECHO_C" >&6
13475else
13476  cat >conftest.$ac_ext <<_ACEOF
13477#line 13473 "configure"
13478#include "confdefs.h"
13479/* System header to define __stub macros and hopefully few prototypes,
13480    which can conflict with char mkstemp (); below.  */
13481#include <assert.h>
13482/* Override any gcc2 internal prototype to avoid an error.  */
13483#ifdef __cplusplus
13484extern "C"
13485#endif
13486/* We use char because int might match the return type of a gcc2
13487   builtin and then its argument prototype would still apply.  */
13488char mkstemp ();
13489char (*f) ();
13490
13491int
13492main ()
13493{
13494/* The GNU C library defines this for functions which it implements
13495    to always fail with ENOSYS.  Some functions are actually named
13496    something starting with __ and the normal name is an alias.  */
13497#if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13498choke me
13499#else
13500f = mkstemp;
13501#endif
13502
13503  ;
13504  return 0;
13505}
13506_ACEOF
13507rm -f conftest.$ac_objext conftest$ac_exeext
13508if { (eval echo "$as_me:13504: \"$ac_link\"") >&5
13509  (eval $ac_link) 2>&5
13510  ac_status=$?
13511  echo "$as_me:13507: \$? = $ac_status" >&5
13512  (exit $ac_status); } &&
13513         { ac_try='test -s conftest$ac_exeext'
13514  { (eval echo "$as_me:13510: \"$ac_try\"") >&5
13515  (eval $ac_try) 2>&5
13516  ac_status=$?
13517  echo "$as_me:13513: \$? = $ac_status" >&5
13518  (exit $ac_status); }; }; then
13519  ac_cv_func_mkstemp=yes
13520else
13521  echo "$as_me: failed program was:" >&5
13522cat conftest.$ac_ext >&5
13523ac_cv_func_mkstemp=no
13524fi
13525rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13526fi
13527echo "$as_me:13523: result: $ac_cv_func_mkstemp" >&5
13528echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13529
13530else
13531  cat >conftest.$ac_ext <<_ACEOF
13532#line 13528 "configure"
13533#include "confdefs.h"
13534
13535#include <sys/types.h>
13536#include <stdlib.h>
13537#include <stdio.h>
13538#include <string.h>
13539#include <sys/stat.h>
13540int main()
13541{
13542	char *tmpl = "conftestXXXXXX";
13543	char name[2][80];
13544	int n;
13545	int result = 0;
13546	int fd;
13547	struct stat sb;
13548
13549	umask(077);
13550	for (n = 0; n < 2; ++n) {
13551		strcpy(name[n], tmpl);
13552		if ((fd = mkstemp(name[n])) >= 0) {
13553			if (!strcmp(name[n], tmpl)
13554			 || stat(name[n], &sb) != 0
13555			 || (sb.st_mode & S_IFMT) != S_IFREG
13556			 || (sb.st_mode & 077) != 0) {
13557				result = 1;
13558			}
13559			close(fd);
13560		}
13561	}
13562	if (result == 0
13563	 && !strcmp(name[0], name[1]))
13564		result = 1;
13565	${cf_cv_main_return:-return}(result);
13566}
13567
13568_ACEOF
13569rm -f conftest$ac_exeext
13570if { (eval echo "$as_me:13566: \"$ac_link\"") >&5
13571  (eval $ac_link) 2>&5
13572  ac_status=$?
13573  echo "$as_me:13569: \$? = $ac_status" >&5
13574  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13575  { (eval echo "$as_me:13571: \"$ac_try\"") >&5
13576  (eval $ac_try) 2>&5
13577  ac_status=$?
13578  echo "$as_me:13574: \$? = $ac_status" >&5
13579  (exit $ac_status); }; }; then
13580  cf_cv_func_mkstemp=yes
13581
13582else
13583  echo "$as_me: program exited with status $ac_status" >&5
13584echo "$as_me: failed program was:" >&5
13585cat conftest.$ac_ext >&5
13586cf_cv_func_mkstemp=no
13587
13588fi
13589rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13590fi
13591
13592fi
13593echo "$as_me:13589: result: $cf_cv_func_mkstemp" >&5
13594echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13595if test "$cf_cv_func_mkstemp" = yes ; then
13596	cat >>confdefs.h <<\EOF
13597#define HAVE_MKSTEMP 1
13598EOF
13599
13600fi
13601
13602# setup for prototype of fallback for vsscanf()
13603
13604if test "$cf_cv_func_vsscanf" = vsscanf ; then
13605	HAVE_VSSCANF=1
13606else
13607	HAVE_VSSCANF=0
13608fi
13609
13610if test "$cross_compiling" = yes ; then
13611	{ echo "$as_me:13607: WARNING: cross compiling: assume setvbuf params not reversed" >&5
13612echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
13613else
13614	echo "$as_me:13610: checking whether setvbuf arguments are reversed" >&5
13615echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
13616if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
13617  echo $ECHO_N "(cached) $ECHO_C" >&6
13618else
13619  if test "$cross_compiling" = yes; then
13620  { { echo "$as_me:13616: error: cannot run test program while cross compiling" >&5
13621echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13622   { (exit 1); exit 1; }; }
13623else
13624  cat >conftest.$ac_ext <<_ACEOF
13625#line 13621 "configure"
13626#include "confdefs.h"
13627#include <stdio.h>
13628/* If setvbuf has the reversed format, exit 0. */
13629int
13630main ()
13631{
13632  /* This call has the arguments reversed.
13633     A reversed system may check and see that the address of main
13634     is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
13635  if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
13636    $ac_main_return(1);
13637  putc('\r', stdout);
13638  $ac_main_return(0);			/* Non-reversed systems segv here.  */
13639}
13640_ACEOF
13641rm -f conftest$ac_exeext
13642if { (eval echo "$as_me:13638: \"$ac_link\"") >&5
13643  (eval $ac_link) 2>&5
13644  ac_status=$?
13645  echo "$as_me:13641: \$? = $ac_status" >&5
13646  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13647  { (eval echo "$as_me:13643: \"$ac_try\"") >&5
13648  (eval $ac_try) 2>&5
13649  ac_status=$?
13650  echo "$as_me:13646: \$? = $ac_status" >&5
13651  (exit $ac_status); }; }; then
13652  ac_cv_func_setvbuf_reversed=yes
13653else
13654  echo "$as_me: program exited with status $ac_status" >&5
13655echo "$as_me: failed program was:" >&5
13656cat conftest.$ac_ext >&5
13657ac_cv_func_setvbuf_reversed=no
13658fi
13659rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13660fi
13661rm -f core core.* *.core
13662fi
13663echo "$as_me:13659: result: $ac_cv_func_setvbuf_reversed" >&5
13664echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
13665if test $ac_cv_func_setvbuf_reversed = yes; then
13666
13667cat >>confdefs.h <<\EOF
13668#define SETVBUF_REVERSED 1
13669EOF
13670
13671fi
13672
13673fi
13674echo "$as_me:13670: checking return type of signal handlers" >&5
13675echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13676if test "${ac_cv_type_signal+set}" = set; then
13677  echo $ECHO_N "(cached) $ECHO_C" >&6
13678else
13679  cat >conftest.$ac_ext <<_ACEOF
13680#line 13676 "configure"
13681#include "confdefs.h"
13682#include <sys/types.h>
13683#include <signal.h>
13684#ifdef signal
13685# undef signal
13686#endif
13687#ifdef __cplusplus
13688extern "C" void (*signal (int, void (*)(int)))(int);
13689#else
13690void (*signal ()) ();
13691#endif
13692
13693int
13694main ()
13695{
13696int i;
13697  ;
13698  return 0;
13699}
13700_ACEOF
13701rm -f conftest.$ac_objext
13702if { (eval echo "$as_me:13698: \"$ac_compile\"") >&5
13703  (eval $ac_compile) 2>&5
13704  ac_status=$?
13705  echo "$as_me:13701: \$? = $ac_status" >&5
13706  (exit $ac_status); } &&
13707         { ac_try='test -s conftest.$ac_objext'
13708  { (eval echo "$as_me:13704: \"$ac_try\"") >&5
13709  (eval $ac_try) 2>&5
13710  ac_status=$?
13711  echo "$as_me:13707: \$? = $ac_status" >&5
13712  (exit $ac_status); }; }; then
13713  ac_cv_type_signal=void
13714else
13715  echo "$as_me: failed program was:" >&5
13716cat conftest.$ac_ext >&5
13717ac_cv_type_signal=int
13718fi
13719rm -f conftest.$ac_objext conftest.$ac_ext
13720fi
13721echo "$as_me:13717: result: $ac_cv_type_signal" >&5
13722echo "${ECHO_T}$ac_cv_type_signal" >&6
13723
13724cat >>confdefs.h <<EOF
13725#define RETSIGTYPE $ac_cv_type_signal
13726EOF
13727
13728echo "$as_me:13724: checking for type sigaction_t" >&5
13729echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
13730if test "${cf_cv_type_sigaction+set}" = set; then
13731  echo $ECHO_N "(cached) $ECHO_C" >&6
13732else
13733
13734	cat >conftest.$ac_ext <<_ACEOF
13735#line 13731 "configure"
13736#include "confdefs.h"
13737
13738#include <signal.h>
13739int
13740main ()
13741{
13742sigaction_t x
13743  ;
13744  return 0;
13745}
13746_ACEOF
13747rm -f conftest.$ac_objext
13748if { (eval echo "$as_me:13744: \"$ac_compile\"") >&5
13749  (eval $ac_compile) 2>&5
13750  ac_status=$?
13751  echo "$as_me:13747: \$? = $ac_status" >&5
13752  (exit $ac_status); } &&
13753         { ac_try='test -s conftest.$ac_objext'
13754  { (eval echo "$as_me:13750: \"$ac_try\"") >&5
13755  (eval $ac_try) 2>&5
13756  ac_status=$?
13757  echo "$as_me:13753: \$? = $ac_status" >&5
13758  (exit $ac_status); }; }; then
13759  cf_cv_type_sigaction=yes
13760else
13761  echo "$as_me: failed program was:" >&5
13762cat conftest.$ac_ext >&5
13763cf_cv_type_sigaction=no
13764fi
13765rm -f conftest.$ac_objext conftest.$ac_ext
13766fi
13767
13768echo "$as_me:13764: result: $cf_cv_type_sigaction" >&5
13769echo "${ECHO_T}$cf_cv_type_sigaction" >&6
13770test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
13771#define HAVE_TYPE_SIGACTION 1
13772EOF
13773
13774echo "$as_me:13770: checking declaration of size-change" >&5
13775echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
13776if test "${cf_cv_sizechange+set}" = set; then
13777  echo $ECHO_N "(cached) $ECHO_C" >&6
13778else
13779
13780    cf_cv_sizechange=unknown
13781    cf_save_CPPFLAGS="$CPPFLAGS"
13782
13783for cf_opts in "" "NEED_PTEM_H"
13784do
13785
13786    CPPFLAGS="$cf_save_CPPFLAGS"
13787    test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
13788    cat >conftest.$ac_ext <<_ACEOF
13789#line 13785 "configure"
13790#include "confdefs.h"
13791#include <sys/types.h>
13792#ifdef HAVE_TERMIOS_H
13793#include <termios.h>
13794#else
13795#ifdef HAVE_TERMIO_H
13796#include <termio.h>
13797#endif
13798#endif
13799#ifdef NEED_PTEM_H
13800/* This is a workaround for SCO:  they neglected to define struct winsize in
13801 * termios.h -- it's only in termio.h and ptem.h
13802 */
13803#include        <sys/stream.h>
13804#include        <sys/ptem.h>
13805#endif
13806#if !defined(sun) || !defined(HAVE_TERMIOS_H)
13807#include <sys/ioctl.h>
13808#endif
13809
13810int
13811main ()
13812{
13813
13814#ifdef TIOCGSIZE
13815	struct ttysize win;	/* FIXME: what system is this? */
13816	int y = win.ts_lines;
13817	int x = win.ts_cols;
13818#else
13819#ifdef TIOCGWINSZ
13820	struct winsize win;
13821	int y = win.ws_row;
13822	int x = win.ws_col;
13823#else
13824	no TIOCGSIZE or TIOCGWINSZ
13825#endif /* TIOCGWINSZ */
13826#endif /* TIOCGSIZE */
13827
13828  ;
13829  return 0;
13830}
13831_ACEOF
13832rm -f conftest.$ac_objext
13833if { (eval echo "$as_me:13829: \"$ac_compile\"") >&5
13834  (eval $ac_compile) 2>&5
13835  ac_status=$?
13836  echo "$as_me:13832: \$? = $ac_status" >&5
13837  (exit $ac_status); } &&
13838         { ac_try='test -s conftest.$ac_objext'
13839  { (eval echo "$as_me:13835: \"$ac_try\"") >&5
13840  (eval $ac_try) 2>&5
13841  ac_status=$?
13842  echo "$as_me:13838: \$? = $ac_status" >&5
13843  (exit $ac_status); }; }; then
13844  cf_cv_sizechange=yes
13845else
13846  echo "$as_me: failed program was:" >&5
13847cat conftest.$ac_ext >&5
13848cf_cv_sizechange=no
13849fi
13850rm -f conftest.$ac_objext conftest.$ac_ext
13851
13852	CPPFLAGS="$cf_save_CPPFLAGS"
13853	if test "$cf_cv_sizechange" = yes ; then
13854		echo "size-change succeeded ($cf_opts)" >&5
13855		test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
13856		break
13857	fi
13858done
13859
13860fi
13861echo "$as_me:13857: result: $cf_cv_sizechange" >&5
13862echo "${ECHO_T}$cf_cv_sizechange" >&6
13863if test "$cf_cv_sizechange" != no ; then
13864	cat >>confdefs.h <<\EOF
13865#define HAVE_SIZECHANGE 1
13866EOF
13867
13868	case $cf_cv_sizechange in #(vi
13869	NEED*)
13870		cat >>confdefs.h <<EOF
13871#define $cf_cv_sizechange  1
13872EOF
13873
13874		;;
13875	esac
13876fi
13877
13878echo "$as_me:13874: checking for memmove" >&5
13879echo $ECHO_N "checking for memmove... $ECHO_C" >&6
13880if test "${ac_cv_func_memmove+set}" = set; then
13881  echo $ECHO_N "(cached) $ECHO_C" >&6
13882else
13883  cat >conftest.$ac_ext <<_ACEOF
13884#line 13880 "configure"
13885#include "confdefs.h"
13886/* System header to define __stub macros and hopefully few prototypes,
13887    which can conflict with char memmove (); below.  */
13888#include <assert.h>
13889/* Override any gcc2 internal prototype to avoid an error.  */
13890#ifdef __cplusplus
13891extern "C"
13892#endif
13893/* We use char because int might match the return type of a gcc2
13894   builtin and then its argument prototype would still apply.  */
13895char memmove ();
13896char (*f) ();
13897
13898int
13899main ()
13900{
13901/* The GNU C library defines this for functions which it implements
13902    to always fail with ENOSYS.  Some functions are actually named
13903    something starting with __ and the normal name is an alias.  */
13904#if defined (__stub_memmove) || defined (__stub___memmove)
13905choke me
13906#else
13907f = memmove;
13908#endif
13909
13910  ;
13911  return 0;
13912}
13913_ACEOF
13914rm -f conftest.$ac_objext conftest$ac_exeext
13915if { (eval echo "$as_me:13911: \"$ac_link\"") >&5
13916  (eval $ac_link) 2>&5
13917  ac_status=$?
13918  echo "$as_me:13914: \$? = $ac_status" >&5
13919  (exit $ac_status); } &&
13920         { ac_try='test -s conftest$ac_exeext'
13921  { (eval echo "$as_me:13917: \"$ac_try\"") >&5
13922  (eval $ac_try) 2>&5
13923  ac_status=$?
13924  echo "$as_me:13920: \$? = $ac_status" >&5
13925  (exit $ac_status); }; }; then
13926  ac_cv_func_memmove=yes
13927else
13928  echo "$as_me: failed program was:" >&5
13929cat conftest.$ac_ext >&5
13930ac_cv_func_memmove=no
13931fi
13932rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13933fi
13934echo "$as_me:13930: result: $ac_cv_func_memmove" >&5
13935echo "${ECHO_T}$ac_cv_func_memmove" >&6
13936if test $ac_cv_func_memmove = yes; then
13937  :
13938else
13939
13940echo "$as_me:13936: checking for bcopy" >&5
13941echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
13942if test "${ac_cv_func_bcopy+set}" = set; then
13943  echo $ECHO_N "(cached) $ECHO_C" >&6
13944else
13945  cat >conftest.$ac_ext <<_ACEOF
13946#line 13942 "configure"
13947#include "confdefs.h"
13948/* System header to define __stub macros and hopefully few prototypes,
13949    which can conflict with char bcopy (); below.  */
13950#include <assert.h>
13951/* Override any gcc2 internal prototype to avoid an error.  */
13952#ifdef __cplusplus
13953extern "C"
13954#endif
13955/* We use char because int might match the return type of a gcc2
13956   builtin and then its argument prototype would still apply.  */
13957char bcopy ();
13958char (*f) ();
13959
13960int
13961main ()
13962{
13963/* The GNU C library defines this for functions which it implements
13964    to always fail with ENOSYS.  Some functions are actually named
13965    something starting with __ and the normal name is an alias.  */
13966#if defined (__stub_bcopy) || defined (__stub___bcopy)
13967choke me
13968#else
13969f = bcopy;
13970#endif
13971
13972  ;
13973  return 0;
13974}
13975_ACEOF
13976rm -f conftest.$ac_objext conftest$ac_exeext
13977if { (eval echo "$as_me:13973: \"$ac_link\"") >&5
13978  (eval $ac_link) 2>&5
13979  ac_status=$?
13980  echo "$as_me:13976: \$? = $ac_status" >&5
13981  (exit $ac_status); } &&
13982         { ac_try='test -s conftest$ac_exeext'
13983  { (eval echo "$as_me:13979: \"$ac_try\"") >&5
13984  (eval $ac_try) 2>&5
13985  ac_status=$?
13986  echo "$as_me:13982: \$? = $ac_status" >&5
13987  (exit $ac_status); }; }; then
13988  ac_cv_func_bcopy=yes
13989else
13990  echo "$as_me: failed program was:" >&5
13991cat conftest.$ac_ext >&5
13992ac_cv_func_bcopy=no
13993fi
13994rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13995fi
13996echo "$as_me:13992: result: $ac_cv_func_bcopy" >&5
13997echo "${ECHO_T}$ac_cv_func_bcopy" >&6
13998if test $ac_cv_func_bcopy = yes; then
13999
14000	echo "$as_me:13996: checking if bcopy does overlapping moves" >&5
14001echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
14002if test "${cf_cv_good_bcopy+set}" = set; then
14003  echo $ECHO_N "(cached) $ECHO_C" >&6
14004else
14005
14006		if test "$cross_compiling" = yes; then
14007  cf_cv_good_bcopy=unknown
14008else
14009  cat >conftest.$ac_ext <<_ACEOF
14010#line 14006 "configure"
14011#include "confdefs.h"
14012
14013int main() {
14014	static char data[] = "abcdefghijklmnopqrstuwwxyz";
14015	char temp[40];
14016	bcopy(data, temp, sizeof(data));
14017	bcopy(temp+10, temp, 15);
14018	bcopy(temp+5, temp+15, 10);
14019	${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
14020}
14021
14022_ACEOF
14023rm -f conftest$ac_exeext
14024if { (eval echo "$as_me:14020: \"$ac_link\"") >&5
14025  (eval $ac_link) 2>&5
14026  ac_status=$?
14027  echo "$as_me:14023: \$? = $ac_status" >&5
14028  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14029  { (eval echo "$as_me:14025: \"$ac_try\"") >&5
14030  (eval $ac_try) 2>&5
14031  ac_status=$?
14032  echo "$as_me:14028: \$? = $ac_status" >&5
14033  (exit $ac_status); }; }; then
14034  cf_cv_good_bcopy=yes
14035else
14036  echo "$as_me: program exited with status $ac_status" >&5
14037echo "$as_me: failed program was:" >&5
14038cat conftest.$ac_ext >&5
14039cf_cv_good_bcopy=no
14040fi
14041rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14042fi
14043
14044fi
14045echo "$as_me:14041: result: $cf_cv_good_bcopy" >&5
14046echo "${ECHO_T}$cf_cv_good_bcopy" >&6
14047
14048else
14049  cf_cv_good_bcopy=no
14050fi
14051
14052	if test "$cf_cv_good_bcopy" = yes ; then
14053		cat >>confdefs.h <<\EOF
14054#define USE_OK_BCOPY 1
14055EOF
14056
14057	else
14058		cat >>confdefs.h <<\EOF
14059#define USE_MY_MEMMOVE 1
14060EOF
14061
14062	fi
14063
14064fi
14065
14066echo "$as_me:14062: checking if poll really works" >&5
14067echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
14068if test "${cf_cv_working_poll+set}" = set; then
14069  echo $ECHO_N "(cached) $ECHO_C" >&6
14070else
14071
14072if test "$cross_compiling" = yes; then
14073  cf_cv_working_poll=unknown
14074else
14075  cat >conftest.$ac_ext <<_ACEOF
14076#line 14072 "configure"
14077#include "confdefs.h"
14078
14079#include <stdio.h>
14080#ifdef HAVE_POLL_H
14081#include <poll.h>
14082#else
14083#include <sys/poll.h>
14084#endif
14085int main() {
14086	struct pollfd myfds;
14087	int ret;
14088
14089	myfds.fd = 0;
14090	myfds.events = POLLIN;
14091
14092	ret = poll(&myfds, 1, 100);
14093	${cf_cv_main_return:-return}(ret != 0);
14094}
14095_ACEOF
14096rm -f conftest$ac_exeext
14097if { (eval echo "$as_me:14093: \"$ac_link\"") >&5
14098  (eval $ac_link) 2>&5
14099  ac_status=$?
14100  echo "$as_me:14096: \$? = $ac_status" >&5
14101  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14102  { (eval echo "$as_me:14098: \"$ac_try\"") >&5
14103  (eval $ac_try) 2>&5
14104  ac_status=$?
14105  echo "$as_me:14101: \$? = $ac_status" >&5
14106  (exit $ac_status); }; }; then
14107  cf_cv_working_poll=yes
14108else
14109  echo "$as_me: program exited with status $ac_status" >&5
14110echo "$as_me: failed program was:" >&5
14111cat conftest.$ac_ext >&5
14112cf_cv_working_poll=no
14113fi
14114rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14115fi
14116fi
14117echo "$as_me:14113: result: $cf_cv_working_poll" >&5
14118echo "${ECHO_T}$cf_cv_working_poll" >&6
14119test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
14120#define HAVE_WORKING_POLL 1
14121EOF
14122
14123# special check for test/ditto.c
14124
14125echo "$as_me:14121: checking for openpty in -lutil" >&5
14126echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14127if test "${ac_cv_lib_util_openpty+set}" = set; then
14128  echo $ECHO_N "(cached) $ECHO_C" >&6
14129else
14130  ac_check_lib_save_LIBS=$LIBS
14131LIBS="-lutil  $LIBS"
14132cat >conftest.$ac_ext <<_ACEOF
14133#line 14129 "configure"
14134#include "confdefs.h"
14135
14136/* Override any gcc2 internal prototype to avoid an error.  */
14137#ifdef __cplusplus
14138extern "C"
14139#endif
14140/* We use char because int might match the return type of a gcc2
14141   builtin and then its argument prototype would still apply.  */
14142char openpty ();
14143int
14144main ()
14145{
14146openpty ();
14147  ;
14148  return 0;
14149}
14150_ACEOF
14151rm -f conftest.$ac_objext conftest$ac_exeext
14152if { (eval echo "$as_me:14148: \"$ac_link\"") >&5
14153  (eval $ac_link) 2>&5
14154  ac_status=$?
14155  echo "$as_me:14151: \$? = $ac_status" >&5
14156  (exit $ac_status); } &&
14157         { ac_try='test -s conftest$ac_exeext'
14158  { (eval echo "$as_me:14154: \"$ac_try\"") >&5
14159  (eval $ac_try) 2>&5
14160  ac_status=$?
14161  echo "$as_me:14157: \$? = $ac_status" >&5
14162  (exit $ac_status); }; }; then
14163  ac_cv_lib_util_openpty=yes
14164else
14165  echo "$as_me: failed program was:" >&5
14166cat conftest.$ac_ext >&5
14167ac_cv_lib_util_openpty=no
14168fi
14169rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14170LIBS=$ac_check_lib_save_LIBS
14171fi
14172echo "$as_me:14168: result: $ac_cv_lib_util_openpty" >&5
14173echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14174if test $ac_cv_lib_util_openpty = yes; then
14175  cf_cv_lib_util=yes
14176else
14177  cf_cv_lib_util=no
14178fi
14179
14180echo "$as_me:14176: checking for openpty header" >&5
14181echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
14182if test "${cf_cv_func_openpty+set}" = set; then
14183  echo $ECHO_N "(cached) $ECHO_C" >&6
14184else
14185
14186    cf_save_LIBS="$LIBS"
14187    test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
14188    for cf_header in pty.h libutil.h util.h
14189    do
14190    cat >conftest.$ac_ext <<_ACEOF
14191#line 14187 "configure"
14192#include "confdefs.h"
14193
14194#include <$cf_header>
14195
14196int
14197main ()
14198{
14199
14200    int x = openpty((int *)0, (int *)0, (char *)0,
14201                   (struct termios *)0, (struct winsize *)0);
14202
14203  ;
14204  return 0;
14205}
14206_ACEOF
14207rm -f conftest.$ac_objext conftest$ac_exeext
14208if { (eval echo "$as_me:14204: \"$ac_link\"") >&5
14209  (eval $ac_link) 2>&5
14210  ac_status=$?
14211  echo "$as_me:14207: \$? = $ac_status" >&5
14212  (exit $ac_status); } &&
14213         { ac_try='test -s conftest$ac_exeext'
14214  { (eval echo "$as_me:14210: \"$ac_try\"") >&5
14215  (eval $ac_try) 2>&5
14216  ac_status=$?
14217  echo "$as_me:14213: \$? = $ac_status" >&5
14218  (exit $ac_status); }; }; then
14219
14220        cf_cv_func_openpty=$cf_header
14221        break
14222
14223else
14224  echo "$as_me: failed program was:" >&5
14225cat conftest.$ac_ext >&5
14226
14227        cf_cv_func_openpty=no
14228
14229fi
14230rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14231    done
14232    LIBS="$cf_save_LIBS"
14233
14234fi
14235echo "$as_me:14231: result: $cf_cv_func_openpty" >&5
14236echo "${ECHO_T}$cf_cv_func_openpty" >&6
14237
14238if test "$cf_cv_func_openpty" != no ; then
14239    cat >>confdefs.h <<EOF
14240#define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
14241EOF
14242
14243    cat >>confdefs.h <<\EOF
14244#define USE_XTERM_PTY 1
14245EOF
14246
14247    if test "$cf_cv_lib_util" = yes ; then
14248        TEST_LIBS="-lutil $TEST_LIBS"
14249    fi
14250fi
14251
14252if test "$with_hashed_db" != no ; then
14253	cat >>confdefs.h <<\EOF
14254#define USE_HASHED_DB 1
14255EOF
14256
14257case $with_hashed_db in #(vi
14258yes|*able*) #(vi
14259    ;;
14260*)
14261    if test -d "$with_hashed_db" ; then
14262
14263if test -n "$with_hashed_db/include" ; then
14264  for cf_add_incdir in $with_hashed_db/include
14265  do
14266	while test $cf_add_incdir != /usr/include
14267	do
14268	  if test -d $cf_add_incdir
14269	  then
14270		cf_have_incdir=no
14271		if test -n "$CFLAGS$CPPFLAGS" ; then
14272		  # a loop is needed to ensure we can add subdirs of existing dirs
14273		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14274			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14275			  cf_have_incdir=yes; break
14276			fi
14277		  done
14278		fi
14279
14280		if test "$cf_have_incdir" = no ; then
14281          if test "$cf_add_incdir" = /usr/local/include ; then
14282			if test "$GCC" = yes
14283			then
14284			  cf_save_CPPFLAGS=$CPPFLAGS
14285			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14286			  cat >conftest.$ac_ext <<_ACEOF
14287#line 14283 "configure"
14288#include "confdefs.h"
14289#include <stdio.h>
14290int
14291main ()
14292{
14293printf("Hello")
14294  ;
14295  return 0;
14296}
14297_ACEOF
14298rm -f conftest.$ac_objext
14299if { (eval echo "$as_me:14295: \"$ac_compile\"") >&5
14300  (eval $ac_compile) 2>&5
14301  ac_status=$?
14302  echo "$as_me:14298: \$? = $ac_status" >&5
14303  (exit $ac_status); } &&
14304         { ac_try='test -s conftest.$ac_objext'
14305  { (eval echo "$as_me:14301: \"$ac_try\"") >&5
14306  (eval $ac_try) 2>&5
14307  ac_status=$?
14308  echo "$as_me:14304: \$? = $ac_status" >&5
14309  (exit $ac_status); }; }; then
14310  :
14311else
14312  echo "$as_me: failed program was:" >&5
14313cat conftest.$ac_ext >&5
14314cf_have_incdir=yes
14315fi
14316rm -f conftest.$ac_objext conftest.$ac_ext
14317			  CPPFLAGS=$cf_save_CPPFLAGS
14318			fi
14319		  fi
14320		fi
14321
14322		if test "$cf_have_incdir" = no ; then
14323		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
14324
14325echo "${as_me-configure}:14321: testing adding $cf_add_incdir to include-path ..." 1>&5
14326
14327		  CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
14328
14329          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14330          test "$cf_top_incdir" = "$cf_add_incdir" && break
14331          cf_add_incdir="$cf_top_incdir"
14332		else
14333		  break
14334		fi
14335	  fi
14336	done
14337  done
14338fi
14339
14340if test -n "$with_hashed_db/lib" ; then
14341  for cf_add_libdir in $with_hashed_db/lib
14342  do
14343    if test $cf_add_libdir = /usr/lib ; then
14344      :
14345    elif test -d $cf_add_libdir
14346    then
14347      cf_have_libdir=no
14348      if test -n "$LDFLAGS$LIBS" ; then
14349        # a loop is needed to ensure we can add subdirs of existing dirs
14350        for cf_test_libdir in $LDFLAGS $LIBS ; do
14351          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14352            cf_have_libdir=yes; break
14353          fi
14354        done
14355      fi
14356      if test "$cf_have_libdir" = no ; then
14357        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
14358
14359echo "${as_me-configure}:14355: testing adding $cf_add_libdir to library-path ..." 1>&5
14360
14361        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14362      fi
14363    fi
14364  done
14365fi
14366
14367    fi
14368esac
14369
14370echo "$as_me:14366: checking for db.h" >&5
14371echo $ECHO_N "checking for db.h... $ECHO_C" >&6
14372if test "${ac_cv_header_db_h+set}" = set; then
14373  echo $ECHO_N "(cached) $ECHO_C" >&6
14374else
14375  cat >conftest.$ac_ext <<_ACEOF
14376#line 14372 "configure"
14377#include "confdefs.h"
14378#include <db.h>
14379_ACEOF
14380if { (eval echo "$as_me:14376: \"$ac_cpp conftest.$ac_ext\"") >&5
14381  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14382  ac_status=$?
14383  egrep -v '^ *\+' conftest.er1 >conftest.err
14384  rm -f conftest.er1
14385  cat conftest.err >&5
14386  echo "$as_me:14382: \$? = $ac_status" >&5
14387  (exit $ac_status); } >/dev/null; then
14388  if test -s conftest.err; then
14389    ac_cpp_err=$ac_c_preproc_warn_flag
14390  else
14391    ac_cpp_err=
14392  fi
14393else
14394  ac_cpp_err=yes
14395fi
14396if test -z "$ac_cpp_err"; then
14397  ac_cv_header_db_h=yes
14398else
14399  echo "$as_me: failed program was:" >&5
14400  cat conftest.$ac_ext >&5
14401  ac_cv_header_db_h=no
14402fi
14403rm -f conftest.err conftest.$ac_ext
14404fi
14405echo "$as_me:14401: result: $ac_cv_header_db_h" >&5
14406echo "${ECHO_T}$ac_cv_header_db_h" >&6
14407if test $ac_cv_header_db_h = yes; then
14408
14409echo "$as_me:14405: checking for version of db" >&5
14410echo $ECHO_N "checking for version of db... $ECHO_C" >&6
14411if test "${cf_cv_hashed_db_version+set}" = set; then
14412  echo $ECHO_N "(cached) $ECHO_C" >&6
14413else
14414
14415cf_cv_hashed_db_version=unknown
14416
14417for cf_db_version in 1 2 3 4 5
14418do
14419
14420echo "${as_me-configure}:14416: testing checking for db version $cf_db_version ..." 1>&5
14421
14422	cat >conftest.$ac_ext <<_ACEOF
14423#line 14419 "configure"
14424#include "confdefs.h"
14425
14426$ac_includes_default
14427#include <db.h>
14428
14429#ifdef DB_VERSION_MAJOR
14430	/* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
14431#if $cf_db_version == DB_VERSION_MAJOR
14432	/* ok */
14433#else
14434	make an error
14435#endif
14436#else
14437#if $cf_db_version == 1
14438	/* ok: assuming this is DB 1.8.5 */
14439#else
14440	make an error
14441#endif
14442#endif
14443
14444int
14445main ()
14446{
14447DBT *foo = 0
14448  ;
14449  return 0;
14450}
14451_ACEOF
14452rm -f conftest.$ac_objext
14453if { (eval echo "$as_me:14449: \"$ac_compile\"") >&5
14454  (eval $ac_compile) 2>&5
14455  ac_status=$?
14456  echo "$as_me:14452: \$? = $ac_status" >&5
14457  (exit $ac_status); } &&
14458         { ac_try='test -s conftest.$ac_objext'
14459  { (eval echo "$as_me:14455: \"$ac_try\"") >&5
14460  (eval $ac_try) 2>&5
14461  ac_status=$?
14462  echo "$as_me:14458: \$? = $ac_status" >&5
14463  (exit $ac_status); }; }; then
14464
14465	cf_cv_hashed_db_version=$cf_db_version
14466	break
14467
14468else
14469  echo "$as_me: failed program was:" >&5
14470cat conftest.$ac_ext >&5
14471fi
14472rm -f conftest.$ac_objext conftest.$ac_ext
14473done
14474
14475fi
14476echo "$as_me:14472: result: $cf_cv_hashed_db_version" >&5
14477echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
14478
14479if test "$cf_cv_hashed_db_version" = unknown ; then
14480	{ { echo "$as_me:14476: error: Cannot determine version of db" >&5
14481echo "$as_me: error: Cannot determine version of db" >&2;}
14482   { (exit 1); exit 1; }; }
14483else
14484
14485echo "$as_me:14481: checking for db libraries" >&5
14486echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
14487if test "${cf_cv_hashed_db_libs+set}" = set; then
14488  echo $ECHO_N "(cached) $ECHO_C" >&6
14489else
14490
14491cf_cv_hashed_db_libs=unknown
14492for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
14493do
14494	cf_save_libs="$LIBS"
14495	if test -n "$cf_db_libs"; then
14496		LIBS="-l$cf_db_libs $LIBS"
14497	fi
14498
14499echo "${as_me-configure}:14495: testing checking for library "$cf_db_libs" ..." 1>&5
14500
14501	cat >conftest.$ac_ext <<_ACEOF
14502#line 14498 "configure"
14503#include "confdefs.h"
14504
14505$ac_includes_default
14506#include <db.h>
14507
14508int
14509main ()
14510{
14511
14512	char *path = "/tmp/foo";
14513#ifdef DB_VERSION_MAJOR
14514#if DB_VERSION_MAJOR >= 4
14515	DB *result = 0;
14516	db_create(&result, NULL, 0);
14517	result->open(result,
14518		NULL,
14519		path,
14520		path,
14521		DB_HASH,
14522		DB_CREATE,
14523		0644);
14524#elif DB_VERSION_MAJOR >= 3
14525	DB *result = 0;
14526	db_create(&result, NULL, 0);
14527	result->open(result,
14528		path,
14529		path,
14530		DB_HASH,
14531		DB_CREATE,
14532		0644);
14533#elif DB_VERSION_MAJOR >= 2
14534	DB *result = 0;
14535	db_open(path,
14536		DB_HASH,
14537		DB_CREATE,
14538		0644,
14539		(DB_ENV *) 0,
14540		(DB_INFO *) 0,
14541		&result);
14542#endif /* DB_VERSION_MAJOR */
14543#else
14544	DB *result = dbopen(path,
14545		     2,
14546		     0644,
14547		     DB_HASH,
14548		     0);
14549#endif
14550	${cf_cv_main_return:-return}(result != 0)
14551
14552  ;
14553  return 0;
14554}
14555_ACEOF
14556rm -f conftest.$ac_objext conftest$ac_exeext
14557if { (eval echo "$as_me:14553: \"$ac_link\"") >&5
14558  (eval $ac_link) 2>&5
14559  ac_status=$?
14560  echo "$as_me:14556: \$? = $ac_status" >&5
14561  (exit $ac_status); } &&
14562         { ac_try='test -s conftest$ac_exeext'
14563  { (eval echo "$as_me:14559: \"$ac_try\"") >&5
14564  (eval $ac_try) 2>&5
14565  ac_status=$?
14566  echo "$as_me:14562: \$? = $ac_status" >&5
14567  (exit $ac_status); }; }; then
14568
14569	if test -n "$cf_db_libs" ; then
14570		cf_cv_hashed_db_libs=$cf_db_libs
14571	else
14572		cf_cv_hashed_db_libs=default
14573	fi
14574	LIBS="$cf_save_libs"
14575	break
14576
14577else
14578  echo "$as_me: failed program was:" >&5
14579cat conftest.$ac_ext >&5
14580fi
14581rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14582	LIBS="$cf_save_libs"
14583done
14584
14585fi
14586echo "$as_me:14582: result: $cf_cv_hashed_db_libs" >&5
14587echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
14588
14589	if test "$cf_cv_hashed_db_libs" = unknown ; then
14590		{ { echo "$as_me:14586: error: Cannot determine library for db" >&5
14591echo "$as_me: error: Cannot determine library for db" >&2;}
14592   { (exit 1); exit 1; }; }
14593	elif test "$cf_cv_hashed_db_libs" != default ; then
14594		LIBS="-l$cf_cv_hashed_db_libs $LIBS"
14595	fi
14596fi
14597
14598else
14599
14600	{ { echo "$as_me:14596: error: Cannot find db.h" >&5
14601echo "$as_me: error: Cannot find db.h" >&2;}
14602   { (exit 1); exit 1; }; }
14603
14604fi
14605
14606fi
14607
14608if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
14609	CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14610	CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14611fi
14612
14613# Just in case, check if the C compiler has a bool type.
14614
14615echo "$as_me:14611: checking if we should include stdbool.h" >&5
14616echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14617
14618if test "${cf_cv_header_stdbool_h+set}" = set; then
14619  echo $ECHO_N "(cached) $ECHO_C" >&6
14620else
14621
14622	cat >conftest.$ac_ext <<_ACEOF
14623#line 14619 "configure"
14624#include "confdefs.h"
14625
14626int
14627main ()
14628{
14629bool foo = false
14630  ;
14631  return 0;
14632}
14633_ACEOF
14634rm -f conftest.$ac_objext
14635if { (eval echo "$as_me:14631: \"$ac_compile\"") >&5
14636  (eval $ac_compile) 2>&5
14637  ac_status=$?
14638  echo "$as_me:14634: \$? = $ac_status" >&5
14639  (exit $ac_status); } &&
14640         { ac_try='test -s conftest.$ac_objext'
14641  { (eval echo "$as_me:14637: \"$ac_try\"") >&5
14642  (eval $ac_try) 2>&5
14643  ac_status=$?
14644  echo "$as_me:14640: \$? = $ac_status" >&5
14645  (exit $ac_status); }; }; then
14646  cf_cv_header_stdbool_h=0
14647else
14648  echo "$as_me: failed program was:" >&5
14649cat conftest.$ac_ext >&5
14650cat >conftest.$ac_ext <<_ACEOF
14651#line 14647 "configure"
14652#include "confdefs.h"
14653
14654#ifndef __BEOS__
14655#include <stdbool.h>
14656#endif
14657
14658int
14659main ()
14660{
14661bool foo = false
14662  ;
14663  return 0;
14664}
14665_ACEOF
14666rm -f conftest.$ac_objext
14667if { (eval echo "$as_me:14663: \"$ac_compile\"") >&5
14668  (eval $ac_compile) 2>&5
14669  ac_status=$?
14670  echo "$as_me:14666: \$? = $ac_status" >&5
14671  (exit $ac_status); } &&
14672         { ac_try='test -s conftest.$ac_objext'
14673  { (eval echo "$as_me:14669: \"$ac_try\"") >&5
14674  (eval $ac_try) 2>&5
14675  ac_status=$?
14676  echo "$as_me:14672: \$? = $ac_status" >&5
14677  (exit $ac_status); }; }; then
14678  cf_cv_header_stdbool_h=1
14679else
14680  echo "$as_me: failed program was:" >&5
14681cat conftest.$ac_ext >&5
14682cf_cv_header_stdbool_h=0
14683fi
14684rm -f conftest.$ac_objext conftest.$ac_ext
14685fi
14686rm -f conftest.$ac_objext conftest.$ac_ext
14687fi
14688
14689if test "$cf_cv_header_stdbool_h" = 1
14690then	echo "$as_me:14686: result: yes" >&5
14691echo "${ECHO_T}yes" >&6
14692else	echo "$as_me:14688: result: no" >&5
14693echo "${ECHO_T}no" >&6
14694fi
14695
14696echo "$as_me:14692: checking for builtin bool type" >&5
14697echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14698
14699if test "${cf_cv_cc_bool_type+set}" = set; then
14700  echo $ECHO_N "(cached) $ECHO_C" >&6
14701else
14702
14703	cat >conftest.$ac_ext <<_ACEOF
14704#line 14700 "configure"
14705#include "confdefs.h"
14706
14707#include <stdio.h>
14708#include <sys/types.h>
14709
14710int
14711main ()
14712{
14713bool x = false
14714  ;
14715  return 0;
14716}
14717_ACEOF
14718rm -f conftest.$ac_objext
14719if { (eval echo "$as_me:14715: \"$ac_compile\"") >&5
14720  (eval $ac_compile) 2>&5
14721  ac_status=$?
14722  echo "$as_me:14718: \$? = $ac_status" >&5
14723  (exit $ac_status); } &&
14724         { ac_try='test -s conftest.$ac_objext'
14725  { (eval echo "$as_me:14721: \"$ac_try\"") >&5
14726  (eval $ac_try) 2>&5
14727  ac_status=$?
14728  echo "$as_me:14724: \$? = $ac_status" >&5
14729  (exit $ac_status); }; }; then
14730  cf_cv_cc_bool_type=1
14731else
14732  echo "$as_me: failed program was:" >&5
14733cat conftest.$ac_ext >&5
14734cf_cv_cc_bool_type=0
14735fi
14736rm -f conftest.$ac_objext conftest.$ac_ext
14737
14738fi
14739
14740if test "$cf_cv_cc_bool_type" = 1
14741then	echo "$as_me:14737: result: yes" >&5
14742echo "${ECHO_T}yes" >&6
14743else	echo "$as_me:14739: result: no" >&5
14744echo "${ECHO_T}no" >&6
14745fi
14746
14747# Check for C++ compiler characteristics (and ensure that it's there!)
14748if test -n "$CXX" ; then
14749	ac_ext=cc
14750ac_cpp='$CXXCPP $CPPFLAGS'
14751ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14752ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14753ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14754ac_main_return=return
14755
14756if test -n "$GXX" ; then
14757case $cf_cv_system_name in #(vi
14758os2*) #(vi
14759	cf_stdcpp_libname=stdcpp
14760	;;
14761*)
14762	cf_stdcpp_libname=stdc++
14763	;;
14764esac
14765echo "$as_me:14761: checking for library $cf_stdcpp_libname" >&5
14766echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
14767if test "${cf_cv_libstdcpp+set}" = set; then
14768  echo $ECHO_N "(cached) $ECHO_C" >&6
14769else
14770
14771	cf_save="$LIBS"
14772	LIBS="$LIBS -l$cf_stdcpp_libname"
14773cat >conftest.$ac_ext <<_ACEOF
14774#line 14770 "configure"
14775#include "confdefs.h"
14776
14777#include <strstream.h>
14778int
14779main ()
14780{
14781
14782char buf[80];
14783strstreambuf foo(buf, sizeof(buf))
14784
14785  ;
14786  return 0;
14787}
14788_ACEOF
14789rm -f conftest.$ac_objext conftest$ac_exeext
14790if { (eval echo "$as_me:14786: \"$ac_link\"") >&5
14791  (eval $ac_link) 2>&5
14792  ac_status=$?
14793  echo "$as_me:14789: \$? = $ac_status" >&5
14794  (exit $ac_status); } &&
14795         { ac_try='test -s conftest$ac_exeext'
14796  { (eval echo "$as_me:14792: \"$ac_try\"") >&5
14797  (eval $ac_try) 2>&5
14798  ac_status=$?
14799  echo "$as_me:14795: \$? = $ac_status" >&5
14800  (exit $ac_status); }; }; then
14801  cf_cv_libstdcpp=yes
14802else
14803  echo "$as_me: failed program was:" >&5
14804cat conftest.$ac_ext >&5
14805cf_cv_libstdcpp=no
14806fi
14807rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14808	LIBS="$cf_save"
14809
14810fi
14811echo "$as_me:14807: result: $cf_cv_libstdcpp" >&5
14812echo "${ECHO_T}$cf_cv_libstdcpp" >&6
14813test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
14814fi
14815
14816	echo "$as_me:14812: checking whether $CXX understands -c and -o together" >&5
14817echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
14818if test "${cf_cv_prog_CXX_c_o+set}" = set; then
14819  echo $ECHO_N "(cached) $ECHO_C" >&6
14820else
14821
14822cat > conftest.$ac_ext <<CF_EOF
14823#include <stdio.h>
14824int main()
14825{
14826	${cf_cv_main_return:-return}(0);
14827}
14828CF_EOF
14829# We do the test twice because some compilers refuse to overwrite an
14830# existing .o file with -o, though they will create one.
14831ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
14832if { (eval echo "$as_me:14828: \"$ac_try\"") >&5
14833  (eval $ac_try) 2>&5
14834  ac_status=$?
14835  echo "$as_me:14831: \$? = $ac_status" >&5
14836  (exit $ac_status); } &&
14837  test -f conftest2.$ac_objext && { (eval echo "$as_me:14833: \"$ac_try\"") >&5
14838  (eval $ac_try) 2>&5
14839  ac_status=$?
14840  echo "$as_me:14836: \$? = $ac_status" >&5
14841  (exit $ac_status); };
14842then
14843  eval cf_cv_prog_CXX_c_o=yes
14844else
14845  eval cf_cv_prog_CXX_c_o=no
14846fi
14847rm -f conftest*
14848
14849fi
14850if test $cf_cv_prog_CXX_c_o = yes; then
14851  echo "$as_me:14847: result: yes" >&5
14852echo "${ECHO_T}yes" >&6
14853else
14854  echo "$as_me:14850: result: no" >&5
14855echo "${ECHO_T}no" >&6
14856fi
14857
14858	case $GXX_VERSION in
14859	1*|2.0-6*)
14860		cf_cxx_library=yes
14861		;;
14862	*-2.7*|2.7*)
14863
14864cf_cxx_library=unknown
14865case $cf_cv_system_name in #(vi
14866os2*) #(vi
14867	cf_gpp_libname=gpp
14868	;;
14869*)
14870	cf_gpp_libname=g++
14871	;;
14872esac
14873if test "$GXX" = yes; then
14874	echo "$as_me:14870: checking for lib$cf_gpp_libname" >&5
14875echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
14876	cf_save="$LIBS"
14877	LIBS="$LIBS -l$cf_gpp_libname"
14878	cat >conftest.$ac_ext <<_ACEOF
14879#line 14875 "configure"
14880#include "confdefs.h"
14881
14882#include <$cf_gpp_libname/builtin.h>
14883
14884int
14885main ()
14886{
14887two_arg_error_handler_t foo2 = lib_error_handler
14888  ;
14889  return 0;
14890}
14891_ACEOF
14892rm -f conftest.$ac_objext conftest$ac_exeext
14893if { (eval echo "$as_me:14889: \"$ac_link\"") >&5
14894  (eval $ac_link) 2>&5
14895  ac_status=$?
14896  echo "$as_me:14892: \$? = $ac_status" >&5
14897  (exit $ac_status); } &&
14898         { ac_try='test -s conftest$ac_exeext'
14899  { (eval echo "$as_me:14895: \"$ac_try\"") >&5
14900  (eval $ac_try) 2>&5
14901  ac_status=$?
14902  echo "$as_me:14898: \$? = $ac_status" >&5
14903  (exit $ac_status); }; }; then
14904  cf_cxx_library=yes
14905	 CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14906	 if test "$cf_gpp_libname" = cpp ; then
14907	    cat >>confdefs.h <<\EOF
14908#define HAVE_GPP_BUILTIN_H 1
14909EOF
14910
14911	 else
14912	    cat >>confdefs.h <<\EOF
14913#define HAVE_GXX_BUILTIN_H 1
14914EOF
14915
14916	 fi
14917else
14918  echo "$as_me: failed program was:" >&5
14919cat conftest.$ac_ext >&5
14920cat >conftest.$ac_ext <<_ACEOF
14921#line 14917 "configure"
14922#include "confdefs.h"
14923
14924#include <builtin.h>
14925
14926int
14927main ()
14928{
14929two_arg_error_handler_t foo2 = lib_error_handler
14930  ;
14931  return 0;
14932}
14933_ACEOF
14934rm -f conftest.$ac_objext conftest$ac_exeext
14935if { (eval echo "$as_me:14931: \"$ac_link\"") >&5
14936  (eval $ac_link) 2>&5
14937  ac_status=$?
14938  echo "$as_me:14934: \$? = $ac_status" >&5
14939  (exit $ac_status); } &&
14940         { ac_try='test -s conftest$ac_exeext'
14941  { (eval echo "$as_me:14937: \"$ac_try\"") >&5
14942  (eval $ac_try) 2>&5
14943  ac_status=$?
14944  echo "$as_me:14940: \$? = $ac_status" >&5
14945  (exit $ac_status); }; }; then
14946  cf_cxx_library=yes
14947	 CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14948	 cat >>confdefs.h <<\EOF
14949#define HAVE_BUILTIN_H 1
14950EOF
14951
14952else
14953  echo "$as_me: failed program was:" >&5
14954cat conftest.$ac_ext >&5
14955cf_cxx_library=no
14956fi
14957rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14958fi
14959rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14960	LIBS="$cf_save"
14961	echo "$as_me:14957: result: $cf_cxx_library" >&5
14962echo "${ECHO_T}$cf_cxx_library" >&6
14963fi
14964
14965		;;
14966	*)
14967		cf_cxx_library=no
14968		;;
14969	esac
14970
14971	ac_ext=cc
14972ac_cpp='$CXXCPP $CPPFLAGS'
14973ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14974ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14975ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14976ac_main_return=return
14977echo "$as_me:14973: checking how to run the C++ preprocessor" >&5
14978echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
14979if test -z "$CXXCPP"; then
14980  if test "${ac_cv_prog_CXXCPP+set}" = set; then
14981  echo $ECHO_N "(cached) $ECHO_C" >&6
14982else
14983      # Double quotes because CXXCPP needs to be expanded
14984    for CXXCPP in "$CXX -E" "/lib/cpp"
14985    do
14986      ac_preproc_ok=false
14987for ac_cxx_preproc_warn_flag in '' yes
14988do
14989  # Use a header file that comes with gcc, so configuring glibc
14990  # with a fresh cross-compiler works.
14991  # On the NeXT, cc -E runs the code through the compiler's parser,
14992  # not just through cpp. "Syntax error" is here to catch this case.
14993  cat >conftest.$ac_ext <<_ACEOF
14994#line 14990 "configure"
14995#include "confdefs.h"
14996#include <assert.h>
14997                     Syntax error
14998_ACEOF
14999if { (eval echo "$as_me:14995: \"$ac_cpp conftest.$ac_ext\"") >&5
15000  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15001  ac_status=$?
15002  egrep -v '^ *\+' conftest.er1 >conftest.err
15003  rm -f conftest.er1
15004  cat conftest.err >&5
15005  echo "$as_me:15001: \$? = $ac_status" >&5
15006  (exit $ac_status); } >/dev/null; then
15007  if test -s conftest.err; then
15008    ac_cpp_err=$ac_cxx_preproc_warn_flag
15009  else
15010    ac_cpp_err=
15011  fi
15012else
15013  ac_cpp_err=yes
15014fi
15015if test -z "$ac_cpp_err"; then
15016  :
15017else
15018  echo "$as_me: failed program was:" >&5
15019  cat conftest.$ac_ext >&5
15020  # Broken: fails on valid input.
15021continue
15022fi
15023rm -f conftest.err conftest.$ac_ext
15024
15025  # OK, works on sane cases.  Now check whether non-existent headers
15026  # can be detected and how.
15027  cat >conftest.$ac_ext <<_ACEOF
15028#line 15024 "configure"
15029#include "confdefs.h"
15030#include <ac_nonexistent.h>
15031_ACEOF
15032if { (eval echo "$as_me:15028: \"$ac_cpp conftest.$ac_ext\"") >&5
15033  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15034  ac_status=$?
15035  egrep -v '^ *\+' conftest.er1 >conftest.err
15036  rm -f conftest.er1
15037  cat conftest.err >&5
15038  echo "$as_me:15034: \$? = $ac_status" >&5
15039  (exit $ac_status); } >/dev/null; then
15040  if test -s conftest.err; then
15041    ac_cpp_err=$ac_cxx_preproc_warn_flag
15042  else
15043    ac_cpp_err=
15044  fi
15045else
15046  ac_cpp_err=yes
15047fi
15048if test -z "$ac_cpp_err"; then
15049  # Broken: success on invalid input.
15050continue
15051else
15052  echo "$as_me: failed program was:" >&5
15053  cat conftest.$ac_ext >&5
15054  # Passes both tests.
15055ac_preproc_ok=:
15056break
15057fi
15058rm -f conftest.err conftest.$ac_ext
15059
15060done
15061# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15062rm -f conftest.err conftest.$ac_ext
15063if $ac_preproc_ok; then
15064  break
15065fi
15066
15067    done
15068    ac_cv_prog_CXXCPP=$CXXCPP
15069
15070fi
15071  CXXCPP=$ac_cv_prog_CXXCPP
15072else
15073  ac_cv_prog_CXXCPP=$CXXCPP
15074fi
15075echo "$as_me:15071: result: $CXXCPP" >&5
15076echo "${ECHO_T}$CXXCPP" >&6
15077ac_preproc_ok=false
15078for ac_cxx_preproc_warn_flag in '' yes
15079do
15080  # Use a header file that comes with gcc, so configuring glibc
15081  # with a fresh cross-compiler works.
15082  # On the NeXT, cc -E runs the code through the compiler's parser,
15083  # not just through cpp. "Syntax error" is here to catch this case.
15084  cat >conftest.$ac_ext <<_ACEOF
15085#line 15081 "configure"
15086#include "confdefs.h"
15087#include <assert.h>
15088                     Syntax error
15089_ACEOF
15090if { (eval echo "$as_me:15086: \"$ac_cpp conftest.$ac_ext\"") >&5
15091  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15092  ac_status=$?
15093  egrep -v '^ *\+' conftest.er1 >conftest.err
15094  rm -f conftest.er1
15095  cat conftest.err >&5
15096  echo "$as_me:15092: \$? = $ac_status" >&5
15097  (exit $ac_status); } >/dev/null; then
15098  if test -s conftest.err; then
15099    ac_cpp_err=$ac_cxx_preproc_warn_flag
15100  else
15101    ac_cpp_err=
15102  fi
15103else
15104  ac_cpp_err=yes
15105fi
15106if test -z "$ac_cpp_err"; then
15107  :
15108else
15109  echo "$as_me: failed program was:" >&5
15110  cat conftest.$ac_ext >&5
15111  # Broken: fails on valid input.
15112continue
15113fi
15114rm -f conftest.err conftest.$ac_ext
15115
15116  # OK, works on sane cases.  Now check whether non-existent headers
15117  # can be detected and how.
15118  cat >conftest.$ac_ext <<_ACEOF
15119#line 15115 "configure"
15120#include "confdefs.h"
15121#include <ac_nonexistent.h>
15122_ACEOF
15123if { (eval echo "$as_me:15119: \"$ac_cpp conftest.$ac_ext\"") >&5
15124  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15125  ac_status=$?
15126  egrep -v '^ *\+' conftest.er1 >conftest.err
15127  rm -f conftest.er1
15128  cat conftest.err >&5
15129  echo "$as_me:15125: \$? = $ac_status" >&5
15130  (exit $ac_status); } >/dev/null; then
15131  if test -s conftest.err; then
15132    ac_cpp_err=$ac_cxx_preproc_warn_flag
15133  else
15134    ac_cpp_err=
15135  fi
15136else
15137  ac_cpp_err=yes
15138fi
15139if test -z "$ac_cpp_err"; then
15140  # Broken: success on invalid input.
15141continue
15142else
15143  echo "$as_me: failed program was:" >&5
15144  cat conftest.$ac_ext >&5
15145  # Passes both tests.
15146ac_preproc_ok=:
15147break
15148fi
15149rm -f conftest.err conftest.$ac_ext
15150
15151done
15152# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15153rm -f conftest.err conftest.$ac_ext
15154if $ac_preproc_ok; then
15155  :
15156else
15157  { { echo "$as_me:15153: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
15158echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
15159   { (exit 1); exit 1; }; }
15160fi
15161
15162ac_ext=cc
15163ac_cpp='$CXXCPP $CPPFLAGS'
15164ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15165ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15166ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15167ac_main_return=return
15168
15169for ac_header in iostream typeinfo
15170do
15171as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15172echo "$as_me:15168: checking for $ac_header" >&5
15173echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15174if eval "test \"\${$as_ac_Header+set}\" = set"; then
15175  echo $ECHO_N "(cached) $ECHO_C" >&6
15176else
15177  cat >conftest.$ac_ext <<_ACEOF
15178#line 15174 "configure"
15179#include "confdefs.h"
15180#include <$ac_header>
15181_ACEOF
15182if { (eval echo "$as_me:15178: \"$ac_cpp conftest.$ac_ext\"") >&5
15183  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15184  ac_status=$?
15185  egrep -v '^ *\+' conftest.er1 >conftest.err
15186  rm -f conftest.er1
15187  cat conftest.err >&5
15188  echo "$as_me:15184: \$? = $ac_status" >&5
15189  (exit $ac_status); } >/dev/null; then
15190  if test -s conftest.err; then
15191    ac_cpp_err=$ac_cxx_preproc_warn_flag
15192  else
15193    ac_cpp_err=
15194  fi
15195else
15196  ac_cpp_err=yes
15197fi
15198if test -z "$ac_cpp_err"; then
15199  eval "$as_ac_Header=yes"
15200else
15201  echo "$as_me: failed program was:" >&5
15202  cat conftest.$ac_ext >&5
15203  eval "$as_ac_Header=no"
15204fi
15205rm -f conftest.err conftest.$ac_ext
15206fi
15207echo "$as_me:15203: result: `eval echo '${'$as_ac_Header'}'`" >&5
15208echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15209if test `eval echo '${'$as_ac_Header'}'` = yes; then
15210  cat >>confdefs.h <<EOF
15211#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15212EOF
15213
15214fi
15215done
15216
15217    if test x"$ac_cv_header_iostream" = xyes ; then
15218        echo "$as_me:15214: checking if iostream uses std-namespace" >&5
15219echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
15220        cat >conftest.$ac_ext <<_ACEOF
15221#line 15217 "configure"
15222#include "confdefs.h"
15223
15224#include <iostream>
15225using std::endl;
15226using std::cerr;
15227int
15228main ()
15229{
15230
15231cerr << "testing" << endl;
15232
15233  ;
15234  return 0;
15235}
15236_ACEOF
15237rm -f conftest.$ac_objext
15238if { (eval echo "$as_me:15234: \"$ac_compile\"") >&5
15239  (eval $ac_compile) 2>&5
15240  ac_status=$?
15241  echo "$as_me:15237: \$? = $ac_status" >&5
15242  (exit $ac_status); } &&
15243         { ac_try='test -s conftest.$ac_objext'
15244  { (eval echo "$as_me:15240: \"$ac_try\"") >&5
15245  (eval $ac_try) 2>&5
15246  ac_status=$?
15247  echo "$as_me:15243: \$? = $ac_status" >&5
15248  (exit $ac_status); }; }; then
15249  cf_iostream_namespace=yes
15250else
15251  echo "$as_me: failed program was:" >&5
15252cat conftest.$ac_ext >&5
15253cf_iostream_namespace=no
15254fi
15255rm -f conftest.$ac_objext conftest.$ac_ext
15256        echo "$as_me:15252: result: $cf_iostream_namespace" >&5
15257echo "${ECHO_T}$cf_iostream_namespace" >&6
15258        if test "$cf_iostream_namespace" = yes ; then
15259            cat >>confdefs.h <<\EOF
15260#define IOSTREAM_NAMESPACE 1
15261EOF
15262
15263        fi
15264    fi
15265
15266echo "$as_me:15262: checking if we should include stdbool.h" >&5
15267echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15268
15269if test "${cf_cv_header_stdbool_h+set}" = set; then
15270  echo $ECHO_N "(cached) $ECHO_C" >&6
15271else
15272
15273	cat >conftest.$ac_ext <<_ACEOF
15274#line 15270 "configure"
15275#include "confdefs.h"
15276
15277int
15278main ()
15279{
15280bool foo = false
15281  ;
15282  return 0;
15283}
15284_ACEOF
15285rm -f conftest.$ac_objext
15286if { (eval echo "$as_me:15282: \"$ac_compile\"") >&5
15287  (eval $ac_compile) 2>&5
15288  ac_status=$?
15289  echo "$as_me:15285: \$? = $ac_status" >&5
15290  (exit $ac_status); } &&
15291         { ac_try='test -s conftest.$ac_objext'
15292  { (eval echo "$as_me:15288: \"$ac_try\"") >&5
15293  (eval $ac_try) 2>&5
15294  ac_status=$?
15295  echo "$as_me:15291: \$? = $ac_status" >&5
15296  (exit $ac_status); }; }; then
15297  cf_cv_header_stdbool_h=0
15298else
15299  echo "$as_me: failed program was:" >&5
15300cat conftest.$ac_ext >&5
15301cat >conftest.$ac_ext <<_ACEOF
15302#line 15298 "configure"
15303#include "confdefs.h"
15304
15305#ifndef __BEOS__
15306#include <stdbool.h>
15307#endif
15308
15309int
15310main ()
15311{
15312bool foo = false
15313  ;
15314  return 0;
15315}
15316_ACEOF
15317rm -f conftest.$ac_objext
15318if { (eval echo "$as_me:15314: \"$ac_compile\"") >&5
15319  (eval $ac_compile) 2>&5
15320  ac_status=$?
15321  echo "$as_me:15317: \$? = $ac_status" >&5
15322  (exit $ac_status); } &&
15323         { ac_try='test -s conftest.$ac_objext'
15324  { (eval echo "$as_me:15320: \"$ac_try\"") >&5
15325  (eval $ac_try) 2>&5
15326  ac_status=$?
15327  echo "$as_me:15323: \$? = $ac_status" >&5
15328  (exit $ac_status); }; }; then
15329  cf_cv_header_stdbool_h=1
15330else
15331  echo "$as_me: failed program was:" >&5
15332cat conftest.$ac_ext >&5
15333cf_cv_header_stdbool_h=0
15334fi
15335rm -f conftest.$ac_objext conftest.$ac_ext
15336fi
15337rm -f conftest.$ac_objext conftest.$ac_ext
15338fi
15339
15340if test "$cf_cv_header_stdbool_h" = 1
15341then	echo "$as_me:15337: result: yes" >&5
15342echo "${ECHO_T}yes" >&6
15343else	echo "$as_me:15339: result: no" >&5
15344echo "${ECHO_T}no" >&6
15345fi
15346
15347echo "$as_me:15343: checking for builtin bool type" >&5
15348echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15349
15350if test "${cf_cv_builtin_bool+set}" = set; then
15351  echo $ECHO_N "(cached) $ECHO_C" >&6
15352else
15353
15354	cat >conftest.$ac_ext <<_ACEOF
15355#line 15351 "configure"
15356#include "confdefs.h"
15357
15358#include <stdio.h>
15359#include <sys/types.h>
15360
15361int
15362main ()
15363{
15364bool x = false
15365  ;
15366  return 0;
15367}
15368_ACEOF
15369rm -f conftest.$ac_objext
15370if { (eval echo "$as_me:15366: \"$ac_compile\"") >&5
15371  (eval $ac_compile) 2>&5
15372  ac_status=$?
15373  echo "$as_me:15369: \$? = $ac_status" >&5
15374  (exit $ac_status); } &&
15375         { ac_try='test -s conftest.$ac_objext'
15376  { (eval echo "$as_me:15372: \"$ac_try\"") >&5
15377  (eval $ac_try) 2>&5
15378  ac_status=$?
15379  echo "$as_me:15375: \$? = $ac_status" >&5
15380  (exit $ac_status); }; }; then
15381  cf_cv_builtin_bool=1
15382else
15383  echo "$as_me: failed program was:" >&5
15384cat conftest.$ac_ext >&5
15385cf_cv_builtin_bool=0
15386fi
15387rm -f conftest.$ac_objext conftest.$ac_ext
15388
15389fi
15390
15391if test "$cf_cv_builtin_bool" = 1
15392then	echo "$as_me:15388: result: yes" >&5
15393echo "${ECHO_T}yes" >&6
15394else	echo "$as_me:15390: result: no" >&5
15395echo "${ECHO_T}no" >&6
15396fi
15397
15398echo "$as_me:15394: checking for size of bool" >&5
15399echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15400if test "${cf_cv_type_of_bool+set}" = set; then
15401  echo $ECHO_N "(cached) $ECHO_C" >&6
15402else
15403
15404	rm -f cf_test.out
15405	if test "$cross_compiling" = yes; then
15406  cf_cv_type_of_bool=unknown
15407else
15408  cat >conftest.$ac_ext <<_ACEOF
15409#line 15405 "configure"
15410#include "confdefs.h"
15411
15412#include <stdlib.h>
15413#include <stdio.h>
15414
15415#if defined(__cplusplus)
15416
15417#ifdef HAVE_GXX_BUILTIN_H
15418#include <g++/builtin.h>
15419#elif HAVE_GPP_BUILTIN_H
15420#include <gpp/builtin.h>
15421#elif HAVE_BUILTIN_H
15422#include <builtin.h>
15423#endif
15424
15425#else
15426
15427#if $cf_cv_header_stdbool_h
15428#include <stdbool.h>
15429#endif
15430
15431#endif
15432
15433main()
15434{
15435	FILE *fp = fopen("cf_test.out", "w");
15436	if (fp != 0) {
15437		bool x = true;
15438		if ((bool)(-x) >= 0)
15439			fputs("unsigned ", fp);
15440		if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15441		else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15442		else if (sizeof(x) == sizeof(short))fputs("short",fp);
15443		else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15444		fclose(fp);
15445	}
15446	${cf_cv_main_return:-return}(0);
15447}
15448
15449_ACEOF
15450rm -f conftest$ac_exeext
15451if { (eval echo "$as_me:15447: \"$ac_link\"") >&5
15452  (eval $ac_link) 2>&5
15453  ac_status=$?
15454  echo "$as_me:15450: \$? = $ac_status" >&5
15455  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15456  { (eval echo "$as_me:15452: \"$ac_try\"") >&5
15457  (eval $ac_try) 2>&5
15458  ac_status=$?
15459  echo "$as_me:15455: \$? = $ac_status" >&5
15460  (exit $ac_status); }; }; then
15461  cf_cv_type_of_bool=`cat cf_test.out`
15462		 if test -z "$cf_cv_type_of_bool"; then
15463		   cf_cv_type_of_bool=unknown
15464		 fi
15465else
15466  echo "$as_me: program exited with status $ac_status" >&5
15467echo "$as_me: failed program was:" >&5
15468cat conftest.$ac_ext >&5
15469cf_cv_type_of_bool=unknown
15470fi
15471rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15472fi
15473
15474fi
15475
15476	rm -f cf_test.out
15477echo "$as_me:15473: result: $cf_cv_type_of_bool" >&5
15478echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15479if test "$cf_cv_type_of_bool" = unknown ; then
15480	case .$NCURSES_BOOL in #(vi
15481	.auto|.) NCURSES_BOOL=unsigned;;
15482	esac
15483	{ echo "$as_me:15479: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15484echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15485	cf_cv_type_of_bool=$NCURSES_BOOL
15486fi
15487
15488echo "$as_me:15484: checking for special defines needed for etip.h" >&5
15489echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
15490cf_save_CXXFLAGS="$CXXFLAGS"
15491cf_result="none"
15492for cf_math in "" MATH_H
15493do
15494for cf_excp in "" MATH_EXCEPTION
15495do
15496	CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
15497	test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
15498	test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
15499cat >conftest.$ac_ext <<_ACEOF
15500#line 15496 "configure"
15501#include "confdefs.h"
15502
15503#include <etip.h.in>
15504
15505int
15506main ()
15507{
15508
15509  ;
15510  return 0;
15511}
15512_ACEOF
15513rm -f conftest.$ac_objext
15514if { (eval echo "$as_me:15510: \"$ac_compile\"") >&5
15515  (eval $ac_compile) 2>&5
15516  ac_status=$?
15517  echo "$as_me:15513: \$? = $ac_status" >&5
15518  (exit $ac_status); } &&
15519         { ac_try='test -s conftest.$ac_objext'
15520  { (eval echo "$as_me:15516: \"$ac_try\"") >&5
15521  (eval $ac_try) 2>&5
15522  ac_status=$?
15523  echo "$as_me:15519: \$? = $ac_status" >&5
15524  (exit $ac_status); }; }; then
15525
15526	test -n "$cf_math" && cat >>confdefs.h <<EOF
15527#define ETIP_NEEDS_${cf_math} 1
15528EOF
15529
15530	test -n "$cf_excp" && cat >>confdefs.h <<EOF
15531#define ETIP_NEEDS_${cf_excp} 1
15532EOF
15533
15534	cf_result="$cf_math $cf_excp"
15535	break
15536
15537else
15538  echo "$as_me: failed program was:" >&5
15539cat conftest.$ac_ext >&5
15540fi
15541rm -f conftest.$ac_objext conftest.$ac_ext
15542done
15543done
15544echo "$as_me:15540: result: $cf_result" >&5
15545echo "${ECHO_T}$cf_result" >&6
15546CXXFLAGS="$cf_save_CXXFLAGS"
15547
15548if test -n "$CXX"; then
15549echo "$as_me:15545: checking if $CXX accepts parameter initialization" >&5
15550echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
15551if test "${cf_cv_cpp_param_init+set}" = set; then
15552  echo $ECHO_N "(cached) $ECHO_C" >&6
15553else
15554
15555	ac_ext=cc
15556ac_cpp='$CXXCPP $CPPFLAGS'
15557ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15558ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15559ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15560ac_main_return=return
15561
15562	if test "$cross_compiling" = yes; then
15563  cf_cv_cpp_param_init=unknown
15564else
15565  cat >conftest.$ac_ext <<_ACEOF
15566#line 15562 "configure"
15567#include "confdefs.h"
15568
15569class TEST {
15570private:
15571	int value;
15572public:
15573	TEST(int x = 1);
15574	~TEST();
15575};
15576
15577TEST::TEST(int x = 1)	// some compilers do not like second initializer
15578{
15579	value = x;
15580}
15581void main() { }
15582
15583_ACEOF
15584rm -f conftest$ac_exeext
15585if { (eval echo "$as_me:15581: \"$ac_link\"") >&5
15586  (eval $ac_link) 2>&5
15587  ac_status=$?
15588  echo "$as_me:15584: \$? = $ac_status" >&5
15589  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15590  { (eval echo "$as_me:15586: \"$ac_try\"") >&5
15591  (eval $ac_try) 2>&5
15592  ac_status=$?
15593  echo "$as_me:15589: \$? = $ac_status" >&5
15594  (exit $ac_status); }; }; then
15595  cf_cv_cpp_param_init=yes
15596else
15597  echo "$as_me: program exited with status $ac_status" >&5
15598echo "$as_me: failed program was:" >&5
15599cat conftest.$ac_ext >&5
15600cf_cv_cpp_param_init=no
15601fi
15602rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15603fi
15604	ac_ext=cc
15605ac_cpp='$CXXCPP $CPPFLAGS'
15606ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15607ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15608ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15609ac_main_return=return
15610
15611fi
15612echo "$as_me:15608: result: $cf_cv_cpp_param_init" >&5
15613echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
15614fi
15615test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
15616#define CPP_HAS_PARAM_INIT 1
15617EOF
15618
15619if test -n "$CXX"; then
15620
15621echo "$as_me:15617: checking if $CXX accepts static_cast" >&5
15622echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
15623if test "${cf_cv_cpp_static_cast+set}" = set; then
15624  echo $ECHO_N "(cached) $ECHO_C" >&6
15625else
15626
15627	ac_ext=cc
15628ac_cpp='$CXXCPP $CPPFLAGS'
15629ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15630ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15631ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15632ac_main_return=return
15633
15634	cat >conftest.$ac_ext <<_ACEOF
15635#line 15631 "configure"
15636#include "confdefs.h"
15637
15638class NCursesPanel
15639{
15640public:
15641  NCursesPanel(int nlines,
15642	       int ncols,
15643	       int begin_y = 0,
15644	       int begin_x = 0)
15645  {
15646  }
15647
15648  ~NCursesPanel();
15649};
15650
15651template<class T> class NCursesUserPanel : public NCursesPanel
15652{
15653public:
15654  NCursesUserPanel (int nlines,
15655		    int ncols,
15656		    int begin_y = 0,
15657		    int begin_x = 0,
15658		    const T* p_UserData = static_cast<T*>(0))
15659    : NCursesPanel (nlines, ncols, begin_y, begin_x)
15660  {
15661  };
15662  NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
15663  {
15664  };
15665
15666  virtual ~NCursesUserPanel() {};
15667};
15668
15669int
15670main ()
15671{
15672
15673	const char* p_UserData = static_cast<char*>(0)
15674  ;
15675  return 0;
15676}
15677_ACEOF
15678rm -f conftest.$ac_objext
15679if { (eval echo "$as_me:15675: \"$ac_compile\"") >&5
15680  (eval $ac_compile) 2>&5
15681  ac_status=$?
15682  echo "$as_me:15678: \$? = $ac_status" >&5
15683  (exit $ac_status); } &&
15684         { ac_try='test -s conftest.$ac_objext'
15685  { (eval echo "$as_me:15681: \"$ac_try\"") >&5
15686  (eval $ac_try) 2>&5
15687  ac_status=$?
15688  echo "$as_me:15684: \$? = $ac_status" >&5
15689  (exit $ac_status); }; }; then
15690  cf_cv_cpp_static_cast=yes
15691else
15692  echo "$as_me: failed program was:" >&5
15693cat conftest.$ac_ext >&5
15694cf_cv_cpp_static_cast=no
15695fi
15696rm -f conftest.$ac_objext conftest.$ac_ext
15697
15698	ac_ext=cc
15699ac_cpp='$CXXCPP $CPPFLAGS'
15700ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15701ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15702ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15703ac_main_return=return
15704
15705fi
15706echo "$as_me:15702: result: $cf_cv_cpp_static_cast" >&5
15707echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
15708
15709fi
15710
15711test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
15712#define CPP_HAS_STATIC_CAST 1
15713EOF
15714
15715	CXX_AR='$(AR)'
15716	CXX_AR_OPTS='$(AR_OPTS)'
15717	case $cf_cv_system_name in #(vi
15718	irix*) #(vi
15719	    if test "$GXX" != yes ; then
15720		CXX_AR='$(CXX)'
15721		CXX_AR_OPTS='-ar -o'
15722	    fi
15723	    ;;
15724	sco3.2v5*) #(vi
15725	    CXXLDFLAGS="-u main"
15726	    ;;
15727	solaris2*)
15728	    if test "$GXX" != yes ; then
15729		CXX_AR='$(CXX)'
15730		CXX_AR_OPTS='-xar -o'
15731	    fi
15732	    ;;
15733	esac
15734
15735else
15736	cf_cxx_library=no
15737	cf_cv_builtin_bool=1
15738
15739	# Just because we are not configuring against C++ right now does not
15740	# mean that a user will not want to use C++.  Some distributors disable
15741	# the C++ portion of this configuration as a shortcut (or just to avoid
15742	# compiling the demo in the c++ directory).  So we need a reasonable
15743	# default for the 'bool' type.
15744	#
15745	# Caveat: since the storage of the bool type is not standardized, it
15746	# may change.
15747
15748	if test "$NCURSES_BOOL" != auto ; then
15749		cf_cv_type_of_bool=$NCURSES_BOOL
15750		cf_cv_header_stdbool_h=0
15751	else
15752		if test "$cf_cv_header_stdbool_h" = 1 ; then
15753
15754echo "$as_me:15750: checking for size of bool" >&5
15755echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15756if test "${cf_cv_type_of_bool+set}" = set; then
15757  echo $ECHO_N "(cached) $ECHO_C" >&6
15758else
15759
15760	rm -f cf_test.out
15761	if test "$cross_compiling" = yes; then
15762  cf_cv_type_of_bool=unknown
15763else
15764  cat >conftest.$ac_ext <<_ACEOF
15765#line 15761 "configure"
15766#include "confdefs.h"
15767
15768#include <stdlib.h>
15769#include <stdio.h>
15770
15771#if defined(__cplusplus)
15772
15773#ifdef HAVE_GXX_BUILTIN_H
15774#include <g++/builtin.h>
15775#elif HAVE_GPP_BUILTIN_H
15776#include <gpp/builtin.h>
15777#elif HAVE_BUILTIN_H
15778#include <builtin.h>
15779#endif
15780
15781#else
15782
15783#if $cf_cv_header_stdbool_h
15784#include <stdbool.h>
15785#endif
15786
15787#endif
15788
15789main()
15790{
15791	FILE *fp = fopen("cf_test.out", "w");
15792	if (fp != 0) {
15793		bool x = true;
15794		if ((bool)(-x) >= 0)
15795			fputs("unsigned ", fp);
15796		if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15797		else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15798		else if (sizeof(x) == sizeof(short))fputs("short",fp);
15799		else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15800		fclose(fp);
15801	}
15802	${cf_cv_main_return:-return}(0);
15803}
15804
15805_ACEOF
15806rm -f conftest$ac_exeext
15807if { (eval echo "$as_me:15803: \"$ac_link\"") >&5
15808  (eval $ac_link) 2>&5
15809  ac_status=$?
15810  echo "$as_me:15806: \$? = $ac_status" >&5
15811  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15812  { (eval echo "$as_me:15808: \"$ac_try\"") >&5
15813  (eval $ac_try) 2>&5
15814  ac_status=$?
15815  echo "$as_me:15811: \$? = $ac_status" >&5
15816  (exit $ac_status); }; }; then
15817  cf_cv_type_of_bool=`cat cf_test.out`
15818		 if test -z "$cf_cv_type_of_bool"; then
15819		   cf_cv_type_of_bool=unknown
15820		 fi
15821else
15822  echo "$as_me: program exited with status $ac_status" >&5
15823echo "$as_me: failed program was:" >&5
15824cat conftest.$ac_ext >&5
15825cf_cv_type_of_bool=unknown
15826fi
15827rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15828fi
15829
15830fi
15831
15832	rm -f cf_test.out
15833echo "$as_me:15829: result: $cf_cv_type_of_bool" >&5
15834echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15835if test "$cf_cv_type_of_bool" = unknown ; then
15836	case .$NCURSES_BOOL in #(vi
15837	.auto|.) NCURSES_BOOL=unsigned;;
15838	esac
15839	{ echo "$as_me:15835: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15840echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15841	cf_cv_type_of_bool=$NCURSES_BOOL
15842fi
15843
15844		else
15845			echo "$as_me:15841: checking for fallback type of bool" >&5
15846echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
15847			case "$host_cpu" in #(vi
15848			i?86)	cf_cv_type_of_bool=char	;; #(vi
15849			*)	cf_cv_type_of_bool=int	;;
15850			esac
15851			echo "$as_me:15847: result: $cf_cv_type_of_bool" >&5
15852echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15853		fi
15854	fi
15855fi
15856
15857# If the C compiler did not declare bool, and we did not determine that the C++
15858# compiler does not declare bool, turn on an ifdef in curses.h that makes the
15859# ncurses library use the same type as C++ bool.  Note that this allows one to
15860# specify the type of bool in a configure-script option and postpone
15861# integration with the C++ compiler provided that the types are compatible.
15862USE_CXX_BOOL=1
15863if test $cf_cv_cc_bool_type = 1
15864then
15865	# oops: C has a bool.  Unlikely, but C++ could differ.
15866	USE_CXX_BOOL=0
15867elif test $cf_cv_builtin_bool = 0
15868then
15869	# C++ has no bool
15870	USE_CXX_BOOL=0
15871else
15872	# this is the normal case
15873	USE_CXX_BOOL='defined(__cplusplus)'
15874fi
15875
15876if test -f "${srcdir}/Ada95/Makefile.in" ; then
15877
15878if test "$cf_with_ada" != "no" ; then
15879    if test "$with_libtool" != "no"; then
15880	{ echo "$as_me:15876: WARNING: libtool does not support Ada - disabling feature" >&5
15881echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
15882	cf_with_ada=no
15883    fi
15884fi
15885
15886if test "$cf_with_ada" != "no" ; then
15887cf_ada_make=gnatmake
15888# Extract the first word of "$cf_ada_make", so it can be a program name with args.
15889set dummy $cf_ada_make; ac_word=$2
15890echo "$as_me:15886: checking for $ac_word" >&5
15891echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15892if test "${ac_cv_prog_gnat_exists+set}" = set; then
15893  echo $ECHO_N "(cached) $ECHO_C" >&6
15894else
15895  if test -n "$gnat_exists"; then
15896  ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
15897else
15898  ac_save_IFS=$IFS; IFS=$ac_path_separator
15899ac_dummy="$PATH"
15900for ac_dir in $ac_dummy; do
15901  IFS=$ac_save_IFS
15902  test -z "$ac_dir" && ac_dir=.
15903  $as_executable_p "$ac_dir/$ac_word" || continue
15904ac_cv_prog_gnat_exists="yes"
15905echo "$as_me:15901: found $ac_dir/$ac_word" >&5
15906break
15907done
15908
15909  test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
15910fi
15911fi
15912gnat_exists=$ac_cv_prog_gnat_exists
15913if test -n "$gnat_exists"; then
15914  echo "$as_me:15910: result: $gnat_exists" >&5
15915echo "${ECHO_T}$gnat_exists" >&6
15916else
15917  echo "$as_me:15913: result: no" >&5
15918echo "${ECHO_T}no" >&6
15919fi
15920
15921if test "$ac_cv_prog_gnat_exists" = no; then
15922   cf_ada_make=
15923else
15924
15925echo "$as_me:15921: checking for gnat version" >&5
15926echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
15927cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
15928  sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
15929echo "$as_me:15925: result: $cf_gnat_version" >&5
15930echo "${ECHO_T}$cf_gnat_version" >&6
15931
15932case $cf_gnat_version in
15933  3.1[1-9]*|3.[2-9]*|[4-9].*)
15934    cf_cv_prog_gnat_correct=yes
15935    ;;
15936  *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
15937     cf_cv_prog_gnat_correct=no
15938     ;;
15939esac
15940case $cf_gnat_version in
15941  3.[1-9]*|[4-9].*)
15942      cf_compile_generics=generics
15943      cf_generic_objects="\${GENOBJS}"
15944      ;;
15945  *)  cf_compile_generics=
15946      cf_generic_objects=
15947      ;;
15948esac
15949
15950   # Extract the first word of "m4", so it can be a program name with args.
15951set dummy m4; ac_word=$2
15952echo "$as_me:15948: checking for $ac_word" >&5
15953echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15954if test "${ac_cv_prog_M4_exists+set}" = set; then
15955  echo $ECHO_N "(cached) $ECHO_C" >&6
15956else
15957  if test -n "$M4_exists"; then
15958  ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
15959else
15960  ac_save_IFS=$IFS; IFS=$ac_path_separator
15961ac_dummy="$PATH"
15962for ac_dir in $ac_dummy; do
15963  IFS=$ac_save_IFS
15964  test -z "$ac_dir" && ac_dir=.
15965  $as_executable_p "$ac_dir/$ac_word" || continue
15966ac_cv_prog_M4_exists="yes"
15967echo "$as_me:15963: found $ac_dir/$ac_word" >&5
15968break
15969done
15970
15971  test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
15972fi
15973fi
15974M4_exists=$ac_cv_prog_M4_exists
15975if test -n "$M4_exists"; then
15976  echo "$as_me:15972: result: $M4_exists" >&5
15977echo "${ECHO_T}$M4_exists" >&6
15978else
15979  echo "$as_me:15975: result: no" >&5
15980echo "${ECHO_T}no" >&6
15981fi
15982
15983   if test "$ac_cv_prog_M4_exists" = no; then
15984      cf_cv_prog_gnat_correct=no
15985      echo Ada95 binding required program m4 not found. Ada95 binding disabled.
15986   fi
15987   if test "$cf_cv_prog_gnat_correct" = yes; then
15988      echo "$as_me:15984: checking if GNAT works" >&5
15989echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
15990
15991rm -f conftest*
15992cat >>conftest.ads <<CF_EOF
15993procedure conftest;
15994CF_EOF
15995cat >>conftest.adb <<CF_EOF
15996with Text_IO;
15997with GNAT.OS_Lib;
15998procedure conftest is
15999begin
16000   Text_IO.Put ("Hello World");
16001   Text_IO.New_Line;
16002   GNAT.OS_Lib.OS_Exit (0);
16003end conftest;
16004CF_EOF
16005if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16006   if ( ./conftest 1>&5 2>&1 ) ; then
16007      cf_cv_prog_gnat_correct=yes
16008   else
16009      cf_cv_prog_gnat_correct=no
16010   fi
16011else
16012   cf_cv_prog_gnat_correct=no
16013fi
16014rm -f conftest*
16015
16016      echo "$as_me:16012: result: $cf_cv_prog_gnat_correct" >&5
16017echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
16018   fi
16019fi
16020if test	"$cf_cv_prog_gnat_correct" = yes; then
16021   ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
16022
16023   echo "$as_me:16019: checking if GNAT pragma Unreferenced works" >&5
16024echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
16025
16026rm -f conftest*
16027cat >>conftest.ads <<CF_EOF
16028procedure conftest;
16029CF_EOF
16030cat >>conftest.adb <<CF_EOF
16031with Text_IO;
16032with GNAT.OS_Lib;
16033procedure conftest is
16034   test : Integer;
16035   pragma Unreferenced (test);
16036begin
16037   test := 1;
16038   Text_IO.Put ("Hello World");
16039   Text_IO.New_Line;
16040   GNAT.OS_Lib.OS_Exit (0);
16041end conftest;
16042CF_EOF
16043if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16044      cf_cv_pragma_unreferenced=yes
16045else
16046   cf_cv_pragma_unreferenced=no
16047fi
16048rm -f conftest*
16049
16050   echo "$as_me:16046: result: $cf_cv_pragma_unreferenced" >&5
16051echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
16052
16053   # if the pragma is supported, use it (needed in the Trace code).
16054   if test $cf_cv_pragma_unreferenced = yes ; then
16055      PRAGMA_UNREF=TRUE
16056   else
16057      PRAGMA_UNREF=FALSE
16058   fi
16059
16060# Check whether --with-ada-compiler or --without-ada-compiler was given.
16061if test "${with_ada_compiler+set}" = set; then
16062  withval="$with_ada_compiler"
16063  cf_ada_compiler=$withval
16064else
16065  cf_ada_compiler=gnatmake
16066fi;
16067
16068   cf_ada_package=terminal_interface
16069
16070# Check whether --with-ada-include or --without-ada-include was given.
16071if test "${with_ada_include+set}" = set; then
16072  withval="$with_ada_include"
16073
16074else
16075  withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
16076fi; if test -n "$prefix/lib/ada/adainclude" ; then
16077
16078if test "x$prefix" != xNONE; then
16079  cf_path_syntax="$prefix"
16080else
16081  cf_path_syntax="$ac_default_prefix"
16082fi
16083
16084case ".$withval" in #(vi
16085.\$\(*\)*|.\'*\'*) #(vi
16086  ;;
16087..|./*|.\\*) #(vi
16088  ;;
16089.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16090  ;;
16091.\${*prefix}*) #(vi
16092  eval withval="$withval"
16093  case ".$withval" in #(vi
16094  .NONE/*)
16095    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16096    ;;
16097  esac
16098  ;; #(vi
16099.no|.NONE/*)
16100  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16101  ;;
16102*)
16103  { { echo "$as_me:16099: error: expected a pathname, not \"$withval\"" >&5
16104echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16105   { (exit 1); exit 1; }; }
16106  ;;
16107esac
16108
16109fi
16110ADA_INCLUDE="$withval"
16111
16112# Check whether --with-ada-objects or --without-ada-objects was given.
16113if test "${with_ada_objects+set}" = set; then
16114  withval="$with_ada_objects"
16115
16116else
16117  withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
16118fi; if test -n "$prefix/lib/ada/adalib" ; then
16119
16120if test "x$prefix" != xNONE; then
16121  cf_path_syntax="$prefix"
16122else
16123  cf_path_syntax="$ac_default_prefix"
16124fi
16125
16126case ".$withval" in #(vi
16127.\$\(*\)*|.\'*\'*) #(vi
16128  ;;
16129..|./*|.\\*) #(vi
16130  ;;
16131.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16132  ;;
16133.\${*prefix}*) #(vi
16134  eval withval="$withval"
16135  case ".$withval" in #(vi
16136  .NONE/*)
16137    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16138    ;;
16139  esac
16140  ;; #(vi
16141.no|.NONE/*)
16142  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16143  ;;
16144*)
16145  { { echo "$as_me:16141: error: expected a pathname, not \"$withval\"" >&5
16146echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16147   { (exit 1); exit 1; }; }
16148  ;;
16149esac
16150
16151fi
16152ADA_OBJECTS="$withval"
16153
16154fi
16155fi
16156else
16157   cf_with_ada=no
16158fi
16159
16160### Construct the ncurses library-subsets, if any, from this set of keywords:
16161###	none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
16162###
16163### ticlib modules may be a separate library, otherwise contained in termlib.
16164### termlib modules may be a separate library, otherwise contained in ncurses.
16165###
16166### The of "+" or " " between the tokens controls the way the script
16167### chooses to split module lists into libraries.
16168###
16169### (see CF_LIB_RULES).
16170echo "$as_me:16166: checking for library subsets" >&5
16171echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
16172LIB_SUBSETS=
16173
16174if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
16175	LIB_SUBSETS="${LIB_SUBSETS}ticlib"
16176	if test "$with_ticlib" != no ; then
16177		LIB_SUBSETS="${LIB_SUBSETS} "
16178	else
16179		LIB_SUBSETS="${LIB_SUBSETS}+"
16180	fi
16181fi
16182
16183LIB_SUBSETS="${LIB_SUBSETS}termlib"
16184test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
16185if test "$with_termlib" != no ; then
16186	LIB_SUBSETS="${LIB_SUBSETS} "
16187else
16188	LIB_SUBSETS="${LIB_SUBSETS}+"
16189fi
16190
16191LIB_SUBSETS="${LIB_SUBSETS}base"
16192test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
16193test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
16194
16195echo "$as_me:16191: result: $LIB_SUBSETS" >&5
16196echo "${ECHO_T}$LIB_SUBSETS" >&6
16197
16198### Construct the list of include-directories to be generated
16199
16200CPPFLAGS="-I. -I../include $CPPFLAGS"
16201if test "$srcdir" != "."; then
16202	CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
16203fi
16204if test "$GCC" != yes; then
16205	CPPFLAGS="$CPPFLAGS -I\${includedir}"
16206elif test "$includedir" != "/usr/include"; then
16207	if test "$includedir" = '${prefix}/include' ; then
16208		if test $prefix != /usr ; then
16209			CPPFLAGS="$CPPFLAGS -I\${includedir}"
16210		fi
16211	else
16212		CPPFLAGS="$CPPFLAGS -I\${includedir}"
16213	fi
16214fi
16215
16216ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
16217if test "$srcdir" != "."; then
16218	ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
16219fi
16220if test "$GCC" != yes; then
16221	ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16222elif test "$includedir" != "/usr/include"; then
16223	if test "$includedir" = '${prefix}/include' ; then
16224		if test $prefix != /usr ; then
16225			ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16226		fi
16227	else
16228		ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16229	fi
16230fi
16231
16232### Build up pieces for makefile rules
16233echo "$as_me:16229: checking default library suffix" >&5
16234echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
16235
16236	case $DFT_LWR_MODEL in
16237	libtool) DFT_ARG_SUFFIX=''   ;;
16238	normal)  DFT_ARG_SUFFIX=''   ;;
16239	debug)   DFT_ARG_SUFFIX='_g' ;;
16240	profile) DFT_ARG_SUFFIX='_p' ;;
16241	shared)  DFT_ARG_SUFFIX=''   ;;
16242	esac
16243	test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
16244echo "$as_me:16240: result: $DFT_ARG_SUFFIX" >&5
16245echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
16246
16247echo "$as_me:16243: checking default library-dependency suffix" >&5
16248echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
16249
16250	case $DFT_LWR_MODEL in
16251	libtool)
16252		DFT_LIB_SUFFIX='.la'
16253		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16254		;;
16255	normal)
16256		DFT_LIB_SUFFIX='.a'
16257		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16258		;;
16259	debug)
16260		DFT_LIB_SUFFIX='_g.a'
16261		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16262		;;
16263	profile)
16264		DFT_LIB_SUFFIX='_p.a'
16265		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16266		;;
16267	shared)
16268		case $cf_cv_system_name in
16269		cygwin*)
16270			DFT_LIB_SUFFIX='.dll'
16271			DFT_DEP_SUFFIX='.dll.a'
16272			;;
16273		darwin*)
16274			DFT_LIB_SUFFIX='.dylib'
16275			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16276			;;
16277		hpux*)
16278			case $target in
16279			ia64*)
16280				DFT_LIB_SUFFIX='.so'
16281				DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16282				;;
16283			*)
16284				DFT_LIB_SUFFIX='.sl'
16285				DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16286				;;
16287			esac
16288			;;
16289		*)	DFT_LIB_SUFFIX='.so'
16290			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16291			;;
16292		esac
16293	esac
16294	test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
16295	test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
16296echo "$as_me:16292: result: $DFT_DEP_SUFFIX" >&5
16297echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
16298
16299echo "$as_me:16295: checking default object directory" >&5
16300echo $ECHO_N "checking default object directory... $ECHO_C" >&6
16301
16302	case $DFT_LWR_MODEL in
16303	libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
16304	normal)  DFT_OBJ_SUBDIR='objects' ;;
16305	debug)   DFT_OBJ_SUBDIR='obj_g' ;;
16306	profile) DFT_OBJ_SUBDIR='obj_p' ;;
16307	shared)
16308		case $cf_cv_system_name in #(vi
16309		cygwin) #(vi
16310			DFT_OBJ_SUBDIR='objects' ;;
16311		*)
16312			DFT_OBJ_SUBDIR='obj_s' ;;
16313		esac
16314	esac
16315echo "$as_me:16311: result: $DFT_OBJ_SUBDIR" >&5
16316echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
16317
16318# libtool thinks it can make c++ shared libraries (perhaps only g++)
16319if test "$cf_with_cxx" = yes ; then
16320echo "$as_me:16316: checking c++ library-dependency suffix" >&5
16321echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
16322if test "$with_libtool" != "no"; then
16323	CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
16324else
16325
16326	case normal in
16327	libtool)
16328		CXX_LIB_SUFFIX='.la'
16329		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16330		;;
16331	normal)
16332		CXX_LIB_SUFFIX='.a'
16333		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16334		;;
16335	debug)
16336		CXX_LIB_SUFFIX='_g.a'
16337		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16338		;;
16339	profile)
16340		CXX_LIB_SUFFIX='_p.a'
16341		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16342		;;
16343	shared)
16344		case $cf_cv_system_name in
16345		cygwin*)
16346			CXX_LIB_SUFFIX='.dll'
16347			CXX_DEP_SUFFIX='.dll.a'
16348			;;
16349		darwin*)
16350			CXX_LIB_SUFFIX='.dylib'
16351			CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16352			;;
16353		hpux*)
16354			case $target in
16355			ia64*)
16356				CXX_LIB_SUFFIX='.so'
16357				CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16358				;;
16359			*)
16360				CXX_LIB_SUFFIX='.sl'
16361				CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16362				;;
16363			esac
16364			;;
16365		*)	CXX_LIB_SUFFIX='.so'
16366			CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16367			;;
16368		esac
16369	esac
16370	test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
16371	test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
16372fi
16373echo "$as_me:16369: result: $CXX_LIB_SUFFIX" >&5
16374echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
16375
16376fi
16377
16378# do not want -ldl in build except as needed for -lncurses dependency
16379if test "$with_dlsym" = yes ; then
16380if test $DFT_LWR_MODEL = shared || \
16381   test $DFT_LWR_MODEL = libtool ; then
16382
16383# remove dl library from $LIBS
16384LIBS=`echo "$LIBS" | sed -e 's/-ldl[ 	]//g' -e 's/-ldl$//'`
16385
16386fi
16387fi
16388### Set up low-level terminfo dependencies for makefiles.
16389
16390# TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
16391# do not need libdl
16392TICS_LIST=
16393if test "$with_dlsym" = yes ; then
16394
16395# remove dl library from $SHLIB_LIST
16396TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[ 	]//g' -e 's/-ldl$//'`
16397
16398fi
16399
16400if test "$with_ticlib" != no ; then
16401
16402	if test "$with_ticlib" != yes ; then
16403		TICS_NAME=$with_ticlib
16404		TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16405		TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16406		TICS_LIB_SUFFIX="${with_ticlib}"
16407	else
16408		TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
16409		TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
16410		TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
16411	fi
16412	TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
16413else
16414	TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16415fi
16416
16417if test "$with_termlib" != no ; then
16418
16419	if test "$with_termlib" != yes ; then
16420		TINFO_NAME=$with_termlib
16421		TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16422		TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16423		TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16424		TINFO_LIB_SUFFIX="${with_termlib}"
16425	else
16426		TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16427		TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
16428		TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
16429		TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
16430	fi
16431
16432	TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16433	TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16434	if test "$DFT_LWR_MODEL" = "libtool"; then
16435		TEST_ARGS="${TEST_DEPS}"
16436		TEST_ARG2="${TEST_DEP2}"
16437		TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16438	else
16439		TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
16440		TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
16441		TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16442		TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16443		SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16444	fi
16445else
16446	# the next lines are needed for linking libtic over libncurses
16447	TINFO_NAME=${LIB_NAME}
16448	TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16449	TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
16450	if test "$with_tic_depends" = yes ; then
16451		TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16452	else
16453		TICS_LIST="$SHLIB_LIST"
16454	fi
16455
16456	TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16457fi
16458
16459if test "$DFT_LWR_MODEL" = shared ; then
16460	case $cf_cv_system_name in #(vi
16461	cygwin*)
16462		# "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16463		TINFO_SUFFIX=.dll
16464		;;
16465	esac
16466fi
16467
16468if test "$with_dlsym" = yes ; then
16469
16470# remove dl library from $TICS_LIST
16471TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[ 	]//g' -e 's/-ldl$//'`
16472
16473fi
16474
16475if test "$DFT_LWR_MODEL" = "libtool"; then
16476    OBJEXT=lo
16477fi
16478
16479# needed for Ada95
16480TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
16481
16482case $DFT_LWR_MODEL in
16483normal|debug|profile)
16484
16485if test "$GCC" = yes ; then
16486	case $cf_cv_system_name in #(
16487	OS/2*|os2*|aix[45]*) 	#( vi
16488		LDFLAGS_STATIC=
16489		LDFLAGS_SHARED=
16490		;;
16491    *) 	#( normally, except when broken
16492        LDFLAGS_STATIC=-static
16493        LDFLAGS_SHARED=-dynamic
16494        ;;
16495    esac
16496else
16497	case $cf_cv_system_name in #(
16498	aix[45]*) 	#( from ld manpage
16499		LDFLAGS_STATIC=-bstatic
16500		LDFLAGS_SHARED=-bdynamic
16501		;;
16502	hpux*)		#( from ld manpage for hpux10.20, hpux11.11
16503		# We could also use just "archive" and "shared".
16504		LDFLAGS_STATIC=-Wl,-a,archive_shared
16505		LDFLAGS_SHARED=-Wl,-a,shared_archive
16506		;;
16507	irix*)		#( from ld manpage IRIX64
16508		LDFLAGS_STATIC=-Bstatic
16509		LDFLAGS_SHARED=-Bdynamic
16510		;;
16511	osf[45]*)	#( from ld manpage osf4.0d, osf5.1
16512		# alternative "-oldstyle_liblookup" (not in cc manpage)
16513		LDFLAGS_STATIC=-noso
16514		LDFLAGS_SHARED=-so_archive
16515		;;
16516	solaris2*)
16517		LDFLAGS_STATIC=-Bstatic
16518		LDFLAGS_SHARED=-Bdynamic
16519		;;
16520	esac
16521fi
16522
16523	;;
16524esac
16525
16526echo "$as_me:16522: checking where we will install curses.h" >&5
16527echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
16528test "$with_overwrite" = no && \
16529test "x$includedir" = 'x${prefix}/include' && \
16530	includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
16531echo "$as_me:16527: result: $includedir" >&5
16532echo "${ECHO_T}$includedir" >&6
16533
16534### Resolve a conflict between normal and wide-curses by forcing applications
16535### that will need libutf8 to add it to their configure script.
16536if test "$with_overwrite" != no ; then
16537if test "$NCURSES_LIBUTF8" = 1 ; then
16538	NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
16539	{ echo "$as_me:16535: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
16540echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
16541fi
16542fi
16543
16544# used to separate tack out of the tree
16545NCURSES_TREE=
16546
16547### predefined stuff for the test programs
16548cat >>confdefs.h <<\EOF
16549#define HAVE_SLK_COLOR 1
16550EOF
16551
16552### Construct the list of subdirectories for which we'll customize makefiles
16553### with the appropriate compile-rules.
16554
16555echo "$as_me:16551: checking for src modules" >&5
16556echo $ECHO_N "checking for src modules... $ECHO_C" >&6
16557
16558# dependencies and linker-arguments for test-programs
16559TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
16560TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
16561if test "$DFT_LWR_MODEL" = "libtool"; then
16562	TEST_ARGS="${TEST_DEPS}"
16563	TEST_ARG2="${TEST_DEP2}"
16564else
16565	TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
16566	TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
16567fi
16568
16569cf_cv_src_modules=
16570for cf_dir in $modules_to_build
16571do
16572	if test -f $srcdir/$cf_dir/modules; then
16573
16574		# We may/may not have tack in the distribution, though the
16575		# makefile is.
16576		if test $cf_dir = tack ; then
16577			if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
16578				continue
16579			fi
16580		fi
16581
16582		if test -z "$cf_cv_src_modules"; then
16583			cf_cv_src_modules=$cf_dir
16584		else
16585			cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
16586		fi
16587
16588		# Make the ncurses_cfg.h file record the library interface files as
16589		# well.  These are header files that are the same name as their
16590		# directory.  Ncurses is the only library that does not follow
16591		# that pattern.
16592		if test $cf_dir = tack ; then
16593			continue
16594		elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
16595
16596cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16597
16598			cat >>confdefs.h <<EOF
16599#define HAVE_${cf_have_include}_H 1
16600EOF
16601
16602			cat >>confdefs.h <<EOF
16603#define HAVE_LIB${cf_have_include} 1
16604EOF
16605
16606			TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
16607			TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
16608			if test "$DFT_LWR_MODEL" = "libtool"; then
16609				TEST_ARGS="${TEST_DEPS}"
16610				TEST_ARG2="${TEST_DEP2}"
16611			else
16612				TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
16613				TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
16614			fi
16615		fi
16616	fi
16617done
16618echo "$as_me:16614: result: $cf_cv_src_modules" >&5
16619echo "${ECHO_T}$cf_cv_src_modules" >&6
16620
16621TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
16622TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
16623
16624SRC_SUBDIRS="man include"
16625for cf_dir in $cf_cv_src_modules
16626do
16627	SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
16628done
16629SRC_SUBDIRS="$SRC_SUBDIRS test"
16630test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
16631test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
16632
16633ADA_SUBDIRS=
16634if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
16635   SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
16636   ADA_SUBDIRS="gen src samples"
16637fi
16638
16639SUB_MAKEFILES=
16640for cf_dir in $SRC_SUBDIRS
16641do
16642	SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
16643done
16644
16645if test -n "$ADA_SUBDIRS"; then
16646   for cf_dir in $ADA_SUBDIRS
16647   do
16648      SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
16649   done
16650
16651fi
16652
16653if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
16654   SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
16655fi
16656
16657DIRS_TO_MAKE="lib"
16658for cf_item in $cf_list_models
16659do
16660
16661	case $cf_item in
16662	libtool) cf_subdir='obj_lo'  ;;
16663	normal)  cf_subdir='objects' ;;
16664	debug)   cf_subdir='obj_g' ;;
16665	profile) cf_subdir='obj_p' ;;
16666	shared)
16667		case $cf_cv_system_name in #(vi
16668		cygwin) #(vi
16669			cf_subdir='objects' ;;
16670		*)
16671			cf_subdir='obj_s' ;;
16672		esac
16673	esac
16674
16675	for cf_item2 in $DIRS_TO_MAKE
16676	do
16677		test $cf_item2 = $cf_subdir && break
16678	done
16679	test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
16680done
16681for cf_dir in $DIRS_TO_MAKE
16682do
16683	test ! -d $cf_dir && mkdir $cf_dir
16684done
16685
16686cat >>confdefs.h <<EOF
16687#define NCURSES_PATHSEP '$PATHSEP'
16688EOF
16689
16690cat >>confdefs.h <<EOF
16691#define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
16692EOF
16693
16694### Now that we're done running tests, add the compiler-warnings, if any
16695
16696cf_fix_cppflags=no
16697cf_new_cflags=
16698cf_new_cppflags=
16699cf_new_extra_cppflags=
16700
16701for cf_add_cflags in $EXTRA_CFLAGS
16702do
16703case $cf_fix_cppflags in
16704no)
16705	case $cf_add_cflags in #(vi
16706	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16707		case $cf_add_cflags in
16708		-D*)
16709			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16710
16711			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16712			&& test -z "${cf_tst_cflags}" \
16713			&& cf_fix_cppflags=yes
16714
16715			if test $cf_fix_cppflags = yes ; then
16716				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16717				continue
16718			elif test "${cf_tst_cflags}" = "\"'" ; then
16719				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16720				continue
16721			fi
16722			;;
16723		esac
16724		case "$CPPFLAGS" in
16725		*$cf_add_cflags) #(vi
16726			;;
16727		*) #(vi
16728			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16729			;;
16730		esac
16731		;;
16732	*)
16733		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16734		;;
16735	esac
16736	;;
16737yes)
16738	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16739
16740	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16741
16742	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16743	&& test -z "${cf_tst_cflags}" \
16744	&& cf_fix_cppflags=no
16745	;;
16746esac
16747done
16748
16749if test -n "$cf_new_cflags" ; then
16750
16751	CFLAGS="$CFLAGS $cf_new_cflags"
16752fi
16753
16754if test -n "$cf_new_cppflags" ; then
16755
16756	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
16757fi
16758
16759if test -n "$cf_new_extra_cppflags" ; then
16760
16761	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16762fi
16763
16764### If we're building with rpath, try to link non-standard libs that way too.
16765if test "$DFT_LWR_MODEL" = "shared"; then
16766
16767echo "$as_me:16763: checking for updated LDFLAGS" >&5
16768echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
16769if test -n "$LDFLAGS" ; then
16770echo "$as_me:16766: result: maybe" >&5
16771echo "${ECHO_T}maybe" >&6
16772test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
16773
16774echo "${as_me-configure}:16770: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16775
16776test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16777
16778echo "${as_me-configure}:16774: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16779
16780case "$EXTRA_LDFLAGS" in #(vi
16781-Wl,-rpath,*) #(vi
16782	cf_rpath_hack="-Wl,-rpath,"
16783	;;
16784-R\ *)
16785	cf_rpath_hack="-R "
16786	;;
16787-R*)
16788	cf_rpath_hack="-R"
16789	;;
16790*)
16791	cf_rpath_hack=
16792	;;
16793esac
16794if test -n "$cf_rpath_hack" ; then
16795	cf_rpath_dst=
16796	for cf_rpath_src in $LDFLAGS
16797	do
16798		test -n "$verbose" && echo "	Filtering $cf_rpath_src" 1>&6
16799
16800echo "${as_me-configure}:16796: testing Filtering $cf_rpath_src ..." 1>&5
16801
16802		case $cf_rpath_src in #(vi
16803		-L*) #(vi
16804			if test "$cf_rpath_hack" = "-R " ; then
16805				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
16806			else
16807				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
16808			fi
16809			test -n "$verbose" && echo "	...Filter $cf_rpath_tmp" 1>&6
16810
16811echo "${as_me-configure}:16807: testing ...Filter $cf_rpath_tmp ..." 1>&5
16812
16813			EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16814			;;
16815		esac
16816		cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16817	done
16818	LDFLAGS=$cf_rpath_dst
16819	test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
16820
16821echo "${as_me-configure}:16817: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
16822
16823	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16824
16825echo "${as_me-configure}:16821: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16826
16827fi
16828else
16829echo "$as_me:16825: result: no" >&5
16830echo "${ECHO_T}no" >&6
16831fi
16832
16833fi
16834
16835### Define substitutions for header files to avoid name-pollution
16836
16837if test "$cf_cv_have_tcgetattr" = yes ; then
16838	HAVE_TCGETATTR=1
16839else
16840	HAVE_TCGETATTR=0
16841fi
16842
16843if test "$ac_cv_header_termio_h" = yes ; then
16844	HAVE_TERMIO_H=1
16845else
16846	HAVE_TERMIO_H=0
16847fi
16848
16849if test "$ac_cv_header_termios_h" = yes ; then
16850	HAVE_TERMIOS_H=1
16851else
16852	HAVE_TERMIOS_H=0
16853fi
16854
16855################################################################################
16856test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
16857SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
16858ac_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"
16859ac_config_commands="$ac_config_commands default"
16860cat >confcache <<\_ACEOF
16861# This file is a shell script that caches the results of configure
16862# tests run on this system so they can be shared between configure
16863# scripts and configure runs, see configure's option --config-cache.
16864# It is not useful on other systems.  If it contains results you don't
16865# want to keep, you may remove or edit it.
16866#
16867# config.status only pays attention to the cache file if you give it
16868# the --recheck option to rerun configure.
16869#
16870# `ac_cv_env_foo' variables (set or unset) will be overriden when
16871# loading this file, other *unset* `ac_cv_foo' will be assigned the
16872# following values.
16873
16874_ACEOF
16875
16876# The following way of writing the cache mishandles newlines in values,
16877# but we know of no workaround that is simple, portable, and efficient.
16878# So, don't put newlines in cache variables' values.
16879# Ultrix sh set writes to stderr and can't be redirected directly,
16880# and sets the high bit in the cache file unless we assign to the vars.
16881{
16882  (set) 2>&1 |
16883    case `(ac_space=' '; set | grep ac_space) 2>&1` in
16884    *ac_space=\ *)
16885      # `set' does not quote correctly, so add quotes (double-quote
16886      # substitution turns \\\\ into \\, and sed turns \\ into \).
16887      sed -n \
16888        "s/'/'\\\\''/g;
16889    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16890      ;;
16891    *)
16892      # `set' quotes correctly as required by POSIX, so do not add quotes.
16893      sed -n \
16894        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16895      ;;
16896    esac;
16897} |
16898  sed '
16899     t clear
16900     : clear
16901     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16902     t end
16903     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16904     : end' >>confcache
16905if cmp -s $cache_file confcache; then :; else
16906  if test -w $cache_file; then
16907    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16908    cat confcache >$cache_file
16909  else
16910    echo "not updating unwritable cache $cache_file"
16911  fi
16912fi
16913rm -f confcache
16914
16915test "x$prefix" = xNONE && prefix=$ac_default_prefix
16916# Let make expand exec_prefix.
16917test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16918
16919# VPATH may cause trouble with some makes, so we remove $(srcdir),
16920# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16921# trailing colons and then remove the whole line if VPATH becomes empty
16922# (actually we leave an empty line to preserve line numbers).
16923if test "x$srcdir" = x.; then
16924  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
16925s/:*\$(srcdir):*/:/;
16926s/:*\${srcdir}:*/:/;
16927s/:*@srcdir@:*/:/;
16928s/^\([^=]*=[ 	]*\):*/\1/;
16929s/:*$//;
16930s/^[^=]*=[ 	]*$//;
16931}'
16932fi
16933
16934DEFS=-DHAVE_CONFIG_H
16935
16936: ${CONFIG_STATUS=./config.status}
16937ac_clean_files_save=$ac_clean_files
16938ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16939{ echo "$as_me:16935: creating $CONFIG_STATUS" >&5
16940echo "$as_me: creating $CONFIG_STATUS" >&6;}
16941cat >$CONFIG_STATUS <<_ACEOF
16942#! $SHELL
16943# Generated automatically by configure.
16944# Run this file to recreate the current configuration.
16945# Compiler output produced by configure, useful for debugging
16946# configure, is in config.log if it exists.
16947
16948debug=false
16949SHELL=\${CONFIG_SHELL-$SHELL}
16950ac_cs_invocation="\$0 \$@"
16951
16952_ACEOF
16953
16954cat >>$CONFIG_STATUS <<\_ACEOF
16955# Be Bourne compatible
16956if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16957  emulate sh
16958  NULLCMD=:
16959elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16960  set -o posix
16961fi
16962
16963# Name of the executable.
16964as_me=`echo "$0" |sed 's,.*[\\/],,'`
16965
16966if expr a : '\(a\)' >/dev/null 2>&1; then
16967  as_expr=expr
16968else
16969  as_expr=false
16970fi
16971
16972rm -f conf$$ conf$$.exe conf$$.file
16973echo >conf$$.file
16974if ln -s conf$$.file conf$$ 2>/dev/null; then
16975  # We could just check for DJGPP; but this test a) works b) is more generic
16976  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16977  if test -f conf$$.exe; then
16978    # Don't use ln at all; we don't have any links
16979    as_ln_s='cp -p'
16980  else
16981    as_ln_s='ln -s'
16982  fi
16983elif ln conf$$.file conf$$ 2>/dev/null; then
16984  as_ln_s=ln
16985else
16986  as_ln_s='cp -p'
16987fi
16988rm -f conf$$ conf$$.exe conf$$.file
16989
16990as_executable_p="test -f"
16991
16992# Support unset when possible.
16993if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16994  as_unset=unset
16995else
16996  as_unset=false
16997fi
16998
16999# NLS nuisances.
17000$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17001$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17002$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17003$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17004$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17005$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17006$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17007$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17008
17009# IFS
17010# We need space, tab and new line, in precisely that order.
17011as_nl='
17012'
17013IFS=" 	$as_nl"
17014
17015# CDPATH.
17016$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17017
17018exec 6>&1
17019
17020_ACEOF
17021
17022# Files that config.status was made for.
17023if test -n "$ac_config_files"; then
17024  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17025fi
17026
17027if test -n "$ac_config_headers"; then
17028  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17029fi
17030
17031if test -n "$ac_config_links"; then
17032  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17033fi
17034
17035if test -n "$ac_config_commands"; then
17036  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17037fi
17038
17039cat >>$CONFIG_STATUS <<\EOF
17040
17041ac_cs_usage="\
17042\`$as_me' instantiates files from templates according to the
17043current configuration.
17044
17045Usage: $0 [OPTIONS] [FILE]...
17046
17047  -h, --help       print this help, then exit
17048  -V, --version    print version number, then exit
17049  -d, --debug      don't remove temporary files
17050      --recheck    update $as_me by reconfiguring in the same conditions
17051  --file=FILE[:TEMPLATE]
17052                   instantiate the configuration file FILE
17053  --header=FILE[:TEMPLATE]
17054                   instantiate the configuration header FILE
17055
17056Configuration files:
17057$config_files
17058
17059Configuration headers:
17060$config_headers
17061
17062Configuration commands:
17063$config_commands
17064
17065Report bugs to <bug-autoconf@gnu.org>."
17066EOF
17067
17068cat >>$CONFIG_STATUS <<EOF
17069ac_cs_version="\\
17070config.status
17071configured by $0, generated by GNU Autoconf 2.52.20080325,
17072  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17073
17074Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17075Free Software Foundation, Inc.
17076This config.status script is free software; the Free Software Foundation
17077gives unlimited permission to copy, distribute and modify it."
17078srcdir=$srcdir
17079INSTALL="$INSTALL"
17080EOF
17081
17082cat >>$CONFIG_STATUS <<\EOF
17083# If no file are specified by the user, then we need to provide default
17084# value.  By we need to know if files were specified by the user.
17085ac_need_defaults=:
17086while test $# != 0
17087do
17088  case $1 in
17089  --*=*)
17090    ac_option=`expr "x$1" : 'x\([^=]*\)='`
17091    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17092    shift
17093    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17094    shift
17095    ;;
17096  -*);;
17097  *) # This is not an option, so the user has probably given explicit
17098     # arguments.
17099     ac_need_defaults=false;;
17100  esac
17101
17102  case $1 in
17103  # Handling of the options.
17104EOF
17105cat >>$CONFIG_STATUS <<EOF
17106  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17107    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17108    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17109EOF
17110cat >>$CONFIG_STATUS <<\EOF
17111  --version | --vers* | -V )
17112    echo "$ac_cs_version"; exit 0 ;;
17113  --he | --h)
17114    # Conflict between --help and --header
17115    { { echo "$as_me:17111: error: ambiguous option: $1
17116Try \`$0 --help' for more information." >&5
17117echo "$as_me: error: ambiguous option: $1
17118Try \`$0 --help' for more information." >&2;}
17119   { (exit 1); exit 1; }; };;
17120  --help | --hel | -h )
17121    echo "$ac_cs_usage"; exit 0 ;;
17122  --debug | --d* | -d )
17123    debug=: ;;
17124  --file | --fil | --fi | --f )
17125    shift
17126    CONFIG_FILES="$CONFIG_FILES $1"
17127    ac_need_defaults=false;;
17128  --header | --heade | --head | --hea )
17129    shift
17130    CONFIG_HEADERS="$CONFIG_HEADERS $1"
17131    ac_need_defaults=false;;
17132
17133  # This is an error.
17134  -*) { { echo "$as_me:17130: error: unrecognized option: $1
17135Try \`$0 --help' for more information." >&5
17136echo "$as_me: error: unrecognized option: $1
17137Try \`$0 --help' for more information." >&2;}
17138   { (exit 1); exit 1; }; } ;;
17139
17140  *) ac_config_targets="$ac_config_targets $1" ;;
17141
17142  esac
17143  shift
17144done
17145
17146exec 5>>config.log
17147cat >&5 << _ACEOF
17148
17149## ----------------------- ##
17150## Running config.status.  ##
17151## ----------------------- ##
17152
17153This file was extended by $as_me 2.52.20080325, executed with
17154  CONFIG_FILES    = $CONFIG_FILES
17155  CONFIG_HEADERS  = $CONFIG_HEADERS
17156  CONFIG_LINKS    = $CONFIG_LINKS
17157  CONFIG_COMMANDS = $CONFIG_COMMANDS
17158  > $ac_cs_invocation
17159on `(hostname || uname -n) 2>/dev/null | sed 1q`
17160
17161_ACEOF
17162EOF
17163
17164cat >>$CONFIG_STATUS <<EOF
17165#
17166# INIT-COMMANDS section.
17167#
17168
17169### Special initialization commands, used to pass information from the
17170### configuration-run into config.status
17171
17172AWK="$AWK"
17173DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
17174DFT_LWR_MODEL="$DFT_LWR_MODEL"
17175ECHO_LINK="$ECHO_LINK"
17176LDCONFIG="$LDCONFIG"
17177LIB_NAME="$LIB_NAME"
17178LIB_SUBSETS="$LIB_SUBSETS"
17179LIB_SUFFIX="$LIB_SUFFIX"
17180LIB_TRACING="$LIB_TRACING"
17181MAKE_TERMINFO="$MAKE_TERMINFO"
17182NCURSES_MAJOR="$NCURSES_MAJOR"
17183NCURSES_MINOR="$NCURSES_MINOR"
17184NCURSES_OSPEED="$NCURSES_OSPEED"
17185NCURSES_PATCH="$NCURSES_PATCH"
17186SRC_SUBDIRS="$SRC_SUBDIRS"
17187TERMINFO="$TERMINFO"
17188TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
17189TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
17190TINFO_NAME="$TINFO_NAME"
17191TINFO_SUFFIX="$TINFO_SUFFIX"
17192TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
17193TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
17194TICS_NAME="$TICS_NAME"
17195WITH_CURSES_H="$with_curses_h"
17196WITH_ECHO="$with_echo"
17197WITH_OVERWRITE="$with_overwrite"
17198cf_LIST_MODELS="$cf_list_models"
17199cf_cv_abi_version="$cf_cv_abi_version"
17200cf_cv_do_relink="$cf_cv_do_relink"
17201cf_cv_do_symlinks="$cf_cv_do_symlinks"
17202cf_cv_enable_lp64="$cf_cv_enable_lp64"
17203cf_cv_enable_opaque="$cf_cv_enable_opaque"
17204cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
17205cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
17206cf_cv_rel_version="$cf_cv_rel_version"
17207cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
17208cf_cv_shared_soname='$cf_cv_shared_soname'
17209cf_cv_shlib_version="$cf_cv_shlib_version"
17210cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
17211cf_cv_system_name="$cf_cv_system_name"
17212cf_with_cxx_binding="$cf_with_cxx_binding"
17213host="$host"
17214target="$target"
17215
17216EOF
17217
17218cat >>$CONFIG_STATUS <<\EOF
17219for ac_config_target in $ac_config_targets
17220do
17221  case "$ac_config_target" in
17222  # Handling of arguments.
17223  "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
17224  "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
17225  "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
17226  "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
17227  "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
17228  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17229  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17230  "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
17231  *) { { echo "$as_me:17227: error: invalid argument: $ac_config_target" >&5
17232echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17233   { (exit 1); exit 1; }; };;
17234  esac
17235done
17236
17237# If the user did not use the arguments to specify the items to instantiate,
17238# then the envvar interface is used.  Set only those that are not.
17239# We use the long form for the default assignment because of an extremely
17240# bizarre bug on SunOS 4.1.3.
17241if $ac_need_defaults; then
17242  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17243  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17244  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17245fi
17246
17247# Create a temporary directory, and hook for its removal unless debugging.
17248$debug ||
17249{
17250  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17251  trap '{ (exit 1); exit 1; }' 1 2 13 15
17252}
17253
17254# Create a (secure) tmp directory for tmp files.
17255: ${TMPDIR=/tmp}
17256{
17257  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17258  test -n "$tmp" && test -d "$tmp"
17259}  ||
17260{
17261  tmp=$TMPDIR/cs$$-$RANDOM
17262  (umask 077 && mkdir $tmp)
17263} ||
17264{
17265   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17266   { (exit 1); exit 1; }
17267}
17268
17269EOF
17270
17271cat >>$CONFIG_STATUS <<EOF
17272
17273#
17274# CONFIG_FILES section.
17275#
17276
17277# No need to generate the scripts if there are no CONFIG_FILES.
17278# This happens for instance when ./config.status config.h
17279if test -n "\$CONFIG_FILES"; then
17280  # Protect against being on the right side of a sed subst in config.status.
17281  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17282   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17283s,@SHELL@,$SHELL,;t t
17284s,@exec_prefix@,$exec_prefix,;t t
17285s,@prefix@,$prefix,;t t
17286s,@program_transform_name@,$program_transform_name,;t t
17287s,@bindir@,$bindir,;t t
17288s,@sbindir@,$sbindir,;t t
17289s,@libexecdir@,$libexecdir,;t t
17290s,@datadir@,$datadir,;t t
17291s,@sysconfdir@,$sysconfdir,;t t
17292s,@sharedstatedir@,$sharedstatedir,;t t
17293s,@localstatedir@,$localstatedir,;t t
17294s,@libdir@,$libdir,;t t
17295s,@includedir@,$includedir,;t t
17296s,@oldincludedir@,$oldincludedir,;t t
17297s,@infodir@,$infodir,;t t
17298s,@mandir@,$mandir,;t t
17299s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17300s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17301s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17302s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17303s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17304s,@build_alias@,$build_alias,;t t
17305s,@host_alias@,$host_alias,;t t
17306s,@target_alias@,$target_alias,;t t
17307s,@ECHO_C@,$ECHO_C,;t t
17308s,@ECHO_N@,$ECHO_N,;t t
17309s,@ECHO_T@,$ECHO_T,;t t
17310s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17311s,@DEFS@,$DEFS,;t t
17312s,@LIBS@,$LIBS,;t t
17313s,@top_builddir@,$top_builddir,;t t
17314s,@EGREP@,$EGREP,;t t
17315s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
17316s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
17317s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
17318s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17319s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17320s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
17321s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
17322s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
17323s,@build@,$build,;t t
17324s,@build_cpu@,$build_cpu,;t t
17325s,@build_vendor@,$build_vendor,;t t
17326s,@build_os@,$build_os,;t t
17327s,@host@,$host,;t t
17328s,@host_cpu@,$host_cpu,;t t
17329s,@host_vendor@,$host_vendor,;t t
17330s,@host_os@,$host_os,;t t
17331s,@target@,$target,;t t
17332s,@target_cpu@,$target_cpu,;t t
17333s,@target_vendor@,$target_vendor,;t t
17334s,@target_os@,$target_os,;t t
17335s,@CC@,$CC,;t t
17336s,@CFLAGS@,$CFLAGS,;t t
17337s,@LDFLAGS@,$LDFLAGS,;t t
17338s,@CPPFLAGS@,$CPPFLAGS,;t t
17339s,@ac_ct_CC@,$ac_ct_CC,;t t
17340s,@EXEEXT@,$EXEEXT,;t t
17341s,@OBJEXT@,$OBJEXT,;t t
17342s,@CPP@,$CPP,;t t
17343s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17344s,@PROG_EXT@,$PROG_EXT,;t t
17345s,@LDCONFIG@,$LDCONFIG,;t t
17346s,@CXX@,$CXX,;t t
17347s,@CXXFLAGS@,$CXXFLAGS,;t t
17348s,@ac_ct_CXX@,$ac_ct_CXX,;t t
17349s,@AWK@,$AWK,;t t
17350s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17351s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17352s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17353s,@LINT@,$LINT,;t t
17354s,@LINT_OPTS@,$LINT_OPTS,;t t
17355s,@LN_S@,$LN_S,;t t
17356s,@SET_MAKE@,$SET_MAKE,;t t
17357s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17358s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17359s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
17360s,@RANLIB@,$RANLIB,;t t
17361s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17362s,@LD@,$LD,;t t
17363s,@ac_ct_LD@,$ac_ct_LD,;t t
17364s,@AR@,$AR,;t t
17365s,@ac_ct_AR@,$ac_ct_AR,;t t
17366s,@AR_OPTS@,$AR_OPTS,;t t
17367s,@DESTDIR@,$DESTDIR,;t t
17368s,@BUILD_CC@,$BUILD_CC,;t t
17369s,@BUILD_CPP@,$BUILD_CPP,;t t
17370s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17371s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
17372s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
17373s,@BUILD_LIBS@,$BUILD_LIBS,;t t
17374s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
17375s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
17376s,@cf_list_models@,$cf_list_models,;t t
17377s,@LIBTOOL@,$LIBTOOL,;t t
17378s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
17379s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
17380s,@LIB_CREATE@,$LIB_CREATE,;t t
17381s,@LIB_OBJECT@,$LIB_OBJECT,;t t
17382s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
17383s,@LIB_PREP@,$LIB_PREP,;t t
17384s,@LIB_CLEAN@,$LIB_CLEAN,;t t
17385s,@LIB_COMPILE@,$LIB_COMPILE,;t t
17386s,@LIB_LINK@,$LIB_LINK,;t t
17387s,@LIB_INSTALL@,$LIB_INSTALL,;t t
17388s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
17389s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
17390s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17391s,@TICS_NAME@,$TICS_NAME,;t t
17392s,@TINFO_NAME@,$TINFO_NAME,;t t
17393s,@LIB_NAME@,$LIB_NAME,;t t
17394s,@LIB_PREFIX@,$LIB_PREFIX,;t t
17395s,@CC_G_OPT@,$CC_G_OPT,;t t
17396s,@CXX_G_OPT@,$CXX_G_OPT,;t t
17397s,@LD_MODEL@,$LD_MODEL,;t t
17398s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17399s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17400s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
17401s,@LINK_PROGS@,$LINK_PROGS,;t t
17402s,@LINK_TESTS@,$LINK_TESTS,;t t
17403s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17404s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17405s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
17406s,@INSTALL_LIB@,$INSTALL_LIB,;t t
17407s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
17408s,@PATHSEP@,$PATHSEP,;t t
17409s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
17410s,@WHICH_XTERM@,$WHICH_XTERM,;t t
17411s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
17412s,@TERMINFO@,$TERMINFO,;t t
17413s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
17414s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
17415s,@TERMPATH@,$TERMPATH,;t t
17416s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
17417s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
17418s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
17419s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
17420s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
17421s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
17422s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
17423s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
17424s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
17425s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
17426s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
17427s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
17428s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
17429s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
17430s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
17431s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
17432s,@NCURSES_CONST@,$NCURSES_CONST,;t t
17433s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
17434s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
17435s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
17436s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
17437s,@PTHREAD@,$PTHREAD,;t t
17438s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
17439s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
17440s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
17441s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
17442s,@ECHO_LINK@,$ECHO_LINK,;t t
17443s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17444s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
17445s,@ADA_TRACE@,$ADA_TRACE,;t t
17446s,@MATH_LIB@,$MATH_LIB,;t t
17447s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
17448s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
17449s,@cf_cv_1UL@,$cf_cv_1UL,;t t
17450s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
17451s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
17452s,@TEST_LIBS@,$TEST_LIBS,;t t
17453s,@CXXCPP@,$CXXCPP,;t t
17454s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
17455s,@CXX_AR@,$CXX_AR,;t t
17456s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
17457s,@CXXLIBS@,$CXXLIBS,;t t
17458s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
17459s,@gnat_exists@,$gnat_exists,;t t
17460s,@M4_exists@,$M4_exists,;t t
17461s,@cf_ada_make@,$cf_ada_make,;t t
17462s,@cf_ada_compiler@,$cf_ada_compiler,;t t
17463s,@cf_ada_package@,$cf_ada_package,;t t
17464s,@ADAFLAGS@,$ADAFLAGS,;t t
17465s,@cf_compile_generics@,$cf_compile_generics,;t t
17466s,@cf_generic_objects@,$cf_generic_objects,;t t
17467s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
17468s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
17469s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
17470s,@ACPPFLAGS@,$ACPPFLAGS,;t t
17471s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
17472s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17473s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17474s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
17475s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
17476s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
17477s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
17478s,@TICS_ARGS@,$TICS_ARGS,;t t
17479s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
17480s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
17481s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
17482s,@TINFO_ARGS@,$TINFO_ARGS,;t t
17483s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
17484s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
17485s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
17486s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
17487s,@TICS_LIST@,$TICS_LIST,;t t
17488s,@TINFO_LIST@,$TINFO_LIST,;t t
17489s,@SHLIB_LIST@,$SHLIB_LIST,;t t
17490s,@NCURSES_TREE@,$NCURSES_TREE,;t t
17491s,@TEST_ARGS@,$TEST_ARGS,;t t
17492s,@TEST_DEPS@,$TEST_DEPS,;t t
17493s,@TEST_ARG2@,$TEST_ARG2,;t t
17494s,@TEST_DEP2@,$TEST_DEP2,;t t
17495s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
17496s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
17497s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
17498s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
17499s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
17500CEOF
17501
17502EOF
17503
17504  cat >>$CONFIG_STATUS <<\EOF
17505  # Split the substitutions into bite-sized pieces for seds with
17506  # small command number limits, like on Digital OSF/1 and HP-UX.
17507  ac_max_sed_lines=48
17508  ac_sed_frag=1 # Number of current file.
17509  ac_beg=1 # First line for current file.
17510  ac_end=$ac_max_sed_lines # Line after last line for current file.
17511  ac_more_lines=:
17512  ac_sed_cmds=
17513  while $ac_more_lines; do
17514    if test $ac_beg -gt 1; then
17515      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17516    else
17517      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17518    fi
17519    if test ! -s $tmp/subs.frag; then
17520      ac_more_lines=false
17521    else
17522      # The purpose of the label and of the branching condition is to
17523      # speed up the sed processing (if there are no `@' at all, there
17524      # is no need to browse any of the substitutions).
17525      # These are the two extra sed commands mentioned above.
17526      (echo ':t
17527  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17528      if test -z "$ac_sed_cmds"; then
17529  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17530      else
17531  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17532      fi
17533      ac_sed_frag=`expr $ac_sed_frag + 1`
17534      ac_beg=$ac_end
17535      ac_end=`expr $ac_end + $ac_max_sed_lines`
17536    fi
17537  done
17538  if test -z "$ac_sed_cmds"; then
17539    ac_sed_cmds=cat
17540  fi
17541fi # test -n "$CONFIG_FILES"
17542
17543EOF
17544cat >>$CONFIG_STATUS <<\EOF
17545for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17546  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17547  case $ac_file in
17548  - | *:- | *:-:* ) # input from stdin
17549        cat >$tmp/stdin
17550        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17551        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17552  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17553        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17554  * )   ac_file_in=$ac_file.in ;;
17555  esac
17556
17557  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17558  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17559         X"$ac_file" : 'X\(//\)[^/]' \| \
17560         X"$ac_file" : 'X\(//\)$' \| \
17561         X"$ac_file" : 'X\(/\)' \| \
17562         .     : '\(.\)' 2>/dev/null ||
17563echo X"$ac_file" |
17564    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17565  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17566  	  /^X\(\/\/\)$/{ s//\1/; q; }
17567  	  /^X\(\/\).*/{ s//\1/; q; }
17568  	  s/.*/./; q'`
17569  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17570    { case "$ac_dir" in
17571  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17572  *)                      as_incr_dir=.;;
17573esac
17574as_dummy="$ac_dir"
17575for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17576  case $as_mkdir_dir in
17577    # Skip DOS drivespec
17578    ?:) as_incr_dir=$as_mkdir_dir ;;
17579    *)
17580      as_incr_dir=$as_incr_dir/$as_mkdir_dir
17581      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17582    ;;
17583  esac
17584done; }
17585
17586    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
17587    # A "../" for each directory in $ac_dir_suffix.
17588    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
17589  else
17590    ac_dir_suffix= ac_dots=
17591  fi
17592
17593  case $srcdir in
17594  .)  ac_srcdir=.
17595      if test -z "$ac_dots"; then
17596         ac_top_srcdir=.
17597      else
17598         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
17599      fi ;;
17600  [\\/]* | ?:[\\/]* )
17601      ac_srcdir=$srcdir$ac_dir_suffix;
17602      ac_top_srcdir=$srcdir ;;
17603  *) # Relative path.
17604    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
17605    ac_top_srcdir=$ac_dots$srcdir ;;
17606  esac
17607
17608  case $INSTALL in
17609  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17610  *) ac_INSTALL=$ac_dots$INSTALL ;;
17611  esac
17612
17613  if test x"$ac_file" != x-; then
17614    { echo "$as_me:17610: creating $ac_file" >&5
17615echo "$as_me: creating $ac_file" >&6;}
17616    rm -f "$ac_file"
17617  fi
17618  # Let's still pretend it is `configure' which instantiates (i.e., don't
17619  # use $as_me), people would be surprised to read:
17620  #    /* config.h.  Generated automatically by config.status.  */
17621  configure_input="Generated automatically from `echo $ac_file_in |
17622                                                 sed 's,.*/,,'` by configure."
17623
17624  # First look for the input files in the build tree, otherwise in the
17625  # src tree.
17626  ac_file_inputs=`IFS=:
17627    for f in $ac_file_in; do
17628      case $f in
17629      -) echo $tmp/stdin ;;
17630      [\\/$]*)
17631         # Absolute (can't be DOS-style, as IFS=:)
17632         test -f "$f" || { { echo "$as_me:17628: error: cannot find input file: $f" >&5
17633echo "$as_me: error: cannot find input file: $f" >&2;}
17634   { (exit 1); exit 1; }; }
17635         echo $f;;
17636      *) # Relative
17637         if test -f "$f"; then
17638           # Build tree
17639           echo $f
17640         elif test -f "$srcdir/$f"; then
17641           # Source tree
17642           echo $srcdir/$f
17643         else
17644           # /dev/null tree
17645           { { echo "$as_me:17641: error: cannot find input file: $f" >&5
17646echo "$as_me: error: cannot find input file: $f" >&2;}
17647   { (exit 1); exit 1; }; }
17648         fi;;
17649      esac
17650    done` || { (exit 1); exit 1; }
17651EOF
17652cat >>$CONFIG_STATUS <<EOF
17653  sed "$ac_vpsub
17654$extrasub
17655EOF
17656cat >>$CONFIG_STATUS <<\EOF
17657:t
17658/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17659s,@configure_input@,$configure_input,;t t
17660s,@srcdir@,$ac_srcdir,;t t
17661s,@top_srcdir@,$ac_top_srcdir,;t t
17662s,@INSTALL@,$ac_INSTALL,;t t
17663" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17664  rm -f $tmp/stdin
17665  if test x"$ac_file" != x-; then
17666    mv $tmp/out $ac_file
17667  else
17668    cat $tmp/out
17669    rm -f $tmp/out
17670  fi
17671
17672done
17673EOF
17674cat >>$CONFIG_STATUS <<\EOF
17675
17676#
17677# CONFIG_HEADER section.
17678#
17679
17680# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17681# NAME is the cpp macro being defined and VALUE is the value it is being given.
17682#
17683# ac_d sets the value in "#define NAME VALUE" lines.
17684ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
17685ac_dB='[ 	].*$,\1#\2'
17686ac_dC=' '
17687ac_dD=',;t'
17688# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17689ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
17690ac_iB='\([ 	]\),\1#\2define\3'
17691ac_iC=' '
17692ac_iD='\4,;t'
17693# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17694ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
17695ac_uB='$,\1#\2define\3'
17696ac_uC=' '
17697ac_uD=',;t'
17698
17699for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17700  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17701  case $ac_file in
17702  - | *:- | *:-:* ) # input from stdin
17703        cat >$tmp/stdin
17704        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17705        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17706  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17707        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17708  * )   ac_file_in=$ac_file.in ;;
17709  esac
17710
17711  test x"$ac_file" != x- && { echo "$as_me:17707: creating $ac_file" >&5
17712echo "$as_me: creating $ac_file" >&6;}
17713
17714  # First look for the input files in the build tree, otherwise in the
17715  # src tree.
17716  ac_file_inputs=`IFS=:
17717    for f in $ac_file_in; do
17718      case $f in
17719      -) echo $tmp/stdin ;;
17720      [\\/$]*)
17721         # Absolute (can't be DOS-style, as IFS=:)
17722         test -f "$f" || { { echo "$as_me:17718: error: cannot find input file: $f" >&5
17723echo "$as_me: error: cannot find input file: $f" >&2;}
17724   { (exit 1); exit 1; }; }
17725         echo $f;;
17726      *) # Relative
17727         if test -f "$f"; then
17728           # Build tree
17729           echo $f
17730         elif test -f "$srcdir/$f"; then
17731           # Source tree
17732           echo $srcdir/$f
17733         else
17734           # /dev/null tree
17735           { { echo "$as_me:17731: error: cannot find input file: $f" >&5
17736echo "$as_me: error: cannot find input file: $f" >&2;}
17737   { (exit 1); exit 1; }; }
17738         fi;;
17739      esac
17740    done` || { (exit 1); exit 1; }
17741  # Remove the trailing spaces.
17742  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
17743
17744EOF
17745
17746# Transform confdefs.h into a list of #define's.  We won't use it as a sed
17747# script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
17748# be either 'cat' or 'sort'.
17749cat confdefs.h | uniq >conftest.vals
17750
17751# Break up conftest.vals because some shells have a limit on
17752# the size of here documents, and old seds have small limits too.
17753
17754rm -f conftest.tail
17755echo '  rm -f conftest.frag' >> $CONFIG_STATUS
17756while grep . conftest.vals >/dev/null
17757do
17758  # Write chunks of a limited-size here document to conftest.frag.
17759  echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17760  sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17761  echo 'CEOF' >> $CONFIG_STATUS
17762  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17763  rm -f conftest.vals
17764  mv conftest.tail conftest.vals
17765done
17766rm -f conftest.vals
17767
17768# Run sed to substitute the contents of conftest.frag into $tmp/in at the
17769# marker @DEFS@.
17770echo '  cat >> conftest.edit <<CEOF
17771/@DEFS@/r conftest.frag
17772/@DEFS@/d
17773CEOF
17774sed -f conftest.edit $tmp/in > $tmp/out
17775rm -f $tmp/in
17776mv $tmp/out $tmp/in
17777rm -f conftest.edit conftest.frag
17778' >> $CONFIG_STATUS
17779
17780cat >>$CONFIG_STATUS <<\EOF
17781  # Let's still pretend it is `configure' which instantiates (i.e., don't
17782  # use $as_me), people would be surprised to read:
17783  #    /* config.h.  Generated automatically by config.status.  */
17784  if test x"$ac_file" = x-; then
17785    echo "/* Generated automatically by configure.  */" >$tmp/config.h
17786  else
17787    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
17788  fi
17789  cat $tmp/in >>$tmp/config.h
17790  rm -f $tmp/in
17791  if test x"$ac_file" != x-; then
17792    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17793      { echo "$as_me:17789: $ac_file is unchanged" >&5
17794echo "$as_me: $ac_file is unchanged" >&6;}
17795    else
17796      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17797         X"$ac_file" : 'X\(//\)[^/]' \| \
17798         X"$ac_file" : 'X\(//\)$' \| \
17799         X"$ac_file" : 'X\(/\)' \| \
17800         .     : '\(.\)' 2>/dev/null ||
17801echo X"$ac_file" |
17802    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17803  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17804  	  /^X\(\/\/\)$/{ s//\1/; q; }
17805  	  /^X\(\/\).*/{ s//\1/; q; }
17806  	  s/.*/./; q'`
17807      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17808        { case "$ac_dir" in
17809  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17810  *)                      as_incr_dir=.;;
17811esac
17812as_dummy="$ac_dir"
17813for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17814  case $as_mkdir_dir in
17815    # Skip DOS drivespec
17816    ?:) as_incr_dir=$as_mkdir_dir ;;
17817    *)
17818      as_incr_dir=$as_incr_dir/$as_mkdir_dir
17819      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17820    ;;
17821  esac
17822done; }
17823
17824      fi
17825      rm -f $ac_file
17826      mv $tmp/config.h $ac_file
17827    fi
17828  else
17829    cat $tmp/config.h
17830    rm -f $tmp/config.h
17831  fi
17832done
17833EOF
17834cat >>$CONFIG_STATUS <<\EOF
17835
17836#
17837# CONFIG_COMMANDS section.
17838#
17839for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17840  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17841  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17842
17843  case $ac_dest in
17844    default )
17845
17846for cf_dir in test
17847do
17848	if test ! -d $srcdir/$cf_dir; then
17849		continue
17850	elif test -f $srcdir/$cf_dir/programs; then
17851		$AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
17852	fi
17853done
17854
17855	case $cf_cv_system_name in #(vi
17856	OS/2*|os2*) #(vi
17857        LIB_PREFIX=''
17858        ;;
17859	*)	LIB_PREFIX='lib'
17860        ;;
17861	esac
17862cf_prefix=$LIB_PREFIX
17863
17864if test $cf_cv_shlib_version = cygdll ; then
17865	TINFO_NAME=$TINFO_ARG_SUFFIX
17866	TINFO_SUFFIX=.dll
17867fi
17868
17869for cf_dir in $SRC_SUBDIRS
17870do
17871	if test ! -d $srcdir/$cf_dir ; then
17872		continue
17873	elif test -f $srcdir/$cf_dir/modules; then
17874
17875		SHARED_LIB=
17876		LIBS_TO_MAKE=
17877		for cf_item in $cf_LIST_MODELS
17878		do
17879
17880	case $cf_item in
17881	libtool)
17882		cf_suffix='.la'
17883		cf_depsuf=$cf_suffix
17884		;;
17885	normal)
17886		cf_suffix='.a'
17887		cf_depsuf=$cf_suffix
17888		;;
17889	debug)
17890		cf_suffix='_g.a'
17891		cf_depsuf=$cf_suffix
17892		;;
17893	profile)
17894		cf_suffix='_p.a'
17895		cf_depsuf=$cf_suffix
17896		;;
17897	shared)
17898		case $cf_cv_system_name in
17899		cygwin*)
17900			cf_suffix='.dll'
17901			cf_depsuf='.dll.a'
17902			;;
17903		darwin*)
17904			cf_suffix='.dylib'
17905			cf_depsuf=$cf_suffix
17906			;;
17907		hpux*)
17908			case $target in
17909			ia64*)
17910				cf_suffix='.so'
17911				cf_depsuf=$cf_suffix
17912				;;
17913			*)
17914				cf_suffix='.sl'
17915				cf_depsuf=$cf_suffix
17916				;;
17917			esac
17918			;;
17919		*)	cf_suffix='.so'
17920			cf_depsuf=$cf_suffix
17921			;;
17922		esac
17923	esac
17924	test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
17925	test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
17926
17927			if test $cf_item = shared ; then
17928			if test "$cf_cv_do_symlinks" = yes ; then
17929				case "$cf_cv_shlib_version" in #(vi
17930				rel) #(vi
17931					case "$cf_cv_system_name" in #(vi
17932					darwin*)
17933					case .${LIB_SUFFIX} in
17934					.w*)
17935						cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17936						cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
17937						;;
17938					*)
17939						cf_suffix='.${REL_VERSION}'"$cf_suffix"
17940						;;
17941					esac
17942					;; #(vi
17943					*) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
17944					esac
17945					;;
17946				abi)
17947					case "$cf_cv_system_name" in #(vi
17948					darwin*)
17949					case .${LIB_SUFFIX} in
17950					.w*)
17951						cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17952						cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
17953						;;
17954					*)
17955						cf_suffix='.${ABI_VERSION}'"$cf_suffix"
17956						;;
17957					esac
17958					;; #(vi
17959					*) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
17960					esac
17961					;;
17962				esac
17963			fi
17964			# cygwin needs import library, and has unique naming convention
17965			# use autodetected ${cf_prefix} for import lib and static lib, but
17966			# use 'cyg' prefix for shared lib.
17967			if test $cf_cv_shlib_version = cygdll ; then
17968				cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
17969				LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
17970				continue
17971			fi
17972			fi
17973			LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
17974		done
17975
17976		if test $cf_dir = ncurses ; then
17977			cf_subsets="$LIB_SUBSETS"
17978			cf_r_parts="$cf_subsets"
17979			cf_liblist="$LIBS_TO_MAKE"
17980
17981			while test -n "$cf_r_parts"
17982			do
17983				cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
17984				cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
17985				if test "$cf_l_parts" != "$cf_r_parts" ; then
17986					cf_item=
17987					case $cf_l_parts in #(vi
17988					*termlib*) #(vi
17989						cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
17990						;;
17991					*ticlib*)
17992						cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
17993						;;
17994					*)
17995						break
17996						;;
17997					esac
17998					if test -n "$cf_item"; then
17999						LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
18000					fi
18001				else
18002					break
18003				fi
18004			done
18005		else
18006			cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
18007		fi
18008
18009		sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
18010		    -e "s%@SHARED_LIB@%$SHARED_LIB%" \
18011			$cf_dir/Makefile >$cf_dir/Makefile.out
18012		mv $cf_dir/Makefile.out $cf_dir/Makefile
18013
18014		$AWK -f $srcdir/mk-0th.awk \
18015			libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
18016			$srcdir/$cf_dir/modules >>$cf_dir/Makefile
18017
18018		for cf_subset in $cf_subsets
18019		do
18020			cf_subdirs=
18021			for cf_item in $cf_LIST_MODELS
18022			do
18023			echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
18024
18025cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18026
18027	case $cf_item in
18028	libtool)
18029		cf_suffix='.la'
18030		cf_depsuf=$cf_suffix
18031		;;
18032	normal)
18033		cf_suffix='.a'
18034		cf_depsuf=$cf_suffix
18035		;;
18036	debug)
18037		cf_suffix='_g.a'
18038		cf_depsuf=$cf_suffix
18039		;;
18040	profile)
18041		cf_suffix='_p.a'
18042		cf_depsuf=$cf_suffix
18043		;;
18044	shared)
18045		case $cf_cv_system_name in
18046		cygwin*)
18047			cf_suffix='.dll'
18048			cf_depsuf='.dll.a'
18049			;;
18050		darwin*)
18051			cf_suffix='.dylib'
18052			cf_depsuf=$cf_suffix
18053			;;
18054		hpux*)
18055			case $target in
18056			ia64*)
18057				cf_suffix='.so'
18058				cf_depsuf=$cf_suffix
18059				;;
18060			*)
18061				cf_suffix='.sl'
18062				cf_depsuf=$cf_suffix
18063				;;
18064			esac
18065			;;
18066		*)	cf_suffix='.so'
18067			cf_depsuf=$cf_suffix
18068			;;
18069		esac
18070	esac
18071	test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18072	test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18073
18074	case $cf_item in
18075	libtool) cf_subdir='obj_lo'  ;;
18076	normal)  cf_subdir='objects' ;;
18077	debug)   cf_subdir='obj_g' ;;
18078	profile) cf_subdir='obj_p' ;;
18079	shared)
18080		case $cf_cv_system_name in #(vi
18081		cygwin) #(vi
18082			cf_subdir='objects' ;;
18083		*)
18084			cf_subdir='obj_s' ;;
18085		esac
18086	esac
18087
18088			# Test for case where we build libtinfo with a different name.
18089			cf_libname=$cf_dir
18090			if test $cf_dir = ncurses ; then
18091				case $cf_subset in
18092				*base*)
18093					cf_libname=${cf_libname}$LIB_SUFFIX
18094					;;
18095				*termlib*)
18096					cf_libname=$TINFO_LIB_SUFFIX
18097					;;
18098				ticlib*)
18099					cf_libname=$TICS_LIB_SUFFIX
18100					;;
18101				esac
18102			else
18103				cf_libname=${cf_libname}$LIB_SUFFIX
18104			fi
18105			if test -n "${DFT_ARG_SUFFIX}" ; then
18106				# undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
18107				cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
18108			fi
18109
18110			# These dependencies really are for development, not
18111			# builds, but they are useful in porting, too.
18112			cf_depend="../include/ncurses_cfg.h"
18113			if test "$srcdir" = "."; then
18114				cf_reldir="."
18115			else
18116				cf_reldir="\${srcdir}"
18117			fi
18118
18119			if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
18120				cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
18121			elif test -f $srcdir/$cf_dir/curses.priv.h; then
18122				cf_depend="$cf_depend $cf_reldir/curses.priv.h"
18123			fi
18124
18125 			cf_dir_suffix=
18126 			old_cf_suffix="$cf_suffix"
18127 			if test "$cf_cv_shlib_version_infix" = yes ; then
18128			if test -n "$LIB_SUFFIX" ; then
18129				case $LIB_SUFFIX in
18130				w*)
18131					cf_libname=`echo $cf_libname | sed 's/w$//'`
18132					cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18133					cf_dir_suffix=w
18134					;;
18135				esac
18136			fi
18137 			fi
18138
18139			$AWK -f $srcdir/mk-1st.awk \
18140				name=${cf_libname}${cf_dir_suffix} \
18141				traces=$LIB_TRACING \
18142				MODEL=$cf_ITEM \
18143				model=$cf_subdir \
18144				prefix=$cf_prefix \
18145				suffix=$cf_suffix \
18146				subset=$cf_subset \
18147				TermlibRoot=$TINFO_NAME \
18148				TermlibSuffix=$TINFO_SUFFIX \
18149				ShlibVer=$cf_cv_shlib_version \
18150				ShlibVerInfix=$cf_cv_shlib_version_infix \
18151				ReLink=${cf_cv_do_relink-no} \
18152				DoLinks=$cf_cv_do_symlinks \
18153				rmSoLocs=$cf_cv_rm_so_locs \
18154				ldconfig="$LDCONFIG" \
18155				overwrite=$WITH_OVERWRITE \
18156				depend="$cf_depend" \
18157				host="$host" \
18158				$srcdir/$cf_dir/modules >>$cf_dir/Makefile
18159
18160			cf_suffix="$old_cf_suffix"
18161
18162			for cf_subdir2 in $cf_subdirs lib
18163			do
18164				test $cf_subdir = $cf_subdir2 && break
18165			done
18166			test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
18167			$AWK -f $srcdir/mk-2nd.awk \
18168				name=$cf_dir \
18169				traces=$LIB_TRACING \
18170				MODEL=$cf_ITEM \
18171				model=$cf_subdir \
18172				subset=$cf_subset \
18173				srcdir=$srcdir \
18174				echo=$WITH_ECHO \
18175				crenames=$cf_cv_prog_CC_c_o \
18176				cxxrenames=$cf_cv_prog_CXX_c_o \
18177				$srcdir/$cf_dir/modules >>$cf_dir/Makefile
18178			cf_subdirs="$cf_subdirs $cf_subdir"
18179			done
18180		done
18181	fi
18182
18183	echo '	cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
18184done
18185
18186for cf_dir in $SRC_SUBDIRS
18187do
18188	if test ! -d $srcdir/$cf_dir ; then
18189		continue
18190	fi
18191
18192	if test -f $cf_dir/Makefile ; then
18193		case "$cf_dir" in
18194		Ada95) #(vi
18195			echo 'libs \' >> Makefile
18196			echo 'install.libs \' >> Makefile
18197			echo 'uninstall.libs ::' >> Makefile
18198			echo '	cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
18199			;;
18200		esac
18201	fi
18202
18203	if test -f $srcdir/$cf_dir/modules; then
18204		echo >> Makefile
18205		if test -f $srcdir/$cf_dir/headers; then
18206cat >> Makefile <<CF_EOF
18207install.includes \\
18208uninstall.includes \\
18209CF_EOF
18210		fi
18211if test "$cf_dir" != "c++" ; then
18212echo 'lint \' >> Makefile
18213fi
18214cat >> Makefile <<CF_EOF
18215libs \\
18216lintlib \\
18217install.libs \\
18218uninstall.libs \\
18219install.$cf_dir \\
18220uninstall.$cf_dir ::
18221	cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18222CF_EOF
18223	elif test -f $srcdir/$cf_dir/headers; then
18224cat >> Makefile <<CF_EOF
18225
18226libs \\
18227install.libs \\
18228uninstall.libs \\
18229install.includes \\
18230uninstall.includes ::
18231	cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18232CF_EOF
18233fi
18234done
18235
18236cat >> Makefile <<CF_EOF
18237
18238install.libs uninstall.libs \\
18239install.data uninstall.data ::
18240$MAKE_TERMINFO	cd misc && \${MAKE} \${CF_MFLAGS} \$@
18241
18242install.man \\
18243uninstall.man ::
18244	cd man && \${MAKE} \${CF_MFLAGS} \$@
18245
18246distclean ::
18247	rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
18248	rm -f headers.sh headers.sed mk_shared_lib.sh
18249	rm -rf \${DIRS_TO_MAKE}
18250CF_EOF
18251
18252# Special case: tack's manpage lives in its own directory.
18253if test -d tack ; then
18254if test -f $srcdir/$tack.h; then
18255cat >> Makefile <<CF_EOF
18256
18257install.man \\
18258uninstall.man ::
18259	cd tack && \${MAKE} \${CF_MFLAGS} \$@
18260CF_EOF
18261fi
18262fi
18263
18264rm -f headers.sed headers.sh
18265
18266echo creating headers.sh
18267cat >headers.sh <<CF_EOF
18268#! /bin/sh
18269# This shell script is generated by the 'configure' script.  It is invoked in a
18270# subdirectory of the build tree.  It generates a sed-script in the parent
18271# directory that is used to adjust includes for header files that reside in a
18272# subdirectory of /usr/include, etc.
18273PRG=""
18274while test \$# != 3
18275do
18276PRG="\$PRG \$1"; shift
18277done
18278DST=\$1
18279REF=\$2
18280SRC=\$3
18281TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
18282TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
18283echo installing \$SRC in \$DST
18284CF_EOF
18285
18286if test $WITH_CURSES_H = yes; then
18287	cat >>headers.sh <<CF_EOF
18288case \$DST in
18289/*/include/*)
18290	END=\`basename \$DST\`
18291	for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18292	do
18293		NAME=\`basename \$i\`
18294		echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18295	done
18296	;;
18297*)
18298	echo "" >> \$TMPSED
18299	;;
18300esac
18301CF_EOF
18302
18303else
18304	cat >>headers.sh <<CF_EOF
18305case \$DST in
18306/*/include/*)
18307	END=\`basename \$DST\`
18308	for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18309	do
18310		NAME=\`basename \$i\`
18311		if test "\$NAME" = "curses.h"
18312		then
18313			echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18314			NAME=ncurses.h
18315		fi
18316		echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18317	done
18318	;;
18319*)
18320	echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18321	;;
18322esac
18323CF_EOF
18324fi
18325cat >>headers.sh <<CF_EOF
18326rm -f \$TMPSRC
18327sed -f \$TMPSED \$SRC > \$TMPSRC
18328NAME=\`basename \$SRC\`
18329CF_EOF
18330if test $WITH_CURSES_H != yes; then
18331	cat >>headers.sh <<CF_EOF
18332test "\$NAME" = "curses.h" && NAME=ncurses.h
18333CF_EOF
18334fi
18335cat >>headers.sh <<CF_EOF
18336# Just in case someone gzip'd manpages, remove the conflicting copy.
18337test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
18338
18339eval \$PRG \$TMPSRC \$DST/\$NAME
18340rm -f \$TMPSRC \$TMPSED
18341CF_EOF
18342
18343chmod 0755 headers.sh
18344
18345for cf_dir in $SRC_SUBDIRS
18346do
18347	if test ! -d $srcdir/$cf_dir ; then
18348		continue
18349	fi
18350
18351	if test -f $srcdir/$cf_dir/headers; then
18352		$AWK -f $srcdir/mk-hdr.awk \
18353			subset="$LIB_SUBSETS" \
18354			compat="$WITH_CURSES_H" \
18355			$srcdir/$cf_dir/headers >>$cf_dir/Makefile
18356	fi
18357
18358	if test -f $srcdir/$cf_dir/modules; then
18359		if test "$cf_dir" != "c++" ; then
18360			cat >>$cf_dir/Makefile <<"CF_EOF"
18361depend : ${AUTO_SRC}
18362	makedepend -- ${CPPFLAGS} -- ${C_SRC}
18363
18364# DO NOT DELETE THIS LINE -- make depend depends on it.
18365CF_EOF
18366		fi
18367	fi
18368done
18369
18370 ;;
18371  esac
18372done
18373EOF
18374
18375cat >>$CONFIG_STATUS <<\EOF
18376
18377{ (exit 0); exit 0; }
18378EOF
18379chmod +x $CONFIG_STATUS
18380ac_clean_files=$ac_clean_files_save
18381
18382# configure is writing to config.log, and then calls config.status.
18383# config.status does its own redirection, appending to config.log.
18384# Unfortunately, on DOS this fails, as config.log is still kept open
18385# by configure, so config.status won't be able to write to it; its
18386# output is simply discarded.  So we exec the FD to /dev/null,
18387# effectively closing config.log, so it can be properly (re)opened and
18388# appended to by config.status.  When coming back to configure, we
18389# need to make the FD available again.
18390if test "$no_create" != yes; then
18391  ac_cs_success=:
18392  exec 5>/dev/null
18393  $SHELL $CONFIG_STATUS || ac_cs_success=false
18394  exec 5>>config.log
18395  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18396  # would make configure fail if this is the last instruction.
18397  $ac_cs_success || { (exit 1); exit 1; }
18398fi
18399${MAKE-make} preinstall
18400