xref: /freebsd/contrib/ncurses/configure (revision a0ee8cc6)
1#! /bin/sh
2# From configure.in Revision: 1.577 .
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by Autoconf 2.52.20121002.
5#
6# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7# Free Software Foundation, Inc.
8# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
10
11# Avoid depending upon Character Ranges.
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'
174datarootdir='${prefix}/share'
175datadir='${datarootdir}'
176sysconfdir='${prefix}/etc'
177sharedstatedir='${prefix}/com'
178localstatedir='${prefix}/var'
179libdir='${exec_prefix}/lib'
180includedir='${prefix}/include'
181oldincludedir='/usr/include'
182infodir='${datarootdir}/info'
183mandir='${datarootdir}/man'
184
185# Identity of this package.
186PACKAGE_NAME=
187PACKAGE_TARNAME=
188PACKAGE_VERSION=
189PACKAGE_STRING=
190PACKAGE_BUGREPORT=
191
192ac_prev=
193for ac_option
194do
195  # If the previous option needs an argument, assign it.
196  if test -n "$ac_prev"; then
197    eval "$ac_prev=\$ac_option"
198    ac_prev=
199    continue
200  fi
201
202  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204  # Accept the important Cygnus configure options, so we can diagnose typos.
205
206  case $ac_option in
207
208  -bindir | --bindir | --bindi | --bind | --bin | --bi)
209    ac_prev=bindir ;;
210  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211    bindir=$ac_optarg ;;
212
213  -build | --build | --buil | --bui | --bu)
214    ac_prev=build_alias ;;
215  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216    build_alias=$ac_optarg ;;
217
218  -cache-file | --cache-file | --cache-fil | --cache-fi \
219  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220    ac_prev=cache_file ;;
221  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223    cache_file=$ac_optarg ;;
224
225  --config-cache | -C)
226    cache_file=config.cache ;;
227
228  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229    ac_prev=datadir ;;
230  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231  | --da=*)
232    datadir=$ac_optarg ;;
233
234  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235  | --dataroo | --dataro | --datar)
236    ac_prev=datarootdir ;;
237  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239    datarootdir=$ac_optarg ;;
240
241  -disable-* | --disable-*)
242    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243    # Reject names that are not valid shell variable names.
244    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246   { (exit 1); exit 1; }; }
247    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248    eval "enable_$ac_feature=no" ;;
249
250  -enable-* | --enable-*)
251    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252    # Reject names that are not valid shell variable names.
253    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255   { (exit 1); exit 1; }; }
256    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257    case $ac_option in
258      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259      *) ac_optarg=yes ;;
260    esac
261    eval "enable_$ac_feature='$ac_optarg'" ;;
262
263  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265  | --exec | --exe | --ex)
266    ac_prev=exec_prefix ;;
267  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269  | --exec=* | --exe=* | --ex=*)
270    exec_prefix=$ac_optarg ;;
271
272  -gas | --gas | --ga | --g)
273    # Obsolete; use --with-gas.
274    with_gas=yes ;;
275
276  -help | --help | --hel | --he | -h)
277    ac_init_help=long ;;
278  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279    ac_init_help=recursive ;;
280  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281    ac_init_help=short ;;
282
283  -host | --host | --hos | --ho)
284    ac_prev=host_alias ;;
285  -host=* | --host=* | --hos=* | --ho=*)
286    host_alias=$ac_optarg ;;
287
288  -includedir | --includedir | --includedi | --included | --include \
289  | --includ | --inclu | --incl | --inc)
290    ac_prev=includedir ;;
291  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292  | --includ=* | --inclu=* | --incl=* | --inc=*)
293    includedir=$ac_optarg ;;
294
295  -infodir | --infodir | --infodi | --infod | --info | --inf)
296    ac_prev=infodir ;;
297  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298    infodir=$ac_optarg ;;
299
300  -libdir | --libdir | --libdi | --libd)
301    ac_prev=libdir ;;
302  -libdir=* | --libdir=* | --libdi=* | --libd=*)
303    libdir=$ac_optarg ;;
304
305  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306  | --libexe | --libex | --libe)
307    ac_prev=libexecdir ;;
308  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309  | --libexe=* | --libex=* | --libe=*)
310    libexecdir=$ac_optarg ;;
311
312  -localstatedir | --localstatedir | --localstatedi | --localstated \
313  | --localstate | --localstat | --localsta | --localst \
314  | --locals | --local | --loca | --loc | --lo)
315    ac_prev=localstatedir ;;
316  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319    localstatedir=$ac_optarg ;;
320
321  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322    ac_prev=mandir ;;
323  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324    mandir=$ac_optarg ;;
325
326  -nfp | --nfp | --nf)
327    # Obsolete; use --without-fp.
328    with_fp=no ;;
329
330  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331  | --no-cr | --no-c)
332    no_create=yes ;;
333
334  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336    no_recursion=yes ;;
337
338  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340  | --oldin | --oldi | --old | --ol | --o)
341    ac_prev=oldincludedir ;;
342  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345    oldincludedir=$ac_optarg ;;
346
347  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348    ac_prev=prefix ;;
349  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350    prefix=$ac_optarg ;;
351
352  -program-prefix | --program-prefix | --program-prefi | --program-pref \
353  | --program-pre | --program-pr | --program-p)
354    ac_prev=program_prefix ;;
355  -program-prefix=* | --program-prefix=* | --program-prefi=* \
356  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357    program_prefix=$ac_optarg ;;
358
359  -program-suffix | --program-suffix | --program-suffi | --program-suff \
360  | --program-suf | --program-su | --program-s)
361    ac_prev=program_suffix ;;
362  -program-suffix=* | --program-suffix=* | --program-suffi=* \
363  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364    program_suffix=$ac_optarg ;;
365
366  -program-transform-name | --program-transform-name \
367  | --program-transform-nam | --program-transform-na \
368  | --program-transform-n | --program-transform- \
369  | --program-transform | --program-transfor \
370  | --program-transfo | --program-transf \
371  | --program-trans | --program-tran \
372  | --progr-tra | --program-tr | --program-t)
373    ac_prev=program_transform_name ;;
374  -program-transform-name=* | --program-transform-name=* \
375  | --program-transform-nam=* | --program-transform-na=* \
376  | --program-transform-n=* | --program-transform-=* \
377  | --program-transform=* | --program-transfor=* \
378  | --program-transfo=* | --program-transf=* \
379  | --program-trans=* | --program-tran=* \
380  | --progr-tra=* | --program-tr=* | --program-t=*)
381    program_transform_name=$ac_optarg ;;
382
383  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384  | -silent | --silent | --silen | --sile | --sil)
385    silent=yes ;;
386
387  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388    ac_prev=sbindir ;;
389  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390  | --sbi=* | --sb=*)
391    sbindir=$ac_optarg ;;
392
393  -sharedstatedir | --sharedstatedir | --sharedstatedi \
394  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395  | --sharedst | --shareds | --shared | --share | --shar \
396  | --sha | --sh)
397    ac_prev=sharedstatedir ;;
398  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401  | --sha=* | --sh=*)
402    sharedstatedir=$ac_optarg ;;
403
404  -site | --site | --sit)
405    ac_prev=site ;;
406  -site=* | --site=* | --sit=*)
407    site=$ac_optarg ;;
408
409  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410    ac_prev=srcdir ;;
411  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412    srcdir=$ac_optarg ;;
413
414  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415  | --syscon | --sysco | --sysc | --sys | --sy)
416    ac_prev=sysconfdir ;;
417  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419    sysconfdir=$ac_optarg ;;
420
421  -target | --target | --targe | --targ | --tar | --ta | --t)
422    ac_prev=target_alias ;;
423  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424    target_alias=$ac_optarg ;;
425
426  -v | -verbose | --verbose | --verbos | --verbo | --verb)
427    verbose=yes ;;
428
429  -version | --version | --versio | --versi | --vers | -V)
430    ac_init_version=: ;;
431
432  -with-* | --with-*)
433    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434    # Reject names that are not valid shell variable names.
435    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436      { echo "$as_me: error: invalid package name: $ac_package" >&2
437   { (exit 1); exit 1; }; }
438    ac_package=`echo $ac_package| sed 's/-/_/g'`
439    case $ac_option in
440      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441      *) ac_optarg=yes ;;
442    esac
443    eval "with_$ac_package='$ac_optarg'" ;;
444
445  -without-* | --without-*)
446    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447    # Reject names that are not valid shell variable names.
448    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449      { echo "$as_me: error: invalid package name: $ac_package" >&2
450   { (exit 1); exit 1; }; }
451    ac_package=`echo $ac_package | sed 's/-/_/g'`
452    eval "with_$ac_package=no" ;;
453
454  --x)
455    # Obsolete; use --with-x.
456    with_x=yes ;;
457
458  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459  | --x-incl | --x-inc | --x-in | --x-i)
460    ac_prev=x_includes ;;
461  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463    x_includes=$ac_optarg ;;
464
465  -x-libraries | --x-libraries | --x-librarie | --x-librari \
466  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467    ac_prev=x_libraries ;;
468  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470    x_libraries=$ac_optarg ;;
471
472  -*) { echo "$as_me: error: unrecognized option: $ac_option
473Try \`$0 --help' for more information." >&2
474   { (exit 1); exit 1; }; }
475    ;;
476
477  *=*)
478    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479    # Reject names that are not valid shell variable names.
480    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482   { (exit 1); exit 1; }; }
483    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484    eval "$ac_envvar='$ac_optarg'"
485    export $ac_envvar ;;
486
487  *)
488    # FIXME: should be removed in autoconf 3.0.
489    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493    ;;
494
495  esac
496done
497
498if test -n "$ac_prev"; then
499  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500  { echo "$as_me: error: missing argument to $ac_option" >&2
501   { (exit 1); exit 1; }; }
502fi
503
504# Be sure to have absolute paths.
505for ac_var in exec_prefix prefix
506do
507  eval ac_val=$`echo $ac_var`
508  case $ac_val in
509    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511   { (exit 1); exit 1; }; };;
512  esac
513done
514
515# Be sure to have absolute paths.
516for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517              localstatedir libdir includedir oldincludedir infodir mandir
518do
519  eval ac_val=$`echo $ac_var`
520  case $ac_val in
521    [\\/$]* | ?:[\\/]* ) ;;
522    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523   { (exit 1); exit 1; }; };;
524  esac
525done
526
527# There might be people who depend on the old broken behavior: `$host'
528# used to hold the argument of --host etc.
529build=$build_alias
530host=$host_alias
531target=$target_alias
532
533# FIXME: should be removed in autoconf 3.0.
534if test "x$host_alias" != x; then
535  if test "x$build_alias" = x; then
536    cross_compiling=maybe
537    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538    If a cross compiler is detected then cross compile mode will be used." >&2
539  elif test "x$build_alias" != "x$host_alias"; then
540    cross_compiling=yes
541  fi
542fi
543
544ac_tool_prefix=
545test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547test "$silent" = yes && exec 6>/dev/null
548
549# Find the source files, if location was not specified.
550if test -z "$srcdir"; then
551  ac_srcdir_defaulted=yes
552  # Try the directory containing this script, then its parent.
553  ac_prog=$0
554  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556  srcdir=$ac_confdir
557  if test ! -r $srcdir/$ac_unique_file; then
558    srcdir=..
559  fi
560else
561  ac_srcdir_defaulted=no
562fi
563if test ! -r $srcdir/$ac_unique_file; then
564  if test "$ac_srcdir_defaulted" = yes; then
565    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566   { (exit 1); exit 1; }; }
567  else
568    { echo "$as_me: error: cannot find sources in $srcdir" >&2
569   { (exit 1); exit 1; }; }
570  fi
571fi
572srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573ac_env_build_alias_set=${build_alias+set}
574ac_env_build_alias_value=$build_alias
575ac_cv_env_build_alias_set=${build_alias+set}
576ac_cv_env_build_alias_value=$build_alias
577ac_env_host_alias_set=${host_alias+set}
578ac_env_host_alias_value=$host_alias
579ac_cv_env_host_alias_set=${host_alias+set}
580ac_cv_env_host_alias_value=$host_alias
581ac_env_target_alias_set=${target_alias+set}
582ac_env_target_alias_value=$target_alias
583ac_cv_env_target_alias_set=${target_alias+set}
584ac_cv_env_target_alias_value=$target_alias
585ac_env_CC_set=${CC+set}
586ac_env_CC_value=$CC
587ac_cv_env_CC_set=${CC+set}
588ac_cv_env_CC_value=$CC
589ac_env_CFLAGS_set=${CFLAGS+set}
590ac_env_CFLAGS_value=$CFLAGS
591ac_cv_env_CFLAGS_set=${CFLAGS+set}
592ac_cv_env_CFLAGS_value=$CFLAGS
593ac_env_LDFLAGS_set=${LDFLAGS+set}
594ac_env_LDFLAGS_value=$LDFLAGS
595ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596ac_cv_env_LDFLAGS_value=$LDFLAGS
597ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598ac_env_CPPFLAGS_value=$CPPFLAGS
599ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601ac_env_CPP_set=${CPP+set}
602ac_env_CPP_value=$CPP
603ac_cv_env_CPP_set=${CPP+set}
604ac_cv_env_CPP_value=$CPP
605ac_env_CXX_set=${CXX+set}
606ac_env_CXX_value=$CXX
607ac_cv_env_CXX_set=${CXX+set}
608ac_cv_env_CXX_value=$CXX
609ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610ac_env_CXXFLAGS_value=$CXXFLAGS
611ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613ac_env_CXXCPP_set=${CXXCPP+set}
614ac_env_CXXCPP_value=$CXXCPP
615ac_cv_env_CXXCPP_set=${CXXCPP+set}
616ac_cv_env_CXXCPP_value=$CXXCPP
617
618#
619# Report the --help message.
620#
621if test "$ac_init_help" = "long"; then
622  # Omit some internal or obsolete options to make the list less imposing.
623  # This message is too long to be a string in the A/UX 3.1 sh.
624  cat <<EOF
625\`configure' configures this package to adapt to many kinds of systems.
626
627Usage: $0 [OPTION]... [VAR=VALUE]...
628
629To assign environment variables (e.g., CC, CFLAGS...), specify them as
630VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632Defaults for the options are specified in brackets.
633
634Configuration:
635  -h, --help              display this help and exit
636      --help=short        display options specific to this package
637      --help=recursive    display the short help of all the included packages
638  -V, --version           display version information and exit
639  -q, --quiet, --silent   do not print \`checking...' messages
640      --cache-file=FILE   cache test results in FILE [disabled]
641  -C, --config-cache      alias for \`--cache-file=config.cache'
642  -n, --no-create         do not create output files
643      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645EOF
646
647  cat <<EOF
648Installation directories:
649  --prefix=PREFIX         install architecture-independent files in PREFIX
650                          [$ac_default_prefix]
651  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                          [PREFIX]
653
654By default, \`make install' will install all the files in
655\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657for instance \`--prefix=\$HOME'.
658
659For better control, use the options below.
660
661Fine tuning of the installation directories:
662  --bindir=DIR            user executables [EPREFIX/bin]
663  --sbindir=DIR           system admin executables [EPREFIX/sbin]
664  --libexecdir=DIR        program executables [EPREFIX/libexec]
665  --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670  --libdir=DIR            object code libraries [EPREFIX/lib]
671  --includedir=DIR        C header files [PREFIX/include]
672  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673  --infodir=DIR           info documentation [DATAROOTDIR/info]
674  --mandir=DIR            man documentation [DATAROOTDIR/man]
675EOF
676
677  cat <<\EOF
678
679Program names:
680  --program-prefix=PREFIX            prepend PREFIX to installed program names
681  --program-suffix=SUFFIX            append SUFFIX to installed program names
682  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684System types:
685  --build=BUILD           configure for building on BUILD [guessed]
686  --host=HOST       build programs to run on HOST [BUILD]
687  --target=TARGET   configure for building compilers for TARGET [HOST]
688EOF
689fi
690
691if test -n "$ac_init_help"; then
692
693  cat <<\EOF
694
695Optional Packages:
696  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699Optional Features:
700  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703  --with-rel-version=XXX  override derived release version
704  --with-abi-version=XXX  override derived ABI version
705  --with-system-type=XXX  test: override derived host system-type
706  --without-ada           suppress check for Ada95, don't build demo
707  --without-cxx           do not adjust ncurses bool to match C++
708  --without-cxx-binding   do not build C++ binding and demo
709  --disable-db-install    suppress install of terminal database
710  --without-manpages      suppress install of manpages
711  --without-progs         suppress build/install with programs (e.g., tic)
712  --without-tests         suppress build/install with test-programs
713  --without-curses-h      install curses.h as ncurses.h only
714  --with-pkg-config{=path} enable/disable use of pkg-config
715  --with-pkg-config-libdir=XXX use given directory for installing pc-files
716  --enable-pc-files       generate and install .pc files for pkg-config
717  --enable-mixed-case     tic should assume mixed-case filenames
718  --with-install-prefix   prefixes actual install-location ($DESTDIR)
719Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
720  --with-build-cc=XXX     the build C compiler ($BUILD_CC)
721  --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
722  --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
723  --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
724  --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
725  --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
726Options to Specify the Libraries Built/Used:
727  --disable-libtool-version  enable to use libtool's incompatible naming scheme
728  --with-libtool          generate libraries with libtool
729  --with-shared           generate shared-libraries
730  --with-normal           generate normal-libraries (default)
731  --with-debug            generate debug-libraries (default)
732  --with-profile          generate profile-libraries
733  --with-cxx-shared       generate C++ shared-libraries
734  --with-lib-prefix       override library-prefix
735  --with-termlib          generate separate terminfo library
736  --with-ticlib           generate separate tic library
737  --with-gpm              use Alessandro Rubini's GPM library
738  --without-dlsym         do not use dlsym() to load GPM dynamically
739  --with-sysmouse         use sysmouse (FreeBSD console)
740  --enable-rpath          use rpath option when generating shared libraries
741  --disable-relink        relink shared libraries during install
742  --with-shlib-version=X  Specify rel or abi version for shared libs
743  --disable-rpath-hack    don't add rpath options for additional libraries
744Fine-Tuning Your Configuration:
745  --disable-overwrite     leave out the link to -lcurses
746  --disable-database      do not use terminfo, only fallbacks/termcap
747  --with-database=XXX     specify terminfo source to install
748  --with-hashed-db        specify hashed-database library
749  --with-fallbacks=XXX    specify list of fallback terminal descriptions
750  --without-xterm-new     specify if xterm terminfo should be old version
751  --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
752  --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
753  --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
754  --disable-big-core      assume machine has little memory
755  --disable-big-strings   assume compiler has only standard-size strings
756  --enable-termcap        compile in termcap fallback support
757  --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
758  --enable-getcap         fast termcap load, no xrefs to terminfo
759  --enable-getcap-cache   cache translated termcaps in ~/.terminfo
760  --disable-home-terminfo drop ~/.terminfo from terminfo search-path
761  --disable-root-environ  restrict environment when running as root
762  --enable-symlinks       make tic use symbolic links not hard links
763  --enable-broken_linker  compile with broken-linker support code
764  --enable-bsdpad         recognize BSD-style prefix padding
765  --enable-widec          compile with wide-char/UTF-8 code
766  --disable-lp64          allow chtype to be long (ignore _LP64)
767  --disable-largefile     omit support for large files
768  --disable-tparm-varargs compile tparm() without varargs interface
769  --disable-tic-depends   link tic library without explicit dependency on ncurses library
770  --with-bool=TYPE        override fallback type of bool variable
771  --with-caps=alt         compile with alternate Caps file
772  --with-chtype=TYPE      override type of chtype
773  --with-ospeed=TYPE      override type of ospeed variable
774  --with-mmask-t=TYPE     override type of mmask_t
775  --with-ccharw-max=XXX   override size CCHARW_MAX
776  --with-tparm-arg=TYPE   override parameter type of tparm
777  --with-rcs-ids          compile-in RCS identifiers
778Options to Specify How Manpages are Installed:
779  --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
780                          optionally formatted/catonly, e.g., gzip,formatted
781  --with-manpage-renames  specify manpage-renaming
782  --with-manpage-aliases  specify manpage-aliases using .so
783  --with-manpage-symlinks specify manpage-aliases using symlinks
784  --with-manpage-tbl      specify manpage processing with tbl
785Extensions:
786  --disable-ext-funcs     disable function-extensions
787  --enable-sp-funcs       enable experimental SCREEN-extensions
788  --enable-term-driver    enable experimental terminal-driver
789  --enable-const          compile with extra/non-standard const
790  --enable-ext-colors     compile for 256-color support
791  --enable-ext-mouse      compile for extended mouse-encoding
792  --enable-no-padding     compile with $NCURSES_NO_PADDING code
793  --enable-signed-char    compile using signed Boolean's in term.h
794  --enable-sigwinch       compile with SIGWINCH handler
795  --enable-tcap-names     compile with user-definable terminal capabilities
796Development Code:
797  --without-develop       disable development options
798  --enable-hard-tabs      compile with hard-tabs code
799  --enable-xmc-glitch     compile with support for xmc (magic-cookie)
800Experimental Code:
801  --disable-assumed-color do not assume anything about default-colors
802  --disable-hashmap       compile without hashmap scrolling-optimization
803  --enable-colorfgbg      compile-in experimental $COLORFGBG code
804  --enable-interop        compile-in experimental interop bindings
805  --with-pthread          use POSIX thread library
806  --enable-pthreads-eintr enable EINTR in wgetch with pthreads
807  --enable-weak-symbols   enable weak-symbols for pthreads
808  --enable-reentrant      compile with experimental reentrant code
809  --with-wrap-prefix=XXX  override prefix used for public variables
810  --enable-safe-sprintf   compile with experimental safe-sprintf code
811  --disable-scroll-hints  compile without scroll-hints code
812  --enable-wgetch-events  compile with experimental wgetch-events code
813Testing/development Options:
814  --disable-echo          do not display "compiling" commands
815  --enable-warnings       build: turn on GCC compiler warnings
816  --enable-string-hacks   work around bogus compiler/loader warnings
817  --enable-assertions     test: turn on generation of assertion code
818  --with-dmalloc          test: use Gray Watson's dmalloc library
819  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
820  --with-valgrind         test: use valgrind
821  --disable-leaks         test: free permanent memory, analyze leaks
822  --enable-expanded       test: generate functions for certain macros
823  --disable-macros        test: use functions rather than macros
824  --with-trace            test: add trace() function to all models of ncurses
825Ada95 Binding Options:
826  --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
827  --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
828  --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
829  --with-ada-sharedlib=XX build Ada95 shared-library
830
831Some influential environment variables:
832  CC          C compiler command
833  CFLAGS      C compiler flags
834  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
835              nonstandard directory <lib dir>
836  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
837              headers in a nonstandard directory <include dir>
838  CPP         C preprocessor
839  CXX         C++ compiler command
840  CXXFLAGS    C++ compiler flags
841  CXXCPP      C++ preprocessor
842
843Use these variables to override the choices made by `configure' or to help
844it to find libraries and programs with nonstandard names/locations.
845
846EOF
847fi
848
849if test "$ac_init_help" = "recursive"; then
850  # If there are subdirs, report their specific --help.
851  ac_popdir=`pwd`
852  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
853    cd $ac_subdir
854    # A "../" for each directory in /$ac_subdir.
855    ac_dots=`echo $ac_subdir |
856             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
857
858    case $srcdir in
859    .) # No --srcdir option.  We are building in place.
860      ac_sub_srcdir=$srcdir ;;
861    [\\/]* | ?:[\\/]* ) # Absolute path.
862      ac_sub_srcdir=$srcdir/$ac_subdir ;;
863    *) # Relative path.
864      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
865    esac
866
867    # Check for guested configure; otherwise get Cygnus style configure.
868    if test -f $ac_sub_srcdir/configure.gnu; then
869      echo
870      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
871    elif test -f $ac_sub_srcdir/configure; then
872      echo
873      $SHELL $ac_sub_srcdir/configure  --help=recursive
874    elif test -f $ac_sub_srcdir/configure.ac ||
875           test -f $ac_sub_srcdir/configure.in; then
876      echo
877      $ac_configure --help
878    else
879      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
880    fi
881    cd $ac_popdir
882  done
883fi
884
885test -n "$ac_init_help" && exit 0
886if $ac_init_version; then
887  cat <<\EOF
888
889Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
890Free Software Foundation, Inc.
891This configure script is free software; the Free Software Foundation
892gives unlimited permission to copy, distribute and modify it.
893EOF
894  exit 0
895fi
896exec 5>config.log
897cat >&5 <<EOF
898This file contains any messages produced by compilers while
899running configure, to aid debugging if configure makes a mistake.
900
901It was created by $as_me, which was
902generated by GNU Autoconf 2.52.20121002.  Invocation command line was
903
904  $ $0 $@
905
906EOF
907{
908cat <<_ASUNAME
909## ---------- ##
910## Platform.  ##
911## ---------- ##
912
913hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
914uname -m = `(uname -m) 2>/dev/null || echo unknown`
915uname -r = `(uname -r) 2>/dev/null || echo unknown`
916uname -s = `(uname -s) 2>/dev/null || echo unknown`
917uname -v = `(uname -v) 2>/dev/null || echo unknown`
918
919/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
920/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
921
922/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
923/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
924/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
925hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
926/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
927/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
928/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
929
930PATH = $PATH
931
932_ASUNAME
933} >&5
934
935cat >&5 <<EOF
936## ------------ ##
937## Core tests.  ##
938## ------------ ##
939
940EOF
941
942# Keep a trace of the command line.
943# Strip out --no-create and --no-recursion so they do not pile up.
944# Also quote any args containing shell meta-characters.
945ac_configure_args=
946ac_sep=
947for ac_arg
948do
949  case $ac_arg in
950  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
951  | --no-cr | --no-c) ;;
952  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
953  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
954  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
955    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
956    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
957    ac_sep=" " ;;
958  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
959     ac_sep=" " ;;
960  esac
961  # Get rid of the leading space.
962done
963
964# When interrupted or exit'd, cleanup temporary files, and complete
965# config.log.  We remove comments because anyway the quotes in there
966# would cause problems or look ugly.
967trap 'exit_status=$?
968  # Save into config.log some information that might help in debugging.
969  echo >&5
970  echo "## ----------------- ##" >&5
971  echo "## Cache variables.  ##" >&5
972  echo "## ----------------- ##" >&5
973  echo >&5
974  # The following way of writing the cache mishandles newlines in values,
975{
976  (set) 2>&1 |
977    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
978    *ac_space=\ *)
979      sed -n \
980        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
981    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
982      ;;
983    *)
984      sed -n \
985        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
986      ;;
987    esac;
988} >&5
989  sed "/^$/d" confdefs.h >conftest.log
990  if test -s conftest.log; then
991    echo >&5
992    echo "## ------------ ##" >&5
993    echo "## confdefs.h.  ##" >&5
994    echo "## ------------ ##" >&5
995    echo >&5
996    cat conftest.log >&5
997  fi
998  (echo; echo) >&5
999  test "$ac_signal" != 0 &&
1000    echo "$as_me: caught signal $ac_signal" >&5
1001  echo "$as_me: exit $exit_status" >&5
1002  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1003    exit $exit_status
1004     ' 0
1005for ac_signal in 1 2 13 15; do
1006  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1007done
1008ac_signal=0
1009
1010# confdefs.h avoids OS command line length limits that DEFS can exceed.
1011rm -rf conftest* confdefs.h
1012# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1013echo >confdefs.h
1014
1015# Let the site file select an alternate cache file if it wants to.
1016# Prefer explicitly selected file to automatically selected ones.
1017if test -z "$CONFIG_SITE"; then
1018  if test "x$prefix" != xNONE; then
1019    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1020  else
1021    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1022  fi
1023fi
1024for ac_site_file in $CONFIG_SITE; do
1025  if test -r "$ac_site_file"; then
1026    { echo "$as_me:1026: loading site script $ac_site_file" >&5
1027echo "$as_me: loading site script $ac_site_file" >&6;}
1028    cat "$ac_site_file" >&5
1029    . "$ac_site_file"
1030  fi
1031done
1032
1033if test -r "$cache_file"; then
1034  # Some versions of bash will fail to source /dev/null (special
1035  # files actually), so we avoid doing that.
1036  if test -f "$cache_file"; then
1037    { echo "$as_me:1037: loading cache $cache_file" >&5
1038echo "$as_me: loading cache $cache_file" >&6;}
1039    case $cache_file in
1040      [\\/]* | ?:[\\/]* ) . $cache_file;;
1041      *)                      . ./$cache_file;;
1042    esac
1043  fi
1044else
1045  { echo "$as_me:1045: creating cache $cache_file" >&5
1046echo "$as_me: creating cache $cache_file" >&6;}
1047  >$cache_file
1048fi
1049
1050# Check that the precious variables saved in the cache have kept the same
1051# value.
1052ac_cache_corrupted=false
1053for ac_var in `(set) 2>&1 |
1054               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1055  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1056  eval ac_new_set=\$ac_env_${ac_var}_set
1057  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1058  eval ac_new_val="\$ac_env_${ac_var}_value"
1059  case $ac_old_set,$ac_new_set in
1060    set,)
1061      { echo "$as_me:1061: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1062echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1063      ac_cache_corrupted=: ;;
1064    ,set)
1065      { echo "$as_me:1065: error: \`$ac_var' was not set in the previous run" >&5
1066echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1067      ac_cache_corrupted=: ;;
1068    ,);;
1069    *)
1070      if test "x$ac_old_val" != "x$ac_new_val"; then
1071        { echo "$as_me:1071: error: \`$ac_var' has changed since the previous run:" >&5
1072echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1073        { echo "$as_me:1073:   former value:  $ac_old_val" >&5
1074echo "$as_me:   former value:  $ac_old_val" >&2;}
1075        { echo "$as_me:1075:   current value: $ac_new_val" >&5
1076echo "$as_me:   current value: $ac_new_val" >&2;}
1077        ac_cache_corrupted=:
1078      fi;;
1079  esac
1080  # Pass precious variables to config.status.  It doesn't matter if
1081  # we pass some twice (in addition to the command line arguments).
1082  if test "$ac_new_set" = set; then
1083    case $ac_new_val in
1084    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1085      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1086      ac_configure_args="$ac_configure_args '$ac_arg'"
1087      ;;
1088    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1089       ;;
1090    esac
1091  fi
1092done
1093if $ac_cache_corrupted; then
1094  { echo "$as_me:1094: error: changes in the environment can compromise the build" >&5
1095echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1096  { { echo "$as_me:1096: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1097echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1098   { (exit 1); exit 1; }; }
1099fi
1100
1101ac_ext=c
1102ac_cpp='$CPP $CPPFLAGS'
1103ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1104ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1105ac_compiler_gnu=$ac_cv_c_compiler_gnu
1106ac_main_return=return
1107
1108case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1109  *c*,-n*) ECHO_N= ECHO_C='
1110' ECHO_T='	' ;;
1111  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1112  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1113esac
1114echo "#! $SHELL" >conftest.sh
1115echo  "exit 0"   >>conftest.sh
1116chmod +x conftest.sh
1117if { (echo "$as_me:1117: PATH=\".;.\"; conftest.sh") >&5
1118  (PATH=".;."; conftest.sh) 2>&5
1119  ac_status=$?
1120  echo "$as_me:1120: \$? = $ac_status" >&5
1121  (exit $ac_status); }; then
1122  ac_path_separator=';'
1123else
1124  ac_path_separator=:
1125fi
1126PATH_SEPARATOR="$ac_path_separator"
1127rm -f conftest.sh
1128
1129ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1130
1131top_builddir=`pwd`
1132
1133echo "$as_me:1133: checking for egrep" >&5
1134echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1135if test "${ac_cv_prog_egrep+set}" = set; then
1136  echo $ECHO_N "(cached) $ECHO_C" >&6
1137else
1138  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1139    then ac_cv_prog_egrep='grep -E'
1140    else ac_cv_prog_egrep='egrep'
1141    fi
1142fi
1143echo "$as_me:1143: result: $ac_cv_prog_egrep" >&5
1144echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1145 EGREP=$ac_cv_prog_egrep
1146
1147test -z "$EGREP" && { { echo "$as_me:1147: error: No egrep program found" >&5
1148echo "$as_me: error: No egrep program found" >&2;}
1149   { (exit 1); exit 1; }; }
1150
1151NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[ 	]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1152NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[ 	]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1153NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[ 	]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1154cf_cv_abi_version=${NCURSES_MAJOR}
1155cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1156cf_cv_timestamp=`date`
1157echo "$as_me:1157: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1158echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1159
1160test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1161
1162# Check whether --with-rel-version or --without-rel-version was given.
1163if test "${with_rel_version+set}" = set; then
1164  withval="$with_rel_version"
1165  { echo "$as_me:1165: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1166echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1167 cf_cv_rel_version=$withval
1168fi;
1169
1170 NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1171 NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1172
1173if test -n "$NCURSES_MAJOR" ; then
1174  case $NCURSES_MAJOR in #(vi
1175  [0-9]*) #(vi
1176 	;;
1177  *)
1178	{ { echo "$as_me:1178: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1179echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1180   { (exit 1); exit 1; }; }
1181 	;;
1182  esac
1183else
1184  { { echo "$as_me:1184: error: Release major-version value is empty" >&5
1185echo "$as_me: error: Release major-version value is empty" >&2;}
1186   { (exit 1); exit 1; }; }
1187fi
1188
1189if test -n "$NCURSES_MINOR" ; then
1190  case $NCURSES_MINOR in #(vi
1191  [0-9]*) #(vi
1192 	;;
1193  *)
1194	{ { echo "$as_me:1194: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1195echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1196   { (exit 1); exit 1; }; }
1197 	;;
1198  esac
1199else
1200  { { echo "$as_me:1200: error: Release minor-version value is empty" >&5
1201echo "$as_me: error: Release minor-version value is empty" >&2;}
1202   { (exit 1); exit 1; }; }
1203fi
1204
1205test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1206
1207# Check whether --with-abi-version or --without-abi-version was given.
1208if test "${with_abi_version+set}" = set; then
1209  withval="$with_abi_version"
1210  { echo "$as_me:1210: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1211echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1212 cf_cv_abi_version=$withval
1213fi;
1214
1215if test -n "$cf_cv_abi_version" ; then
1216  case $cf_cv_abi_version in #(vi
1217  [0-9]*) #(vi
1218 	;;
1219  *)
1220	{ { echo "$as_me:1220: error: ABI version is not a number: $cf_cv_abi_version" >&5
1221echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1222   { (exit 1); exit 1; }; }
1223 	;;
1224  esac
1225else
1226  { { echo "$as_me:1226: error: ABI version value is empty" >&5
1227echo "$as_me: error: ABI version value is empty" >&2;}
1228   { (exit 1); exit 1; }; }
1229fi
1230
1231ac_aux_dir=
1232for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1233  if test -f $ac_dir/install-sh; then
1234    ac_aux_dir=$ac_dir
1235    ac_install_sh="$ac_aux_dir/install-sh -c"
1236    break
1237  elif test -f $ac_dir/install.sh; then
1238    ac_aux_dir=$ac_dir
1239    ac_install_sh="$ac_aux_dir/install.sh -c"
1240    break
1241  elif test -f $ac_dir/shtool; then
1242    ac_aux_dir=$ac_dir
1243    ac_install_sh="$ac_aux_dir/shtool install -c"
1244    break
1245  fi
1246done
1247if test -z "$ac_aux_dir"; then
1248  { { echo "$as_me:1248: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1249echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1250   { (exit 1); exit 1; }; }
1251fi
1252ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1253ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1254ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1255
1256# Make sure we can run config.sub.
1257$ac_config_sub sun4 >/dev/null 2>&1 ||
1258  { { echo "$as_me:1258: error: cannot run $ac_config_sub" >&5
1259echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1260   { (exit 1); exit 1; }; }
1261
1262echo "$as_me:1262: checking build system type" >&5
1263echo $ECHO_N "checking build system type... $ECHO_C" >&6
1264if test "${ac_cv_build+set}" = set; then
1265  echo $ECHO_N "(cached) $ECHO_C" >&6
1266else
1267  ac_cv_build_alias=$build_alias
1268test -z "$ac_cv_build_alias" &&
1269  ac_cv_build_alias=`$ac_config_guess`
1270test -z "$ac_cv_build_alias" &&
1271  { { echo "$as_me:1271: error: cannot guess build type; you must specify one" >&5
1272echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1273   { (exit 1); exit 1; }; }
1274ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1275  { { echo "$as_me:1275: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1276echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1277   { (exit 1); exit 1; }; }
1278
1279fi
1280echo "$as_me:1280: result: $ac_cv_build" >&5
1281echo "${ECHO_T}$ac_cv_build" >&6
1282build=$ac_cv_build
1283build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1284build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1285build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1286
1287echo "$as_me:1287: checking host system type" >&5
1288echo $ECHO_N "checking host system type... $ECHO_C" >&6
1289if test "${ac_cv_host+set}" = set; then
1290  echo $ECHO_N "(cached) $ECHO_C" >&6
1291else
1292  ac_cv_host_alias=$host_alias
1293test -z "$ac_cv_host_alias" &&
1294  ac_cv_host_alias=$ac_cv_build_alias
1295ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1296  { { echo "$as_me:1296: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1297echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1298   { (exit 1); exit 1; }; }
1299
1300fi
1301echo "$as_me:1301: result: $ac_cv_host" >&5
1302echo "${ECHO_T}$ac_cv_host" >&6
1303host=$ac_cv_host
1304host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1305host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1306host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1307
1308if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1309	echo "$as_me:1309: checking target system type" >&5
1310echo $ECHO_N "checking target system type... $ECHO_C" >&6
1311if test "${ac_cv_target+set}" = set; then
1312  echo $ECHO_N "(cached) $ECHO_C" >&6
1313else
1314  ac_cv_target_alias=$target_alias
1315test "x$ac_cv_target_alias" = "x" &&
1316  ac_cv_target_alias=$ac_cv_host_alias
1317ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1318  { { echo "$as_me:1318: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1319echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1320   { (exit 1); exit 1; }; }
1321
1322fi
1323echo "$as_me:1323: result: $ac_cv_target" >&5
1324echo "${ECHO_T}$ac_cv_target" >&6
1325target=$ac_cv_target
1326target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1327target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1328target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1329
1330# The aliases save the names the user supplied, while $host etc.
1331# will get canonicalized.
1332test -n "$target_alias" &&
1333  test "$program_prefix$program_suffix$program_transform_name" = \
1334    NONENONEs,x,x, &&
1335  program_prefix=${target_alias}-
1336	system_name="$host_os"
1337else
1338	system_name="`(uname -s -r) 2>/dev/null`"
1339	if test -z "$system_name" ; then
1340		system_name="`(hostname) 2>/dev/null`"
1341	fi
1342fi
1343test -n "$system_name" &&
1344cat >>confdefs.h <<EOF
1345#define SYSTEM_NAME "$system_name"
1346EOF
1347
1348if test "${cf_cv_system_name+set}" = set; then
1349  echo $ECHO_N "(cached) $ECHO_C" >&6
1350else
1351  cf_cv_system_name="$system_name"
1352fi
1353
1354test -z "$system_name" && system_name="$cf_cv_system_name"
1355test -n "$cf_cv_system_name" && echo "$as_me:1355: result: Configuring for $cf_cv_system_name" >&5
1356echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1357
1358if test ".$system_name" != ".$cf_cv_system_name" ; then
1359	echo "$as_me:1359: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1360echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1361	{ { echo "$as_me:1361: error: \"Please remove config.cache and try again.\"" >&5
1362echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1363   { (exit 1); exit 1; }; }
1364fi
1365
1366# Check whether --with-system-type or --without-system-type was given.
1367if test "${with_system_type+set}" = set; then
1368  withval="$with_system_type"
1369  { echo "$as_me:1369: WARNING: overriding system type to $withval" >&5
1370echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1371	cf_cv_system_name=$withval
1372	host_os=$withval
1373
1374fi;
1375
1376###	Save the given $CFLAGS to allow user-override.
1377cf_user_CFLAGS="$CFLAGS"
1378
1379###	Default install-location
1380
1381echo "$as_me:1381: checking for prefix" >&5
1382echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1383if test "x$prefix" = "xNONE" ; then
1384	case "$cf_cv_system_name" in
1385		# non-vendor systems don't have a conflict
1386	openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1387		prefix=/usr
1388		;;
1389	*)	prefix=$ac_default_prefix
1390		;;
1391	esac
1392fi
1393echo "$as_me:1393: result: $prefix" >&5
1394echo "${ECHO_T}$prefix" >&6
1395
1396if test "x$prefix" = "xNONE" ; then
1397echo "$as_me:1397: checking for default include-directory" >&5
1398echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1399test -n "$verbose" && echo 1>&6
1400for cf_symbol in \
1401	$includedir \
1402	$includedir/ncurses \
1403	$prefix/include \
1404	$prefix/include/ncurses \
1405	/usr/local/include \
1406	/usr/local/include/ncurses \
1407	/usr/include \
1408	/usr/include/ncurses
1409do
1410	cf_dir=`eval echo $cf_symbol`
1411	if test -f $cf_dir/curses.h ; then
1412	if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1413		includedir="$cf_symbol"
1414		test -n "$verbose"  && echo $ac_n "	found " 1>&6
1415		break
1416	fi
1417	fi
1418	test -n "$verbose"  && echo "	tested $cf_dir" 1>&6
1419done
1420echo "$as_me:1420: result: $includedir" >&5
1421echo "${ECHO_T}$includedir" >&6
1422fi
1423
1424###	Checks for programs.
1425
1426# Check whether --with-ada or --without-ada was given.
1427if test "${with_ada+set}" = set; then
1428  withval="$with_ada"
1429  cf_with_ada=$withval
1430else
1431  cf_with_ada=yes
1432fi;
1433if test "x$cf_with_ada" = xyes
1434then
1435	cf_PROG_CC="gnatgcc gcc cc"
1436else
1437	cf_PROG_CC="gcc cc"
1438fi
1439
1440ac_ext=c
1441ac_cpp='$CPP $CPPFLAGS'
1442ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1443ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1444ac_compiler_gnu=$ac_cv_c_compiler_gnu
1445ac_main_return=return
1446if test -n "$ac_tool_prefix"; then
1447  for ac_prog in $cf_PROG_CC
1448  do
1449    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1450set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1451echo "$as_me:1451: checking for $ac_word" >&5
1452echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1453if test "${ac_cv_prog_CC+set}" = set; then
1454  echo $ECHO_N "(cached) $ECHO_C" >&6
1455else
1456  if test -n "$CC"; then
1457  ac_cv_prog_CC="$CC" # Let the user override the test.
1458else
1459  ac_save_IFS=$IFS; IFS=$ac_path_separator
1460ac_dummy="$PATH"
1461for ac_dir in $ac_dummy; do
1462  IFS=$ac_save_IFS
1463  test -z "$ac_dir" && ac_dir=.
1464  $as_executable_p "$ac_dir/$ac_word" || continue
1465ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1466echo "$as_me:1466: found $ac_dir/$ac_word" >&5
1467break
1468done
1469
1470fi
1471fi
1472CC=$ac_cv_prog_CC
1473if test -n "$CC"; then
1474  echo "$as_me:1474: result: $CC" >&5
1475echo "${ECHO_T}$CC" >&6
1476else
1477  echo "$as_me:1477: result: no" >&5
1478echo "${ECHO_T}no" >&6
1479fi
1480
1481    test -n "$CC" && break
1482  done
1483fi
1484if test -z "$CC"; then
1485  ac_ct_CC=$CC
1486  for ac_prog in $cf_PROG_CC
1487do
1488  # Extract the first word of "$ac_prog", so it can be a program name with args.
1489set dummy $ac_prog; ac_word=$2
1490echo "$as_me:1490: checking for $ac_word" >&5
1491echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1492if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1493  echo $ECHO_N "(cached) $ECHO_C" >&6
1494else
1495  if test -n "$ac_ct_CC"; then
1496  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1497else
1498  ac_save_IFS=$IFS; IFS=$ac_path_separator
1499ac_dummy="$PATH"
1500for ac_dir in $ac_dummy; do
1501  IFS=$ac_save_IFS
1502  test -z "$ac_dir" && ac_dir=.
1503  $as_executable_p "$ac_dir/$ac_word" || continue
1504ac_cv_prog_ac_ct_CC="$ac_prog"
1505echo "$as_me:1505: found $ac_dir/$ac_word" >&5
1506break
1507done
1508
1509fi
1510fi
1511ac_ct_CC=$ac_cv_prog_ac_ct_CC
1512if test -n "$ac_ct_CC"; then
1513  echo "$as_me:1513: result: $ac_ct_CC" >&5
1514echo "${ECHO_T}$ac_ct_CC" >&6
1515else
1516  echo "$as_me:1516: result: no" >&5
1517echo "${ECHO_T}no" >&6
1518fi
1519
1520  test -n "$ac_ct_CC" && break
1521done
1522
1523  CC=$ac_ct_CC
1524fi
1525
1526test -z "$CC" && { { echo "$as_me:1526: error: no acceptable cc found in \$PATH" >&5
1527echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1528   { (exit 1); exit 1; }; }
1529
1530# Provide some information about the compiler.
1531echo "$as_me:1531:" \
1532     "checking for C compiler version" >&5
1533ac_compiler=`set X $ac_compile; echo $2`
1534{ (eval echo "$as_me:1534: \"$ac_compiler --version </dev/null >&5\"") >&5
1535  (eval $ac_compiler --version </dev/null >&5) 2>&5
1536  ac_status=$?
1537  echo "$as_me:1537: \$? = $ac_status" >&5
1538  (exit $ac_status); }
1539{ (eval echo "$as_me:1539: \"$ac_compiler -v </dev/null >&5\"") >&5
1540  (eval $ac_compiler -v </dev/null >&5) 2>&5
1541  ac_status=$?
1542  echo "$as_me:1542: \$? = $ac_status" >&5
1543  (exit $ac_status); }
1544{ (eval echo "$as_me:1544: \"$ac_compiler -V </dev/null >&5\"") >&5
1545  (eval $ac_compiler -V </dev/null >&5) 2>&5
1546  ac_status=$?
1547  echo "$as_me:1547: \$? = $ac_status" >&5
1548  (exit $ac_status); }
1549
1550cat >conftest.$ac_ext <<_ACEOF
1551#line 1551 "configure"
1552#include "confdefs.h"
1553
1554int
1555main ()
1556{
1557
1558  ;
1559  return 0;
1560}
1561_ACEOF
1562ac_clean_files_save=$ac_clean_files
1563ac_clean_files="$ac_clean_files a.out a.exe"
1564# Try to create an executable without -o first, disregard a.out.
1565# It will help us diagnose broken compilers, and finding out an intuition
1566# of exeext.
1567echo "$as_me:1567: checking for C compiler default output" >&5
1568echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1569ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1570if { (eval echo "$as_me:1570: \"$ac_link_default\"") >&5
1571  (eval $ac_link_default) 2>&5
1572  ac_status=$?
1573  echo "$as_me:1573: \$? = $ac_status" >&5
1574  (exit $ac_status); }; then
1575  # Find the output, starting from the most likely.  This scheme is
1576# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1577# resort.
1578for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1579                ls a.out conftest 2>/dev/null;
1580                ls a.* conftest.* 2>/dev/null`; do
1581  case $ac_file in
1582    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1583    a.out ) # We found the default executable, but exeext='' is most
1584            # certainly right.
1585            break;;
1586    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1587          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1588          export ac_cv_exeext
1589          break;;
1590    * ) break;;
1591  esac
1592done
1593else
1594  echo "$as_me: failed program was:" >&5
1595cat conftest.$ac_ext >&5
1596{ { echo "$as_me:1596: error: C compiler cannot create executables" >&5
1597echo "$as_me: error: C compiler cannot create executables" >&2;}
1598   { (exit 77); exit 77; }; }
1599fi
1600
1601ac_exeext=$ac_cv_exeext
1602echo "$as_me:1602: result: $ac_file" >&5
1603echo "${ECHO_T}$ac_file" >&6
1604
1605# Check the compiler produces executables we can run.  If not, either
1606# the compiler is broken, or we cross compile.
1607echo "$as_me:1607: checking whether the C compiler works" >&5
1608echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1609# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1610# If not cross compiling, check that we can run a simple program.
1611if test "$cross_compiling" != yes; then
1612  if { ac_try='./$ac_file'
1613  { (eval echo "$as_me:1613: \"$ac_try\"") >&5
1614  (eval $ac_try) 2>&5
1615  ac_status=$?
1616  echo "$as_me:1616: \$? = $ac_status" >&5
1617  (exit $ac_status); }; }; then
1618    cross_compiling=no
1619  else
1620    if test "$cross_compiling" = maybe; then
1621	cross_compiling=yes
1622    else
1623	{ { echo "$as_me:1623: error: cannot run C compiled programs.
1624If you meant to cross compile, use \`--host'." >&5
1625echo "$as_me: error: cannot run C compiled programs.
1626If you meant to cross compile, use \`--host'." >&2;}
1627   { (exit 1); exit 1; }; }
1628    fi
1629  fi
1630fi
1631echo "$as_me:1631: result: yes" >&5
1632echo "${ECHO_T}yes" >&6
1633
1634rm -f a.out a.exe conftest$ac_cv_exeext
1635ac_clean_files=$ac_clean_files_save
1636# Check the compiler produces executables we can run.  If not, either
1637# the compiler is broken, or we cross compile.
1638echo "$as_me:1638: checking whether we are cross compiling" >&5
1639echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1640echo "$as_me:1640: result: $cross_compiling" >&5
1641echo "${ECHO_T}$cross_compiling" >&6
1642
1643echo "$as_me:1643: checking for executable suffix" >&5
1644echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1645if { (eval echo "$as_me:1645: \"$ac_link\"") >&5
1646  (eval $ac_link) 2>&5
1647  ac_status=$?
1648  echo "$as_me:1648: \$? = $ac_status" >&5
1649  (exit $ac_status); }; then
1650  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1651# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1652# work properly (i.e., refer to `conftest.exe'), while it won't with
1653# `rm'.
1654for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1655  case $ac_file in
1656    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1657    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1658          export ac_cv_exeext
1659          break;;
1660    * ) break;;
1661  esac
1662done
1663else
1664  { { echo "$as_me:1664: error: cannot compute EXEEXT: cannot compile and link" >&5
1665echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1666   { (exit 1); exit 1; }; }
1667fi
1668
1669rm -f conftest$ac_cv_exeext
1670echo "$as_me:1670: result: $ac_cv_exeext" >&5
1671echo "${ECHO_T}$ac_cv_exeext" >&6
1672
1673rm -f conftest.$ac_ext
1674EXEEXT=$ac_cv_exeext
1675ac_exeext=$EXEEXT
1676echo "$as_me:1676: checking for object suffix" >&5
1677echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1678if test "${ac_cv_objext+set}" = set; then
1679  echo $ECHO_N "(cached) $ECHO_C" >&6
1680else
1681  cat >conftest.$ac_ext <<_ACEOF
1682#line 1682 "configure"
1683#include "confdefs.h"
1684
1685int
1686main ()
1687{
1688
1689  ;
1690  return 0;
1691}
1692_ACEOF
1693rm -f conftest.o conftest.obj
1694if { (eval echo "$as_me:1694: \"$ac_compile\"") >&5
1695  (eval $ac_compile) 2>&5
1696  ac_status=$?
1697  echo "$as_me:1697: \$? = $ac_status" >&5
1698  (exit $ac_status); }; then
1699  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1700  case $ac_file in
1701    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1702    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1703       break;;
1704  esac
1705done
1706else
1707  echo "$as_me: failed program was:" >&5
1708cat conftest.$ac_ext >&5
1709{ { echo "$as_me:1709: error: cannot compute OBJEXT: cannot compile" >&5
1710echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1711   { (exit 1); exit 1; }; }
1712fi
1713
1714rm -f conftest.$ac_cv_objext conftest.$ac_ext
1715fi
1716echo "$as_me:1716: result: $ac_cv_objext" >&5
1717echo "${ECHO_T}$ac_cv_objext" >&6
1718OBJEXT=$ac_cv_objext
1719ac_objext=$OBJEXT
1720echo "$as_me:1720: checking whether we are using the GNU C compiler" >&5
1721echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1722if test "${ac_cv_c_compiler_gnu+set}" = set; then
1723  echo $ECHO_N "(cached) $ECHO_C" >&6
1724else
1725  cat >conftest.$ac_ext <<_ACEOF
1726#line 1726 "configure"
1727#include "confdefs.h"
1728
1729int
1730main ()
1731{
1732#ifndef __GNUC__
1733       choke me
1734#endif
1735
1736  ;
1737  return 0;
1738}
1739_ACEOF
1740rm -f conftest.$ac_objext
1741if { (eval echo "$as_me:1741: \"$ac_compile\"") >&5
1742  (eval $ac_compile) 2>&5
1743  ac_status=$?
1744  echo "$as_me:1744: \$? = $ac_status" >&5
1745  (exit $ac_status); } &&
1746         { ac_try='test -s conftest.$ac_objext'
1747  { (eval echo "$as_me:1747: \"$ac_try\"") >&5
1748  (eval $ac_try) 2>&5
1749  ac_status=$?
1750  echo "$as_me:1750: \$? = $ac_status" >&5
1751  (exit $ac_status); }; }; then
1752  ac_compiler_gnu=yes
1753else
1754  echo "$as_me: failed program was:" >&5
1755cat conftest.$ac_ext >&5
1756ac_compiler_gnu=no
1757fi
1758rm -f conftest.$ac_objext conftest.$ac_ext
1759ac_cv_c_compiler_gnu=$ac_compiler_gnu
1760
1761fi
1762echo "$as_me:1762: result: $ac_cv_c_compiler_gnu" >&5
1763echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1764GCC=`test $ac_compiler_gnu = yes && echo yes`
1765ac_test_CFLAGS=${CFLAGS+set}
1766ac_save_CFLAGS=$CFLAGS
1767CFLAGS="-g"
1768echo "$as_me:1768: checking whether $CC accepts -g" >&5
1769echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1770if test "${ac_cv_prog_cc_g+set}" = set; then
1771  echo $ECHO_N "(cached) $ECHO_C" >&6
1772else
1773  cat >conftest.$ac_ext <<_ACEOF
1774#line 1774 "configure"
1775#include "confdefs.h"
1776
1777int
1778main ()
1779{
1780
1781  ;
1782  return 0;
1783}
1784_ACEOF
1785rm -f conftest.$ac_objext
1786if { (eval echo "$as_me:1786: \"$ac_compile\"") >&5
1787  (eval $ac_compile) 2>&5
1788  ac_status=$?
1789  echo "$as_me:1789: \$? = $ac_status" >&5
1790  (exit $ac_status); } &&
1791         { ac_try='test -s conftest.$ac_objext'
1792  { (eval echo "$as_me:1792: \"$ac_try\"") >&5
1793  (eval $ac_try) 2>&5
1794  ac_status=$?
1795  echo "$as_me:1795: \$? = $ac_status" >&5
1796  (exit $ac_status); }; }; then
1797  ac_cv_prog_cc_g=yes
1798else
1799  echo "$as_me: failed program was:" >&5
1800cat conftest.$ac_ext >&5
1801ac_cv_prog_cc_g=no
1802fi
1803rm -f conftest.$ac_objext conftest.$ac_ext
1804fi
1805echo "$as_me:1805: result: $ac_cv_prog_cc_g" >&5
1806echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1807if test "$ac_test_CFLAGS" = set; then
1808  CFLAGS=$ac_save_CFLAGS
1809elif test $ac_cv_prog_cc_g = yes; then
1810  if test "$GCC" = yes; then
1811    CFLAGS="-g -O2"
1812  else
1813    CFLAGS="-g"
1814  fi
1815else
1816  if test "$GCC" = yes; then
1817    CFLAGS="-O2"
1818  else
1819    CFLAGS=
1820  fi
1821fi
1822# Some people use a C++ compiler to compile C.  Since we use `exit',
1823# in C++ we need to declare it.  In case someone uses the same compiler
1824# for both compiling C and C++ we need to have the C++ compiler decide
1825# the declaration of exit, since it's the most demanding environment.
1826cat >conftest.$ac_ext <<_ACEOF
1827#ifndef __cplusplus
1828  choke me
1829#endif
1830_ACEOF
1831rm -f conftest.$ac_objext
1832if { (eval echo "$as_me:1832: \"$ac_compile\"") >&5
1833  (eval $ac_compile) 2>&5
1834  ac_status=$?
1835  echo "$as_me:1835: \$? = $ac_status" >&5
1836  (exit $ac_status); } &&
1837         { ac_try='test -s conftest.$ac_objext'
1838  { (eval echo "$as_me:1838: \"$ac_try\"") >&5
1839  (eval $ac_try) 2>&5
1840  ac_status=$?
1841  echo "$as_me:1841: \$? = $ac_status" >&5
1842  (exit $ac_status); }; }; then
1843  for ac_declaration in \
1844   ''\
1845   '#include <stdlib.h>' \
1846   'extern "C" void std::exit (int) throw (); using std::exit;' \
1847   'extern "C" void std::exit (int); using std::exit;' \
1848   'extern "C" void exit (int) throw ();' \
1849   'extern "C" void exit (int);' \
1850   'void exit (int);'
1851do
1852  cat >conftest.$ac_ext <<_ACEOF
1853#line 1853 "configure"
1854#include "confdefs.h"
1855#include <stdlib.h>
1856$ac_declaration
1857int
1858main ()
1859{
1860exit (42);
1861  ;
1862  return 0;
1863}
1864_ACEOF
1865rm -f conftest.$ac_objext
1866if { (eval echo "$as_me:1866: \"$ac_compile\"") >&5
1867  (eval $ac_compile) 2>&5
1868  ac_status=$?
1869  echo "$as_me:1869: \$? = $ac_status" >&5
1870  (exit $ac_status); } &&
1871         { ac_try='test -s conftest.$ac_objext'
1872  { (eval echo "$as_me:1872: \"$ac_try\"") >&5
1873  (eval $ac_try) 2>&5
1874  ac_status=$?
1875  echo "$as_me:1875: \$? = $ac_status" >&5
1876  (exit $ac_status); }; }; then
1877  :
1878else
1879  echo "$as_me: failed program was:" >&5
1880cat conftest.$ac_ext >&5
1881continue
1882fi
1883rm -f conftest.$ac_objext conftest.$ac_ext
1884  cat >conftest.$ac_ext <<_ACEOF
1885#line 1885 "configure"
1886#include "confdefs.h"
1887$ac_declaration
1888int
1889main ()
1890{
1891exit (42);
1892  ;
1893  return 0;
1894}
1895_ACEOF
1896rm -f conftest.$ac_objext
1897if { (eval echo "$as_me:1897: \"$ac_compile\"") >&5
1898  (eval $ac_compile) 2>&5
1899  ac_status=$?
1900  echo "$as_me:1900: \$? = $ac_status" >&5
1901  (exit $ac_status); } &&
1902         { ac_try='test -s conftest.$ac_objext'
1903  { (eval echo "$as_me:1903: \"$ac_try\"") >&5
1904  (eval $ac_try) 2>&5
1905  ac_status=$?
1906  echo "$as_me:1906: \$? = $ac_status" >&5
1907  (exit $ac_status); }; }; then
1908  break
1909else
1910  echo "$as_me: failed program was:" >&5
1911cat conftest.$ac_ext >&5
1912fi
1913rm -f conftest.$ac_objext conftest.$ac_ext
1914done
1915rm -rf conftest*
1916if test -n "$ac_declaration"; then
1917  echo '#ifdef __cplusplus' >>confdefs.h
1918  echo $ac_declaration      >>confdefs.h
1919  echo '#endif'             >>confdefs.h
1920fi
1921
1922else
1923  echo "$as_me: failed program was:" >&5
1924cat conftest.$ac_ext >&5
1925fi
1926rm -f conftest.$ac_objext conftest.$ac_ext
1927ac_ext=c
1928ac_cpp='$CPP $CPPFLAGS'
1929ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1930ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1931ac_compiler_gnu=$ac_cv_c_compiler_gnu
1932ac_main_return=return
1933
1934GCC_VERSION=none
1935if test "$GCC" = yes ; then
1936	echo "$as_me:1936: checking version of $CC" >&5
1937echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1938	GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1939	test -z "$GCC_VERSION" && GCC_VERSION=unknown
1940	echo "$as_me:1940: result: $GCC_VERSION" >&5
1941echo "${ECHO_T}$GCC_VERSION" >&6
1942fi
1943
1944echo "$as_me:1944: checking for $CC option to accept ANSI C" >&5
1945echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1946if test "${ac_cv_prog_cc_stdc+set}" = set; then
1947  echo $ECHO_N "(cached) $ECHO_C" >&6
1948else
1949  ac_cv_prog_cc_stdc=no
1950ac_save_CC=$CC
1951cat >conftest.$ac_ext <<_ACEOF
1952#line 1952 "configure"
1953#include "confdefs.h"
1954#include <stdarg.h>
1955#include <stdio.h>
1956#include <sys/types.h>
1957#include <sys/stat.h>
1958/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1959struct buf { int x; };
1960FILE * (*rcsopen) (struct buf *, struct stat *, int);
1961static char *e (p, i)
1962     char **p;
1963     int i;
1964{
1965  return p[i];
1966}
1967static char *f (char * (*g) (char **, int), char **p, ...)
1968{
1969  char *s;
1970  va_list v;
1971  va_start (v,p);
1972  s = g (p, va_arg (v,int));
1973  va_end (v);
1974  return s;
1975}
1976int test (int i, double x);
1977struct s1 {int (*f) (int a);};
1978struct s2 {int (*f) (double a);};
1979int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1980int argc;
1981char **argv;
1982int
1983main ()
1984{
1985return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1986  ;
1987  return 0;
1988}
1989_ACEOF
1990# Don't try gcc -ansi; that turns off useful extensions and
1991# breaks some systems' header files.
1992# AIX			-qlanglvl=ansi
1993# Ultrix and OSF/1	-std1
1994# HP-UX 10.20 and later	-Ae
1995# HP-UX older versions	-Aa -D_HPUX_SOURCE
1996# SVR4			-Xc -D__EXTENSIONS__
1997for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1998do
1999  CC="$ac_save_CC $ac_arg"
2000  rm -f conftest.$ac_objext
2001if { (eval echo "$as_me:2001: \"$ac_compile\"") >&5
2002  (eval $ac_compile) 2>&5
2003  ac_status=$?
2004  echo "$as_me:2004: \$? = $ac_status" >&5
2005  (exit $ac_status); } &&
2006         { ac_try='test -s conftest.$ac_objext'
2007  { (eval echo "$as_me:2007: \"$ac_try\"") >&5
2008  (eval $ac_try) 2>&5
2009  ac_status=$?
2010  echo "$as_me:2010: \$? = $ac_status" >&5
2011  (exit $ac_status); }; }; then
2012  ac_cv_prog_cc_stdc=$ac_arg
2013break
2014else
2015  echo "$as_me: failed program was:" >&5
2016cat conftest.$ac_ext >&5
2017fi
2018rm -f conftest.$ac_objext
2019done
2020rm -f conftest.$ac_ext conftest.$ac_objext
2021CC=$ac_save_CC
2022
2023fi
2024
2025case "x$ac_cv_prog_cc_stdc" in
2026  x|xno)
2027    echo "$as_me:2027: result: none needed" >&5
2028echo "${ECHO_T}none needed" >&6 ;;
2029  *)
2030    echo "$as_me:2030: result: $ac_cv_prog_cc_stdc" >&5
2031echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2032    CC="$CC $ac_cv_prog_cc_stdc" ;;
2033esac
2034
2035# This should have been defined by AC_PROG_CC
2036: ${CC:=cc}
2037
2038echo "$as_me:2038: checking \$CC variable" >&5
2039echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2040case "$CC" in #(vi
2041*[\ \	]-[IUD]*)
2042	echo "$as_me:2042: result: broken" >&5
2043echo "${ECHO_T}broken" >&6
2044	{ echo "$as_me:2044: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2045echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2046	# humor him...
2047	cf_flags=`echo "$CC" | sed -e 's/^[^ 	]*[ 	]//'`
2048	CC=`echo "$CC" | sed -e 's/[ 	].*//'`
2049
2050cf_fix_cppflags=no
2051cf_new_cflags=
2052cf_new_cppflags=
2053cf_new_extra_cppflags=
2054
2055for cf_add_cflags in $cf_flags
2056do
2057case $cf_fix_cppflags in
2058no)
2059	case $cf_add_cflags in #(vi
2060	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2061		case $cf_add_cflags in
2062		-D*)
2063			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2064
2065			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2066				&& test -z "${cf_tst_cflags}" \
2067				&& cf_fix_cppflags=yes
2068
2069			if test $cf_fix_cppflags = yes ; then
2070				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2071				continue
2072			elif test "${cf_tst_cflags}" = "\"'" ; then
2073				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2074				continue
2075			fi
2076			;;
2077		esac
2078		case "$CPPFLAGS" in
2079		*$cf_add_cflags) #(vi
2080			;;
2081		*) #(vi
2082			case $cf_add_cflags in #(vi
2083			-D*)
2084				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2085
2086CPPFLAGS=`echo "$CPPFLAGS" | \
2087	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2088		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2089
2090				;;
2091			esac
2092			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2093			;;
2094		esac
2095		;;
2096	*)
2097		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2098		;;
2099	esac
2100	;;
2101yes)
2102	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2103
2104	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2105
2106	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2107		&& test -z "${cf_tst_cflags}" \
2108		&& cf_fix_cppflags=no
2109	;;
2110esac
2111done
2112
2113if test -n "$cf_new_cflags" ; then
2114
2115	CFLAGS="$CFLAGS $cf_new_cflags"
2116fi
2117
2118if test -n "$cf_new_cppflags" ; then
2119
2120	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2121fi
2122
2123if test -n "$cf_new_extra_cppflags" ; then
2124
2125	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2126fi
2127
2128	;;
2129*)
2130	echo "$as_me:2130: result: ok" >&5
2131echo "${ECHO_T}ok" >&6
2132	;;
2133esac
2134
2135ac_ext=c
2136ac_cpp='$CPP $CPPFLAGS'
2137ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2138ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2139ac_compiler_gnu=$ac_cv_c_compiler_gnu
2140ac_main_return=return
2141echo "$as_me:2141: checking how to run the C preprocessor" >&5
2142echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2143# On Suns, sometimes $CPP names a directory.
2144if test -n "$CPP" && test -d "$CPP"; then
2145  CPP=
2146fi
2147if test -z "$CPP"; then
2148  if test "${ac_cv_prog_CPP+set}" = set; then
2149  echo $ECHO_N "(cached) $ECHO_C" >&6
2150else
2151      # Double quotes because CPP needs to be expanded
2152    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2153    do
2154      ac_preproc_ok=false
2155for ac_c_preproc_warn_flag in '' yes
2156do
2157  # Use a header file that comes with gcc, so configuring glibc
2158  # with a fresh cross-compiler works.
2159  # On the NeXT, cc -E runs the code through the compiler's parser,
2160  # not just through cpp. "Syntax error" is here to catch this case.
2161  cat >conftest.$ac_ext <<_ACEOF
2162#line 2162 "configure"
2163#include "confdefs.h"
2164#include <assert.h>
2165                     Syntax error
2166_ACEOF
2167if { (eval echo "$as_me:2167: \"$ac_cpp conftest.$ac_ext\"") >&5
2168  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2169  ac_status=$?
2170  egrep -v '^ *\+' conftest.er1 >conftest.err
2171  rm -f conftest.er1
2172  cat conftest.err >&5
2173  echo "$as_me:2173: \$? = $ac_status" >&5
2174  (exit $ac_status); } >/dev/null; then
2175  if test -s conftest.err; then
2176    ac_cpp_err=$ac_c_preproc_warn_flag
2177  else
2178    ac_cpp_err=
2179  fi
2180else
2181  ac_cpp_err=yes
2182fi
2183if test -z "$ac_cpp_err"; then
2184  :
2185else
2186  echo "$as_me: failed program was:" >&5
2187  cat conftest.$ac_ext >&5
2188  # Broken: fails on valid input.
2189continue
2190fi
2191rm -f conftest.err conftest.$ac_ext
2192
2193  # OK, works on sane cases.  Now check whether non-existent headers
2194  # can be detected and how.
2195  cat >conftest.$ac_ext <<_ACEOF
2196#line 2196 "configure"
2197#include "confdefs.h"
2198#include <ac_nonexistent.h>
2199_ACEOF
2200if { (eval echo "$as_me:2200: \"$ac_cpp conftest.$ac_ext\"") >&5
2201  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2202  ac_status=$?
2203  egrep -v '^ *\+' conftest.er1 >conftest.err
2204  rm -f conftest.er1
2205  cat conftest.err >&5
2206  echo "$as_me:2206: \$? = $ac_status" >&5
2207  (exit $ac_status); } >/dev/null; then
2208  if test -s conftest.err; then
2209    ac_cpp_err=$ac_c_preproc_warn_flag
2210  else
2211    ac_cpp_err=
2212  fi
2213else
2214  ac_cpp_err=yes
2215fi
2216if test -z "$ac_cpp_err"; then
2217  # Broken: success on invalid input.
2218continue
2219else
2220  echo "$as_me: failed program was:" >&5
2221  cat conftest.$ac_ext >&5
2222  # Passes both tests.
2223ac_preproc_ok=:
2224break
2225fi
2226rm -f conftest.err conftest.$ac_ext
2227
2228done
2229# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2230rm -f conftest.err conftest.$ac_ext
2231if $ac_preproc_ok; then
2232  break
2233fi
2234
2235    done
2236    ac_cv_prog_CPP=$CPP
2237
2238fi
2239  CPP=$ac_cv_prog_CPP
2240else
2241  ac_cv_prog_CPP=$CPP
2242fi
2243echo "$as_me:2243: result: $CPP" >&5
2244echo "${ECHO_T}$CPP" >&6
2245ac_preproc_ok=false
2246for ac_c_preproc_warn_flag in '' yes
2247do
2248  # Use a header file that comes with gcc, so configuring glibc
2249  # with a fresh cross-compiler works.
2250  # On the NeXT, cc -E runs the code through the compiler's parser,
2251  # not just through cpp. "Syntax error" is here to catch this case.
2252  cat >conftest.$ac_ext <<_ACEOF
2253#line 2253 "configure"
2254#include "confdefs.h"
2255#include <assert.h>
2256                     Syntax error
2257_ACEOF
2258if { (eval echo "$as_me:2258: \"$ac_cpp conftest.$ac_ext\"") >&5
2259  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2260  ac_status=$?
2261  egrep -v '^ *\+' conftest.er1 >conftest.err
2262  rm -f conftest.er1
2263  cat conftest.err >&5
2264  echo "$as_me:2264: \$? = $ac_status" >&5
2265  (exit $ac_status); } >/dev/null; then
2266  if test -s conftest.err; then
2267    ac_cpp_err=$ac_c_preproc_warn_flag
2268  else
2269    ac_cpp_err=
2270  fi
2271else
2272  ac_cpp_err=yes
2273fi
2274if test -z "$ac_cpp_err"; then
2275  :
2276else
2277  echo "$as_me: failed program was:" >&5
2278  cat conftest.$ac_ext >&5
2279  # Broken: fails on valid input.
2280continue
2281fi
2282rm -f conftest.err conftest.$ac_ext
2283
2284  # OK, works on sane cases.  Now check whether non-existent headers
2285  # can be detected and how.
2286  cat >conftest.$ac_ext <<_ACEOF
2287#line 2287 "configure"
2288#include "confdefs.h"
2289#include <ac_nonexistent.h>
2290_ACEOF
2291if { (eval echo "$as_me:2291: \"$ac_cpp conftest.$ac_ext\"") >&5
2292  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2293  ac_status=$?
2294  egrep -v '^ *\+' conftest.er1 >conftest.err
2295  rm -f conftest.er1
2296  cat conftest.err >&5
2297  echo "$as_me:2297: \$? = $ac_status" >&5
2298  (exit $ac_status); } >/dev/null; then
2299  if test -s conftest.err; then
2300    ac_cpp_err=$ac_c_preproc_warn_flag
2301  else
2302    ac_cpp_err=
2303  fi
2304else
2305  ac_cpp_err=yes
2306fi
2307if test -z "$ac_cpp_err"; then
2308  # Broken: success on invalid input.
2309continue
2310else
2311  echo "$as_me: failed program was:" >&5
2312  cat conftest.$ac_ext >&5
2313  # Passes both tests.
2314ac_preproc_ok=:
2315break
2316fi
2317rm -f conftest.err conftest.$ac_ext
2318
2319done
2320# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2321rm -f conftest.err conftest.$ac_ext
2322if $ac_preproc_ok; then
2323  :
2324else
2325  { { echo "$as_me:2325: error: C preprocessor \"$CPP\" fails sanity check" >&5
2326echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2327   { (exit 1); exit 1; }; }
2328fi
2329
2330ac_ext=c
2331ac_cpp='$CPP $CPPFLAGS'
2332ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2333ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2334ac_compiler_gnu=$ac_cv_c_compiler_gnu
2335ac_main_return=return
2336
2337if test $ac_cv_c_compiler_gnu = yes; then
2338    echo "$as_me:2338: checking whether $CC needs -traditional" >&5
2339echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2340if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2341  echo $ECHO_N "(cached) $ECHO_C" >&6
2342else
2343    ac_pattern="Autoconf.*'x'"
2344  cat >conftest.$ac_ext <<_ACEOF
2345#line 2345 "configure"
2346#include "confdefs.h"
2347#include <sgtty.h>
2348int Autoconf = TIOCGETP;
2349_ACEOF
2350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2351  egrep "$ac_pattern" >/dev/null 2>&1; then
2352  ac_cv_prog_gcc_traditional=yes
2353else
2354  ac_cv_prog_gcc_traditional=no
2355fi
2356rm -rf conftest*
2357
2358  if test $ac_cv_prog_gcc_traditional = no; then
2359    cat >conftest.$ac_ext <<_ACEOF
2360#line 2360 "configure"
2361#include "confdefs.h"
2362#include <termio.h>
2363int Autoconf = TCGETA;
2364_ACEOF
2365if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2366  egrep "$ac_pattern" >/dev/null 2>&1; then
2367  ac_cv_prog_gcc_traditional=yes
2368fi
2369rm -rf conftest*
2370
2371  fi
2372fi
2373echo "$as_me:2373: result: $ac_cv_prog_gcc_traditional" >&5
2374echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2375  if test $ac_cv_prog_gcc_traditional = yes; then
2376    CC="$CC -traditional"
2377  fi
2378fi
2379
2380echo "$as_me:2380: checking whether $CC understands -c and -o together" >&5
2381echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2382if test "${cf_cv_prog_CC_c_o+set}" = set; then
2383  echo $ECHO_N "(cached) $ECHO_C" >&6
2384else
2385
2386cat > conftest.$ac_ext <<CF_EOF
2387#include <stdio.h>
2388int main()
2389{
2390	${cf_cv_main_return:-return}(0);
2391}
2392CF_EOF
2393# We do the test twice because some compilers refuse to overwrite an
2394# existing .o file with -o, though they will create one.
2395ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2396if { (eval echo "$as_me:2396: \"$ac_try\"") >&5
2397  (eval $ac_try) 2>&5
2398  ac_status=$?
2399  echo "$as_me:2399: \$? = $ac_status" >&5
2400  (exit $ac_status); } &&
2401  test -f conftest2.$ac_objext && { (eval echo "$as_me:2401: \"$ac_try\"") >&5
2402  (eval $ac_try) 2>&5
2403  ac_status=$?
2404  echo "$as_me:2404: \$? = $ac_status" >&5
2405  (exit $ac_status); };
2406then
2407  eval cf_cv_prog_CC_c_o=yes
2408else
2409  eval cf_cv_prog_CC_c_o=no
2410fi
2411rm -rf conftest*
2412
2413fi
2414if test $cf_cv_prog_CC_c_o = yes; then
2415  echo "$as_me:2415: result: yes" >&5
2416echo "${ECHO_T}yes" >&6
2417else
2418  echo "$as_me:2418: result: no" >&5
2419echo "${ECHO_T}no" >&6
2420fi
2421
2422if test "$cross_compiling" = yes ; then
2423  LDCONFIG=:
2424else
2425case "$cf_cv_system_name" in #(vi
2426dragonfly*|mirbsd*|freebsd*) #(vi
2427  test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2428  ;;
2429*) LDPATH=$PATH:/sbin:/usr/sbin
2430  # Extract the first word of "ldconfig", so it can be a program name with args.
2431set dummy ldconfig; ac_word=$2
2432echo "$as_me:2432: checking for $ac_word" >&5
2433echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2434if test "${ac_cv_path_LDCONFIG+set}" = set; then
2435  echo $ECHO_N "(cached) $ECHO_C" >&6
2436else
2437  case $LDCONFIG in
2438  [\\/]* | ?:[\\/]*)
2439  ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2440  ;;
2441  *)
2442  ac_save_IFS=$IFS; IFS=$ac_path_separator
2443ac_dummy="$LDPATH"
2444for ac_dir in $ac_dummy; do
2445  IFS=$ac_save_IFS
2446  test -z "$ac_dir" && ac_dir=.
2447  if $as_executable_p "$ac_dir/$ac_word"; then
2448   ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2449   echo "$as_me:2449: found $ac_dir/$ac_word" >&5
2450   break
2451fi
2452done
2453
2454  ;;
2455esac
2456fi
2457LDCONFIG=$ac_cv_path_LDCONFIG
2458
2459if test -n "$LDCONFIG"; then
2460  echo "$as_me:2460: result: $LDCONFIG" >&5
2461echo "${ECHO_T}$LDCONFIG" >&6
2462else
2463  echo "$as_me:2463: result: no" >&5
2464echo "${ECHO_T}no" >&6
2465fi
2466
2467  ;;
2468esac
2469fi
2470
2471echo "$as_me:2471: checking if you want to ensure bool is consistent with C++" >&5
2472echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2473
2474# Check whether --with-cxx or --without-cxx was given.
2475if test "${with_cxx+set}" = set; then
2476  withval="$with_cxx"
2477  cf_with_cxx=$withval
2478else
2479  cf_with_cxx=yes
2480fi;
2481echo "$as_me:2481: result: $cf_with_cxx" >&5
2482echo "${ECHO_T}$cf_with_cxx" >&6
2483if test "X$cf_with_cxx" = Xno ; then
2484	CXX=""
2485	GXX=""
2486else
2487	# with autoconf 2.13, we can change the error to a warning:
2488		ac_ext=cc
2489ac_cpp='$CXXCPP $CPPFLAGS'
2490ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2491ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2492ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2493ac_main_return=return
2494if test -n "$ac_tool_prefix"; then
2495  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2496  do
2497    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2498set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2499echo "$as_me:2499: checking for $ac_word" >&5
2500echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2501if test "${ac_cv_prog_CXX+set}" = set; then
2502  echo $ECHO_N "(cached) $ECHO_C" >&6
2503else
2504  if test -n "$CXX"; then
2505  ac_cv_prog_CXX="$CXX" # Let the user override the test.
2506else
2507  ac_save_IFS=$IFS; IFS=$ac_path_separator
2508ac_dummy="$PATH"
2509for ac_dir in $ac_dummy; do
2510  IFS=$ac_save_IFS
2511  test -z "$ac_dir" && ac_dir=.
2512  $as_executable_p "$ac_dir/$ac_word" || continue
2513ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2514echo "$as_me:2514: found $ac_dir/$ac_word" >&5
2515break
2516done
2517
2518fi
2519fi
2520CXX=$ac_cv_prog_CXX
2521if test -n "$CXX"; then
2522  echo "$as_me:2522: result: $CXX" >&5
2523echo "${ECHO_T}$CXX" >&6
2524else
2525  echo "$as_me:2525: result: no" >&5
2526echo "${ECHO_T}no" >&6
2527fi
2528
2529    test -n "$CXX" && break
2530  done
2531fi
2532if test -z "$CXX"; then
2533  ac_ct_CXX=$CXX
2534  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2535do
2536  # Extract the first word of "$ac_prog", so it can be a program name with args.
2537set dummy $ac_prog; ac_word=$2
2538echo "$as_me:2538: checking for $ac_word" >&5
2539echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2540if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2541  echo $ECHO_N "(cached) $ECHO_C" >&6
2542else
2543  if test -n "$ac_ct_CXX"; then
2544  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2545else
2546  ac_save_IFS=$IFS; IFS=$ac_path_separator
2547ac_dummy="$PATH"
2548for ac_dir in $ac_dummy; do
2549  IFS=$ac_save_IFS
2550  test -z "$ac_dir" && ac_dir=.
2551  $as_executable_p "$ac_dir/$ac_word" || continue
2552ac_cv_prog_ac_ct_CXX="$ac_prog"
2553echo "$as_me:2553: found $ac_dir/$ac_word" >&5
2554break
2555done
2556
2557fi
2558fi
2559ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2560if test -n "$ac_ct_CXX"; then
2561  echo "$as_me:2561: result: $ac_ct_CXX" >&5
2562echo "${ECHO_T}$ac_ct_CXX" >&6
2563else
2564  echo "$as_me:2564: result: no" >&5
2565echo "${ECHO_T}no" >&6
2566fi
2567
2568  test -n "$ac_ct_CXX" && break
2569done
2570test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2571
2572  CXX=$ac_ct_CXX
2573fi
2574
2575# Provide some information about the compiler.
2576echo "$as_me:2576:" \
2577     "checking for C++ compiler version" >&5
2578ac_compiler=`set X $ac_compile; echo $2`
2579{ (eval echo "$as_me:2579: \"$ac_compiler --version </dev/null >&5\"") >&5
2580  (eval $ac_compiler --version </dev/null >&5) 2>&5
2581  ac_status=$?
2582  echo "$as_me:2582: \$? = $ac_status" >&5
2583  (exit $ac_status); }
2584{ (eval echo "$as_me:2584: \"$ac_compiler -v </dev/null >&5\"") >&5
2585  (eval $ac_compiler -v </dev/null >&5) 2>&5
2586  ac_status=$?
2587  echo "$as_me:2587: \$? = $ac_status" >&5
2588  (exit $ac_status); }
2589{ (eval echo "$as_me:2589: \"$ac_compiler -V </dev/null >&5\"") >&5
2590  (eval $ac_compiler -V </dev/null >&5) 2>&5
2591  ac_status=$?
2592  echo "$as_me:2592: \$? = $ac_status" >&5
2593  (exit $ac_status); }
2594
2595echo "$as_me:2595: checking whether we are using the GNU C++ compiler" >&5
2596echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2597if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2598  echo $ECHO_N "(cached) $ECHO_C" >&6
2599else
2600  cat >conftest.$ac_ext <<_ACEOF
2601#line 2601 "configure"
2602#include "confdefs.h"
2603
2604int
2605main ()
2606{
2607#ifndef __GNUC__
2608       choke me
2609#endif
2610
2611  ;
2612  return 0;
2613}
2614_ACEOF
2615rm -f conftest.$ac_objext
2616if { (eval echo "$as_me:2616: \"$ac_compile\"") >&5
2617  (eval $ac_compile) 2>&5
2618  ac_status=$?
2619  echo "$as_me:2619: \$? = $ac_status" >&5
2620  (exit $ac_status); } &&
2621         { ac_try='test -s conftest.$ac_objext'
2622  { (eval echo "$as_me:2622: \"$ac_try\"") >&5
2623  (eval $ac_try) 2>&5
2624  ac_status=$?
2625  echo "$as_me:2625: \$? = $ac_status" >&5
2626  (exit $ac_status); }; }; then
2627  ac_compiler_gnu=yes
2628else
2629  echo "$as_me: failed program was:" >&5
2630cat conftest.$ac_ext >&5
2631ac_compiler_gnu=no
2632fi
2633rm -f conftest.$ac_objext conftest.$ac_ext
2634ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2635
2636fi
2637echo "$as_me:2637: result: $ac_cv_cxx_compiler_gnu" >&5
2638echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2639GXX=`test $ac_compiler_gnu = yes && echo yes`
2640ac_test_CXXFLAGS=${CXXFLAGS+set}
2641ac_save_CXXFLAGS=$CXXFLAGS
2642CXXFLAGS="-g"
2643echo "$as_me:2643: checking whether $CXX accepts -g" >&5
2644echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2645if test "${ac_cv_prog_cxx_g+set}" = set; then
2646  echo $ECHO_N "(cached) $ECHO_C" >&6
2647else
2648  cat >conftest.$ac_ext <<_ACEOF
2649#line 2649 "configure"
2650#include "confdefs.h"
2651
2652int
2653main ()
2654{
2655
2656  ;
2657  return 0;
2658}
2659_ACEOF
2660rm -f conftest.$ac_objext
2661if { (eval echo "$as_me:2661: \"$ac_compile\"") >&5
2662  (eval $ac_compile) 2>&5
2663  ac_status=$?
2664  echo "$as_me:2664: \$? = $ac_status" >&5
2665  (exit $ac_status); } &&
2666         { ac_try='test -s conftest.$ac_objext'
2667  { (eval echo "$as_me:2667: \"$ac_try\"") >&5
2668  (eval $ac_try) 2>&5
2669  ac_status=$?
2670  echo "$as_me:2670: \$? = $ac_status" >&5
2671  (exit $ac_status); }; }; then
2672  ac_cv_prog_cxx_g=yes
2673else
2674  echo "$as_me: failed program was:" >&5
2675cat conftest.$ac_ext >&5
2676ac_cv_prog_cxx_g=no
2677fi
2678rm -f conftest.$ac_objext conftest.$ac_ext
2679fi
2680echo "$as_me:2680: result: $ac_cv_prog_cxx_g" >&5
2681echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2682if test "$ac_test_CXXFLAGS" = set; then
2683  CXXFLAGS=$ac_save_CXXFLAGS
2684elif test $ac_cv_prog_cxx_g = yes; then
2685  if test "$GXX" = yes; then
2686    CXXFLAGS="-g -O2"
2687  else
2688    CXXFLAGS="-g"
2689  fi
2690else
2691  if test "$GXX" = yes; then
2692    CXXFLAGS="-O2"
2693  else
2694    CXXFLAGS=
2695  fi
2696fi
2697for ac_declaration in \
2698   ''\
2699   '#include <stdlib.h>' \
2700   'extern "C" void std::exit (int) throw (); using std::exit;' \
2701   'extern "C" void std::exit (int); using std::exit;' \
2702   'extern "C" void exit (int) throw ();' \
2703   'extern "C" void exit (int);' \
2704   'void exit (int);'
2705do
2706  cat >conftest.$ac_ext <<_ACEOF
2707#line 2707 "configure"
2708#include "confdefs.h"
2709#include <stdlib.h>
2710$ac_declaration
2711int
2712main ()
2713{
2714exit (42);
2715  ;
2716  return 0;
2717}
2718_ACEOF
2719rm -f conftest.$ac_objext
2720if { (eval echo "$as_me:2720: \"$ac_compile\"") >&5
2721  (eval $ac_compile) 2>&5
2722  ac_status=$?
2723  echo "$as_me:2723: \$? = $ac_status" >&5
2724  (exit $ac_status); } &&
2725         { ac_try='test -s conftest.$ac_objext'
2726  { (eval echo "$as_me:2726: \"$ac_try\"") >&5
2727  (eval $ac_try) 2>&5
2728  ac_status=$?
2729  echo "$as_me:2729: \$? = $ac_status" >&5
2730  (exit $ac_status); }; }; then
2731  :
2732else
2733  echo "$as_me: failed program was:" >&5
2734cat conftest.$ac_ext >&5
2735continue
2736fi
2737rm -f conftest.$ac_objext conftest.$ac_ext
2738  cat >conftest.$ac_ext <<_ACEOF
2739#line 2739 "configure"
2740#include "confdefs.h"
2741$ac_declaration
2742int
2743main ()
2744{
2745exit (42);
2746  ;
2747  return 0;
2748}
2749_ACEOF
2750rm -f conftest.$ac_objext
2751if { (eval echo "$as_me:2751: \"$ac_compile\"") >&5
2752  (eval $ac_compile) 2>&5
2753  ac_status=$?
2754  echo "$as_me:2754: \$? = $ac_status" >&5
2755  (exit $ac_status); } &&
2756         { ac_try='test -s conftest.$ac_objext'
2757  { (eval echo "$as_me:2757: \"$ac_try\"") >&5
2758  (eval $ac_try) 2>&5
2759  ac_status=$?
2760  echo "$as_me:2760: \$? = $ac_status" >&5
2761  (exit $ac_status); }; }; then
2762  break
2763else
2764  echo "$as_me: failed program was:" >&5
2765cat conftest.$ac_ext >&5
2766fi
2767rm -f conftest.$ac_objext conftest.$ac_ext
2768done
2769rm -rf conftest*
2770if test -n "$ac_declaration"; then
2771  echo '#ifdef __cplusplus' >>confdefs.h
2772  echo $ac_declaration      >>confdefs.h
2773  echo '#endif'             >>confdefs.h
2774fi
2775
2776ac_ext=c
2777ac_cpp='$CPP $CPPFLAGS'
2778ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2779ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2780ac_compiler_gnu=$ac_cv_c_compiler_gnu
2781ac_main_return=return
2782
2783		# autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2784	if test "$CXX" = "g++" ; then
2785		# Extract the first word of "g++", so it can be a program name with args.
2786set dummy g++; ac_word=$2
2787echo "$as_me:2787: checking for $ac_word" >&5
2788echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2789if test "${ac_cv_path_CXX+set}" = set; then
2790  echo $ECHO_N "(cached) $ECHO_C" >&6
2791else
2792  case $CXX in
2793  [\\/]* | ?:[\\/]*)
2794  ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2795  ;;
2796  *)
2797  ac_save_IFS=$IFS; IFS=$ac_path_separator
2798ac_dummy="$PATH"
2799for ac_dir in $ac_dummy; do
2800  IFS=$ac_save_IFS
2801  test -z "$ac_dir" && ac_dir=.
2802  if $as_executable_p "$ac_dir/$ac_word"; then
2803   ac_cv_path_CXX="$ac_dir/$ac_word"
2804   echo "$as_me:2804: found $ac_dir/$ac_word" >&5
2805   break
2806fi
2807done
2808
2809  ;;
2810esac
2811fi
2812CXX=$ac_cv_path_CXX
2813
2814if test -n "$CXX"; then
2815  echo "$as_me:2815: result: $CXX" >&5
2816echo "${ECHO_T}$CXX" >&6
2817else
2818  echo "$as_me:2818: result: no" >&5
2819echo "${ECHO_T}no" >&6
2820fi
2821
2822	fi
2823	case "x$CXX" in #(vi
2824	x|xg++)
2825		{ echo "$as_me:2825: WARNING: You don't have any C++ compiler, too bad" >&5
2826echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2827		cf_with_cxx=no; CXX=""; GXX="";
2828		;;
2829	esac
2830fi
2831
2832GXX_VERSION=none
2833if test "$GXX" = yes; then
2834	echo "$as_me:2834: checking version of ${CXX:-g++}" >&5
2835echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2836	GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2837	test -z "$GXX_VERSION" && GXX_VERSION=unknown
2838	echo "$as_me:2838: result: $GXX_VERSION" >&5
2839echo "${ECHO_T}$GXX_VERSION" >&6
2840fi
2841
2842case $GXX_VERSION in
28431*|2.[0-6]*)
2844	# GXX=""; CXX=""; ac_cv_prog_gxx=no
2845	# cf_cxx_library=no
2846	{ echo "$as_me:2846: WARNING: templates do not work" >&5
2847echo "$as_me: WARNING: templates do not work" >&2;}
2848	;;
2849esac
2850
2851echo "$as_me:2851: checking if you want to build C++ binding and demo" >&5
2852echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2853
2854# Check whether --with-cxx-binding or --without-cxx-binding was given.
2855if test "${with_cxx_binding+set}" = set; then
2856  withval="$with_cxx_binding"
2857  cf_with_cxx_binding=$withval
2858else
2859  cf_with_cxx_binding=$cf_with_cxx
2860fi;
2861echo "$as_me:2861: result: $cf_with_cxx_binding" >&5
2862echo "${ECHO_T}$cf_with_cxx_binding" >&6
2863
2864echo "$as_me:2864: checking if you want to build with Ada95" >&5
2865echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2866echo "$as_me:2866: result: $cf_with_ada" >&5
2867echo "${ECHO_T}$cf_with_ada" >&6
2868
2869echo "$as_me:2869: checking if you want to install terminal database" >&5
2870echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
2871
2872# Check whether --enable-db-install or --disable-db-install was given.
2873if test "${enable_db_install+set}" = set; then
2874  enableval="$enable_db_install"
2875  cf_with_db_install=$enableval
2876else
2877  cf_with_db_install=yes
2878fi;
2879echo "$as_me:2879: result: $cf_with_db_install" >&5
2880echo "${ECHO_T}$cf_with_db_install" >&6
2881
2882echo "$as_me:2882: checking if you want to install manpages" >&5
2883echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2884
2885# Check whether --with-manpages or --without-manpages was given.
2886if test "${with_manpages+set}" = set; then
2887  withval="$with_manpages"
2888  cf_with_manpages=$withval
2889else
2890  cf_with_manpages=yes
2891fi;
2892echo "$as_me:2892: result: $cf_with_manpages" >&5
2893echo "${ECHO_T}$cf_with_manpages" >&6
2894
2895echo "$as_me:2895: checking if you want to build programs such as tic" >&5
2896echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2897
2898# Check whether --with-progs or --without-progs was given.
2899if test "${with_progs+set}" = set; then
2900  withval="$with_progs"
2901  cf_with_progs=$withval
2902else
2903  cf_with_progs=yes
2904fi;
2905echo "$as_me:2905: result: $cf_with_progs" >&5
2906echo "${ECHO_T}$cf_with_progs" >&6
2907
2908echo "$as_me:2908: checking if you want to build test-programs" >&5
2909echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2910
2911# Check whether --with-tests or --without-tests was given.
2912if test "${with_tests+set}" = set; then
2913  withval="$with_tests"
2914  cf_with_tests=$withval
2915else
2916  cf_with_tests=yes
2917fi;
2918echo "$as_me:2918: result: $cf_with_tests" >&5
2919echo "${ECHO_T}$cf_with_tests" >&6
2920
2921echo "$as_me:2921: checking if you wish to install curses.h" >&5
2922echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2923
2924# Check whether --with-curses-h or --without-curses-h was given.
2925if test "${with_curses_h+set}" = set; then
2926  withval="$with_curses_h"
2927  with_curses_h=$withval
2928else
2929  with_curses_h=yes
2930fi;
2931echo "$as_me:2931: result: $with_curses_h" >&5
2932echo "${ECHO_T}$with_curses_h" >&6
2933
2934modules_to_build="ncurses"
2935if test "X$cf_with_progs" != Xno ; then
2936modules_to_build="$modules_to_build progs tack"
2937fi
2938modules_to_build="$modules_to_build panel menu form"
2939
2940test "$program_prefix" != NONE &&
2941  program_transform_name="s,^,$program_prefix,;$program_transform_name"
2942# Use a double $ so make ignores it.
2943test "$program_suffix" != NONE &&
2944  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2945# Double any \ or $.  echo might interpret backslashes.
2946# By default was `s,x,x', remove it if useless.
2947cat <<\_ACEOF >conftest.sed
2948s/[\\$]/&&/g;s/;s,x,x,$//
2949_ACEOF
2950program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2951rm conftest.sed
2952
2953for ac_prog in mawk gawk nawk awk
2954do
2955  # Extract the first word of "$ac_prog", so it can be a program name with args.
2956set dummy $ac_prog; ac_word=$2
2957echo "$as_me:2957: checking for $ac_word" >&5
2958echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2959if test "${ac_cv_prog_AWK+set}" = set; then
2960  echo $ECHO_N "(cached) $ECHO_C" >&6
2961else
2962  if test -n "$AWK"; then
2963  ac_cv_prog_AWK="$AWK" # Let the user override the test.
2964else
2965  ac_save_IFS=$IFS; IFS=$ac_path_separator
2966ac_dummy="$PATH"
2967for ac_dir in $ac_dummy; do
2968  IFS=$ac_save_IFS
2969  test -z "$ac_dir" && ac_dir=.
2970  $as_executable_p "$ac_dir/$ac_word" || continue
2971ac_cv_prog_AWK="$ac_prog"
2972echo "$as_me:2972: found $ac_dir/$ac_word" >&5
2973break
2974done
2975
2976fi
2977fi
2978AWK=$ac_cv_prog_AWK
2979if test -n "$AWK"; then
2980  echo "$as_me:2980: result: $AWK" >&5
2981echo "${ECHO_T}$AWK" >&6
2982else
2983  echo "$as_me:2983: result: no" >&5
2984echo "${ECHO_T}no" >&6
2985fi
2986
2987  test -n "$AWK" && break
2988done
2989
2990test -z "$AWK" && { { echo "$as_me:2990: error: No awk program found" >&5
2991echo "$as_me: error: No awk program found" >&2;}
2992   { (exit 1); exit 1; }; }
2993
2994echo "$as_me:2994: checking for egrep" >&5
2995echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2996if test "${ac_cv_prog_egrep+set}" = set; then
2997  echo $ECHO_N "(cached) $ECHO_C" >&6
2998else
2999  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3000    then ac_cv_prog_egrep='grep -E'
3001    else ac_cv_prog_egrep='egrep'
3002    fi
3003fi
3004echo "$as_me:3004: result: $ac_cv_prog_egrep" >&5
3005echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3006 EGREP=$ac_cv_prog_egrep
3007
3008test -z "$EGREP" && { { echo "$as_me:3008: error: No egrep program found" >&5
3009echo "$as_me: error: No egrep program found" >&2;}
3010   { (exit 1); exit 1; }; }
3011
3012# Find a good install program.  We prefer a C program (faster),
3013# so one script is as good as another.  But avoid the broken or
3014# incompatible versions:
3015# SysV /etc/install, /usr/sbin/install
3016# SunOS /usr/etc/install
3017# IRIX /sbin/install
3018# AIX /bin/install
3019# AmigaOS /C/install, which installs bootblocks on floppy discs
3020# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3021# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3022# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3023# ./install, which can be erroneously created by make from ./install.sh.
3024echo "$as_me:3024: checking for a BSD compatible install" >&5
3025echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3026if test -z "$INSTALL"; then
3027if test "${ac_cv_path_install+set}" = set; then
3028  echo $ECHO_N "(cached) $ECHO_C" >&6
3029else
3030    ac_save_IFS=$IFS; IFS=$ac_path_separator
3031  for ac_dir in $PATH; do
3032    IFS=$ac_save_IFS
3033    # Account for people who put trailing slashes in PATH elements.
3034    case $ac_dir/ in
3035    / | ./ | .// | /cC/* \
3036    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3037    | /usr/ucb/* ) ;;
3038    *)
3039      # OSF1 and SCO ODT 3.0 have their own names for install.
3040      # Don't use installbsd from OSF since it installs stuff as root
3041      # by default.
3042      for ac_prog in ginstall scoinst install; do
3043        if $as_executable_p "$ac_dir/$ac_prog"; then
3044	  if test $ac_prog = install &&
3045            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3046	    # AIX install.  It has an incompatible calling convention.
3047	    :
3048	  elif test $ac_prog = install &&
3049	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3050	    # program-specific install script used by HP pwplus--don't use.
3051	    :
3052	  else
3053	    ac_cv_path_install="$ac_dir/$ac_prog -c"
3054	    break 2
3055	  fi
3056	fi
3057      done
3058      ;;
3059    esac
3060  done
3061
3062fi
3063  if test "${ac_cv_path_install+set}" = set; then
3064    INSTALL=$ac_cv_path_install
3065  else
3066    # As a last resort, use the slow shell script.  We don't cache a
3067    # path for INSTALL within a source directory, because that will
3068    # break other packages using the cache if that directory is
3069    # removed, or if the path is relative.
3070    INSTALL=$ac_install_sh
3071  fi
3072fi
3073echo "$as_me:3073: result: $INSTALL" >&5
3074echo "${ECHO_T}$INSTALL" >&6
3075
3076# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3077# It thinks the first close brace ends the variable substitution.
3078test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3079
3080test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3081
3082test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3083
3084case $INSTALL in
3085/*)
3086  ;;
3087*)
3088  cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3089  test -z "$cf_dir" && cf_dir=.
3090  INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3091  ;;
3092esac
3093
3094for ac_prog in tdlint lint alint splint lclint
3095do
3096  # Extract the first word of "$ac_prog", so it can be a program name with args.
3097set dummy $ac_prog; ac_word=$2
3098echo "$as_me:3098: checking for $ac_word" >&5
3099echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3100if test "${ac_cv_prog_LINT+set}" = set; then
3101  echo $ECHO_N "(cached) $ECHO_C" >&6
3102else
3103  if test -n "$LINT"; then
3104  ac_cv_prog_LINT="$LINT" # Let the user override the test.
3105else
3106  ac_save_IFS=$IFS; IFS=$ac_path_separator
3107ac_dummy="$PATH"
3108for ac_dir in $ac_dummy; do
3109  IFS=$ac_save_IFS
3110  test -z "$ac_dir" && ac_dir=.
3111  $as_executable_p "$ac_dir/$ac_word" || continue
3112ac_cv_prog_LINT="$ac_prog"
3113echo "$as_me:3113: found $ac_dir/$ac_word" >&5
3114break
3115done
3116
3117fi
3118fi
3119LINT=$ac_cv_prog_LINT
3120if test -n "$LINT"; then
3121  echo "$as_me:3121: result: $LINT" >&5
3122echo "${ECHO_T}$LINT" >&6
3123else
3124  echo "$as_me:3124: result: no" >&5
3125echo "${ECHO_T}no" >&6
3126fi
3127
3128  test -n "$LINT" && break
3129done
3130
3131echo "$as_me:3131: checking whether ln -s works" >&5
3132echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3133LN_S=$as_ln_s
3134if test "$LN_S" = "ln -s"; then
3135  echo "$as_me:3135: result: yes" >&5
3136echo "${ECHO_T}yes" >&6
3137else
3138  echo "$as_me:3138: result: no, using $LN_S" >&5
3139echo "${ECHO_T}no, using $LN_S" >&6
3140fi
3141
3142echo "$as_me:3142: checking if $LN_S -f options work" >&5
3143echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3144
3145rm -f conf$$.src conf$$dst
3146echo >conf$$.dst
3147echo first >conf$$.src
3148if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3149	cf_prog_ln_sf=yes
3150else
3151	cf_prog_ln_sf=no
3152fi
3153rm -f conf$$.dst conf$$src
3154echo "$as_me:3154: result: $cf_prog_ln_sf" >&5
3155echo "${ECHO_T}$cf_prog_ln_sf" >&6
3156
3157test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3158
3159echo "$as_me:3159: checking for long file names" >&5
3160echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3161if test "${ac_cv_sys_long_file_names+set}" = set; then
3162  echo $ECHO_N "(cached) $ECHO_C" >&6
3163else
3164  ac_cv_sys_long_file_names=yes
3165# Test for long file names in all the places we know might matter:
3166#      .		the current directory, where building will happen
3167#      $prefix/lib	where we will be installing things
3168#      $exec_prefix/lib	likewise
3169# eval it to expand exec_prefix.
3170#      $TMPDIR		if set, where it might want to write temporary files
3171# if $TMPDIR is not set:
3172#      /tmp		where it might want to write temporary files
3173#      /var/tmp		likewise
3174#      /usr/tmp		likewise
3175if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3176  ac_tmpdirs=$TMPDIR
3177else
3178  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3179fi
3180for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3181  test -d $ac_dir || continue
3182  test -w $ac_dir || continue # It is less confusing to not echo anything here.
3183  ac_xdir=$ac_dir/cf$$
3184  (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3185  ac_tf1=$ac_xdir/conftest9012345
3186  ac_tf2=$ac_xdir/conftest9012346
3187  (echo 1 >$ac_tf1) 2>/dev/null
3188  (echo 2 >$ac_tf2) 2>/dev/null
3189  ac_val=`cat $ac_tf1 2>/dev/null`
3190  if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3191    ac_cv_sys_long_file_names=no
3192    rm -rf $ac_xdir 2>/dev/null
3193    break
3194  fi
3195  rm -rf $ac_xdir 2>/dev/null
3196done
3197fi
3198echo "$as_me:3198: result: $ac_cv_sys_long_file_names" >&5
3199echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3200if test $ac_cv_sys_long_file_names = yes; then
3201
3202cat >>confdefs.h <<\EOF
3203#define HAVE_LONG_FILE_NAMES 1
3204EOF
3205
3206fi
3207
3208# if we find pkg-config, check if we should install the ".pc" files.
3209
3210echo "$as_me:3210: checking if you want to use pkg-config" >&5
3211echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3212
3213# Check whether --with-pkg-config or --without-pkg-config was given.
3214if test "${with_pkg_config+set}" = set; then
3215  withval="$with_pkg_config"
3216  cf_pkg_config=$withval
3217else
3218  cf_pkg_config=yes
3219fi;
3220echo "$as_me:3220: result: $cf_pkg_config" >&5
3221echo "${ECHO_T}$cf_pkg_config" >&6
3222
3223case $cf_pkg_config in #(vi
3224no) #(vi
3225	PKG_CONFIG=none
3226	;;
3227yes) #(vi
3228
3229if test -n "$ac_tool_prefix"; then
3230  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3231set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3232echo "$as_me:3232: checking for $ac_word" >&5
3233echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3234if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3235  echo $ECHO_N "(cached) $ECHO_C" >&6
3236else
3237  case $PKG_CONFIG in
3238  [\\/]* | ?:[\\/]*)
3239  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3240  ;;
3241  *)
3242  ac_save_IFS=$IFS; IFS=$ac_path_separator
3243ac_dummy="$PATH"
3244for ac_dir in $ac_dummy; do
3245  IFS=$ac_save_IFS
3246  test -z "$ac_dir" && ac_dir=.
3247  if $as_executable_p "$ac_dir/$ac_word"; then
3248   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3249   echo "$as_me:3249: found $ac_dir/$ac_word" >&5
3250   break
3251fi
3252done
3253
3254  ;;
3255esac
3256fi
3257PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3258
3259if test -n "$PKG_CONFIG"; then
3260  echo "$as_me:3260: result: $PKG_CONFIG" >&5
3261echo "${ECHO_T}$PKG_CONFIG" >&6
3262else
3263  echo "$as_me:3263: result: no" >&5
3264echo "${ECHO_T}no" >&6
3265fi
3266
3267fi
3268if test -z "$ac_cv_path_PKG_CONFIG"; then
3269  ac_pt_PKG_CONFIG=$PKG_CONFIG
3270  # Extract the first word of "pkg-config", so it can be a program name with args.
3271set dummy pkg-config; ac_word=$2
3272echo "$as_me:3272: checking for $ac_word" >&5
3273echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3274if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3275  echo $ECHO_N "(cached) $ECHO_C" >&6
3276else
3277  case $ac_pt_PKG_CONFIG in
3278  [\\/]* | ?:[\\/]*)
3279  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3280  ;;
3281  *)
3282  ac_save_IFS=$IFS; IFS=$ac_path_separator
3283ac_dummy="$PATH"
3284for ac_dir in $ac_dummy; do
3285  IFS=$ac_save_IFS
3286  test -z "$ac_dir" && ac_dir=.
3287  if $as_executable_p "$ac_dir/$ac_word"; then
3288   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3289   echo "$as_me:3289: found $ac_dir/$ac_word" >&5
3290   break
3291fi
3292done
3293
3294  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3295  ;;
3296esac
3297fi
3298ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3299
3300if test -n "$ac_pt_PKG_CONFIG"; then
3301  echo "$as_me:3301: result: $ac_pt_PKG_CONFIG" >&5
3302echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3303else
3304  echo "$as_me:3304: result: no" >&5
3305echo "${ECHO_T}no" >&6
3306fi
3307
3308  PKG_CONFIG=$ac_pt_PKG_CONFIG
3309else
3310  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3311fi
3312
3313	;;
3314*)
3315	PKG_CONFIG=$withval
3316	;;
3317esac
3318
3319test -z "$PKG_CONFIG" && PKG_CONFIG=none
3320if test "$PKG_CONFIG" != none ; then
3321
3322if test "x$prefix" != xNONE; then
3323  cf_path_syntax="$prefix"
3324else
3325  cf_path_syntax="$ac_default_prefix"
3326fi
3327
3328case ".$PKG_CONFIG" in #(vi
3329.\$\(*\)*|.\'*\'*) #(vi
3330  ;;
3331..|./*|.\\*) #(vi
3332  ;;
3333.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3334  ;;
3335.\${*prefix}*|.\${*dir}*) #(vi
3336  eval PKG_CONFIG="$PKG_CONFIG"
3337  case ".$PKG_CONFIG" in #(vi
3338  .NONE/*)
3339    PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3340    ;;
3341  esac
3342  ;; #(vi
3343.no|.NONE/*)
3344  PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3345  ;;
3346*)
3347  { { echo "$as_me:3347: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3348echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3349   { (exit 1); exit 1; }; }
3350  ;;
3351esac
3352
3353fi
3354
3355if test "$PKG_CONFIG" != none ; then
3356	echo "$as_me:3356: checking for $PKG_CONFIG library directory" >&5
3357echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3358
3359# Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3360if test "${with_pkg_config_libdir+set}" = set; then
3361  withval="$with_pkg_config_libdir"
3362  PKG_CONFIG_LIBDIR=$withval
3363else
3364  PKG_CONFIG_LIBDIR=yes
3365fi;
3366
3367	case x$PKG_CONFIG_LIBDIR in #(vi
3368	x/*) #(vi
3369		;;
3370	xyes) #(vi
3371		# look for the library directory using the same prefix as the executable
3372		cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3373		case x`(arch) 2>/dev/null` in #(vi
3374		*64) #(vi
3375			for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3376			do
3377				if test -d $cf_config/pkgconfig
3378				then
3379					PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3380					break
3381				fi
3382			done
3383			;;
3384		*)
3385			PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3386			;;
3387		esac
3388		;;
3389	*)
3390		;;
3391	esac
3392
3393	echo "$as_me:3393: result: $PKG_CONFIG_LIBDIR" >&5
3394echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3395fi
3396
3397if test "$PKG_CONFIG" != none ; then
3398	echo "$as_me:3398: checking if we should install .pc files for $PKG_CONFIG" >&5
3399echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3400
3401# Check whether --enable-pc-files or --disable-pc-files was given.
3402if test "${enable_pc_files+set}" = set; then
3403  enableval="$enable_pc_files"
3404  enable_pc_files=$enableval
3405else
3406  enable_pc_files=no
3407fi;
3408	echo "$as_me:3408: result: $enable_pc_files" >&5
3409echo "${ECHO_T}$enable_pc_files" >&6
3410	if test "$enable_pc_files" != no
3411	then
3412
3413if test "x$prefix" != xNONE; then
3414  cf_path_syntax="$prefix"
3415else
3416  cf_path_syntax="$ac_default_prefix"
3417fi
3418
3419case ".$PKG_CONFIG_LIBDIR" in #(vi
3420.\$\(*\)*|.\'*\'*) #(vi
3421  ;;
3422..|./*|.\\*) #(vi
3423  ;;
3424.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3425  ;;
3426.\${*prefix}*|.\${*dir}*) #(vi
3427  eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3428  case ".$PKG_CONFIG_LIBDIR" in #(vi
3429  .NONE/*)
3430    PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3431    ;;
3432  esac
3433  ;; #(vi
3434.no|.NONE/*)
3435  PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3436  ;;
3437*)
3438  { { echo "$as_me:3438: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3439echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3440   { (exit 1); exit 1; }; }
3441  ;;
3442esac
3443
3444	fi
3445else
3446	enable_pc_files=no
3447fi
3448
3449echo "$as_me:3449: checking if we should assume mixed-case filenames" >&5
3450echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3451
3452# Check whether --enable-mixed-case or --disable-mixed-case was given.
3453if test "${enable_mixed_case+set}" = set; then
3454  enableval="$enable_mixed_case"
3455  enable_mixedcase=$enableval
3456else
3457  enable_mixedcase=auto
3458fi;
3459echo "$as_me:3459: result: $enable_mixedcase" >&5
3460echo "${ECHO_T}$enable_mixedcase" >&6
3461if test "$enable_mixedcase" = "auto" ; then
3462
3463echo "$as_me:3463: checking if filesystem supports mixed-case filenames" >&5
3464echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3465if test "${cf_cv_mixedcase+set}" = set; then
3466  echo $ECHO_N "(cached) $ECHO_C" >&6
3467else
3468
3469if test "$cross_compiling" = yes ; then
3470	case $target_alias in #(vi
3471	*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
3472		cf_cv_mixedcase=no
3473		;;
3474	*)
3475		cf_cv_mixedcase=yes
3476		;;
3477	esac
3478else
3479	rm -f conftest CONFTEST
3480	echo test >conftest
3481	if test -f CONFTEST ; then
3482		cf_cv_mixedcase=no
3483	else
3484		cf_cv_mixedcase=yes
3485	fi
3486	rm -f conftest CONFTEST
3487fi
3488
3489fi
3490echo "$as_me:3490: result: $cf_cv_mixedcase" >&5
3491echo "${ECHO_T}$cf_cv_mixedcase" >&6
3492test "$cf_cv_mixedcase" = yes &&
3493cat >>confdefs.h <<\EOF
3494#define MIXEDCASE_FILENAMES 1
3495EOF
3496
3497else
3498    cf_cv_mixedcase=$enable_mixedcase
3499    if test "x$enable_mixedcase" = "xyes" ; then
3500
3501cat >>confdefs.h <<\EOF
3502#define MIXEDCASE_FILENAMES 1
3503EOF
3504
3505    fi
3506fi
3507
3508# do this after mixed-case option (tags/TAGS is not as important as tic).
3509echo "$as_me:3509: checking whether ${MAKE-make} sets \${MAKE}" >&5
3510echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3511set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3512if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3513  echo $ECHO_N "(cached) $ECHO_C" >&6
3514else
3515  cat >conftest.make <<\EOF
3516all:
3517	@echo 'ac_maketemp="${MAKE}"'
3518EOF
3519# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3520eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3521if test -n "$ac_maketemp"; then
3522  eval ac_cv_prog_make_${ac_make}_set=yes
3523else
3524  eval ac_cv_prog_make_${ac_make}_set=no
3525fi
3526rm -f conftest.make
3527fi
3528if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3529  echo "$as_me:3529: result: yes" >&5
3530echo "${ECHO_T}yes" >&6
3531  SET_MAKE=
3532else
3533  echo "$as_me:3533: result: no" >&5
3534echo "${ECHO_T}no" >&6
3535  SET_MAKE="MAKE=${MAKE-make}"
3536fi
3537
3538for ac_prog in exctags ctags
3539do
3540  # Extract the first word of "$ac_prog", so it can be a program name with args.
3541set dummy $ac_prog; ac_word=$2
3542echo "$as_me:3542: checking for $ac_word" >&5
3543echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3544if test "${ac_cv_prog_CTAGS+set}" = set; then
3545  echo $ECHO_N "(cached) $ECHO_C" >&6
3546else
3547  if test -n "$CTAGS"; then
3548  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3549else
3550  ac_save_IFS=$IFS; IFS=$ac_path_separator
3551ac_dummy="$PATH"
3552for ac_dir in $ac_dummy; do
3553  IFS=$ac_save_IFS
3554  test -z "$ac_dir" && ac_dir=.
3555  $as_executable_p "$ac_dir/$ac_word" || continue
3556ac_cv_prog_CTAGS="$ac_prog"
3557echo "$as_me:3557: found $ac_dir/$ac_word" >&5
3558break
3559done
3560
3561fi
3562fi
3563CTAGS=$ac_cv_prog_CTAGS
3564if test -n "$CTAGS"; then
3565  echo "$as_me:3565: result: $CTAGS" >&5
3566echo "${ECHO_T}$CTAGS" >&6
3567else
3568  echo "$as_me:3568: result: no" >&5
3569echo "${ECHO_T}no" >&6
3570fi
3571
3572  test -n "$CTAGS" && break
3573done
3574
3575for ac_prog in exetags etags
3576do
3577  # Extract the first word of "$ac_prog", so it can be a program name with args.
3578set dummy $ac_prog; ac_word=$2
3579echo "$as_me:3579: checking for $ac_word" >&5
3580echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3581if test "${ac_cv_prog_ETAGS+set}" = set; then
3582  echo $ECHO_N "(cached) $ECHO_C" >&6
3583else
3584  if test -n "$ETAGS"; then
3585  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3586else
3587  ac_save_IFS=$IFS; IFS=$ac_path_separator
3588ac_dummy="$PATH"
3589for ac_dir in $ac_dummy; do
3590  IFS=$ac_save_IFS
3591  test -z "$ac_dir" && ac_dir=.
3592  $as_executable_p "$ac_dir/$ac_word" || continue
3593ac_cv_prog_ETAGS="$ac_prog"
3594echo "$as_me:3594: found $ac_dir/$ac_word" >&5
3595break
3596done
3597
3598fi
3599fi
3600ETAGS=$ac_cv_prog_ETAGS
3601if test -n "$ETAGS"; then
3602  echo "$as_me:3602: result: $ETAGS" >&5
3603echo "${ECHO_T}$ETAGS" >&6
3604else
3605  echo "$as_me:3605: result: no" >&5
3606echo "${ECHO_T}no" >&6
3607fi
3608
3609  test -n "$ETAGS" && break
3610done
3611
3612# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3613set dummy ${CTAGS:-ctags}; ac_word=$2
3614echo "$as_me:3614: checking for $ac_word" >&5
3615echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3616if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3617  echo $ECHO_N "(cached) $ECHO_C" >&6
3618else
3619  if test -n "$MAKE_LOWER_TAGS"; then
3620  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3621else
3622  ac_save_IFS=$IFS; IFS=$ac_path_separator
3623ac_dummy="$PATH"
3624for ac_dir in $ac_dummy; do
3625  IFS=$ac_save_IFS
3626  test -z "$ac_dir" && ac_dir=.
3627  $as_executable_p "$ac_dir/$ac_word" || continue
3628ac_cv_prog_MAKE_LOWER_TAGS="yes"
3629echo "$as_me:3629: found $ac_dir/$ac_word" >&5
3630break
3631done
3632
3633  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3634fi
3635fi
3636MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3637if test -n "$MAKE_LOWER_TAGS"; then
3638  echo "$as_me:3638: result: $MAKE_LOWER_TAGS" >&5
3639echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3640else
3641  echo "$as_me:3641: result: no" >&5
3642echo "${ECHO_T}no" >&6
3643fi
3644
3645if test "$cf_cv_mixedcase" = yes ; then
3646	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3647set dummy ${ETAGS:-etags}; ac_word=$2
3648echo "$as_me:3648: checking for $ac_word" >&5
3649echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3650if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3651  echo $ECHO_N "(cached) $ECHO_C" >&6
3652else
3653  if test -n "$MAKE_UPPER_TAGS"; then
3654  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3655else
3656  ac_save_IFS=$IFS; IFS=$ac_path_separator
3657ac_dummy="$PATH"
3658for ac_dir in $ac_dummy; do
3659  IFS=$ac_save_IFS
3660  test -z "$ac_dir" && ac_dir=.
3661  $as_executable_p "$ac_dir/$ac_word" || continue
3662ac_cv_prog_MAKE_UPPER_TAGS="yes"
3663echo "$as_me:3663: found $ac_dir/$ac_word" >&5
3664break
3665done
3666
3667  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3668fi
3669fi
3670MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3671if test -n "$MAKE_UPPER_TAGS"; then
3672  echo "$as_me:3672: result: $MAKE_UPPER_TAGS" >&5
3673echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3674else
3675  echo "$as_me:3675: result: no" >&5
3676echo "${ECHO_T}no" >&6
3677fi
3678
3679else
3680	MAKE_UPPER_TAGS=no
3681fi
3682
3683if test "$MAKE_UPPER_TAGS" = yes ; then
3684	MAKE_UPPER_TAGS=
3685else
3686	MAKE_UPPER_TAGS="#"
3687fi
3688
3689if test "$MAKE_LOWER_TAGS" = yes ; then
3690	MAKE_LOWER_TAGS=
3691else
3692	MAKE_LOWER_TAGS="#"
3693fi
3694
3695echo "$as_me:3695: checking for makeflags variable" >&5
3696echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3697if test "${cf_cv_makeflags+set}" = set; then
3698  echo $ECHO_N "(cached) $ECHO_C" >&6
3699else
3700
3701	cf_cv_makeflags=''
3702	for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3703	do
3704		cat >cf_makeflags.tmp <<CF_EOF
3705SHELL = /bin/sh
3706all :
3707	@ echo '.$cf_option'
3708CF_EOF
3709		cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ 	]*$,,'`
3710		case "$cf_result" in
3711		.*k)
3712			cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3713			case "$cf_result" in
3714			.*CC=*)	cf_cv_makeflags=
3715				;;
3716			*)	cf_cv_makeflags=$cf_option
3717				;;
3718			esac
3719			break
3720			;;
3721		.-)	;;
3722		*)	echo "given option \"$cf_option\", no match \"$cf_result\""
3723			;;
3724		esac
3725	done
3726	rm -f cf_makeflags.tmp
3727
3728fi
3729echo "$as_me:3729: result: $cf_cv_makeflags" >&5
3730echo "${ECHO_T}$cf_cv_makeflags" >&6
3731
3732if test -n "$ac_tool_prefix"; then
3733  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3734set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3735echo "$as_me:3735: checking for $ac_word" >&5
3736echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3737if test "${ac_cv_prog_RANLIB+set}" = set; then
3738  echo $ECHO_N "(cached) $ECHO_C" >&6
3739else
3740  if test -n "$RANLIB"; then
3741  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3742else
3743  ac_save_IFS=$IFS; IFS=$ac_path_separator
3744ac_dummy="$PATH"
3745for ac_dir in $ac_dummy; do
3746  IFS=$ac_save_IFS
3747  test -z "$ac_dir" && ac_dir=.
3748  $as_executable_p "$ac_dir/$ac_word" || continue
3749ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3750echo "$as_me:3750: found $ac_dir/$ac_word" >&5
3751break
3752done
3753
3754fi
3755fi
3756RANLIB=$ac_cv_prog_RANLIB
3757if test -n "$RANLIB"; then
3758  echo "$as_me:3758: result: $RANLIB" >&5
3759echo "${ECHO_T}$RANLIB" >&6
3760else
3761  echo "$as_me:3761: result: no" >&5
3762echo "${ECHO_T}no" >&6
3763fi
3764
3765fi
3766if test -z "$ac_cv_prog_RANLIB"; then
3767  ac_ct_RANLIB=$RANLIB
3768  # Extract the first word of "ranlib", so it can be a program name with args.
3769set dummy ranlib; ac_word=$2
3770echo "$as_me:3770: checking for $ac_word" >&5
3771echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3772if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3773  echo $ECHO_N "(cached) $ECHO_C" >&6
3774else
3775  if test -n "$ac_ct_RANLIB"; then
3776  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3777else
3778  ac_save_IFS=$IFS; IFS=$ac_path_separator
3779ac_dummy="$PATH"
3780for ac_dir in $ac_dummy; do
3781  IFS=$ac_save_IFS
3782  test -z "$ac_dir" && ac_dir=.
3783  $as_executable_p "$ac_dir/$ac_word" || continue
3784ac_cv_prog_ac_ct_RANLIB="ranlib"
3785echo "$as_me:3785: found $ac_dir/$ac_word" >&5
3786break
3787done
3788
3789  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3790fi
3791fi
3792ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3793if test -n "$ac_ct_RANLIB"; then
3794  echo "$as_me:3794: result: $ac_ct_RANLIB" >&5
3795echo "${ECHO_T}$ac_ct_RANLIB" >&6
3796else
3797  echo "$as_me:3797: result: no" >&5
3798echo "${ECHO_T}no" >&6
3799fi
3800
3801  RANLIB=$ac_ct_RANLIB
3802else
3803  RANLIB="$ac_cv_prog_RANLIB"
3804fi
3805
3806if test -n "$ac_tool_prefix"; then
3807  # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3808set dummy ${ac_tool_prefix}ld; ac_word=$2
3809echo "$as_me:3809: checking for $ac_word" >&5
3810echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3811if test "${ac_cv_prog_LD+set}" = set; then
3812  echo $ECHO_N "(cached) $ECHO_C" >&6
3813else
3814  if test -n "$LD"; then
3815  ac_cv_prog_LD="$LD" # Let the user override the test.
3816else
3817  ac_save_IFS=$IFS; IFS=$ac_path_separator
3818ac_dummy="$PATH"
3819for ac_dir in $ac_dummy; do
3820  IFS=$ac_save_IFS
3821  test -z "$ac_dir" && ac_dir=.
3822  $as_executable_p "$ac_dir/$ac_word" || continue
3823ac_cv_prog_LD="${ac_tool_prefix}ld"
3824echo "$as_me:3824: found $ac_dir/$ac_word" >&5
3825break
3826done
3827
3828fi
3829fi
3830LD=$ac_cv_prog_LD
3831if test -n "$LD"; then
3832  echo "$as_me:3832: result: $LD" >&5
3833echo "${ECHO_T}$LD" >&6
3834else
3835  echo "$as_me:3835: result: no" >&5
3836echo "${ECHO_T}no" >&6
3837fi
3838
3839fi
3840if test -z "$ac_cv_prog_LD"; then
3841  ac_ct_LD=$LD
3842  # Extract the first word of "ld", so it can be a program name with args.
3843set dummy ld; ac_word=$2
3844echo "$as_me:3844: checking for $ac_word" >&5
3845echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3846if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3847  echo $ECHO_N "(cached) $ECHO_C" >&6
3848else
3849  if test -n "$ac_ct_LD"; then
3850  ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3851else
3852  ac_save_IFS=$IFS; IFS=$ac_path_separator
3853ac_dummy="$PATH"
3854for ac_dir in $ac_dummy; do
3855  IFS=$ac_save_IFS
3856  test -z "$ac_dir" && ac_dir=.
3857  $as_executable_p "$ac_dir/$ac_word" || continue
3858ac_cv_prog_ac_ct_LD="ld"
3859echo "$as_me:3859: found $ac_dir/$ac_word" >&5
3860break
3861done
3862
3863  test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3864fi
3865fi
3866ac_ct_LD=$ac_cv_prog_ac_ct_LD
3867if test -n "$ac_ct_LD"; then
3868  echo "$as_me:3868: result: $ac_ct_LD" >&5
3869echo "${ECHO_T}$ac_ct_LD" >&6
3870else
3871  echo "$as_me:3871: result: no" >&5
3872echo "${ECHO_T}no" >&6
3873fi
3874
3875  LD=$ac_ct_LD
3876else
3877  LD="$ac_cv_prog_LD"
3878fi
3879
3880if test -n "$ac_tool_prefix"; then
3881  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3882set dummy ${ac_tool_prefix}ar; ac_word=$2
3883echo "$as_me:3883: checking for $ac_word" >&5
3884echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3885if test "${ac_cv_prog_AR+set}" = set; then
3886  echo $ECHO_N "(cached) $ECHO_C" >&6
3887else
3888  if test -n "$AR"; then
3889  ac_cv_prog_AR="$AR" # Let the user override the test.
3890else
3891  ac_save_IFS=$IFS; IFS=$ac_path_separator
3892ac_dummy="$PATH"
3893for ac_dir in $ac_dummy; do
3894  IFS=$ac_save_IFS
3895  test -z "$ac_dir" && ac_dir=.
3896  $as_executable_p "$ac_dir/$ac_word" || continue
3897ac_cv_prog_AR="${ac_tool_prefix}ar"
3898echo "$as_me:3898: found $ac_dir/$ac_word" >&5
3899break
3900done
3901
3902fi
3903fi
3904AR=$ac_cv_prog_AR
3905if test -n "$AR"; then
3906  echo "$as_me:3906: result: $AR" >&5
3907echo "${ECHO_T}$AR" >&6
3908else
3909  echo "$as_me:3909: result: no" >&5
3910echo "${ECHO_T}no" >&6
3911fi
3912
3913fi
3914if test -z "$ac_cv_prog_AR"; then
3915  ac_ct_AR=$AR
3916  # Extract the first word of "ar", so it can be a program name with args.
3917set dummy ar; ac_word=$2
3918echo "$as_me:3918: checking for $ac_word" >&5
3919echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3920if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3921  echo $ECHO_N "(cached) $ECHO_C" >&6
3922else
3923  if test -n "$ac_ct_AR"; then
3924  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3925else
3926  ac_save_IFS=$IFS; IFS=$ac_path_separator
3927ac_dummy="$PATH"
3928for ac_dir in $ac_dummy; do
3929  IFS=$ac_save_IFS
3930  test -z "$ac_dir" && ac_dir=.
3931  $as_executable_p "$ac_dir/$ac_word" || continue
3932ac_cv_prog_ac_ct_AR="ar"
3933echo "$as_me:3933: found $ac_dir/$ac_word" >&5
3934break
3935done
3936
3937  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3938fi
3939fi
3940ac_ct_AR=$ac_cv_prog_ac_ct_AR
3941if test -n "$ac_ct_AR"; then
3942  echo "$as_me:3942: result: $ac_ct_AR" >&5
3943echo "${ECHO_T}$ac_ct_AR" >&6
3944else
3945  echo "$as_me:3945: result: no" >&5
3946echo "${ECHO_T}no" >&6
3947fi
3948
3949  AR=$ac_ct_AR
3950else
3951  AR="$ac_cv_prog_AR"
3952fi
3953
3954if test -n "$ac_tool_prefix"; then
3955  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
3956set dummy ${ac_tool_prefix}nm; ac_word=$2
3957echo "$as_me:3957: checking for $ac_word" >&5
3958echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3959if test "${ac_cv_prog_NM+set}" = set; then
3960  echo $ECHO_N "(cached) $ECHO_C" >&6
3961else
3962  if test -n "$NM"; then
3963  ac_cv_prog_NM="$NM" # Let the user override the test.
3964else
3965  ac_save_IFS=$IFS; IFS=$ac_path_separator
3966ac_dummy="$PATH"
3967for ac_dir in $ac_dummy; do
3968  IFS=$ac_save_IFS
3969  test -z "$ac_dir" && ac_dir=.
3970  $as_executable_p "$ac_dir/$ac_word" || continue
3971ac_cv_prog_NM="${ac_tool_prefix}nm"
3972echo "$as_me:3972: found $ac_dir/$ac_word" >&5
3973break
3974done
3975
3976fi
3977fi
3978NM=$ac_cv_prog_NM
3979if test -n "$NM"; then
3980  echo "$as_me:3980: result: $NM" >&5
3981echo "${ECHO_T}$NM" >&6
3982else
3983  echo "$as_me:3983: result: no" >&5
3984echo "${ECHO_T}no" >&6
3985fi
3986
3987fi
3988if test -z "$ac_cv_prog_NM"; then
3989  ac_ct_NM=$NM
3990  # Extract the first word of "nm", so it can be a program name with args.
3991set dummy nm; ac_word=$2
3992echo "$as_me:3992: checking for $ac_word" >&5
3993echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3994if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
3995  echo $ECHO_N "(cached) $ECHO_C" >&6
3996else
3997  if test -n "$ac_ct_NM"; then
3998  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
3999else
4000  ac_save_IFS=$IFS; IFS=$ac_path_separator
4001ac_dummy="$PATH"
4002for ac_dir in $ac_dummy; do
4003  IFS=$ac_save_IFS
4004  test -z "$ac_dir" && ac_dir=.
4005  $as_executable_p "$ac_dir/$ac_word" || continue
4006ac_cv_prog_ac_ct_NM="nm"
4007echo "$as_me:4007: found $ac_dir/$ac_word" >&5
4008break
4009done
4010
4011  test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4012fi
4013fi
4014ac_ct_NM=$ac_cv_prog_ac_ct_NM
4015if test -n "$ac_ct_NM"; then
4016  echo "$as_me:4016: result: $ac_ct_NM" >&5
4017echo "${ECHO_T}$ac_ct_NM" >&6
4018else
4019  echo "$as_me:4019: result: no" >&5
4020echo "${ECHO_T}no" >&6
4021fi
4022
4023  NM=$ac_ct_NM
4024else
4025  NM="$ac_cv_prog_NM"
4026fi
4027
4028if test -n "$ac_tool_prefix"; then
4029  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4030set dummy ${ac_tool_prefix}ar; ac_word=$2
4031echo "$as_me:4031: checking for $ac_word" >&5
4032echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4033if test "${ac_cv_prog_AR+set}" = set; then
4034  echo $ECHO_N "(cached) $ECHO_C" >&6
4035else
4036  if test -n "$AR"; then
4037  ac_cv_prog_AR="$AR" # Let the user override the test.
4038else
4039  ac_save_IFS=$IFS; IFS=$ac_path_separator
4040ac_dummy="$PATH"
4041for ac_dir in $ac_dummy; do
4042  IFS=$ac_save_IFS
4043  test -z "$ac_dir" && ac_dir=.
4044  $as_executable_p "$ac_dir/$ac_word" || continue
4045ac_cv_prog_AR="${ac_tool_prefix}ar"
4046echo "$as_me:4046: found $ac_dir/$ac_word" >&5
4047break
4048done
4049
4050fi
4051fi
4052AR=$ac_cv_prog_AR
4053if test -n "$AR"; then
4054  echo "$as_me:4054: result: $AR" >&5
4055echo "${ECHO_T}$AR" >&6
4056else
4057  echo "$as_me:4057: result: no" >&5
4058echo "${ECHO_T}no" >&6
4059fi
4060
4061fi
4062if test -z "$ac_cv_prog_AR"; then
4063  ac_ct_AR=$AR
4064  # Extract the first word of "ar", so it can be a program name with args.
4065set dummy ar; ac_word=$2
4066echo "$as_me:4066: checking for $ac_word" >&5
4067echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4068if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4069  echo $ECHO_N "(cached) $ECHO_C" >&6
4070else
4071  if test -n "$ac_ct_AR"; then
4072  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4073else
4074  ac_save_IFS=$IFS; IFS=$ac_path_separator
4075ac_dummy="$PATH"
4076for ac_dir in $ac_dummy; do
4077  IFS=$ac_save_IFS
4078  test -z "$ac_dir" && ac_dir=.
4079  $as_executable_p "$ac_dir/$ac_word" || continue
4080ac_cv_prog_ac_ct_AR="ar"
4081echo "$as_me:4081: found $ac_dir/$ac_word" >&5
4082break
4083done
4084
4085  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4086fi
4087fi
4088ac_ct_AR=$ac_cv_prog_ac_ct_AR
4089if test -n "$ac_ct_AR"; then
4090  echo "$as_me:4090: result: $ac_ct_AR" >&5
4091echo "${ECHO_T}$ac_ct_AR" >&6
4092else
4093  echo "$as_me:4093: result: no" >&5
4094echo "${ECHO_T}no" >&6
4095fi
4096
4097  AR=$ac_ct_AR
4098else
4099  AR="$ac_cv_prog_AR"
4100fi
4101
4102echo "$as_me:4102: checking for options to update archives" >&5
4103echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4104if test "${cf_cv_ar_flags+set}" = set; then
4105  echo $ECHO_N "(cached) $ECHO_C" >&6
4106else
4107
4108	cf_cv_ar_flags=unknown
4109	for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4110	do
4111
4112		# check if $ARFLAGS already contains this choice
4113		if test "x$ARFLAGS" != "x" ; then
4114			cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4115			if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4116				cf_cv_ar_flags=
4117				break
4118			fi
4119		fi
4120
4121		rm -f conftest.$ac_cv_objext
4122		rm -f conftest.a
4123
4124		cat >conftest.$ac_ext <<EOF
4125#line 4125 "configure"
4126int	testdata[3] = { 123, 456, 789 };
4127EOF
4128		if { (eval echo "$as_me:4128: \"$ac_compile\"") >&5
4129  (eval $ac_compile) 2>&5
4130  ac_status=$?
4131  echo "$as_me:4131: \$? = $ac_status" >&5
4132  (exit $ac_status); } ; then
4133			echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4134			$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4135			if test -f conftest.a ; then
4136				cf_cv_ar_flags=$cf_ar_flags
4137				break
4138			fi
4139		else
4140			test -n "$verbose" && echo "	cannot compile test-program" 1>&6
4141
4142echo "${as_me:-configure}:4142: testing cannot compile test-program ..." 1>&5
4143
4144			break
4145		fi
4146	done
4147	rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4148
4149fi
4150echo "$as_me:4150: result: $cf_cv_ar_flags" >&5
4151echo "${ECHO_T}$cf_cv_ar_flags" >&6
4152
4153if test -n "$ARFLAGS" ; then
4154	if test -n "$cf_cv_ar_flags" ; then
4155		ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4156	fi
4157else
4158	ARFLAGS=$cf_cv_ar_flags
4159fi
4160
4161echo "$as_me:4161: checking if you have specified an install-prefix" >&5
4162echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4163
4164# Check whether --with-install-prefix or --without-install-prefix was given.
4165if test "${with_install_prefix+set}" = set; then
4166  withval="$with_install_prefix"
4167  case "x$withval" in #(vi
4168	xyes|xno) #(vi
4169		;;
4170	*)	DESTDIR="$withval"
4171		;;
4172	esac
4173fi;
4174echo "$as_me:4174: result: $DESTDIR" >&5
4175echo "${ECHO_T}$DESTDIR" >&6
4176
4177###############################################################################
4178
4179# If we're cross-compiling, allow the user to override the tools and their
4180# options.  The configure script is oriented toward identifying the host
4181# compiler, etc., but we need a build compiler to generate parts of the source.
4182
4183if test "$cross_compiling" = yes ; then
4184
4185	# defaults that we might want to override
4186	: ${BUILD_CFLAGS:=''}
4187	: ${BUILD_CPPFLAGS:=''}
4188	: ${BUILD_LDFLAGS:=''}
4189	: ${BUILD_LIBS:=''}
4190	: ${BUILD_EXEEXT:='$x'}
4191	: ${BUILD_OBJEXT:='o'}
4192
4193# Check whether --with-build-cc or --without-build-cc was given.
4194if test "${with_build_cc+set}" = set; then
4195  withval="$with_build_cc"
4196  BUILD_CC="$withval"
4197else
4198  for ac_prog in gcc cc cl
4199do
4200  # Extract the first word of "$ac_prog", so it can be a program name with args.
4201set dummy $ac_prog; ac_word=$2
4202echo "$as_me:4202: checking for $ac_word" >&5
4203echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4204if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4205  echo $ECHO_N "(cached) $ECHO_C" >&6
4206else
4207  if test -n "$BUILD_CC"; then
4208  ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4209else
4210  ac_save_IFS=$IFS; IFS=$ac_path_separator
4211ac_dummy="$PATH"
4212for ac_dir in $ac_dummy; do
4213  IFS=$ac_save_IFS
4214  test -z "$ac_dir" && ac_dir=.
4215  $as_executable_p "$ac_dir/$ac_word" || continue
4216ac_cv_prog_BUILD_CC="$ac_prog"
4217echo "$as_me:4217: found $ac_dir/$ac_word" >&5
4218break
4219done
4220
4221fi
4222fi
4223BUILD_CC=$ac_cv_prog_BUILD_CC
4224if test -n "$BUILD_CC"; then
4225  echo "$as_me:4225: result: $BUILD_CC" >&5
4226echo "${ECHO_T}$BUILD_CC" >&6
4227else
4228  echo "$as_me:4228: result: no" >&5
4229echo "${ECHO_T}no" >&6
4230fi
4231
4232  test -n "$BUILD_CC" && break
4233done
4234
4235fi;
4236	echo "$as_me:4236: checking for native build C compiler" >&5
4237echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4238	echo "$as_me:4238: result: $BUILD_CC" >&5
4239echo "${ECHO_T}$BUILD_CC" >&6
4240
4241	echo "$as_me:4241: checking for native build C preprocessor" >&5
4242echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4243
4244# Check whether --with-build-cpp or --without-build-cpp was given.
4245if test "${with_build_cpp+set}" = set; then
4246  withval="$with_build_cpp"
4247  BUILD_CPP="$withval"
4248else
4249  BUILD_CPP='${BUILD_CC} -E'
4250fi;
4251	echo "$as_me:4251: result: $BUILD_CPP" >&5
4252echo "${ECHO_T}$BUILD_CPP" >&6
4253
4254	echo "$as_me:4254: checking for native build C flags" >&5
4255echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4256
4257# Check whether --with-build-cflags or --without-build-cflags was given.
4258if test "${with_build_cflags+set}" = set; then
4259  withval="$with_build_cflags"
4260  BUILD_CFLAGS="$withval"
4261fi;
4262	echo "$as_me:4262: result: $BUILD_CFLAGS" >&5
4263echo "${ECHO_T}$BUILD_CFLAGS" >&6
4264
4265	echo "$as_me:4265: checking for native build C preprocessor-flags" >&5
4266echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4267
4268# Check whether --with-build-cppflags or --without-build-cppflags was given.
4269if test "${with_build_cppflags+set}" = set; then
4270  withval="$with_build_cppflags"
4271  BUILD_CPPFLAGS="$withval"
4272fi;
4273	echo "$as_me:4273: result: $BUILD_CPPFLAGS" >&5
4274echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4275
4276	echo "$as_me:4276: checking for native build linker-flags" >&5
4277echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4278
4279# Check whether --with-build-ldflags or --without-build-ldflags was given.
4280if test "${with_build_ldflags+set}" = set; then
4281  withval="$with_build_ldflags"
4282  BUILD_LDFLAGS="$withval"
4283fi;
4284	echo "$as_me:4284: result: $BUILD_LDFLAGS" >&5
4285echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4286
4287	echo "$as_me:4287: checking for native build linker-libraries" >&5
4288echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4289
4290# Check whether --with-build-libs or --without-build-libs was given.
4291if test "${with_build_libs+set}" = set; then
4292  withval="$with_build_libs"
4293  BUILD_LIBS="$withval"
4294fi;
4295	echo "$as_me:4295: result: $BUILD_LIBS" >&5
4296echo "${ECHO_T}$BUILD_LIBS" >&6
4297
4298	# this assumes we're on Unix.
4299	BUILD_EXEEXT=
4300	BUILD_OBJEXT=o
4301
4302	: ${BUILD_CC:='${CC}'}
4303
4304	if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4305		{ { echo "$as_me:4305: error: Cross-build requires two compilers.
4306Use --with-build-cc to specify the native compiler." >&5
4307echo "$as_me: error: Cross-build requires two compilers.
4308Use --with-build-cc to specify the native compiler." >&2;}
4309   { (exit 1); exit 1; }; }
4310	fi
4311
4312else
4313	: ${BUILD_CC:='${CC}'}
4314	: ${BUILD_CPP:='${CPP}'}
4315	: ${BUILD_CFLAGS:='${CFLAGS}'}
4316	: ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4317	: ${BUILD_LDFLAGS:='${LDFLAGS}'}
4318	: ${BUILD_LIBS:='${LIBS}'}
4319	: ${BUILD_EXEEXT:='$x'}
4320	: ${BUILD_OBJEXT:='o'}
4321fi
4322
4323###############################################################################
4324
4325### Options to allow the user to specify the set of libraries which are used.
4326### Use "--without-normal --with-shared" to allow the default model to be
4327### shared, for example.
4328cf_list_models=""
4329
4330echo "$as_me:4330: checking if libtool -version-number should be used" >&5
4331echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4332
4333# Check whether --enable-libtool-version or --disable-libtool-version was given.
4334if test "${enable_libtool_version+set}" = set; then
4335  enableval="$enable_libtool_version"
4336  test "$enableval" != no && enableval=yes
4337  if test "$enableval" != "yes" ; then
4338    cf_libtool_version=no
4339  else
4340    cf_libtool_version=yes
4341  fi
4342else
4343  enableval=yes
4344  cf_libtool_version=yes
4345
4346fi;
4347echo "$as_me:4347: result: $cf_libtool_version" >&5
4348echo "${ECHO_T}$cf_libtool_version" >&6
4349
4350if test "$cf_libtool_version" = yes ; then
4351	LIBTOOL_VERSION="-version-number"
4352else
4353	LIBTOOL_VERSION="-version-info"
4354fi
4355
4356LIBTOOL=
4357
4358# common library maintenance symbols that are convenient for libtool scripts:
4359LIB_CREATE='${AR} -cr'
4360LIB_OBJECT='${OBJECTS}'
4361LIB_SUFFIX=.a
4362LIB_PREP="$RANLIB"
4363
4364# symbols used to prop libtool up to enable it to determine what it should be
4365# doing:
4366LIB_CLEAN=
4367LIB_COMPILE=
4368LIB_LINK='${CC}'
4369LIB_INSTALL=
4370LIB_UNINSTALL=
4371
4372echo "$as_me:4372: checking if you want to build libraries with libtool" >&5
4373echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4374
4375# Check whether --with-libtool or --without-libtool was given.
4376if test "${with_libtool+set}" = set; then
4377  withval="$with_libtool"
4378  with_libtool=$withval
4379else
4380  with_libtool=no
4381fi;
4382echo "$as_me:4382: result: $with_libtool" >&5
4383echo "${ECHO_T}$with_libtool" >&6
4384if test "$with_libtool" != "no"; then
4385
4386	if test "$with_libtool" != "yes" ; then
4387
4388if test "x$prefix" != xNONE; then
4389  cf_path_syntax="$prefix"
4390else
4391  cf_path_syntax="$ac_default_prefix"
4392fi
4393
4394case ".$with_libtool" in #(vi
4395.\$\(*\)*|.\'*\'*) #(vi
4396  ;;
4397..|./*|.\\*) #(vi
4398  ;;
4399.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4400  ;;
4401.\${*prefix}*|.\${*dir}*) #(vi
4402  eval with_libtool="$with_libtool"
4403  case ".$with_libtool" in #(vi
4404  .NONE/*)
4405    with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4406    ;;
4407  esac
4408  ;; #(vi
4409.no|.NONE/*)
4410  with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4411  ;;
4412*)
4413  { { echo "$as_me:4413: error: expected a pathname, not \"$with_libtool\"" >&5
4414echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4415   { (exit 1); exit 1; }; }
4416  ;;
4417esac
4418
4419		LIBTOOL=$with_libtool
4420	else
4421		if test -n "$ac_tool_prefix"; then
4422  for ac_prog in libtool glibtool
4423  do
4424    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4425set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4426echo "$as_me:4426: checking for $ac_word" >&5
4427echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4428if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4429  echo $ECHO_N "(cached) $ECHO_C" >&6
4430else
4431  if test -n "$LIBTOOL"; then
4432  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4433else
4434  ac_save_IFS=$IFS; IFS=$ac_path_separator
4435ac_dummy="$PATH"
4436for ac_dir in $ac_dummy; do
4437  IFS=$ac_save_IFS
4438  test -z "$ac_dir" && ac_dir=.
4439  $as_executable_p "$ac_dir/$ac_word" || continue
4440ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4441echo "$as_me:4441: found $ac_dir/$ac_word" >&5
4442break
4443done
4444
4445fi
4446fi
4447LIBTOOL=$ac_cv_prog_LIBTOOL
4448if test -n "$LIBTOOL"; then
4449  echo "$as_me:4449: result: $LIBTOOL" >&5
4450echo "${ECHO_T}$LIBTOOL" >&6
4451else
4452  echo "$as_me:4452: result: no" >&5
4453echo "${ECHO_T}no" >&6
4454fi
4455
4456    test -n "$LIBTOOL" && break
4457  done
4458fi
4459if test -z "$LIBTOOL"; then
4460  ac_ct_LIBTOOL=$LIBTOOL
4461  for ac_prog in libtool glibtool
4462do
4463  # Extract the first word of "$ac_prog", so it can be a program name with args.
4464set dummy $ac_prog; ac_word=$2
4465echo "$as_me:4465: checking for $ac_word" >&5
4466echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4467if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4468  echo $ECHO_N "(cached) $ECHO_C" >&6
4469else
4470  if test -n "$ac_ct_LIBTOOL"; then
4471  ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4472else
4473  ac_save_IFS=$IFS; IFS=$ac_path_separator
4474ac_dummy="$PATH"
4475for ac_dir in $ac_dummy; do
4476  IFS=$ac_save_IFS
4477  test -z "$ac_dir" && ac_dir=.
4478  $as_executable_p "$ac_dir/$ac_word" || continue
4479ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4480echo "$as_me:4480: found $ac_dir/$ac_word" >&5
4481break
4482done
4483
4484fi
4485fi
4486ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4487if test -n "$ac_ct_LIBTOOL"; then
4488  echo "$as_me:4488: result: $ac_ct_LIBTOOL" >&5
4489echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4490else
4491  echo "$as_me:4491: result: no" >&5
4492echo "${ECHO_T}no" >&6
4493fi
4494
4495  test -n "$ac_ct_LIBTOOL" && break
4496done
4497test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4498
4499  LIBTOOL=$ac_ct_LIBTOOL
4500fi
4501
4502if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4503then
4504	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.].*//'`
4505else
4506	cf_cv_libtool_version=
4507fi
4508test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4509
4510		if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4511		then
4512
4513unset ac_cv_prog_ac_ct_LIBTOOL
4514unset ac_ct_LIBTOOL
4515unset LIBTOOL
4516
4517			if test -n "$ac_tool_prefix"; then
4518  for ac_prog in glibtool
4519  do
4520    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4521set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4522echo "$as_me:4522: checking for $ac_word" >&5
4523echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4524if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4525  echo $ECHO_N "(cached) $ECHO_C" >&6
4526else
4527  if test -n "$LIBTOOL"; then
4528  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4529else
4530  ac_save_IFS=$IFS; IFS=$ac_path_separator
4531ac_dummy="$PATH"
4532for ac_dir in $ac_dummy; do
4533  IFS=$ac_save_IFS
4534  test -z "$ac_dir" && ac_dir=.
4535  $as_executable_p "$ac_dir/$ac_word" || continue
4536ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4537echo "$as_me:4537: found $ac_dir/$ac_word" >&5
4538break
4539done
4540
4541fi
4542fi
4543LIBTOOL=$ac_cv_prog_LIBTOOL
4544if test -n "$LIBTOOL"; then
4545  echo "$as_me:4545: result: $LIBTOOL" >&5
4546echo "${ECHO_T}$LIBTOOL" >&6
4547else
4548  echo "$as_me:4548: result: no" >&5
4549echo "${ECHO_T}no" >&6
4550fi
4551
4552    test -n "$LIBTOOL" && break
4553  done
4554fi
4555if test -z "$LIBTOOL"; then
4556  ac_ct_LIBTOOL=$LIBTOOL
4557  for ac_prog in glibtool
4558do
4559  # Extract the first word of "$ac_prog", so it can be a program name with args.
4560set dummy $ac_prog; ac_word=$2
4561echo "$as_me:4561: checking for $ac_word" >&5
4562echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4563if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4564  echo $ECHO_N "(cached) $ECHO_C" >&6
4565else
4566  if test -n "$ac_ct_LIBTOOL"; then
4567  ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4568else
4569  ac_save_IFS=$IFS; IFS=$ac_path_separator
4570ac_dummy="$PATH"
4571for ac_dir in $ac_dummy; do
4572  IFS=$ac_save_IFS
4573  test -z "$ac_dir" && ac_dir=.
4574  $as_executable_p "$ac_dir/$ac_word" || continue
4575ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4576echo "$as_me:4576: found $ac_dir/$ac_word" >&5
4577break
4578done
4579
4580fi
4581fi
4582ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4583if test -n "$ac_ct_LIBTOOL"; then
4584  echo "$as_me:4584: result: $ac_ct_LIBTOOL" >&5
4585echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4586else
4587  echo "$as_me:4587: result: no" >&5
4588echo "${ECHO_T}no" >&6
4589fi
4590
4591  test -n "$ac_ct_LIBTOOL" && break
4592done
4593test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4594
4595  LIBTOOL=$ac_ct_LIBTOOL
4596fi
4597
4598if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4599then
4600	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.].*//'`
4601else
4602	cf_cv_libtool_version=
4603fi
4604test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4605
4606		fi
4607	fi
4608	if test -z "$LIBTOOL" ; then
4609		{ { echo "$as_me:4609: error: Cannot find libtool" >&5
4610echo "$as_me: error: Cannot find libtool" >&2;}
4611   { (exit 1); exit 1; }; }
4612	fi
4613	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4614	LIB_OBJECT='${OBJECTS:.o=.lo}'
4615	LIB_SUFFIX=.la
4616	LIB_CLEAN='${LIBTOOL} --mode=clean'
4617	LIB_COMPILE='${LIBTOOL} --mode=compile'
4618	LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4619	LIB_INSTALL='${LIBTOOL} --mode=install'
4620	LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4621	LIB_PREP=:
4622
4623if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4624then
4625	echo "$as_me:4625: checking version of $LIBTOOL" >&5
4626echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4627
4628if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4629then
4630	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.].*//'`
4631else
4632	cf_cv_libtool_version=
4633fi
4634test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4635
4636	echo "$as_me:4636: result: $cf_cv_libtool_version" >&5
4637echo "${ECHO_T}$cf_cv_libtool_version" >&6
4638	if test -z "$cf_cv_libtool_version" ; then
4639		{ { echo "$as_me:4639: error: This is not GNU libtool" >&5
4640echo "$as_me: error: This is not GNU libtool" >&2;}
4641   { (exit 1); exit 1; }; }
4642	fi
4643else
4644	{ { echo "$as_me:4644: error: GNU libtool has not been found" >&5
4645echo "$as_me: error: GNU libtool has not been found" >&2;}
4646   { (exit 1); exit 1; }; }
4647fi
4648
4649	# special hack to add -no-undefined (which libtool should do for itself)
4650	LT_UNDEF=
4651	case "$cf_cv_system_name" in #(vi
4652	cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
4653		LT_UNDEF=-no-undefined
4654		;;
4655	esac
4656
4657	# special hack to add --tag option for C++ compiler
4658	case $cf_cv_libtool_version in #(vi
4659	1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4660		LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4661		LIBTOOL="$LIBTOOL --tag=CC"
4662		;;
4663	*)
4664		LIBTOOL_CXX="$LIBTOOL"
4665		;;
4666	esac
4667else
4668	LIBTOOL=""
4669	LIBTOOL_CXX=""
4670fi
4671
4672test -z "$LIBTOOL" && ECHO_LT=
4673
4674if test "$with_libtool" != "no" ; then
4675
4676cf_list_models="$cf_list_models libtool"
4677
4678else
4679
4680echo "$as_me:4680: checking if you want to build shared libraries" >&5
4681echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4682
4683# Check whether --with-shared or --without-shared was given.
4684if test "${with_shared+set}" = set; then
4685  withval="$with_shared"
4686  with_shared=$withval
4687else
4688  with_shared=no
4689fi;
4690echo "$as_me:4690: result: $with_shared" >&5
4691echo "${ECHO_T}$with_shared" >&6
4692test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4693
4694echo "$as_me:4694: checking if you want to build static libraries" >&5
4695echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4696
4697# Check whether --with-normal or --without-normal was given.
4698if test "${with_normal+set}" = set; then
4699  withval="$with_normal"
4700  with_normal=$withval
4701else
4702  with_normal=yes
4703fi;
4704echo "$as_me:4704: result: $with_normal" >&5
4705echo "${ECHO_T}$with_normal" >&6
4706test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4707
4708echo "$as_me:4708: checking if you want to build debug libraries" >&5
4709echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4710
4711# Check whether --with-debug or --without-debug was given.
4712if test "${with_debug+set}" = set; then
4713  withval="$with_debug"
4714  with_debug=$withval
4715else
4716  with_debug=yes
4717fi;
4718echo "$as_me:4718: result: $with_debug" >&5
4719echo "${ECHO_T}$with_debug" >&6
4720test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4721
4722echo "$as_me:4722: checking if you want to build profiling libraries" >&5
4723echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4724
4725# Check whether --with-profile or --without-profile was given.
4726if test "${with_profile+set}" = set; then
4727  withval="$with_profile"
4728  with_profile=$withval
4729else
4730  with_profile=no
4731fi;
4732echo "$as_me:4732: result: $with_profile" >&5
4733echo "${ECHO_T}$with_profile" >&6
4734test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4735
4736fi
4737
4738if test "X$cf_with_cxx_binding" != Xno; then
4739if test "x$with_shared" = "xyes"; then
4740echo "$as_me:4740: checking if you want to build C++ shared libraries" >&5
4741echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4742
4743# Check whether --with-cxx-shared or --without-cxx-shared was given.
4744if test "${with_cxx_shared+set}" = set; then
4745  withval="$with_cxx_shared"
4746  with_shared_cxx=$withval
4747else
4748  with_shared_cxx=no
4749fi;
4750echo "$as_me:4750: result: $with_shared_cxx" >&5
4751echo "${ECHO_T}$with_shared_cxx" >&6
4752fi
4753fi
4754
4755###############################################################################
4756
4757echo "$as_me:4757: checking for specified models" >&5
4758echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4759test -z "$cf_list_models" && cf_list_models=normal
4760test "$with_libtool" != "no" && cf_list_models=libtool
4761echo "$as_me:4761: result: $cf_list_models" >&5
4762echo "${ECHO_T}$cf_list_models" >&6
4763
4764### Use the first model as the default, and save its suffix for use in building
4765### up test-applications.
4766echo "$as_me:4766: checking for default model" >&5
4767echo $ECHO_N "checking for default model... $ECHO_C" >&6
4768DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4769echo "$as_me:4769: result: $DFT_LWR_MODEL" >&5
4770echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4771
4772DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4773
4774TICS_NAME=tic
4775
4776TINFO_NAME=tinfo
4777
4778LIB_NAME=ncurses
4779
4780LIB_DIR=../lib
4781LIB_2ND=../../lib
4782
4783echo "$as_me:4783: checking if you want to have a library-prefix" >&5
4784echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4785
4786# Check whether --with-lib-prefix or --without-lib-prefix was given.
4787if test "${with_lib_prefix+set}" = set; then
4788  withval="$with_lib_prefix"
4789  with_lib_prefix=$withval
4790else
4791  with_lib_prefix=auto
4792fi;
4793echo "$as_me:4793: result: $with_lib_prefix" >&5
4794echo "${ECHO_T}$with_lib_prefix" >&6
4795
4796if test $with_lib_prefix = auto
4797then
4798
4799	case $cf_cv_system_name in #(vi
4800	OS/2*|os2*) #(vi
4801        LIB_PREFIX=''
4802        ;;
4803	*)	LIB_PREFIX='lib'
4804        ;;
4805	esac
4806cf_prefix=$LIB_PREFIX
4807
4808elif test $with_lib_prefix = no
4809then
4810	LIB_PREFIX=
4811else
4812	LIB_PREFIX=$with_lib_prefix
4813fi
4814
4815LIB_SUFFIX=
4816
4817	echo "$as_me:4817: checking for PATH separator" >&5
4818echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4819	case $cf_cv_system_name in
4820	os2*)	PATH_SEPARATOR=';'  ;;
4821	*)	${PATH_SEPARATOR:=':'}  ;;
4822	esac
4823
4824	echo "$as_me:4824: result: $PATH_SEPARATOR" >&5
4825echo "${ECHO_T}$PATH_SEPARATOR" >&6
4826
4827###############################################################################
4828
4829echo "$as_me:4829: checking if you want to build a separate terminfo library" >&5
4830echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4831
4832# Check whether --with-termlib or --without-termlib was given.
4833if test "${with_termlib+set}" = set; then
4834  withval="$with_termlib"
4835  with_termlib=$withval
4836else
4837  with_termlib=no
4838fi;
4839echo "$as_me:4839: result: $with_termlib" >&5
4840echo "${ECHO_T}$with_termlib" >&6
4841
4842echo "$as_me:4842: checking if you want to build a separate tic library" >&5
4843echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4844
4845# Check whether --with-ticlib or --without-ticlib was given.
4846if test "${with_ticlib+set}" = set; then
4847  withval="$with_ticlib"
4848  with_ticlib=$withval
4849else
4850  with_ticlib=no
4851fi;
4852echo "$as_me:4852: result: $with_ticlib" >&5
4853echo "${ECHO_T}$with_ticlib" >&6
4854
4855### Checks for special libraries, must be done up-front.
4856SHLIB_LIST=""
4857
4858echo "$as_me:4858: checking if you want to link with the GPM mouse library" >&5
4859echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4860
4861# Check whether --with-gpm or --without-gpm was given.
4862if test "${with_gpm+set}" = set; then
4863  withval="$with_gpm"
4864  with_gpm=$withval
4865else
4866  with_gpm=maybe
4867fi;
4868echo "$as_me:4868: result: $with_gpm" >&5
4869echo "${ECHO_T}$with_gpm" >&6
4870
4871if test "$with_gpm" != no ; then
4872	echo "$as_me:4872: checking for gpm.h" >&5
4873echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4874if test "${ac_cv_header_gpm_h+set}" = set; then
4875  echo $ECHO_N "(cached) $ECHO_C" >&6
4876else
4877  cat >conftest.$ac_ext <<_ACEOF
4878#line 4878 "configure"
4879#include "confdefs.h"
4880#include <gpm.h>
4881_ACEOF
4882if { (eval echo "$as_me:4882: \"$ac_cpp conftest.$ac_ext\"") >&5
4883  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4884  ac_status=$?
4885  egrep -v '^ *\+' conftest.er1 >conftest.err
4886  rm -f conftest.er1
4887  cat conftest.err >&5
4888  echo "$as_me:4888: \$? = $ac_status" >&5
4889  (exit $ac_status); } >/dev/null; then
4890  if test -s conftest.err; then
4891    ac_cpp_err=$ac_c_preproc_warn_flag
4892  else
4893    ac_cpp_err=
4894  fi
4895else
4896  ac_cpp_err=yes
4897fi
4898if test -z "$ac_cpp_err"; then
4899  ac_cv_header_gpm_h=yes
4900else
4901  echo "$as_me: failed program was:" >&5
4902  cat conftest.$ac_ext >&5
4903  ac_cv_header_gpm_h=no
4904fi
4905rm -f conftest.err conftest.$ac_ext
4906fi
4907echo "$as_me:4907: result: $ac_cv_header_gpm_h" >&5
4908echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4909if test $ac_cv_header_gpm_h = yes; then
4910
4911cat >>confdefs.h <<\EOF
4912#define HAVE_GPM_H 1
4913EOF
4914
4915		if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4916			test -n "$verbose" && echo "	assuming we really have GPM library" 1>&6
4917
4918echo "${as_me:-configure}:4918: testing assuming we really have GPM library ..." 1>&5
4919
4920cat >>confdefs.h <<\EOF
4921#define HAVE_LIBGPM 1
4922EOF
4923
4924		else
4925			echo "$as_me:4925: checking for Gpm_Open in -lgpm" >&5
4926echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4927if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4928  echo $ECHO_N "(cached) $ECHO_C" >&6
4929else
4930  ac_check_lib_save_LIBS=$LIBS
4931LIBS="-lgpm  $LIBS"
4932cat >conftest.$ac_ext <<_ACEOF
4933#line 4933 "configure"
4934#include "confdefs.h"
4935
4936/* Override any gcc2 internal prototype to avoid an error.  */
4937#ifdef __cplusplus
4938extern "C"
4939#endif
4940/* We use char because int might match the return type of a gcc2
4941   builtin and then its argument prototype would still apply.  */
4942char Gpm_Open ();
4943int
4944main ()
4945{
4946Gpm_Open ();
4947  ;
4948  return 0;
4949}
4950_ACEOF
4951rm -f conftest.$ac_objext conftest$ac_exeext
4952if { (eval echo "$as_me:4952: \"$ac_link\"") >&5
4953  (eval $ac_link) 2>&5
4954  ac_status=$?
4955  echo "$as_me:4955: \$? = $ac_status" >&5
4956  (exit $ac_status); } &&
4957         { ac_try='test -s conftest$ac_exeext'
4958  { (eval echo "$as_me:4958: \"$ac_try\"") >&5
4959  (eval $ac_try) 2>&5
4960  ac_status=$?
4961  echo "$as_me:4961: \$? = $ac_status" >&5
4962  (exit $ac_status); }; }; then
4963  ac_cv_lib_gpm_Gpm_Open=yes
4964else
4965  echo "$as_me: failed program was:" >&5
4966cat conftest.$ac_ext >&5
4967ac_cv_lib_gpm_Gpm_Open=no
4968fi
4969rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4970LIBS=$ac_check_lib_save_LIBS
4971fi
4972echo "$as_me:4972: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4973echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4974if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4975  :
4976else
4977
4978				{ { echo "$as_me:4978: error: Cannot link with GPM library" >&5
4979echo "$as_me: error: Cannot link with GPM library" >&2;}
4980   { (exit 1); exit 1; }; }
4981		fi
4982		with_gpm=yes
4983
4984fi
4985
4986else
4987
4988		test "$with_gpm" != maybe && { echo "$as_me:4988: WARNING: Cannot find GPM header" >&5
4989echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4990		with_gpm=no
4991
4992fi
4993
4994fi
4995
4996if test "$with_gpm" != no ; then
4997	echo "$as_me:4997: checking if you want to load GPM dynamically" >&5
4998echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4999
5000# Check whether --with-dlsym or --without-dlsym was given.
5001if test "${with_dlsym+set}" = set; then
5002  withval="$with_dlsym"
5003  with_dlsym=$withval
5004else
5005  with_dlsym=yes
5006fi;
5007	echo "$as_me:5007: result: $with_dlsym" >&5
5008echo "${ECHO_T}$with_dlsym" >&6
5009	if test "x$with_dlsym" = xyes ; then
5010
5011cf_have_dlsym=no
5012echo "$as_me:5012: checking for dlsym" >&5
5013echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5014if test "${ac_cv_func_dlsym+set}" = set; then
5015  echo $ECHO_N "(cached) $ECHO_C" >&6
5016else
5017  cat >conftest.$ac_ext <<_ACEOF
5018#line 5018 "configure"
5019#include "confdefs.h"
5020/* System header to define __stub macros and hopefully few prototypes,
5021    which can conflict with char dlsym (); below.  */
5022#include <assert.h>
5023/* Override any gcc2 internal prototype to avoid an error.  */
5024#ifdef __cplusplus
5025extern "C"
5026#endif
5027/* We use char because int might match the return type of a gcc2
5028   builtin and then its argument prototype would still apply.  */
5029char dlsym ();
5030char (*f) ();
5031
5032int
5033main ()
5034{
5035/* The GNU C library defines this for functions which it implements
5036    to always fail with ENOSYS.  Some functions are actually named
5037    something starting with __ and the normal name is an alias.  */
5038#if defined (__stub_dlsym) || defined (__stub___dlsym)
5039choke me
5040#else
5041f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5042#endif
5043
5044  ;
5045  return 0;
5046}
5047_ACEOF
5048rm -f conftest.$ac_objext conftest$ac_exeext
5049if { (eval echo "$as_me:5049: \"$ac_link\"") >&5
5050  (eval $ac_link) 2>&5
5051  ac_status=$?
5052  echo "$as_me:5052: \$? = $ac_status" >&5
5053  (exit $ac_status); } &&
5054         { ac_try='test -s conftest$ac_exeext'
5055  { (eval echo "$as_me:5055: \"$ac_try\"") >&5
5056  (eval $ac_try) 2>&5
5057  ac_status=$?
5058  echo "$as_me:5058: \$? = $ac_status" >&5
5059  (exit $ac_status); }; }; then
5060  ac_cv_func_dlsym=yes
5061else
5062  echo "$as_me: failed program was:" >&5
5063cat conftest.$ac_ext >&5
5064ac_cv_func_dlsym=no
5065fi
5066rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5067fi
5068echo "$as_me:5068: result: $ac_cv_func_dlsym" >&5
5069echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5070if test $ac_cv_func_dlsym = yes; then
5071  cf_have_dlsym=yes
5072else
5073
5074cf_have_libdl=no
5075echo "$as_me:5075: checking for dlsym in -ldl" >&5
5076echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5077if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5078  echo $ECHO_N "(cached) $ECHO_C" >&6
5079else
5080  ac_check_lib_save_LIBS=$LIBS
5081LIBS="-ldl  $LIBS"
5082cat >conftest.$ac_ext <<_ACEOF
5083#line 5083 "configure"
5084#include "confdefs.h"
5085
5086/* Override any gcc2 internal prototype to avoid an error.  */
5087#ifdef __cplusplus
5088extern "C"
5089#endif
5090/* We use char because int might match the return type of a gcc2
5091   builtin and then its argument prototype would still apply.  */
5092char dlsym ();
5093int
5094main ()
5095{
5096dlsym ();
5097  ;
5098  return 0;
5099}
5100_ACEOF
5101rm -f conftest.$ac_objext conftest$ac_exeext
5102if { (eval echo "$as_me:5102: \"$ac_link\"") >&5
5103  (eval $ac_link) 2>&5
5104  ac_status=$?
5105  echo "$as_me:5105: \$? = $ac_status" >&5
5106  (exit $ac_status); } &&
5107         { ac_try='test -s conftest$ac_exeext'
5108  { (eval echo "$as_me:5108: \"$ac_try\"") >&5
5109  (eval $ac_try) 2>&5
5110  ac_status=$?
5111  echo "$as_me:5111: \$? = $ac_status" >&5
5112  (exit $ac_status); }; }; then
5113  ac_cv_lib_dl_dlsym=yes
5114else
5115  echo "$as_me: failed program was:" >&5
5116cat conftest.$ac_ext >&5
5117ac_cv_lib_dl_dlsym=no
5118fi
5119rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5120LIBS=$ac_check_lib_save_LIBS
5121fi
5122echo "$as_me:5122: result: $ac_cv_lib_dl_dlsym" >&5
5123echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5124if test $ac_cv_lib_dl_dlsym = yes; then
5125
5126	cf_have_dlsym=yes
5127	cf_have_libdl=yes
5128fi
5129
5130fi
5131
5132if test "$cf_have_dlsym" = yes ; then
5133	test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5134
5135	echo "$as_me:5135: checking whether able to link to dl*() functions" >&5
5136echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5137	cat >conftest.$ac_ext <<_ACEOF
5138#line 5138 "configure"
5139#include "confdefs.h"
5140#include <dlfcn.h>
5141int
5142main ()
5143{
5144
5145		void *obj;
5146		if ((obj = dlopen("filename", 0)) != 0) {
5147			if (dlsym(obj, "symbolname") == 0) {
5148			dlclose(obj);
5149			}
5150		}
5151  ;
5152  return 0;
5153}
5154_ACEOF
5155rm -f conftest.$ac_objext conftest$ac_exeext
5156if { (eval echo "$as_me:5156: \"$ac_link\"") >&5
5157  (eval $ac_link) 2>&5
5158  ac_status=$?
5159  echo "$as_me:5159: \$? = $ac_status" >&5
5160  (exit $ac_status); } &&
5161         { ac_try='test -s conftest$ac_exeext'
5162  { (eval echo "$as_me:5162: \"$ac_try\"") >&5
5163  (eval $ac_try) 2>&5
5164  ac_status=$?
5165  echo "$as_me:5165: \$? = $ac_status" >&5
5166  (exit $ac_status); }; }; then
5167
5168cat >>confdefs.h <<\EOF
5169#define HAVE_LIBDL 1
5170EOF
5171
5172else
5173  echo "$as_me: failed program was:" >&5
5174cat conftest.$ac_ext >&5
5175
5176		{ { echo "$as_me:5176: error: Cannot link test program for libdl" >&5
5177echo "$as_me: error: Cannot link test program for libdl" >&2;}
5178   { (exit 1); exit 1; }; }
5179fi
5180rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5181	echo "$as_me:5181: result: ok" >&5
5182echo "${ECHO_T}ok" >&6
5183else
5184	{ { echo "$as_me:5184: error: Cannot find dlsym function" >&5
5185echo "$as_me: error: Cannot find dlsym function" >&2;}
5186   { (exit 1); exit 1; }; }
5187fi
5188
5189		if test "x$with_gpm" != xyes ; then
5190			test -n "$verbose" && echo "	assuming soname for gpm is $with_gpm" 1>&6
5191
5192echo "${as_me:-configure}:5192: testing assuming soname for gpm is $with_gpm ..." 1>&5
5193
5194			cf_cv_gpm_soname="$with_gpm"
5195		else
5196
5197echo "$as_me:5197: checking for soname of gpm library" >&5
5198echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5199if test "${cf_cv_gpm_soname+set}" = set; then
5200  echo $ECHO_N "(cached) $ECHO_C" >&6
5201else
5202
5203cf_cv_gpm_soname=unknown
5204if test "$cross_compiling" != yes ; then
5205cat >conftest.$ac_ext <<CF_EOF
5206#include <gpm.h>
5207int main()
5208{
5209if (Gpm_Open(0,0)) Gpm_Close();
5210	${cf_cv_main_return:-return}(0);
5211}
5212CF_EOF
5213cf_save_LIBS="$LIBS"
5214	LIBS="-lgpm $LIBS"
5215	if { (eval echo "$as_me:5215: \"$ac_compile\"") >&5
5216  (eval $ac_compile) 2>&5
5217  ac_status=$?
5218  echo "$as_me:5218: \$? = $ac_status" >&5
5219  (exit $ac_status); } ; then
5220		if { (eval echo "$as_me:5220: \"$ac_link\"") >&5
5221  (eval $ac_link) 2>&5
5222  ac_status=$?
5223  echo "$as_me:5223: \$? = $ac_status" >&5
5224  (exit $ac_status); } ; then
5225			cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5226			test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5227		fi
5228	fi
5229rm -rf conftest*
5230LIBS="$cf_save_LIBS"
5231fi
5232
5233fi
5234echo "$as_me:5234: result: $cf_cv_gpm_soname" >&5
5235echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5236
5237		fi
5238		test "$cf_cv_gpm_soname" != "unknown" &&
5239cat >>confdefs.h <<EOF
5240#define LIBGPM_SONAME "$cf_cv_gpm_soname"
5241EOF
5242
5243		SHLIB_LIST="-ldl $SHLIB_LIST"
5244	else
5245		SHLIB_LIST="-lgpm $SHLIB_LIST"
5246		TEST_LIBS="-lgpm $TEST_LIBS"
5247	fi
5248
5249cat >>confdefs.h <<\EOF
5250#define HAVE_LIBGPM 1
5251EOF
5252
5253echo "$as_me:5253: checking for Gpm_Wgetch in -lgpm" >&5
5254echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5255if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5256  echo $ECHO_N "(cached) $ECHO_C" >&6
5257else
5258  ac_check_lib_save_LIBS=$LIBS
5259LIBS="-lgpm  $LIBS"
5260cat >conftest.$ac_ext <<_ACEOF
5261#line 5261 "configure"
5262#include "confdefs.h"
5263
5264/* Override any gcc2 internal prototype to avoid an error.  */
5265#ifdef __cplusplus
5266extern "C"
5267#endif
5268/* We use char because int might match the return type of a gcc2
5269   builtin and then its argument prototype would still apply.  */
5270char Gpm_Wgetch ();
5271int
5272main ()
5273{
5274Gpm_Wgetch ();
5275  ;
5276  return 0;
5277}
5278_ACEOF
5279rm -f conftest.$ac_objext conftest$ac_exeext
5280if { (eval echo "$as_me:5280: \"$ac_link\"") >&5
5281  (eval $ac_link) 2>&5
5282  ac_status=$?
5283  echo "$as_me:5283: \$? = $ac_status" >&5
5284  (exit $ac_status); } &&
5285         { ac_try='test -s conftest$ac_exeext'
5286  { (eval echo "$as_me:5286: \"$ac_try\"") >&5
5287  (eval $ac_try) 2>&5
5288  ac_status=$?
5289  echo "$as_me:5289: \$? = $ac_status" >&5
5290  (exit $ac_status); }; }; then
5291  ac_cv_lib_gpm_Gpm_Wgetch=yes
5292else
5293  echo "$as_me: failed program was:" >&5
5294cat conftest.$ac_ext >&5
5295ac_cv_lib_gpm_Gpm_Wgetch=no
5296fi
5297rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5298LIBS=$ac_check_lib_save_LIBS
5299fi
5300echo "$as_me:5300: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5301echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5302if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5303
5304echo "$as_me:5304: checking if GPM is weakly bound to curses library" >&5
5305echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5306if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5307  echo $ECHO_N "(cached) $ECHO_C" >&6
5308else
5309
5310cf_cv_check_gpm_wgetch=unknown
5311if test "$cross_compiling" != yes ; then
5312
5313cat >conftest.$ac_ext <<CF_EOF
5314#include <gpm.h>
5315int main()
5316{
5317	Gpm_Wgetch();
5318	${cf_cv_main_return:-return}(0);
5319}
5320CF_EOF
5321
5322	cf_save_LIBS="$LIBS"
5323	# This only works if we can look at the symbol table.  If a shared
5324	# library is stripped for install, we cannot use that.  So we're forced
5325	# to rely on the static library, noting that some packagers may not
5326	# include it.
5327	LIBS="-static -lgpm -dynamic $LIBS"
5328	if { (eval echo "$as_me:5328: \"$ac_compile\"") >&5
5329  (eval $ac_compile) 2>&5
5330  ac_status=$?
5331  echo "$as_me:5331: \$? = $ac_status" >&5
5332  (exit $ac_status); } ; then
5333		if { (eval echo "$as_me:5333: \"$ac_link\"") >&5
5334  (eval $ac_link) 2>&5
5335  ac_status=$?
5336  echo "$as_me:5336: \$? = $ac_status" >&5
5337  (exit $ac_status); } ; then
5338			cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5339			test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5340			test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5341		fi
5342	fi
5343	rm -rf conftest*
5344	LIBS="$cf_save_LIBS"
5345fi
5346
5347fi
5348echo "$as_me:5348: result: $cf_cv_check_gpm_wgetch" >&5
5349echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5350
5351if test "$cf_cv_check_gpm_wgetch" != yes ; then
5352	{ echo "$as_me:5352: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5353echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5354fi
5355
5356fi
5357
5358fi
5359
5360# not everyone has "test -c"
5361if test -c /dev/sysmouse 2>/dev/null ; then
5362echo "$as_me:5362: checking if you want to use sysmouse" >&5
5363echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5364
5365# Check whether --with-sysmouse or --without-sysmouse was given.
5366if test "${with_sysmouse+set}" = set; then
5367  withval="$with_sysmouse"
5368  cf_with_sysmouse=$withval
5369else
5370  cf_with_sysmouse=maybe
5371fi;
5372	if test "$cf_with_sysmouse" != no ; then
5373	cat >conftest.$ac_ext <<_ACEOF
5374#line 5374 "configure"
5375#include "confdefs.h"
5376
5377#include <osreldate.h>
5378#if (__FreeBSD_version >= 400017)
5379#include <sys/consio.h>
5380#include <sys/fbio.h>
5381#else
5382#include <machine/console.h>
5383#endif
5384
5385int
5386main ()
5387{
5388
5389	struct mouse_info the_mouse;
5390	ioctl(0, CONS_MOUSECTL, &the_mouse);
5391
5392  ;
5393  return 0;
5394}
5395_ACEOF
5396rm -f conftest.$ac_objext
5397if { (eval echo "$as_me:5397: \"$ac_compile\"") >&5
5398  (eval $ac_compile) 2>&5
5399  ac_status=$?
5400  echo "$as_me:5400: \$? = $ac_status" >&5
5401  (exit $ac_status); } &&
5402         { ac_try='test -s conftest.$ac_objext'
5403  { (eval echo "$as_me:5403: \"$ac_try\"") >&5
5404  (eval $ac_try) 2>&5
5405  ac_status=$?
5406  echo "$as_me:5406: \$? = $ac_status" >&5
5407  (exit $ac_status); }; }; then
5408  cf_with_sysmouse=yes
5409else
5410  echo "$as_me: failed program was:" >&5
5411cat conftest.$ac_ext >&5
5412cf_with_sysmouse=no
5413fi
5414rm -f conftest.$ac_objext conftest.$ac_ext
5415	fi
5416echo "$as_me:5416: result: $cf_with_sysmouse" >&5
5417echo "${ECHO_T}$cf_with_sysmouse" >&6
5418test "$cf_with_sysmouse" = yes &&
5419cat >>confdefs.h <<\EOF
5420#define USE_SYSMOUSE 1
5421EOF
5422
5423fi
5424
5425if test X"$CC_G_OPT" = X"" ; then
5426	CC_G_OPT='-g'
5427	test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5428fi
5429
5430if test X"$CXX_G_OPT" = X"" ; then
5431	CXX_G_OPT='-g'
5432	test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5433fi
5434
5435echo "$as_me:5435: checking for default loader flags" >&5
5436echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5437case $DFT_LWR_MODEL in
5438libtool) LD_MODEL=''   ;;
5439normal)  LD_MODEL=''   ;;
5440debug)   LD_MODEL=$CC_G_OPT ;;
5441profile) LD_MODEL='-pg';;
5442shared)  LD_MODEL=''   ;;
5443esac
5444echo "$as_me:5444: result: $LD_MODEL" >&5
5445echo "${ECHO_T}$LD_MODEL" >&6
5446
5447case $DFT_LWR_MODEL in
5448shared)
5449
5450echo "$as_me:5450: checking if rpath option should be used" >&5
5451echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5452
5453# Check whether --enable-rpath or --disable-rpath was given.
5454if test "${enable_rpath+set}" = set; then
5455  enableval="$enable_rpath"
5456  cf_cv_enable_rpath=$enableval
5457else
5458  cf_cv_enable_rpath=no
5459fi;
5460echo "$as_me:5460: result: $cf_cv_enable_rpath" >&5
5461echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5462
5463echo "$as_me:5463: checking if shared libraries should be relinked during install" >&5
5464echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5465
5466# Check whether --enable-relink or --disable-relink was given.
5467if test "${enable_relink+set}" = set; then
5468  enableval="$enable_relink"
5469  cf_cv_do_relink=$enableval
5470else
5471  cf_cv_do_relink=yes
5472fi;
5473echo "$as_me:5473: result: $cf_cv_do_relink" >&5
5474echo "${ECHO_T}$cf_cv_do_relink" >&6
5475	;;
5476esac
5477
5478# we will build libraries one-level down.
5479rel_builddir=..
5480
5481LD_RPATH_OPT=
5482echo "$as_me:5482: checking for an rpath option" >&5
5483echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5484case $cf_cv_system_name in #(vi
5485irix*) #(vi
5486	if test "$GCC" = yes; then
5487		LD_RPATH_OPT="-Wl,-rpath,"
5488	else
5489		LD_RPATH_OPT="-rpath "
5490	fi
5491	;;
5492linux*|gnu*|k*bsd*-gnu) #(vi
5493	LD_RPATH_OPT="-Wl,-rpath,"
5494	;;
5495openbsd[2-9].*|mirbsd*) #(vi
5496	LD_RPATH_OPT="-Wl,-rpath,"
5497	;;
5498dragonfly*|freebsd*) #(vi
5499	LD_RPATH_OPT="-rpath "
5500	;;
5501netbsd*) #(vi
5502	LD_RPATH_OPT="-Wl,-rpath,"
5503	;;
5504osf*|mls+*) #(vi
5505	LD_RPATH_OPT="-rpath "
5506	;;
5507solaris2*) #(vi
5508	LD_RPATH_OPT="-R"
5509	;;
5510*)
5511	;;
5512esac
5513echo "$as_me:5513: result: $LD_RPATH_OPT" >&5
5514echo "${ECHO_T}$LD_RPATH_OPT" >&6
5515
5516case "x$LD_RPATH_OPT" in #(vi
5517x-R*)
5518	echo "$as_me:5518: checking if we need a space after rpath option" >&5
5519echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5520	cf_save_LIBS="$LIBS"
5521	LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5522	cat >conftest.$ac_ext <<_ACEOF
5523#line 5523 "configure"
5524#include "confdefs.h"
5525
5526int
5527main ()
5528{
5529
5530  ;
5531  return 0;
5532}
5533_ACEOF
5534rm -f conftest.$ac_objext conftest$ac_exeext
5535if { (eval echo "$as_me:5535: \"$ac_link\"") >&5
5536  (eval $ac_link) 2>&5
5537  ac_status=$?
5538  echo "$as_me:5538: \$? = $ac_status" >&5
5539  (exit $ac_status); } &&
5540         { ac_try='test -s conftest$ac_exeext'
5541  { (eval echo "$as_me:5541: \"$ac_try\"") >&5
5542  (eval $ac_try) 2>&5
5543  ac_status=$?
5544  echo "$as_me:5544: \$? = $ac_status" >&5
5545  (exit $ac_status); }; }; then
5546  cf_rpath_space=no
5547else
5548  echo "$as_me: failed program was:" >&5
5549cat conftest.$ac_ext >&5
5550cf_rpath_space=yes
5551fi
5552rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5553	LIBS="$cf_save_LIBS"
5554	echo "$as_me:5554: result: $cf_rpath_space" >&5
5555echo "${ECHO_T}$cf_rpath_space" >&6
5556	test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5557	;;
5558esac
5559
5560	RM_SHARED_OPTS=
5561	LOCAL_LDFLAGS=
5562	LOCAL_LDFLAGS2=
5563	LD_SHARED_OPTS=
5564	INSTALL_LIB="-m 644"
5565	: ${rel_builddir:=.}
5566
5567	shlibdir=$libdir
5568
5569	MAKE_DLLS="#"
5570
5571	cf_cv_do_symlinks=no
5572	cf_ld_rpath_opt=
5573	test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5574
5575	echo "$as_me:5575: checking if release/abi version should be used for shared libs" >&5
5576echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5577
5578# Check whether --with-shlib-version or --without-shlib-version was given.
5579if test "${with_shlib_version+set}" = set; then
5580  withval="$with_shlib_version"
5581  test -z "$withval" && withval=auto
5582	case $withval in #(vi
5583	yes) #(vi
5584		cf_cv_shlib_version=auto
5585		;;
5586	rel|abi|auto|no) #(vi
5587		cf_cv_shlib_version=$withval
5588		;;
5589	*)
5590		{ { echo "$as_me:5590: error: option value must be one of: rel, abi, auto or no" >&5
5591echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5592   { (exit 1); exit 1; }; }
5593		;;
5594	esac
5595
5596else
5597  cf_cv_shlib_version=auto
5598fi;
5599	echo "$as_me:5599: result: $cf_cv_shlib_version" >&5
5600echo "${ECHO_T}$cf_cv_shlib_version" >&6
5601
5602	cf_cv_rm_so_locs=no
5603	cf_try_cflags=
5604
5605	# Some less-capable ports of gcc support only -fpic
5606	CC_SHARED_OPTS=
5607	if test "$GCC" = yes
5608	then
5609		echo "$as_me:5609: checking which $CC option to use" >&5
5610echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5611		cf_save_CFLAGS="$CFLAGS"
5612		for CC_SHARED_OPTS in -fPIC -fpic ''
5613		do
5614			CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5615			cat >conftest.$ac_ext <<_ACEOF
5616#line 5616 "configure"
5617#include "confdefs.h"
5618#include <stdio.h>
5619int
5620main ()
5621{
5622int x = 1
5623  ;
5624  return 0;
5625}
5626_ACEOF
5627rm -f conftest.$ac_objext
5628if { (eval echo "$as_me:5628: \"$ac_compile\"") >&5
5629  (eval $ac_compile) 2>&5
5630  ac_status=$?
5631  echo "$as_me:5631: \$? = $ac_status" >&5
5632  (exit $ac_status); } &&
5633         { ac_try='test -s conftest.$ac_objext'
5634  { (eval echo "$as_me:5634: \"$ac_try\"") >&5
5635  (eval $ac_try) 2>&5
5636  ac_status=$?
5637  echo "$as_me:5637: \$? = $ac_status" >&5
5638  (exit $ac_status); }; }; then
5639  break
5640else
5641  echo "$as_me: failed program was:" >&5
5642cat conftest.$ac_ext >&5
5643fi
5644rm -f conftest.$ac_objext conftest.$ac_ext
5645		done
5646		echo "$as_me:5646: result: $CC_SHARED_OPTS" >&5
5647echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5648		CFLAGS="$cf_save_CFLAGS"
5649	fi
5650
5651	cf_cv_shlib_version_infix=no
5652
5653	case $cf_cv_system_name in #(vi
5654	aix4.3-9*|aix[5-7]*) #(vi
5655		if test "$GCC" = yes; then
5656			CC_SHARED_OPTS=
5657			MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5658		else
5659			# CC_SHARED_OPTS='-qpic=large -G'
5660			# perhaps "-bM:SRE -bnoentry -bexpall"
5661			MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5662		fi
5663		;;
5664	beos*) #(vi
5665		MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5666		;;
5667	cygwin*) #(vi
5668		CC_SHARED_OPTS=
5669		MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5670		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5671		cf_cv_shlib_version=cygdll
5672		cf_cv_shlib_version_infix=cygdll
5673		shlibdir=$bindir
5674		MAKE_DLLS=
5675		cat >mk_shared_lib.sh <<-CF_EOF
5676		#!/bin/sh
5677		SHARED_LIB=\$1
5678		IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5679		shift
5680		cat <<-EOF
5681		Linking shared library
5682		** SHARED_LIB \$SHARED_LIB
5683		** IMPORT_LIB \$IMPORT_LIB
5684EOF
5685		exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5686CF_EOF
5687		chmod +x mk_shared_lib.sh
5688		;;
5689	msys*) #(vi
5690		CC_SHARED_OPTS=
5691		MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5692		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5693		cf_cv_shlib_version=msysdll
5694		cf_cv_shlib_version_infix=msysdll
5695		shlibdir=$bindir
5696		MAKE_DLLS=
5697		cat >mk_shared_lib.sh <<-CF_EOF
5698		#!/bin/sh
5699		SHARED_LIB=\$1
5700		IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5701		shift
5702		cat <<-EOF
5703		Linking shared library
5704		** SHARED_LIB \$SHARED_LIB
5705		** IMPORT_LIB \$IMPORT_LIB
5706EOF
5707		exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5708CF_EOF
5709		chmod +x mk_shared_lib.sh
5710		;;
5711	darwin*) #(vi
5712		cf_try_cflags="no-cpp-precomp"
5713		CC_SHARED_OPTS="-dynamic"
5714		MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5715		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5716		cf_cv_shlib_version_infix=yes
5717		echo "$as_me:5717: checking if ld -search_paths_first works" >&5
5718echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5719if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5720  echo $ECHO_N "(cached) $ECHO_C" >&6
5721else
5722
5723			cf_save_LDFLAGS=$LDFLAGS
5724			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5725			cat >conftest.$ac_ext <<_ACEOF
5726#line 5726 "configure"
5727#include "confdefs.h"
5728
5729int
5730main ()
5731{
5732int i;
5733  ;
5734  return 0;
5735}
5736_ACEOF
5737rm -f conftest.$ac_objext conftest$ac_exeext
5738if { (eval echo "$as_me:5738: \"$ac_link\"") >&5
5739  (eval $ac_link) 2>&5
5740  ac_status=$?
5741  echo "$as_me:5741: \$? = $ac_status" >&5
5742  (exit $ac_status); } &&
5743         { ac_try='test -s conftest$ac_exeext'
5744  { (eval echo "$as_me:5744: \"$ac_try\"") >&5
5745  (eval $ac_try) 2>&5
5746  ac_status=$?
5747  echo "$as_me:5747: \$? = $ac_status" >&5
5748  (exit $ac_status); }; }; then
5749  cf_cv_ldflags_search_paths_first=yes
5750else
5751  echo "$as_me: failed program was:" >&5
5752cat conftest.$ac_ext >&5
5753cf_cv_ldflags_search_paths_first=no
5754fi
5755rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5756				LDFLAGS=$cf_save_LDFLAGS
5757fi
5758echo "$as_me:5758: result: $cf_cv_ldflags_search_paths_first" >&5
5759echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5760		if test $cf_cv_ldflags_search_paths_first = yes; then
5761			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5762		fi
5763		;;
5764	hpux[7-8]*) #(vi
5765		# HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5766		if test "$GCC" != yes; then
5767			CC_SHARED_OPTS='+Z'
5768		fi
5769		MK_SHARED_LIB='${LD} -b -o $@'
5770		INSTALL_LIB="-m 555"
5771		;;
5772	hpux*) #(vi
5773		# (tested with gcc 2.7.2 -- I don't have c89)
5774		if test "$GCC" = yes; then
5775			LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5776		else
5777			CC_SHARED_OPTS='+Z'
5778			LD_SHARED_OPTS='-Wl,+b,${libdir}'
5779		fi
5780		MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5781		# HP-UX shared libraries must be executable, and should be
5782		# readonly to exploit a quirk in the memory manager.
5783		INSTALL_LIB="-m 555"
5784		;;
5785	interix*)
5786		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5787		if test "$cf_cv_shlib_version" = rel; then
5788			cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5789		else
5790			cf_shared_soname='`basename `'
5791		fi
5792		CC_SHARED_OPTS=
5793		MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5794		;;
5795	irix*) #(vi
5796		if test "$cf_cv_enable_rpath" = yes ; then
5797			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5798		fi
5799		# tested with IRIX 5.2 and 'cc'.
5800		if test "$GCC" != yes; then
5801			CC_SHARED_OPTS='-KPIC'
5802			MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5803		else
5804			MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5805		fi
5806		cf_cv_rm_so_locs=yes
5807		;;
5808	linux*|gnu*|k*bsd*-gnu) #(vi
5809		if test "$DFT_LWR_MODEL" = "shared" ; then
5810			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5811			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5812		fi
5813		if test "$cf_cv_enable_rpath" = yes ; then
5814			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5815		fi
5816
5817	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5818	if test "$cf_cv_shlib_version" = rel; then
5819		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5820	else
5821		cf_cv_shared_soname='`basename $@`'
5822	fi
5823
5824		MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5825		;;
5826	mingw*) #(vi
5827		cf_cv_shlib_version=mingw
5828		cf_cv_shlib_version_infix=mingw
5829		shlibdir=$bindir
5830		MAKE_DLLS=
5831		if test "$DFT_LWR_MODEL" = "shared" ; then
5832			LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5833			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5834			EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5835		fi
5836		CC_SHARED_OPTS=
5837		MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5838		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5839		cat >mk_shared_lib.sh <<-CF_EOF
5840		#!/bin/sh
5841		SHARED_LIB=\$1
5842		IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5843		shift
5844		cat <<-EOF
5845		Linking shared library
5846		** SHARED_LIB \$SHARED_LIB
5847		** IMPORT_LIB \$IMPORT_LIB
5848EOF
5849		exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5850CF_EOF
5851		chmod +x mk_shared_lib.sh
5852		;;
5853	openbsd[2-9].*|mirbsd*) #(vi
5854		if test "$DFT_LWR_MODEL" = "shared" ; then
5855			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5856			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5857		fi
5858		if test "$cf_cv_enable_rpath" = yes ; then
5859			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5860		fi
5861		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5862
5863	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5864	if test "$cf_cv_shlib_version" = rel; then
5865		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5866	else
5867		cf_cv_shared_soname='`basename $@`'
5868	fi
5869
5870		MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5871		;;
5872	nto-qnx*|openbsd*|freebsd[12].*) #(vi
5873		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5874		MK_SHARED_LIB='${LD} -Bshareable -o $@'
5875		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5876		;;
5877	dragonfly*|freebsd*) #(vi
5878		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5879		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5880			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5881			LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5882			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5883		fi
5884
5885	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5886	if test "$cf_cv_shlib_version" = rel; then
5887		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5888	else
5889		cf_cv_shared_soname='`basename $@`'
5890	fi
5891
5892		MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5893		;;
5894	netbsd*) #(vi
5895		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5896		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5897			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5898			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5899			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5900			if test "$cf_cv_shlib_version" = auto; then
5901			if test -f /usr/libexec/ld.elf_so; then
5902				cf_cv_shlib_version=abi
5903			else
5904				cf_cv_shlib_version=rel
5905			fi
5906			fi
5907
5908	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5909	if test "$cf_cv_shlib_version" = rel; then
5910		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5911	else
5912		cf_cv_shared_soname='`basename $@`'
5913	fi
5914
5915			MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5916		else
5917			MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
5918		fi
5919		;;
5920	osf*|mls+*) #(vi
5921		# tested with OSF/1 V3.2 and 'cc'
5922		# tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5923		# link with shared libs).
5924		MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5925		case $host_os in #(vi
5926		osf4*)
5927			MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5928			;;
5929		esac
5930		MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5931		if test "$DFT_LWR_MODEL" = "shared" ; then
5932			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5933			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5934		fi
5935		cf_cv_rm_so_locs=yes
5936		;;
5937	sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5938		# tested with osr5.0.5
5939		if test "$GCC" != yes; then
5940			CC_SHARED_OPTS='-belf -KPIC'
5941		fi
5942		MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5943		if test "$cf_cv_enable_rpath" = yes ; then
5944			# only way is to set LD_RUN_PATH but no switch for it
5945			RUN_PATH=$libdir
5946		fi
5947		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5948		LINK_PROGS='LD_RUN_PATH=${libdir}'
5949		LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5950		;;
5951	sunos4*) #(vi
5952		# tested with SunOS 4.1.1 and gcc 2.7.0
5953		if test "$GCC" != yes; then
5954			CC_SHARED_OPTS='-KPIC'
5955		fi
5956		MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5957		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5958		;;
5959	solaris2*) #(vi
5960		# tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5961		# tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5962		if test "$DFT_LWR_MODEL" = "shared" ; then
5963			LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5964			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5965		fi
5966		if test "$cf_cv_enable_rpath" = yes ; then
5967			EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5968		fi
5969
5970	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5971	if test "$cf_cv_shlib_version" = rel; then
5972		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5973	else
5974		cf_cv_shared_soname='`basename $@`'
5975	fi
5976
5977		if test "$GCC" != yes; then
5978			cf_save_CFLAGS="$CFLAGS"
5979			for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5980			do
5981				CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5982				cat >conftest.$ac_ext <<_ACEOF
5983#line 5983 "configure"
5984#include "confdefs.h"
5985#include <stdio.h>
5986int
5987main ()
5988{
5989printf("Hello\n");
5990  ;
5991  return 0;
5992}
5993_ACEOF
5994rm -f conftest.$ac_objext
5995if { (eval echo "$as_me:5995: \"$ac_compile\"") >&5
5996  (eval $ac_compile) 2>&5
5997  ac_status=$?
5998  echo "$as_me:5998: \$? = $ac_status" >&5
5999  (exit $ac_status); } &&
6000         { ac_try='test -s conftest.$ac_objext'
6001  { (eval echo "$as_me:6001: \"$ac_try\"") >&5
6002  (eval $ac_try) 2>&5
6003  ac_status=$?
6004  echo "$as_me:6004: \$? = $ac_status" >&5
6005  (exit $ac_status); }; }; then
6006  break
6007else
6008  echo "$as_me: failed program was:" >&5
6009cat conftest.$ac_ext >&5
6010fi
6011rm -f conftest.$ac_objext conftest.$ac_ext
6012			done
6013			CFLAGS="$cf_save_CFLAGS"
6014			CC_SHARED_OPTS=$cf_shared_opts
6015			MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6016		else
6017			MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6018		fi
6019		;;
6020	sysv5uw7*|unix_sv*) #(vi
6021		# tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6022		if test "$GCC" != yes; then
6023			CC_SHARED_OPTS='-KPIC'
6024		fi
6025		MK_SHARED_LIB='${LD} -d y -G -o $@'
6026		;;
6027	*)
6028		CC_SHARED_OPTS='unknown'
6029		MK_SHARED_LIB='echo unknown'
6030		;;
6031	esac
6032
6033	# This works if the last tokens in $MK_SHARED_LIB are the -o target.
6034	case "$cf_cv_shlib_version" in #(vi
6035	rel|abi)
6036		case "$MK_SHARED_LIB" in #(vi
6037		*'-o $@') #(vi
6038			test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6039			;;
6040		*)
6041			{ echo "$as_me:6041: WARNING: ignored --with-shlib-version" >&5
6042echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6043			;;
6044		esac
6045		;;
6046	esac
6047
6048	if test -n "$cf_try_cflags"
6049	then
6050cat > conftest.$ac_ext <<EOF
6051#line 6051 "${as_me:-configure}"
6052#include <stdio.h>
6053int main(int argc, char *argv[])
6054{
6055	printf("hello\n");
6056	return (argv[argc-1] == 0) ;
6057}
6058EOF
6059		cf_save_CFLAGS="$CFLAGS"
6060		for cf_opt in $cf_try_cflags
6061		do
6062			CFLAGS="$cf_save_CFLAGS -$cf_opt"
6063			echo "$as_me:6063: checking if CFLAGS option -$cf_opt works" >&5
6064echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6065			if { (eval echo "$as_me:6065: \"$ac_compile\"") >&5
6066  (eval $ac_compile) 2>&5
6067  ac_status=$?
6068  echo "$as_me:6068: \$? = $ac_status" >&5
6069  (exit $ac_status); }; then
6070				echo "$as_me:6070: result: yes" >&5
6071echo "${ECHO_T}yes" >&6
6072				cf_save_CFLAGS="$CFLAGS"
6073			else
6074				echo "$as_me:6074: result: no" >&5
6075echo "${ECHO_T}no" >&6
6076			fi
6077		done
6078		CFLAGS="$cf_save_CFLAGS"
6079	fi
6080
6081	# RPATH_LIST is a colon-separated list of directories
6082	test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6083	test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6084
6085	test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6086
6087	test -n "$verbose" && echo "	CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6088
6089echo "${as_me:-configure}:6089: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6090
6091	test -n "$verbose" && echo "	MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6092
6093echo "${as_me:-configure}:6093: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6094
6095if test "$CC_SHARED_OPTS" = "unknown"; then
6096	for model in $cf_list_models; do
6097		if test "$model" = "shared"; then
6098			{ { echo "$as_me:6098: error: Shared libraries are not supported in this version" >&5
6099echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6100   { (exit 1); exit 1; }; }
6101		fi
6102	done
6103fi
6104
6105### If we're building with rpath, try to link non-standard libs that way too.
6106if test "$DFT_LWR_MODEL" = "shared"; then
6107
6108echo "$as_me:6108: checking if rpath-hack should be disabled" >&5
6109echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6110
6111# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6112if test "${enable_rpath_hack+set}" = set; then
6113  enableval="$enable_rpath_hack"
6114  test "$enableval" != no && enableval=yes
6115  if test "$enableval" != "yes" ; then
6116    cf_disable_rpath_hack=yes
6117  else
6118    cf_disable_rpath_hack=no
6119  fi
6120else
6121  enableval=yes
6122  cf_disable_rpath_hack=no
6123
6124fi;
6125echo "$as_me:6125: result: $cf_disable_rpath_hack" >&5
6126echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6127if test "$cf_disable_rpath_hack" = no ; then
6128
6129echo "$as_me:6129: checking for updated LDFLAGS" >&5
6130echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6131if test -n "$LD_RPATH_OPT" ; then
6132	echo "$as_me:6132: result: maybe" >&5
6133echo "${ECHO_T}maybe" >&6
6134
6135	for ac_prog in ldd
6136do
6137  # Extract the first word of "$ac_prog", so it can be a program name with args.
6138set dummy $ac_prog; ac_word=$2
6139echo "$as_me:6139: checking for $ac_word" >&5
6140echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6141if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6142  echo $ECHO_N "(cached) $ECHO_C" >&6
6143else
6144  if test -n "$cf_ldd_prog"; then
6145  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6146else
6147  ac_save_IFS=$IFS; IFS=$ac_path_separator
6148ac_dummy="$PATH"
6149for ac_dir in $ac_dummy; do
6150  IFS=$ac_save_IFS
6151  test -z "$ac_dir" && ac_dir=.
6152  $as_executable_p "$ac_dir/$ac_word" || continue
6153ac_cv_prog_cf_ldd_prog="$ac_prog"
6154echo "$as_me:6154: found $ac_dir/$ac_word" >&5
6155break
6156done
6157
6158fi
6159fi
6160cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6161if test -n "$cf_ldd_prog"; then
6162  echo "$as_me:6162: result: $cf_ldd_prog" >&5
6163echo "${ECHO_T}$cf_ldd_prog" >&6
6164else
6165  echo "$as_me:6165: result: no" >&5
6166echo "${ECHO_T}no" >&6
6167fi
6168
6169  test -n "$cf_ldd_prog" && break
6170done
6171test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6172
6173	cf_rpath_list="/usr/lib /lib"
6174	if test "$cf_ldd_prog" != no
6175	then
6176		cf_rpath_oops=
6177
6178cat >conftest.$ac_ext <<_ACEOF
6179#line 6179 "configure"
6180#include "confdefs.h"
6181#include <stdio.h>
6182int
6183main ()
6184{
6185printf("Hello");
6186  ;
6187  return 0;
6188}
6189_ACEOF
6190rm -f conftest.$ac_objext conftest$ac_exeext
6191if { (eval echo "$as_me:6191: \"$ac_link\"") >&5
6192  (eval $ac_link) 2>&5
6193  ac_status=$?
6194  echo "$as_me:6194: \$? = $ac_status" >&5
6195  (exit $ac_status); } &&
6196         { ac_try='test -s conftest$ac_exeext'
6197  { (eval echo "$as_me:6197: \"$ac_try\"") >&5
6198  (eval $ac_try) 2>&5
6199  ac_status=$?
6200  echo "$as_me:6200: \$? = $ac_status" >&5
6201  (exit $ac_status); }; }; then
6202  cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6203		 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6204else
6205  echo "$as_me: failed program was:" >&5
6206cat conftest.$ac_ext >&5
6207fi
6208rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6209
6210		# If we passed the link-test, but get a "not found" on a given library,
6211		# this could be due to inept reconfiguration of gcc to make it only
6212		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6213		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
6214		# /usr/local libraries.
6215		if test -n "$cf_rpath_oops"
6216		then
6217			for cf_rpath_src in $cf_rpath_oops
6218			do
6219				for cf_rpath_dir in \
6220					/usr/local \
6221					/usr/pkg \
6222					/opt/sfw
6223				do
6224					if test -f $cf_rpath_dir/lib/$cf_rpath_src
6225					then
6226						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6227
6228echo "${as_me:-configure}:6228: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6229
6230						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6231						break
6232					fi
6233				done
6234			done
6235		fi
6236	fi
6237
6238	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6239
6240echo "${as_me:-configure}:6240: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6241
6242test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
6243
6244echo "${as_me:-configure}:6244: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6245
6246cf_rpath_dst=
6247for cf_rpath_src in $LDFLAGS
6248do
6249	case $cf_rpath_src in #(vi
6250	-L*) #(vi
6251
6252		# check if this refers to a directory which we will ignore
6253		cf_rpath_skip=no
6254		if test -n "$cf_rpath_list"
6255		then
6256			for cf_rpath_item in $cf_rpath_list
6257			do
6258				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6259				then
6260					cf_rpath_skip=yes
6261					break
6262				fi
6263			done
6264		fi
6265
6266		if test "$cf_rpath_skip" = no
6267		then
6268			# transform the option
6269			if test "$LD_RPATH_OPT" = "-R " ; then
6270				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6271			else
6272				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6273			fi
6274
6275			# if we have not already added this, add it now
6276			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6277			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6278			then
6279				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6280
6281echo "${as_me:-configure}:6281: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6282
6283				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6284			fi
6285		fi
6286		;;
6287	esac
6288	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6289done
6290LDFLAGS=$cf_rpath_dst
6291
6292test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
6293
6294echo "${as_me:-configure}:6294: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6295
6296test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
6297
6298echo "${as_me:-configure}:6298: testing ...checking LIBS $LIBS ..." 1>&5
6299
6300cf_rpath_dst=
6301for cf_rpath_src in $LIBS
6302do
6303	case $cf_rpath_src in #(vi
6304	-L*) #(vi
6305
6306		# check if this refers to a directory which we will ignore
6307		cf_rpath_skip=no
6308		if test -n "$cf_rpath_list"
6309		then
6310			for cf_rpath_item in $cf_rpath_list
6311			do
6312				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6313				then
6314					cf_rpath_skip=yes
6315					break
6316				fi
6317			done
6318		fi
6319
6320		if test "$cf_rpath_skip" = no
6321		then
6322			# transform the option
6323			if test "$LD_RPATH_OPT" = "-R " ; then
6324				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6325			else
6326				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6327			fi
6328
6329			# if we have not already added this, add it now
6330			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6331			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6332			then
6333				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6334
6335echo "${as_me:-configure}:6335: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6336
6337				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6338			fi
6339		fi
6340		;;
6341	esac
6342	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6343done
6344LIBS=$cf_rpath_dst
6345
6346test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
6347
6348echo "${as_me:-configure}:6348: testing ...checked LIBS $LIBS ..." 1>&5
6349
6350	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6351
6352echo "${as_me:-configure}:6352: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6353
6354else
6355	echo "$as_me:6355: result: no" >&5
6356echo "${ECHO_T}no" >&6
6357fi
6358
6359fi
6360
6361fi
6362
6363###############################################################################
6364
6365###	use option --disable-overwrite to leave out the link to -lcurses
6366echo "$as_me:6366: checking if you wish to install ncurses overwriting curses" >&5
6367echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6368
6369# Check whether --enable-overwrite or --disable-overwrite was given.
6370if test "${enable_overwrite+set}" = set; then
6371  enableval="$enable_overwrite"
6372  with_overwrite=$enableval
6373else
6374  if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6375fi;
6376echo "$as_me:6376: result: $with_overwrite" >&5
6377echo "${ECHO_T}$with_overwrite" >&6
6378
6379echo "$as_me:6379: checking if external terminfo-database is used" >&5
6380echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6381
6382# Check whether --enable-database or --disable-database was given.
6383if test "${enable_database+set}" = set; then
6384  enableval="$enable_database"
6385  use_database=$enableval
6386else
6387  use_database=yes
6388fi;
6389echo "$as_me:6389: result: $use_database" >&5
6390echo "${ECHO_T}$use_database" >&6
6391
6392case $host_os in #(vi
6393os2*) #(vi
6394	TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6395	;;
6396*) #(vi
6397	TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6398	;;
6399esac
6400
6401NCURSES_USE_DATABASE=0
6402if test "$use_database" != no ; then
6403	NCURSES_USE_DATABASE=1
6404
6405	echo "$as_me:6405: checking which terminfo source-file will be installed" >&5
6406echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6407
6408# Check whether --with-database or --without-database was given.
6409if test "${with_database+set}" = set; then
6410  withval="$with_database"
6411  TERMINFO_SRC=$withval
6412fi;
6413	echo "$as_me:6413: result: $TERMINFO_SRC" >&5
6414echo "${ECHO_T}$TERMINFO_SRC" >&6
6415
6416	echo "$as_me:6416: checking whether to use hashed database instead of directory/tree" >&5
6417echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6418
6419# Check whether --with-hashed-db or --without-hashed-db was given.
6420if test "${with_hashed_db+set}" = set; then
6421  withval="$with_hashed_db"
6422
6423else
6424  with_hashed_db=no
6425fi;
6426	echo "$as_me:6426: result: $with_hashed_db" >&5
6427echo "${ECHO_T}$with_hashed_db" >&6
6428else
6429	with_hashed_db=no
6430fi
6431
6432echo "$as_me:6432: checking for list of fallback descriptions" >&5
6433echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6434
6435# Check whether --with-fallbacks or --without-fallbacks was given.
6436if test "${with_fallbacks+set}" = set; then
6437  withval="$with_fallbacks"
6438  with_fallback=$withval
6439else
6440  with_fallback=
6441fi;
6442echo "$as_me:6442: result: $with_fallback" >&5
6443echo "${ECHO_T}$with_fallback" >&6
6444FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6445
6446echo "$as_me:6446: checking if you want modern xterm or antique" >&5
6447echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6448
6449# Check whether --with-xterm-new or --without-xterm-new was given.
6450if test "${with_xterm_new+set}" = set; then
6451  withval="$with_xterm_new"
6452  with_xterm_new=$withval
6453else
6454  with_xterm_new=yes
6455fi;
6456case $with_xterm_new in
6457no)	with_xterm_new=xterm-old;;
6458*)	with_xterm_new=xterm-new;;
6459esac
6460echo "$as_me:6460: result: $with_xterm_new" >&5
6461echo "${ECHO_T}$with_xterm_new" >&6
6462WHICH_XTERM=$with_xterm_new
6463
6464echo "$as_me:6464: checking if xterm backspace sends BS or DEL" >&5
6465echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6466
6467# Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6468if test "${with_xterm_kbs+set}" = set; then
6469  withval="$with_xterm_kbs"
6470  with_xterm_kbs=$withval
6471else
6472  with_xterm_kbs=BS
6473fi;
6474case x$with_xterm_kbs in
6475xyes|xno|xBS|xbs|x8)
6476	with_xterm_kbs=BS
6477	;;
6478xDEL|xdel|x127)
6479	with_xterm_kbs=DEL
6480	;;
6481*)
6482	with_xterm_kbs=$withval
6483	;;
6484esac
6485echo "$as_me:6485: result: $with_xterm_kbs" >&5
6486echo "${ECHO_T}$with_xterm_kbs" >&6
6487XTERM_KBS=$with_xterm_kbs
6488
6489MAKE_TERMINFO=
6490if test "$use_database" = no ; then
6491	TERMINFO="${datadir}/terminfo"
6492	MAKE_TERMINFO="#"
6493else
6494
6495echo "$as_me:6495: checking for list of terminfo directories" >&5
6496echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6497
6498# Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6499if test "${with_terminfo_dirs+set}" = set; then
6500  withval="$with_terminfo_dirs"
6501
6502else
6503  withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6504fi;
6505IFS="${IFS:- 	}"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6506cf_dst_path=
6507for cf_src_path in $withval
6508do
6509
6510if test "x$prefix" != xNONE; then
6511  cf_path_syntax="$prefix"
6512else
6513  cf_path_syntax="$ac_default_prefix"
6514fi
6515
6516case ".$cf_src_path" in #(vi
6517.\$\(*\)*|.\'*\'*) #(vi
6518  ;;
6519..|./*|.\\*) #(vi
6520  ;;
6521.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6522  ;;
6523.\${*prefix}*|.\${*dir}*) #(vi
6524  eval cf_src_path="$cf_src_path"
6525  case ".$cf_src_path" in #(vi
6526  .NONE/*)
6527    cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6528    ;;
6529  esac
6530  ;; #(vi
6531.no|.NONE/*)
6532  cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6533  ;;
6534*)
6535  { { echo "$as_me:6535: error: expected a pathname, not \"$cf_src_path\"" >&5
6536echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6537   { (exit 1); exit 1; }; }
6538  ;;
6539esac
6540
6541  test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6542  cf_dst_path="${cf_dst_path}${cf_src_path}"
6543done
6544IFS="$ac_save_ifs"
6545
6546# This may use the prefix/exec_prefix symbols which will only yield "NONE"
6547# so we have to check/work around.  We do prefer the result of "eval"...
6548eval cf_dst_eval="$cf_dst_path"
6549case "x$cf_dst_eval" in #(vi
6550xNONE*) #(vi
6551	TERMINFO_DIRS=$cf_dst_path
6552	;;
6553*)
6554	TERMINFO_DIRS="$cf_dst_eval"
6555	;;
6556esac
6557
6558echo "$as_me:6558: result: $TERMINFO_DIRS" >&5
6559echo "${ECHO_T}$TERMINFO_DIRS" >&6
6560test -n "$TERMINFO_DIRS" &&
6561cat >>confdefs.h <<EOF
6562#define TERMINFO_DIRS "$TERMINFO_DIRS"
6563EOF
6564
6565echo "$as_me:6565: checking for default terminfo directory" >&5
6566echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6567
6568# Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6569if test "${with_default_terminfo_dir+set}" = set; then
6570  withval="$with_default_terminfo_dir"
6571
6572else
6573  withval="${TERMINFO:-${datadir}/terminfo}"
6574fi; if test -n "${datadir}/terminfo" ; then
6575
6576if test "x$prefix" != xNONE; then
6577  cf_path_syntax="$prefix"
6578else
6579  cf_path_syntax="$ac_default_prefix"
6580fi
6581
6582case ".$withval" in #(vi
6583.\$\(*\)*|.\'*\'*) #(vi
6584  ;;
6585..|./*|.\\*) #(vi
6586  ;;
6587.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6588  ;;
6589.\${*prefix}*|.\${*dir}*) #(vi
6590  eval withval="$withval"
6591  case ".$withval" in #(vi
6592  .NONE/*)
6593    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6594    ;;
6595  esac
6596  ;; #(vi
6597.no|.NONE/*)
6598  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6599  ;;
6600*)
6601  { { echo "$as_me:6601: error: expected a pathname, not \"$withval\"" >&5
6602echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6603   { (exit 1); exit 1; }; }
6604  ;;
6605esac
6606
6607fi
6608eval TERMINFO="$withval"
6609
6610echo "$as_me:6610: result: $TERMINFO" >&5
6611echo "${ECHO_T}$TERMINFO" >&6
6612
6613cat >>confdefs.h <<EOF
6614#define TERMINFO "$TERMINFO"
6615EOF
6616
6617fi
6618
6619###	use option --disable-big-core to make tic run on small machines
6620###	We need 4Mb, check if we can allocate 50% more than that.
6621echo "$as_me:6621: checking if big-core option selected" >&5
6622echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6623
6624# Check whether --enable-big-core or --disable-big-core was given.
6625if test "${enable_big_core+set}" = set; then
6626  enableval="$enable_big_core"
6627  with_big_core=$enableval
6628else
6629  if test "$cross_compiling" = yes; then
6630  with_big_core=no
6631else
6632  cat >conftest.$ac_ext <<_ACEOF
6633#line 6633 "configure"
6634#include "confdefs.h"
6635
6636#include <stdlib.h>
6637#include <string.h>
6638int main() {
6639	unsigned long n = 6000000L;
6640	char *s = malloc(n);
6641	if (s != 0)
6642		s[0] = s[n-1] = 0;
6643	${cf_cv_main_return:-return}(s == 0);
6644}
6645_ACEOF
6646rm -f conftest$ac_exeext
6647if { (eval echo "$as_me:6647: \"$ac_link\"") >&5
6648  (eval $ac_link) 2>&5
6649  ac_status=$?
6650  echo "$as_me:6650: \$? = $ac_status" >&5
6651  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6652  { (eval echo "$as_me:6652: \"$ac_try\"") >&5
6653  (eval $ac_try) 2>&5
6654  ac_status=$?
6655  echo "$as_me:6655: \$? = $ac_status" >&5
6656  (exit $ac_status); }; }; then
6657  with_big_core=yes
6658else
6659  echo "$as_me: program exited with status $ac_status" >&5
6660echo "$as_me: failed program was:" >&5
6661cat conftest.$ac_ext >&5
6662with_big_core=no
6663fi
6664rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6665fi
6666fi;
6667echo "$as_me:6667: result: $with_big_core" >&5
6668echo "${ECHO_T}$with_big_core" >&6
6669test "x$with_big_core" = "xyes" &&
6670cat >>confdefs.h <<\EOF
6671#define HAVE_BIG_CORE 1
6672EOF
6673
6674### ISO C only guarantees 512-char strings, we have tables which load faster
6675### when constructed using "big" strings.  More than the C compiler, the awk
6676### program is a limit on most vendor UNIX systems.  Check that we can build.
6677echo "$as_me:6677: checking if big-strings option selected" >&5
6678echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6679
6680# Check whether --enable-big-strings or --disable-big-strings was given.
6681if test "${enable_big_strings+set}" = set; then
6682  enableval="$enable_big_strings"
6683  with_big_strings=$enableval
6684else
6685
6686	case x$AWK in #(vi
6687	x)
6688		eval with_big_strings=no
6689		;;
6690	*) #(vi
6691		if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6692			| $AWK '{ printf "%d\n", length($0); }' 2>/dev/null | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
6693			eval with_big_strings=yes
6694		else
6695			eval with_big_strings=no
6696		fi
6697		;;
6698	esac
6699
6700fi;
6701echo "$as_me:6701: result: $with_big_strings" >&5
6702echo "${ECHO_T}$with_big_strings" >&6
6703
6704USE_BIG_STRINGS=0
6705test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6706
6707###	use option --enable-termcap to compile in the termcap fallback support
6708echo "$as_me:6708: checking if you want termcap-fallback support" >&5
6709echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6710
6711# Check whether --enable-termcap or --disable-termcap was given.
6712if test "${enable_termcap+set}" = set; then
6713  enableval="$enable_termcap"
6714  with_termcap=$enableval
6715else
6716  with_termcap=no
6717fi;
6718echo "$as_me:6718: result: $with_termcap" >&5
6719echo "${ECHO_T}$with_termcap" >&6
6720
6721NCURSES_USE_TERMCAP=0
6722if test "x$with_termcap" != "xyes" ; then
6723	if test "$use_database" = no ; then
6724		if test -z "$with_fallback" ; then
6725			{ { echo "$as_me:6725: error: You have disabled the database w/o specifying fallbacks" >&5
6726echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6727   { (exit 1); exit 1; }; }
6728		fi
6729	fi
6730
6731cat >>confdefs.h <<\EOF
6732#define PURE_TERMINFO 1
6733EOF
6734
6735else
6736
6737	if test "$with_ticlib" != no ; then
6738		{ { echo "$as_me:6738: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6739echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6740   { (exit 1); exit 1; }; }
6741	fi
6742
6743	NCURSES_USE_TERMCAP=1
6744	echo "$as_me:6744: checking for list of termcap files" >&5
6745echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6746
6747# Check whether --with-termpath or --without-termpath was given.
6748if test "${with_termpath+set}" = set; then
6749  withval="$with_termpath"
6750
6751else
6752  withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6753fi;
6754IFS="${IFS:- 	}"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6755cf_dst_path=
6756for cf_src_path in $withval
6757do
6758
6759if test "x$prefix" != xNONE; then
6760  cf_path_syntax="$prefix"
6761else
6762  cf_path_syntax="$ac_default_prefix"
6763fi
6764
6765case ".$cf_src_path" in #(vi
6766.\$\(*\)*|.\'*\'*) #(vi
6767  ;;
6768..|./*|.\\*) #(vi
6769  ;;
6770.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6771  ;;
6772.\${*prefix}*|.\${*dir}*) #(vi
6773  eval cf_src_path="$cf_src_path"
6774  case ".$cf_src_path" in #(vi
6775  .NONE/*)
6776    cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6777    ;;
6778  esac
6779  ;; #(vi
6780.no|.NONE/*)
6781  cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6782  ;;
6783*)
6784  { { echo "$as_me:6784: error: expected a pathname, not \"$cf_src_path\"" >&5
6785echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6786   { (exit 1); exit 1; }; }
6787  ;;
6788esac
6789
6790  test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6791  cf_dst_path="${cf_dst_path}${cf_src_path}"
6792done
6793IFS="$ac_save_ifs"
6794
6795# This may use the prefix/exec_prefix symbols which will only yield "NONE"
6796# so we have to check/work around.  We do prefer the result of "eval"...
6797eval cf_dst_eval="$cf_dst_path"
6798case "x$cf_dst_eval" in #(vi
6799xNONE*) #(vi
6800	TERMPATH=$cf_dst_path
6801	;;
6802*)
6803	TERMPATH="$cf_dst_eval"
6804	;;
6805esac
6806
6807	echo "$as_me:6807: result: $TERMPATH" >&5
6808echo "${ECHO_T}$TERMPATH" >&6
6809	test -n "$TERMPATH" &&
6810cat >>confdefs.h <<EOF
6811#define TERMPATH "$TERMPATH"
6812EOF
6813
6814	###	use option --enable-getcap to use a hacked getcap for reading termcaps
6815	echo "$as_me:6815: checking if fast termcap-loader is needed" >&5
6816echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6817
6818# Check whether --enable-getcap or --disable-getcap was given.
6819if test "${enable_getcap+set}" = set; then
6820  enableval="$enable_getcap"
6821  with_getcap=$enableval
6822else
6823  with_getcap=no
6824fi;
6825	echo "$as_me:6825: result: $with_getcap" >&5
6826echo "${ECHO_T}$with_getcap" >&6
6827	test "x$with_getcap" = "xyes" &&
6828cat >>confdefs.h <<\EOF
6829#define USE_GETCAP 1
6830EOF
6831
6832	echo "$as_me:6832: checking if translated termcaps will be cached in ~/.terminfo" >&5
6833echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6834
6835# Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6836if test "${enable_getcap_cache+set}" = set; then
6837  enableval="$enable_getcap_cache"
6838  with_getcap_cache=$enableval
6839else
6840  with_getcap_cache=no
6841fi;
6842	echo "$as_me:6842: result: $with_getcap_cache" >&5
6843echo "${ECHO_T}$with_getcap_cache" >&6
6844	test "x$with_getcap_cache" = "xyes" &&
6845cat >>confdefs.h <<\EOF
6846#define USE_GETCAP_CACHE 1
6847EOF
6848
6849fi
6850
6851###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6852echo "$as_me:6852: checking if ~/.terminfo is wanted" >&5
6853echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6854
6855# Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6856if test "${enable_home_terminfo+set}" = set; then
6857  enableval="$enable_home_terminfo"
6858  with_home_terminfo=$enableval
6859else
6860  with_home_terminfo=yes
6861fi;
6862echo "$as_me:6862: result: $with_home_terminfo" >&5
6863echo "${ECHO_T}$with_home_terminfo" >&6
6864test "x$with_home_terminfo" = "xyes" &&
6865cat >>confdefs.h <<\EOF
6866#define USE_HOME_TERMINFO 1
6867EOF
6868
6869echo "$as_me:6869: checking if you want to use restricted environment when running as root" >&5
6870echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6871
6872# Check whether --enable-root-environ or --disable-root-environ was given.
6873if test "${enable_root_environ+set}" = set; then
6874  enableval="$enable_root_environ"
6875  with_root_environ=$enableval
6876else
6877  with_root_environ=yes
6878fi;
6879echo "$as_me:6879: result: $with_root_environ" >&5
6880echo "${ECHO_T}$with_root_environ" >&6
6881test "x$with_root_environ" = xyes &&
6882cat >>confdefs.h <<\EOF
6883#define USE_ROOT_ENVIRON 1
6884EOF
6885
6886###   Use option --enable-symlinks to make tic use symlinks, not hard links
6887###   to reduce storage requirements for the terminfo database.
6888
6889for ac_func in \
6890	remove \
6891	unlink
6892do
6893as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6894echo "$as_me:6894: checking for $ac_func" >&5
6895echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6896if eval "test \"\${$as_ac_var+set}\" = set"; then
6897  echo $ECHO_N "(cached) $ECHO_C" >&6
6898else
6899  cat >conftest.$ac_ext <<_ACEOF
6900#line 6900 "configure"
6901#include "confdefs.h"
6902/* System header to define __stub macros and hopefully few prototypes,
6903    which can conflict with char $ac_func (); below.  */
6904#include <assert.h>
6905/* Override any gcc2 internal prototype to avoid an error.  */
6906#ifdef __cplusplus
6907extern "C"
6908#endif
6909/* We use char because int might match the return type of a gcc2
6910   builtin and then its argument prototype would still apply.  */
6911char $ac_func ();
6912char (*f) ();
6913
6914int
6915main ()
6916{
6917/* The GNU C library defines this for functions which it implements
6918    to always fail with ENOSYS.  Some functions are actually named
6919    something starting with __ and the normal name is an alias.  */
6920#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6921choke me
6922#else
6923f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6924#endif
6925
6926  ;
6927  return 0;
6928}
6929_ACEOF
6930rm -f conftest.$ac_objext conftest$ac_exeext
6931if { (eval echo "$as_me:6931: \"$ac_link\"") >&5
6932  (eval $ac_link) 2>&5
6933  ac_status=$?
6934  echo "$as_me:6934: \$? = $ac_status" >&5
6935  (exit $ac_status); } &&
6936         { ac_try='test -s conftest$ac_exeext'
6937  { (eval echo "$as_me:6937: \"$ac_try\"") >&5
6938  (eval $ac_try) 2>&5
6939  ac_status=$?
6940  echo "$as_me:6940: \$? = $ac_status" >&5
6941  (exit $ac_status); }; }; then
6942  eval "$as_ac_var=yes"
6943else
6944  echo "$as_me: failed program was:" >&5
6945cat conftest.$ac_ext >&5
6946eval "$as_ac_var=no"
6947fi
6948rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6949fi
6950echo "$as_me:6950: result: `eval echo '${'$as_ac_var'}'`" >&5
6951echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6952if test `eval echo '${'$as_ac_var'}'` = yes; then
6953  cat >>confdefs.h <<EOF
6954#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6955EOF
6956
6957fi
6958done
6959
6960if test "$cross_compiling" = yes ; then
6961
6962for ac_func in \
6963		link \
6964		symlink
6965do
6966as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6967echo "$as_me:6967: checking for $ac_func" >&5
6968echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6969if eval "test \"\${$as_ac_var+set}\" = set"; then
6970  echo $ECHO_N "(cached) $ECHO_C" >&6
6971else
6972  cat >conftest.$ac_ext <<_ACEOF
6973#line 6973 "configure"
6974#include "confdefs.h"
6975/* System header to define __stub macros and hopefully few prototypes,
6976    which can conflict with char $ac_func (); below.  */
6977#include <assert.h>
6978/* Override any gcc2 internal prototype to avoid an error.  */
6979#ifdef __cplusplus
6980extern "C"
6981#endif
6982/* We use char because int might match the return type of a gcc2
6983   builtin and then its argument prototype would still apply.  */
6984char $ac_func ();
6985char (*f) ();
6986
6987int
6988main ()
6989{
6990/* The GNU C library defines this for functions which it implements
6991    to always fail with ENOSYS.  Some functions are actually named
6992    something starting with __ and the normal name is an alias.  */
6993#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6994choke me
6995#else
6996f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6997#endif
6998
6999  ;
7000  return 0;
7001}
7002_ACEOF
7003rm -f conftest.$ac_objext conftest$ac_exeext
7004if { (eval echo "$as_me:7004: \"$ac_link\"") >&5
7005  (eval $ac_link) 2>&5
7006  ac_status=$?
7007  echo "$as_me:7007: \$? = $ac_status" >&5
7008  (exit $ac_status); } &&
7009         { ac_try='test -s conftest$ac_exeext'
7010  { (eval echo "$as_me:7010: \"$ac_try\"") >&5
7011  (eval $ac_try) 2>&5
7012  ac_status=$?
7013  echo "$as_me:7013: \$? = $ac_status" >&5
7014  (exit $ac_status); }; }; then
7015  eval "$as_ac_var=yes"
7016else
7017  echo "$as_me: failed program was:" >&5
7018cat conftest.$ac_ext >&5
7019eval "$as_ac_var=no"
7020fi
7021rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7022fi
7023echo "$as_me:7023: result: `eval echo '${'$as_ac_var'}'`" >&5
7024echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7025if test `eval echo '${'$as_ac_var'}'` = yes; then
7026  cat >>confdefs.h <<EOF
7027#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7028EOF
7029
7030fi
7031done
7032
7033else
7034	echo "$as_me:7034: checking if link/symlink functions work" >&5
7035echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7036if test "${cf_cv_link_funcs+set}" = set; then
7037  echo $ECHO_N "(cached) $ECHO_C" >&6
7038else
7039
7040		cf_cv_link_funcs=
7041		for cf_func in link symlink ; do
7042			if test "$cross_compiling" = yes; then
7043
7044			eval 'ac_cv_func_'$cf_func'=error'
7045else
7046  cat >conftest.$ac_ext <<_ACEOF
7047#line 7047 "configure"
7048#include "confdefs.h"
7049
7050#include <sys/types.h>
7051#include <sys/stat.h>
7052#ifdef HAVE_UNISTD_H
7053#include <unistd.h>
7054#endif
7055int main()
7056{
7057	int fail = 0;
7058	char *src = "config.log";
7059	char *dst = "conftest.chk";
7060	struct stat src_sb;
7061	struct stat dst_sb;
7062
7063	stat(src, &src_sb);
7064	fail = ($cf_func("config.log", "conftest.chk") < 0)
7065	    || (stat(dst, &dst_sb) < 0)
7066	    || (dst_sb.st_mtime != src_sb.st_mtime);
7067#ifdef HAVE_UNLINK
7068	unlink(dst);
7069#else
7070	remove(dst);
7071#endif
7072	${cf_cv_main_return:-return} (fail);
7073}
7074
7075_ACEOF
7076rm -f conftest$ac_exeext
7077if { (eval echo "$as_me:7077: \"$ac_link\"") >&5
7078  (eval $ac_link) 2>&5
7079  ac_status=$?
7080  echo "$as_me:7080: \$? = $ac_status" >&5
7081  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7082  { (eval echo "$as_me:7082: \"$ac_try\"") >&5
7083  (eval $ac_try) 2>&5
7084  ac_status=$?
7085  echo "$as_me:7085: \$? = $ac_status" >&5
7086  (exit $ac_status); }; }; then
7087
7088			cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7089			eval 'ac_cv_func_'$cf_func'=yes'
7090else
7091  echo "$as_me: program exited with status $ac_status" >&5
7092echo "$as_me: failed program was:" >&5
7093cat conftest.$ac_ext >&5
7094
7095			eval 'ac_cv_func_'$cf_func'=no'
7096fi
7097rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7098fi
7099		done
7100		test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7101
7102fi
7103echo "$as_me:7103: result: $cf_cv_link_funcs" >&5
7104echo "${ECHO_T}$cf_cv_link_funcs" >&6
7105	test "$ac_cv_func_link"    = yes &&
7106cat >>confdefs.h <<\EOF
7107#define HAVE_LINK 1
7108EOF
7109
7110	test "$ac_cv_func_symlink" = yes &&
7111cat >>confdefs.h <<\EOF
7112#define HAVE_SYMLINK 1
7113EOF
7114
7115fi
7116
7117with_links=no
7118with_symlinks=no
7119
7120# soft links (symbolic links) are useful for some systems where hard links do
7121# not work, or to make it simpler to copy terminfo trees around.
7122if test "x$ac_cv_func_symlink" = xyes ; then
7123    echo "$as_me:7123: checking if tic should use symbolic links" >&5
7124echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7125
7126# Check whether --enable-symlinks or --disable-symlinks was given.
7127if test "${enable_symlinks+set}" = set; then
7128  enableval="$enable_symlinks"
7129  with_symlinks=$enableval
7130else
7131  with_symlinks=no
7132fi;
7133    echo "$as_me:7133: result: $with_symlinks" >&5
7134echo "${ECHO_T}$with_symlinks" >&6
7135fi
7136
7137# If we have hard links and did not choose to use soft links instead, there is
7138# no reason to make this choice optional - use the hard links.
7139if test "$with_symlinks" = no ; then
7140    echo "$as_me:7140: checking if tic should use hard links" >&5
7141echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7142    if test "x$ac_cv_func_link" = xyes ; then
7143	with_links=yes
7144    else
7145	with_links=no
7146    fi
7147    echo "$as_me:7147: result: $with_links" >&5
7148echo "${ECHO_T}$with_links" >&6
7149fi
7150
7151test "x$with_links" = xyes &&
7152cat >>confdefs.h <<\EOF
7153#define USE_LINKS 1
7154EOF
7155
7156test "x$with_symlinks" = xyes &&
7157cat >>confdefs.h <<\EOF
7158#define USE_SYMLINKS 1
7159EOF
7160
7161###   use option --enable-broken-linker to force on use of broken-linker support
7162echo "$as_me:7162: checking if you want broken-linker support code" >&5
7163echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7164
7165# Check whether --enable-broken_linker or --disable-broken_linker was given.
7166if test "${enable_broken_linker+set}" = set; then
7167  enableval="$enable_broken_linker"
7168  with_broken_linker=$enableval
7169else
7170  with_broken_linker=${BROKEN_LINKER:-no}
7171fi;
7172echo "$as_me:7172: result: $with_broken_linker" >&5
7173echo "${ECHO_T}$with_broken_linker" >&6
7174
7175BROKEN_LINKER=0
7176if test "x$with_broken_linker" = xyes ; then
7177
7178cat >>confdefs.h <<\EOF
7179#define BROKEN_LINKER 1
7180EOF
7181
7182	BROKEN_LINKER=1
7183elif test "$DFT_LWR_MODEL" = shared ; then
7184	case $cf_cv_system_name in #(vi
7185	cygwin*)
7186
7187cat >>confdefs.h <<\EOF
7188#define BROKEN_LINKER 1
7189EOF
7190
7191		BROKEN_LINKER=1
7192		test -n "$verbose" && echo "	cygwin linker is broken anyway" 1>&6
7193
7194echo "${as_me:-configure}:7194: testing cygwin linker is broken anyway ..." 1>&5
7195
7196		;;
7197	esac
7198fi
7199
7200###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7201echo "$as_me:7201: checking if tputs should process BSD-style prefix padding" >&5
7202echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7203
7204# Check whether --enable-bsdpad or --disable-bsdpad was given.
7205if test "${enable_bsdpad+set}" = set; then
7206  enableval="$enable_bsdpad"
7207  with_bsdpad=$enableval
7208else
7209  with_bsdpad=no
7210fi;
7211echo "$as_me:7211: result: $with_bsdpad" >&5
7212echo "${ECHO_T}$with_bsdpad" >&6
7213test "x$with_bsdpad" = xyes &&
7214cat >>confdefs.h <<\EOF
7215#define BSD_TPUTS 1
7216EOF
7217
7218###   use option --enable-widec to turn on use of wide-character support
7219NCURSES_CH_T=chtype
7220NCURSES_LIBUTF8=0
7221
7222NEED_WCHAR_H=0
7223NCURSES_MBSTATE_T=0
7224NCURSES_WCHAR_T=0
7225NCURSES_WINT_T=0
7226
7227# Check to define _XOPEN_SOURCE "automatically"
7228
7229cf_XOPEN_SOURCE=500
7230cf_POSIX_C_SOURCE=199506L
7231cf_xopen_source=
7232
7233case $host_os in #(vi
7234aix[4-7]*) #(vi
7235	cf_xopen_source="-D_ALL_SOURCE"
7236	;;
7237cygwin|msys) #(vi
7238	cf_XOPEN_SOURCE=600
7239	;;
7240darwin[0-8].*) #(vi
7241	cf_xopen_source="-D_APPLE_C_SOURCE"
7242	;;
7243darwin*) #(vi
7244	cf_xopen_source="-D_DARWIN_C_SOURCE"
7245	cf_XOPEN_SOURCE=
7246	;;
7247freebsd*|dragonfly*) #(vi
7248	# 5.x headers associate
7249	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7250	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7251	cf_POSIX_C_SOURCE=200112L
7252	cf_XOPEN_SOURCE=600
7253	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7254	;;
7255hpux11*) #(vi
7256	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7257	;;
7258hpux*) #(vi
7259	cf_xopen_source="-D_HPUX_SOURCE"
7260	;;
7261irix[56].*) #(vi
7262	cf_xopen_source="-D_SGI_SOURCE"
7263	cf_XOPEN_SOURCE=
7264	;;
7265linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7266
7267echo "$as_me:7267: checking if we must define _GNU_SOURCE" >&5
7268echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7269if test "${cf_cv_gnu_source+set}" = set; then
7270  echo $ECHO_N "(cached) $ECHO_C" >&6
7271else
7272
7273cat >conftest.$ac_ext <<_ACEOF
7274#line 7274 "configure"
7275#include "confdefs.h"
7276#include <sys/types.h>
7277int
7278main ()
7279{
7280
7281#ifndef _XOPEN_SOURCE
7282make an error
7283#endif
7284  ;
7285  return 0;
7286}
7287_ACEOF
7288rm -f conftest.$ac_objext
7289if { (eval echo "$as_me:7289: \"$ac_compile\"") >&5
7290  (eval $ac_compile) 2>&5
7291  ac_status=$?
7292  echo "$as_me:7292: \$? = $ac_status" >&5
7293  (exit $ac_status); } &&
7294         { ac_try='test -s conftest.$ac_objext'
7295  { (eval echo "$as_me:7295: \"$ac_try\"") >&5
7296  (eval $ac_try) 2>&5
7297  ac_status=$?
7298  echo "$as_me:7298: \$? = $ac_status" >&5
7299  (exit $ac_status); }; }; then
7300  cf_cv_gnu_source=no
7301else
7302  echo "$as_me: failed program was:" >&5
7303cat conftest.$ac_ext >&5
7304cf_save="$CPPFLAGS"
7305	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7306	 cat >conftest.$ac_ext <<_ACEOF
7307#line 7307 "configure"
7308#include "confdefs.h"
7309#include <sys/types.h>
7310int
7311main ()
7312{
7313
7314#ifdef _XOPEN_SOURCE
7315make an error
7316#endif
7317  ;
7318  return 0;
7319}
7320_ACEOF
7321rm -f conftest.$ac_objext
7322if { (eval echo "$as_me:7322: \"$ac_compile\"") >&5
7323  (eval $ac_compile) 2>&5
7324  ac_status=$?
7325  echo "$as_me:7325: \$? = $ac_status" >&5
7326  (exit $ac_status); } &&
7327         { ac_try='test -s conftest.$ac_objext'
7328  { (eval echo "$as_me:7328: \"$ac_try\"") >&5
7329  (eval $ac_try) 2>&5
7330  ac_status=$?
7331  echo "$as_me:7331: \$? = $ac_status" >&5
7332  (exit $ac_status); }; }; then
7333  cf_cv_gnu_source=no
7334else
7335  echo "$as_me: failed program was:" >&5
7336cat conftest.$ac_ext >&5
7337cf_cv_gnu_source=yes
7338fi
7339rm -f conftest.$ac_objext conftest.$ac_ext
7340	CPPFLAGS="$cf_save"
7341
7342fi
7343rm -f conftest.$ac_objext conftest.$ac_ext
7344
7345fi
7346echo "$as_me:7346: result: $cf_cv_gnu_source" >&5
7347echo "${ECHO_T}$cf_cv_gnu_source" >&6
7348test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7349
7350	;;
7351mirbsd*) #(vi
7352	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7353	cf_XOPEN_SOURCE=
7354
7355cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7356
7357cf_save_CFLAGS="$CFLAGS"
7358cf_save_CPPFLAGS="$CPPFLAGS"
7359
7360cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7361	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
7362		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
7363
7364cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7365	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
7366		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
7367
7368echo "$as_me:7368: checking if we should define _POSIX_C_SOURCE" >&5
7369echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7370if test "${cf_cv_posix_c_source+set}" = set; then
7371  echo $ECHO_N "(cached) $ECHO_C" >&6
7372else
7373
7374echo "${as_me:-configure}:7374: testing if the symbol is already defined go no further ..." 1>&5
7375
7376	cat >conftest.$ac_ext <<_ACEOF
7377#line 7377 "configure"
7378#include "confdefs.h"
7379#include <sys/types.h>
7380int
7381main ()
7382{
7383
7384#ifndef _POSIX_C_SOURCE
7385make an error
7386#endif
7387  ;
7388  return 0;
7389}
7390_ACEOF
7391rm -f conftest.$ac_objext
7392if { (eval echo "$as_me:7392: \"$ac_compile\"") >&5
7393  (eval $ac_compile) 2>&5
7394  ac_status=$?
7395  echo "$as_me:7395: \$? = $ac_status" >&5
7396  (exit $ac_status); } &&
7397         { ac_try='test -s conftest.$ac_objext'
7398  { (eval echo "$as_me:7398: \"$ac_try\"") >&5
7399  (eval $ac_try) 2>&5
7400  ac_status=$?
7401  echo "$as_me:7401: \$? = $ac_status" >&5
7402  (exit $ac_status); }; }; then
7403  cf_cv_posix_c_source=no
7404else
7405  echo "$as_me: failed program was:" >&5
7406cat conftest.$ac_ext >&5
7407cf_want_posix_source=no
7408	 case .$cf_POSIX_C_SOURCE in #(vi
7409	 .[12]??*) #(vi
7410		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7411		;;
7412	 .2) #(vi
7413		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7414		cf_want_posix_source=yes
7415		;;
7416	 .*)
7417		cf_want_posix_source=yes
7418		;;
7419	 esac
7420	 if test "$cf_want_posix_source" = yes ; then
7421		cat >conftest.$ac_ext <<_ACEOF
7422#line 7422 "configure"
7423#include "confdefs.h"
7424#include <sys/types.h>
7425int
7426main ()
7427{
7428
7429#ifdef _POSIX_SOURCE
7430make an error
7431#endif
7432  ;
7433  return 0;
7434}
7435_ACEOF
7436rm -f conftest.$ac_objext
7437if { (eval echo "$as_me:7437: \"$ac_compile\"") >&5
7438  (eval $ac_compile) 2>&5
7439  ac_status=$?
7440  echo "$as_me:7440: \$? = $ac_status" >&5
7441  (exit $ac_status); } &&
7442         { ac_try='test -s conftest.$ac_objext'
7443  { (eval echo "$as_me:7443: \"$ac_try\"") >&5
7444  (eval $ac_try) 2>&5
7445  ac_status=$?
7446  echo "$as_me:7446: \$? = $ac_status" >&5
7447  (exit $ac_status); }; }; then
7448  :
7449else
7450  echo "$as_me: failed program was:" >&5
7451cat conftest.$ac_ext >&5
7452cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7453fi
7454rm -f conftest.$ac_objext conftest.$ac_ext
7455	 fi
7456
7457echo "${as_me:-configure}:7457: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7458
7459	 CFLAGS="$cf_trim_CFLAGS"
7460	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7461
7462echo "${as_me:-configure}:7462: testing if the second compile does not leave our definition intact error ..." 1>&5
7463
7464	 cat >conftest.$ac_ext <<_ACEOF
7465#line 7465 "configure"
7466#include "confdefs.h"
7467#include <sys/types.h>
7468int
7469main ()
7470{
7471
7472#ifndef _POSIX_C_SOURCE
7473make an error
7474#endif
7475  ;
7476  return 0;
7477}
7478_ACEOF
7479rm -f conftest.$ac_objext
7480if { (eval echo "$as_me:7480: \"$ac_compile\"") >&5
7481  (eval $ac_compile) 2>&5
7482  ac_status=$?
7483  echo "$as_me:7483: \$? = $ac_status" >&5
7484  (exit $ac_status); } &&
7485         { ac_try='test -s conftest.$ac_objext'
7486  { (eval echo "$as_me:7486: \"$ac_try\"") >&5
7487  (eval $ac_try) 2>&5
7488  ac_status=$?
7489  echo "$as_me:7489: \$? = $ac_status" >&5
7490  (exit $ac_status); }; }; then
7491  :
7492else
7493  echo "$as_me: failed program was:" >&5
7494cat conftest.$ac_ext >&5
7495cf_cv_posix_c_source=no
7496fi
7497rm -f conftest.$ac_objext conftest.$ac_ext
7498	 CFLAGS="$cf_save_CFLAGS"
7499	 CPPFLAGS="$cf_save_CPPFLAGS"
7500
7501fi
7502rm -f conftest.$ac_objext conftest.$ac_ext
7503
7504fi
7505echo "$as_me:7505: result: $cf_cv_posix_c_source" >&5
7506echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7507
7508if test "$cf_cv_posix_c_source" != no ; then
7509	CFLAGS="$cf_trim_CFLAGS"
7510	CPPFLAGS="$cf_trim_CPPFLAGS"
7511
7512cf_fix_cppflags=no
7513cf_new_cflags=
7514cf_new_cppflags=
7515cf_new_extra_cppflags=
7516
7517for cf_add_cflags in $cf_cv_posix_c_source
7518do
7519case $cf_fix_cppflags in
7520no)
7521	case $cf_add_cflags in #(vi
7522	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7523		case $cf_add_cflags in
7524		-D*)
7525			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7526
7527			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7528				&& test -z "${cf_tst_cflags}" \
7529				&& cf_fix_cppflags=yes
7530
7531			if test $cf_fix_cppflags = yes ; then
7532				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7533				continue
7534			elif test "${cf_tst_cflags}" = "\"'" ; then
7535				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7536				continue
7537			fi
7538			;;
7539		esac
7540		case "$CPPFLAGS" in
7541		*$cf_add_cflags) #(vi
7542			;;
7543		*) #(vi
7544			case $cf_add_cflags in #(vi
7545			-D*)
7546				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7547
7548CPPFLAGS=`echo "$CPPFLAGS" | \
7549	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
7550		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
7551
7552				;;
7553			esac
7554			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7555			;;
7556		esac
7557		;;
7558	*)
7559		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7560		;;
7561	esac
7562	;;
7563yes)
7564	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7565
7566	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7567
7568	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7569		&& test -z "${cf_tst_cflags}" \
7570		&& cf_fix_cppflags=no
7571	;;
7572esac
7573done
7574
7575if test -n "$cf_new_cflags" ; then
7576
7577	CFLAGS="$CFLAGS $cf_new_cflags"
7578fi
7579
7580if test -n "$cf_new_cppflags" ; then
7581
7582	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7583fi
7584
7585if test -n "$cf_new_extra_cppflags" ; then
7586
7587	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7588fi
7589
7590fi
7591
7592	;;
7593netbsd*) #(vi
7594	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7595	;;
7596openbsd[4-9]*) #(vi
7597	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7598	cf_xopen_source="-D_BSD_SOURCE"
7599	cf_XOPEN_SOURCE=600
7600	;;
7601openbsd*) #(vi
7602	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7603	;;
7604osf[45]*) #(vi
7605	cf_xopen_source="-D_OSF_SOURCE"
7606	;;
7607nto-qnx*) #(vi
7608	cf_xopen_source="-D_QNX_SOURCE"
7609	;;
7610sco*) #(vi
7611	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7612	;;
7613solaris2.*) #(vi
7614	cf_xopen_source="-D__EXTENSIONS__"
7615	cf_cv_xopen_source=broken
7616	;;
7617*)
7618
7619echo "$as_me:7619: checking if we should define _XOPEN_SOURCE" >&5
7620echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7621if test "${cf_cv_xopen_source+set}" = set; then
7622  echo $ECHO_N "(cached) $ECHO_C" >&6
7623else
7624
7625	cat >conftest.$ac_ext <<_ACEOF
7626#line 7626 "configure"
7627#include "confdefs.h"
7628
7629#include <stdlib.h>
7630#include <string.h>
7631#include <sys/types.h>
7632
7633int
7634main ()
7635{
7636
7637#ifndef _XOPEN_SOURCE
7638make an error
7639#endif
7640  ;
7641  return 0;
7642}
7643_ACEOF
7644rm -f conftest.$ac_objext
7645if { (eval echo "$as_me:7645: \"$ac_compile\"") >&5
7646  (eval $ac_compile) 2>&5
7647  ac_status=$?
7648  echo "$as_me:7648: \$? = $ac_status" >&5
7649  (exit $ac_status); } &&
7650         { ac_try='test -s conftest.$ac_objext'
7651  { (eval echo "$as_me:7651: \"$ac_try\"") >&5
7652  (eval $ac_try) 2>&5
7653  ac_status=$?
7654  echo "$as_me:7654: \$? = $ac_status" >&5
7655  (exit $ac_status); }; }; then
7656  cf_cv_xopen_source=no
7657else
7658  echo "$as_me: failed program was:" >&5
7659cat conftest.$ac_ext >&5
7660cf_save="$CPPFLAGS"
7661	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7662	 cat >conftest.$ac_ext <<_ACEOF
7663#line 7663 "configure"
7664#include "confdefs.h"
7665
7666#include <stdlib.h>
7667#include <string.h>
7668#include <sys/types.h>
7669
7670int
7671main ()
7672{
7673
7674#ifdef _XOPEN_SOURCE
7675make an error
7676#endif
7677  ;
7678  return 0;
7679}
7680_ACEOF
7681rm -f conftest.$ac_objext
7682if { (eval echo "$as_me:7682: \"$ac_compile\"") >&5
7683  (eval $ac_compile) 2>&5
7684  ac_status=$?
7685  echo "$as_me:7685: \$? = $ac_status" >&5
7686  (exit $ac_status); } &&
7687         { ac_try='test -s conftest.$ac_objext'
7688  { (eval echo "$as_me:7688: \"$ac_try\"") >&5
7689  (eval $ac_try) 2>&5
7690  ac_status=$?
7691  echo "$as_me:7691: \$? = $ac_status" >&5
7692  (exit $ac_status); }; }; then
7693  cf_cv_xopen_source=no
7694else
7695  echo "$as_me: failed program was:" >&5
7696cat conftest.$ac_ext >&5
7697cf_cv_xopen_source=$cf_XOPEN_SOURCE
7698fi
7699rm -f conftest.$ac_objext conftest.$ac_ext
7700	CPPFLAGS="$cf_save"
7701
7702fi
7703rm -f conftest.$ac_objext conftest.$ac_ext
7704
7705fi
7706echo "$as_me:7706: result: $cf_cv_xopen_source" >&5
7707echo "${ECHO_T}$cf_cv_xopen_source" >&6
7708
7709if test "$cf_cv_xopen_source" != no ; then
7710
7711CFLAGS=`echo "$CFLAGS" | \
7712	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
7713		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
7714
7715CPPFLAGS=`echo "$CPPFLAGS" | \
7716	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
7717		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
7718
7719	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7720
7721cf_fix_cppflags=no
7722cf_new_cflags=
7723cf_new_cppflags=
7724cf_new_extra_cppflags=
7725
7726for cf_add_cflags in $cf_temp_xopen_source
7727do
7728case $cf_fix_cppflags in
7729no)
7730	case $cf_add_cflags in #(vi
7731	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7732		case $cf_add_cflags in
7733		-D*)
7734			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7735
7736			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7737				&& test -z "${cf_tst_cflags}" \
7738				&& cf_fix_cppflags=yes
7739
7740			if test $cf_fix_cppflags = yes ; then
7741				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7742				continue
7743			elif test "${cf_tst_cflags}" = "\"'" ; then
7744				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7745				continue
7746			fi
7747			;;
7748		esac
7749		case "$CPPFLAGS" in
7750		*$cf_add_cflags) #(vi
7751			;;
7752		*) #(vi
7753			case $cf_add_cflags in #(vi
7754			-D*)
7755				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7756
7757CPPFLAGS=`echo "$CPPFLAGS" | \
7758	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
7759		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
7760
7761				;;
7762			esac
7763			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7764			;;
7765		esac
7766		;;
7767	*)
7768		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7769		;;
7770	esac
7771	;;
7772yes)
7773	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7774
7775	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7776
7777	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7778		&& test -z "${cf_tst_cflags}" \
7779		&& cf_fix_cppflags=no
7780	;;
7781esac
7782done
7783
7784if test -n "$cf_new_cflags" ; then
7785
7786	CFLAGS="$CFLAGS $cf_new_cflags"
7787fi
7788
7789if test -n "$cf_new_cppflags" ; then
7790
7791	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7792fi
7793
7794if test -n "$cf_new_extra_cppflags" ; then
7795
7796	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7797fi
7798
7799fi
7800
7801cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7802
7803cf_save_CFLAGS="$CFLAGS"
7804cf_save_CPPFLAGS="$CPPFLAGS"
7805
7806cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7807	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
7808		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
7809
7810cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7811	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
7812		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
7813
7814echo "$as_me:7814: checking if we should define _POSIX_C_SOURCE" >&5
7815echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7816if test "${cf_cv_posix_c_source+set}" = set; then
7817  echo $ECHO_N "(cached) $ECHO_C" >&6
7818else
7819
7820echo "${as_me:-configure}:7820: testing if the symbol is already defined go no further ..." 1>&5
7821
7822	cat >conftest.$ac_ext <<_ACEOF
7823#line 7823 "configure"
7824#include "confdefs.h"
7825#include <sys/types.h>
7826int
7827main ()
7828{
7829
7830#ifndef _POSIX_C_SOURCE
7831make an error
7832#endif
7833  ;
7834  return 0;
7835}
7836_ACEOF
7837rm -f conftest.$ac_objext
7838if { (eval echo "$as_me:7838: \"$ac_compile\"") >&5
7839  (eval $ac_compile) 2>&5
7840  ac_status=$?
7841  echo "$as_me:7841: \$? = $ac_status" >&5
7842  (exit $ac_status); } &&
7843         { ac_try='test -s conftest.$ac_objext'
7844  { (eval echo "$as_me:7844: \"$ac_try\"") >&5
7845  (eval $ac_try) 2>&5
7846  ac_status=$?
7847  echo "$as_me:7847: \$? = $ac_status" >&5
7848  (exit $ac_status); }; }; then
7849  cf_cv_posix_c_source=no
7850else
7851  echo "$as_me: failed program was:" >&5
7852cat conftest.$ac_ext >&5
7853cf_want_posix_source=no
7854	 case .$cf_POSIX_C_SOURCE in #(vi
7855	 .[12]??*) #(vi
7856		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7857		;;
7858	 .2) #(vi
7859		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7860		cf_want_posix_source=yes
7861		;;
7862	 .*)
7863		cf_want_posix_source=yes
7864		;;
7865	 esac
7866	 if test "$cf_want_posix_source" = yes ; then
7867		cat >conftest.$ac_ext <<_ACEOF
7868#line 7868 "configure"
7869#include "confdefs.h"
7870#include <sys/types.h>
7871int
7872main ()
7873{
7874
7875#ifdef _POSIX_SOURCE
7876make an error
7877#endif
7878  ;
7879  return 0;
7880}
7881_ACEOF
7882rm -f conftest.$ac_objext
7883if { (eval echo "$as_me:7883: \"$ac_compile\"") >&5
7884  (eval $ac_compile) 2>&5
7885  ac_status=$?
7886  echo "$as_me:7886: \$? = $ac_status" >&5
7887  (exit $ac_status); } &&
7888         { ac_try='test -s conftest.$ac_objext'
7889  { (eval echo "$as_me:7889: \"$ac_try\"") >&5
7890  (eval $ac_try) 2>&5
7891  ac_status=$?
7892  echo "$as_me:7892: \$? = $ac_status" >&5
7893  (exit $ac_status); }; }; then
7894  :
7895else
7896  echo "$as_me: failed program was:" >&5
7897cat conftest.$ac_ext >&5
7898cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7899fi
7900rm -f conftest.$ac_objext conftest.$ac_ext
7901	 fi
7902
7903echo "${as_me:-configure}:7903: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7904
7905	 CFLAGS="$cf_trim_CFLAGS"
7906	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7907
7908echo "${as_me:-configure}:7908: testing if the second compile does not leave our definition intact error ..." 1>&5
7909
7910	 cat >conftest.$ac_ext <<_ACEOF
7911#line 7911 "configure"
7912#include "confdefs.h"
7913#include <sys/types.h>
7914int
7915main ()
7916{
7917
7918#ifndef _POSIX_C_SOURCE
7919make an error
7920#endif
7921  ;
7922  return 0;
7923}
7924_ACEOF
7925rm -f conftest.$ac_objext
7926if { (eval echo "$as_me:7926: \"$ac_compile\"") >&5
7927  (eval $ac_compile) 2>&5
7928  ac_status=$?
7929  echo "$as_me:7929: \$? = $ac_status" >&5
7930  (exit $ac_status); } &&
7931         { ac_try='test -s conftest.$ac_objext'
7932  { (eval echo "$as_me:7932: \"$ac_try\"") >&5
7933  (eval $ac_try) 2>&5
7934  ac_status=$?
7935  echo "$as_me:7935: \$? = $ac_status" >&5
7936  (exit $ac_status); }; }; then
7937  :
7938else
7939  echo "$as_me: failed program was:" >&5
7940cat conftest.$ac_ext >&5
7941cf_cv_posix_c_source=no
7942fi
7943rm -f conftest.$ac_objext conftest.$ac_ext
7944	 CFLAGS="$cf_save_CFLAGS"
7945	 CPPFLAGS="$cf_save_CPPFLAGS"
7946
7947fi
7948rm -f conftest.$ac_objext conftest.$ac_ext
7949
7950fi
7951echo "$as_me:7951: result: $cf_cv_posix_c_source" >&5
7952echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7953
7954if test "$cf_cv_posix_c_source" != no ; then
7955	CFLAGS="$cf_trim_CFLAGS"
7956	CPPFLAGS="$cf_trim_CPPFLAGS"
7957
7958cf_fix_cppflags=no
7959cf_new_cflags=
7960cf_new_cppflags=
7961cf_new_extra_cppflags=
7962
7963for cf_add_cflags in $cf_cv_posix_c_source
7964do
7965case $cf_fix_cppflags in
7966no)
7967	case $cf_add_cflags in #(vi
7968	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7969		case $cf_add_cflags in
7970		-D*)
7971			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7972
7973			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7974				&& test -z "${cf_tst_cflags}" \
7975				&& cf_fix_cppflags=yes
7976
7977			if test $cf_fix_cppflags = yes ; then
7978				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7979				continue
7980			elif test "${cf_tst_cflags}" = "\"'" ; then
7981				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7982				continue
7983			fi
7984			;;
7985		esac
7986		case "$CPPFLAGS" in
7987		*$cf_add_cflags) #(vi
7988			;;
7989		*) #(vi
7990			case $cf_add_cflags in #(vi
7991			-D*)
7992				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7993
7994CPPFLAGS=`echo "$CPPFLAGS" | \
7995	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
7996		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
7997
7998				;;
7999			esac
8000			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8001			;;
8002		esac
8003		;;
8004	*)
8005		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8006		;;
8007	esac
8008	;;
8009yes)
8010	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8011
8012	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8013
8014	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8015		&& test -z "${cf_tst_cflags}" \
8016		&& cf_fix_cppflags=no
8017	;;
8018esac
8019done
8020
8021if test -n "$cf_new_cflags" ; then
8022
8023	CFLAGS="$CFLAGS $cf_new_cflags"
8024fi
8025
8026if test -n "$cf_new_cppflags" ; then
8027
8028	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8029fi
8030
8031if test -n "$cf_new_extra_cppflags" ; then
8032
8033	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8034fi
8035
8036fi
8037
8038	;;
8039esac
8040
8041if test -n "$cf_xopen_source" ; then
8042
8043cf_fix_cppflags=no
8044cf_new_cflags=
8045cf_new_cppflags=
8046cf_new_extra_cppflags=
8047
8048for cf_add_cflags in $cf_xopen_source
8049do
8050case $cf_fix_cppflags in
8051no)
8052	case $cf_add_cflags in #(vi
8053	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8054		case $cf_add_cflags in
8055		-D*)
8056			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8057
8058			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8059				&& test -z "${cf_tst_cflags}" \
8060				&& cf_fix_cppflags=yes
8061
8062			if test $cf_fix_cppflags = yes ; then
8063				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8064				continue
8065			elif test "${cf_tst_cflags}" = "\"'" ; then
8066				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8067				continue
8068			fi
8069			;;
8070		esac
8071		case "$CPPFLAGS" in
8072		*$cf_add_cflags) #(vi
8073			;;
8074		*) #(vi
8075			case $cf_add_cflags in #(vi
8076			-D*)
8077				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8078
8079CPPFLAGS=`echo "$CPPFLAGS" | \
8080	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8081		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8082
8083				;;
8084			esac
8085			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8086			;;
8087		esac
8088		;;
8089	*)
8090		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8091		;;
8092	esac
8093	;;
8094yes)
8095	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8096
8097	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8098
8099	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8100		&& test -z "${cf_tst_cflags}" \
8101		&& cf_fix_cppflags=no
8102	;;
8103esac
8104done
8105
8106if test -n "$cf_new_cflags" ; then
8107
8108	CFLAGS="$CFLAGS $cf_new_cflags"
8109fi
8110
8111if test -n "$cf_new_cppflags" ; then
8112
8113	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8114fi
8115
8116if test -n "$cf_new_extra_cppflags" ; then
8117
8118	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8119fi
8120
8121fi
8122
8123if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8124	echo "$as_me:8124: checking if _XOPEN_SOURCE really is set" >&5
8125echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8126	cat >conftest.$ac_ext <<_ACEOF
8127#line 8127 "configure"
8128#include "confdefs.h"
8129#include <stdlib.h>
8130int
8131main ()
8132{
8133
8134#ifndef _XOPEN_SOURCE
8135make an error
8136#endif
8137  ;
8138  return 0;
8139}
8140_ACEOF
8141rm -f conftest.$ac_objext
8142if { (eval echo "$as_me:8142: \"$ac_compile\"") >&5
8143  (eval $ac_compile) 2>&5
8144  ac_status=$?
8145  echo "$as_me:8145: \$? = $ac_status" >&5
8146  (exit $ac_status); } &&
8147         { ac_try='test -s conftest.$ac_objext'
8148  { (eval echo "$as_me:8148: \"$ac_try\"") >&5
8149  (eval $ac_try) 2>&5
8150  ac_status=$?
8151  echo "$as_me:8151: \$? = $ac_status" >&5
8152  (exit $ac_status); }; }; then
8153  cf_XOPEN_SOURCE_set=yes
8154else
8155  echo "$as_me: failed program was:" >&5
8156cat conftest.$ac_ext >&5
8157cf_XOPEN_SOURCE_set=no
8158fi
8159rm -f conftest.$ac_objext conftest.$ac_ext
8160	echo "$as_me:8160: result: $cf_XOPEN_SOURCE_set" >&5
8161echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8162	if test $cf_XOPEN_SOURCE_set = yes
8163	then
8164		cat >conftest.$ac_ext <<_ACEOF
8165#line 8165 "configure"
8166#include "confdefs.h"
8167#include <stdlib.h>
8168int
8169main ()
8170{
8171
8172#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8173make an error
8174#endif
8175  ;
8176  return 0;
8177}
8178_ACEOF
8179rm -f conftest.$ac_objext
8180if { (eval echo "$as_me:8180: \"$ac_compile\"") >&5
8181  (eval $ac_compile) 2>&5
8182  ac_status=$?
8183  echo "$as_me:8183: \$? = $ac_status" >&5
8184  (exit $ac_status); } &&
8185         { ac_try='test -s conftest.$ac_objext'
8186  { (eval echo "$as_me:8186: \"$ac_try\"") >&5
8187  (eval $ac_try) 2>&5
8188  ac_status=$?
8189  echo "$as_me:8189: \$? = $ac_status" >&5
8190  (exit $ac_status); }; }; then
8191  cf_XOPEN_SOURCE_set_ok=yes
8192else
8193  echo "$as_me: failed program was:" >&5
8194cat conftest.$ac_ext >&5
8195cf_XOPEN_SOURCE_set_ok=no
8196fi
8197rm -f conftest.$ac_objext conftest.$ac_ext
8198		if test $cf_XOPEN_SOURCE_set_ok = no
8199		then
8200			{ echo "$as_me:8200: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8201echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8202		fi
8203	else
8204
8205echo "$as_me:8205: checking if we should define _XOPEN_SOURCE" >&5
8206echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8207if test "${cf_cv_xopen_source+set}" = set; then
8208  echo $ECHO_N "(cached) $ECHO_C" >&6
8209else
8210
8211	cat >conftest.$ac_ext <<_ACEOF
8212#line 8212 "configure"
8213#include "confdefs.h"
8214
8215#include <stdlib.h>
8216#include <string.h>
8217#include <sys/types.h>
8218
8219int
8220main ()
8221{
8222
8223#ifndef _XOPEN_SOURCE
8224make an error
8225#endif
8226  ;
8227  return 0;
8228}
8229_ACEOF
8230rm -f conftest.$ac_objext
8231if { (eval echo "$as_me:8231: \"$ac_compile\"") >&5
8232  (eval $ac_compile) 2>&5
8233  ac_status=$?
8234  echo "$as_me:8234: \$? = $ac_status" >&5
8235  (exit $ac_status); } &&
8236         { ac_try='test -s conftest.$ac_objext'
8237  { (eval echo "$as_me:8237: \"$ac_try\"") >&5
8238  (eval $ac_try) 2>&5
8239  ac_status=$?
8240  echo "$as_me:8240: \$? = $ac_status" >&5
8241  (exit $ac_status); }; }; then
8242  cf_cv_xopen_source=no
8243else
8244  echo "$as_me: failed program was:" >&5
8245cat conftest.$ac_ext >&5
8246cf_save="$CPPFLAGS"
8247	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8248	 cat >conftest.$ac_ext <<_ACEOF
8249#line 8249 "configure"
8250#include "confdefs.h"
8251
8252#include <stdlib.h>
8253#include <string.h>
8254#include <sys/types.h>
8255
8256int
8257main ()
8258{
8259
8260#ifdef _XOPEN_SOURCE
8261make an error
8262#endif
8263  ;
8264  return 0;
8265}
8266_ACEOF
8267rm -f conftest.$ac_objext
8268if { (eval echo "$as_me:8268: \"$ac_compile\"") >&5
8269  (eval $ac_compile) 2>&5
8270  ac_status=$?
8271  echo "$as_me:8271: \$? = $ac_status" >&5
8272  (exit $ac_status); } &&
8273         { ac_try='test -s conftest.$ac_objext'
8274  { (eval echo "$as_me:8274: \"$ac_try\"") >&5
8275  (eval $ac_try) 2>&5
8276  ac_status=$?
8277  echo "$as_me:8277: \$? = $ac_status" >&5
8278  (exit $ac_status); }; }; then
8279  cf_cv_xopen_source=no
8280else
8281  echo "$as_me: failed program was:" >&5
8282cat conftest.$ac_ext >&5
8283cf_cv_xopen_source=$cf_XOPEN_SOURCE
8284fi
8285rm -f conftest.$ac_objext conftest.$ac_ext
8286	CPPFLAGS="$cf_save"
8287
8288fi
8289rm -f conftest.$ac_objext conftest.$ac_ext
8290
8291fi
8292echo "$as_me:8292: result: $cf_cv_xopen_source" >&5
8293echo "${ECHO_T}$cf_cv_xopen_source" >&6
8294
8295if test "$cf_cv_xopen_source" != no ; then
8296
8297CFLAGS=`echo "$CFLAGS" | \
8298	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
8299		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
8300
8301CPPFLAGS=`echo "$CPPFLAGS" | \
8302	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
8303		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
8304
8305	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8306
8307cf_fix_cppflags=no
8308cf_new_cflags=
8309cf_new_cppflags=
8310cf_new_extra_cppflags=
8311
8312for cf_add_cflags in $cf_temp_xopen_source
8313do
8314case $cf_fix_cppflags in
8315no)
8316	case $cf_add_cflags in #(vi
8317	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8318		case $cf_add_cflags in
8319		-D*)
8320			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8321
8322			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8323				&& test -z "${cf_tst_cflags}" \
8324				&& cf_fix_cppflags=yes
8325
8326			if test $cf_fix_cppflags = yes ; then
8327				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8328				continue
8329			elif test "${cf_tst_cflags}" = "\"'" ; then
8330				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8331				continue
8332			fi
8333			;;
8334		esac
8335		case "$CPPFLAGS" in
8336		*$cf_add_cflags) #(vi
8337			;;
8338		*) #(vi
8339			case $cf_add_cflags in #(vi
8340			-D*)
8341				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8342
8343CPPFLAGS=`echo "$CPPFLAGS" | \
8344	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8345		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8346
8347				;;
8348			esac
8349			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8350			;;
8351		esac
8352		;;
8353	*)
8354		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8355		;;
8356	esac
8357	;;
8358yes)
8359	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8360
8361	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8362
8363	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8364		&& test -z "${cf_tst_cflags}" \
8365		&& cf_fix_cppflags=no
8366	;;
8367esac
8368done
8369
8370if test -n "$cf_new_cflags" ; then
8371
8372	CFLAGS="$CFLAGS $cf_new_cflags"
8373fi
8374
8375if test -n "$cf_new_cppflags" ; then
8376
8377	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8378fi
8379
8380if test -n "$cf_new_extra_cppflags" ; then
8381
8382	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8383fi
8384
8385fi
8386
8387	fi
8388fi
8389
8390# Work around breakage on OS X
8391
8392echo "$as_me:8392: checking if SIGWINCH is defined" >&5
8393echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8394if test "${cf_cv_define_sigwinch+set}" = set; then
8395  echo $ECHO_N "(cached) $ECHO_C" >&6
8396else
8397
8398	cat >conftest.$ac_ext <<_ACEOF
8399#line 8399 "configure"
8400#include "confdefs.h"
8401
8402#include <sys/types.h>
8403#include <sys/signal.h>
8404
8405int
8406main ()
8407{
8408int x = SIGWINCH
8409  ;
8410  return 0;
8411}
8412_ACEOF
8413rm -f conftest.$ac_objext
8414if { (eval echo "$as_me:8414: \"$ac_compile\"") >&5
8415  (eval $ac_compile) 2>&5
8416  ac_status=$?
8417  echo "$as_me:8417: \$? = $ac_status" >&5
8418  (exit $ac_status); } &&
8419         { ac_try='test -s conftest.$ac_objext'
8420  { (eval echo "$as_me:8420: \"$ac_try\"") >&5
8421  (eval $ac_try) 2>&5
8422  ac_status=$?
8423  echo "$as_me:8423: \$? = $ac_status" >&5
8424  (exit $ac_status); }; }; then
8425  cf_cv_define_sigwinch=yes
8426else
8427  echo "$as_me: failed program was:" >&5
8428cat conftest.$ac_ext >&5
8429cat >conftest.$ac_ext <<_ACEOF
8430#line 8430 "configure"
8431#include "confdefs.h"
8432
8433#undef _XOPEN_SOURCE
8434#undef _POSIX_SOURCE
8435#undef _POSIX_C_SOURCE
8436#include <sys/types.h>
8437#include <sys/signal.h>
8438
8439int
8440main ()
8441{
8442int x = SIGWINCH
8443  ;
8444  return 0;
8445}
8446_ACEOF
8447rm -f conftest.$ac_objext
8448if { (eval echo "$as_me:8448: \"$ac_compile\"") >&5
8449  (eval $ac_compile) 2>&5
8450  ac_status=$?
8451  echo "$as_me:8451: \$? = $ac_status" >&5
8452  (exit $ac_status); } &&
8453         { ac_try='test -s conftest.$ac_objext'
8454  { (eval echo "$as_me:8454: \"$ac_try\"") >&5
8455  (eval $ac_try) 2>&5
8456  ac_status=$?
8457  echo "$as_me:8457: \$? = $ac_status" >&5
8458  (exit $ac_status); }; }; then
8459  cf_cv_define_sigwinch=maybe
8460else
8461  echo "$as_me: failed program was:" >&5
8462cat conftest.$ac_ext >&5
8463cf_cv_define_sigwinch=no
8464fi
8465rm -f conftest.$ac_objext conftest.$ac_ext
8466
8467fi
8468rm -f conftest.$ac_objext conftest.$ac_ext
8469
8470fi
8471echo "$as_me:8471: result: $cf_cv_define_sigwinch" >&5
8472echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8473
8474if test "$cf_cv_define_sigwinch" = maybe ; then
8475echo "$as_me:8475: checking for actual SIGWINCH definition" >&5
8476echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8477if test "${cf_cv_fixup_sigwinch+set}" = set; then
8478  echo $ECHO_N "(cached) $ECHO_C" >&6
8479else
8480
8481cf_cv_fixup_sigwinch=unknown
8482cf_sigwinch=32
8483while test $cf_sigwinch != 1
8484do
8485	cat >conftest.$ac_ext <<_ACEOF
8486#line 8486 "configure"
8487#include "confdefs.h"
8488
8489#undef _XOPEN_SOURCE
8490#undef _POSIX_SOURCE
8491#undef _POSIX_C_SOURCE
8492#include <sys/types.h>
8493#include <sys/signal.h>
8494
8495int
8496main ()
8497{
8498
8499#if SIGWINCH != $cf_sigwinch
8500make an error
8501#endif
8502int x = SIGWINCH
8503  ;
8504  return 0;
8505}
8506_ACEOF
8507rm -f conftest.$ac_objext
8508if { (eval echo "$as_me:8508: \"$ac_compile\"") >&5
8509  (eval $ac_compile) 2>&5
8510  ac_status=$?
8511  echo "$as_me:8511: \$? = $ac_status" >&5
8512  (exit $ac_status); } &&
8513         { ac_try='test -s conftest.$ac_objext'
8514  { (eval echo "$as_me:8514: \"$ac_try\"") >&5
8515  (eval $ac_try) 2>&5
8516  ac_status=$?
8517  echo "$as_me:8517: \$? = $ac_status" >&5
8518  (exit $ac_status); }; }; then
8519  cf_cv_fixup_sigwinch=$cf_sigwinch
8520	 break
8521else
8522  echo "$as_me: failed program was:" >&5
8523cat conftest.$ac_ext >&5
8524fi
8525rm -f conftest.$ac_objext conftest.$ac_ext
8526
8527cf_sigwinch=`expr $cf_sigwinch - 1`
8528done
8529
8530fi
8531echo "$as_me:8531: result: $cf_cv_fixup_sigwinch" >&5
8532echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8533
8534	if test "$cf_cv_fixup_sigwinch" != unknown ; then
8535		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8536	fi
8537fi
8538
8539# Checks for CODESET support.
8540
8541  echo "$as_me:8541: checking for nl_langinfo and CODESET" >&5
8542echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8543if test "${am_cv_langinfo_codeset+set}" = set; then
8544  echo $ECHO_N "(cached) $ECHO_C" >&6
8545else
8546  cat >conftest.$ac_ext <<_ACEOF
8547#line 8547 "configure"
8548#include "confdefs.h"
8549#include <langinfo.h>
8550int
8551main ()
8552{
8553char* cs = nl_langinfo(CODESET);
8554  ;
8555  return 0;
8556}
8557_ACEOF
8558rm -f conftest.$ac_objext conftest$ac_exeext
8559if { (eval echo "$as_me:8559: \"$ac_link\"") >&5
8560  (eval $ac_link) 2>&5
8561  ac_status=$?
8562  echo "$as_me:8562: \$? = $ac_status" >&5
8563  (exit $ac_status); } &&
8564         { ac_try='test -s conftest$ac_exeext'
8565  { (eval echo "$as_me:8565: \"$ac_try\"") >&5
8566  (eval $ac_try) 2>&5
8567  ac_status=$?
8568  echo "$as_me:8568: \$? = $ac_status" >&5
8569  (exit $ac_status); }; }; then
8570  am_cv_langinfo_codeset=yes
8571else
8572  echo "$as_me: failed program was:" >&5
8573cat conftest.$ac_ext >&5
8574am_cv_langinfo_codeset=no
8575fi
8576rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8577
8578fi
8579echo "$as_me:8579: result: $am_cv_langinfo_codeset" >&5
8580echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8581  if test $am_cv_langinfo_codeset = yes; then
8582
8583cat >>confdefs.h <<\EOF
8584#define HAVE_LANGINFO_CODESET 1
8585EOF
8586
8587  fi
8588
8589# use these variables to work around a defect in gcc's fixincludes.
8590NCURSES_OK_WCHAR_T=
8591NCURSES_OK_WINT_T=
8592
8593echo "$as_me:8593: checking if you want wide-character code" >&5
8594echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8595
8596# Check whether --enable-widec or --disable-widec was given.
8597if test "${enable_widec+set}" = set; then
8598  enableval="$enable_widec"
8599  with_widec=$enableval
8600else
8601  with_widec=no
8602fi;
8603echo "$as_me:8603: result: $with_widec" >&5
8604echo "${ECHO_T}$with_widec" >&6
8605if test "x$with_widec" = xyes ; then
8606	LIB_SUFFIX="w${LIB_SUFFIX}"
8607
8608cat >>confdefs.h <<\EOF
8609#define USE_WIDEC_SUPPORT 1
8610EOF
8611
8612cat >>confdefs.h <<\EOF
8613#define NCURSES_WIDECHAR 1
8614EOF
8615
8616echo "$as_me:8616: checking if wchar.h can be used as is" >&5
8617echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8618if test "${cf_cv_wchar_h_okay+set}" = set; then
8619  echo $ECHO_N "(cached) $ECHO_C" >&6
8620else
8621
8622cat >conftest.$ac_ext <<_ACEOF
8623#line 8623 "configure"
8624#include "confdefs.h"
8625
8626#include <stdlib.h>
8627#include <wchar.h>
8628
8629int
8630main ()
8631{
8632
8633	wint_t foo = 0;
8634	int bar = iswpunct(foo)
8635  ;
8636  return 0;
8637}
8638_ACEOF
8639rm -f conftest.$ac_objext
8640if { (eval echo "$as_me:8640: \"$ac_compile\"") >&5
8641  (eval $ac_compile) 2>&5
8642  ac_status=$?
8643  echo "$as_me:8643: \$? = $ac_status" >&5
8644  (exit $ac_status); } &&
8645         { ac_try='test -s conftest.$ac_objext'
8646  { (eval echo "$as_me:8646: \"$ac_try\"") >&5
8647  (eval $ac_try) 2>&5
8648  ac_status=$?
8649  echo "$as_me:8649: \$? = $ac_status" >&5
8650  (exit $ac_status); }; }; then
8651  cf_cv_wchar_h_okay=yes
8652else
8653  echo "$as_me: failed program was:" >&5
8654cat conftest.$ac_ext >&5
8655cf_cv_wchar_h_okay=no
8656fi
8657rm -f conftest.$ac_objext conftest.$ac_ext
8658fi
8659echo "$as_me:8659: result: $cf_cv_wchar_h_okay" >&5
8660echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8661
8662if test $cf_cv_wchar_h_okay = no
8663then
8664
8665echo "$as_me:8665: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8666echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8667cat >conftest.$ac_ext <<_ACEOF
8668#line 8668 "configure"
8669#include "confdefs.h"
8670#include <sys/types.h>
8671
8672int
8673main ()
8674{
8675
8676#ifndef _XOPEN_SOURCE_EXTENDED
8677make an error
8678#endif
8679  ;
8680  return 0;
8681}
8682_ACEOF
8683rm -f conftest.$ac_objext
8684if { (eval echo "$as_me:8684: \"$ac_compile\"") >&5
8685  (eval $ac_compile) 2>&5
8686  ac_status=$?
8687  echo "$as_me:8687: \$? = $ac_status" >&5
8688  (exit $ac_status); } &&
8689         { ac_try='test -s conftest.$ac_objext'
8690  { (eval echo "$as_me:8690: \"$ac_try\"") >&5
8691  (eval $ac_try) 2>&5
8692  ac_status=$?
8693  echo "$as_me:8693: \$? = $ac_status" >&5
8694  (exit $ac_status); }; }; then
8695  cf_result=no
8696else
8697  echo "$as_me: failed program was:" >&5
8698cat conftest.$ac_ext >&5
8699cf_result=yes
8700fi
8701rm -f conftest.$ac_objext conftest.$ac_ext
8702echo "$as_me:8702: result: $cf_result" >&5
8703echo "${ECHO_T}$cf_result" >&6
8704
8705if test "$cf_result" = yes ; then
8706	CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8707elif test "x" != "x" ; then
8708	echo "$as_me:8708: checking checking for compatible value versus " >&5
8709echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8710	cat >conftest.$ac_ext <<_ACEOF
8711#line 8711 "configure"
8712#include "confdefs.h"
8713#include <sys/types.h>
8714
8715int
8716main ()
8717{
8718
8719#if _XOPEN_SOURCE_EXTENDED- < 0
8720make an error
8721#endif
8722  ;
8723  return 0;
8724}
8725_ACEOF
8726rm -f conftest.$ac_objext
8727if { (eval echo "$as_me:8727: \"$ac_compile\"") >&5
8728  (eval $ac_compile) 2>&5
8729  ac_status=$?
8730  echo "$as_me:8730: \$? = $ac_status" >&5
8731  (exit $ac_status); } &&
8732         { ac_try='test -s conftest.$ac_objext'
8733  { (eval echo "$as_me:8733: \"$ac_try\"") >&5
8734  (eval $ac_try) 2>&5
8735  ac_status=$?
8736  echo "$as_me:8736: \$? = $ac_status" >&5
8737  (exit $ac_status); }; }; then
8738  cf_result=yes
8739else
8740  echo "$as_me: failed program was:" >&5
8741cat conftest.$ac_ext >&5
8742cf_result=no
8743fi
8744rm -f conftest.$ac_objext conftest.$ac_ext
8745	echo "$as_me:8745: result: $cf_result" >&5
8746echo "${ECHO_T}$cf_result" >&6
8747	if test "$cf_result" = no ; then
8748		# perhaps we can override it - try...
8749		CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8750	fi
8751fi
8752
8753fi
8754
8755	# with_overwrite=no
8756	NCURSES_CH_T=cchar_t
8757
8758for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8759do
8760as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8761echo "$as_me:8761: checking for $ac_func" >&5
8762echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8763if eval "test \"\${$as_ac_var+set}\" = set"; then
8764  echo $ECHO_N "(cached) $ECHO_C" >&6
8765else
8766  cat >conftest.$ac_ext <<_ACEOF
8767#line 8767 "configure"
8768#include "confdefs.h"
8769/* System header to define __stub macros and hopefully few prototypes,
8770    which can conflict with char $ac_func (); below.  */
8771#include <assert.h>
8772/* Override any gcc2 internal prototype to avoid an error.  */
8773#ifdef __cplusplus
8774extern "C"
8775#endif
8776/* We use char because int might match the return type of a gcc2
8777   builtin and then its argument prototype would still apply.  */
8778char $ac_func ();
8779char (*f) ();
8780
8781int
8782main ()
8783{
8784/* The GNU C library defines this for functions which it implements
8785    to always fail with ENOSYS.  Some functions are actually named
8786    something starting with __ and the normal name is an alias.  */
8787#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8788choke me
8789#else
8790f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8791#endif
8792
8793  ;
8794  return 0;
8795}
8796_ACEOF
8797rm -f conftest.$ac_objext conftest$ac_exeext
8798if { (eval echo "$as_me:8798: \"$ac_link\"") >&5
8799  (eval $ac_link) 2>&5
8800  ac_status=$?
8801  echo "$as_me:8801: \$? = $ac_status" >&5
8802  (exit $ac_status); } &&
8803         { ac_try='test -s conftest$ac_exeext'
8804  { (eval echo "$as_me:8804: \"$ac_try\"") >&5
8805  (eval $ac_try) 2>&5
8806  ac_status=$?
8807  echo "$as_me:8807: \$? = $ac_status" >&5
8808  (exit $ac_status); }; }; then
8809  eval "$as_ac_var=yes"
8810else
8811  echo "$as_me: failed program was:" >&5
8812cat conftest.$ac_ext >&5
8813eval "$as_ac_var=no"
8814fi
8815rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8816fi
8817echo "$as_me:8817: result: `eval echo '${'$as_ac_var'}'`" >&5
8818echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8819if test `eval echo '${'$as_ac_var'}'` = yes; then
8820  cat >>confdefs.h <<EOF
8821#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8822EOF
8823
8824fi
8825done
8826
8827	if test "x$ac_cv_func_putwc" != xyes ; then
8828
8829echo "$as_me:8829: checking for multibyte character support" >&5
8830echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8831if test "${cf_cv_utf8_lib+set}" = set; then
8832  echo $ECHO_N "(cached) $ECHO_C" >&6
8833else
8834
8835	cf_save_LIBS="$LIBS"
8836	cat >conftest.$ac_ext <<_ACEOF
8837#line 8837 "configure"
8838#include "confdefs.h"
8839
8840#include <stdlib.h>
8841int
8842main ()
8843{
8844putwc(0,0);
8845  ;
8846  return 0;
8847}
8848_ACEOF
8849rm -f conftest.$ac_objext conftest$ac_exeext
8850if { (eval echo "$as_me:8850: \"$ac_link\"") >&5
8851  (eval $ac_link) 2>&5
8852  ac_status=$?
8853  echo "$as_me:8853: \$? = $ac_status" >&5
8854  (exit $ac_status); } &&
8855         { ac_try='test -s conftest$ac_exeext'
8856  { (eval echo "$as_me:8856: \"$ac_try\"") >&5
8857  (eval $ac_try) 2>&5
8858  ac_status=$?
8859  echo "$as_me:8859: \$? = $ac_status" >&5
8860  (exit $ac_status); }; }; then
8861  cf_cv_utf8_lib=yes
8862else
8863  echo "$as_me: failed program was:" >&5
8864cat conftest.$ac_ext >&5
8865
8866# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8867# will be set on completion of the AC_TRY_LINK below.
8868cf_cv_header_path_utf8=
8869cf_cv_library_path_utf8=
8870
8871echo "${as_me:-configure}:8871: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8872
8873cf_save_LIBS="$LIBS"
8874
8875cat >conftest.$ac_ext <<_ACEOF
8876#line 8876 "configure"
8877#include "confdefs.h"
8878
8879#include <libutf8.h>
8880int
8881main ()
8882{
8883putwc(0,0);
8884  ;
8885  return 0;
8886}
8887_ACEOF
8888rm -f conftest.$ac_objext conftest$ac_exeext
8889if { (eval echo "$as_me:8889: \"$ac_link\"") >&5
8890  (eval $ac_link) 2>&5
8891  ac_status=$?
8892  echo "$as_me:8892: \$? = $ac_status" >&5
8893  (exit $ac_status); } &&
8894         { ac_try='test -s conftest$ac_exeext'
8895  { (eval echo "$as_me:8895: \"$ac_try\"") >&5
8896  (eval $ac_try) 2>&5
8897  ac_status=$?
8898  echo "$as_me:8898: \$? = $ac_status" >&5
8899  (exit $ac_status); }; }; then
8900
8901	cf_cv_find_linkage_utf8=yes
8902	cf_cv_header_path_utf8=/usr/include
8903	cf_cv_library_path_utf8=/usr/lib
8904
8905else
8906  echo "$as_me: failed program was:" >&5
8907cat conftest.$ac_ext >&5
8908
8909LIBS="-lutf8  $cf_save_LIBS"
8910
8911cat >conftest.$ac_ext <<_ACEOF
8912#line 8912 "configure"
8913#include "confdefs.h"
8914
8915#include <libutf8.h>
8916int
8917main ()
8918{
8919putwc(0,0);
8920  ;
8921  return 0;
8922}
8923_ACEOF
8924rm -f conftest.$ac_objext conftest$ac_exeext
8925if { (eval echo "$as_me:8925: \"$ac_link\"") >&5
8926  (eval $ac_link) 2>&5
8927  ac_status=$?
8928  echo "$as_me:8928: \$? = $ac_status" >&5
8929  (exit $ac_status); } &&
8930         { ac_try='test -s conftest$ac_exeext'
8931  { (eval echo "$as_me:8931: \"$ac_try\"") >&5
8932  (eval $ac_try) 2>&5
8933  ac_status=$?
8934  echo "$as_me:8934: \$? = $ac_status" >&5
8935  (exit $ac_status); }; }; then
8936
8937	cf_cv_find_linkage_utf8=yes
8938	cf_cv_header_path_utf8=/usr/include
8939	cf_cv_library_path_utf8=/usr/lib
8940	cf_cv_library_file_utf8="-lutf8"
8941
8942else
8943  echo "$as_me: failed program was:" >&5
8944cat conftest.$ac_ext >&5
8945
8946	cf_cv_find_linkage_utf8=no
8947	LIBS="$cf_save_LIBS"
8948
8949    test -n "$verbose" && echo "	find linkage for utf8 library" 1>&6
8950
8951echo "${as_me:-configure}:8951: testing find linkage for utf8 library ..." 1>&5
8952
8953echo "${as_me:-configure}:8953: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8954
8955    cf_save_CPPFLAGS="$CPPFLAGS"
8956    cf_test_CPPFLAGS="$CPPFLAGS"
8957
8958cf_search=
8959
8960# collect the current set of include-directories from compiler flags
8961cf_header_path_list=""
8962if test -n "${CFLAGS}${CPPFLAGS}" ; then
8963	for cf_header_path in $CPPFLAGS $CFLAGS
8964	do
8965		case $cf_header_path in #(vi
8966		-I*)
8967			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8968
8969test "x$cf_header_path" != "xNONE" && \
8970test -d "$cf_header_path" && \
8971 {
8972	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
8973	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8974	test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8975	test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8976	test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8977	test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8978}
8979
8980			cf_header_path_list="$cf_header_path_list $cf_search"
8981			;;
8982		esac
8983	done
8984fi
8985
8986# add the variations for the package we are looking for
8987
8988cf_search=
8989
8990test "x/usr" != "x$prefix" && \
8991test -d "/usr" && \
8992(test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
8993	test -n "$verbose" && echo "	... testing for include-directories under /usr"
8994	test -d /usr/include &&          cf_search="$cf_search /usr/include"
8995	test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8996	test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8997	test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8998	test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8999}
9000
9001test "x$prefix" != "xNONE" && \
9002test -d "$prefix" && \
9003 {
9004	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
9005	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9006	test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9007	test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9008	test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9009	test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9010}
9011
9012test "x/usr/local" != "x$prefix" && \
9013test -d "/usr/local" && \
9014(test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9015	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
9016	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
9017	test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
9018	test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
9019	test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
9020	test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
9021}
9022
9023test "x/opt" != "x$prefix" && \
9024test -d "/opt" && \
9025(test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9026	test -n "$verbose" && echo "	... testing for include-directories under /opt"
9027	test -d /opt/include &&          cf_search="$cf_search /opt/include"
9028	test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
9029	test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
9030	test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
9031	test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
9032}
9033
9034test "x$HOME" != "x$prefix" && \
9035test -d "$HOME" && \
9036(test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9037	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
9038	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
9039	test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
9040	test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
9041	test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
9042	test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
9043}
9044
9045test "$includedir" != NONE && \
9046test "$includedir" != "/usr/include" && \
9047test -d "$includedir" && {
9048	test -d $includedir &&    cf_search="$cf_search $includedir"
9049	test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9050}
9051
9052test "$oldincludedir" != NONE && \
9053test "$oldincludedir" != "/usr/include" && \
9054test -d "$oldincludedir" && {
9055	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9056	test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9057}
9058
9059cf_search="$cf_search $cf_header_path_list"
9060
9061    for cf_cv_header_path_utf8 in $cf_search
9062    do
9063      if test -d $cf_cv_header_path_utf8 ; then
9064        test -n "$verbose" && echo "	... testing $cf_cv_header_path_utf8" 1>&6
9065
9066echo "${as_me:-configure}:9066: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9067
9068        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9069        cat >conftest.$ac_ext <<_ACEOF
9070#line 9070 "configure"
9071#include "confdefs.h"
9072
9073#include <libutf8.h>
9074int
9075main ()
9076{
9077putwc(0,0);
9078  ;
9079  return 0;
9080}
9081_ACEOF
9082rm -f conftest.$ac_objext
9083if { (eval echo "$as_me:9083: \"$ac_compile\"") >&5
9084  (eval $ac_compile) 2>&5
9085  ac_status=$?
9086  echo "$as_me:9086: \$? = $ac_status" >&5
9087  (exit $ac_status); } &&
9088         { ac_try='test -s conftest.$ac_objext'
9089  { (eval echo "$as_me:9089: \"$ac_try\"") >&5
9090  (eval $ac_try) 2>&5
9091  ac_status=$?
9092  echo "$as_me:9092: \$? = $ac_status" >&5
9093  (exit $ac_status); }; }; then
9094
9095            test -n "$verbose" && echo "	... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9096
9097echo "${as_me:-configure}:9097: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9098
9099            cf_cv_find_linkage_utf8=maybe
9100            cf_test_CPPFLAGS="$CPPFLAGS"
9101            break
9102else
9103  echo "$as_me: failed program was:" >&5
9104cat conftest.$ac_ext >&5
9105
9106            CPPFLAGS="$cf_save_CPPFLAGS"
9107
9108fi
9109rm -f conftest.$ac_objext conftest.$ac_ext
9110      fi
9111    done
9112
9113    if test "$cf_cv_find_linkage_utf8" = maybe ; then
9114
9115echo "${as_me:-configure}:9115: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9116
9117      cf_save_LIBS="$LIBS"
9118      cf_save_LDFLAGS="$LDFLAGS"
9119
9120      if test "$cf_cv_find_linkage_utf8" != yes ; then
9121
9122cf_search=
9123cf_library_path_list=""
9124if test -n "${LDFLAGS}${LIBS}" ; then
9125	for cf_library_path in $LDFLAGS $LIBS
9126	do
9127		case $cf_library_path in #(vi
9128		-L*)
9129			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9130
9131test "x$cf_library_path" != "xNONE" && \
9132test -d "$cf_library_path" && \
9133 {
9134	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
9135	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9136	test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9137	test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9138	test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9139	test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9140}
9141
9142			cf_library_path_list="$cf_library_path_list $cf_search"
9143			;;
9144		esac
9145	done
9146fi
9147
9148cf_search=
9149
9150test "x/usr" != "x$prefix" && \
9151test -d "/usr" && \
9152(test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9153	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
9154	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9155	test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9156	test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9157	test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9158	test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9159}
9160
9161test "x$prefix" != "xNONE" && \
9162test -d "$prefix" && \
9163 {
9164	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
9165	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9166	test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9167	test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9168	test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9169	test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9170}
9171
9172test "x/usr/local" != "x$prefix" && \
9173test -d "/usr/local" && \
9174(test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9175	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
9176	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9177	test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9178	test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9179	test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9180	test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9181}
9182
9183test "x/opt" != "x$prefix" && \
9184test -d "/opt" && \
9185(test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9186	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
9187	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9188	test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9189	test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9190	test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9191	test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9192}
9193
9194test "x$HOME" != "x$prefix" && \
9195test -d "$HOME" && \
9196(test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9197	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
9198	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9199	test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9200	test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9201	test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9202	test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9203}
9204
9205cf_search="$cf_library_path_list $cf_search"
9206
9207        for cf_cv_library_path_utf8 in $cf_search
9208        do
9209          if test -d $cf_cv_library_path_utf8 ; then
9210            test -n "$verbose" && echo "	... testing $cf_cv_library_path_utf8" 1>&6
9211
9212echo "${as_me:-configure}:9212: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9213
9214            CPPFLAGS="$cf_test_CPPFLAGS"
9215            LIBS="-lutf8  $cf_save_LIBS"
9216            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9217            cat >conftest.$ac_ext <<_ACEOF
9218#line 9218 "configure"
9219#include "confdefs.h"
9220
9221#include <libutf8.h>
9222int
9223main ()
9224{
9225putwc(0,0);
9226  ;
9227  return 0;
9228}
9229_ACEOF
9230rm -f conftest.$ac_objext conftest$ac_exeext
9231if { (eval echo "$as_me:9231: \"$ac_link\"") >&5
9232  (eval $ac_link) 2>&5
9233  ac_status=$?
9234  echo "$as_me:9234: \$? = $ac_status" >&5
9235  (exit $ac_status); } &&
9236         { ac_try='test -s conftest$ac_exeext'
9237  { (eval echo "$as_me:9237: \"$ac_try\"") >&5
9238  (eval $ac_try) 2>&5
9239  ac_status=$?
9240  echo "$as_me:9240: \$? = $ac_status" >&5
9241  (exit $ac_status); }; }; then
9242
9243                test -n "$verbose" && echo "	... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9244
9245echo "${as_me:-configure}:9245: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9246
9247                cf_cv_find_linkage_utf8=yes
9248                cf_cv_library_file_utf8="-lutf8"
9249                break
9250else
9251  echo "$as_me: failed program was:" >&5
9252cat conftest.$ac_ext >&5
9253
9254                CPPFLAGS="$cf_save_CPPFLAGS"
9255                LIBS="$cf_save_LIBS"
9256                LDFLAGS="$cf_save_LDFLAGS"
9257
9258fi
9259rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9260          fi
9261        done
9262        CPPFLAGS="$cf_save_CPPFLAGS"
9263        LDFLAGS="$cf_save_LDFLAGS"
9264      fi
9265
9266    else
9267      cf_cv_find_linkage_utf8=no
9268    fi
9269
9270fi
9271rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9272
9273fi
9274rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9275
9276LIBS="$cf_save_LIBS"
9277
9278if test "$cf_cv_find_linkage_utf8" = yes ; then
9279cf_cv_utf8_lib=add-on
9280else
9281cf_cv_utf8_lib=no
9282fi
9283
9284fi
9285rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9286fi
9287echo "$as_me:9287: result: $cf_cv_utf8_lib" >&5
9288echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9289
9290# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9291# ncurses/ncursesw:
9292if test "$cf_cv_utf8_lib" = "add-on" ; then
9293
9294cat >>confdefs.h <<\EOF
9295#define HAVE_LIBUTF8_H 1
9296EOF
9297
9298if test -n "$cf_cv_header_path_utf8" ; then
9299  for cf_add_incdir in $cf_cv_header_path_utf8
9300  do
9301	while test $cf_add_incdir != /usr/include
9302	do
9303	  if test -d $cf_add_incdir
9304	  then
9305		cf_have_incdir=no
9306		if test -n "$CFLAGS$CPPFLAGS" ; then
9307		  # a loop is needed to ensure we can add subdirs of existing dirs
9308		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9309			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9310			  cf_have_incdir=yes; break
9311			fi
9312		  done
9313		fi
9314
9315		if test "$cf_have_incdir" = no ; then
9316		  if test "$cf_add_incdir" = /usr/local/include ; then
9317			if test "$GCC" = yes
9318			then
9319			  cf_save_CPPFLAGS=$CPPFLAGS
9320			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9321			  cat >conftest.$ac_ext <<_ACEOF
9322#line 9322 "configure"
9323#include "confdefs.h"
9324#include <stdio.h>
9325int
9326main ()
9327{
9328printf("Hello")
9329  ;
9330  return 0;
9331}
9332_ACEOF
9333rm -f conftest.$ac_objext
9334if { (eval echo "$as_me:9334: \"$ac_compile\"") >&5
9335  (eval $ac_compile) 2>&5
9336  ac_status=$?
9337  echo "$as_me:9337: \$? = $ac_status" >&5
9338  (exit $ac_status); } &&
9339         { ac_try='test -s conftest.$ac_objext'
9340  { (eval echo "$as_me:9340: \"$ac_try\"") >&5
9341  (eval $ac_try) 2>&5
9342  ac_status=$?
9343  echo "$as_me:9343: \$? = $ac_status" >&5
9344  (exit $ac_status); }; }; then
9345  :
9346else
9347  echo "$as_me: failed program was:" >&5
9348cat conftest.$ac_ext >&5
9349cf_have_incdir=yes
9350fi
9351rm -f conftest.$ac_objext conftest.$ac_ext
9352			  CPPFLAGS=$cf_save_CPPFLAGS
9353			fi
9354		  fi
9355		fi
9356
9357		if test "$cf_have_incdir" = no ; then
9358		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
9359
9360echo "${as_me:-configure}:9360: testing adding $cf_add_incdir to include-path ..." 1>&5
9361
9362		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9363
9364		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9365		  test "$cf_top_incdir" = "$cf_add_incdir" && break
9366		  cf_add_incdir="$cf_top_incdir"
9367		else
9368		  break
9369		fi
9370	  fi
9371	done
9372  done
9373fi
9374
9375if test -n "$cf_cv_library_path_utf8" ; then
9376  for cf_add_libdir in $cf_cv_library_path_utf8
9377  do
9378    if test $cf_add_libdir = /usr/lib ; then
9379      :
9380    elif test -d $cf_add_libdir
9381    then
9382      cf_have_libdir=no
9383      if test -n "$LDFLAGS$LIBS" ; then
9384        # a loop is needed to ensure we can add subdirs of existing dirs
9385        for cf_test_libdir in $LDFLAGS $LIBS ; do
9386          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9387            cf_have_libdir=yes; break
9388          fi
9389        done
9390      fi
9391      if test "$cf_have_libdir" = no ; then
9392        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
9393
9394echo "${as_me:-configure}:9394: testing adding $cf_add_libdir to library-path ..." 1>&5
9395
9396        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9397      fi
9398    fi
9399  done
9400fi
9401
9402	LIBS="$cf_cv_library_file_utf8 $LIBS"
9403fi
9404
9405		if test "$cf_cv_utf8_lib" != no ; then
9406			NCURSES_LIBUTF8=1
9407		fi
9408	fi
9409
9410# This is needed on Tru64 5.0 to declare mbstate_t
9411echo "$as_me:9411: checking if we must include wchar.h to declare mbstate_t" >&5
9412echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9413if test "${cf_cv_mbstate_t+set}" = set; then
9414  echo $ECHO_N "(cached) $ECHO_C" >&6
9415else
9416
9417cat >conftest.$ac_ext <<_ACEOF
9418#line 9418 "configure"
9419#include "confdefs.h"
9420
9421#include <stdlib.h>
9422#include <stdarg.h>
9423#include <stdio.h>
9424#ifdef HAVE_LIBUTF8_H
9425#include <libutf8.h>
9426#endif
9427int
9428main ()
9429{
9430mbstate_t state
9431  ;
9432  return 0;
9433}
9434_ACEOF
9435rm -f conftest.$ac_objext
9436if { (eval echo "$as_me:9436: \"$ac_compile\"") >&5
9437  (eval $ac_compile) 2>&5
9438  ac_status=$?
9439  echo "$as_me:9439: \$? = $ac_status" >&5
9440  (exit $ac_status); } &&
9441         { ac_try='test -s conftest.$ac_objext'
9442  { (eval echo "$as_me:9442: \"$ac_try\"") >&5
9443  (eval $ac_try) 2>&5
9444  ac_status=$?
9445  echo "$as_me:9445: \$? = $ac_status" >&5
9446  (exit $ac_status); }; }; then
9447  cf_cv_mbstate_t=no
9448else
9449  echo "$as_me: failed program was:" >&5
9450cat conftest.$ac_ext >&5
9451cat >conftest.$ac_ext <<_ACEOF
9452#line 9452 "configure"
9453#include "confdefs.h"
9454
9455#include <stdlib.h>
9456#include <stdarg.h>
9457#include <stdio.h>
9458#include <wchar.h>
9459#ifdef HAVE_LIBUTF8_H
9460#include <libutf8.h>
9461#endif
9462int
9463main ()
9464{
9465mbstate_t value
9466  ;
9467  return 0;
9468}
9469_ACEOF
9470rm -f conftest.$ac_objext
9471if { (eval echo "$as_me:9471: \"$ac_compile\"") >&5
9472  (eval $ac_compile) 2>&5
9473  ac_status=$?
9474  echo "$as_me:9474: \$? = $ac_status" >&5
9475  (exit $ac_status); } &&
9476         { ac_try='test -s conftest.$ac_objext'
9477  { (eval echo "$as_me:9477: \"$ac_try\"") >&5
9478  (eval $ac_try) 2>&5
9479  ac_status=$?
9480  echo "$as_me:9480: \$? = $ac_status" >&5
9481  (exit $ac_status); }; }; then
9482  cf_cv_mbstate_t=yes
9483else
9484  echo "$as_me: failed program was:" >&5
9485cat conftest.$ac_ext >&5
9486cf_cv_mbstate_t=unknown
9487fi
9488rm -f conftest.$ac_objext conftest.$ac_ext
9489fi
9490rm -f conftest.$ac_objext conftest.$ac_ext
9491fi
9492echo "$as_me:9492: result: $cf_cv_mbstate_t" >&5
9493echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9494
9495if test "$cf_cv_mbstate_t" = yes ; then
9496
9497cat >>confdefs.h <<\EOF
9498#define NEED_WCHAR_H 1
9499EOF
9500
9501	NEED_WCHAR_H=1
9502fi
9503
9504# if we do not find mbstate_t in either place, use substitution to provide a fallback.
9505if test "$cf_cv_mbstate_t" = unknown ; then
9506	NCURSES_MBSTATE_T=1
9507fi
9508
9509# This is needed on Tru64 5.0 to declare wchar_t
9510echo "$as_me:9510: checking if we must include wchar.h to declare wchar_t" >&5
9511echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9512if test "${cf_cv_wchar_t+set}" = set; then
9513  echo $ECHO_N "(cached) $ECHO_C" >&6
9514else
9515
9516cat >conftest.$ac_ext <<_ACEOF
9517#line 9517 "configure"
9518#include "confdefs.h"
9519
9520#include <stdlib.h>
9521#include <stdarg.h>
9522#include <stdio.h>
9523#ifdef HAVE_LIBUTF8_H
9524#include <libutf8.h>
9525#endif
9526int
9527main ()
9528{
9529wchar_t state
9530  ;
9531  return 0;
9532}
9533_ACEOF
9534rm -f conftest.$ac_objext
9535if { (eval echo "$as_me:9535: \"$ac_compile\"") >&5
9536  (eval $ac_compile) 2>&5
9537  ac_status=$?
9538  echo "$as_me:9538: \$? = $ac_status" >&5
9539  (exit $ac_status); } &&
9540         { ac_try='test -s conftest.$ac_objext'
9541  { (eval echo "$as_me:9541: \"$ac_try\"") >&5
9542  (eval $ac_try) 2>&5
9543  ac_status=$?
9544  echo "$as_me:9544: \$? = $ac_status" >&5
9545  (exit $ac_status); }; }; then
9546  cf_cv_wchar_t=no
9547else
9548  echo "$as_me: failed program was:" >&5
9549cat conftest.$ac_ext >&5
9550cat >conftest.$ac_ext <<_ACEOF
9551#line 9551 "configure"
9552#include "confdefs.h"
9553
9554#include <stdlib.h>
9555#include <stdarg.h>
9556#include <stdio.h>
9557#include <wchar.h>
9558#ifdef HAVE_LIBUTF8_H
9559#include <libutf8.h>
9560#endif
9561int
9562main ()
9563{
9564wchar_t value
9565  ;
9566  return 0;
9567}
9568_ACEOF
9569rm -f conftest.$ac_objext
9570if { (eval echo "$as_me:9570: \"$ac_compile\"") >&5
9571  (eval $ac_compile) 2>&5
9572  ac_status=$?
9573  echo "$as_me:9573: \$? = $ac_status" >&5
9574  (exit $ac_status); } &&
9575         { ac_try='test -s conftest.$ac_objext'
9576  { (eval echo "$as_me:9576: \"$ac_try\"") >&5
9577  (eval $ac_try) 2>&5
9578  ac_status=$?
9579  echo "$as_me:9579: \$? = $ac_status" >&5
9580  (exit $ac_status); }; }; then
9581  cf_cv_wchar_t=yes
9582else
9583  echo "$as_me: failed program was:" >&5
9584cat conftest.$ac_ext >&5
9585cf_cv_wchar_t=unknown
9586fi
9587rm -f conftest.$ac_objext conftest.$ac_ext
9588fi
9589rm -f conftest.$ac_objext conftest.$ac_ext
9590fi
9591echo "$as_me:9591: result: $cf_cv_wchar_t" >&5
9592echo "${ECHO_T}$cf_cv_wchar_t" >&6
9593
9594if test "$cf_cv_wchar_t" = yes ; then
9595
9596cat >>confdefs.h <<\EOF
9597#define NEED_WCHAR_H 1
9598EOF
9599
9600	NEED_WCHAR_H=1
9601fi
9602
9603# if we do not find wchar_t in either place, use substitution to provide a fallback.
9604if test "$cf_cv_wchar_t" = unknown ; then
9605	NCURSES_WCHAR_T=1
9606fi
9607
9608# if we find wchar_t in either place, use substitution to provide a fallback.
9609if test "$cf_cv_wchar_t" != unknown ; then
9610	NCURSES_OK_WCHAR_T=1
9611fi
9612
9613# This is needed on Tru64 5.0 to declare wint_t
9614echo "$as_me:9614: checking if we must include wchar.h to declare wint_t" >&5
9615echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9616if test "${cf_cv_wint_t+set}" = set; then
9617  echo $ECHO_N "(cached) $ECHO_C" >&6
9618else
9619
9620cat >conftest.$ac_ext <<_ACEOF
9621#line 9621 "configure"
9622#include "confdefs.h"
9623
9624#include <stdlib.h>
9625#include <stdarg.h>
9626#include <stdio.h>
9627#ifdef HAVE_LIBUTF8_H
9628#include <libutf8.h>
9629#endif
9630int
9631main ()
9632{
9633wint_t state
9634  ;
9635  return 0;
9636}
9637_ACEOF
9638rm -f conftest.$ac_objext
9639if { (eval echo "$as_me:9639: \"$ac_compile\"") >&5
9640  (eval $ac_compile) 2>&5
9641  ac_status=$?
9642  echo "$as_me:9642: \$? = $ac_status" >&5
9643  (exit $ac_status); } &&
9644         { ac_try='test -s conftest.$ac_objext'
9645  { (eval echo "$as_me:9645: \"$ac_try\"") >&5
9646  (eval $ac_try) 2>&5
9647  ac_status=$?
9648  echo "$as_me:9648: \$? = $ac_status" >&5
9649  (exit $ac_status); }; }; then
9650  cf_cv_wint_t=no
9651else
9652  echo "$as_me: failed program was:" >&5
9653cat conftest.$ac_ext >&5
9654cat >conftest.$ac_ext <<_ACEOF
9655#line 9655 "configure"
9656#include "confdefs.h"
9657
9658#include <stdlib.h>
9659#include <stdarg.h>
9660#include <stdio.h>
9661#include <wchar.h>
9662#ifdef HAVE_LIBUTF8_H
9663#include <libutf8.h>
9664#endif
9665int
9666main ()
9667{
9668wint_t value
9669  ;
9670  return 0;
9671}
9672_ACEOF
9673rm -f conftest.$ac_objext
9674if { (eval echo "$as_me:9674: \"$ac_compile\"") >&5
9675  (eval $ac_compile) 2>&5
9676  ac_status=$?
9677  echo "$as_me:9677: \$? = $ac_status" >&5
9678  (exit $ac_status); } &&
9679         { ac_try='test -s conftest.$ac_objext'
9680  { (eval echo "$as_me:9680: \"$ac_try\"") >&5
9681  (eval $ac_try) 2>&5
9682  ac_status=$?
9683  echo "$as_me:9683: \$? = $ac_status" >&5
9684  (exit $ac_status); }; }; then
9685  cf_cv_wint_t=yes
9686else
9687  echo "$as_me: failed program was:" >&5
9688cat conftest.$ac_ext >&5
9689cf_cv_wint_t=unknown
9690fi
9691rm -f conftest.$ac_objext conftest.$ac_ext
9692fi
9693rm -f conftest.$ac_objext conftest.$ac_ext
9694fi
9695echo "$as_me:9695: result: $cf_cv_wint_t" >&5
9696echo "${ECHO_T}$cf_cv_wint_t" >&6
9697
9698if test "$cf_cv_wint_t" = yes ; then
9699
9700cat >>confdefs.h <<\EOF
9701#define NEED_WCHAR_H 1
9702EOF
9703
9704	NEED_WCHAR_H=1
9705fi
9706
9707# if we do not find wint_t in either place, use substitution to provide a fallback.
9708if test "$cf_cv_wint_t" = unknown ; then
9709	NCURSES_WINT_T=1
9710fi
9711
9712# if we find wint_t in either place, use substitution to provide a fallback.
9713if test "$cf_cv_wint_t" != unknown ; then
9714	NCURSES_OK_WINT_T=1
9715fi
9716
9717	if test "$NCURSES_MBSTATE_T" != 0; then
9718
9719cat >>confdefs.h <<\EOF
9720#define NEED_MBSTATE_T_DEF 1
9721EOF
9722
9723	fi
9724fi
9725
9726###   use option --disable-lp64 to allow long chtype
9727case $cf_cv_abi_version in
9728[345]*)
9729	default_with_lp64=no
9730	;;
9731*)
9732	default_with_lp64=yes
9733	;;
9734esac
9735
9736echo "$as_me:9736: checking whether to enable _LP64 definition in curses.h" >&5
9737echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9738
9739# Check whether --enable-lp64 or --disable-lp64 was given.
9740if test "${enable_lp64+set}" = set; then
9741  enableval="$enable_lp64"
9742  with_lp64=$enableval
9743else
9744  with_lp64=$default_with_lp64
9745fi;
9746echo "$as_me:9746: result: $with_lp64" >&5
9747echo "${ECHO_T}$with_lp64" >&6
9748
9749if test "x$with_lp64" = xyes ; then
9750	cf_cv_enable_lp64=1
9751else
9752	cf_cv_enable_lp64=0
9753fi
9754
9755# Check whether --enable-largefile or --disable-largefile was given.
9756if test "${enable_largefile+set}" = set; then
9757  enableval="$enable_largefile"
9758
9759fi;
9760if test "$enable_largefile" != no; then
9761
9762  echo "$as_me:9762: checking for special C compiler options needed for large files" >&5
9763echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9764if test "${ac_cv_sys_largefile_CC+set}" = set; then
9765  echo $ECHO_N "(cached) $ECHO_C" >&6
9766else
9767  ac_cv_sys_largefile_CC=no
9768     if test "$GCC" != yes; then
9769       ac_save_CC=$CC
9770       while :; do
9771     	 # IRIX 6.2 and later do not support large files by default,
9772     	 # so use the C compiler's -n32 option if that helps.
9773         cat >conftest.$ac_ext <<_ACEOF
9774#line 9774 "configure"
9775#include "confdefs.h"
9776#include <sys/types.h>
9777 /* Check that off_t can represent 2**63 - 1 correctly.
9778    We can't simply define LARGE_OFF_T to be 9223372036854775807,
9779    since some C++ compilers masquerading as C compilers
9780    incorrectly reject 9223372036854775807.  */
9781#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9782  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9783		       && LARGE_OFF_T % 2147483647 == 1)
9784		      ? 1 : -1];
9785int
9786main ()
9787{
9788
9789  ;
9790  return 0;
9791}
9792_ACEOF
9793     	 rm -f conftest.$ac_objext
9794if { (eval echo "$as_me:9794: \"$ac_compile\"") >&5
9795  (eval $ac_compile) 2>&5
9796  ac_status=$?
9797  echo "$as_me:9797: \$? = $ac_status" >&5
9798  (exit $ac_status); } &&
9799         { ac_try='test -s conftest.$ac_objext'
9800  { (eval echo "$as_me:9800: \"$ac_try\"") >&5
9801  (eval $ac_try) 2>&5
9802  ac_status=$?
9803  echo "$as_me:9803: \$? = $ac_status" >&5
9804  (exit $ac_status); }; }; then
9805  break
9806else
9807  echo "$as_me: failed program was:" >&5
9808cat conftest.$ac_ext >&5
9809fi
9810rm -f conftest.$ac_objext
9811     	 CC="$CC -n32"
9812     	 rm -f conftest.$ac_objext
9813if { (eval echo "$as_me:9813: \"$ac_compile\"") >&5
9814  (eval $ac_compile) 2>&5
9815  ac_status=$?
9816  echo "$as_me:9816: \$? = $ac_status" >&5
9817  (exit $ac_status); } &&
9818         { ac_try='test -s conftest.$ac_objext'
9819  { (eval echo "$as_me:9819: \"$ac_try\"") >&5
9820  (eval $ac_try) 2>&5
9821  ac_status=$?
9822  echo "$as_me:9822: \$? = $ac_status" >&5
9823  (exit $ac_status); }; }; then
9824  ac_cv_sys_largefile_CC=' -n32'; break
9825else
9826  echo "$as_me: failed program was:" >&5
9827cat conftest.$ac_ext >&5
9828fi
9829rm -f conftest.$ac_objext
9830         break
9831       done
9832       CC=$ac_save_CC
9833       rm -f conftest.$ac_ext
9834    fi
9835fi
9836echo "$as_me:9836: result: $ac_cv_sys_largefile_CC" >&5
9837echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9838  if test "$ac_cv_sys_largefile_CC" != no; then
9839    CC=$CC$ac_cv_sys_largefile_CC
9840  fi
9841
9842  echo "$as_me:9842: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9843echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9844if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9845  echo $ECHO_N "(cached) $ECHO_C" >&6
9846else
9847  while :; do
9848  ac_cv_sys_file_offset_bits=no
9849  cat >conftest.$ac_ext <<_ACEOF
9850#line 9850 "configure"
9851#include "confdefs.h"
9852#include <sys/types.h>
9853 /* Check that off_t can represent 2**63 - 1 correctly.
9854    We can't simply define LARGE_OFF_T to be 9223372036854775807,
9855    since some C++ compilers masquerading as C compilers
9856    incorrectly reject 9223372036854775807.  */
9857#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9858  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9859		       && LARGE_OFF_T % 2147483647 == 1)
9860		      ? 1 : -1];
9861int
9862main ()
9863{
9864
9865  ;
9866  return 0;
9867}
9868_ACEOF
9869rm -f conftest.$ac_objext
9870if { (eval echo "$as_me:9870: \"$ac_compile\"") >&5
9871  (eval $ac_compile) 2>&5
9872  ac_status=$?
9873  echo "$as_me:9873: \$? = $ac_status" >&5
9874  (exit $ac_status); } &&
9875         { ac_try='test -s conftest.$ac_objext'
9876  { (eval echo "$as_me:9876: \"$ac_try\"") >&5
9877  (eval $ac_try) 2>&5
9878  ac_status=$?
9879  echo "$as_me:9879: \$? = $ac_status" >&5
9880  (exit $ac_status); }; }; then
9881  break
9882else
9883  echo "$as_me: failed program was:" >&5
9884cat conftest.$ac_ext >&5
9885fi
9886rm -f conftest.$ac_objext conftest.$ac_ext
9887  cat >conftest.$ac_ext <<_ACEOF
9888#line 9888 "configure"
9889#include "confdefs.h"
9890#define _FILE_OFFSET_BITS 64
9891#include <sys/types.h>
9892 /* Check that off_t can represent 2**63 - 1 correctly.
9893    We can't simply define LARGE_OFF_T to be 9223372036854775807,
9894    since some C++ compilers masquerading as C compilers
9895    incorrectly reject 9223372036854775807.  */
9896#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9897  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9898		       && LARGE_OFF_T % 2147483647 == 1)
9899		      ? 1 : -1];
9900int
9901main ()
9902{
9903
9904  ;
9905  return 0;
9906}
9907_ACEOF
9908rm -f conftest.$ac_objext
9909if { (eval echo "$as_me:9909: \"$ac_compile\"") >&5
9910  (eval $ac_compile) 2>&5
9911  ac_status=$?
9912  echo "$as_me:9912: \$? = $ac_status" >&5
9913  (exit $ac_status); } &&
9914         { ac_try='test -s conftest.$ac_objext'
9915  { (eval echo "$as_me:9915: \"$ac_try\"") >&5
9916  (eval $ac_try) 2>&5
9917  ac_status=$?
9918  echo "$as_me:9918: \$? = $ac_status" >&5
9919  (exit $ac_status); }; }; then
9920  ac_cv_sys_file_offset_bits=64; break
9921else
9922  echo "$as_me: failed program was:" >&5
9923cat conftest.$ac_ext >&5
9924fi
9925rm -f conftest.$ac_objext conftest.$ac_ext
9926  break
9927done
9928fi
9929echo "$as_me:9929: result: $ac_cv_sys_file_offset_bits" >&5
9930echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9931if test "$ac_cv_sys_file_offset_bits" != no; then
9932
9933cat >>confdefs.h <<EOF
9934#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9935EOF
9936
9937fi
9938rm -rf conftest*
9939  echo "$as_me:9939: checking for _LARGE_FILES value needed for large files" >&5
9940echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9941if test "${ac_cv_sys_large_files+set}" = set; then
9942  echo $ECHO_N "(cached) $ECHO_C" >&6
9943else
9944  while :; do
9945  ac_cv_sys_large_files=no
9946  cat >conftest.$ac_ext <<_ACEOF
9947#line 9947 "configure"
9948#include "confdefs.h"
9949#include <sys/types.h>
9950 /* Check that off_t can represent 2**63 - 1 correctly.
9951    We can't simply define LARGE_OFF_T to be 9223372036854775807,
9952    since some C++ compilers masquerading as C compilers
9953    incorrectly reject 9223372036854775807.  */
9954#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9955  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9956		       && LARGE_OFF_T % 2147483647 == 1)
9957		      ? 1 : -1];
9958int
9959main ()
9960{
9961
9962  ;
9963  return 0;
9964}
9965_ACEOF
9966rm -f conftest.$ac_objext
9967if { (eval echo "$as_me:9967: \"$ac_compile\"") >&5
9968  (eval $ac_compile) 2>&5
9969  ac_status=$?
9970  echo "$as_me:9970: \$? = $ac_status" >&5
9971  (exit $ac_status); } &&
9972         { ac_try='test -s conftest.$ac_objext'
9973  { (eval echo "$as_me:9973: \"$ac_try\"") >&5
9974  (eval $ac_try) 2>&5
9975  ac_status=$?
9976  echo "$as_me:9976: \$? = $ac_status" >&5
9977  (exit $ac_status); }; }; then
9978  break
9979else
9980  echo "$as_me: failed program was:" >&5
9981cat conftest.$ac_ext >&5
9982fi
9983rm -f conftest.$ac_objext conftest.$ac_ext
9984  cat >conftest.$ac_ext <<_ACEOF
9985#line 9985 "configure"
9986#include "confdefs.h"
9987#define _LARGE_FILES 1
9988#include <sys/types.h>
9989 /* Check that off_t can represent 2**63 - 1 correctly.
9990    We can't simply define LARGE_OFF_T to be 9223372036854775807,
9991    since some C++ compilers masquerading as C compilers
9992    incorrectly reject 9223372036854775807.  */
9993#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9994  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9995		       && LARGE_OFF_T % 2147483647 == 1)
9996		      ? 1 : -1];
9997int
9998main ()
9999{
10000
10001  ;
10002  return 0;
10003}
10004_ACEOF
10005rm -f conftest.$ac_objext
10006if { (eval echo "$as_me:10006: \"$ac_compile\"") >&5
10007  (eval $ac_compile) 2>&5
10008  ac_status=$?
10009  echo "$as_me:10009: \$? = $ac_status" >&5
10010  (exit $ac_status); } &&
10011         { ac_try='test -s conftest.$ac_objext'
10012  { (eval echo "$as_me:10012: \"$ac_try\"") >&5
10013  (eval $ac_try) 2>&5
10014  ac_status=$?
10015  echo "$as_me:10015: \$? = $ac_status" >&5
10016  (exit $ac_status); }; }; then
10017  ac_cv_sys_large_files=1; break
10018else
10019  echo "$as_me: failed program was:" >&5
10020cat conftest.$ac_ext >&5
10021fi
10022rm -f conftest.$ac_objext conftest.$ac_ext
10023  break
10024done
10025fi
10026echo "$as_me:10026: result: $ac_cv_sys_large_files" >&5
10027echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10028if test "$ac_cv_sys_large_files" != no; then
10029
10030cat >>confdefs.h <<EOF
10031#define _LARGE_FILES $ac_cv_sys_large_files
10032EOF
10033
10034fi
10035rm -rf conftest*
10036fi
10037
10038    if test "$enable_largefile" != no ; then
10039	echo "$as_me:10039: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10040echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10041if test "${ac_cv_sys_largefile_source+set}" = set; then
10042  echo $ECHO_N "(cached) $ECHO_C" >&6
10043else
10044  while :; do
10045  ac_cv_sys_largefile_source=no
10046  cat >conftest.$ac_ext <<_ACEOF
10047#line 10047 "configure"
10048#include "confdefs.h"
10049#include <stdio.h>
10050int
10051main ()
10052{
10053return !fseeko;
10054  ;
10055  return 0;
10056}
10057_ACEOF
10058rm -f conftest.$ac_objext
10059if { (eval echo "$as_me:10059: \"$ac_compile\"") >&5
10060  (eval $ac_compile) 2>&5
10061  ac_status=$?
10062  echo "$as_me:10062: \$? = $ac_status" >&5
10063  (exit $ac_status); } &&
10064         { ac_try='test -s conftest.$ac_objext'
10065  { (eval echo "$as_me:10065: \"$ac_try\"") >&5
10066  (eval $ac_try) 2>&5
10067  ac_status=$?
10068  echo "$as_me:10068: \$? = $ac_status" >&5
10069  (exit $ac_status); }; }; then
10070  break
10071else
10072  echo "$as_me: failed program was:" >&5
10073cat conftest.$ac_ext >&5
10074fi
10075rm -f conftest.$ac_objext conftest.$ac_ext
10076  cat >conftest.$ac_ext <<_ACEOF
10077#line 10077 "configure"
10078#include "confdefs.h"
10079#define _LARGEFILE_SOURCE 1
10080#include <stdio.h>
10081int
10082main ()
10083{
10084return !fseeko;
10085  ;
10086  return 0;
10087}
10088_ACEOF
10089rm -f conftest.$ac_objext
10090if { (eval echo "$as_me:10090: \"$ac_compile\"") >&5
10091  (eval $ac_compile) 2>&5
10092  ac_status=$?
10093  echo "$as_me:10093: \$? = $ac_status" >&5
10094  (exit $ac_status); } &&
10095         { ac_try='test -s conftest.$ac_objext'
10096  { (eval echo "$as_me:10096: \"$ac_try\"") >&5
10097  (eval $ac_try) 2>&5
10098  ac_status=$?
10099  echo "$as_me:10099: \$? = $ac_status" >&5
10100  (exit $ac_status); }; }; then
10101  ac_cv_sys_largefile_source=1; break
10102else
10103  echo "$as_me: failed program was:" >&5
10104cat conftest.$ac_ext >&5
10105fi
10106rm -f conftest.$ac_objext conftest.$ac_ext
10107  break
10108done
10109fi
10110echo "$as_me:10110: result: $ac_cv_sys_largefile_source" >&5
10111echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10112if test "$ac_cv_sys_largefile_source" != no; then
10113
10114cat >>confdefs.h <<EOF
10115#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10116EOF
10117
10118fi
10119rm -rf conftest*
10120
10121# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10122# in glibc 2.1.3, but that breaks too many other things.
10123# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10124echo "$as_me:10124: checking for fseeko" >&5
10125echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10126if test "${ac_cv_func_fseeko+set}" = set; then
10127  echo $ECHO_N "(cached) $ECHO_C" >&6
10128else
10129  cat >conftest.$ac_ext <<_ACEOF
10130#line 10130 "configure"
10131#include "confdefs.h"
10132#include <stdio.h>
10133int
10134main ()
10135{
10136return fseeko && fseeko (stdin, 0, 0);
10137  ;
10138  return 0;
10139}
10140_ACEOF
10141rm -f conftest.$ac_objext conftest$ac_exeext
10142if { (eval echo "$as_me:10142: \"$ac_link\"") >&5
10143  (eval $ac_link) 2>&5
10144  ac_status=$?
10145  echo "$as_me:10145: \$? = $ac_status" >&5
10146  (exit $ac_status); } &&
10147         { ac_try='test -s conftest$ac_exeext'
10148  { (eval echo "$as_me:10148: \"$ac_try\"") >&5
10149  (eval $ac_try) 2>&5
10150  ac_status=$?
10151  echo "$as_me:10151: \$? = $ac_status" >&5
10152  (exit $ac_status); }; }; then
10153  ac_cv_func_fseeko=yes
10154else
10155  echo "$as_me: failed program was:" >&5
10156cat conftest.$ac_ext >&5
10157ac_cv_func_fseeko=no
10158fi
10159rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10160fi
10161echo "$as_me:10161: result: $ac_cv_func_fseeko" >&5
10162echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10163if test $ac_cv_func_fseeko = yes; then
10164
10165cat >>confdefs.h <<\EOF
10166#define HAVE_FSEEKO 1
10167EOF
10168
10169fi
10170
10171	# Normally we would collect these definitions in the config.h,
10172	# but (like _XOPEN_SOURCE), some environments rely on having these
10173	# defined before any of the system headers are included.  Another
10174	# case comes up with C++, e.g., on AIX the compiler compiles the
10175	# header files by themselves before looking at the body files it is
10176	# told to compile.  For ncurses, those header files do not include
10177	# the config.h
10178	test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10179	test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10180	test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10181
10182	echo "$as_me:10182: checking whether to use struct dirent64" >&5
10183echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10184if test "${cf_cv_struct_dirent64+set}" = set; then
10185  echo $ECHO_N "(cached) $ECHO_C" >&6
10186else
10187
10188		cat >conftest.$ac_ext <<_ACEOF
10189#line 10189 "configure"
10190#include "confdefs.h"
10191
10192#include <sys/types.h>
10193#include <dirent.h>
10194
10195int
10196main ()
10197{
10198
10199		/* if transitional largefile support is setup, this is true */
10200		extern struct dirent64 * readdir(DIR *);
10201		struct dirent64 *x = readdir((DIR *)0);
10202		struct dirent *y = readdir((DIR *)0);
10203		int z = x - y;
10204
10205  ;
10206  return 0;
10207}
10208_ACEOF
10209rm -f conftest.$ac_objext
10210if { (eval echo "$as_me:10210: \"$ac_compile\"") >&5
10211  (eval $ac_compile) 2>&5
10212  ac_status=$?
10213  echo "$as_me:10213: \$? = $ac_status" >&5
10214  (exit $ac_status); } &&
10215         { ac_try='test -s conftest.$ac_objext'
10216  { (eval echo "$as_me:10216: \"$ac_try\"") >&5
10217  (eval $ac_try) 2>&5
10218  ac_status=$?
10219  echo "$as_me:10219: \$? = $ac_status" >&5
10220  (exit $ac_status); }; }; then
10221  cf_cv_struct_dirent64=yes
10222else
10223  echo "$as_me: failed program was:" >&5
10224cat conftest.$ac_ext >&5
10225cf_cv_struct_dirent64=no
10226fi
10227rm -f conftest.$ac_objext conftest.$ac_ext
10228
10229fi
10230echo "$as_me:10230: result: $cf_cv_struct_dirent64" >&5
10231echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10232	test "$cf_cv_struct_dirent64" = yes &&
10233cat >>confdefs.h <<\EOF
10234#define HAVE_STRUCT_DIRENT64 1
10235EOF
10236
10237    fi
10238
10239###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10240echo "$as_me:10240: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10241echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10242
10243# Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10244if test "${enable_tparm_varargs+set}" = set; then
10245  enableval="$enable_tparm_varargs"
10246  with_tparm_varargs=$enableval
10247else
10248  with_tparm_varargs=yes
10249fi;
10250echo "$as_me:10250: result: $with_tparm_varargs" >&5
10251echo "${ECHO_T}$with_tparm_varargs" >&6
10252NCURSES_TPARM_VARARGS=0
10253test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10254
10255###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10256if test "$with_ticlib" != no ; then
10257echo "$as_me:10257: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10258echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10259
10260# Check whether --enable-tic-depends or --disable-tic-depends was given.
10261if test "${enable_tic_depends+set}" = set; then
10262  enableval="$enable_tic_depends"
10263  with_tic_depends=$enableval
10264else
10265  with_tic_depends=yes
10266fi;
10267echo "$as_me:10267: result: $with_tic_depends" >&5
10268echo "${ECHO_T}$with_tic_depends" >&6
10269else
10270	with_tic_depends=no
10271fi
10272
10273###   use option --with-bool to override bool's type
10274echo "$as_me:10274: checking for type of bool" >&5
10275echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10276
10277# Check whether --with-bool or --without-bool was given.
10278if test "${with_bool+set}" = set; then
10279  withval="$with_bool"
10280  NCURSES_BOOL="$withval"
10281else
10282  NCURSES_BOOL=auto
10283fi;
10284echo "$as_me:10284: result: $NCURSES_BOOL" >&5
10285echo "${ECHO_T}$NCURSES_BOOL" >&6
10286
10287echo "$as_me:10287: checking for alternate terminal capabilities file" >&5
10288echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10289
10290# Check whether --with-caps or --without-caps was given.
10291if test "${with_caps+set}" = set; then
10292  withval="$with_caps"
10293  TERMINFO_CAPS=Caps.$withval
10294else
10295  TERMINFO_CAPS=Caps
10296fi;
10297test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10298echo "$as_me:10298: result: $TERMINFO_CAPS" >&5
10299echo "${ECHO_T}$TERMINFO_CAPS" >&6
10300
10301###   use option --with-chtype to override chtype's type
10302echo "$as_me:10302: checking for type of chtype" >&5
10303echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10304
10305# Check whether --with-chtype or --without-chtype was given.
10306if test "${with_chtype+set}" = set; then
10307  withval="$with_chtype"
10308  NCURSES_CHTYPE="$withval"
10309else
10310  NCURSES_CHTYPE=auto
10311fi;
10312echo "$as_me:10312: result: $NCURSES_CHTYPE" >&5
10313echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10314
10315###   use option --with-ospeed to override ospeed's type
10316echo "$as_me:10316: checking for type of ospeed" >&5
10317echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10318
10319# Check whether --with-ospeed or --without-ospeed was given.
10320if test "${with_ospeed+set}" = set; then
10321  withval="$with_ospeed"
10322  NCURSES_OSPEED="$withval"
10323else
10324  NCURSES_OSPEED=short
10325fi;
10326echo "$as_me:10326: result: $NCURSES_OSPEED" >&5
10327echo "${ECHO_T}$NCURSES_OSPEED" >&6
10328
10329###   use option --with-mmask-t to override mmask_t's type
10330echo "$as_me:10330: checking for type of mmask_t" >&5
10331echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10332
10333# Check whether --with-mmask-t or --without-mmask-t was given.
10334if test "${with_mmask_t+set}" = set; then
10335  withval="$with_mmask_t"
10336  NCURSES_MMASK_T="$withval"
10337else
10338  NCURSES_MMASK_T=auto
10339fi;
10340echo "$as_me:10340: result: $NCURSES_MMASK_T" >&5
10341echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10342
10343###   use option --with-ccharw-max to override CCHARW_MAX size
10344echo "$as_me:10344: checking for size CCHARW_MAX" >&5
10345echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10346
10347# Check whether --with-ccharw-max or --without-ccharw-max was given.
10348if test "${with_ccharw_max+set}" = set; then
10349  withval="$with_ccharw_max"
10350  NCURSES_CCHARW_MAX="$withval"
10351else
10352  NCURSES_CCHARW_MAX=5
10353fi;
10354echo "$as_me:10354: result: $NCURSES_CCHARW_MAX" >&5
10355echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10356
10357###   use option --with-tparm-arg to override tparm's argument type
10358echo "$as_me:10358: checking for type of tparm args" >&5
10359echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10360
10361# Check whether --with-tparm-arg or --without-tparm-arg was given.
10362if test "${with_tparm_arg+set}" = set; then
10363  withval="$with_tparm_arg"
10364  NCURSES_TPARM_ARG="$withval"
10365else
10366  NCURSES_TPARM_ARG=long
10367fi;
10368echo "$as_me:10368: result: $NCURSES_TPARM_ARG" >&5
10369echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10370
10371### Enable compiling-in rcs id's
10372echo "$as_me:10372: checking if RCS identifiers should be compiled-in" >&5
10373echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10374
10375# Check whether --with-rcs-ids or --without-rcs-ids was given.
10376if test "${with_rcs_ids+set}" = set; then
10377  withval="$with_rcs_ids"
10378  with_rcs_ids=$withval
10379else
10380  with_rcs_ids=no
10381fi;
10382echo "$as_me:10382: result: $with_rcs_ids" >&5
10383echo "${ECHO_T}$with_rcs_ids" >&6
10384test "x$with_rcs_ids" = xyes &&
10385cat >>confdefs.h <<\EOF
10386#define USE_RCS_IDS 1
10387EOF
10388
10389###############################################################################
10390
10391echo "$as_me:10391: checking format of man-pages" >&5
10392echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10393
10394# Check whether --with-manpage-format or --without-manpage-format was given.
10395if test "${with_manpage_format+set}" = set; then
10396  withval="$with_manpage_format"
10397  MANPAGE_FORMAT=$withval
10398else
10399  MANPAGE_FORMAT=unknown
10400fi;
10401
10402test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10403MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10404
10405cf_unknown=
10406
10407case $MANPAGE_FORMAT in
10408unknown)
10409  if test -z "$MANPATH" ; then
10410    MANPATH="/usr/man:/usr/share/man"
10411  fi
10412
10413  # look for the 'date' man-page (it's most likely to be installed!)
10414  MANPAGE_FORMAT=
10415  cf_preform=no
10416  cf_catonly=yes
10417  cf_example=date
10418
10419  IFS="${IFS:- 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10420  for cf_dir in $MANPATH; do
10421    test -z "$cf_dir" && cf_dir=/usr/man
10422    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
10423    do
10424      cf_test=`echo $cf_name | sed -e 's/*//'`
10425      if test "x$cf_test" = "x$cf_name" ; then
10426
10427	case "$cf_name" in
10428	*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10429	*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10430	*.0)	MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10431	*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10432	esac
10433
10434	case "$cf_name" in
10435	$cf_dir/man*)
10436	  cf_catonly=no
10437	  ;;
10438	$cf_dir/cat*)
10439	  cf_preform=yes
10440	  ;;
10441	esac
10442	break
10443      fi
10444
10445      # if we found a match in either man* or cat*, stop looking
10446      if test -n "$MANPAGE_FORMAT" ; then
10447	cf_found=no
10448	test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10449	test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10450	case "$cf_name" in
10451	$cf_dir/cat*)
10452	  cf_found=yes
10453	  ;;
10454	esac
10455	test $cf_found=yes && break
10456      fi
10457    done
10458    # only check the first directory in $MANPATH where we find manpages
10459    if test -n "$MANPAGE_FORMAT" ; then
10460       break
10461    fi
10462  done
10463  # if we did not find the example, just assume it is normal
10464  test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10465  IFS="$ac_save_ifs"
10466  ;;
10467*)
10468  for cf_option in $MANPAGE_FORMAT; do
10469     case $cf_option in #(vi
10470     gzip|compress|BSDI|normal|formatted|catonly)
10471       ;;
10472     *)
10473       cf_unknown="$cf_unknown $cf_option"
10474       ;;
10475     esac
10476  done
10477  ;;
10478esac
10479
10480echo "$as_me:10480: result: $MANPAGE_FORMAT" >&5
10481echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10482if test -n "$cf_unknown" ; then
10483  { echo "$as_me:10483: WARNING: Unexpected manpage-format $cf_unknown" >&5
10484echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10485fi
10486
10487echo "$as_me:10487: checking for manpage renaming" >&5
10488echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10489
10490# Check whether --with-manpage-renames or --without-manpage-renames was given.
10491if test "${with_manpage_renames+set}" = set; then
10492  withval="$with_manpage_renames"
10493  MANPAGE_RENAMES=$withval
10494else
10495  MANPAGE_RENAMES=yes
10496fi;
10497
10498case ".$MANPAGE_RENAMES" in #(vi
10499.no) #(vi
10500  ;;
10501.|.yes)
10502  # Debian 'man' program?
10503  if test -f /etc/debian_version ; then
10504    MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10505  else
10506    MANPAGE_RENAMES=no
10507  fi
10508  ;;
10509esac
10510
10511if test "$MANPAGE_RENAMES" != no ; then
10512  if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10513    MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10514  elif test ! -f $MANPAGE_RENAMES ; then
10515    { { echo "$as_me:10515: error: not a filename: $MANPAGE_RENAMES" >&5
10516echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10517   { (exit 1); exit 1; }; }
10518  fi
10519
10520  test ! -d man && mkdir man
10521
10522  # Construct a sed-script to perform renaming within man-pages
10523  if test -n "$MANPAGE_RENAMES" ; then
10524    test ! -d man && mkdir man
10525    sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10526  fi
10527fi
10528
10529echo "$as_me:10529: result: $MANPAGE_RENAMES" >&5
10530echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10531
10532echo "$as_me:10532: checking if manpage aliases will be installed" >&5
10533echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10534
10535# Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10536if test "${with_manpage_aliases+set}" = set; then
10537  withval="$with_manpage_aliases"
10538  MANPAGE_ALIASES=$withval
10539else
10540  MANPAGE_ALIASES=yes
10541fi;
10542
10543echo "$as_me:10543: result: $MANPAGE_ALIASES" >&5
10544echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10545
10546case "x$LN_S" in #(vi
10547xln*) #(vi
10548	cf_use_symlinks=yes
10549	;;
10550*)
10551	cf_use_symlinks=no
10552	;;
10553esac
10554
10555MANPAGE_SYMLINKS=no
10556if test "$MANPAGE_ALIASES" = yes ; then
10557echo "$as_me:10557: checking if manpage symlinks should be used" >&5
10558echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10559
10560# Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10561if test "${with_manpage_symlinks+set}" = set; then
10562  withval="$with_manpage_symlinks"
10563  MANPAGE_SYMLINKS=$withval
10564else
10565  MANPAGE_SYMLINKS=$cf_use_symlinks
10566fi;
10567
10568if test "$$cf_use_symlinks" = no; then
10569if test "$MANPAGE_SYMLINKS" = yes ; then
10570	{ echo "$as_me:10570: WARNING: cannot make symlinks" >&5
10571echo "$as_me: WARNING: cannot make symlinks" >&2;}
10572	MANPAGE_SYMLINKS=no
10573fi
10574fi
10575
10576echo "$as_me:10576: result: $MANPAGE_SYMLINKS" >&5
10577echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10578fi
10579
10580echo "$as_me:10580: checking for manpage tbl" >&5
10581echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10582
10583# Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10584if test "${with_manpage_tbl+set}" = set; then
10585  withval="$with_manpage_tbl"
10586  MANPAGE_TBL=$withval
10587else
10588  MANPAGE_TBL=no
10589fi;
10590
10591echo "$as_me:10591: result: $MANPAGE_TBL" >&5
10592echo "${ECHO_T}$MANPAGE_TBL" >&6
10593
10594  if test "$prefix" = "NONE" ; then
10595     cf_prefix="$ac_default_prefix"
10596  else
10597     cf_prefix="$prefix"
10598  fi
10599
10600  case "$MANPAGE_FORMAT" in # (vi
10601  *catonly*) # (vi
10602    cf_format=yes
10603    cf_inboth=no
10604    ;;
10605  *formatted*) # (vi
10606    cf_format=yes
10607    cf_inboth=yes
10608    ;;
10609  *)
10610    cf_format=no
10611    cf_inboth=no
10612    ;;
10613  esac
10614
10615test ! -d man && mkdir man
10616
10617cf_so_strip=
10618cf_compress=
10619case "$MANPAGE_FORMAT" in #(vi
10620*compress*) #(vi
10621	cf_so_strip="Z"
10622	cf_compress=compress
10623  ;;
10624*gzip*)
10625	cf_so_strip="gz"
10626	cf_compress=gzip
10627  ;;
10628esac
10629
10630cf_edit_man=./edit_man.sh
10631cf_man_alias=`pwd`/man_alias.sed
10632
10633cat >$cf_edit_man <<CF_EOF
10634#! /bin/sh
10635# this script is generated by the configure-script CF_MAN_PAGES macro.
10636
10637prefix="$cf_prefix"
10638datarootdir="$datarootdir"
10639datadir="$datadir"
10640
10641NCURSES_MAJOR="$NCURSES_MAJOR"
10642NCURSES_MINOR="$NCURSES_MINOR"
10643NCURSES_PATCH="$NCURSES_PATCH"
10644
10645NCURSES_OSPEED="$NCURSES_OSPEED"
10646TERMINFO="$TERMINFO"
10647
10648INSTALL="$INSTALL"
10649INSTALL_DATA="$INSTALL_DATA"
10650
10651transform="$program_transform_name"
10652
10653TMP=\${TMPDIR:=/tmp}/man\$\$
10654trap "rm -f \$TMP" 0 1 2 5 15
10655
10656form=\$1
10657shift || exit 1
10658
10659verb=\$1
10660shift || exit 1
10661
10662mandir=\$1
10663shift || exit 1
10664
10665srcdir=\$1
10666top_srcdir=\$srcdir/..
10667shift || exit 1
10668
10669if test "\$form" = normal ; then
10670	if test "$cf_format" = yes ; then
10671	if test "$cf_inboth" = no ; then
10672		sh \$0 format \$verb \$mandir \$srcdir \$*
10673		exit $?
10674	fi
10675	fi
10676	cf_subdir=\$mandir/man
10677	cf_tables=$MANPAGE_TBL
10678else
10679	cf_subdir=\$mandir/cat
10680	cf_tables=yes
10681fi
10682
10683# process the list of source-files
10684for i in \$* ; do
10685case \$i in #(vi
10686*.orig|*.rej) ;; #(vi
10687*.[0-9]*)
10688	section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10689	if test \$verb = installing ; then
10690	if test ! -d \$cf_subdir\${section} ; then
10691		mkdir -p \$cf_subdir\$section
10692	fi
10693	fi
10694
10695	# replace variables in man page
10696	if test ! -f $cf_man_alias ; then
10697cat >>$cf_man_alias <<-CF_EOF2
10698		s,@DATADIR@,\$datadir,g
10699		s,@TERMINFO@,\${TERMINFO:="no default value"},g
10700		s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
10701		s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
10702		s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
10703		s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
10704		s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
10705CF_EOF
10706
10707	for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10708	do
10709		cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10710		cf_name=`echo $cf_name|sed "$program_transform_name"`
10711cat >>$cf_edit_man <<-CF_EOF
10712		s,@$cf_NAME@,$cf_name,g
10713CF_EOF
10714	done
10715
10716cat >>$cf_edit_man <<CF_EOF
10717CF_EOF2
10718		echo "...made $cf_man_alias"
10719	fi
10720
10721	aliases=
10722	cf_source=\`basename \$i\`
10723	inalias=\$cf_source
10724	test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10725	if test ! -f \$inalias ; then
10726		echo .. skipped \$cf_source
10727		continue
10728	fi
10729CF_EOF
10730
10731if test "$MANPAGE_ALIASES" != no ; then
10732cat >>$cf_edit_man <<CF_EOF
10733	nCurses=ignore.3x
10734	test $with_curses_h = yes && nCurses=ncurses.3x
10735	aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10736CF_EOF
10737fi
10738
10739if test "$MANPAGE_RENAMES" = no ; then
10740cat >>$cf_edit_man <<CF_EOF
10741	# perform program transformations for section 1 man pages
10742	if test \$section = 1 ; then
10743		cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10744	else
10745		cf_target=\$cf_subdir\${section}/\$cf_source
10746	fi
10747CF_EOF
10748else
10749cat >>$cf_edit_man <<CF_EOF
10750	cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10751	if test -z "\$cf_target" ; then
10752		echo '? missing rename for '\$cf_source
10753		cf_target="\$cf_source"
10754	fi
10755	cf_target="\$cf_subdir\${section}/\${cf_target}"
10756
10757CF_EOF
10758fi
10759
10760cat >>$cf_edit_man <<CF_EOF
10761	sed	-f $cf_man_alias \\
10762CF_EOF
10763
10764if test -f $MANPAGE_RENAMES ; then
10765cat >>$cf_edit_man <<CF_EOF
10766		< \$i | sed -f `pwd`/edit_man.sed >\$TMP
10767CF_EOF
10768else
10769cat >>$cf_edit_man <<CF_EOF
10770		< \$i >\$TMP
10771CF_EOF
10772fi
10773
10774cat >>$cf_edit_man <<CF_EOF
10775if test \$cf_tables = yes ; then
10776	tbl \$TMP >\$TMP.out
10777	mv \$TMP.out \$TMP
10778fi
10779CF_EOF
10780
10781if test $with_overwrite != yes ; then
10782cat >>$cf_edit_man <<CF_EOF
10783	sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10784	mv \$TMP.out \$TMP
10785CF_EOF
10786fi
10787
10788if test $with_curses_h != yes ; then
10789cat >>$cf_edit_man <<CF_EOF
10790	sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10791	mv \$TMP.out \$TMP
10792CF_EOF
10793fi
10794
10795cat >>$cf_edit_man <<CF_EOF
10796	if test \$form = format ; then
10797		nroff -man \$TMP >\$TMP.out
10798		mv \$TMP.out \$TMP
10799	fi
10800CF_EOF
10801
10802if test -n "$cf_compress" ; then
10803cat >>$cf_edit_man <<CF_EOF
10804	if test \$verb = installing ; then
10805	if ( $cf_compress -f \$TMP )
10806	then
10807		mv \$TMP.$cf_so_strip \$TMP
10808	fi
10809	fi
10810	cf_target="\$cf_target.$cf_so_strip"
10811CF_EOF
10812fi
10813
10814case "$MANPAGE_FORMAT" in #(vi
10815*BSDI*)
10816cat >>$cf_edit_man <<CF_EOF
10817	if test \$form = format ; then
10818		# BSDI installs only .0 suffixes in the cat directories
10819		cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10820	fi
10821CF_EOF
10822  ;;
10823esac
10824
10825cat >>$cf_edit_man <<CF_EOF
10826	suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10827	if test \$verb = installing ; then
10828		echo \$verb \$cf_target
10829		\$INSTALL_DATA \$TMP \$cf_target
10830		test -d \$cf_subdir\${section} &&
10831		test -n "\$aliases" && (
10832			cd \$cf_subdir\${section} && (
10833				cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10834				test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10835				cf_target=\`basename \$cf_target\`
10836				for cf_alias in \$aliases
10837				do
10838					if test \$section = 1 ; then
10839						cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10840					fi
10841
10842					if test "$MANPAGE_SYMLINKS" = yes ; then
10843						if test -f \$cf_alias\${suffix} ; then
10844							if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10845							then
10846								continue
10847							fi
10848						fi
10849						echo .. \$verb alias \$cf_alias\${suffix}
10850CF_EOF
10851case "x$LN_S" in #(vi
10852*-f) #(vi
10853cat >>$cf_edit_man <<CF_EOF
10854						$LN_S \$cf_target \$cf_alias\${suffix}
10855CF_EOF
10856	;;
10857*)
10858cat >>$cf_edit_man <<CF_EOF
10859						rm -f \$cf_alias\${suffix}
10860						$LN_S \$cf_target \$cf_alias\${suffix}
10861CF_EOF
10862	;;
10863esac
10864cat >>$cf_edit_man <<CF_EOF
10865					elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10866						echo ".so \$cf_source" >\$TMP
10867CF_EOF
10868if test -n "$cf_compress" ; then
10869cat >>$cf_edit_man <<CF_EOF
10870						if test -n "$cf_so_strip" ; then
10871							$cf_compress -f \$TMP
10872							mv \$TMP.$cf_so_strip \$TMP
10873						fi
10874CF_EOF
10875fi
10876cat >>$cf_edit_man <<CF_EOF
10877						echo .. \$verb alias \$cf_alias\${suffix}
10878						rm -f \$cf_alias\${suffix}
10879						\$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10880					fi
10881				done
10882			)
10883		)
10884	elif test \$verb = removing ; then
10885		test -f \$cf_target && (
10886			echo \$verb \$cf_target
10887			rm -f \$cf_target
10888		)
10889		test -d \$cf_subdir\${section} &&
10890		test -n "\$aliases" && (
10891			cd \$cf_subdir\${section} && (
10892				for cf_alias in \$aliases
10893				do
10894					if test \$section = 1 ; then
10895						cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10896					fi
10897
10898					echo .. \$verb alias \$cf_alias\${suffix}
10899					rm -f \$cf_alias\${suffix}
10900				done
10901			)
10902		)
10903	else
10904#		echo ".hy 0"
10905		cat \$TMP
10906	fi
10907	;;
10908esac
10909done
10910
10911if test $cf_inboth = yes ; then
10912if test \$form != format ; then
10913	sh \$0 format \$verb \$mandir \$srcdir \$*
10914fi
10915fi
10916
10917exit 0
10918CF_EOF
10919chmod 755 $cf_edit_man
10920
10921###############################################################################
10922
10923### Note that some functions (such as const) are normally disabled anyway.
10924echo "$as_me:10924: checking if you want to build with function extensions" >&5
10925echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10926
10927# Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10928if test "${enable_ext_funcs+set}" = set; then
10929  enableval="$enable_ext_funcs"
10930  with_ext_funcs=$enableval
10931else
10932  with_ext_funcs=yes
10933fi;
10934echo "$as_me:10934: result: $with_ext_funcs" >&5
10935echo "${ECHO_T}$with_ext_funcs" >&6
10936if test "x$with_ext_funcs" = xyes ; then
10937	NCURSES_EXT_FUNCS=1
10938
10939cat >>confdefs.h <<\EOF
10940#define HAVE_ASSUME_DEFAULT_COLORS 1
10941EOF
10942
10943cat >>confdefs.h <<\EOF
10944#define HAVE_CURSES_VERSION 1
10945EOF
10946
10947cat >>confdefs.h <<\EOF
10948#define HAVE_HAS_KEY 1
10949EOF
10950
10951cat >>confdefs.h <<\EOF
10952#define HAVE_RESIZETERM 1
10953EOF
10954
10955cat >>confdefs.h <<\EOF
10956#define HAVE_RESIZE_TERM 1
10957EOF
10958
10959cat >>confdefs.h <<\EOF
10960#define HAVE_TERM_ENTRY_H 1
10961EOF
10962
10963cat >>confdefs.h <<\EOF
10964#define HAVE_USE_DEFAULT_COLORS 1
10965EOF
10966
10967cat >>confdefs.h <<\EOF
10968#define HAVE_USE_SCREEN 1
10969EOF
10970
10971cat >>confdefs.h <<\EOF
10972#define HAVE_USE_WINDOW 1
10973EOF
10974
10975cat >>confdefs.h <<\EOF
10976#define HAVE_WRESIZE 1
10977EOF
10978
10979cat >>confdefs.h <<\EOF
10980#define NCURSES_EXT_FUNCS 1
10981EOF
10982
10983	GENERATED_EXT_FUNCS=generated
10984else
10985	NCURSES_EXT_FUNCS=0
10986	GENERATED_EXT_FUNCS=
10987fi
10988
10989echo "$as_me:10989: checking if you want to build with experimental SCREEN extensions" >&5
10990echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10991
10992# Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10993if test "${enable_sp_funcs+set}" = set; then
10994  enableval="$enable_sp_funcs"
10995  with_sp_funcs=$enableval
10996else
10997  with_sp_funcs=no
10998fi;
10999echo "$as_me:10999: result: $with_sp_funcs" >&5
11000echo "${ECHO_T}$with_sp_funcs" >&6
11001if test "x$with_sp_funcs" = xyes ; then
11002	NCURSES_SP_FUNCS=1
11003
11004cat >>confdefs.h <<\EOF
11005#define NCURSES_SP_FUNCS 1
11006EOF
11007
11008	GENERATED_SP_FUNCS=generated
11009else
11010	NCURSES_SP_FUNCS=0
11011	GENERATED_SP_FUNCS=
11012fi
11013
11014echo "$as_me:11014: checking if you want to build with experimental terminal-driver" >&5
11015echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11016
11017# Check whether --enable-term-driver or --disable-term-driver was given.
11018if test "${enable_term_driver+set}" = set; then
11019  enableval="$enable_term_driver"
11020  with_term_driver=$enableval
11021else
11022  with_term_driver=no
11023fi;
11024echo "$as_me:11024: result: $with_term_driver" >&5
11025echo "${ECHO_T}$with_term_driver" >&6
11026if test "x$with_term_driver" = xyes ; then
11027
11028cat >>confdefs.h <<\EOF
11029#define USE_TERM_DRIVER 1
11030EOF
11031
11032	if test "x$with_sp_funcs" != xyes ; then
11033		{ { echo "$as_me:11033: error: The term-driver option relies upon sp-funcs" >&5
11034echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11035   { (exit 1); exit 1; }; }
11036	fi
11037fi
11038
11039###   use option --enable-const to turn on use of const beyond that in XSI.
11040echo "$as_me:11040: checking for extended use of const keyword" >&5
11041echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11042
11043# Check whether --enable-const or --disable-const was given.
11044if test "${enable_const+set}" = set; then
11045  enableval="$enable_const"
11046  with_ext_const=$enableval
11047else
11048  with_ext_const=no
11049fi;
11050echo "$as_me:11050: result: $with_ext_const" >&5
11051echo "${ECHO_T}$with_ext_const" >&6
11052NCURSES_CONST='/*nothing*/'
11053if test "x$with_ext_const" = xyes ; then
11054	NCURSES_CONST=const
11055fi
11056
11057###   use option --enable-ext-colors to turn on use of colors beyond 16.
11058echo "$as_me:11058: checking if you want to use extended colors" >&5
11059echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11060
11061# Check whether --enable-ext-colors or --disable-ext-colors was given.
11062if test "${enable_ext_colors+set}" = set; then
11063  enableval="$enable_ext_colors"
11064  with_ext_colors=$enableval
11065else
11066  with_ext_colors=no
11067fi;
11068echo "$as_me:11068: result: $with_ext_colors" >&5
11069echo "${ECHO_T}$with_ext_colors" >&6
11070NCURSES_EXT_COLORS=0
11071if test "x$with_ext_colors" = xyes ; then
11072	if test "x$with_widec" != xyes ; then
11073		{ { echo "$as_me:11073: error: This option applies only to wide-character library" >&5
11074echo "$as_me: error: This option applies only to wide-character library" >&2;}
11075   { (exit 1); exit 1; }; }
11076	else
11077		# cannot be ABI 5 since it changes sizeof(cchar_t)
11078
11079if test "${with_abi_version+set}" != set; then
11080	case $cf_cv_rel_version in
11081	5.*)
11082		cf_cv_rel_version=6.0
11083		cf_cv_abi_version=6
11084		{ echo "$as_me:11084: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11085echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11086		;;
11087	esac
11088fi
11089
11090	fi
11091	NCURSES_EXT_COLORS=1
11092
11093cat >>confdefs.h <<\EOF
11094#define NCURSES_EXT_COLORS 1
11095EOF
11096
11097fi
11098
11099###   use option --enable-ext-mouse to modify coding to support 5-button mice
11100echo "$as_me:11100: checking if you want to use extended mouse encoding" >&5
11101echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11102
11103# Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11104if test "${enable_ext_mouse+set}" = set; then
11105  enableval="$enable_ext_mouse"
11106  with_ext_mouse=$enableval
11107else
11108  with_ext_mouse=no
11109fi;
11110echo "$as_me:11110: result: $with_ext_mouse" >&5
11111echo "${ECHO_T}$with_ext_mouse" >&6
11112NCURSES_MOUSE_VERSION=1
11113if test "x$with_ext_mouse" = xyes ; then
11114	NCURSES_MOUSE_VERSION=2
11115
11116if test "${with_abi_version+set}" != set; then
11117	case $cf_cv_rel_version in
11118	5.*)
11119		cf_cv_rel_version=6.0
11120		cf_cv_abi_version=6
11121		{ echo "$as_me:11121: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11122echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11123		;;
11124	esac
11125fi
11126
11127fi
11128
11129echo "$as_me:11129: checking if you want \$NCURSES_NO_PADDING code" >&5
11130echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11131
11132# Check whether --enable-no-padding or --disable-no-padding was given.
11133if test "${enable_no_padding+set}" = set; then
11134  enableval="$enable_no_padding"
11135  with_no_padding=$enableval
11136else
11137  with_no_padding=$with_ext_funcs
11138fi;
11139echo "$as_me:11139: result: $with_no_padding" >&5
11140echo "${ECHO_T}$with_no_padding" >&6
11141test "x$with_no_padding" = xyes &&
11142cat >>confdefs.h <<\EOF
11143#define NCURSES_NO_PADDING 1
11144EOF
11145
11146echo "$as_me:11146: checking for ANSI C header files" >&5
11147echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11148if test "${ac_cv_header_stdc+set}" = set; then
11149  echo $ECHO_N "(cached) $ECHO_C" >&6
11150else
11151  cat >conftest.$ac_ext <<_ACEOF
11152#line 11152 "configure"
11153#include "confdefs.h"
11154#include <stdlib.h>
11155#include <stdarg.h>
11156#include <string.h>
11157#include <float.h>
11158
11159_ACEOF
11160if { (eval echo "$as_me:11160: \"$ac_cpp conftest.$ac_ext\"") >&5
11161  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11162  ac_status=$?
11163  egrep -v '^ *\+' conftest.er1 >conftest.err
11164  rm -f conftest.er1
11165  cat conftest.err >&5
11166  echo "$as_me:11166: \$? = $ac_status" >&5
11167  (exit $ac_status); } >/dev/null; then
11168  if test -s conftest.err; then
11169    ac_cpp_err=$ac_c_preproc_warn_flag
11170  else
11171    ac_cpp_err=
11172  fi
11173else
11174  ac_cpp_err=yes
11175fi
11176if test -z "$ac_cpp_err"; then
11177  ac_cv_header_stdc=yes
11178else
11179  echo "$as_me: failed program was:" >&5
11180  cat conftest.$ac_ext >&5
11181  ac_cv_header_stdc=no
11182fi
11183rm -f conftest.err conftest.$ac_ext
11184
11185if test $ac_cv_header_stdc = yes; then
11186  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11187  cat >conftest.$ac_ext <<_ACEOF
11188#line 11188 "configure"
11189#include "confdefs.h"
11190#include <string.h>
11191
11192_ACEOF
11193if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11194  egrep "memchr" >/dev/null 2>&1; then
11195  :
11196else
11197  ac_cv_header_stdc=no
11198fi
11199rm -rf conftest*
11200
11201fi
11202
11203if test $ac_cv_header_stdc = yes; then
11204  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11205  cat >conftest.$ac_ext <<_ACEOF
11206#line 11206 "configure"
11207#include "confdefs.h"
11208#include <stdlib.h>
11209
11210_ACEOF
11211if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11212  egrep "free" >/dev/null 2>&1; then
11213  :
11214else
11215  ac_cv_header_stdc=no
11216fi
11217rm -rf conftest*
11218
11219fi
11220
11221if test $ac_cv_header_stdc = yes; then
11222  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11223  if test "$cross_compiling" = yes; then
11224  :
11225else
11226  cat >conftest.$ac_ext <<_ACEOF
11227#line 11227 "configure"
11228#include "confdefs.h"
11229#include <ctype.h>
11230#if ((' ' & 0x0FF) == 0x020)
11231# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11232# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11233#else
11234# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11235                     || ('j' <= (c) && (c) <= 'r') \
11236                     || ('s' <= (c) && (c) <= 'z'))
11237# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11238#endif
11239
11240#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11241int
11242main ()
11243{
11244  int i;
11245  for (i = 0; i < 256; i++)
11246    if (XOR (islower (i), ISLOWER (i))
11247        || toupper (i) != TOUPPER (i))
11248      $ac_main_return(2);
11249  $ac_main_return (0);
11250}
11251_ACEOF
11252rm -f conftest$ac_exeext
11253if { (eval echo "$as_me:11253: \"$ac_link\"") >&5
11254  (eval $ac_link) 2>&5
11255  ac_status=$?
11256  echo "$as_me:11256: \$? = $ac_status" >&5
11257  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11258  { (eval echo "$as_me:11258: \"$ac_try\"") >&5
11259  (eval $ac_try) 2>&5
11260  ac_status=$?
11261  echo "$as_me:11261: \$? = $ac_status" >&5
11262  (exit $ac_status); }; }; then
11263  :
11264else
11265  echo "$as_me: program exited with status $ac_status" >&5
11266echo "$as_me: failed program was:" >&5
11267cat conftest.$ac_ext >&5
11268ac_cv_header_stdc=no
11269fi
11270rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11271fi
11272fi
11273fi
11274echo "$as_me:11274: result: $ac_cv_header_stdc" >&5
11275echo "${ECHO_T}$ac_cv_header_stdc" >&6
11276if test $ac_cv_header_stdc = yes; then
11277
11278cat >>confdefs.h <<\EOF
11279#define STDC_HEADERS 1
11280EOF
11281
11282fi
11283
11284# On IRIX 5.3, sys/types and inttypes.h are conflicting.
11285
11286for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11287                  inttypes.h stdint.h unistd.h
11288do
11289as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11290echo "$as_me:11290: checking for $ac_header" >&5
11291echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11292if eval "test \"\${$as_ac_Header+set}\" = set"; then
11293  echo $ECHO_N "(cached) $ECHO_C" >&6
11294else
11295  cat >conftest.$ac_ext <<_ACEOF
11296#line 11296 "configure"
11297#include "confdefs.h"
11298$ac_includes_default
11299#include <$ac_header>
11300_ACEOF
11301rm -f conftest.$ac_objext
11302if { (eval echo "$as_me:11302: \"$ac_compile\"") >&5
11303  (eval $ac_compile) 2>&5
11304  ac_status=$?
11305  echo "$as_me:11305: \$? = $ac_status" >&5
11306  (exit $ac_status); } &&
11307         { ac_try='test -s conftest.$ac_objext'
11308  { (eval echo "$as_me:11308: \"$ac_try\"") >&5
11309  (eval $ac_try) 2>&5
11310  ac_status=$?
11311  echo "$as_me:11311: \$? = $ac_status" >&5
11312  (exit $ac_status); }; }; then
11313  eval "$as_ac_Header=yes"
11314else
11315  echo "$as_me: failed program was:" >&5
11316cat conftest.$ac_ext >&5
11317eval "$as_ac_Header=no"
11318fi
11319rm -f conftest.$ac_objext conftest.$ac_ext
11320fi
11321echo "$as_me:11321: result: `eval echo '${'$as_ac_Header'}'`" >&5
11322echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11323if test `eval echo '${'$as_ac_Header'}'` = yes; then
11324  cat >>confdefs.h <<EOF
11325#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11326EOF
11327
11328fi
11329done
11330
11331echo "$as_me:11331: checking for signed char" >&5
11332echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11333if test "${ac_cv_type_signed_char+set}" = set; then
11334  echo $ECHO_N "(cached) $ECHO_C" >&6
11335else
11336  cat >conftest.$ac_ext <<_ACEOF
11337#line 11337 "configure"
11338#include "confdefs.h"
11339$ac_includes_default
11340int
11341main ()
11342{
11343if ((signed char *) 0)
11344  return 0;
11345if (sizeof (signed char))
11346  return 0;
11347  ;
11348  return 0;
11349}
11350_ACEOF
11351rm -f conftest.$ac_objext
11352if { (eval echo "$as_me:11352: \"$ac_compile\"") >&5
11353  (eval $ac_compile) 2>&5
11354  ac_status=$?
11355  echo "$as_me:11355: \$? = $ac_status" >&5
11356  (exit $ac_status); } &&
11357         { ac_try='test -s conftest.$ac_objext'
11358  { (eval echo "$as_me:11358: \"$ac_try\"") >&5
11359  (eval $ac_try) 2>&5
11360  ac_status=$?
11361  echo "$as_me:11361: \$? = $ac_status" >&5
11362  (exit $ac_status); }; }; then
11363  ac_cv_type_signed_char=yes
11364else
11365  echo "$as_me: failed program was:" >&5
11366cat conftest.$ac_ext >&5
11367ac_cv_type_signed_char=no
11368fi
11369rm -f conftest.$ac_objext conftest.$ac_ext
11370fi
11371echo "$as_me:11371: result: $ac_cv_type_signed_char" >&5
11372echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11373
11374echo "$as_me:11374: checking size of signed char" >&5
11375echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11376if test "${ac_cv_sizeof_signed_char+set}" = set; then
11377  echo $ECHO_N "(cached) $ECHO_C" >&6
11378else
11379  if test "$ac_cv_type_signed_char" = yes; then
11380  if test "$cross_compiling" = yes; then
11381  # Depending upon the size, compute the lo and hi bounds.
11382cat >conftest.$ac_ext <<_ACEOF
11383#line 11383 "configure"
11384#include "confdefs.h"
11385$ac_includes_default
11386int
11387main ()
11388{
11389int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11390  ;
11391  return 0;
11392}
11393_ACEOF
11394rm -f conftest.$ac_objext
11395if { (eval echo "$as_me:11395: \"$ac_compile\"") >&5
11396  (eval $ac_compile) 2>&5
11397  ac_status=$?
11398  echo "$as_me:11398: \$? = $ac_status" >&5
11399  (exit $ac_status); } &&
11400         { ac_try='test -s conftest.$ac_objext'
11401  { (eval echo "$as_me:11401: \"$ac_try\"") >&5
11402  (eval $ac_try) 2>&5
11403  ac_status=$?
11404  echo "$as_me:11404: \$? = $ac_status" >&5
11405  (exit $ac_status); }; }; then
11406  ac_lo=0 ac_mid=0
11407  while :; do
11408    cat >conftest.$ac_ext <<_ACEOF
11409#line 11409 "configure"
11410#include "confdefs.h"
11411$ac_includes_default
11412int
11413main ()
11414{
11415int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11416  ;
11417  return 0;
11418}
11419_ACEOF
11420rm -f conftest.$ac_objext
11421if { (eval echo "$as_me:11421: \"$ac_compile\"") >&5
11422  (eval $ac_compile) 2>&5
11423  ac_status=$?
11424  echo "$as_me:11424: \$? = $ac_status" >&5
11425  (exit $ac_status); } &&
11426         { ac_try='test -s conftest.$ac_objext'
11427  { (eval echo "$as_me:11427: \"$ac_try\"") >&5
11428  (eval $ac_try) 2>&5
11429  ac_status=$?
11430  echo "$as_me:11430: \$? = $ac_status" >&5
11431  (exit $ac_status); }; }; then
11432  ac_hi=$ac_mid; break
11433else
11434  echo "$as_me: failed program was:" >&5
11435cat conftest.$ac_ext >&5
11436ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11437fi
11438rm -f conftest.$ac_objext conftest.$ac_ext
11439  done
11440else
11441  echo "$as_me: failed program was:" >&5
11442cat conftest.$ac_ext >&5
11443ac_hi=-1 ac_mid=-1
11444  while :; do
11445    cat >conftest.$ac_ext <<_ACEOF
11446#line 11446 "configure"
11447#include "confdefs.h"
11448$ac_includes_default
11449int
11450main ()
11451{
11452int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11453  ;
11454  return 0;
11455}
11456_ACEOF
11457rm -f conftest.$ac_objext
11458if { (eval echo "$as_me:11458: \"$ac_compile\"") >&5
11459  (eval $ac_compile) 2>&5
11460  ac_status=$?
11461  echo "$as_me:11461: \$? = $ac_status" >&5
11462  (exit $ac_status); } &&
11463         { ac_try='test -s conftest.$ac_objext'
11464  { (eval echo "$as_me:11464: \"$ac_try\"") >&5
11465  (eval $ac_try) 2>&5
11466  ac_status=$?
11467  echo "$as_me:11467: \$? = $ac_status" >&5
11468  (exit $ac_status); }; }; then
11469  ac_lo=$ac_mid; break
11470else
11471  echo "$as_me: failed program was:" >&5
11472cat conftest.$ac_ext >&5
11473ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11474fi
11475rm -f conftest.$ac_objext conftest.$ac_ext
11476  done
11477fi
11478rm -f conftest.$ac_objext conftest.$ac_ext
11479# Binary search between lo and hi bounds.
11480while test "x$ac_lo" != "x$ac_hi"; do
11481  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11482  cat >conftest.$ac_ext <<_ACEOF
11483#line 11483 "configure"
11484#include "confdefs.h"
11485$ac_includes_default
11486int
11487main ()
11488{
11489int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11490  ;
11491  return 0;
11492}
11493_ACEOF
11494rm -f conftest.$ac_objext
11495if { (eval echo "$as_me:11495: \"$ac_compile\"") >&5
11496  (eval $ac_compile) 2>&5
11497  ac_status=$?
11498  echo "$as_me:11498: \$? = $ac_status" >&5
11499  (exit $ac_status); } &&
11500         { ac_try='test -s conftest.$ac_objext'
11501  { (eval echo "$as_me:11501: \"$ac_try\"") >&5
11502  (eval $ac_try) 2>&5
11503  ac_status=$?
11504  echo "$as_me:11504: \$? = $ac_status" >&5
11505  (exit $ac_status); }; }; then
11506  ac_hi=$ac_mid
11507else
11508  echo "$as_me: failed program was:" >&5
11509cat conftest.$ac_ext >&5
11510ac_lo=`expr $ac_mid + 1`
11511fi
11512rm -f conftest.$ac_objext conftest.$ac_ext
11513done
11514ac_cv_sizeof_signed_char=$ac_lo
11515else
11516  if test "$cross_compiling" = yes; then
11517  { { echo "$as_me:11517: error: cannot run test program while cross compiling" >&5
11518echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11519   { (exit 1); exit 1; }; }
11520else
11521  cat >conftest.$ac_ext <<_ACEOF
11522#line 11522 "configure"
11523#include "confdefs.h"
11524$ac_includes_default
11525int
11526main ()
11527{
11528FILE *f = fopen ("conftest.val", "w");
11529if (!f)
11530  $ac_main_return (1);
11531fprintf (f, "%d", (sizeof (signed char)));
11532fclose (f);
11533  ;
11534  return 0;
11535}
11536_ACEOF
11537rm -f conftest$ac_exeext
11538if { (eval echo "$as_me:11538: \"$ac_link\"") >&5
11539  (eval $ac_link) 2>&5
11540  ac_status=$?
11541  echo "$as_me:11541: \$? = $ac_status" >&5
11542  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11543  { (eval echo "$as_me:11543: \"$ac_try\"") >&5
11544  (eval $ac_try) 2>&5
11545  ac_status=$?
11546  echo "$as_me:11546: \$? = $ac_status" >&5
11547  (exit $ac_status); }; }; then
11548  ac_cv_sizeof_signed_char=`cat conftest.val`
11549else
11550  echo "$as_me: program exited with status $ac_status" >&5
11551echo "$as_me: failed program was:" >&5
11552cat conftest.$ac_ext >&5
11553fi
11554rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11555fi
11556fi
11557rm -f conftest.val
11558else
11559  ac_cv_sizeof_signed_char=0
11560fi
11561fi
11562echo "$as_me:11562: result: $ac_cv_sizeof_signed_char" >&5
11563echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11564cat >>confdefs.h <<EOF
11565#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11566EOF
11567
11568if test "$ac_cv_sizeof_signed_char" = 1 ; then
11569	NCURSES_SBOOL="signed char"
11570else
11571	NCURSES_SBOOL="char"
11572fi
11573echo "$as_me:11573: checking if you want to use signed Boolean array in term.h" >&5
11574echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11575
11576# Check whether --enable-signed-char or --disable-signed-char was given.
11577if test "${enable_signed_char+set}" = set; then
11578  enableval="$enable_signed_char"
11579  with_signed_char=$enableval
11580else
11581  with_signed_char=no
11582fi;
11583echo "$as_me:11583: result: $with_signed_char" >&5
11584echo "${ECHO_T}$with_signed_char" >&6
11585test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11586
11587###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11588echo "$as_me:11588: checking if you want SIGWINCH handler" >&5
11589echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11590
11591# Check whether --enable-sigwinch or --disable-sigwinch was given.
11592if test "${enable_sigwinch+set}" = set; then
11593  enableval="$enable_sigwinch"
11594  with_sigwinch=$enableval
11595else
11596  with_sigwinch=$with_ext_funcs
11597fi;
11598echo "$as_me:11598: result: $with_sigwinch" >&5
11599echo "${ECHO_T}$with_sigwinch" >&6
11600test "x$with_sigwinch" = xyes &&
11601cat >>confdefs.h <<\EOF
11602#define USE_SIGWINCH 1
11603EOF
11604
11605###   use option --enable-tcap-names to allow user to define new capabilities
11606echo "$as_me:11606: checking if you want user-definable terminal capabilities like termcap" >&5
11607echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11608
11609# Check whether --enable-tcap-names or --disable-tcap-names was given.
11610if test "${enable_tcap_names+set}" = set; then
11611  enableval="$enable_tcap_names"
11612  with_tcap_names=$enableval
11613else
11614  with_tcap_names=$with_ext_funcs
11615fi;
11616echo "$as_me:11616: result: $with_tcap_names" >&5
11617echo "${ECHO_T}$with_tcap_names" >&6
11618NCURSES_XNAMES=0
11619test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11620
11621###############################################################################
11622# These options are relatively safe to experiment with.
11623
11624echo "$as_me:11624: checking if you want all development code" >&5
11625echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11626
11627# Check whether --with-develop or --without-develop was given.
11628if test "${with_develop+set}" = set; then
11629  withval="$with_develop"
11630  with_develop=$withval
11631else
11632  with_develop=no
11633fi;
11634echo "$as_me:11634: result: $with_develop" >&5
11635echo "${ECHO_T}$with_develop" >&6
11636
11637###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11638echo "$as_me:11638: checking if you want hard-tabs code" >&5
11639echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11640
11641# Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11642if test "${enable_hard_tabs+set}" = set; then
11643  enableval="$enable_hard_tabs"
11644
11645else
11646  enable_hard_tabs=$with_develop
11647fi;
11648echo "$as_me:11648: result: $enable_hard_tabs" >&5
11649echo "${ECHO_T}$enable_hard_tabs" >&6
11650test "x$enable_hard_tabs" = xyes &&
11651cat >>confdefs.h <<\EOF
11652#define USE_HARD_TABS 1
11653EOF
11654
11655###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11656echo "$as_me:11656: checking if you want limited support for xmc" >&5
11657echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11658
11659# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11660if test "${enable_xmc_glitch+set}" = set; then
11661  enableval="$enable_xmc_glitch"
11662
11663else
11664  enable_xmc_glitch=$with_develop
11665fi;
11666echo "$as_me:11666: result: $enable_xmc_glitch" >&5
11667echo "${ECHO_T}$enable_xmc_glitch" >&6
11668test "x$enable_xmc_glitch" = xyes &&
11669cat >>confdefs.h <<\EOF
11670#define USE_XMC_SUPPORT 1
11671EOF
11672
11673###############################################################################
11674# These are just experimental, probably should not be in a package:
11675
11676echo "$as_me:11676: checking if you do not want to assume colors are white-on-black" >&5
11677echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11678
11679# Check whether --enable-assumed-color or --disable-assumed-color was given.
11680if test "${enable_assumed_color+set}" = set; then
11681  enableval="$enable_assumed_color"
11682  with_assumed_color=$enableval
11683else
11684  with_assumed_color=yes
11685fi;
11686echo "$as_me:11686: result: $with_assumed_color" >&5
11687echo "${ECHO_T}$with_assumed_color" >&6
11688test "x$with_assumed_color" = xyes &&
11689cat >>confdefs.h <<\EOF
11690#define USE_ASSUMED_COLOR 1
11691EOF
11692
11693###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11694echo "$as_me:11694: checking if you want hashmap scrolling-optimization code" >&5
11695echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11696
11697# Check whether --enable-hashmap or --disable-hashmap was given.
11698if test "${enable_hashmap+set}" = set; then
11699  enableval="$enable_hashmap"
11700  with_hashmap=$enableval
11701else
11702  with_hashmap=yes
11703fi;
11704echo "$as_me:11704: result: $with_hashmap" >&5
11705echo "${ECHO_T}$with_hashmap" >&6
11706test "x$with_hashmap" = xyes &&
11707cat >>confdefs.h <<\EOF
11708#define USE_HASHMAP 1
11709EOF
11710
11711###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11712echo "$as_me:11712: checking if you want colorfgbg code" >&5
11713echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11714
11715# Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11716if test "${enable_colorfgbg+set}" = set; then
11717  enableval="$enable_colorfgbg"
11718  with_colorfgbg=$enableval
11719else
11720  with_colorfgbg=no
11721fi;
11722echo "$as_me:11722: result: $with_colorfgbg" >&5
11723echo "${ECHO_T}$with_colorfgbg" >&6
11724test "x$with_colorfgbg" = xyes &&
11725cat >>confdefs.h <<\EOF
11726#define USE_COLORFGBG 1
11727EOF
11728
11729###   use option --enable-interop to turn on use of bindings used for interop
11730echo "$as_me:11730: checking if you want interop bindings" >&5
11731echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11732
11733# Check whether --enable-interop or --disable-interop was given.
11734if test "${enable_interop+set}" = set; then
11735  enableval="$enable_interop"
11736  with_exp_interop=$enableval
11737else
11738  with_exp_interop=no
11739fi;
11740echo "$as_me:11740: result: $with_exp_interop" >&5
11741echo "${ECHO_T}$with_exp_interop" >&6
11742
11743NCURSES_INTEROP_FUNCS=0
11744test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11745
11746# This is still experimental (20080329), but should ultimately be moved to
11747# the script-block --with-normal, etc.
11748
11749echo "$as_me:11749: checking if you want to link with the pthread library" >&5
11750echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11751
11752# Check whether --with-pthread or --without-pthread was given.
11753if test "${with_pthread+set}" = set; then
11754  withval="$with_pthread"
11755  with_pthread=$withval
11756else
11757  with_pthread=no
11758fi;
11759echo "$as_me:11759: result: $with_pthread" >&5
11760echo "${ECHO_T}$with_pthread" >&6
11761
11762if test "$with_pthread" != no ; then
11763    echo "$as_me:11763: checking for pthread.h" >&5
11764echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11765if test "${ac_cv_header_pthread_h+set}" = set; then
11766  echo $ECHO_N "(cached) $ECHO_C" >&6
11767else
11768  cat >conftest.$ac_ext <<_ACEOF
11769#line 11769 "configure"
11770#include "confdefs.h"
11771#include <pthread.h>
11772_ACEOF
11773if { (eval echo "$as_me:11773: \"$ac_cpp conftest.$ac_ext\"") >&5
11774  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11775  ac_status=$?
11776  egrep -v '^ *\+' conftest.er1 >conftest.err
11777  rm -f conftest.er1
11778  cat conftest.err >&5
11779  echo "$as_me:11779: \$? = $ac_status" >&5
11780  (exit $ac_status); } >/dev/null; then
11781  if test -s conftest.err; then
11782    ac_cpp_err=$ac_c_preproc_warn_flag
11783  else
11784    ac_cpp_err=
11785  fi
11786else
11787  ac_cpp_err=yes
11788fi
11789if test -z "$ac_cpp_err"; then
11790  ac_cv_header_pthread_h=yes
11791else
11792  echo "$as_me: failed program was:" >&5
11793  cat conftest.$ac_ext >&5
11794  ac_cv_header_pthread_h=no
11795fi
11796rm -f conftest.err conftest.$ac_ext
11797fi
11798echo "$as_me:11798: result: $ac_cv_header_pthread_h" >&5
11799echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11800if test $ac_cv_header_pthread_h = yes; then
11801
11802cat >>confdefs.h <<\EOF
11803#define HAVE_PTHREADS_H 1
11804EOF
11805
11806	for cf_lib_pthread in pthread c_r
11807	do
11808	    echo "$as_me:11808: checking if we can link with the $cf_lib_pthread library" >&5
11809echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11810	    cf_save_LIBS="$LIBS"
11811	    LIBS="-l$cf_lib_pthread $LIBS"
11812	    cat >conftest.$ac_ext <<_ACEOF
11813#line 11813 "configure"
11814#include "confdefs.h"
11815
11816#include <pthread.h>
11817
11818int
11819main ()
11820{
11821
11822		int rc = pthread_create(0,0,0,0);
11823		int r2 = pthread_mutexattr_settype(0, 0);
11824
11825  ;
11826  return 0;
11827}
11828_ACEOF
11829rm -f conftest.$ac_objext conftest$ac_exeext
11830if { (eval echo "$as_me:11830: \"$ac_link\"") >&5
11831  (eval $ac_link) 2>&5
11832  ac_status=$?
11833  echo "$as_me:11833: \$? = $ac_status" >&5
11834  (exit $ac_status); } &&
11835         { ac_try='test -s conftest$ac_exeext'
11836  { (eval echo "$as_me:11836: \"$ac_try\"") >&5
11837  (eval $ac_try) 2>&5
11838  ac_status=$?
11839  echo "$as_me:11839: \$? = $ac_status" >&5
11840  (exit $ac_status); }; }; then
11841  with_pthread=yes
11842else
11843  echo "$as_me: failed program was:" >&5
11844cat conftest.$ac_ext >&5
11845with_pthread=no
11846fi
11847rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11848	    LIBS="$cf_save_LIBS"
11849	    echo "$as_me:11849: result: $with_pthread" >&5
11850echo "${ECHO_T}$with_pthread" >&6
11851	    test "$with_pthread" = yes && break
11852	done
11853
11854	if test "$with_pthread" = yes ; then
11855	    LIBS="-l$cf_lib_pthread $LIBS"
11856
11857cat >>confdefs.h <<\EOF
11858#define HAVE_LIBPTHREADS 1
11859EOF
11860
11861	else
11862	    { { echo "$as_me:11862: error: Cannot link with pthread library" >&5
11863echo "$as_me: error: Cannot link with pthread library" >&2;}
11864   { (exit 1); exit 1; }; }
11865	fi
11866
11867fi
11868
11869fi
11870
11871if test "x$with_pthread" != xno; then
11872	echo "$as_me:11872: checking for pthread_kill" >&5
11873echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11874if test "${ac_cv_func_pthread_kill+set}" = set; then
11875  echo $ECHO_N "(cached) $ECHO_C" >&6
11876else
11877  cat >conftest.$ac_ext <<_ACEOF
11878#line 11878 "configure"
11879#include "confdefs.h"
11880/* System header to define __stub macros and hopefully few prototypes,
11881    which can conflict with char pthread_kill (); below.  */
11882#include <assert.h>
11883/* Override any gcc2 internal prototype to avoid an error.  */
11884#ifdef __cplusplus
11885extern "C"
11886#endif
11887/* We use char because int might match the return type of a gcc2
11888   builtin and then its argument prototype would still apply.  */
11889char pthread_kill ();
11890char (*f) ();
11891
11892int
11893main ()
11894{
11895/* The GNU C library defines this for functions which it implements
11896    to always fail with ENOSYS.  Some functions are actually named
11897    something starting with __ and the normal name is an alias.  */
11898#if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11899choke me
11900#else
11901f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11902#endif
11903
11904  ;
11905  return 0;
11906}
11907_ACEOF
11908rm -f conftest.$ac_objext conftest$ac_exeext
11909if { (eval echo "$as_me:11909: \"$ac_link\"") >&5
11910  (eval $ac_link) 2>&5
11911  ac_status=$?
11912  echo "$as_me:11912: \$? = $ac_status" >&5
11913  (exit $ac_status); } &&
11914         { ac_try='test -s conftest$ac_exeext'
11915  { (eval echo "$as_me:11915: \"$ac_try\"") >&5
11916  (eval $ac_try) 2>&5
11917  ac_status=$?
11918  echo "$as_me:11918: \$? = $ac_status" >&5
11919  (exit $ac_status); }; }; then
11920  ac_cv_func_pthread_kill=yes
11921else
11922  echo "$as_me: failed program was:" >&5
11923cat conftest.$ac_ext >&5
11924ac_cv_func_pthread_kill=no
11925fi
11926rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11927fi
11928echo "$as_me:11928: result: $ac_cv_func_pthread_kill" >&5
11929echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11930if test $ac_cv_func_pthread_kill = yes; then
11931
11932		echo "$as_me:11932: checking if you want to allow EINTR in wgetch with pthreads" >&5
11933echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11934
11935# Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11936if test "${enable_pthreads_eintr+set}" = set; then
11937  enableval="$enable_pthreads_eintr"
11938  use_pthreads_eintr=$enableval
11939else
11940  use_pthreads_eintr=no
11941fi;
11942		echo "$as_me:11942: result: $use_pthreads_eintr" >&5
11943echo "${ECHO_T}$use_pthreads_eintr" >&6
11944		if test "x$use_pthreads_eintr" = xyes ; then
11945
11946cat >>confdefs.h <<\EOF
11947#define USE_PTHREADS_EINTR 1
11948EOF
11949
11950		fi
11951fi
11952
11953	echo "$as_me:11953: checking if you want to use weak-symbols for pthreads" >&5
11954echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11955
11956# Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11957if test "${enable_weak_symbols+set}" = set; then
11958  enableval="$enable_weak_symbols"
11959  use_weak_symbols=$enableval
11960else
11961  use_weak_symbols=no
11962fi;
11963	echo "$as_me:11963: result: $use_weak_symbols" >&5
11964echo "${ECHO_T}$use_weak_symbols" >&6
11965	if test "x$use_weak_symbols" = xyes ; then
11966
11967echo "$as_me:11967: checking if $CC supports weak symbols" >&5
11968echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11969if test "${cf_cv_weak_symbols+set}" = set; then
11970  echo $ECHO_N "(cached) $ECHO_C" >&6
11971else
11972
11973cat >conftest.$ac_ext <<_ACEOF
11974#line 11974 "configure"
11975#include "confdefs.h"
11976
11977#include <stdio.h>
11978int
11979main ()
11980{
11981
11982#if defined(__GNUC__)
11983#  if defined __USE_ISOC99
11984#    define _cat_pragma(exp)	_Pragma(#exp)
11985#    define _weak_pragma(exp)	_cat_pragma(weak name)
11986#  else
11987#    define _weak_pragma(exp)
11988#  endif
11989#  define _declare(name)	__extension__ extern __typeof__(name) name
11990#  define weak_symbol(name)	_weak_pragma(name) _declare(name) __attribute__((weak))
11991#endif
11992
11993weak_symbol(fopen);
11994
11995  ;
11996  return 0;
11997}
11998_ACEOF
11999rm -f conftest.$ac_objext
12000if { (eval echo "$as_me:12000: \"$ac_compile\"") >&5
12001  (eval $ac_compile) 2>&5
12002  ac_status=$?
12003  echo "$as_me:12003: \$? = $ac_status" >&5
12004  (exit $ac_status); } &&
12005         { ac_try='test -s conftest.$ac_objext'
12006  { (eval echo "$as_me:12006: \"$ac_try\"") >&5
12007  (eval $ac_try) 2>&5
12008  ac_status=$?
12009  echo "$as_me:12009: \$? = $ac_status" >&5
12010  (exit $ac_status); }; }; then
12011  cf_cv_weak_symbols=yes
12012else
12013  echo "$as_me: failed program was:" >&5
12014cat conftest.$ac_ext >&5
12015cf_cv_weak_symbols=no
12016fi
12017rm -f conftest.$ac_objext conftest.$ac_ext
12018
12019fi
12020echo "$as_me:12020: result: $cf_cv_weak_symbols" >&5
12021echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12022
12023	else
12024		cf_cv_weak_symbols=no
12025	fi
12026
12027	if test "x$cf_cv_weak_symbols" = xyes ; then
12028
12029cat >>confdefs.h <<\EOF
12030#define USE_WEAK_SYMBOLS 1
12031EOF
12032
12033	fi
12034fi
12035
12036PTHREAD=
12037if test "x$with_pthread" = "xyes" ; then
12038
12039cat >>confdefs.h <<\EOF
12040#define USE_PTHREADS 1
12041EOF
12042
12043    enable_reentrant=yes
12044    if test "x$cf_cv_weak_symbols" = xyes ; then
12045        PTHREAD=-lpthread
12046    fi
12047fi
12048
12049# Reentrant code has to be opaque; there's little advantage to making ncurses
12050# opaque outside of that, so there is no --enable-opaque option.  We can use
12051# this option without --with-pthreads, but this will be always set for
12052# pthreads.
12053echo "$as_me:12053: checking if you want experimental reentrant code" >&5
12054echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12055
12056# Check whether --enable-reentrant or --disable-reentrant was given.
12057if test "${enable_reentrant+set}" = set; then
12058  enableval="$enable_reentrant"
12059  with_reentrant=$enableval
12060else
12061  with_reentrant=no
12062fi;
12063echo "$as_me:12063: result: $with_reentrant" >&5
12064echo "${ECHO_T}$with_reentrant" >&6
12065if test "x$with_reentrant" = xyes ; then
12066	cf_cv_enable_reentrant=1
12067	cf_cv_enable_opaque="NCURSES_INTERNALS"
12068	NCURSES_OPAQUE=1
12069	NCURSES_SIZE_T=int
12070	if test "x$cf_cv_weak_symbols" = xyes ; then
12071
12072# remove pthread library from $LIBS
12073LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ 	]//g' -e 's/-lpthread$//'`
12074
12075		TEST_LIBS="-lpthread $TEST_LIBS"
12076		TEST_LIBS2="-lpthread $TEST_LIBS2"
12077	else
12078		# when not using weak symbols but with_reentrant,
12079		# add 't' to the library suffix on all platforms
12080		# except cygwin, where we only do that if ALSO
12081		# compiling with full thread support.
12082		case "$host" in
12083		*cygwin* | *msys*)
12084			if test "$with_pthread" = "yes" ; then
12085				LIB_SUFFIX="t${LIB_SUFFIX}"
12086			fi ;;
12087		* ) LIB_SUFFIX="t${LIB_SUFFIX}" ;;
12088		esac
12089	fi
12090
12091cat >>confdefs.h <<\EOF
12092#define USE_REENTRANT 1
12093EOF
12094
12095if test "${with_abi_version+set}" != set; then
12096	case $cf_cv_rel_version in
12097	5.*)
12098		cf_cv_rel_version=6.0
12099		cf_cv_abi_version=6
12100		{ echo "$as_me:12100: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12101echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12102		;;
12103	esac
12104fi
12105
12106else
12107	cf_cv_enable_reentrant=0
12108	cf_cv_enable_opaque="NCURSES_OPAQUE"
12109	NCURSES_OPAQUE=0
12110	NCURSES_SIZE_T=short
12111fi
12112
12113### Allow using a different wrap-prefix
12114if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12115	echo "$as_me:12115: checking for prefix used to wrap public variables" >&5
12116echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12117
12118# Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12119if test "${with_wrap_prefix+set}" = set; then
12120  withval="$with_wrap_prefix"
12121  NCURSES_WRAP_PREFIX=$withval
12122else
12123  NCURSES_WRAP_PREFIX=_nc_
12124fi;
12125	echo "$as_me:12125: result: $NCURSES_WRAP_PREFIX" >&5
12126echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12127else
12128	NCURSES_WRAP_PREFIX=_nc_
12129fi
12130
12131cat >>confdefs.h <<EOF
12132#define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12133EOF
12134
12135echo "$as_me:12135: checking if you want experimental safe-sprintf code" >&5
12136echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12137
12138# Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12139if test "${enable_safe_sprintf+set}" = set; then
12140  enableval="$enable_safe_sprintf"
12141  with_safe_sprintf=$enableval
12142else
12143  with_safe_sprintf=no
12144fi;
12145echo "$as_me:12145: result: $with_safe_sprintf" >&5
12146echo "${ECHO_T}$with_safe_sprintf" >&6
12147test "x$with_safe_sprintf" = xyes &&
12148cat >>confdefs.h <<\EOF
12149#define USE_SAFE_SPRINTF 1
12150EOF
12151
12152###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12153# when hashmap is used scroll hints are useless
12154if test "$with_hashmap" = no ; then
12155echo "$as_me:12155: checking if you want to experiment without scrolling-hints code" >&5
12156echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12157
12158# Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12159if test "${enable_scroll_hints+set}" = set; then
12160  enableval="$enable_scroll_hints"
12161  with_scroll_hints=$enableval
12162else
12163  with_scroll_hints=yes
12164fi;
12165echo "$as_me:12165: result: $with_scroll_hints" >&5
12166echo "${ECHO_T}$with_scroll_hints" >&6
12167test "x$with_scroll_hints" = xyes &&
12168cat >>confdefs.h <<\EOF
12169#define USE_SCROLL_HINTS 1
12170EOF
12171
12172fi
12173
12174echo "$as_me:12174: checking if you want experimental wgetch-events code" >&5
12175echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12176
12177# Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12178if test "${enable_wgetch_events+set}" = set; then
12179  enableval="$enable_wgetch_events"
12180  with_wgetch_events=$enableval
12181else
12182  with_wgetch_events=no
12183fi;
12184echo "$as_me:12184: result: $with_wgetch_events" >&5
12185echo "${ECHO_T}$with_wgetch_events" >&6
12186test "x$with_wgetch_events" = xyes &&
12187cat >>confdefs.h <<\EOF
12188#define NCURSES_WGETCH_EVENTS 1
12189EOF
12190
12191###############################################################################
12192
12193###	use option --disable-echo to suppress full display compiling commands
12194
12195echo "$as_me:12195: checking if you want to see long compiling messages" >&5
12196echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12197
12198# Check whether --enable-echo or --disable-echo was given.
12199if test "${enable_echo+set}" = set; then
12200  enableval="$enable_echo"
12201  test "$enableval" != no && enableval=yes
12202  if test "$enableval" != "yes" ; then
12203
12204    ECHO_LT='--silent'
12205    ECHO_LD='@echo linking $@;'
12206    RULE_CC='@echo compiling $<'
12207    SHOW_CC='@echo compiling $@'
12208    ECHO_CC='@'
12209
12210  else
12211
12212    ECHO_LT=''
12213    ECHO_LD=''
12214    RULE_CC=''
12215    SHOW_CC=''
12216    ECHO_CC=''
12217
12218  fi
12219else
12220  enableval=yes
12221
12222    ECHO_LT=''
12223    ECHO_LD=''
12224    RULE_CC=''
12225    SHOW_CC=''
12226    ECHO_CC=''
12227
12228fi;
12229echo "$as_me:12229: result: $enableval" >&5
12230echo "${ECHO_T}$enableval" >&6
12231
12232if test "x$enable_echo" = xyes; then
12233	ECHO_LINK=
12234else
12235	ECHO_LINK='@ echo linking $@ ... ;'
12236	test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12237	test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12238fi
12239
12240###	use option --enable-warnings to turn on all gcc warnings
12241echo "$as_me:12241: checking if you want to see compiler warnings" >&5
12242echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12243
12244# Check whether --enable-warnings or --disable-warnings was given.
12245if test "${enable_warnings+set}" = set; then
12246  enableval="$enable_warnings"
12247  with_warnings=$enableval
12248fi;
12249echo "$as_me:12249: result: $with_warnings" >&5
12250echo "${ECHO_T}$with_warnings" >&6
12251
12252if test "x$with_warnings" = "xyes"; then
12253
12254 	ADAFLAGS="$ADAFLAGS -gnatg"
12255
12256INTEL_COMPILER=no
12257
12258if test "$GCC" = yes ; then
12259	case $host_os in
12260	linux*|gnu*)
12261		echo "$as_me:12261: checking if this is really Intel C compiler" >&5
12262echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12263		cf_save_CFLAGS="$CFLAGS"
12264		CFLAGS="$CFLAGS -no-gcc"
12265		cat >conftest.$ac_ext <<_ACEOF
12266#line 12266 "configure"
12267#include "confdefs.h"
12268
12269int
12270main ()
12271{
12272
12273#ifdef __INTEL_COMPILER
12274#else
12275make an error
12276#endif
12277
12278  ;
12279  return 0;
12280}
12281_ACEOF
12282rm -f conftest.$ac_objext
12283if { (eval echo "$as_me:12283: \"$ac_compile\"") >&5
12284  (eval $ac_compile) 2>&5
12285  ac_status=$?
12286  echo "$as_me:12286: \$? = $ac_status" >&5
12287  (exit $ac_status); } &&
12288         { ac_try='test -s conftest.$ac_objext'
12289  { (eval echo "$as_me:12289: \"$ac_try\"") >&5
12290  (eval $ac_try) 2>&5
12291  ac_status=$?
12292  echo "$as_me:12292: \$? = $ac_status" >&5
12293  (exit $ac_status); }; }; then
12294  INTEL_COMPILER=yes
12295cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12296
12297else
12298  echo "$as_me: failed program was:" >&5
12299cat conftest.$ac_ext >&5
12300fi
12301rm -f conftest.$ac_objext conftest.$ac_ext
12302		CFLAGS="$cf_save_CFLAGS"
12303		echo "$as_me:12303: result: $INTEL_COMPILER" >&5
12304echo "${ECHO_T}$INTEL_COMPILER" >&6
12305		;;
12306	esac
12307fi
12308
12309CLANG_COMPILER=no
12310
12311if test "$GCC" = yes ; then
12312	echo "$as_me:12312: checking if this is really Clang C compiler" >&5
12313echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12314	cf_save_CFLAGS="$CFLAGS"
12315	CFLAGS="$CFLAGS -Qunused-arguments"
12316	cat >conftest.$ac_ext <<_ACEOF
12317#line 12317 "configure"
12318#include "confdefs.h"
12319
12320int
12321main ()
12322{
12323
12324#ifdef __clang__
12325#else
12326make an error
12327#endif
12328
12329  ;
12330  return 0;
12331}
12332_ACEOF
12333rm -f conftest.$ac_objext
12334if { (eval echo "$as_me:12334: \"$ac_compile\"") >&5
12335  (eval $ac_compile) 2>&5
12336  ac_status=$?
12337  echo "$as_me:12337: \$? = $ac_status" >&5
12338  (exit $ac_status); } &&
12339         { ac_try='test -s conftest.$ac_objext'
12340  { (eval echo "$as_me:12340: \"$ac_try\"") >&5
12341  (eval $ac_try) 2>&5
12342  ac_status=$?
12343  echo "$as_me:12343: \$? = $ac_status" >&5
12344  (exit $ac_status); }; }; then
12345  CLANG_COMPILER=yes
12346cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12347
12348else
12349  echo "$as_me: failed program was:" >&5
12350cat conftest.$ac_ext >&5
12351fi
12352rm -f conftest.$ac_objext conftest.$ac_ext
12353	CFLAGS="$cf_save_CFLAGS"
12354	echo "$as_me:12354: result: $CLANG_COMPILER" >&5
12355echo "${ECHO_T}$CLANG_COMPILER" >&6
12356fi
12357
12358cat > conftest.$ac_ext <<EOF
12359#line 12359 "${as_me:-configure}"
12360int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12361EOF
12362
12363if test "$INTEL_COMPILER" = yes
12364then
12365# The "-wdXXX" options suppress warnings:
12366# remark #1419: external declaration in primary source file
12367# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12368# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12369# remark #193: zero used for undefined preprocessing identifier
12370# remark #593: variable "curs_sb_left_arrow" was set but never used
12371# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12372# remark #869: parameter "tw" was never referenced
12373# remark #981: operands are evaluated in unspecified order
12374# warning #279: controlling expression is constant
12375
12376	{ echo "$as_me:12376: checking for $CC warning options..." >&5
12377echo "$as_me: checking for $CC warning options..." >&6;}
12378	cf_save_CFLAGS="$CFLAGS"
12379	EXTRA_CFLAGS="-Wall"
12380	for cf_opt in \
12381		wd1419 \
12382		wd1683 \
12383		wd1684 \
12384		wd193 \
12385		wd593 \
12386		wd279 \
12387		wd810 \
12388		wd869 \
12389		wd981
12390	do
12391		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12392		if { (eval echo "$as_me:12392: \"$ac_compile\"") >&5
12393  (eval $ac_compile) 2>&5
12394  ac_status=$?
12395  echo "$as_me:12395: \$? = $ac_status" >&5
12396  (exit $ac_status); }; then
12397			test -n "$verbose" && echo "$as_me:12397: result: ... -$cf_opt" >&5
12398echo "${ECHO_T}... -$cf_opt" >&6
12399			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12400		fi
12401	done
12402	CFLAGS="$cf_save_CFLAGS"
12403
12404elif test "$GCC" = yes
12405then
12406	{ echo "$as_me:12406: checking for $CC warning options..." >&5
12407echo "$as_me: checking for $CC warning options..." >&6;}
12408	cf_save_CFLAGS="$CFLAGS"
12409	EXTRA_CFLAGS=
12410	cf_warn_CONST=""
12411	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12412	cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12413	test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12414	for cf_opt in W Wall \
12415		Wbad-function-cast \
12416		Wcast-align \
12417		Wcast-qual \
12418		Wdeclaration-after-statement \
12419		Wextra \
12420		Winline \
12421		Wmissing-declarations \
12422		Wmissing-prototypes \
12423		Wnested-externs \
12424		Wpointer-arith \
12425		Wshadow \
12426		Wstrict-prototypes \
12427		Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12428	do
12429		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12430		if { (eval echo "$as_me:12430: \"$ac_compile\"") >&5
12431  (eval $ac_compile) 2>&5
12432  ac_status=$?
12433  echo "$as_me:12433: \$? = $ac_status" >&5
12434  (exit $ac_status); }; then
12435			test -n "$verbose" && echo "$as_me:12435: result: ... -$cf_opt" >&5
12436echo "${ECHO_T}... -$cf_opt" >&6
12437			case $cf_opt in #(vi
12438			Wcast-qual) #(vi
12439				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12440				;;
12441			Winline) #(vi
12442				case $GCC_VERSION in
12443				[34].*)
12444					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
12445
12446echo "${as_me:-configure}:12446: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12447
12448					continue;;
12449				esac
12450				;;
12451			Wpointer-arith) #(vi
12452				case $GCC_VERSION in
12453				[12].*)
12454					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
12455
12456echo "${as_me:-configure}:12456: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12457
12458					continue;;
12459				esac
12460				;;
12461			esac
12462			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12463		fi
12464	done
12465	CFLAGS="$cf_save_CFLAGS"
12466fi
12467rm -rf conftest*
12468
12469	if test "x$cf_with_cxx" = xyes ; then
12470
12471INTEL_CPLUSPLUS=no
12472
12473if test "$GCC" = yes ; then
12474	case $host_os in
12475	linux*|gnu*)
12476		echo "$as_me:12476: checking if this is really Intel C++ compiler" >&5
12477echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12478		cf_save_CFLAGS="$CXXFLAGS"
12479		CXXFLAGS="$CXXFLAGS -no-gcc"
12480		cat >conftest.$ac_ext <<_ACEOF
12481#line 12481 "configure"
12482#include "confdefs.h"
12483
12484int
12485main ()
12486{
12487
12488#ifdef __INTEL_COMPILER
12489#else
12490make an error
12491#endif
12492
12493  ;
12494  return 0;
12495}
12496_ACEOF
12497rm -f conftest.$ac_objext
12498if { (eval echo "$as_me:12498: \"$ac_compile\"") >&5
12499  (eval $ac_compile) 2>&5
12500  ac_status=$?
12501  echo "$as_me:12501: \$? = $ac_status" >&5
12502  (exit $ac_status); } &&
12503         { ac_try='test -s conftest.$ac_objext'
12504  { (eval echo "$as_me:12504: \"$ac_try\"") >&5
12505  (eval $ac_try) 2>&5
12506  ac_status=$?
12507  echo "$as_me:12507: \$? = $ac_status" >&5
12508  (exit $ac_status); }; }; then
12509  INTEL_CPLUSPLUS=yes
12510cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12511
12512else
12513  echo "$as_me: failed program was:" >&5
12514cat conftest.$ac_ext >&5
12515fi
12516rm -f conftest.$ac_objext conftest.$ac_ext
12517		CXXFLAGS="$cf_save_CFLAGS"
12518		echo "$as_me:12518: result: $INTEL_CPLUSPLUS" >&5
12519echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12520		;;
12521	esac
12522fi
12523
12524CLANG_CPLUSPLUS=no
12525
12526if test "$GCC" = yes ; then
12527	echo "$as_me:12527: checking if this is really Clang C++ compiler" >&5
12528echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12529	cf_save_CFLAGS="$CXXFLAGS"
12530	CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12531	cat >conftest.$ac_ext <<_ACEOF
12532#line 12532 "configure"
12533#include "confdefs.h"
12534
12535int
12536main ()
12537{
12538
12539#ifdef __clang__
12540#else
12541make an error
12542#endif
12543
12544  ;
12545  return 0;
12546}
12547_ACEOF
12548rm -f conftest.$ac_objext
12549if { (eval echo "$as_me:12549: \"$ac_compile\"") >&5
12550  (eval $ac_compile) 2>&5
12551  ac_status=$?
12552  echo "$as_me:12552: \$? = $ac_status" >&5
12553  (exit $ac_status); } &&
12554         { ac_try='test -s conftest.$ac_objext'
12555  { (eval echo "$as_me:12555: \"$ac_try\"") >&5
12556  (eval $ac_try) 2>&5
12557  ac_status=$?
12558  echo "$as_me:12558: \$? = $ac_status" >&5
12559  (exit $ac_status); }; }; then
12560  CLANG_CPLUSPLUS=yes
12561cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12562
12563else
12564  echo "$as_me: failed program was:" >&5
12565cat conftest.$ac_ext >&5
12566fi
12567rm -f conftest.$ac_objext conftest.$ac_ext
12568	CXXFLAGS="$cf_save_CFLAGS"
12569	echo "$as_me:12569: result: $CLANG_CPLUSPLUS" >&5
12570echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12571fi
12572
12573ac_ext=cc
12574ac_cpp='$CXXCPP $CPPFLAGS'
12575ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12576ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12577ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12578ac_main_return=return
12579
12580cat > conftest.$ac_ext <<EOF
12581#line 12581 "configure"
12582int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12583EOF
12584
12585if test "$INTEL_CPLUSPLUS" = yes
12586then
12587# The "-wdXXX" options suppress warnings:
12588# remark #1419: external declaration in primary source file
12589# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12590# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12591# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12592# remark #193: zero used for undefined preprocessing identifier
12593# remark #593: variable "curs_sb_left_arrow" was set but never used
12594# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12595# remark #869: parameter "tw" was never referenced
12596# remark #981: operands are evaluated in unspecified order
12597# warning #269: invalid format string conversion
12598
12599	{ echo "$as_me:12599: checking for $CC warning options..." >&5
12600echo "$as_me: checking for $CC warning options..." >&6;}
12601	cf_save_CXXFLAGS="$CXXFLAGS"
12602	EXTRA_CXXFLAGS="-Wall"
12603	for cf_opt in \
12604		wd1419 \
12605		wd1682 \
12606		wd1683 \
12607		wd1684 \
12608		wd193 \
12609		wd279 \
12610		wd593 \
12611		wd810 \
12612		wd869 \
12613		wd981
12614	do
12615		CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12616		if { (eval echo "$as_me:12616: \"$ac_compile\"") >&5
12617  (eval $ac_compile) 2>&5
12618  ac_status=$?
12619  echo "$as_me:12619: \$? = $ac_status" >&5
12620  (exit $ac_status); }; then
12621			test -n "$verbose" && echo "$as_me:12621: result: ... -$cf_opt" >&5
12622echo "${ECHO_T}... -$cf_opt" >&6
12623			EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12624		fi
12625	done
12626	CXXFLAGS="$cf_save_CXXFLAGS"
12627
12628elif test "$GXX" = yes
12629then
12630	{ echo "$as_me:12630: checking for $CXX warning options..." >&5
12631echo "$as_me: checking for $CXX warning options..." >&6;}
12632	cf_save_CXXFLAGS="$CXXFLAGS"
12633	EXTRA_CXXFLAGS="-W -Wall"
12634	cf_gxx_extra_warnings=""
12635	test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12636	case "$GCC_VERSION" in
12637	[1-2].*)
12638		;;
12639	*)
12640		cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12641		;;
12642	esac
12643	for cf_opt in \
12644		Wabi \
12645		fabi-version=0 \
12646		Wextra \
12647		Wignored-qualifiers \
12648		Wlogical-op \
12649		Woverloaded-virtual \
12650		Wsign-promo \
12651		Wsynth \
12652		Wold-style-cast \
12653		Wcast-align \
12654		Wcast-qual \
12655		Wpointer-arith \
12656		Wshadow \
12657		Wundef $cf_gxx_extra_warnings Wno-unused
12658	do
12659		CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12660		if { (eval echo "$as_me:12660: \"$ac_compile\"") >&5
12661  (eval $ac_compile) 2>&5
12662  ac_status=$?
12663  echo "$as_me:12663: \$? = $ac_status" >&5
12664  (exit $ac_status); }; then
12665			test -n "$verbose" && echo "$as_me:12665: result: ... -$cf_opt" >&5
12666echo "${ECHO_T}... -$cf_opt" >&6
12667			EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12668		else
12669			test -n "$verbose" && echo "$as_me:12669: result: ... no -$cf_opt" >&5
12670echo "${ECHO_T}... no -$cf_opt" >&6
12671		fi
12672	done
12673	CXXFLAGS="$cf_save_CXXFLAGS"
12674fi
12675
12676rm -rf conftest*
12677ac_ext=c
12678ac_cpp='$CPP $CPPFLAGS'
12679ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12680ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12681ac_compiler_gnu=$ac_cv_c_compiler_gnu
12682ac_main_return=return
12683
12684	fi
12685fi
12686
12687if test "$GCC" = yes
12688then
12689cat > conftest.i <<EOF
12690#ifndef GCC_PRINTF
12691#define GCC_PRINTF 0
12692#endif
12693#ifndef GCC_SCANF
12694#define GCC_SCANF 0
12695#endif
12696#ifndef GCC_NORETURN
12697#define GCC_NORETURN /* nothing */
12698#endif
12699#ifndef GCC_UNUSED
12700#define GCC_UNUSED /* nothing */
12701#endif
12702EOF
12703if test "$GCC" = yes
12704then
12705	{ echo "$as_me:12705: checking for $CC __attribute__ directives..." >&5
12706echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12707cat > conftest.$ac_ext <<EOF
12708#line 12708 "${as_me:-configure}"
12709#include "confdefs.h"
12710#include "conftest.h"
12711#include "conftest.i"
12712#if	GCC_PRINTF
12713#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12714#else
12715#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12716#endif
12717#if	GCC_SCANF
12718#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12719#else
12720#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12721#endif
12722extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12723extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12724extern void foo(void) GCC_NORETURN;
12725int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12726EOF
12727	cf_printf_attribute=no
12728	cf_scanf_attribute=no
12729	for cf_attribute in scanf printf unused noreturn
12730	do
12731
12732cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12733
12734		cf_directive="__attribute__(($cf_attribute))"
12735		echo "checking for $CC $cf_directive" 1>&5
12736
12737		case $cf_attribute in #(vi
12738		printf) #(vi
12739			cf_printf_attribute=yes
12740			cat >conftest.h <<EOF
12741#define GCC_$cf_ATTRIBUTE 1
12742EOF
12743			;;
12744		scanf) #(vi
12745			cf_scanf_attribute=yes
12746			cat >conftest.h <<EOF
12747#define GCC_$cf_ATTRIBUTE 1
12748EOF
12749			;;
12750		*) #(vi
12751			cat >conftest.h <<EOF
12752#define GCC_$cf_ATTRIBUTE $cf_directive
12753EOF
12754			;;
12755		esac
12756
12757		if { (eval echo "$as_me:12757: \"$ac_compile\"") >&5
12758  (eval $ac_compile) 2>&5
12759  ac_status=$?
12760  echo "$as_me:12760: \$? = $ac_status" >&5
12761  (exit $ac_status); }; then
12762			test -n "$verbose" && echo "$as_me:12762: result: ... $cf_attribute" >&5
12763echo "${ECHO_T}... $cf_attribute" >&6
12764			cat conftest.h >>confdefs.h
12765			case $cf_attribute in #(vi
12766			noreturn) #(vi
12767
12768cat >>confdefs.h <<EOF
12769#define GCC_NORETURN $cf_directive
12770EOF
12771
12772				;;
12773			printf) #(vi
12774				cf_value='/* nothing */'
12775				if test "$cf_printf_attribute" != no ; then
12776					cf_value='__attribute__((format(printf,fmt,var)))'
12777
12778cat >>confdefs.h <<\EOF
12779#define GCC_PRINTF 1
12780EOF
12781
12782				fi
12783
12784cat >>confdefs.h <<EOF
12785#define GCC_PRINTFLIKE(fmt,var) $cf_value
12786EOF
12787
12788				;;
12789			scanf) #(vi
12790				cf_value='/* nothing */'
12791				if test "$cf_scanf_attribute" != no ; then
12792					cf_value='__attribute__((format(scanf,fmt,var)))'
12793
12794cat >>confdefs.h <<\EOF
12795#define GCC_SCANF 1
12796EOF
12797
12798				fi
12799
12800cat >>confdefs.h <<EOF
12801#define GCC_SCANFLIKE(fmt,var) $cf_value
12802EOF
12803
12804				;;
12805			unused) #(vi
12806
12807cat >>confdefs.h <<EOF
12808#define GCC_UNUSED $cf_directive
12809EOF
12810
12811				;;
12812			esac
12813		fi
12814	done
12815else
12816	fgrep define conftest.i >>confdefs.h
12817fi
12818rm -rf conftest*
12819fi
12820
12821echo "$as_me:12821: checking if you want to work around bogus compiler/loader warnings" >&5
12822echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12823
12824# Check whether --enable-string-hacks or --disable-string-hacks was given.
12825if test "${enable_string_hacks+set}" = set; then
12826  enableval="$enable_string_hacks"
12827  with_string_hacks=$enableval
12828else
12829  with_string_hacks=no
12830fi;
12831echo "$as_me:12831: result: $with_string_hacks" >&5
12832echo "${ECHO_T}$with_string_hacks" >&6
12833
12834if test "x$with_string_hacks" = "xyes"; then
12835
12836cat >>confdefs.h <<\EOF
12837#define USE_STRING_HACKS 1
12838EOF
12839
12840	{ echo "$as_me:12840: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12841echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12842
12843for ac_func in strlcat strlcpy snprintf
12844do
12845as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12846echo "$as_me:12846: checking for $ac_func" >&5
12847echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12848if eval "test \"\${$as_ac_var+set}\" = set"; then
12849  echo $ECHO_N "(cached) $ECHO_C" >&6
12850else
12851  cat >conftest.$ac_ext <<_ACEOF
12852#line 12852 "configure"
12853#include "confdefs.h"
12854/* System header to define __stub macros and hopefully few prototypes,
12855    which can conflict with char $ac_func (); below.  */
12856#include <assert.h>
12857/* Override any gcc2 internal prototype to avoid an error.  */
12858#ifdef __cplusplus
12859extern "C"
12860#endif
12861/* We use char because int might match the return type of a gcc2
12862   builtin and then its argument prototype would still apply.  */
12863char $ac_func ();
12864char (*f) ();
12865
12866int
12867main ()
12868{
12869/* The GNU C library defines this for functions which it implements
12870    to always fail with ENOSYS.  Some functions are actually named
12871    something starting with __ and the normal name is an alias.  */
12872#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12873choke me
12874#else
12875f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12876#endif
12877
12878  ;
12879  return 0;
12880}
12881_ACEOF
12882rm -f conftest.$ac_objext conftest$ac_exeext
12883if { (eval echo "$as_me:12883: \"$ac_link\"") >&5
12884  (eval $ac_link) 2>&5
12885  ac_status=$?
12886  echo "$as_me:12886: \$? = $ac_status" >&5
12887  (exit $ac_status); } &&
12888         { ac_try='test -s conftest$ac_exeext'
12889  { (eval echo "$as_me:12889: \"$ac_try\"") >&5
12890  (eval $ac_try) 2>&5
12891  ac_status=$?
12892  echo "$as_me:12892: \$? = $ac_status" >&5
12893  (exit $ac_status); }; }; then
12894  eval "$as_ac_var=yes"
12895else
12896  echo "$as_me: failed program was:" >&5
12897cat conftest.$ac_ext >&5
12898eval "$as_ac_var=no"
12899fi
12900rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12901fi
12902echo "$as_me:12902: result: `eval echo '${'$as_ac_var'}'`" >&5
12903echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12904if test `eval echo '${'$as_ac_var'}'` = yes; then
12905  cat >>confdefs.h <<EOF
12906#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12907EOF
12908
12909fi
12910done
12911
12912fi
12913
12914###	use option --enable-assertions to turn on generation of assertion code
12915echo "$as_me:12915: checking if you want to enable runtime assertions" >&5
12916echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12917
12918# Check whether --enable-assertions or --disable-assertions was given.
12919if test "${enable_assertions+set}" = set; then
12920  enableval="$enable_assertions"
12921  with_assertions=$enableval
12922else
12923  with_assertions=no
12924fi;
12925echo "$as_me:12925: result: $with_assertions" >&5
12926echo "${ECHO_T}$with_assertions" >&6
12927if test -n "$GCC"
12928then
12929	if test "$with_assertions" = no
12930	then
12931		CPPFLAGS="$CPPFLAGS -DNDEBUG"
12932	else
12933
12934 	ADAFLAGS="$ADAFLAGS -gnata"
12935
12936	fi
12937fi
12938
12939###	use option --disable-leaks to suppress "permanent" leaks, for testing
12940
12941echo "$as_me:12941: checking if you want to use dmalloc for testing" >&5
12942echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12943
12944# Check whether --with-dmalloc or --without-dmalloc was given.
12945if test "${with_dmalloc+set}" = set; then
12946  withval="$with_dmalloc"
12947
12948cat >>confdefs.h <<EOF
12949#define USE_DMALLOC 1
12950EOF
12951
12952	: ${with_cflags:=-g}
12953	: ${with_no_leaks:=yes}
12954	 with_dmalloc=yes
12955else
12956  with_dmalloc=
12957fi;
12958echo "$as_me:12958: result: ${with_dmalloc:-no}" >&5
12959echo "${ECHO_T}${with_dmalloc:-no}" >&6
12960
12961case .$with_cflags in #(vi
12962.*-g*)
12963	case .$CFLAGS in #(vi
12964	.*-g*) #(vi
12965		;;
12966	*)
12967
12968cf_fix_cppflags=no
12969cf_new_cflags=
12970cf_new_cppflags=
12971cf_new_extra_cppflags=
12972
12973for cf_add_cflags in -g
12974do
12975case $cf_fix_cppflags in
12976no)
12977	case $cf_add_cflags in #(vi
12978	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12979		case $cf_add_cflags in
12980		-D*)
12981			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12982
12983			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12984				&& test -z "${cf_tst_cflags}" \
12985				&& cf_fix_cppflags=yes
12986
12987			if test $cf_fix_cppflags = yes ; then
12988				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12989				continue
12990			elif test "${cf_tst_cflags}" = "\"'" ; then
12991				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12992				continue
12993			fi
12994			;;
12995		esac
12996		case "$CPPFLAGS" in
12997		*$cf_add_cflags) #(vi
12998			;;
12999		*) #(vi
13000			case $cf_add_cflags in #(vi
13001			-D*)
13002				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13003
13004CPPFLAGS=`echo "$CPPFLAGS" | \
13005	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13006		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13007
13008				;;
13009			esac
13010			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13011			;;
13012		esac
13013		;;
13014	*)
13015		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13016		;;
13017	esac
13018	;;
13019yes)
13020	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13021
13022	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13023
13024	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13025		&& test -z "${cf_tst_cflags}" \
13026		&& cf_fix_cppflags=no
13027	;;
13028esac
13029done
13030
13031if test -n "$cf_new_cflags" ; then
13032
13033	CFLAGS="$CFLAGS $cf_new_cflags"
13034fi
13035
13036if test -n "$cf_new_cppflags" ; then
13037
13038	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13039fi
13040
13041if test -n "$cf_new_extra_cppflags" ; then
13042
13043	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13044fi
13045
13046		;;
13047	esac
13048	;;
13049esac
13050
13051if test "$with_dmalloc" = yes ; then
13052	echo "$as_me:13052: checking for dmalloc.h" >&5
13053echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13054if test "${ac_cv_header_dmalloc_h+set}" = set; then
13055  echo $ECHO_N "(cached) $ECHO_C" >&6
13056else
13057  cat >conftest.$ac_ext <<_ACEOF
13058#line 13058 "configure"
13059#include "confdefs.h"
13060#include <dmalloc.h>
13061_ACEOF
13062if { (eval echo "$as_me:13062: \"$ac_cpp conftest.$ac_ext\"") >&5
13063  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13064  ac_status=$?
13065  egrep -v '^ *\+' conftest.er1 >conftest.err
13066  rm -f conftest.er1
13067  cat conftest.err >&5
13068  echo "$as_me:13068: \$? = $ac_status" >&5
13069  (exit $ac_status); } >/dev/null; then
13070  if test -s conftest.err; then
13071    ac_cpp_err=$ac_c_preproc_warn_flag
13072  else
13073    ac_cpp_err=
13074  fi
13075else
13076  ac_cpp_err=yes
13077fi
13078if test -z "$ac_cpp_err"; then
13079  ac_cv_header_dmalloc_h=yes
13080else
13081  echo "$as_me: failed program was:" >&5
13082  cat conftest.$ac_ext >&5
13083  ac_cv_header_dmalloc_h=no
13084fi
13085rm -f conftest.err conftest.$ac_ext
13086fi
13087echo "$as_me:13087: result: $ac_cv_header_dmalloc_h" >&5
13088echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13089if test $ac_cv_header_dmalloc_h = yes; then
13090
13091echo "$as_me:13091: checking for dmalloc_debug in -ldmalloc" >&5
13092echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13093if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13094  echo $ECHO_N "(cached) $ECHO_C" >&6
13095else
13096  ac_check_lib_save_LIBS=$LIBS
13097LIBS="-ldmalloc  $LIBS"
13098cat >conftest.$ac_ext <<_ACEOF
13099#line 13099 "configure"
13100#include "confdefs.h"
13101
13102/* Override any gcc2 internal prototype to avoid an error.  */
13103#ifdef __cplusplus
13104extern "C"
13105#endif
13106/* We use char because int might match the return type of a gcc2
13107   builtin and then its argument prototype would still apply.  */
13108char dmalloc_debug ();
13109int
13110main ()
13111{
13112dmalloc_debug ();
13113  ;
13114  return 0;
13115}
13116_ACEOF
13117rm -f conftest.$ac_objext conftest$ac_exeext
13118if { (eval echo "$as_me:13118: \"$ac_link\"") >&5
13119  (eval $ac_link) 2>&5
13120  ac_status=$?
13121  echo "$as_me:13121: \$? = $ac_status" >&5
13122  (exit $ac_status); } &&
13123         { ac_try='test -s conftest$ac_exeext'
13124  { (eval echo "$as_me:13124: \"$ac_try\"") >&5
13125  (eval $ac_try) 2>&5
13126  ac_status=$?
13127  echo "$as_me:13127: \$? = $ac_status" >&5
13128  (exit $ac_status); }; }; then
13129  ac_cv_lib_dmalloc_dmalloc_debug=yes
13130else
13131  echo "$as_me: failed program was:" >&5
13132cat conftest.$ac_ext >&5
13133ac_cv_lib_dmalloc_dmalloc_debug=no
13134fi
13135rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13136LIBS=$ac_check_lib_save_LIBS
13137fi
13138echo "$as_me:13138: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13139echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13140if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13141  cat >>confdefs.h <<EOF
13142#define HAVE_LIBDMALLOC 1
13143EOF
13144
13145  LIBS="-ldmalloc $LIBS"
13146
13147fi
13148
13149fi
13150
13151fi
13152
13153echo "$as_me:13153: checking if you want to use dbmalloc for testing" >&5
13154echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13155
13156# Check whether --with-dbmalloc or --without-dbmalloc was given.
13157if test "${with_dbmalloc+set}" = set; then
13158  withval="$with_dbmalloc"
13159
13160cat >>confdefs.h <<EOF
13161#define USE_DBMALLOC 1
13162EOF
13163
13164	: ${with_cflags:=-g}
13165	: ${with_no_leaks:=yes}
13166	 with_dbmalloc=yes
13167else
13168  with_dbmalloc=
13169fi;
13170echo "$as_me:13170: result: ${with_dbmalloc:-no}" >&5
13171echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13172
13173case .$with_cflags in #(vi
13174.*-g*)
13175	case .$CFLAGS in #(vi
13176	.*-g*) #(vi
13177		;;
13178	*)
13179
13180cf_fix_cppflags=no
13181cf_new_cflags=
13182cf_new_cppflags=
13183cf_new_extra_cppflags=
13184
13185for cf_add_cflags in -g
13186do
13187case $cf_fix_cppflags in
13188no)
13189	case $cf_add_cflags in #(vi
13190	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13191		case $cf_add_cflags in
13192		-D*)
13193			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13194
13195			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13196				&& test -z "${cf_tst_cflags}" \
13197				&& cf_fix_cppflags=yes
13198
13199			if test $cf_fix_cppflags = yes ; then
13200				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13201				continue
13202			elif test "${cf_tst_cflags}" = "\"'" ; then
13203				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13204				continue
13205			fi
13206			;;
13207		esac
13208		case "$CPPFLAGS" in
13209		*$cf_add_cflags) #(vi
13210			;;
13211		*) #(vi
13212			case $cf_add_cflags in #(vi
13213			-D*)
13214				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13215
13216CPPFLAGS=`echo "$CPPFLAGS" | \
13217	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13218		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13219
13220				;;
13221			esac
13222			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13223			;;
13224		esac
13225		;;
13226	*)
13227		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13228		;;
13229	esac
13230	;;
13231yes)
13232	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13233
13234	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13235
13236	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13237		&& test -z "${cf_tst_cflags}" \
13238		&& cf_fix_cppflags=no
13239	;;
13240esac
13241done
13242
13243if test -n "$cf_new_cflags" ; then
13244
13245	CFLAGS="$CFLAGS $cf_new_cflags"
13246fi
13247
13248if test -n "$cf_new_cppflags" ; then
13249
13250	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13251fi
13252
13253if test -n "$cf_new_extra_cppflags" ; then
13254
13255	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13256fi
13257
13258		;;
13259	esac
13260	;;
13261esac
13262
13263if test "$with_dbmalloc" = yes ; then
13264	echo "$as_me:13264: checking for dbmalloc.h" >&5
13265echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13266if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13267  echo $ECHO_N "(cached) $ECHO_C" >&6
13268else
13269  cat >conftest.$ac_ext <<_ACEOF
13270#line 13270 "configure"
13271#include "confdefs.h"
13272#include <dbmalloc.h>
13273_ACEOF
13274if { (eval echo "$as_me:13274: \"$ac_cpp conftest.$ac_ext\"") >&5
13275  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13276  ac_status=$?
13277  egrep -v '^ *\+' conftest.er1 >conftest.err
13278  rm -f conftest.er1
13279  cat conftest.err >&5
13280  echo "$as_me:13280: \$? = $ac_status" >&5
13281  (exit $ac_status); } >/dev/null; then
13282  if test -s conftest.err; then
13283    ac_cpp_err=$ac_c_preproc_warn_flag
13284  else
13285    ac_cpp_err=
13286  fi
13287else
13288  ac_cpp_err=yes
13289fi
13290if test -z "$ac_cpp_err"; then
13291  ac_cv_header_dbmalloc_h=yes
13292else
13293  echo "$as_me: failed program was:" >&5
13294  cat conftest.$ac_ext >&5
13295  ac_cv_header_dbmalloc_h=no
13296fi
13297rm -f conftest.err conftest.$ac_ext
13298fi
13299echo "$as_me:13299: result: $ac_cv_header_dbmalloc_h" >&5
13300echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13301if test $ac_cv_header_dbmalloc_h = yes; then
13302
13303echo "$as_me:13303: checking for debug_malloc in -ldbmalloc" >&5
13304echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13305if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13306  echo $ECHO_N "(cached) $ECHO_C" >&6
13307else
13308  ac_check_lib_save_LIBS=$LIBS
13309LIBS="-ldbmalloc  $LIBS"
13310cat >conftest.$ac_ext <<_ACEOF
13311#line 13311 "configure"
13312#include "confdefs.h"
13313
13314/* Override any gcc2 internal prototype to avoid an error.  */
13315#ifdef __cplusplus
13316extern "C"
13317#endif
13318/* We use char because int might match the return type of a gcc2
13319   builtin and then its argument prototype would still apply.  */
13320char debug_malloc ();
13321int
13322main ()
13323{
13324debug_malloc ();
13325  ;
13326  return 0;
13327}
13328_ACEOF
13329rm -f conftest.$ac_objext conftest$ac_exeext
13330if { (eval echo "$as_me:13330: \"$ac_link\"") >&5
13331  (eval $ac_link) 2>&5
13332  ac_status=$?
13333  echo "$as_me:13333: \$? = $ac_status" >&5
13334  (exit $ac_status); } &&
13335         { ac_try='test -s conftest$ac_exeext'
13336  { (eval echo "$as_me:13336: \"$ac_try\"") >&5
13337  (eval $ac_try) 2>&5
13338  ac_status=$?
13339  echo "$as_me:13339: \$? = $ac_status" >&5
13340  (exit $ac_status); }; }; then
13341  ac_cv_lib_dbmalloc_debug_malloc=yes
13342else
13343  echo "$as_me: failed program was:" >&5
13344cat conftest.$ac_ext >&5
13345ac_cv_lib_dbmalloc_debug_malloc=no
13346fi
13347rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13348LIBS=$ac_check_lib_save_LIBS
13349fi
13350echo "$as_me:13350: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13351echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13352if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13353  cat >>confdefs.h <<EOF
13354#define HAVE_LIBDBMALLOC 1
13355EOF
13356
13357  LIBS="-ldbmalloc $LIBS"
13358
13359fi
13360
13361fi
13362
13363fi
13364
13365echo "$as_me:13365: checking if you want to use valgrind for testing" >&5
13366echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13367
13368# Check whether --with-valgrind or --without-valgrind was given.
13369if test "${with_valgrind+set}" = set; then
13370  withval="$with_valgrind"
13371
13372cat >>confdefs.h <<EOF
13373#define USE_VALGRIND 1
13374EOF
13375
13376	: ${with_cflags:=-g}
13377	: ${with_no_leaks:=yes}
13378	 with_valgrind=yes
13379else
13380  with_valgrind=
13381fi;
13382echo "$as_me:13382: result: ${with_valgrind:-no}" >&5
13383echo "${ECHO_T}${with_valgrind:-no}" >&6
13384
13385case .$with_cflags in #(vi
13386.*-g*)
13387	case .$CFLAGS in #(vi
13388	.*-g*) #(vi
13389		;;
13390	*)
13391
13392cf_fix_cppflags=no
13393cf_new_cflags=
13394cf_new_cppflags=
13395cf_new_extra_cppflags=
13396
13397for cf_add_cflags in -g
13398do
13399case $cf_fix_cppflags in
13400no)
13401	case $cf_add_cflags in #(vi
13402	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13403		case $cf_add_cflags in
13404		-D*)
13405			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13406
13407			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13408				&& test -z "${cf_tst_cflags}" \
13409				&& cf_fix_cppflags=yes
13410
13411			if test $cf_fix_cppflags = yes ; then
13412				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13413				continue
13414			elif test "${cf_tst_cflags}" = "\"'" ; then
13415				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13416				continue
13417			fi
13418			;;
13419		esac
13420		case "$CPPFLAGS" in
13421		*$cf_add_cflags) #(vi
13422			;;
13423		*) #(vi
13424			case $cf_add_cflags in #(vi
13425			-D*)
13426				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13427
13428CPPFLAGS=`echo "$CPPFLAGS" | \
13429	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13430		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13431
13432				;;
13433			esac
13434			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13435			;;
13436		esac
13437		;;
13438	*)
13439		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13440		;;
13441	esac
13442	;;
13443yes)
13444	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13445
13446	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13447
13448	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13449		&& test -z "${cf_tst_cflags}" \
13450		&& cf_fix_cppflags=no
13451	;;
13452esac
13453done
13454
13455if test -n "$cf_new_cflags" ; then
13456
13457	CFLAGS="$CFLAGS $cf_new_cflags"
13458fi
13459
13460if test -n "$cf_new_cppflags" ; then
13461
13462	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13463fi
13464
13465if test -n "$cf_new_extra_cppflags" ; then
13466
13467	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13468fi
13469
13470		;;
13471	esac
13472	;;
13473esac
13474
13475echo "$as_me:13475: checking if you want to perform memory-leak testing" >&5
13476echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13477
13478# Check whether --enable-leaks or --disable-leaks was given.
13479if test "${enable_leaks+set}" = set; then
13480  enableval="$enable_leaks"
13481  if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13482else
13483  : ${with_no_leaks:=no}
13484fi;
13485echo "$as_me:13485: result: $with_no_leaks" >&5
13486echo "${ECHO_T}$with_no_leaks" >&6
13487
13488if test "$with_no_leaks" = yes ; then
13489
13490cat >>confdefs.h <<\EOF
13491#define NO_LEAKS 1
13492EOF
13493
13494cat >>confdefs.h <<\EOF
13495#define YY_NO_LEAKS 1
13496EOF
13497
13498fi
13499
13500cat >>confdefs.h <<\EOF
13501#define HAVE_NC_ALLOC_H 1
13502EOF
13503
13504###	use option --enable-expanded to generate certain macros as functions
13505
13506# Check whether --enable-expanded or --disable-expanded was given.
13507if test "${enable_expanded+set}" = set; then
13508  enableval="$enable_expanded"
13509  test "x$enableval" = xyes &&
13510cat >>confdefs.h <<\EOF
13511#define NCURSES_EXPANDED 1
13512EOF
13513
13514fi;
13515
13516###	use option --disable-macros to suppress macros in favor of functions
13517
13518# Check whether --enable-macros or --disable-macros was given.
13519if test "${enable_macros+set}" = set; then
13520  enableval="$enable_macros"
13521  test "$enableval" = no &&
13522cat >>confdefs.h <<\EOF
13523#define NCURSES_NOMACROS 1
13524EOF
13525
13526fi;
13527
13528# Normally we only add trace() to the debug-library.  Allow this to be
13529# extended to all models of the ncurses library:
13530cf_all_traces=no
13531case "$CFLAGS $CPPFLAGS" in
13532*-DTRACE*)
13533	cf_all_traces=yes
13534	;;
13535esac
13536
13537echo "$as_me:13537: checking whether to add trace feature to all models" >&5
13538echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13539
13540# Check whether --with-trace or --without-trace was given.
13541if test "${with_trace+set}" = set; then
13542  withval="$with_trace"
13543  cf_with_trace=$withval
13544else
13545  cf_with_trace=$cf_all_traces
13546fi;
13547echo "$as_me:13547: result: $cf_with_trace" >&5
13548echo "${ECHO_T}$cf_with_trace" >&6
13549
13550if test "x$cf_with_trace" = xyes ; then
13551	LIB_TRACING=all
13552	ADA_TRACE=TRUE
13553
13554cf_fix_cppflags=no
13555cf_new_cflags=
13556cf_new_cppflags=
13557cf_new_extra_cppflags=
13558
13559for cf_add_cflags in -DTRACE
13560do
13561case $cf_fix_cppflags in
13562no)
13563	case $cf_add_cflags in #(vi
13564	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13565		case $cf_add_cflags in
13566		-D*)
13567			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13568
13569			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13570				&& test -z "${cf_tst_cflags}" \
13571				&& cf_fix_cppflags=yes
13572
13573			if test $cf_fix_cppflags = yes ; then
13574				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13575				continue
13576			elif test "${cf_tst_cflags}" = "\"'" ; then
13577				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13578				continue
13579			fi
13580			;;
13581		esac
13582		case "$CPPFLAGS" in
13583		*$cf_add_cflags) #(vi
13584			;;
13585		*) #(vi
13586			case $cf_add_cflags in #(vi
13587			-D*)
13588				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13589
13590CPPFLAGS=`echo "$CPPFLAGS" | \
13591	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13592		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13593
13594				;;
13595			esac
13596			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13597			;;
13598		esac
13599		;;
13600	*)
13601		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13602		;;
13603	esac
13604	;;
13605yes)
13606	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13607
13608	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13609
13610	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13611		&& test -z "${cf_tst_cflags}" \
13612		&& cf_fix_cppflags=no
13613	;;
13614esac
13615done
13616
13617if test -n "$cf_new_cflags" ; then
13618
13619	CFLAGS="$CFLAGS $cf_new_cflags"
13620fi
13621
13622if test -n "$cf_new_cppflags" ; then
13623
13624	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13625fi
13626
13627if test -n "$cf_new_extra_cppflags" ; then
13628
13629	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13630fi
13631
13632else
13633	LIB_TRACING=DEBUG
13634	ADA_TRACE=FALSE
13635fi
13636
13637###	Checks for libraries.
13638case $cf_cv_system_name in #(vi
13639*mingw32*) #(vi
13640	;;
13641*)
13642echo "$as_me:13642: checking for gettimeofday" >&5
13643echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13644if test "${ac_cv_func_gettimeofday+set}" = set; then
13645  echo $ECHO_N "(cached) $ECHO_C" >&6
13646else
13647  cat >conftest.$ac_ext <<_ACEOF
13648#line 13648 "configure"
13649#include "confdefs.h"
13650/* System header to define __stub macros and hopefully few prototypes,
13651    which can conflict with char gettimeofday (); below.  */
13652#include <assert.h>
13653/* Override any gcc2 internal prototype to avoid an error.  */
13654#ifdef __cplusplus
13655extern "C"
13656#endif
13657/* We use char because int might match the return type of a gcc2
13658   builtin and then its argument prototype would still apply.  */
13659char gettimeofday ();
13660char (*f) ();
13661
13662int
13663main ()
13664{
13665/* The GNU C library defines this for functions which it implements
13666    to always fail with ENOSYS.  Some functions are actually named
13667    something starting with __ and the normal name is an alias.  */
13668#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13669choke me
13670#else
13671f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13672#endif
13673
13674  ;
13675  return 0;
13676}
13677_ACEOF
13678rm -f conftest.$ac_objext conftest$ac_exeext
13679if { (eval echo "$as_me:13679: \"$ac_link\"") >&5
13680  (eval $ac_link) 2>&5
13681  ac_status=$?
13682  echo "$as_me:13682: \$? = $ac_status" >&5
13683  (exit $ac_status); } &&
13684         { ac_try='test -s conftest$ac_exeext'
13685  { (eval echo "$as_me:13685: \"$ac_try\"") >&5
13686  (eval $ac_try) 2>&5
13687  ac_status=$?
13688  echo "$as_me:13688: \$? = $ac_status" >&5
13689  (exit $ac_status); }; }; then
13690  ac_cv_func_gettimeofday=yes
13691else
13692  echo "$as_me: failed program was:" >&5
13693cat conftest.$ac_ext >&5
13694ac_cv_func_gettimeofday=no
13695fi
13696rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13697fi
13698echo "$as_me:13698: result: $ac_cv_func_gettimeofday" >&5
13699echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13700if test $ac_cv_func_gettimeofday = yes; then
13701
13702cat >>confdefs.h <<\EOF
13703#define HAVE_GETTIMEOFDAY 1
13704EOF
13705
13706else
13707
13708echo "$as_me:13708: checking for gettimeofday in -lbsd" >&5
13709echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13710if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13711  echo $ECHO_N "(cached) $ECHO_C" >&6
13712else
13713  ac_check_lib_save_LIBS=$LIBS
13714LIBS="-lbsd  $LIBS"
13715cat >conftest.$ac_ext <<_ACEOF
13716#line 13716 "configure"
13717#include "confdefs.h"
13718
13719/* Override any gcc2 internal prototype to avoid an error.  */
13720#ifdef __cplusplus
13721extern "C"
13722#endif
13723/* We use char because int might match the return type of a gcc2
13724   builtin and then its argument prototype would still apply.  */
13725char gettimeofday ();
13726int
13727main ()
13728{
13729gettimeofday ();
13730  ;
13731  return 0;
13732}
13733_ACEOF
13734rm -f conftest.$ac_objext conftest$ac_exeext
13735if { (eval echo "$as_me:13735: \"$ac_link\"") >&5
13736  (eval $ac_link) 2>&5
13737  ac_status=$?
13738  echo "$as_me:13738: \$? = $ac_status" >&5
13739  (exit $ac_status); } &&
13740         { ac_try='test -s conftest$ac_exeext'
13741  { (eval echo "$as_me:13741: \"$ac_try\"") >&5
13742  (eval $ac_try) 2>&5
13743  ac_status=$?
13744  echo "$as_me:13744: \$? = $ac_status" >&5
13745  (exit $ac_status); }; }; then
13746  ac_cv_lib_bsd_gettimeofday=yes
13747else
13748  echo "$as_me: failed program was:" >&5
13749cat conftest.$ac_ext >&5
13750ac_cv_lib_bsd_gettimeofday=no
13751fi
13752rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13753LIBS=$ac_check_lib_save_LIBS
13754fi
13755echo "$as_me:13755: result: $ac_cv_lib_bsd_gettimeofday" >&5
13756echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13757if test $ac_cv_lib_bsd_gettimeofday = yes; then
13758
13759cat >>confdefs.h <<\EOF
13760#define HAVE_GETTIMEOFDAY 1
13761EOF
13762
13763	LIBS="-lbsd $LIBS"
13764fi
13765
13766fi
13767	;;
13768esac
13769
13770echo "$as_me:13770: checking if -lm needed for math functions" >&5
13771echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13772if test "${cf_cv_need_libm+set}" = set; then
13773  echo $ECHO_N "(cached) $ECHO_C" >&6
13774else
13775
13776	cat >conftest.$ac_ext <<_ACEOF
13777#line 13777 "configure"
13778#include "confdefs.h"
13779
13780	#include <stdio.h>
13781	#include <math.h>
13782
13783int
13784main ()
13785{
13786double x = rand(); printf("result = %g\n", pow(sin(x),x))
13787  ;
13788  return 0;
13789}
13790_ACEOF
13791rm -f conftest.$ac_objext conftest$ac_exeext
13792if { (eval echo "$as_me:13792: \"$ac_link\"") >&5
13793  (eval $ac_link) 2>&5
13794  ac_status=$?
13795  echo "$as_me:13795: \$? = $ac_status" >&5
13796  (exit $ac_status); } &&
13797         { ac_try='test -s conftest$ac_exeext'
13798  { (eval echo "$as_me:13798: \"$ac_try\"") >&5
13799  (eval $ac_try) 2>&5
13800  ac_status=$?
13801  echo "$as_me:13801: \$? = $ac_status" >&5
13802  (exit $ac_status); }; }; then
13803  cf_cv_need_libm=no
13804else
13805  echo "$as_me: failed program was:" >&5
13806cat conftest.$ac_ext >&5
13807cf_cv_need_libm=yes
13808fi
13809rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13810fi
13811echo "$as_me:13811: result: $cf_cv_need_libm" >&5
13812echo "${ECHO_T}$cf_cv_need_libm" >&6
13813if test "$cf_cv_need_libm" = yes
13814then
13815MATH_LIB=-lm
13816fi
13817
13818###	Checks for header files.
13819echo "$as_me:13819: checking for ANSI C header files" >&5
13820echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13821if test "${ac_cv_header_stdc+set}" = set; then
13822  echo $ECHO_N "(cached) $ECHO_C" >&6
13823else
13824  cat >conftest.$ac_ext <<_ACEOF
13825#line 13825 "configure"
13826#include "confdefs.h"
13827#include <stdlib.h>
13828#include <stdarg.h>
13829#include <string.h>
13830#include <float.h>
13831
13832_ACEOF
13833if { (eval echo "$as_me:13833: \"$ac_cpp conftest.$ac_ext\"") >&5
13834  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13835  ac_status=$?
13836  egrep -v '^ *\+' conftest.er1 >conftest.err
13837  rm -f conftest.er1
13838  cat conftest.err >&5
13839  echo "$as_me:13839: \$? = $ac_status" >&5
13840  (exit $ac_status); } >/dev/null; then
13841  if test -s conftest.err; then
13842    ac_cpp_err=$ac_c_preproc_warn_flag
13843  else
13844    ac_cpp_err=
13845  fi
13846else
13847  ac_cpp_err=yes
13848fi
13849if test -z "$ac_cpp_err"; then
13850  ac_cv_header_stdc=yes
13851else
13852  echo "$as_me: failed program was:" >&5
13853  cat conftest.$ac_ext >&5
13854  ac_cv_header_stdc=no
13855fi
13856rm -f conftest.err conftest.$ac_ext
13857
13858if test $ac_cv_header_stdc = yes; then
13859  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13860  cat >conftest.$ac_ext <<_ACEOF
13861#line 13861 "configure"
13862#include "confdefs.h"
13863#include <string.h>
13864
13865_ACEOF
13866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13867  egrep "memchr" >/dev/null 2>&1; then
13868  :
13869else
13870  ac_cv_header_stdc=no
13871fi
13872rm -rf conftest*
13873
13874fi
13875
13876if test $ac_cv_header_stdc = yes; then
13877  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13878  cat >conftest.$ac_ext <<_ACEOF
13879#line 13879 "configure"
13880#include "confdefs.h"
13881#include <stdlib.h>
13882
13883_ACEOF
13884if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13885  egrep "free" >/dev/null 2>&1; then
13886  :
13887else
13888  ac_cv_header_stdc=no
13889fi
13890rm -rf conftest*
13891
13892fi
13893
13894if test $ac_cv_header_stdc = yes; then
13895  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13896  if test "$cross_compiling" = yes; then
13897  :
13898else
13899  cat >conftest.$ac_ext <<_ACEOF
13900#line 13900 "configure"
13901#include "confdefs.h"
13902#include <ctype.h>
13903#if ((' ' & 0x0FF) == 0x020)
13904# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13905# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13906#else
13907# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13908                     || ('j' <= (c) && (c) <= 'r') \
13909                     || ('s' <= (c) && (c) <= 'z'))
13910# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13911#endif
13912
13913#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13914int
13915main ()
13916{
13917  int i;
13918  for (i = 0; i < 256; i++)
13919    if (XOR (islower (i), ISLOWER (i))
13920        || toupper (i) != TOUPPER (i))
13921      $ac_main_return(2);
13922  $ac_main_return (0);
13923}
13924_ACEOF
13925rm -f conftest$ac_exeext
13926if { (eval echo "$as_me:13926: \"$ac_link\"") >&5
13927  (eval $ac_link) 2>&5
13928  ac_status=$?
13929  echo "$as_me:13929: \$? = $ac_status" >&5
13930  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13931  { (eval echo "$as_me:13931: \"$ac_try\"") >&5
13932  (eval $ac_try) 2>&5
13933  ac_status=$?
13934  echo "$as_me:13934: \$? = $ac_status" >&5
13935  (exit $ac_status); }; }; then
13936  :
13937else
13938  echo "$as_me: program exited with status $ac_status" >&5
13939echo "$as_me: failed program was:" >&5
13940cat conftest.$ac_ext >&5
13941ac_cv_header_stdc=no
13942fi
13943rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13944fi
13945fi
13946fi
13947echo "$as_me:13947: result: $ac_cv_header_stdc" >&5
13948echo "${ECHO_T}$ac_cv_header_stdc" >&6
13949if test $ac_cv_header_stdc = yes; then
13950
13951cat >>confdefs.h <<\EOF
13952#define STDC_HEADERS 1
13953EOF
13954
13955fi
13956
13957ac_header_dirent=no
13958for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13959  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13960echo "$as_me:13960: checking for $ac_hdr that defines DIR" >&5
13961echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13962if eval "test \"\${$as_ac_Header+set}\" = set"; then
13963  echo $ECHO_N "(cached) $ECHO_C" >&6
13964else
13965  cat >conftest.$ac_ext <<_ACEOF
13966#line 13966 "configure"
13967#include "confdefs.h"
13968#include <sys/types.h>
13969#include <$ac_hdr>
13970
13971int
13972main ()
13973{
13974if ((DIR *) 0)
13975return 0;
13976  ;
13977  return 0;
13978}
13979_ACEOF
13980rm -f conftest.$ac_objext
13981if { (eval echo "$as_me:13981: \"$ac_compile\"") >&5
13982  (eval $ac_compile) 2>&5
13983  ac_status=$?
13984  echo "$as_me:13984: \$? = $ac_status" >&5
13985  (exit $ac_status); } &&
13986         { ac_try='test -s conftest.$ac_objext'
13987  { (eval echo "$as_me:13987: \"$ac_try\"") >&5
13988  (eval $ac_try) 2>&5
13989  ac_status=$?
13990  echo "$as_me:13990: \$? = $ac_status" >&5
13991  (exit $ac_status); }; }; then
13992  eval "$as_ac_Header=yes"
13993else
13994  echo "$as_me: failed program was:" >&5
13995cat conftest.$ac_ext >&5
13996eval "$as_ac_Header=no"
13997fi
13998rm -f conftest.$ac_objext conftest.$ac_ext
13999fi
14000echo "$as_me:14000: result: `eval echo '${'$as_ac_Header'}'`" >&5
14001echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14002if test `eval echo '${'$as_ac_Header'}'` = yes; then
14003  cat >>confdefs.h <<EOF
14004#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14005EOF
14006
14007ac_header_dirent=$ac_hdr; break
14008fi
14009
14010done
14011# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14012if test $ac_header_dirent = dirent.h; then
14013  echo "$as_me:14013: checking for opendir in -ldir" >&5
14014echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14015if test "${ac_cv_lib_dir_opendir+set}" = set; then
14016  echo $ECHO_N "(cached) $ECHO_C" >&6
14017else
14018  ac_check_lib_save_LIBS=$LIBS
14019LIBS="-ldir  $LIBS"
14020cat >conftest.$ac_ext <<_ACEOF
14021#line 14021 "configure"
14022#include "confdefs.h"
14023
14024/* Override any gcc2 internal prototype to avoid an error.  */
14025#ifdef __cplusplus
14026extern "C"
14027#endif
14028/* We use char because int might match the return type of a gcc2
14029   builtin and then its argument prototype would still apply.  */
14030char opendir ();
14031int
14032main ()
14033{
14034opendir ();
14035  ;
14036  return 0;
14037}
14038_ACEOF
14039rm -f conftest.$ac_objext conftest$ac_exeext
14040if { (eval echo "$as_me:14040: \"$ac_link\"") >&5
14041  (eval $ac_link) 2>&5
14042  ac_status=$?
14043  echo "$as_me:14043: \$? = $ac_status" >&5
14044  (exit $ac_status); } &&
14045         { ac_try='test -s conftest$ac_exeext'
14046  { (eval echo "$as_me:14046: \"$ac_try\"") >&5
14047  (eval $ac_try) 2>&5
14048  ac_status=$?
14049  echo "$as_me:14049: \$? = $ac_status" >&5
14050  (exit $ac_status); }; }; then
14051  ac_cv_lib_dir_opendir=yes
14052else
14053  echo "$as_me: failed program was:" >&5
14054cat conftest.$ac_ext >&5
14055ac_cv_lib_dir_opendir=no
14056fi
14057rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14058LIBS=$ac_check_lib_save_LIBS
14059fi
14060echo "$as_me:14060: result: $ac_cv_lib_dir_opendir" >&5
14061echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14062if test $ac_cv_lib_dir_opendir = yes; then
14063  LIBS="$LIBS -ldir"
14064fi
14065
14066else
14067  echo "$as_me:14067: checking for opendir in -lx" >&5
14068echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14069if test "${ac_cv_lib_x_opendir+set}" = set; then
14070  echo $ECHO_N "(cached) $ECHO_C" >&6
14071else
14072  ac_check_lib_save_LIBS=$LIBS
14073LIBS="-lx  $LIBS"
14074cat >conftest.$ac_ext <<_ACEOF
14075#line 14075 "configure"
14076#include "confdefs.h"
14077
14078/* Override any gcc2 internal prototype to avoid an error.  */
14079#ifdef __cplusplus
14080extern "C"
14081#endif
14082/* We use char because int might match the return type of a gcc2
14083   builtin and then its argument prototype would still apply.  */
14084char opendir ();
14085int
14086main ()
14087{
14088opendir ();
14089  ;
14090  return 0;
14091}
14092_ACEOF
14093rm -f conftest.$ac_objext conftest$ac_exeext
14094if { (eval echo "$as_me:14094: \"$ac_link\"") >&5
14095  (eval $ac_link) 2>&5
14096  ac_status=$?
14097  echo "$as_me:14097: \$? = $ac_status" >&5
14098  (exit $ac_status); } &&
14099         { ac_try='test -s conftest$ac_exeext'
14100  { (eval echo "$as_me:14100: \"$ac_try\"") >&5
14101  (eval $ac_try) 2>&5
14102  ac_status=$?
14103  echo "$as_me:14103: \$? = $ac_status" >&5
14104  (exit $ac_status); }; }; then
14105  ac_cv_lib_x_opendir=yes
14106else
14107  echo "$as_me: failed program was:" >&5
14108cat conftest.$ac_ext >&5
14109ac_cv_lib_x_opendir=no
14110fi
14111rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14112LIBS=$ac_check_lib_save_LIBS
14113fi
14114echo "$as_me:14114: result: $ac_cv_lib_x_opendir" >&5
14115echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14116if test $ac_cv_lib_x_opendir = yes; then
14117  LIBS="$LIBS -lx"
14118fi
14119
14120fi
14121
14122echo "$as_me:14122: checking whether time.h and sys/time.h may both be included" >&5
14123echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14124if test "${ac_cv_header_time+set}" = set; then
14125  echo $ECHO_N "(cached) $ECHO_C" >&6
14126else
14127  cat >conftest.$ac_ext <<_ACEOF
14128#line 14128 "configure"
14129#include "confdefs.h"
14130#include <sys/types.h>
14131#include <sys/time.h>
14132#include <time.h>
14133
14134int
14135main ()
14136{
14137if ((struct tm *) 0)
14138return 0;
14139  ;
14140  return 0;
14141}
14142_ACEOF
14143rm -f conftest.$ac_objext
14144if { (eval echo "$as_me:14144: \"$ac_compile\"") >&5
14145  (eval $ac_compile) 2>&5
14146  ac_status=$?
14147  echo "$as_me:14147: \$? = $ac_status" >&5
14148  (exit $ac_status); } &&
14149         { ac_try='test -s conftest.$ac_objext'
14150  { (eval echo "$as_me:14150: \"$ac_try\"") >&5
14151  (eval $ac_try) 2>&5
14152  ac_status=$?
14153  echo "$as_me:14153: \$? = $ac_status" >&5
14154  (exit $ac_status); }; }; then
14155  ac_cv_header_time=yes
14156else
14157  echo "$as_me: failed program was:" >&5
14158cat conftest.$ac_ext >&5
14159ac_cv_header_time=no
14160fi
14161rm -f conftest.$ac_objext conftest.$ac_ext
14162fi
14163echo "$as_me:14163: result: $ac_cv_header_time" >&5
14164echo "${ECHO_T}$ac_cv_header_time" >&6
14165if test $ac_cv_header_time = yes; then
14166
14167cat >>confdefs.h <<\EOF
14168#define TIME_WITH_SYS_TIME 1
14169EOF
14170
14171fi
14172
14173cf_regex_func=no
14174
14175cf_regex_libs="regex re"
14176case $host_os in #(vi
14177mingw*)
14178	cf_regex_libs="gnurx $cf_regex_libs"
14179	;;
14180esac
14181
14182echo "$as_me:14182: checking for regcomp" >&5
14183echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14184if test "${ac_cv_func_regcomp+set}" = set; then
14185  echo $ECHO_N "(cached) $ECHO_C" >&6
14186else
14187  cat >conftest.$ac_ext <<_ACEOF
14188#line 14188 "configure"
14189#include "confdefs.h"
14190/* System header to define __stub macros and hopefully few prototypes,
14191    which can conflict with char regcomp (); below.  */
14192#include <assert.h>
14193/* Override any gcc2 internal prototype to avoid an error.  */
14194#ifdef __cplusplus
14195extern "C"
14196#endif
14197/* We use char because int might match the return type of a gcc2
14198   builtin and then its argument prototype would still apply.  */
14199char regcomp ();
14200char (*f) ();
14201
14202int
14203main ()
14204{
14205/* The GNU C library defines this for functions which it implements
14206    to always fail with ENOSYS.  Some functions are actually named
14207    something starting with __ and the normal name is an alias.  */
14208#if defined (__stub_regcomp) || defined (__stub___regcomp)
14209choke me
14210#else
14211f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14212#endif
14213
14214  ;
14215  return 0;
14216}
14217_ACEOF
14218rm -f conftest.$ac_objext conftest$ac_exeext
14219if { (eval echo "$as_me:14219: \"$ac_link\"") >&5
14220  (eval $ac_link) 2>&5
14221  ac_status=$?
14222  echo "$as_me:14222: \$? = $ac_status" >&5
14223  (exit $ac_status); } &&
14224         { ac_try='test -s conftest$ac_exeext'
14225  { (eval echo "$as_me:14225: \"$ac_try\"") >&5
14226  (eval $ac_try) 2>&5
14227  ac_status=$?
14228  echo "$as_me:14228: \$? = $ac_status" >&5
14229  (exit $ac_status); }; }; then
14230  ac_cv_func_regcomp=yes
14231else
14232  echo "$as_me: failed program was:" >&5
14233cat conftest.$ac_ext >&5
14234ac_cv_func_regcomp=no
14235fi
14236rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14237fi
14238echo "$as_me:14238: result: $ac_cv_func_regcomp" >&5
14239echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14240if test $ac_cv_func_regcomp = yes; then
14241  cf_regex_func=regcomp
14242else
14243
14244	for cf_regex_lib in $cf_regex_libs
14245	do
14246		as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14247echo "$as_me:14247: checking for regcomp in -l$cf_regex_lib" >&5
14248echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14249if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14250  echo $ECHO_N "(cached) $ECHO_C" >&6
14251else
14252  ac_check_lib_save_LIBS=$LIBS
14253LIBS="-l$cf_regex_lib  $LIBS"
14254cat >conftest.$ac_ext <<_ACEOF
14255#line 14255 "configure"
14256#include "confdefs.h"
14257
14258/* Override any gcc2 internal prototype to avoid an error.  */
14259#ifdef __cplusplus
14260extern "C"
14261#endif
14262/* We use char because int might match the return type of a gcc2
14263   builtin and then its argument prototype would still apply.  */
14264char regcomp ();
14265int
14266main ()
14267{
14268regcomp ();
14269  ;
14270  return 0;
14271}
14272_ACEOF
14273rm -f conftest.$ac_objext conftest$ac_exeext
14274if { (eval echo "$as_me:14274: \"$ac_link\"") >&5
14275  (eval $ac_link) 2>&5
14276  ac_status=$?
14277  echo "$as_me:14277: \$? = $ac_status" >&5
14278  (exit $ac_status); } &&
14279         { ac_try='test -s conftest$ac_exeext'
14280  { (eval echo "$as_me:14280: \"$ac_try\"") >&5
14281  (eval $ac_try) 2>&5
14282  ac_status=$?
14283  echo "$as_me:14283: \$? = $ac_status" >&5
14284  (exit $ac_status); }; }; then
14285  eval "$as_ac_Lib=yes"
14286else
14287  echo "$as_me: failed program was:" >&5
14288cat conftest.$ac_ext >&5
14289eval "$as_ac_Lib=no"
14290fi
14291rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14292LIBS=$ac_check_lib_save_LIBS
14293fi
14294echo "$as_me:14294: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14295echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14296if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14297
14298				LIBS="-l$cf_regex_lib $LIBS"
14299				cf_regex_func=regcomp
14300				break
14301fi
14302
14303	done
14304
14305fi
14306
14307if test "$cf_regex_func" = no ; then
14308	echo "$as_me:14308: checking for compile" >&5
14309echo $ECHO_N "checking for compile... $ECHO_C" >&6
14310if test "${ac_cv_func_compile+set}" = set; then
14311  echo $ECHO_N "(cached) $ECHO_C" >&6
14312else
14313  cat >conftest.$ac_ext <<_ACEOF
14314#line 14314 "configure"
14315#include "confdefs.h"
14316/* System header to define __stub macros and hopefully few prototypes,
14317    which can conflict with char compile (); below.  */
14318#include <assert.h>
14319/* Override any gcc2 internal prototype to avoid an error.  */
14320#ifdef __cplusplus
14321extern "C"
14322#endif
14323/* We use char because int might match the return type of a gcc2
14324   builtin and then its argument prototype would still apply.  */
14325char compile ();
14326char (*f) ();
14327
14328int
14329main ()
14330{
14331/* The GNU C library defines this for functions which it implements
14332    to always fail with ENOSYS.  Some functions are actually named
14333    something starting with __ and the normal name is an alias.  */
14334#if defined (__stub_compile) || defined (__stub___compile)
14335choke me
14336#else
14337f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14338#endif
14339
14340  ;
14341  return 0;
14342}
14343_ACEOF
14344rm -f conftest.$ac_objext conftest$ac_exeext
14345if { (eval echo "$as_me:14345: \"$ac_link\"") >&5
14346  (eval $ac_link) 2>&5
14347  ac_status=$?
14348  echo "$as_me:14348: \$? = $ac_status" >&5
14349  (exit $ac_status); } &&
14350         { ac_try='test -s conftest$ac_exeext'
14351  { (eval echo "$as_me:14351: \"$ac_try\"") >&5
14352  (eval $ac_try) 2>&5
14353  ac_status=$?
14354  echo "$as_me:14354: \$? = $ac_status" >&5
14355  (exit $ac_status); }; }; then
14356  ac_cv_func_compile=yes
14357else
14358  echo "$as_me: failed program was:" >&5
14359cat conftest.$ac_ext >&5
14360ac_cv_func_compile=no
14361fi
14362rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14363fi
14364echo "$as_me:14364: result: $ac_cv_func_compile" >&5
14365echo "${ECHO_T}$ac_cv_func_compile" >&6
14366if test $ac_cv_func_compile = yes; then
14367  cf_regex_func=compile
14368else
14369
14370		echo "$as_me:14370: checking for compile in -lgen" >&5
14371echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14372if test "${ac_cv_lib_gen_compile+set}" = set; then
14373  echo $ECHO_N "(cached) $ECHO_C" >&6
14374else
14375  ac_check_lib_save_LIBS=$LIBS
14376LIBS="-lgen  $LIBS"
14377cat >conftest.$ac_ext <<_ACEOF
14378#line 14378 "configure"
14379#include "confdefs.h"
14380
14381/* Override any gcc2 internal prototype to avoid an error.  */
14382#ifdef __cplusplus
14383extern "C"
14384#endif
14385/* We use char because int might match the return type of a gcc2
14386   builtin and then its argument prototype would still apply.  */
14387char compile ();
14388int
14389main ()
14390{
14391compile ();
14392  ;
14393  return 0;
14394}
14395_ACEOF
14396rm -f conftest.$ac_objext conftest$ac_exeext
14397if { (eval echo "$as_me:14397: \"$ac_link\"") >&5
14398  (eval $ac_link) 2>&5
14399  ac_status=$?
14400  echo "$as_me:14400: \$? = $ac_status" >&5
14401  (exit $ac_status); } &&
14402         { ac_try='test -s conftest$ac_exeext'
14403  { (eval echo "$as_me:14403: \"$ac_try\"") >&5
14404  (eval $ac_try) 2>&5
14405  ac_status=$?
14406  echo "$as_me:14406: \$? = $ac_status" >&5
14407  (exit $ac_status); }; }; then
14408  ac_cv_lib_gen_compile=yes
14409else
14410  echo "$as_me: failed program was:" >&5
14411cat conftest.$ac_ext >&5
14412ac_cv_lib_gen_compile=no
14413fi
14414rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14415LIBS=$ac_check_lib_save_LIBS
14416fi
14417echo "$as_me:14417: result: $ac_cv_lib_gen_compile" >&5
14418echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14419if test $ac_cv_lib_gen_compile = yes; then
14420
14421				LIBS="-lgen $LIBS"
14422				cf_regex_func=compile
14423fi
14424
14425fi
14426
14427fi
14428
14429if test "$cf_regex_func" = no ; then
14430	{ echo "$as_me:14430: WARNING: cannot find regular expression library" >&5
14431echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14432fi
14433
14434echo "$as_me:14434: checking for regular-expression headers" >&5
14435echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14436if test "${cf_cv_regex_hdrs+set}" = set; then
14437  echo $ECHO_N "(cached) $ECHO_C" >&6
14438else
14439
14440cf_cv_regex_hdrs=no
14441case $cf_regex_func in #(vi
14442compile) #(vi
14443	for cf_regex_hdr in regexp.h regexpr.h
14444	do
14445		cat >conftest.$ac_ext <<_ACEOF
14446#line 14446 "configure"
14447#include "confdefs.h"
14448#include <$cf_regex_hdr>
14449int
14450main ()
14451{
14452
14453			char *p = compile("", "", "", 0);
14454			int x = step("", "");
14455
14456  ;
14457  return 0;
14458}
14459_ACEOF
14460rm -f conftest.$ac_objext conftest$ac_exeext
14461if { (eval echo "$as_me:14461: \"$ac_link\"") >&5
14462  (eval $ac_link) 2>&5
14463  ac_status=$?
14464  echo "$as_me:14464: \$? = $ac_status" >&5
14465  (exit $ac_status); } &&
14466         { ac_try='test -s conftest$ac_exeext'
14467  { (eval echo "$as_me:14467: \"$ac_try\"") >&5
14468  (eval $ac_try) 2>&5
14469  ac_status=$?
14470  echo "$as_me:14470: \$? = $ac_status" >&5
14471  (exit $ac_status); }; }; then
14472
14473			cf_cv_regex_hdrs=$cf_regex_hdr
14474			break
14475
14476else
14477  echo "$as_me: failed program was:" >&5
14478cat conftest.$ac_ext >&5
14479fi
14480rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14481	done
14482	;;
14483*)
14484	for cf_regex_hdr in regex.h
14485	do
14486		cat >conftest.$ac_ext <<_ACEOF
14487#line 14487 "configure"
14488#include "confdefs.h"
14489#include <sys/types.h>
14490#include <$cf_regex_hdr>
14491int
14492main ()
14493{
14494
14495			regex_t *p;
14496			int x = regcomp(p, "", 0);
14497			int y = regexec(p, "", 0, 0, 0);
14498			regfree(p);
14499
14500  ;
14501  return 0;
14502}
14503_ACEOF
14504rm -f conftest.$ac_objext conftest$ac_exeext
14505if { (eval echo "$as_me:14505: \"$ac_link\"") >&5
14506  (eval $ac_link) 2>&5
14507  ac_status=$?
14508  echo "$as_me:14508: \$? = $ac_status" >&5
14509  (exit $ac_status); } &&
14510         { ac_try='test -s conftest$ac_exeext'
14511  { (eval echo "$as_me:14511: \"$ac_try\"") >&5
14512  (eval $ac_try) 2>&5
14513  ac_status=$?
14514  echo "$as_me:14514: \$? = $ac_status" >&5
14515  (exit $ac_status); }; }; then
14516
14517			cf_cv_regex_hdrs=$cf_regex_hdr
14518			break
14519
14520else
14521  echo "$as_me: failed program was:" >&5
14522cat conftest.$ac_ext >&5
14523fi
14524rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14525	done
14526	;;
14527esac
14528
14529fi
14530echo "$as_me:14530: result: $cf_cv_regex_hdrs" >&5
14531echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14532
14533case $cf_cv_regex_hdrs in #(vi
14534    no)	       { echo "$as_me:14534: WARNING: no regular expression header found" >&5
14535echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14536    regex.h)
14537cat >>confdefs.h <<\EOF
14538#define HAVE_REGEX_H_FUNCS 1
14539EOF
14540 ;; #(vi
14541    regexp.h)
14542cat >>confdefs.h <<\EOF
14543#define HAVE_REGEXP_H_FUNCS 1
14544EOF
14545 ;; #(vi
14546    regexpr.h)
14547cat >>confdefs.h <<\EOF
14548#define HAVE_REGEXPR_H_FUNCS 1
14549EOF
14550 ;;
14551esac
14552
14553for ac_header in \
14554fcntl.h \
14555getopt.h \
14556limits.h \
14557locale.h \
14558math.h \
14559poll.h \
14560sys/bsdtypes.h \
14561sys/ioctl.h \
14562sys/param.h \
14563sys/poll.h \
14564sys/select.h \
14565sys/time.h \
14566sys/times.h \
14567ttyent.h \
14568unistd.h \
14569wctype.h \
14570
14571do
14572as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14573echo "$as_me:14573: checking for $ac_header" >&5
14574echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14575if eval "test \"\${$as_ac_Header+set}\" = set"; then
14576  echo $ECHO_N "(cached) $ECHO_C" >&6
14577else
14578  cat >conftest.$ac_ext <<_ACEOF
14579#line 14579 "configure"
14580#include "confdefs.h"
14581#include <$ac_header>
14582_ACEOF
14583if { (eval echo "$as_me:14583: \"$ac_cpp conftest.$ac_ext\"") >&5
14584  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14585  ac_status=$?
14586  egrep -v '^ *\+' conftest.er1 >conftest.err
14587  rm -f conftest.er1
14588  cat conftest.err >&5
14589  echo "$as_me:14589: \$? = $ac_status" >&5
14590  (exit $ac_status); } >/dev/null; then
14591  if test -s conftest.err; then
14592    ac_cpp_err=$ac_c_preproc_warn_flag
14593  else
14594    ac_cpp_err=
14595  fi
14596else
14597  ac_cpp_err=yes
14598fi
14599if test -z "$ac_cpp_err"; then
14600  eval "$as_ac_Header=yes"
14601else
14602  echo "$as_me: failed program was:" >&5
14603  cat conftest.$ac_ext >&5
14604  eval "$as_ac_Header=no"
14605fi
14606rm -f conftest.err conftest.$ac_ext
14607fi
14608echo "$as_me:14608: result: `eval echo '${'$as_ac_Header'}'`" >&5
14609echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14610if test `eval echo '${'$as_ac_Header'}'` = yes; then
14611  cat >>confdefs.h <<EOF
14612#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14613EOF
14614
14615fi
14616done
14617
14618for ac_header in unistd.h getopt.h
14619do
14620as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14621echo "$as_me:14621: checking for $ac_header" >&5
14622echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14623if eval "test \"\${$as_ac_Header+set}\" = set"; then
14624  echo $ECHO_N "(cached) $ECHO_C" >&6
14625else
14626  cat >conftest.$ac_ext <<_ACEOF
14627#line 14627 "configure"
14628#include "confdefs.h"
14629#include <$ac_header>
14630_ACEOF
14631if { (eval echo "$as_me:14631: \"$ac_cpp conftest.$ac_ext\"") >&5
14632  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14633  ac_status=$?
14634  egrep -v '^ *\+' conftest.er1 >conftest.err
14635  rm -f conftest.er1
14636  cat conftest.err >&5
14637  echo "$as_me:14637: \$? = $ac_status" >&5
14638  (exit $ac_status); } >/dev/null; then
14639  if test -s conftest.err; then
14640    ac_cpp_err=$ac_c_preproc_warn_flag
14641  else
14642    ac_cpp_err=
14643  fi
14644else
14645  ac_cpp_err=yes
14646fi
14647if test -z "$ac_cpp_err"; then
14648  eval "$as_ac_Header=yes"
14649else
14650  echo "$as_me: failed program was:" >&5
14651  cat conftest.$ac_ext >&5
14652  eval "$as_ac_Header=no"
14653fi
14654rm -f conftest.err conftest.$ac_ext
14655fi
14656echo "$as_me:14656: result: `eval echo '${'$as_ac_Header'}'`" >&5
14657echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14658if test `eval echo '${'$as_ac_Header'}'` = yes; then
14659  cat >>confdefs.h <<EOF
14660#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14661EOF
14662
14663fi
14664done
14665
14666echo "$as_me:14666: checking for header declaring getopt variables" >&5
14667echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14668if test "${cf_cv_getopt_header+set}" = set; then
14669  echo $ECHO_N "(cached) $ECHO_C" >&6
14670else
14671
14672cf_cv_getopt_header=none
14673for cf_header in stdio.h stdlib.h unistd.h getopt.h
14674do
14675cat >conftest.$ac_ext <<_ACEOF
14676#line 14676 "configure"
14677#include "confdefs.h"
14678
14679#include <$cf_header>
14680int
14681main ()
14682{
14683int x = optind; char *y = optarg
14684  ;
14685  return 0;
14686}
14687_ACEOF
14688rm -f conftest.$ac_objext
14689if { (eval echo "$as_me:14689: \"$ac_compile\"") >&5
14690  (eval $ac_compile) 2>&5
14691  ac_status=$?
14692  echo "$as_me:14692: \$? = $ac_status" >&5
14693  (exit $ac_status); } &&
14694         { ac_try='test -s conftest.$ac_objext'
14695  { (eval echo "$as_me:14695: \"$ac_try\"") >&5
14696  (eval $ac_try) 2>&5
14697  ac_status=$?
14698  echo "$as_me:14698: \$? = $ac_status" >&5
14699  (exit $ac_status); }; }; then
14700  cf_cv_getopt_header=$cf_header
14701 break
14702else
14703  echo "$as_me: failed program was:" >&5
14704cat conftest.$ac_ext >&5
14705fi
14706rm -f conftest.$ac_objext conftest.$ac_ext
14707done
14708
14709fi
14710echo "$as_me:14710: result: $cf_cv_getopt_header" >&5
14711echo "${ECHO_T}$cf_cv_getopt_header" >&6
14712if test $cf_cv_getopt_header != none ; then
14713
14714cat >>confdefs.h <<\EOF
14715#define HAVE_GETOPT_HEADER 1
14716EOF
14717
14718fi
14719
14720# check for ISC (this may also define _POSIX_SOURCE)
14721# Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14722if test "x$ISC" = xyes ; then
14723
14724echo "$as_me:14724: checking for main in -lcposix" >&5
14725echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14726if test "${ac_cv_lib_cposix_main+set}" = set; then
14727  echo $ECHO_N "(cached) $ECHO_C" >&6
14728else
14729  ac_check_lib_save_LIBS=$LIBS
14730LIBS="-lcposix  $LIBS"
14731cat >conftest.$ac_ext <<_ACEOF
14732#line 14732 "configure"
14733#include "confdefs.h"
14734
14735int
14736main ()
14737{
14738main ();
14739  ;
14740  return 0;
14741}
14742_ACEOF
14743rm -f conftest.$ac_objext conftest$ac_exeext
14744if { (eval echo "$as_me:14744: \"$ac_link\"") >&5
14745  (eval $ac_link) 2>&5
14746  ac_status=$?
14747  echo "$as_me:14747: \$? = $ac_status" >&5
14748  (exit $ac_status); } &&
14749         { ac_try='test -s conftest$ac_exeext'
14750  { (eval echo "$as_me:14750: \"$ac_try\"") >&5
14751  (eval $ac_try) 2>&5
14752  ac_status=$?
14753  echo "$as_me:14753: \$? = $ac_status" >&5
14754  (exit $ac_status); }; }; then
14755  ac_cv_lib_cposix_main=yes
14756else
14757  echo "$as_me: failed program was:" >&5
14758cat conftest.$ac_ext >&5
14759ac_cv_lib_cposix_main=no
14760fi
14761rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14762LIBS=$ac_check_lib_save_LIBS
14763fi
14764echo "$as_me:14764: result: $ac_cv_lib_cposix_main" >&5
14765echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14766if test $ac_cv_lib_cposix_main = yes; then
14767  cat >>confdefs.h <<EOF
14768#define HAVE_LIBCPOSIX 1
14769EOF
14770
14771  LIBS="-lcposix $LIBS"
14772
14773fi
14774
14775	echo "$as_me:14775: checking for bzero in -linet" >&5
14776echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14777if test "${ac_cv_lib_inet_bzero+set}" = set; then
14778  echo $ECHO_N "(cached) $ECHO_C" >&6
14779else
14780  ac_check_lib_save_LIBS=$LIBS
14781LIBS="-linet  $LIBS"
14782cat >conftest.$ac_ext <<_ACEOF
14783#line 14783 "configure"
14784#include "confdefs.h"
14785
14786/* Override any gcc2 internal prototype to avoid an error.  */
14787#ifdef __cplusplus
14788extern "C"
14789#endif
14790/* We use char because int might match the return type of a gcc2
14791   builtin and then its argument prototype would still apply.  */
14792char bzero ();
14793int
14794main ()
14795{
14796bzero ();
14797  ;
14798  return 0;
14799}
14800_ACEOF
14801rm -f conftest.$ac_objext conftest$ac_exeext
14802if { (eval echo "$as_me:14802: \"$ac_link\"") >&5
14803  (eval $ac_link) 2>&5
14804  ac_status=$?
14805  echo "$as_me:14805: \$? = $ac_status" >&5
14806  (exit $ac_status); } &&
14807         { ac_try='test -s conftest$ac_exeext'
14808  { (eval echo "$as_me:14808: \"$ac_try\"") >&5
14809  (eval $ac_try) 2>&5
14810  ac_status=$?
14811  echo "$as_me:14811: \$? = $ac_status" >&5
14812  (exit $ac_status); }; }; then
14813  ac_cv_lib_inet_bzero=yes
14814else
14815  echo "$as_me: failed program was:" >&5
14816cat conftest.$ac_ext >&5
14817ac_cv_lib_inet_bzero=no
14818fi
14819rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14820LIBS=$ac_check_lib_save_LIBS
14821fi
14822echo "$as_me:14822: result: $ac_cv_lib_inet_bzero" >&5
14823echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14824if test $ac_cv_lib_inet_bzero = yes; then
14825  LIBS="-linet $LIBS"
14826fi
14827fi
14828
14829echo "$as_me:14829: checking if sys/time.h works with sys/select.h" >&5
14830echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14831if test "${cf_cv_sys_time_select+set}" = set; then
14832  echo $ECHO_N "(cached) $ECHO_C" >&6
14833else
14834
14835cat >conftest.$ac_ext <<_ACEOF
14836#line 14836 "configure"
14837#include "confdefs.h"
14838
14839#include <sys/types.h>
14840#ifdef HAVE_SYS_TIME_H
14841#include <sys/time.h>
14842#endif
14843#ifdef HAVE_SYS_SELECT_H
14844#include <sys/select.h>
14845#endif
14846
14847int
14848main ()
14849{
14850
14851  ;
14852  return 0;
14853}
14854_ACEOF
14855rm -f conftest.$ac_objext
14856if { (eval echo "$as_me:14856: \"$ac_compile\"") >&5
14857  (eval $ac_compile) 2>&5
14858  ac_status=$?
14859  echo "$as_me:14859: \$? = $ac_status" >&5
14860  (exit $ac_status); } &&
14861         { ac_try='test -s conftest.$ac_objext'
14862  { (eval echo "$as_me:14862: \"$ac_try\"") >&5
14863  (eval $ac_try) 2>&5
14864  ac_status=$?
14865  echo "$as_me:14865: \$? = $ac_status" >&5
14866  (exit $ac_status); }; }; then
14867  cf_cv_sys_time_select=yes
14868else
14869  echo "$as_me: failed program was:" >&5
14870cat conftest.$ac_ext >&5
14871cf_cv_sys_time_select=no
14872fi
14873rm -f conftest.$ac_objext conftest.$ac_ext
14874
14875fi
14876
14877echo "$as_me:14877: result: $cf_cv_sys_time_select" >&5
14878echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14879test "$cf_cv_sys_time_select" = yes &&
14880cat >>confdefs.h <<\EOF
14881#define HAVE_SYS_TIME_SELECT 1
14882EOF
14883
14884###	checks for compiler characteristics
14885ac_ext=c
14886ac_cpp='$CPP $CPPFLAGS'
14887ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14888ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14889ac_compiler_gnu=$ac_cv_c_compiler_gnu
14890ac_main_return=return
14891
14892echo "$as_me:14892: checking for an ANSI C-conforming const" >&5
14893echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14894if test "${ac_cv_c_const+set}" = set; then
14895  echo $ECHO_N "(cached) $ECHO_C" >&6
14896else
14897  cat >conftest.$ac_ext <<_ACEOF
14898#line 14898 "configure"
14899#include "confdefs.h"
14900
14901int
14902main ()
14903{
14904/* FIXME: Include the comments suggested by Paul. */
14905#ifndef __cplusplus
14906  /* Ultrix mips cc rejects this.  */
14907  typedef int charset[2];
14908  const charset x;
14909  /* SunOS 4.1.1 cc rejects this.  */
14910  char const *const *ccp;
14911  char **p;
14912  /* NEC SVR4.0.2 mips cc rejects this.  */
14913  struct point {int x, y;};
14914  static struct point const zero = {0,0};
14915  /* AIX XL C 1.02.0.0 rejects this.
14916     It does not let you subtract one const X* pointer from another in
14917     an arm of an if-expression whose if-part is not a constant
14918     expression */
14919  const char *g = "string";
14920  ccp = &g + (g ? g-g : 0);
14921  /* HPUX 7.0 cc rejects these. */
14922  ++ccp;
14923  p = (char**) ccp;
14924  ccp = (char const *const *) p;
14925  { /* SCO 3.2v4 cc rejects this.  */
14926    char *t;
14927    char const *s = 0 ? (char *) 0 : (char const *) 0;
14928
14929    *t++ = 0;
14930  }
14931  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14932    int x[] = {25, 17};
14933    const int *foo = &x[0];
14934    ++foo;
14935  }
14936  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14937    typedef const int *iptr;
14938    iptr p = 0;
14939    ++p;
14940  }
14941  { /* AIX XL C 1.02.0.0 rejects this saying
14942       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14943    struct s { int j; const int *ap[3]; };
14944    struct s *b; b->j = 5;
14945  }
14946  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14947    const int foo = 10;
14948  }
14949#endif
14950
14951  ;
14952  return 0;
14953}
14954_ACEOF
14955rm -f conftest.$ac_objext
14956if { (eval echo "$as_me:14956: \"$ac_compile\"") >&5
14957  (eval $ac_compile) 2>&5
14958  ac_status=$?
14959  echo "$as_me:14959: \$? = $ac_status" >&5
14960  (exit $ac_status); } &&
14961         { ac_try='test -s conftest.$ac_objext'
14962  { (eval echo "$as_me:14962: \"$ac_try\"") >&5
14963  (eval $ac_try) 2>&5
14964  ac_status=$?
14965  echo "$as_me:14965: \$? = $ac_status" >&5
14966  (exit $ac_status); }; }; then
14967  ac_cv_c_const=yes
14968else
14969  echo "$as_me: failed program was:" >&5
14970cat conftest.$ac_ext >&5
14971ac_cv_c_const=no
14972fi
14973rm -f conftest.$ac_objext conftest.$ac_ext
14974fi
14975echo "$as_me:14975: result: $ac_cv_c_const" >&5
14976echo "${ECHO_T}$ac_cv_c_const" >&6
14977if test $ac_cv_c_const = no; then
14978
14979cat >>confdefs.h <<\EOF
14980#define const
14981EOF
14982
14983fi
14984
14985echo "$as_me:14985: checking for inline" >&5
14986echo $ECHO_N "checking for inline... $ECHO_C" >&6
14987if test "${ac_cv_c_inline+set}" = set; then
14988  echo $ECHO_N "(cached) $ECHO_C" >&6
14989else
14990  ac_cv_c_inline=no
14991for ac_kw in inline __inline__ __inline; do
14992  cat >conftest.$ac_ext <<_ACEOF
14993#line 14993 "configure"
14994#include "confdefs.h"
14995#ifndef __cplusplus
14996static $ac_kw int static_foo () {return 0; }
14997$ac_kw int foo () {return 0; }
14998#endif
14999
15000_ACEOF
15001rm -f conftest.$ac_objext
15002if { (eval echo "$as_me:15002: \"$ac_compile\"") >&5
15003  (eval $ac_compile) 2>&5
15004  ac_status=$?
15005  echo "$as_me:15005: \$? = $ac_status" >&5
15006  (exit $ac_status); } &&
15007         { ac_try='test -s conftest.$ac_objext'
15008  { (eval echo "$as_me:15008: \"$ac_try\"") >&5
15009  (eval $ac_try) 2>&5
15010  ac_status=$?
15011  echo "$as_me:15011: \$? = $ac_status" >&5
15012  (exit $ac_status); }; }; then
15013  ac_cv_c_inline=$ac_kw; break
15014else
15015  echo "$as_me: failed program was:" >&5
15016cat conftest.$ac_ext >&5
15017fi
15018rm -f conftest.$ac_objext conftest.$ac_ext
15019done
15020
15021fi
15022echo "$as_me:15022: result: $ac_cv_c_inline" >&5
15023echo "${ECHO_T}$ac_cv_c_inline" >&6
15024case $ac_cv_c_inline in
15025  inline | yes) ;;
15026  no)
15027cat >>confdefs.h <<\EOF
15028#define inline
15029EOF
15030 ;;
15031  *)  cat >>confdefs.h <<EOF
15032#define inline $ac_cv_c_inline
15033EOF
15034 ;;
15035esac
15036
15037NCURSES_INLINE=
15038if test "$ac_cv_c_inline" != no ; then
15039  NCURSES_INLINE=inline
15040  if test "$INTEL_COMPILER" = yes
15041  then
15042    :
15043  elif test "$CLANG_COMPILER" = yes
15044  then
15045    :
15046  elif test "$GCC" = yes
15047  then
15048    echo "$as_me:15048: checking if $CC supports options to tune inlining" >&5
15049echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15050if test "${cf_cv_gcc_inline+set}" = set; then
15051  echo $ECHO_N "(cached) $ECHO_C" >&6
15052else
15053
15054      cf_save_CFLAGS=$CFLAGS
15055      CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15056      cat >conftest.$ac_ext <<_ACEOF
15057#line 15057 "configure"
15058#include "confdefs.h"
15059inline int foo(void) { return 1; }
15060int
15061main ()
15062{
15063${cf_cv_main_return:-return} foo()
15064  ;
15065  return 0;
15066}
15067_ACEOF
15068rm -f conftest.$ac_objext
15069if { (eval echo "$as_me:15069: \"$ac_compile\"") >&5
15070  (eval $ac_compile) 2>&5
15071  ac_status=$?
15072  echo "$as_me:15072: \$? = $ac_status" >&5
15073  (exit $ac_status); } &&
15074         { ac_try='test -s conftest.$ac_objext'
15075  { (eval echo "$as_me:15075: \"$ac_try\"") >&5
15076  (eval $ac_try) 2>&5
15077  ac_status=$?
15078  echo "$as_me:15078: \$? = $ac_status" >&5
15079  (exit $ac_status); }; }; then
15080  cf_cv_gcc_inline=yes
15081else
15082  echo "$as_me: failed program was:" >&5
15083cat conftest.$ac_ext >&5
15084cf_cv_gcc_inline=no
15085fi
15086rm -f conftest.$ac_objext conftest.$ac_ext
15087      CFLAGS=$cf_save_CFLAGS
15088
15089fi
15090echo "$as_me:15090: result: $cf_cv_gcc_inline" >&5
15091echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15092    if test "$cf_cv_gcc_inline" = yes ; then
15093
15094cf_fix_cppflags=no
15095cf_new_cflags=
15096cf_new_cppflags=
15097cf_new_extra_cppflags=
15098
15099for cf_add_cflags in --param max-inline-insns-single=1200
15100do
15101case $cf_fix_cppflags in
15102no)
15103	case $cf_add_cflags in #(vi
15104	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15105		case $cf_add_cflags in
15106		-D*)
15107			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15108
15109			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15110				&& test -z "${cf_tst_cflags}" \
15111				&& cf_fix_cppflags=yes
15112
15113			if test $cf_fix_cppflags = yes ; then
15114				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15115				continue
15116			elif test "${cf_tst_cflags}" = "\"'" ; then
15117				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15118				continue
15119			fi
15120			;;
15121		esac
15122		case "$CPPFLAGS" in
15123		*$cf_add_cflags) #(vi
15124			;;
15125		*) #(vi
15126			case $cf_add_cflags in #(vi
15127			-D*)
15128				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15129
15130CPPFLAGS=`echo "$CPPFLAGS" | \
15131	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
15132		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
15133
15134				;;
15135			esac
15136			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15137			;;
15138		esac
15139		;;
15140	*)
15141		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15142		;;
15143	esac
15144	;;
15145yes)
15146	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15147
15148	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15149
15150	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15151		&& test -z "${cf_tst_cflags}" \
15152		&& cf_fix_cppflags=no
15153	;;
15154esac
15155done
15156
15157if test -n "$cf_new_cflags" ; then
15158
15159	CFLAGS="$CFLAGS $cf_new_cflags"
15160fi
15161
15162if test -n "$cf_new_cppflags" ; then
15163
15164	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15165fi
15166
15167if test -n "$cf_new_extra_cppflags" ; then
15168
15169	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15170fi
15171
15172    fi
15173  fi
15174fi
15175
15176echo "$as_me:15176: checking for signal global datatype" >&5
15177echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15178if test "${cf_cv_sig_atomic_t+set}" = set; then
15179  echo $ECHO_N "(cached) $ECHO_C" >&6
15180else
15181
15182	for cf_type in \
15183		"volatile sig_atomic_t" \
15184		"sig_atomic_t" \
15185		"int"
15186	do
15187	cat >conftest.$ac_ext <<_ACEOF
15188#line 15188 "configure"
15189#include "confdefs.h"
15190
15191#include <sys/types.h>
15192#include <signal.h>
15193#include <stdio.h>
15194
15195extern $cf_type x;
15196$cf_type x;
15197static void handler(int sig)
15198{
15199	x = 5;
15200}
15201int
15202main ()
15203{
15204signal(SIGINT, handler);
15205		 x = 1
15206  ;
15207  return 0;
15208}
15209_ACEOF
15210rm -f conftest.$ac_objext
15211if { (eval echo "$as_me:15211: \"$ac_compile\"") >&5
15212  (eval $ac_compile) 2>&5
15213  ac_status=$?
15214  echo "$as_me:15214: \$? = $ac_status" >&5
15215  (exit $ac_status); } &&
15216         { ac_try='test -s conftest.$ac_objext'
15217  { (eval echo "$as_me:15217: \"$ac_try\"") >&5
15218  (eval $ac_try) 2>&5
15219  ac_status=$?
15220  echo "$as_me:15220: \$? = $ac_status" >&5
15221  (exit $ac_status); }; }; then
15222  cf_cv_sig_atomic_t=$cf_type
15223else
15224  echo "$as_me: failed program was:" >&5
15225cat conftest.$ac_ext >&5
15226cf_cv_sig_atomic_t=no
15227fi
15228rm -f conftest.$ac_objext conftest.$ac_ext
15229		test "$cf_cv_sig_atomic_t" != no && break
15230	done
15231
15232fi
15233
15234echo "$as_me:15234: result: $cf_cv_sig_atomic_t" >&5
15235echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15236test "$cf_cv_sig_atomic_t" != no &&
15237cat >>confdefs.h <<EOF
15238#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15239EOF
15240
15241if test $NCURSES_CHTYPE = auto ; then
15242
15243echo "$as_me:15243: checking for type of chtype" >&5
15244echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15245if test "${cf_cv_typeof_chtype+set}" = set; then
15246  echo $ECHO_N "(cached) $ECHO_C" >&6
15247else
15248
15249		if test "$cross_compiling" = yes; then
15250  cf_cv_typeof_chtype=long
15251else
15252  cat >conftest.$ac_ext <<_ACEOF
15253#line 15253 "configure"
15254#include "confdefs.h"
15255
15256#define WANT_BITS 31
15257#include <stdio.h>
15258int main()
15259{
15260	FILE *fp = fopen("cf_test.out", "w");
15261	if (fp != 0) {
15262		char *result = "long";
15263		if (sizeof(unsigned long) > sizeof(unsigned int)) {
15264			int n;
15265			unsigned int x, y;
15266			for (n = 0; n < WANT_BITS; n++) {
15267				x = (1 << n);
15268				y = (x >> n);
15269				if (y != 1 || x == 0) {
15270					x = 0;
15271					break;
15272				}
15273			}
15274			/*
15275			 * If x is nonzero, an int is big enough for the bits
15276			 * that we want.
15277			 */
15278			result = (x != 0) ? "int" : "long";
15279		}
15280		fputs(result, fp);
15281		fclose(fp);
15282	}
15283	${cf_cv_main_return:-return}(0);
15284}
15285
15286_ACEOF
15287rm -f conftest$ac_exeext
15288if { (eval echo "$as_me:15288: \"$ac_link\"") >&5
15289  (eval $ac_link) 2>&5
15290  ac_status=$?
15291  echo "$as_me:15291: \$? = $ac_status" >&5
15292  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15293  { (eval echo "$as_me:15293: \"$ac_try\"") >&5
15294  (eval $ac_try) 2>&5
15295  ac_status=$?
15296  echo "$as_me:15296: \$? = $ac_status" >&5
15297  (exit $ac_status); }; }; then
15298  cf_cv_typeof_chtype=`cat cf_test.out`
15299else
15300  echo "$as_me: program exited with status $ac_status" >&5
15301echo "$as_me: failed program was:" >&5
15302cat conftest.$ac_ext >&5
15303cf_cv_typeof_chtype=long
15304fi
15305rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15306fi
15307		rm -f cf_test.out
15308
15309fi
15310
15311echo "$as_me:15311: result: $cf_cv_typeof_chtype" >&5
15312echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15313
15314cat >>confdefs.h <<EOF
15315#define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15316EOF
15317
15318else
15319	cf_cv_typeof_chtype=$NCURSES_CHTYPE
15320fi
15321test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15322
15323echo "$as_me:15323: checking if unsigned literals are legal" >&5
15324echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15325if test "${cf_cv_unsigned_literals+set}" = set; then
15326  echo $ECHO_N "(cached) $ECHO_C" >&6
15327else
15328
15329	cat >conftest.$ac_ext <<_ACEOF
15330#line 15330 "configure"
15331#include "confdefs.h"
15332
15333int
15334main ()
15335{
15336long x = 1L + 1UL + 1U + 1
15337  ;
15338  return 0;
15339}
15340_ACEOF
15341rm -f conftest.$ac_objext
15342if { (eval echo "$as_me:15342: \"$ac_compile\"") >&5
15343  (eval $ac_compile) 2>&5
15344  ac_status=$?
15345  echo "$as_me:15345: \$? = $ac_status" >&5
15346  (exit $ac_status); } &&
15347         { ac_try='test -s conftest.$ac_objext'
15348  { (eval echo "$as_me:15348: \"$ac_try\"") >&5
15349  (eval $ac_try) 2>&5
15350  ac_status=$?
15351  echo "$as_me:15351: \$? = $ac_status" >&5
15352  (exit $ac_status); }; }; then
15353  cf_cv_unsigned_literals=yes
15354else
15355  echo "$as_me: failed program was:" >&5
15356cat conftest.$ac_ext >&5
15357cf_cv_unsigned_literals=no
15358fi
15359rm -f conftest.$ac_objext conftest.$ac_ext
15360
15361fi
15362
15363echo "$as_me:15363: result: $cf_cv_unsigned_literals" >&5
15364echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15365
15366cf_cv_1UL="1"
15367test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15368test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15369
15370if test $NCURSES_MMASK_T = auto ; then
15371	cf_cv_typeof_mmask_t=long
15372else
15373	cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15374fi
15375test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15376
15377###	Checks for external-data
15378
15379echo "$as_me:15379: checking if external errno is declared" >&5
15380echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15381if test "${cf_cv_dcl_errno+set}" = set; then
15382  echo $ECHO_N "(cached) $ECHO_C" >&6
15383else
15384
15385    cat >conftest.$ac_ext <<_ACEOF
15386#line 15386 "configure"
15387#include "confdefs.h"
15388
15389#ifdef HAVE_STDLIB_H
15390#include <stdlib.h>
15391#endif
15392#include <stdio.h>
15393#include <sys/types.h>
15394#include <errno.h>
15395int
15396main ()
15397{
15398int x = (int) errno
15399  ;
15400  return 0;
15401}
15402_ACEOF
15403rm -f conftest.$ac_objext
15404if { (eval echo "$as_me:15404: \"$ac_compile\"") >&5
15405  (eval $ac_compile) 2>&5
15406  ac_status=$?
15407  echo "$as_me:15407: \$? = $ac_status" >&5
15408  (exit $ac_status); } &&
15409         { ac_try='test -s conftest.$ac_objext'
15410  { (eval echo "$as_me:15410: \"$ac_try\"") >&5
15411  (eval $ac_try) 2>&5
15412  ac_status=$?
15413  echo "$as_me:15413: \$? = $ac_status" >&5
15414  (exit $ac_status); }; }; then
15415  cf_cv_dcl_errno=yes
15416else
15417  echo "$as_me: failed program was:" >&5
15418cat conftest.$ac_ext >&5
15419cf_cv_dcl_errno=no
15420fi
15421rm -f conftest.$ac_objext conftest.$ac_ext
15422
15423fi
15424echo "$as_me:15424: result: $cf_cv_dcl_errno" >&5
15425echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15426
15427if test "$cf_cv_dcl_errno" = no ; then
15428
15429cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15430
15431    cat >>confdefs.h <<EOF
15432#define $cf_result 1
15433EOF
15434
15435fi
15436
15437# It's possible (for near-UNIX clones) that the data doesn't exist
15438
15439echo "$as_me:15439: checking if external errno exists" >&5
15440echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15441if test "${cf_cv_have_errno+set}" = set; then
15442  echo $ECHO_N "(cached) $ECHO_C" >&6
15443else
15444
15445    cat >conftest.$ac_ext <<_ACEOF
15446#line 15446 "configure"
15447#include "confdefs.h"
15448
15449#undef errno
15450extern int errno;
15451
15452int
15453main ()
15454{
15455errno = 2
15456  ;
15457  return 0;
15458}
15459_ACEOF
15460rm -f conftest.$ac_objext conftest$ac_exeext
15461if { (eval echo "$as_me:15461: \"$ac_link\"") >&5
15462  (eval $ac_link) 2>&5
15463  ac_status=$?
15464  echo "$as_me:15464: \$? = $ac_status" >&5
15465  (exit $ac_status); } &&
15466         { ac_try='test -s conftest$ac_exeext'
15467  { (eval echo "$as_me:15467: \"$ac_try\"") >&5
15468  (eval $ac_try) 2>&5
15469  ac_status=$?
15470  echo "$as_me:15470: \$? = $ac_status" >&5
15471  (exit $ac_status); }; }; then
15472  cf_cv_have_errno=yes
15473else
15474  echo "$as_me: failed program was:" >&5
15475cat conftest.$ac_ext >&5
15476cf_cv_have_errno=no
15477fi
15478rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15479
15480fi
15481echo "$as_me:15481: result: $cf_cv_have_errno" >&5
15482echo "${ECHO_T}$cf_cv_have_errno" >&6
15483
15484if test "$cf_cv_have_errno" = yes ; then
15485
15486cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15487
15488    cat >>confdefs.h <<EOF
15489#define $cf_result 1
15490EOF
15491
15492fi
15493
15494echo "$as_me:15494: checking if data-only library module links" >&5
15495echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15496if test "${cf_cv_link_dataonly+set}" = set; then
15497  echo $ECHO_N "(cached) $ECHO_C" >&6
15498else
15499
15500	rm -f conftest.a
15501	cat >conftest.$ac_ext <<EOF
15502#line 15502 "configure"
15503int	testdata[3] = { 123, 456, 789 };
15504EOF
15505	if { (eval echo "$as_me:15505: \"$ac_compile\"") >&5
15506  (eval $ac_compile) 2>&5
15507  ac_status=$?
15508  echo "$as_me:15508: \$? = $ac_status" >&5
15509  (exit $ac_status); } ; then
15510		mv conftest.o data.o && \
15511		( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15512	fi
15513	rm -f conftest.$ac_ext data.o
15514	cat >conftest.$ac_ext <<EOF
15515#line 15515 "configure"
15516int	testfunc()
15517{
15518#if defined(NeXT)
15519	${cf_cv_main_return:-return}(1);	/* I'm told this linker is broken */
15520#else
15521	extern int testdata[3];
15522	return testdata[0] == 123
15523	   &&  testdata[1] == 456
15524	   &&  testdata[2] == 789;
15525#endif
15526}
15527EOF
15528	if { (eval echo "$as_me:15528: \"$ac_compile\"") >&5
15529  (eval $ac_compile) 2>&5
15530  ac_status=$?
15531  echo "$as_me:15531: \$? = $ac_status" >&5
15532  (exit $ac_status); }; then
15533		mv conftest.o func.o && \
15534		( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15535	fi
15536	rm -f conftest.$ac_ext func.o
15537	( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15538	cf_saveLIBS="$LIBS"
15539	LIBS="conftest.a $LIBS"
15540	if test "$cross_compiling" = yes; then
15541  cf_cv_link_dataonly=unknown
15542else
15543  cat >conftest.$ac_ext <<_ACEOF
15544#line 15544 "configure"
15545#include "confdefs.h"
15546
15547	int main()
15548	{
15549		extern int testfunc();
15550		${cf_cv_main_return:-return} (!testfunc());
15551	}
15552
15553_ACEOF
15554rm -f conftest$ac_exeext
15555if { (eval echo "$as_me:15555: \"$ac_link\"") >&5
15556  (eval $ac_link) 2>&5
15557  ac_status=$?
15558  echo "$as_me:15558: \$? = $ac_status" >&5
15559  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15560  { (eval echo "$as_me:15560: \"$ac_try\"") >&5
15561  (eval $ac_try) 2>&5
15562  ac_status=$?
15563  echo "$as_me:15563: \$? = $ac_status" >&5
15564  (exit $ac_status); }; }; then
15565  cf_cv_link_dataonly=yes
15566else
15567  echo "$as_me: program exited with status $ac_status" >&5
15568echo "$as_me: failed program was:" >&5
15569cat conftest.$ac_ext >&5
15570cf_cv_link_dataonly=no
15571fi
15572rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15573fi
15574	LIBS="$cf_saveLIBS"
15575
15576fi
15577
15578echo "$as_me:15578: result: $cf_cv_link_dataonly" >&5
15579echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15580
15581if test "$cf_cv_link_dataonly" = no ; then
15582
15583cat >>confdefs.h <<\EOF
15584#define BROKEN_LINKER 1
15585EOF
15586
15587	BROKEN_LINKER=1
15588fi
15589
15590###	Checks for library functions.
15591
15592for ac_func in \
15593getcwd \
15594getegid \
15595geteuid \
15596getttynam \
15597issetugid \
15598poll \
15599putenv \
15600remove \
15601select \
15602setbuf \
15603setbuffer \
15604setenv \
15605setvbuf \
15606sigaction \
15607sigvec \
15608strdup \
15609strstr \
15610tcgetpgrp \
15611times \
15612vsnprintf \
15613
15614do
15615as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15616echo "$as_me:15616: checking for $ac_func" >&5
15617echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15618if eval "test \"\${$as_ac_var+set}\" = set"; then
15619  echo $ECHO_N "(cached) $ECHO_C" >&6
15620else
15621  cat >conftest.$ac_ext <<_ACEOF
15622#line 15622 "configure"
15623#include "confdefs.h"
15624/* System header to define __stub macros and hopefully few prototypes,
15625    which can conflict with char $ac_func (); below.  */
15626#include <assert.h>
15627/* Override any gcc2 internal prototype to avoid an error.  */
15628#ifdef __cplusplus
15629extern "C"
15630#endif
15631/* We use char because int might match the return type of a gcc2
15632   builtin and then its argument prototype would still apply.  */
15633char $ac_func ();
15634char (*f) ();
15635
15636int
15637main ()
15638{
15639/* The GNU C library defines this for functions which it implements
15640    to always fail with ENOSYS.  Some functions are actually named
15641    something starting with __ and the normal name is an alias.  */
15642#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15643choke me
15644#else
15645f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15646#endif
15647
15648  ;
15649  return 0;
15650}
15651_ACEOF
15652rm -f conftest.$ac_objext conftest$ac_exeext
15653if { (eval echo "$as_me:15653: \"$ac_link\"") >&5
15654  (eval $ac_link) 2>&5
15655  ac_status=$?
15656  echo "$as_me:15656: \$? = $ac_status" >&5
15657  (exit $ac_status); } &&
15658         { ac_try='test -s conftest$ac_exeext'
15659  { (eval echo "$as_me:15659: \"$ac_try\"") >&5
15660  (eval $ac_try) 2>&5
15661  ac_status=$?
15662  echo "$as_me:15662: \$? = $ac_status" >&5
15663  (exit $ac_status); }; }; then
15664  eval "$as_ac_var=yes"
15665else
15666  echo "$as_me: failed program was:" >&5
15667cat conftest.$ac_ext >&5
15668eval "$as_ac_var=no"
15669fi
15670rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15671fi
15672echo "$as_me:15672: result: `eval echo '${'$as_ac_var'}'`" >&5
15673echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15674if test `eval echo '${'$as_ac_var'}'` = yes; then
15675  cat >>confdefs.h <<EOF
15676#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15677EOF
15678
15679fi
15680done
15681
15682if test "x$with_getcap" = "xyes" ; then
15683
15684echo "$as_me:15684: checking for terminal-capability database functions" >&5
15685echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15686if test "${cf_cv_cgetent+set}" = set; then
15687  echo $ECHO_N "(cached) $ECHO_C" >&6
15688else
15689
15690cat >conftest.$ac_ext <<_ACEOF
15691#line 15691 "configure"
15692#include "confdefs.h"
15693
15694#include <stdlib.h>
15695int
15696main ()
15697{
15698
15699	char temp[128];
15700	char *buf = temp;
15701	char *db_array = temp;
15702	cgetent(&buf, &db_array, "vt100");
15703	cgetcap(buf, "tc", '=');
15704	cgetmatch(buf, "tc");
15705
15706  ;
15707  return 0;
15708}
15709_ACEOF
15710rm -f conftest.$ac_objext conftest$ac_exeext
15711if { (eval echo "$as_me:15711: \"$ac_link\"") >&5
15712  (eval $ac_link) 2>&5
15713  ac_status=$?
15714  echo "$as_me:15714: \$? = $ac_status" >&5
15715  (exit $ac_status); } &&
15716         { ac_try='test -s conftest$ac_exeext'
15717  { (eval echo "$as_me:15717: \"$ac_try\"") >&5
15718  (eval $ac_try) 2>&5
15719  ac_status=$?
15720  echo "$as_me:15720: \$? = $ac_status" >&5
15721  (exit $ac_status); }; }; then
15722  cf_cv_cgetent=yes
15723else
15724  echo "$as_me: failed program was:" >&5
15725cat conftest.$ac_ext >&5
15726cf_cv_cgetent=no
15727fi
15728rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15729
15730fi
15731echo "$as_me:15731: result: $cf_cv_cgetent" >&5
15732echo "${ECHO_T}$cf_cv_cgetent" >&6
15733
15734if test "$cf_cv_cgetent" = yes
15735then
15736
15737cat >>confdefs.h <<\EOF
15738#define HAVE_BSD_CGETENT 1
15739EOF
15740
15741echo "$as_me:15741: checking if cgetent uses const parameter" >&5
15742echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15743if test "${cf_cv_cgetent_const+set}" = set; then
15744  echo $ECHO_N "(cached) $ECHO_C" >&6
15745else
15746
15747cat >conftest.$ac_ext <<_ACEOF
15748#line 15748 "configure"
15749#include "confdefs.h"
15750
15751#include <stdlib.h>
15752int
15753main ()
15754{
15755
15756	char temp[128];
15757	char *buf = temp;
15758#ifndef _NETBSD_SOURCE			/* given, since April 2004 in stdlib.h */
15759	const char *db_array = temp;
15760	cgetent(&buf, &db_array, "vt100");
15761#endif
15762	cgetcap(buf, "tc", '=');
15763	cgetmatch(buf, "tc");
15764
15765  ;
15766  return 0;
15767}
15768_ACEOF
15769rm -f conftest.$ac_objext conftest$ac_exeext
15770if { (eval echo "$as_me:15770: \"$ac_link\"") >&5
15771  (eval $ac_link) 2>&5
15772  ac_status=$?
15773  echo "$as_me:15773: \$? = $ac_status" >&5
15774  (exit $ac_status); } &&
15775         { ac_try='test -s conftest$ac_exeext'
15776  { (eval echo "$as_me:15776: \"$ac_try\"") >&5
15777  (eval $ac_try) 2>&5
15778  ac_status=$?
15779  echo "$as_me:15779: \$? = $ac_status" >&5
15780  (exit $ac_status); }; }; then
15781  cf_cv_cgetent_const=yes
15782else
15783  echo "$as_me: failed program was:" >&5
15784cat conftest.$ac_ext >&5
15785cf_cv_cgetent_const=no
15786fi
15787rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15788
15789fi
15790echo "$as_me:15790: result: $cf_cv_cgetent_const" >&5
15791echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15792	if test "$cf_cv_cgetent_const" = yes
15793	then
15794
15795cat >>confdefs.h <<EOF
15796#define CGETENT_CONST const
15797EOF
15798
15799	fi
15800fi
15801
15802fi
15803
15804echo "$as_me:15804: checking for isascii" >&5
15805echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15806if test "${cf_cv_have_isascii+set}" = set; then
15807  echo $ECHO_N "(cached) $ECHO_C" >&6
15808else
15809
15810	cat >conftest.$ac_ext <<_ACEOF
15811#line 15811 "configure"
15812#include "confdefs.h"
15813#include <ctype.h>
15814int
15815main ()
15816{
15817int x = isascii(' ')
15818  ;
15819  return 0;
15820}
15821_ACEOF
15822rm -f conftest.$ac_objext conftest$ac_exeext
15823if { (eval echo "$as_me:15823: \"$ac_link\"") >&5
15824  (eval $ac_link) 2>&5
15825  ac_status=$?
15826  echo "$as_me:15826: \$? = $ac_status" >&5
15827  (exit $ac_status); } &&
15828         { ac_try='test -s conftest$ac_exeext'
15829  { (eval echo "$as_me:15829: \"$ac_try\"") >&5
15830  (eval $ac_try) 2>&5
15831  ac_status=$?
15832  echo "$as_me:15832: \$? = $ac_status" >&5
15833  (exit $ac_status); }; }; then
15834  cf_cv_have_isascii=yes
15835else
15836  echo "$as_me: failed program was:" >&5
15837cat conftest.$ac_ext >&5
15838cf_cv_have_isascii=no
15839fi
15840rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15841
15842fi
15843echo "$as_me:15843: result: $cf_cv_have_isascii" >&5
15844echo "${ECHO_T}$cf_cv_have_isascii" >&6
15845test "$cf_cv_have_isascii" = yes &&
15846cat >>confdefs.h <<\EOF
15847#define HAVE_ISASCII 1
15848EOF
15849
15850if test "$ac_cv_func_sigaction" = yes; then
15851echo "$as_me:15851: checking whether sigaction needs _POSIX_SOURCE" >&5
15852echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15853cat >conftest.$ac_ext <<_ACEOF
15854#line 15854 "configure"
15855#include "confdefs.h"
15856
15857#include <sys/types.h>
15858#include <signal.h>
15859int
15860main ()
15861{
15862struct sigaction act
15863  ;
15864  return 0;
15865}
15866_ACEOF
15867rm -f conftest.$ac_objext
15868if { (eval echo "$as_me:15868: \"$ac_compile\"") >&5
15869  (eval $ac_compile) 2>&5
15870  ac_status=$?
15871  echo "$as_me:15871: \$? = $ac_status" >&5
15872  (exit $ac_status); } &&
15873         { ac_try='test -s conftest.$ac_objext'
15874  { (eval echo "$as_me:15874: \"$ac_try\"") >&5
15875  (eval $ac_try) 2>&5
15876  ac_status=$?
15877  echo "$as_me:15877: \$? = $ac_status" >&5
15878  (exit $ac_status); }; }; then
15879  sigact_bad=no
15880else
15881  echo "$as_me: failed program was:" >&5
15882cat conftest.$ac_ext >&5
15883
15884cat >conftest.$ac_ext <<_ACEOF
15885#line 15885 "configure"
15886#include "confdefs.h"
15887
15888#define _POSIX_SOURCE
15889#include <sys/types.h>
15890#include <signal.h>
15891int
15892main ()
15893{
15894struct sigaction act
15895  ;
15896  return 0;
15897}
15898_ACEOF
15899rm -f conftest.$ac_objext
15900if { (eval echo "$as_me:15900: \"$ac_compile\"") >&5
15901  (eval $ac_compile) 2>&5
15902  ac_status=$?
15903  echo "$as_me:15903: \$? = $ac_status" >&5
15904  (exit $ac_status); } &&
15905         { ac_try='test -s conftest.$ac_objext'
15906  { (eval echo "$as_me:15906: \"$ac_try\"") >&5
15907  (eval $ac_try) 2>&5
15908  ac_status=$?
15909  echo "$as_me:15909: \$? = $ac_status" >&5
15910  (exit $ac_status); }; }; then
15911  sigact_bad=yes
15912
15913cat >>confdefs.h <<\EOF
15914#define _POSIX_SOURCE 1
15915EOF
15916
15917else
15918  echo "$as_me: failed program was:" >&5
15919cat conftest.$ac_ext >&5
15920sigact_bad=unknown
15921fi
15922rm -f conftest.$ac_objext conftest.$ac_ext
15923fi
15924rm -f conftest.$ac_objext conftest.$ac_ext
15925echo "$as_me:15925: result: $sigact_bad" >&5
15926echo "${ECHO_T}$sigact_bad" >&6
15927fi
15928
15929echo "$as_me:15929: checking if nanosleep really works" >&5
15930echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15931if test "${cf_cv_func_nanosleep+set}" = set; then
15932  echo $ECHO_N "(cached) $ECHO_C" >&6
15933else
15934
15935if test "$cross_compiling" = yes; then
15936  cf_cv_func_nanosleep=unknown
15937else
15938  cat >conftest.$ac_ext <<_ACEOF
15939#line 15939 "configure"
15940#include "confdefs.h"
15941
15942#include <stdio.h>
15943#include <errno.h>
15944#include <time.h>
15945
15946#ifdef HAVE_SYS_TIME_H
15947#include <sys/time.h>
15948#endif
15949
15950int main() {
15951	struct timespec ts1, ts2;
15952	int code;
15953	ts1.tv_sec  = 0;
15954	ts1.tv_nsec = 750000000;
15955	ts2.tv_sec  = 0;
15956	ts2.tv_nsec = 0;
15957	errno = 0;
15958	code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15959	${cf_cv_main_return:-return}(code != 0);
15960}
15961
15962_ACEOF
15963rm -f conftest$ac_exeext
15964if { (eval echo "$as_me:15964: \"$ac_link\"") >&5
15965  (eval $ac_link) 2>&5
15966  ac_status=$?
15967  echo "$as_me:15967: \$? = $ac_status" >&5
15968  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15969  { (eval echo "$as_me:15969: \"$ac_try\"") >&5
15970  (eval $ac_try) 2>&5
15971  ac_status=$?
15972  echo "$as_me:15972: \$? = $ac_status" >&5
15973  (exit $ac_status); }; }; then
15974  cf_cv_func_nanosleep=yes
15975else
15976  echo "$as_me: program exited with status $ac_status" >&5
15977echo "$as_me: failed program was:" >&5
15978cat conftest.$ac_ext >&5
15979cf_cv_func_nanosleep=no
15980fi
15981rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15982fi
15983fi
15984echo "$as_me:15984: result: $cf_cv_func_nanosleep" >&5
15985echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15986
15987test "$cf_cv_func_nanosleep" = "yes" &&
15988cat >>confdefs.h <<\EOF
15989#define HAVE_NANOSLEEP 1
15990EOF
15991
15992for ac_header in \
15993termio.h \
15994termios.h \
15995unistd.h \
15996
15997do
15998as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15999echo "$as_me:15999: checking for $ac_header" >&5
16000echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16001if eval "test \"\${$as_ac_Header+set}\" = set"; then
16002  echo $ECHO_N "(cached) $ECHO_C" >&6
16003else
16004  cat >conftest.$ac_ext <<_ACEOF
16005#line 16005 "configure"
16006#include "confdefs.h"
16007#include <$ac_header>
16008_ACEOF
16009if { (eval echo "$as_me:16009: \"$ac_cpp conftest.$ac_ext\"") >&5
16010  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16011  ac_status=$?
16012  egrep -v '^ *\+' conftest.er1 >conftest.err
16013  rm -f conftest.er1
16014  cat conftest.err >&5
16015  echo "$as_me:16015: \$? = $ac_status" >&5
16016  (exit $ac_status); } >/dev/null; then
16017  if test -s conftest.err; then
16018    ac_cpp_err=$ac_c_preproc_warn_flag
16019  else
16020    ac_cpp_err=
16021  fi
16022else
16023  ac_cpp_err=yes
16024fi
16025if test -z "$ac_cpp_err"; then
16026  eval "$as_ac_Header=yes"
16027else
16028  echo "$as_me: failed program was:" >&5
16029  cat conftest.$ac_ext >&5
16030  eval "$as_ac_Header=no"
16031fi
16032rm -f conftest.err conftest.$ac_ext
16033fi
16034echo "$as_me:16034: result: `eval echo '${'$as_ac_Header'}'`" >&5
16035echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16036if test `eval echo '${'$as_ac_Header'}'` = yes; then
16037  cat >>confdefs.h <<EOF
16038#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16039EOF
16040
16041fi
16042done
16043
16044if test "$ISC" = yes ; then
16045
16046for ac_header in sys/termio.h
16047do
16048as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16049echo "$as_me:16049: checking for $ac_header" >&5
16050echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16051if eval "test \"\${$as_ac_Header+set}\" = set"; then
16052  echo $ECHO_N "(cached) $ECHO_C" >&6
16053else
16054  cat >conftest.$ac_ext <<_ACEOF
16055#line 16055 "configure"
16056#include "confdefs.h"
16057#include <$ac_header>
16058_ACEOF
16059if { (eval echo "$as_me:16059: \"$ac_cpp conftest.$ac_ext\"") >&5
16060  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16061  ac_status=$?
16062  egrep -v '^ *\+' conftest.er1 >conftest.err
16063  rm -f conftest.er1
16064  cat conftest.err >&5
16065  echo "$as_me:16065: \$? = $ac_status" >&5
16066  (exit $ac_status); } >/dev/null; then
16067  if test -s conftest.err; then
16068    ac_cpp_err=$ac_c_preproc_warn_flag
16069  else
16070    ac_cpp_err=
16071  fi
16072else
16073  ac_cpp_err=yes
16074fi
16075if test -z "$ac_cpp_err"; then
16076  eval "$as_ac_Header=yes"
16077else
16078  echo "$as_me: failed program was:" >&5
16079  cat conftest.$ac_ext >&5
16080  eval "$as_ac_Header=no"
16081fi
16082rm -f conftest.err conftest.$ac_ext
16083fi
16084echo "$as_me:16084: result: `eval echo '${'$as_ac_Header'}'`" >&5
16085echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16086if test `eval echo '${'$as_ac_Header'}'` = yes; then
16087  cat >>confdefs.h <<EOF
16088#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16089EOF
16090
16091fi
16092done
16093
16094fi
16095if test "$ac_cv_header_termios_h" = yes ; then
16096	case "$CFLAGS $CPPFLAGS" in
16097	*-D_POSIX_SOURCE*)
16098		termios_bad=dunno ;;
16099	*)	termios_bad=maybe ;;
16100	esac
16101	if test "$termios_bad" = maybe ; then
16102	echo "$as_me:16102: checking whether termios.h needs _POSIX_SOURCE" >&5
16103echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16104	cat >conftest.$ac_ext <<_ACEOF
16105#line 16105 "configure"
16106#include "confdefs.h"
16107#include <termios.h>
16108int
16109main ()
16110{
16111struct termios foo; int x = foo.c_iflag
16112  ;
16113  return 0;
16114}
16115_ACEOF
16116rm -f conftest.$ac_objext
16117if { (eval echo "$as_me:16117: \"$ac_compile\"") >&5
16118  (eval $ac_compile) 2>&5
16119  ac_status=$?
16120  echo "$as_me:16120: \$? = $ac_status" >&5
16121  (exit $ac_status); } &&
16122         { ac_try='test -s conftest.$ac_objext'
16123  { (eval echo "$as_me:16123: \"$ac_try\"") >&5
16124  (eval $ac_try) 2>&5
16125  ac_status=$?
16126  echo "$as_me:16126: \$? = $ac_status" >&5
16127  (exit $ac_status); }; }; then
16128  termios_bad=no
16129else
16130  echo "$as_me: failed program was:" >&5
16131cat conftest.$ac_ext >&5
16132
16133		cat >conftest.$ac_ext <<_ACEOF
16134#line 16134 "configure"
16135#include "confdefs.h"
16136
16137#define _POSIX_SOURCE
16138#include <termios.h>
16139int
16140main ()
16141{
16142struct termios foo; int x = foo.c_iflag
16143  ;
16144  return 0;
16145}
16146_ACEOF
16147rm -f conftest.$ac_objext
16148if { (eval echo "$as_me:16148: \"$ac_compile\"") >&5
16149  (eval $ac_compile) 2>&5
16150  ac_status=$?
16151  echo "$as_me:16151: \$? = $ac_status" >&5
16152  (exit $ac_status); } &&
16153         { ac_try='test -s conftest.$ac_objext'
16154  { (eval echo "$as_me:16154: \"$ac_try\"") >&5
16155  (eval $ac_try) 2>&5
16156  ac_status=$?
16157  echo "$as_me:16157: \$? = $ac_status" >&5
16158  (exit $ac_status); }; }; then
16159  termios_bad=unknown
16160else
16161  echo "$as_me: failed program was:" >&5
16162cat conftest.$ac_ext >&5
16163termios_bad=yes
16164cat >>confdefs.h <<\EOF
16165#define _POSIX_SOURCE 1
16166EOF
16167
16168fi
16169rm -f conftest.$ac_objext conftest.$ac_ext
16170
16171fi
16172rm -f conftest.$ac_objext conftest.$ac_ext
16173	echo "$as_me:16173: result: $termios_bad" >&5
16174echo "${ECHO_T}$termios_bad" >&6
16175	fi
16176fi
16177
16178echo "$as_me:16178: checking for tcgetattr" >&5
16179echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16180if test "${cf_cv_have_tcgetattr+set}" = set; then
16181  echo $ECHO_N "(cached) $ECHO_C" >&6
16182else
16183
16184cat >conftest.$ac_ext <<_ACEOF
16185#line 16185 "configure"
16186#include "confdefs.h"
16187
16188#include <sys/types.h>
16189#ifdef HAVE_UNISTD_H
16190#include <unistd.h>
16191#endif
16192#ifdef HAVE_TERMIOS_H
16193#include <termios.h>
16194#define TTY struct termios
16195#else
16196#ifdef HAVE_TERMIO_H
16197#include <termio.h>
16198#define TTY struct termio
16199#endif
16200#endif
16201
16202int
16203main ()
16204{
16205
16206TTY foo;
16207tcgetattr(1, &foo);
16208  ;
16209  return 0;
16210}
16211_ACEOF
16212rm -f conftest.$ac_objext conftest$ac_exeext
16213if { (eval echo "$as_me:16213: \"$ac_link\"") >&5
16214  (eval $ac_link) 2>&5
16215  ac_status=$?
16216  echo "$as_me:16216: \$? = $ac_status" >&5
16217  (exit $ac_status); } &&
16218         { ac_try='test -s conftest$ac_exeext'
16219  { (eval echo "$as_me:16219: \"$ac_try\"") >&5
16220  (eval $ac_try) 2>&5
16221  ac_status=$?
16222  echo "$as_me:16222: \$? = $ac_status" >&5
16223  (exit $ac_status); }; }; then
16224  cf_cv_have_tcgetattr=yes
16225else
16226  echo "$as_me: failed program was:" >&5
16227cat conftest.$ac_ext >&5
16228cf_cv_have_tcgetattr=no
16229fi
16230rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16231fi
16232echo "$as_me:16232: result: $cf_cv_have_tcgetattr" >&5
16233echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16234test "$cf_cv_have_tcgetattr" = yes &&
16235cat >>confdefs.h <<\EOF
16236#define HAVE_TCGETATTR 1
16237EOF
16238
16239echo "$as_me:16239: checking for vsscanf function or workaround" >&5
16240echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16241if test "${cf_cv_func_vsscanf+set}" = set; then
16242  echo $ECHO_N "(cached) $ECHO_C" >&6
16243else
16244
16245cat >conftest.$ac_ext <<_ACEOF
16246#line 16246 "configure"
16247#include "confdefs.h"
16248
16249#include <stdarg.h>
16250#include <stdio.h>
16251int
16252main ()
16253{
16254
16255	va_list ap;
16256	vsscanf("from", "%d", ap)
16257  ;
16258  return 0;
16259}
16260_ACEOF
16261rm -f conftest.$ac_objext conftest$ac_exeext
16262if { (eval echo "$as_me:16262: \"$ac_link\"") >&5
16263  (eval $ac_link) 2>&5
16264  ac_status=$?
16265  echo "$as_me:16265: \$? = $ac_status" >&5
16266  (exit $ac_status); } &&
16267         { ac_try='test -s conftest$ac_exeext'
16268  { (eval echo "$as_me:16268: \"$ac_try\"") >&5
16269  (eval $ac_try) 2>&5
16270  ac_status=$?
16271  echo "$as_me:16271: \$? = $ac_status" >&5
16272  (exit $ac_status); }; }; then
16273  cf_cv_func_vsscanf=vsscanf
16274else
16275  echo "$as_me: failed program was:" >&5
16276cat conftest.$ac_ext >&5
16277
16278cat >conftest.$ac_ext <<_ACEOF
16279#line 16279 "configure"
16280#include "confdefs.h"
16281
16282#include <stdarg.h>
16283#include <stdio.h>
16284int
16285main ()
16286{
16287
16288    FILE strbuf;
16289    char *str = "from";
16290
16291    strbuf._flag = _IOREAD;
16292    strbuf._ptr = strbuf._base = (unsigned char *) str;
16293    strbuf._cnt = strlen(str);
16294    strbuf._file = _NFILE;
16295    return (vfscanf(&strbuf, "%d", ap))
16296  ;
16297  return 0;
16298}
16299_ACEOF
16300rm -f conftest.$ac_objext conftest$ac_exeext
16301if { (eval echo "$as_me:16301: \"$ac_link\"") >&5
16302  (eval $ac_link) 2>&5
16303  ac_status=$?
16304  echo "$as_me:16304: \$? = $ac_status" >&5
16305  (exit $ac_status); } &&
16306         { ac_try='test -s conftest$ac_exeext'
16307  { (eval echo "$as_me:16307: \"$ac_try\"") >&5
16308  (eval $ac_try) 2>&5
16309  ac_status=$?
16310  echo "$as_me:16310: \$? = $ac_status" >&5
16311  (exit $ac_status); }; }; then
16312  cf_cv_func_vsscanf=vfscanf
16313else
16314  echo "$as_me: failed program was:" >&5
16315cat conftest.$ac_ext >&5
16316
16317cat >conftest.$ac_ext <<_ACEOF
16318#line 16318 "configure"
16319#include "confdefs.h"
16320
16321#include <stdarg.h>
16322#include <stdio.h>
16323int
16324main ()
16325{
16326
16327    FILE strbuf;
16328    char *str = "from";
16329
16330    strbuf._flag = _IOREAD;
16331    strbuf._ptr = strbuf._base = (unsigned char *) str;
16332    strbuf._cnt = strlen(str);
16333    strbuf._file = _NFILE;
16334    return (_doscan(&strbuf, "%d", ap))
16335  ;
16336  return 0;
16337}
16338_ACEOF
16339rm -f conftest.$ac_objext conftest$ac_exeext
16340if { (eval echo "$as_me:16340: \"$ac_link\"") >&5
16341  (eval $ac_link) 2>&5
16342  ac_status=$?
16343  echo "$as_me:16343: \$? = $ac_status" >&5
16344  (exit $ac_status); } &&
16345         { ac_try='test -s conftest$ac_exeext'
16346  { (eval echo "$as_me:16346: \"$ac_try\"") >&5
16347  (eval $ac_try) 2>&5
16348  ac_status=$?
16349  echo "$as_me:16349: \$? = $ac_status" >&5
16350  (exit $ac_status); }; }; then
16351  cf_cv_func_vsscanf=_doscan
16352else
16353  echo "$as_me: failed program was:" >&5
16354cat conftest.$ac_ext >&5
16355
16356cf_cv_func_vsscanf=no
16357fi
16358rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16359fi
16360rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16361fi
16362rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16363fi
16364echo "$as_me:16364: result: $cf_cv_func_vsscanf" >&5
16365echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16366
16367case $cf_cv_func_vsscanf in #(vi
16368vsscanf)
16369cat >>confdefs.h <<\EOF
16370#define HAVE_VSSCANF 1
16371EOF
16372;; #(vi
16373vfscanf)
16374cat >>confdefs.h <<\EOF
16375#define HAVE_VFSCANF 1
16376EOF
16377;; #(vi
16378_doscan)
16379cat >>confdefs.h <<\EOF
16380#define HAVE__DOSCAN 1
16381EOF
16382;;
16383esac
16384
16385echo "$as_me:16385: checking for working mkstemp" >&5
16386echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16387if test "${cf_cv_func_mkstemp+set}" = set; then
16388  echo $ECHO_N "(cached) $ECHO_C" >&6
16389else
16390
16391rm -rf conftest*
16392if test "$cross_compiling" = yes; then
16393  cf_cv_func_mkstemp=maybe
16394else
16395  cat >conftest.$ac_ext <<_ACEOF
16396#line 16396 "configure"
16397#include "confdefs.h"
16398
16399#include <sys/types.h>
16400#include <stdlib.h>
16401#include <stdio.h>
16402#include <string.h>
16403#include <sys/stat.h>
16404int main()
16405{
16406	char *tmpl = "conftestXXXXXX";
16407	char name[2][80];
16408	int n;
16409	int result = 0;
16410	int fd;
16411	struct stat sb;
16412
16413	umask(077);
16414	for (n = 0; n < 2; ++n) {
16415		strcpy(name[n], tmpl);
16416		if ((fd = mkstemp(name[n])) >= 0) {
16417			if (!strcmp(name[n], tmpl)
16418			 || stat(name[n], &sb) != 0
16419			 || (sb.st_mode & S_IFMT) != S_IFREG
16420			 || (sb.st_mode & 077) != 0) {
16421				result = 1;
16422			}
16423			close(fd);
16424		}
16425	}
16426	if (result == 0
16427	 && !strcmp(name[0], name[1]))
16428		result = 1;
16429	${cf_cv_main_return:-return}(result);
16430}
16431
16432_ACEOF
16433rm -f conftest$ac_exeext
16434if { (eval echo "$as_me:16434: \"$ac_link\"") >&5
16435  (eval $ac_link) 2>&5
16436  ac_status=$?
16437  echo "$as_me:16437: \$? = $ac_status" >&5
16438  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16439  { (eval echo "$as_me:16439: \"$ac_try\"") >&5
16440  (eval $ac_try) 2>&5
16441  ac_status=$?
16442  echo "$as_me:16442: \$? = $ac_status" >&5
16443  (exit $ac_status); }; }; then
16444  cf_cv_func_mkstemp=yes
16445
16446else
16447  echo "$as_me: program exited with status $ac_status" >&5
16448echo "$as_me: failed program was:" >&5
16449cat conftest.$ac_ext >&5
16450cf_cv_func_mkstemp=no
16451
16452fi
16453rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16454fi
16455
16456fi
16457echo "$as_me:16457: result: $cf_cv_func_mkstemp" >&5
16458echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16459if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16460	echo "$as_me:16460: checking for mkstemp" >&5
16461echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16462if test "${ac_cv_func_mkstemp+set}" = set; then
16463  echo $ECHO_N "(cached) $ECHO_C" >&6
16464else
16465  cat >conftest.$ac_ext <<_ACEOF
16466#line 16466 "configure"
16467#include "confdefs.h"
16468/* System header to define __stub macros and hopefully few prototypes,
16469    which can conflict with char mkstemp (); below.  */
16470#include <assert.h>
16471/* Override any gcc2 internal prototype to avoid an error.  */
16472#ifdef __cplusplus
16473extern "C"
16474#endif
16475/* We use char because int might match the return type of a gcc2
16476   builtin and then its argument prototype would still apply.  */
16477char mkstemp ();
16478char (*f) ();
16479
16480int
16481main ()
16482{
16483/* The GNU C library defines this for functions which it implements
16484    to always fail with ENOSYS.  Some functions are actually named
16485    something starting with __ and the normal name is an alias.  */
16486#if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16487choke me
16488#else
16489f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16490#endif
16491
16492  ;
16493  return 0;
16494}
16495_ACEOF
16496rm -f conftest.$ac_objext conftest$ac_exeext
16497if { (eval echo "$as_me:16497: \"$ac_link\"") >&5
16498  (eval $ac_link) 2>&5
16499  ac_status=$?
16500  echo "$as_me:16500: \$? = $ac_status" >&5
16501  (exit $ac_status); } &&
16502         { ac_try='test -s conftest$ac_exeext'
16503  { (eval echo "$as_me:16503: \"$ac_try\"") >&5
16504  (eval $ac_try) 2>&5
16505  ac_status=$?
16506  echo "$as_me:16506: \$? = $ac_status" >&5
16507  (exit $ac_status); }; }; then
16508  ac_cv_func_mkstemp=yes
16509else
16510  echo "$as_me: failed program was:" >&5
16511cat conftest.$ac_ext >&5
16512ac_cv_func_mkstemp=no
16513fi
16514rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16515fi
16516echo "$as_me:16516: result: $ac_cv_func_mkstemp" >&5
16517echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16518
16519fi
16520if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16521
16522cat >>confdefs.h <<\EOF
16523#define HAVE_MKSTEMP 1
16524EOF
16525
16526fi
16527
16528# setup for prototype of fallback for vsscanf()
16529
16530if test "$cf_cv_func_vsscanf" = vsscanf ; then
16531	HAVE_VSSCANF=1
16532else
16533	HAVE_VSSCANF=0
16534fi
16535
16536if test "x$cross_compiling" = xyes ; then
16537	{ echo "$as_me:16537: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16538echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16539else
16540	echo "$as_me:16540: checking whether setvbuf arguments are reversed" >&5
16541echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16542if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16543  echo $ECHO_N "(cached) $ECHO_C" >&6
16544else
16545  if test "$cross_compiling" = yes; then
16546  { { echo "$as_me:16546: error: cannot run test program while cross compiling" >&5
16547echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16548   { (exit 1); exit 1; }; }
16549else
16550  cat >conftest.$ac_ext <<_ACEOF
16551#line 16551 "configure"
16552#include "confdefs.h"
16553#include <stdio.h>
16554/* If setvbuf has the reversed format, exit 0. */
16555int
16556main ()
16557{
16558  /* This call has the arguments reversed.
16559     A reversed system may check and see that the address of main
16560     is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16561  if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16562    $ac_main_return(1);
16563  putc('\r', stdout);
16564  $ac_main_return(0);			/* Non-reversed systems segv here.  */
16565}
16566_ACEOF
16567rm -f conftest$ac_exeext
16568if { (eval echo "$as_me:16568: \"$ac_link\"") >&5
16569  (eval $ac_link) 2>&5
16570  ac_status=$?
16571  echo "$as_me:16571: \$? = $ac_status" >&5
16572  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16573  { (eval echo "$as_me:16573: \"$ac_try\"") >&5
16574  (eval $ac_try) 2>&5
16575  ac_status=$?
16576  echo "$as_me:16576: \$? = $ac_status" >&5
16577  (exit $ac_status); }; }; then
16578  ac_cv_func_setvbuf_reversed=yes
16579else
16580  echo "$as_me: program exited with status $ac_status" >&5
16581echo "$as_me: failed program was:" >&5
16582cat conftest.$ac_ext >&5
16583ac_cv_func_setvbuf_reversed=no
16584fi
16585rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16586fi
16587rm -f core core.* *.core
16588fi
16589echo "$as_me:16589: result: $ac_cv_func_setvbuf_reversed" >&5
16590echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16591if test $ac_cv_func_setvbuf_reversed = yes; then
16592
16593cat >>confdefs.h <<\EOF
16594#define SETVBUF_REVERSED 1
16595EOF
16596
16597fi
16598
16599fi
16600echo "$as_me:16600: checking for intptr_t" >&5
16601echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16602if test "${ac_cv_type_intptr_t+set}" = set; then
16603  echo $ECHO_N "(cached) $ECHO_C" >&6
16604else
16605  cat >conftest.$ac_ext <<_ACEOF
16606#line 16606 "configure"
16607#include "confdefs.h"
16608$ac_includes_default
16609int
16610main ()
16611{
16612if ((intptr_t *) 0)
16613  return 0;
16614if (sizeof (intptr_t))
16615  return 0;
16616  ;
16617  return 0;
16618}
16619_ACEOF
16620rm -f conftest.$ac_objext
16621if { (eval echo "$as_me:16621: \"$ac_compile\"") >&5
16622  (eval $ac_compile) 2>&5
16623  ac_status=$?
16624  echo "$as_me:16624: \$? = $ac_status" >&5
16625  (exit $ac_status); } &&
16626         { ac_try='test -s conftest.$ac_objext'
16627  { (eval echo "$as_me:16627: \"$ac_try\"") >&5
16628  (eval $ac_try) 2>&5
16629  ac_status=$?
16630  echo "$as_me:16630: \$? = $ac_status" >&5
16631  (exit $ac_status); }; }; then
16632  ac_cv_type_intptr_t=yes
16633else
16634  echo "$as_me: failed program was:" >&5
16635cat conftest.$ac_ext >&5
16636ac_cv_type_intptr_t=no
16637fi
16638rm -f conftest.$ac_objext conftest.$ac_ext
16639fi
16640echo "$as_me:16640: result: $ac_cv_type_intptr_t" >&5
16641echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16642if test $ac_cv_type_intptr_t = yes; then
16643  :
16644else
16645
16646cat >>confdefs.h <<EOF
16647#define intptr_t long
16648EOF
16649
16650fi
16651
16652echo "$as_me:16652: checking for type sigaction_t" >&5
16653echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16654if test "${cf_cv_type_sigaction+set}" = set; then
16655  echo $ECHO_N "(cached) $ECHO_C" >&6
16656else
16657
16658	cat >conftest.$ac_ext <<_ACEOF
16659#line 16659 "configure"
16660#include "confdefs.h"
16661
16662#include <signal.h>
16663int
16664main ()
16665{
16666sigaction_t x
16667  ;
16668  return 0;
16669}
16670_ACEOF
16671rm -f conftest.$ac_objext
16672if { (eval echo "$as_me:16672: \"$ac_compile\"") >&5
16673  (eval $ac_compile) 2>&5
16674  ac_status=$?
16675  echo "$as_me:16675: \$? = $ac_status" >&5
16676  (exit $ac_status); } &&
16677         { ac_try='test -s conftest.$ac_objext'
16678  { (eval echo "$as_me:16678: \"$ac_try\"") >&5
16679  (eval $ac_try) 2>&5
16680  ac_status=$?
16681  echo "$as_me:16681: \$? = $ac_status" >&5
16682  (exit $ac_status); }; }; then
16683  cf_cv_type_sigaction=yes
16684else
16685  echo "$as_me: failed program was:" >&5
16686cat conftest.$ac_ext >&5
16687cf_cv_type_sigaction=no
16688fi
16689rm -f conftest.$ac_objext conftest.$ac_ext
16690fi
16691
16692echo "$as_me:16692: result: $cf_cv_type_sigaction" >&5
16693echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16694test "$cf_cv_type_sigaction" = yes &&
16695cat >>confdefs.h <<\EOF
16696#define HAVE_TYPE_SIGACTION 1
16697EOF
16698
16699echo "$as_me:16699: checking declaration of size-change" >&5
16700echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16701if test "${cf_cv_sizechange+set}" = set; then
16702  echo $ECHO_N "(cached) $ECHO_C" >&6
16703else
16704
16705    cf_cv_sizechange=unknown
16706    cf_save_CPPFLAGS="$CPPFLAGS"
16707
16708for cf_opts in "" "NEED_PTEM_H"
16709do
16710
16711    CPPFLAGS="$cf_save_CPPFLAGS"
16712    test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16713    cat >conftest.$ac_ext <<_ACEOF
16714#line 16714 "configure"
16715#include "confdefs.h"
16716#include <sys/types.h>
16717#ifdef HAVE_TERMIOS_H
16718#include <termios.h>
16719#else
16720#ifdef HAVE_TERMIO_H
16721#include <termio.h>
16722#endif
16723#endif
16724#ifdef NEED_PTEM_H
16725/* This is a workaround for SCO:  they neglected to define struct winsize in
16726 * termios.h -- it's only in termio.h and ptem.h
16727 */
16728#include        <sys/stream.h>
16729#include        <sys/ptem.h>
16730#endif
16731#if !defined(sun) || !defined(HAVE_TERMIOS_H)
16732#include <sys/ioctl.h>
16733#endif
16734
16735int
16736main ()
16737{
16738
16739#ifdef TIOCGSIZE
16740	struct ttysize win;	/* FIXME: what system is this? */
16741	int y = win.ts_lines;
16742	int x = win.ts_cols;
16743#else
16744#ifdef TIOCGWINSZ
16745	struct winsize win;
16746	int y = win.ws_row;
16747	int x = win.ws_col;
16748#else
16749	no TIOCGSIZE or TIOCGWINSZ
16750#endif /* TIOCGWINSZ */
16751#endif /* TIOCGSIZE */
16752
16753  ;
16754  return 0;
16755}
16756_ACEOF
16757rm -f conftest.$ac_objext
16758if { (eval echo "$as_me:16758: \"$ac_compile\"") >&5
16759  (eval $ac_compile) 2>&5
16760  ac_status=$?
16761  echo "$as_me:16761: \$? = $ac_status" >&5
16762  (exit $ac_status); } &&
16763         { ac_try='test -s conftest.$ac_objext'
16764  { (eval echo "$as_me:16764: \"$ac_try\"") >&5
16765  (eval $ac_try) 2>&5
16766  ac_status=$?
16767  echo "$as_me:16767: \$? = $ac_status" >&5
16768  (exit $ac_status); }; }; then
16769  cf_cv_sizechange=yes
16770else
16771  echo "$as_me: failed program was:" >&5
16772cat conftest.$ac_ext >&5
16773cf_cv_sizechange=no
16774fi
16775rm -f conftest.$ac_objext conftest.$ac_ext
16776
16777	CPPFLAGS="$cf_save_CPPFLAGS"
16778	if test "$cf_cv_sizechange" = yes ; then
16779		echo "size-change succeeded ($cf_opts)" >&5
16780		test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16781		break
16782	fi
16783done
16784
16785fi
16786echo "$as_me:16786: result: $cf_cv_sizechange" >&5
16787echo "${ECHO_T}$cf_cv_sizechange" >&6
16788if test "$cf_cv_sizechange" != no ; then
16789
16790cat >>confdefs.h <<\EOF
16791#define HAVE_SIZECHANGE 1
16792EOF
16793
16794	case $cf_cv_sizechange in #(vi
16795	NEED*)
16796		cat >>confdefs.h <<EOF
16797#define $cf_cv_sizechange  1
16798EOF
16799
16800		;;
16801	esac
16802fi
16803
16804echo "$as_me:16804: checking for memmove" >&5
16805echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16806if test "${ac_cv_func_memmove+set}" = set; then
16807  echo $ECHO_N "(cached) $ECHO_C" >&6
16808else
16809  cat >conftest.$ac_ext <<_ACEOF
16810#line 16810 "configure"
16811#include "confdefs.h"
16812/* System header to define __stub macros and hopefully few prototypes,
16813    which can conflict with char memmove (); below.  */
16814#include <assert.h>
16815/* Override any gcc2 internal prototype to avoid an error.  */
16816#ifdef __cplusplus
16817extern "C"
16818#endif
16819/* We use char because int might match the return type of a gcc2
16820   builtin and then its argument prototype would still apply.  */
16821char memmove ();
16822char (*f) ();
16823
16824int
16825main ()
16826{
16827/* The GNU C library defines this for functions which it implements
16828    to always fail with ENOSYS.  Some functions are actually named
16829    something starting with __ and the normal name is an alias.  */
16830#if defined (__stub_memmove) || defined (__stub___memmove)
16831choke me
16832#else
16833f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16834#endif
16835
16836  ;
16837  return 0;
16838}
16839_ACEOF
16840rm -f conftest.$ac_objext conftest$ac_exeext
16841if { (eval echo "$as_me:16841: \"$ac_link\"") >&5
16842  (eval $ac_link) 2>&5
16843  ac_status=$?
16844  echo "$as_me:16844: \$? = $ac_status" >&5
16845  (exit $ac_status); } &&
16846         { ac_try='test -s conftest$ac_exeext'
16847  { (eval echo "$as_me:16847: \"$ac_try\"") >&5
16848  (eval $ac_try) 2>&5
16849  ac_status=$?
16850  echo "$as_me:16850: \$? = $ac_status" >&5
16851  (exit $ac_status); }; }; then
16852  ac_cv_func_memmove=yes
16853else
16854  echo "$as_me: failed program was:" >&5
16855cat conftest.$ac_ext >&5
16856ac_cv_func_memmove=no
16857fi
16858rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16859fi
16860echo "$as_me:16860: result: $ac_cv_func_memmove" >&5
16861echo "${ECHO_T}$ac_cv_func_memmove" >&6
16862if test $ac_cv_func_memmove = yes; then
16863  :
16864else
16865
16866echo "$as_me:16866: checking for bcopy" >&5
16867echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16868if test "${ac_cv_func_bcopy+set}" = set; then
16869  echo $ECHO_N "(cached) $ECHO_C" >&6
16870else
16871  cat >conftest.$ac_ext <<_ACEOF
16872#line 16872 "configure"
16873#include "confdefs.h"
16874/* System header to define __stub macros and hopefully few prototypes,
16875    which can conflict with char bcopy (); below.  */
16876#include <assert.h>
16877/* Override any gcc2 internal prototype to avoid an error.  */
16878#ifdef __cplusplus
16879extern "C"
16880#endif
16881/* We use char because int might match the return type of a gcc2
16882   builtin and then its argument prototype would still apply.  */
16883char bcopy ();
16884char (*f) ();
16885
16886int
16887main ()
16888{
16889/* The GNU C library defines this for functions which it implements
16890    to always fail with ENOSYS.  Some functions are actually named
16891    something starting with __ and the normal name is an alias.  */
16892#if defined (__stub_bcopy) || defined (__stub___bcopy)
16893choke me
16894#else
16895f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16896#endif
16897
16898  ;
16899  return 0;
16900}
16901_ACEOF
16902rm -f conftest.$ac_objext conftest$ac_exeext
16903if { (eval echo "$as_me:16903: \"$ac_link\"") >&5
16904  (eval $ac_link) 2>&5
16905  ac_status=$?
16906  echo "$as_me:16906: \$? = $ac_status" >&5
16907  (exit $ac_status); } &&
16908         { ac_try='test -s conftest$ac_exeext'
16909  { (eval echo "$as_me:16909: \"$ac_try\"") >&5
16910  (eval $ac_try) 2>&5
16911  ac_status=$?
16912  echo "$as_me:16912: \$? = $ac_status" >&5
16913  (exit $ac_status); }; }; then
16914  ac_cv_func_bcopy=yes
16915else
16916  echo "$as_me: failed program was:" >&5
16917cat conftest.$ac_ext >&5
16918ac_cv_func_bcopy=no
16919fi
16920rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16921fi
16922echo "$as_me:16922: result: $ac_cv_func_bcopy" >&5
16923echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16924if test $ac_cv_func_bcopy = yes; then
16925
16926	echo "$as_me:16926: checking if bcopy does overlapping moves" >&5
16927echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16928if test "${cf_cv_good_bcopy+set}" = set; then
16929  echo $ECHO_N "(cached) $ECHO_C" >&6
16930else
16931
16932		if test "$cross_compiling" = yes; then
16933  cf_cv_good_bcopy=unknown
16934else
16935  cat >conftest.$ac_ext <<_ACEOF
16936#line 16936 "configure"
16937#include "confdefs.h"
16938
16939int main() {
16940	static char data[] = "abcdefghijklmnopqrstuwwxyz";
16941	char temp[40];
16942	bcopy(data, temp, sizeof(data));
16943	bcopy(temp+10, temp, 15);
16944	bcopy(temp+5, temp+15, 10);
16945	${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16946}
16947
16948_ACEOF
16949rm -f conftest$ac_exeext
16950if { (eval echo "$as_me:16950: \"$ac_link\"") >&5
16951  (eval $ac_link) 2>&5
16952  ac_status=$?
16953  echo "$as_me:16953: \$? = $ac_status" >&5
16954  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16955  { (eval echo "$as_me:16955: \"$ac_try\"") >&5
16956  (eval $ac_try) 2>&5
16957  ac_status=$?
16958  echo "$as_me:16958: \$? = $ac_status" >&5
16959  (exit $ac_status); }; }; then
16960  cf_cv_good_bcopy=yes
16961else
16962  echo "$as_me: program exited with status $ac_status" >&5
16963echo "$as_me: failed program was:" >&5
16964cat conftest.$ac_ext >&5
16965cf_cv_good_bcopy=no
16966fi
16967rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16968fi
16969
16970fi
16971echo "$as_me:16971: result: $cf_cv_good_bcopy" >&5
16972echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16973
16974else
16975  cf_cv_good_bcopy=no
16976fi
16977
16978	if test "$cf_cv_good_bcopy" = yes ; then
16979
16980cat >>confdefs.h <<\EOF
16981#define USE_OK_BCOPY 1
16982EOF
16983
16984	else
16985
16986cat >>confdefs.h <<\EOF
16987#define USE_MY_MEMMOVE 1
16988EOF
16989
16990	fi
16991
16992fi
16993
16994echo "$as_me:16994: checking if poll really works" >&5
16995echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16996if test "${cf_cv_working_poll+set}" = set; then
16997  echo $ECHO_N "(cached) $ECHO_C" >&6
16998else
16999
17000if test "$cross_compiling" = yes; then
17001  cf_cv_working_poll=unknown
17002else
17003  cat >conftest.$ac_ext <<_ACEOF
17004#line 17004 "configure"
17005#include "confdefs.h"
17006
17007#include <stdlib.h>
17008#include <stdio.h>
17009#include <unistd.h>
17010#include <fcntl.h>
17011#ifdef HAVE_POLL_H
17012#include <poll.h>
17013#else
17014#include <sys/poll.h>
17015#endif
17016int main() {
17017	struct pollfd myfds;
17018	int ret;
17019
17020	/* check for Darwin bug with respect to "devices" */
17021	myfds.fd = open("/dev/null", 1);	/* O_WRONLY */
17022	if (myfds.fd < 0)
17023		myfds.fd = 0;
17024	myfds.events = POLLIN;
17025	myfds.revents = 0;
17026
17027	ret = poll(&myfds, 1, 100);
17028
17029	if (ret < 0 || (myfds.revents & POLLNVAL)) {
17030		ret = -1;
17031	} else {
17032		int fd = 0;
17033		if (!isatty(fd)) {
17034			fd = open("/dev/tty", 2);	/* O_RDWR */
17035		}
17036
17037		if (fd >= 0) {
17038			/* also check with standard input */
17039			myfds.fd = fd;
17040			myfds.events = POLLIN;
17041			myfds.revents = 0;
17042			ret = poll(&myfds, 1, 100);
17043		} else {
17044			ret = -1;
17045		}
17046	}
17047	${cf_cv_main_return:-return}(ret < 0);
17048}
17049_ACEOF
17050rm -f conftest$ac_exeext
17051if { (eval echo "$as_me:17051: \"$ac_link\"") >&5
17052  (eval $ac_link) 2>&5
17053  ac_status=$?
17054  echo "$as_me:17054: \$? = $ac_status" >&5
17055  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17056  { (eval echo "$as_me:17056: \"$ac_try\"") >&5
17057  (eval $ac_try) 2>&5
17058  ac_status=$?
17059  echo "$as_me:17059: \$? = $ac_status" >&5
17060  (exit $ac_status); }; }; then
17061  cf_cv_working_poll=yes
17062else
17063  echo "$as_me: program exited with status $ac_status" >&5
17064echo "$as_me: failed program was:" >&5
17065cat conftest.$ac_ext >&5
17066cf_cv_working_poll=no
17067fi
17068rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17069fi
17070fi
17071echo "$as_me:17071: result: $cf_cv_working_poll" >&5
17072echo "${ECHO_T}$cf_cv_working_poll" >&6
17073test "$cf_cv_working_poll" = "yes" &&
17074cat >>confdefs.h <<\EOF
17075#define HAVE_WORKING_POLL 1
17076EOF
17077
17078echo "$as_me:17078: checking for va_copy" >&5
17079echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17080if test "${cf_cv_have_va_copy+set}" = set; then
17081  echo $ECHO_N "(cached) $ECHO_C" >&6
17082else
17083
17084cat >conftest.$ac_ext <<_ACEOF
17085#line 17085 "configure"
17086#include "confdefs.h"
17087
17088#include <stdarg.h>
17089
17090int
17091main ()
17092{
17093
17094	static va_list dst;
17095	static va_list src;
17096	va_copy(dst, src)
17097  ;
17098  return 0;
17099}
17100_ACEOF
17101rm -f conftest.$ac_objext conftest$ac_exeext
17102if { (eval echo "$as_me:17102: \"$ac_link\"") >&5
17103  (eval $ac_link) 2>&5
17104  ac_status=$?
17105  echo "$as_me:17105: \$? = $ac_status" >&5
17106  (exit $ac_status); } &&
17107         { ac_try='test -s conftest$ac_exeext'
17108  { (eval echo "$as_me:17108: \"$ac_try\"") >&5
17109  (eval $ac_try) 2>&5
17110  ac_status=$?
17111  echo "$as_me:17111: \$? = $ac_status" >&5
17112  (exit $ac_status); }; }; then
17113  cf_cv_have_va_copy=yes
17114else
17115  echo "$as_me: failed program was:" >&5
17116cat conftest.$ac_ext >&5
17117cf_cv_have_va_copy=no
17118fi
17119rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17120fi
17121echo "$as_me:17121: result: $cf_cv_have_va_copy" >&5
17122echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17123
17124test "$cf_cv_have_va_copy" = yes &&
17125cat >>confdefs.h <<\EOF
17126#define HAVE_VA_COPY 1
17127EOF
17128
17129echo "$as_me:17129: checking for __va_copy" >&5
17130echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17131if test "${cf_cv_have___va_copy+set}" = set; then
17132  echo $ECHO_N "(cached) $ECHO_C" >&6
17133else
17134
17135cat >conftest.$ac_ext <<_ACEOF
17136#line 17136 "configure"
17137#include "confdefs.h"
17138
17139#include <stdarg.h>
17140
17141int
17142main ()
17143{
17144
17145	static va_list dst;
17146	static va_list src;
17147	__va_copy(dst, src)
17148  ;
17149  return 0;
17150}
17151_ACEOF
17152rm -f conftest.$ac_objext conftest$ac_exeext
17153if { (eval echo "$as_me:17153: \"$ac_link\"") >&5
17154  (eval $ac_link) 2>&5
17155  ac_status=$?
17156  echo "$as_me:17156: \$? = $ac_status" >&5
17157  (exit $ac_status); } &&
17158         { ac_try='test -s conftest$ac_exeext'
17159  { (eval echo "$as_me:17159: \"$ac_try\"") >&5
17160  (eval $ac_try) 2>&5
17161  ac_status=$?
17162  echo "$as_me:17162: \$? = $ac_status" >&5
17163  (exit $ac_status); }; }; then
17164  cf_cv_have___va_copy=yes
17165else
17166  echo "$as_me: failed program was:" >&5
17167cat conftest.$ac_ext >&5
17168cf_cv_have___va_copy=no
17169fi
17170rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17171fi
17172echo "$as_me:17172: result: $cf_cv_have___va_copy" >&5
17173echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17174
17175test "$cf_cv_have___va_copy" = yes &&
17176cat >>confdefs.h <<\EOF
17177#define HAVE___VA_COPY 1
17178EOF
17179
17180echo "$as_me:17180: checking for pid_t" >&5
17181echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17182if test "${ac_cv_type_pid_t+set}" = set; then
17183  echo $ECHO_N "(cached) $ECHO_C" >&6
17184else
17185  cat >conftest.$ac_ext <<_ACEOF
17186#line 17186 "configure"
17187#include "confdefs.h"
17188$ac_includes_default
17189int
17190main ()
17191{
17192if ((pid_t *) 0)
17193  return 0;
17194if (sizeof (pid_t))
17195  return 0;
17196  ;
17197  return 0;
17198}
17199_ACEOF
17200rm -f conftest.$ac_objext
17201if { (eval echo "$as_me:17201: \"$ac_compile\"") >&5
17202  (eval $ac_compile) 2>&5
17203  ac_status=$?
17204  echo "$as_me:17204: \$? = $ac_status" >&5
17205  (exit $ac_status); } &&
17206         { ac_try='test -s conftest.$ac_objext'
17207  { (eval echo "$as_me:17207: \"$ac_try\"") >&5
17208  (eval $ac_try) 2>&5
17209  ac_status=$?
17210  echo "$as_me:17210: \$? = $ac_status" >&5
17211  (exit $ac_status); }; }; then
17212  ac_cv_type_pid_t=yes
17213else
17214  echo "$as_me: failed program was:" >&5
17215cat conftest.$ac_ext >&5
17216ac_cv_type_pid_t=no
17217fi
17218rm -f conftest.$ac_objext conftest.$ac_ext
17219fi
17220echo "$as_me:17220: result: $ac_cv_type_pid_t" >&5
17221echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17222if test $ac_cv_type_pid_t = yes; then
17223  :
17224else
17225
17226cat >>confdefs.h <<EOF
17227#define pid_t int
17228EOF
17229
17230fi
17231
17232for ac_header in unistd.h vfork.h
17233do
17234as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17235echo "$as_me:17235: checking for $ac_header" >&5
17236echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17237if eval "test \"\${$as_ac_Header+set}\" = set"; then
17238  echo $ECHO_N "(cached) $ECHO_C" >&6
17239else
17240  cat >conftest.$ac_ext <<_ACEOF
17241#line 17241 "configure"
17242#include "confdefs.h"
17243#include <$ac_header>
17244_ACEOF
17245if { (eval echo "$as_me:17245: \"$ac_cpp conftest.$ac_ext\"") >&5
17246  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17247  ac_status=$?
17248  egrep -v '^ *\+' conftest.er1 >conftest.err
17249  rm -f conftest.er1
17250  cat conftest.err >&5
17251  echo "$as_me:17251: \$? = $ac_status" >&5
17252  (exit $ac_status); } >/dev/null; then
17253  if test -s conftest.err; then
17254    ac_cpp_err=$ac_c_preproc_warn_flag
17255  else
17256    ac_cpp_err=
17257  fi
17258else
17259  ac_cpp_err=yes
17260fi
17261if test -z "$ac_cpp_err"; then
17262  eval "$as_ac_Header=yes"
17263else
17264  echo "$as_me: failed program was:" >&5
17265  cat conftest.$ac_ext >&5
17266  eval "$as_ac_Header=no"
17267fi
17268rm -f conftest.err conftest.$ac_ext
17269fi
17270echo "$as_me:17270: result: `eval echo '${'$as_ac_Header'}'`" >&5
17271echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17272if test `eval echo '${'$as_ac_Header'}'` = yes; then
17273  cat >>confdefs.h <<EOF
17274#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17275EOF
17276
17277fi
17278done
17279
17280for ac_func in fork vfork
17281do
17282as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17283echo "$as_me:17283: checking for $ac_func" >&5
17284echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17285if eval "test \"\${$as_ac_var+set}\" = set"; then
17286  echo $ECHO_N "(cached) $ECHO_C" >&6
17287else
17288  cat >conftest.$ac_ext <<_ACEOF
17289#line 17289 "configure"
17290#include "confdefs.h"
17291/* System header to define __stub macros and hopefully few prototypes,
17292    which can conflict with char $ac_func (); below.  */
17293#include <assert.h>
17294/* Override any gcc2 internal prototype to avoid an error.  */
17295#ifdef __cplusplus
17296extern "C"
17297#endif
17298/* We use char because int might match the return type of a gcc2
17299   builtin and then its argument prototype would still apply.  */
17300char $ac_func ();
17301char (*f) ();
17302
17303int
17304main ()
17305{
17306/* The GNU C library defines this for functions which it implements
17307    to always fail with ENOSYS.  Some functions are actually named
17308    something starting with __ and the normal name is an alias.  */
17309#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17310choke me
17311#else
17312f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17313#endif
17314
17315  ;
17316  return 0;
17317}
17318_ACEOF
17319rm -f conftest.$ac_objext conftest$ac_exeext
17320if { (eval echo "$as_me:17320: \"$ac_link\"") >&5
17321  (eval $ac_link) 2>&5
17322  ac_status=$?
17323  echo "$as_me:17323: \$? = $ac_status" >&5
17324  (exit $ac_status); } &&
17325         { ac_try='test -s conftest$ac_exeext'
17326  { (eval echo "$as_me:17326: \"$ac_try\"") >&5
17327  (eval $ac_try) 2>&5
17328  ac_status=$?
17329  echo "$as_me:17329: \$? = $ac_status" >&5
17330  (exit $ac_status); }; }; then
17331  eval "$as_ac_var=yes"
17332else
17333  echo "$as_me: failed program was:" >&5
17334cat conftest.$ac_ext >&5
17335eval "$as_ac_var=no"
17336fi
17337rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17338fi
17339echo "$as_me:17339: result: `eval echo '${'$as_ac_var'}'`" >&5
17340echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17341if test `eval echo '${'$as_ac_var'}'` = yes; then
17342  cat >>confdefs.h <<EOF
17343#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17344EOF
17345
17346fi
17347done
17348
17349ac_cv_func_fork_works=$ac_cv_func_fork
17350if test "x$ac_cv_func_fork" = xyes; then
17351  echo "$as_me:17351: checking for working fork" >&5
17352echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17353if test "${ac_cv_func_fork_works+set}" = set; then
17354  echo $ECHO_N "(cached) $ECHO_C" >&6
17355else
17356  if test "$cross_compiling" = yes; then
17357  ac_cv_func_fork_works=cross
17358else
17359  cat >conftest.$ac_ext <<_ACEOF
17360/* By Rüdiger Kuhlmann. */
17361      #include <sys/types.h>
17362      #if HAVE_UNISTD_H
17363      # include <unistd.h>
17364      #endif
17365      /* Some systems only have a dummy stub for fork() */
17366      int main ()
17367      {
17368        if (fork() < 0)
17369          $ac_main_return (1);
17370        $ac_main_return (0);
17371      }
17372_ACEOF
17373rm -f conftest$ac_exeext
17374if { (eval echo "$as_me:17374: \"$ac_link\"") >&5
17375  (eval $ac_link) 2>&5
17376  ac_status=$?
17377  echo "$as_me:17377: \$? = $ac_status" >&5
17378  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17379  { (eval echo "$as_me:17379: \"$ac_try\"") >&5
17380  (eval $ac_try) 2>&5
17381  ac_status=$?
17382  echo "$as_me:17382: \$? = $ac_status" >&5
17383  (exit $ac_status); }; }; then
17384  ac_cv_func_fork_works=yes
17385else
17386  echo "$as_me: program exited with status $ac_status" >&5
17387echo "$as_me: failed program was:" >&5
17388cat conftest.$ac_ext >&5
17389ac_cv_func_fork_works=no
17390fi
17391rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17392fi
17393fi
17394echo "$as_me:17394: result: $ac_cv_func_fork_works" >&5
17395echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17396
17397fi
17398if test "x$ac_cv_func_fork_works" = xcross; then
17399  case $host in
17400    *-*-amigaos* | *-*-msdosdjgpp*)
17401      # Override, as these systems have only a dummy fork() stub
17402      ac_cv_func_fork_works=no
17403      ;;
17404    *)
17405      ac_cv_func_fork_works=yes
17406      ;;
17407  esac
17408  { echo "$as_me:17408: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17409echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17410fi
17411ac_cv_func_vfork_works=$ac_cv_func_vfork
17412if test "x$ac_cv_func_vfork" = xyes; then
17413  echo "$as_me:17413: checking for working vfork" >&5
17414echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17415if test "${ac_cv_func_vfork_works+set}" = set; then
17416  echo $ECHO_N "(cached) $ECHO_C" >&6
17417else
17418  if test "$cross_compiling" = yes; then
17419  ac_cv_func_vfork_works=cross
17420else
17421  cat >conftest.$ac_ext <<_ACEOF
17422#line 17422 "configure"
17423#include "confdefs.h"
17424/* Thanks to Paul Eggert for this test.  */
17425#include <stdio.h>
17426#include <sys/types.h>
17427#include <sys/stat.h>
17428#if HAVE_UNISTD_H
17429# include <unistd.h>
17430#endif
17431#if HAVE_VFORK_H
17432# include <vfork.h>
17433#endif
17434/* On some sparc systems, changes by the child to local and incoming
17435   argument registers are propagated back to the parent.  The compiler
17436   is told about this with #include <vfork.h>, but some compilers
17437   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17438   static variable whose address is put into a register that is
17439   clobbered by the vfork.  */
17440static
17441#ifdef __cplusplus
17442sparc_address_test (int arg)
17443# else
17444sparc_address_test (arg) int arg;
17445#endif
17446{
17447  static pid_t child;
17448  if (!child) {
17449    child = vfork ();
17450    if (child < 0) {
17451      perror ("vfork");
17452      _exit(2);
17453    }
17454    if (!child) {
17455      arg = getpid();
17456      write(-1, "", 0);
17457      _exit (arg);
17458    }
17459  }
17460}
17461
17462int
17463main ()
17464{
17465  pid_t parent = getpid ();
17466  pid_t child;
17467
17468  sparc_address_test ();
17469
17470  child = vfork ();
17471
17472  if (child == 0) {
17473    /* Here is another test for sparc vfork register problems.  This
17474       test uses lots of local variables, at least as many local
17475       variables as main has allocated so far including compiler
17476       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17477       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17478       reuse the register of parent for one of the local variables,
17479       since it will think that parent can't possibly be used any more
17480       in this routine.  Assigning to the local variable will thus
17481       munge parent in the parent process.  */
17482    pid_t
17483      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17484      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17485    /* Convince the compiler that p..p7 are live; otherwise, it might
17486       use the same hardware register for all 8 local variables.  */
17487    if (p != p1 || p != p2 || p != p3 || p != p4
17488	|| p != p5 || p != p6 || p != p7)
17489      _exit(1);
17490
17491    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17492       from child file descriptors.  If the child closes a descriptor
17493       before it execs or exits, this munges the parent's descriptor
17494       as well.  Test for this by closing stdout in the child.  */
17495    _exit(close(fileno(stdout)) != 0);
17496  } else {
17497    int status;
17498    struct stat st;
17499
17500    while (wait(&status) != child)
17501      ;
17502    $ac_main_return(
17503	 /* Was there some problem with vforking?  */
17504	 child < 0
17505
17506	 /* Did the child fail?  (This shouldn't happen.)  */
17507	 || status
17508
17509	 /* Did the vfork/compiler bug occur?  */
17510	 || parent != getpid()
17511
17512	 /* Did the file descriptor bug occur?  */
17513	 || fstat(fileno(stdout), &st) != 0
17514	 );
17515  }
17516}
17517_ACEOF
17518rm -f conftest$ac_exeext
17519if { (eval echo "$as_me:17519: \"$ac_link\"") >&5
17520  (eval $ac_link) 2>&5
17521  ac_status=$?
17522  echo "$as_me:17522: \$? = $ac_status" >&5
17523  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17524  { (eval echo "$as_me:17524: \"$ac_try\"") >&5
17525  (eval $ac_try) 2>&5
17526  ac_status=$?
17527  echo "$as_me:17527: \$? = $ac_status" >&5
17528  (exit $ac_status); }; }; then
17529  ac_cv_func_vfork_works=yes
17530else
17531  echo "$as_me: program exited with status $ac_status" >&5
17532echo "$as_me: failed program was:" >&5
17533cat conftest.$ac_ext >&5
17534ac_cv_func_vfork_works=no
17535fi
17536rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17537fi
17538fi
17539echo "$as_me:17539: result: $ac_cv_func_vfork_works" >&5
17540echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17541
17542fi;
17543if test "x$ac_cv_func_fork_works" = xcross; then
17544  ac_cv_func_vfork_works=ac_cv_func_vfork
17545  { echo "$as_me:17545: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17546echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17547fi
17548
17549if test "x$ac_cv_func_vfork_works" = xyes; then
17550
17551cat >>confdefs.h <<\EOF
17552#define HAVE_WORKING_VFORK 1
17553EOF
17554
17555else
17556
17557cat >>confdefs.h <<\EOF
17558#define vfork fork
17559EOF
17560
17561fi
17562if test "x$ac_cv_func_fork_works" = xyes; then
17563
17564cat >>confdefs.h <<\EOF
17565#define HAVE_WORKING_FORK 1
17566EOF
17567
17568fi
17569
17570# special check for test/ditto.c
17571
17572echo "$as_me:17572: checking for openpty in -lutil" >&5
17573echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17574if test "${ac_cv_lib_util_openpty+set}" = set; then
17575  echo $ECHO_N "(cached) $ECHO_C" >&6
17576else
17577  ac_check_lib_save_LIBS=$LIBS
17578LIBS="-lutil  $LIBS"
17579cat >conftest.$ac_ext <<_ACEOF
17580#line 17580 "configure"
17581#include "confdefs.h"
17582
17583/* Override any gcc2 internal prototype to avoid an error.  */
17584#ifdef __cplusplus
17585extern "C"
17586#endif
17587/* We use char because int might match the return type of a gcc2
17588   builtin and then its argument prototype would still apply.  */
17589char openpty ();
17590int
17591main ()
17592{
17593openpty ();
17594  ;
17595  return 0;
17596}
17597_ACEOF
17598rm -f conftest.$ac_objext conftest$ac_exeext
17599if { (eval echo "$as_me:17599: \"$ac_link\"") >&5
17600  (eval $ac_link) 2>&5
17601  ac_status=$?
17602  echo "$as_me:17602: \$? = $ac_status" >&5
17603  (exit $ac_status); } &&
17604         { ac_try='test -s conftest$ac_exeext'
17605  { (eval echo "$as_me:17605: \"$ac_try\"") >&5
17606  (eval $ac_try) 2>&5
17607  ac_status=$?
17608  echo "$as_me:17608: \$? = $ac_status" >&5
17609  (exit $ac_status); }; }; then
17610  ac_cv_lib_util_openpty=yes
17611else
17612  echo "$as_me: failed program was:" >&5
17613cat conftest.$ac_ext >&5
17614ac_cv_lib_util_openpty=no
17615fi
17616rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17617LIBS=$ac_check_lib_save_LIBS
17618fi
17619echo "$as_me:17619: result: $ac_cv_lib_util_openpty" >&5
17620echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17621if test $ac_cv_lib_util_openpty = yes; then
17622  cf_cv_lib_util=yes
17623else
17624  cf_cv_lib_util=no
17625fi
17626
17627echo "$as_me:17627: checking for openpty header" >&5
17628echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17629if test "${cf_cv_func_openpty+set}" = set; then
17630  echo $ECHO_N "(cached) $ECHO_C" >&6
17631else
17632
17633    cf_save_LIBS="$LIBS"
17634    test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17635    for cf_header in pty.h libutil.h util.h
17636    do
17637    cat >conftest.$ac_ext <<_ACEOF
17638#line 17638 "configure"
17639#include "confdefs.h"
17640
17641#include <$cf_header>
17642
17643int
17644main ()
17645{
17646
17647    int x = openpty((int *)0, (int *)0, (char *)0,
17648                   (struct termios *)0, (struct winsize *)0);
17649
17650  ;
17651  return 0;
17652}
17653_ACEOF
17654rm -f conftest.$ac_objext conftest$ac_exeext
17655if { (eval echo "$as_me:17655: \"$ac_link\"") >&5
17656  (eval $ac_link) 2>&5
17657  ac_status=$?
17658  echo "$as_me:17658: \$? = $ac_status" >&5
17659  (exit $ac_status); } &&
17660         { ac_try='test -s conftest$ac_exeext'
17661  { (eval echo "$as_me:17661: \"$ac_try\"") >&5
17662  (eval $ac_try) 2>&5
17663  ac_status=$?
17664  echo "$as_me:17664: \$? = $ac_status" >&5
17665  (exit $ac_status); }; }; then
17666
17667        cf_cv_func_openpty=$cf_header
17668        break
17669
17670else
17671  echo "$as_me: failed program was:" >&5
17672cat conftest.$ac_ext >&5
17673
17674        cf_cv_func_openpty=no
17675
17676fi
17677rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17678    done
17679    LIBS="$cf_save_LIBS"
17680
17681fi
17682echo "$as_me:17682: result: $cf_cv_func_openpty" >&5
17683echo "${ECHO_T}$cf_cv_func_openpty" >&6
17684
17685if test "$cf_cv_func_openpty" != no ; then
17686
17687cat >>confdefs.h <<EOF
17688#define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17689EOF
17690
17691cat >>confdefs.h <<\EOF
17692#define USE_XTERM_PTY 1
17693EOF
17694
17695    if test "x$cf_cv_lib_util" = xyes ; then
17696        TEST_LIBS="-lutil $TEST_LIBS"
17697    fi
17698fi
17699
17700if test "$with_hashed_db" != no ; then
17701
17702cat >>confdefs.h <<\EOF
17703#define USE_HASHED_DB 1
17704EOF
17705
17706case $with_hashed_db in #(vi
17707yes|*able*) #(vi
17708    ;;
17709*)
17710    if test -d "$with_hashed_db" ; then
17711
17712if test -n "$with_hashed_db/include" ; then
17713  for cf_add_incdir in $with_hashed_db/include
17714  do
17715	while test $cf_add_incdir != /usr/include
17716	do
17717	  if test -d $cf_add_incdir
17718	  then
17719		cf_have_incdir=no
17720		if test -n "$CFLAGS$CPPFLAGS" ; then
17721		  # a loop is needed to ensure we can add subdirs of existing dirs
17722		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17723			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17724			  cf_have_incdir=yes; break
17725			fi
17726		  done
17727		fi
17728
17729		if test "$cf_have_incdir" = no ; then
17730		  if test "$cf_add_incdir" = /usr/local/include ; then
17731			if test "$GCC" = yes
17732			then
17733			  cf_save_CPPFLAGS=$CPPFLAGS
17734			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17735			  cat >conftest.$ac_ext <<_ACEOF
17736#line 17736 "configure"
17737#include "confdefs.h"
17738#include <stdio.h>
17739int
17740main ()
17741{
17742printf("Hello")
17743  ;
17744  return 0;
17745}
17746_ACEOF
17747rm -f conftest.$ac_objext
17748if { (eval echo "$as_me:17748: \"$ac_compile\"") >&5
17749  (eval $ac_compile) 2>&5
17750  ac_status=$?
17751  echo "$as_me:17751: \$? = $ac_status" >&5
17752  (exit $ac_status); } &&
17753         { ac_try='test -s conftest.$ac_objext'
17754  { (eval echo "$as_me:17754: \"$ac_try\"") >&5
17755  (eval $ac_try) 2>&5
17756  ac_status=$?
17757  echo "$as_me:17757: \$? = $ac_status" >&5
17758  (exit $ac_status); }; }; then
17759  :
17760else
17761  echo "$as_me: failed program was:" >&5
17762cat conftest.$ac_ext >&5
17763cf_have_incdir=yes
17764fi
17765rm -f conftest.$ac_objext conftest.$ac_ext
17766			  CPPFLAGS=$cf_save_CPPFLAGS
17767			fi
17768		  fi
17769		fi
17770
17771		if test "$cf_have_incdir" = no ; then
17772		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
17773
17774echo "${as_me:-configure}:17774: testing adding $cf_add_incdir to include-path ..." 1>&5
17775
17776		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17777
17778		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17779		  test "$cf_top_incdir" = "$cf_add_incdir" && break
17780		  cf_add_incdir="$cf_top_incdir"
17781		else
17782		  break
17783		fi
17784	  fi
17785	done
17786  done
17787fi
17788
17789if test -n "$with_hashed_db/lib" ; then
17790  for cf_add_libdir in $with_hashed_db/lib
17791  do
17792    if test $cf_add_libdir = /usr/lib ; then
17793      :
17794    elif test -d $cf_add_libdir
17795    then
17796      cf_have_libdir=no
17797      if test -n "$LDFLAGS$LIBS" ; then
17798        # a loop is needed to ensure we can add subdirs of existing dirs
17799        for cf_test_libdir in $LDFLAGS $LIBS ; do
17800          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17801            cf_have_libdir=yes; break
17802          fi
17803        done
17804      fi
17805      if test "$cf_have_libdir" = no ; then
17806        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
17807
17808echo "${as_me:-configure}:17808: testing adding $cf_add_libdir to library-path ..." 1>&5
17809
17810        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17811      fi
17812    fi
17813  done
17814fi
17815
17816    fi
17817esac
17818
17819echo "$as_me:17819: checking for db.h" >&5
17820echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17821if test "${ac_cv_header_db_h+set}" = set; then
17822  echo $ECHO_N "(cached) $ECHO_C" >&6
17823else
17824  cat >conftest.$ac_ext <<_ACEOF
17825#line 17825 "configure"
17826#include "confdefs.h"
17827#include <db.h>
17828_ACEOF
17829if { (eval echo "$as_me:17829: \"$ac_cpp conftest.$ac_ext\"") >&5
17830  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17831  ac_status=$?
17832  egrep -v '^ *\+' conftest.er1 >conftest.err
17833  rm -f conftest.er1
17834  cat conftest.err >&5
17835  echo "$as_me:17835: \$? = $ac_status" >&5
17836  (exit $ac_status); } >/dev/null; then
17837  if test -s conftest.err; then
17838    ac_cpp_err=$ac_c_preproc_warn_flag
17839  else
17840    ac_cpp_err=
17841  fi
17842else
17843  ac_cpp_err=yes
17844fi
17845if test -z "$ac_cpp_err"; then
17846  ac_cv_header_db_h=yes
17847else
17848  echo "$as_me: failed program was:" >&5
17849  cat conftest.$ac_ext >&5
17850  ac_cv_header_db_h=no
17851fi
17852rm -f conftest.err conftest.$ac_ext
17853fi
17854echo "$as_me:17854: result: $ac_cv_header_db_h" >&5
17855echo "${ECHO_T}$ac_cv_header_db_h" >&6
17856if test $ac_cv_header_db_h = yes; then
17857
17858echo "$as_me:17858: checking for version of db" >&5
17859echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17860if test "${cf_cv_hashed_db_version+set}" = set; then
17861  echo $ECHO_N "(cached) $ECHO_C" >&6
17862else
17863
17864cf_cv_hashed_db_version=unknown
17865
17866for cf_db_version in 1 2 3 4 5
17867do
17868
17869echo "${as_me:-configure}:17869: testing checking for db version $cf_db_version ..." 1>&5
17870
17871	cat >conftest.$ac_ext <<_ACEOF
17872#line 17872 "configure"
17873#include "confdefs.h"
17874
17875$ac_includes_default
17876#include <db.h>
17877
17878#ifdef DB_VERSION_MAJOR
17879	/* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17880#if $cf_db_version == DB_VERSION_MAJOR
17881	/* ok */
17882#else
17883	make an error
17884#endif
17885#else
17886#if $cf_db_version == 1
17887	/* ok: assuming this is DB 1.8.5 */
17888#else
17889	make an error
17890#endif
17891#endif
17892
17893int
17894main ()
17895{
17896DBT *foo = 0
17897  ;
17898  return 0;
17899}
17900_ACEOF
17901rm -f conftest.$ac_objext
17902if { (eval echo "$as_me:17902: \"$ac_compile\"") >&5
17903  (eval $ac_compile) 2>&5
17904  ac_status=$?
17905  echo "$as_me:17905: \$? = $ac_status" >&5
17906  (exit $ac_status); } &&
17907         { ac_try='test -s conftest.$ac_objext'
17908  { (eval echo "$as_me:17908: \"$ac_try\"") >&5
17909  (eval $ac_try) 2>&5
17910  ac_status=$?
17911  echo "$as_me:17911: \$? = $ac_status" >&5
17912  (exit $ac_status); }; }; then
17913
17914	cf_cv_hashed_db_version=$cf_db_version
17915	break
17916
17917else
17918  echo "$as_me: failed program was:" >&5
17919cat conftest.$ac_ext >&5
17920fi
17921rm -f conftest.$ac_objext conftest.$ac_ext
17922done
17923
17924fi
17925echo "$as_me:17925: result: $cf_cv_hashed_db_version" >&5
17926echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17927
17928if test "$cf_cv_hashed_db_version" = unknown ; then
17929	{ { echo "$as_me:17929: error: Cannot determine version of db" >&5
17930echo "$as_me: error: Cannot determine version of db" >&2;}
17931   { (exit 1); exit 1; }; }
17932else
17933
17934echo "$as_me:17934: checking for db libraries" >&5
17935echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17936if test "${cf_cv_hashed_db_libs+set}" = set; then
17937  echo $ECHO_N "(cached) $ECHO_C" >&6
17938else
17939
17940cf_cv_hashed_db_libs=unknown
17941for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17942do
17943	cf_save_libs="$LIBS"
17944	if test -n "$cf_db_libs"; then
17945		LIBS="-l$cf_db_libs $LIBS"
17946	fi
17947
17948echo "${as_me:-configure}:17948: testing checking for library "$cf_db_libs" ..." 1>&5
17949
17950	cat >conftest.$ac_ext <<_ACEOF
17951#line 17951 "configure"
17952#include "confdefs.h"
17953
17954$ac_includes_default
17955#include <db.h>
17956
17957int
17958main ()
17959{
17960
17961	char *path = "/tmp/foo";
17962#ifdef DB_VERSION_MAJOR
17963#if DB_VERSION_MAJOR >= 4
17964	DB *result = 0;
17965	db_create(&result, NULL, 0);
17966	result->open(result,
17967		NULL,
17968		path,
17969		path,
17970		DB_HASH,
17971		DB_CREATE,
17972		0644);
17973#elif DB_VERSION_MAJOR >= 3
17974	DB *result = 0;
17975	db_create(&result, NULL, 0);
17976	result->open(result,
17977		path,
17978		path,
17979		DB_HASH,
17980		DB_CREATE,
17981		0644);
17982#elif DB_VERSION_MAJOR >= 2
17983	DB *result = 0;
17984	db_open(path,
17985		DB_HASH,
17986		DB_CREATE,
17987		0644,
17988		(DB_ENV *) 0,
17989		(DB_INFO *) 0,
17990		&result);
17991#endif /* DB_VERSION_MAJOR */
17992#else
17993	DB *result = dbopen(path,
17994		     2,
17995		     0644,
17996		     DB_HASH,
17997		     0);
17998#endif
17999	${cf_cv_main_return:-return}(result != 0)
18000
18001  ;
18002  return 0;
18003}
18004_ACEOF
18005rm -f conftest.$ac_objext conftest$ac_exeext
18006if { (eval echo "$as_me:18006: \"$ac_link\"") >&5
18007  (eval $ac_link) 2>&5
18008  ac_status=$?
18009  echo "$as_me:18009: \$? = $ac_status" >&5
18010  (exit $ac_status); } &&
18011         { ac_try='test -s conftest$ac_exeext'
18012  { (eval echo "$as_me:18012: \"$ac_try\"") >&5
18013  (eval $ac_try) 2>&5
18014  ac_status=$?
18015  echo "$as_me:18015: \$? = $ac_status" >&5
18016  (exit $ac_status); }; }; then
18017
18018	if test -n "$cf_db_libs" ; then
18019		cf_cv_hashed_db_libs=$cf_db_libs
18020	else
18021		cf_cv_hashed_db_libs=default
18022	fi
18023	LIBS="$cf_save_libs"
18024	break
18025
18026else
18027  echo "$as_me: failed program was:" >&5
18028cat conftest.$ac_ext >&5
18029fi
18030rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18031	LIBS="$cf_save_libs"
18032done
18033
18034fi
18035echo "$as_me:18035: result: $cf_cv_hashed_db_libs" >&5
18036echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
18037
18038	if test "$cf_cv_hashed_db_libs" = unknown ; then
18039		{ { echo "$as_me:18039: error: Cannot determine library for db" >&5
18040echo "$as_me: error: Cannot determine library for db" >&2;}
18041   { (exit 1); exit 1; }; }
18042	elif test "$cf_cv_hashed_db_libs" != default ; then
18043		LIBS="-l$cf_cv_hashed_db_libs $LIBS"
18044	fi
18045fi
18046
18047else
18048
18049	{ { echo "$as_me:18049: error: Cannot find db.h" >&5
18050echo "$as_me: error: Cannot find db.h" >&2;}
18051   { (exit 1); exit 1; }; }
18052
18053fi
18054
18055fi
18056
18057if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
18058	CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18059	CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18060fi
18061
18062# Just in case, check if the C compiler has a bool type.
18063
18064echo "$as_me:18064: checking if we should include stdbool.h" >&5
18065echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18066
18067if test "${cf_cv_header_stdbool_h+set}" = set; then
18068  echo $ECHO_N "(cached) $ECHO_C" >&6
18069else
18070
18071	cat >conftest.$ac_ext <<_ACEOF
18072#line 18072 "configure"
18073#include "confdefs.h"
18074
18075int
18076main ()
18077{
18078bool foo = false
18079  ;
18080  return 0;
18081}
18082_ACEOF
18083rm -f conftest.$ac_objext
18084if { (eval echo "$as_me:18084: \"$ac_compile\"") >&5
18085  (eval $ac_compile) 2>&5
18086  ac_status=$?
18087  echo "$as_me:18087: \$? = $ac_status" >&5
18088  (exit $ac_status); } &&
18089         { ac_try='test -s conftest.$ac_objext'
18090  { (eval echo "$as_me:18090: \"$ac_try\"") >&5
18091  (eval $ac_try) 2>&5
18092  ac_status=$?
18093  echo "$as_me:18093: \$? = $ac_status" >&5
18094  (exit $ac_status); }; }; then
18095  cf_cv_header_stdbool_h=0
18096else
18097  echo "$as_me: failed program was:" >&5
18098cat conftest.$ac_ext >&5
18099cat >conftest.$ac_ext <<_ACEOF
18100#line 18100 "configure"
18101#include "confdefs.h"
18102
18103#ifndef __BEOS__
18104#include <stdbool.h>
18105#endif
18106
18107int
18108main ()
18109{
18110bool foo = false
18111  ;
18112  return 0;
18113}
18114_ACEOF
18115rm -f conftest.$ac_objext
18116if { (eval echo "$as_me:18116: \"$ac_compile\"") >&5
18117  (eval $ac_compile) 2>&5
18118  ac_status=$?
18119  echo "$as_me:18119: \$? = $ac_status" >&5
18120  (exit $ac_status); } &&
18121         { ac_try='test -s conftest.$ac_objext'
18122  { (eval echo "$as_me:18122: \"$ac_try\"") >&5
18123  (eval $ac_try) 2>&5
18124  ac_status=$?
18125  echo "$as_me:18125: \$? = $ac_status" >&5
18126  (exit $ac_status); }; }; then
18127  cf_cv_header_stdbool_h=1
18128else
18129  echo "$as_me: failed program was:" >&5
18130cat conftest.$ac_ext >&5
18131cf_cv_header_stdbool_h=0
18132fi
18133rm -f conftest.$ac_objext conftest.$ac_ext
18134fi
18135rm -f conftest.$ac_objext conftest.$ac_ext
18136fi
18137
18138if test "$cf_cv_header_stdbool_h" = 1
18139then	echo "$as_me:18139: result: yes" >&5
18140echo "${ECHO_T}yes" >&6
18141else	echo "$as_me:18141: result: no" >&5
18142echo "${ECHO_T}no" >&6
18143fi
18144
18145echo "$as_me:18145: checking for builtin bool type" >&5
18146echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18147
18148if test "${cf_cv_cc_bool_type+set}" = set; then
18149  echo $ECHO_N "(cached) $ECHO_C" >&6
18150else
18151
18152	cat >conftest.$ac_ext <<_ACEOF
18153#line 18153 "configure"
18154#include "confdefs.h"
18155
18156#include <stdio.h>
18157#include <sys/types.h>
18158
18159int
18160main ()
18161{
18162bool x = false
18163  ;
18164  return 0;
18165}
18166_ACEOF
18167rm -f conftest.$ac_objext
18168if { (eval echo "$as_me:18168: \"$ac_compile\"") >&5
18169  (eval $ac_compile) 2>&5
18170  ac_status=$?
18171  echo "$as_me:18171: \$? = $ac_status" >&5
18172  (exit $ac_status); } &&
18173         { ac_try='test -s conftest.$ac_objext'
18174  { (eval echo "$as_me:18174: \"$ac_try\"") >&5
18175  (eval $ac_try) 2>&5
18176  ac_status=$?
18177  echo "$as_me:18177: \$? = $ac_status" >&5
18178  (exit $ac_status); }; }; then
18179  cf_cv_cc_bool_type=1
18180else
18181  echo "$as_me: failed program was:" >&5
18182cat conftest.$ac_ext >&5
18183cf_cv_cc_bool_type=0
18184fi
18185rm -f conftest.$ac_objext conftest.$ac_ext
18186
18187fi
18188
18189if test "$cf_cv_cc_bool_type" = 1
18190then	echo "$as_me:18190: result: yes" >&5
18191echo "${ECHO_T}yes" >&6
18192else	echo "$as_me:18192: result: no" >&5
18193echo "${ECHO_T}no" >&6
18194fi
18195
18196# Check for C++ compiler characteristics (and ensure that it's there!)
18197if test -n "$CXX" ; then
18198	ac_ext=cc
18199ac_cpp='$CXXCPP $CPPFLAGS'
18200ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18201ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18202ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18203ac_main_return=return
18204
18205if test -n "$GXX" ; then
18206case $cf_cv_system_name in #(vi
18207os2*) #(vi
18208	cf_stdcpp_libname=stdcpp
18209	;;
18210*)
18211	cf_stdcpp_libname=stdc++
18212	;;
18213esac
18214echo "$as_me:18214: checking for library $cf_stdcpp_libname" >&5
18215echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18216if test "${cf_cv_libstdcpp+set}" = set; then
18217  echo $ECHO_N "(cached) $ECHO_C" >&6
18218else
18219
18220	cf_save="$LIBS"
18221	LIBS="-l$cf_stdcpp_libname $LIBS"
18222cat >conftest.$ac_ext <<_ACEOF
18223#line 18223 "configure"
18224#include "confdefs.h"
18225
18226#include <strstream.h>
18227int
18228main ()
18229{
18230
18231char buf[80];
18232strstreambuf foo(buf, sizeof(buf))
18233
18234  ;
18235  return 0;
18236}
18237_ACEOF
18238rm -f conftest.$ac_objext conftest$ac_exeext
18239if { (eval echo "$as_me:18239: \"$ac_link\"") >&5
18240  (eval $ac_link) 2>&5
18241  ac_status=$?
18242  echo "$as_me:18242: \$? = $ac_status" >&5
18243  (exit $ac_status); } &&
18244         { ac_try='test -s conftest$ac_exeext'
18245  { (eval echo "$as_me:18245: \"$ac_try\"") >&5
18246  (eval $ac_try) 2>&5
18247  ac_status=$?
18248  echo "$as_me:18248: \$? = $ac_status" >&5
18249  (exit $ac_status); }; }; then
18250  cf_cv_libstdcpp=yes
18251else
18252  echo "$as_me: failed program was:" >&5
18253cat conftest.$ac_ext >&5
18254cf_cv_libstdcpp=no
18255fi
18256rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18257	LIBS="$cf_save"
18258
18259fi
18260echo "$as_me:18260: result: $cf_cv_libstdcpp" >&5
18261echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18262test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
18263fi
18264
18265	echo "$as_me:18265: checking whether $CXX understands -c and -o together" >&5
18266echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18267if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18268  echo $ECHO_N "(cached) $ECHO_C" >&6
18269else
18270
18271cat > conftest.$ac_ext <<CF_EOF
18272#include <stdio.h>
18273int main()
18274{
18275	${cf_cv_main_return:-return}(0);
18276}
18277CF_EOF
18278# We do the test twice because some compilers refuse to overwrite an
18279# existing .o file with -o, though they will create one.
18280ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18281if { (eval echo "$as_me:18281: \"$ac_try\"") >&5
18282  (eval $ac_try) 2>&5
18283  ac_status=$?
18284  echo "$as_me:18284: \$? = $ac_status" >&5
18285  (exit $ac_status); } &&
18286  test -f conftest2.$ac_objext && { (eval echo "$as_me:18286: \"$ac_try\"") >&5
18287  (eval $ac_try) 2>&5
18288  ac_status=$?
18289  echo "$as_me:18289: \$? = $ac_status" >&5
18290  (exit $ac_status); };
18291then
18292  eval cf_cv_prog_CXX_c_o=yes
18293else
18294  eval cf_cv_prog_CXX_c_o=no
18295fi
18296rm -rf conftest*
18297
18298fi
18299if test $cf_cv_prog_CXX_c_o = yes; then
18300  echo "$as_me:18300: result: yes" >&5
18301echo "${ECHO_T}yes" >&6
18302else
18303  echo "$as_me:18303: result: no" >&5
18304echo "${ECHO_T}no" >&6
18305fi
18306
18307	case $GXX_VERSION in
18308	1*|2.0-6*)
18309		cf_cxx_library=yes
18310		;;
18311	*-2.7*|2.7*)
18312
18313cf_cxx_library=unknown
18314case $cf_cv_system_name in #(vi
18315os2*) #(vi
18316	cf_gpp_libname=gpp
18317	;;
18318*)
18319	cf_gpp_libname=g++
18320	;;
18321esac
18322if test "$GXX" = yes; then
18323	echo "$as_me:18323: checking for lib$cf_gpp_libname" >&5
18324echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18325	cf_save="$LIBS"
18326	LIBS="-l$cf_gpp_libname $LIBS"
18327	cat >conftest.$ac_ext <<_ACEOF
18328#line 18328 "configure"
18329#include "confdefs.h"
18330
18331#include <$cf_gpp_libname/builtin.h>
18332
18333int
18334main ()
18335{
18336two_arg_error_handler_t foo2 = lib_error_handler
18337  ;
18338  return 0;
18339}
18340_ACEOF
18341rm -f conftest.$ac_objext conftest$ac_exeext
18342if { (eval echo "$as_me:18342: \"$ac_link\"") >&5
18343  (eval $ac_link) 2>&5
18344  ac_status=$?
18345  echo "$as_me:18345: \$? = $ac_status" >&5
18346  (exit $ac_status); } &&
18347         { ac_try='test -s conftest$ac_exeext'
18348  { (eval echo "$as_me:18348: \"$ac_try\"") >&5
18349  (eval $ac_try) 2>&5
18350  ac_status=$?
18351  echo "$as_me:18351: \$? = $ac_status" >&5
18352  (exit $ac_status); }; }; then
18353  cf_cxx_library=yes
18354	 CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18355	 if test "$cf_gpp_libname" = cpp ; then
18356
18357cat >>confdefs.h <<\EOF
18358#define HAVE_GPP_BUILTIN_H 1
18359EOF
18360
18361	 else
18362
18363cat >>confdefs.h <<\EOF
18364#define HAVE_GXX_BUILTIN_H 1
18365EOF
18366
18367	 fi
18368else
18369  echo "$as_me: failed program was:" >&5
18370cat conftest.$ac_ext >&5
18371cat >conftest.$ac_ext <<_ACEOF
18372#line 18372 "configure"
18373#include "confdefs.h"
18374
18375#include <builtin.h>
18376
18377int
18378main ()
18379{
18380two_arg_error_handler_t foo2 = lib_error_handler
18381  ;
18382  return 0;
18383}
18384_ACEOF
18385rm -f conftest.$ac_objext conftest$ac_exeext
18386if { (eval echo "$as_me:18386: \"$ac_link\"") >&5
18387  (eval $ac_link) 2>&5
18388  ac_status=$?
18389  echo "$as_me:18389: \$? = $ac_status" >&5
18390  (exit $ac_status); } &&
18391         { ac_try='test -s conftest$ac_exeext'
18392  { (eval echo "$as_me:18392: \"$ac_try\"") >&5
18393  (eval $ac_try) 2>&5
18394  ac_status=$?
18395  echo "$as_me:18395: \$? = $ac_status" >&5
18396  (exit $ac_status); }; }; then
18397  cf_cxx_library=yes
18398	 CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18399
18400cat >>confdefs.h <<\EOF
18401#define HAVE_BUILTIN_H 1
18402EOF
18403
18404else
18405  echo "$as_me: failed program was:" >&5
18406cat conftest.$ac_ext >&5
18407cf_cxx_library=no
18408fi
18409rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18410fi
18411rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18412	LIBS="$cf_save"
18413	echo "$as_me:18413: result: $cf_cxx_library" >&5
18414echo "${ECHO_T}$cf_cxx_library" >&6
18415fi
18416
18417		;;
18418	*)
18419		cf_cxx_library=no
18420		;;
18421	esac
18422
18423	ac_ext=cc
18424ac_cpp='$CXXCPP $CPPFLAGS'
18425ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18426ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18427ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18428ac_main_return=return
18429echo "$as_me:18429: checking how to run the C++ preprocessor" >&5
18430echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18431if test -z "$CXXCPP"; then
18432  if test "${ac_cv_prog_CXXCPP+set}" = set; then
18433  echo $ECHO_N "(cached) $ECHO_C" >&6
18434else
18435      # Double quotes because CXXCPP needs to be expanded
18436    for CXXCPP in "$CXX -E" "/lib/cpp"
18437    do
18438      ac_preproc_ok=false
18439for ac_cxx_preproc_warn_flag in '' yes
18440do
18441  # Use a header file that comes with gcc, so configuring glibc
18442  # with a fresh cross-compiler works.
18443  # On the NeXT, cc -E runs the code through the compiler's parser,
18444  # not just through cpp. "Syntax error" is here to catch this case.
18445  cat >conftest.$ac_ext <<_ACEOF
18446#line 18446 "configure"
18447#include "confdefs.h"
18448#include <assert.h>
18449                     Syntax error
18450_ACEOF
18451if { (eval echo "$as_me:18451: \"$ac_cpp conftest.$ac_ext\"") >&5
18452  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18453  ac_status=$?
18454  egrep -v '^ *\+' conftest.er1 >conftest.err
18455  rm -f conftest.er1
18456  cat conftest.err >&5
18457  echo "$as_me:18457: \$? = $ac_status" >&5
18458  (exit $ac_status); } >/dev/null; then
18459  if test -s conftest.err; then
18460    ac_cpp_err=$ac_cxx_preproc_warn_flag
18461  else
18462    ac_cpp_err=
18463  fi
18464else
18465  ac_cpp_err=yes
18466fi
18467if test -z "$ac_cpp_err"; then
18468  :
18469else
18470  echo "$as_me: failed program was:" >&5
18471  cat conftest.$ac_ext >&5
18472  # Broken: fails on valid input.
18473continue
18474fi
18475rm -f conftest.err conftest.$ac_ext
18476
18477  # OK, works on sane cases.  Now check whether non-existent headers
18478  # can be detected and how.
18479  cat >conftest.$ac_ext <<_ACEOF
18480#line 18480 "configure"
18481#include "confdefs.h"
18482#include <ac_nonexistent.h>
18483_ACEOF
18484if { (eval echo "$as_me:18484: \"$ac_cpp conftest.$ac_ext\"") >&5
18485  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18486  ac_status=$?
18487  egrep -v '^ *\+' conftest.er1 >conftest.err
18488  rm -f conftest.er1
18489  cat conftest.err >&5
18490  echo "$as_me:18490: \$? = $ac_status" >&5
18491  (exit $ac_status); } >/dev/null; then
18492  if test -s conftest.err; then
18493    ac_cpp_err=$ac_cxx_preproc_warn_flag
18494  else
18495    ac_cpp_err=
18496  fi
18497else
18498  ac_cpp_err=yes
18499fi
18500if test -z "$ac_cpp_err"; then
18501  # Broken: success on invalid input.
18502continue
18503else
18504  echo "$as_me: failed program was:" >&5
18505  cat conftest.$ac_ext >&5
18506  # Passes both tests.
18507ac_preproc_ok=:
18508break
18509fi
18510rm -f conftest.err conftest.$ac_ext
18511
18512done
18513# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18514rm -f conftest.err conftest.$ac_ext
18515if $ac_preproc_ok; then
18516  break
18517fi
18518
18519    done
18520    ac_cv_prog_CXXCPP=$CXXCPP
18521
18522fi
18523  CXXCPP=$ac_cv_prog_CXXCPP
18524else
18525  ac_cv_prog_CXXCPP=$CXXCPP
18526fi
18527echo "$as_me:18527: result: $CXXCPP" >&5
18528echo "${ECHO_T}$CXXCPP" >&6
18529ac_preproc_ok=false
18530for ac_cxx_preproc_warn_flag in '' yes
18531do
18532  # Use a header file that comes with gcc, so configuring glibc
18533  # with a fresh cross-compiler works.
18534  # On the NeXT, cc -E runs the code through the compiler's parser,
18535  # not just through cpp. "Syntax error" is here to catch this case.
18536  cat >conftest.$ac_ext <<_ACEOF
18537#line 18537 "configure"
18538#include "confdefs.h"
18539#include <assert.h>
18540                     Syntax error
18541_ACEOF
18542if { (eval echo "$as_me:18542: \"$ac_cpp conftest.$ac_ext\"") >&5
18543  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18544  ac_status=$?
18545  egrep -v '^ *\+' conftest.er1 >conftest.err
18546  rm -f conftest.er1
18547  cat conftest.err >&5
18548  echo "$as_me:18548: \$? = $ac_status" >&5
18549  (exit $ac_status); } >/dev/null; then
18550  if test -s conftest.err; then
18551    ac_cpp_err=$ac_cxx_preproc_warn_flag
18552  else
18553    ac_cpp_err=
18554  fi
18555else
18556  ac_cpp_err=yes
18557fi
18558if test -z "$ac_cpp_err"; then
18559  :
18560else
18561  echo "$as_me: failed program was:" >&5
18562  cat conftest.$ac_ext >&5
18563  # Broken: fails on valid input.
18564continue
18565fi
18566rm -f conftest.err conftest.$ac_ext
18567
18568  # OK, works on sane cases.  Now check whether non-existent headers
18569  # can be detected and how.
18570  cat >conftest.$ac_ext <<_ACEOF
18571#line 18571 "configure"
18572#include "confdefs.h"
18573#include <ac_nonexistent.h>
18574_ACEOF
18575if { (eval echo "$as_me:18575: \"$ac_cpp conftest.$ac_ext\"") >&5
18576  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18577  ac_status=$?
18578  egrep -v '^ *\+' conftest.er1 >conftest.err
18579  rm -f conftest.er1
18580  cat conftest.err >&5
18581  echo "$as_me:18581: \$? = $ac_status" >&5
18582  (exit $ac_status); } >/dev/null; then
18583  if test -s conftest.err; then
18584    ac_cpp_err=$ac_cxx_preproc_warn_flag
18585  else
18586    ac_cpp_err=
18587  fi
18588else
18589  ac_cpp_err=yes
18590fi
18591if test -z "$ac_cpp_err"; then
18592  # Broken: success on invalid input.
18593continue
18594else
18595  echo "$as_me: failed program was:" >&5
18596  cat conftest.$ac_ext >&5
18597  # Passes both tests.
18598ac_preproc_ok=:
18599break
18600fi
18601rm -f conftest.err conftest.$ac_ext
18602
18603done
18604# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18605rm -f conftest.err conftest.$ac_ext
18606if $ac_preproc_ok; then
18607  :
18608else
18609  { { echo "$as_me:18609: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18610echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18611   { (exit 1); exit 1; }; }
18612fi
18613
18614ac_ext=cc
18615ac_cpp='$CXXCPP $CPPFLAGS'
18616ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18617ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18618ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18619ac_main_return=return
18620
18621for ac_header in typeinfo
18622do
18623as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18624echo "$as_me:18624: checking for $ac_header" >&5
18625echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18626if eval "test \"\${$as_ac_Header+set}\" = set"; then
18627  echo $ECHO_N "(cached) $ECHO_C" >&6
18628else
18629  cat >conftest.$ac_ext <<_ACEOF
18630#line 18630 "configure"
18631#include "confdefs.h"
18632#include <$ac_header>
18633_ACEOF
18634if { (eval echo "$as_me:18634: \"$ac_cpp conftest.$ac_ext\"") >&5
18635  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18636  ac_status=$?
18637  egrep -v '^ *\+' conftest.er1 >conftest.err
18638  rm -f conftest.er1
18639  cat conftest.err >&5
18640  echo "$as_me:18640: \$? = $ac_status" >&5
18641  (exit $ac_status); } >/dev/null; then
18642  if test -s conftest.err; then
18643    ac_cpp_err=$ac_cxx_preproc_warn_flag
18644  else
18645    ac_cpp_err=
18646  fi
18647else
18648  ac_cpp_err=yes
18649fi
18650if test -z "$ac_cpp_err"; then
18651  eval "$as_ac_Header=yes"
18652else
18653  echo "$as_me: failed program was:" >&5
18654  cat conftest.$ac_ext >&5
18655  eval "$as_ac_Header=no"
18656fi
18657rm -f conftest.err conftest.$ac_ext
18658fi
18659echo "$as_me:18659: result: `eval echo '${'$as_ac_Header'}'`" >&5
18660echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18661if test `eval echo '${'$as_ac_Header'}'` = yes; then
18662  cat >>confdefs.h <<EOF
18663#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18664EOF
18665
18666fi
18667done
18668
18669for ac_header in iostream
18670do
18671as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18672echo "$as_me:18672: checking for $ac_header" >&5
18673echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18674if eval "test \"\${$as_ac_Header+set}\" = set"; then
18675  echo $ECHO_N "(cached) $ECHO_C" >&6
18676else
18677  cat >conftest.$ac_ext <<_ACEOF
18678#line 18678 "configure"
18679#include "confdefs.h"
18680#include <$ac_header>
18681_ACEOF
18682if { (eval echo "$as_me:18682: \"$ac_cpp conftest.$ac_ext\"") >&5
18683  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18684  ac_status=$?
18685  egrep -v '^ *\+' conftest.er1 >conftest.err
18686  rm -f conftest.er1
18687  cat conftest.err >&5
18688  echo "$as_me:18688: \$? = $ac_status" >&5
18689  (exit $ac_status); } >/dev/null; then
18690  if test -s conftest.err; then
18691    ac_cpp_err=$ac_cxx_preproc_warn_flag
18692  else
18693    ac_cpp_err=
18694  fi
18695else
18696  ac_cpp_err=yes
18697fi
18698if test -z "$ac_cpp_err"; then
18699  eval "$as_ac_Header=yes"
18700else
18701  echo "$as_me: failed program was:" >&5
18702  cat conftest.$ac_ext >&5
18703  eval "$as_ac_Header=no"
18704fi
18705rm -f conftest.err conftest.$ac_ext
18706fi
18707echo "$as_me:18707: result: `eval echo '${'$as_ac_Header'}'`" >&5
18708echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18709if test `eval echo '${'$as_ac_Header'}'` = yes; then
18710  cat >>confdefs.h <<EOF
18711#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18712EOF
18713
18714fi
18715done
18716
18717if test x"$ac_cv_header_iostream" = xyes ; then
18718	echo "$as_me:18718: checking if iostream uses std-namespace" >&5
18719echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18720	cat >conftest.$ac_ext <<_ACEOF
18721#line 18721 "configure"
18722#include "confdefs.h"
18723
18724#include <iostream>
18725using std::endl;
18726using std::cerr;
18727int
18728main ()
18729{
18730
18731cerr << "testing" << endl;
18732
18733  ;
18734  return 0;
18735}
18736_ACEOF
18737rm -f conftest.$ac_objext
18738if { (eval echo "$as_me:18738: \"$ac_compile\"") >&5
18739  (eval $ac_compile) 2>&5
18740  ac_status=$?
18741  echo "$as_me:18741: \$? = $ac_status" >&5
18742  (exit $ac_status); } &&
18743         { ac_try='test -s conftest.$ac_objext'
18744  { (eval echo "$as_me:18744: \"$ac_try\"") >&5
18745  (eval $ac_try) 2>&5
18746  ac_status=$?
18747  echo "$as_me:18747: \$? = $ac_status" >&5
18748  (exit $ac_status); }; }; then
18749  cf_iostream_namespace=yes
18750else
18751  echo "$as_me: failed program was:" >&5
18752cat conftest.$ac_ext >&5
18753cf_iostream_namespace=no
18754fi
18755rm -f conftest.$ac_objext conftest.$ac_ext
18756	echo "$as_me:18756: result: $cf_iostream_namespace" >&5
18757echo "${ECHO_T}$cf_iostream_namespace" >&6
18758	if test "$cf_iostream_namespace" = yes ; then
18759
18760cat >>confdefs.h <<\EOF
18761#define IOSTREAM_NAMESPACE 1
18762EOF
18763
18764	fi
18765fi
18766
18767echo "$as_me:18767: checking if we should include stdbool.h" >&5
18768echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18769
18770if test "${cf_cv_header_stdbool_h+set}" = set; then
18771  echo $ECHO_N "(cached) $ECHO_C" >&6
18772else
18773
18774	cat >conftest.$ac_ext <<_ACEOF
18775#line 18775 "configure"
18776#include "confdefs.h"
18777
18778int
18779main ()
18780{
18781bool foo = false
18782  ;
18783  return 0;
18784}
18785_ACEOF
18786rm -f conftest.$ac_objext
18787if { (eval echo "$as_me:18787: \"$ac_compile\"") >&5
18788  (eval $ac_compile) 2>&5
18789  ac_status=$?
18790  echo "$as_me:18790: \$? = $ac_status" >&5
18791  (exit $ac_status); } &&
18792         { ac_try='test -s conftest.$ac_objext'
18793  { (eval echo "$as_me:18793: \"$ac_try\"") >&5
18794  (eval $ac_try) 2>&5
18795  ac_status=$?
18796  echo "$as_me:18796: \$? = $ac_status" >&5
18797  (exit $ac_status); }; }; then
18798  cf_cv_header_stdbool_h=0
18799else
18800  echo "$as_me: failed program was:" >&5
18801cat conftest.$ac_ext >&5
18802cat >conftest.$ac_ext <<_ACEOF
18803#line 18803 "configure"
18804#include "confdefs.h"
18805
18806#ifndef __BEOS__
18807#include <stdbool.h>
18808#endif
18809
18810int
18811main ()
18812{
18813bool foo = false
18814  ;
18815  return 0;
18816}
18817_ACEOF
18818rm -f conftest.$ac_objext
18819if { (eval echo "$as_me:18819: \"$ac_compile\"") >&5
18820  (eval $ac_compile) 2>&5
18821  ac_status=$?
18822  echo "$as_me:18822: \$? = $ac_status" >&5
18823  (exit $ac_status); } &&
18824         { ac_try='test -s conftest.$ac_objext'
18825  { (eval echo "$as_me:18825: \"$ac_try\"") >&5
18826  (eval $ac_try) 2>&5
18827  ac_status=$?
18828  echo "$as_me:18828: \$? = $ac_status" >&5
18829  (exit $ac_status); }; }; then
18830  cf_cv_header_stdbool_h=1
18831else
18832  echo "$as_me: failed program was:" >&5
18833cat conftest.$ac_ext >&5
18834cf_cv_header_stdbool_h=0
18835fi
18836rm -f conftest.$ac_objext conftest.$ac_ext
18837fi
18838rm -f conftest.$ac_objext conftest.$ac_ext
18839fi
18840
18841if test "$cf_cv_header_stdbool_h" = 1
18842then	echo "$as_me:18842: result: yes" >&5
18843echo "${ECHO_T}yes" >&6
18844else	echo "$as_me:18844: result: no" >&5
18845echo "${ECHO_T}no" >&6
18846fi
18847
18848echo "$as_me:18848: checking for builtin bool type" >&5
18849echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18850
18851if test "${cf_cv_builtin_bool+set}" = set; then
18852  echo $ECHO_N "(cached) $ECHO_C" >&6
18853else
18854
18855	cat >conftest.$ac_ext <<_ACEOF
18856#line 18856 "configure"
18857#include "confdefs.h"
18858
18859#include <stdio.h>
18860#include <sys/types.h>
18861
18862int
18863main ()
18864{
18865bool x = false
18866  ;
18867  return 0;
18868}
18869_ACEOF
18870rm -f conftest.$ac_objext
18871if { (eval echo "$as_me:18871: \"$ac_compile\"") >&5
18872  (eval $ac_compile) 2>&5
18873  ac_status=$?
18874  echo "$as_me:18874: \$? = $ac_status" >&5
18875  (exit $ac_status); } &&
18876         { ac_try='test -s conftest.$ac_objext'
18877  { (eval echo "$as_me:18877: \"$ac_try\"") >&5
18878  (eval $ac_try) 2>&5
18879  ac_status=$?
18880  echo "$as_me:18880: \$? = $ac_status" >&5
18881  (exit $ac_status); }; }; then
18882  cf_cv_builtin_bool=1
18883else
18884  echo "$as_me: failed program was:" >&5
18885cat conftest.$ac_ext >&5
18886cf_cv_builtin_bool=0
18887fi
18888rm -f conftest.$ac_objext conftest.$ac_ext
18889
18890fi
18891
18892if test "$cf_cv_builtin_bool" = 1
18893then	echo "$as_me:18893: result: yes" >&5
18894echo "${ECHO_T}yes" >&6
18895else	echo "$as_me:18895: result: no" >&5
18896echo "${ECHO_T}no" >&6
18897fi
18898
18899echo "$as_me:18899: checking for size of bool" >&5
18900echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18901if test "${cf_cv_type_of_bool+set}" = set; then
18902  echo $ECHO_N "(cached) $ECHO_C" >&6
18903else
18904
18905	rm -f cf_test.out
18906	if test "$cross_compiling" = yes; then
18907  cf_cv_type_of_bool=unknown
18908else
18909  cat >conftest.$ac_ext <<_ACEOF
18910#line 18910 "configure"
18911#include "confdefs.h"
18912
18913#include <stdlib.h>
18914#include <stdio.h>
18915
18916#if defined(__cplusplus)
18917
18918#ifdef HAVE_GXX_BUILTIN_H
18919#include <g++/builtin.h>
18920#elif HAVE_GPP_BUILTIN_H
18921#include <gpp/builtin.h>
18922#elif HAVE_BUILTIN_H
18923#include <builtin.h>
18924#endif
18925
18926#else
18927
18928#if $cf_cv_header_stdbool_h
18929#include <stdbool.h>
18930#endif
18931
18932#endif
18933
18934int main()
18935{
18936	FILE *fp = fopen("cf_test.out", "w");
18937	if (fp != 0) {
18938		bool x = true;
18939		if ((bool)(-x) >= 0)
18940			fputs("unsigned ", fp);
18941		if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18942		else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18943		else if (sizeof(x) == sizeof(short))fputs("short",fp);
18944		else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18945		fclose(fp);
18946	}
18947	${cf_cv_main_return:-return}(0);
18948}
18949
18950_ACEOF
18951rm -f conftest$ac_exeext
18952if { (eval echo "$as_me:18952: \"$ac_link\"") >&5
18953  (eval $ac_link) 2>&5
18954  ac_status=$?
18955  echo "$as_me:18955: \$? = $ac_status" >&5
18956  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18957  { (eval echo "$as_me:18957: \"$ac_try\"") >&5
18958  (eval $ac_try) 2>&5
18959  ac_status=$?
18960  echo "$as_me:18960: \$? = $ac_status" >&5
18961  (exit $ac_status); }; }; then
18962  cf_cv_type_of_bool=`cat cf_test.out`
18963		 if test -z "$cf_cv_type_of_bool"; then
18964		   cf_cv_type_of_bool=unknown
18965		 fi
18966else
18967  echo "$as_me: program exited with status $ac_status" >&5
18968echo "$as_me: failed program was:" >&5
18969cat conftest.$ac_ext >&5
18970cf_cv_type_of_bool=unknown
18971fi
18972rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18973fi
18974
18975fi
18976
18977	rm -f cf_test.out
18978echo "$as_me:18978: result: $cf_cv_type_of_bool" >&5
18979echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18980if test "$cf_cv_type_of_bool" = unknown ; then
18981	case .$NCURSES_BOOL in #(vi
18982	.auto|.) NCURSES_BOOL=unsigned;;
18983	esac
18984	{ echo "$as_me:18984: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18985echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18986	cf_cv_type_of_bool=$NCURSES_BOOL
18987fi
18988
18989echo "$as_me:18989: checking for special defines needed for etip.h" >&5
18990echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18991cf_save_CXXFLAGS="$CXXFLAGS"
18992cf_result="none"
18993
18994# etip.h includes ncurses.h which includes ncurses_dll.h
18995# But ncurses_dll.h is generated - fix here.
18996test -d include || mkdir include
18997test -f include/ncurses_dll.h || sed -e 's/@NCURSES_WRAP_PREFIX@/'$NCURSES_WRAP_PREFIX'/g' ${srcdir}/include/ncurses_dll.h.in >include/ncurses_dll.h
18998
18999for cf_math in "" MATH_H
19000do
19001for cf_excp in "" MATH_EXCEPTION
19002do
19003	CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
19004	test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
19005	test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
19006cat >conftest.$ac_ext <<_ACEOF
19007#line 19007 "configure"
19008#include "confdefs.h"
19009
19010#include <etip.h.in>
19011
19012int
19013main ()
19014{
19015
19016  ;
19017  return 0;
19018}
19019_ACEOF
19020rm -f conftest.$ac_objext
19021if { (eval echo "$as_me:19021: \"$ac_compile\"") >&5
19022  (eval $ac_compile) 2>&5
19023  ac_status=$?
19024  echo "$as_me:19024: \$? = $ac_status" >&5
19025  (exit $ac_status); } &&
19026         { ac_try='test -s conftest.$ac_objext'
19027  { (eval echo "$as_me:19027: \"$ac_try\"") >&5
19028  (eval $ac_try) 2>&5
19029  ac_status=$?
19030  echo "$as_me:19030: \$? = $ac_status" >&5
19031  (exit $ac_status); }; }; then
19032
19033	test -n "$cf_math" && cat >>confdefs.h <<EOF
19034#define ETIP_NEEDS_${cf_math} 1
19035EOF
19036
19037	test -n "$cf_excp" && cat >>confdefs.h <<EOF
19038#define ETIP_NEEDS_${cf_excp} 1
19039EOF
19040
19041	cf_result="$cf_math $cf_excp"
19042	break 2
19043
19044else
19045  echo "$as_me: failed program was:" >&5
19046cat conftest.$ac_ext >&5
19047fi
19048rm -f conftest.$ac_objext conftest.$ac_ext
19049done
19050done
19051echo "$as_me:19051: result: $cf_result" >&5
19052echo "${ECHO_T}$cf_result" >&6
19053CXXFLAGS="$cf_save_CXXFLAGS"
19054
19055if test -n "$CXX"; then
19056echo "$as_me:19056: checking if $CXX accepts parameter initialization" >&5
19057echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
19058if test "${cf_cv_cpp_param_init+set}" = set; then
19059  echo $ECHO_N "(cached) $ECHO_C" >&6
19060else
19061
19062	ac_ext=cc
19063ac_cpp='$CXXCPP $CPPFLAGS'
19064ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19065ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19066ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19067ac_main_return=return
19068
19069	if test "$cross_compiling" = yes; then
19070  cf_cv_cpp_param_init=unknown
19071else
19072  cat >conftest.$ac_ext <<_ACEOF
19073#line 19073 "configure"
19074#include "confdefs.h"
19075
19076class TEST {
19077private:
19078	int value;
19079public:
19080	TEST(int x = 1);
19081	~TEST();
19082};
19083
19084TEST::TEST(int x = 1)	// some compilers do not like second initializer
19085{
19086	value = x;
19087}
19088int main() { }
19089
19090_ACEOF
19091rm -f conftest$ac_exeext
19092if { (eval echo "$as_me:19092: \"$ac_link\"") >&5
19093  (eval $ac_link) 2>&5
19094  ac_status=$?
19095  echo "$as_me:19095: \$? = $ac_status" >&5
19096  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19097  { (eval echo "$as_me:19097: \"$ac_try\"") >&5
19098  (eval $ac_try) 2>&5
19099  ac_status=$?
19100  echo "$as_me:19100: \$? = $ac_status" >&5
19101  (exit $ac_status); }; }; then
19102  cf_cv_cpp_param_init=yes
19103else
19104  echo "$as_me: program exited with status $ac_status" >&5
19105echo "$as_me: failed program was:" >&5
19106cat conftest.$ac_ext >&5
19107cf_cv_cpp_param_init=no
19108fi
19109rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19110fi
19111	ac_ext=cc
19112ac_cpp='$CXXCPP $CPPFLAGS'
19113ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19114ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19115ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19116ac_main_return=return
19117
19118fi
19119echo "$as_me:19119: result: $cf_cv_cpp_param_init" >&5
19120echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
19121fi
19122test "$cf_cv_cpp_param_init" = yes &&
19123cat >>confdefs.h <<\EOF
19124#define CPP_HAS_PARAM_INIT 1
19125EOF
19126
19127if test -n "$CXX"; then
19128
19129echo "$as_me:19129: checking if $CXX accepts static_cast" >&5
19130echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
19131if test "${cf_cv_cpp_static_cast+set}" = set; then
19132  echo $ECHO_N "(cached) $ECHO_C" >&6
19133else
19134
19135	ac_ext=cc
19136ac_cpp='$CXXCPP $CPPFLAGS'
19137ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19138ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19139ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19140ac_main_return=return
19141
19142	cat >conftest.$ac_ext <<_ACEOF
19143#line 19143 "configure"
19144#include "confdefs.h"
19145
19146class NCursesPanel
19147{
19148public:
19149  NCursesPanel(int nlines,
19150	       int ncols,
19151	       int begin_y = 0,
19152	       int begin_x = 0)
19153  {
19154  }
19155  NCursesPanel();
19156  ~NCursesPanel();
19157};
19158
19159template<class T> class NCursesUserPanel : public NCursesPanel
19160{
19161public:
19162  NCursesUserPanel (int nlines,
19163		    int ncols,
19164		    int begin_y = 0,
19165		    int begin_x = 0,
19166		    const T* p_UserData = static_cast<T*>(0))
19167    : NCursesPanel (nlines, ncols, begin_y, begin_x)
19168  {
19169  };
19170  NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19171  {
19172  };
19173
19174  virtual ~NCursesUserPanel() {};
19175};
19176
19177int
19178main ()
19179{
19180
19181	const char* p_UserData = static_cast<char*>(0)
19182  ;
19183  return 0;
19184}
19185_ACEOF
19186rm -f conftest.$ac_objext
19187if { (eval echo "$as_me:19187: \"$ac_compile\"") >&5
19188  (eval $ac_compile) 2>&5
19189  ac_status=$?
19190  echo "$as_me:19190: \$? = $ac_status" >&5
19191  (exit $ac_status); } &&
19192         { ac_try='test -s conftest.$ac_objext'
19193  { (eval echo "$as_me:19193: \"$ac_try\"") >&5
19194  (eval $ac_try) 2>&5
19195  ac_status=$?
19196  echo "$as_me:19196: \$? = $ac_status" >&5
19197  (exit $ac_status); }; }; then
19198  cf_cv_cpp_static_cast=yes
19199else
19200  echo "$as_me: failed program was:" >&5
19201cat conftest.$ac_ext >&5
19202cf_cv_cpp_static_cast=no
19203fi
19204rm -f conftest.$ac_objext conftest.$ac_ext
19205
19206	ac_ext=cc
19207ac_cpp='$CXXCPP $CPPFLAGS'
19208ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19209ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19210ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19211ac_main_return=return
19212
19213fi
19214echo "$as_me:19214: result: $cf_cv_cpp_static_cast" >&5
19215echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19216
19217fi
19218
19219test "$cf_cv_cpp_static_cast" = yes &&
19220cat >>confdefs.h <<\EOF
19221#define CPP_HAS_STATIC_CAST 1
19222EOF
19223
19224	CXX_AR='$(AR)'
19225	CXX_ARFLAGS='$(ARFLAGS)'
19226	case $cf_cv_system_name in #(vi
19227	irix*) #(vi
19228	    if test "$GXX" != yes ; then
19229		CXX_AR='$(CXX)'
19230		CXX_ARFLAGS='-ar -o'
19231	    fi
19232	    ;;
19233	sco3.2v5*) #(vi
19234	    CXXLDFLAGS="-u main"
19235	    ;;
19236	solaris2*)
19237	    if test "$GXX" != yes ; then
19238		CXX_AR='$(CXX)'
19239		CXX_ARFLAGS='-xar -o'
19240	    fi
19241	    ;;
19242	esac
19243
19244else
19245	cf_cxx_library=no
19246	cf_cv_builtin_bool=1
19247
19248	# Just because we are not configuring against C++ right now does not
19249	# mean that a user will not want to use C++.  Some distributors disable
19250	# the C++ portion of this configuration as a shortcut (or just to avoid
19251	# compiling the demo in the c++ directory).  So we need a reasonable
19252	# default for the 'bool' type.
19253	#
19254	# Caveat: since the storage of the bool type is not standardized, it
19255	# may change.
19256
19257	if test "$NCURSES_BOOL" != auto ; then
19258		cf_cv_type_of_bool=$NCURSES_BOOL
19259		cf_cv_header_stdbool_h=0
19260	else
19261		if test "$cf_cv_header_stdbool_h" = 1 ; then
19262
19263echo "$as_me:19263: checking for size of bool" >&5
19264echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19265if test "${cf_cv_type_of_bool+set}" = set; then
19266  echo $ECHO_N "(cached) $ECHO_C" >&6
19267else
19268
19269	rm -f cf_test.out
19270	if test "$cross_compiling" = yes; then
19271  cf_cv_type_of_bool=unknown
19272else
19273  cat >conftest.$ac_ext <<_ACEOF
19274#line 19274 "configure"
19275#include "confdefs.h"
19276
19277#include <stdlib.h>
19278#include <stdio.h>
19279
19280#if defined(__cplusplus)
19281
19282#ifdef HAVE_GXX_BUILTIN_H
19283#include <g++/builtin.h>
19284#elif HAVE_GPP_BUILTIN_H
19285#include <gpp/builtin.h>
19286#elif HAVE_BUILTIN_H
19287#include <builtin.h>
19288#endif
19289
19290#else
19291
19292#if $cf_cv_header_stdbool_h
19293#include <stdbool.h>
19294#endif
19295
19296#endif
19297
19298int main()
19299{
19300	FILE *fp = fopen("cf_test.out", "w");
19301	if (fp != 0) {
19302		bool x = true;
19303		if ((bool)(-x) >= 0)
19304			fputs("unsigned ", fp);
19305		if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19306		else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19307		else if (sizeof(x) == sizeof(short))fputs("short",fp);
19308		else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19309		fclose(fp);
19310	}
19311	${cf_cv_main_return:-return}(0);
19312}
19313
19314_ACEOF
19315rm -f conftest$ac_exeext
19316if { (eval echo "$as_me:19316: \"$ac_link\"") >&5
19317  (eval $ac_link) 2>&5
19318  ac_status=$?
19319  echo "$as_me:19319: \$? = $ac_status" >&5
19320  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19321  { (eval echo "$as_me:19321: \"$ac_try\"") >&5
19322  (eval $ac_try) 2>&5
19323  ac_status=$?
19324  echo "$as_me:19324: \$? = $ac_status" >&5
19325  (exit $ac_status); }; }; then
19326  cf_cv_type_of_bool=`cat cf_test.out`
19327		 if test -z "$cf_cv_type_of_bool"; then
19328		   cf_cv_type_of_bool=unknown
19329		 fi
19330else
19331  echo "$as_me: program exited with status $ac_status" >&5
19332echo "$as_me: failed program was:" >&5
19333cat conftest.$ac_ext >&5
19334cf_cv_type_of_bool=unknown
19335fi
19336rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19337fi
19338
19339fi
19340
19341	rm -f cf_test.out
19342echo "$as_me:19342: result: $cf_cv_type_of_bool" >&5
19343echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19344if test "$cf_cv_type_of_bool" = unknown ; then
19345	case .$NCURSES_BOOL in #(vi
19346	.auto|.) NCURSES_BOOL=unsigned;;
19347	esac
19348	{ echo "$as_me:19348: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19349echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19350	cf_cv_type_of_bool=$NCURSES_BOOL
19351fi
19352
19353		else
19354			echo "$as_me:19354: checking for fallback type of bool" >&5
19355echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19356			case "$host_cpu" in #(vi
19357			i?86)	cf_cv_type_of_bool=char	;; #(vi
19358			*)	cf_cv_type_of_bool=int	;;
19359			esac
19360			echo "$as_me:19360: result: $cf_cv_type_of_bool" >&5
19361echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19362		fi
19363	fi
19364fi
19365
19366# If the C compiler did not declare bool, and we did not determine that the C++
19367# compiler does not declare bool, turn on an ifdef in curses.h that makes the
19368# ncurses library use the same type as C++ bool.  Note that this allows one to
19369# specify the type of bool in a configure-script option and postpone
19370# integration with the C++ compiler provided that the types are compatible.
19371USE_CXX_BOOL=1
19372if test $cf_cv_cc_bool_type = 1
19373then
19374	# oops: C has a bool.  Unlikely, but C++ could differ.
19375	USE_CXX_BOOL=0
19376elif test $cf_cv_builtin_bool = 0
19377then
19378	# C++ has no bool
19379	USE_CXX_BOOL=0
19380else
19381	# this is the normal case
19382	USE_CXX_BOOL='defined(__cplusplus)'
19383fi
19384
19385if test -f "${srcdir}/Ada95/Makefile.in" ; then
19386
19387	if test "$cf_with_ada" != "no" ; then
19388		if test "$with_libtool" != "no"; then
19389			{ echo "$as_me:19389: WARNING: libtool does not support Ada - disabling feature" >&5
19390echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19391			cf_with_ada=no
19392		fi
19393	fi
19394
19395	if test "$cf_with_ada" != "no" ; then
19396
19397cf_ada_make=gnatmake
19398# Extract the first word of "$cf_ada_make", so it can be a program name with args.
19399set dummy $cf_ada_make; ac_word=$2
19400echo "$as_me:19400: checking for $ac_word" >&5
19401echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19402if test "${ac_cv_prog_gnat_exists+set}" = set; then
19403  echo $ECHO_N "(cached) $ECHO_C" >&6
19404else
19405  if test -n "$gnat_exists"; then
19406  ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19407else
19408  ac_save_IFS=$IFS; IFS=$ac_path_separator
19409ac_dummy="$PATH"
19410for ac_dir in $ac_dummy; do
19411  IFS=$ac_save_IFS
19412  test -z "$ac_dir" && ac_dir=.
19413  $as_executable_p "$ac_dir/$ac_word" || continue
19414ac_cv_prog_gnat_exists="yes"
19415echo "$as_me:19415: found $ac_dir/$ac_word" >&5
19416break
19417done
19418
19419  test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19420fi
19421fi
19422gnat_exists=$ac_cv_prog_gnat_exists
19423if test -n "$gnat_exists"; then
19424  echo "$as_me:19424: result: $gnat_exists" >&5
19425echo "${ECHO_T}$gnat_exists" >&6
19426else
19427  echo "$as_me:19427: result: no" >&5
19428echo "${ECHO_T}no" >&6
19429fi
19430
19431if test "$ac_cv_prog_gnat_exists" = no; then
19432   cf_ada_make=
19433   cf_cv_prog_gnat_correct=no
19434else
19435
19436echo "$as_me:19436: checking for gnat version" >&5
19437echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19438cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19439	grep '[0-9].[0-9][0-9]*' |\
19440    sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19441echo "$as_me:19441: result: $cf_gnat_version" >&5
19442echo "${ECHO_T}$cf_gnat_version" >&6
19443
19444case $cf_gnat_version in #(vi
194453.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19446	cf_cv_prog_gnat_correct=yes
19447	;;
19448*)
19449	{ echo "$as_me:19449: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19450echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19451	cf_cv_prog_gnat_correct=no
19452	;;
19453esac
19454
19455   # Extract the first word of "m4", so it can be a program name with args.
19456set dummy m4; ac_word=$2
19457echo "$as_me:19457: checking for $ac_word" >&5
19458echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19459if test "${ac_cv_prog_M4_exists+set}" = set; then
19460  echo $ECHO_N "(cached) $ECHO_C" >&6
19461else
19462  if test -n "$M4_exists"; then
19463  ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19464else
19465  ac_save_IFS=$IFS; IFS=$ac_path_separator
19466ac_dummy="$PATH"
19467for ac_dir in $ac_dummy; do
19468  IFS=$ac_save_IFS
19469  test -z "$ac_dir" && ac_dir=.
19470  $as_executable_p "$ac_dir/$ac_word" || continue
19471ac_cv_prog_M4_exists="yes"
19472echo "$as_me:19472: found $ac_dir/$ac_word" >&5
19473break
19474done
19475
19476  test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19477fi
19478fi
19479M4_exists=$ac_cv_prog_M4_exists
19480if test -n "$M4_exists"; then
19481  echo "$as_me:19481: result: $M4_exists" >&5
19482echo "${ECHO_T}$M4_exists" >&6
19483else
19484  echo "$as_me:19484: result: no" >&5
19485echo "${ECHO_T}no" >&6
19486fi
19487
19488   if test "$ac_cv_prog_M4_exists" = no; then
19489      cf_cv_prog_gnat_correct=no
19490      echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19491   fi
19492   if test "$cf_cv_prog_gnat_correct" = yes; then
19493      echo "$as_me:19493: checking if GNAT works" >&5
19494echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19495
19496rm -rf conftest* *~conftest*
19497cat >>conftest.ads <<CF_EOF
19498procedure conftest;
19499CF_EOF
19500cat >>conftest.adb <<CF_EOF
19501with Text_IO;
19502with GNAT.OS_Lib;
19503procedure conftest is
19504begin
19505   Text_IO.Put ("Hello World");
19506   Text_IO.New_Line;
19507   GNAT.OS_Lib.OS_Exit (0);
19508end conftest;
19509CF_EOF
19510if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19511   if ( ./conftest 1>&5 2>&1 ) ; then
19512      cf_cv_prog_gnat_correct=yes
19513   else
19514      cf_cv_prog_gnat_correct=no
19515   fi
19516else
19517   cf_cv_prog_gnat_correct=no
19518fi
19519rm -rf conftest* *~conftest*
19520
19521      echo "$as_me:19521: result: $cf_cv_prog_gnat_correct" >&5
19522echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19523   fi
19524fi
19525
19526		if test	"x$cf_cv_prog_gnat_correct" = xyes; then
19527
19528 	ADAFLAGS="$ADAFLAGS -gnatpn"
19529
19530	echo "$as_me:19530: checking optimization options for ADAFLAGS" >&5
19531echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19532	case "$CFLAGS" in
19533	*-g*)
19534
19535 	ADAFLAGS="$ADAFLAGS -g"
19536
19537		;;
19538	esac
19539	case "$CFLAGS" in
19540	*-O*)
19541		cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ 	].*//'`
19542
19543 	ADAFLAGS="$ADAFLAGS $cf_O_flag"
19544
19545		;;
19546	esac
19547	echo "$as_me:19547: result: $ADAFLAGS" >&5
19548echo "${ECHO_T}$ADAFLAGS" >&6
19549
19550echo "$as_me:19550: checking if GNAT supports generics" >&5
19551echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19552case $cf_gnat_version in #(vi
195533.[1-9]*|[4-9].*) #(vi
19554	cf_gnat_generics=yes
19555	;;
19556*)
19557	cf_gnat_generics=no
19558	;;
19559esac
19560echo "$as_me:19560: result: $cf_gnat_generics" >&5
19561echo "${ECHO_T}$cf_gnat_generics" >&6
19562
19563if test "$cf_gnat_generics" = yes
19564then
19565	cf_compile_generics=generics
19566	cf_generic_objects="\${GENOBJS}"
19567else
19568	cf_compile_generics=
19569	cf_generic_objects=
19570fi
19571
19572echo "$as_me:19572: checking if GNAT supports SIGINT" >&5
19573echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19574if test "${cf_cv_gnat_sigint+set}" = set; then
19575  echo $ECHO_N "(cached) $ECHO_C" >&6
19576else
19577
19578rm -rf conftest* *~conftest*
19579cat >>conftest.ads <<CF_EOF
19580with Ada.Interrupts.Names;
19581
19582package ConfTest is
19583
19584   pragma Warnings (Off);  --  the next pragma exists since 3.11p
19585   pragma Unreserve_All_Interrupts;
19586   pragma Warnings (On);
19587
19588   protected Process is
19589      procedure Stop;
19590      function Continue return Boolean;
19591      pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19592   private
19593      Done : Boolean := False;
19594   end Process;
19595
19596end ConfTest;
19597CF_EOF
19598cat >>conftest.adb <<CF_EOF
19599package body ConfTest is
19600   protected body Process is
19601      procedure Stop is
19602      begin
19603         Done := True;
19604      end Stop;
19605      function Continue return Boolean is
19606      begin
19607         return not Done;
19608      end Continue;
19609   end Process;
19610end ConfTest;
19611CF_EOF
19612if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19613      cf_cv_gnat_sigint=yes
19614else
19615   cf_cv_gnat_sigint=no
19616fi
19617rm -rf conftest* *~conftest*
19618
19619fi
19620echo "$as_me:19620: result: $cf_cv_gnat_sigint" >&5
19621echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19622
19623if test $cf_cv_gnat_sigint = yes ; then
19624	USE_GNAT_SIGINT=""
19625else
19626	USE_GNAT_SIGINT="#"
19627fi
19628
19629echo "$as_me:19629: checking if GNAT pragma Unreferenced works" >&5
19630echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19631if test "${cf_cv_pragma_unreferenced+set}" = set; then
19632  echo $ECHO_N "(cached) $ECHO_C" >&6
19633else
19634
19635rm -rf conftest* *~conftest*
19636cat >>conftest.ads <<CF_EOF
19637procedure conftest;
19638CF_EOF
19639cat >>conftest.adb <<CF_EOF
19640with Text_IO;
19641with GNAT.OS_Lib;
19642procedure conftest is
19643   test : Integer;
19644   pragma Unreferenced (test);
19645begin
19646   test := 1;
19647   Text_IO.Put ("Hello World");
19648   Text_IO.New_Line;
19649   GNAT.OS_Lib.OS_Exit (0);
19650end conftest;
19651CF_EOF
19652if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19653      cf_cv_pragma_unreferenced=yes
19654else
19655   cf_cv_pragma_unreferenced=no
19656fi
19657rm -rf conftest* *~conftest*
19658
19659fi
19660echo "$as_me:19660: result: $cf_cv_pragma_unreferenced" >&5
19661echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19662
19663# if the pragma is supported, use it (needed in the Trace code).
19664if test $cf_cv_pragma_unreferenced = yes ; then
19665	PRAGMA_UNREF=TRUE
19666else
19667	PRAGMA_UNREF=FALSE
19668fi
19669
19670cf_gnat_libraries=no
19671cf_gnat_projects=no
19672
19673echo "$as_me:19673: checking if GNAT supports project files" >&5
19674echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19675case $cf_gnat_version in #(vi
196763.[0-9]*) #(vi
19677	;;
19678*)
19679	case $cf_cv_system_name in #(vi
19680	cygwin*|msys*) #(vi
19681		;;
19682	*)
19683		mkdir conftest.src conftest.bin conftest.lib
19684		cd conftest.src
19685		rm -rf conftest* *~conftest*
19686		cat >>library.gpr <<CF_EOF
19687project Library is
19688  Kind := External ("LIB_KIND");
19689  for Library_Name use "ConfTest";
19690  for Object_Dir use ".";
19691  for Library_ALI_Dir use External("LIBRARY_DIR");
19692  for Library_Version use External ("SONAME");
19693  for Library_Kind use Kind;
19694  for Library_Dir use External("BUILD_DIR");
19695  Source_Dir := External ("SOURCE_DIR");
19696  for Source_Dirs use (Source_Dir);
19697  package Compiler is
19698     for Default_Switches ("Ada") use
19699       ("-g",
19700        "-O2",
19701        "-gnatafno",
19702        "-gnatVa",   -- All validity checks
19703        "-gnatwa");  -- Activate all optional errors
19704  end Compiler;
19705end Library;
19706CF_EOF
19707		cat >>confpackage.ads <<CF_EOF
19708package ConfPackage is
19709   procedure conftest;
19710end ConfPackage;
19711CF_EOF
19712		cat >>confpackage.adb <<CF_EOF
19713with Text_IO;
19714package body ConfPackage is
19715   procedure conftest is
19716   begin
19717      Text_IO.Put ("Hello World");
19718      Text_IO.New_Line;
19719   end conftest;
19720end ConfPackage;
19721CF_EOF
19722		if ( $cf_ada_make $ADAFLAGS \
19723				-Plibrary.gpr \
19724				-XBUILD_DIR=`cd ../conftest.bin;pwd` \
19725				-XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19726				-XSOURCE_DIR=`pwd` \
19727				-XSONAME=libConfTest.so.1 \
19728				-XLIB_KIND=static 1>&5 2>&1 ) ; then
19729			cf_gnat_projects=yes
19730		fi
19731		cd ..
19732		if test -f conftest.lib/confpackage.ali
19733		then
19734			cf_gnat_libraries=yes
19735		fi
19736		rm -rf conftest* *~conftest*
19737		;;
19738	esac
19739	;;
19740esac
19741echo "$as_me:19741: result: $cf_gnat_projects" >&5
19742echo "${ECHO_T}$cf_gnat_projects" >&6
19743
19744if test $cf_gnat_projects = yes
19745then
19746	echo "$as_me:19746: checking if GNAT supports libraries" >&5
19747echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19748	echo "$as_me:19748: result: $cf_gnat_libraries" >&5
19749echo "${ECHO_T}$cf_gnat_libraries" >&6
19750fi
19751
19752if test "$cf_gnat_projects" = yes
19753then
19754	USE_OLD_MAKERULES="#"
19755	USE_GNAT_PROJECTS=""
19756else
19757	USE_OLD_MAKERULES=""
19758	USE_GNAT_PROJECTS="#"
19759fi
19760
19761if test "$cf_gnat_libraries" = yes
19762then
19763	USE_GNAT_LIBRARIES=""
19764else
19765	USE_GNAT_LIBRARIES="#"
19766fi
19767
19768echo "$as_me:19768: checking for ada-compiler" >&5
19769echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19770
19771# Check whether --with-ada-compiler or --without-ada-compiler was given.
19772if test "${with_ada_compiler+set}" = set; then
19773  withval="$with_ada_compiler"
19774  cf_ada_compiler=$withval
19775else
19776  cf_ada_compiler=gnatmake
19777fi;
19778
19779echo "$as_me:19779: result: $cf_ada_compiler" >&5
19780echo "${ECHO_T}$cf_ada_compiler" >&6
19781
19782			cf_ada_package=terminal_interface
19783
19784echo "$as_me:19784: checking for ada-include" >&5
19785echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19786
19787# Check whether --with-ada-include or --without-ada-include was given.
19788if test "${with_ada_include+set}" = set; then
19789  withval="$with_ada_include"
19790
19791else
19792  withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19793fi; if test -n "$prefix/share/ada/adainclude" ; then
19794
19795if test "x$prefix" != xNONE; then
19796  cf_path_syntax="$prefix"
19797else
19798  cf_path_syntax="$ac_default_prefix"
19799fi
19800
19801case ".$withval" in #(vi
19802.\$\(*\)*|.\'*\'*) #(vi
19803  ;;
19804..|./*|.\\*) #(vi
19805  ;;
19806.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19807  ;;
19808.\${*prefix}*|.\${*dir}*) #(vi
19809  eval withval="$withval"
19810  case ".$withval" in #(vi
19811  .NONE/*)
19812    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19813    ;;
19814  esac
19815  ;; #(vi
19816.no|.NONE/*)
19817  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19818  ;;
19819*)
19820  { { echo "$as_me:19820: error: expected a pathname, not \"$withval\"" >&5
19821echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19822   { (exit 1); exit 1; }; }
19823  ;;
19824esac
19825
19826fi
19827eval ADA_INCLUDE="$withval"
19828
19829echo "$as_me:19829: result: $ADA_INCLUDE" >&5
19830echo "${ECHO_T}$ADA_INCLUDE" >&6
19831
19832echo "$as_me:19832: checking for ada-objects" >&5
19833echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19834
19835# Check whether --with-ada-objects or --without-ada-objects was given.
19836if test "${with_ada_objects+set}" = set; then
19837  withval="$with_ada_objects"
19838
19839else
19840  withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19841fi; if test -n "$prefix/lib/ada/adalib" ; then
19842
19843if test "x$prefix" != xNONE; then
19844  cf_path_syntax="$prefix"
19845else
19846  cf_path_syntax="$ac_default_prefix"
19847fi
19848
19849case ".$withval" in #(vi
19850.\$\(*\)*|.\'*\'*) #(vi
19851  ;;
19852..|./*|.\\*) #(vi
19853  ;;
19854.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19855  ;;
19856.\${*prefix}*|.\${*dir}*) #(vi
19857  eval withval="$withval"
19858  case ".$withval" in #(vi
19859  .NONE/*)
19860    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19861    ;;
19862  esac
19863  ;; #(vi
19864.no|.NONE/*)
19865  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19866  ;;
19867*)
19868  { { echo "$as_me:19868: error: expected a pathname, not \"$withval\"" >&5
19869echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19870   { (exit 1); exit 1; }; }
19871  ;;
19872esac
19873
19874fi
19875eval ADA_OBJECTS="$withval"
19876
19877echo "$as_me:19877: result: $ADA_OBJECTS" >&5
19878echo "${ECHO_T}$ADA_OBJECTS" >&6
19879
19880echo "$as_me:19880: checking if an Ada95 shared-library should be built" >&5
19881echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19882
19883# Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19884if test "${with_ada_sharedlib+set}" = set; then
19885  withval="$with_ada_sharedlib"
19886  with_ada_sharedlib=$withval
19887else
19888  with_ada_sharedlib=no
19889fi;
19890echo "$as_me:19890: result: $with_ada_sharedlib" >&5
19891echo "${ECHO_T}$with_ada_sharedlib" >&6
19892
19893ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19894MAKE_ADA_SHAREDLIB="#"
19895
19896if test "x$with_ada_sharedlib" != xno
19897then
19898	MAKE_ADA_SHAREDLIB=
19899	if test "x$with_ada_sharedlib" != xyes
19900	then
19901		ADA_SHAREDLIB="$with_ada_sharedlib"
19902	fi
19903fi
19904
19905		fi
19906	fi
19907else
19908	cf_with_ada=no
19909fi
19910
19911# do this "late" to avoid conflict with header-checks
19912if test "x$with_widec" = xyes ; then
19913	echo "$as_me:19913: checking for wchar_t" >&5
19914echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
19915if test "${ac_cv_type_wchar_t+set}" = set; then
19916  echo $ECHO_N "(cached) $ECHO_C" >&6
19917else
19918  cat >conftest.$ac_ext <<_ACEOF
19919#line 19919 "configure"
19920#include "confdefs.h"
19921$ac_includes_default
19922int
19923main ()
19924{
19925if ((wchar_t *) 0)
19926  return 0;
19927if (sizeof (wchar_t))
19928  return 0;
19929  ;
19930  return 0;
19931}
19932_ACEOF
19933rm -f conftest.$ac_objext
19934if { (eval echo "$as_me:19934: \"$ac_compile\"") >&5
19935  (eval $ac_compile) 2>&5
19936  ac_status=$?
19937  echo "$as_me:19937: \$? = $ac_status" >&5
19938  (exit $ac_status); } &&
19939         { ac_try='test -s conftest.$ac_objext'
19940  { (eval echo "$as_me:19940: \"$ac_try\"") >&5
19941  (eval $ac_try) 2>&5
19942  ac_status=$?
19943  echo "$as_me:19943: \$? = $ac_status" >&5
19944  (exit $ac_status); }; }; then
19945  ac_cv_type_wchar_t=yes
19946else
19947  echo "$as_me: failed program was:" >&5
19948cat conftest.$ac_ext >&5
19949ac_cv_type_wchar_t=no
19950fi
19951rm -f conftest.$ac_objext conftest.$ac_ext
19952fi
19953echo "$as_me:19953: result: $ac_cv_type_wchar_t" >&5
19954echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
19955
19956echo "$as_me:19956: checking size of wchar_t" >&5
19957echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
19958if test "${ac_cv_sizeof_wchar_t+set}" = set; then
19959  echo $ECHO_N "(cached) $ECHO_C" >&6
19960else
19961  if test "$ac_cv_type_wchar_t" = yes; then
19962  if test "$cross_compiling" = yes; then
19963  # Depending upon the size, compute the lo and hi bounds.
19964cat >conftest.$ac_ext <<_ACEOF
19965#line 19965 "configure"
19966#include "confdefs.h"
19967$ac_includes_default
19968int
19969main ()
19970{
19971int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
19972  ;
19973  return 0;
19974}
19975_ACEOF
19976rm -f conftest.$ac_objext
19977if { (eval echo "$as_me:19977: \"$ac_compile\"") >&5
19978  (eval $ac_compile) 2>&5
19979  ac_status=$?
19980  echo "$as_me:19980: \$? = $ac_status" >&5
19981  (exit $ac_status); } &&
19982         { ac_try='test -s conftest.$ac_objext'
19983  { (eval echo "$as_me:19983: \"$ac_try\"") >&5
19984  (eval $ac_try) 2>&5
19985  ac_status=$?
19986  echo "$as_me:19986: \$? = $ac_status" >&5
19987  (exit $ac_status); }; }; then
19988  ac_lo=0 ac_mid=0
19989  while :; do
19990    cat >conftest.$ac_ext <<_ACEOF
19991#line 19991 "configure"
19992#include "confdefs.h"
19993$ac_includes_default
19994int
19995main ()
19996{
19997int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
19998  ;
19999  return 0;
20000}
20001_ACEOF
20002rm -f conftest.$ac_objext
20003if { (eval echo "$as_me:20003: \"$ac_compile\"") >&5
20004  (eval $ac_compile) 2>&5
20005  ac_status=$?
20006  echo "$as_me:20006: \$? = $ac_status" >&5
20007  (exit $ac_status); } &&
20008         { ac_try='test -s conftest.$ac_objext'
20009  { (eval echo "$as_me:20009: \"$ac_try\"") >&5
20010  (eval $ac_try) 2>&5
20011  ac_status=$?
20012  echo "$as_me:20012: \$? = $ac_status" >&5
20013  (exit $ac_status); }; }; then
20014  ac_hi=$ac_mid; break
20015else
20016  echo "$as_me: failed program was:" >&5
20017cat conftest.$ac_ext >&5
20018ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
20019fi
20020rm -f conftest.$ac_objext conftest.$ac_ext
20021  done
20022else
20023  echo "$as_me: failed program was:" >&5
20024cat conftest.$ac_ext >&5
20025ac_hi=-1 ac_mid=-1
20026  while :; do
20027    cat >conftest.$ac_ext <<_ACEOF
20028#line 20028 "configure"
20029#include "confdefs.h"
20030$ac_includes_default
20031int
20032main ()
20033{
20034int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
20035  ;
20036  return 0;
20037}
20038_ACEOF
20039rm -f conftest.$ac_objext
20040if { (eval echo "$as_me:20040: \"$ac_compile\"") >&5
20041  (eval $ac_compile) 2>&5
20042  ac_status=$?
20043  echo "$as_me:20043: \$? = $ac_status" >&5
20044  (exit $ac_status); } &&
20045         { ac_try='test -s conftest.$ac_objext'
20046  { (eval echo "$as_me:20046: \"$ac_try\"") >&5
20047  (eval $ac_try) 2>&5
20048  ac_status=$?
20049  echo "$as_me:20049: \$? = $ac_status" >&5
20050  (exit $ac_status); }; }; then
20051  ac_lo=$ac_mid; break
20052else
20053  echo "$as_me: failed program was:" >&5
20054cat conftest.$ac_ext >&5
20055ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
20056fi
20057rm -f conftest.$ac_objext conftest.$ac_ext
20058  done
20059fi
20060rm -f conftest.$ac_objext conftest.$ac_ext
20061# Binary search between lo and hi bounds.
20062while test "x$ac_lo" != "x$ac_hi"; do
20063  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20064  cat >conftest.$ac_ext <<_ACEOF
20065#line 20065 "configure"
20066#include "confdefs.h"
20067$ac_includes_default
20068int
20069main ()
20070{
20071int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20072  ;
20073  return 0;
20074}
20075_ACEOF
20076rm -f conftest.$ac_objext
20077if { (eval echo "$as_me:20077: \"$ac_compile\"") >&5
20078  (eval $ac_compile) 2>&5
20079  ac_status=$?
20080  echo "$as_me:20080: \$? = $ac_status" >&5
20081  (exit $ac_status); } &&
20082         { ac_try='test -s conftest.$ac_objext'
20083  { (eval echo "$as_me:20083: \"$ac_try\"") >&5
20084  (eval $ac_try) 2>&5
20085  ac_status=$?
20086  echo "$as_me:20086: \$? = $ac_status" >&5
20087  (exit $ac_status); }; }; then
20088  ac_hi=$ac_mid
20089else
20090  echo "$as_me: failed program was:" >&5
20091cat conftest.$ac_ext >&5
20092ac_lo=`expr $ac_mid + 1`
20093fi
20094rm -f conftest.$ac_objext conftest.$ac_ext
20095done
20096ac_cv_sizeof_wchar_t=$ac_lo
20097else
20098  if test "$cross_compiling" = yes; then
20099  { { echo "$as_me:20099: error: cannot run test program while cross compiling" >&5
20100echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20101   { (exit 1); exit 1; }; }
20102else
20103  cat >conftest.$ac_ext <<_ACEOF
20104#line 20104 "configure"
20105#include "confdefs.h"
20106$ac_includes_default
20107int
20108main ()
20109{
20110FILE *f = fopen ("conftest.val", "w");
20111if (!f)
20112  $ac_main_return (1);
20113fprintf (f, "%d", (sizeof (wchar_t)));
20114fclose (f);
20115  ;
20116  return 0;
20117}
20118_ACEOF
20119rm -f conftest$ac_exeext
20120if { (eval echo "$as_me:20120: \"$ac_link\"") >&5
20121  (eval $ac_link) 2>&5
20122  ac_status=$?
20123  echo "$as_me:20123: \$? = $ac_status" >&5
20124  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20125  { (eval echo "$as_me:20125: \"$ac_try\"") >&5
20126  (eval $ac_try) 2>&5
20127  ac_status=$?
20128  echo "$as_me:20128: \$? = $ac_status" >&5
20129  (exit $ac_status); }; }; then
20130  ac_cv_sizeof_wchar_t=`cat conftest.val`
20131else
20132  echo "$as_me: program exited with status $ac_status" >&5
20133echo "$as_me: failed program was:" >&5
20134cat conftest.$ac_ext >&5
20135fi
20136rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20137fi
20138fi
20139rm -f conftest.val
20140else
20141  ac_cv_sizeof_wchar_t=0
20142fi
20143fi
20144echo "$as_me:20144: result: $ac_cv_sizeof_wchar_t" >&5
20145echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
20146cat >>confdefs.h <<EOF
20147#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
20148EOF
20149
20150fi
20151
20152### Construct the ncurses library-subsets, if any, from this set of keywords:
20153###	none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
20154###
20155### ticlib modules may be a separate library, otherwise contained in termlib.
20156### termlib modules may be a separate library, otherwise contained in ncurses.
20157###
20158### The of "+" or " " between the tokens controls the way the script
20159### chooses to split module lists into libraries.
20160###
20161### (see CF_LIB_RULES).
20162echo "$as_me:20162: checking for library subsets" >&5
20163echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
20164LIB_SUBSETS=
20165
20166if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
20167	LIB_SUBSETS="${LIB_SUBSETS}ticlib"
20168	if test "$with_ticlib" != no ; then
20169		LIB_SUBSETS="${LIB_SUBSETS} "
20170	else
20171		LIB_SUBSETS="${LIB_SUBSETS}+"
20172	fi
20173fi
20174
20175LIB_SUBSETS="${LIB_SUBSETS}termlib"
20176test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
20177
20178if test "$with_termlib" != no ; then
20179	LIB_SUBSETS="${LIB_SUBSETS} "
20180else
20181	LIB_SUBSETS="${LIB_SUBSETS}+"
20182fi
20183
20184LIB_SUBSETS="${LIB_SUBSETS}base"
20185
20186# Most term-driver calls are to tinfo, but some like init_pair are to the
20187# base library (so it resides in base).
20188if test "$with_term_driver" != no ; then
20189	LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
20190	case $cf_cv_system_name in #(vi
20191	*mingw32*) #(vi
20192		LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
20193		;;
20194	*) #(vi
20195		LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
20196		;;
20197	esac
20198fi
20199
20200test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
20201test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
20202
20203echo "$as_me:20203: result: $LIB_SUBSETS" >&5
20204echo "${ECHO_T}$LIB_SUBSETS" >&6
20205
20206### Construct the list of include-directories to be generated
20207
20208if test "$GCC" != yes; then
20209	CPPFLAGS="-I\${includedir} $CPPFLAGS"
20210elif test "$includedir" != "/usr/include"; then
20211	if test "$includedir" = '${prefix}/include' ; then
20212		if test x$prefix != x/usr ; then
20213			CPPFLAGS="-I\${includedir} $CPPFLAGS"
20214		fi
20215	else
20216		CPPFLAGS="-I\${includedir} $CPPFLAGS"
20217	fi
20218fi
20219if test "$srcdir" != "."; then
20220	CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
20221fi
20222CPPFLAGS="-I. -I../include $CPPFLAGS"
20223
20224ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
20225if test "$srcdir" != "."; then
20226	ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
20227fi
20228if test "$GCC" != yes; then
20229	ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20230elif test "$includedir" != "/usr/include"; then
20231	if test "$includedir" = '${prefix}/include' ; then
20232		if test x$prefix != x/usr ; then
20233			ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20234		fi
20235	else
20236		ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20237	fi
20238fi
20239
20240### Build up pieces for makefile rules
20241echo "$as_me:20241: checking default library suffix" >&5
20242echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
20243
20244	case $DFT_LWR_MODEL in
20245	libtool) DFT_ARG_SUFFIX=''   ;;
20246	normal)  DFT_ARG_SUFFIX=''   ;;
20247	debug)   DFT_ARG_SUFFIX='_g' ;;
20248	profile) DFT_ARG_SUFFIX='_p' ;;
20249	shared)  DFT_ARG_SUFFIX=''   ;;
20250	esac
20251	test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
20252echo "$as_me:20252: result: $DFT_ARG_SUFFIX" >&5
20253echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
20254
20255echo "$as_me:20255: checking default library-dependency suffix" >&5
20256echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
20257
20258	case X$DFT_LWR_MODEL in #(vi
20259	Xlibtool) #(vi
20260		DFT_LIB_SUFFIX='.la'
20261		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20262		;;
20263	Xdebug) #(vi
20264		DFT_LIB_SUFFIX='_g.a'
20265		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20266		;;
20267	Xprofile) #(vi
20268		DFT_LIB_SUFFIX='_p.a'
20269		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20270		;;
20271	Xshared) #(vi
20272		case $cf_cv_system_name in
20273		aix[5-7]*) #(vi
20274			DFT_LIB_SUFFIX='.a'
20275			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20276			;;
20277		cygwin*|msys*|mingw*) #(vi
20278			DFT_LIB_SUFFIX='.dll'
20279			DFT_DEP_SUFFIX='.dll.a'
20280			;;
20281		darwin*) #(vi
20282			DFT_LIB_SUFFIX='.dylib'
20283			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20284			;;
20285		hpux*) #(vi
20286			case $target in
20287			ia64*) #(vi
20288				DFT_LIB_SUFFIX='.so'
20289				DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20290				;;
20291			*) #(vi
20292				DFT_LIB_SUFFIX='.sl'
20293				DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20294				;;
20295			esac
20296			;;
20297		*) #(vi
20298			DFT_LIB_SUFFIX='.so'
20299			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20300			;;
20301		esac
20302		;;
20303	*)
20304		DFT_LIB_SUFFIX='.a'
20305		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20306		;;
20307	esac
20308	test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
20309	test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
20310echo "$as_me:20310: result: $DFT_DEP_SUFFIX" >&5
20311echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
20312
20313echo "$as_me:20313: checking default object directory" >&5
20314echo $ECHO_N "checking default object directory... $ECHO_C" >&6
20315
20316	case $DFT_LWR_MODEL in
20317	libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
20318	normal)  DFT_OBJ_SUBDIR='objects' ;;
20319	debug)   DFT_OBJ_SUBDIR='obj_g' ;;
20320	profile) DFT_OBJ_SUBDIR='obj_p' ;;
20321	shared)
20322		case $cf_cv_system_name in #(vi
20323		cygwin|msys) #(vi
20324			DFT_OBJ_SUBDIR='objects' ;;
20325		*)
20326			DFT_OBJ_SUBDIR='obj_s' ;;
20327		esac
20328	esac
20329echo "$as_me:20329: result: $DFT_OBJ_SUBDIR" >&5
20330echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
20331
20332if test "x$cf_with_cxx" = xyes ; then
20333echo "$as_me:20333: checking c++ library-dependency suffix" >&5
20334echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
20335if test "$with_libtool" != "no"; then
20336	# libtool thinks it can make c++ shared libraries (perhaps only g++)
20337	CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20338elif test "$with_shared_cxx" != "no"; then
20339	# also for g++ users...
20340	CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20341else
20342	# we normally make a static library because C/C++ library rules differ
20343
20344	case Xnormal in #(vi
20345	Xlibtool) #(vi
20346		CXX_LIB_SUFFIX='.la'
20347		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20348		;;
20349	Xdebug) #(vi
20350		CXX_LIB_SUFFIX='_g.a'
20351		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20352		;;
20353	Xprofile) #(vi
20354		CXX_LIB_SUFFIX='_p.a'
20355		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20356		;;
20357	Xshared) #(vi
20358		case $cf_cv_system_name in
20359		aix[5-7]*) #(vi
20360			CXX_LIB_SUFFIX='.a'
20361			CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20362			;;
20363		cygwin*|msys*|mingw*) #(vi
20364			CXX_LIB_SUFFIX='.dll'
20365			CXX_DEP_SUFFIX='.dll.a'
20366			;;
20367		darwin*) #(vi
20368			CXX_LIB_SUFFIX='.dylib'
20369			CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20370			;;
20371		hpux*) #(vi
20372			case $target in
20373			ia64*) #(vi
20374				CXX_LIB_SUFFIX='.so'
20375				CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20376				;;
20377			*) #(vi
20378				CXX_LIB_SUFFIX='.sl'
20379				CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20380				;;
20381			esac
20382			;;
20383		*) #(vi
20384			CXX_LIB_SUFFIX='.so'
20385			CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20386			;;
20387		esac
20388		;;
20389	*)
20390		CXX_LIB_SUFFIX='.a'
20391		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20392		;;
20393	esac
20394	test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
20395	test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
20396
20397fi
20398echo "$as_me:20398: result: $CXX_LIB_SUFFIX" >&5
20399echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
20400
20401fi
20402
20403# do not want -ldl in build except as needed for -lncurses dependency
20404if test "x$with_dlsym" = xyes ; then
20405if test $DFT_LWR_MODEL = shared || \
20406   test $DFT_LWR_MODEL = libtool ; then
20407
20408# remove dl library from $LIBS
20409LIBS=`echo "$LIBS" | sed -e 's/-ldl[ 	]//g' -e 's/-ldl$//'`
20410
20411fi
20412fi
20413### Set up low-level terminfo dependencies for makefiles.
20414
20415# TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
20416# do not need libdl
20417TICS_LIST=
20418if test "x$with_dlsym" = xyes ; then
20419
20420# remove dl library from $SHLIB_LIST
20421TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[ 	]//g' -e 's/-ldl$//'`
20422
20423fi
20424
20425if test "$with_ticlib" != no ; then
20426
20427	if test "x$with_ticlib" != xyes ; then
20428		TICS_NAME=$with_ticlib
20429		TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20430		TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20431		TICS_LIB_SUFFIX="${with_ticlib}"
20432	else
20433		TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
20434		TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
20435		TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
20436	fi
20437	TICS_LDFLAGS="-L${LIB_DIR}"
20438	TICS_LIBS="-l${TICS_LIB_SUFFIX}"
20439else
20440	TICS_LDFLAGS="-L${LIB_DIR}"
20441	TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20442fi
20443
20444if test "$with_termlib" != no ; then
20445
20446	if test "x$with_termlib" != xyes ; then
20447		TINFO_NAME=$with_termlib
20448		TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20449		TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20450		TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20451		TINFO_LIB_SUFFIX="${with_termlib}"
20452	else
20453		TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20454		TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
20455		TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
20456		TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
20457	fi
20458
20459	TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20460	TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20461	if test "$DFT_LWR_MODEL" = "libtool"; then
20462		TEST_ARGS="${TEST_DEPS}"
20463		TEST_ARG2="${TEST_DEP2}"
20464		TINFO_LDFLAGS="-L${LIB_DIR}"
20465		TINFO_LIBS="$TEST_ARGS"
20466		TICS_LIST="$SHLIB_LIST $TEST_ARGS"
20467		SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
20468	else
20469		TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
20470		TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
20471		if test "x$with_term_driver" != xno ; then
20472			TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20473			TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20474			TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20475		else
20476			TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20477			TINFO_LIBS="$TEST_ARGS"
20478		fi
20479		TINFO_LDFLAGS="-L${LIB_DIR}"
20480		SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20481	fi
20482else
20483	# the next lines are needed for linking libtic over libncurses
20484	TINFO_NAME=${LIB_NAME}
20485	TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20486	TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
20487	if test "x$with_tic_depends" = xyes ; then
20488		TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20489	else
20490		TICS_LIST="$SHLIB_LIST"
20491	fi
20492
20493	TINFO_LDFLAGS="-L${LIB_DIR}"
20494	TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20495fi
20496
20497if test "$DFT_LWR_MODEL" = shared ; then
20498	case $cf_cv_system_name in #(vi
20499	cygwin*|msys*)
20500		# "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
20501		TINFO_SUFFIX=.dll
20502		;;
20503	esac
20504fi
20505
20506if test "x$with_dlsym" = xyes ; then
20507
20508# remove dl library from $TICS_LIST
20509TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[ 	]//g' -e 's/-ldl$//'`
20510
20511fi
20512
20513if test "$DFT_LWR_MODEL" = "libtool"; then
20514    OBJEXT=lo
20515fi
20516
20517# needed for Ada95
20518TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20519
20520case $DFT_LWR_MODEL in
20521normal|debug|profile)
20522
20523if test "$GCC" = yes ; then
20524	case $cf_cv_system_name in #(
20525	OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*) 	#( vi
20526		LDFLAGS_STATIC=
20527		LDFLAGS_SHARED=
20528		;;
20529    *) 	#( normally, except when broken
20530        LDFLAGS_STATIC=-static
20531        LDFLAGS_SHARED=-dynamic
20532        ;;
20533    esac
20534else
20535	case $cf_cv_system_name in #(
20536	aix[4-7]*) 	#( from ld manpage
20537		LDFLAGS_STATIC=-bstatic
20538		LDFLAGS_SHARED=-bdynamic
20539		;;
20540	hpux*)		#( from ld manpage for hpux10.20, hpux11.11
20541		# We could also use just "archive" and "shared".
20542		LDFLAGS_STATIC=-Wl,-a,archive_shared
20543		LDFLAGS_SHARED=-Wl,-a,shared_archive
20544		;;
20545	irix*)		#( from ld manpage IRIX64
20546		LDFLAGS_STATIC=-Bstatic
20547		LDFLAGS_SHARED=-Bdynamic
20548		;;
20549	osf[45]*)	#( from ld manpage osf4.0d, osf5.1
20550		# alternative "-oldstyle_liblookup" (not in cc manpage)
20551		LDFLAGS_STATIC=-noso
20552		LDFLAGS_SHARED=-so_archive
20553		;;
20554	solaris2*)
20555		LDFLAGS_STATIC=-Bstatic
20556		LDFLAGS_SHARED=-Bdynamic
20557		;;
20558	esac
20559fi
20560
20561if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20562then
20563	echo "$as_me:20563: checking if linker supports switching between static/dynamic" >&5
20564echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20565
20566	rm -f libconftest.a
20567	cat >conftest.$ac_ext <<EOF
20568#line 20568 "configure"
20569#include <stdio.h>
20570int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20571EOF
20572	if { (eval echo "$as_me:20572: \"$ac_compile\"") >&5
20573  (eval $ac_compile) 2>&5
20574  ac_status=$?
20575  echo "$as_me:20575: \$? = $ac_status" >&5
20576  (exit $ac_status); } ; then
20577		( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20578		( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20579	fi
20580	rm -f conftest.*
20581
20582	cf_save_LIBS="$LIBS"
20583
20584	LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20585	cat >conftest.$ac_ext <<_ACEOF
20586#line 20586 "configure"
20587#include "confdefs.h"
20588
20589#line 20589 "configure"
20590#include <stdio.h>
20591int cf_ldflags_static(FILE *fp);
20592
20593int
20594main ()
20595{
20596
20597	return cf_ldflags_static(stdin);
20598
20599  ;
20600  return 0;
20601}
20602_ACEOF
20603rm -f conftest.$ac_objext conftest$ac_exeext
20604if { (eval echo "$as_me:20604: \"$ac_link\"") >&5
20605  (eval $ac_link) 2>&5
20606  ac_status=$?
20607  echo "$as_me:20607: \$? = $ac_status" >&5
20608  (exit $ac_status); } &&
20609         { ac_try='test -s conftest$ac_exeext'
20610  { (eval echo "$as_me:20610: \"$ac_try\"") >&5
20611  (eval $ac_try) 2>&5
20612  ac_status=$?
20613  echo "$as_me:20613: \$? = $ac_status" >&5
20614  (exit $ac_status); }; }; then
20615
20616	# some linkers simply ignore the -dynamic
20617	case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20618	*static*) # (vi
20619		cf_ldflags_static=no
20620		;;
20621	*)
20622		cf_ldflags_static=yes
20623		;;
20624	esac
20625
20626else
20627  echo "$as_me: failed program was:" >&5
20628cat conftest.$ac_ext >&5
20629cf_ldflags_static=no
20630fi
20631rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20632
20633	rm -f libconftest.*
20634	LIBS="$cf_save_LIBS"
20635
20636	echo "$as_me:20636: result: $cf_ldflags_static" >&5
20637echo "${ECHO_T}$cf_ldflags_static" >&6
20638
20639	if test $cf_ldflags_static != yes
20640	then
20641		LDFLAGS_STATIC=
20642		LDFLAGS_SHARED=
20643	fi
20644else
20645	LDFLAGS_STATIC=
20646	LDFLAGS_SHARED=
20647fi
20648
20649	;;
20650esac
20651
20652echo "$as_me:20652: checking where we will install curses.h" >&5
20653echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20654
20655includesubdir=
20656if test "$with_overwrite" = no && \
20657 ( test "x$includedir" = 'x${prefix}/include' || \
20658   test "x$includedir" = "x${prefix}/include" )
20659then
20660	includesubdir="/ncurses${LIB_SUFFIX}"
20661fi
20662echo "$as_me:20662: result: ${includedir}${includesubdir}" >&5
20663echo "${ECHO_T}${includedir}${includesubdir}" >&6
20664
20665### Resolve a conflict between normal and wide-curses by forcing applications
20666### that will need libutf8 to add it to their configure script.
20667if test "$with_overwrite" != no ; then
20668if test "$NCURSES_LIBUTF8" = 1 ; then
20669	NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20670	{ echo "$as_me:20670: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20671echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20672fi
20673fi
20674WITH_OVERWRITE=$with_overwrite
20675
20676# used to separate tack out of the tree
20677NCURSES_TREE=
20678
20679### predefined stuff for the test programs
20680
20681cat >>confdefs.h <<\EOF
20682#define HAVE_SLK_COLOR 1
20683EOF
20684
20685### Construct the list of subdirectories for which we'll customize makefiles
20686### with the appropriate compile-rules.
20687
20688echo "$as_me:20688: checking for src modules" >&5
20689echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20690
20691# dependencies and linker-arguments for test-programs
20692TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20693TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20694if test "$DFT_LWR_MODEL" = "libtool"; then
20695	TEST_ARGS="${TEST_DEPS}"
20696	TEST_ARG2="${TEST_DEP2}"
20697else
20698	TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20699	TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20700fi
20701
20702PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20703cf_cv_src_modules=
20704for cf_dir in $modules_to_build
20705do
20706	if test -f $srcdir/$cf_dir/modules; then
20707
20708		# We may/may not have tack in the distribution, though the
20709		# makefile is.
20710		if test $cf_dir = tack ; then
20711			if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20712				continue
20713			fi
20714		fi
20715
20716		if test -z "$cf_cv_src_modules"; then
20717			cf_cv_src_modules=$cf_dir
20718		else
20719			cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20720		fi
20721
20722		# Make the ncurses_cfg.h file record the library interface files as
20723		# well.  These are header files that are the same name as their
20724		# directory.  Ncurses is the only library that does not follow
20725		# that pattern.
20726		if test $cf_dir = tack ; then
20727			continue
20728		elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20729
20730cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20731
20732			cat >>confdefs.h <<EOF
20733#define HAVE_${cf_have_include}_H 1
20734EOF
20735
20736			cat >>confdefs.h <<EOF
20737#define HAVE_LIB${cf_have_include} 1
20738EOF
20739
20740			TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20741			TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20742			if test "$DFT_LWR_MODEL" = "libtool"; then
20743				TEST_ARGS="${TEST_DEPS}"
20744				TEST_ARG2="${TEST_DEP2}"
20745			else
20746				TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20747				TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20748			fi
20749			PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20750		fi
20751	fi
20752done
20753echo "$as_me:20753: result: $cf_cv_src_modules" >&5
20754echo "${ECHO_T}$cf_cv_src_modules" >&6
20755
20756TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20757TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20758
20759SRC_SUBDIRS=
20760if test "x$cf_with_manpages" != xno ; then
20761	SRC_SUBDIRS="$SRC_SUBDIRS man"
20762fi
20763SRC_SUBDIRS="$SRC_SUBDIRS include"
20764for cf_dir in $cf_cv_src_modules
20765do
20766	SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20767done
20768if test "x$cf_with_tests" != "xno" ; then
20769	SRC_SUBDIRS="$SRC_SUBDIRS test"
20770fi
20771if test "x$cf_with_db_install" = xyes; then
20772	test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20773fi
20774if test "$cf_with_cxx_binding" != no; then
20775	PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20776	SRC_SUBDIRS="$SRC_SUBDIRS c++"
20777fi
20778
20779test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20780test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20781
20782ADA_SUBDIRS=
20783if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20784	SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20785	ADA_SUBDIRS="gen src"
20786	if test "x$cf_with_tests" != "xno" ; then
20787		ADA_SUBDIRS="$ADA_SUBDIRS samples"
20788	fi
20789fi
20790
20791SUB_MAKEFILES=
20792for cf_dir in $SRC_SUBDIRS
20793do
20794	SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20795done
20796
20797if test -n "$ADA_SUBDIRS"; then
20798	for cf_dir in $ADA_SUBDIRS
20799	do
20800		SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20801	done
20802
20803fi
20804
20805if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20806   SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20807   SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20808fi
20809
20810DIRS_TO_MAKE="lib"
20811for cf_item in $cf_list_models
20812do
20813
20814	case $cf_item in
20815	libtool) cf_subdir='obj_lo'  ;;
20816	normal)  cf_subdir='objects' ;;
20817	debug)   cf_subdir='obj_g' ;;
20818	profile) cf_subdir='obj_p' ;;
20819	shared)
20820		case $cf_cv_system_name in #(vi
20821		cygwin|msys) #(vi
20822			cf_subdir='objects' ;;
20823		*)
20824			cf_subdir='obj_s' ;;
20825		esac
20826	esac
20827
20828	for cf_item2 in $DIRS_TO_MAKE
20829	do
20830		test $cf_item2 = $cf_subdir && break
20831	done
20832	test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20833done
20834for cf_dir in $DIRS_TO_MAKE
20835do
20836	test ! -d $cf_dir && mkdir $cf_dir
20837done
20838
20839# symbols that differ when compiling Ada95 by itself.
20840NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20841
20842# values to use as strings
20843
20844cat >>confdefs.h <<EOF
20845#define NCURSES_PATHSEP '$PATH_SEPARATOR'
20846EOF
20847
20848cat >>confdefs.h <<EOF
20849#define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20850EOF
20851
20852### Now that we're done running tests, add the compiler-warnings, if any
20853
20854cf_fix_cppflags=no
20855cf_new_cflags=
20856cf_new_cppflags=
20857cf_new_extra_cppflags=
20858
20859for cf_add_cflags in $EXTRA_CFLAGS
20860do
20861case $cf_fix_cppflags in
20862no)
20863	case $cf_add_cflags in #(vi
20864	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20865		case $cf_add_cflags in
20866		-D*)
20867			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20868
20869			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20870				&& test -z "${cf_tst_cflags}" \
20871				&& cf_fix_cppflags=yes
20872
20873			if test $cf_fix_cppflags = yes ; then
20874				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20875				continue
20876			elif test "${cf_tst_cflags}" = "\"'" ; then
20877				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20878				continue
20879			fi
20880			;;
20881		esac
20882		case "$CPPFLAGS" in
20883		*$cf_add_cflags) #(vi
20884			;;
20885		*) #(vi
20886			case $cf_add_cflags in #(vi
20887			-D*)
20888				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20889
20890CPPFLAGS=`echo "$CPPFLAGS" | \
20891	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20892		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20893
20894				;;
20895			esac
20896			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20897			;;
20898		esac
20899		;;
20900	*)
20901		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20902		;;
20903	esac
20904	;;
20905yes)
20906	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20907
20908	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20909
20910	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20911		&& test -z "${cf_tst_cflags}" \
20912		&& cf_fix_cppflags=no
20913	;;
20914esac
20915done
20916
20917if test -n "$cf_new_cflags" ; then
20918
20919	CFLAGS="$CFLAGS $cf_new_cflags"
20920fi
20921
20922if test -n "$cf_new_cppflags" ; then
20923
20924	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20925fi
20926
20927if test -n "$cf_new_extra_cppflags" ; then
20928
20929	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20930fi
20931
20932### Define substitutions for header files to avoid name-pollution
20933
20934if test "x$cf_cv_have_tcgetattr" = xyes ; then
20935	HAVE_TCGETATTR=1
20936else
20937	HAVE_TCGETATTR=0
20938fi
20939
20940if test "x$ac_cv_header_termio_h" = xyes ; then
20941	HAVE_TERMIO_H=1
20942else
20943	HAVE_TERMIO_H=0
20944fi
20945
20946if test "x$ac_cv_header_termios_h" = xyes ; then
20947	HAVE_TERMIOS_H=1
20948else
20949	HAVE_TERMIOS_H=0
20950fi
20951
20952################################################################################
20953test "x$use_database" = xyes && \
20954SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20955
20956SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20957SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20958
20959if test "x$enable_pc_files" = xyes ; then \
20960SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20961MAKE_PC_FILES=
20962else
20963MAKE_PC_FILES="#"
20964fi
20965
20966# Extract the first word of "tic", so it can be a program name with args.
20967set dummy tic; ac_word=$2
20968echo "$as_me:20968: checking for $ac_word" >&5
20969echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20970if test "${ac_cv_path_TIC_PATH+set}" = set; then
20971  echo $ECHO_N "(cached) $ECHO_C" >&6
20972else
20973  case $TIC_PATH in
20974  [\\/]* | ?:[\\/]*)
20975  ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20976  ;;
20977  *)
20978  ac_save_IFS=$IFS; IFS=$ac_path_separator
20979ac_dummy="$PATH:/usr/local/ncurses/bin"
20980for ac_dir in $ac_dummy; do
20981  IFS=$ac_save_IFS
20982  test -z "$ac_dir" && ac_dir=.
20983  if $as_executable_p "$ac_dir/$ac_word"; then
20984   ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20985   echo "$as_me:20985: found $ac_dir/$ac_word" >&5
20986   break
20987fi
20988done
20989
20990  test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20991  ;;
20992esac
20993fi
20994TIC_PATH=$ac_cv_path_TIC_PATH
20995
20996if test -n "$TIC_PATH"; then
20997  echo "$as_me:20997: result: $TIC_PATH" >&5
20998echo "${ECHO_T}$TIC_PATH" >&6
20999else
21000  echo "$as_me:21000: result: no" >&5
21001echo "${ECHO_T}no" >&6
21002fi
21003
21004if test -n "$FALLBACK_LIST"
21005then
21006	if test "$TIC_PATH" = unknown
21007	then
21008		{ echo "$as_me:21008: WARNING: no tic program found for fallbacks" >&5
21009echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
21010	fi
21011fi
21012
21013if test "x$cf_with_tests" != xno ; then
21014	MAKE_TESTS=
21015else
21016	MAKE_TESTS="#"
21017fi
21018
21019ADAHTML_DIR=../../doc/html/ada
21020
21021# these could be configurable, but are not currently
21022PANEL_NAME=panel
21023MENU_NAME=menu
21024FORM_NAME=form
21025CXX_NAME=ncurses++
21026
21027# workaround for g++ versus Solaris (20131116)
21028case $cf_cv_system_name in #(vi
21029solaris2*) #(vi
21030	case "x$CPPFLAGS" in #(vi
21031	*-D_XOPEN_SOURCE_EXTENDED*)
21032		test -n "$verbose" && echo "	moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
21033
21034echo "${as_me:-configure}:21034: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
21035
21036		CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
21037		CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
21038		;;
21039	esac
21040	;;
21041esac
21042
21043# AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
21044case "x$NCURSES_OSPEED" in #(vi
21045*short*) #(vi
21046	cf_compatible=1
21047	;;
21048*)
21049	cf_compatible=0
21050	;;
21051esac
21052
21053cat >>confdefs.h <<EOF
21054#define NCURSES_OSPEED_COMPAT $cf_compatible
21055EOF
21056
21057SUB_SCRIPTS=
21058
21059ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_SCRIPTS $SUB_MAKEFILES Makefile"
21060ac_config_commands="$ac_config_commands default"
21061cat >confcache <<\_ACEOF
21062# This file is a shell script that caches the results of configure
21063# tests run on this system so they can be shared between configure
21064# scripts and configure runs, see configure's option --config-cache.
21065# It is not useful on other systems.  If it contains results you don't
21066# want to keep, you may remove or edit it.
21067#
21068# config.status only pays attention to the cache file if you give it
21069# the --recheck option to rerun configure.
21070#
21071# `ac_cv_env_foo' variables (set or unset) will be overriden when
21072# loading this file, other *unset* `ac_cv_foo' will be assigned the
21073# following values.
21074
21075_ACEOF
21076
21077# The following way of writing the cache mishandles newlines in values,
21078# but we know of no workaround that is simple, portable, and efficient.
21079# So, don't put newlines in cache variables' values.
21080# Ultrix sh set writes to stderr and can't be redirected directly,
21081# and sets the high bit in the cache file unless we assign to the vars.
21082{
21083  (set) 2>&1 |
21084    case `(ac_space=' '; set | grep ac_space) 2>&1` in
21085    *ac_space=\ *)
21086      # `set' does not quote correctly, so add quotes (double-quote
21087      # substitution turns \\\\ into \\, and sed turns \\ into \).
21088      sed -n \
21089        "s/'/'\\\\''/g;
21090    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21091      ;;
21092    *)
21093      # `set' quotes correctly as required by POSIX, so do not add quotes.
21094      sed -n \
21095        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
21096      ;;
21097    esac;
21098} |
21099  sed '
21100     t clear
21101     : clear
21102     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21103     t end
21104     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21105     : end' >>confcache
21106if cmp -s $cache_file confcache; then :; else
21107  if test -w $cache_file; then
21108    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21109    cat confcache >$cache_file
21110  else
21111    echo "not updating unwritable cache $cache_file"
21112  fi
21113fi
21114rm -f confcache
21115
21116test "x$prefix" = xNONE && prefix=$ac_default_prefix
21117# Let make expand exec_prefix.
21118test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21119
21120# VPATH may cause trouble with some makes, so we remove $(srcdir),
21121# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21122# trailing colons and then remove the whole line if VPATH becomes empty
21123# (actually we leave an empty line to preserve line numbers).
21124if test "x$srcdir" = x.; then
21125  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
21126s/:*\$(srcdir):*/:/;
21127s/:*\${srcdir}:*/:/;
21128s/:*@srcdir@:*/:/;
21129s/^\([^=]*=[ 	]*\):*/\1/;
21130s/:*$//;
21131s/^[^=]*=[ 	]*$//;
21132}'
21133fi
21134
21135DEFS=-DHAVE_CONFIG_H
21136
21137: ${CONFIG_STATUS=./config.status}
21138ac_clean_files_save=$ac_clean_files
21139ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21140{ echo "$as_me:21140: creating $CONFIG_STATUS" >&5
21141echo "$as_me: creating $CONFIG_STATUS" >&6;}
21142cat >$CONFIG_STATUS <<_ACEOF
21143#! $SHELL
21144# Generated automatically by configure.
21145# Run this file to recreate the current configuration.
21146# Compiler output produced by configure, useful for debugging
21147# configure, is in config.log if it exists.
21148
21149debug=false
21150SHELL=\${CONFIG_SHELL-$SHELL}
21151ac_cs_invocation="\$0 \$@"
21152
21153_ACEOF
21154
21155cat >>$CONFIG_STATUS <<\_ACEOF
21156# Be Bourne compatible
21157if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21158  emulate sh
21159  NULLCMD=:
21160elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21161  set -o posix
21162fi
21163
21164# Name of the executable.
21165as_me=`echo "$0" |sed 's,.*[\\/],,'`
21166
21167if expr a : '\(a\)' >/dev/null 2>&1; then
21168  as_expr=expr
21169else
21170  as_expr=false
21171fi
21172
21173rm -f conf$$ conf$$.exe conf$$.file
21174echo >conf$$.file
21175if ln -s conf$$.file conf$$ 2>/dev/null; then
21176  # We could just check for DJGPP; but this test a) works b) is more generic
21177  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21178  if test -f conf$$.exe; then
21179    # Don't use ln at all; we don't have any links
21180    as_ln_s='cp -p'
21181  else
21182    as_ln_s='ln -s'
21183  fi
21184elif ln conf$$.file conf$$ 2>/dev/null; then
21185  as_ln_s=ln
21186else
21187  as_ln_s='cp -p'
21188fi
21189rm -f conf$$ conf$$.exe conf$$.file
21190
21191as_executable_p="test -f"
21192
21193# Support unset when possible.
21194if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
21195  as_unset=unset
21196else
21197  as_unset=false
21198fi
21199
21200# NLS nuisances.
21201$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
21202$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
21203$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
21204$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
21205$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
21206$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
21207$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
21208$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
21209
21210# IFS
21211# We need space, tab and new line, in precisely that order.
21212as_nl='
21213'
21214IFS=" 	$as_nl"
21215
21216# CDPATH.
21217$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
21218
21219exec 6>&1
21220
21221_ACEOF
21222
21223# Files that config.status was made for.
21224if test -n "$ac_config_files"; then
21225  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21226fi
21227
21228if test -n "$ac_config_headers"; then
21229  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21230fi
21231
21232if test -n "$ac_config_links"; then
21233  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21234fi
21235
21236if test -n "$ac_config_commands"; then
21237  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21238fi
21239
21240cat >>$CONFIG_STATUS <<\EOF
21241
21242ac_cs_usage="\
21243\`$as_me' instantiates files from templates according to the
21244current configuration.
21245
21246Usage: $0 [OPTIONS] [FILE]...
21247
21248  -h, --help       print this help, then exit
21249  -V, --version    print version number, then exit
21250  -d, --debug      don't remove temporary files
21251      --recheck    update $as_me by reconfiguring in the same conditions
21252  --file=FILE[:TEMPLATE]
21253                   instantiate the configuration file FILE
21254  --header=FILE[:TEMPLATE]
21255                   instantiate the configuration header FILE
21256
21257Configuration files:
21258$config_files
21259
21260Configuration headers:
21261$config_headers
21262
21263Configuration commands:
21264$config_commands
21265
21266Report bugs to <dickey@invisible-island.net>."
21267EOF
21268
21269cat >>$CONFIG_STATUS <<EOF
21270ac_cs_version="\\
21271config.status
21272configured by $0, generated by GNU Autoconf 2.52.20121002,
21273  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21274
21275Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
21276Free Software Foundation, Inc.
21277This config.status script is free software; the Free Software Foundation
21278gives unlimited permission to copy, distribute and modify it."
21279srcdir=$srcdir
21280INSTALL="$INSTALL"
21281EOF
21282
21283cat >>$CONFIG_STATUS <<\EOF
21284# If no file are specified by the user, then we need to provide default
21285# value.  By we need to know if files were specified by the user.
21286ac_need_defaults=:
21287while test $# != 0
21288do
21289  case $1 in
21290  --*=*)
21291    ac_option=`expr "x$1" : 'x\([^=]*\)='`
21292    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
21293    shift
21294    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
21295    shift
21296    ;;
21297  -*);;
21298  *) # This is not an option, so the user has probably given explicit
21299     # arguments.
21300     ac_need_defaults=false;;
21301  esac
21302
21303  case $1 in
21304  # Handling of the options.
21305EOF
21306cat >>$CONFIG_STATUS <<EOF
21307  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21308    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
21309    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
21310EOF
21311cat >>$CONFIG_STATUS <<\EOF
21312  --version | --vers* | -V )
21313    echo "$ac_cs_version"; exit 0 ;;
21314  --he | --h)
21315    # Conflict between --help and --header
21316    { { echo "$as_me:21316: error: ambiguous option: $1
21317Try \`$0 --help' for more information." >&5
21318echo "$as_me: error: ambiguous option: $1
21319Try \`$0 --help' for more information." >&2;}
21320   { (exit 1); exit 1; }; };;
21321  --help | --hel | -h )
21322    echo "$ac_cs_usage"; exit 0 ;;
21323  --debug | --d* | -d )
21324    debug=: ;;
21325  --file | --fil | --fi | --f )
21326    shift
21327    CONFIG_FILES="$CONFIG_FILES $1"
21328    ac_need_defaults=false;;
21329  --header | --heade | --head | --hea )
21330    shift
21331    CONFIG_HEADERS="$CONFIG_HEADERS $1"
21332    ac_need_defaults=false;;
21333
21334  # This is an error.
21335  -*) { { echo "$as_me:21335: error: unrecognized option: $1
21336Try \`$0 --help' for more information." >&5
21337echo "$as_me: error: unrecognized option: $1
21338Try \`$0 --help' for more information." >&2;}
21339   { (exit 1); exit 1; }; } ;;
21340
21341  *) ac_config_targets="$ac_config_targets $1" ;;
21342
21343  esac
21344  shift
21345done
21346
21347exec 5>>config.log
21348cat >&5 << _ACEOF
21349
21350## ----------------------- ##
21351## Running config.status.  ##
21352## ----------------------- ##
21353
21354This file was extended by $as_me 2.52.20121002, executed with
21355  CONFIG_FILES    = $CONFIG_FILES
21356  CONFIG_HEADERS  = $CONFIG_HEADERS
21357  CONFIG_LINKS    = $CONFIG_LINKS
21358  CONFIG_COMMANDS = $CONFIG_COMMANDS
21359  > $ac_cs_invocation
21360on `(hostname || uname -n) 2>/dev/null | sed 1q`
21361
21362_ACEOF
21363EOF
21364
21365cat >>$CONFIG_STATUS <<EOF
21366#
21367# INIT-COMMANDS section.
21368#
21369
21370### Special initialization commands, used to pass information from the
21371### configuration-run into config.status
21372
21373AWK="$AWK"
21374DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
21375DFT_LWR_MODEL="$DFT_LWR_MODEL"
21376ECHO_LD="$ECHO_LD"
21377LDCONFIG="$LDCONFIG"
21378LIBTOOL_VERSION="$LIBTOOL_VERSION"
21379LIB_NAME="$LIB_NAME"
21380LIB_PREFIX="$LIB_PREFIX"
21381LIB_SUBSETS="$LIB_SUBSETS"
21382LIB_SUFFIX="$LIB_SUFFIX"
21383LIB_TRACING="$LIB_TRACING"
21384LN_S="$LN_S"
21385MAKE_TERMINFO="$MAKE_TERMINFO"
21386NCURSES_MAJOR="$NCURSES_MAJOR"
21387NCURSES_MINOR="$NCURSES_MINOR"
21388NCURSES_OSPEED="$NCURSES_OSPEED"
21389NCURSES_PATCH="$NCURSES_PATCH"
21390SRC_SUBDIRS="$SRC_SUBDIRS"
21391TERMINFO="$TERMINFO"
21392TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
21393TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
21394TICS_NAME="$TICS_NAME"
21395TIC_PATH="$TIC_PATH"
21396TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
21397TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
21398TINFO_NAME="$TINFO_NAME"
21399TINFO_SUFFIX="$TINFO_SUFFIX"
21400USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
21401WITH_CURSES_H="$with_curses_h"
21402WITH_ECHO="${enable_echo:=yes}"
21403WITH_OVERWRITE="$with_overwrite"
21404cf_LIST_MODELS="$cf_list_models"
21405cf_cv_abi_version="$cf_cv_abi_version"
21406cf_cv_do_relink="$cf_cv_do_relink"
21407cf_cv_do_symlinks="$cf_cv_do_symlinks"
21408cf_cv_enable_lp64="$cf_cv_enable_lp64"
21409cf_cv_enable_opaque="$cf_cv_enable_opaque"
21410cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
21411cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
21412cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
21413cf_cv_rel_version="$cf_cv_rel_version"
21414cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
21415cf_cv_shared_soname='$cf_cv_shared_soname'
21416cf_cv_shlib_version="$cf_cv_shlib_version"
21417cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
21418cf_cv_system_name="$cf_cv_system_name"
21419cf_cv_term_driver="$with_term_driver"
21420cf_with_ada="$cf_with_ada"
21421cf_with_cxx_binding="$cf_with_cxx_binding"
21422cf_with_db_install="$cf_with_db_install"
21423cf_with_manpages="$cf_with_manpages"
21424cf_with_tests="$cf_with_tests"
21425with_shared_cxx="$with_shared_cxx"
21426host="$host"
21427target="$target"
21428
21429EOF
21430
21431cat >>$CONFIG_STATUS <<\EOF
21432for ac_config_target in $ac_config_targets
21433do
21434  case "$ac_config_target" in
21435  # Handling of arguments.
21436  "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
21437  "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
21438  "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
21439  "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
21440  "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
21441  "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
21442  "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
21443  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21444  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21445  "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
21446  *) { { echo "$as_me:21446: error: invalid argument: $ac_config_target" >&5
21447echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21448   { (exit 1); exit 1; }; };;
21449  esac
21450done
21451
21452# If the user did not use the arguments to specify the items to instantiate,
21453# then the envvar interface is used.  Set only those that are not.
21454# We use the long form for the default assignment because of an extremely
21455# bizarre bug on SunOS 4.1.3.
21456if $ac_need_defaults; then
21457  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21458  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21459  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21460fi
21461
21462# Create a temporary directory, and hook for its removal unless debugging.
21463$debug ||
21464{
21465  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21466  trap '{ (exit 1); exit 1; }' 1 2 13 15
21467}
21468
21469# Create a (secure) tmp directory for tmp files.
21470: ${TMPDIR=/tmp}
21471{
21472  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21473  test -n "$tmp" && test -d "$tmp"
21474}  ||
21475{
21476  tmp=$TMPDIR/cs$$-$RANDOM
21477  (umask 077 && mkdir $tmp)
21478} ||
21479{
21480   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21481   { (exit 1); exit 1; }
21482}
21483
21484EOF
21485
21486cat >>$CONFIG_STATUS <<EOF
21487
21488#
21489# CONFIG_FILES section.
21490#
21491
21492# No need to generate the scripts if there are no CONFIG_FILES.
21493# This happens for instance when ./config.status config.h
21494if test -n "\$CONFIG_FILES"; then
21495  # Protect against being on the right side of a sed subst in config.status.
21496  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21497   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21498s,@SHELL@,$SHELL,;t t
21499s,@exec_prefix@,$exec_prefix,;t t
21500s,@prefix@,$prefix,;t t
21501s,@program_transform_name@,$program_transform_name,;t t
21502s,@bindir@,$bindir,;t t
21503s,@sbindir@,$sbindir,;t t
21504s,@libexecdir@,$libexecdir,;t t
21505s,@datarootdir@,$datarootdir,;t t
21506s,@datadir@,$datadir,;t t
21507s,@sysconfdir@,$sysconfdir,;t t
21508s,@sharedstatedir@,$sharedstatedir,;t t
21509s,@localstatedir@,$localstatedir,;t t
21510s,@libdir@,$libdir,;t t
21511s,@includedir@,$includedir,;t t
21512s,@oldincludedir@,$oldincludedir,;t t
21513s,@infodir@,$infodir,;t t
21514s,@mandir@,$mandir,;t t
21515s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21516s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21517s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21518s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21519s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21520s,@build_alias@,$build_alias,;t t
21521s,@host_alias@,$host_alias,;t t
21522s,@target_alias@,$target_alias,;t t
21523s,@ECHO_C@,$ECHO_C,;t t
21524s,@ECHO_N@,$ECHO_N,;t t
21525s,@ECHO_T@,$ECHO_T,;t t
21526s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21527s,@DEFS@,$DEFS,;t t
21528s,@LIBS@,$LIBS,;t t
21529s,@top_builddir@,$top_builddir,;t t
21530s,@EGREP@,$EGREP,;t t
21531s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
21532s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
21533s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
21534s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21535s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21536s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
21537s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
21538s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
21539s,@build@,$build,;t t
21540s,@build_cpu@,$build_cpu,;t t
21541s,@build_vendor@,$build_vendor,;t t
21542s,@build_os@,$build_os,;t t
21543s,@host@,$host,;t t
21544s,@host_cpu@,$host_cpu,;t t
21545s,@host_vendor@,$host_vendor,;t t
21546s,@host_os@,$host_os,;t t
21547s,@target@,$target,;t t
21548s,@target_cpu@,$target_cpu,;t t
21549s,@target_vendor@,$target_vendor,;t t
21550s,@target_os@,$target_os,;t t
21551s,@CC@,$CC,;t t
21552s,@CFLAGS@,$CFLAGS,;t t
21553s,@LDFLAGS@,$LDFLAGS,;t t
21554s,@CPPFLAGS@,$CPPFLAGS,;t t
21555s,@ac_ct_CC@,$ac_ct_CC,;t t
21556s,@EXEEXT@,$EXEEXT,;t t
21557s,@OBJEXT@,$OBJEXT,;t t
21558s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21559s,@CPP@,$CPP,;t t
21560s,@LDCONFIG@,$LDCONFIG,;t t
21561s,@CXX@,$CXX,;t t
21562s,@CXXFLAGS@,$CXXFLAGS,;t t
21563s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21564s,@AWK@,$AWK,;t t
21565s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21566s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21567s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21568s,@LINT@,$LINT,;t t
21569s,@LINT_OPTS@,$LINT_OPTS,;t t
21570s,@LN_S@,$LN_S,;t t
21571s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21572s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21573s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21574s,@SET_MAKE@,$SET_MAKE,;t t
21575s,@CTAGS@,$CTAGS,;t t
21576s,@ETAGS@,$ETAGS,;t t
21577s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21578s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21579s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21580s,@RANLIB@,$RANLIB,;t t
21581s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21582s,@LD@,$LD,;t t
21583s,@ac_ct_LD@,$ac_ct_LD,;t t
21584s,@AR@,$AR,;t t
21585s,@ac_ct_AR@,$ac_ct_AR,;t t
21586s,@NM@,$NM,;t t
21587s,@ac_ct_NM@,$ac_ct_NM,;t t
21588s,@ARFLAGS@,$ARFLAGS,;t t
21589s,@DESTDIR@,$DESTDIR,;t t
21590s,@BUILD_CC@,$BUILD_CC,;t t
21591s,@BUILD_CPP@,$BUILD_CPP,;t t
21592s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21593s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21594s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21595s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21596s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21597s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21598s,@cf_list_models@,$cf_list_models,;t t
21599s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21600s,@LIBTOOL@,$LIBTOOL,;t t
21601s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
21602s,@LT_UNDEF@,$LT_UNDEF,;t t
21603s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21604s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21605s,@LIB_CREATE@,$LIB_CREATE,;t t
21606s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21607s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21608s,@LIB_PREP@,$LIB_PREP,;t t
21609s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21610s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21611s,@LIB_LINK@,$LIB_LINK,;t t
21612s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21613s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21614s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21615s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21616s,@TICS_NAME@,$TICS_NAME,;t t
21617s,@TINFO_NAME@,$TINFO_NAME,;t t
21618s,@LIB_NAME@,$LIB_NAME,;t t
21619s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21620s,@CC_G_OPT@,$CC_G_OPT,;t t
21621s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21622s,@LD_MODEL@,$LD_MODEL,;t t
21623s,@shlibdir@,$shlibdir,;t t
21624s,@MAKE_DLLS@,$MAKE_DLLS,;t t
21625s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21626s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21627s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21628s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21629s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
21630s,@LINK_PROGS@,$LINK_PROGS,;t t
21631s,@LINK_TESTS@,$LINK_TESTS,;t t
21632s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21633s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21634s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21635s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21636s,@RPATH_LIST@,$RPATH_LIST,;t t
21637s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21638s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21639s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
21640s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21641s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21642s,@XTERM_KBS@,$XTERM_KBS,;t t
21643s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21644s,@TERMINFO@,$TERMINFO,;t t
21645s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21646s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21647s,@TERMPATH@,$TERMPATH,;t t
21648s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
21649s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21650s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21651s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21652s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21653s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21654s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21655s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21656s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21657s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21658s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21659s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21660s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21661s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21662s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21663s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21664s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21665s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21666s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21667s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21668s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21669s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21670s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21671s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21672s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21673s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21674s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21675s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21676s,@PTHREAD@,$PTHREAD,;t t
21677s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21678s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21679s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21680s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21681s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21682s,@ECHO_LT@,$ECHO_LT,;t t
21683s,@ECHO_LD@,$ECHO_LD,;t t
21684s,@RULE_CC@,$RULE_CC,;t t
21685s,@SHOW_CC@,$SHOW_CC,;t t
21686s,@ECHO_CC@,$ECHO_CC,;t t
21687s,@ECHO_LINK@,$ECHO_LINK,;t t
21688s,@ADAFLAGS@,$ADAFLAGS,;t t
21689s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21690s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21691s,@ADA_TRACE@,$ADA_TRACE,;t t
21692s,@MATH_LIB@,$MATH_LIB,;t t
21693s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21694s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21695s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21696s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21697s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21698s,@TEST_LIBS@,$TEST_LIBS,;t t
21699s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21700s,@CXXCPP@,$CXXCPP,;t t
21701s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21702s,@CXX_AR@,$CXX_AR,;t t
21703s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21704s,@CXXLIBS@,$CXXLIBS,;t t
21705s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21706s,@gnat_exists@,$gnat_exists,;t t
21707s,@M4_exists@,$M4_exists,;t t
21708s,@cf_ada_make@,$cf_ada_make,;t t
21709s,@cf_compile_generics@,$cf_compile_generics,;t t
21710s,@cf_generic_objects@,$cf_generic_objects,;t t
21711s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21712s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21713s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21714s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21715s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21716s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21717s,@cf_ada_package@,$cf_ada_package,;t t
21718s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21719s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21720s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21721s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21722s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21723s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21724s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21725s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21726s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21727s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21728s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21729s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21730s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21731s,@TICS_LIBS@,$TICS_LIBS,;t t
21732s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21733s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21734s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21735s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21736s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21737s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21738s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21739s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21740s,@includesubdir@,$includesubdir,;t t
21741s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21742s,@TICS_LIST@,$TICS_LIST,;t t
21743s,@TINFO_LIST@,$TINFO_LIST,;t t
21744s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21745s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21746s,@TEST_ARGS@,$TEST_ARGS,;t t
21747s,@TEST_DEPS@,$TEST_DEPS,;t t
21748s,@TEST_ARG2@,$TEST_ARG2,;t t
21749s,@TEST_DEP2@,$TEST_DEP2,;t t
21750s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21751s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21752s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21753s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21754s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21755s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21756s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21757s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21758s,@cross_compiling@,$cross_compiling,;t t
21759s,@TIC_PATH@,$TIC_PATH,;t t
21760s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21761s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21762s,@PANEL_NAME@,$PANEL_NAME,;t t
21763s,@MENU_NAME@,$MENU_NAME,;t t
21764s,@FORM_NAME@,$FORM_NAME,;t t
21765s,@CXX_NAME@,$CXX_NAME,;t t
21766CEOF
21767
21768EOF
21769
21770  cat >>$CONFIG_STATUS <<\EOF
21771  # Split the substitutions into bite-sized pieces for seds with
21772  # small command number limits, like on Digital OSF/1 and HP-UX.
21773  ac_max_sed_lines=48
21774  ac_sed_frag=1 # Number of current file.
21775  ac_beg=1 # First line for current file.
21776  ac_end=$ac_max_sed_lines # Line after last line for current file.
21777  ac_more_lines=:
21778  ac_sed_cmds=
21779  while $ac_more_lines; do
21780    if test $ac_beg -gt 1; then
21781      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21782    else
21783      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21784    fi
21785    if test ! -s $tmp/subs.frag; then
21786      ac_more_lines=false
21787    else
21788      # The purpose of the label and of the branching condition is to
21789      # speed up the sed processing (if there are no `@' at all, there
21790      # is no need to browse any of the substitutions).
21791      # These are the two extra sed commands mentioned above.
21792      (echo ':t
21793  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21794      if test -z "$ac_sed_cmds"; then
21795  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21796      else
21797  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21798      fi
21799      ac_sed_frag=`expr $ac_sed_frag + 1`
21800      ac_beg=$ac_end
21801      ac_end=`expr $ac_end + $ac_max_sed_lines`
21802    fi
21803  done
21804  if test -z "$ac_sed_cmds"; then
21805    ac_sed_cmds=cat
21806  fi
21807fi # test -n "$CONFIG_FILES"
21808
21809EOF
21810cat >>$CONFIG_STATUS <<\EOF
21811for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21812  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21813  case $ac_file in
21814  - | *:- | *:-:* ) # input from stdin
21815        cat >$tmp/stdin
21816        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21817        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21818  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21819        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21820  * )   ac_file_in=$ac_file.in ;;
21821  esac
21822
21823  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21824  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21825         X"$ac_file" : 'X\(//\)[^/]' \| \
21826         X"$ac_file" : 'X\(//\)$' \| \
21827         X"$ac_file" : 'X\(/\)' \| \
21828         .     : '\(.\)' 2>/dev/null ||
21829echo X"$ac_file" |
21830    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21831  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21832  	  /^X\(\/\/\)$/{ s//\1/; q; }
21833  	  /^X\(\/\).*/{ s//\1/; q; }
21834  	  s/.*/./; q'`
21835  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21836    { case "$ac_dir" in
21837  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21838  *)                      as_incr_dir=.;;
21839esac
21840as_dummy="$ac_dir"
21841for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21842  case $as_mkdir_dir in
21843    # Skip DOS drivespec
21844    ?:) as_incr_dir=$as_mkdir_dir ;;
21845    *)
21846      as_incr_dir=$as_incr_dir/$as_mkdir_dir
21847      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21848    ;;
21849  esac
21850done; }
21851
21852    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21853    # A "../" for each directory in $ac_dir_suffix.
21854    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21855  else
21856    ac_dir_suffix= ac_dots=
21857  fi
21858
21859  case $srcdir in
21860  .)  ac_srcdir=.
21861      if test -z "$ac_dots"; then
21862         ac_top_srcdir=.
21863      else
21864         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21865      fi ;;
21866  [\\/]* | ?:[\\/]* )
21867      ac_srcdir=$srcdir$ac_dir_suffix;
21868      ac_top_srcdir=$srcdir ;;
21869  *) # Relative path.
21870    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21871    ac_top_srcdir=$ac_dots$srcdir ;;
21872  esac
21873
21874  case $INSTALL in
21875  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21876  *) ac_INSTALL=$ac_dots$INSTALL ;;
21877  esac
21878
21879  if test x"$ac_file" != x-; then
21880    { echo "$as_me:21880: creating $ac_file" >&5
21881echo "$as_me: creating $ac_file" >&6;}
21882    rm -f "$ac_file"
21883  fi
21884  # Let's still pretend it is `configure' which instantiates (i.e., don't
21885  # use $as_me), people would be surprised to read:
21886  #    /* config.h.  Generated automatically by config.status.  */
21887  configure_input="Generated automatically from `echo $ac_file_in |
21888                                                 sed 's,.*/,,'` by configure."
21889
21890  # First look for the input files in the build tree, otherwise in the
21891  # src tree.
21892  ac_file_inputs=`IFS=:
21893    for f in $ac_file_in; do
21894      case $f in
21895      -) echo $tmp/stdin ;;
21896      [\\/$]*)
21897         # Absolute (can't be DOS-style, as IFS=:)
21898         test -f "$f" || { { echo "$as_me:21898: error: cannot find input file: $f" >&5
21899echo "$as_me: error: cannot find input file: $f" >&2;}
21900   { (exit 1); exit 1; }; }
21901         echo $f;;
21902      *) # Relative
21903         if test -f "$f"; then
21904           # Build tree
21905           echo $f
21906         elif test -f "$srcdir/$f"; then
21907           # Source tree
21908           echo $srcdir/$f
21909         else
21910           # /dev/null tree
21911           { { echo "$as_me:21911: error: cannot find input file: $f" >&5
21912echo "$as_me: error: cannot find input file: $f" >&2;}
21913   { (exit 1); exit 1; }; }
21914         fi;;
21915      esac
21916    done` || { (exit 1); exit 1; }
21917EOF
21918cat >>$CONFIG_STATUS <<\EOF
21919  ac_warn_datarootdir=no
21920  if test x"$ac_file" != x-; then
21921    for ac_item in $ac_file_inputs
21922    do
21923      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21924      if test -n "$ac_seen"; then
21925        ac_used=`grep '@datarootdir@' $ac_item`
21926        if test -z "$ac_used"; then
21927          { echo "$as_me:21927: WARNING: datarootdir was used implicitly but not set:
21928$ac_seen" >&5
21929echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21930$ac_seen" >&2;}
21931          ac_warn_datarootdir=yes
21932        fi
21933      fi
21934      ac_seen=`grep '${datarootdir}' $ac_item`
21935      if test -n "$ac_seen"; then
21936        { echo "$as_me:21936: WARNING: datarootdir was used explicitly but not set:
21937$ac_seen" >&5
21938echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21939$ac_seen" >&2;}
21940        ac_warn_datarootdir=yes
21941      fi
21942    done
21943  fi
21944
21945if test "x$ac_warn_datarootdir" = xyes; then
21946  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21947fi
21948
21949EOF
21950cat >>$CONFIG_STATUS <<EOF
21951  sed "$ac_vpsub
21952$extrasub
21953EOF
21954cat >>$CONFIG_STATUS <<\EOF
21955:t
21956/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21957s,@configure_input@,$configure_input,;t t
21958s,@srcdir@,$ac_srcdir,;t t
21959s,@top_srcdir@,$ac_top_srcdir,;t t
21960s,@INSTALL@,$ac_INSTALL,;t t
21961" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21962  rm -f $tmp/stdin
21963  if test x"$ac_file" != x-; then
21964    cp $tmp/out $ac_file
21965
21966    for ac_name in prefix exec_prefix datarootdir
21967    do
21968        ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21969        if test -n "$ac_seen"; then
21970            ac_init=`egrep '[ 	]*'$ac_name'[ 	]*=' $ac_file`
21971            if test -z "$ac_init"; then
21972              ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21973              { echo "$as_me:21973: WARNING: Variable $ac_name is used but was not set:
21974$ac_seen" >&5
21975echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21976$ac_seen" >&2;}
21977            fi
21978        fi
21979    done
21980    egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21981    egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21982    if test -s $tmp/out; then
21983      ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21984      { echo "$as_me:21984: WARNING: Some variables may not be substituted:
21985$ac_seen" >&5
21986echo "$as_me: WARNING: Some variables may not be substituted:
21987$ac_seen" >&2;}
21988    fi
21989  else
21990    cat $tmp/out
21991  fi
21992  rm -f $tmp/out
21993
21994done
21995EOF
21996cat >>$CONFIG_STATUS <<\EOF
21997
21998#
21999# CONFIG_HEADER section.
22000#
22001
22002# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22003# NAME is the cpp macro being defined and VALUE is the value it is being given.
22004#
22005# ac_d sets the value in "#define NAME VALUE" lines.
22006ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
22007ac_dB='[ 	].*$,\1#\2'
22008ac_dC=' '
22009ac_dD=',;t'
22010# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22011ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
22012ac_iB='\([ 	]\),\1#\2define\3'
22013ac_iC=' '
22014ac_iD='\4,;t'
22015# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22016ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
22017ac_uB='$,\1#\2define\3'
22018ac_uC=' '
22019ac_uD=',;t'
22020
22021for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22022  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22023  case $ac_file in
22024  - | *:- | *:-:* ) # input from stdin
22025        cat >$tmp/stdin
22026        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22027        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22028  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22029        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22030  * )   ac_file_in=$ac_file.in ;;
22031  esac
22032
22033  test x"$ac_file" != x- && { echo "$as_me:22033: creating $ac_file" >&5
22034echo "$as_me: creating $ac_file" >&6;}
22035
22036  # First look for the input files in the build tree, otherwise in the
22037  # src tree.
22038  ac_file_inputs=`IFS=:
22039    for f in $ac_file_in; do
22040      case $f in
22041      -) echo $tmp/stdin ;;
22042      [\\/$]*)
22043         # Absolute (can't be DOS-style, as IFS=:)
22044         test -f "$f" || { { echo "$as_me:22044: error: cannot find input file: $f" >&5
22045echo "$as_me: error: cannot find input file: $f" >&2;}
22046   { (exit 1); exit 1; }; }
22047         echo $f;;
22048      *) # Relative
22049         if test -f "$f"; then
22050           # Build tree
22051           echo $f
22052         elif test -f "$srcdir/$f"; then
22053           # Source tree
22054           echo $srcdir/$f
22055         else
22056           # /dev/null tree
22057           { { echo "$as_me:22057: error: cannot find input file: $f" >&5
22058echo "$as_me: error: cannot find input file: $f" >&2;}
22059   { (exit 1); exit 1; }; }
22060         fi;;
22061      esac
22062    done` || { (exit 1); exit 1; }
22063  # Remove the trailing spaces.
22064  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
22065
22066EOF
22067
22068# Transform confdefs.h into a list of #define's.  We won't use it as a sed
22069# script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
22070# be either 'cat' or 'sort'.
22071cat confdefs.h | uniq >conftest.vals
22072
22073# Break up conftest.vals because some shells have a limit on
22074# the size of here documents, and old seds have small limits too.
22075
22076rm -f conftest.tail
22077echo '  rm -f conftest.frag' >> $CONFIG_STATUS
22078while grep . conftest.vals >/dev/null
22079do
22080  # Write chunks of a limited-size here document to conftest.frag.
22081  echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
22082  sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
22083  echo 'CEOF' >> $CONFIG_STATUS
22084  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22085  rm -f conftest.vals
22086  mv conftest.tail conftest.vals
22087done
22088rm -f conftest.vals
22089
22090# Run sed to substitute the contents of conftest.frag into $tmp/in at the
22091# marker @DEFS@.
22092echo '  cat >> conftest.edit <<CEOF
22093/@DEFS@/r conftest.frag
22094/@DEFS@/d
22095CEOF
22096sed -f conftest.edit $tmp/in > $tmp/out
22097rm -f $tmp/in
22098mv $tmp/out $tmp/in
22099rm -f conftest.edit conftest.frag
22100' >> $CONFIG_STATUS
22101
22102cat >>$CONFIG_STATUS <<\EOF
22103  # Let's still pretend it is `configure' which instantiates (i.e., don't
22104  # use $as_me), people would be surprised to read:
22105  #    /* config.h.  Generated automatically by config.status.  */
22106  if test x"$ac_file" = x-; then
22107    echo "/* Generated automatically by configure.  */" >$tmp/config.h
22108  else
22109    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
22110  fi
22111  cat $tmp/in >>$tmp/config.h
22112  rm -f $tmp/in
22113  if test x"$ac_file" != x-; then
22114    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
22115      { echo "$as_me:22115: $ac_file is unchanged" >&5
22116echo "$as_me: $ac_file is unchanged" >&6;}
22117    else
22118      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22119         X"$ac_file" : 'X\(//\)[^/]' \| \
22120         X"$ac_file" : 'X\(//\)$' \| \
22121         X"$ac_file" : 'X\(/\)' \| \
22122         .     : '\(.\)' 2>/dev/null ||
22123echo X"$ac_file" |
22124    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22125  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22126  	  /^X\(\/\/\)$/{ s//\1/; q; }
22127  	  /^X\(\/\).*/{ s//\1/; q; }
22128  	  s/.*/./; q'`
22129      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22130        { case "$ac_dir" in
22131  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22132  *)                      as_incr_dir=.;;
22133esac
22134as_dummy="$ac_dir"
22135for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22136  case $as_mkdir_dir in
22137    # Skip DOS drivespec
22138    ?:) as_incr_dir=$as_mkdir_dir ;;
22139    *)
22140      as_incr_dir=$as_incr_dir/$as_mkdir_dir
22141      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22142    ;;
22143  esac
22144done; }
22145
22146      fi
22147      rm -f $ac_file
22148      mv $tmp/config.h $ac_file
22149    fi
22150  else
22151    cat $tmp/config.h
22152    rm -f $tmp/config.h
22153  fi
22154done
22155EOF
22156cat >>$CONFIG_STATUS <<\EOF
22157#
22158# CONFIG_COMMANDS section.
22159#
22160for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22161  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22162  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22163
22164  case $ac_dest in
22165    default )
22166if test "x$cf_with_tests" != xno ; then
22167
22168for cf_dir in test
22169do
22170	if test ! -d $srcdir/$cf_dir; then
22171		continue
22172	elif test -f $srcdir/$cf_dir/programs; then
22173		$AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
22174	fi
22175done
22176
22177fi
22178
22179cf_prefix=$LIB_PREFIX
22180
22181case $cf_cv_shlib_version in #(vi
22182cygdll|msysdll|mingw)
22183	TINFO_NAME=$TINFO_ARG_SUFFIX
22184	TINFO_SUFFIX=.dll
22185	;;
22186esac
22187
22188if test -n "$TINFO_SUFFIX" ; then
22189	case $TINFO_SUFFIX in
22190	tw*)
22191		TINFO_NAME="${TINFO_NAME}tw"
22192		TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
22193		;;
22194	t*)
22195		TINFO_NAME="${TINFO_NAME}t"
22196		TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
22197		;;
22198	w*)
22199		TINFO_NAME="${TINFO_NAME}w"
22200		TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
22201		;;
22202	esac
22203fi
22204
22205for cf_dir in $SRC_SUBDIRS
22206do
22207	if test ! -d $srcdir/$cf_dir ; then
22208		continue
22209	elif test -f $srcdir/$cf_dir/modules; then
22210
22211		SHARED_LIB=
22212		Libs_To_Make=
22213		for cf_item in $cf_LIST_MODELS
22214		do
22215
22216	case X$cf_item in #(vi
22217	Xlibtool) #(vi
22218		cf_suffix='.la'
22219		cf_depsuf=$cf_suffix
22220		;;
22221	Xdebug) #(vi
22222		cf_suffix='_g.a'
22223		cf_depsuf=$cf_suffix
22224		;;
22225	Xprofile) #(vi
22226		cf_suffix='_p.a'
22227		cf_depsuf=$cf_suffix
22228		;;
22229	Xshared) #(vi
22230		case $cf_cv_system_name in
22231		aix[5-7]*) #(vi
22232			cf_suffix='.a'
22233			cf_depsuf=$cf_suffix
22234			;;
22235		cygwin*|msys*|mingw*) #(vi
22236			cf_suffix='.dll'
22237			cf_depsuf='.dll.a'
22238			;;
22239		darwin*) #(vi
22240			cf_suffix='.dylib'
22241			cf_depsuf=$cf_suffix
22242			;;
22243		hpux*) #(vi
22244			case $target in
22245			ia64*) #(vi
22246				cf_suffix='.so'
22247				cf_depsuf=$cf_suffix
22248				;;
22249			*) #(vi
22250				cf_suffix='.sl'
22251				cf_depsuf=$cf_suffix
22252				;;
22253			esac
22254			;;
22255		*) #(vi
22256			cf_suffix='.so'
22257			cf_depsuf=$cf_suffix
22258			;;
22259		esac
22260		;;
22261	*)
22262		cf_suffix='.a'
22263		cf_depsuf=$cf_suffix
22264		;;
22265	esac
22266	test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22267	test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22268
22269			cf_libname=$cf_dir
22270			test "$cf_dir" = c++ && cf_libname=ncurses++
22271			if test $cf_item = shared ; then
22272				if test -n "${LIB_SUFFIX}"
22273				then
22274					cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22275				else
22276					cf_shared_suffix="$cf_suffix"
22277				fi
22278				if test "$cf_cv_do_symlinks" = yes ; then
22279					cf_version_name=
22280
22281					case "$cf_cv_shlib_version" in #(vi
22282					rel) #(vi
22283						cf_version_name=REL_VERSION
22284						;;
22285					abi)
22286						cf_version_name=ABI_VERSION
22287						;;
22288					esac
22289
22290					if test -n "$cf_version_name"
22291					then
22292						case "$cf_cv_system_name" in #(vi
22293						darwin*)
22294							# "w", etc?
22295							cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
22296							;; #(vi
22297						*)
22298							cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
22299							;;
22300						esac
22301					fi
22302					if test -n "${LIB_SUFFIX}"
22303					then
22304						cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22305					else
22306						cf_shared_suffix="$cf_suffix"
22307					fi
22308				fi
22309				# cygwin needs import library, and has unique naming convention
22310				# use autodetected ${cf_prefix} for import lib and static lib, but
22311				# use 'cyg' prefix for shared lib.
22312				case $cf_cv_shlib_version in #(vi
22313				cygdll) #(vi
22314					cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22315					Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
22316					continue
22317					;;
22318				msysdll) #(vi
22319					cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22320					Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
22321					continue
22322					;;
22323				mingw)
22324					cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22325					Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
22326					continue
22327					;;
22328				esac
22329			fi
22330			Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
22331		done
22332
22333		if test $cf_dir = ncurses ; then
22334			cf_subsets="$LIB_SUBSETS"
22335			cf_r_parts="$cf_subsets"
22336			cf_liblist="$Libs_To_Make"
22337
22338			while test -n "$cf_r_parts"
22339			do
22340				cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
22341				cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
22342				if test "$cf_l_parts" != "$cf_r_parts" ; then
22343					cf_item=
22344					case $cf_l_parts in #(vi
22345					*termlib*) #(vi
22346						cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
22347						;;
22348					*ticlib*)
22349						cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
22350						;;
22351					*)
22352						break
22353						;;
22354					esac
22355					if test -n "$cf_item"; then
22356						Libs_To_Make="$cf_item $Libs_To_Make"
22357					fi
22358				else
22359					break
22360				fi
22361			done
22362		else
22363			cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
22364		fi
22365
22366		if test $cf_dir = c++; then
22367			if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
22368				cf_list=
22369				for cf_item in $Libs_To_Make
22370				do
22371					case $cf_item in
22372					*.a)
22373						;;
22374					*)
22375						cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
22376						;;
22377					esac
22378					for cf_test in $cf_list
22379					do
22380						if test "$cf_test" = "$cf_item"
22381						then
22382							cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
22383							cf_item=
22384							break
22385						fi
22386					done
22387					test -n "$cf_item" && cf_list="$cf_list $cf_item"
22388				done
22389				Libs_To_Make="$cf_list"
22390			fi
22391		fi
22392
22393		sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
22394		    -e "s%@SHARED_LIB@%$SHARED_LIB%" \
22395			$cf_dir/Makefile >$cf_dir/Makefile.out
22396		mv $cf_dir/Makefile.out $cf_dir/Makefile
22397
22398		$AWK -f $srcdir/mk-0th.awk \
22399			libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
22400			$srcdir/$cf_dir/modules >>$cf_dir/Makefile
22401
22402		for cf_subset in $cf_subsets
22403		do
22404			cf_subdirs=
22405			for cf_item in $cf_LIST_MODELS
22406			do
22407
22408			echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
22409
22410cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22411
22412			CXX_MODEL=$cf_ITEM
22413			if test "$CXX_MODEL" = SHARED; then
22414				case $cf_cv_shlib_version in #(vi
22415				cygdll|msysdll|mingw) #(vi
22416					test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "	overriding CXX_MODEL to SHARED" 1>&6
22417
22418echo "${as_me:-configure}:22418: testing overriding CXX_MODEL to SHARED ..." 1>&5
22419
22420					with_shared_cxx=yes
22421					;;
22422				*)
22423					test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
22424					;;
22425				esac
22426			fi
22427
22428	case X$cf_item in #(vi
22429	Xlibtool) #(vi
22430		cf_suffix='.la'
22431		cf_depsuf=$cf_suffix
22432		;;
22433	Xdebug) #(vi
22434		cf_suffix='_g.a'
22435		cf_depsuf=$cf_suffix
22436		;;
22437	Xprofile) #(vi
22438		cf_suffix='_p.a'
22439		cf_depsuf=$cf_suffix
22440		;;
22441	Xshared) #(vi
22442		case $cf_cv_system_name in
22443		aix[5-7]*) #(vi
22444			cf_suffix='.a'
22445			cf_depsuf=$cf_suffix
22446			;;
22447		cygwin*|msys*|mingw*) #(vi
22448			cf_suffix='.dll'
22449			cf_depsuf='.dll.a'
22450			;;
22451		darwin*) #(vi
22452			cf_suffix='.dylib'
22453			cf_depsuf=$cf_suffix
22454			;;
22455		hpux*) #(vi
22456			case $target in
22457			ia64*) #(vi
22458				cf_suffix='.so'
22459				cf_depsuf=$cf_suffix
22460				;;
22461			*) #(vi
22462				cf_suffix='.sl'
22463				cf_depsuf=$cf_suffix
22464				;;
22465			esac
22466			;;
22467		*) #(vi
22468			cf_suffix='.so'
22469			cf_depsuf=$cf_suffix
22470			;;
22471		esac
22472		;;
22473	*)
22474		cf_suffix='.a'
22475		cf_depsuf=$cf_suffix
22476		;;
22477	esac
22478	test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22479	test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22480
22481	case $cf_item in
22482	libtool) cf_subdir='obj_lo'  ;;
22483	normal)  cf_subdir='objects' ;;
22484	debug)   cf_subdir='obj_g' ;;
22485	profile) cf_subdir='obj_p' ;;
22486	shared)
22487		case $cf_cv_system_name in #(vi
22488		cygwin|msys) #(vi
22489			cf_subdir='objects' ;;
22490		*)
22491			cf_subdir='obj_s' ;;
22492		esac
22493	esac
22494
22495			# Test for case where we build libtinfo with a different name.
22496			cf_libname=$cf_dir
22497			if test $cf_dir = ncurses ; then
22498				case $cf_subset in
22499				*base*)
22500					cf_libname=${cf_libname}$LIB_SUFFIX
22501					;;
22502				*termlib*)
22503					cf_libname=$TINFO_LIB_SUFFIX
22504					;;
22505				ticlib*)
22506					cf_libname=$TICS_LIB_SUFFIX
22507					;;
22508				esac
22509			elif test $cf_dir = c++ ; then
22510				cf_libname=ncurses++$LIB_SUFFIX
22511			else
22512				cf_libname=${cf_libname}$LIB_SUFFIX
22513			fi
22514			if test -n "${DFT_ARG_SUFFIX}" ; then
22515				# undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
22516				cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
22517			fi
22518
22519			# These dependencies really are for development, not
22520			# builds, but they are useful in porting, too.
22521			cf_depend="../include/ncurses_cfg.h"
22522			if test "$srcdir" = "."; then
22523				cf_reldir="."
22524			else
22525				cf_reldir="\${srcdir}"
22526			fi
22527
22528			if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
22529				cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
22530			elif test -f $srcdir/$cf_dir/curses.priv.h; then
22531				cf_depend="$cf_depend $cf_reldir/curses.priv.h"
22532			fi
22533
22534 			cf_dir_suffix=
22535 			old_cf_suffix="$cf_suffix"
22536 			if test "$cf_cv_shlib_version_infix" = yes ; then
22537			if test -n "$LIB_SUFFIX" ; then
22538				case $LIB_SUFFIX in
22539				tw*)
22540					cf_libname=`echo $cf_libname | sed 's/tw$//'`
22541					cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
22542					cf_dir_suffix=tw
22543					;;
22544				t*)
22545					cf_libname=`echo $cf_libname | sed 's/t$//'`
22546					cf_suffix=`echo $cf_suffix | sed 's/^t//'`
22547					cf_dir_suffix=t
22548					;;
22549				w*)
22550					cf_libname=`echo $cf_libname | sed 's/w$//'`
22551					cf_suffix=`echo $cf_suffix | sed 's/^w//'`
22552					cf_dir_suffix=w
22553					;;
22554				esac
22555			fi
22556 			fi
22557
22558			$AWK -f $srcdir/mk-1st.awk \
22559				name=${cf_libname}${cf_dir_suffix} \
22560				traces=$LIB_TRACING \
22561				MODEL=$cf_ITEM \
22562				CXX_MODEL=$CXX_MODEL \
22563				model=$cf_subdir \
22564				prefix=$cf_prefix \
22565				suffix=$cf_suffix \
22566				subset=$cf_subset \
22567				driver=$cf_cv_term_driver \
22568				SymLink="$LN_S" \
22569				TermlibRoot=$TINFO_NAME \
22570				TermlibSuffix=$TINFO_SUFFIX \
22571				ShlibVer=$cf_cv_shlib_version \
22572				ShlibVerInfix=$cf_cv_shlib_version_infix \
22573				ReLink=${cf_cv_do_relink:-no} \
22574				DoLinks=$cf_cv_do_symlinks \
22575				rmSoLocs=$cf_cv_rm_so_locs \
22576				ldconfig="$LDCONFIG" \
22577				overwrite=$WITH_OVERWRITE \
22578				depend="$cf_depend" \
22579				host="$host" \
22580				libtool_version="$LIBTOOL_VERSION" \
22581				$srcdir/$cf_dir/modules >>$cf_dir/Makefile
22582
22583			cf_suffix="$old_cf_suffix"
22584
22585			for cf_subdir2 in $cf_subdirs lib
22586			do
22587				test $cf_subdir = $cf_subdir2 && break
22588			done
22589			test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
22590			$AWK -f $srcdir/mk-2nd.awk \
22591				name=$cf_dir \
22592				traces=$LIB_TRACING \
22593				MODEL=$cf_ITEM \
22594				model=$cf_subdir \
22595				subset=$cf_subset \
22596				srcdir=$srcdir \
22597				echo=$WITH_ECHO \
22598				crenames=$cf_cv_prog_CC_c_o \
22599				cxxrenames=$cf_cv_prog_CXX_c_o \
22600				$srcdir/$cf_dir/modules >>$cf_dir/Makefile
22601			cf_subdirs="$cf_subdirs $cf_subdir"
22602			done
22603		done
22604	fi
22605
22606	echo '	cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
22607done
22608
22609for cf_dir in $SRC_SUBDIRS
22610do
22611	if test ! -d $srcdir/$cf_dir ; then
22612		continue
22613	fi
22614
22615	if test -f $cf_dir/Makefile ; then
22616		case "$cf_dir" in
22617		Ada95) #(vi
22618			echo 'libs \' >> Makefile
22619			echo 'install.libs \' >> Makefile
22620			echo 'uninstall.libs ::' >> Makefile
22621			echo '	cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
22622			;;
22623		esac
22624	fi
22625
22626	if test -f $srcdir/$cf_dir/modules; then
22627		echo >> Makefile
22628		if test -f $srcdir/$cf_dir/headers; then
22629cat >> Makefile <<CF_EOF
22630install.includes \\
22631uninstall.includes \\
22632CF_EOF
22633		fi
22634if test "$cf_dir" != "c++" ; then
22635echo 'lint \' >> Makefile
22636fi
22637cat >> Makefile <<CF_EOF
22638libs \\
22639lintlib \\
22640install.libs \\
22641uninstall.libs \\
22642install.$cf_dir \\
22643uninstall.$cf_dir ::
22644	cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22645CF_EOF
22646	elif test -f $srcdir/$cf_dir/headers; then
22647cat >> Makefile <<CF_EOF
22648
22649libs \\
22650install.libs \\
22651uninstall.libs \\
22652install.includes \\
22653uninstall.includes ::
22654	cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22655CF_EOF
22656fi
22657done
22658
22659if test "x$cf_with_db_install" = xyes; then
22660cat >> Makefile <<CF_EOF
22661
22662install.libs uninstall.libs \\
22663install.data uninstall.data ::
22664$MAKE_TERMINFO	cd misc && \${MAKE} \${TOP_MFLAGS} \$@
22665CF_EOF
22666fi
22667
22668if test "x$cf_with_manpages" = xyes; then
22669cat >> Makefile <<CF_EOF
22670
22671install.man \\
22672uninstall.man ::
22673	cd man && \${MAKE} \${TOP_MFLAGS} \$@
22674CF_EOF
22675fi
22676
22677cat >> Makefile <<CF_EOF
22678
22679distclean ::
22680	rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22681	rm -f headers.sh headers.sed mk_shared_lib.sh
22682	rm -f edit_man.* man_alias.*
22683	rm -rf \${DIRS_TO_MAKE}
22684CF_EOF
22685
22686# Special case: tack's manpage lives in its own directory.
22687if test "x$cf_with_manpages" = xyes; then
22688if test -d tack ; then
22689if test -f $srcdir/$tack.h; then
22690cat >> Makefile <<CF_EOF
22691
22692install.man \\
22693uninstall.man ::
22694	cd tack && \${MAKE} \${TOP_MFLAGS} \$@
22695CF_EOF
22696fi
22697fi
22698fi
22699
22700rm -f headers.sed headers.sh
22701
22702echo creating headers.sh
22703cat >headers.sh <<CF_EOF
22704#! /bin/sh
22705# This shell script is generated by the 'configure' script.  It is invoked in a
22706# subdirectory of the build tree.  It generates a sed-script in the parent
22707# directory that is used to adjust includes for header files that reside in a
22708# subdirectory of /usr/include, etc.
22709PRG=""
22710while test \$# != 3
22711do
22712PRG="\$PRG \$1"; shift
22713done
22714DST=\$1
22715REF=\$2
22716SRC=\$3
22717TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22718TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22719echo installing \$SRC in \$DST
22720CF_EOF
22721
22722if test $WITH_CURSES_H = yes; then
22723	cat >>headers.sh <<CF_EOF
22724case \$DST in
22725/*/include/*)
22726	END=\`basename \$DST\`
22727	for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22728	do
22729		NAME=\`basename \$i\`
22730		echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22731	done
22732	;;
22733*)
22734	echo "" >> \$TMPSED
22735	;;
22736esac
22737CF_EOF
22738
22739else
22740	cat >>headers.sh <<CF_EOF
22741case \$DST in
22742/*/include/*)
22743	END=\`basename \$DST\`
22744	for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22745	do
22746		NAME=\`basename \$i\`
22747		if test "\$NAME" = "curses.h"
22748		then
22749			echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22750			NAME=ncurses.h
22751		fi
22752		echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22753	done
22754	;;
22755*)
22756	echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22757	;;
22758esac
22759CF_EOF
22760fi
22761cat >>headers.sh <<CF_EOF
22762rm -f \$TMPSRC
22763sed -f \$TMPSED \$SRC > \$TMPSRC
22764NAME=\`basename \$SRC\`
22765CF_EOF
22766if test $WITH_CURSES_H != yes; then
22767	cat >>headers.sh <<CF_EOF
22768test "\$NAME" = "curses.h" && NAME=ncurses.h
22769CF_EOF
22770fi
22771cat >>headers.sh <<CF_EOF
22772# Just in case someone gzip'd manpages, remove the conflicting copy.
22773test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22774
22775eval \$PRG \$TMPSRC \$DST/\$NAME
22776rm -f \$TMPSRC \$TMPSED
22777CF_EOF
22778
22779chmod 0755 headers.sh
22780
22781for cf_dir in $SRC_SUBDIRS
22782do
22783	if test ! -d $srcdir/$cf_dir ; then
22784		continue
22785	fi
22786
22787	if test -f $srcdir/$cf_dir/headers; then
22788		$AWK -f $srcdir/mk-hdr.awk \
22789			subset="$LIB_SUBSETS" \
22790			compat="$WITH_CURSES_H" \
22791			$srcdir/$cf_dir/headers >>$cf_dir/Makefile
22792	fi
22793
22794	if test -f $srcdir/$cf_dir/modules; then
22795		if test "$cf_dir" != "c++" ; then
22796			cat >>$cf_dir/Makefile <<"CF_EOF"
22797depend : ${AUTO_SRC}
22798	makedepend -- ${CPPFLAGS} -- ${C_SRC}
22799
22800# DO NOT DELETE THIS LINE -- make depend depends on it.
22801CF_EOF
22802		fi
22803	fi
22804done
22805
22806if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22807if test -z "$USE_OLD_MAKERULES" ; then
22808	$AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22809fi
22810fi
22811 ;;
22812  esac
22813done
22814EOF
22815
22816cat >>$CONFIG_STATUS <<\EOF
22817
22818{ (exit 0); exit 0; }
22819EOF
22820chmod +x $CONFIG_STATUS
22821ac_clean_files=$ac_clean_files_save
22822
22823# configure is writing to config.log, and then calls config.status.
22824# config.status does its own redirection, appending to config.log.
22825# Unfortunately, on DOS this fails, as config.log is still kept open
22826# by configure, so config.status won't be able to write to it; its
22827# output is simply discarded.  So we exec the FD to /dev/null,
22828# effectively closing config.log, so it can be properly (re)opened and
22829# appended to by config.status.  When coming back to configure, we
22830# need to make the FD available again.
22831if test "$no_create" != yes; then
22832  ac_cs_success=:
22833  exec 5>/dev/null
22834  $SHELL $CONFIG_STATUS || ac_cs_success=false
22835  exec 5>>config.log
22836  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22837  # would make configure fail if this is the last instruction.
22838  $ac_cs_success || { (exit 1); exit 1; }
22839fi
22840${MAKE:-make} preinstall
22841