xref: /freebsd/contrib/ncurses/configure (revision da477bcdc0c335171bb0ed3813f570026de6df85)
1#! /bin/sh
2# From configure.in Revision: 1.697 .
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by Autoconf 2.52.20200111.
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'
179runstatedir='${localstatedir}/run'
180libdir='${exec_prefix}/lib'
181includedir='${prefix}/include'
182oldincludedir='/usr/include'
183infodir='${datarootdir}/info'
184mandir='${datarootdir}/man'
185
186# Identity of this package.
187PACKAGE_NAME=
188PACKAGE_TARNAME=
189PACKAGE_VERSION=
190PACKAGE_STRING=
191PACKAGE_BUGREPORT=
192
193ac_prev=
194for ac_option
195do
196  # If the previous option needs an argument, assign it.
197  if test -n "$ac_prev"; then
198    eval "$ac_prev=\$ac_option"
199    ac_prev=
200    continue
201  fi
202
203  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
204
205  # Accept the important Cygnus configure options, so we can diagnose typos.
206
207  case $ac_option in
208
209  -bindir | --bindir | --bindi | --bind | --bin | --bi)
210    ac_prev=bindir ;;
211  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
212    bindir=$ac_optarg ;;
213
214  -build | --build | --buil | --bui | --bu)
215    ac_prev=build_alias ;;
216  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217    build_alias=$ac_optarg ;;
218
219  -cache-file | --cache-file | --cache-fil | --cache-fi \
220  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221    ac_prev=cache_file ;;
222  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224    cache_file=$ac_optarg ;;
225
226  --config-cache | -C)
227    cache_file=config.cache ;;
228
229  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
230    ac_prev=datadir ;;
231  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
232  | --da=*)
233    datadir=$ac_optarg ;;
234
235  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
236  | --dataroo | --dataro | --datar)
237    ac_prev=datarootdir ;;
238  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
239  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
240    datarootdir=$ac_optarg ;;
241
242  -disable-* | --disable-*)
243    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
244    # Reject names that are not valid shell variable names.
245    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247   { (exit 1); exit 1; }; }
248    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249    eval "enable_$ac_feature=no" ;;
250
251  -enable-* | --enable-*)
252    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
253    # Reject names that are not valid shell variable names.
254    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
255      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
256   { (exit 1); exit 1; }; }
257    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
258    case $ac_option in
259      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
260      *) ac_optarg=yes ;;
261    esac
262    eval "enable_$ac_feature='$ac_optarg'" ;;
263
264  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
265  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
266  | --exec | --exe | --ex)
267    ac_prev=exec_prefix ;;
268  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
269  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
270  | --exec=* | --exe=* | --ex=*)
271    exec_prefix=$ac_optarg ;;
272
273  -gas | --gas | --ga | --g)
274    # Obsolete; use --with-gas.
275    with_gas=yes ;;
276
277  -help | --help | --hel | --he | -h)
278    ac_init_help=long ;;
279  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
280    ac_init_help=recursive ;;
281  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
282    ac_init_help=short ;;
283
284  -host | --host | --hos | --ho)
285    ac_prev=host_alias ;;
286  -host=* | --host=* | --hos=* | --ho=*)
287    host_alias=$ac_optarg ;;
288
289  -includedir | --includedir | --includedi | --included | --include \
290  | --includ | --inclu | --incl | --inc)
291    ac_prev=includedir ;;
292  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293  | --includ=* | --inclu=* | --incl=* | --inc=*)
294    includedir=$ac_optarg ;;
295
296  -infodir | --infodir | --infodi | --infod | --info | --inf)
297    ac_prev=infodir ;;
298  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299    infodir=$ac_optarg ;;
300
301  -libdir | --libdir | --libdi | --libd)
302    ac_prev=libdir ;;
303  -libdir=* | --libdir=* | --libdi=* | --libd=*)
304    libdir=$ac_optarg ;;
305
306  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307  | --libexe | --libex | --libe)
308    ac_prev=libexecdir ;;
309  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310  | --libexe=* | --libex=* | --libe=*)
311    libexecdir=$ac_optarg ;;
312
313  -localstatedir | --localstatedir | --localstatedi | --localstated \
314  | --localstate | --localstat | --localsta | --localst \
315  | --locals | --local | --loca | --loc | --lo)
316    ac_prev=localstatedir ;;
317  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320    localstatedir=$ac_optarg ;;
321
322  -runstatedir | --runstatedir | --runstatedi | --runstated \
323  | --runstate | --runstat | --runsta | --runst \
324  | --runs | --run | --ru)
325    ac_prev=runstatedir ;;
326  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
327  | --runstate=* | --runstat=* | --runsta=* | --runst=* \
328  | --runs=* | --run=* | --ru=*)
329    runstatedir=$ac_optarg ;;
330
331  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
332    ac_prev=mandir ;;
333  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
334    mandir=$ac_optarg ;;
335
336  -nfp | --nfp | --nf)
337    # Obsolete; use --without-fp.
338    with_fp=no ;;
339
340  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
341  | --no-cr | --no-c)
342    no_create=yes ;;
343
344  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
345  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
346    no_recursion=yes ;;
347
348  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
349  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
350  | --oldin | --oldi | --old | --ol | --o)
351    ac_prev=oldincludedir ;;
352  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
353  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
354  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
355    oldincludedir=$ac_optarg ;;
356
357  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
358    ac_prev=prefix ;;
359  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
360    prefix=$ac_optarg ;;
361
362  -program-prefix | --program-prefix | --program-prefi | --program-pref \
363  | --program-pre | --program-pr | --program-p)
364    ac_prev=program_prefix ;;
365  -program-prefix=* | --program-prefix=* | --program-prefi=* \
366  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
367    program_prefix=$ac_optarg ;;
368
369  -program-suffix | --program-suffix | --program-suffi | --program-suff \
370  | --program-suf | --program-su | --program-s)
371    ac_prev=program_suffix ;;
372  -program-suffix=* | --program-suffix=* | --program-suffi=* \
373  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
374    program_suffix=$ac_optarg ;;
375
376  -program-transform-name | --program-transform-name \
377  | --program-transform-nam | --program-transform-na \
378  | --program-transform-n | --program-transform- \
379  | --program-transform | --program-transfor \
380  | --program-transfo | --program-transf \
381  | --program-trans | --program-tran \
382  | --progr-tra | --program-tr | --program-t)
383    ac_prev=program_transform_name ;;
384  -program-transform-name=* | --program-transform-name=* \
385  | --program-transform-nam=* | --program-transform-na=* \
386  | --program-transform-n=* | --program-transform-=* \
387  | --program-transform=* | --program-transfor=* \
388  | --program-transfo=* | --program-transf=* \
389  | --program-trans=* | --program-tran=* \
390  | --progr-tra=* | --program-tr=* | --program-t=*)
391    program_transform_name=$ac_optarg ;;
392
393  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
394  | -silent | --silent | --silen | --sile | --sil)
395    silent=yes ;;
396
397  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
398    ac_prev=sbindir ;;
399  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
400  | --sbi=* | --sb=*)
401    sbindir=$ac_optarg ;;
402
403  -sharedstatedir | --sharedstatedir | --sharedstatedi \
404  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
405  | --sharedst | --shareds | --shared | --share | --shar \
406  | --sha | --sh)
407    ac_prev=sharedstatedir ;;
408  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
409  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
410  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
411  | --sha=* | --sh=*)
412    sharedstatedir=$ac_optarg ;;
413
414  -site | --site | --sit)
415    ac_prev=site ;;
416  -site=* | --site=* | --sit=*)
417    site=$ac_optarg ;;
418
419  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
420    ac_prev=srcdir ;;
421  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
422    srcdir=$ac_optarg ;;
423
424  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
425  | --syscon | --sysco | --sysc | --sys | --sy)
426    ac_prev=sysconfdir ;;
427  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
428  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
429    sysconfdir=$ac_optarg ;;
430
431  -target | --target | --targe | --targ | --tar | --ta | --t)
432    ac_prev=target_alias ;;
433  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
434    target_alias=$ac_optarg ;;
435
436  -v | -verbose | --verbose | --verbos | --verbo | --verb)
437    verbose=yes ;;
438
439  -version | --version | --versio | --versi | --vers | -V)
440    ac_init_version=: ;;
441
442  -with-* | --with-*)
443    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
444    # Reject names that are not valid shell variable names.
445    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
446      { echo "$as_me: error: invalid package name: $ac_package" >&2
447   { (exit 1); exit 1; }; }
448    ac_package=`echo $ac_package| sed 's/-/_/g'`
449    case $ac_option in
450      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
451      *) ac_optarg=yes ;;
452    esac
453    eval "with_$ac_package='$ac_optarg'" ;;
454
455  -without-* | --without-*)
456    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
457    # Reject names that are not valid shell variable names.
458    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
459      { echo "$as_me: error: invalid package name: $ac_package" >&2
460   { (exit 1); exit 1; }; }
461    ac_package=`echo $ac_package | sed 's/-/_/g'`
462    eval "with_$ac_package=no" ;;
463
464  --x)
465    # Obsolete; use --with-x.
466    with_x=yes ;;
467
468  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469  | --x-incl | --x-inc | --x-in | --x-i)
470    ac_prev=x_includes ;;
471  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473    x_includes=$ac_optarg ;;
474
475  -x-libraries | --x-libraries | --x-librarie | --x-librari \
476  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477    ac_prev=x_libraries ;;
478  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480    x_libraries=$ac_optarg ;;
481
482  -*) { echo "$as_me: error: unrecognized option: $ac_option
483Try \`$0 --help' for more information." >&2
484   { (exit 1); exit 1; }; }
485    ;;
486
487  *=*)
488    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
489    # Reject names that are not valid shell variable names.
490    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
491      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
492   { (exit 1); exit 1; }; }
493    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
494    eval "$ac_envvar='$ac_optarg'"
495    export $ac_envvar ;;
496
497  *)
498    # FIXME: should be removed in autoconf 3.0.
499    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
500    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
501      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
502    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
503    ;;
504
505  esac
506done
507
508if test -n "$ac_prev"; then
509  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
510  { echo "$as_me: error: missing argument to $ac_option" >&2
511   { (exit 1); exit 1; }; }
512fi
513
514# Be sure to have absolute paths.
515for ac_var in exec_prefix prefix
516do
517  eval ac_val=$`echo $ac_var`
518  case $ac_val in
519    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
520    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
521   { (exit 1); exit 1; }; };;
522  esac
523done
524
525# Be sure to have absolute paths.
526for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
527              localstatedir libdir includedir oldincludedir infodir mandir
528do
529  eval ac_val=$`echo $ac_var`
530  case $ac_val in
531    [\\/$]* | ?:[\\/]* ) ;;
532    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
533   { (exit 1); exit 1; }; };;
534  esac
535done
536
537# There might be people who depend on the old broken behavior: `$host'
538# used to hold the argument of --host etc.
539build=$build_alias
540host=$host_alias
541target=$target_alias
542
543# FIXME: should be removed in autoconf 3.0.
544if test "x$host_alias" != x; then
545  if test "x$build_alias" = x; then
546    cross_compiling=maybe
547    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
548    If a cross compiler is detected then cross compile mode will be used." >&2
549  elif test "x$build_alias" != "x$host_alias"; then
550    cross_compiling=yes
551  fi
552fi
553
554ac_tool_prefix=
555test -n "$host_alias" && ac_tool_prefix=$host_alias-
556
557test "$silent" = yes && exec 6>/dev/null
558
559# Find the source files, if location was not specified.
560if test -z "$srcdir"; then
561  ac_srcdir_defaulted=yes
562  # Try the directory containing this script, then its parent.
563  ac_prog=$0
564  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
565  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
566  srcdir=$ac_confdir
567  if test ! -r $srcdir/$ac_unique_file; then
568    srcdir=..
569  fi
570else
571  ac_srcdir_defaulted=no
572fi
573if test ! -r $srcdir/$ac_unique_file; then
574  if test "$ac_srcdir_defaulted" = yes; then
575    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
576   { (exit 1); exit 1; }; }
577  else
578    { echo "$as_me: error: cannot find sources in $srcdir" >&2
579   { (exit 1); exit 1; }; }
580  fi
581fi
582srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
583ac_env_build_alias_set=${build_alias+set}
584ac_env_build_alias_value=$build_alias
585ac_cv_env_build_alias_set=${build_alias+set}
586ac_cv_env_build_alias_value=$build_alias
587ac_env_host_alias_set=${host_alias+set}
588ac_env_host_alias_value=$host_alias
589ac_cv_env_host_alias_set=${host_alias+set}
590ac_cv_env_host_alias_value=$host_alias
591ac_env_target_alias_set=${target_alias+set}
592ac_env_target_alias_value=$target_alias
593ac_cv_env_target_alias_set=${target_alias+set}
594ac_cv_env_target_alias_value=$target_alias
595ac_env_CC_set=${CC+set}
596ac_env_CC_value=$CC
597ac_cv_env_CC_set=${CC+set}
598ac_cv_env_CC_value=$CC
599ac_env_CFLAGS_set=${CFLAGS+set}
600ac_env_CFLAGS_value=$CFLAGS
601ac_cv_env_CFLAGS_set=${CFLAGS+set}
602ac_cv_env_CFLAGS_value=$CFLAGS
603ac_env_LDFLAGS_set=${LDFLAGS+set}
604ac_env_LDFLAGS_value=$LDFLAGS
605ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
606ac_cv_env_LDFLAGS_value=$LDFLAGS
607ac_env_CPPFLAGS_set=${CPPFLAGS+set}
608ac_env_CPPFLAGS_value=$CPPFLAGS
609ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
610ac_cv_env_CPPFLAGS_value=$CPPFLAGS
611ac_env_CPP_set=${CPP+set}
612ac_env_CPP_value=$CPP
613ac_cv_env_CPP_set=${CPP+set}
614ac_cv_env_CPP_value=$CPP
615ac_env_CXX_set=${CXX+set}
616ac_env_CXX_value=$CXX
617ac_cv_env_CXX_set=${CXX+set}
618ac_cv_env_CXX_value=$CXX
619ac_env_CXXFLAGS_set=${CXXFLAGS+set}
620ac_env_CXXFLAGS_value=$CXXFLAGS
621ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
622ac_cv_env_CXXFLAGS_value=$CXXFLAGS
623ac_env_CXXCPP_set=${CXXCPP+set}
624ac_env_CXXCPP_value=$CXXCPP
625ac_cv_env_CXXCPP_set=${CXXCPP+set}
626ac_cv_env_CXXCPP_value=$CXXCPP
627
628#
629# Report the --help message.
630#
631if test "$ac_init_help" = "long"; then
632  # Omit some internal or obsolete options to make the list less imposing.
633  # This message is too long to be a string in the A/UX 3.1 sh.
634  cat <<EOF
635\`configure' configures this package to adapt to many kinds of systems.
636
637Usage: $0 [OPTION]... [VAR=VALUE]...
638
639To assign environment variables (e.g., CC, CFLAGS...), specify them as
640VAR=VALUE.  See below for descriptions of some of the useful variables.
641
642Defaults for the options are specified in brackets.
643
644Configuration:
645  -h, --help              display this help and exit
646      --help=short        display options specific to this package
647      --help=recursive    display the short help of all the included packages
648  -V, --version           display version information and exit
649  -q, --quiet, --silent   do not print \`checking...' messages
650      --cache-file=FILE   cache test results in FILE [disabled]
651  -C, --config-cache      alias for \`--cache-file=config.cache'
652  -n, --no-create         do not create output files
653      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
654
655EOF
656
657  cat <<EOF
658Installation directories:
659  --prefix=PREFIX         install architecture-independent files in PREFIX
660                          [$ac_default_prefix]
661  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
662                          [PREFIX]
663
664By default, \`make install' will install all the files in
665\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
666an installation prefix other than \`$ac_default_prefix' using \`--prefix',
667for instance \`--prefix=\$HOME'.
668
669For better control, use the options below.
670
671Fine tuning of the installation directories:
672  --bindir=DIR            user executables [EPREFIX/bin]
673  --sbindir=DIR           system admin executables [EPREFIX/sbin]
674  --libexecdir=DIR        program executables [EPREFIX/libexec]
675  --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
676  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
677  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
678  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
679  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
680  --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
681  --libdir=DIR            object code libraries [EPREFIX/lib]
682  --includedir=DIR        C header files [PREFIX/include]
683  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
684  --infodir=DIR           info documentation [DATAROOTDIR/info]
685  --mandir=DIR            man documentation [DATAROOTDIR/man]
686EOF
687
688  cat <<\EOF
689
690Program names:
691  --program-prefix=PREFIX            prepend PREFIX to installed program names
692  --program-suffix=SUFFIX            append SUFFIX to installed program names
693  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
694
695System types:
696  --build=BUILD           configure for building on BUILD [guessed]
697  --host=HOST       build programs to run on HOST [BUILD]
698  --target=TARGET   configure for building compilers for TARGET [HOST]
699EOF
700fi
701
702if test -n "$ac_init_help"; then
703
704  cat <<\EOF
705
706Optional Packages:
707  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
708  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
709
710Optional Features:
711  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
712  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
713
714  --with-rel-version=XXX  override derived release version
715  --with-abi-version=XXX  override derived ABI version
716  --with-system-type=XXX  test: override derived host system-type
717  --without-ada           suppress check for Ada compiler, don't build demo
718  --without-cxx           do not adjust ncurses bool to match C++
719  --without-cxx-binding   do not build C++ binding and demo
720  --disable-db-install    suppress install of terminal database
721  --without-manpages      suppress install of manpages
722  --without-progs         suppress build/install with programs (e.g., tic)
723  --without-tack          suppress build/install with tack program
724  --without-tests         suppress build/install with test-programs
725  --without-curses-h      install curses.h as ncurses.h only
726  --with-config-suffix=X  suffixes ncursesXX-config file
727  --with-pkg-config{=path} enable/disable use of pkg-config
728  --with-pkg-config-libdir=XXX use given directory for installing pc-files
729  --enable-pc-files       generate and install .pc files for pkg-config
730  --with-pc-suffix        suffixes pc-files
731  --enable-mixed-case     tic should assume mixed-case filenames
732  --with-install-prefix   prefixes actual install-location ($DESTDIR)
733Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
734  --with-build-cc=XXX     the build C compiler ($BUILD_CC)
735  --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
736  --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
737  --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
738  --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
739  --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
740Options to Specify the Libraries Built/Used:
741  --disable-libtool-version  enable to use libtool's incompatible naming scheme
742  --with-libtool          generate libraries with libtool
743  --with-shared           generate shared-libraries
744  --with-normal           generate normal-libraries (default)
745  --with-debug            generate debug-libraries (default)
746  --with-profile          generate profile-libraries
747  --with-cxx-shared       generate C++ shared-libraries
748  --with-lib-prefix       override library-prefix
749  --with-termlib          generate separate terminfo library
750  --with-ticlib           generate separate tic library
751  --enable-rpath          use rpath option when generating shared libraries
752  --disable-relink        relink shared libraries during install
753  --with-shlib-version=X  Specify rel or abi version for shared libs
754  --with-libtool-opts=XXX specify additional libtool options
755  --with-export-syms=XXX  limit exported symbols using libtool
756  --with-versioned-syms=X markup versioned symbols using ld
757  --with-gpm              use Alessandro Rubini's GPM library
758  --without-dlsym         do not use dlsym() to load GPM dynamically
759  --with-pcre2            use PCRE2 for regular-expressions
760  --with-sysmouse         use sysmouse (FreeBSD console)
761  --disable-lib-suffixes  disable library suffixes
762  --disable-rpath-hack    don't add rpath options for additional libraries
763Fine-Tuning Your Configuration:
764  --with-extra-suffix=X   append extra suffix to header/library paths
765  --disable-overwrite     put headers in subdir, omit link to -lcurses
766  --disable-database      do not use terminfo, only fallbacks/termcap
767  --with-database=XXX     specify terminfo source to install
768  --with-hashed-db        specify hashed-database library
769  --with-fallbacks=XXX    specify list of fallback terminal descriptions
770  --with-tic-path=XXX     specify path of tic for fallbacks
771  --with-infocmp-path=XXX     specify path of infocmp for fallbacks
772  --without-xterm-new     specify if xterm terminfo should be old version
773  --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
774  --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
775  --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
776  --disable-big-core      assume machine has little memory
777  --disable-big-strings   assume compiler has only standard-size strings
778  --enable-termcap        compile in termcap fallback support
779  --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
780  --enable-getcap         fast termcap load, no xrefs to terminfo
781  --enable-getcap-cache   cache translated termcaps in ~/.terminfo
782  --disable-home-terminfo drop ~/.terminfo from terminfo search-path
783  --disable-root-environ  restrict environment when running as root
784  --enable-symlinks       make tic use symbolic links not hard links
785  --enable-broken_linker  compile with broken-linker support code
786  --enable-bsdpad         recognize BSD-style prefix padding
787  --enable-widec          compile with wide-char/UTF-8 code
788  --disable-lp64          allow chtype to be long (ignore _LP64)
789  --disable-largefile     omit support for large files
790  --disable-tparm-varargs compile tparm() without varargs interface
791  --disable-tic-depends   link tic library without explicit dependency on ncurses library
792  --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
793  --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
794  --with-bool=TYPE        override fallback type of bool variable
795  --with-caps=alt         compile with alternate Caps file
796  --with-chtype=TYPE      override type of chtype
797  --with-ospeed=TYPE      override type of ospeed variable
798  --with-mmask-t=TYPE     override type of mmask_t
799  --with-ccharw-max=XXX   override size CCHARW_MAX
800  --enable-signed-char    compile using signed Boolean's in term.h
801  --with-tparm-arg=TYPE   override parameter type of tparm
802  --with-rcs-ids          compile-in RCS identifiers
803Options to Specify How Manpages are Installed:
804  --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
805                          optionally formatted/catonly, e.g., gzip,formatted
806  --with-manpage-renames  specify manpage-renaming
807  --with-manpage-aliases  specify manpage-aliases using .so
808  --with-manpage-symlinks specify manpage-aliases using symlinks
809  --with-manpage-tbl      specify manpage processing with tbl
810Extensions:
811  --disable-ext-funcs     disable function-extensions
812  --enable-sp-funcs       enable SCREEN-extensions
813  --enable-term-driver    enable terminal-driver
814  --enable-const          compile with extra/non-standard const
815  --enable-ext-colors     compile for 256-color support
816  --enable-ext-mouse      compile for extended mouse-encoding
817  --enable-ext-putwin     compile with extended putwin/screendump
818  --enable-no-padding     compile with $NCURSES_NO_PADDING code
819  --enable-sigwinch       compile with SIGWINCH handler
820  --enable-tcap-names     compile with user-definable terminal capabilities
821Reentrant Code:
822  --with-pthread          use POSIX thread library
823  --enable-pthreads-eintr enable EINTR in wgetch with pthreads
824  --enable-weak-symbols   enable weak-symbols for pthreads
825  --enable-reentrant      compile with reentrant code
826  --enable-opaque-curses  make curses WINDOW, etc., "opaque"
827  --enable-opaque-form    make form-library structures "opaque"
828  --enable-opaque-menu    make menu-library structures "opaque"
829  --enable-opaque-panel   make panel-library structures "opaque"
830  --with-wrap-prefix=XXX  override prefix used for public variables
831Development Code:
832  --without-develop       disable development options
833  --enable-hard-tabs      compile with hard-tabs code
834  --enable-xmc-glitch     compile with support for xmc (magic-cookie)
835Experimental Code:
836  --disable-assumed-color do not assume anything about default-colors
837  --disable-hashmap       compile without hashmap scrolling-optimization
838  --enable-colorfgbg      compile-in experimental $COLORFGBG code
839  --enable-interop        compile-in interop bindings
840  --enable-safe-sprintf   compile with experimental safe-sprintf code
841  --disable-scroll-hints  compile without scroll-hints code
842  --enable-wgetch-events  compile with wgetch-events code
843Testing/development Options:
844  --disable-echo          do not display "compiling" commands
845  --disable-stripping     do not strip (debug info) installed executables
846  --enable-warnings       build: turn on GCC compiler warnings
847  --enable-string-hacks   work around bogus compiler/loader warnings
848  --enable-assertions     test: turn on generation of assertion code
849  --with-dmalloc          test: use Gray Watson's dmalloc library
850  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
851  --with-valgrind         test: use valgrind
852  --disable-leaks         test: free permanent memory, analyze leaks
853  --enable-expanded       test: generate functions for certain macros
854  --disable-macros        test: use functions rather than macros
855  --with-trace            test: add trace() function to all models of ncurses
856  --disable-gnat-projects test: disable GNAT projects even if usable
857Ada Binding Options:
858  --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
859  --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
860  --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
861  --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
862  --with-ada-libname=XXX  override default Ada library-name
863
864Some influential environment variables:
865  CC          C compiler command
866  CFLAGS      C compiler flags
867  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
868              nonstandard directory <lib dir>
869  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
870              headers in a nonstandard directory <include dir>
871  CPP         C preprocessor
872  CXX         C++ compiler command
873  CXXFLAGS    C++ compiler flags
874  CXXCPP      C++ preprocessor
875
876Use these variables to override the choices made by `configure' or to help
877it to find libraries and programs with nonstandard names/locations.
878
879EOF
880fi
881
882if test "$ac_init_help" = "recursive"; then
883  # If there are subdirs, report their specific --help.
884  ac_popdir=`pwd`
885  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
886    cd $ac_subdir
887    # A "../" for each directory in /$ac_subdir.
888    ac_dots=`echo $ac_subdir |
889             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
890
891    case $srcdir in
892    .) # No --srcdir option.  We are building in place.
893      ac_sub_srcdir=$srcdir ;;
894    [\\/]* | ?:[\\/]* ) # Absolute path.
895      ac_sub_srcdir=$srcdir/$ac_subdir ;;
896    *) # Relative path.
897      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
898    esac
899
900    # Check for guested configure; otherwise get Cygnus style configure.
901    if test -f $ac_sub_srcdir/configure.gnu; then
902      echo
903      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
904    elif test -f $ac_sub_srcdir/configure; then
905      echo
906      $SHELL $ac_sub_srcdir/configure  --help=recursive
907    elif test -f $ac_sub_srcdir/configure.ac ||
908           test -f $ac_sub_srcdir/configure.in; then
909      echo
910      $ac_configure --help
911    else
912      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
913    fi
914    cd $ac_popdir
915  done
916fi
917
918test -n "$ac_init_help" && exit 0
919if $ac_init_version; then
920  cat <<\EOF
921
922Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
923Free Software Foundation, Inc.
924This configure script is free software; the Free Software Foundation
925gives unlimited permission to copy, distribute and modify it.
926EOF
927  exit 0
928fi
929exec 5>config.log
930cat >&5 <<EOF
931This file contains any messages produced by compilers while
932running configure, to aid debugging if configure makes a mistake.
933
934It was created by $as_me, which was
935generated by GNU Autoconf 2.52.20200111.  Invocation command line was
936
937  $ $0 $@
938
939EOF
940{
941cat <<_ASUNAME
942## ---------- ##
943## Platform.  ##
944## ---------- ##
945
946hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
947uname -m = `(uname -m) 2>/dev/null || echo unknown`
948uname -r = `(uname -r) 2>/dev/null || echo unknown`
949uname -s = `(uname -s) 2>/dev/null || echo unknown`
950uname -v = `(uname -v) 2>/dev/null || echo unknown`
951
952/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
953/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
954
955/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
956/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
957/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
958hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
959/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
960/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
961/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
962
963PATH = $PATH
964
965_ASUNAME
966} >&5
967
968cat >&5 <<EOF
969## ------------ ##
970## Core tests.  ##
971## ------------ ##
972
973EOF
974
975# Keep a trace of the command line.
976# Strip out --no-create and --no-recursion so they do not pile up.
977# Also quote any args containing shell meta-characters.
978ac_configure_args=
979ac_sep=
980for ac_arg
981do
982  case $ac_arg in
983  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
984  | --no-cr | --no-c) ;;
985  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
986  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
987  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
988    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
989    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
990    ac_sep=" " ;;
991  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
992     ac_sep=" " ;;
993  esac
994  # Get rid of the leading space.
995done
996
997# When interrupted or exit'd, cleanup temporary files, and complete
998# config.log.  We remove comments because anyway the quotes in there
999# would cause problems or look ugly.
1000trap 'exit_status=$?
1001  # Save into config.log some information that might help in debugging.
1002  echo >&5
1003  echo "## ----------------- ##" >&5
1004  echo "## Cache variables.  ##" >&5
1005  echo "## ----------------- ##" >&5
1006  echo >&5
1007  # The following way of writing the cache mishandles newlines in values,
1008{
1009  (set) 2>&1 |
1010    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1011    *ac_space=\ *)
1012      sed -n \
1013        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1014    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1015      ;;
1016    *)
1017      sed -n \
1018        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1019      ;;
1020    esac;
1021} >&5
1022  sed "/^$/d" confdefs.h >conftest.log
1023  if test -s conftest.log; then
1024    echo >&5
1025    echo "## ------------ ##" >&5
1026    echo "## confdefs.h.  ##" >&5
1027    echo "## ------------ ##" >&5
1028    echo >&5
1029    cat conftest.log >&5
1030  fi
1031  (echo; echo) >&5
1032  test "$ac_signal" != 0 &&
1033    echo "$as_me: caught signal $ac_signal" >&5
1034  echo "$as_me: exit $exit_status" >&5
1035  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1036    exit $exit_status
1037     ' 0
1038for ac_signal in 1 2 13 15; do
1039  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1040done
1041ac_signal=0
1042
1043# confdefs.h avoids OS command line length limits that DEFS can exceed.
1044rm -rf conftest* confdefs.h
1045# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1046echo >confdefs.h
1047
1048# Let the site file select an alternate cache file if it wants to.
1049# Prefer explicitly selected file to automatically selected ones.
1050if test -z "$CONFIG_SITE"; then
1051  if test "x$prefix" != xNONE; then
1052    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1053  else
1054    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1055  fi
1056fi
1057for ac_site_file in $CONFIG_SITE; do
1058  if test -r "$ac_site_file"; then
1059    { echo "$as_me:1059: loading site script $ac_site_file" >&5
1060echo "$as_me: loading site script $ac_site_file" >&6;}
1061    cat "$ac_site_file" >&5
1062    . "$ac_site_file"
1063  fi
1064done
1065
1066if test -r "$cache_file"; then
1067  # Some versions of bash will fail to source /dev/null (special
1068  # files actually), so we avoid doing that.
1069  if test -f "$cache_file"; then
1070    { echo "$as_me:1070: loading cache $cache_file" >&5
1071echo "$as_me: loading cache $cache_file" >&6;}
1072    case $cache_file in
1073      [\\/]* | ?:[\\/]* ) . $cache_file;;
1074      *)                      . ./$cache_file;;
1075    esac
1076  fi
1077else
1078  { echo "$as_me:1078: creating cache $cache_file" >&5
1079echo "$as_me: creating cache $cache_file" >&6;}
1080  >$cache_file
1081fi
1082
1083# Check that the precious variables saved in the cache have kept the same
1084# value.
1085ac_cache_corrupted=false
1086for ac_var in `(set) 2>&1 |
1087               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1088  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1089  eval ac_new_set=\$ac_env_${ac_var}_set
1090  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1091  eval ac_new_val="\$ac_env_${ac_var}_value"
1092  case $ac_old_set,$ac_new_set in
1093    set,)
1094      { echo "$as_me:1094: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1095echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1096      ac_cache_corrupted=: ;;
1097    ,set)
1098      { echo "$as_me:1098: error: \`$ac_var' was not set in the previous run" >&5
1099echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1100      ac_cache_corrupted=: ;;
1101    ,);;
1102    *)
1103      if test "x$ac_old_val" != "x$ac_new_val"; then
1104        { echo "$as_me:1104: error: \`$ac_var' has changed since the previous run:" >&5
1105echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1106        { echo "$as_me:1106:   former value:  $ac_old_val" >&5
1107echo "$as_me:   former value:  $ac_old_val" >&2;}
1108        { echo "$as_me:1108:   current value: $ac_new_val" >&5
1109echo "$as_me:   current value: $ac_new_val" >&2;}
1110        ac_cache_corrupted=:
1111      fi;;
1112  esac
1113  # Pass precious variables to config.status.  It doesn't matter if
1114  # we pass some twice (in addition to the command line arguments).
1115  if test "$ac_new_set" = set; then
1116    case $ac_new_val in
1117    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1118      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1119      ac_configure_args="$ac_configure_args '$ac_arg'"
1120      ;;
1121    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1122       ;;
1123    esac
1124  fi
1125done
1126if $ac_cache_corrupted; then
1127  { echo "$as_me:1127: error: changes in the environment can compromise the build" >&5
1128echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1129  { { echo "$as_me:1129: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1130echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1131   { (exit 1); exit 1; }; }
1132fi
1133
1134ac_ext=c
1135ac_cpp='$CPP $CPPFLAGS'
1136ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1137ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1138ac_compiler_gnu=$ac_cv_c_compiler_gnu
1139ac_main_return=return
1140
1141case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1142  *c*,-n*) ECHO_N= ECHO_C=	# newlines do not sed ;-) only broken shells would use this case anyway
1143		   ECHO_T='	' ;;
1144  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1145  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1146esac
1147echo "#! $SHELL" >conftest.sh
1148echo  "exit 0"   >>conftest.sh
1149chmod +x conftest.sh
1150if { (echo "$as_me:1150: PATH=\".;.\"; conftest.sh") >&5
1151  (PATH=".;."; conftest.sh) 2>&5
1152  ac_status=$?
1153  echo "$as_me:1153: \$? = $ac_status" >&5
1154  (exit $ac_status); }; then
1155  ac_path_separator=';'
1156else
1157  ac_path_separator=:
1158fi
1159PATH_SEPARATOR="$ac_path_separator"
1160rm -f conftest.sh
1161
1162ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1163
1164top_builddir=`pwd`
1165
1166echo "$as_me:1166: checking for egrep" >&5
1167echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1168if test "${ac_cv_prog_egrep+set}" = set; then
1169  echo $ECHO_N "(cached) $ECHO_C" >&6
1170else
1171  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1172		then ac_cv_prog_egrep='grep -E'
1173		else ac_cv_prog_egrep='egrep'
1174	fi
1175fi
1176echo "$as_me:1176: result: $ac_cv_prog_egrep" >&5
1177echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1178	EGREP=$ac_cv_prog_egrep
1179
1180	test -z "$EGREP" && { { echo "$as_me:1180: error: No egrep program found" >&5
1181echo "$as_me: error: No egrep program found" >&2;}
1182   { (exit 1); exit 1; }; }
1183
1184NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[ 	]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1185NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[ 	]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1186NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[ 	]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1187cf_cv_abi_version=${NCURSES_MAJOR}
1188cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1189cf_cv_timestamp=`date`
1190echo "$as_me:1190: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1191echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1192
1193if test -f $srcdir/VERSION ; then
1194	echo "$as_me:1194: checking for package version" >&5
1195echo $ECHO_N "checking for package version... $ECHO_C" >&6
1196
1197	# if there are not enough fields, cut returns the last one...
1198	cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1199	cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1200	cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1201
1202	# this is how CF_BUNDLED_INTL uses $VERSION:
1203	VERSION="$cf_field1"
1204
1205	VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1206	test -z "$VERSION_MAJOR" && { { echo "$as_me:1206: error: missing major-version" >&5
1207echo "$as_me: error: missing major-version" >&2;}
1208   { (exit 1); exit 1; }; }
1209
1210	VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1211	test -z "$VERSION_MINOR" && { { echo "$as_me:1211: error: missing minor-version" >&5
1212echo "$as_me: error: missing minor-version" >&2;}
1213   { (exit 1); exit 1; }; }
1214
1215	echo "$as_me:1215: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1216echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1217
1218	echo "$as_me:1218: checking for package patch date" >&5
1219echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1220	VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1221	case .$VERSION_PATCH in
1222	(.)
1223		{ { echo "$as_me:1223: error: missing patch-date $VERSION_PATCH" >&5
1224echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1225   { (exit 1); exit 1; }; }
1226		;;
1227	(.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1228		;;
1229	(*)
1230		{ { echo "$as_me:1230: error: illegal patch-date $VERSION_PATCH" >&5
1231echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1232   { (exit 1); exit 1; }; }
1233		;;
1234	esac
1235	echo "$as_me:1235: result: $VERSION_PATCH" >&5
1236echo "${ECHO_T}$VERSION_PATCH" >&6
1237else
1238	{ { echo "$as_me:1238: error: did not find $srcdir/VERSION" >&5
1239echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1240   { (exit 1); exit 1; }; }
1241fi
1242
1243# show the actual data that we have for versions:
1244test -n "$verbose" && echo "	ABI VERSION $VERSION" 1>&6
1245
1246echo "${as_me:-configure}:1246: testing ABI VERSION $VERSION ..." 1>&5
1247
1248test -n "$verbose" && echo "	VERSION_MAJOR $VERSION_MAJOR" 1>&6
1249
1250echo "${as_me:-configure}:1250: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1251
1252test -n "$verbose" && echo "	VERSION_MINOR $VERSION_MINOR" 1>&6
1253
1254echo "${as_me:-configure}:1254: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1255
1256test -n "$verbose" && echo "	VERSION_PATCH $VERSION_PATCH" 1>&6
1257
1258echo "${as_me:-configure}:1258: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1259
1260	cf_PACKAGE=NCURSES
1261	PACKAGE=ncurses
1262
1263cat >>confdefs.h <<EOF
1264#define PACKAGE "$PACKAGE"
1265EOF
1266
1267cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1268
1269	cat >>confdefs.h <<EOF
1270#define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1271EOF
1272
1273	cat >>confdefs.h <<EOF
1274#define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1275EOF
1276
1277test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1278
1279# Check whether --with-rel-version or --without-rel-version was given.
1280if test "${with_rel_version+set}" = set; then
1281  withval="$with_rel_version"
1282  { echo "$as_me:1282: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1283echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1284 cf_cv_rel_version=$withval
1285fi;
1286
1287 NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1288 NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1289
1290if test -n "$NCURSES_MAJOR" ; then
1291  case $NCURSES_MAJOR in
1292  ([0-9]*)
1293 	;;
1294  (*)
1295	{ { echo "$as_me:1295: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1296echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1297   { (exit 1); exit 1; }; }
1298 	;;
1299  esac
1300else
1301  { { echo "$as_me:1301: error: Release major-version value is empty" >&5
1302echo "$as_me: error: Release major-version value is empty" >&2;}
1303   { (exit 1); exit 1; }; }
1304fi
1305
1306if test -n "$NCURSES_MINOR" ; then
1307  case $NCURSES_MINOR in
1308  ([0-9]*)
1309 	;;
1310  (*)
1311	{ { echo "$as_me:1311: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1312echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1313   { (exit 1); exit 1; }; }
1314 	;;
1315  esac
1316else
1317  { { echo "$as_me:1317: error: Release minor-version value is empty" >&5
1318echo "$as_me: error: Release minor-version value is empty" >&2;}
1319   { (exit 1); exit 1; }; }
1320fi
1321
1322test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1323
1324# Check whether --with-abi-version or --without-abi-version was given.
1325if test "${with_abi_version+set}" = set; then
1326  withval="$with_abi_version"
1327
1328	if test "x$cf_cv_abi_version" != "x$withval"
1329	then
1330		{ echo "$as_me:1330: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1331echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1332		case $cf_cv_rel_version in
1333		(5.*)
1334			cf_cv_rel_version=$withval.0
1335			;;
1336		(6.*)
1337			cf_cv_rel_version=$withval.9	# FIXME: should be 10 as of 6.0 release
1338			;;
1339		esac
1340	fi
1341	cf_cv_abi_version=$withval
1342fi;
1343
1344if test -n "$cf_cv_abi_version" ; then
1345  case $cf_cv_abi_version in
1346  ([0-9]*)
1347 	;;
1348  (*)
1349	{ { echo "$as_me:1349: error: ABI version is not a number: $cf_cv_abi_version" >&5
1350echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1351   { (exit 1); exit 1; }; }
1352 	;;
1353  esac
1354else
1355  { { echo "$as_me:1355: error: ABI version value is empty" >&5
1356echo "$as_me: error: ABI version value is empty" >&2;}
1357   { (exit 1); exit 1; }; }
1358fi
1359
1360if test "x$cf_cv_abi_version" != "x$with_abi_version"
1361then
1362	case $cf_cv_rel_version in
1363	(5.*)
1364		cf_cv_rel_version=$with_abi_version.0
1365		;;
1366	esac
1367fi
1368
1369ac_aux_dir=
1370for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1371  if test -f $ac_dir/install-sh; then
1372    ac_aux_dir=$ac_dir
1373    ac_install_sh="$ac_aux_dir/install-sh -c"
1374    break
1375  elif test -f $ac_dir/install.sh; then
1376    ac_aux_dir=$ac_dir
1377    ac_install_sh="$ac_aux_dir/install.sh -c"
1378    break
1379  elif test -f $ac_dir/shtool; then
1380    ac_aux_dir=$ac_dir
1381    ac_install_sh="$ac_aux_dir/shtool install -c"
1382    break
1383  fi
1384done
1385if test -z "$ac_aux_dir"; then
1386  { { echo "$as_me:1386: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1387echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1388   { (exit 1); exit 1; }; }
1389fi
1390ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1391ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1392ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1393
1394# Make sure we can run config.sub.
1395$ac_config_sub sun4 >/dev/null 2>&1 ||
1396  { { echo "$as_me:1396: error: cannot run $ac_config_sub" >&5
1397echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1398   { (exit 1); exit 1; }; }
1399
1400echo "$as_me:1400: checking build system type" >&5
1401echo $ECHO_N "checking build system type... $ECHO_C" >&6
1402if test "${ac_cv_build+set}" = set; then
1403  echo $ECHO_N "(cached) $ECHO_C" >&6
1404else
1405  ac_cv_build_alias=$build_alias
1406test -z "$ac_cv_build_alias" &&
1407  ac_cv_build_alias=`$ac_config_guess`
1408test -z "$ac_cv_build_alias" &&
1409  { { echo "$as_me:1409: error: cannot guess build type; you must specify one" >&5
1410echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1411   { (exit 1); exit 1; }; }
1412ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1413  { { echo "$as_me:1413: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1414echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1415   { (exit 1); exit 1; }; }
1416
1417fi
1418echo "$as_me:1418: result: $ac_cv_build" >&5
1419echo "${ECHO_T}$ac_cv_build" >&6
1420build=$ac_cv_build
1421build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1422build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1423build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1424
1425echo "$as_me:1425: checking host system type" >&5
1426echo $ECHO_N "checking host system type... $ECHO_C" >&6
1427if test "${ac_cv_host+set}" = set; then
1428  echo $ECHO_N "(cached) $ECHO_C" >&6
1429else
1430  ac_cv_host_alias=$host_alias
1431test -z "$ac_cv_host_alias" &&
1432  ac_cv_host_alias=$ac_cv_build_alias
1433ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1434  { { echo "$as_me:1434: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1435echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1436   { (exit 1); exit 1; }; }
1437
1438fi
1439echo "$as_me:1439: result: $ac_cv_host" >&5
1440echo "${ECHO_T}$ac_cv_host" >&6
1441host=$ac_cv_host
1442host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1443host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1444host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1445
1446if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1447	echo "$as_me:1447: checking target system type" >&5
1448echo $ECHO_N "checking target system type... $ECHO_C" >&6
1449if test "${ac_cv_target+set}" = set; then
1450  echo $ECHO_N "(cached) $ECHO_C" >&6
1451else
1452  ac_cv_target_alias=$target_alias
1453test "x$ac_cv_target_alias" = "x" &&
1454  ac_cv_target_alias=$ac_cv_host_alias
1455ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1456  { { echo "$as_me:1456: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1457echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1458   { (exit 1); exit 1; }; }
1459
1460fi
1461echo "$as_me:1461: result: $ac_cv_target" >&5
1462echo "${ECHO_T}$ac_cv_target" >&6
1463target=$ac_cv_target
1464target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1465target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1466target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1467
1468# The aliases save the names the user supplied, while $host etc.
1469# will get canonicalized.
1470test -n "$target_alias" &&
1471  test "$program_prefix$program_suffix$program_transform_name" = \
1472    NONENONEs,x,x, &&
1473  program_prefix=${target_alias}-
1474	system_name="$host_os"
1475else
1476	system_name="`(uname -s -r) 2>/dev/null`"
1477	if test -z "$system_name" ; then
1478		system_name="`(hostname) 2>/dev/null`"
1479	fi
1480fi
1481test -n "$system_name" &&
1482cat >>confdefs.h <<EOF
1483#define SYSTEM_NAME "$system_name"
1484EOF
1485
1486if test "${cf_cv_system_name+set}" = set; then
1487  echo $ECHO_N "(cached) $ECHO_C" >&6
1488else
1489  cf_cv_system_name="$system_name"
1490fi
1491
1492test -z "$system_name" && system_name="$cf_cv_system_name"
1493test -n "$cf_cv_system_name" && echo "$as_me:1493: result: Configuring for $cf_cv_system_name" >&5
1494echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1495
1496if test ".$system_name" != ".$cf_cv_system_name" ; then
1497	echo "$as_me:1497: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1498echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1499	{ { echo "$as_me:1499: error: \"Please remove config.cache and try again.\"" >&5
1500echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1501   { (exit 1); exit 1; }; }
1502fi
1503
1504# Check whether --with-system-type or --without-system-type was given.
1505if test "${with_system_type+set}" = set; then
1506  withval="$with_system_type"
1507  { echo "$as_me:1507: WARNING: overriding system type to $withval" >&5
1508echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1509	cf_cv_system_name=$withval
1510	host_os=$withval
1511
1512fi;
1513
1514###	Save the given $CFLAGS to allow user-override.
1515cf_user_CFLAGS="$CFLAGS"
1516
1517###	Default install-location
1518
1519echo "$as_me:1519: checking for prefix" >&5
1520echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1521if test "x$prefix" = "xNONE" ; then
1522	case "$cf_cv_system_name" in
1523		# non-vendor systems don't have a conflict
1524	(openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1525		prefix=/usr
1526		;;
1527	(*)	prefix=$ac_default_prefix
1528		;;
1529	esac
1530fi
1531echo "$as_me:1531: result: $prefix" >&5
1532echo "${ECHO_T}$prefix" >&6
1533
1534if test "x$prefix" = "xNONE" ; then
1535echo "$as_me:1535: checking for default include-directory" >&5
1536echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1537test -n "$verbose" && echo 1>&6
1538for cf_symbol in \
1539	$includedir \
1540	$includedir/ncurses \
1541	$prefix/include \
1542	$prefix/include/ncurses \
1543	/usr/local/include \
1544	/usr/local/include/ncurses \
1545	/usr/include \
1546	/usr/include/ncurses
1547do
1548	cf_dir=`eval echo $cf_symbol`
1549	if test -f $cf_dir/curses.h ; then
1550	if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1551		includedir="$cf_symbol"
1552		test -n "$verbose"  && echo $ac_n "	found " 1>&6
1553		break
1554	fi
1555	fi
1556	test -n "$verbose"  && echo "	tested $cf_dir" 1>&6
1557done
1558echo "$as_me:1558: result: $includedir" >&5
1559echo "${ECHO_T}$includedir" >&6
1560fi
1561
1562### Defaults for ncurses ABI
1563
1564case x$cf_cv_abi_version in
1565(x[6789])
1566	cf_dft_ext_colors=yes
1567	cf_dft_ext_const=yes
1568	cf_dft_ext_mouse=yes
1569	cf_dft_ext_putwin=yes
1570	cf_dft_ext_spfuncs=yes
1571	cf_dft_filter_syms=yes
1572	cf_dft_chtype=uint32_t
1573	cf_dft_mmask_t=uint32_t
1574	cf_dft_interop=yes
1575	cf_dft_tparm_arg=intptr_t
1576	cf_dft_with_lp64=yes
1577	;;
1578(*)
1579	cf_dft_ext_colors=no
1580	cf_dft_ext_const=no
1581	cf_dft_ext_mouse=no
1582	cf_dft_ext_putwin=no
1583	cf_dft_ext_spfuncs=no
1584	cf_dft_filter_syms=no
1585	cf_dft_chtype=auto
1586	cf_dft_mmask_t=auto
1587	cf_dft_interop=no
1588	cf_dft_tparm_arg=long
1589	cf_dft_with_lp64=no
1590	;;
1591esac
1592
1593###	Checks for programs.
1594
1595# Check whether --with-ada or --without-ada was given.
1596if test "${with_ada+set}" = set; then
1597  withval="$with_ada"
1598  cf_with_ada=$withval
1599else
1600  cf_with_ada=yes
1601fi;
1602
1603if test "x$cf_with_ada" = xyes
1604then
1605	cf_prog_cc="gnatgcc gcc cc"
1606else
1607	cf_prog_cc="gcc cc"
1608fi
1609
1610ac_ext=c
1611ac_cpp='$CPP $CPPFLAGS'
1612ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1613ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1614ac_compiler_gnu=$ac_cv_c_compiler_gnu
1615ac_main_return=return
1616if test -n "$ac_tool_prefix"; then
1617  for ac_prog in $cf_prog_cc
1618  do
1619    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1620set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1621echo "$as_me:1621: checking for $ac_word" >&5
1622echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1623if test "${ac_cv_prog_CC+set}" = set; then
1624  echo $ECHO_N "(cached) $ECHO_C" >&6
1625else
1626  if test -n "$CC"; then
1627  ac_cv_prog_CC="$CC" # Let the user override the test.
1628else
1629  ac_save_IFS=$IFS; IFS=$ac_path_separator
1630ac_dummy="$PATH"
1631for ac_dir in $ac_dummy; do
1632  IFS=$ac_save_IFS
1633  test -z "$ac_dir" && ac_dir=.
1634  $as_executable_p "$ac_dir/$ac_word" || continue
1635ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1636echo "$as_me:1636: found $ac_dir/$ac_word" >&5
1637break
1638done
1639
1640fi
1641fi
1642CC=$ac_cv_prog_CC
1643if test -n "$CC"; then
1644  echo "$as_me:1644: result: $CC" >&5
1645echo "${ECHO_T}$CC" >&6
1646else
1647  echo "$as_me:1647: result: no" >&5
1648echo "${ECHO_T}no" >&6
1649fi
1650
1651    test -n "$CC" && break
1652  done
1653fi
1654if test -z "$CC"; then
1655  ac_ct_CC=$CC
1656  for ac_prog in $cf_prog_cc
1657do
1658  # Extract the first word of "$ac_prog", so it can be a program name with args.
1659set dummy $ac_prog; ac_word=$2
1660echo "$as_me:1660: checking for $ac_word" >&5
1661echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1662if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1663  echo $ECHO_N "(cached) $ECHO_C" >&6
1664else
1665  if test -n "$ac_ct_CC"; then
1666  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1667else
1668  ac_save_IFS=$IFS; IFS=$ac_path_separator
1669ac_dummy="$PATH"
1670for ac_dir in $ac_dummy; do
1671  IFS=$ac_save_IFS
1672  test -z "$ac_dir" && ac_dir=.
1673  $as_executable_p "$ac_dir/$ac_word" || continue
1674ac_cv_prog_ac_ct_CC="$ac_prog"
1675echo "$as_me:1675: found $ac_dir/$ac_word" >&5
1676break
1677done
1678
1679fi
1680fi
1681ac_ct_CC=$ac_cv_prog_ac_ct_CC
1682if test -n "$ac_ct_CC"; then
1683  echo "$as_me:1683: result: $ac_ct_CC" >&5
1684echo "${ECHO_T}$ac_ct_CC" >&6
1685else
1686  echo "$as_me:1686: result: no" >&5
1687echo "${ECHO_T}no" >&6
1688fi
1689
1690  test -n "$ac_ct_CC" && break
1691done
1692
1693  CC=$ac_ct_CC
1694fi
1695
1696test -z "$CC" && { { echo "$as_me:1696: error: no acceptable cc found in \$PATH" >&5
1697echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1698   { (exit 1); exit 1; }; }
1699
1700# Provide some information about the compiler.
1701echo "$as_me:1701:" \
1702     "checking for C compiler version" >&5
1703ac_compiler=`set X $ac_compile; echo $2`
1704{ (eval echo "$as_me:1704: \"$ac_compiler --version </dev/null >&5\"") >&5
1705  (eval $ac_compiler --version </dev/null >&5) 2>&5
1706  ac_status=$?
1707  echo "$as_me:1707: \$? = $ac_status" >&5
1708  (exit $ac_status); }
1709{ (eval echo "$as_me:1709: \"$ac_compiler -v </dev/null >&5\"") >&5
1710  (eval $ac_compiler -v </dev/null >&5) 2>&5
1711  ac_status=$?
1712  echo "$as_me:1712: \$? = $ac_status" >&5
1713  (exit $ac_status); }
1714{ (eval echo "$as_me:1714: \"$ac_compiler -V </dev/null >&5\"") >&5
1715  (eval $ac_compiler -V </dev/null >&5) 2>&5
1716  ac_status=$?
1717  echo "$as_me:1717: \$? = $ac_status" >&5
1718  (exit $ac_status); }
1719
1720cat >conftest.$ac_ext <<_ACEOF
1721#line 1721 "configure"
1722#include "confdefs.h"
1723
1724int
1725main (void)
1726{
1727
1728  ;
1729  return 0;
1730}
1731_ACEOF
1732ac_clean_files_save=$ac_clean_files
1733ac_clean_files="$ac_clean_files a.out a.exe"
1734# Try to create an executable without -o first, disregard a.out.
1735# It will help us diagnose broken compilers, and finding out an intuition
1736# of exeext.
1737echo "$as_me:1737: checking for C compiler default output" >&5
1738echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1739ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1740if { (eval echo "$as_me:1740: \"$ac_link_default\"") >&5
1741  (eval $ac_link_default) 2>&5
1742  ac_status=$?
1743  echo "$as_me:1743: \$? = $ac_status" >&5
1744  (exit $ac_status); }; then
1745  # Find the output, starting from the most likely.  This scheme is
1746# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1747# resort.
1748for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1749                ls a.out conftest 2>/dev/null;
1750                ls a.* conftest.* 2>/dev/null`; do
1751  case $ac_file in
1752    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1753    a.out ) # We found the default executable, but exeext='' is most
1754            # certainly right.
1755            break;;
1756    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1757          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1758          export ac_cv_exeext
1759          break;;
1760    * ) break;;
1761  esac
1762done
1763else
1764  echo "$as_me: failed program was:" >&5
1765cat conftest.$ac_ext >&5
1766{ { echo "$as_me:1766: error: C compiler cannot create executables" >&5
1767echo "$as_me: error: C compiler cannot create executables" >&2;}
1768   { (exit 77); exit 77; }; }
1769fi
1770
1771ac_exeext=$ac_cv_exeext
1772echo "$as_me:1772: result: $ac_file" >&5
1773echo "${ECHO_T}$ac_file" >&6
1774
1775# Check the compiler produces executables we can run.  If not, either
1776# the compiler is broken, or we cross compile.
1777echo "$as_me:1777: checking whether the C compiler works" >&5
1778echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1779# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1780# If not cross compiling, check that we can run a simple program.
1781if test "$cross_compiling" != yes; then
1782  if { ac_try='./$ac_file'
1783  { (eval echo "$as_me:1783: \"$ac_try\"") >&5
1784  (eval $ac_try) 2>&5
1785  ac_status=$?
1786  echo "$as_me:1786: \$? = $ac_status" >&5
1787  (exit $ac_status); }; }; then
1788    cross_compiling=no
1789  else
1790    if test "$cross_compiling" = maybe; then
1791	cross_compiling=yes
1792    else
1793	{ { echo "$as_me:1793: error: cannot run C compiled programs.
1794If you meant to cross compile, use \`--host'." >&5
1795echo "$as_me: error: cannot run C compiled programs.
1796If you meant to cross compile, use \`--host'." >&2;}
1797   { (exit 1); exit 1; }; }
1798    fi
1799  fi
1800fi
1801echo "$as_me:1801: result: yes" >&5
1802echo "${ECHO_T}yes" >&6
1803
1804rm -f a.out a.exe conftest$ac_cv_exeext
1805ac_clean_files=$ac_clean_files_save
1806# Check the compiler produces executables we can run.  If not, either
1807# the compiler is broken, or we cross compile.
1808echo "$as_me:1808: checking whether we are cross compiling" >&5
1809echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1810echo "$as_me:1810: result: $cross_compiling" >&5
1811echo "${ECHO_T}$cross_compiling" >&6
1812
1813echo "$as_me:1813: checking for executable suffix" >&5
1814echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1815if { (eval echo "$as_me:1815: \"$ac_link\"") >&5
1816  (eval $ac_link) 2>&5
1817  ac_status=$?
1818  echo "$as_me:1818: \$? = $ac_status" >&5
1819  (exit $ac_status); }; then
1820  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1821# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1822# work properly (i.e., refer to `conftest.exe'), while it won't with
1823# `rm'.
1824for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1825  case $ac_file in
1826    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1827    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1828          export ac_cv_exeext
1829          break;;
1830    * ) break;;
1831  esac
1832done
1833else
1834  { { echo "$as_me:1834: error: cannot compute EXEEXT: cannot compile and link" >&5
1835echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1836   { (exit 1); exit 1; }; }
1837fi
1838
1839rm -f conftest$ac_cv_exeext
1840echo "$as_me:1840: result: $ac_cv_exeext" >&5
1841echo "${ECHO_T}$ac_cv_exeext" >&6
1842
1843rm -f conftest.$ac_ext
1844EXEEXT=$ac_cv_exeext
1845ac_exeext=$EXEEXT
1846echo "$as_me:1846: checking for object suffix" >&5
1847echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1848if test "${ac_cv_objext+set}" = set; then
1849  echo $ECHO_N "(cached) $ECHO_C" >&6
1850else
1851  cat >conftest.$ac_ext <<_ACEOF
1852#line 1852 "configure"
1853#include "confdefs.h"
1854
1855int
1856main (void)
1857{
1858
1859  ;
1860  return 0;
1861}
1862_ACEOF
1863rm -f conftest.o conftest.obj
1864if { (eval echo "$as_me:1864: \"$ac_compile\"") >&5
1865  (eval $ac_compile) 2>&5
1866  ac_status=$?
1867  echo "$as_me:1867: \$? = $ac_status" >&5
1868  (exit $ac_status); }; then
1869  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1870  case $ac_file in
1871    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1872    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1873       break;;
1874  esac
1875done
1876else
1877  echo "$as_me: failed program was:" >&5
1878cat conftest.$ac_ext >&5
1879{ { echo "$as_me:1879: error: cannot compute OBJEXT: cannot compile" >&5
1880echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1881   { (exit 1); exit 1; }; }
1882fi
1883
1884rm -f conftest.$ac_cv_objext conftest.$ac_ext
1885fi
1886echo "$as_me:1886: result: $ac_cv_objext" >&5
1887echo "${ECHO_T}$ac_cv_objext" >&6
1888OBJEXT=$ac_cv_objext
1889ac_objext=$OBJEXT
1890echo "$as_me:1890: checking whether we are using the GNU C compiler" >&5
1891echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1892if test "${ac_cv_c_compiler_gnu+set}" = set; then
1893  echo $ECHO_N "(cached) $ECHO_C" >&6
1894else
1895  cat >conftest.$ac_ext <<_ACEOF
1896#line 1896 "configure"
1897#include "confdefs.h"
1898
1899int
1900main (void)
1901{
1902#ifndef __GNUC__
1903       choke me
1904#endif
1905
1906  ;
1907  return 0;
1908}
1909_ACEOF
1910rm -f conftest.$ac_objext
1911if { (eval echo "$as_me:1911: \"$ac_compile\"") >&5
1912  (eval $ac_compile) 2>&5
1913  ac_status=$?
1914  echo "$as_me:1914: \$? = $ac_status" >&5
1915  (exit $ac_status); } &&
1916         { ac_try='test -s conftest.$ac_objext'
1917  { (eval echo "$as_me:1917: \"$ac_try\"") >&5
1918  (eval $ac_try) 2>&5
1919  ac_status=$?
1920  echo "$as_me:1920: \$? = $ac_status" >&5
1921  (exit $ac_status); }; }; then
1922  ac_compiler_gnu=yes
1923else
1924  echo "$as_me: failed program was:" >&5
1925cat conftest.$ac_ext >&5
1926ac_compiler_gnu=no
1927fi
1928rm -f conftest.$ac_objext conftest.$ac_ext
1929ac_cv_c_compiler_gnu=$ac_compiler_gnu
1930
1931fi
1932echo "$as_me:1932: result: $ac_cv_c_compiler_gnu" >&5
1933echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1934GCC=`test $ac_compiler_gnu = yes && echo yes`
1935ac_test_CFLAGS=${CFLAGS+set}
1936ac_save_CFLAGS=$CFLAGS
1937CFLAGS="-g"
1938echo "$as_me:1938: checking whether $CC accepts -g" >&5
1939echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1940if test "${ac_cv_prog_cc_g+set}" = set; then
1941  echo $ECHO_N "(cached) $ECHO_C" >&6
1942else
1943  cat >conftest.$ac_ext <<_ACEOF
1944#line 1944 "configure"
1945#include "confdefs.h"
1946
1947int
1948main (void)
1949{
1950
1951  ;
1952  return 0;
1953}
1954_ACEOF
1955rm -f conftest.$ac_objext
1956if { (eval echo "$as_me:1956: \"$ac_compile\"") >&5
1957  (eval $ac_compile) 2>&5
1958  ac_status=$?
1959  echo "$as_me:1959: \$? = $ac_status" >&5
1960  (exit $ac_status); } &&
1961         { ac_try='test -s conftest.$ac_objext'
1962  { (eval echo "$as_me:1962: \"$ac_try\"") >&5
1963  (eval $ac_try) 2>&5
1964  ac_status=$?
1965  echo "$as_me:1965: \$? = $ac_status" >&5
1966  (exit $ac_status); }; }; then
1967  ac_cv_prog_cc_g=yes
1968else
1969  echo "$as_me: failed program was:" >&5
1970cat conftest.$ac_ext >&5
1971ac_cv_prog_cc_g=no
1972fi
1973rm -f conftest.$ac_objext conftest.$ac_ext
1974fi
1975echo "$as_me:1975: result: $ac_cv_prog_cc_g" >&5
1976echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1977if test "$ac_test_CFLAGS" = set; then
1978  CFLAGS=$ac_save_CFLAGS
1979elif test $ac_cv_prog_cc_g = yes; then
1980  if test "$GCC" = yes; then
1981    CFLAGS="-g -O2"
1982  else
1983    CFLAGS="-g"
1984  fi
1985else
1986  if test "$GCC" = yes; then
1987    CFLAGS="-O2"
1988  else
1989    CFLAGS=
1990  fi
1991fi
1992# Some people use a C++ compiler to compile C.  Since we use `exit',
1993# in C++ we need to declare it.  In case someone uses the same compiler
1994# for both compiling C and C++ we need to have the C++ compiler decide
1995# the declaration of exit, since it's the most demanding environment.
1996cat >conftest.$ac_ext <<_ACEOF
1997#ifndef __cplusplus
1998  choke me
1999#endif
2000_ACEOF
2001rm -f conftest.$ac_objext
2002if { (eval echo "$as_me:2002: \"$ac_compile\"") >&5
2003  (eval $ac_compile) 2>&5
2004  ac_status=$?
2005  echo "$as_me:2005: \$? = $ac_status" >&5
2006  (exit $ac_status); } &&
2007         { ac_try='test -s conftest.$ac_objext'
2008  { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2009  (eval $ac_try) 2>&5
2010  ac_status=$?
2011  echo "$as_me:2011: \$? = $ac_status" >&5
2012  (exit $ac_status); }; }; then
2013  for ac_declaration in \
2014   ''\
2015   '#include <stdlib.h>' \
2016   'extern "C" void std::exit (int) throw (); using std::exit;' \
2017   'extern "C" void std::exit (int); using std::exit;' \
2018   'extern "C" void exit (int) throw ();' \
2019   'extern "C" void exit (int);' \
2020   'void exit (int);'
2021do
2022  cat >conftest.$ac_ext <<_ACEOF
2023#line 2023 "configure"
2024#include "confdefs.h"
2025#include <stdlib.h>
2026$ac_declaration
2027int
2028main (void)
2029{
2030exit (42);
2031  ;
2032  return 0;
2033}
2034_ACEOF
2035rm -f conftest.$ac_objext
2036if { (eval echo "$as_me:2036: \"$ac_compile\"") >&5
2037  (eval $ac_compile) 2>&5
2038  ac_status=$?
2039  echo "$as_me:2039: \$? = $ac_status" >&5
2040  (exit $ac_status); } &&
2041         { ac_try='test -s conftest.$ac_objext'
2042  { (eval echo "$as_me:2042: \"$ac_try\"") >&5
2043  (eval $ac_try) 2>&5
2044  ac_status=$?
2045  echo "$as_me:2045: \$? = $ac_status" >&5
2046  (exit $ac_status); }; }; then
2047  :
2048else
2049  echo "$as_me: failed program was:" >&5
2050cat conftest.$ac_ext >&5
2051continue
2052fi
2053rm -f conftest.$ac_objext conftest.$ac_ext
2054  cat >conftest.$ac_ext <<_ACEOF
2055#line 2055 "configure"
2056#include "confdefs.h"
2057$ac_declaration
2058int
2059main (void)
2060{
2061exit (42);
2062  ;
2063  return 0;
2064}
2065_ACEOF
2066rm -f conftest.$ac_objext
2067if { (eval echo "$as_me:2067: \"$ac_compile\"") >&5
2068  (eval $ac_compile) 2>&5
2069  ac_status=$?
2070  echo "$as_me:2070: \$? = $ac_status" >&5
2071  (exit $ac_status); } &&
2072         { ac_try='test -s conftest.$ac_objext'
2073  { (eval echo "$as_me:2073: \"$ac_try\"") >&5
2074  (eval $ac_try) 2>&5
2075  ac_status=$?
2076  echo "$as_me:2076: \$? = $ac_status" >&5
2077  (exit $ac_status); }; }; then
2078  break
2079else
2080  echo "$as_me: failed program was:" >&5
2081cat conftest.$ac_ext >&5
2082fi
2083rm -f conftest.$ac_objext conftest.$ac_ext
2084done
2085rm -rf conftest*
2086if test -n "$ac_declaration"; then
2087  echo '#ifdef __cplusplus' >>confdefs.h
2088  echo $ac_declaration      >>confdefs.h
2089  echo '#endif'             >>confdefs.h
2090fi
2091
2092else
2093  echo "$as_me: failed program was:" >&5
2094cat conftest.$ac_ext >&5
2095fi
2096rm -f conftest.$ac_objext conftest.$ac_ext
2097ac_ext=c
2098ac_cpp='$CPP $CPPFLAGS'
2099ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2100ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2101ac_compiler_gnu=$ac_cv_c_compiler_gnu
2102ac_main_return=return
2103
2104GCC_VERSION=none
2105if test "$GCC" = yes ; then
2106	echo "$as_me:2106: checking version of $CC" >&5
2107echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2108	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.].*//'`"
2109	test -z "$GCC_VERSION" && GCC_VERSION=unknown
2110	echo "$as_me:2110: result: $GCC_VERSION" >&5
2111echo "${ECHO_T}$GCC_VERSION" >&6
2112fi
2113
2114INTEL_COMPILER=no
2115
2116if test "$GCC" = yes ; then
2117	case $host_os in
2118	(linux*|gnu*)
2119		echo "$as_me:2119: checking if this is really Intel C compiler" >&5
2120echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2121		cf_save_CFLAGS="$CFLAGS"
2122		CFLAGS="$CFLAGS -no-gcc"
2123		cat >conftest.$ac_ext <<_ACEOF
2124#line 2124 "configure"
2125#include "confdefs.h"
2126
2127int
2128main (void)
2129{
2130
2131#ifdef __INTEL_COMPILER
2132#else
2133make an error
2134#endif
2135
2136  ;
2137  return 0;
2138}
2139_ACEOF
2140rm -f conftest.$ac_objext
2141if { (eval echo "$as_me:2141: \"$ac_compile\"") >&5
2142  (eval $ac_compile) 2>&5
2143  ac_status=$?
2144  echo "$as_me:2144: \$? = $ac_status" >&5
2145  (exit $ac_status); } &&
2146         { ac_try='test -s conftest.$ac_objext'
2147  { (eval echo "$as_me:2147: \"$ac_try\"") >&5
2148  (eval $ac_try) 2>&5
2149  ac_status=$?
2150  echo "$as_me:2150: \$? = $ac_status" >&5
2151  (exit $ac_status); }; }; then
2152  INTEL_COMPILER=yes
2153cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2154
2155else
2156  echo "$as_me: failed program was:" >&5
2157cat conftest.$ac_ext >&5
2158fi
2159rm -f conftest.$ac_objext conftest.$ac_ext
2160		CFLAGS="$cf_save_CFLAGS"
2161		echo "$as_me:2161: result: $INTEL_COMPILER" >&5
2162echo "${ECHO_T}$INTEL_COMPILER" >&6
2163		;;
2164	esac
2165fi
2166
2167CLANG_COMPILER=no
2168
2169if test "$GCC" = yes ; then
2170	echo "$as_me:2170: checking if this is really Clang C compiler" >&5
2171echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2172	cf_save_CFLAGS="$CFLAGS"
2173	CFLAGS="$CFLAGS -Qunused-arguments"
2174	cat >conftest.$ac_ext <<_ACEOF
2175#line 2175 "configure"
2176#include "confdefs.h"
2177
2178int
2179main (void)
2180{
2181
2182#ifdef __clang__
2183#else
2184make an error
2185#endif
2186
2187  ;
2188  return 0;
2189}
2190_ACEOF
2191rm -f conftest.$ac_objext
2192if { (eval echo "$as_me:2192: \"$ac_compile\"") >&5
2193  (eval $ac_compile) 2>&5
2194  ac_status=$?
2195  echo "$as_me:2195: \$? = $ac_status" >&5
2196  (exit $ac_status); } &&
2197         { ac_try='test -s conftest.$ac_objext'
2198  { (eval echo "$as_me:2198: \"$ac_try\"") >&5
2199  (eval $ac_try) 2>&5
2200  ac_status=$?
2201  echo "$as_me:2201: \$? = $ac_status" >&5
2202  (exit $ac_status); }; }; then
2203  CLANG_COMPILER=yes
2204cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
2205
2206else
2207  echo "$as_me: failed program was:" >&5
2208cat conftest.$ac_ext >&5
2209fi
2210rm -f conftest.$ac_objext conftest.$ac_ext
2211	CFLAGS="$cf_save_CFLAGS"
2212	echo "$as_me:2212: result: $CLANG_COMPILER" >&5
2213echo "${ECHO_T}$CLANG_COMPILER" >&6
2214fi
2215
2216echo "$as_me:2216: checking for $CC option to accept ANSI C" >&5
2217echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2218if test "${ac_cv_prog_cc_stdc+set}" = set; then
2219  echo $ECHO_N "(cached) $ECHO_C" >&6
2220else
2221  ac_cv_prog_cc_stdc=no
2222ac_save_CC=$CC
2223cat >conftest.$ac_ext <<_ACEOF
2224#line 2224 "configure"
2225#include "confdefs.h"
2226#include <stdarg.h>
2227#include <stdio.h>
2228#include <sys/types.h>
2229#include <sys/stat.h>
2230/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2231struct buf { int x; };
2232FILE * (*rcsopen) (struct buf *, struct stat *, int);
2233static char *e (p, i)
2234     char **p;
2235     int i;
2236{
2237  return p[i];
2238}
2239static char *f (char * (*g) (char **, int), char **p, ...)
2240{
2241  char *s;
2242  va_list v;
2243  va_start (v,p);
2244  s = g (p, va_arg (v,int));
2245  va_end (v);
2246  return s;
2247}
2248int test (int i, double x);
2249struct s1 {int (*f) (int a);};
2250struct s2 {int (*f) (double a);};
2251int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2252int argc;
2253char **argv;
2254int
2255main (void)
2256{
2257return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2258  ;
2259  return 0;
2260}
2261_ACEOF
2262# Don't try gcc -ansi; that turns off useful extensions and
2263# breaks some systems' header files.
2264# AIX			-qlanglvl=ansi
2265# Ultrix and OSF/1	-std1
2266# HP-UX 10.20 and later	-Ae
2267# HP-UX older versions	-Aa -D_HPUX_SOURCE
2268# SVR4			-Xc -D__EXTENSIONS__
2269for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2270do
2271  CC="$ac_save_CC $ac_arg"
2272  rm -f conftest.$ac_objext
2273if { (eval echo "$as_me:2273: \"$ac_compile\"") >&5
2274  (eval $ac_compile) 2>&5
2275  ac_status=$?
2276  echo "$as_me:2276: \$? = $ac_status" >&5
2277  (exit $ac_status); } &&
2278         { ac_try='test -s conftest.$ac_objext'
2279  { (eval echo "$as_me:2279: \"$ac_try\"") >&5
2280  (eval $ac_try) 2>&5
2281  ac_status=$?
2282  echo "$as_me:2282: \$? = $ac_status" >&5
2283  (exit $ac_status); }; }; then
2284  ac_cv_prog_cc_stdc=$ac_arg
2285break
2286else
2287  echo "$as_me: failed program was:" >&5
2288cat conftest.$ac_ext >&5
2289fi
2290rm -f conftest.$ac_objext
2291done
2292rm -f conftest.$ac_ext conftest.$ac_objext
2293CC=$ac_save_CC
2294
2295fi
2296
2297case "x$ac_cv_prog_cc_stdc" in
2298  x|xno)
2299    echo "$as_me:2299: result: none needed" >&5
2300echo "${ECHO_T}none needed" >&6 ;;
2301  *)
2302    echo "$as_me:2302: result: $ac_cv_prog_cc_stdc" >&5
2303echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2304    CC="$CC $ac_cv_prog_cc_stdc" ;;
2305esac
2306
2307# This should have been defined by AC_PROG_CC
2308: ${CC:=cc}
2309
2310echo "$as_me:2310: checking \$CFLAGS variable" >&5
2311echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2312case "x$CFLAGS" in
2313(*-[IUD]*)
2314	echo "$as_me:2314: result: broken" >&5
2315echo "${ECHO_T}broken" >&6
2316	{ echo "$as_me:2316: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2317echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2318	cf_flags="$CFLAGS"
2319	CFLAGS=
2320	for cf_arg in $cf_flags
2321	do
2322
2323cf_fix_cppflags=no
2324cf_new_cflags=
2325cf_new_cppflags=
2326cf_new_extra_cppflags=
2327
2328for cf_add_cflags in $cf_arg
2329do
2330case $cf_fix_cppflags in
2331(no)
2332	case $cf_add_cflags in
2333	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2334		case $cf_add_cflags in
2335		(-D*)
2336			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2337
2338			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2339				&& test -z "${cf_tst_cflags}" \
2340				&& cf_fix_cppflags=yes
2341
2342			if test $cf_fix_cppflags = yes ; then
2343
2344	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2345	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2346
2347				continue
2348			elif test "${cf_tst_cflags}" = "\"'" ; then
2349
2350	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2351	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2352
2353				continue
2354			fi
2355			;;
2356		esac
2357		case "$CPPFLAGS" in
2358		(*$cf_add_cflags)
2359			;;
2360		(*)
2361			case $cf_add_cflags in
2362			(-D*)
2363				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2364
2365CPPFLAGS=`echo "$CPPFLAGS" | \
2366	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2367		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2368
2369				;;
2370			esac
2371
2372	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2373	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2374
2375			;;
2376		esac
2377		;;
2378	(*)
2379
2380	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2381	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2382
2383		;;
2384	esac
2385	;;
2386(yes)
2387
2388	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2389	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2390
2391	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2392
2393	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2394		&& test -z "${cf_tst_cflags}" \
2395		&& cf_fix_cppflags=no
2396	;;
2397esac
2398done
2399
2400if test -n "$cf_new_cflags" ; then
2401
2402	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2403	CFLAGS="${CFLAGS}$cf_new_cflags"
2404
2405fi
2406
2407if test -n "$cf_new_cppflags" ; then
2408
2409	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2410	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2411
2412fi
2413
2414if test -n "$cf_new_extra_cppflags" ; then
2415
2416	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2417	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2418
2419fi
2420
2421	done
2422	;;
2423(*)
2424	echo "$as_me:2424: result: ok" >&5
2425echo "${ECHO_T}ok" >&6
2426	;;
2427esac
2428
2429echo "$as_me:2429: checking \$CC variable" >&5
2430echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2431case "$CC" in
2432(*[\ \	]-*)
2433	echo "$as_me:2433: result: broken" >&5
2434echo "${ECHO_T}broken" >&6
2435	{ echo "$as_me:2435: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2436echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2437	# humor him...
2438	cf_prog=`echo "$CC" | sed -e 's/	/ /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2439	cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2440	CC="$cf_prog"
2441	for cf_arg in $cf_flags
2442	do
2443		case "x$cf_arg" in
2444		(x-[IUDfgOW]*)
2445
2446cf_fix_cppflags=no
2447cf_new_cflags=
2448cf_new_cppflags=
2449cf_new_extra_cppflags=
2450
2451for cf_add_cflags in $cf_arg
2452do
2453case $cf_fix_cppflags in
2454(no)
2455	case $cf_add_cflags in
2456	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2457		case $cf_add_cflags in
2458		(-D*)
2459			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2460
2461			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2462				&& test -z "${cf_tst_cflags}" \
2463				&& cf_fix_cppflags=yes
2464
2465			if test $cf_fix_cppflags = yes ; then
2466
2467	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2468	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2469
2470				continue
2471			elif test "${cf_tst_cflags}" = "\"'" ; then
2472
2473	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2474	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2475
2476				continue
2477			fi
2478			;;
2479		esac
2480		case "$CPPFLAGS" in
2481		(*$cf_add_cflags)
2482			;;
2483		(*)
2484			case $cf_add_cflags in
2485			(-D*)
2486				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2487
2488CPPFLAGS=`echo "$CPPFLAGS" | \
2489	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2490		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2491
2492				;;
2493			esac
2494
2495	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2496	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2497
2498			;;
2499		esac
2500		;;
2501	(*)
2502
2503	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2504	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2505
2506		;;
2507	esac
2508	;;
2509(yes)
2510
2511	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2512	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2513
2514	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2515
2516	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2517		&& test -z "${cf_tst_cflags}" \
2518		&& cf_fix_cppflags=no
2519	;;
2520esac
2521done
2522
2523if test -n "$cf_new_cflags" ; then
2524
2525	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2526	CFLAGS="${CFLAGS}$cf_new_cflags"
2527
2528fi
2529
2530if test -n "$cf_new_cppflags" ; then
2531
2532	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2533	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2534
2535fi
2536
2537if test -n "$cf_new_extra_cppflags" ; then
2538
2539	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2540	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2541
2542fi
2543
2544			;;
2545		(*)
2546			CC="$CC $cf_arg"
2547			;;
2548		esac
2549	done
2550	test -n "$verbose" && echo "	resulting CC: '$CC'" 1>&6
2551
2552echo "${as_me:-configure}:2552: testing resulting CC: '$CC' ..." 1>&5
2553
2554	test -n "$verbose" && echo "	resulting CFLAGS: '$CFLAGS'" 1>&6
2555
2556echo "${as_me:-configure}:2556: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2557
2558	test -n "$verbose" && echo "	resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2559
2560echo "${as_me:-configure}:2560: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2561
2562	;;
2563(*)
2564	echo "$as_me:2564: result: ok" >&5
2565echo "${ECHO_T}ok" >&6
2566	;;
2567esac
2568
2569ac_ext=c
2570ac_cpp='$CPP $CPPFLAGS'
2571ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2572ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2573ac_compiler_gnu=$ac_cv_c_compiler_gnu
2574ac_main_return=return
2575echo "$as_me:2575: checking how to run the C preprocessor" >&5
2576echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2577# On Suns, sometimes $CPP names a directory.
2578if test -n "$CPP" && test -d "$CPP"; then
2579  CPP=
2580fi
2581if test -z "$CPP"; then
2582  if test "${ac_cv_prog_CPP+set}" = set; then
2583  echo $ECHO_N "(cached) $ECHO_C" >&6
2584else
2585      # Double quotes because CPP needs to be expanded
2586    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2587    do
2588      ac_preproc_ok=false
2589for ac_c_preproc_warn_flag in '' yes
2590do
2591  # Use a header file that comes with gcc, so configuring glibc
2592  # with a fresh cross-compiler works.
2593  # On the NeXT, cc -E runs the code through the compiler's parser,
2594  # not just through cpp. "Syntax error" is here to catch this case.
2595  cat >conftest.$ac_ext <<_ACEOF
2596#line 2596 "configure"
2597#include "confdefs.h"
2598#include <assert.h>
2599                     Syntax error
2600_ACEOF
2601if { (eval echo "$as_me:2601: \"$ac_cpp conftest.$ac_ext\"") >&5
2602  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2603  ac_status=$?
2604  egrep -v '^ *\+' conftest.er1 >conftest.err
2605  rm -f conftest.er1
2606  cat conftest.err >&5
2607  echo "$as_me:2607: \$? = $ac_status" >&5
2608  (exit $ac_status); } >/dev/null; then
2609  if test -s conftest.err; then
2610    ac_cpp_err=$ac_c_preproc_warn_flag
2611  else
2612    ac_cpp_err=
2613  fi
2614else
2615  ac_cpp_err=yes
2616fi
2617if test -z "$ac_cpp_err"; then
2618  :
2619else
2620  echo "$as_me: failed program was:" >&5
2621  cat conftest.$ac_ext >&5
2622  # Broken: fails on valid input.
2623continue
2624fi
2625rm -f conftest.err conftest.$ac_ext
2626
2627  # OK, works on sane cases.  Now check whether non-existent headers
2628  # can be detected and how.
2629  cat >conftest.$ac_ext <<_ACEOF
2630#line 2630 "configure"
2631#include "confdefs.h"
2632#include <ac_nonexistent.h>
2633_ACEOF
2634if { (eval echo "$as_me:2634: \"$ac_cpp conftest.$ac_ext\"") >&5
2635  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2636  ac_status=$?
2637  egrep -v '^ *\+' conftest.er1 >conftest.err
2638  rm -f conftest.er1
2639  cat conftest.err >&5
2640  echo "$as_me:2640: \$? = $ac_status" >&5
2641  (exit $ac_status); } >/dev/null; then
2642  if test -s conftest.err; then
2643    ac_cpp_err=$ac_c_preproc_warn_flag
2644  else
2645    ac_cpp_err=
2646  fi
2647else
2648  ac_cpp_err=yes
2649fi
2650if test -z "$ac_cpp_err"; then
2651  # Broken: success on invalid input.
2652continue
2653else
2654  echo "$as_me: failed program was:" >&5
2655  cat conftest.$ac_ext >&5
2656  # Passes both tests.
2657ac_preproc_ok=:
2658break
2659fi
2660rm -f conftest.err conftest.$ac_ext
2661
2662done
2663# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2664rm -f conftest.err conftest.$ac_ext
2665if $ac_preproc_ok; then
2666  break
2667fi
2668
2669    done
2670    ac_cv_prog_CPP=$CPP
2671
2672fi
2673  CPP=$ac_cv_prog_CPP
2674else
2675  ac_cv_prog_CPP=$CPP
2676fi
2677echo "$as_me:2677: result: $CPP" >&5
2678echo "${ECHO_T}$CPP" >&6
2679ac_preproc_ok=false
2680for ac_c_preproc_warn_flag in '' yes
2681do
2682  # Use a header file that comes with gcc, so configuring glibc
2683  # with a fresh cross-compiler works.
2684  # On the NeXT, cc -E runs the code through the compiler's parser,
2685  # not just through cpp. "Syntax error" is here to catch this case.
2686  cat >conftest.$ac_ext <<_ACEOF
2687#line 2687 "configure"
2688#include "confdefs.h"
2689#include <assert.h>
2690                     Syntax error
2691_ACEOF
2692if { (eval echo "$as_me:2692: \"$ac_cpp conftest.$ac_ext\"") >&5
2693  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2694  ac_status=$?
2695  egrep -v '^ *\+' conftest.er1 >conftest.err
2696  rm -f conftest.er1
2697  cat conftest.err >&5
2698  echo "$as_me:2698: \$? = $ac_status" >&5
2699  (exit $ac_status); } >/dev/null; then
2700  if test -s conftest.err; then
2701    ac_cpp_err=$ac_c_preproc_warn_flag
2702  else
2703    ac_cpp_err=
2704  fi
2705else
2706  ac_cpp_err=yes
2707fi
2708if test -z "$ac_cpp_err"; then
2709  :
2710else
2711  echo "$as_me: failed program was:" >&5
2712  cat conftest.$ac_ext >&5
2713  # Broken: fails on valid input.
2714continue
2715fi
2716rm -f conftest.err conftest.$ac_ext
2717
2718  # OK, works on sane cases.  Now check whether non-existent headers
2719  # can be detected and how.
2720  cat >conftest.$ac_ext <<_ACEOF
2721#line 2721 "configure"
2722#include "confdefs.h"
2723#include <ac_nonexistent.h>
2724_ACEOF
2725if { (eval echo "$as_me:2725: \"$ac_cpp conftest.$ac_ext\"") >&5
2726  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2727  ac_status=$?
2728  egrep -v '^ *\+' conftest.er1 >conftest.err
2729  rm -f conftest.er1
2730  cat conftest.err >&5
2731  echo "$as_me:2731: \$? = $ac_status" >&5
2732  (exit $ac_status); } >/dev/null; then
2733  if test -s conftest.err; then
2734    ac_cpp_err=$ac_c_preproc_warn_flag
2735  else
2736    ac_cpp_err=
2737  fi
2738else
2739  ac_cpp_err=yes
2740fi
2741if test -z "$ac_cpp_err"; then
2742  # Broken: success on invalid input.
2743continue
2744else
2745  echo "$as_me: failed program was:" >&5
2746  cat conftest.$ac_ext >&5
2747  # Passes both tests.
2748ac_preproc_ok=:
2749break
2750fi
2751rm -f conftest.err conftest.$ac_ext
2752
2753done
2754# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2755rm -f conftest.err conftest.$ac_ext
2756if $ac_preproc_ok; then
2757  :
2758else
2759  { { echo "$as_me:2759: error: C preprocessor \"$CPP\" fails sanity check" >&5
2760echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2761   { (exit 1); exit 1; }; }
2762fi
2763
2764ac_ext=c
2765ac_cpp='$CPP $CPPFLAGS'
2766ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2767ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2768ac_compiler_gnu=$ac_cv_c_compiler_gnu
2769ac_main_return=return
2770
2771if test $ac_cv_c_compiler_gnu = yes; then
2772    echo "$as_me:2772: checking whether $CC needs -traditional" >&5
2773echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2774if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2775  echo $ECHO_N "(cached) $ECHO_C" >&6
2776else
2777    ac_pattern="Autoconf.*'x'"
2778  cat >conftest.$ac_ext <<_ACEOF
2779#line 2779 "configure"
2780#include "confdefs.h"
2781#include <sgtty.h>
2782int Autoconf = TIOCGETP;
2783_ACEOF
2784if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2785  egrep "$ac_pattern" >/dev/null 2>&1; then
2786  ac_cv_prog_gcc_traditional=yes
2787else
2788  ac_cv_prog_gcc_traditional=no
2789fi
2790rm -rf conftest*
2791
2792  if test $ac_cv_prog_gcc_traditional = no; then
2793    cat >conftest.$ac_ext <<_ACEOF
2794#line 2794 "configure"
2795#include "confdefs.h"
2796#include <termio.h>
2797int Autoconf = TCGETA;
2798_ACEOF
2799if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2800  egrep "$ac_pattern" >/dev/null 2>&1; then
2801  ac_cv_prog_gcc_traditional=yes
2802fi
2803rm -rf conftest*
2804
2805  fi
2806fi
2807echo "$as_me:2807: result: $ac_cv_prog_gcc_traditional" >&5
2808echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2809  if test $ac_cv_prog_gcc_traditional = yes; then
2810    CC="$CC -traditional"
2811  fi
2812fi
2813
2814echo "$as_me:2814: checking whether $CC understands -c and -o together" >&5
2815echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2816if test "${cf_cv_prog_CC_c_o+set}" = set; then
2817  echo $ECHO_N "(cached) $ECHO_C" >&6
2818else
2819
2820cat > conftest.$ac_ext <<CF_EOF
2821int main(void)
2822{
2823	${cf_cv_main_return:-return}(0);
2824}
2825CF_EOF
2826# We do the test twice because some compilers refuse to overwrite an
2827# existing .o file with -o, though they will create one.
2828ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2829if { (eval echo "$as_me:2829: \"$ac_try\"") >&5
2830  (eval $ac_try) 2>&5
2831  ac_status=$?
2832  echo "$as_me:2832: \$? = $ac_status" >&5
2833  (exit $ac_status); } &&
2834  test -f conftest2.$ac_objext && { (eval echo "$as_me:2834: \"$ac_try\"") >&5
2835  (eval $ac_try) 2>&5
2836  ac_status=$?
2837  echo "$as_me:2837: \$? = $ac_status" >&5
2838  (exit $ac_status); };
2839then
2840  eval cf_cv_prog_CC_c_o=yes
2841else
2842  eval cf_cv_prog_CC_c_o=no
2843fi
2844rm -rf conftest*
2845
2846fi
2847if test $cf_cv_prog_CC_c_o = yes; then
2848  echo "$as_me:2848: result: yes" >&5
2849echo "${ECHO_T}yes" >&6
2850else
2851  echo "$as_me:2851: result: no" >&5
2852echo "${ECHO_T}no" >&6
2853fi
2854
2855if test "$cross_compiling" = yes ; then
2856	LDCONFIG=:
2857else
2858	case "$cf_cv_system_name" in
2859	(dragonfly*|mirbsd*|freebsd*)
2860		test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2861		;;
2862	(*) LDPATH=$PATH:/sbin:/usr/sbin
2863		# Extract the first word of "ldconfig", so it can be a program name with args.
2864set dummy ldconfig; ac_word=$2
2865echo "$as_me:2865: checking for $ac_word" >&5
2866echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2867if test "${ac_cv_path_LDCONFIG+set}" = set; then
2868  echo $ECHO_N "(cached) $ECHO_C" >&6
2869else
2870  case $LDCONFIG in
2871  [\\/]* | ?:[\\/]*)
2872  ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2873  ;;
2874  *)
2875  ac_save_IFS=$IFS; IFS=$ac_path_separator
2876ac_dummy="$LDPATH"
2877for ac_dir in $ac_dummy; do
2878  IFS=$ac_save_IFS
2879  test -z "$ac_dir" && ac_dir=.
2880  if $as_executable_p "$ac_dir/$ac_word"; then
2881   ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2882   echo "$as_me:2882: found $ac_dir/$ac_word" >&5
2883   break
2884fi
2885done
2886
2887  ;;
2888esac
2889fi
2890LDCONFIG=$ac_cv_path_LDCONFIG
2891
2892if test -n "$LDCONFIG"; then
2893  echo "$as_me:2893: result: $LDCONFIG" >&5
2894echo "${ECHO_T}$LDCONFIG" >&6
2895else
2896  echo "$as_me:2896: result: no" >&5
2897echo "${ECHO_T}no" >&6
2898fi
2899
2900		;;
2901	esac
2902fi
2903
2904echo "$as_me:2904: checking if you want to ensure bool is consistent with C++" >&5
2905echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2906
2907# Check whether --with-cxx or --without-cxx was given.
2908if test "${with_cxx+set}" = set; then
2909  withval="$with_cxx"
2910  cf_with_cxx=$withval
2911else
2912  cf_with_cxx=yes
2913fi;
2914echo "$as_me:2914: result: $cf_with_cxx" >&5
2915echo "${ECHO_T}$cf_with_cxx" >&6
2916if test "X$cf_with_cxx" = Xno ; then
2917	CXX=""
2918	GXX=""
2919else
2920	# with autoconf 2.13, we can change the error to a warning:
2921		ac_ext=cc
2922ac_cpp='$CXXCPP $CPPFLAGS'
2923ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2924ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2925ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2926ac_main_return=return
2927if test -n "$ac_tool_prefix"; then
2928  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2929  do
2930    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2931set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2932echo "$as_me:2932: checking for $ac_word" >&5
2933echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2934if test "${ac_cv_prog_CXX+set}" = set; then
2935  echo $ECHO_N "(cached) $ECHO_C" >&6
2936else
2937  if test -n "$CXX"; then
2938  ac_cv_prog_CXX="$CXX" # Let the user override the test.
2939else
2940  ac_save_IFS=$IFS; IFS=$ac_path_separator
2941ac_dummy="$PATH"
2942for ac_dir in $ac_dummy; do
2943  IFS=$ac_save_IFS
2944  test -z "$ac_dir" && ac_dir=.
2945  $as_executable_p "$ac_dir/$ac_word" || continue
2946ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2947echo "$as_me:2947: found $ac_dir/$ac_word" >&5
2948break
2949done
2950
2951fi
2952fi
2953CXX=$ac_cv_prog_CXX
2954if test -n "$CXX"; then
2955  echo "$as_me:2955: result: $CXX" >&5
2956echo "${ECHO_T}$CXX" >&6
2957else
2958  echo "$as_me:2958: result: no" >&5
2959echo "${ECHO_T}no" >&6
2960fi
2961
2962    test -n "$CXX" && break
2963  done
2964fi
2965if test -z "$CXX"; then
2966  ac_ct_CXX=$CXX
2967  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2968do
2969  # Extract the first word of "$ac_prog", so it can be a program name with args.
2970set dummy $ac_prog; ac_word=$2
2971echo "$as_me:2971: checking for $ac_word" >&5
2972echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2973if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2974  echo $ECHO_N "(cached) $ECHO_C" >&6
2975else
2976  if test -n "$ac_ct_CXX"; then
2977  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2978else
2979  ac_save_IFS=$IFS; IFS=$ac_path_separator
2980ac_dummy="$PATH"
2981for ac_dir in $ac_dummy; do
2982  IFS=$ac_save_IFS
2983  test -z "$ac_dir" && ac_dir=.
2984  $as_executable_p "$ac_dir/$ac_word" || continue
2985ac_cv_prog_ac_ct_CXX="$ac_prog"
2986echo "$as_me:2986: found $ac_dir/$ac_word" >&5
2987break
2988done
2989
2990fi
2991fi
2992ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2993if test -n "$ac_ct_CXX"; then
2994  echo "$as_me:2994: result: $ac_ct_CXX" >&5
2995echo "${ECHO_T}$ac_ct_CXX" >&6
2996else
2997  echo "$as_me:2997: result: no" >&5
2998echo "${ECHO_T}no" >&6
2999fi
3000
3001  test -n "$ac_ct_CXX" && break
3002done
3003test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3004
3005  CXX=$ac_ct_CXX
3006fi
3007
3008# Provide some information about the compiler.
3009echo "$as_me:3009:" \
3010     "checking for C++ compiler version" >&5
3011ac_compiler=`set X $ac_compile; echo $2`
3012{ (eval echo "$as_me:3012: \"$ac_compiler --version </dev/null >&5\"") >&5
3013  (eval $ac_compiler --version </dev/null >&5) 2>&5
3014  ac_status=$?
3015  echo "$as_me:3015: \$? = $ac_status" >&5
3016  (exit $ac_status); }
3017{ (eval echo "$as_me:3017: \"$ac_compiler -v </dev/null >&5\"") >&5
3018  (eval $ac_compiler -v </dev/null >&5) 2>&5
3019  ac_status=$?
3020  echo "$as_me:3020: \$? = $ac_status" >&5
3021  (exit $ac_status); }
3022{ (eval echo "$as_me:3022: \"$ac_compiler -V </dev/null >&5\"") >&5
3023  (eval $ac_compiler -V </dev/null >&5) 2>&5
3024  ac_status=$?
3025  echo "$as_me:3025: \$? = $ac_status" >&5
3026  (exit $ac_status); }
3027
3028echo "$as_me:3028: checking whether we are using the GNU C++ compiler" >&5
3029echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3030if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3031  echo $ECHO_N "(cached) $ECHO_C" >&6
3032else
3033  cat >conftest.$ac_ext <<_ACEOF
3034#line 3034 "configure"
3035#include "confdefs.h"
3036
3037int
3038main (void)
3039{
3040#ifndef __GNUC__
3041       choke me
3042#endif
3043
3044  ;
3045  return 0;
3046}
3047_ACEOF
3048rm -f conftest.$ac_objext
3049if { (eval echo "$as_me:3049: \"$ac_compile\"") >&5
3050  (eval $ac_compile) 2>&5
3051  ac_status=$?
3052  echo "$as_me:3052: \$? = $ac_status" >&5
3053  (exit $ac_status); } &&
3054         { ac_try='test -s conftest.$ac_objext'
3055  { (eval echo "$as_me:3055: \"$ac_try\"") >&5
3056  (eval $ac_try) 2>&5
3057  ac_status=$?
3058  echo "$as_me:3058: \$? = $ac_status" >&5
3059  (exit $ac_status); }; }; then
3060  ac_compiler_gnu=yes
3061else
3062  echo "$as_me: failed program was:" >&5
3063cat conftest.$ac_ext >&5
3064ac_compiler_gnu=no
3065fi
3066rm -f conftest.$ac_objext conftest.$ac_ext
3067ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3068
3069fi
3070echo "$as_me:3070: result: $ac_cv_cxx_compiler_gnu" >&5
3071echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3072GXX=`test $ac_compiler_gnu = yes && echo yes`
3073ac_test_CXXFLAGS=${CXXFLAGS+set}
3074ac_save_CXXFLAGS=$CXXFLAGS
3075CXXFLAGS="-g"
3076echo "$as_me:3076: checking whether $CXX accepts -g" >&5
3077echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3078if test "${ac_cv_prog_cxx_g+set}" = set; then
3079  echo $ECHO_N "(cached) $ECHO_C" >&6
3080else
3081  cat >conftest.$ac_ext <<_ACEOF
3082#line 3082 "configure"
3083#include "confdefs.h"
3084
3085int
3086main (void)
3087{
3088
3089  ;
3090  return 0;
3091}
3092_ACEOF
3093rm -f conftest.$ac_objext
3094if { (eval echo "$as_me:3094: \"$ac_compile\"") >&5
3095  (eval $ac_compile) 2>&5
3096  ac_status=$?
3097  echo "$as_me:3097: \$? = $ac_status" >&5
3098  (exit $ac_status); } &&
3099         { ac_try='test -s conftest.$ac_objext'
3100  { (eval echo "$as_me:3100: \"$ac_try\"") >&5
3101  (eval $ac_try) 2>&5
3102  ac_status=$?
3103  echo "$as_me:3103: \$? = $ac_status" >&5
3104  (exit $ac_status); }; }; then
3105  ac_cv_prog_cxx_g=yes
3106else
3107  echo "$as_me: failed program was:" >&5
3108cat conftest.$ac_ext >&5
3109ac_cv_prog_cxx_g=no
3110fi
3111rm -f conftest.$ac_objext conftest.$ac_ext
3112fi
3113echo "$as_me:3113: result: $ac_cv_prog_cxx_g" >&5
3114echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3115if test "$ac_test_CXXFLAGS" = set; then
3116  CXXFLAGS=$ac_save_CXXFLAGS
3117elif test $ac_cv_prog_cxx_g = yes; then
3118  if test "$GXX" = yes; then
3119    CXXFLAGS="-g -O2"
3120  else
3121    CXXFLAGS="-g"
3122  fi
3123else
3124  if test "$GXX" = yes; then
3125    CXXFLAGS="-O2"
3126  else
3127    CXXFLAGS=
3128  fi
3129fi
3130for ac_declaration in \
3131   ''\
3132   '#include <stdlib.h>' \
3133   'extern "C" void std::exit (int) throw (); using std::exit;' \
3134   'extern "C" void std::exit (int); using std::exit;' \
3135   'extern "C" void exit (int) throw ();' \
3136   'extern "C" void exit (int);' \
3137   'void exit (int);'
3138do
3139  cat >conftest.$ac_ext <<_ACEOF
3140#line 3140 "configure"
3141#include "confdefs.h"
3142#include <stdlib.h>
3143$ac_declaration
3144int
3145main (void)
3146{
3147exit (42);
3148  ;
3149  return 0;
3150}
3151_ACEOF
3152rm -f conftest.$ac_objext
3153if { (eval echo "$as_me:3153: \"$ac_compile\"") >&5
3154  (eval $ac_compile) 2>&5
3155  ac_status=$?
3156  echo "$as_me:3156: \$? = $ac_status" >&5
3157  (exit $ac_status); } &&
3158         { ac_try='test -s conftest.$ac_objext'
3159  { (eval echo "$as_me:3159: \"$ac_try\"") >&5
3160  (eval $ac_try) 2>&5
3161  ac_status=$?
3162  echo "$as_me:3162: \$? = $ac_status" >&5
3163  (exit $ac_status); }; }; then
3164  :
3165else
3166  echo "$as_me: failed program was:" >&5
3167cat conftest.$ac_ext >&5
3168continue
3169fi
3170rm -f conftest.$ac_objext conftest.$ac_ext
3171  cat >conftest.$ac_ext <<_ACEOF
3172#line 3172 "configure"
3173#include "confdefs.h"
3174$ac_declaration
3175int
3176main (void)
3177{
3178exit (42);
3179  ;
3180  return 0;
3181}
3182_ACEOF
3183rm -f conftest.$ac_objext
3184if { (eval echo "$as_me:3184: \"$ac_compile\"") >&5
3185  (eval $ac_compile) 2>&5
3186  ac_status=$?
3187  echo "$as_me:3187: \$? = $ac_status" >&5
3188  (exit $ac_status); } &&
3189         { ac_try='test -s conftest.$ac_objext'
3190  { (eval echo "$as_me:3190: \"$ac_try\"") >&5
3191  (eval $ac_try) 2>&5
3192  ac_status=$?
3193  echo "$as_me:3193: \$? = $ac_status" >&5
3194  (exit $ac_status); }; }; then
3195  break
3196else
3197  echo "$as_me: failed program was:" >&5
3198cat conftest.$ac_ext >&5
3199fi
3200rm -f conftest.$ac_objext conftest.$ac_ext
3201done
3202rm -rf conftest*
3203if test -n "$ac_declaration"; then
3204  echo '#ifdef __cplusplus' >>confdefs.h
3205  echo $ac_declaration      >>confdefs.h
3206  echo '#endif'             >>confdefs.h
3207fi
3208
3209ac_ext=c
3210ac_cpp='$CPP $CPPFLAGS'
3211ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3212ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3213ac_compiler_gnu=$ac_cv_c_compiler_gnu
3214ac_main_return=return
3215
3216	ac_ext=cc
3217ac_cpp='$CXXCPP $CPPFLAGS'
3218ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3219ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3220ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3221ac_main_return=return
3222
3223	if test "x$cf_with_cxx" != xno
3224	then
3225		# Several of the C++ configurations do not work, particularly when
3226		# cross-compiling (20140913 -TD)
3227		echo "$as_me:3227: checking if $CXX works" >&5
3228echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3229
3230		save_CPPFLAGS="$CPPFLAGS"
3231		eval cf_includedir=${includedir}
3232		CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3233
3234cat >conftest.$ac_ext <<_ACEOF
3235#line 3235 "configure"
3236#include "confdefs.h"
3237
3238#include <stdlib.h>
3239#include <stdio.h>
3240
3241int
3242main (void)
3243{
3244
3245		printf("Hello world!\n")
3246
3247  ;
3248  return 0;
3249}
3250_ACEOF
3251rm -f conftest.$ac_objext
3252if { (eval echo "$as_me:3252: \"$ac_compile\"") >&5
3253  (eval $ac_compile) 2>&5
3254  ac_status=$?
3255  echo "$as_me:3255: \$? = $ac_status" >&5
3256  (exit $ac_status); } &&
3257         { ac_try='test -s conftest.$ac_objext'
3258  { (eval echo "$as_me:3258: \"$ac_try\"") >&5
3259  (eval $ac_try) 2>&5
3260  ac_status=$?
3261  echo "$as_me:3261: \$? = $ac_status" >&5
3262  (exit $ac_status); }; }; then
3263  cf_cxx_works=yes
3264else
3265  echo "$as_me: failed program was:" >&5
3266cat conftest.$ac_ext >&5
3267cf_cxx_works=no
3268fi
3269rm -f conftest.$ac_objext conftest.$ac_ext
3270		CPPFLAGS="$save_CPPFLAGS"
3271
3272		echo "$as_me:3272: result: $cf_cxx_works" >&5
3273echo "${ECHO_T}$cf_cxx_works" >&6
3274		if test "x$cf_cxx_works" = xno
3275		then
3276			{ echo "$as_me:3276: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3277echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3278			cf_with_cxx=no; CXX=""; GXX="";
3279		fi
3280	fi
3281	ac_ext=c
3282ac_cpp='$CPP $CPPFLAGS'
3283ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3284ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3285ac_compiler_gnu=$ac_cv_c_compiler_gnu
3286ac_main_return=return
3287
3288	# autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3289	if test "$CXX" = "g++" ; then
3290		# Extract the first word of "g++", so it can be a program name with args.
3291set dummy g++; ac_word=$2
3292echo "$as_me:3292: checking for $ac_word" >&5
3293echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3294if test "${ac_cv_path_CXX+set}" = set; then
3295  echo $ECHO_N "(cached) $ECHO_C" >&6
3296else
3297  case $CXX in
3298  [\\/]* | ?:[\\/]*)
3299  ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3300  ;;
3301  *)
3302  ac_save_IFS=$IFS; IFS=$ac_path_separator
3303ac_dummy="$PATH"
3304for ac_dir in $ac_dummy; do
3305  IFS=$ac_save_IFS
3306  test -z "$ac_dir" && ac_dir=.
3307  if $as_executable_p "$ac_dir/$ac_word"; then
3308   ac_cv_path_CXX="$ac_dir/$ac_word"
3309   echo "$as_me:3309: found $ac_dir/$ac_word" >&5
3310   break
3311fi
3312done
3313
3314  ;;
3315esac
3316fi
3317CXX=$ac_cv_path_CXX
3318
3319if test -n "$CXX"; then
3320  echo "$as_me:3320: result: $CXX" >&5
3321echo "${ECHO_T}$CXX" >&6
3322else
3323  echo "$as_me:3323: result: no" >&5
3324echo "${ECHO_T}no" >&6
3325fi
3326
3327	fi
3328	case "x$CXX" in
3329	(x|xg++)
3330		{ echo "$as_me:3330: WARNING: You don't have any C++ compiler, too bad" >&5
3331echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3332		cf_with_cxx=no; CXX=""; GXX="";
3333		;;
3334	esac
3335fi
3336
3337GXX_VERSION=none
3338if test "$GXX" = yes; then
3339	echo "$as_me:3339: checking version of ${CXX:-g++}" >&5
3340echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3341	GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3342	if test -z "$GXX_VERSION"
3343	then
3344		GXX_VERSION=unknown
3345		GXX=no
3346	fi
3347	echo "$as_me:3347: result: $GXX_VERSION" >&5
3348echo "${ECHO_T}$GXX_VERSION" >&6
3349fi
3350
3351case $GXX_VERSION in
3352(1*|2.[0-6]*)
3353	# GXX=""; CXX=""; ac_cv_prog_gxx=no
3354	# cf_cxx_library=no
3355	{ echo "$as_me:3355: WARNING: templates do not work" >&5
3356echo "$as_me: WARNING: templates do not work" >&2;}
3357	;;
3358esac
3359
3360echo "$as_me:3360: checking if you want to build C++ binding and demo" >&5
3361echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3362
3363# Check whether --with-cxx-binding or --without-cxx-binding was given.
3364if test "${with_cxx_binding+set}" = set; then
3365  withval="$with_cxx_binding"
3366  cf_with_cxx_binding=$withval
3367else
3368  cf_with_cxx_binding=$cf_with_cxx
3369fi;
3370echo "$as_me:3370: result: $cf_with_cxx_binding" >&5
3371echo "${ECHO_T}$cf_with_cxx_binding" >&6
3372
3373echo "$as_me:3373: checking if you want to build with Ada" >&5
3374echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3375echo "$as_me:3375: result: $cf_with_ada" >&5
3376echo "${ECHO_T}$cf_with_ada" >&6
3377
3378echo "$as_me:3378: checking if you want to install terminal database" >&5
3379echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3380
3381# Check whether --enable-db-install or --disable-db-install was given.
3382if test "${enable_db_install+set}" = set; then
3383  enableval="$enable_db_install"
3384  cf_with_db_install=$enableval
3385else
3386  cf_with_db_install=yes
3387fi;
3388echo "$as_me:3388: result: $cf_with_db_install" >&5
3389echo "${ECHO_T}$cf_with_db_install" >&6
3390
3391echo "$as_me:3391: checking if you want to install manpages" >&5
3392echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3393
3394# Check whether --with-manpages or --without-manpages was given.
3395if test "${with_manpages+set}" = set; then
3396  withval="$with_manpages"
3397  cf_with_manpages=$withval
3398else
3399  cf_with_manpages=yes
3400fi;
3401echo "$as_me:3401: result: $cf_with_manpages" >&5
3402echo "${ECHO_T}$cf_with_manpages" >&6
3403
3404echo "$as_me:3404: checking if you want to build programs such as tic" >&5
3405echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3406
3407# Check whether --with-progs or --without-progs was given.
3408if test "${with_progs+set}" = set; then
3409  withval="$with_progs"
3410  cf_with_progs=$withval
3411else
3412  cf_with_progs=yes
3413fi;
3414echo "$as_me:3414: result: $cf_with_progs" >&5
3415echo "${ECHO_T}$cf_with_progs" >&6
3416
3417if test -f $srcdir/tack/tack.h; then
3418	if test "x$cross_compiling" = xyes ; then
3419		test -n "$verbose" && echo "	ignoring tack because we are cross-compiling" 1>&6
3420
3421echo "${as_me:-configure}:3421: testing ignoring tack because we are cross-compiling ..." 1>&5
3422
3423		cf_with_tack=no
3424	else
3425		echo "$as_me:3425: checking if you want to build the tack program" >&5
3426echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3427
3428# Check whether --with-tack or --without-tack was given.
3429if test "${with_tack+set}" = set; then
3430  withval="$with_tack"
3431  cf_with_tack=$withval
3432else
3433  cf_with_tack=$cf_with_progs
3434fi;
3435		echo "$as_me:3435: result: $cf_with_tack" >&5
3436echo "${ECHO_T}$cf_with_tack" >&6
3437	fi
3438else
3439	cf_with_tack=no
3440fi
3441
3442echo "$as_me:3442: checking if you want to build test-programs" >&5
3443echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3444
3445# Check whether --with-tests or --without-tests was given.
3446if test "${with_tests+set}" = set; then
3447  withval="$with_tests"
3448  cf_with_tests=$withval
3449else
3450  cf_with_tests=yes
3451fi;
3452echo "$as_me:3452: result: $cf_with_tests" >&5
3453echo "${ECHO_T}$cf_with_tests" >&6
3454
3455echo "$as_me:3455: checking if you wish to install curses.h" >&5
3456echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3457
3458# Check whether --with-curses-h or --without-curses-h was given.
3459if test "${with_curses_h+set}" = set; then
3460  withval="$with_curses_h"
3461  with_curses_h=$withval
3462else
3463  with_curses_h=yes
3464fi;
3465echo "$as_me:3465: result: $with_curses_h" >&5
3466echo "${ECHO_T}$with_curses_h" >&6
3467
3468modules_to_build="ncurses"
3469test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3470test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3471modules_to_build="$modules_to_build panel menu form"
3472
3473test "$program_prefix" != NONE &&
3474  program_transform_name="s,^,$program_prefix,;$program_transform_name"
3475# Use a double $ so make ignores it.
3476test "$program_suffix" != NONE &&
3477  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3478# Double any \ or $.  echo might interpret backslashes.
3479# By default was `s,x,x', remove it if useless.
3480cat <<\_ACEOF >conftest.sed
3481s/[\\$]/&&/g;s/;s,x,x,$//
3482_ACEOF
3483program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3484rm conftest.sed
3485
3486for ac_prog in mawk gawk nawk awk
3487do
3488  # Extract the first word of "$ac_prog", so it can be a program name with args.
3489set dummy $ac_prog; ac_word=$2
3490echo "$as_me:3490: checking for $ac_word" >&5
3491echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3492if test "${ac_cv_prog_AWK+set}" = set; then
3493  echo $ECHO_N "(cached) $ECHO_C" >&6
3494else
3495  if test -n "$AWK"; then
3496  ac_cv_prog_AWK="$AWK" # Let the user override the test.
3497else
3498  ac_save_IFS=$IFS; IFS=$ac_path_separator
3499ac_dummy="$PATH"
3500for ac_dir in $ac_dummy; do
3501  IFS=$ac_save_IFS
3502  test -z "$ac_dir" && ac_dir=.
3503  $as_executable_p "$ac_dir/$ac_word" || continue
3504ac_cv_prog_AWK="$ac_prog"
3505echo "$as_me:3505: found $ac_dir/$ac_word" >&5
3506break
3507done
3508
3509fi
3510fi
3511AWK=$ac_cv_prog_AWK
3512if test -n "$AWK"; then
3513  echo "$as_me:3513: result: $AWK" >&5
3514echo "${ECHO_T}$AWK" >&6
3515else
3516  echo "$as_me:3516: result: no" >&5
3517echo "${ECHO_T}no" >&6
3518fi
3519
3520  test -n "$AWK" && break
3521done
3522
3523test -z "$AWK" && { { echo "$as_me:3523: error: No awk program found" >&5
3524echo "$as_me: error: No awk program found" >&2;}
3525   { (exit 1); exit 1; }; }
3526
3527echo "$as_me:3527: checking for egrep" >&5
3528echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3529if test "${ac_cv_prog_egrep+set}" = set; then
3530  echo $ECHO_N "(cached) $ECHO_C" >&6
3531else
3532  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3533		then ac_cv_prog_egrep='grep -E'
3534		else ac_cv_prog_egrep='egrep'
3535	fi
3536fi
3537echo "$as_me:3537: result: $ac_cv_prog_egrep" >&5
3538echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3539	EGREP=$ac_cv_prog_egrep
3540
3541	test -z "$EGREP" && { { echo "$as_me:3541: error: No egrep program found" >&5
3542echo "$as_me: error: No egrep program found" >&2;}
3543   { (exit 1); exit 1; }; }
3544
3545# Find a good install program.  We prefer a C program (faster),
3546# so one script is as good as another.  But avoid the broken or
3547# incompatible versions:
3548# SysV /etc/install, /usr/sbin/install
3549# SunOS /usr/etc/install
3550# IRIX /sbin/install
3551# AIX /bin/install
3552# AmigaOS /C/install, which installs bootblocks on floppy discs
3553# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3554# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3555# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3556# ./install, which can be erroneously created by make from ./install.sh.
3557echo "$as_me:3557: checking for a BSD compatible install" >&5
3558echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3559if test -z "$INSTALL"; then
3560if test "${ac_cv_path_install+set}" = set; then
3561  echo $ECHO_N "(cached) $ECHO_C" >&6
3562else
3563    ac_save_IFS=$IFS; IFS=$ac_path_separator
3564  for ac_dir in $PATH; do
3565    IFS=$ac_save_IFS
3566    # Account for people who put trailing slashes in PATH elements.
3567    case $ac_dir/ in
3568    / | ./ | .// | /cC/* \
3569    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3570    | /usr/ucb/* ) ;;
3571    *)
3572      # OSF1 and SCO ODT 3.0 have their own names for install.
3573      # Don't use installbsd from OSF since it installs stuff as root
3574      # by default.
3575      for ac_prog in ginstall scoinst install; do
3576        if $as_executable_p "$ac_dir/$ac_prog"; then
3577	  if test $ac_prog = install &&
3578            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3579	    # AIX install.  It has an incompatible calling convention.
3580	    :
3581	  elif test $ac_prog = install &&
3582	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3583	    # program-specific install script used by HP pwplus--don't use.
3584	    :
3585	  else
3586	    ac_cv_path_install="$ac_dir/$ac_prog -c"
3587	    break 2
3588	  fi
3589	fi
3590      done
3591      ;;
3592    esac
3593  done
3594
3595fi
3596  if test "${ac_cv_path_install+set}" = set; then
3597    INSTALL=$ac_cv_path_install
3598  else
3599    # As a last resort, use the slow shell script.  We don't cache a
3600    # path for INSTALL within a source directory, because that will
3601    # break other packages using the cache if that directory is
3602    # removed, or if the path is relative.
3603    INSTALL=$ac_install_sh
3604  fi
3605fi
3606echo "$as_me:3606: result: $INSTALL" >&5
3607echo "${ECHO_T}$INSTALL" >&6
3608
3609# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3610# It thinks the first close brace ends the variable substitution.
3611test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3612
3613test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3614
3615test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3616
3617case $INSTALL in
3618(/*)
3619	;;
3620(*)
3621	cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3622	test -z "$cf_dir" && cf_dir=.
3623	INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3624	;;
3625esac
3626
3627for ac_prog in lint cppcheck splint
3628do
3629  # Extract the first word of "$ac_prog", so it can be a program name with args.
3630set dummy $ac_prog; ac_word=$2
3631echo "$as_me:3631: checking for $ac_word" >&5
3632echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3633if test "${ac_cv_prog_LINT+set}" = set; then
3634  echo $ECHO_N "(cached) $ECHO_C" >&6
3635else
3636  if test -n "$LINT"; then
3637  ac_cv_prog_LINT="$LINT" # Let the user override the test.
3638else
3639  ac_save_IFS=$IFS; IFS=$ac_path_separator
3640ac_dummy="$PATH"
3641for ac_dir in $ac_dummy; do
3642  IFS=$ac_save_IFS
3643  test -z "$ac_dir" && ac_dir=.
3644  $as_executable_p "$ac_dir/$ac_word" || continue
3645ac_cv_prog_LINT="$ac_prog"
3646echo "$as_me:3646: found $ac_dir/$ac_word" >&5
3647break
3648done
3649
3650fi
3651fi
3652LINT=$ac_cv_prog_LINT
3653if test -n "$LINT"; then
3654  echo "$as_me:3654: result: $LINT" >&5
3655echo "${ECHO_T}$LINT" >&6
3656else
3657  echo "$as_me:3657: result: no" >&5
3658echo "${ECHO_T}no" >&6
3659fi
3660
3661  test -n "$LINT" && break
3662done
3663
3664case "x$LINT" in
3665(xcppcheck|x*/cppcheck)
3666	test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3667	;;
3668esac
3669
3670echo "$as_me:3670: checking whether ln -s works" >&5
3671echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3672LN_S=$as_ln_s
3673if test "$LN_S" = "ln -s"; then
3674  echo "$as_me:3674: result: yes" >&5
3675echo "${ECHO_T}yes" >&6
3676else
3677  echo "$as_me:3677: result: no, using $LN_S" >&5
3678echo "${ECHO_T}no, using $LN_S" >&6
3679fi
3680
3681echo "$as_me:3681: checking if $LN_S -f options work" >&5
3682echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3683
3684rm -f conf$$.src conf$$dst
3685echo >conf$$.dst
3686echo first >conf$$.src
3687if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3688	cf_prog_ln_sf=yes
3689else
3690	cf_prog_ln_sf=no
3691fi
3692rm -f conf$$.dst conf$$src
3693echo "$as_me:3693: result: $cf_prog_ln_sf" >&5
3694echo "${ECHO_T}$cf_prog_ln_sf" >&6
3695
3696test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3697
3698echo "$as_me:3698: checking for long file names" >&5
3699echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3700if test "${ac_cv_sys_long_file_names+set}" = set; then
3701  echo $ECHO_N "(cached) $ECHO_C" >&6
3702else
3703  ac_cv_sys_long_file_names=yes
3704# Test for long file names in all the places we know might matter:
3705#      .		the current directory, where building will happen
3706#      $prefix/lib	where we will be installing things
3707#      $exec_prefix/lib	likewise
3708# eval it to expand exec_prefix.
3709#      $TMPDIR		if set, where it might want to write temporary files
3710# if $TMPDIR is not set:
3711#      /tmp		where it might want to write temporary files
3712#      /var/tmp		likewise
3713#      /usr/tmp		likewise
3714if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3715  ac_tmpdirs=$TMPDIR
3716else
3717  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3718fi
3719for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3720  test -d $ac_dir || continue
3721  test -w $ac_dir || continue # It is less confusing to not echo anything here.
3722  ac_xdir=$ac_dir/cf$$
3723  (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3724  ac_tf1=$ac_xdir/conftest9012345
3725  ac_tf2=$ac_xdir/conftest9012346
3726  (echo 1 >$ac_tf1) 2>/dev/null
3727  (echo 2 >$ac_tf2) 2>/dev/null
3728  ac_val=`cat $ac_tf1 2>/dev/null`
3729  if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3730    ac_cv_sys_long_file_names=no
3731    rm -rf $ac_xdir 2>/dev/null
3732    break
3733  fi
3734  rm -rf $ac_xdir 2>/dev/null
3735done
3736fi
3737echo "$as_me:3737: result: $ac_cv_sys_long_file_names" >&5
3738echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3739if test $ac_cv_sys_long_file_names = yes; then
3740
3741cat >>confdefs.h <<\EOF
3742#define HAVE_LONG_FILE_NAMES 1
3743EOF
3744
3745fi
3746
3747# Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3748# of package conflict.
3749cf_config_suffix=
3750
3751# Check whether --with-config-suffix or --without-config-suffix was given.
3752if test "${with_config_suffix+set}" = set; then
3753  withval="$with_config_suffix"
3754  case "x$withval" in
3755	(xyes|xno)
3756		{ echo "$as_me:3756: WARNING: expected a value for config-suffix option" >&5
3757echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3758		;;
3759	(*)	cf_config_suffix="$withval"
3760		;;
3761	esac
3762fi;
3763
3764# If we find pkg-config, check if we should install the ".pc" files.
3765
3766echo "$as_me:3766: checking if you want to use pkg-config" >&5
3767echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3768
3769# Check whether --with-pkg-config or --without-pkg-config was given.
3770if test "${with_pkg_config+set}" = set; then
3771  withval="$with_pkg_config"
3772  cf_pkg_config=$withval
3773else
3774  cf_pkg_config=yes
3775fi;
3776echo "$as_me:3776: result: $cf_pkg_config" >&5
3777echo "${ECHO_T}$cf_pkg_config" >&6
3778
3779case $cf_pkg_config in
3780(no)
3781	PKG_CONFIG=none
3782	;;
3783(yes)
3784
3785if test -n "$ac_tool_prefix"; then
3786  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3787set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3788echo "$as_me:3788: checking for $ac_word" >&5
3789echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3790if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3791  echo $ECHO_N "(cached) $ECHO_C" >&6
3792else
3793  case $PKG_CONFIG in
3794  [\\/]* | ?:[\\/]*)
3795  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3796  ;;
3797  *)
3798  ac_save_IFS=$IFS; IFS=$ac_path_separator
3799ac_dummy="$PATH"
3800for ac_dir in $ac_dummy; do
3801  IFS=$ac_save_IFS
3802  test -z "$ac_dir" && ac_dir=.
3803  if $as_executable_p "$ac_dir/$ac_word"; then
3804   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3805   echo "$as_me:3805: found $ac_dir/$ac_word" >&5
3806   break
3807fi
3808done
3809
3810  ;;
3811esac
3812fi
3813PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3814
3815if test -n "$PKG_CONFIG"; then
3816  echo "$as_me:3816: result: $PKG_CONFIG" >&5
3817echo "${ECHO_T}$PKG_CONFIG" >&6
3818else
3819  echo "$as_me:3819: result: no" >&5
3820echo "${ECHO_T}no" >&6
3821fi
3822
3823fi
3824if test -z "$ac_cv_path_PKG_CONFIG"; then
3825  ac_pt_PKG_CONFIG=$PKG_CONFIG
3826  # Extract the first word of "pkg-config", so it can be a program name with args.
3827set dummy pkg-config; ac_word=$2
3828echo "$as_me:3828: checking for $ac_word" >&5
3829echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3830if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3831  echo $ECHO_N "(cached) $ECHO_C" >&6
3832else
3833  case $ac_pt_PKG_CONFIG in
3834  [\\/]* | ?:[\\/]*)
3835  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3836  ;;
3837  *)
3838  ac_save_IFS=$IFS; IFS=$ac_path_separator
3839ac_dummy="$PATH"
3840for ac_dir in $ac_dummy; do
3841  IFS=$ac_save_IFS
3842  test -z "$ac_dir" && ac_dir=.
3843  if $as_executable_p "$ac_dir/$ac_word"; then
3844   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3845   echo "$as_me:3845: found $ac_dir/$ac_word" >&5
3846   break
3847fi
3848done
3849
3850  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3851  ;;
3852esac
3853fi
3854ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3855
3856if test -n "$ac_pt_PKG_CONFIG"; then
3857  echo "$as_me:3857: result: $ac_pt_PKG_CONFIG" >&5
3858echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3859else
3860  echo "$as_me:3860: result: no" >&5
3861echo "${ECHO_T}no" >&6
3862fi
3863
3864  PKG_CONFIG=$ac_pt_PKG_CONFIG
3865else
3866  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3867fi
3868
3869	;;
3870(*)
3871	PKG_CONFIG=$withval
3872	;;
3873esac
3874
3875test -z "$PKG_CONFIG" && PKG_CONFIG=none
3876if test "$PKG_CONFIG" != none ; then
3877
3878if test "x$prefix" != xNONE; then
3879	cf_path_syntax="$prefix"
3880else
3881	cf_path_syntax="$ac_default_prefix"
3882fi
3883
3884case ".$PKG_CONFIG" in
3885(.\$\(*\)*|.\'*\'*)
3886	;;
3887(..|./*|.\\*)
3888	;;
3889(.[a-zA-Z]:[\\/]*) # OS/2 EMX
3890	;;
3891(.\${*prefix}*|.\${*dir}*)
3892	eval PKG_CONFIG="$PKG_CONFIG"
3893	case ".$PKG_CONFIG" in
3894	(.NONE/*)
3895		PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3896		;;
3897	esac
3898	;;
3899(.no|.NONE/*)
3900	PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3901	;;
3902(*)
3903	{ { echo "$as_me:3903: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3904echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3905   { (exit 1); exit 1; }; }
3906	;;
3907esac
3908
3909elif test "x$cf_pkg_config" != xno ; then
3910	{ echo "$as_me:3910: WARNING: pkg-config is not installed" >&5
3911echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3912fi
3913
3914case $PKG_CONFIG in
3915(no|none|yes)
3916	echo "$as_me:3916: checking for pkg-config library directory" >&5
3917echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3918	;;
3919(*)
3920	echo "$as_me:3920: checking for $PKG_CONFIG library directory" >&5
3921echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3922	;;
3923esac
3924
3925PKG_CONFIG_LIBDIR=no
3926
3927# Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3928if test "${with_pkg_config_libdir+set}" = set; then
3929  withval="$with_pkg_config_libdir"
3930  PKG_CONFIG_LIBDIR=$withval
3931else
3932  test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3933fi;
3934
3935case x$PKG_CONFIG_LIBDIR in
3936(x/*)
3937	;;
3938(xyes)
3939	# Look for the library directory using the same prefix as the executable
3940	if test "x$PKG_CONFIG" = xnone
3941	then
3942		cf_path=$prefix
3943	else
3944		cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3945	fi
3946
3947	# If you don't like using the default architecture, you have to specify the
3948	# intended library directory and corresponding compiler/linker options.
3949	#
3950	# This case allows for Debian's 2014-flavor of multiarch, along with the
3951	# most common variations before that point.  Some other variants spell the
3952	# directory differently, e.g., "pkg-config", and put it in unusual places.
3953	# pkg-config has always been poorly standardized, which is ironic...
3954	case x`(arch) 2>/dev/null` in
3955	(*64)
3956		cf_search_path="\
3957			$cf_path/lib/*64-linux-gnu \
3958			$cf_path/share \
3959			$cf_path/lib64 \
3960			$cf_path/lib32 \
3961			$cf_path/lib"
3962		;;
3963	(*)
3964		cf_search_path="\
3965			$cf_path/lib/*-linux-gnu \
3966			$cf_path/share \
3967			$cf_path/lib32 \
3968			$cf_path/lib \
3969			$cf_path/libdata"
3970		;;
3971	esac
3972
3973	test -n "$verbose" && echo "	list..." 1>&6
3974
3975echo "${as_me:-configure}:3975: testing list... ..." 1>&5
3976
3977	for cf_config in $cf_search_path
3978	do
3979		test -n "$verbose" && echo "	checking $cf_config/pkgconfig" 1>&6
3980
3981echo "${as_me:-configure}:3981: testing checking $cf_config/pkgconfig ..." 1>&5
3982
3983		if test -d $cf_config/pkgconfig
3984		then
3985			PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3986			echo "$as_me:3986: checking done" >&5
3987echo $ECHO_N "checking done... $ECHO_C" >&6
3988			break
3989		fi
3990	done
3991	;;
3992(*)
3993	;;
3994esac
3995
3996if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3997	echo "$as_me:3997: result: $PKG_CONFIG_LIBDIR" >&5
3998echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3999fi
4000
4001if test "x$PKG_CONFIG" != xnone
4002then
4003	echo "$as_me:4003: checking if we should install .pc files for $PKG_CONFIG" >&5
4004echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4005else
4006	echo "$as_me:4006: checking if we should install .pc files" >&5
4007echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4008fi
4009
4010# Check whether --enable-pc-files or --disable-pc-files was given.
4011if test "${enable_pc_files+set}" = set; then
4012  enableval="$enable_pc_files"
4013  enable_pc_files=$enableval
4014else
4015  enable_pc_files=no
4016fi;
4017echo "$as_me:4017: result: $enable_pc_files" >&5
4018echo "${ECHO_T}$enable_pc_files" >&6
4019
4020if test "x$enable_pc_files" != xno
4021then
4022	MAKE_PC_FILES=
4023	case "x$PKG_CONFIG_LIBDIR" in
4024	(xno|xyes)
4025		{ echo "$as_me:4025: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4026echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4027		;;
4028	(*)
4029
4030if test "x$prefix" != xNONE; then
4031	cf_path_syntax="$prefix"
4032else
4033	cf_path_syntax="$ac_default_prefix"
4034fi
4035
4036case ".$PKG_CONFIG_LIBDIR" in
4037(.\$\(*\)*|.\'*\'*)
4038	;;
4039(..|./*|.\\*)
4040	;;
4041(.[a-zA-Z]:[\\/]*) # OS/2 EMX
4042	;;
4043(.\${*prefix}*|.\${*dir}*)
4044	eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4045	case ".$PKG_CONFIG_LIBDIR" in
4046	(.NONE/*)
4047		PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4048		;;
4049	esac
4050	;;
4051(.no|.NONE/*)
4052	PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4053	;;
4054(*)
4055	{ { echo "$as_me:4055: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4056echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4057   { (exit 1); exit 1; }; }
4058	;;
4059esac
4060
4061		;;
4062	esac
4063else
4064	MAKE_PC_FILES="#"
4065fi
4066
4067if test -z "$MAKE_PC_FILES"
4068then
4069	echo "$as_me:4069: checking for suffix to add to pc-files" >&5
4070echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4071
4072# Check whether --with-pc-suffix or --without-pc-suffix was given.
4073if test "${with_pc_suffix+set}" = set; then
4074  withval="$with_pc_suffix"
4075  case "x$withval" in
4076	(xyes|xno)
4077		PC_MODULE_SUFFIX=
4078		;;
4079	(*)	PC_MODULE_SUFFIX="$withval"
4080		;;
4081	esac
4082fi;
4083	test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4084	echo "$as_me:4084: result: $PC_MODULE_SUFFIX" >&5
4085echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4086	test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4087
4088fi
4089
4090echo "$as_me:4090: checking if we should assume mixed-case filenames" >&5
4091echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4092
4093# Check whether --enable-mixed-case or --disable-mixed-case was given.
4094if test "${enable_mixed_case+set}" = set; then
4095  enableval="$enable_mixed_case"
4096  enable_mixedcase=$enableval
4097else
4098  enable_mixedcase=auto
4099fi;
4100echo "$as_me:4100: result: $enable_mixedcase" >&5
4101echo "${ECHO_T}$enable_mixedcase" >&6
4102if test "$enable_mixedcase" = "auto" ; then
4103
4104echo "$as_me:4104: checking if filesystem supports mixed-case filenames" >&5
4105echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4106if test "${cf_cv_mixedcase+set}" = set; then
4107  echo $ECHO_N "(cached) $ECHO_C" >&6
4108else
4109
4110if test "$cross_compiling" = yes ; then
4111	case $target_alias in
4112	(*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
4113		cf_cv_mixedcase=no
4114		;;
4115	(*)
4116		cf_cv_mixedcase=yes
4117		;;
4118	esac
4119else
4120	rm -f conftest CONFTEST
4121	echo test >conftest
4122	if test -f CONFTEST ; then
4123		cf_cv_mixedcase=no
4124	else
4125		cf_cv_mixedcase=yes
4126	fi
4127	rm -f conftest CONFTEST
4128fi
4129
4130fi
4131echo "$as_me:4131: result: $cf_cv_mixedcase" >&5
4132echo "${ECHO_T}$cf_cv_mixedcase" >&6
4133test "$cf_cv_mixedcase" = yes &&
4134cat >>confdefs.h <<\EOF
4135#define MIXEDCASE_FILENAMES 1
4136EOF
4137
4138else
4139	cf_cv_mixedcase=$enable_mixedcase
4140	if test "x$enable_mixedcase" = "xyes" ; then
4141
4142cat >>confdefs.h <<\EOF
4143#define MIXEDCASE_FILENAMES 1
4144EOF
4145
4146	fi
4147fi
4148
4149# do this after mixed-case option (tags/TAGS is not as important as tic).
4150echo "$as_me:4150: checking whether ${MAKE-make} sets \${MAKE}" >&5
4151echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4152set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4153if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4154  echo $ECHO_N "(cached) $ECHO_C" >&6
4155else
4156  cat >conftest.make <<\EOF
4157all:
4158	@echo 'ac_maketemp="${MAKE}"'
4159EOF
4160# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4161eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4162if test -n "$ac_maketemp"; then
4163  eval ac_cv_prog_make_${ac_make}_set=yes
4164else
4165  eval ac_cv_prog_make_${ac_make}_set=no
4166fi
4167rm -f conftest.make
4168fi
4169if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4170  echo "$as_me:4170: result: yes" >&5
4171echo "${ECHO_T}yes" >&6
4172  SET_MAKE=
4173else
4174  echo "$as_me:4174: result: no" >&5
4175echo "${ECHO_T}no" >&6
4176  SET_MAKE="MAKE=${MAKE-make}"
4177fi
4178
4179for ac_prog in exctags ctags
4180do
4181  # Extract the first word of "$ac_prog", so it can be a program name with args.
4182set dummy $ac_prog; ac_word=$2
4183echo "$as_me:4183: checking for $ac_word" >&5
4184echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4185if test "${ac_cv_prog_CTAGS+set}" = set; then
4186  echo $ECHO_N "(cached) $ECHO_C" >&6
4187else
4188  if test -n "$CTAGS"; then
4189  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4190else
4191  ac_save_IFS=$IFS; IFS=$ac_path_separator
4192ac_dummy="$PATH"
4193for ac_dir in $ac_dummy; do
4194  IFS=$ac_save_IFS
4195  test -z "$ac_dir" && ac_dir=.
4196  $as_executable_p "$ac_dir/$ac_word" || continue
4197ac_cv_prog_CTAGS="$ac_prog"
4198echo "$as_me:4198: found $ac_dir/$ac_word" >&5
4199break
4200done
4201
4202fi
4203fi
4204CTAGS=$ac_cv_prog_CTAGS
4205if test -n "$CTAGS"; then
4206  echo "$as_me:4206: result: $CTAGS" >&5
4207echo "${ECHO_T}$CTAGS" >&6
4208else
4209  echo "$as_me:4209: result: no" >&5
4210echo "${ECHO_T}no" >&6
4211fi
4212
4213  test -n "$CTAGS" && break
4214done
4215
4216for ac_prog in exetags etags
4217do
4218  # Extract the first word of "$ac_prog", so it can be a program name with args.
4219set dummy $ac_prog; ac_word=$2
4220echo "$as_me:4220: checking for $ac_word" >&5
4221echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4222if test "${ac_cv_prog_ETAGS+set}" = set; then
4223  echo $ECHO_N "(cached) $ECHO_C" >&6
4224else
4225  if test -n "$ETAGS"; then
4226  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4227else
4228  ac_save_IFS=$IFS; IFS=$ac_path_separator
4229ac_dummy="$PATH"
4230for ac_dir in $ac_dummy; do
4231  IFS=$ac_save_IFS
4232  test -z "$ac_dir" && ac_dir=.
4233  $as_executable_p "$ac_dir/$ac_word" || continue
4234ac_cv_prog_ETAGS="$ac_prog"
4235echo "$as_me:4235: found $ac_dir/$ac_word" >&5
4236break
4237done
4238
4239fi
4240fi
4241ETAGS=$ac_cv_prog_ETAGS
4242if test -n "$ETAGS"; then
4243  echo "$as_me:4243: result: $ETAGS" >&5
4244echo "${ECHO_T}$ETAGS" >&6
4245else
4246  echo "$as_me:4246: result: no" >&5
4247echo "${ECHO_T}no" >&6
4248fi
4249
4250  test -n "$ETAGS" && break
4251done
4252
4253# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4254set dummy ${CTAGS:-ctags}; ac_word=$2
4255echo "$as_me:4255: checking for $ac_word" >&5
4256echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4257if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4258  echo $ECHO_N "(cached) $ECHO_C" >&6
4259else
4260  if test -n "$MAKE_LOWER_TAGS"; then
4261  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4262else
4263  ac_save_IFS=$IFS; IFS=$ac_path_separator
4264ac_dummy="$PATH"
4265for ac_dir in $ac_dummy; do
4266  IFS=$ac_save_IFS
4267  test -z "$ac_dir" && ac_dir=.
4268  $as_executable_p "$ac_dir/$ac_word" || continue
4269ac_cv_prog_MAKE_LOWER_TAGS="yes"
4270echo "$as_me:4270: found $ac_dir/$ac_word" >&5
4271break
4272done
4273
4274  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4275fi
4276fi
4277MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4278if test -n "$MAKE_LOWER_TAGS"; then
4279  echo "$as_me:4279: result: $MAKE_LOWER_TAGS" >&5
4280echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4281else
4282  echo "$as_me:4282: result: no" >&5
4283echo "${ECHO_T}no" >&6
4284fi
4285
4286if test "$cf_cv_mixedcase" = yes ; then
4287	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4288set dummy ${ETAGS:-etags}; ac_word=$2
4289echo "$as_me:4289: checking for $ac_word" >&5
4290echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4291if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4292  echo $ECHO_N "(cached) $ECHO_C" >&6
4293else
4294  if test -n "$MAKE_UPPER_TAGS"; then
4295  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4296else
4297  ac_save_IFS=$IFS; IFS=$ac_path_separator
4298ac_dummy="$PATH"
4299for ac_dir in $ac_dummy; do
4300  IFS=$ac_save_IFS
4301  test -z "$ac_dir" && ac_dir=.
4302  $as_executable_p "$ac_dir/$ac_word" || continue
4303ac_cv_prog_MAKE_UPPER_TAGS="yes"
4304echo "$as_me:4304: found $ac_dir/$ac_word" >&5
4305break
4306done
4307
4308  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4309fi
4310fi
4311MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4312if test -n "$MAKE_UPPER_TAGS"; then
4313  echo "$as_me:4313: result: $MAKE_UPPER_TAGS" >&5
4314echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4315else
4316  echo "$as_me:4316: result: no" >&5
4317echo "${ECHO_T}no" >&6
4318fi
4319
4320else
4321	MAKE_UPPER_TAGS=no
4322fi
4323
4324if test "$MAKE_UPPER_TAGS" = yes ; then
4325	MAKE_UPPER_TAGS=
4326else
4327	MAKE_UPPER_TAGS="#"
4328fi
4329
4330if test "$MAKE_LOWER_TAGS" = yes ; then
4331	MAKE_LOWER_TAGS=
4332else
4333	MAKE_LOWER_TAGS="#"
4334fi
4335
4336echo "$as_me:4336: checking for makeflags variable" >&5
4337echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4338if test "${cf_cv_makeflags+set}" = set; then
4339  echo $ECHO_N "(cached) $ECHO_C" >&6
4340else
4341
4342	cf_cv_makeflags=''
4343	for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4344	do
4345		cat >cf_makeflags.tmp <<CF_EOF
4346SHELL = $SHELL
4347all :
4348	@ echo '.$cf_option'
4349CF_EOF
4350		cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ 	]*$,,'`
4351		case "$cf_result" in
4352		(.*k|.*kw)
4353			cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4354			case "$cf_result" in
4355			(.*CC=*)	cf_cv_makeflags=
4356				;;
4357			(*)	cf_cv_makeflags=$cf_option
4358				;;
4359			esac
4360			break
4361			;;
4362		(.-)
4363			;;
4364		(*)
4365
4366echo "${as_me:-configure}:4366: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4367
4368			;;
4369		esac
4370	done
4371	rm -f cf_makeflags.tmp
4372
4373fi
4374echo "$as_me:4374: result: $cf_cv_makeflags" >&5
4375echo "${ECHO_T}$cf_cv_makeflags" >&6
4376
4377if test -n "$ac_tool_prefix"; then
4378  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4379set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4380echo "$as_me:4380: checking for $ac_word" >&5
4381echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4382if test "${ac_cv_prog_RANLIB+set}" = set; then
4383  echo $ECHO_N "(cached) $ECHO_C" >&6
4384else
4385  if test -n "$RANLIB"; then
4386  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4387else
4388  ac_save_IFS=$IFS; IFS=$ac_path_separator
4389ac_dummy="$PATH"
4390for ac_dir in $ac_dummy; do
4391  IFS=$ac_save_IFS
4392  test -z "$ac_dir" && ac_dir=.
4393  $as_executable_p "$ac_dir/$ac_word" || continue
4394ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4395echo "$as_me:4395: found $ac_dir/$ac_word" >&5
4396break
4397done
4398
4399fi
4400fi
4401RANLIB=$ac_cv_prog_RANLIB
4402if test -n "$RANLIB"; then
4403  echo "$as_me:4403: result: $RANLIB" >&5
4404echo "${ECHO_T}$RANLIB" >&6
4405else
4406  echo "$as_me:4406: result: no" >&5
4407echo "${ECHO_T}no" >&6
4408fi
4409
4410fi
4411if test -z "$ac_cv_prog_RANLIB"; then
4412  ac_ct_RANLIB=$RANLIB
4413  # Extract the first word of "ranlib", so it can be a program name with args.
4414set dummy ranlib; ac_word=$2
4415echo "$as_me:4415: checking for $ac_word" >&5
4416echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4417if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4418  echo $ECHO_N "(cached) $ECHO_C" >&6
4419else
4420  if test -n "$ac_ct_RANLIB"; then
4421  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4422else
4423  ac_save_IFS=$IFS; IFS=$ac_path_separator
4424ac_dummy="$PATH"
4425for ac_dir in $ac_dummy; do
4426  IFS=$ac_save_IFS
4427  test -z "$ac_dir" && ac_dir=.
4428  $as_executable_p "$ac_dir/$ac_word" || continue
4429ac_cv_prog_ac_ct_RANLIB="ranlib"
4430echo "$as_me:4430: found $ac_dir/$ac_word" >&5
4431break
4432done
4433
4434  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4435fi
4436fi
4437ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4438if test -n "$ac_ct_RANLIB"; then
4439  echo "$as_me:4439: result: $ac_ct_RANLIB" >&5
4440echo "${ECHO_T}$ac_ct_RANLIB" >&6
4441else
4442  echo "$as_me:4442: result: no" >&5
4443echo "${ECHO_T}no" >&6
4444fi
4445
4446  RANLIB=$ac_ct_RANLIB
4447else
4448  RANLIB="$ac_cv_prog_RANLIB"
4449fi
4450
4451if test -n "$ac_tool_prefix"; then
4452  # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4453set dummy ${ac_tool_prefix}ld; ac_word=$2
4454echo "$as_me:4454: checking for $ac_word" >&5
4455echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4456if test "${ac_cv_prog_LD+set}" = set; then
4457  echo $ECHO_N "(cached) $ECHO_C" >&6
4458else
4459  if test -n "$LD"; then
4460  ac_cv_prog_LD="$LD" # Let the user override the test.
4461else
4462  ac_save_IFS=$IFS; IFS=$ac_path_separator
4463ac_dummy="$PATH"
4464for ac_dir in $ac_dummy; do
4465  IFS=$ac_save_IFS
4466  test -z "$ac_dir" && ac_dir=.
4467  $as_executable_p "$ac_dir/$ac_word" || continue
4468ac_cv_prog_LD="${ac_tool_prefix}ld"
4469echo "$as_me:4469: found $ac_dir/$ac_word" >&5
4470break
4471done
4472
4473fi
4474fi
4475LD=$ac_cv_prog_LD
4476if test -n "$LD"; then
4477  echo "$as_me:4477: result: $LD" >&5
4478echo "${ECHO_T}$LD" >&6
4479else
4480  echo "$as_me:4480: result: no" >&5
4481echo "${ECHO_T}no" >&6
4482fi
4483
4484fi
4485if test -z "$ac_cv_prog_LD"; then
4486  ac_ct_LD=$LD
4487  # Extract the first word of "ld", so it can be a program name with args.
4488set dummy ld; ac_word=$2
4489echo "$as_me:4489: checking for $ac_word" >&5
4490echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4491if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4492  echo $ECHO_N "(cached) $ECHO_C" >&6
4493else
4494  if test -n "$ac_ct_LD"; then
4495  ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4496else
4497  ac_save_IFS=$IFS; IFS=$ac_path_separator
4498ac_dummy="$PATH"
4499for ac_dir in $ac_dummy; do
4500  IFS=$ac_save_IFS
4501  test -z "$ac_dir" && ac_dir=.
4502  $as_executable_p "$ac_dir/$ac_word" || continue
4503ac_cv_prog_ac_ct_LD="ld"
4504echo "$as_me:4504: found $ac_dir/$ac_word" >&5
4505break
4506done
4507
4508  test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4509fi
4510fi
4511ac_ct_LD=$ac_cv_prog_ac_ct_LD
4512if test -n "$ac_ct_LD"; then
4513  echo "$as_me:4513: result: $ac_ct_LD" >&5
4514echo "${ECHO_T}$ac_ct_LD" >&6
4515else
4516  echo "$as_me:4516: result: no" >&5
4517echo "${ECHO_T}no" >&6
4518fi
4519
4520  LD=$ac_ct_LD
4521else
4522  LD="$ac_cv_prog_LD"
4523fi
4524
4525if test -n "$ac_tool_prefix"; then
4526  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4527set dummy ${ac_tool_prefix}ar; ac_word=$2
4528echo "$as_me:4528: checking for $ac_word" >&5
4529echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4530if test "${ac_cv_prog_AR+set}" = set; then
4531  echo $ECHO_N "(cached) $ECHO_C" >&6
4532else
4533  if test -n "$AR"; then
4534  ac_cv_prog_AR="$AR" # Let the user override the test.
4535else
4536  ac_save_IFS=$IFS; IFS=$ac_path_separator
4537ac_dummy="$PATH"
4538for ac_dir in $ac_dummy; do
4539  IFS=$ac_save_IFS
4540  test -z "$ac_dir" && ac_dir=.
4541  $as_executable_p "$ac_dir/$ac_word" || continue
4542ac_cv_prog_AR="${ac_tool_prefix}ar"
4543echo "$as_me:4543: found $ac_dir/$ac_word" >&5
4544break
4545done
4546
4547fi
4548fi
4549AR=$ac_cv_prog_AR
4550if test -n "$AR"; then
4551  echo "$as_me:4551: result: $AR" >&5
4552echo "${ECHO_T}$AR" >&6
4553else
4554  echo "$as_me:4554: result: no" >&5
4555echo "${ECHO_T}no" >&6
4556fi
4557
4558fi
4559if test -z "$ac_cv_prog_AR"; then
4560  ac_ct_AR=$AR
4561  # Extract the first word of "ar", so it can be a program name with args.
4562set dummy ar; ac_word=$2
4563echo "$as_me:4563: checking for $ac_word" >&5
4564echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4565if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4566  echo $ECHO_N "(cached) $ECHO_C" >&6
4567else
4568  if test -n "$ac_ct_AR"; then
4569  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4570else
4571  ac_save_IFS=$IFS; IFS=$ac_path_separator
4572ac_dummy="$PATH"
4573for ac_dir in $ac_dummy; do
4574  IFS=$ac_save_IFS
4575  test -z "$ac_dir" && ac_dir=.
4576  $as_executable_p "$ac_dir/$ac_word" || continue
4577ac_cv_prog_ac_ct_AR="ar"
4578echo "$as_me:4578: found $ac_dir/$ac_word" >&5
4579break
4580done
4581
4582  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4583fi
4584fi
4585ac_ct_AR=$ac_cv_prog_ac_ct_AR
4586if test -n "$ac_ct_AR"; then
4587  echo "$as_me:4587: result: $ac_ct_AR" >&5
4588echo "${ECHO_T}$ac_ct_AR" >&6
4589else
4590  echo "$as_me:4590: result: no" >&5
4591echo "${ECHO_T}no" >&6
4592fi
4593
4594  AR=$ac_ct_AR
4595else
4596  AR="$ac_cv_prog_AR"
4597fi
4598
4599if test -n "$ac_tool_prefix"; then
4600  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4601set dummy ${ac_tool_prefix}nm; ac_word=$2
4602echo "$as_me:4602: checking for $ac_word" >&5
4603echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4604if test "${ac_cv_prog_NM+set}" = set; then
4605  echo $ECHO_N "(cached) $ECHO_C" >&6
4606else
4607  if test -n "$NM"; then
4608  ac_cv_prog_NM="$NM" # Let the user override the test.
4609else
4610  ac_save_IFS=$IFS; IFS=$ac_path_separator
4611ac_dummy="$PATH"
4612for ac_dir in $ac_dummy; do
4613  IFS=$ac_save_IFS
4614  test -z "$ac_dir" && ac_dir=.
4615  $as_executable_p "$ac_dir/$ac_word" || continue
4616ac_cv_prog_NM="${ac_tool_prefix}nm"
4617echo "$as_me:4617: found $ac_dir/$ac_word" >&5
4618break
4619done
4620
4621fi
4622fi
4623NM=$ac_cv_prog_NM
4624if test -n "$NM"; then
4625  echo "$as_me:4625: result: $NM" >&5
4626echo "${ECHO_T}$NM" >&6
4627else
4628  echo "$as_me:4628: result: no" >&5
4629echo "${ECHO_T}no" >&6
4630fi
4631
4632fi
4633if test -z "$ac_cv_prog_NM"; then
4634  ac_ct_NM=$NM
4635  # Extract the first word of "nm", so it can be a program name with args.
4636set dummy nm; ac_word=$2
4637echo "$as_me:4637: checking for $ac_word" >&5
4638echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4639if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4640  echo $ECHO_N "(cached) $ECHO_C" >&6
4641else
4642  if test -n "$ac_ct_NM"; then
4643  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4644else
4645  ac_save_IFS=$IFS; IFS=$ac_path_separator
4646ac_dummy="$PATH"
4647for ac_dir in $ac_dummy; do
4648  IFS=$ac_save_IFS
4649  test -z "$ac_dir" && ac_dir=.
4650  $as_executable_p "$ac_dir/$ac_word" || continue
4651ac_cv_prog_ac_ct_NM="nm"
4652echo "$as_me:4652: found $ac_dir/$ac_word" >&5
4653break
4654done
4655
4656  test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4657fi
4658fi
4659ac_ct_NM=$ac_cv_prog_ac_ct_NM
4660if test -n "$ac_ct_NM"; then
4661  echo "$as_me:4661: result: $ac_ct_NM" >&5
4662echo "${ECHO_T}$ac_ct_NM" >&6
4663else
4664  echo "$as_me:4664: result: no" >&5
4665echo "${ECHO_T}no" >&6
4666fi
4667
4668  NM=$ac_ct_NM
4669else
4670  NM="$ac_cv_prog_NM"
4671fi
4672
4673if test -n "$ac_tool_prefix"; then
4674  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4675set dummy ${ac_tool_prefix}ar; ac_word=$2
4676echo "$as_me:4676: checking for $ac_word" >&5
4677echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4678if test "${ac_cv_prog_AR+set}" = set; then
4679  echo $ECHO_N "(cached) $ECHO_C" >&6
4680else
4681  if test -n "$AR"; then
4682  ac_cv_prog_AR="$AR" # Let the user override the test.
4683else
4684  ac_save_IFS=$IFS; IFS=$ac_path_separator
4685ac_dummy="$PATH"
4686for ac_dir in $ac_dummy; do
4687  IFS=$ac_save_IFS
4688  test -z "$ac_dir" && ac_dir=.
4689  $as_executable_p "$ac_dir/$ac_word" || continue
4690ac_cv_prog_AR="${ac_tool_prefix}ar"
4691echo "$as_me:4691: found $ac_dir/$ac_word" >&5
4692break
4693done
4694
4695fi
4696fi
4697AR=$ac_cv_prog_AR
4698if test -n "$AR"; then
4699  echo "$as_me:4699: result: $AR" >&5
4700echo "${ECHO_T}$AR" >&6
4701else
4702  echo "$as_me:4702: result: no" >&5
4703echo "${ECHO_T}no" >&6
4704fi
4705
4706fi
4707if test -z "$ac_cv_prog_AR"; then
4708  ac_ct_AR=$AR
4709  # Extract the first word of "ar", so it can be a program name with args.
4710set dummy ar; ac_word=$2
4711echo "$as_me:4711: checking for $ac_word" >&5
4712echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4713if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4714  echo $ECHO_N "(cached) $ECHO_C" >&6
4715else
4716  if test -n "$ac_ct_AR"; then
4717  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4718else
4719  ac_save_IFS=$IFS; IFS=$ac_path_separator
4720ac_dummy="$PATH"
4721for ac_dir in $ac_dummy; do
4722  IFS=$ac_save_IFS
4723  test -z "$ac_dir" && ac_dir=.
4724  $as_executable_p "$ac_dir/$ac_word" || continue
4725ac_cv_prog_ac_ct_AR="ar"
4726echo "$as_me:4726: found $ac_dir/$ac_word" >&5
4727break
4728done
4729
4730  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4731fi
4732fi
4733ac_ct_AR=$ac_cv_prog_ac_ct_AR
4734if test -n "$ac_ct_AR"; then
4735  echo "$as_me:4735: result: $ac_ct_AR" >&5
4736echo "${ECHO_T}$ac_ct_AR" >&6
4737else
4738  echo "$as_me:4738: result: no" >&5
4739echo "${ECHO_T}no" >&6
4740fi
4741
4742  AR=$ac_ct_AR
4743else
4744  AR="$ac_cv_prog_AR"
4745fi
4746
4747echo "$as_me:4747: checking for options to update archives" >&5
4748echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4749if test "${cf_cv_ar_flags+set}" = set; then
4750  echo $ECHO_N "(cached) $ECHO_C" >&6
4751else
4752
4753	cf_cv_ar_flags=unknown
4754	for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4755	do
4756
4757		# check if $ARFLAGS already contains this choice
4758		if test "x$ARFLAGS" != "x" ; then
4759			cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4760			if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4761				cf_cv_ar_flags=
4762				break
4763			fi
4764		fi
4765
4766		rm -f conftest.$ac_cv_objext
4767		rm -f conftest.a
4768
4769		cat >conftest.$ac_ext <<EOF
4770#line 4770 "configure"
4771int	testdata[3] = { 123, 456, 789 };
4772EOF
4773		if { (eval echo "$as_me:4773: \"$ac_compile\"") >&5
4774  (eval $ac_compile) 2>&5
4775  ac_status=$?
4776  echo "$as_me:4776: \$? = $ac_status" >&5
4777  (exit $ac_status); } ; then
4778			echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4779			$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4780			if test -f conftest.a ; then
4781				cf_cv_ar_flags=$cf_ar_flags
4782				break
4783			fi
4784		else
4785			test -n "$verbose" && echo "	cannot compile test-program" 1>&6
4786
4787echo "${as_me:-configure}:4787: testing cannot compile test-program ..." 1>&5
4788
4789			break
4790		fi
4791	done
4792	rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4793
4794fi
4795echo "$as_me:4795: result: $cf_cv_ar_flags" >&5
4796echo "${ECHO_T}$cf_cv_ar_flags" >&6
4797
4798if test -n "$ARFLAGS" ; then
4799	if test -n "$cf_cv_ar_flags" ; then
4800		ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4801	fi
4802else
4803	ARFLAGS=$cf_cv_ar_flags
4804fi
4805
4806echo "$as_me:4806: checking if you have specified an install-prefix" >&5
4807echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4808
4809# Check whether --with-install-prefix or --without-install-prefix was given.
4810if test "${with_install_prefix+set}" = set; then
4811  withval="$with_install_prefix"
4812  case "x$withval" in
4813	(xyes|xno)
4814		;;
4815	(*)	DESTDIR="$withval"
4816		;;
4817	esac
4818fi;
4819echo "$as_me:4819: result: $DESTDIR" >&5
4820echo "${ECHO_T}$DESTDIR" >&6
4821
4822###############################################################################
4823
4824# If we're cross-compiling, allow the user to override the tools and their
4825# options.  The configure script is oriented toward identifying the host
4826# compiler, etc., but we need a build compiler to generate parts of the source.
4827
4828if test "$cross_compiling" = yes ; then
4829
4830	# defaults that we might want to override
4831	: ${BUILD_CFLAGS:=''}
4832	: ${BUILD_CPPFLAGS:=''}
4833	: ${BUILD_LDFLAGS:=''}
4834	: ${BUILD_LIBS:=''}
4835	: ${BUILD_EXEEXT:='$x'}
4836	: ${BUILD_OBJEXT:='o'}
4837
4838# Check whether --with-build-cc or --without-build-cc was given.
4839if test "${with_build_cc+set}" = set; then
4840  withval="$with_build_cc"
4841  BUILD_CC="$withval"
4842else
4843  for ac_prog in gcc clang c99 c89 cc cl
4844do
4845  # Extract the first word of "$ac_prog", so it can be a program name with args.
4846set dummy $ac_prog; ac_word=$2
4847echo "$as_me:4847: checking for $ac_word" >&5
4848echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4849if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4850  echo $ECHO_N "(cached) $ECHO_C" >&6
4851else
4852  if test -n "$BUILD_CC"; then
4853  ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4854else
4855  ac_save_IFS=$IFS; IFS=$ac_path_separator
4856ac_dummy="$PATH"
4857for ac_dir in $ac_dummy; do
4858  IFS=$ac_save_IFS
4859  test -z "$ac_dir" && ac_dir=.
4860  $as_executable_p "$ac_dir/$ac_word" || continue
4861ac_cv_prog_BUILD_CC="$ac_prog"
4862echo "$as_me:4862: found $ac_dir/$ac_word" >&5
4863break
4864done
4865
4866fi
4867fi
4868BUILD_CC=$ac_cv_prog_BUILD_CC
4869if test -n "$BUILD_CC"; then
4870  echo "$as_me:4870: result: $BUILD_CC" >&5
4871echo "${ECHO_T}$BUILD_CC" >&6
4872else
4873  echo "$as_me:4873: result: no" >&5
4874echo "${ECHO_T}no" >&6
4875fi
4876
4877  test -n "$BUILD_CC" && break
4878done
4879test -n "$BUILD_CC" || BUILD_CC="none"
4880
4881fi;
4882	echo "$as_me:4882: checking for native build C compiler" >&5
4883echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4884	echo "$as_me:4884: result: $BUILD_CC" >&5
4885echo "${ECHO_T}$BUILD_CC" >&6
4886
4887	echo "$as_me:4887: checking for native build C preprocessor" >&5
4888echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4889
4890# Check whether --with-build-cpp or --without-build-cpp was given.
4891if test "${with_build_cpp+set}" = set; then
4892  withval="$with_build_cpp"
4893  BUILD_CPP="$withval"
4894else
4895  BUILD_CPP='${BUILD_CC} -E'
4896fi;
4897	echo "$as_me:4897: result: $BUILD_CPP" >&5
4898echo "${ECHO_T}$BUILD_CPP" >&6
4899
4900	echo "$as_me:4900: checking for native build C flags" >&5
4901echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4902
4903# Check whether --with-build-cflags or --without-build-cflags was given.
4904if test "${with_build_cflags+set}" = set; then
4905  withval="$with_build_cflags"
4906  BUILD_CFLAGS="$withval"
4907fi;
4908	echo "$as_me:4908: result: $BUILD_CFLAGS" >&5
4909echo "${ECHO_T}$BUILD_CFLAGS" >&6
4910
4911	echo "$as_me:4911: checking for native build C preprocessor-flags" >&5
4912echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4913
4914# Check whether --with-build-cppflags or --without-build-cppflags was given.
4915if test "${with_build_cppflags+set}" = set; then
4916  withval="$with_build_cppflags"
4917  BUILD_CPPFLAGS="$withval"
4918fi;
4919	echo "$as_me:4919: result: $BUILD_CPPFLAGS" >&5
4920echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4921
4922	echo "$as_me:4922: checking for native build linker-flags" >&5
4923echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4924
4925# Check whether --with-build-ldflags or --without-build-ldflags was given.
4926if test "${with_build_ldflags+set}" = set; then
4927  withval="$with_build_ldflags"
4928  BUILD_LDFLAGS="$withval"
4929fi;
4930	echo "$as_me:4930: result: $BUILD_LDFLAGS" >&5
4931echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4932
4933	echo "$as_me:4933: checking for native build linker-libraries" >&5
4934echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4935
4936# Check whether --with-build-libs or --without-build-libs was given.
4937if test "${with_build_libs+set}" = set; then
4938  withval="$with_build_libs"
4939  BUILD_LIBS="$withval"
4940fi;
4941	echo "$as_me:4941: result: $BUILD_LIBS" >&5
4942echo "${ECHO_T}$BUILD_LIBS" >&6
4943
4944	# this assumes we're on Unix.
4945	BUILD_EXEEXT=
4946	BUILD_OBJEXT=o
4947
4948	: ${BUILD_CC:='${CC}'}
4949
4950	if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4951		{ { echo "$as_me:4951: error: Cross-build requires two compilers.
4952Use --with-build-cc to specify the native compiler." >&5
4953echo "$as_me: error: Cross-build requires two compilers.
4954Use --with-build-cc to specify the native compiler." >&2;}
4955   { (exit 1); exit 1; }; }
4956	fi
4957
4958else
4959	: ${BUILD_CC:='${CC}'}
4960	: ${BUILD_CPP:='${CPP}'}
4961	: ${BUILD_CFLAGS:='${CFLAGS}'}
4962	: ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4963	: ${BUILD_LDFLAGS:='${LDFLAGS}'}
4964	: ${BUILD_LIBS:='${LIBS}'}
4965	: ${BUILD_EXEEXT:='$x'}
4966	: ${BUILD_OBJEXT:='o'}
4967fi
4968
4969###############################################################################
4970
4971### Options to allow the user to specify the set of libraries which are used.
4972### Use "--without-normal --with-shared" to allow the default model to be
4973### shared, for example.
4974cf_list_models=""
4975
4976echo "$as_me:4976: checking if libtool -version-number should be used" >&5
4977echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4978
4979# Check whether --enable-libtool-version or --disable-libtool-version was given.
4980if test "${enable_libtool_version+set}" = set; then
4981  enableval="$enable_libtool_version"
4982  test "$enableval" != no && enableval=yes
4983	if test "$enableval" != "yes" ; then
4984    cf_libtool_version=no
4985	else
4986		cf_libtool_version=yes
4987	fi
4988else
4989  enableval=yes
4990	cf_libtool_version=yes
4991
4992fi;
4993echo "$as_me:4993: result: $cf_libtool_version" >&5
4994echo "${ECHO_T}$cf_libtool_version" >&6
4995
4996if test "$cf_libtool_version" = yes ; then
4997	LIBTOOL_VERSION="-version-number"
4998else
4999	LIBTOOL_VERSION="-version-info"
5000	case "x$VERSION" in
5001	(x)
5002		{ echo "$as_me:5002: WARNING: VERSION was not set" >&5
5003echo "$as_me: WARNING: VERSION was not set" >&2;}
5004		;;
5005	(x*.*.*)
5006		ABI_VERSION="$VERSION"
5007		test -n "$verbose" && echo "	ABI_VERSION: $ABI_VERSION" 1>&6
5008
5009echo "${as_me:-configure}:5009: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5010
5011		;;
5012	(x*:*:*)
5013		ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5014		test -n "$verbose" && echo "	ABI_VERSION: $ABI_VERSION" 1>&6
5015
5016echo "${as_me:-configure}:5016: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5017
5018		;;
5019	(*)
5020		{ echo "$as_me:5020: WARNING: unexpected VERSION value: $VERSION" >&5
5021echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5022		;;
5023	esac
5024fi
5025
5026LIBTOOL=
5027
5028# common library maintenance symbols that are convenient for libtool scripts:
5029LIB_CREATE='${AR} -cr'
5030LIB_OBJECT='${OBJECTS}'
5031LIB_SUFFIX=.a
5032LIB_PREP="$RANLIB"
5033
5034# symbols used to prop libtool up to enable it to determine what it should be
5035# doing:
5036LIB_CLEAN=
5037LIB_COMPILE=
5038LIB_LINK='${CC}'
5039LIB_INSTALL=
5040LIB_UNINSTALL=
5041
5042echo "$as_me:5042: checking if you want to build libraries with libtool" >&5
5043echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5044
5045# Check whether --with-libtool or --without-libtool was given.
5046if test "${with_libtool+set}" = set; then
5047  withval="$with_libtool"
5048  with_libtool=$withval
5049else
5050  with_libtool=no
5051fi;
5052echo "$as_me:5052: result: $with_libtool" >&5
5053echo "${ECHO_T}$with_libtool" >&6
5054if test "$with_libtool" != "no"; then
5055
5056	if test "$with_libtool" != "yes" ; then
5057
5058if test "x$prefix" != xNONE; then
5059	cf_path_syntax="$prefix"
5060else
5061	cf_path_syntax="$ac_default_prefix"
5062fi
5063
5064case ".$with_libtool" in
5065(.\$\(*\)*|.\'*\'*)
5066	;;
5067(..|./*|.\\*)
5068	;;
5069(.[a-zA-Z]:[\\/]*) # OS/2 EMX
5070	;;
5071(.\${*prefix}*|.\${*dir}*)
5072	eval with_libtool="$with_libtool"
5073	case ".$with_libtool" in
5074	(.NONE/*)
5075		with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5076		;;
5077	esac
5078	;;
5079(.no|.NONE/*)
5080	with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5081	;;
5082(*)
5083	{ { echo "$as_me:5083: error: expected a pathname, not \"$with_libtool\"" >&5
5084echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5085   { (exit 1); exit 1; }; }
5086	;;
5087esac
5088
5089		LIBTOOL=$with_libtool
5090	else
5091		if test -n "$ac_tool_prefix"; then
5092  for ac_prog in libtool glibtool
5093  do
5094    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5095set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5096echo "$as_me:5096: checking for $ac_word" >&5
5097echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5098if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5099  echo $ECHO_N "(cached) $ECHO_C" >&6
5100else
5101  if test -n "$LIBTOOL"; then
5102  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5103else
5104  ac_save_IFS=$IFS; IFS=$ac_path_separator
5105ac_dummy="$PATH"
5106for ac_dir in $ac_dummy; do
5107  IFS=$ac_save_IFS
5108  test -z "$ac_dir" && ac_dir=.
5109  $as_executable_p "$ac_dir/$ac_word" || continue
5110ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5111echo "$as_me:5111: found $ac_dir/$ac_word" >&5
5112break
5113done
5114
5115fi
5116fi
5117LIBTOOL=$ac_cv_prog_LIBTOOL
5118if test -n "$LIBTOOL"; then
5119  echo "$as_me:5119: result: $LIBTOOL" >&5
5120echo "${ECHO_T}$LIBTOOL" >&6
5121else
5122  echo "$as_me:5122: result: no" >&5
5123echo "${ECHO_T}no" >&6
5124fi
5125
5126    test -n "$LIBTOOL" && break
5127  done
5128fi
5129if test -z "$LIBTOOL"; then
5130  ac_ct_LIBTOOL=$LIBTOOL
5131  for ac_prog in libtool glibtool
5132do
5133  # Extract the first word of "$ac_prog", so it can be a program name with args.
5134set dummy $ac_prog; ac_word=$2
5135echo "$as_me:5135: checking for $ac_word" >&5
5136echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5137if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5138  echo $ECHO_N "(cached) $ECHO_C" >&6
5139else
5140  if test -n "$ac_ct_LIBTOOL"; then
5141  ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5142else
5143  ac_save_IFS=$IFS; IFS=$ac_path_separator
5144ac_dummy="$PATH"
5145for ac_dir in $ac_dummy; do
5146  IFS=$ac_save_IFS
5147  test -z "$ac_dir" && ac_dir=.
5148  $as_executable_p "$ac_dir/$ac_word" || continue
5149ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5150echo "$as_me:5150: found $ac_dir/$ac_word" >&5
5151break
5152done
5153
5154fi
5155fi
5156ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5157if test -n "$ac_ct_LIBTOOL"; then
5158  echo "$as_me:5158: result: $ac_ct_LIBTOOL" >&5
5159echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5160else
5161  echo "$as_me:5161: result: no" >&5
5162echo "${ECHO_T}no" >&6
5163fi
5164
5165  test -n "$ac_ct_LIBTOOL" && break
5166done
5167test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5168
5169  LIBTOOL=$ac_ct_LIBTOOL
5170fi
5171
5172if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5173then
5174	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.].*//'`
5175else
5176	cf_cv_libtool_version=
5177fi
5178test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5179
5180		if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5181		then
5182
5183unset ac_cv_prog_ac_ct_LIBTOOL
5184unset ac_ct_LIBTOOL
5185unset LIBTOOL
5186
5187			if test -n "$ac_tool_prefix"; then
5188  for ac_prog in glibtool
5189  do
5190    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5191set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5192echo "$as_me:5192: checking for $ac_word" >&5
5193echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5194if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5195  echo $ECHO_N "(cached) $ECHO_C" >&6
5196else
5197  if test -n "$LIBTOOL"; then
5198  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5199else
5200  ac_save_IFS=$IFS; IFS=$ac_path_separator
5201ac_dummy="$PATH"
5202for ac_dir in $ac_dummy; do
5203  IFS=$ac_save_IFS
5204  test -z "$ac_dir" && ac_dir=.
5205  $as_executable_p "$ac_dir/$ac_word" || continue
5206ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5207echo "$as_me:5207: found $ac_dir/$ac_word" >&5
5208break
5209done
5210
5211fi
5212fi
5213LIBTOOL=$ac_cv_prog_LIBTOOL
5214if test -n "$LIBTOOL"; then
5215  echo "$as_me:5215: result: $LIBTOOL" >&5
5216echo "${ECHO_T}$LIBTOOL" >&6
5217else
5218  echo "$as_me:5218: result: no" >&5
5219echo "${ECHO_T}no" >&6
5220fi
5221
5222    test -n "$LIBTOOL" && break
5223  done
5224fi
5225if test -z "$LIBTOOL"; then
5226  ac_ct_LIBTOOL=$LIBTOOL
5227  for ac_prog in glibtool
5228do
5229  # Extract the first word of "$ac_prog", so it can be a program name with args.
5230set dummy $ac_prog; ac_word=$2
5231echo "$as_me:5231: checking for $ac_word" >&5
5232echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5233if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5234  echo $ECHO_N "(cached) $ECHO_C" >&6
5235else
5236  if test -n "$ac_ct_LIBTOOL"; then
5237  ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5238else
5239  ac_save_IFS=$IFS; IFS=$ac_path_separator
5240ac_dummy="$PATH"
5241for ac_dir in $ac_dummy; do
5242  IFS=$ac_save_IFS
5243  test -z "$ac_dir" && ac_dir=.
5244  $as_executable_p "$ac_dir/$ac_word" || continue
5245ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5246echo "$as_me:5246: found $ac_dir/$ac_word" >&5
5247break
5248done
5249
5250fi
5251fi
5252ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5253if test -n "$ac_ct_LIBTOOL"; then
5254  echo "$as_me:5254: result: $ac_ct_LIBTOOL" >&5
5255echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5256else
5257  echo "$as_me:5257: result: no" >&5
5258echo "${ECHO_T}no" >&6
5259fi
5260
5261  test -n "$ac_ct_LIBTOOL" && break
5262done
5263test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5264
5265  LIBTOOL=$ac_ct_LIBTOOL
5266fi
5267
5268if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5269then
5270	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.].*//'`
5271else
5272	cf_cv_libtool_version=
5273fi
5274test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5275
5276		fi
5277	fi
5278	if test -z "$LIBTOOL" ; then
5279		{ { echo "$as_me:5279: error: Cannot find libtool" >&5
5280echo "$as_me: error: Cannot find libtool" >&2;}
5281   { (exit 1); exit 1; }; }
5282	fi
5283	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5284	LIB_OBJECT='${OBJECTS:.o=.lo}'
5285	LIB_SUFFIX=.la
5286	LIB_CLEAN='${LIBTOOL} --mode=clean'
5287	LIB_COMPILE='${LIBTOOL} --mode=compile'
5288	LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5289	LIB_INSTALL='${LIBTOOL} --mode=install'
5290	LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5291	LIB_PREP=:
5292
5293if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5294then
5295	echo "$as_me:5295: checking version of $LIBTOOL" >&5
5296echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5297
5298if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5299then
5300	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.].*//'`
5301else
5302	cf_cv_libtool_version=
5303fi
5304test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5305
5306	echo "$as_me:5306: result: $cf_cv_libtool_version" >&5
5307echo "${ECHO_T}$cf_cv_libtool_version" >&6
5308	if test -z "$cf_cv_libtool_version" ; then
5309		{ { echo "$as_me:5309: error: This is not GNU libtool" >&5
5310echo "$as_me: error: This is not GNU libtool" >&2;}
5311   { (exit 1); exit 1; }; }
5312	fi
5313else
5314	{ { echo "$as_me:5314: error: GNU libtool has not been found" >&5
5315echo "$as_me: error: GNU libtool has not been found" >&2;}
5316   { (exit 1); exit 1; }; }
5317fi
5318
5319	# special hack to add -no-undefined (which libtool should do for itself)
5320	LT_UNDEF=
5321	case "$cf_cv_system_name" in
5322	(cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5323		LT_UNDEF=-no-undefined
5324		;;
5325	esac
5326
5327	# special hack to add --tag option for C++ compiler
5328	case $cf_cv_libtool_version in
5329	(1.[5-9]*|[2-9].[0-9.a-z]*)
5330		LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5331		LIBTOOL="$LIBTOOL --tag=CC"
5332		;;
5333	(*)
5334		LIBTOOL_CXX="$LIBTOOL"
5335		;;
5336	esac
5337else
5338	LIBTOOL=""
5339	LIBTOOL_CXX=""
5340fi
5341
5342test -z "$LIBTOOL" && ECHO_LT=
5343
5344if test "$with_libtool" != "no" ; then
5345
5346cf_list_models="$cf_list_models libtool"
5347
5348else
5349
5350echo "$as_me:5350: checking if you want to build shared libraries" >&5
5351echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5352
5353# Check whether --with-shared or --without-shared was given.
5354if test "${with_shared+set}" = set; then
5355  withval="$with_shared"
5356  with_shared=$withval
5357else
5358  with_shared=no
5359fi;
5360echo "$as_me:5360: result: $with_shared" >&5
5361echo "${ECHO_T}$with_shared" >&6
5362test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5363
5364echo "$as_me:5364: checking if you want to build static libraries" >&5
5365echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5366
5367# Check whether --with-normal or --without-normal was given.
5368if test "${with_normal+set}" = set; then
5369  withval="$with_normal"
5370  with_normal=$withval
5371else
5372  with_normal=yes
5373fi;
5374echo "$as_me:5374: result: $with_normal" >&5
5375echo "${ECHO_T}$with_normal" >&6
5376test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5377
5378echo "$as_me:5378: checking if you want to build debug libraries" >&5
5379echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5380
5381# Check whether --with-debug or --without-debug was given.
5382if test "${with_debug+set}" = set; then
5383  withval="$with_debug"
5384  with_debug=$withval
5385else
5386  with_debug=yes
5387fi;
5388echo "$as_me:5388: result: $with_debug" >&5
5389echo "${ECHO_T}$with_debug" >&6
5390test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5391
5392echo "$as_me:5392: checking if you want to build profiling libraries" >&5
5393echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5394
5395# Check whether --with-profile or --without-profile was given.
5396if test "${with_profile+set}" = set; then
5397  withval="$with_profile"
5398  with_profile=$withval
5399else
5400  with_profile=no
5401fi;
5402echo "$as_me:5402: result: $with_profile" >&5
5403echo "${ECHO_T}$with_profile" >&6
5404test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5405
5406fi
5407
5408if test "X$cf_with_cxx_binding" != Xno; then
5409if test "x$with_shared" = "xyes"; then
5410echo "$as_me:5410: checking if you want to build C++ shared libraries" >&5
5411echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5412
5413# Check whether --with-cxx-shared or --without-cxx-shared was given.
5414if test "${with_cxx_shared+set}" = set; then
5415  withval="$with_cxx_shared"
5416  with_shared_cxx=$withval
5417else
5418  with_shared_cxx=no
5419fi;
5420echo "$as_me:5420: result: $with_shared_cxx" >&5
5421echo "${ECHO_T}$with_shared_cxx" >&6
5422fi
5423fi
5424
5425###############################################################################
5426
5427echo "$as_me:5427: checking for specified models" >&5
5428echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5429test -z "$cf_list_models" && cf_list_models=normal
5430test "$with_libtool" != "no" && cf_list_models=libtool
5431echo "$as_me:5431: result: $cf_list_models" >&5
5432echo "${ECHO_T}$cf_list_models" >&6
5433
5434### Use the first model as the default, and save its suffix for use in building
5435### up test-applications.
5436echo "$as_me:5436: checking for default model" >&5
5437echo $ECHO_N "checking for default model... $ECHO_C" >&6
5438DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5439echo "$as_me:5439: result: $DFT_LWR_MODEL" >&5
5440echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5441
5442DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5443
5444TICS_NAME=tic
5445
5446TINFO_NAME=tinfo
5447
5448LIB_NAME=ncurses
5449
5450LIB_DIR=../lib
5451LIB_2ND=../../lib
5452
5453echo "$as_me:5453: checking if you want to have a library-prefix" >&5
5454echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5455
5456# Check whether --with-lib-prefix or --without-lib-prefix was given.
5457if test "${with_lib_prefix+set}" = set; then
5458  withval="$with_lib_prefix"
5459  with_lib_prefix=$withval
5460else
5461  with_lib_prefix=auto
5462fi;
5463echo "$as_me:5463: result: $with_lib_prefix" >&5
5464echo "${ECHO_T}$with_lib_prefix" >&6
5465
5466if test $with_lib_prefix = auto
5467then
5468
5469	case $cf_cv_system_name in
5470	(OS/2*|os2*)
5471		if test "$DFT_LWR_MODEL" = libtool; then
5472			LIB_PREFIX='lib'
5473		else
5474			LIB_PREFIX=''
5475		fi
5476		;;
5477	(*)	LIB_PREFIX='lib'
5478		;;
5479	esac
5480cf_prefix=$LIB_PREFIX
5481
5482elif test $with_lib_prefix = no
5483then
5484	LIB_PREFIX=
5485else
5486	LIB_PREFIX=$with_lib_prefix
5487fi
5488
5489LIB_SUFFIX=
5490
5491	echo "$as_me:5491: checking for PATH separator" >&5
5492echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5493	case $cf_cv_system_name in
5494	(os2*)	PATH_SEPARATOR=';'  ;;
5495	(*)	${PATH_SEPARATOR:=':'}  ;;
5496	esac
5497
5498	echo "$as_me:5498: result: $PATH_SEPARATOR" >&5
5499echo "${ECHO_T}$PATH_SEPARATOR" >&6
5500
5501###############################################################################
5502
5503echo "$as_me:5503: checking if you want to build a separate terminfo library" >&5
5504echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5505
5506# Check whether --with-termlib or --without-termlib was given.
5507if test "${with_termlib+set}" = set; then
5508  withval="$with_termlib"
5509  with_termlib=$withval
5510else
5511  with_termlib=no
5512fi;
5513echo "$as_me:5513: result: $with_termlib" >&5
5514echo "${ECHO_T}$with_termlib" >&6
5515
5516echo "$as_me:5516: checking if you want to build a separate tic library" >&5
5517echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5518
5519# Check whether --with-ticlib or --without-ticlib was given.
5520if test "${with_ticlib+set}" = set; then
5521  withval="$with_ticlib"
5522  with_ticlib=$withval
5523else
5524  with_ticlib=no
5525fi;
5526echo "$as_me:5526: result: $with_ticlib" >&5
5527echo "${ECHO_T}$with_ticlib" >&6
5528
5529if test X"$CC_G_OPT" = X"" ; then
5530	CC_G_OPT='-g'
5531	test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5532fi
5533
5534if test X"$CXX_G_OPT" = X"" ; then
5535	CXX_G_OPT='-g'
5536	test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5537fi
5538
5539echo "$as_me:5539: checking for default loader flags" >&5
5540echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5541case $DFT_LWR_MODEL in
5542(libtool) LD_MODEL=''   ;;
5543(normal)  LD_MODEL=''   ;;
5544(debug)   LD_MODEL=$CC_G_OPT ;;
5545(profile) LD_MODEL='-pg';;
5546(shared)  LD_MODEL=''   ;;
5547esac
5548echo "$as_me:5548: result: $LD_MODEL" >&5
5549echo "${ECHO_T}$LD_MODEL" >&6
5550
5551case $DFT_LWR_MODEL in
5552(shared)
5553
5554echo "$as_me:5554: checking if rpath option should be used" >&5
5555echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5556
5557# Check whether --enable-rpath or --disable-rpath was given.
5558if test "${enable_rpath+set}" = set; then
5559  enableval="$enable_rpath"
5560  cf_cv_enable_rpath=$enableval
5561else
5562  cf_cv_enable_rpath=no
5563fi;
5564echo "$as_me:5564: result: $cf_cv_enable_rpath" >&5
5565echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5566
5567echo "$as_me:5567: checking if shared libraries should be relinked during install" >&5
5568echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5569
5570# Check whether --enable-relink or --disable-relink was given.
5571if test "${enable_relink+set}" = set; then
5572  enableval="$enable_relink"
5573  cf_cv_do_relink=$enableval
5574else
5575  cf_cv_do_relink=yes
5576fi;
5577echo "$as_me:5577: result: $cf_cv_do_relink" >&5
5578echo "${ECHO_T}$cf_cv_do_relink" >&6
5579	;;
5580esac
5581
5582# we will build libraries one-level down.
5583rel_builddir=..
5584
5585LD_RPATH_OPT=
5586if test "x$cf_cv_enable_rpath" != xno
5587then
5588	echo "$as_me:5588: checking for an rpath option" >&5
5589echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5590	case $cf_cv_system_name in
5591	(irix*)
5592		if test "$GCC" = yes; then
5593			LD_RPATH_OPT="-Wl,-rpath,"
5594		else
5595			LD_RPATH_OPT="-rpath "
5596		fi
5597		;;
5598	(linux*|gnu*|k*bsd*-gnu|freebsd*)
5599		LD_RPATH_OPT="-Wl,-rpath,"
5600		;;
5601	(openbsd[2-9].*|mirbsd*)
5602		LD_RPATH_OPT="-Wl,-rpath,"
5603		;;
5604	(dragonfly*)
5605		LD_RPATH_OPT="-rpath "
5606		;;
5607	(netbsd*)
5608		LD_RPATH_OPT="-Wl,-rpath,"
5609		;;
5610	(osf*|mls+*)
5611		LD_RPATH_OPT="-rpath "
5612		;;
5613	(solaris2*)
5614		LD_RPATH_OPT="-R"
5615		;;
5616	(*)
5617		;;
5618	esac
5619	echo "$as_me:5619: result: $LD_RPATH_OPT" >&5
5620echo "${ECHO_T}$LD_RPATH_OPT" >&6
5621
5622	case "x$LD_RPATH_OPT" in
5623	(x-R*)
5624		echo "$as_me:5624: checking if we need a space after rpath option" >&5
5625echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5626		cf_save_LIBS="$LIBS"
5627
5628cf_add_libs="$LIBS"
5629# reverse order
5630cf_add_0lib=
5631for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5632# filter duplicates
5633for cf_add_1lib in $cf_add_0lib; do
5634	for cf_add_2lib in $cf_add_libs; do
5635		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5636			cf_add_1lib=
5637			break
5638		fi
5639	done
5640	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5641done
5642LIBS="$cf_add_libs"
5643
5644		cat >conftest.$ac_ext <<_ACEOF
5645#line 5645 "configure"
5646#include "confdefs.h"
5647
5648int
5649main (void)
5650{
5651
5652  ;
5653  return 0;
5654}
5655_ACEOF
5656rm -f conftest.$ac_objext conftest$ac_exeext
5657if { (eval echo "$as_me:5657: \"$ac_link\"") >&5
5658  (eval $ac_link) 2>&5
5659  ac_status=$?
5660  echo "$as_me:5660: \$? = $ac_status" >&5
5661  (exit $ac_status); } &&
5662         { ac_try='test -s conftest$ac_exeext'
5663  { (eval echo "$as_me:5663: \"$ac_try\"") >&5
5664  (eval $ac_try) 2>&5
5665  ac_status=$?
5666  echo "$as_me:5666: \$? = $ac_status" >&5
5667  (exit $ac_status); }; }; then
5668  cf_rpath_space=no
5669else
5670  echo "$as_me: failed program was:" >&5
5671cat conftest.$ac_ext >&5
5672cf_rpath_space=yes
5673fi
5674rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5675		LIBS="$cf_save_LIBS"
5676		echo "$as_me:5676: result: $cf_rpath_space" >&5
5677echo "${ECHO_T}$cf_rpath_space" >&6
5678		test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5679		;;
5680	esac
5681fi
5682
5683	RM_SHARED_OPTS=
5684	LOCAL_LDFLAGS=
5685	LOCAL_LDFLAGS2=
5686	LD_SHARED_OPTS=
5687	INSTALL_LIB="-m 644"
5688	: ${rel_builddir:=.}
5689
5690	shlibdir=$libdir
5691
5692	MAKE_DLLS="#"
5693
5694	cf_cv_do_symlinks=no
5695	cf_ld_rpath_opt=
5696	test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5697
5698	echo "$as_me:5698: checking if release/abi version should be used for shared libs" >&5
5699echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5700
5701# Check whether --with-shlib-version or --without-shlib-version was given.
5702if test "${with_shlib_version+set}" = set; then
5703  withval="$with_shlib_version"
5704  test -z "$withval" && withval=auto
5705	case $withval in
5706	(yes)
5707		cf_cv_shlib_version=auto
5708		;;
5709	(rel|abi|auto)
5710		cf_cv_shlib_version=$withval
5711		;;
5712	(*)
5713		echo "$as_me:5713: result: $withval" >&5
5714echo "${ECHO_T}$withval" >&6
5715		{ { echo "$as_me:5715: error: option value must be one of: rel, abi, or auto" >&5
5716echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5717   { (exit 1); exit 1; }; }
5718		;;
5719	esac
5720
5721else
5722  cf_cv_shlib_version=auto
5723fi;
5724	echo "$as_me:5724: result: $cf_cv_shlib_version" >&5
5725echo "${ECHO_T}$cf_cv_shlib_version" >&6
5726
5727	cf_cv_rm_so_locs=no
5728	cf_try_cflags=
5729
5730	# Some less-capable ports of gcc support only -fpic
5731	CC_SHARED_OPTS=
5732
5733	cf_try_fPIC=no
5734	if test "$GCC" = yes
5735	then
5736		cf_try_fPIC=yes
5737	else
5738		case $cf_cv_system_name in
5739		(*linux*)	# e.g., PGI compiler
5740			cf_try_fPIC=yes
5741			;;
5742		esac
5743	fi
5744
5745	if test "$cf_try_fPIC" = yes
5746	then
5747		echo "$as_me:5747: checking which $CC option to use" >&5
5748echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5749		cf_save_CFLAGS="$CFLAGS"
5750		for CC_SHARED_OPTS in -fPIC -fpic ''
5751		do
5752			CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5753			cat >conftest.$ac_ext <<_ACEOF
5754#line 5754 "configure"
5755#include "confdefs.h"
5756#include <stdio.h>
5757int
5758main (void)
5759{
5760int x = 1
5761  ;
5762  return 0;
5763}
5764_ACEOF
5765rm -f conftest.$ac_objext
5766if { (eval echo "$as_me:5766: \"$ac_compile\"") >&5
5767  (eval $ac_compile) 2>&5
5768  ac_status=$?
5769  echo "$as_me:5769: \$? = $ac_status" >&5
5770  (exit $ac_status); } &&
5771         { ac_try='test -s conftest.$ac_objext'
5772  { (eval echo "$as_me:5772: \"$ac_try\"") >&5
5773  (eval $ac_try) 2>&5
5774  ac_status=$?
5775  echo "$as_me:5775: \$? = $ac_status" >&5
5776  (exit $ac_status); }; }; then
5777  break
5778else
5779  echo "$as_me: failed program was:" >&5
5780cat conftest.$ac_ext >&5
5781fi
5782rm -f conftest.$ac_objext conftest.$ac_ext
5783		done
5784		echo "$as_me:5784: result: $CC_SHARED_OPTS" >&5
5785echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5786		CFLAGS="$cf_save_CFLAGS"
5787	fi
5788
5789	cf_cv_shlib_version_infix=no
5790
5791	case $cf_cv_system_name in
5792	(aix4.3-9*|aix[5-7]*)
5793		if test "$GCC" = yes; then
5794			CC_SHARED_OPTS='-Wl,-brtl'
5795			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5796		else
5797			CC_SHARED_OPTS='-brtl'
5798			# as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5799			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5800		fi
5801		;;
5802	(beos*)
5803		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5804		;;
5805	(cygwin*)
5806		CC_SHARED_OPTS=
5807		MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5808		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5809		cf_cv_shlib_version=cygdll
5810		cf_cv_shlib_version_infix=cygdll
5811		shlibdir=$bindir
5812		MAKE_DLLS=
5813		cat >mk_shared_lib.sh <<-CF_EOF
5814		#!$SHELL
5815		SHARED_LIB=\$1
5816		IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5817		shift
5818		cat <<-EOF
5819		Linking shared library
5820		** SHARED_LIB \$SHARED_LIB
5821		** IMPORT_LIB \$IMPORT_LIB
5822EOF
5823		exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5824CF_EOF
5825		chmod +x mk_shared_lib.sh
5826		;;
5827	(msys*)
5828		CC_SHARED_OPTS=
5829		MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5830		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5831		cf_cv_shlib_version=msysdll
5832		cf_cv_shlib_version_infix=msysdll
5833		shlibdir=$bindir
5834		MAKE_DLLS=
5835		cat >mk_shared_lib.sh <<-CF_EOF
5836		#!$SHELL
5837		SHARED_LIB=\$1
5838		IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5839		shift
5840		cat <<-EOF
5841		Linking shared library
5842		** SHARED_LIB \$SHARED_LIB
5843		** IMPORT_LIB \$IMPORT_LIB
5844EOF
5845		exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5846CF_EOF
5847		chmod +x mk_shared_lib.sh
5848		;;
5849	(darwin*)
5850		cf_try_cflags="no-cpp-precomp"
5851		CC_SHARED_OPTS="-dynamic"
5852		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5853		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5854		cf_cv_shlib_version_infix=yes
5855		echo "$as_me:5855: checking if ld -search_paths_first works" >&5
5856echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5857if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5858  echo $ECHO_N "(cached) $ECHO_C" >&6
5859else
5860
5861			cf_save_LDFLAGS=$LDFLAGS
5862			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5863			cat >conftest.$ac_ext <<_ACEOF
5864#line 5864 "configure"
5865#include "confdefs.h"
5866
5867int
5868main (void)
5869{
5870int i;
5871  ;
5872  return 0;
5873}
5874_ACEOF
5875rm -f conftest.$ac_objext conftest$ac_exeext
5876if { (eval echo "$as_me:5876: \"$ac_link\"") >&5
5877  (eval $ac_link) 2>&5
5878  ac_status=$?
5879  echo "$as_me:5879: \$? = $ac_status" >&5
5880  (exit $ac_status); } &&
5881         { ac_try='test -s conftest$ac_exeext'
5882  { (eval echo "$as_me:5882: \"$ac_try\"") >&5
5883  (eval $ac_try) 2>&5
5884  ac_status=$?
5885  echo "$as_me:5885: \$? = $ac_status" >&5
5886  (exit $ac_status); }; }; then
5887  cf_cv_ldflags_search_paths_first=yes
5888else
5889  echo "$as_me: failed program was:" >&5
5890cat conftest.$ac_ext >&5
5891cf_cv_ldflags_search_paths_first=no
5892fi
5893rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5894				LDFLAGS=$cf_save_LDFLAGS
5895fi
5896echo "$as_me:5896: result: $cf_cv_ldflags_search_paths_first" >&5
5897echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5898		if test $cf_cv_ldflags_search_paths_first = yes; then
5899			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5900		fi
5901		;;
5902	(hpux[7-8]*)
5903		# HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5904		if test "$GCC" != yes; then
5905			CC_SHARED_OPTS='+Z'
5906		fi
5907		MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5908		INSTALL_LIB="-m 555"
5909		;;
5910	(hpux*)
5911		# (tested with gcc 2.7.2 -- I don't have c89)
5912		if test "$GCC" = yes; then
5913			LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5914		else
5915			CC_SHARED_OPTS='+Z'
5916			LD_SHARED_OPTS='-Wl,+b,${libdir}'
5917		fi
5918		MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5919		# HP-UX shared libraries must be executable, and should be
5920		# readonly to exploit a quirk in the memory manager.
5921		INSTALL_LIB="-m 555"
5922		;;
5923	(interix*)
5924		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5925		if test "$cf_cv_shlib_version" = rel; then
5926			cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5927		else
5928			cf_shared_soname='`basename $@`'
5929		fi
5930		CC_SHARED_OPTS=
5931		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5932		;;
5933	(irix*)
5934		if test "$cf_cv_enable_rpath" = yes ; then
5935			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5936		fi
5937		# tested with IRIX 5.2 and 'cc'.
5938		if test "$GCC" != yes; then
5939			CC_SHARED_OPTS='-KPIC'
5940			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5941		else
5942			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5943		fi
5944		cf_cv_rm_so_locs=yes
5945		;;
5946	(linux*|gnu*|k*bsd*-gnu)
5947		if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5948			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5949			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5950		fi
5951		if test "$cf_cv_enable_rpath" = yes ; then
5952			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5953		fi
5954
5955	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5956	if test "$cf_cv_shlib_version" = rel; then
5957		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5958	else
5959		cf_cv_shared_soname='`basename $@`'
5960	fi
5961
5962		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5963		;;
5964	(mingw*)
5965		cf_cv_shlib_version=mingw
5966		cf_cv_shlib_version_infix=mingw
5967		shlibdir=$bindir
5968		MAKE_DLLS=
5969		if test "$DFT_LWR_MODEL" = "shared" ; then
5970			LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5971			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5972			EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5973		fi
5974		CC_SHARED_OPTS=
5975		MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5976		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5977		cat >mk_shared_lib.sh <<-CF_EOF
5978		#!$SHELL
5979		SHARED_LIB=\$1
5980		IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5981		shift
5982		cat <<-EOF
5983		Linking shared library
5984		** SHARED_LIB \$SHARED_LIB
5985		** IMPORT_LIB \$IMPORT_LIB
5986EOF
5987		exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5988CF_EOF
5989		chmod +x mk_shared_lib.sh
5990		;;
5991	(openbsd[2-9].*|mirbsd*)
5992		if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5993			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5994			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5995		fi
5996		if test "$cf_cv_enable_rpath" = yes ; then
5997			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5998		fi
5999		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6000
6001	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6002	if test "$cf_cv_shlib_version" = rel; then
6003		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6004	else
6005		cf_cv_shared_soname='`basename $@`'
6006	fi
6007
6008		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6009		;;
6010	(nto-qnx*|openbsd*|freebsd[12].*)
6011		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6012		MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6013		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6014		;;
6015	(dragonfly*|freebsd*)
6016		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6017		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6018			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6019			LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6020			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6021		fi
6022
6023	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6024	if test "$cf_cv_shlib_version" = rel; then
6025		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6026	else
6027		cf_cv_shared_soname='`basename $@`'
6028	fi
6029
6030		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6031		;;
6032	(netbsd*)
6033		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6034		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6035			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6036			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6037			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6038			if test "$cf_cv_shlib_version" = auto; then
6039			if test -f /usr/libexec/ld.elf_so; then
6040				cf_cv_shlib_version=abi
6041			else
6042				cf_cv_shlib_version=rel
6043			fi
6044			fi
6045
6046	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6047	if test "$cf_cv_shlib_version" = rel; then
6048		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6049	else
6050		cf_cv_shared_soname='`basename $@`'
6051	fi
6052
6053			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6054		else
6055			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
6056		fi
6057		;;
6058	(osf*|mls+*)
6059		# tested with OSF/1 V3.2 and 'cc'
6060		# tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6061		# link with shared libs).
6062		MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6063		case $host_os in
6064		(osf4*)
6065			MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6066			;;
6067		esac
6068		MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6069		if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6070			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6071			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6072		fi
6073		cf_cv_rm_so_locs=yes
6074		;;
6075	(sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6076		# tested with osr5.0.5
6077		if test "$GCC" != yes; then
6078			CC_SHARED_OPTS='-belf -KPIC'
6079		fi
6080		MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6081		if test "$cf_cv_enable_rpath" = yes ; then
6082			# only way is to set LD_RUN_PATH but no switch for it
6083			RUN_PATH=$libdir
6084		fi
6085		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6086		LINK_PROGS='LD_RUN_PATH=${libdir}'
6087		LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6088		;;
6089	(sunos4*)
6090		# tested with SunOS 4.1.1 and gcc 2.7.0
6091		if test "$GCC" != yes; then
6092			CC_SHARED_OPTS='-KPIC'
6093		fi
6094		MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6095		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6096		;;
6097	(solaris2*)
6098		# tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6099		# tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6100		if test "$DFT_LWR_MODEL" = "shared" ; then
6101			LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6102			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6103		fi
6104		if test "$cf_cv_enable_rpath" = yes ; then
6105			EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6106		fi
6107
6108	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6109	if test "$cf_cv_shlib_version" = rel; then
6110		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6111	else
6112		cf_cv_shared_soname='`basename $@`'
6113	fi
6114
6115		if test "$GCC" != yes; then
6116			cf_save_CFLAGS="$CFLAGS"
6117			for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6118			do
6119				CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6120				cat >conftest.$ac_ext <<_ACEOF
6121#line 6121 "configure"
6122#include "confdefs.h"
6123#include <stdio.h>
6124int
6125main (void)
6126{
6127printf("Hello\n");
6128  ;
6129  return 0;
6130}
6131_ACEOF
6132rm -f conftest.$ac_objext
6133if { (eval echo "$as_me:6133: \"$ac_compile\"") >&5
6134  (eval $ac_compile) 2>&5
6135  ac_status=$?
6136  echo "$as_me:6136: \$? = $ac_status" >&5
6137  (exit $ac_status); } &&
6138         { ac_try='test -s conftest.$ac_objext'
6139  { (eval echo "$as_me:6139: \"$ac_try\"") >&5
6140  (eval $ac_try) 2>&5
6141  ac_status=$?
6142  echo "$as_me:6142: \$? = $ac_status" >&5
6143  (exit $ac_status); }; }; then
6144  break
6145else
6146  echo "$as_me: failed program was:" >&5
6147cat conftest.$ac_ext >&5
6148fi
6149rm -f conftest.$ac_objext conftest.$ac_ext
6150			done
6151			CFLAGS="$cf_save_CFLAGS"
6152			CC_SHARED_OPTS=$cf_shared_opts
6153			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6154		else
6155			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6156		fi
6157		;;
6158	(sysv5uw7*|unix_sv*)
6159		# tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6160		if test "$GCC" != yes; then
6161			CC_SHARED_OPTS='-KPIC'
6162		fi
6163		MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6164		;;
6165	(*)
6166		CC_SHARED_OPTS='unknown'
6167		MK_SHARED_LIB='echo unknown'
6168		;;
6169	esac
6170
6171	# This works if the last tokens in $MK_SHARED_LIB are the -o target.
6172	case "$cf_cv_shlib_version" in
6173	(rel|abi)
6174		case "$MK_SHARED_LIB" in
6175		(*'-o $@')
6176			test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6177			;;
6178		(*)
6179			{ echo "$as_me:6179: WARNING: ignored --with-shlib-version" >&5
6180echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6181			;;
6182		esac
6183		;;
6184	esac
6185
6186	if test -n "$cf_try_cflags"
6187	then
6188cat > conftest.$ac_ext <<EOF
6189#line 6189 "${as_me:-configure}"
6190#include <stdio.h>
6191int main(int argc, char *argv[])
6192{
6193	printf("hello\n");
6194	return (argv[argc-1] == 0) ;
6195}
6196EOF
6197		cf_save_CFLAGS="$CFLAGS"
6198		for cf_opt in $cf_try_cflags
6199		do
6200			CFLAGS="$cf_save_CFLAGS -$cf_opt"
6201			echo "$as_me:6201: checking if CFLAGS option -$cf_opt works" >&5
6202echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6203			if { (eval echo "$as_me:6203: \"$ac_compile\"") >&5
6204  (eval $ac_compile) 2>&5
6205  ac_status=$?
6206  echo "$as_me:6206: \$? = $ac_status" >&5
6207  (exit $ac_status); }; then
6208				echo "$as_me:6208: result: yes" >&5
6209echo "${ECHO_T}yes" >&6
6210				cf_save_CFLAGS="$CFLAGS"
6211			else
6212				echo "$as_me:6212: result: no" >&5
6213echo "${ECHO_T}no" >&6
6214			fi
6215		done
6216		CFLAGS="$cf_save_CFLAGS"
6217	fi
6218
6219	# RPATH_LIST is a colon-separated list of directories
6220	test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6221	test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6222
6223	test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6224
6225	test -n "$verbose" && echo "	CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6226
6227echo "${as_me:-configure}:6227: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6228
6229	test -n "$verbose" && echo "	MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6230
6231echo "${as_me:-configure}:6231: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6232
6233for model in $cf_list_models; do
6234	case $model in
6235	(libtool)
6236
6237echo "$as_me:6237: checking for additional libtool options" >&5
6238echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6239
6240# Check whether --with-libtool-opts or --without-libtool-opts was given.
6241if test "${with_libtool_opts+set}" = set; then
6242  withval="$with_libtool_opts"
6243  with_libtool_opts=$withval
6244else
6245  with_libtool_opts=no
6246fi;
6247echo "$as_me:6247: result: $with_libtool_opts" >&5
6248echo "${ECHO_T}$with_libtool_opts" >&6
6249
6250case .$with_libtool_opts in
6251(.yes|.no|.)
6252	;;
6253(*)
6254	LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6255	;;
6256esac
6257
6258echo "$as_me:6258: checking if exported-symbols file should be used" >&5
6259echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6260
6261# Check whether --with-export-syms or --without-export-syms was given.
6262if test "${with_export_syms+set}" = set; then
6263  withval="$with_export_syms"
6264  with_export_syms=$withval
6265else
6266  with_export_syms=no
6267fi;
6268if test "x$with_export_syms" = xyes
6269then
6270	with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6271
6272fi
6273echo "$as_me:6273: result: $with_export_syms" >&5
6274echo "${ECHO_T}$with_export_syms" >&6
6275if test "x$with_export_syms" != xno
6276then
6277	EXPORT_SYMS="-export-symbols $with_export_syms"
6278
6279fi
6280
6281		;;
6282	(shared)
6283		if test "$CC_SHARED_OPTS" = "unknown"; then
6284			{ { echo "$as_me:6284: error: Shared libraries are not supported in this version" >&5
6285echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6286   { (exit 1); exit 1; }; }
6287		fi
6288		# workaround for inept transition to PIE vs PIC...
6289		echo "$as_me:6289: checking if current CFLAGS link properly" >&5
6290echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6291		cat >conftest.$ac_ext <<_ACEOF
6292#line 6292 "configure"
6293#include "confdefs.h"
6294#include <stdio.h>
6295int
6296main (void)
6297{
6298printf("Hello work\n");
6299  ;
6300  return 0;
6301}
6302_ACEOF
6303rm -f conftest.$ac_objext conftest$ac_exeext
6304if { (eval echo "$as_me:6304: \"$ac_link\"") >&5
6305  (eval $ac_link) 2>&5
6306  ac_status=$?
6307  echo "$as_me:6307: \$? = $ac_status" >&5
6308  (exit $ac_status); } &&
6309         { ac_try='test -s conftest$ac_exeext'
6310  { (eval echo "$as_me:6310: \"$ac_try\"") >&5
6311  (eval $ac_try) 2>&5
6312  ac_status=$?
6313  echo "$as_me:6313: \$? = $ac_status" >&5
6314  (exit $ac_status); }; }; then
6315  cf_cflags_work=yes
6316else
6317  echo "$as_me: failed program was:" >&5
6318cat conftest.$ac_ext >&5
6319cf_cflags_work=no
6320fi
6321rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6322		echo "$as_me:6322: result: $cf_cflags_work" >&5
6323echo "${ECHO_T}$cf_cflags_work" >&6
6324		if test "$cf_cflags_work" = no
6325		then
6326			test -n "$verbose" && echo "	try to work around by appending shared-options" 1>&6
6327
6328echo "${as_me:-configure}:6328: testing try to work around by appending shared-options ..." 1>&5
6329
6330			CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6331		fi
6332
6333echo "$as_me:6333: checking if versioned-symbols file should be used" >&5
6334echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6335
6336# Check whether --with-versioned-syms or --without-versioned-syms was given.
6337if test "${with_versioned_syms+set}" = set; then
6338  withval="$with_versioned_syms"
6339  with_versioned_syms=$withval
6340else
6341  with_versioned_syms=no
6342fi;
6343case "x$with_versioned_syms" in
6344(xyes)
6345	with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6346
6347	;;
6348(xno)
6349	;;
6350(x/*)
6351	test -f "$with_versioned_syms" || { { echo "$as_me:6351: error: expected a filename: $with_versioned_syms" >&5
6352echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6353   { (exit 1); exit 1; }; }
6354	;;
6355(*)
6356	test -f "$with_versioned_syms" || { { echo "$as_me:6356: error: expected a filename: $with_versioned_syms" >&5
6357echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6358   { (exit 1); exit 1; }; }
6359	with_versioned_syms=`pwd`/"$with_versioned_syms"
6360	;;
6361esac
6362echo "$as_me:6362: result: $with_versioned_syms" >&5
6363echo "${ECHO_T}$with_versioned_syms" >&6
6364
6365RESULTING_SYMS=
6366VERSIONED_SYMS=
6367WILDCARD_SYMS=
6368
6369if test "x$with_versioned_syms" != xno
6370then
6371	RESULTING_SYMS=$with_versioned_syms
6372	case "x$MK_SHARED_LIB" in
6373	(*-Wl,*)
6374		VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6375		MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6376		test -n "$verbose" && echo "	MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6377
6378echo "${as_me:-configure}:6378: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6379
6380		;;
6381	(*-dy\ *)
6382		VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6383		MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6384		test -n "$verbose" && echo "	MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6385
6386echo "${as_me:-configure}:6386: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6387
6388		;;
6389	(*)
6390		{ echo "$as_me:6390: WARNING: this system does not support versioned-symbols" >&5
6391echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6392		;;
6393	esac
6394
6395	# Linux ld can selectively override scope, e.g., of symbols beginning with
6396	# "_" by first declaring some as global, and then using a wildcard to
6397	# declare the others as local.  Some other loaders cannot do this.  Check
6398	# by constructing a (very) simple shared library and inspecting its
6399	# symbols.
6400	if test "x$VERSIONED_SYMS" != "x"
6401	then
6402		echo "$as_me:6402: checking if wildcards can be used to selectively omit symbols" >&5
6403echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6404		WILDCARD_SYMS=no
6405
6406		# make sources
6407		rm -f conftest.*
6408
6409		cat >conftest.ver <<EOF
6410module_1.0 {
6411global:
6412	globalf1;
6413local:
6414	localf1;
6415};
6416module_2.0 {
6417global:
6418	globalf2;
6419local:
6420	localf2;
6421	_*;
6422} module_1.0;
6423submodule_1.0 {
6424global:
6425	subglobalf1;
6426	_ismissing;
6427local:
6428	sublocalf1;
6429};
6430submodule_2.0 {
6431global:
6432	subglobalf2;
6433local:
6434	sublocalf2;
6435	_*;
6436} submodule_1.0;
6437EOF
6438		cat >conftest.$ac_ext <<EOF
6439#line 6439 "configure"
6440int	_ismissing(void) { return 1; }
6441int	_localf1(void) { return 1; }
6442int	_localf2(void) { return 2; }
6443int	globalf1(void) { return 1; }
6444int	globalf2(void) { return 2; }
6445int	_sublocalf1(void) { return 1; }
6446int	_sublocalf2(void) { return 2; }
6447int	subglobalf1(void) { return 1; }
6448int	subglobalf2(void) { return 2; }
6449EOF
6450		cat >conftest.mk <<EOF
6451CC=${CC}
6452CFLAGS=${CFLAGS}
6453CPPFLAGS=${CPPFLAGS}
6454LDFLAGS=${LDFLAGS}
6455LIBS=${LIBS}
6456VERSIONED_SYMS=${VERSIONED_SYMS}
6457RESULTING_SYMS=conftest.ver
6458MK_SHARED_LIB=${MK_SHARED_LIB}
6459conftest.so: conftest.$ac_cv_objext
6460		\$(MK_SHARED_LIB) conftest.$ac_cv_objext
6461EOF
6462
6463		# compile source, make library
6464		if make -f conftest.mk 2>&5 >/dev/null
6465		then
6466			# test for missing symbol in either Data or Text section
6467			cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[ 	][DT][ 	]'`
6468			test -n "$cf_missing" && WILDCARD_SYMS=yes
6469		fi
6470		echo "$as_me:6470: result: $WILDCARD_SYMS" >&5
6471echo "${ECHO_T}$WILDCARD_SYMS" >&6
6472		rm -f conftest.*
6473	fi
6474fi
6475
6476		;;
6477	esac
6478done
6479
6480### Checks for special libraries, must be done up-front.
6481SHLIB_LIST=""
6482
6483echo "$as_me:6483: checking if you want to link with the GPM mouse library" >&5
6484echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6485
6486# Check whether --with-gpm or --without-gpm was given.
6487if test "${with_gpm+set}" = set; then
6488  withval="$with_gpm"
6489  with_gpm=$withval
6490else
6491  with_gpm=maybe
6492fi;
6493echo "$as_me:6493: result: $with_gpm" >&5
6494echo "${ECHO_T}$with_gpm" >&6
6495
6496if test "$with_gpm" != no ; then
6497	echo "$as_me:6497: checking for gpm.h" >&5
6498echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6499if test "${ac_cv_header_gpm_h+set}" = set; then
6500  echo $ECHO_N "(cached) $ECHO_C" >&6
6501else
6502  cat >conftest.$ac_ext <<_ACEOF
6503#line 6503 "configure"
6504#include "confdefs.h"
6505#include <gpm.h>
6506_ACEOF
6507if { (eval echo "$as_me:6507: \"$ac_cpp conftest.$ac_ext\"") >&5
6508  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6509  ac_status=$?
6510  egrep -v '^ *\+' conftest.er1 >conftest.err
6511  rm -f conftest.er1
6512  cat conftest.err >&5
6513  echo "$as_me:6513: \$? = $ac_status" >&5
6514  (exit $ac_status); } >/dev/null; then
6515  if test -s conftest.err; then
6516    ac_cpp_err=$ac_c_preproc_warn_flag
6517  else
6518    ac_cpp_err=
6519  fi
6520else
6521  ac_cpp_err=yes
6522fi
6523if test -z "$ac_cpp_err"; then
6524  ac_cv_header_gpm_h=yes
6525else
6526  echo "$as_me: failed program was:" >&5
6527  cat conftest.$ac_ext >&5
6528  ac_cv_header_gpm_h=no
6529fi
6530rm -f conftest.err conftest.$ac_ext
6531fi
6532echo "$as_me:6532: result: $ac_cv_header_gpm_h" >&5
6533echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6534if test $ac_cv_header_gpm_h = yes; then
6535
6536cat >>confdefs.h <<\EOF
6537#define HAVE_GPM_H 1
6538EOF
6539
6540		if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6541			test -n "$verbose" && echo "	assuming we really have GPM library" 1>&6
6542
6543echo "${as_me:-configure}:6543: testing assuming we really have GPM library ..." 1>&5
6544
6545cat >>confdefs.h <<\EOF
6546#define HAVE_LIBGPM 1
6547EOF
6548
6549			with_gpm=yes
6550		else
6551			echo "$as_me:6551: checking for Gpm_Open in -lgpm" >&5
6552echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6553if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6554  echo $ECHO_N "(cached) $ECHO_C" >&6
6555else
6556  ac_check_lib_save_LIBS=$LIBS
6557LIBS="-lgpm  $LIBS"
6558cat >conftest.$ac_ext <<_ACEOF
6559#line 6559 "configure"
6560#include "confdefs.h"
6561
6562/* Override any gcc2 internal prototype to avoid an error.  */
6563#ifdef __cplusplus
6564extern "C"
6565#endif
6566/* We use char because int might match the return type of a gcc2
6567   builtin and then its argument prototype would still apply.  */
6568char Gpm_Open ();
6569int
6570main (void)
6571{
6572Gpm_Open ();
6573  ;
6574  return 0;
6575}
6576_ACEOF
6577rm -f conftest.$ac_objext conftest$ac_exeext
6578if { (eval echo "$as_me:6578: \"$ac_link\"") >&5
6579  (eval $ac_link) 2>&5
6580  ac_status=$?
6581  echo "$as_me:6581: \$? = $ac_status" >&5
6582  (exit $ac_status); } &&
6583         { ac_try='test -s conftest$ac_exeext'
6584  { (eval echo "$as_me:6584: \"$ac_try\"") >&5
6585  (eval $ac_try) 2>&5
6586  ac_status=$?
6587  echo "$as_me:6587: \$? = $ac_status" >&5
6588  (exit $ac_status); }; }; then
6589  ac_cv_lib_gpm_Gpm_Open=yes
6590else
6591  echo "$as_me: failed program was:" >&5
6592cat conftest.$ac_ext >&5
6593ac_cv_lib_gpm_Gpm_Open=no
6594fi
6595rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6596LIBS=$ac_check_lib_save_LIBS
6597fi
6598echo "$as_me:6598: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6599echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6600if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6601  with_gpm=yes
6602else
6603
6604				if test "$with_gpm" = maybe; then
6605					{ echo "$as_me:6605: WARNING: Cannot link with GPM library" >&5
6606echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6607					with_gpm=no
6608				else
6609					{ { echo "$as_me:6609: error: Cannot link with GPM library" >&5
6610echo "$as_me: error: Cannot link with GPM library" >&2;}
6611   { (exit 1); exit 1; }; }
6612				fi
6613
6614fi
6615
6616		fi
6617
6618else
6619
6620		test "$with_gpm" != maybe && { echo "$as_me:6620: WARNING: Cannot find GPM header" >&5
6621echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6622		with_gpm=no
6623
6624fi
6625
6626fi
6627
6628if test "$with_gpm" != no ; then
6629	echo "$as_me:6629: checking if you want to load GPM dynamically" >&5
6630echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6631
6632# Check whether --with-dlsym or --without-dlsym was given.
6633if test "${with_dlsym+set}" = set; then
6634  withval="$with_dlsym"
6635  with_dlsym=$withval
6636else
6637  with_dlsym=yes
6638fi;
6639	echo "$as_me:6639: result: $with_dlsym" >&5
6640echo "${ECHO_T}$with_dlsym" >&6
6641	if test "x$with_dlsym" = xyes ; then
6642
6643cf_have_dlsym=no
6644echo "$as_me:6644: checking for dlsym" >&5
6645echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6646if test "${ac_cv_func_dlsym+set}" = set; then
6647  echo $ECHO_N "(cached) $ECHO_C" >&6
6648else
6649  cat >conftest.$ac_ext <<_ACEOF
6650#line 6650 "configure"
6651#include "confdefs.h"
6652#define dlsym autoconf_temporary
6653#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
6654#undef dlsym
6655
6656#ifdef __cplusplus
6657extern "C"
6658#endif
6659
6660/* We use char because int might match the return type of a gcc2
6661   builtin and then its argument prototype would still apply.  */
6662char dlsym (void);
6663
6664int
6665main (void)
6666{
6667
6668/* The GNU C library defines stubs for functions which it implements
6669    to always fail with ENOSYS.  Some functions are actually named
6670    something starting with __ and the normal name is an alias.  */
6671#if defined (__stub_dlsym) || defined (__stub___dlsym)
6672#error found stub for dlsym
6673#endif
6674
6675	return dlsym ();
6676  ;
6677  return 0;
6678}
6679_ACEOF
6680rm -f conftest.$ac_objext conftest$ac_exeext
6681if { (eval echo "$as_me:6681: \"$ac_link\"") >&5
6682  (eval $ac_link) 2>&5
6683  ac_status=$?
6684  echo "$as_me:6684: \$? = $ac_status" >&5
6685  (exit $ac_status); } &&
6686         { ac_try='test -s conftest$ac_exeext'
6687  { (eval echo "$as_me:6687: \"$ac_try\"") >&5
6688  (eval $ac_try) 2>&5
6689  ac_status=$?
6690  echo "$as_me:6690: \$? = $ac_status" >&5
6691  (exit $ac_status); }; }; then
6692  ac_cv_func_dlsym=yes
6693else
6694  echo "$as_me: failed program was:" >&5
6695cat conftest.$ac_ext >&5
6696ac_cv_func_dlsym=no
6697fi
6698rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6699fi
6700echo "$as_me:6700: result: $ac_cv_func_dlsym" >&5
6701echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6702if test $ac_cv_func_dlsym = yes; then
6703  cf_have_dlsym=yes
6704else
6705
6706cf_have_libdl=no
6707echo "$as_me:6707: checking for dlsym in -ldl" >&5
6708echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6709if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6710  echo $ECHO_N "(cached) $ECHO_C" >&6
6711else
6712  ac_check_lib_save_LIBS=$LIBS
6713LIBS="-ldl  $LIBS"
6714cat >conftest.$ac_ext <<_ACEOF
6715#line 6715 "configure"
6716#include "confdefs.h"
6717
6718/* Override any gcc2 internal prototype to avoid an error.  */
6719#ifdef __cplusplus
6720extern "C"
6721#endif
6722/* We use char because int might match the return type of a gcc2
6723   builtin and then its argument prototype would still apply.  */
6724char dlsym ();
6725int
6726main (void)
6727{
6728dlsym ();
6729  ;
6730  return 0;
6731}
6732_ACEOF
6733rm -f conftest.$ac_objext conftest$ac_exeext
6734if { (eval echo "$as_me:6734: \"$ac_link\"") >&5
6735  (eval $ac_link) 2>&5
6736  ac_status=$?
6737  echo "$as_me:6737: \$? = $ac_status" >&5
6738  (exit $ac_status); } &&
6739         { ac_try='test -s conftest$ac_exeext'
6740  { (eval echo "$as_me:6740: \"$ac_try\"") >&5
6741  (eval $ac_try) 2>&5
6742  ac_status=$?
6743  echo "$as_me:6743: \$? = $ac_status" >&5
6744  (exit $ac_status); }; }; then
6745  ac_cv_lib_dl_dlsym=yes
6746else
6747  echo "$as_me: failed program was:" >&5
6748cat conftest.$ac_ext >&5
6749ac_cv_lib_dl_dlsym=no
6750fi
6751rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6752LIBS=$ac_check_lib_save_LIBS
6753fi
6754echo "$as_me:6754: result: $ac_cv_lib_dl_dlsym" >&5
6755echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6756if test $ac_cv_lib_dl_dlsym = yes; then
6757
6758	cf_have_dlsym=yes
6759	cf_have_libdl=yes
6760fi
6761
6762fi
6763
6764if test "$cf_have_dlsym" = yes ; then
6765	test "$cf_have_libdl" = yes && {
6766cf_add_libs="$LIBS"
6767# reverse order
6768cf_add_0lib=
6769for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6770# filter duplicates
6771for cf_add_1lib in $cf_add_0lib; do
6772	for cf_add_2lib in $cf_add_libs; do
6773		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6774			cf_add_1lib=
6775			break
6776		fi
6777	done
6778	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6779done
6780LIBS="$cf_add_libs"
6781 }
6782
6783	echo "$as_me:6783: checking whether able to link to dl*() functions" >&5
6784echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6785	cat >conftest.$ac_ext <<_ACEOF
6786#line 6786 "configure"
6787#include "confdefs.h"
6788#include <dlfcn.h>
6789int
6790main (void)
6791{
6792
6793		void *obj;
6794		if ((obj = dlopen("filename", 0)) != 0) {
6795			if (dlsym(obj, "symbolname") == 0) {
6796			dlclose(obj);
6797			}
6798		}
6799  ;
6800  return 0;
6801}
6802_ACEOF
6803rm -f conftest.$ac_objext conftest$ac_exeext
6804if { (eval echo "$as_me:6804: \"$ac_link\"") >&5
6805  (eval $ac_link) 2>&5
6806  ac_status=$?
6807  echo "$as_me:6807: \$? = $ac_status" >&5
6808  (exit $ac_status); } &&
6809         { ac_try='test -s conftest$ac_exeext'
6810  { (eval echo "$as_me:6810: \"$ac_try\"") >&5
6811  (eval $ac_try) 2>&5
6812  ac_status=$?
6813  echo "$as_me:6813: \$? = $ac_status" >&5
6814  (exit $ac_status); }; }; then
6815
6816cat >>confdefs.h <<\EOF
6817#define HAVE_LIBDL 1
6818EOF
6819
6820else
6821  echo "$as_me: failed program was:" >&5
6822cat conftest.$ac_ext >&5
6823
6824		{ { echo "$as_me:6824: error: Cannot link test program for libdl" >&5
6825echo "$as_me: error: Cannot link test program for libdl" >&2;}
6826   { (exit 1); exit 1; }; }
6827fi
6828rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6829	echo "$as_me:6829: result: ok" >&5
6830echo "${ECHO_T}ok" >&6
6831else
6832	{ { echo "$as_me:6832: error: Cannot find dlsym function" >&5
6833echo "$as_me: error: Cannot find dlsym function" >&2;}
6834   { (exit 1); exit 1; }; }
6835fi
6836
6837		if test "x$with_gpm" != xyes ; then
6838			test -n "$verbose" && echo "	assuming soname for gpm is $with_gpm" 1>&6
6839
6840echo "${as_me:-configure}:6840: testing assuming soname for gpm is $with_gpm ..." 1>&5
6841
6842			cf_cv_gpm_soname="$with_gpm"
6843		else
6844
6845echo "$as_me:6845: checking for soname of gpm library" >&5
6846echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6847if test "${cf_cv_gpm_soname+set}" = set; then
6848  echo $ECHO_N "(cached) $ECHO_C" >&6
6849else
6850
6851cf_cv_gpm_soname=unknown
6852if test "$cross_compiling" != yes ; then
6853cat >conftest.$ac_ext <<CF_EOF
6854#include <gpm.h>
6855int main(void)
6856{
6857if (Gpm_Open(0,0)) Gpm_Close();
6858	${cf_cv_main_return:-return}(0);
6859}
6860CF_EOF
6861cf_save_LIBS="$LIBS"
6862
6863cf_add_libs="$LIBS"
6864# reverse order
6865cf_add_0lib=
6866for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6867# filter duplicates
6868for cf_add_1lib in $cf_add_0lib; do
6869	for cf_add_2lib in $cf_add_libs; do
6870		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6871			cf_add_1lib=
6872			break
6873		fi
6874	done
6875	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6876done
6877LIBS="$cf_add_libs"
6878
6879	if { (eval echo "$as_me:6879: \"$ac_compile\"") >&5
6880  (eval $ac_compile) 2>&5
6881  ac_status=$?
6882  echo "$as_me:6882: \$? = $ac_status" >&5
6883  (exit $ac_status); } ; then
6884		if { (eval echo "$as_me:6884: \"$ac_link\"") >&5
6885  (eval $ac_link) 2>&5
6886  ac_status=$?
6887  echo "$as_me:6887: \$? = $ac_status" >&5
6888  (exit $ac_status); } ; then
6889			cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6890			test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6891		fi
6892	fi
6893rm -rf conftest*
6894LIBS="$cf_save_LIBS"
6895fi
6896
6897fi
6898echo "$as_me:6898: result: $cf_cv_gpm_soname" >&5
6899echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6900
6901		fi
6902		test "$cf_cv_gpm_soname" != "unknown" &&
6903cat >>confdefs.h <<EOF
6904#define LIBGPM_SONAME "$cf_cv_gpm_soname"
6905EOF
6906
6907		SHLIB_LIST="-ldl $SHLIB_LIST"
6908
6909cf_add_libs="$PRIVATE_LIBS"
6910# reverse order
6911cf_add_0lib=
6912for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6913# filter duplicates
6914for cf_add_1lib in $cf_add_0lib; do
6915	for cf_add_2lib in $cf_add_libs; do
6916		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6917			cf_add_1lib=
6918			break
6919		fi
6920	done
6921	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6922done
6923PRIVATE_LIBS="$cf_add_libs"
6924
6925	else
6926		SHLIB_LIST="-lgpm $SHLIB_LIST"
6927
6928cf_add_libs="$TEST_LIBS"
6929# reverse order
6930cf_add_0lib=
6931for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6932# filter duplicates
6933for cf_add_1lib in $cf_add_0lib; do
6934	for cf_add_2lib in $cf_add_libs; do
6935		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6936			cf_add_1lib=
6937			break
6938		fi
6939	done
6940	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6941done
6942TEST_LIBS="$cf_add_libs"
6943
6944cf_add_libs="$PRIVATE_LIBS"
6945# reverse order
6946cf_add_0lib=
6947for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6948# filter duplicates
6949for cf_add_1lib in $cf_add_0lib; do
6950	for cf_add_2lib in $cf_add_libs; do
6951		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6952			cf_add_1lib=
6953			break
6954		fi
6955	done
6956	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6957done
6958PRIVATE_LIBS="$cf_add_libs"
6959
6960	fi
6961
6962cat >>confdefs.h <<\EOF
6963#define HAVE_LIBGPM 1
6964EOF
6965
6966echo "$as_me:6966: checking for Gpm_Wgetch in -lgpm" >&5
6967echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
6968if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
6969  echo $ECHO_N "(cached) $ECHO_C" >&6
6970else
6971  ac_check_lib_save_LIBS=$LIBS
6972LIBS="-lgpm  $LIBS"
6973cat >conftest.$ac_ext <<_ACEOF
6974#line 6974 "configure"
6975#include "confdefs.h"
6976
6977/* Override any gcc2 internal prototype to avoid an error.  */
6978#ifdef __cplusplus
6979extern "C"
6980#endif
6981/* We use char because int might match the return type of a gcc2
6982   builtin and then its argument prototype would still apply.  */
6983char Gpm_Wgetch ();
6984int
6985main (void)
6986{
6987Gpm_Wgetch ();
6988  ;
6989  return 0;
6990}
6991_ACEOF
6992rm -f conftest.$ac_objext conftest$ac_exeext
6993if { (eval echo "$as_me:6993: \"$ac_link\"") >&5
6994  (eval $ac_link) 2>&5
6995  ac_status=$?
6996  echo "$as_me:6996: \$? = $ac_status" >&5
6997  (exit $ac_status); } &&
6998         { ac_try='test -s conftest$ac_exeext'
6999  { (eval echo "$as_me:6999: \"$ac_try\"") >&5
7000  (eval $ac_try) 2>&5
7001  ac_status=$?
7002  echo "$as_me:7002: \$? = $ac_status" >&5
7003  (exit $ac_status); }; }; then
7004  ac_cv_lib_gpm_Gpm_Wgetch=yes
7005else
7006  echo "$as_me: failed program was:" >&5
7007cat conftest.$ac_ext >&5
7008ac_cv_lib_gpm_Gpm_Wgetch=no
7009fi
7010rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7011LIBS=$ac_check_lib_save_LIBS
7012fi
7013echo "$as_me:7013: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7014echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7015if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
7016
7017echo "$as_me:7017: checking if GPM is weakly bound to curses library" >&5
7018echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7019if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7020  echo $ECHO_N "(cached) $ECHO_C" >&6
7021else
7022
7023cf_cv_check_gpm_wgetch=unknown
7024if test "$cross_compiling" != yes ; then
7025
7026cat >conftest.$ac_ext <<CF_EOF
7027#include <gpm.h>
7028int main(void)
7029{
7030	Gpm_Wgetch();
7031	${cf_cv_main_return:-return}(0);
7032}
7033CF_EOF
7034
7035	cf_save_LIBS="$LIBS"
7036	# This only works if we can look at the symbol table.  If a shared
7037	# library is stripped for install, we cannot use that.  So we're forced
7038	# to rely on the static library, noting that some packagers may not
7039	# include it.
7040	LIBS="-static -lgpm -dynamic $LIBS"
7041	if { (eval echo "$as_me:7041: \"$ac_compile\"") >&5
7042  (eval $ac_compile) 2>&5
7043  ac_status=$?
7044  echo "$as_me:7044: \$? = $ac_status" >&5
7045  (exit $ac_status); } ; then
7046		if { (eval echo "$as_me:7046: \"$ac_link\"") >&5
7047  (eval $ac_link) 2>&5
7048  ac_status=$?
7049  echo "$as_me:7049: \$? = $ac_status" >&5
7050  (exit $ac_status); } ; then
7051			cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
7052			test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7053			test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7054		fi
7055	fi
7056	rm -rf conftest*
7057	LIBS="$cf_save_LIBS"
7058fi
7059
7060fi
7061echo "$as_me:7061: result: $cf_cv_check_gpm_wgetch" >&5
7062echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7063
7064if test "$cf_cv_check_gpm_wgetch" != yes ; then
7065	{ echo "$as_me:7065: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7066echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7067fi
7068
7069fi
7070
7071fi
7072
7073echo "$as_me:7073: checking if you want to use PCRE2 for regular-expressions" >&5
7074echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7075
7076# Check whether --with-pcre2 or --without-pcre2 was given.
7077if test "${with_pcre2+set}" = set; then
7078  withval="$with_pcre2"
7079
7080fi;
7081test -z "$with_pcre2" && with_pcre2=no
7082echo "$as_me:7082: result: $with_pcre2" >&5
7083echo "${ECHO_T}$with_pcre2" >&6
7084
7085if test "x$with_pcre2" != xno ; then
7086
7087if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
7088	test -n "$verbose" && echo "	found package libpcre2" 1>&6
7089
7090echo "${as_me:-configure}:7090: testing found package libpcre2 ..." 1>&5
7091
7092	cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
7093	cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
7094	test -n "$verbose" && echo "	package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7095
7096echo "${as_me:-configure}:7096: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7097
7098	test -n "$verbose" && echo "	package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7099
7100echo "${as_me:-configure}:7100: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7101
7102cf_fix_cppflags=no
7103cf_new_cflags=
7104cf_new_cppflags=
7105cf_new_extra_cppflags=
7106
7107for cf_add_cflags in $cf_pkgconfig_incs
7108do
7109case $cf_fix_cppflags in
7110(no)
7111	case $cf_add_cflags in
7112	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7113		case $cf_add_cflags in
7114		(-D*)
7115			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7116
7117			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7118				&& test -z "${cf_tst_cflags}" \
7119				&& cf_fix_cppflags=yes
7120
7121			if test $cf_fix_cppflags = yes ; then
7122
7123	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7124	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7125
7126				continue
7127			elif test "${cf_tst_cflags}" = "\"'" ; then
7128
7129	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7130	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7131
7132				continue
7133			fi
7134			;;
7135		esac
7136		case "$CPPFLAGS" in
7137		(*$cf_add_cflags)
7138			;;
7139		(*)
7140			case $cf_add_cflags in
7141			(-D*)
7142				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7143
7144CPPFLAGS=`echo "$CPPFLAGS" | \
7145	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
7146		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
7147
7148				;;
7149			esac
7150
7151	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7152	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7153
7154			;;
7155		esac
7156		;;
7157	(*)
7158
7159	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7160	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7161
7162		;;
7163	esac
7164	;;
7165(yes)
7166
7167	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7168	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7169
7170	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7171
7172	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7173		&& test -z "${cf_tst_cflags}" \
7174		&& cf_fix_cppflags=no
7175	;;
7176esac
7177done
7178
7179if test -n "$cf_new_cflags" ; then
7180
7181	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7182	CFLAGS="${CFLAGS}$cf_new_cflags"
7183
7184fi
7185
7186if test -n "$cf_new_cppflags" ; then
7187
7188	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7189	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7190
7191fi
7192
7193if test -n "$cf_new_extra_cppflags" ; then
7194
7195	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7196	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7197
7198fi
7199
7200cf_add_libs="$LIBS"
7201# reverse order
7202cf_add_0lib=
7203for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7204# filter duplicates
7205for cf_add_1lib in $cf_add_0lib; do
7206	for cf_add_2lib in $cf_add_libs; do
7207		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7208			cf_add_1lib=
7209			break
7210		fi
7211	done
7212	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7213done
7214LIBS="$cf_add_libs"
7215
7216	:
7217else
7218	cf_pkgconfig_incs=
7219	cf_pkgconfig_libs=
7220
7221if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7222	test -n "$verbose" && echo "	found package libpcre" 1>&6
7223
7224echo "${as_me:-configure}:7224: testing found package libpcre ..." 1>&5
7225
7226	cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7227	cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7228	test -n "$verbose" && echo "	package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7229
7230echo "${as_me:-configure}:7230: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7231
7232	test -n "$verbose" && echo "	package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7233
7234echo "${as_me:-configure}:7234: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7235
7236cf_fix_cppflags=no
7237cf_new_cflags=
7238cf_new_cppflags=
7239cf_new_extra_cppflags=
7240
7241for cf_add_cflags in $cf_pkgconfig_incs
7242do
7243case $cf_fix_cppflags in
7244(no)
7245	case $cf_add_cflags in
7246	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7247		case $cf_add_cflags in
7248		(-D*)
7249			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7250
7251			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7252				&& test -z "${cf_tst_cflags}" \
7253				&& cf_fix_cppflags=yes
7254
7255			if test $cf_fix_cppflags = yes ; then
7256
7257	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7258	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7259
7260				continue
7261			elif test "${cf_tst_cflags}" = "\"'" ; then
7262
7263	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7264	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7265
7266				continue
7267			fi
7268			;;
7269		esac
7270		case "$CPPFLAGS" in
7271		(*$cf_add_cflags)
7272			;;
7273		(*)
7274			case $cf_add_cflags in
7275			(-D*)
7276				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7277
7278CPPFLAGS=`echo "$CPPFLAGS" | \
7279	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
7280		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
7281
7282				;;
7283			esac
7284
7285	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7286	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7287
7288			;;
7289		esac
7290		;;
7291	(*)
7292
7293	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7294	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7295
7296		;;
7297	esac
7298	;;
7299(yes)
7300
7301	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7302	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7303
7304	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7305
7306	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7307		&& test -z "${cf_tst_cflags}" \
7308		&& cf_fix_cppflags=no
7309	;;
7310esac
7311done
7312
7313if test -n "$cf_new_cflags" ; then
7314
7315	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7316	CFLAGS="${CFLAGS}$cf_new_cflags"
7317
7318fi
7319
7320if test -n "$cf_new_cppflags" ; then
7321
7322	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7323	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7324
7325fi
7326
7327if test -n "$cf_new_extra_cppflags" ; then
7328
7329	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7330	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7331
7332fi
7333
7334cf_add_libs="$LIBS"
7335# reverse order
7336cf_add_0lib=
7337for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7338# filter duplicates
7339for cf_add_1lib in $cf_add_0lib; do
7340	for cf_add_2lib in $cf_add_libs; do
7341		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7342			cf_add_1lib=
7343			break
7344		fi
7345	done
7346	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7347done
7348LIBS="$cf_add_libs"
7349
7350	:
7351else
7352	cf_pkgconfig_incs=
7353	cf_pkgconfig_libs=
7354
7355			{ { echo "$as_me:7355: error: Cannot find PCRE2 library" >&5
7356echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7357   { (exit 1); exit 1; }; }
7358fi
7359
7360fi
7361
7362cat >>confdefs.h <<\EOF
7363#define HAVE_LIB_PCRE2 1
7364EOF
7365
7366	# if pkgconfig gave no results, look for the libraries directly
7367	case $LIBS in
7368	(*pcre2-posix*|*pcreposix*)
7369		;;
7370	(*)
7371		echo "$as_me:7371: checking for regcomp in -lpcre2-posix" >&5
7372echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7373if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7374  echo $ECHO_N "(cached) $ECHO_C" >&6
7375else
7376  ac_check_lib_save_LIBS=$LIBS
7377LIBS="-lpcre2-posix  $LIBS"
7378cat >conftest.$ac_ext <<_ACEOF
7379#line 7379 "configure"
7380#include "confdefs.h"
7381
7382/* Override any gcc2 internal prototype to avoid an error.  */
7383#ifdef __cplusplus
7384extern "C"
7385#endif
7386/* We use char because int might match the return type of a gcc2
7387   builtin and then its argument prototype would still apply.  */
7388char regcomp ();
7389int
7390main (void)
7391{
7392regcomp ();
7393  ;
7394  return 0;
7395}
7396_ACEOF
7397rm -f conftest.$ac_objext conftest$ac_exeext
7398if { (eval echo "$as_me:7398: \"$ac_link\"") >&5
7399  (eval $ac_link) 2>&5
7400  ac_status=$?
7401  echo "$as_me:7401: \$? = $ac_status" >&5
7402  (exit $ac_status); } &&
7403         { ac_try='test -s conftest$ac_exeext'
7404  { (eval echo "$as_me:7404: \"$ac_try\"") >&5
7405  (eval $ac_try) 2>&5
7406  ac_status=$?
7407  echo "$as_me:7407: \$? = $ac_status" >&5
7408  (exit $ac_status); }; }; then
7409  ac_cv_lib_pcre2_posix_regcomp=yes
7410else
7411  echo "$as_me: failed program was:" >&5
7412cat conftest.$ac_ext >&5
7413ac_cv_lib_pcre2_posix_regcomp=no
7414fi
7415rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7416LIBS=$ac_check_lib_save_LIBS
7417fi
7418echo "$as_me:7418: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7419echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7420if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7421
7422cf_add_libs="$LIBS"
7423# reverse order
7424cf_add_0lib=
7425for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7426# filter duplicates
7427for cf_add_1lib in $cf_add_0lib; do
7428	for cf_add_2lib in $cf_add_libs; do
7429		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7430			cf_add_1lib=
7431			break
7432		fi
7433	done
7434	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7435done
7436LIBS="$cf_add_libs"
7437
7438else
7439  echo "$as_me:7439: checking for regcomp in -lpcreposix" >&5
7440echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7441if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7442  echo $ECHO_N "(cached) $ECHO_C" >&6
7443else
7444  ac_check_lib_save_LIBS=$LIBS
7445LIBS="-lpcreposix  $LIBS"
7446cat >conftest.$ac_ext <<_ACEOF
7447#line 7447 "configure"
7448#include "confdefs.h"
7449
7450/* Override any gcc2 internal prototype to avoid an error.  */
7451#ifdef __cplusplus
7452extern "C"
7453#endif
7454/* We use char because int might match the return type of a gcc2
7455   builtin and then its argument prototype would still apply.  */
7456char regcomp ();
7457int
7458main (void)
7459{
7460regcomp ();
7461  ;
7462  return 0;
7463}
7464_ACEOF
7465rm -f conftest.$ac_objext conftest$ac_exeext
7466if { (eval echo "$as_me:7466: \"$ac_link\"") >&5
7467  (eval $ac_link) 2>&5
7468  ac_status=$?
7469  echo "$as_me:7469: \$? = $ac_status" >&5
7470  (exit $ac_status); } &&
7471         { ac_try='test -s conftest$ac_exeext'
7472  { (eval echo "$as_me:7472: \"$ac_try\"") >&5
7473  (eval $ac_try) 2>&5
7474  ac_status=$?
7475  echo "$as_me:7475: \$? = $ac_status" >&5
7476  (exit $ac_status); }; }; then
7477  ac_cv_lib_pcreposix_regcomp=yes
7478else
7479  echo "$as_me: failed program was:" >&5
7480cat conftest.$ac_ext >&5
7481ac_cv_lib_pcreposix_regcomp=no
7482fi
7483rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7484LIBS=$ac_check_lib_save_LIBS
7485fi
7486echo "$as_me:7486: result: $ac_cv_lib_pcreposix_regcomp" >&5
7487echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7488if test $ac_cv_lib_pcreposix_regcomp = yes; then
7489
7490cf_add_libs="$LIBS"
7491# reverse order
7492cf_add_0lib=
7493for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7494# filter duplicates
7495for cf_add_1lib in $cf_add_0lib; do
7496	for cf_add_2lib in $cf_add_libs; do
7497		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7498			cf_add_1lib=
7499			break
7500		fi
7501	done
7502	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7503done
7504LIBS="$cf_add_libs"
7505
7506else
7507  { { echo "$as_me:7507: error: Cannot find PCRE2 POSIX library" >&5
7508echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7509   { (exit 1); exit 1; }; }
7510fi
7511
7512fi
7513
7514		;;
7515	esac
7516
7517	# either way, check for the library header files
7518
7519for ac_header in pcre2-posix.h pcreposix.h
7520do
7521as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7522echo "$as_me:7522: checking for $ac_header" >&5
7523echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7524if eval "test \"\${$as_ac_Header+set}\" = set"; then
7525  echo $ECHO_N "(cached) $ECHO_C" >&6
7526else
7527  cat >conftest.$ac_ext <<_ACEOF
7528#line 7528 "configure"
7529#include "confdefs.h"
7530#include <$ac_header>
7531_ACEOF
7532if { (eval echo "$as_me:7532: \"$ac_cpp conftest.$ac_ext\"") >&5
7533  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7534  ac_status=$?
7535  egrep -v '^ *\+' conftest.er1 >conftest.err
7536  rm -f conftest.er1
7537  cat conftest.err >&5
7538  echo "$as_me:7538: \$? = $ac_status" >&5
7539  (exit $ac_status); } >/dev/null; then
7540  if test -s conftest.err; then
7541    ac_cpp_err=$ac_c_preproc_warn_flag
7542  else
7543    ac_cpp_err=
7544  fi
7545else
7546  ac_cpp_err=yes
7547fi
7548if test -z "$ac_cpp_err"; then
7549  eval "$as_ac_Header=yes"
7550else
7551  echo "$as_me: failed program was:" >&5
7552  cat conftest.$ac_ext >&5
7553  eval "$as_ac_Header=no"
7554fi
7555rm -f conftest.err conftest.$ac_ext
7556fi
7557echo "$as_me:7557: result: `eval echo '${'$as_ac_Header'}'`" >&5
7558echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7559if test `eval echo '${'$as_ac_Header'}'` = yes; then
7560  cat >>confdefs.h <<EOF
7561#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7562EOF
7563
7564fi
7565done
7566
7567fi
7568
7569# not everyone has "test -c"
7570if test -c /dev/sysmouse 2>/dev/null ; then
7571echo "$as_me:7571: checking if you want to use sysmouse" >&5
7572echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7573
7574# Check whether --with-sysmouse or --without-sysmouse was given.
7575if test "${with_sysmouse+set}" = set; then
7576  withval="$with_sysmouse"
7577  cf_with_sysmouse=$withval
7578else
7579  cf_with_sysmouse=maybe
7580fi;
7581	if test "$cf_with_sysmouse" != no ; then
7582	cat >conftest.$ac_ext <<_ACEOF
7583#line 7583 "configure"
7584#include "confdefs.h"
7585
7586#include <osreldate.h>
7587#if (__FreeBSD_version >= 400017)
7588#include <sys/consio.h>
7589#include <sys/fbio.h>
7590#else
7591#include <machine/console.h>
7592#endif
7593
7594int
7595main (void)
7596{
7597
7598	struct mouse_info the_mouse;
7599	ioctl(0, CONS_MOUSECTL, &the_mouse);
7600
7601  ;
7602  return 0;
7603}
7604_ACEOF
7605rm -f conftest.$ac_objext
7606if { (eval echo "$as_me:7606: \"$ac_compile\"") >&5
7607  (eval $ac_compile) 2>&5
7608  ac_status=$?
7609  echo "$as_me:7609: \$? = $ac_status" >&5
7610  (exit $ac_status); } &&
7611         { ac_try='test -s conftest.$ac_objext'
7612  { (eval echo "$as_me:7612: \"$ac_try\"") >&5
7613  (eval $ac_try) 2>&5
7614  ac_status=$?
7615  echo "$as_me:7615: \$? = $ac_status" >&5
7616  (exit $ac_status); }; }; then
7617  cf_with_sysmouse=yes
7618else
7619  echo "$as_me: failed program was:" >&5
7620cat conftest.$ac_ext >&5
7621cf_with_sysmouse=no
7622fi
7623rm -f conftest.$ac_objext conftest.$ac_ext
7624	fi
7625echo "$as_me:7625: result: $cf_with_sysmouse" >&5
7626echo "${ECHO_T}$cf_with_sysmouse" >&6
7627test "$cf_with_sysmouse" = yes &&
7628cat >>confdefs.h <<\EOF
7629#define USE_SYSMOUSE 1
7630EOF
7631
7632fi
7633
7634# pretend that ncurses==ncursesw==ncursest
7635echo "$as_me:7635: checking if you want to disable library suffixes" >&5
7636echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7637
7638# Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7639if test "${enable_lib_suffixes+set}" = set; then
7640  enableval="$enable_lib_suffixes"
7641  test "$enableval" != no && enableval=yes
7642	if test "$enableval" != "yes" ; then
7643    disable_lib_suffixes=yes
7644	else
7645		disable_lib_suffixes=no
7646	fi
7647else
7648  enableval=yes
7649	disable_lib_suffixes=no
7650
7651fi;
7652echo "$as_me:7652: result: $disable_lib_suffixes" >&5
7653echo "${ECHO_T}$disable_lib_suffixes" >&6
7654
7655### If we're building with rpath, try to link non-standard libs that way too.
7656if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7657
7658echo "$as_me:7658: checking if rpath-hack should be disabled" >&5
7659echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7660
7661# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7662if test "${enable_rpath_hack+set}" = set; then
7663  enableval="$enable_rpath_hack"
7664  test "$enableval" != no && enableval=yes
7665	if test "$enableval" != "yes" ; then
7666    cf_disable_rpath_hack=yes
7667	else
7668		cf_disable_rpath_hack=no
7669	fi
7670else
7671  enableval=yes
7672	cf_disable_rpath_hack=no
7673
7674fi;
7675echo "$as_me:7675: result: $cf_disable_rpath_hack" >&5
7676echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7677if test "$cf_disable_rpath_hack" = no ; then
7678
7679echo "$as_me:7679: checking for updated LDFLAGS" >&5
7680echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7681if test -n "$LD_RPATH_OPT" ; then
7682	echo "$as_me:7682: result: maybe" >&5
7683echo "${ECHO_T}maybe" >&6
7684
7685	for ac_prog in ldd
7686do
7687  # Extract the first word of "$ac_prog", so it can be a program name with args.
7688set dummy $ac_prog; ac_word=$2
7689echo "$as_me:7689: checking for $ac_word" >&5
7690echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7691if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7692  echo $ECHO_N "(cached) $ECHO_C" >&6
7693else
7694  if test -n "$cf_ldd_prog"; then
7695  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7696else
7697  ac_save_IFS=$IFS; IFS=$ac_path_separator
7698ac_dummy="$PATH"
7699for ac_dir in $ac_dummy; do
7700  IFS=$ac_save_IFS
7701  test -z "$ac_dir" && ac_dir=.
7702  $as_executable_p "$ac_dir/$ac_word" || continue
7703ac_cv_prog_cf_ldd_prog="$ac_prog"
7704echo "$as_me:7704: found $ac_dir/$ac_word" >&5
7705break
7706done
7707
7708fi
7709fi
7710cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7711if test -n "$cf_ldd_prog"; then
7712  echo "$as_me:7712: result: $cf_ldd_prog" >&5
7713echo "${ECHO_T}$cf_ldd_prog" >&6
7714else
7715  echo "$as_me:7715: result: no" >&5
7716echo "${ECHO_T}no" >&6
7717fi
7718
7719  test -n "$cf_ldd_prog" && break
7720done
7721test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7722
7723	cf_rpath_list="/usr/lib /lib"
7724	if test "$cf_ldd_prog" != no
7725	then
7726		cf_rpath_oops=
7727
7728cat >conftest.$ac_ext <<_ACEOF
7729#line 7729 "configure"
7730#include "confdefs.h"
7731#include <stdio.h>
7732int
7733main (void)
7734{
7735printf("Hello");
7736  ;
7737  return 0;
7738}
7739_ACEOF
7740rm -f conftest.$ac_objext conftest$ac_exeext
7741if { (eval echo "$as_me:7741: \"$ac_link\"") >&5
7742  (eval $ac_link) 2>&5
7743  ac_status=$?
7744  echo "$as_me:7744: \$? = $ac_status" >&5
7745  (exit $ac_status); } &&
7746         { ac_try='test -s conftest$ac_exeext'
7747  { (eval echo "$as_me:7747: \"$ac_try\"") >&5
7748  (eval $ac_try) 2>&5
7749  ac_status=$?
7750  echo "$as_me:7750: \$? = $ac_status" >&5
7751  (exit $ac_status); }; }; then
7752  cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7753		 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7754else
7755  echo "$as_me: failed program was:" >&5
7756cat conftest.$ac_ext >&5
7757fi
7758rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7759
7760		# If we passed the link-test, but get a "not found" on a given library,
7761		# this could be due to inept reconfiguration of gcc to make it only
7762		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7763		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
7764		# /usr/local libraries.
7765		if test -n "$cf_rpath_oops"
7766		then
7767			for cf_rpath_src in $cf_rpath_oops
7768			do
7769				for cf_rpath_dir in \
7770					/usr/local \
7771					/usr/pkg \
7772					/opt/sfw
7773				do
7774					if test -f $cf_rpath_dir/lib/$cf_rpath_src
7775					then
7776						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7777
7778echo "${as_me:-configure}:7778: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7779
7780						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7781						break
7782					fi
7783				done
7784			done
7785		fi
7786	fi
7787
7788	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7789
7790echo "${as_me:-configure}:7790: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7791
7792test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
7793
7794echo "${as_me:-configure}:7794: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7795
7796cf_rpath_dst=
7797for cf_rpath_src in $LDFLAGS
7798do
7799	case $cf_rpath_src in
7800	(-L*)
7801
7802		# check if this refers to a directory which we will ignore
7803		cf_rpath_skip=no
7804		if test -n "$cf_rpath_list"
7805		then
7806			for cf_rpath_item in $cf_rpath_list
7807			do
7808				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7809				then
7810					cf_rpath_skip=yes
7811					break
7812				fi
7813			done
7814		fi
7815
7816		if test "$cf_rpath_skip" = no
7817		then
7818			# transform the option
7819			if test "$LD_RPATH_OPT" = "-R " ; then
7820				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7821			else
7822				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7823			fi
7824
7825			# if we have not already added this, add it now
7826			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7827			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7828			then
7829				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7830
7831echo "${as_me:-configure}:7831: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7832
7833				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7834			fi
7835		fi
7836		;;
7837	esac
7838	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7839done
7840LDFLAGS=$cf_rpath_dst
7841
7842test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
7843
7844echo "${as_me:-configure}:7844: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7845
7846test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
7847
7848echo "${as_me:-configure}:7848: testing ...checking LIBS $LIBS ..." 1>&5
7849
7850cf_rpath_dst=
7851for cf_rpath_src in $LIBS
7852do
7853	case $cf_rpath_src in
7854	(-L*)
7855
7856		# check if this refers to a directory which we will ignore
7857		cf_rpath_skip=no
7858		if test -n "$cf_rpath_list"
7859		then
7860			for cf_rpath_item in $cf_rpath_list
7861			do
7862				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7863				then
7864					cf_rpath_skip=yes
7865					break
7866				fi
7867			done
7868		fi
7869
7870		if test "$cf_rpath_skip" = no
7871		then
7872			# transform the option
7873			if test "$LD_RPATH_OPT" = "-R " ; then
7874				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7875			else
7876				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7877			fi
7878
7879			# if we have not already added this, add it now
7880			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7881			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7882			then
7883				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7884
7885echo "${as_me:-configure}:7885: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7886
7887				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7888			fi
7889		fi
7890		;;
7891	esac
7892	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7893done
7894LIBS=$cf_rpath_dst
7895
7896test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
7897
7898echo "${as_me:-configure}:7898: testing ...checked LIBS $LIBS ..." 1>&5
7899
7900	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7901
7902echo "${as_me:-configure}:7902: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7903
7904else
7905	echo "$as_me:7905: result: no" >&5
7906echo "${ECHO_T}no" >&6
7907fi
7908
7909fi
7910
7911fi
7912
7913###############################################################################
7914
7915###	use option --with-extra-suffix to append suffix to headers and libraries
7916echo "$as_me:7916: checking if you wish to append extra suffix to header/library paths" >&5
7917echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7918EXTRA_SUFFIX=
7919
7920# Check whether --with-extra-suffix or --without-extra-suffix was given.
7921if test "${with_extra_suffix+set}" = set; then
7922  withval="$with_extra_suffix"
7923  case x$withval in
7924	(no)
7925		;;
7926	(xyes|x)
7927		EXTRA_SUFFIX=$cf_cv_abi_version
7928		;;
7929	(*)
7930		EXTRA_SUFFIX=$withval
7931		;;
7932	esac
7933
7934fi;
7935echo "$as_me:7935: result: $EXTRA_SUFFIX" >&5
7936echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7937
7938###	use option --disable-overwrite to leave out the link to -lcurses
7939echo "$as_me:7939: checking if you wish to install ncurses overwriting curses" >&5
7940echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7941
7942# Check whether --enable-overwrite or --disable-overwrite was given.
7943if test "${enable_overwrite+set}" = set; then
7944  enableval="$enable_overwrite"
7945  with_overwrite=$enableval
7946else
7947  if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7948fi;
7949echo "$as_me:7949: result: $with_overwrite" >&5
7950echo "${ECHO_T}$with_overwrite" >&6
7951
7952echo "$as_me:7952: checking if external terminfo-database is used" >&5
7953echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7954
7955# Check whether --enable-database or --disable-database was given.
7956if test "${enable_database+set}" = set; then
7957  enableval="$enable_database"
7958  use_database=$enableval
7959else
7960  use_database=yes
7961fi;
7962echo "$as_me:7962: result: $use_database" >&5
7963echo "${ECHO_T}$use_database" >&6
7964
7965case $host_os in
7966(os2*)
7967	TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7968	;;
7969(*)
7970	TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7971	;;
7972esac
7973
7974NCURSES_USE_DATABASE=0
7975if test "$use_database" != no ; then
7976	NCURSES_USE_DATABASE=1
7977
7978	echo "$as_me:7978: checking which terminfo source-file will be installed" >&5
7979echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7980
7981# Check whether --with-database or --without-database was given.
7982if test "${with_database+set}" = set; then
7983  withval="$with_database"
7984  TERMINFO_SRC=$withval
7985fi;
7986	echo "$as_me:7986: result: $TERMINFO_SRC" >&5
7987echo "${ECHO_T}$TERMINFO_SRC" >&6
7988
7989	echo "$as_me:7989: checking whether to use hashed database instead of directory/tree" >&5
7990echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7991
7992# Check whether --with-hashed-db or --without-hashed-db was given.
7993if test "${with_hashed_db+set}" = set; then
7994  withval="$with_hashed_db"
7995
7996else
7997  with_hashed_db=no
7998fi;
7999	echo "$as_me:7999: result: $with_hashed_db" >&5
8000echo "${ECHO_T}$with_hashed_db" >&6
8001else
8002	with_hashed_db=no
8003fi
8004
8005echo "$as_me:8005: checking for list of fallback descriptions" >&5
8006echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8007
8008# Check whether --with-fallbacks or --without-fallbacks was given.
8009if test "${with_fallbacks+set}" = set; then
8010  withval="$with_fallbacks"
8011  with_fallback=$withval
8012else
8013  with_fallback=
8014fi;
8015echo "$as_me:8015: result: $with_fallback" >&5
8016echo "${ECHO_T}$with_fallback" >&6
8017
8018case ".$with_fallback" in
8019(.|.no)
8020	FALLBACK_LIST=
8021	;;
8022(.yes)
8023	{ echo "$as_me:8023: WARNING: expected a list of terminal descriptions" >&5
8024echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8025	;;
8026(*)
8027	FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8028	;;
8029esac
8030
8031USE_FALLBACKS=
8032test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8033
8034# The fallback feature in ncurses relies upon tic/infocmp outside the build
8035# tree for generating the terminal descriptions that will be compiled into the
8036# library.  If your toolchain is old, it may not handle current terminal
8037# databases.  Use configure-options to point to the tools which will be used,
8038# rather than the first ones found on the $PATH.
8039if test -n "$FALLBACK_LIST"
8040then
8041
8042# Check whether --with-tic-path or --without-tic-path was given.
8043if test "${with_tic_path+set}" = set; then
8044  withval="$with_tic_path"
8045  echo "$as_me:8045: checking for tic program for fallbacks" >&5
8046echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8047		TIC=$withval
8048		echo "$as_me:8048: result: $TIC" >&5
8049echo "${ECHO_T}$TIC" >&6
8050
8051if test "x$prefix" != xNONE; then
8052	cf_path_syntax="$prefix"
8053else
8054	cf_path_syntax="$ac_default_prefix"
8055fi
8056
8057case ".$TIC" in
8058(.\$\(*\)*|.\'*\'*)
8059	;;
8060(..|./*|.\\*)
8061	;;
8062(.[a-zA-Z]:[\\/]*) # OS/2 EMX
8063	;;
8064(.\${*prefix}*|.\${*dir}*)
8065	eval TIC="$TIC"
8066	case ".$TIC" in
8067	(.NONE/*)
8068		TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8069		;;
8070	esac
8071	;;
8072(.no|.NONE/*)
8073	TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8074	;;
8075(*)
8076	{ { echo "$as_me:8076: error: expected a pathname, not \"$TIC\"" >&5
8077echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8078   { (exit 1); exit 1; }; }
8079	;;
8080esac
8081
8082else
8083
8084test -z "$TIC" && TIC=tic
8085for ac_prog in $TIC tic
8086do
8087  # Extract the first word of "$ac_prog", so it can be a program name with args.
8088set dummy $ac_prog; ac_word=$2
8089echo "$as_me:8089: checking for $ac_word" >&5
8090echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8091if test "${ac_cv_path_TIC+set}" = set; then
8092  echo $ECHO_N "(cached) $ECHO_C" >&6
8093else
8094  case $TIC in
8095  [\\/]* | ?:[\\/]*)
8096  ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8097  ;;
8098  *)
8099  ac_save_IFS=$IFS; IFS=$ac_path_separator
8100ac_dummy="$PATH:/usr/local/ncurses/bin"
8101for ac_dir in $ac_dummy; do
8102  IFS=$ac_save_IFS
8103  test -z "$ac_dir" && ac_dir=.
8104  if $as_executable_p "$ac_dir/$ac_word"; then
8105   ac_cv_path_TIC="$ac_dir/$ac_word"
8106   echo "$as_me:8106: found $ac_dir/$ac_word" >&5
8107   break
8108fi
8109done
8110
8111  ;;
8112esac
8113fi
8114TIC=$ac_cv_path_TIC
8115
8116if test -n "$TIC"; then
8117  echo "$as_me:8117: result: $TIC" >&5
8118echo "${ECHO_T}$TIC" >&6
8119else
8120  echo "$as_me:8120: result: no" >&5
8121echo "${ECHO_T}no" >&6
8122fi
8123
8124  test -n "$TIC" && break
8125done
8126test -n "$TIC" || TIC="$TIC"
8127
8128cf_path_prog=""
8129cf_path_args=""
8130IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8131for cf_temp in $ac_cv_path_TIC
8132do
8133	if test -z "$cf_path_prog" ; then
8134		if test "$with_full_paths" = yes ; then
8135
8136if test "x$prefix" != xNONE; then
8137	cf_path_syntax="$prefix"
8138else
8139	cf_path_syntax="$ac_default_prefix"
8140fi
8141
8142case ".$cf_temp" in
8143(.\$\(*\)*|.\'*\'*)
8144	;;
8145(..|./*|.\\*)
8146	;;
8147(.[a-zA-Z]:[\\/]*) # OS/2 EMX
8148	;;
8149(.\${*prefix}*|.\${*dir}*)
8150	eval cf_temp="$cf_temp"
8151	case ".$cf_temp" in
8152	(.NONE/*)
8153		cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8154		;;
8155	esac
8156	;;
8157(.no|.NONE/*)
8158	cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8159	;;
8160(*)
8161	break
8162	;;
8163esac
8164
8165			cf_path_prog="$cf_temp"
8166		else
8167			cf_path_prog="`basename $cf_temp`"
8168		fi
8169	elif test -z "$cf_path_args" ; then
8170		cf_path_args="$cf_temp"
8171	else
8172		cf_path_args="$cf_path_args $cf_temp"
8173	fi
8174done
8175IFS="$cf_save_ifs"
8176
8177if test -n "$cf_path_prog" ; then
8178
8179echo "${as_me:-configure}:8179: testing defining path for ${cf_path_prog} ..." 1>&5
8180
8181cat >>confdefs.h <<EOF
8182#define TIC_PATH "$cf_path_prog"
8183EOF
8184
8185	test -n "$cf_path_args" &&
8186cat >>confdefs.h <<EOF
8187#define TIC_ARGS "$cf_path_args"
8188EOF
8189
8190fi
8191
8192		if test -z "$TIC"
8193		then
8194			{ echo "$as_me:8194: WARNING: no tic program found for fallbacks" >&5
8195echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8196		fi
8197
8198fi;
8199
8200# Check whether --with-infocmp-path or --without-infocmp-path was given.
8201if test "${with_infocmp_path+set}" = set; then
8202  withval="$with_infocmp_path"
8203  echo "$as_me:8203: checking for infocmp program for fallbacks" >&5
8204echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8205		INFOCMP=$withval
8206		echo "$as_me:8206: result: $INFOCMP" >&5
8207echo "${ECHO_T}$INFOCMP" >&6
8208
8209if test "x$prefix" != xNONE; then
8210	cf_path_syntax="$prefix"
8211else
8212	cf_path_syntax="$ac_default_prefix"
8213fi
8214
8215case ".$INFOCMP" in
8216(.\$\(*\)*|.\'*\'*)
8217	;;
8218(..|./*|.\\*)
8219	;;
8220(.[a-zA-Z]:[\\/]*) # OS/2 EMX
8221	;;
8222(.\${*prefix}*|.\${*dir}*)
8223	eval INFOCMP="$INFOCMP"
8224	case ".$INFOCMP" in
8225	(.NONE/*)
8226		INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8227		;;
8228	esac
8229	;;
8230(.no|.NONE/*)
8231	INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8232	;;
8233(*)
8234	{ { echo "$as_me:8234: error: expected a pathname, not \"$INFOCMP\"" >&5
8235echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8236   { (exit 1); exit 1; }; }
8237	;;
8238esac
8239
8240else
8241
8242test -z "$INFOCMP" && INFOCMP=infocmp
8243for ac_prog in $INFOCMP infocmp
8244do
8245  # Extract the first word of "$ac_prog", so it can be a program name with args.
8246set dummy $ac_prog; ac_word=$2
8247echo "$as_me:8247: checking for $ac_word" >&5
8248echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8249if test "${ac_cv_path_INFOCMP+set}" = set; then
8250  echo $ECHO_N "(cached) $ECHO_C" >&6
8251else
8252  case $INFOCMP in
8253  [\\/]* | ?:[\\/]*)
8254  ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8255  ;;
8256  *)
8257  ac_save_IFS=$IFS; IFS=$ac_path_separator
8258ac_dummy="$PATH:/usr/local/ncurses/bin"
8259for ac_dir in $ac_dummy; do
8260  IFS=$ac_save_IFS
8261  test -z "$ac_dir" && ac_dir=.
8262  if $as_executable_p "$ac_dir/$ac_word"; then
8263   ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8264   echo "$as_me:8264: found $ac_dir/$ac_word" >&5
8265   break
8266fi
8267done
8268
8269  ;;
8270esac
8271fi
8272INFOCMP=$ac_cv_path_INFOCMP
8273
8274if test -n "$INFOCMP"; then
8275  echo "$as_me:8275: result: $INFOCMP" >&5
8276echo "${ECHO_T}$INFOCMP" >&6
8277else
8278  echo "$as_me:8278: result: no" >&5
8279echo "${ECHO_T}no" >&6
8280fi
8281
8282  test -n "$INFOCMP" && break
8283done
8284test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8285
8286cf_path_prog=""
8287cf_path_args=""
8288IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8289for cf_temp in $ac_cv_path_INFOCMP
8290do
8291	if test -z "$cf_path_prog" ; then
8292		if test "$with_full_paths" = yes ; then
8293
8294if test "x$prefix" != xNONE; then
8295	cf_path_syntax="$prefix"
8296else
8297	cf_path_syntax="$ac_default_prefix"
8298fi
8299
8300case ".$cf_temp" in
8301(.\$\(*\)*|.\'*\'*)
8302	;;
8303(..|./*|.\\*)
8304	;;
8305(.[a-zA-Z]:[\\/]*) # OS/2 EMX
8306	;;
8307(.\${*prefix}*|.\${*dir}*)
8308	eval cf_temp="$cf_temp"
8309	case ".$cf_temp" in
8310	(.NONE/*)
8311		cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8312		;;
8313	esac
8314	;;
8315(.no|.NONE/*)
8316	cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8317	;;
8318(*)
8319	break
8320	;;
8321esac
8322
8323			cf_path_prog="$cf_temp"
8324		else
8325			cf_path_prog="`basename $cf_temp`"
8326		fi
8327	elif test -z "$cf_path_args" ; then
8328		cf_path_args="$cf_temp"
8329	else
8330		cf_path_args="$cf_path_args $cf_temp"
8331	fi
8332done
8333IFS="$cf_save_ifs"
8334
8335if test -n "$cf_path_prog" ; then
8336
8337echo "${as_me:-configure}:8337: testing defining path for ${cf_path_prog} ..." 1>&5
8338
8339cat >>confdefs.h <<EOF
8340#define INFOCMP_PATH "$cf_path_prog"
8341EOF
8342
8343	test -n "$cf_path_args" &&
8344cat >>confdefs.h <<EOF
8345#define INFOCMP_ARGS "$cf_path_args"
8346EOF
8347
8348fi
8349
8350		if test -z "$INFOCMP"
8351		then
8352			{ echo "$as_me:8352: WARNING: no infocmp program found for fallbacks" >&5
8353echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8354		fi
8355
8356fi;
8357
8358else
8359	: ${TIC:=tic}
8360	: ${INFOCMP:=infocmp}
8361fi
8362
8363echo "$as_me:8363: checking if you want modern xterm or antique" >&5
8364echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8365
8366# Check whether --with-xterm-new or --without-xterm-new was given.
8367if test "${with_xterm_new+set}" = set; then
8368  withval="$with_xterm_new"
8369  with_xterm_new=$withval
8370else
8371  with_xterm_new=yes
8372fi;
8373case $with_xterm_new in
8374(no) with_xterm_new=xterm-old;;
8375(*)	 with_xterm_new=xterm-new;;
8376esac
8377echo "$as_me:8377: result: $with_xterm_new" >&5
8378echo "${ECHO_T}$with_xterm_new" >&6
8379WHICH_XTERM=$with_xterm_new
8380
8381echo "$as_me:8381: checking if xterm backspace sends BS or DEL" >&5
8382echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8383
8384# Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8385if test "${with_xterm_kbs+set}" = set; then
8386  withval="$with_xterm_kbs"
8387  with_xterm_kbs=$withval
8388else
8389  with_xterm_kbs=BS
8390fi;
8391case x$with_xterm_kbs in
8392(xyes|xno|xBS|xbs|x8)
8393	with_xterm_kbs=BS
8394	;;
8395(xDEL|xdel|x127)
8396	with_xterm_kbs=DEL
8397	;;
8398(*)
8399	with_xterm_kbs=$withval
8400	;;
8401esac
8402echo "$as_me:8402: result: $with_xterm_kbs" >&5
8403echo "${ECHO_T}$with_xterm_kbs" >&6
8404XTERM_KBS=$with_xterm_kbs
8405
8406MAKE_TERMINFO=
8407if test "$use_database" = no ; then
8408	TERMINFO="${datadir}/terminfo"
8409	MAKE_TERMINFO="#"
8410else
8411
8412echo "$as_me:8412: checking for list of terminfo directories" >&5
8413echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8414
8415# Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8416if test "${with_terminfo_dirs+set}" = set; then
8417  withval="$with_terminfo_dirs"
8418
8419else
8420  withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8421fi;
8422IFS="${IFS:- 	}"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8423cf_dst_path=
8424for cf_src_path in $withval
8425do
8426
8427if test "x$prefix" != xNONE; then
8428	cf_path_syntax="$prefix"
8429else
8430	cf_path_syntax="$ac_default_prefix"
8431fi
8432
8433case ".$cf_src_path" in
8434(.\$\(*\)*|.\'*\'*)
8435	;;
8436(..|./*|.\\*)
8437	;;
8438(.[a-zA-Z]:[\\/]*) # OS/2 EMX
8439	;;
8440(.\${*prefix}*|.\${*dir}*)
8441	eval cf_src_path="$cf_src_path"
8442	case ".$cf_src_path" in
8443	(.NONE/*)
8444		cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8445		;;
8446	esac
8447	;;
8448(.no|.NONE/*)
8449	cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8450	;;
8451(*)
8452	{ { echo "$as_me:8452: error: expected a pathname, not \"$cf_src_path\"" >&5
8453echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8454   { (exit 1); exit 1; }; }
8455	;;
8456esac
8457
8458  test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8459  cf_dst_path="${cf_dst_path}${cf_src_path}"
8460done
8461IFS="$ac_save_ifs"
8462
8463# This may use the prefix/exec_prefix symbols which will only yield "NONE"
8464# so we have to check/work around.  We do prefer the result of "eval"...
8465eval cf_dst_eval="$cf_dst_path"
8466case "x$cf_dst_eval" in
8467(xNONE*)
8468	TERMINFO_DIRS=$cf_dst_path
8469	;;
8470(*)
8471	TERMINFO_DIRS="$cf_dst_eval"
8472	;;
8473esac
8474
8475echo "$as_me:8475: result: $TERMINFO_DIRS" >&5
8476echo "${ECHO_T}$TERMINFO_DIRS" >&6
8477test -n "$TERMINFO_DIRS" &&
8478cat >>confdefs.h <<EOF
8479#define TERMINFO_DIRS "$TERMINFO_DIRS"
8480EOF
8481
8482case "x$TERMINFO" in
8483x???:*)
8484	{ echo "$as_me:8484: WARNING: ignoring non-directory/file TERMINFO value" >&5
8485echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8486	unset TERMINFO
8487	;;
8488esac
8489
8490echo "$as_me:8490: checking for default terminfo directory" >&5
8491echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8492
8493# Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8494if test "${with_default_terminfo_dir+set}" = set; then
8495  withval="$with_default_terminfo_dir"
8496
8497else
8498  withval="${TERMINFO:-${datadir}/terminfo}"
8499fi; if test -n "${datadir}/terminfo" ; then
8500
8501if test "x$prefix" != xNONE; then
8502	cf_path_syntax="$prefix"
8503else
8504	cf_path_syntax="$ac_default_prefix"
8505fi
8506
8507case ".$withval" in
8508(.\$\(*\)*|.\'*\'*)
8509	;;
8510(..|./*|.\\*)
8511	;;
8512(.[a-zA-Z]:[\\/]*) # OS/2 EMX
8513	;;
8514(.\${*prefix}*|.\${*dir}*)
8515	eval withval="$withval"
8516	case ".$withval" in
8517	(.NONE/*)
8518		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8519		;;
8520	esac
8521	;;
8522(.no|.NONE/*)
8523	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8524	;;
8525(*)
8526	{ { echo "$as_me:8526: error: expected a pathname, not \"$withval\"" >&5
8527echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8528   { (exit 1); exit 1; }; }
8529	;;
8530esac
8531
8532fi
8533eval TERMINFO="$withval"
8534
8535echo "$as_me:8535: result: $TERMINFO" >&5
8536echo "${ECHO_T}$TERMINFO" >&6
8537
8538cat >>confdefs.h <<EOF
8539#define TERMINFO "$TERMINFO"
8540EOF
8541
8542fi
8543
8544###	use option --disable-big-core to make tic run on small machines
8545###	We need 4Mb, check if we can allocate 50% more than that.
8546echo "$as_me:8546: checking if big-core option selected" >&5
8547echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8548
8549# Check whether --enable-big-core or --disable-big-core was given.
8550if test "${enable_big_core+set}" = set; then
8551  enableval="$enable_big_core"
8552  with_big_core=$enableval
8553else
8554  if test "$cross_compiling" = yes; then
8555  with_big_core=no
8556else
8557  cat >conftest.$ac_ext <<_ACEOF
8558#line 8558 "configure"
8559#include "confdefs.h"
8560
8561#include <stdlib.h>
8562#include <string.h>
8563int main() {
8564	unsigned long n = 6000000L;
8565	char *s = malloc(n);
8566	if (s != 0)
8567		s[0] = s[n-1] = 0;
8568	${cf_cv_main_return:-return}(s == 0);
8569}
8570_ACEOF
8571rm -f conftest$ac_exeext
8572if { (eval echo "$as_me:8572: \"$ac_link\"") >&5
8573  (eval $ac_link) 2>&5
8574  ac_status=$?
8575  echo "$as_me:8575: \$? = $ac_status" >&5
8576  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8577  { (eval echo "$as_me:8577: \"$ac_try\"") >&5
8578  (eval $ac_try) 2>&5
8579  ac_status=$?
8580  echo "$as_me:8580: \$? = $ac_status" >&5
8581  (exit $ac_status); }; }; then
8582  with_big_core=yes
8583else
8584  echo "$as_me: program exited with status $ac_status" >&5
8585echo "$as_me: failed program was:" >&5
8586cat conftest.$ac_ext >&5
8587with_big_core=no
8588fi
8589rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8590fi
8591fi;
8592echo "$as_me:8592: result: $with_big_core" >&5
8593echo "${ECHO_T}$with_big_core" >&6
8594test "x$with_big_core" = "xyes" &&
8595cat >>confdefs.h <<\EOF
8596#define HAVE_BIG_CORE 1
8597EOF
8598
8599### ISO C only guarantees 512-char strings, we have tables which load faster
8600### when constructed using "big" strings.  More than the C compiler, the awk
8601### program is a limit on most vendor UNIX systems.  Check that we can build.
8602echo "$as_me:8602: checking if big-strings option selected" >&5
8603echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8604
8605# Check whether --enable-big-strings or --disable-big-strings was given.
8606if test "${enable_big_strings+set}" = set; then
8607  enableval="$enable_big_strings"
8608  with_big_strings=$enableval
8609else
8610
8611	case x$AWK in
8612	(x)
8613		eval with_big_strings=no
8614		;;
8615	(*)
8616		if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8617			| $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
8618			eval with_big_strings=yes
8619		else
8620			eval with_big_strings=no
8621		fi
8622		;;
8623	esac
8624
8625fi;
8626echo "$as_me:8626: result: $with_big_strings" >&5
8627echo "${ECHO_T}$with_big_strings" >&6
8628
8629USE_BIG_STRINGS=0
8630test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8631
8632###	use option --enable-termcap to compile in the termcap fallback support
8633echo "$as_me:8633: checking if you want termcap-fallback support" >&5
8634echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8635
8636# Check whether --enable-termcap or --disable-termcap was given.
8637if test "${enable_termcap+set}" = set; then
8638  enableval="$enable_termcap"
8639  with_termcap=$enableval
8640else
8641  with_termcap=no
8642fi;
8643echo "$as_me:8643: result: $with_termcap" >&5
8644echo "${ECHO_T}$with_termcap" >&6
8645
8646NCURSES_USE_TERMCAP=0
8647if test "x$with_termcap" != "xyes" ; then
8648	if test "$use_database" = no ; then
8649		if test -z "$with_fallback" ; then
8650			{ { echo "$as_me:8650: error: You have disabled the database w/o specifying fallbacks" >&5
8651echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8652   { (exit 1); exit 1; }; }
8653		fi
8654	fi
8655
8656cat >>confdefs.h <<\EOF
8657#define PURE_TERMINFO 1
8658EOF
8659
8660else
8661
8662	if test "$with_ticlib" != no ; then
8663		{ { echo "$as_me:8663: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8664echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8665   { (exit 1); exit 1; }; }
8666	fi
8667
8668	NCURSES_USE_TERMCAP=1
8669	echo "$as_me:8669: checking for list of termcap files" >&5
8670echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8671
8672# Check whether --with-termpath or --without-termpath was given.
8673if test "${with_termpath+set}" = set; then
8674  withval="$with_termpath"
8675
8676else
8677  withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8678fi;
8679IFS="${IFS:- 	}"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8680cf_dst_path=
8681for cf_src_path in $withval
8682do
8683
8684if test "x$prefix" != xNONE; then
8685	cf_path_syntax="$prefix"
8686else
8687	cf_path_syntax="$ac_default_prefix"
8688fi
8689
8690case ".$cf_src_path" in
8691(.\$\(*\)*|.\'*\'*)
8692	;;
8693(..|./*|.\\*)
8694	;;
8695(.[a-zA-Z]:[\\/]*) # OS/2 EMX
8696	;;
8697(.\${*prefix}*|.\${*dir}*)
8698	eval cf_src_path="$cf_src_path"
8699	case ".$cf_src_path" in
8700	(.NONE/*)
8701		cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8702		;;
8703	esac
8704	;;
8705(.no|.NONE/*)
8706	cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8707	;;
8708(*)
8709	{ { echo "$as_me:8709: error: expected a pathname, not \"$cf_src_path\"" >&5
8710echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8711   { (exit 1); exit 1; }; }
8712	;;
8713esac
8714
8715  test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8716  cf_dst_path="${cf_dst_path}${cf_src_path}"
8717done
8718IFS="$ac_save_ifs"
8719
8720# This may use the prefix/exec_prefix symbols which will only yield "NONE"
8721# so we have to check/work around.  We do prefer the result of "eval"...
8722eval cf_dst_eval="$cf_dst_path"
8723case "x$cf_dst_eval" in
8724(xNONE*)
8725	TERMPATH=$cf_dst_path
8726	;;
8727(*)
8728	TERMPATH="$cf_dst_eval"
8729	;;
8730esac
8731
8732	echo "$as_me:8732: result: $TERMPATH" >&5
8733echo "${ECHO_T}$TERMPATH" >&6
8734	test -n "$TERMPATH" &&
8735cat >>confdefs.h <<EOF
8736#define TERMPATH "$TERMPATH"
8737EOF
8738
8739	###	use option --enable-getcap to use a hacked getcap for reading termcaps
8740	echo "$as_me:8740: checking if fast termcap-loader is needed" >&5
8741echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8742
8743# Check whether --enable-getcap or --disable-getcap was given.
8744if test "${enable_getcap+set}" = set; then
8745  enableval="$enable_getcap"
8746  with_getcap=$enableval
8747else
8748  with_getcap=no
8749fi;
8750	echo "$as_me:8750: result: $with_getcap" >&5
8751echo "${ECHO_T}$with_getcap" >&6
8752	test "x$with_getcap" = "xyes" &&
8753cat >>confdefs.h <<\EOF
8754#define USE_GETCAP 1
8755EOF
8756
8757	echo "$as_me:8757: checking if translated termcaps will be cached in ~/.terminfo" >&5
8758echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8759
8760# Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8761if test "${enable_getcap_cache+set}" = set; then
8762  enableval="$enable_getcap_cache"
8763  with_getcap_cache=$enableval
8764else
8765  with_getcap_cache=no
8766fi;
8767	echo "$as_me:8767: result: $with_getcap_cache" >&5
8768echo "${ECHO_T}$with_getcap_cache" >&6
8769	test "x$with_getcap_cache" = "xyes" &&
8770cat >>confdefs.h <<\EOF
8771#define USE_GETCAP_CACHE 1
8772EOF
8773
8774fi
8775
8776###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8777echo "$as_me:8777: checking if ~/.terminfo is wanted" >&5
8778echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8779
8780# Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8781if test "${enable_home_terminfo+set}" = set; then
8782  enableval="$enable_home_terminfo"
8783  with_home_terminfo=$enableval
8784else
8785  with_home_terminfo=yes
8786fi;
8787echo "$as_me:8787: result: $with_home_terminfo" >&5
8788echo "${ECHO_T}$with_home_terminfo" >&6
8789test "x$with_home_terminfo" = "xyes" &&
8790cat >>confdefs.h <<\EOF
8791#define USE_HOME_TERMINFO 1
8792EOF
8793
8794echo "$as_me:8794: checking if you want to use restricted environment when running as root" >&5
8795echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8796
8797# Check whether --enable-root-environ or --disable-root-environ was given.
8798if test "${enable_root_environ+set}" = set; then
8799  enableval="$enable_root_environ"
8800  with_root_environ=$enableval
8801else
8802  with_root_environ=yes
8803fi;
8804echo "$as_me:8804: result: $with_root_environ" >&5
8805echo "${ECHO_T}$with_root_environ" >&6
8806test "x$with_root_environ" = xyes &&
8807cat >>confdefs.h <<\EOF
8808#define USE_ROOT_ENVIRON 1
8809EOF
8810
8811###   Use option --enable-symlinks to make tic use symlinks, not hard links
8812###   to reduce storage requirements for the terminfo database.
8813
8814for ac_header in \
8815unistd.h \
8816
8817do
8818as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8819echo "$as_me:8819: checking for $ac_header" >&5
8820echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8821if eval "test \"\${$as_ac_Header+set}\" = set"; then
8822  echo $ECHO_N "(cached) $ECHO_C" >&6
8823else
8824  cat >conftest.$ac_ext <<_ACEOF
8825#line 8825 "configure"
8826#include "confdefs.h"
8827#include <$ac_header>
8828_ACEOF
8829if { (eval echo "$as_me:8829: \"$ac_cpp conftest.$ac_ext\"") >&5
8830  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8831  ac_status=$?
8832  egrep -v '^ *\+' conftest.er1 >conftest.err
8833  rm -f conftest.er1
8834  cat conftest.err >&5
8835  echo "$as_me:8835: \$? = $ac_status" >&5
8836  (exit $ac_status); } >/dev/null; then
8837  if test -s conftest.err; then
8838    ac_cpp_err=$ac_c_preproc_warn_flag
8839  else
8840    ac_cpp_err=
8841  fi
8842else
8843  ac_cpp_err=yes
8844fi
8845if test -z "$ac_cpp_err"; then
8846  eval "$as_ac_Header=yes"
8847else
8848  echo "$as_me: failed program was:" >&5
8849  cat conftest.$ac_ext >&5
8850  eval "$as_ac_Header=no"
8851fi
8852rm -f conftest.err conftest.$ac_ext
8853fi
8854echo "$as_me:8854: result: `eval echo '${'$as_ac_Header'}'`" >&5
8855echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8856if test `eval echo '${'$as_ac_Header'}'` = yes; then
8857  cat >>confdefs.h <<EOF
8858#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8859EOF
8860
8861fi
8862done
8863
8864for ac_func in \
8865	remove \
8866	unlink
8867do
8868as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8869echo "$as_me:8869: checking for $ac_func" >&5
8870echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8871if eval "test \"\${$as_ac_var+set}\" = set"; then
8872  echo $ECHO_N "(cached) $ECHO_C" >&6
8873else
8874  cat >conftest.$ac_ext <<_ACEOF
8875#line 8875 "configure"
8876#include "confdefs.h"
8877#define $ac_func autoconf_temporary
8878#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
8879#undef $ac_func
8880
8881#ifdef __cplusplus
8882extern "C"
8883#endif
8884
8885/* We use char because int might match the return type of a gcc2
8886   builtin and then its argument prototype would still apply.  */
8887char $ac_func (void);
8888
8889int
8890main (void)
8891{
8892
8893/* The GNU C library defines stubs for functions which it implements
8894    to always fail with ENOSYS.  Some functions are actually named
8895    something starting with __ and the normal name is an alias.  */
8896#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8897#error found stub for $ac_func
8898#endif
8899
8900	return $ac_func ();
8901  ;
8902  return 0;
8903}
8904_ACEOF
8905rm -f conftest.$ac_objext conftest$ac_exeext
8906if { (eval echo "$as_me:8906: \"$ac_link\"") >&5
8907  (eval $ac_link) 2>&5
8908  ac_status=$?
8909  echo "$as_me:8909: \$? = $ac_status" >&5
8910  (exit $ac_status); } &&
8911         { ac_try='test -s conftest$ac_exeext'
8912  { (eval echo "$as_me:8912: \"$ac_try\"") >&5
8913  (eval $ac_try) 2>&5
8914  ac_status=$?
8915  echo "$as_me:8915: \$? = $ac_status" >&5
8916  (exit $ac_status); }; }; then
8917  eval "$as_ac_var=yes"
8918else
8919  echo "$as_me: failed program was:" >&5
8920cat conftest.$ac_ext >&5
8921eval "$as_ac_var=no"
8922fi
8923rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8924fi
8925echo "$as_me:8925: result: `eval echo '${'$as_ac_var'}'`" >&5
8926echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8927if test `eval echo '${'$as_ac_var'}'` = yes; then
8928  cat >>confdefs.h <<EOF
8929#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8930EOF
8931
8932fi
8933done
8934
8935if test "$cross_compiling" = yes ; then
8936
8937for ac_func in \
8938		link \
8939		symlink
8940do
8941as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8942echo "$as_me:8942: checking for $ac_func" >&5
8943echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8944if eval "test \"\${$as_ac_var+set}\" = set"; then
8945  echo $ECHO_N "(cached) $ECHO_C" >&6
8946else
8947  cat >conftest.$ac_ext <<_ACEOF
8948#line 8948 "configure"
8949#include "confdefs.h"
8950#define $ac_func autoconf_temporary
8951#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
8952#undef $ac_func
8953
8954#ifdef __cplusplus
8955extern "C"
8956#endif
8957
8958/* We use char because int might match the return type of a gcc2
8959   builtin and then its argument prototype would still apply.  */
8960char $ac_func (void);
8961
8962int
8963main (void)
8964{
8965
8966/* The GNU C library defines stubs for functions which it implements
8967    to always fail with ENOSYS.  Some functions are actually named
8968    something starting with __ and the normal name is an alias.  */
8969#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8970#error found stub for $ac_func
8971#endif
8972
8973	return $ac_func ();
8974  ;
8975  return 0;
8976}
8977_ACEOF
8978rm -f conftest.$ac_objext conftest$ac_exeext
8979if { (eval echo "$as_me:8979: \"$ac_link\"") >&5
8980  (eval $ac_link) 2>&5
8981  ac_status=$?
8982  echo "$as_me:8982: \$? = $ac_status" >&5
8983  (exit $ac_status); } &&
8984         { ac_try='test -s conftest$ac_exeext'
8985  { (eval echo "$as_me:8985: \"$ac_try\"") >&5
8986  (eval $ac_try) 2>&5
8987  ac_status=$?
8988  echo "$as_me:8988: \$? = $ac_status" >&5
8989  (exit $ac_status); }; }; then
8990  eval "$as_ac_var=yes"
8991else
8992  echo "$as_me: failed program was:" >&5
8993cat conftest.$ac_ext >&5
8994eval "$as_ac_var=no"
8995fi
8996rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8997fi
8998echo "$as_me:8998: result: `eval echo '${'$as_ac_var'}'`" >&5
8999echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9000if test `eval echo '${'$as_ac_var'}'` = yes; then
9001  cat >>confdefs.h <<EOF
9002#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9003EOF
9004
9005fi
9006done
9007
9008else
9009	echo "$as_me:9009: checking if link/symlink functions work" >&5
9010echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9011if test "${cf_cv_link_funcs+set}" = set; then
9012  echo $ECHO_N "(cached) $ECHO_C" >&6
9013else
9014
9015		cf_cv_link_funcs=
9016		for cf_func in link symlink ; do
9017			if test "$cross_compiling" = yes; then
9018
9019			eval 'ac_cv_func_'$cf_func'=error'
9020else
9021  cat >conftest.$ac_ext <<_ACEOF
9022#line 9022 "configure"
9023#include "confdefs.h"
9024
9025#include <sys/types.h>
9026#include <sys/stat.h>
9027#ifdef HAVE_UNISTD_H
9028#include <unistd.h>
9029#endif
9030int main(void)
9031{
9032	int fail = 0;
9033	char *src = "config.log";
9034	char *dst = "conftest.chk";
9035	struct stat src_sb;
9036	struct stat dst_sb;
9037
9038	stat(src, &src_sb);
9039	fail = ($cf_func("config.log", "conftest.chk") < 0)
9040	    || (stat(dst, &dst_sb) < 0)
9041	    || (dst_sb.st_mtime != src_sb.st_mtime);
9042#ifdef HAVE_UNLINK
9043	unlink(dst);
9044#else
9045	remove(dst);
9046#endif
9047	${cf_cv_main_return:-return} (fail);
9048}
9049
9050_ACEOF
9051rm -f conftest$ac_exeext
9052if { (eval echo "$as_me:9052: \"$ac_link\"") >&5
9053  (eval $ac_link) 2>&5
9054  ac_status=$?
9055  echo "$as_me:9055: \$? = $ac_status" >&5
9056  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9057  { (eval echo "$as_me:9057: \"$ac_try\"") >&5
9058  (eval $ac_try) 2>&5
9059  ac_status=$?
9060  echo "$as_me:9060: \$? = $ac_status" >&5
9061  (exit $ac_status); }; }; then
9062
9063			cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9064			eval 'ac_cv_func_'$cf_func'=yes'
9065else
9066  echo "$as_me: program exited with status $ac_status" >&5
9067echo "$as_me: failed program was:" >&5
9068cat conftest.$ac_ext >&5
9069
9070			eval 'ac_cv_func_'$cf_func'=no'
9071fi
9072rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9073fi
9074		done
9075		test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9076
9077fi
9078echo "$as_me:9078: result: $cf_cv_link_funcs" >&5
9079echo "${ECHO_T}$cf_cv_link_funcs" >&6
9080	test "$ac_cv_func_link"    = yes &&
9081cat >>confdefs.h <<\EOF
9082#define HAVE_LINK 1
9083EOF
9084
9085	test "$ac_cv_func_symlink" = yes &&
9086cat >>confdefs.h <<\EOF
9087#define HAVE_SYMLINK 1
9088EOF
9089
9090fi
9091
9092with_links=no
9093with_symlinks=no
9094
9095# soft links (symbolic links) are useful for some systems where hard links do
9096# not work, or to make it simpler to copy terminfo trees around.
9097if test "x$ac_cv_func_symlink" = xyes ; then
9098	echo "$as_me:9098: checking if tic should use symbolic links" >&5
9099echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9100
9101# Check whether --enable-symlinks or --disable-symlinks was given.
9102if test "${enable_symlinks+set}" = set; then
9103  enableval="$enable_symlinks"
9104  with_symlinks=$enableval
9105else
9106  with_symlinks=no
9107fi;
9108	echo "$as_me:9108: result: $with_symlinks" >&5
9109echo "${ECHO_T}$with_symlinks" >&6
9110fi
9111
9112# If we have hard links and did not choose to use soft links instead, there is
9113# no reason to make this choice optional - use the hard links.
9114if test "$with_symlinks" = no ; then
9115	echo "$as_me:9115: checking if tic should use hard links" >&5
9116echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9117	if test "x$ac_cv_func_link" = xyes ; then
9118		with_links=yes
9119	else
9120		with_links=no
9121	fi
9122	echo "$as_me:9122: result: $with_links" >&5
9123echo "${ECHO_T}$with_links" >&6
9124fi
9125
9126test "x$with_links" = xyes &&
9127cat >>confdefs.h <<\EOF
9128#define USE_LINKS 1
9129EOF
9130
9131test "x$with_symlinks" = xyes &&
9132cat >>confdefs.h <<\EOF
9133#define USE_SYMLINKS 1
9134EOF
9135
9136###   use option --enable-broken-linker to force on use of broken-linker support
9137
9138echo "$as_me:9138: checking if you want broken-linker support code" >&5
9139echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9140
9141# Check whether --enable-broken_linker or --disable-broken_linker was given.
9142if test "${enable_broken_linker+set}" = set; then
9143  enableval="$enable_broken_linker"
9144  with_broken_linker=$enableval
9145else
9146  with_broken_linker=no
9147fi;
9148echo "$as_me:9148: result: $with_broken_linker" >&5
9149echo "${ECHO_T}$with_broken_linker" >&6
9150
9151: ${BROKEN_LINKER:=0}
9152if test "x$with_broken_linker" = xyes ; then
9153
9154cat >>confdefs.h <<\EOF
9155#define BROKEN_LINKER 1
9156EOF
9157
9158	BROKEN_LINKER=1
9159fi
9160
9161###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9162echo "$as_me:9162: checking if tputs should process BSD-style prefix padding" >&5
9163echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9164
9165# Check whether --enable-bsdpad or --disable-bsdpad was given.
9166if test "${enable_bsdpad+set}" = set; then
9167  enableval="$enable_bsdpad"
9168  with_bsdpad=$enableval
9169else
9170  with_bsdpad=no
9171fi;
9172echo "$as_me:9172: result: $with_bsdpad" >&5
9173echo "${ECHO_T}$with_bsdpad" >&6
9174test "x$with_bsdpad" = xyes &&
9175cat >>confdefs.h <<\EOF
9176#define BSD_TPUTS 1
9177EOF
9178
9179###   use option --enable-widec to turn on use of wide-character support
9180NCURSES_CH_T=chtype
9181NCURSES_LIBUTF8=0
9182
9183NEED_WCHAR_H=0
9184NCURSES_MBSTATE_T=0
9185NCURSES_WCHAR_T=0
9186NCURSES_WINT_T=0
9187
9188# Check to define _XOPEN_SOURCE "automatically"
9189CPPFLAGS_before_XOPEN="$CPPFLAGS"
9190
9191echo "$as_me:9191: checking if the POSIX test-macros are already defined" >&5
9192echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9193if test "${cf_cv_posix_visible+set}" = set; then
9194  echo $ECHO_N "(cached) $ECHO_C" >&6
9195else
9196
9197cat >conftest.$ac_ext <<_ACEOF
9198#line 9198 "configure"
9199#include "confdefs.h"
9200#include <stdio.h>
9201int
9202main (void)
9203{
9204
9205#if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9206	&& defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9207	&& defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9208	&& defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9209#error conflicting symbols found
9210#endif
9211
9212  ;
9213  return 0;
9214}
9215_ACEOF
9216rm -f conftest.$ac_objext
9217if { (eval echo "$as_me:9217: \"$ac_compile\"") >&5
9218  (eval $ac_compile) 2>&5
9219  ac_status=$?
9220  echo "$as_me:9220: \$? = $ac_status" >&5
9221  (exit $ac_status); } &&
9222         { ac_try='test -s conftest.$ac_objext'
9223  { (eval echo "$as_me:9223: \"$ac_try\"") >&5
9224  (eval $ac_try) 2>&5
9225  ac_status=$?
9226  echo "$as_me:9226: \$? = $ac_status" >&5
9227  (exit $ac_status); }; }; then
9228  cf_cv_posix_visible=no
9229else
9230  echo "$as_me: failed program was:" >&5
9231cat conftest.$ac_ext >&5
9232cf_cv_posix_visible=yes
9233fi
9234rm -f conftest.$ac_objext conftest.$ac_ext
9235
9236fi
9237echo "$as_me:9237: result: $cf_cv_posix_visible" >&5
9238echo "${ECHO_T}$cf_cv_posix_visible" >&6
9239
9240if test "$cf_cv_posix_visible" = no; then
9241
9242cf_XOPEN_SOURCE=600
9243cf_POSIX_C_SOURCE=199506L
9244cf_xopen_source=
9245
9246case $host_os in
9247(aix[4-7]*)
9248	cf_xopen_source="-D_ALL_SOURCE"
9249	;;
9250(msys)
9251	cf_XOPEN_SOURCE=600
9252	;;
9253(darwin[0-8].*)
9254	cf_xopen_source="-D_APPLE_C_SOURCE"
9255	;;
9256(darwin*)
9257	cf_xopen_source="-D_DARWIN_C_SOURCE"
9258	cf_XOPEN_SOURCE=
9259	;;
9260(freebsd*|dragonfly*|midnightbsd*)
9261	# 5.x headers associate
9262	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9263	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9264	cf_POSIX_C_SOURCE=200112L
9265	cf_XOPEN_SOURCE=600
9266	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9267	;;
9268(hpux11*)
9269	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9270	;;
9271(hpux*)
9272	cf_xopen_source="-D_HPUX_SOURCE"
9273	;;
9274(irix[56].*)
9275	cf_xopen_source="-D_SGI_SOURCE"
9276	cf_XOPEN_SOURCE=
9277	;;
9278(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9279
9280cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9281
9282echo "$as_me:9282: checking if this is the GNU C library" >&5
9283echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9284if test "${cf_cv_gnu_library+set}" = set; then
9285  echo $ECHO_N "(cached) $ECHO_C" >&6
9286else
9287
9288cat >conftest.$ac_ext <<_ACEOF
9289#line 9289 "configure"
9290#include "confdefs.h"
9291#include <sys/types.h>
9292int
9293main (void)
9294{
9295
9296	#if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9297		return 0;
9298	#elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9299		return 0;
9300	#else
9301	#	error not GNU C library
9302	#endif
9303  ;
9304  return 0;
9305}
9306_ACEOF
9307rm -f conftest.$ac_objext
9308if { (eval echo "$as_me:9308: \"$ac_compile\"") >&5
9309  (eval $ac_compile) 2>&5
9310  ac_status=$?
9311  echo "$as_me:9311: \$? = $ac_status" >&5
9312  (exit $ac_status); } &&
9313         { ac_try='test -s conftest.$ac_objext'
9314  { (eval echo "$as_me:9314: \"$ac_try\"") >&5
9315  (eval $ac_try) 2>&5
9316  ac_status=$?
9317  echo "$as_me:9317: \$? = $ac_status" >&5
9318  (exit $ac_status); }; }; then
9319  cf_cv_gnu_library=yes
9320else
9321  echo "$as_me: failed program was:" >&5
9322cat conftest.$ac_ext >&5
9323cf_cv_gnu_library=no
9324fi
9325rm -f conftest.$ac_objext conftest.$ac_ext
9326
9327fi
9328echo "$as_me:9328: result: $cf_cv_gnu_library" >&5
9329echo "${ECHO_T}$cf_cv_gnu_library" >&6
9330
9331if test x$cf_cv_gnu_library = xyes; then
9332
9333	# With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9334	# was changed to help a little.  newlib incorporated the change about 4
9335	# years later.
9336	echo "$as_me:9336: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9337echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9338if test "${cf_cv_gnu_library_219+set}" = set; then
9339  echo $ECHO_N "(cached) $ECHO_C" >&6
9340else
9341
9342		cf_save="$CPPFLAGS"
9343
9344	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9345	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9346
9347		cat >conftest.$ac_ext <<_ACEOF
9348#line 9348 "configure"
9349#include "confdefs.h"
9350#include <sys/types.h>
9351int
9352main (void)
9353{
9354
9355			#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9356				return 0;
9357			#elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9358				return 0;
9359			#else
9360			#	error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9361			#endif
9362  ;
9363  return 0;
9364}
9365_ACEOF
9366rm -f conftest.$ac_objext
9367if { (eval echo "$as_me:9367: \"$ac_compile\"") >&5
9368  (eval $ac_compile) 2>&5
9369  ac_status=$?
9370  echo "$as_me:9370: \$? = $ac_status" >&5
9371  (exit $ac_status); } &&
9372         { ac_try='test -s conftest.$ac_objext'
9373  { (eval echo "$as_me:9373: \"$ac_try\"") >&5
9374  (eval $ac_try) 2>&5
9375  ac_status=$?
9376  echo "$as_me:9376: \$? = $ac_status" >&5
9377  (exit $ac_status); }; }; then
9378  cf_cv_gnu_library_219=yes
9379else
9380  echo "$as_me: failed program was:" >&5
9381cat conftest.$ac_ext >&5
9382cf_cv_gnu_library_219=no
9383fi
9384rm -f conftest.$ac_objext conftest.$ac_ext
9385		CPPFLAGS="$cf_save"
9386
9387fi
9388echo "$as_me:9388: result: $cf_cv_gnu_library_219" >&5
9389echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9390
9391	if test "x$cf_cv_gnu_library_219" = xyes; then
9392		cf_save="$CPPFLAGS"
9393		echo "$as_me:9393: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9394echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9395if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9396  echo $ECHO_N "(cached) $ECHO_C" >&6
9397else
9398
9399cf_fix_cppflags=no
9400cf_new_cflags=
9401cf_new_cppflags=
9402cf_new_extra_cppflags=
9403
9404for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9405do
9406case $cf_fix_cppflags in
9407(no)
9408	case $cf_add_cflags in
9409	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9410		case $cf_add_cflags in
9411		(-D*)
9412			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9413
9414			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9415				&& test -z "${cf_tst_cflags}" \
9416				&& cf_fix_cppflags=yes
9417
9418			if test $cf_fix_cppflags = yes ; then
9419
9420	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9421	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9422
9423				continue
9424			elif test "${cf_tst_cflags}" = "\"'" ; then
9425
9426	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9427	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9428
9429				continue
9430			fi
9431			;;
9432		esac
9433		case "$CPPFLAGS" in
9434		(*$cf_add_cflags)
9435			;;
9436		(*)
9437			case $cf_add_cflags in
9438			(-D*)
9439				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9440
9441CPPFLAGS=`echo "$CPPFLAGS" | \
9442	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9443		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9444
9445				;;
9446			esac
9447
9448	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9449	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9450
9451			;;
9452		esac
9453		;;
9454	(*)
9455
9456	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9457	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9458
9459		;;
9460	esac
9461	;;
9462(yes)
9463
9464	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9465	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9466
9467	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9468
9469	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9470		&& test -z "${cf_tst_cflags}" \
9471		&& cf_fix_cppflags=no
9472	;;
9473esac
9474done
9475
9476if test -n "$cf_new_cflags" ; then
9477
9478	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9479	CFLAGS="${CFLAGS}$cf_new_cflags"
9480
9481fi
9482
9483if test -n "$cf_new_cppflags" ; then
9484
9485	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9486	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9487
9488fi
9489
9490if test -n "$cf_new_extra_cppflags" ; then
9491
9492	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9493	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9494
9495fi
9496
9497			cat >conftest.$ac_ext <<_ACEOF
9498#line 9498 "configure"
9499#include "confdefs.h"
9500
9501				#include <limits.h>
9502				#include <sys/types.h>
9503
9504int
9505main (void)
9506{
9507
9508				#if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9509					return 0;
9510				#else
9511				#	error GNU C library is too old
9512				#endif
9513  ;
9514  return 0;
9515}
9516_ACEOF
9517rm -f conftest.$ac_objext
9518if { (eval echo "$as_me:9518: \"$ac_compile\"") >&5
9519  (eval $ac_compile) 2>&5
9520  ac_status=$?
9521  echo "$as_me:9521: \$? = $ac_status" >&5
9522  (exit $ac_status); } &&
9523         { ac_try='test -s conftest.$ac_objext'
9524  { (eval echo "$as_me:9524: \"$ac_try\"") >&5
9525  (eval $ac_try) 2>&5
9526  ac_status=$?
9527  echo "$as_me:9527: \$? = $ac_status" >&5
9528  (exit $ac_status); }; }; then
9529  cf_cv_gnu_dftsrc_219=yes
9530else
9531  echo "$as_me: failed program was:" >&5
9532cat conftest.$ac_ext >&5
9533cf_cv_gnu_dftsrc_219=no
9534fi
9535rm -f conftest.$ac_objext conftest.$ac_ext
9536
9537fi
9538echo "$as_me:9538: result: $cf_cv_gnu_dftsrc_219" >&5
9539echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9540		test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9541	else
9542		cf_cv_gnu_dftsrc_219=maybe
9543	fi
9544
9545	if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9546
9547		echo "$as_me:9547: checking if we must define _GNU_SOURCE" >&5
9548echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9549if test "${cf_cv_gnu_source+set}" = set; then
9550  echo $ECHO_N "(cached) $ECHO_C" >&6
9551else
9552
9553		cat >conftest.$ac_ext <<_ACEOF
9554#line 9554 "configure"
9555#include "confdefs.h"
9556#include <sys/types.h>
9557int
9558main (void)
9559{
9560
9561			#ifndef _XOPEN_SOURCE
9562			#error	expected _XOPEN_SOURCE to be defined
9563			#endif
9564  ;
9565  return 0;
9566}
9567_ACEOF
9568rm -f conftest.$ac_objext
9569if { (eval echo "$as_me:9569: \"$ac_compile\"") >&5
9570  (eval $ac_compile) 2>&5
9571  ac_status=$?
9572  echo "$as_me:9572: \$? = $ac_status" >&5
9573  (exit $ac_status); } &&
9574         { ac_try='test -s conftest.$ac_objext'
9575  { (eval echo "$as_me:9575: \"$ac_try\"") >&5
9576  (eval $ac_try) 2>&5
9577  ac_status=$?
9578  echo "$as_me:9578: \$? = $ac_status" >&5
9579  (exit $ac_status); }; }; then
9580  cf_cv_gnu_source=no
9581else
9582  echo "$as_me: failed program was:" >&5
9583cat conftest.$ac_ext >&5
9584cf_save="$CPPFLAGS"
9585
9586cf_fix_cppflags=no
9587cf_new_cflags=
9588cf_new_cppflags=
9589cf_new_extra_cppflags=
9590
9591for cf_add_cflags in -D_GNU_SOURCE
9592do
9593case $cf_fix_cppflags in
9594(no)
9595	case $cf_add_cflags in
9596	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9597		case $cf_add_cflags in
9598		(-D*)
9599			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9600
9601			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9602				&& test -z "${cf_tst_cflags}" \
9603				&& cf_fix_cppflags=yes
9604
9605			if test $cf_fix_cppflags = yes ; then
9606
9607	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9608	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9609
9610				continue
9611			elif test "${cf_tst_cflags}" = "\"'" ; then
9612
9613	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9614	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9615
9616				continue
9617			fi
9618			;;
9619		esac
9620		case "$CPPFLAGS" in
9621		(*$cf_add_cflags)
9622			;;
9623		(*)
9624			case $cf_add_cflags in
9625			(-D*)
9626				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9627
9628CPPFLAGS=`echo "$CPPFLAGS" | \
9629	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9630		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9631
9632				;;
9633			esac
9634
9635	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9636	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9637
9638			;;
9639		esac
9640		;;
9641	(*)
9642
9643	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9644	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9645
9646		;;
9647	esac
9648	;;
9649(yes)
9650
9651	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9652	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9653
9654	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9655
9656	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9657		&& test -z "${cf_tst_cflags}" \
9658		&& cf_fix_cppflags=no
9659	;;
9660esac
9661done
9662
9663if test -n "$cf_new_cflags" ; then
9664
9665	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9666	CFLAGS="${CFLAGS}$cf_new_cflags"
9667
9668fi
9669
9670if test -n "$cf_new_cppflags" ; then
9671
9672	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9673	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9674
9675fi
9676
9677if test -n "$cf_new_extra_cppflags" ; then
9678
9679	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9680	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9681
9682fi
9683
9684			 cat >conftest.$ac_ext <<_ACEOF
9685#line 9685 "configure"
9686#include "confdefs.h"
9687#include <sys/types.h>
9688int
9689main (void)
9690{
9691
9692				#ifdef _XOPEN_SOURCE
9693				#error	expected _XOPEN_SOURCE to be undefined
9694				#endif
9695  ;
9696  return 0;
9697}
9698_ACEOF
9699rm -f conftest.$ac_objext
9700if { (eval echo "$as_me:9700: \"$ac_compile\"") >&5
9701  (eval $ac_compile) 2>&5
9702  ac_status=$?
9703  echo "$as_me:9703: \$? = $ac_status" >&5
9704  (exit $ac_status); } &&
9705         { ac_try='test -s conftest.$ac_objext'
9706  { (eval echo "$as_me:9706: \"$ac_try\"") >&5
9707  (eval $ac_try) 2>&5
9708  ac_status=$?
9709  echo "$as_me:9709: \$? = $ac_status" >&5
9710  (exit $ac_status); }; }; then
9711  cf_cv_gnu_source=no
9712else
9713  echo "$as_me: failed program was:" >&5
9714cat conftest.$ac_ext >&5
9715cf_cv_gnu_source=yes
9716fi
9717rm -f conftest.$ac_objext conftest.$ac_ext
9718			CPPFLAGS="$cf_save"
9719
9720fi
9721rm -f conftest.$ac_objext conftest.$ac_ext
9722
9723fi
9724echo "$as_me:9724: result: $cf_cv_gnu_source" >&5
9725echo "${ECHO_T}$cf_cv_gnu_source" >&6
9726
9727		if test "$cf_cv_gnu_source" = yes
9728		then
9729		echo "$as_me:9729: checking if we should also define _DEFAULT_SOURCE" >&5
9730echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9731if test "${cf_cv_default_source+set}" = set; then
9732  echo $ECHO_N "(cached) $ECHO_C" >&6
9733else
9734
9735	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9736	CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9737
9738			cat >conftest.$ac_ext <<_ACEOF
9739#line 9739 "configure"
9740#include "confdefs.h"
9741#include <sys/types.h>
9742int
9743main (void)
9744{
9745
9746				#ifdef _DEFAULT_SOURCE
9747				#error	expected _DEFAULT_SOURCE to be undefined
9748				#endif
9749  ;
9750  return 0;
9751}
9752_ACEOF
9753rm -f conftest.$ac_objext
9754if { (eval echo "$as_me:9754: \"$ac_compile\"") >&5
9755  (eval $ac_compile) 2>&5
9756  ac_status=$?
9757  echo "$as_me:9757: \$? = $ac_status" >&5
9758  (exit $ac_status); } &&
9759         { ac_try='test -s conftest.$ac_objext'
9760  { (eval echo "$as_me:9760: \"$ac_try\"") >&5
9761  (eval $ac_try) 2>&5
9762  ac_status=$?
9763  echo "$as_me:9763: \$? = $ac_status" >&5
9764  (exit $ac_status); }; }; then
9765  cf_cv_default_source=no
9766else
9767  echo "$as_me: failed program was:" >&5
9768cat conftest.$ac_ext >&5
9769cf_cv_default_source=yes
9770fi
9771rm -f conftest.$ac_objext conftest.$ac_ext
9772
9773fi
9774echo "$as_me:9774: result: $cf_cv_default_source" >&5
9775echo "${ECHO_T}$cf_cv_default_source" >&6
9776			if test "$cf_cv_default_source" = yes
9777			then
9778
9779	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9780	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9781
9782			fi
9783		fi
9784	fi
9785
9786fi
9787
9788	;;
9789(minix*)
9790	cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9791	;;
9792(mirbsd*)
9793	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9794	cf_XOPEN_SOURCE=
9795
9796if test "$cf_cv_posix_visible" = no; then
9797
9798cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9799
9800cf_save_CFLAGS="$CFLAGS"
9801cf_save_CPPFLAGS="$CPPFLAGS"
9802
9803cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9804	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
9805		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
9806
9807cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9808	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
9809		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
9810
9811echo "$as_me:9811: checking if we should define _POSIX_C_SOURCE" >&5
9812echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9813if test "${cf_cv_posix_c_source+set}" = set; then
9814  echo $ECHO_N "(cached) $ECHO_C" >&6
9815else
9816
9817echo "${as_me:-configure}:9817: testing if the symbol is already defined go no further ..." 1>&5
9818
9819	cat >conftest.$ac_ext <<_ACEOF
9820#line 9820 "configure"
9821#include "confdefs.h"
9822#include <sys/types.h>
9823int
9824main (void)
9825{
9826
9827#ifndef _POSIX_C_SOURCE
9828make an error
9829#endif
9830  ;
9831  return 0;
9832}
9833_ACEOF
9834rm -f conftest.$ac_objext
9835if { (eval echo "$as_me:9835: \"$ac_compile\"") >&5
9836  (eval $ac_compile) 2>&5
9837  ac_status=$?
9838  echo "$as_me:9838: \$? = $ac_status" >&5
9839  (exit $ac_status); } &&
9840         { ac_try='test -s conftest.$ac_objext'
9841  { (eval echo "$as_me:9841: \"$ac_try\"") >&5
9842  (eval $ac_try) 2>&5
9843  ac_status=$?
9844  echo "$as_me:9844: \$? = $ac_status" >&5
9845  (exit $ac_status); }; }; then
9846  cf_cv_posix_c_source=no
9847else
9848  echo "$as_me: failed program was:" >&5
9849cat conftest.$ac_ext >&5
9850cf_want_posix_source=no
9851	 case .$cf_POSIX_C_SOURCE in
9852	 (.[12]??*)
9853		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9854		;;
9855	 (.2)
9856		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9857		cf_want_posix_source=yes
9858		;;
9859	 (.*)
9860		cf_want_posix_source=yes
9861		;;
9862	 esac
9863	 if test "$cf_want_posix_source" = yes ; then
9864		cat >conftest.$ac_ext <<_ACEOF
9865#line 9865 "configure"
9866#include "confdefs.h"
9867#include <sys/types.h>
9868int
9869main (void)
9870{
9871
9872#ifdef _POSIX_SOURCE
9873make an error
9874#endif
9875  ;
9876  return 0;
9877}
9878_ACEOF
9879rm -f conftest.$ac_objext
9880if { (eval echo "$as_me:9880: \"$ac_compile\"") >&5
9881  (eval $ac_compile) 2>&5
9882  ac_status=$?
9883  echo "$as_me:9883: \$? = $ac_status" >&5
9884  (exit $ac_status); } &&
9885         { ac_try='test -s conftest.$ac_objext'
9886  { (eval echo "$as_me:9886: \"$ac_try\"") >&5
9887  (eval $ac_try) 2>&5
9888  ac_status=$?
9889  echo "$as_me:9889: \$? = $ac_status" >&5
9890  (exit $ac_status); }; }; then
9891  :
9892else
9893  echo "$as_me: failed program was:" >&5
9894cat conftest.$ac_ext >&5
9895cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9896fi
9897rm -f conftest.$ac_objext conftest.$ac_ext
9898	 fi
9899
9900echo "${as_me:-configure}:9900: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9901
9902	 CFLAGS="$cf_trim_CFLAGS"
9903	 CPPFLAGS="$cf_trim_CPPFLAGS"
9904
9905	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9906	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9907
9908echo "${as_me:-configure}:9908: testing if the second compile does not leave our definition intact error ..." 1>&5
9909
9910	 cat >conftest.$ac_ext <<_ACEOF
9911#line 9911 "configure"
9912#include "confdefs.h"
9913#include <sys/types.h>
9914int
9915main (void)
9916{
9917
9918#ifndef _POSIX_C_SOURCE
9919make an error
9920#endif
9921  ;
9922  return 0;
9923}
9924_ACEOF
9925rm -f conftest.$ac_objext
9926if { (eval echo "$as_me:9926: \"$ac_compile\"") >&5
9927  (eval $ac_compile) 2>&5
9928  ac_status=$?
9929  echo "$as_me:9929: \$? = $ac_status" >&5
9930  (exit $ac_status); } &&
9931         { ac_try='test -s conftest.$ac_objext'
9932  { (eval echo "$as_me:9932: \"$ac_try\"") >&5
9933  (eval $ac_try) 2>&5
9934  ac_status=$?
9935  echo "$as_me:9935: \$? = $ac_status" >&5
9936  (exit $ac_status); }; }; then
9937  :
9938else
9939  echo "$as_me: failed program was:" >&5
9940cat conftest.$ac_ext >&5
9941cf_cv_posix_c_source=no
9942fi
9943rm -f conftest.$ac_objext conftest.$ac_ext
9944	 CFLAGS="$cf_save_CFLAGS"
9945	 CPPFLAGS="$cf_save_CPPFLAGS"
9946
9947fi
9948rm -f conftest.$ac_objext conftest.$ac_ext
9949
9950fi
9951echo "$as_me:9951: result: $cf_cv_posix_c_source" >&5
9952echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9953
9954if test "$cf_cv_posix_c_source" != no ; then
9955	CFLAGS="$cf_trim_CFLAGS"
9956	CPPFLAGS="$cf_trim_CPPFLAGS"
9957
9958cf_fix_cppflags=no
9959cf_new_cflags=
9960cf_new_cppflags=
9961cf_new_extra_cppflags=
9962
9963for cf_add_cflags in $cf_cv_posix_c_source
9964do
9965case $cf_fix_cppflags in
9966(no)
9967	case $cf_add_cflags in
9968	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9969		case $cf_add_cflags in
9970		(-D*)
9971			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9972
9973			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9974				&& test -z "${cf_tst_cflags}" \
9975				&& cf_fix_cppflags=yes
9976
9977			if test $cf_fix_cppflags = yes ; then
9978
9979	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9980	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9981
9982				continue
9983			elif test "${cf_tst_cflags}" = "\"'" ; then
9984
9985	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9986	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9987
9988				continue
9989			fi
9990			;;
9991		esac
9992		case "$CPPFLAGS" in
9993		(*$cf_add_cflags)
9994			;;
9995		(*)
9996			case $cf_add_cflags in
9997			(-D*)
9998				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9999
10000CPPFLAGS=`echo "$CPPFLAGS" | \
10001	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10002		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10003
10004				;;
10005			esac
10006
10007	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10008	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10009
10010			;;
10011		esac
10012		;;
10013	(*)
10014
10015	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10016	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10017
10018		;;
10019	esac
10020	;;
10021(yes)
10022
10023	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10024	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10025
10026	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10027
10028	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10029		&& test -z "${cf_tst_cflags}" \
10030		&& cf_fix_cppflags=no
10031	;;
10032esac
10033done
10034
10035if test -n "$cf_new_cflags" ; then
10036
10037	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10038	CFLAGS="${CFLAGS}$cf_new_cflags"
10039
10040fi
10041
10042if test -n "$cf_new_cppflags" ; then
10043
10044	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10045	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10046
10047fi
10048
10049if test -n "$cf_new_extra_cppflags" ; then
10050
10051	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10052	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10053
10054fi
10055
10056fi
10057
10058fi # cf_cv_posix_visible
10059
10060	;;
10061(netbsd*)
10062	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10063	;;
10064(openbsd[4-9]*)
10065	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10066	cf_xopen_source="-D_BSD_SOURCE"
10067	cf_XOPEN_SOURCE=600
10068	;;
10069(openbsd*)
10070	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10071	;;
10072(osf[45]*)
10073	cf_xopen_source="-D_OSF_SOURCE"
10074	;;
10075(nto-qnx*)
10076	cf_xopen_source="-D_QNX_SOURCE"
10077	;;
10078(sco*)
10079	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10080	;;
10081(solaris2.*)
10082	cf_xopen_source="-D__EXTENSIONS__"
10083	cf_cv_xopen_source=broken
10084	;;
10085(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10086	cf_XOPEN_SOURCE=
10087	cf_POSIX_C_SOURCE=
10088	;;
10089(*)
10090
10091echo "$as_me:10091: checking if we should define _XOPEN_SOURCE" >&5
10092echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10093if test "${cf_cv_xopen_source+set}" = set; then
10094  echo $ECHO_N "(cached) $ECHO_C" >&6
10095else
10096
10097	cat >conftest.$ac_ext <<_ACEOF
10098#line 10098 "configure"
10099#include "confdefs.h"
10100
10101#include <stdlib.h>
10102#include <string.h>
10103#include <sys/types.h>
10104
10105int
10106main (void)
10107{
10108
10109#ifndef _XOPEN_SOURCE
10110make an error
10111#endif
10112  ;
10113  return 0;
10114}
10115_ACEOF
10116rm -f conftest.$ac_objext
10117if { (eval echo "$as_me:10117: \"$ac_compile\"") >&5
10118  (eval $ac_compile) 2>&5
10119  ac_status=$?
10120  echo "$as_me:10120: \$? = $ac_status" >&5
10121  (exit $ac_status); } &&
10122         { ac_try='test -s conftest.$ac_objext'
10123  { (eval echo "$as_me:10123: \"$ac_try\"") >&5
10124  (eval $ac_try) 2>&5
10125  ac_status=$?
10126  echo "$as_me:10126: \$? = $ac_status" >&5
10127  (exit $ac_status); }; }; then
10128  cf_cv_xopen_source=no
10129else
10130  echo "$as_me: failed program was:" >&5
10131cat conftest.$ac_ext >&5
10132cf_save="$CPPFLAGS"
10133
10134	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10135	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10136
10137	 cat >conftest.$ac_ext <<_ACEOF
10138#line 10138 "configure"
10139#include "confdefs.h"
10140
10141#include <stdlib.h>
10142#include <string.h>
10143#include <sys/types.h>
10144
10145int
10146main (void)
10147{
10148
10149#ifdef _XOPEN_SOURCE
10150make an error
10151#endif
10152  ;
10153  return 0;
10154}
10155_ACEOF
10156rm -f conftest.$ac_objext
10157if { (eval echo "$as_me:10157: \"$ac_compile\"") >&5
10158  (eval $ac_compile) 2>&5
10159  ac_status=$?
10160  echo "$as_me:10160: \$? = $ac_status" >&5
10161  (exit $ac_status); } &&
10162         { ac_try='test -s conftest.$ac_objext'
10163  { (eval echo "$as_me:10163: \"$ac_try\"") >&5
10164  (eval $ac_try) 2>&5
10165  ac_status=$?
10166  echo "$as_me:10166: \$? = $ac_status" >&5
10167  (exit $ac_status); }; }; then
10168  cf_cv_xopen_source=no
10169else
10170  echo "$as_me: failed program was:" >&5
10171cat conftest.$ac_ext >&5
10172cf_cv_xopen_source=$cf_XOPEN_SOURCE
10173fi
10174rm -f conftest.$ac_objext conftest.$ac_ext
10175	CPPFLAGS="$cf_save"
10176
10177fi
10178rm -f conftest.$ac_objext conftest.$ac_ext
10179
10180fi
10181echo "$as_me:10181: result: $cf_cv_xopen_source" >&5
10182echo "${ECHO_T}$cf_cv_xopen_source" >&6
10183
10184if test "$cf_cv_xopen_source" != no ; then
10185
10186CFLAGS=`echo "$CFLAGS" | \
10187	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
10188		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
10189
10190CPPFLAGS=`echo "$CPPFLAGS" | \
10191	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
10192		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
10193
10194	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10195
10196cf_fix_cppflags=no
10197cf_new_cflags=
10198cf_new_cppflags=
10199cf_new_extra_cppflags=
10200
10201for cf_add_cflags in $cf_temp_xopen_source
10202do
10203case $cf_fix_cppflags in
10204(no)
10205	case $cf_add_cflags in
10206	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10207		case $cf_add_cflags in
10208		(-D*)
10209			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10210
10211			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10212				&& test -z "${cf_tst_cflags}" \
10213				&& cf_fix_cppflags=yes
10214
10215			if test $cf_fix_cppflags = yes ; then
10216
10217	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10218	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10219
10220				continue
10221			elif test "${cf_tst_cflags}" = "\"'" ; then
10222
10223	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10224	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10225
10226				continue
10227			fi
10228			;;
10229		esac
10230		case "$CPPFLAGS" in
10231		(*$cf_add_cflags)
10232			;;
10233		(*)
10234			case $cf_add_cflags in
10235			(-D*)
10236				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10237
10238CPPFLAGS=`echo "$CPPFLAGS" | \
10239	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10240		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10241
10242				;;
10243			esac
10244
10245	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10246	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10247
10248			;;
10249		esac
10250		;;
10251	(*)
10252
10253	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10254	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10255
10256		;;
10257	esac
10258	;;
10259(yes)
10260
10261	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10262	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10263
10264	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10265
10266	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10267		&& test -z "${cf_tst_cflags}" \
10268		&& cf_fix_cppflags=no
10269	;;
10270esac
10271done
10272
10273if test -n "$cf_new_cflags" ; then
10274
10275	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10276	CFLAGS="${CFLAGS}$cf_new_cflags"
10277
10278fi
10279
10280if test -n "$cf_new_cppflags" ; then
10281
10282	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10283	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10284
10285fi
10286
10287if test -n "$cf_new_extra_cppflags" ; then
10288
10289	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10290	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10291
10292fi
10293
10294fi
10295
10296if test "$cf_cv_posix_visible" = no; then
10297
10298cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10299
10300cf_save_CFLAGS="$CFLAGS"
10301cf_save_CPPFLAGS="$CPPFLAGS"
10302
10303cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10304	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
10305		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
10306
10307cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10308	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
10309		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
10310
10311echo "$as_me:10311: checking if we should define _POSIX_C_SOURCE" >&5
10312echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10313if test "${cf_cv_posix_c_source+set}" = set; then
10314  echo $ECHO_N "(cached) $ECHO_C" >&6
10315else
10316
10317echo "${as_me:-configure}:10317: testing if the symbol is already defined go no further ..." 1>&5
10318
10319	cat >conftest.$ac_ext <<_ACEOF
10320#line 10320 "configure"
10321#include "confdefs.h"
10322#include <sys/types.h>
10323int
10324main (void)
10325{
10326
10327#ifndef _POSIX_C_SOURCE
10328make an error
10329#endif
10330  ;
10331  return 0;
10332}
10333_ACEOF
10334rm -f conftest.$ac_objext
10335if { (eval echo "$as_me:10335: \"$ac_compile\"") >&5
10336  (eval $ac_compile) 2>&5
10337  ac_status=$?
10338  echo "$as_me:10338: \$? = $ac_status" >&5
10339  (exit $ac_status); } &&
10340         { ac_try='test -s conftest.$ac_objext'
10341  { (eval echo "$as_me:10341: \"$ac_try\"") >&5
10342  (eval $ac_try) 2>&5
10343  ac_status=$?
10344  echo "$as_me:10344: \$? = $ac_status" >&5
10345  (exit $ac_status); }; }; then
10346  cf_cv_posix_c_source=no
10347else
10348  echo "$as_me: failed program was:" >&5
10349cat conftest.$ac_ext >&5
10350cf_want_posix_source=no
10351	 case .$cf_POSIX_C_SOURCE in
10352	 (.[12]??*)
10353		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10354		;;
10355	 (.2)
10356		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10357		cf_want_posix_source=yes
10358		;;
10359	 (.*)
10360		cf_want_posix_source=yes
10361		;;
10362	 esac
10363	 if test "$cf_want_posix_source" = yes ; then
10364		cat >conftest.$ac_ext <<_ACEOF
10365#line 10365 "configure"
10366#include "confdefs.h"
10367#include <sys/types.h>
10368int
10369main (void)
10370{
10371
10372#ifdef _POSIX_SOURCE
10373make an error
10374#endif
10375  ;
10376  return 0;
10377}
10378_ACEOF
10379rm -f conftest.$ac_objext
10380if { (eval echo "$as_me:10380: \"$ac_compile\"") >&5
10381  (eval $ac_compile) 2>&5
10382  ac_status=$?
10383  echo "$as_me:10383: \$? = $ac_status" >&5
10384  (exit $ac_status); } &&
10385         { ac_try='test -s conftest.$ac_objext'
10386  { (eval echo "$as_me:10386: \"$ac_try\"") >&5
10387  (eval $ac_try) 2>&5
10388  ac_status=$?
10389  echo "$as_me:10389: \$? = $ac_status" >&5
10390  (exit $ac_status); }; }; then
10391  :
10392else
10393  echo "$as_me: failed program was:" >&5
10394cat conftest.$ac_ext >&5
10395cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10396fi
10397rm -f conftest.$ac_objext conftest.$ac_ext
10398	 fi
10399
10400echo "${as_me:-configure}:10400: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10401
10402	 CFLAGS="$cf_trim_CFLAGS"
10403	 CPPFLAGS="$cf_trim_CPPFLAGS"
10404
10405	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10406	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10407
10408echo "${as_me:-configure}:10408: testing if the second compile does not leave our definition intact error ..." 1>&5
10409
10410	 cat >conftest.$ac_ext <<_ACEOF
10411#line 10411 "configure"
10412#include "confdefs.h"
10413#include <sys/types.h>
10414int
10415main (void)
10416{
10417
10418#ifndef _POSIX_C_SOURCE
10419make an error
10420#endif
10421  ;
10422  return 0;
10423}
10424_ACEOF
10425rm -f conftest.$ac_objext
10426if { (eval echo "$as_me:10426: \"$ac_compile\"") >&5
10427  (eval $ac_compile) 2>&5
10428  ac_status=$?
10429  echo "$as_me:10429: \$? = $ac_status" >&5
10430  (exit $ac_status); } &&
10431         { ac_try='test -s conftest.$ac_objext'
10432  { (eval echo "$as_me:10432: \"$ac_try\"") >&5
10433  (eval $ac_try) 2>&5
10434  ac_status=$?
10435  echo "$as_me:10435: \$? = $ac_status" >&5
10436  (exit $ac_status); }; }; then
10437  :
10438else
10439  echo "$as_me: failed program was:" >&5
10440cat conftest.$ac_ext >&5
10441cf_cv_posix_c_source=no
10442fi
10443rm -f conftest.$ac_objext conftest.$ac_ext
10444	 CFLAGS="$cf_save_CFLAGS"
10445	 CPPFLAGS="$cf_save_CPPFLAGS"
10446
10447fi
10448rm -f conftest.$ac_objext conftest.$ac_ext
10449
10450fi
10451echo "$as_me:10451: result: $cf_cv_posix_c_source" >&5
10452echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10453
10454if test "$cf_cv_posix_c_source" != no ; then
10455	CFLAGS="$cf_trim_CFLAGS"
10456	CPPFLAGS="$cf_trim_CPPFLAGS"
10457
10458cf_fix_cppflags=no
10459cf_new_cflags=
10460cf_new_cppflags=
10461cf_new_extra_cppflags=
10462
10463for cf_add_cflags in $cf_cv_posix_c_source
10464do
10465case $cf_fix_cppflags in
10466(no)
10467	case $cf_add_cflags in
10468	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10469		case $cf_add_cflags in
10470		(-D*)
10471			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10472
10473			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10474				&& test -z "${cf_tst_cflags}" \
10475				&& cf_fix_cppflags=yes
10476
10477			if test $cf_fix_cppflags = yes ; then
10478
10479	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10480	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10481
10482				continue
10483			elif test "${cf_tst_cflags}" = "\"'" ; then
10484
10485	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10486	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10487
10488				continue
10489			fi
10490			;;
10491		esac
10492		case "$CPPFLAGS" in
10493		(*$cf_add_cflags)
10494			;;
10495		(*)
10496			case $cf_add_cflags in
10497			(-D*)
10498				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10499
10500CPPFLAGS=`echo "$CPPFLAGS" | \
10501	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10502		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10503
10504				;;
10505			esac
10506
10507	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10508	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10509
10510			;;
10511		esac
10512		;;
10513	(*)
10514
10515	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10516	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10517
10518		;;
10519	esac
10520	;;
10521(yes)
10522
10523	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10524	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10525
10526	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10527
10528	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10529		&& test -z "${cf_tst_cflags}" \
10530		&& cf_fix_cppflags=no
10531	;;
10532esac
10533done
10534
10535if test -n "$cf_new_cflags" ; then
10536
10537	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10538	CFLAGS="${CFLAGS}$cf_new_cflags"
10539
10540fi
10541
10542if test -n "$cf_new_cppflags" ; then
10543
10544	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10545	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10546
10547fi
10548
10549if test -n "$cf_new_extra_cppflags" ; then
10550
10551	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10552	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10553
10554fi
10555
10556fi
10557
10558fi # cf_cv_posix_visible
10559
10560	;;
10561esac
10562
10563if test -n "$cf_xopen_source" ; then
10564
10565cf_fix_cppflags=no
10566cf_new_cflags=
10567cf_new_cppflags=
10568cf_new_extra_cppflags=
10569
10570for cf_add_cflags in $cf_xopen_source
10571do
10572case $cf_fix_cppflags in
10573(no)
10574	case $cf_add_cflags in
10575	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10576		case $cf_add_cflags in
10577		(-D*)
10578			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10579
10580			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10581				&& test -z "${cf_tst_cflags}" \
10582				&& cf_fix_cppflags=yes
10583
10584			if test $cf_fix_cppflags = yes ; then
10585
10586	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10587	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10588
10589				continue
10590			elif test "${cf_tst_cflags}" = "\"'" ; then
10591
10592	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10593	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10594
10595				continue
10596			fi
10597			;;
10598		esac
10599		case "$CPPFLAGS" in
10600		(*$cf_add_cflags)
10601			;;
10602		(*)
10603			case $cf_add_cflags in
10604			(-D*)
10605				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10606
10607CPPFLAGS=`echo "$CPPFLAGS" | \
10608	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10609		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10610
10611				;;
10612			esac
10613
10614	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10615	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10616
10617			;;
10618		esac
10619		;;
10620	(*)
10621
10622	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10623	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10624
10625		;;
10626	esac
10627	;;
10628(yes)
10629
10630	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10631	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10632
10633	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10634
10635	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10636		&& test -z "${cf_tst_cflags}" \
10637		&& cf_fix_cppflags=no
10638	;;
10639esac
10640done
10641
10642if test -n "$cf_new_cflags" ; then
10643	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
10644
10645echo "${as_me:-configure}:10645: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10646
10647	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10648	CFLAGS="${CFLAGS}$cf_new_cflags"
10649
10650fi
10651
10652if test -n "$cf_new_cppflags" ; then
10653	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10654
10655echo "${as_me:-configure}:10655: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10656
10657	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10658	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10659
10660fi
10661
10662if test -n "$cf_new_extra_cppflags" ; then
10663	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10664
10665echo "${as_me:-configure}:10665: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10666
10667	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10668	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10669
10670fi
10671
10672fi
10673
10674if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10675	echo "$as_me:10675: checking if _XOPEN_SOURCE really is set" >&5
10676echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10677	cat >conftest.$ac_ext <<_ACEOF
10678#line 10678 "configure"
10679#include "confdefs.h"
10680#include <stdlib.h>
10681int
10682main (void)
10683{
10684
10685#ifndef _XOPEN_SOURCE
10686make an error
10687#endif
10688  ;
10689  return 0;
10690}
10691_ACEOF
10692rm -f conftest.$ac_objext
10693if { (eval echo "$as_me:10693: \"$ac_compile\"") >&5
10694  (eval $ac_compile) 2>&5
10695  ac_status=$?
10696  echo "$as_me:10696: \$? = $ac_status" >&5
10697  (exit $ac_status); } &&
10698         { ac_try='test -s conftest.$ac_objext'
10699  { (eval echo "$as_me:10699: \"$ac_try\"") >&5
10700  (eval $ac_try) 2>&5
10701  ac_status=$?
10702  echo "$as_me:10702: \$? = $ac_status" >&5
10703  (exit $ac_status); }; }; then
10704  cf_XOPEN_SOURCE_set=yes
10705else
10706  echo "$as_me: failed program was:" >&5
10707cat conftest.$ac_ext >&5
10708cf_XOPEN_SOURCE_set=no
10709fi
10710rm -f conftest.$ac_objext conftest.$ac_ext
10711	echo "$as_me:10711: result: $cf_XOPEN_SOURCE_set" >&5
10712echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10713	if test $cf_XOPEN_SOURCE_set = yes
10714	then
10715		cat >conftest.$ac_ext <<_ACEOF
10716#line 10716 "configure"
10717#include "confdefs.h"
10718#include <stdlib.h>
10719int
10720main (void)
10721{
10722
10723#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10724make an error
10725#endif
10726  ;
10727  return 0;
10728}
10729_ACEOF
10730rm -f conftest.$ac_objext
10731if { (eval echo "$as_me:10731: \"$ac_compile\"") >&5
10732  (eval $ac_compile) 2>&5
10733  ac_status=$?
10734  echo "$as_me:10734: \$? = $ac_status" >&5
10735  (exit $ac_status); } &&
10736         { ac_try='test -s conftest.$ac_objext'
10737  { (eval echo "$as_me:10737: \"$ac_try\"") >&5
10738  (eval $ac_try) 2>&5
10739  ac_status=$?
10740  echo "$as_me:10740: \$? = $ac_status" >&5
10741  (exit $ac_status); }; }; then
10742  cf_XOPEN_SOURCE_set_ok=yes
10743else
10744  echo "$as_me: failed program was:" >&5
10745cat conftest.$ac_ext >&5
10746cf_XOPEN_SOURCE_set_ok=no
10747fi
10748rm -f conftest.$ac_objext conftest.$ac_ext
10749		if test $cf_XOPEN_SOURCE_set_ok = no
10750		then
10751			{ echo "$as_me:10751: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10752echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10753		fi
10754	else
10755
10756echo "$as_me:10756: checking if we should define _XOPEN_SOURCE" >&5
10757echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10758if test "${cf_cv_xopen_source+set}" = set; then
10759  echo $ECHO_N "(cached) $ECHO_C" >&6
10760else
10761
10762	cat >conftest.$ac_ext <<_ACEOF
10763#line 10763 "configure"
10764#include "confdefs.h"
10765
10766#include <stdlib.h>
10767#include <string.h>
10768#include <sys/types.h>
10769
10770int
10771main (void)
10772{
10773
10774#ifndef _XOPEN_SOURCE
10775make an error
10776#endif
10777  ;
10778  return 0;
10779}
10780_ACEOF
10781rm -f conftest.$ac_objext
10782if { (eval echo "$as_me:10782: \"$ac_compile\"") >&5
10783  (eval $ac_compile) 2>&5
10784  ac_status=$?
10785  echo "$as_me:10785: \$? = $ac_status" >&5
10786  (exit $ac_status); } &&
10787         { ac_try='test -s conftest.$ac_objext'
10788  { (eval echo "$as_me:10788: \"$ac_try\"") >&5
10789  (eval $ac_try) 2>&5
10790  ac_status=$?
10791  echo "$as_me:10791: \$? = $ac_status" >&5
10792  (exit $ac_status); }; }; then
10793  cf_cv_xopen_source=no
10794else
10795  echo "$as_me: failed program was:" >&5
10796cat conftest.$ac_ext >&5
10797cf_save="$CPPFLAGS"
10798
10799	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10800	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10801
10802	 cat >conftest.$ac_ext <<_ACEOF
10803#line 10803 "configure"
10804#include "confdefs.h"
10805
10806#include <stdlib.h>
10807#include <string.h>
10808#include <sys/types.h>
10809
10810int
10811main (void)
10812{
10813
10814#ifdef _XOPEN_SOURCE
10815make an error
10816#endif
10817  ;
10818  return 0;
10819}
10820_ACEOF
10821rm -f conftest.$ac_objext
10822if { (eval echo "$as_me:10822: \"$ac_compile\"") >&5
10823  (eval $ac_compile) 2>&5
10824  ac_status=$?
10825  echo "$as_me:10825: \$? = $ac_status" >&5
10826  (exit $ac_status); } &&
10827         { ac_try='test -s conftest.$ac_objext'
10828  { (eval echo "$as_me:10828: \"$ac_try\"") >&5
10829  (eval $ac_try) 2>&5
10830  ac_status=$?
10831  echo "$as_me:10831: \$? = $ac_status" >&5
10832  (exit $ac_status); }; }; then
10833  cf_cv_xopen_source=no
10834else
10835  echo "$as_me: failed program was:" >&5
10836cat conftest.$ac_ext >&5
10837cf_cv_xopen_source=$cf_XOPEN_SOURCE
10838fi
10839rm -f conftest.$ac_objext conftest.$ac_ext
10840	CPPFLAGS="$cf_save"
10841
10842fi
10843rm -f conftest.$ac_objext conftest.$ac_ext
10844
10845fi
10846echo "$as_me:10846: result: $cf_cv_xopen_source" >&5
10847echo "${ECHO_T}$cf_cv_xopen_source" >&6
10848
10849if test "$cf_cv_xopen_source" != no ; then
10850
10851CFLAGS=`echo "$CFLAGS" | \
10852	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
10853		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
10854
10855CPPFLAGS=`echo "$CPPFLAGS" | \
10856	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
10857		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
10858
10859	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10860
10861cf_fix_cppflags=no
10862cf_new_cflags=
10863cf_new_cppflags=
10864cf_new_extra_cppflags=
10865
10866for cf_add_cflags in $cf_temp_xopen_source
10867do
10868case $cf_fix_cppflags in
10869(no)
10870	case $cf_add_cflags in
10871	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10872		case $cf_add_cflags in
10873		(-D*)
10874			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10875
10876			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10877				&& test -z "${cf_tst_cflags}" \
10878				&& cf_fix_cppflags=yes
10879
10880			if test $cf_fix_cppflags = yes ; then
10881
10882	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10883	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10884
10885				continue
10886			elif test "${cf_tst_cflags}" = "\"'" ; then
10887
10888	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10889	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10890
10891				continue
10892			fi
10893			;;
10894		esac
10895		case "$CPPFLAGS" in
10896		(*$cf_add_cflags)
10897			;;
10898		(*)
10899			case $cf_add_cflags in
10900			(-D*)
10901				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10902
10903CPPFLAGS=`echo "$CPPFLAGS" | \
10904	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10905		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10906
10907				;;
10908			esac
10909
10910	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10911	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10912
10913			;;
10914		esac
10915		;;
10916	(*)
10917
10918	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10919	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10920
10921		;;
10922	esac
10923	;;
10924(yes)
10925
10926	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10927	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10928
10929	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10930
10931	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10932		&& test -z "${cf_tst_cflags}" \
10933		&& cf_fix_cppflags=no
10934	;;
10935esac
10936done
10937
10938if test -n "$cf_new_cflags" ; then
10939
10940	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10941	CFLAGS="${CFLAGS}$cf_new_cflags"
10942
10943fi
10944
10945if test -n "$cf_new_cppflags" ; then
10946
10947	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10948	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10949
10950fi
10951
10952if test -n "$cf_new_extra_cppflags" ; then
10953
10954	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10955	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10956
10957fi
10958
10959fi
10960
10961	fi
10962fi
10963fi # cf_cv_posix_visible
10964
10965CPPFLAGS_after_XOPEN="$CPPFLAGS"
10966
10967# Work around breakage on OS X
10968
10969echo "$as_me:10969: checking if SIGWINCH is defined" >&5
10970echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
10971if test "${cf_cv_define_sigwinch+set}" = set; then
10972  echo $ECHO_N "(cached) $ECHO_C" >&6
10973else
10974
10975	cat >conftest.$ac_ext <<_ACEOF
10976#line 10976 "configure"
10977#include "confdefs.h"
10978
10979#include <sys/types.h>
10980#include <sys/signal.h>
10981
10982int
10983main (void)
10984{
10985int x = SIGWINCH
10986  ;
10987  return 0;
10988}
10989_ACEOF
10990rm -f conftest.$ac_objext
10991if { (eval echo "$as_me:10991: \"$ac_compile\"") >&5
10992  (eval $ac_compile) 2>&5
10993  ac_status=$?
10994  echo "$as_me:10994: \$? = $ac_status" >&5
10995  (exit $ac_status); } &&
10996         { ac_try='test -s conftest.$ac_objext'
10997  { (eval echo "$as_me:10997: \"$ac_try\"") >&5
10998  (eval $ac_try) 2>&5
10999  ac_status=$?
11000  echo "$as_me:11000: \$? = $ac_status" >&5
11001  (exit $ac_status); }; }; then
11002  cf_cv_define_sigwinch=yes
11003else
11004  echo "$as_me: failed program was:" >&5
11005cat conftest.$ac_ext >&5
11006cat >conftest.$ac_ext <<_ACEOF
11007#line 11007 "configure"
11008#include "confdefs.h"
11009
11010#undef _XOPEN_SOURCE
11011#undef _POSIX_SOURCE
11012#undef _POSIX_C_SOURCE
11013#include <sys/types.h>
11014#include <sys/signal.h>
11015
11016int
11017main (void)
11018{
11019int x = SIGWINCH
11020  ;
11021  return 0;
11022}
11023_ACEOF
11024rm -f conftest.$ac_objext
11025if { (eval echo "$as_me:11025: \"$ac_compile\"") >&5
11026  (eval $ac_compile) 2>&5
11027  ac_status=$?
11028  echo "$as_me:11028: \$? = $ac_status" >&5
11029  (exit $ac_status); } &&
11030         { ac_try='test -s conftest.$ac_objext'
11031  { (eval echo "$as_me:11031: \"$ac_try\"") >&5
11032  (eval $ac_try) 2>&5
11033  ac_status=$?
11034  echo "$as_me:11034: \$? = $ac_status" >&5
11035  (exit $ac_status); }; }; then
11036  cf_cv_define_sigwinch=maybe
11037else
11038  echo "$as_me: failed program was:" >&5
11039cat conftest.$ac_ext >&5
11040cf_cv_define_sigwinch=no
11041fi
11042rm -f conftest.$ac_objext conftest.$ac_ext
11043
11044fi
11045rm -f conftest.$ac_objext conftest.$ac_ext
11046
11047fi
11048echo "$as_me:11048: result: $cf_cv_define_sigwinch" >&5
11049echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11050
11051if test "$cf_cv_define_sigwinch" = maybe ; then
11052echo "$as_me:11052: checking for actual SIGWINCH definition" >&5
11053echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11054if test "${cf_cv_fixup_sigwinch+set}" = set; then
11055  echo $ECHO_N "(cached) $ECHO_C" >&6
11056else
11057
11058cf_cv_fixup_sigwinch=unknown
11059cf_sigwinch=32
11060while test $cf_sigwinch != 1
11061do
11062	cat >conftest.$ac_ext <<_ACEOF
11063#line 11063 "configure"
11064#include "confdefs.h"
11065
11066#undef _XOPEN_SOURCE
11067#undef _POSIX_SOURCE
11068#undef _POSIX_C_SOURCE
11069#include <sys/types.h>
11070#include <sys/signal.h>
11071
11072int
11073main (void)
11074{
11075
11076#if SIGWINCH != $cf_sigwinch
11077make an error
11078#endif
11079int x = SIGWINCH
11080  ;
11081  return 0;
11082}
11083_ACEOF
11084rm -f conftest.$ac_objext
11085if { (eval echo "$as_me:11085: \"$ac_compile\"") >&5
11086  (eval $ac_compile) 2>&5
11087  ac_status=$?
11088  echo "$as_me:11088: \$? = $ac_status" >&5
11089  (exit $ac_status); } &&
11090         { ac_try='test -s conftest.$ac_objext'
11091  { (eval echo "$as_me:11091: \"$ac_try\"") >&5
11092  (eval $ac_try) 2>&5
11093  ac_status=$?
11094  echo "$as_me:11094: \$? = $ac_status" >&5
11095  (exit $ac_status); }; }; then
11096  cf_cv_fixup_sigwinch=$cf_sigwinch
11097	 break
11098else
11099  echo "$as_me: failed program was:" >&5
11100cat conftest.$ac_ext >&5
11101fi
11102rm -f conftest.$ac_objext conftest.$ac_ext
11103
11104cf_sigwinch=`expr $cf_sigwinch - 1`
11105done
11106
11107fi
11108echo "$as_me:11108: result: $cf_cv_fixup_sigwinch" >&5
11109echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11110
11111	if test "$cf_cv_fixup_sigwinch" != unknown ; then
11112		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11113	fi
11114fi
11115
11116# Checks for CODESET support.
11117
11118echo "$as_me:11118: checking for nl_langinfo and CODESET" >&5
11119echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11120if test "${am_cv_langinfo_codeset+set}" = set; then
11121  echo $ECHO_N "(cached) $ECHO_C" >&6
11122else
11123  cat >conftest.$ac_ext <<_ACEOF
11124#line 11124 "configure"
11125#include "confdefs.h"
11126#include <langinfo.h>
11127int
11128main (void)
11129{
11130char* cs = nl_langinfo(CODESET);
11131  ;
11132  return 0;
11133}
11134_ACEOF
11135rm -f conftest.$ac_objext conftest$ac_exeext
11136if { (eval echo "$as_me:11136: \"$ac_link\"") >&5
11137  (eval $ac_link) 2>&5
11138  ac_status=$?
11139  echo "$as_me:11139: \$? = $ac_status" >&5
11140  (exit $ac_status); } &&
11141         { ac_try='test -s conftest$ac_exeext'
11142  { (eval echo "$as_me:11142: \"$ac_try\"") >&5
11143  (eval $ac_try) 2>&5
11144  ac_status=$?
11145  echo "$as_me:11145: \$? = $ac_status" >&5
11146  (exit $ac_status); }; }; then
11147  am_cv_langinfo_codeset=yes
11148else
11149  echo "$as_me: failed program was:" >&5
11150cat conftest.$ac_ext >&5
11151am_cv_langinfo_codeset=no
11152fi
11153rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11154
11155fi
11156echo "$as_me:11156: result: $am_cv_langinfo_codeset" >&5
11157echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11158	if test $am_cv_langinfo_codeset = yes; then
11159
11160cat >>confdefs.h <<\EOF
11161#define HAVE_LANGINFO_CODESET 1
11162EOF
11163
11164	fi
11165
11166# use these variables to work around a defect in gcc's fixincludes.
11167NCURSES_OK_WCHAR_T=
11168NCURSES_OK_WINT_T=
11169
11170echo "$as_me:11170: checking if you want wide-character code" >&5
11171echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11172
11173# Check whether --enable-widec or --disable-widec was given.
11174if test "${enable_widec+set}" = set; then
11175  enableval="$enable_widec"
11176  with_widec=$enableval
11177else
11178  with_widec=no
11179fi;
11180echo "$as_me:11180: result: $with_widec" >&5
11181echo "${ECHO_T}$with_widec" >&6
11182
11183NCURSES_WCWIDTH_GRAPHICS=1
11184
11185if test "x$with_widec" = xyes ; then
11186	if test "x$disable_lib_suffixes" = xno ; then
11187		LIB_SUFFIX="w${LIB_SUFFIX}"
11188	fi
11189
11190cat >>confdefs.h <<\EOF
11191#define USE_WIDEC_SUPPORT 1
11192EOF
11193
11194cat >>confdefs.h <<\EOF
11195#define NCURSES_WIDECHAR 1
11196EOF
11197
11198for ac_header in \
11199wchar.h \
11200wctype.h \
11201
11202do
11203as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11204echo "$as_me:11204: checking for $ac_header" >&5
11205echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11206if eval "test \"\${$as_ac_Header+set}\" = set"; then
11207  echo $ECHO_N "(cached) $ECHO_C" >&6
11208else
11209  cat >conftest.$ac_ext <<_ACEOF
11210#line 11210 "configure"
11211#include "confdefs.h"
11212#include <$ac_header>
11213_ACEOF
11214if { (eval echo "$as_me:11214: \"$ac_cpp conftest.$ac_ext\"") >&5
11215  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11216  ac_status=$?
11217  egrep -v '^ *\+' conftest.er1 >conftest.err
11218  rm -f conftest.er1
11219  cat conftest.err >&5
11220  echo "$as_me:11220: \$? = $ac_status" >&5
11221  (exit $ac_status); } >/dev/null; then
11222  if test -s conftest.err; then
11223    ac_cpp_err=$ac_c_preproc_warn_flag
11224  else
11225    ac_cpp_err=
11226  fi
11227else
11228  ac_cpp_err=yes
11229fi
11230if test -z "$ac_cpp_err"; then
11231  eval "$as_ac_Header=yes"
11232else
11233  echo "$as_me: failed program was:" >&5
11234  cat conftest.$ac_ext >&5
11235  eval "$as_ac_Header=no"
11236fi
11237rm -f conftest.err conftest.$ac_ext
11238fi
11239echo "$as_me:11239: result: `eval echo '${'$as_ac_Header'}'`" >&5
11240echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11241if test `eval echo '${'$as_ac_Header'}'` = yes; then
11242  cat >>confdefs.h <<EOF
11243#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11244EOF
11245
11246fi
11247done
11248
11249echo "$as_me:11249: checking if wchar.h can be used as is" >&5
11250echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11251if test "${cf_cv_wchar_h_okay+set}" = set; then
11252  echo $ECHO_N "(cached) $ECHO_C" >&6
11253else
11254
11255cat >conftest.$ac_ext <<_ACEOF
11256#line 11256 "configure"
11257#include "confdefs.h"
11258
11259#include <stdlib.h>
11260#ifdef HAVE_WCHAR_H
11261#include <wchar.h>
11262#endif
11263#ifdef HAVE_WCTYPE_H
11264#include <wctype.h>
11265#endif
11266
11267int
11268main (void)
11269{
11270
11271	wint_t foo = 0;
11272	int bar = iswpunct(foo)
11273  ;
11274  return 0;
11275}
11276_ACEOF
11277rm -f conftest.$ac_objext
11278if { (eval echo "$as_me:11278: \"$ac_compile\"") >&5
11279  (eval $ac_compile) 2>&5
11280  ac_status=$?
11281  echo "$as_me:11281: \$? = $ac_status" >&5
11282  (exit $ac_status); } &&
11283         { ac_try='test -s conftest.$ac_objext'
11284  { (eval echo "$as_me:11284: \"$ac_try\"") >&5
11285  (eval $ac_try) 2>&5
11286  ac_status=$?
11287  echo "$as_me:11287: \$? = $ac_status" >&5
11288  (exit $ac_status); }; }; then
11289  cf_cv_wchar_h_okay=yes
11290else
11291  echo "$as_me: failed program was:" >&5
11292cat conftest.$ac_ext >&5
11293cf_cv_wchar_h_okay=no
11294fi
11295rm -f conftest.$ac_objext conftest.$ac_ext
11296fi
11297echo "$as_me:11297: result: $cf_cv_wchar_h_okay" >&5
11298echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11299
11300if test $cf_cv_wchar_h_okay = no
11301then
11302
11303echo "$as_me:11303: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11304echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11305cat >conftest.$ac_ext <<_ACEOF
11306#line 11306 "configure"
11307#include "confdefs.h"
11308#include <sys/types.h>
11309
11310int
11311main (void)
11312{
11313
11314#ifndef _XOPEN_SOURCE_EXTENDED
11315make an error
11316#endif
11317  ;
11318  return 0;
11319}
11320_ACEOF
11321rm -f conftest.$ac_objext
11322if { (eval echo "$as_me:11322: \"$ac_compile\"") >&5
11323  (eval $ac_compile) 2>&5
11324  ac_status=$?
11325  echo "$as_me:11325: \$? = $ac_status" >&5
11326  (exit $ac_status); } &&
11327         { ac_try='test -s conftest.$ac_objext'
11328  { (eval echo "$as_me:11328: \"$ac_try\"") >&5
11329  (eval $ac_try) 2>&5
11330  ac_status=$?
11331  echo "$as_me:11331: \$? = $ac_status" >&5
11332  (exit $ac_status); }; }; then
11333  cf_result=no
11334else
11335  echo "$as_me: failed program was:" >&5
11336cat conftest.$ac_ext >&5
11337cf_result=yes
11338fi
11339rm -f conftest.$ac_objext conftest.$ac_ext
11340echo "$as_me:11340: result: $cf_result" >&5
11341echo "${ECHO_T}$cf_result" >&6
11342
11343if test "$cf_result" = yes ; then
11344	CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11345elif test "x" != "x" ; then
11346	echo "$as_me:11346: checking checking for compatible value versus " >&5
11347echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11348	cat >conftest.$ac_ext <<_ACEOF
11349#line 11349 "configure"
11350#include "confdefs.h"
11351#include <sys/types.h>
11352
11353int
11354main (void)
11355{
11356
11357#if _XOPEN_SOURCE_EXTENDED- < 0
11358make an error
11359#endif
11360  ;
11361  return 0;
11362}
11363_ACEOF
11364rm -f conftest.$ac_objext
11365if { (eval echo "$as_me:11365: \"$ac_compile\"") >&5
11366  (eval $ac_compile) 2>&5
11367  ac_status=$?
11368  echo "$as_me:11368: \$? = $ac_status" >&5
11369  (exit $ac_status); } &&
11370         { ac_try='test -s conftest.$ac_objext'
11371  { (eval echo "$as_me:11371: \"$ac_try\"") >&5
11372  (eval $ac_try) 2>&5
11373  ac_status=$?
11374  echo "$as_me:11374: \$? = $ac_status" >&5
11375  (exit $ac_status); }; }; then
11376  cf_result=yes
11377else
11378  echo "$as_me: failed program was:" >&5
11379cat conftest.$ac_ext >&5
11380cf_result=no
11381fi
11382rm -f conftest.$ac_objext conftest.$ac_ext
11383	echo "$as_me:11383: result: $cf_result" >&5
11384echo "${ECHO_T}$cf_result" >&6
11385	if test "$cf_result" = no ; then
11386		# perhaps we can override it - try...
11387		CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11388	fi
11389fi
11390
11391fi
11392
11393echo "$as_me:11393: checking if wcwidth agrees graphics are single-width" >&5
11394echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11395if test "${cf_cv_wcwidth_graphics+set}" = set; then
11396  echo $ECHO_N "(cached) $ECHO_C" >&6
11397else
11398
11399cat >conftest.in <<CF_EOF
11400-	VT100 symbols
114010x250c	upper left corner
114020x2514	lower left corner
114030x2510	upper right corner
114040x2518	lower right corner
114050x251c	tee pointing left
114060x2524	tee pointing right
114070x2534	tee pointing up
114080x252c	tee pointing down
114090x2500	horizontal line
114100x2502	vertical line
114110x253c	large plus or crossover
114120x23ba	scan line 1
114130x23bd	scan line 9
114140x25c6	diamond
114150x2592	checker board (stipple)
114160x00b0	degree symbol
114170x00b1	plus/minus
114180x00b7	bullet
11419-	Teletype 5410v1 symbols
114200x2190	arrow pointing left
114210x2192	arrow pointing right
114220x2193	arrow pointing down
114230x2191	arrow pointing up
114240x2592	board of squares
114250x2603	lantern symbol
114260x25ae	solid square block
11427-	these defaults were invented for ncurses
114280x23bb	scan line 3
114290x23bc	scan line 7
114300x2264	less-than-or-equal-to
114310x2265	greater-than-or-equal-to
114320x03c0	greek pi
114330x2260	not-equal
114340x00a3	pound-sterling symbol
11435-	thick-line-drawing
114360x250f	upper left corner
114370x2517	lower left corner
114380x2513	upper right corner
114390x251b	lower right corner
114400x2523	tee pointing left
114410x252b	tee pointing right
114420x253b	tee pointing up
114430x2533	tee pointing down
114440x2501	horizontal line
114450x2503	vertical line
114460x254b	large plus or crossover
11447-	double-line-drawing
114480x2554	upper left corner
114490x255a	lower left corner
114500x2557	upper right corner
114510x255d	lower right corner
114520x2563	tee pointing left
114530x2560	tee pointing right
114540x2569	tee pointing up
114550x2566	tee pointing down
114560x2550	horizontal line
114570x2551	vertical line
114580x256c	large plus or crossover
11459CF_EOF
11460if test "$cross_compiling" = yes; then
11461  cf_cv_wcwidth_graphics=unknown
11462else
11463  cat >conftest.$ac_ext <<_ACEOF
11464#line 11464 "configure"
11465#include "confdefs.h"
11466
11467#include <locale.h>
11468#include <stdio.h>
11469#include <wchar.h>
11470
11471#define MY_LEN 80
11472
11473int
11474main(void)
11475{
11476	FILE *fp;
11477	int value;
11478	char buffer[MY_LEN + 1];
11479	char notes[MY_LEN + 1];
11480	int totals = 0;
11481	int passed = 0;
11482
11483	if (setlocale(LC_ALL, "en_US.UTF8") ||
11484		setlocale(LC_ALL, "en_US.UTF-8") ||
11485		setlocale(LC_ALL, "en_US.utf8") ||
11486		setlocale(LC_ALL, "en_US.utf-8")) {
11487		if ((fp = fopen("conftest.in", "r")) != 0) {
11488			while (fgets(buffer, MY_LEN, fp) != 0) {
11489				if (*buffer == '-') {
11490					fprintf(stderr, "\t%s", buffer);
11491				} else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11492					++totals;
11493					if (wcwidth(value) == 1)
11494						++passed;
11495					fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11496				} else {
11497					fprintf(stderr, "?\t%s", buffer);
11498				}
11499			}
11500		}
11501	}
11502	fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11503	return (totals == passed) ? 0 : 1;
11504}
11505
11506_ACEOF
11507rm -f conftest$ac_exeext
11508if { (eval echo "$as_me:11508: \"$ac_link\"") >&5
11509  (eval $ac_link) 2>&5
11510  ac_status=$?
11511  echo "$as_me:11511: \$? = $ac_status" >&5
11512  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11513  { (eval echo "$as_me:11513: \"$ac_try\"") >&5
11514  (eval $ac_try) 2>&5
11515  ac_status=$?
11516  echo "$as_me:11516: \$? = $ac_status" >&5
11517  (exit $ac_status); }; }; then
11518  cf_cv_wcwidth_graphics=yes
11519else
11520  echo "$as_me: program exited with status $ac_status" >&5
11521echo "$as_me: failed program was:" >&5
11522cat conftest.$ac_ext >&5
11523cf_cv_wcwidth_graphics=no
11524fi
11525rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11526fi
11527
11528fi
11529echo "$as_me:11529: result: $cf_cv_wcwidth_graphics" >&5
11530echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11531
11532	test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11533
11534	# with_overwrite=no
11535	NCURSES_CH_T=cchar_t
11536
11537for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11538do
11539as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11540echo "$as_me:11540: checking for $ac_func" >&5
11541echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11542if eval "test \"\${$as_ac_var+set}\" = set"; then
11543  echo $ECHO_N "(cached) $ECHO_C" >&6
11544else
11545  cat >conftest.$ac_ext <<_ACEOF
11546#line 11546 "configure"
11547#include "confdefs.h"
11548#define $ac_func autoconf_temporary
11549#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
11550#undef $ac_func
11551
11552#ifdef __cplusplus
11553extern "C"
11554#endif
11555
11556/* We use char because int might match the return type of a gcc2
11557   builtin and then its argument prototype would still apply.  */
11558char $ac_func (void);
11559
11560int
11561main (void)
11562{
11563
11564/* The GNU C library defines stubs for functions which it implements
11565    to always fail with ENOSYS.  Some functions are actually named
11566    something starting with __ and the normal name is an alias.  */
11567#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11568#error found stub for $ac_func
11569#endif
11570
11571	return $ac_func ();
11572  ;
11573  return 0;
11574}
11575_ACEOF
11576rm -f conftest.$ac_objext conftest$ac_exeext
11577if { (eval echo "$as_me:11577: \"$ac_link\"") >&5
11578  (eval $ac_link) 2>&5
11579  ac_status=$?
11580  echo "$as_me:11580: \$? = $ac_status" >&5
11581  (exit $ac_status); } &&
11582         { ac_try='test -s conftest$ac_exeext'
11583  { (eval echo "$as_me:11583: \"$ac_try\"") >&5
11584  (eval $ac_try) 2>&5
11585  ac_status=$?
11586  echo "$as_me:11586: \$? = $ac_status" >&5
11587  (exit $ac_status); }; }; then
11588  eval "$as_ac_var=yes"
11589else
11590  echo "$as_me: failed program was:" >&5
11591cat conftest.$ac_ext >&5
11592eval "$as_ac_var=no"
11593fi
11594rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11595fi
11596echo "$as_me:11596: result: `eval echo '${'$as_ac_var'}'`" >&5
11597echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11598if test `eval echo '${'$as_ac_var'}'` = yes; then
11599  cat >>confdefs.h <<EOF
11600#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11601EOF
11602
11603fi
11604done
11605
11606	if test "x$ac_cv_func_putwc" != xyes ; then
11607
11608echo "$as_me:11608: checking for multibyte character support" >&5
11609echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11610if test "${cf_cv_utf8_lib+set}" = set; then
11611  echo $ECHO_N "(cached) $ECHO_C" >&6
11612else
11613
11614	cf_save_LIBS="$LIBS"
11615	cat >conftest.$ac_ext <<_ACEOF
11616#line 11616 "configure"
11617#include "confdefs.h"
11618
11619#include <stdlib.h>
11620int
11621main (void)
11622{
11623putwc(0,0);
11624  ;
11625  return 0;
11626}
11627_ACEOF
11628rm -f conftest.$ac_objext conftest$ac_exeext
11629if { (eval echo "$as_me:11629: \"$ac_link\"") >&5
11630  (eval $ac_link) 2>&5
11631  ac_status=$?
11632  echo "$as_me:11632: \$? = $ac_status" >&5
11633  (exit $ac_status); } &&
11634         { ac_try='test -s conftest$ac_exeext'
11635  { (eval echo "$as_me:11635: \"$ac_try\"") >&5
11636  (eval $ac_try) 2>&5
11637  ac_status=$?
11638  echo "$as_me:11638: \$? = $ac_status" >&5
11639  (exit $ac_status); }; }; then
11640  cf_cv_utf8_lib=yes
11641else
11642  echo "$as_me: failed program was:" >&5
11643cat conftest.$ac_ext >&5
11644
11645# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11646# will be set on completion of the AC_TRY_LINK below.
11647cf_cv_header_path_utf8=
11648cf_cv_library_path_utf8=
11649
11650echo "${as_me:-configure}:11650: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11651
11652cf_save_LIBS="$LIBS"
11653
11654cat >conftest.$ac_ext <<_ACEOF
11655#line 11655 "configure"
11656#include "confdefs.h"
11657
11658#include <libutf8.h>
11659int
11660main (void)
11661{
11662putwc(0,0);
11663  ;
11664  return 0;
11665}
11666_ACEOF
11667rm -f conftest.$ac_objext conftest$ac_exeext
11668if { (eval echo "$as_me:11668: \"$ac_link\"") >&5
11669  (eval $ac_link) 2>&5
11670  ac_status=$?
11671  echo "$as_me:11671: \$? = $ac_status" >&5
11672  (exit $ac_status); } &&
11673         { ac_try='test -s conftest$ac_exeext'
11674  { (eval echo "$as_me:11674: \"$ac_try\"") >&5
11675  (eval $ac_try) 2>&5
11676  ac_status=$?
11677  echo "$as_me:11677: \$? = $ac_status" >&5
11678  (exit $ac_status); }; }; then
11679
11680	cf_cv_find_linkage_utf8=yes
11681	cf_cv_header_path_utf8=/usr/include
11682	cf_cv_library_path_utf8=/usr/lib
11683
11684else
11685  echo "$as_me: failed program was:" >&5
11686cat conftest.$ac_ext >&5
11687
11688LIBS="-lutf8  $cf_save_LIBS"
11689
11690cat >conftest.$ac_ext <<_ACEOF
11691#line 11691 "configure"
11692#include "confdefs.h"
11693
11694#include <libutf8.h>
11695int
11696main (void)
11697{
11698putwc(0,0);
11699  ;
11700  return 0;
11701}
11702_ACEOF
11703rm -f conftest.$ac_objext conftest$ac_exeext
11704if { (eval echo "$as_me:11704: \"$ac_link\"") >&5
11705  (eval $ac_link) 2>&5
11706  ac_status=$?
11707  echo "$as_me:11707: \$? = $ac_status" >&5
11708  (exit $ac_status); } &&
11709         { ac_try='test -s conftest$ac_exeext'
11710  { (eval echo "$as_me:11710: \"$ac_try\"") >&5
11711  (eval $ac_try) 2>&5
11712  ac_status=$?
11713  echo "$as_me:11713: \$? = $ac_status" >&5
11714  (exit $ac_status); }; }; then
11715
11716	cf_cv_find_linkage_utf8=yes
11717	cf_cv_header_path_utf8=/usr/include
11718	cf_cv_library_path_utf8=/usr/lib
11719	cf_cv_library_file_utf8="-lutf8"
11720
11721else
11722  echo "$as_me: failed program was:" >&5
11723cat conftest.$ac_ext >&5
11724
11725	cf_cv_find_linkage_utf8=no
11726	LIBS="$cf_save_LIBS"
11727
11728	test -n "$verbose" && echo "	find linkage for utf8 library" 1>&6
11729
11730echo "${as_me:-configure}:11730: testing find linkage for utf8 library ..." 1>&5
11731
11732echo "${as_me:-configure}:11732: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11733
11734	cf_save_CPPFLAGS="$CPPFLAGS"
11735	cf_test_CPPFLAGS="$CPPFLAGS"
11736
11737cf_search=
11738
11739# collect the current set of include-directories from compiler flags
11740cf_header_path_list=""
11741if test -n "${CFLAGS}${CPPFLAGS}" ; then
11742	for cf_header_path in $CPPFLAGS $CFLAGS
11743	do
11744		case $cf_header_path in
11745		(-I*)
11746			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11747
11748test "x$cf_header_path" != "xNONE" && \
11749test -d "$cf_header_path" && \
11750 {
11751	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
11752	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11753	test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11754	test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11755	test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11756	test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11757}
11758
11759			cf_header_path_list="$cf_header_path_list $cf_search"
11760			;;
11761		esac
11762	done
11763fi
11764
11765# add the variations for the package we are looking for
11766
11767cf_search=
11768
11769test "x$prefix" != "xNONE" && \
11770test -d "$prefix" && \
11771 {
11772	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
11773	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11774	test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11775	test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11776	test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11777	test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11778}
11779
11780for cf_subdir_prefix in \
11781	/usr \
11782	/usr/local \
11783	/usr/pkg \
11784	/opt \
11785	/opt/local \
11786	$HOME
11787do
11788
11789test "x$cf_subdir_prefix" != "x$prefix" && \
11790test -d "$cf_subdir_prefix" && \
11791(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11792	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
11793	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11794	test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11795	test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11796	test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11797	test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11798}
11799
11800done
11801
11802test "$includedir" != NONE && \
11803test "$includedir" != "/usr/include" && \
11804test -d "$includedir" && {
11805	test -d $includedir &&    cf_search="$cf_search $includedir"
11806	test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11807}
11808
11809test "$oldincludedir" != NONE && \
11810test "$oldincludedir" != "/usr/include" && \
11811test -d "$oldincludedir" && {
11812	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11813	test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11814}
11815
11816cf_search="$cf_search $cf_header_path_list"
11817
11818	for cf_cv_header_path_utf8 in $cf_search
11819	do
11820		if test -d $cf_cv_header_path_utf8 ; then
11821			test -n "$verbose" && echo "	... testing $cf_cv_header_path_utf8" 1>&6
11822
11823echo "${as_me:-configure}:11823: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11824
11825			CPPFLAGS="$cf_save_CPPFLAGS"
11826
11827	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11828	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11829
11830			cat >conftest.$ac_ext <<_ACEOF
11831#line 11831 "configure"
11832#include "confdefs.h"
11833
11834#include <libutf8.h>
11835int
11836main (void)
11837{
11838putwc(0,0);
11839  ;
11840  return 0;
11841}
11842_ACEOF
11843rm -f conftest.$ac_objext
11844if { (eval echo "$as_me:11844: \"$ac_compile\"") >&5
11845  (eval $ac_compile) 2>&5
11846  ac_status=$?
11847  echo "$as_me:11847: \$? = $ac_status" >&5
11848  (exit $ac_status); } &&
11849         { ac_try='test -s conftest.$ac_objext'
11850  { (eval echo "$as_me:11850: \"$ac_try\"") >&5
11851  (eval $ac_try) 2>&5
11852  ac_status=$?
11853  echo "$as_me:11853: \$? = $ac_status" >&5
11854  (exit $ac_status); }; }; then
11855
11856				test -n "$verbose" && echo "	... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
11857
11858echo "${as_me:-configure}:11858: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11859
11860				cf_cv_find_linkage_utf8=maybe
11861				cf_test_CPPFLAGS="$CPPFLAGS"
11862				break
11863else
11864  echo "$as_me: failed program was:" >&5
11865cat conftest.$ac_ext >&5
11866
11867				CPPFLAGS="$cf_save_CPPFLAGS"
11868
11869fi
11870rm -f conftest.$ac_objext conftest.$ac_ext
11871		fi
11872	done
11873
11874	if test "$cf_cv_find_linkage_utf8" = maybe ; then
11875
11876echo "${as_me:-configure}:11876: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
11877
11878		cf_save_LIBS="$LIBS"
11879		cf_save_LDFLAGS="$LDFLAGS"
11880
11881		if test "$cf_cv_find_linkage_utf8" != yes ; then
11882
11883cf_search=
11884cf_library_path_list=""
11885if test -n "${LDFLAGS}${LIBS}" ; then
11886	for cf_library_path in $LDFLAGS $LIBS
11887	do
11888		case $cf_library_path in
11889		(-L*)
11890			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11891
11892test "x$cf_library_path" != "xNONE" && \
11893test -d "$cf_library_path" && \
11894 {
11895	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
11896	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11897	test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
11898	test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
11899	test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
11900	test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
11901}
11902
11903			cf_library_path_list="$cf_library_path_list $cf_search"
11904			;;
11905		esac
11906	done
11907fi
11908
11909cf_search=
11910
11911test "x$prefix" != "xNONE" && \
11912test -d "$prefix" && \
11913 {
11914	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
11915	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11916	test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
11917	test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
11918	test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
11919	test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
11920}
11921
11922for cf_subdir_prefix in \
11923	/usr \
11924	/usr/local \
11925	/usr/pkg \
11926	/opt \
11927	/opt/local \
11928	$HOME
11929do
11930
11931test "x$cf_subdir_prefix" != "x$prefix" && \
11932test -d "$cf_subdir_prefix" && \
11933(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11934	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
11935	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
11936	test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
11937	test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
11938	test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
11939	test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
11940}
11941
11942done
11943
11944cf_search="$cf_library_path_list $cf_search"
11945
11946			for cf_cv_library_path_utf8 in $cf_search
11947			do
11948				if test -d $cf_cv_library_path_utf8 ; then
11949					test -n "$verbose" && echo "	... testing $cf_cv_library_path_utf8" 1>&6
11950
11951echo "${as_me:-configure}:11951: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
11952
11953					CPPFLAGS="$cf_test_CPPFLAGS"
11954					LIBS="-lutf8  $cf_save_LIBS"
11955					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
11956					cat >conftest.$ac_ext <<_ACEOF
11957#line 11957 "configure"
11958#include "confdefs.h"
11959
11960#include <libutf8.h>
11961int
11962main (void)
11963{
11964putwc(0,0);
11965  ;
11966  return 0;
11967}
11968_ACEOF
11969rm -f conftest.$ac_objext conftest$ac_exeext
11970if { (eval echo "$as_me:11970: \"$ac_link\"") >&5
11971  (eval $ac_link) 2>&5
11972  ac_status=$?
11973  echo "$as_me:11973: \$? = $ac_status" >&5
11974  (exit $ac_status); } &&
11975         { ac_try='test -s conftest$ac_exeext'
11976  { (eval echo "$as_me:11976: \"$ac_try\"") >&5
11977  (eval $ac_try) 2>&5
11978  ac_status=$?
11979  echo "$as_me:11979: \$? = $ac_status" >&5
11980  (exit $ac_status); }; }; then
11981
11982					test -n "$verbose" && echo "	... found utf8 library in $cf_cv_library_path_utf8" 1>&6
11983
11984echo "${as_me:-configure}:11984: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
11985
11986					cf_cv_find_linkage_utf8=yes
11987					cf_cv_library_file_utf8="-lutf8"
11988					break
11989else
11990  echo "$as_me: failed program was:" >&5
11991cat conftest.$ac_ext >&5
11992
11993					CPPFLAGS="$cf_save_CPPFLAGS"
11994					LIBS="$cf_save_LIBS"
11995					LDFLAGS="$cf_save_LDFLAGS"
11996
11997fi
11998rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11999				fi
12000			done
12001			CPPFLAGS="$cf_save_CPPFLAGS"
12002			LDFLAGS="$cf_save_LDFLAGS"
12003		fi
12004
12005	else
12006		cf_cv_find_linkage_utf8=no
12007	fi
12008
12009fi
12010rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12011
12012fi
12013rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12014
12015LIBS="$cf_save_LIBS"
12016
12017if test "$cf_cv_find_linkage_utf8" = yes ; then
12018cf_cv_utf8_lib=add-on
12019else
12020cf_cv_utf8_lib=no
12021fi
12022
12023fi
12024rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12025fi
12026echo "$as_me:12026: result: $cf_cv_utf8_lib" >&5
12027echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12028
12029# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12030# ncurses/ncursesw:
12031if test "$cf_cv_utf8_lib" = "add-on" ; then
12032
12033cat >>confdefs.h <<\EOF
12034#define HAVE_LIBUTF8_H 1
12035EOF
12036
12037if test -n "$cf_cv_header_path_utf8" ; then
12038  for cf_add_incdir in $cf_cv_header_path_utf8
12039  do
12040	while test $cf_add_incdir != /usr/include
12041	do
12042	  if test -d $cf_add_incdir
12043	  then
12044		cf_have_incdir=no
12045		if test -n "$CFLAGS$CPPFLAGS" ; then
12046		  # a loop is needed to ensure we can add subdirs of existing dirs
12047		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12048			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12049			  cf_have_incdir=yes; break
12050			fi
12051		  done
12052		fi
12053
12054		if test "$cf_have_incdir" = no ; then
12055		  if test "$cf_add_incdir" = /usr/local/include ; then
12056			if test "$GCC" = yes
12057			then
12058			  cf_save_CPPFLAGS=$CPPFLAGS
12059
12060	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12061	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12062
12063			  cat >conftest.$ac_ext <<_ACEOF
12064#line 12064 "configure"
12065#include "confdefs.h"
12066#include <stdio.h>
12067int
12068main (void)
12069{
12070printf("Hello")
12071  ;
12072  return 0;
12073}
12074_ACEOF
12075rm -f conftest.$ac_objext
12076if { (eval echo "$as_me:12076: \"$ac_compile\"") >&5
12077  (eval $ac_compile) 2>&5
12078  ac_status=$?
12079  echo "$as_me:12079: \$? = $ac_status" >&5
12080  (exit $ac_status); } &&
12081         { ac_try='test -s conftest.$ac_objext'
12082  { (eval echo "$as_me:12082: \"$ac_try\"") >&5
12083  (eval $ac_try) 2>&5
12084  ac_status=$?
12085  echo "$as_me:12085: \$? = $ac_status" >&5
12086  (exit $ac_status); }; }; then
12087  :
12088else
12089  echo "$as_me: failed program was:" >&5
12090cat conftest.$ac_ext >&5
12091cf_have_incdir=yes
12092fi
12093rm -f conftest.$ac_objext conftest.$ac_ext
12094			  CPPFLAGS=$cf_save_CPPFLAGS
12095			fi
12096		  fi
12097		fi
12098
12099		if test "$cf_have_incdir" = no ; then
12100		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
12101
12102echo "${as_me:-configure}:12102: testing adding $cf_add_incdir to include-path ..." 1>&5
12103
12104		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12105
12106		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12107		  test "$cf_top_incdir" = "$cf_add_incdir" && break
12108		  cf_add_incdir="$cf_top_incdir"
12109		else
12110		  break
12111		fi
12112	  else
12113		break
12114	  fi
12115	done
12116  done
12117fi
12118
12119if test -n "$cf_cv_library_path_utf8" ; then
12120	for cf_add_libdir in $cf_cv_library_path_utf8
12121	do
12122		if test $cf_add_libdir = /usr/lib ; then
12123			:
12124		elif test -d $cf_add_libdir
12125		then
12126			cf_have_libdir=no
12127			if test -n "$LDFLAGS$LIBS" ; then
12128				# a loop is needed to ensure we can add subdirs of existing dirs
12129				for cf_test_libdir in $LDFLAGS $LIBS ; do
12130					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12131						cf_have_libdir=yes; break
12132					fi
12133				done
12134			fi
12135			if test "$cf_have_libdir" = no ; then
12136				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
12137
12138echo "${as_me:-configure}:12138: testing adding $cf_add_libdir to library-path ..." 1>&5
12139
12140				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12141			fi
12142		fi
12143	done
12144fi
12145
12146cf_add_libs="$LIBS"
12147# reverse order
12148cf_add_0lib=
12149for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12150# filter duplicates
12151for cf_add_1lib in $cf_add_0lib; do
12152	for cf_add_2lib in $cf_add_libs; do
12153		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12154			cf_add_1lib=
12155			break
12156		fi
12157	done
12158	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12159done
12160LIBS="$cf_add_libs"
12161
12162fi
12163
12164		if test "$cf_cv_utf8_lib" != no ; then
12165			NCURSES_LIBUTF8=1
12166		fi
12167	fi
12168
12169# This is needed on Tru64 5.0 to declare mbstate_t
12170echo "$as_me:12170: checking if we must include wchar.h to declare mbstate_t" >&5
12171echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12172if test "${cf_cv_mbstate_t+set}" = set; then
12173  echo $ECHO_N "(cached) $ECHO_C" >&6
12174else
12175
12176cat >conftest.$ac_ext <<_ACEOF
12177#line 12177 "configure"
12178#include "confdefs.h"
12179
12180#include <stdlib.h>
12181#include <stdarg.h>
12182#include <stdio.h>
12183#ifdef HAVE_LIBUTF8_H
12184#include <libutf8.h>
12185#endif
12186int
12187main (void)
12188{
12189mbstate_t state
12190  ;
12191  return 0;
12192}
12193_ACEOF
12194rm -f conftest.$ac_objext
12195if { (eval echo "$as_me:12195: \"$ac_compile\"") >&5
12196  (eval $ac_compile) 2>&5
12197  ac_status=$?
12198  echo "$as_me:12198: \$? = $ac_status" >&5
12199  (exit $ac_status); } &&
12200         { ac_try='test -s conftest.$ac_objext'
12201  { (eval echo "$as_me:12201: \"$ac_try\"") >&5
12202  (eval $ac_try) 2>&5
12203  ac_status=$?
12204  echo "$as_me:12204: \$? = $ac_status" >&5
12205  (exit $ac_status); }; }; then
12206  cf_cv_mbstate_t=no
12207else
12208  echo "$as_me: failed program was:" >&5
12209cat conftest.$ac_ext >&5
12210cat >conftest.$ac_ext <<_ACEOF
12211#line 12211 "configure"
12212#include "confdefs.h"
12213
12214#include <stdlib.h>
12215#include <stdarg.h>
12216#include <stdio.h>
12217#include <wchar.h>
12218#ifdef HAVE_LIBUTF8_H
12219#include <libutf8.h>
12220#endif
12221int
12222main (void)
12223{
12224mbstate_t value
12225  ;
12226  return 0;
12227}
12228_ACEOF
12229rm -f conftest.$ac_objext
12230if { (eval echo "$as_me:12230: \"$ac_compile\"") >&5
12231  (eval $ac_compile) 2>&5
12232  ac_status=$?
12233  echo "$as_me:12233: \$? = $ac_status" >&5
12234  (exit $ac_status); } &&
12235         { ac_try='test -s conftest.$ac_objext'
12236  { (eval echo "$as_me:12236: \"$ac_try\"") >&5
12237  (eval $ac_try) 2>&5
12238  ac_status=$?
12239  echo "$as_me:12239: \$? = $ac_status" >&5
12240  (exit $ac_status); }; }; then
12241  cf_cv_mbstate_t=yes
12242else
12243  echo "$as_me: failed program was:" >&5
12244cat conftest.$ac_ext >&5
12245cf_cv_mbstate_t=unknown
12246fi
12247rm -f conftest.$ac_objext conftest.$ac_ext
12248fi
12249rm -f conftest.$ac_objext conftest.$ac_ext
12250fi
12251echo "$as_me:12251: result: $cf_cv_mbstate_t" >&5
12252echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12253
12254if test "$cf_cv_mbstate_t" = yes ; then
12255
12256cat >>confdefs.h <<\EOF
12257#define NEED_WCHAR_H 1
12258EOF
12259
12260	NEED_WCHAR_H=1
12261fi
12262
12263# if we do not find mbstate_t in either place, use substitution to provide a fallback.
12264if test "$cf_cv_mbstate_t" = unknown ; then
12265	NCURSES_MBSTATE_T=1
12266fi
12267
12268# This is needed on Tru64 5.0 to declare wchar_t
12269echo "$as_me:12269: checking if we must include wchar.h to declare wchar_t" >&5
12270echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12271if test "${cf_cv_wchar_t+set}" = set; then
12272  echo $ECHO_N "(cached) $ECHO_C" >&6
12273else
12274
12275cat >conftest.$ac_ext <<_ACEOF
12276#line 12276 "configure"
12277#include "confdefs.h"
12278
12279#include <stdlib.h>
12280#include <stdarg.h>
12281#include <stdio.h>
12282#ifdef HAVE_LIBUTF8_H
12283#include <libutf8.h>
12284#endif
12285int
12286main (void)
12287{
12288wchar_t state
12289  ;
12290  return 0;
12291}
12292_ACEOF
12293rm -f conftest.$ac_objext
12294if { (eval echo "$as_me:12294: \"$ac_compile\"") >&5
12295  (eval $ac_compile) 2>&5
12296  ac_status=$?
12297  echo "$as_me:12297: \$? = $ac_status" >&5
12298  (exit $ac_status); } &&
12299         { ac_try='test -s conftest.$ac_objext'
12300  { (eval echo "$as_me:12300: \"$ac_try\"") >&5
12301  (eval $ac_try) 2>&5
12302  ac_status=$?
12303  echo "$as_me:12303: \$? = $ac_status" >&5
12304  (exit $ac_status); }; }; then
12305  cf_cv_wchar_t=no
12306else
12307  echo "$as_me: failed program was:" >&5
12308cat conftest.$ac_ext >&5
12309cat >conftest.$ac_ext <<_ACEOF
12310#line 12310 "configure"
12311#include "confdefs.h"
12312
12313#include <stdlib.h>
12314#include <stdarg.h>
12315#include <stdio.h>
12316#include <wchar.h>
12317#ifdef HAVE_LIBUTF8_H
12318#include <libutf8.h>
12319#endif
12320int
12321main (void)
12322{
12323wchar_t value
12324  ;
12325  return 0;
12326}
12327_ACEOF
12328rm -f conftest.$ac_objext
12329if { (eval echo "$as_me:12329: \"$ac_compile\"") >&5
12330  (eval $ac_compile) 2>&5
12331  ac_status=$?
12332  echo "$as_me:12332: \$? = $ac_status" >&5
12333  (exit $ac_status); } &&
12334         { ac_try='test -s conftest.$ac_objext'
12335  { (eval echo "$as_me:12335: \"$ac_try\"") >&5
12336  (eval $ac_try) 2>&5
12337  ac_status=$?
12338  echo "$as_me:12338: \$? = $ac_status" >&5
12339  (exit $ac_status); }; }; then
12340  cf_cv_wchar_t=yes
12341else
12342  echo "$as_me: failed program was:" >&5
12343cat conftest.$ac_ext >&5
12344cf_cv_wchar_t=unknown
12345fi
12346rm -f conftest.$ac_objext conftest.$ac_ext
12347fi
12348rm -f conftest.$ac_objext conftest.$ac_ext
12349fi
12350echo "$as_me:12350: result: $cf_cv_wchar_t" >&5
12351echo "${ECHO_T}$cf_cv_wchar_t" >&6
12352
12353if test "$cf_cv_wchar_t" = yes ; then
12354
12355cat >>confdefs.h <<\EOF
12356#define NEED_WCHAR_H 1
12357EOF
12358
12359	NEED_WCHAR_H=1
12360fi
12361
12362# if we do not find wchar_t in either place, use substitution to provide a fallback.
12363if test "$cf_cv_wchar_t" = unknown ; then
12364	NCURSES_WCHAR_T=1
12365fi
12366
12367# if we find wchar_t in either place, use substitution to provide a fallback.
12368if test "$cf_cv_wchar_t" != unknown ; then
12369	NCURSES_OK_WCHAR_T=1
12370fi
12371
12372# This is needed on Tru64 5.0 to declare wint_t
12373echo "$as_me:12373: checking if we must include wchar.h to declare wint_t" >&5
12374echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12375if test "${cf_cv_wint_t+set}" = set; then
12376  echo $ECHO_N "(cached) $ECHO_C" >&6
12377else
12378
12379cat >conftest.$ac_ext <<_ACEOF
12380#line 12380 "configure"
12381#include "confdefs.h"
12382
12383#include <stdlib.h>
12384#include <stdarg.h>
12385#include <stdio.h>
12386#ifdef HAVE_LIBUTF8_H
12387#include <libutf8.h>
12388#endif
12389int
12390main (void)
12391{
12392wint_t state
12393  ;
12394  return 0;
12395}
12396_ACEOF
12397rm -f conftest.$ac_objext
12398if { (eval echo "$as_me:12398: \"$ac_compile\"") >&5
12399  (eval $ac_compile) 2>&5
12400  ac_status=$?
12401  echo "$as_me:12401: \$? = $ac_status" >&5
12402  (exit $ac_status); } &&
12403         { ac_try='test -s conftest.$ac_objext'
12404  { (eval echo "$as_me:12404: \"$ac_try\"") >&5
12405  (eval $ac_try) 2>&5
12406  ac_status=$?
12407  echo "$as_me:12407: \$? = $ac_status" >&5
12408  (exit $ac_status); }; }; then
12409  cf_cv_wint_t=no
12410else
12411  echo "$as_me: failed program was:" >&5
12412cat conftest.$ac_ext >&5
12413cat >conftest.$ac_ext <<_ACEOF
12414#line 12414 "configure"
12415#include "confdefs.h"
12416
12417#include <stdlib.h>
12418#include <stdarg.h>
12419#include <stdio.h>
12420#include <wchar.h>
12421#ifdef HAVE_LIBUTF8_H
12422#include <libutf8.h>
12423#endif
12424int
12425main (void)
12426{
12427wint_t value
12428  ;
12429  return 0;
12430}
12431_ACEOF
12432rm -f conftest.$ac_objext
12433if { (eval echo "$as_me:12433: \"$ac_compile\"") >&5
12434  (eval $ac_compile) 2>&5
12435  ac_status=$?
12436  echo "$as_me:12436: \$? = $ac_status" >&5
12437  (exit $ac_status); } &&
12438         { ac_try='test -s conftest.$ac_objext'
12439  { (eval echo "$as_me:12439: \"$ac_try\"") >&5
12440  (eval $ac_try) 2>&5
12441  ac_status=$?
12442  echo "$as_me:12442: \$? = $ac_status" >&5
12443  (exit $ac_status); }; }; then
12444  cf_cv_wint_t=yes
12445else
12446  echo "$as_me: failed program was:" >&5
12447cat conftest.$ac_ext >&5
12448cf_cv_wint_t=unknown
12449fi
12450rm -f conftest.$ac_objext conftest.$ac_ext
12451fi
12452rm -f conftest.$ac_objext conftest.$ac_ext
12453fi
12454echo "$as_me:12454: result: $cf_cv_wint_t" >&5
12455echo "${ECHO_T}$cf_cv_wint_t" >&6
12456
12457if test "$cf_cv_wint_t" = yes ; then
12458
12459cat >>confdefs.h <<\EOF
12460#define NEED_WCHAR_H 1
12461EOF
12462
12463	NEED_WCHAR_H=1
12464fi
12465
12466# if we do not find wint_t in either place, use substitution to provide a fallback.
12467if test "$cf_cv_wint_t" = unknown ; then
12468	NCURSES_WINT_T=1
12469fi
12470
12471# if we find wint_t in either place, use substitution to provide a fallback.
12472if test "$cf_cv_wint_t" != unknown ; then
12473	NCURSES_OK_WINT_T=1
12474fi
12475
12476	if test "$NCURSES_MBSTATE_T" != 0; then
12477
12478cat >>confdefs.h <<\EOF
12479#define NEED_MBSTATE_T_DEF 1
12480EOF
12481
12482	fi
12483fi
12484
12485###   use option --disable-lp64 to allow long chtype
12486echo "$as_me:12486: checking whether to enable _LP64 definition in curses.h" >&5
12487echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12488
12489# Check whether --enable-lp64 or --disable-lp64 was given.
12490if test "${enable_lp64+set}" = set; then
12491  enableval="$enable_lp64"
12492  with_lp64=$enableval
12493else
12494  with_lp64=$cf_dft_with_lp64
12495fi;
12496echo "$as_me:12496: result: $with_lp64" >&5
12497echo "${ECHO_T}$with_lp64" >&6
12498
12499if test "x$with_lp64" = xyes ; then
12500	cf_cv_enable_lp64=1
12501else
12502	cf_cv_enable_lp64=0
12503fi
12504
12505# Check whether --enable-largefile or --disable-largefile was given.
12506if test "${enable_largefile+set}" = set; then
12507  enableval="$enable_largefile"
12508
12509fi;
12510if test "$enable_largefile" != no; then
12511
12512  echo "$as_me:12512: checking for special C compiler options needed for large files" >&5
12513echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12514if test "${ac_cv_sys_largefile_CC+set}" = set; then
12515  echo $ECHO_N "(cached) $ECHO_C" >&6
12516else
12517  ac_cv_sys_largefile_CC=no
12518     if test "$GCC" != yes; then
12519       ac_save_CC=$CC
12520       while :; do
12521     	 # IRIX 6.2 and later do not support large files by default,
12522     	 # so use the C compiler's -n32 option if that helps.
12523         cat >conftest.$ac_ext <<_ACEOF
12524#line 12524 "configure"
12525#include "confdefs.h"
12526#include <sys/types.h>
12527 /* Check that off_t can represent 2**63 - 1 correctly.
12528    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12529    since some C++ compilers masquerading as C compilers
12530    incorrectly reject 9223372036854775807.  */
12531#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12532  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12533		       && LARGE_OFF_T % 2147483647 == 1)
12534		      ? 1 : -1];
12535int
12536main (void)
12537{
12538
12539  ;
12540  return 0;
12541}
12542_ACEOF
12543     	 rm -f conftest.$ac_objext
12544if { (eval echo "$as_me:12544: \"$ac_compile\"") >&5
12545  (eval $ac_compile) 2>&5
12546  ac_status=$?
12547  echo "$as_me:12547: \$? = $ac_status" >&5
12548  (exit $ac_status); } &&
12549         { ac_try='test -s conftest.$ac_objext'
12550  { (eval echo "$as_me:12550: \"$ac_try\"") >&5
12551  (eval $ac_try) 2>&5
12552  ac_status=$?
12553  echo "$as_me:12553: \$? = $ac_status" >&5
12554  (exit $ac_status); }; }; then
12555  break
12556else
12557  echo "$as_me: failed program was:" >&5
12558cat conftest.$ac_ext >&5
12559fi
12560rm -f conftest.$ac_objext
12561     	 CC="$CC -n32"
12562     	 rm -f conftest.$ac_objext
12563if { (eval echo "$as_me:12563: \"$ac_compile\"") >&5
12564  (eval $ac_compile) 2>&5
12565  ac_status=$?
12566  echo "$as_me:12566: \$? = $ac_status" >&5
12567  (exit $ac_status); } &&
12568         { ac_try='test -s conftest.$ac_objext'
12569  { (eval echo "$as_me:12569: \"$ac_try\"") >&5
12570  (eval $ac_try) 2>&5
12571  ac_status=$?
12572  echo "$as_me:12572: \$? = $ac_status" >&5
12573  (exit $ac_status); }; }; then
12574  ac_cv_sys_largefile_CC=' -n32'; break
12575else
12576  echo "$as_me: failed program was:" >&5
12577cat conftest.$ac_ext >&5
12578fi
12579rm -f conftest.$ac_objext
12580         break
12581       done
12582       CC=$ac_save_CC
12583       rm -f conftest.$ac_ext
12584    fi
12585fi
12586echo "$as_me:12586: result: $ac_cv_sys_largefile_CC" >&5
12587echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12588  if test "$ac_cv_sys_largefile_CC" != no; then
12589    CC=$CC$ac_cv_sys_largefile_CC
12590  fi
12591
12592  echo "$as_me:12592: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12593echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12594if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12595  echo $ECHO_N "(cached) $ECHO_C" >&6
12596else
12597  while :; do
12598  ac_cv_sys_file_offset_bits=no
12599  cat >conftest.$ac_ext <<_ACEOF
12600#line 12600 "configure"
12601#include "confdefs.h"
12602#include <sys/types.h>
12603 /* Check that off_t can represent 2**63 - 1 correctly.
12604    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12605    since some C++ compilers masquerading as C compilers
12606    incorrectly reject 9223372036854775807.  */
12607#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12608  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12609		       && LARGE_OFF_T % 2147483647 == 1)
12610		      ? 1 : -1];
12611int
12612main (void)
12613{
12614
12615  ;
12616  return 0;
12617}
12618_ACEOF
12619rm -f conftest.$ac_objext
12620if { (eval echo "$as_me:12620: \"$ac_compile\"") >&5
12621  (eval $ac_compile) 2>&5
12622  ac_status=$?
12623  echo "$as_me:12623: \$? = $ac_status" >&5
12624  (exit $ac_status); } &&
12625         { ac_try='test -s conftest.$ac_objext'
12626  { (eval echo "$as_me:12626: \"$ac_try\"") >&5
12627  (eval $ac_try) 2>&5
12628  ac_status=$?
12629  echo "$as_me:12629: \$? = $ac_status" >&5
12630  (exit $ac_status); }; }; then
12631  break
12632else
12633  echo "$as_me: failed program was:" >&5
12634cat conftest.$ac_ext >&5
12635fi
12636rm -f conftest.$ac_objext conftest.$ac_ext
12637  cat >conftest.$ac_ext <<_ACEOF
12638#line 12638 "configure"
12639#include "confdefs.h"
12640#define _FILE_OFFSET_BITS 64
12641#include <sys/types.h>
12642 /* Check that off_t can represent 2**63 - 1 correctly.
12643    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12644    since some C++ compilers masquerading as C compilers
12645    incorrectly reject 9223372036854775807.  */
12646#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12647  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12648		       && LARGE_OFF_T % 2147483647 == 1)
12649		      ? 1 : -1];
12650int
12651main (void)
12652{
12653
12654  ;
12655  return 0;
12656}
12657_ACEOF
12658rm -f conftest.$ac_objext
12659if { (eval echo "$as_me:12659: \"$ac_compile\"") >&5
12660  (eval $ac_compile) 2>&5
12661  ac_status=$?
12662  echo "$as_me:12662: \$? = $ac_status" >&5
12663  (exit $ac_status); } &&
12664         { ac_try='test -s conftest.$ac_objext'
12665  { (eval echo "$as_me:12665: \"$ac_try\"") >&5
12666  (eval $ac_try) 2>&5
12667  ac_status=$?
12668  echo "$as_me:12668: \$? = $ac_status" >&5
12669  (exit $ac_status); }; }; then
12670  ac_cv_sys_file_offset_bits=64; break
12671else
12672  echo "$as_me: failed program was:" >&5
12673cat conftest.$ac_ext >&5
12674fi
12675rm -f conftest.$ac_objext conftest.$ac_ext
12676  break
12677done
12678fi
12679echo "$as_me:12679: result: $ac_cv_sys_file_offset_bits" >&5
12680echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12681if test "$ac_cv_sys_file_offset_bits" != no; then
12682
12683cat >>confdefs.h <<EOF
12684#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12685EOF
12686
12687fi
12688rm -rf conftest*
12689  echo "$as_me:12689: checking for _LARGE_FILES value needed for large files" >&5
12690echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12691if test "${ac_cv_sys_large_files+set}" = set; then
12692  echo $ECHO_N "(cached) $ECHO_C" >&6
12693else
12694  while :; do
12695  ac_cv_sys_large_files=no
12696  cat >conftest.$ac_ext <<_ACEOF
12697#line 12697 "configure"
12698#include "confdefs.h"
12699#include <sys/types.h>
12700 /* Check that off_t can represent 2**63 - 1 correctly.
12701    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12702    since some C++ compilers masquerading as C compilers
12703    incorrectly reject 9223372036854775807.  */
12704#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12705  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12706		       && LARGE_OFF_T % 2147483647 == 1)
12707		      ? 1 : -1];
12708int
12709main (void)
12710{
12711
12712  ;
12713  return 0;
12714}
12715_ACEOF
12716rm -f conftest.$ac_objext
12717if { (eval echo "$as_me:12717: \"$ac_compile\"") >&5
12718  (eval $ac_compile) 2>&5
12719  ac_status=$?
12720  echo "$as_me:12720: \$? = $ac_status" >&5
12721  (exit $ac_status); } &&
12722         { ac_try='test -s conftest.$ac_objext'
12723  { (eval echo "$as_me:12723: \"$ac_try\"") >&5
12724  (eval $ac_try) 2>&5
12725  ac_status=$?
12726  echo "$as_me:12726: \$? = $ac_status" >&5
12727  (exit $ac_status); }; }; then
12728  break
12729else
12730  echo "$as_me: failed program was:" >&5
12731cat conftest.$ac_ext >&5
12732fi
12733rm -f conftest.$ac_objext conftest.$ac_ext
12734  cat >conftest.$ac_ext <<_ACEOF
12735#line 12735 "configure"
12736#include "confdefs.h"
12737#define _LARGE_FILES 1
12738#include <sys/types.h>
12739 /* Check that off_t can represent 2**63 - 1 correctly.
12740    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12741    since some C++ compilers masquerading as C compilers
12742    incorrectly reject 9223372036854775807.  */
12743#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12744  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12745		       && LARGE_OFF_T % 2147483647 == 1)
12746		      ? 1 : -1];
12747int
12748main (void)
12749{
12750
12751  ;
12752  return 0;
12753}
12754_ACEOF
12755rm -f conftest.$ac_objext
12756if { (eval echo "$as_me:12756: \"$ac_compile\"") >&5
12757  (eval $ac_compile) 2>&5
12758  ac_status=$?
12759  echo "$as_me:12759: \$? = $ac_status" >&5
12760  (exit $ac_status); } &&
12761         { ac_try='test -s conftest.$ac_objext'
12762  { (eval echo "$as_me:12762: \"$ac_try\"") >&5
12763  (eval $ac_try) 2>&5
12764  ac_status=$?
12765  echo "$as_me:12765: \$? = $ac_status" >&5
12766  (exit $ac_status); }; }; then
12767  ac_cv_sys_large_files=1; break
12768else
12769  echo "$as_me: failed program was:" >&5
12770cat conftest.$ac_ext >&5
12771fi
12772rm -f conftest.$ac_objext conftest.$ac_ext
12773  break
12774done
12775fi
12776echo "$as_me:12776: result: $ac_cv_sys_large_files" >&5
12777echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12778if test "$ac_cv_sys_large_files" != no; then
12779
12780cat >>confdefs.h <<EOF
12781#define _LARGE_FILES $ac_cv_sys_large_files
12782EOF
12783
12784fi
12785rm -rf conftest*
12786fi
12787
12788	if test "$enable_largefile" != no ; then
12789	echo "$as_me:12789: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12790echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12791if test "${ac_cv_sys_largefile_source+set}" = set; then
12792  echo $ECHO_N "(cached) $ECHO_C" >&6
12793else
12794  while :; do
12795  ac_cv_sys_largefile_source=no
12796  cat >conftest.$ac_ext <<_ACEOF
12797#line 12797 "configure"
12798#include "confdefs.h"
12799#include <stdio.h>
12800int
12801main (void)
12802{
12803return !fseeko;
12804  ;
12805  return 0;
12806}
12807_ACEOF
12808rm -f conftest.$ac_objext
12809if { (eval echo "$as_me:12809: \"$ac_compile\"") >&5
12810  (eval $ac_compile) 2>&5
12811  ac_status=$?
12812  echo "$as_me:12812: \$? = $ac_status" >&5
12813  (exit $ac_status); } &&
12814         { ac_try='test -s conftest.$ac_objext'
12815  { (eval echo "$as_me:12815: \"$ac_try\"") >&5
12816  (eval $ac_try) 2>&5
12817  ac_status=$?
12818  echo "$as_me:12818: \$? = $ac_status" >&5
12819  (exit $ac_status); }; }; then
12820  break
12821else
12822  echo "$as_me: failed program was:" >&5
12823cat conftest.$ac_ext >&5
12824fi
12825rm -f conftest.$ac_objext conftest.$ac_ext
12826  cat >conftest.$ac_ext <<_ACEOF
12827#line 12827 "configure"
12828#include "confdefs.h"
12829#define _LARGEFILE_SOURCE 1
12830#include <stdio.h>
12831int
12832main (void)
12833{
12834return !fseeko;
12835  ;
12836  return 0;
12837}
12838_ACEOF
12839rm -f conftest.$ac_objext
12840if { (eval echo "$as_me:12840: \"$ac_compile\"") >&5
12841  (eval $ac_compile) 2>&5
12842  ac_status=$?
12843  echo "$as_me:12843: \$? = $ac_status" >&5
12844  (exit $ac_status); } &&
12845         { ac_try='test -s conftest.$ac_objext'
12846  { (eval echo "$as_me:12846: \"$ac_try\"") >&5
12847  (eval $ac_try) 2>&5
12848  ac_status=$?
12849  echo "$as_me:12849: \$? = $ac_status" >&5
12850  (exit $ac_status); }; }; then
12851  ac_cv_sys_largefile_source=1; break
12852else
12853  echo "$as_me: failed program was:" >&5
12854cat conftest.$ac_ext >&5
12855fi
12856rm -f conftest.$ac_objext conftest.$ac_ext
12857  break
12858done
12859fi
12860echo "$as_me:12860: result: $ac_cv_sys_largefile_source" >&5
12861echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12862if test "$ac_cv_sys_largefile_source" != no; then
12863
12864cat >>confdefs.h <<EOF
12865#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12866EOF
12867
12868fi
12869rm -rf conftest*
12870
12871# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12872# in glibc 2.1.3, but that breaks too many other things.
12873# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12874echo "$as_me:12874: checking for fseeko" >&5
12875echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12876if test "${ac_cv_func_fseeko+set}" = set; then
12877  echo $ECHO_N "(cached) $ECHO_C" >&6
12878else
12879  cat >conftest.$ac_ext <<_ACEOF
12880#line 12880 "configure"
12881#include "confdefs.h"
12882#include <stdio.h>
12883int
12884main (void)
12885{
12886return fseeko && fseeko (stdin, 0, 0);
12887  ;
12888  return 0;
12889}
12890_ACEOF
12891rm -f conftest.$ac_objext conftest$ac_exeext
12892if { (eval echo "$as_me:12892: \"$ac_link\"") >&5
12893  (eval $ac_link) 2>&5
12894  ac_status=$?
12895  echo "$as_me:12895: \$? = $ac_status" >&5
12896  (exit $ac_status); } &&
12897         { ac_try='test -s conftest$ac_exeext'
12898  { (eval echo "$as_me:12898: \"$ac_try\"") >&5
12899  (eval $ac_try) 2>&5
12900  ac_status=$?
12901  echo "$as_me:12901: \$? = $ac_status" >&5
12902  (exit $ac_status); }; }; then
12903  ac_cv_func_fseeko=yes
12904else
12905  echo "$as_me: failed program was:" >&5
12906cat conftest.$ac_ext >&5
12907ac_cv_func_fseeko=no
12908fi
12909rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12910fi
12911echo "$as_me:12911: result: $ac_cv_func_fseeko" >&5
12912echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12913if test $ac_cv_func_fseeko = yes; then
12914
12915cat >>confdefs.h <<\EOF
12916#define HAVE_FSEEKO 1
12917EOF
12918
12919fi
12920
12921	# Normally we would collect these definitions in the config.h,
12922	# but (like _XOPEN_SOURCE), some environments rely on having these
12923	# defined before any of the system headers are included.  Another
12924	# case comes up with C++, e.g., on AIX the compiler compiles the
12925	# header files by themselves before looking at the body files it is
12926	# told to compile.  For ncurses, those header files do not include
12927	# the config.h
12928	if test "$ac_cv_sys_large_files" != no
12929	then
12930
12931	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12932	CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12933
12934	fi
12935	if test "$ac_cv_sys_largefile_source" != no
12936	then
12937
12938	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12939	CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12940
12941	fi
12942	if test "$ac_cv_sys_file_offset_bits" != no
12943	then
12944
12945	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12946	CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
12947
12948	fi
12949
12950	echo "$as_me:12950: checking whether to use struct dirent64" >&5
12951echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12952if test "${cf_cv_struct_dirent64+set}" = set; then
12953  echo $ECHO_N "(cached) $ECHO_C" >&6
12954else
12955
12956		cat >conftest.$ac_ext <<_ACEOF
12957#line 12957 "configure"
12958#include "confdefs.h"
12959
12960#pragma GCC diagnostic error "-Wincompatible-pointer-types"
12961#include <sys/types.h>
12962#include <dirent.h>
12963
12964int
12965main (void)
12966{
12967
12968		/* if transitional largefile support is setup, this is true */
12969		extern struct dirent64 * readdir(DIR *);
12970		struct dirent64 *x = readdir((DIR *)0);
12971		struct dirent *y = readdir((DIR *)0);
12972		int z = x - y;
12973
12974  ;
12975  return 0;
12976}
12977_ACEOF
12978rm -f conftest.$ac_objext
12979if { (eval echo "$as_me:12979: \"$ac_compile\"") >&5
12980  (eval $ac_compile) 2>&5
12981  ac_status=$?
12982  echo "$as_me:12982: \$? = $ac_status" >&5
12983  (exit $ac_status); } &&
12984         { ac_try='test -s conftest.$ac_objext'
12985  { (eval echo "$as_me:12985: \"$ac_try\"") >&5
12986  (eval $ac_try) 2>&5
12987  ac_status=$?
12988  echo "$as_me:12988: \$? = $ac_status" >&5
12989  (exit $ac_status); }; }; then
12990  cf_cv_struct_dirent64=yes
12991else
12992  echo "$as_me: failed program was:" >&5
12993cat conftest.$ac_ext >&5
12994cf_cv_struct_dirent64=no
12995fi
12996rm -f conftest.$ac_objext conftest.$ac_ext
12997
12998fi
12999echo "$as_me:12999: result: $cf_cv_struct_dirent64" >&5
13000echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13001	test "$cf_cv_struct_dirent64" = yes &&
13002cat >>confdefs.h <<\EOF
13003#define HAVE_STRUCT_DIRENT64 1
13004EOF
13005
13006	fi
13007
13008###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13009echo "$as_me:13009: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13010echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13011
13012# Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13013if test "${enable_tparm_varargs+set}" = set; then
13014  enableval="$enable_tparm_varargs"
13015  with_tparm_varargs=$enableval
13016else
13017  with_tparm_varargs=yes
13018fi;
13019echo "$as_me:13019: result: $with_tparm_varargs" >&5
13020echo "${ECHO_T}$with_tparm_varargs" >&6
13021NCURSES_TPARM_VARARGS=0
13022test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13023
13024###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13025if test "$with_ticlib" != no ; then
13026echo "$as_me:13026: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13027echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13028
13029# Check whether --enable-tic-depends or --disable-tic-depends was given.
13030if test "${enable_tic_depends+set}" = set; then
13031  enableval="$enable_tic_depends"
13032  with_tic_depends=$enableval
13033else
13034  with_tic_depends=yes
13035fi;
13036echo "$as_me:13036: result: $with_tic_depends" >&5
13037echo "${ECHO_T}$with_tic_depends" >&6
13038else
13039	with_tic_depends=no
13040fi
13041
13042###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13043echo "$as_me:13043: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13044echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13045
13046# Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13047if test "${enable_wattr_macros+set}" = set; then
13048  enableval="$enable_wattr_macros"
13049  with_wattr_macros=$enableval
13050else
13051  with_wattr_macros=yes
13052fi;
13053if [ "x$with_wattr_macros" != xyes ]; then
13054	NCURSES_WATTR_MACROS=0
13055	echo "$as_me:13055: result: yes" >&5
13056echo "${ECHO_T}yes" >&6
13057else
13058	NCURSES_WATTR_MACROS=1
13059	echo "$as_me:13059: result: no" >&5
13060echo "${ECHO_T}no" >&6
13061fi
13062
13063echo "$as_me:13063: checking for X11 rgb file" >&5
13064echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13065
13066# Check whether --with-x11-rgb or --without-x11-rgb was given.
13067if test "${with_x11_rgb+set}" = set; then
13068  withval="$with_x11_rgb"
13069  RGB_PATH=$withval
13070else
13071  RGB_PATH=auto
13072fi;
13073
13074if test "x$RGB_PATH" = xauto
13075then
13076	RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13077	for cf_path in \
13078		/opt/local/share/X11/rgb.txt \
13079		/opt/X11/share/X11/rgb.txt \
13080		/usr/share/X11/rgb.txt \
13081		/usr/X11/share/X11/rgb.txt \
13082		/usr/X11/lib/X11/rgb.txt \
13083		/usr/lib/X11/rgb.txt \
13084		/etc/X11/rgb.txt \
13085		/usr/pkg/lib/X11/rgb.txt \
13086		/usr/X11R7/lib/X11/rgb.txt \
13087		/usr/X11R6/lib/X11/rgb.txt \
13088		/usr/X11R5/lib/X11/rgb.txt \
13089		/usr/X11R4/lib/X11/rgb.txt \
13090		/usr/local/lib/X11/rgb.txt \
13091		/usr/local/share/X11/rgb.txt \
13092		/usr/lib64/X11/rgb.txt
13093	do
13094		if test -f "$cf_path" ; then
13095			RGB_PATH="$cf_path"
13096			break
13097		fi
13098	done
13099else
13100	cf_path=$RGB_PATH
13101
13102if test "x$prefix" != xNONE; then
13103	cf_path_syntax="$prefix"
13104else
13105	cf_path_syntax="$ac_default_prefix"
13106fi
13107
13108case ".$cf_path" in
13109(.\$\(*\)*|.\'*\'*)
13110	;;
13111(..|./*|.\\*)
13112	;;
13113(.[a-zA-Z]:[\\/]*) # OS/2 EMX
13114	;;
13115(.\${*prefix}*|.\${*dir}*)
13116	eval cf_path="$cf_path"
13117	case ".$cf_path" in
13118	(.NONE/*)
13119		cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13120		;;
13121	esac
13122	;;
13123(.no|.NONE/*)
13124	cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13125	;;
13126(*)
13127	{ { echo "$as_me:13127: error: expected a pathname, not \"$cf_path\"" >&5
13128echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13129   { (exit 1); exit 1; }; }
13130	;;
13131esac
13132
13133fi
13134
13135echo "$as_me:13135: result: $RGB_PATH" >&5
13136echo "${ECHO_T}$RGB_PATH" >&6
13137
13138cat >>confdefs.h <<EOF
13139#define RGB_PATH "$cf_path"
13140EOF
13141
13142no_x11_rgb=
13143if test "$RGB_PATH" = no
13144then
13145	no_x11_rgb="#"
13146fi
13147
13148###   use option --with-bool to override bool's type
13149echo "$as_me:13149: checking for type of bool" >&5
13150echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13151
13152# Check whether --with-bool or --without-bool was given.
13153if test "${with_bool+set}" = set; then
13154  withval="$with_bool"
13155  NCURSES_BOOL="$withval"
13156else
13157  NCURSES_BOOL=auto
13158fi;
13159echo "$as_me:13159: result: $NCURSES_BOOL" >&5
13160echo "${ECHO_T}$NCURSES_BOOL" >&6
13161
13162echo "$as_me:13162: checking for alternate terminal capabilities file" >&5
13163echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13164
13165# Check whether --with-caps or --without-caps was given.
13166if test "${with_caps+set}" = set; then
13167  withval="$with_caps"
13168  TERMINFO_CAPS=Caps.$withval
13169else
13170  TERMINFO_CAPS=Caps
13171fi;
13172test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13173echo "$as_me:13173: result: $TERMINFO_CAPS" >&5
13174echo "${ECHO_T}$TERMINFO_CAPS" >&6
13175
13176###   use option --with-chtype to override chtype's type
13177echo "$as_me:13177: checking for type of chtype" >&5
13178echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13179
13180# Check whether --with-chtype or --without-chtype was given.
13181if test "${with_chtype+set}" = set; then
13182  withval="$with_chtype"
13183  NCURSES_CHTYPE="$withval"
13184else
13185  NCURSES_CHTYPE=$cf_dft_chtype
13186fi;
13187echo "$as_me:13187: result: $NCURSES_CHTYPE" >&5
13188echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13189
13190###   use option --with-ospeed to override ospeed's type
13191echo "$as_me:13191: checking for type of ospeed" >&5
13192echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13193
13194# Check whether --with-ospeed or --without-ospeed was given.
13195if test "${with_ospeed+set}" = set; then
13196  withval="$with_ospeed"
13197  NCURSES_OSPEED="$withval"
13198else
13199  NCURSES_OSPEED=short
13200fi;
13201echo "$as_me:13201: result: $NCURSES_OSPEED" >&5
13202echo "${ECHO_T}$NCURSES_OSPEED" >&6
13203
13204###   use option --with-mmask-t to override mmask_t's type
13205echo "$as_me:13205: checking for type of mmask_t" >&5
13206echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13207
13208# Check whether --with-mmask-t or --without-mmask-t was given.
13209if test "${with_mmask_t+set}" = set; then
13210  withval="$with_mmask_t"
13211  NCURSES_MMASK_T="$withval"
13212else
13213  NCURSES_MMASK_T=$cf_dft_mmask_t
13214fi;
13215echo "$as_me:13215: result: $NCURSES_MMASK_T" >&5
13216echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13217
13218###   use option --with-ccharw-max to override CCHARW_MAX size
13219echo "$as_me:13219: checking for size CCHARW_MAX" >&5
13220echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13221
13222# Check whether --with-ccharw-max or --without-ccharw-max was given.
13223if test "${with_ccharw_max+set}" = set; then
13224  withval="$with_ccharw_max"
13225  NCURSES_CCHARW_MAX="$withval"
13226else
13227  NCURSES_CCHARW_MAX=5
13228fi;
13229echo "$as_me:13229: result: $NCURSES_CCHARW_MAX" >&5
13230echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13231
13232echo "$as_me:13232: checking for ANSI C header files" >&5
13233echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13234if test "${ac_cv_header_stdc+set}" = set; then
13235  echo $ECHO_N "(cached) $ECHO_C" >&6
13236else
13237  cat >conftest.$ac_ext <<_ACEOF
13238#line 13238 "configure"
13239#include "confdefs.h"
13240#include <stdlib.h>
13241#include <stdarg.h>
13242#include <string.h>
13243#include <float.h>
13244
13245_ACEOF
13246if { (eval echo "$as_me:13246: \"$ac_cpp conftest.$ac_ext\"") >&5
13247  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13248  ac_status=$?
13249  egrep -v '^ *\+' conftest.er1 >conftest.err
13250  rm -f conftest.er1
13251  cat conftest.err >&5
13252  echo "$as_me:13252: \$? = $ac_status" >&5
13253  (exit $ac_status); } >/dev/null; then
13254  if test -s conftest.err; then
13255    ac_cpp_err=$ac_c_preproc_warn_flag
13256  else
13257    ac_cpp_err=
13258  fi
13259else
13260  ac_cpp_err=yes
13261fi
13262if test -z "$ac_cpp_err"; then
13263  ac_cv_header_stdc=yes
13264else
13265  echo "$as_me: failed program was:" >&5
13266  cat conftest.$ac_ext >&5
13267  ac_cv_header_stdc=no
13268fi
13269rm -f conftest.err conftest.$ac_ext
13270
13271if test $ac_cv_header_stdc = yes; then
13272  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13273  cat >conftest.$ac_ext <<_ACEOF
13274#line 13274 "configure"
13275#include "confdefs.h"
13276#include <string.h>
13277
13278_ACEOF
13279if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13280  egrep "memchr" >/dev/null 2>&1; then
13281  :
13282else
13283  ac_cv_header_stdc=no
13284fi
13285rm -rf conftest*
13286
13287fi
13288
13289if test $ac_cv_header_stdc = yes; then
13290  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13291  cat >conftest.$ac_ext <<_ACEOF
13292#line 13292 "configure"
13293#include "confdefs.h"
13294#include <stdlib.h>
13295
13296_ACEOF
13297if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13298  egrep "free" >/dev/null 2>&1; then
13299  :
13300else
13301  ac_cv_header_stdc=no
13302fi
13303rm -rf conftest*
13304
13305fi
13306
13307if test $ac_cv_header_stdc = yes; then
13308  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13309  if test "$cross_compiling" = yes; then
13310  :
13311else
13312  cat >conftest.$ac_ext <<_ACEOF
13313#line 13313 "configure"
13314#include "confdefs.h"
13315#include <ctype.h>
13316#if ((' ' & 0x0FF) == 0x020)
13317# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13318# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13319#else
13320# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13321                     || ('j' <= (c) && (c) <= 'r') \
13322                     || ('s' <= (c) && (c) <= 'z'))
13323# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13324#endif
13325
13326#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13327int
13328main (void)
13329{
13330  int i;
13331  for (i = 0; i < 256; i++)
13332    if (XOR (islower (i), ISLOWER (i))
13333        || toupper (i) != TOUPPER (i))
13334      $ac_main_return(2);
13335  $ac_main_return (0);
13336}
13337_ACEOF
13338rm -f conftest$ac_exeext
13339if { (eval echo "$as_me:13339: \"$ac_link\"") >&5
13340  (eval $ac_link) 2>&5
13341  ac_status=$?
13342  echo "$as_me:13342: \$? = $ac_status" >&5
13343  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13344  { (eval echo "$as_me:13344: \"$ac_try\"") >&5
13345  (eval $ac_try) 2>&5
13346  ac_status=$?
13347  echo "$as_me:13347: \$? = $ac_status" >&5
13348  (exit $ac_status); }; }; then
13349  :
13350else
13351  echo "$as_me: program exited with status $ac_status" >&5
13352echo "$as_me: failed program was:" >&5
13353cat conftest.$ac_ext >&5
13354ac_cv_header_stdc=no
13355fi
13356rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13357fi
13358fi
13359fi
13360echo "$as_me:13360: result: $ac_cv_header_stdc" >&5
13361echo "${ECHO_T}$ac_cv_header_stdc" >&6
13362if test $ac_cv_header_stdc = yes; then
13363
13364cat >>confdefs.h <<\EOF
13365#define STDC_HEADERS 1
13366EOF
13367
13368fi
13369
13370# On IRIX 5.3, sys/types and inttypes.h are conflicting.
13371
13372for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13373                  inttypes.h stdint.h unistd.h
13374do
13375as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13376echo "$as_me:13376: checking for $ac_header" >&5
13377echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13378if eval "test \"\${$as_ac_Header+set}\" = set"; then
13379  echo $ECHO_N "(cached) $ECHO_C" >&6
13380else
13381  cat >conftest.$ac_ext <<_ACEOF
13382#line 13382 "configure"
13383#include "confdefs.h"
13384$ac_includes_default
13385#include <$ac_header>
13386_ACEOF
13387rm -f conftest.$ac_objext
13388if { (eval echo "$as_me:13388: \"$ac_compile\"") >&5
13389  (eval $ac_compile) 2>&5
13390  ac_status=$?
13391  echo "$as_me:13391: \$? = $ac_status" >&5
13392  (exit $ac_status); } &&
13393         { ac_try='test -s conftest.$ac_objext'
13394  { (eval echo "$as_me:13394: \"$ac_try\"") >&5
13395  (eval $ac_try) 2>&5
13396  ac_status=$?
13397  echo "$as_me:13397: \$? = $ac_status" >&5
13398  (exit $ac_status); }; }; then
13399  eval "$as_ac_Header=yes"
13400else
13401  echo "$as_me: failed program was:" >&5
13402cat conftest.$ac_ext >&5
13403eval "$as_ac_Header=no"
13404fi
13405rm -f conftest.$ac_objext conftest.$ac_ext
13406fi
13407echo "$as_me:13407: result: `eval echo '${'$as_ac_Header'}'`" >&5
13408echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13409if test `eval echo '${'$as_ac_Header'}'` = yes; then
13410  cat >>confdefs.h <<EOF
13411#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13412EOF
13413
13414fi
13415done
13416
13417echo "$as_me:13417: checking for signed char" >&5
13418echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13419if test "${ac_cv_type_signed_char+set}" = set; then
13420  echo $ECHO_N "(cached) $ECHO_C" >&6
13421else
13422  cat >conftest.$ac_ext <<_ACEOF
13423#line 13423 "configure"
13424#include "confdefs.h"
13425$ac_includes_default
13426int
13427main (void)
13428{
13429if ((signed char *) 0)
13430  return 0;
13431if (sizeof (signed char))
13432  return 0;
13433  ;
13434  return 0;
13435}
13436_ACEOF
13437rm -f conftest.$ac_objext
13438if { (eval echo "$as_me:13438: \"$ac_compile\"") >&5
13439  (eval $ac_compile) 2>&5
13440  ac_status=$?
13441  echo "$as_me:13441: \$? = $ac_status" >&5
13442  (exit $ac_status); } &&
13443         { ac_try='test -s conftest.$ac_objext'
13444  { (eval echo "$as_me:13444: \"$ac_try\"") >&5
13445  (eval $ac_try) 2>&5
13446  ac_status=$?
13447  echo "$as_me:13447: \$? = $ac_status" >&5
13448  (exit $ac_status); }; }; then
13449  ac_cv_type_signed_char=yes
13450else
13451  echo "$as_me: failed program was:" >&5
13452cat conftest.$ac_ext >&5
13453ac_cv_type_signed_char=no
13454fi
13455rm -f conftest.$ac_objext conftest.$ac_ext
13456fi
13457echo "$as_me:13457: result: $ac_cv_type_signed_char" >&5
13458echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13459
13460echo "$as_me:13460: checking size of signed char" >&5
13461echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13462if test "${ac_cv_sizeof_signed_char+set}" = set; then
13463  echo $ECHO_N "(cached) $ECHO_C" >&6
13464else
13465  if test "$ac_cv_type_signed_char" = yes; then
13466  if test "$cross_compiling" = yes; then
13467  # Depending upon the size, compute the lo and hi bounds.
13468cat >conftest.$ac_ext <<_ACEOF
13469#line 13469 "configure"
13470#include "confdefs.h"
13471$ac_includes_default
13472int
13473main (void)
13474{
13475int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13476  ;
13477  return 0;
13478}
13479_ACEOF
13480rm -f conftest.$ac_objext
13481if { (eval echo "$as_me:13481: \"$ac_compile\"") >&5
13482  (eval $ac_compile) 2>&5
13483  ac_status=$?
13484  echo "$as_me:13484: \$? = $ac_status" >&5
13485  (exit $ac_status); } &&
13486         { ac_try='test -s conftest.$ac_objext'
13487  { (eval echo "$as_me:13487: \"$ac_try\"") >&5
13488  (eval $ac_try) 2>&5
13489  ac_status=$?
13490  echo "$as_me:13490: \$? = $ac_status" >&5
13491  (exit $ac_status); }; }; then
13492  ac_lo=0 ac_mid=0
13493  while :; do
13494    cat >conftest.$ac_ext <<_ACEOF
13495#line 13495 "configure"
13496#include "confdefs.h"
13497$ac_includes_default
13498int
13499main (void)
13500{
13501int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13502  ;
13503  return 0;
13504}
13505_ACEOF
13506rm -f conftest.$ac_objext
13507if { (eval echo "$as_me:13507: \"$ac_compile\"") >&5
13508  (eval $ac_compile) 2>&5
13509  ac_status=$?
13510  echo "$as_me:13510: \$? = $ac_status" >&5
13511  (exit $ac_status); } &&
13512         { ac_try='test -s conftest.$ac_objext'
13513  { (eval echo "$as_me:13513: \"$ac_try\"") >&5
13514  (eval $ac_try) 2>&5
13515  ac_status=$?
13516  echo "$as_me:13516: \$? = $ac_status" >&5
13517  (exit $ac_status); }; }; then
13518  ac_hi=$ac_mid; break
13519else
13520  echo "$as_me: failed program was:" >&5
13521cat conftest.$ac_ext >&5
13522ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13523fi
13524rm -f conftest.$ac_objext conftest.$ac_ext
13525  done
13526else
13527  echo "$as_me: failed program was:" >&5
13528cat conftest.$ac_ext >&5
13529ac_hi=-1 ac_mid=-1
13530  while :; do
13531    cat >conftest.$ac_ext <<_ACEOF
13532#line 13532 "configure"
13533#include "confdefs.h"
13534$ac_includes_default
13535int
13536main (void)
13537{
13538int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13539  ;
13540  return 0;
13541}
13542_ACEOF
13543rm -f conftest.$ac_objext
13544if { (eval echo "$as_me:13544: \"$ac_compile\"") >&5
13545  (eval $ac_compile) 2>&5
13546  ac_status=$?
13547  echo "$as_me:13547: \$? = $ac_status" >&5
13548  (exit $ac_status); } &&
13549         { ac_try='test -s conftest.$ac_objext'
13550  { (eval echo "$as_me:13550: \"$ac_try\"") >&5
13551  (eval $ac_try) 2>&5
13552  ac_status=$?
13553  echo "$as_me:13553: \$? = $ac_status" >&5
13554  (exit $ac_status); }; }; then
13555  ac_lo=$ac_mid; break
13556else
13557  echo "$as_me: failed program was:" >&5
13558cat conftest.$ac_ext >&5
13559ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13560fi
13561rm -f conftest.$ac_objext conftest.$ac_ext
13562  done
13563fi
13564rm -f conftest.$ac_objext conftest.$ac_ext
13565# Binary search between lo and hi bounds.
13566while test "x$ac_lo" != "x$ac_hi"; do
13567  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13568  cat >conftest.$ac_ext <<_ACEOF
13569#line 13569 "configure"
13570#include "confdefs.h"
13571$ac_includes_default
13572int
13573main (void)
13574{
13575int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13576  ;
13577  return 0;
13578}
13579_ACEOF
13580rm -f conftest.$ac_objext
13581if { (eval echo "$as_me:13581: \"$ac_compile\"") >&5
13582  (eval $ac_compile) 2>&5
13583  ac_status=$?
13584  echo "$as_me:13584: \$? = $ac_status" >&5
13585  (exit $ac_status); } &&
13586         { ac_try='test -s conftest.$ac_objext'
13587  { (eval echo "$as_me:13587: \"$ac_try\"") >&5
13588  (eval $ac_try) 2>&5
13589  ac_status=$?
13590  echo "$as_me:13590: \$? = $ac_status" >&5
13591  (exit $ac_status); }; }; then
13592  ac_hi=$ac_mid
13593else
13594  echo "$as_me: failed program was:" >&5
13595cat conftest.$ac_ext >&5
13596ac_lo=`expr $ac_mid + 1`
13597fi
13598rm -f conftest.$ac_objext conftest.$ac_ext
13599done
13600ac_cv_sizeof_signed_char=$ac_lo
13601else
13602  if test "$cross_compiling" = yes; then
13603  { { echo "$as_me:13603: error: cannot run test program while cross compiling" >&5
13604echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13605   { (exit 1); exit 1; }; }
13606else
13607  cat >conftest.$ac_ext <<_ACEOF
13608#line 13608 "configure"
13609#include "confdefs.h"
13610$ac_includes_default
13611int
13612main (void)
13613{
13614FILE *f = fopen ("conftest.val", "w");
13615if (!f)
13616  $ac_main_return (1);
13617fprintf (f, "%d", (sizeof (signed char)));
13618fclose (f);
13619  ;
13620  return 0;
13621}
13622_ACEOF
13623rm -f conftest$ac_exeext
13624if { (eval echo "$as_me:13624: \"$ac_link\"") >&5
13625  (eval $ac_link) 2>&5
13626  ac_status=$?
13627  echo "$as_me:13627: \$? = $ac_status" >&5
13628  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13629  { (eval echo "$as_me:13629: \"$ac_try\"") >&5
13630  (eval $ac_try) 2>&5
13631  ac_status=$?
13632  echo "$as_me:13632: \$? = $ac_status" >&5
13633  (exit $ac_status); }; }; then
13634  ac_cv_sizeof_signed_char=`cat conftest.val`
13635else
13636  echo "$as_me: program exited with status $ac_status" >&5
13637echo "$as_me: failed program was:" >&5
13638cat conftest.$ac_ext >&5
13639fi
13640rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13641fi
13642fi
13643rm -f conftest.val
13644else
13645  ac_cv_sizeof_signed_char=0
13646fi
13647fi
13648echo "$as_me:13648: result: $ac_cv_sizeof_signed_char" >&5
13649echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13650cat >>confdefs.h <<EOF
13651#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13652EOF
13653
13654if test "$ac_cv_sizeof_signed_char" = 1 ; then
13655	NCURSES_SBOOL="signed char"
13656else
13657	NCURSES_SBOOL="char"
13658fi
13659echo "$as_me:13659: checking if you want to use signed Boolean array in term.h" >&5
13660echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13661
13662# Check whether --enable-signed-char or --disable-signed-char was given.
13663if test "${enable_signed_char+set}" = set; then
13664  enableval="$enable_signed_char"
13665  with_signed_char=$enableval
13666else
13667  with_signed_char=no
13668fi;
13669echo "$as_me:13669: result: $with_signed_char" >&5
13670echo "${ECHO_T}$with_signed_char" >&6
13671test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13672
13673###   use option --with-tparm-arg to override tparm's argument type
13674echo "$as_me:13674: checking for type of tparm args" >&5
13675echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13676
13677# Check whether --with-tparm-arg or --without-tparm-arg was given.
13678if test "${with_tparm_arg+set}" = set; then
13679  withval="$with_tparm_arg"
13680  NCURSES_TPARM_ARG="$withval"
13681else
13682  NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13683fi;
13684echo "$as_me:13684: result: $NCURSES_TPARM_ARG" >&5
13685echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13686
13687### Enable compiling-in rcs id's
13688echo "$as_me:13688: checking if RCS identifiers should be compiled-in" >&5
13689echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13690
13691# Check whether --with-rcs-ids or --without-rcs-ids was given.
13692if test "${with_rcs_ids+set}" = set; then
13693  withval="$with_rcs_ids"
13694  with_rcs_ids=$withval
13695else
13696  with_rcs_ids=no
13697fi;
13698echo "$as_me:13698: result: $with_rcs_ids" >&5
13699echo "${ECHO_T}$with_rcs_ids" >&6
13700test "x$with_rcs_ids" = xyes &&
13701cat >>confdefs.h <<\EOF
13702#define USE_RCS_IDS 1
13703EOF
13704
13705###############################################################################
13706
13707echo "$as_me:13707: checking format of man-pages" >&5
13708echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13709
13710# Check whether --with-manpage-format or --without-manpage-format was given.
13711if test "${with_manpage_format+set}" = set; then
13712  withval="$with_manpage_format"
13713  MANPAGE_FORMAT=$withval
13714else
13715  MANPAGE_FORMAT=unknown
13716fi;
13717
13718test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13719MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13720
13721cf_unknown=
13722
13723case $MANPAGE_FORMAT in
13724(unknown)
13725	if test -z "$MANPATH" ; then
13726		MANPATH="/usr/man:/usr/share/man"
13727	fi
13728
13729	# look for the 'date' man-page (it's most likely to be installed!)
13730	MANPAGE_FORMAT=
13731	cf_preform=no
13732	cf_catonly=yes
13733	cf_example=date
13734
13735	IFS="${IFS:- 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13736	for cf_dir in $MANPATH; do
13737		test -z "$cf_dir" && cf_dir=/usr/man
13738		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
13739		do
13740			cf_test=`echo $cf_name | sed -e 's/*//'`
13741			if test "x$cf_test" = "x$cf_name" ; then
13742
13743				case "$cf_name" in
13744				(*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13745				(*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13746				(*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13747				(*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13748				esac
13749
13750				case "$cf_name" in
13751				($cf_dir/man*)
13752					cf_catonly=no
13753					;;
13754				($cf_dir/cat*)
13755					cf_preform=yes
13756					;;
13757				esac
13758				break
13759			fi
13760
13761			# if we found a match in either man* or cat*, stop looking
13762			if test -n "$MANPAGE_FORMAT" ; then
13763				cf_found=no
13764				test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13765				test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13766				case "$cf_name" in
13767				($cf_dir/cat*)
13768					cf_found=yes
13769					;;
13770				esac
13771				test $cf_found=yes && break
13772			fi
13773		done
13774		# only check the first directory in $MANPATH where we find manpages
13775		if test -n "$MANPAGE_FORMAT" ; then
13776			break
13777		fi
13778	done
13779	# if we did not find the example, just assume it is normal
13780	test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13781	IFS="$ac_save_ifs"
13782	;;
13783(*)
13784	for cf_option in $MANPAGE_FORMAT; do
13785	case $cf_option in
13786	(gzip|compress|BSDI|normal|formatted|catonly)
13787		;;
13788	(*)
13789		cf_unknown="$cf_unknown $cf_option"
13790		;;
13791	esac
13792	done
13793	;;
13794esac
13795
13796echo "$as_me:13796: result: $MANPAGE_FORMAT" >&5
13797echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13798if test -n "$cf_unknown" ; then
13799	{ echo "$as_me:13799: WARNING: Unexpected manpage-format $cf_unknown" >&5
13800echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13801fi
13802
13803echo "$as_me:13803: checking for manpage renaming" >&5
13804echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13805
13806# Check whether --with-manpage-renames or --without-manpage-renames was given.
13807if test "${with_manpage_renames+set}" = set; then
13808  withval="$with_manpage_renames"
13809  MANPAGE_RENAMES=$withval
13810else
13811  MANPAGE_RENAMES=yes
13812fi;
13813
13814case ".$MANPAGE_RENAMES" in
13815(.no)
13816	;;
13817(.|.yes)
13818	# Debian 'man' program?
13819	if test -f /etc/debian_version ; then
13820		MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13821	else
13822		MANPAGE_RENAMES=no
13823	fi
13824	;;
13825esac
13826
13827if test "$MANPAGE_RENAMES" != no ; then
13828	if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13829		MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13830	elif test ! -f $MANPAGE_RENAMES ; then
13831		{ { echo "$as_me:13831: error: not a filename: $MANPAGE_RENAMES" >&5
13832echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13833   { (exit 1); exit 1; }; }
13834	fi
13835
13836	test ! -d man && mkdir man
13837
13838	# Construct a sed-script to perform renaming within man-pages
13839	if test -n "$MANPAGE_RENAMES" ; then
13840		test ! -d man && mkdir man
13841		$SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13842	fi
13843fi
13844
13845echo "$as_me:13845: result: $MANPAGE_RENAMES" >&5
13846echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13847
13848echo "$as_me:13848: checking if manpage aliases will be installed" >&5
13849echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13850
13851# Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13852if test "${with_manpage_aliases+set}" = set; then
13853  withval="$with_manpage_aliases"
13854  MANPAGE_ALIASES=$withval
13855else
13856  MANPAGE_ALIASES=yes
13857fi;
13858
13859echo "$as_me:13859: result: $MANPAGE_ALIASES" >&5
13860echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13861
13862case "x$LN_S" in
13863(xln*)
13864	cf_use_symlinks=yes
13865	;;
13866(*)
13867	cf_use_symlinks=no
13868	;;
13869esac
13870
13871MANPAGE_SYMLINKS=no
13872if test "$MANPAGE_ALIASES" = yes ; then
13873echo "$as_me:13873: checking if manpage symlinks should be used" >&5
13874echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13875
13876# Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13877if test "${with_manpage_symlinks+set}" = set; then
13878  withval="$with_manpage_symlinks"
13879  MANPAGE_SYMLINKS=$withval
13880else
13881  MANPAGE_SYMLINKS=$cf_use_symlinks
13882fi;
13883
13884if test "$$cf_use_symlinks" = no; then
13885if test "$MANPAGE_SYMLINKS" = yes ; then
13886	{ echo "$as_me:13886: WARNING: cannot make symlinks" >&5
13887echo "$as_me: WARNING: cannot make symlinks" >&2;}
13888	MANPAGE_SYMLINKS=no
13889fi
13890fi
13891
13892echo "$as_me:13892: result: $MANPAGE_SYMLINKS" >&5
13893echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13894fi
13895
13896echo "$as_me:13896: checking for manpage tbl" >&5
13897echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13898
13899# Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13900if test "${with_manpage_tbl+set}" = set; then
13901  withval="$with_manpage_tbl"
13902  MANPAGE_TBL=$withval
13903else
13904  MANPAGE_TBL=no
13905fi;
13906
13907echo "$as_me:13907: result: $MANPAGE_TBL" >&5
13908echo "${ECHO_T}$MANPAGE_TBL" >&6
13909
13910if test "$prefix" = "NONE" ; then
13911	cf_prefix="$ac_default_prefix"
13912else
13913	cf_prefix="$prefix"
13914fi
13915
13916case "$MANPAGE_FORMAT" in
13917(*catonly*)
13918	cf_format=yes
13919	cf_inboth=no
13920	;;
13921(*formatted*)
13922	cf_format=yes
13923	cf_inboth=yes
13924	;;
13925(*)
13926	cf_format=no
13927	cf_inboth=no
13928	;;
13929esac
13930
13931test ! -d man && mkdir man
13932
13933cf_so_strip=
13934cf_compress=
13935case "$MANPAGE_FORMAT" in
13936(*compress*)
13937	cf_so_strip="Z"
13938	cf_compress=compress
13939	;;
13940(*gzip*)
13941	cf_so_strip="gz"
13942	cf_compress=gzip
13943	;;
13944esac
13945
13946cf_edit_man=./edit_man.sh
13947cf_man_alias=`pwd`/man_alias.sed
13948
13949cat >$cf_edit_man <<CF_EOF
13950#! $SHELL
13951# this script is generated by the configure-script CF_MAN_PAGES macro.
13952
13953prefix="$cf_prefix"
13954datarootdir="$datarootdir"
13955datadir="$datadir"
13956
13957NCURSES_MAJOR="$NCURSES_MAJOR"
13958NCURSES_MINOR="$NCURSES_MINOR"
13959NCURSES_PATCH="$NCURSES_PATCH"
13960
13961NCURSES_OSPEED="$NCURSES_OSPEED"
13962TERMINFO="$TERMINFO"
13963
13964INSTALL="$INSTALL"
13965INSTALL_DATA="$INSTALL_DATA"
13966
13967transform="$program_transform_name"
13968
13969TMP=\${TMPDIR:=/tmp}/man\$\$
13970trap "rm -f \$TMP" 0 1 2 3 15
13971
13972form=\$1
13973shift || exit 1
13974
13975verb=\$1
13976shift || exit 1
13977
13978mandir=\$1
13979shift || exit 1
13980
13981srcdir=\$1
13982top_srcdir=\$srcdir/..
13983shift || exit 1
13984
13985if test "\$form" = normal ; then
13986	if test "$cf_format" = yes ; then
13987	if test "$cf_inboth" = no ; then
13988		$SHELL \$0 format \$verb \$mandir \$srcdir \$*
13989		exit $?
13990	fi
13991	fi
13992	cf_subdir=\$mandir/man
13993	cf_tables=$MANPAGE_TBL
13994else
13995	cf_subdir=\$mandir/cat
13996	cf_tables=yes
13997fi
13998
13999# process the list of source-files
14000for i in \$* ; do
14001case \$i in
14002(*.orig|*.rej) ;;
14003(*.[0-9]*)
14004	section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14005	if test \$verb = installing ; then
14006	if test ! -d \$cf_subdir\${section} ; then
14007		mkdir -p \$cf_subdir\$section
14008	fi
14009	fi
14010
14011	# replace variables in man page
14012	if test ! -f $cf_man_alias ; then
14013cat >>$cf_man_alias <<-CF_EOF2
14014		s,@DATADIR@,\$datadir,g
14015		s,@TERMINFO@,\${TERMINFO:="no default value"},g
14016		s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14017		s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14018		s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14019		s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14020		s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14021CF_EOF
14022
14023	for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14024	do
14025		cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14026		cf_name=`echo $cf_name|sed "$program_transform_name"`
14027cat >>$cf_edit_man <<-CF_EOF
14028		s,@$cf_NAME@,$cf_name,g
14029CF_EOF
14030	done
14031
14032cat >>$cf_edit_man <<CF_EOF
14033CF_EOF2
14034		echo "...made $cf_man_alias"
14035	fi
14036
14037	aliases=
14038	cf_source=\`basename \$i\`
14039	inalias=\$cf_source
14040	test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14041	if test ! -f \$inalias ; then
14042		echo .. skipped \$cf_source
14043		continue
14044	fi
14045CF_EOF
14046
14047if test "$MANPAGE_ALIASES" != no ; then
14048cat >>$cf_edit_man <<CF_EOF
14049	nCurses=ignore.3x
14050	test $with_curses_h = yes && nCurses=ncurses.3x
14051	aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14052CF_EOF
14053fi
14054
14055if test "$MANPAGE_RENAMES" = no ; then
14056cat >>$cf_edit_man <<CF_EOF
14057	# perform program transformations for section 1 man pages
14058	if test \$section = 1 ; then
14059		cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14060	else
14061		cf_target=\$cf_subdir\${section}/\$cf_source
14062	fi
14063CF_EOF
14064else
14065cat >>$cf_edit_man <<CF_EOF
14066	cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14067	if test -z "\$cf_target" ; then
14068		echo '? missing rename for '\$cf_source
14069		cf_target="\$cf_source"
14070	fi
14071	cf_target="\$cf_subdir\${section}/\${cf_target}"
14072
14073CF_EOF
14074fi
14075
14076cat >>$cf_edit_man <<CF_EOF
14077	sed	-f $cf_man_alias \\
14078CF_EOF
14079
14080if test -f $MANPAGE_RENAMES ; then
14081cat >>$cf_edit_man <<CF_EOF
14082		< \$i | sed -f `pwd`/edit_man.sed >\$TMP
14083CF_EOF
14084else
14085cat >>$cf_edit_man <<CF_EOF
14086		< \$i >\$TMP
14087CF_EOF
14088fi
14089
14090cat >>$cf_edit_man <<CF_EOF
14091if test \$cf_tables = yes ; then
14092	tbl \$TMP >\$TMP.out
14093	mv \$TMP.out \$TMP
14094fi
14095CF_EOF
14096
14097if test $with_overwrite != yes ; then
14098cat >>$cf_edit_man <<CF_EOF
14099	sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14100	mv \$TMP.out \$TMP
14101CF_EOF
14102fi
14103
14104if test $with_curses_h != yes ; then
14105cat >>$cf_edit_man <<CF_EOF
14106	sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14107	mv \$TMP.out \$TMP
14108CF_EOF
14109fi
14110
14111cat >>$cf_edit_man <<CF_EOF
14112	if test \$form = format ; then
14113		nroff -man \$TMP >\$TMP.out
14114		mv \$TMP.out \$TMP
14115	fi
14116CF_EOF
14117
14118if test -n "$cf_compress" ; then
14119cat >>$cf_edit_man <<CF_EOF
14120	if test \$verb = installing ; then
14121	if ( $cf_compress -f \$TMP )
14122	then
14123		mv \$TMP.$cf_so_strip \$TMP
14124	fi
14125	fi
14126	cf_target="\$cf_target.$cf_so_strip"
14127CF_EOF
14128fi
14129
14130case "$MANPAGE_FORMAT" in
14131(*BSDI*)
14132cat >>$cf_edit_man <<CF_EOF
14133	if test \$form = format ; then
14134		# BSDI installs only .0 suffixes in the cat directories
14135		cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14136	fi
14137CF_EOF
14138  ;;
14139esac
14140
14141cat >>$cf_edit_man <<CF_EOF
14142	suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14143	if test \$verb = installing ; then
14144		echo \$verb \$cf_target
14145		\$INSTALL_DATA \$TMP \$cf_target
14146		test -d \$cf_subdir\${section} &&
14147		test -n "\$aliases" && (
14148			cd \$cf_subdir\${section} && (
14149				cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14150				test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14151				cf_target=\`basename \$cf_target\`
14152				for cf_alias in \$aliases
14153				do
14154					if test \$section = 1 ; then
14155						cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14156					fi
14157
14158					if test "$MANPAGE_SYMLINKS" = yes ; then
14159						if test -f \$cf_alias\${suffix} ; then
14160							if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14161							then
14162								continue
14163							fi
14164						fi
14165						echo .. \$verb alias \$cf_alias\${suffix}
14166CF_EOF
14167case "x$LN_S" in
14168(*-f)
14169cat >>$cf_edit_man <<CF_EOF
14170						$LN_S \$cf_target \$cf_alias\${suffix}
14171CF_EOF
14172	;;
14173(*)
14174cat >>$cf_edit_man <<CF_EOF
14175						rm -f \$cf_alias\${suffix}
14176						$LN_S \$cf_target \$cf_alias\${suffix}
14177CF_EOF
14178	;;
14179esac
14180cat >>$cf_edit_man <<CF_EOF
14181					elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14182						echo ".so \$cf_source" >\$TMP
14183CF_EOF
14184if test -n "$cf_compress" ; then
14185cat >>$cf_edit_man <<CF_EOF
14186						if test -n "$cf_so_strip" ; then
14187							$cf_compress -f \$TMP
14188							mv \$TMP.$cf_so_strip \$TMP
14189						fi
14190CF_EOF
14191fi
14192cat >>$cf_edit_man <<CF_EOF
14193						echo .. \$verb alias \$cf_alias\${suffix}
14194						rm -f \$cf_alias\${suffix}
14195						\$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14196					fi
14197				done
14198			)
14199		)
14200	elif test \$verb = removing ; then
14201		test -f \$cf_target && (
14202			echo \$verb \$cf_target
14203			rm -f \$cf_target
14204		)
14205		test -d \$cf_subdir\${section} &&
14206		test -n "\$aliases" && (
14207			cd \$cf_subdir\${section} && (
14208				for cf_alias in \$aliases
14209				do
14210					if test \$section = 1 ; then
14211						cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14212					fi
14213
14214					echo .. \$verb alias \$cf_alias\${suffix}
14215					rm -f \$cf_alias\${suffix}
14216				done
14217			)
14218		)
14219	else
14220#		echo ".hy 0"
14221		cat \$TMP
14222	fi
14223	;;
14224esac
14225done
14226
14227if test $cf_inboth = yes ; then
14228if test \$form != format ; then
14229	$SHELL \$0 format \$verb \$mandir \$srcdir \$*
14230fi
14231fi
14232
14233exit 0
14234CF_EOF
14235chmod 755 $cf_edit_man
14236
14237###############################################################################
14238
14239### Note that some functions (such as const) are normally disabled anyway.
14240echo "$as_me:14240: checking if you want to build with function extensions" >&5
14241echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14242
14243# Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14244if test "${enable_ext_funcs+set}" = set; then
14245  enableval="$enable_ext_funcs"
14246  with_ext_funcs=$enableval
14247else
14248  with_ext_funcs=yes
14249fi;
14250echo "$as_me:14250: result: $with_ext_funcs" >&5
14251echo "${ECHO_T}$with_ext_funcs" >&6
14252if test "x$with_ext_funcs" = xyes ; then
14253	NCURSES_EXT_FUNCS=1
14254
14255cat >>confdefs.h <<\EOF
14256#define NCURSES_EXT_FUNCS 1
14257EOF
14258
14259cat >>confdefs.h <<\EOF
14260#define HAVE_ASSUME_DEFAULT_COLORS 1
14261EOF
14262
14263cat >>confdefs.h <<\EOF
14264#define HAVE_CURSES_VERSION 1
14265EOF
14266
14267cat >>confdefs.h <<\EOF
14268#define HAVE_HAS_KEY 1
14269EOF
14270
14271cat >>confdefs.h <<\EOF
14272#define HAVE_RESIZETERM 1
14273EOF
14274
14275cat >>confdefs.h <<\EOF
14276#define HAVE_RESIZE_TERM 1
14277EOF
14278
14279cat >>confdefs.h <<\EOF
14280#define HAVE_TERM_ENTRY_H 1
14281EOF
14282
14283cat >>confdefs.h <<\EOF
14284#define HAVE_USE_DEFAULT_COLORS 1
14285EOF
14286
14287cat >>confdefs.h <<\EOF
14288#define HAVE_USE_EXTENDED_NAMES 1
14289EOF
14290
14291cat >>confdefs.h <<\EOF
14292#define HAVE_USE_SCREEN 1
14293EOF
14294
14295cat >>confdefs.h <<\EOF
14296#define HAVE_USE_WINDOW 1
14297EOF
14298
14299cat >>confdefs.h <<\EOF
14300#define HAVE_WRESIZE 1
14301EOF
14302
14303	GENERATED_EXT_FUNCS=generated
14304	test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14305else
14306	NCURSES_EXT_FUNCS=0
14307	GENERATED_EXT_FUNCS=
14308fi
14309
14310echo "$as_me:14310: checking if you want to build with SCREEN extensions" >&5
14311echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14312
14313# Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14314if test "${enable_sp_funcs+set}" = set; then
14315  enableval="$enable_sp_funcs"
14316  with_sp_funcs=$enableval
14317else
14318  with_sp_funcs=$cf_dft_ext_spfuncs
14319fi;
14320echo "$as_me:14320: result: $with_sp_funcs" >&5
14321echo "${ECHO_T}$with_sp_funcs" >&6
14322if test "x$with_sp_funcs" = xyes ; then
14323	NCURSES_SP_FUNCS=1
14324
14325cat >>confdefs.h <<\EOF
14326#define NCURSES_SP_FUNCS 1
14327EOF
14328
14329cat >>confdefs.h <<\EOF
14330#define HAVE_TPUTS_SP 1
14331EOF
14332
14333	GENERATED_SP_FUNCS=generated
14334else
14335	NCURSES_SP_FUNCS=0
14336	GENERATED_SP_FUNCS=
14337fi
14338
14339echo "$as_me:14339: checking if you want to build with terminal-driver" >&5
14340echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14341
14342# Check whether --enable-term-driver or --disable-term-driver was given.
14343if test "${enable_term_driver+set}" = set; then
14344  enableval="$enable_term_driver"
14345  with_term_driver=$enableval
14346else
14347  with_term_driver=no
14348fi;
14349echo "$as_me:14349: result: $with_term_driver" >&5
14350echo "${ECHO_T}$with_term_driver" >&6
14351if test "x$with_term_driver" = xyes ; then
14352
14353cat >>confdefs.h <<\EOF
14354#define USE_TERM_DRIVER 1
14355EOF
14356
14357	if test "x$with_termlib" != xno ; then
14358		{ { echo "$as_me:14358: error: The term-driver option conflicts with the termlib option" >&5
14359echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14360   { (exit 1); exit 1; }; }
14361	fi
14362	if test "x$with_sp_funcs" != xyes ; then
14363		{ { echo "$as_me:14363: error: The term-driver option relies upon sp-funcs" >&5
14364echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14365   { (exit 1); exit 1; }; }
14366	fi
14367fi
14368
14369###   use option --enable-const to turn on use of const beyond that in XSI.
14370echo "$as_me:14370: checking for extended use of const keyword" >&5
14371echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14372
14373# Check whether --enable-const or --disable-const was given.
14374if test "${enable_const+set}" = set; then
14375  enableval="$enable_const"
14376  with_ext_const=$enableval
14377else
14378  with_ext_const=$cf_dft_ext_const
14379fi;
14380echo "$as_me:14380: result: $with_ext_const" >&5
14381echo "${ECHO_T}$with_ext_const" >&6
14382NCURSES_CONST='/*nothing*/'
14383if test "x$with_ext_const" = xyes ; then
14384	NCURSES_CONST=const
14385fi
14386
14387###   use option --enable-ext-colors to turn on use of colors beyond 16.
14388echo "$as_me:14388: checking if you want to use extended colors" >&5
14389echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14390
14391# Check whether --enable-ext-colors or --disable-ext-colors was given.
14392if test "${enable_ext_colors+set}" = set; then
14393  enableval="$enable_ext_colors"
14394  with_ext_colors=$enableval
14395else
14396  with_ext_colors=$cf_dft_ext_colors
14397fi;
14398echo "$as_me:14398: result: $with_ext_colors" >&5
14399echo "${ECHO_T}$with_ext_colors" >&6
14400NCURSES_EXT_COLORS=0
14401if test "x$with_ext_colors" = xyes ; then
14402	if test "x$with_widec" != xyes ; then
14403		{ echo "$as_me:14403: WARNING: This option applies only to wide-character library" >&5
14404echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14405	else
14406		# cannot be ABI 5 since it changes sizeof(cchar_t)
14407
14408if test "${with_abi_version+set}" != set; then
14409	case $cf_cv_rel_version in
14410	(5.*)
14411		cf_cv_rel_version=6.0
14412		cf_cv_abi_version=6
14413		{ echo "$as_me:14413: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14414echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14415		;;
14416	esac
14417fi
14418
14419		NCURSES_EXT_COLORS=1
14420
14421cat >>confdefs.h <<\EOF
14422#define NCURSES_EXT_COLORS 1
14423EOF
14424
14425cat >>confdefs.h <<\EOF
14426#define HAVE_ALLOC_PAIR 1
14427EOF
14428
14429cat >>confdefs.h <<\EOF
14430#define HAVE_INIT_EXTENDED_COLOR 1
14431EOF
14432
14433cat >>confdefs.h <<\EOF
14434#define HAVE_RESET_COLOR_PAIRS 1
14435EOF
14436
14437	fi
14438fi
14439
14440###   use option --enable-ext-mouse to modify coding to support 5-button mice
14441echo "$as_me:14441: checking if you want to use extended mouse encoding" >&5
14442echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14443
14444# Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14445if test "${enable_ext_mouse+set}" = set; then
14446  enableval="$enable_ext_mouse"
14447  with_ext_mouse=$enableval
14448else
14449  with_ext_mouse=$cf_dft_ext_mouse
14450fi;
14451echo "$as_me:14451: result: $with_ext_mouse" >&5
14452echo "${ECHO_T}$with_ext_mouse" >&6
14453NCURSES_MOUSE_VERSION=1
14454if test "x$with_ext_mouse" = xyes ; then
14455	NCURSES_MOUSE_VERSION=2
14456
14457if test "${with_abi_version+set}" != set; then
14458	case $cf_cv_rel_version in
14459	(5.*)
14460		cf_cv_rel_version=6.0
14461		cf_cv_abi_version=6
14462		{ echo "$as_me:14462: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14463echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14464		;;
14465	esac
14466fi
14467
14468fi
14469
14470###   use option --enable-ext-putwin to turn on extended screendumps
14471echo "$as_me:14471: checking if you want to use extended putwin/screendump" >&5
14472echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14473
14474# Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14475if test "${enable_ext_putwin+set}" = set; then
14476  enableval="$enable_ext_putwin"
14477  with_ext_putwin=$enableval
14478else
14479  with_ext_putwin=$cf_dft_ext_putwin
14480fi;
14481echo "$as_me:14481: result: $with_ext_putwin" >&5
14482echo "${ECHO_T}$with_ext_putwin" >&6
14483if test "x$with_ext_putwin" = xyes ; then
14484
14485cat >>confdefs.h <<\EOF
14486#define NCURSES_EXT_PUTWIN 1
14487EOF
14488
14489fi
14490
14491echo "$as_me:14491: checking if you want \$NCURSES_NO_PADDING code" >&5
14492echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14493
14494# Check whether --enable-no-padding or --disable-no-padding was given.
14495if test "${enable_no_padding+set}" = set; then
14496  enableval="$enable_no_padding"
14497  with_no_padding=$enableval
14498else
14499  with_no_padding=$with_ext_funcs
14500fi;
14501echo "$as_me:14501: result: $with_no_padding" >&5
14502echo "${ECHO_T}$with_no_padding" >&6
14503test "x$with_no_padding" = xyes &&
14504cat >>confdefs.h <<\EOF
14505#define NCURSES_NO_PADDING 1
14506EOF
14507
14508###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14509echo "$as_me:14509: checking if you want SIGWINCH handler" >&5
14510echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14511
14512# Check whether --enable-sigwinch or --disable-sigwinch was given.
14513if test "${enable_sigwinch+set}" = set; then
14514  enableval="$enable_sigwinch"
14515  with_sigwinch=$enableval
14516else
14517  with_sigwinch=$with_ext_funcs
14518fi;
14519echo "$as_me:14519: result: $with_sigwinch" >&5
14520echo "${ECHO_T}$with_sigwinch" >&6
14521test "x$with_sigwinch" = xyes &&
14522cat >>confdefs.h <<\EOF
14523#define USE_SIGWINCH 1
14524EOF
14525
14526###   use option --enable-tcap-names to allow user to define new capabilities
14527echo "$as_me:14527: checking if you want user-definable terminal capabilities like termcap" >&5
14528echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14529
14530# Check whether --enable-tcap-names or --disable-tcap-names was given.
14531if test "${enable_tcap_names+set}" = set; then
14532  enableval="$enable_tcap_names"
14533  with_tcap_names=$enableval
14534else
14535  with_tcap_names=$with_ext_funcs
14536fi;
14537echo "$as_me:14537: result: $with_tcap_names" >&5
14538echo "${ECHO_T}$with_tcap_names" >&6
14539NCURSES_XNAMES=0
14540test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14541
14542##############################################################################
14543
14544echo "$as_me:14544: checking if you want to link with the pthread library" >&5
14545echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14546
14547# Check whether --with-pthread or --without-pthread was given.
14548if test "${with_pthread+set}" = set; then
14549  withval="$with_pthread"
14550  with_pthread=$withval
14551else
14552  with_pthread=no
14553fi;
14554echo "$as_me:14554: result: $with_pthread" >&5
14555echo "${ECHO_T}$with_pthread" >&6
14556
14557if test "$with_pthread" != no ; then
14558	echo "$as_me:14558: checking for pthread.h" >&5
14559echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14560if test "${ac_cv_header_pthread_h+set}" = set; then
14561  echo $ECHO_N "(cached) $ECHO_C" >&6
14562else
14563  cat >conftest.$ac_ext <<_ACEOF
14564#line 14564 "configure"
14565#include "confdefs.h"
14566#include <pthread.h>
14567_ACEOF
14568if { (eval echo "$as_me:14568: \"$ac_cpp conftest.$ac_ext\"") >&5
14569  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14570  ac_status=$?
14571  egrep -v '^ *\+' conftest.er1 >conftest.err
14572  rm -f conftest.er1
14573  cat conftest.err >&5
14574  echo "$as_me:14574: \$? = $ac_status" >&5
14575  (exit $ac_status); } >/dev/null; then
14576  if test -s conftest.err; then
14577    ac_cpp_err=$ac_c_preproc_warn_flag
14578  else
14579    ac_cpp_err=
14580  fi
14581else
14582  ac_cpp_err=yes
14583fi
14584if test -z "$ac_cpp_err"; then
14585  ac_cv_header_pthread_h=yes
14586else
14587  echo "$as_me: failed program was:" >&5
14588  cat conftest.$ac_ext >&5
14589  ac_cv_header_pthread_h=no
14590fi
14591rm -f conftest.err conftest.$ac_ext
14592fi
14593echo "$as_me:14593: result: $ac_cv_header_pthread_h" >&5
14594echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14595if test $ac_cv_header_pthread_h = yes; then
14596
14597cat >>confdefs.h <<\EOF
14598#define HAVE_PTHREADS_H 1
14599EOF
14600
14601	for cf_lib_pthread in pthread c_r
14602	do
14603	    echo "$as_me:14603: checking if we can link with the $cf_lib_pthread library" >&5
14604echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14605	    cf_save_LIBS="$LIBS"
14606
14607cf_add_libs="$LIBS"
14608# reverse order
14609cf_add_0lib=
14610for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14611# filter duplicates
14612for cf_add_1lib in $cf_add_0lib; do
14613	for cf_add_2lib in $cf_add_libs; do
14614		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14615			cf_add_1lib=
14616			break
14617		fi
14618	done
14619	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14620done
14621LIBS="$cf_add_libs"
14622
14623	    cat >conftest.$ac_ext <<_ACEOF
14624#line 14624 "configure"
14625#include "confdefs.h"
14626
14627#include <pthread.h>
14628
14629int
14630main (void)
14631{
14632
14633		int rc = pthread_create(0,0,0,0);
14634		int r2 = pthread_mutexattr_settype(0, 0);
14635
14636  ;
14637  return 0;
14638}
14639_ACEOF
14640rm -f conftest.$ac_objext conftest$ac_exeext
14641if { (eval echo "$as_me:14641: \"$ac_link\"") >&5
14642  (eval $ac_link) 2>&5
14643  ac_status=$?
14644  echo "$as_me:14644: \$? = $ac_status" >&5
14645  (exit $ac_status); } &&
14646         { ac_try='test -s conftest$ac_exeext'
14647  { (eval echo "$as_me:14647: \"$ac_try\"") >&5
14648  (eval $ac_try) 2>&5
14649  ac_status=$?
14650  echo "$as_me:14650: \$? = $ac_status" >&5
14651  (exit $ac_status); }; }; then
14652  with_pthread=yes
14653else
14654  echo "$as_me: failed program was:" >&5
14655cat conftest.$ac_ext >&5
14656with_pthread=no
14657fi
14658rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14659	    LIBS="$cf_save_LIBS"
14660	    echo "$as_me:14660: result: $with_pthread" >&5
14661echo "${ECHO_T}$with_pthread" >&6
14662	    test "$with_pthread" = yes && break
14663	done
14664
14665	if test "$with_pthread" = yes ; then
14666
14667cf_add_libs="$LIBS"
14668# reverse order
14669cf_add_0lib=
14670for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14671# filter duplicates
14672for cf_add_1lib in $cf_add_0lib; do
14673	for cf_add_2lib in $cf_add_libs; do
14674		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14675			cf_add_1lib=
14676			break
14677		fi
14678	done
14679	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14680done
14681LIBS="$cf_add_libs"
14682
14683cat >>confdefs.h <<\EOF
14684#define HAVE_LIBPTHREADS 1
14685EOF
14686
14687	else
14688	    { { echo "$as_me:14688: error: Cannot link with pthread library" >&5
14689echo "$as_me: error: Cannot link with pthread library" >&2;}
14690   { (exit 1); exit 1; }; }
14691	fi
14692
14693fi
14694
14695fi
14696
14697if test "x$with_pthread" != xno; then
14698	echo "$as_me:14698: checking for pthread_kill" >&5
14699echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14700if test "${ac_cv_func_pthread_kill+set}" = set; then
14701  echo $ECHO_N "(cached) $ECHO_C" >&6
14702else
14703  cat >conftest.$ac_ext <<_ACEOF
14704#line 14704 "configure"
14705#include "confdefs.h"
14706#define pthread_kill autoconf_temporary
14707#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
14708#undef pthread_kill
14709
14710#ifdef __cplusplus
14711extern "C"
14712#endif
14713
14714/* We use char because int might match the return type of a gcc2
14715   builtin and then its argument prototype would still apply.  */
14716char pthread_kill (void);
14717
14718int
14719main (void)
14720{
14721
14722/* The GNU C library defines stubs for functions which it implements
14723    to always fail with ENOSYS.  Some functions are actually named
14724    something starting with __ and the normal name is an alias.  */
14725#if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14726#error found stub for pthread_kill
14727#endif
14728
14729	return pthread_kill ();
14730  ;
14731  return 0;
14732}
14733_ACEOF
14734rm -f conftest.$ac_objext conftest$ac_exeext
14735if { (eval echo "$as_me:14735: \"$ac_link\"") >&5
14736  (eval $ac_link) 2>&5
14737  ac_status=$?
14738  echo "$as_me:14738: \$? = $ac_status" >&5
14739  (exit $ac_status); } &&
14740         { ac_try='test -s conftest$ac_exeext'
14741  { (eval echo "$as_me:14741: \"$ac_try\"") >&5
14742  (eval $ac_try) 2>&5
14743  ac_status=$?
14744  echo "$as_me:14744: \$? = $ac_status" >&5
14745  (exit $ac_status); }; }; then
14746  ac_cv_func_pthread_kill=yes
14747else
14748  echo "$as_me: failed program was:" >&5
14749cat conftest.$ac_ext >&5
14750ac_cv_func_pthread_kill=no
14751fi
14752rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14753fi
14754echo "$as_me:14754: result: $ac_cv_func_pthread_kill" >&5
14755echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14756if test $ac_cv_func_pthread_kill = yes; then
14757
14758		echo "$as_me:14758: checking if you want to allow EINTR in wgetch with pthreads" >&5
14759echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14760
14761# Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14762if test "${enable_pthreads_eintr+set}" = set; then
14763  enableval="$enable_pthreads_eintr"
14764  use_pthreads_eintr=$enableval
14765else
14766  use_pthreads_eintr=no
14767fi;
14768		echo "$as_me:14768: result: $use_pthreads_eintr" >&5
14769echo "${ECHO_T}$use_pthreads_eintr" >&6
14770		if test "x$use_pthreads_eintr" = xyes ; then
14771
14772cat >>confdefs.h <<\EOF
14773#define USE_PTHREADS_EINTR 1
14774EOF
14775
14776		fi
14777fi
14778
14779	echo "$as_me:14779: checking if you want to use weak-symbols for pthreads" >&5
14780echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14781
14782# Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14783if test "${enable_weak_symbols+set}" = set; then
14784  enableval="$enable_weak_symbols"
14785  use_weak_symbols=$enableval
14786else
14787  use_weak_symbols=no
14788fi;
14789	echo "$as_me:14789: result: $use_weak_symbols" >&5
14790echo "${ECHO_T}$use_weak_symbols" >&6
14791	if test "x$use_weak_symbols" = xyes ; then
14792
14793echo "$as_me:14793: checking if $CC supports weak symbols" >&5
14794echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14795if test "${cf_cv_weak_symbols+set}" = set; then
14796  echo $ECHO_N "(cached) $ECHO_C" >&6
14797else
14798
14799cat >conftest.$ac_ext <<_ACEOF
14800#line 14800 "configure"
14801#include "confdefs.h"
14802
14803#include <stdio.h>
14804int
14805main (void)
14806{
14807
14808#if defined(__GNUC__)
14809#  if defined __USE_ISOC99
14810#    define _cat_pragma(exp)	_Pragma(#exp)
14811#    define _weak_pragma(exp)	_cat_pragma(weak name)
14812#  else
14813#    define _weak_pragma(exp)
14814#  endif
14815#  define _declare(name)	__extension__ extern __typeof__(name) name
14816#  define weak_symbol(name)	_weak_pragma(name) _declare(name) __attribute__((weak))
14817#endif
14818
14819weak_symbol(fopen);
14820
14821  ;
14822  return 0;
14823}
14824_ACEOF
14825rm -f conftest.$ac_objext
14826if { (eval echo "$as_me:14826: \"$ac_compile\"") >&5
14827  (eval $ac_compile) 2>&5
14828  ac_status=$?
14829  echo "$as_me:14829: \$? = $ac_status" >&5
14830  (exit $ac_status); } &&
14831         { ac_try='test -s conftest.$ac_objext'
14832  { (eval echo "$as_me:14832: \"$ac_try\"") >&5
14833  (eval $ac_try) 2>&5
14834  ac_status=$?
14835  echo "$as_me:14835: \$? = $ac_status" >&5
14836  (exit $ac_status); }; }; then
14837  cf_cv_weak_symbols=yes
14838else
14839  echo "$as_me: failed program was:" >&5
14840cat conftest.$ac_ext >&5
14841cf_cv_weak_symbols=no
14842fi
14843rm -f conftest.$ac_objext conftest.$ac_ext
14844
14845fi
14846echo "$as_me:14846: result: $cf_cv_weak_symbols" >&5
14847echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14848
14849	else
14850		cf_cv_weak_symbols=no
14851	fi
14852
14853	if test "x$cf_cv_weak_symbols" = xyes ; then
14854
14855cat >>confdefs.h <<\EOF
14856#define USE_WEAK_SYMBOLS 1
14857EOF
14858
14859	fi
14860fi
14861
14862PTHREAD=
14863if test "x$with_pthread" = "xyes" ; then
14864
14865cat >>confdefs.h <<\EOF
14866#define USE_PTHREADS 1
14867EOF
14868
14869	enable_reentrant=yes
14870	if test "x$cf_cv_weak_symbols" = xyes ; then
14871		PTHREAD=-lpthread
14872
14873cf_add_libs="$PRIVATE_LIBS"
14874# reverse order
14875cf_add_0lib=
14876for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14877# filter duplicates
14878for cf_add_1lib in $cf_add_0lib; do
14879	for cf_add_2lib in $cf_add_libs; do
14880		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14881			cf_add_1lib=
14882			break
14883		fi
14884	done
14885	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14886done
14887PRIVATE_LIBS="$cf_add_libs"
14888
14889	fi
14890fi
14891
14892# Reentrant code has to be opaque; there's little advantage to making ncurses
14893# opaque outside of that, so there is no --enable-opaque option.  We can use
14894# this option without --with-pthreads, but this will be always set for
14895# pthreads.
14896echo "$as_me:14896: checking if you want reentrant code" >&5
14897echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14898
14899# Check whether --enable-reentrant or --disable-reentrant was given.
14900if test "${enable_reentrant+set}" = set; then
14901  enableval="$enable_reentrant"
14902  with_reentrant=$enableval
14903else
14904  with_reentrant=no
14905fi;
14906echo "$as_me:14906: result: $with_reentrant" >&5
14907echo "${ECHO_T}$with_reentrant" >&6
14908if test "x$with_reentrant" = xyes ; then
14909	cf_cv_enable_reentrant=1
14910	cf_cv_enable_opaque="NCURSES_INTERNALS"
14911	NCURSES_SIZE_T=int
14912	if test "x$cf_cv_weak_symbols" = xyes ; then
14913
14914# remove pthread library from $LIBS
14915LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ 	]//g' -e 's/-lpthread$//'`
14916
14917cf_add_libs="$TEST_LIBS"
14918# reverse order
14919cf_add_0lib=
14920for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14921# filter duplicates
14922for cf_add_1lib in $cf_add_0lib; do
14923	for cf_add_2lib in $cf_add_libs; do
14924		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14925			cf_add_1lib=
14926			break
14927		fi
14928	done
14929	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14930done
14931TEST_LIBS="$cf_add_libs"
14932
14933cf_add_libs="$TEST_LIBS2"
14934# reverse order
14935cf_add_0lib=
14936for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14937# filter duplicates
14938for cf_add_1lib in $cf_add_0lib; do
14939	for cf_add_2lib in $cf_add_libs; do
14940		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14941			cf_add_1lib=
14942			break
14943		fi
14944	done
14945	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14946done
14947TEST_LIBS2="$cf_add_libs"
14948
14949cf_add_libs="$PRIVATE_LIBS"
14950# reverse order
14951cf_add_0lib=
14952for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14953# filter duplicates
14954for cf_add_1lib in $cf_add_0lib; do
14955	for cf_add_2lib in $cf_add_libs; do
14956		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14957			cf_add_1lib=
14958			break
14959		fi
14960	done
14961	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14962done
14963PRIVATE_LIBS="$cf_add_libs"
14964
14965	else
14966		# when not using weak symbols but with_reentrant,
14967		# add 't' to the library suffix on all platforms
14968		# except cygwin, where we only do that if ALSO
14969		# compiling with full thread support.
14970		case "$host" in
14971		(*cygwin* | *msys*)
14972			if test "$with_pthread" = "yes" ; then
14973				if test "x$disable_lib_suffixes" = "xno" ; then
14974					LIB_SUFFIX="t${LIB_SUFFIX}"
14975				fi
14976			fi ;;
14977		(*)
14978			if test "x$disable_lib_suffixes" = "xno" ; then
14979				LIB_SUFFIX="t${LIB_SUFFIX}"
14980			fi
14981			;;
14982		esac
14983	fi
14984
14985cat >>confdefs.h <<\EOF
14986#define USE_REENTRANT 1
14987EOF
14988
14989if test "${with_abi_version+set}" != set; then
14990	case $cf_cv_rel_version in
14991	(5.*)
14992		cf_cv_rel_version=6.0
14993		cf_cv_abi_version=6
14994		{ echo "$as_me:14994: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14995echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14996		;;
14997	esac
14998fi
14999
15000else
15001	cf_cv_enable_reentrant=0
15002	cf_cv_enable_opaque="NCURSES_OPAQUE"
15003	NCURSES_SIZE_T=short
15004fi
15005
15006echo "$as_me:15006: checking if you want opaque curses-library structures" >&5
15007echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15008
15009# Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15010if test "${enable_opaque_curses+set}" = set; then
15011  enableval="$enable_opaque_curses"
15012  test "$enableval" != yes && enableval=no
15013	if test "$enableval" != "no" ; then
15014    enable_opaque_curses=yes
15015	else
15016
15017	 test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15018	 test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15019
15020	fi
15021else
15022  enableval=no
15023
15024	 test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15025	 test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15026
15027fi;
15028echo "$as_me:15028: result: $enable_opaque_curses" >&5
15029echo "${ECHO_T}$enable_opaque_curses" >&6
15030
15031test "$cf_cv_enable_reentrant" = 1 && \
15032test "$enable_opaque_curses" = no && \
15033{ { echo "$as_me:15033: error: reentrant configuration requires opaque library" >&5
15034echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15035   { (exit 1); exit 1; }; }
15036
15037echo "$as_me:15037: checking if you want opaque form-library structures" >&5
15038echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15039
15040# Check whether --enable-opaque-form or --disable-opaque-form was given.
15041if test "${enable_opaque_form+set}" = set; then
15042  enableval="$enable_opaque_form"
15043  enable_opaque_form=yes
15044else
15045  enable_opaque_form=no
15046fi;
15047echo "$as_me:15047: result: $enable_opaque_form" >&5
15048echo "${ECHO_T}$enable_opaque_form" >&6
15049
15050echo "$as_me:15050: checking if you want opaque menu-library structures" >&5
15051echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15052
15053# Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15054if test "${enable_opaque_menu+set}" = set; then
15055  enableval="$enable_opaque_menu"
15056  enable_opaque_menu=yes
15057else
15058  enable_opaque_menu=no
15059fi;
15060echo "$as_me:15060: result: $enable_opaque_menu" >&5
15061echo "${ECHO_T}$enable_opaque_menu" >&6
15062
15063echo "$as_me:15063: checking if you want opaque panel-library structures" >&5
15064echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15065
15066# Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15067if test "${enable_opaque_panel+set}" = set; then
15068  enableval="$enable_opaque_panel"
15069  enable_opaque_panel=yes
15070else
15071  enable_opaque_panel=no
15072fi;
15073echo "$as_me:15073: result: $enable_opaque_panel" >&5
15074echo "${ECHO_T}$enable_opaque_panel" >&6
15075
15076NCURSES_OPAQUE=0;		test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15077NCURSES_OPAQUE_FORM=0;	test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15078NCURSES_OPAQUE_MENU=0;	test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15079NCURSES_OPAQUE_PANEL=0;	test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15080
15081### Allow using a different wrap-prefix
15082if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15083	echo "$as_me:15083: checking for prefix used to wrap public variables" >&5
15084echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15085
15086# Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15087if test "${with_wrap_prefix+set}" = set; then
15088  withval="$with_wrap_prefix"
15089  NCURSES_WRAP_PREFIX=$withval
15090else
15091  NCURSES_WRAP_PREFIX=_nc_
15092fi;
15093	echo "$as_me:15093: result: $NCURSES_WRAP_PREFIX" >&5
15094echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15095else
15096	NCURSES_WRAP_PREFIX=_nc_
15097fi
15098
15099cat >>confdefs.h <<EOF
15100#define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15101EOF
15102
15103###############################################################################
15104# These options are relatively safe to experiment with.
15105
15106echo "$as_me:15106: checking if you want all development code" >&5
15107echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15108
15109# Check whether --with-develop or --without-develop was given.
15110if test "${with_develop+set}" = set; then
15111  withval="$with_develop"
15112  with_develop=$withval
15113else
15114  with_develop=no
15115fi;
15116echo "$as_me:15116: result: $with_develop" >&5
15117echo "${ECHO_T}$with_develop" >&6
15118
15119###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15120echo "$as_me:15120: checking if you want hard-tabs code" >&5
15121echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15122
15123# Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15124if test "${enable_hard_tabs+set}" = set; then
15125  enableval="$enable_hard_tabs"
15126
15127else
15128  enable_hard_tabs=$with_develop
15129fi;
15130echo "$as_me:15130: result: $enable_hard_tabs" >&5
15131echo "${ECHO_T}$enable_hard_tabs" >&6
15132test "x$enable_hard_tabs" = xyes &&
15133cat >>confdefs.h <<\EOF
15134#define USE_HARD_TABS 1
15135EOF
15136
15137###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15138echo "$as_me:15138: checking if you want limited support for xmc" >&5
15139echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15140
15141# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15142if test "${enable_xmc_glitch+set}" = set; then
15143  enableval="$enable_xmc_glitch"
15144
15145else
15146  enable_xmc_glitch=$with_develop
15147fi;
15148echo "$as_me:15148: result: $enable_xmc_glitch" >&5
15149echo "${ECHO_T}$enable_xmc_glitch" >&6
15150test "x$enable_xmc_glitch" = xyes &&
15151cat >>confdefs.h <<\EOF
15152#define USE_XMC_SUPPORT 1
15153EOF
15154
15155###############################################################################
15156# These are just experimental, probably should not be in a package:
15157
15158echo "$as_me:15158: checking if you do not want to assume colors are white-on-black" >&5
15159echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15160
15161# Check whether --enable-assumed-color or --disable-assumed-color was given.
15162if test "${enable_assumed_color+set}" = set; then
15163  enableval="$enable_assumed_color"
15164  with_assumed_color=$enableval
15165else
15166  with_assumed_color=yes
15167fi;
15168echo "$as_me:15168: result: $with_assumed_color" >&5
15169echo "${ECHO_T}$with_assumed_color" >&6
15170test "x$with_assumed_color" = xyes &&
15171cat >>confdefs.h <<\EOF
15172#define USE_ASSUMED_COLOR 1
15173EOF
15174
15175###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15176echo "$as_me:15176: checking if you want hashmap scrolling-optimization code" >&5
15177echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15178
15179# Check whether --enable-hashmap or --disable-hashmap was given.
15180if test "${enable_hashmap+set}" = set; then
15181  enableval="$enable_hashmap"
15182  with_hashmap=$enableval
15183else
15184  with_hashmap=yes
15185fi;
15186echo "$as_me:15186: result: $with_hashmap" >&5
15187echo "${ECHO_T}$with_hashmap" >&6
15188test "x$with_hashmap" = xyes &&
15189cat >>confdefs.h <<\EOF
15190#define USE_HASHMAP 1
15191EOF
15192
15193###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15194echo "$as_me:15194: checking if you want colorfgbg code" >&5
15195echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15196
15197# Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15198if test "${enable_colorfgbg+set}" = set; then
15199  enableval="$enable_colorfgbg"
15200  with_colorfgbg=$enableval
15201else
15202  with_colorfgbg=no
15203fi;
15204echo "$as_me:15204: result: $with_colorfgbg" >&5
15205echo "${ECHO_T}$with_colorfgbg" >&6
15206test "x$with_colorfgbg" = xyes &&
15207cat >>confdefs.h <<\EOF
15208#define USE_COLORFGBG 1
15209EOF
15210
15211###   use option --enable-interop to turn on use of bindings used for interop
15212echo "$as_me:15212: checking if you want interop bindings" >&5
15213echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15214
15215# Check whether --enable-interop or --disable-interop was given.
15216if test "${enable_interop+set}" = set; then
15217  enableval="$enable_interop"
15218  with_exp_interop=$enableval
15219else
15220  with_exp_interop=$cf_dft_interop
15221fi;
15222echo "$as_me:15222: result: $with_exp_interop" >&5
15223echo "${ECHO_T}$with_exp_interop" >&6
15224
15225NCURSES_INTEROP_FUNCS=0
15226test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15227
15228echo "$as_me:15228: checking if you want experimental safe-sprintf code" >&5
15229echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15230
15231# Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15232if test "${enable_safe_sprintf+set}" = set; then
15233  enableval="$enable_safe_sprintf"
15234  with_safe_sprintf=$enableval
15235else
15236  with_safe_sprintf=no
15237fi;
15238echo "$as_me:15238: result: $with_safe_sprintf" >&5
15239echo "${ECHO_T}$with_safe_sprintf" >&6
15240
15241###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15242# when hashmap is used scroll hints are useless
15243if test "$with_hashmap" = no ; then
15244echo "$as_me:15244: checking if you want to experiment without scrolling-hints code" >&5
15245echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15246
15247# Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15248if test "${enable_scroll_hints+set}" = set; then
15249  enableval="$enable_scroll_hints"
15250  with_scroll_hints=$enableval
15251else
15252  with_scroll_hints=yes
15253fi;
15254echo "$as_me:15254: result: $with_scroll_hints" >&5
15255echo "${ECHO_T}$with_scroll_hints" >&6
15256test "x$with_scroll_hints" = xyes &&
15257cat >>confdefs.h <<\EOF
15258#define USE_SCROLL_HINTS 1
15259EOF
15260
15261fi
15262
15263echo "$as_me:15263: checking if you want wgetch-events code" >&5
15264echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15265
15266# Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15267if test "${enable_wgetch_events+set}" = set; then
15268  enableval="$enable_wgetch_events"
15269  with_wgetch_events=$enableval
15270else
15271  with_wgetch_events=no
15272fi;
15273echo "$as_me:15273: result: $with_wgetch_events" >&5
15274echo "${ECHO_T}$with_wgetch_events" >&6
15275test "x$with_wgetch_events" = xyes &&
15276cat >>confdefs.h <<\EOF
15277#define NCURSES_WGETCH_EVENTS 1
15278EOF
15279
15280###############################################################################
15281
15282###	use option --disable-echo to suppress full display compiling commands
15283
15284echo "$as_me:15284: checking if you want to see long compiling messages" >&5
15285echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15286
15287# Check whether --enable-echo or --disable-echo was given.
15288if test "${enable_echo+set}" = set; then
15289  enableval="$enable_echo"
15290  test "$enableval" != no && enableval=yes
15291	if test "$enableval" != "yes" ; then
15292
15293	ECHO_LT='--silent'
15294	ECHO_LD='@echo linking $@;'
15295	RULE_CC='@echo compiling $<'
15296	SHOW_CC='@echo compiling $@'
15297	ECHO_CC='@'
15298
15299	else
15300
15301	ECHO_LT=''
15302	ECHO_LD=''
15303	RULE_CC=''
15304	SHOW_CC=''
15305	ECHO_CC=''
15306
15307	fi
15308else
15309  enableval=yes
15310
15311	ECHO_LT=''
15312	ECHO_LD=''
15313	RULE_CC=''
15314	SHOW_CC=''
15315	ECHO_CC=''
15316
15317fi;
15318echo "$as_me:15318: result: $enableval" >&5
15319echo "${ECHO_T}$enableval" >&6
15320
15321if test "x$enable_echo" = xyes; then
15322	ECHO_LINK=
15323else
15324	ECHO_LINK='@ echo linking $@ ... ;'
15325	test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
15326	test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
15327fi
15328
15329# --disable-stripping is used for debugging
15330
15331echo "$as_me:15331: checking if you want to install stripped executables" >&5
15332echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
15333
15334# Check whether --enable-stripping or --disable-stripping was given.
15335if test "${enable_stripping+set}" = set; then
15336  enableval="$enable_stripping"
15337  test "$enableval" != no && enableval=yes
15338	if test "$enableval" != "yes" ; then
15339    with_stripping=no
15340	else
15341		with_stripping=yes
15342	fi
15343else
15344  enableval=yes
15345	with_stripping=yes
15346
15347fi;
15348echo "$as_me:15348: result: $with_stripping" >&5
15349echo "${ECHO_T}$with_stripping" >&6
15350
15351if test "$with_stripping" = yes
15352then
15353	INSTALL_OPT_S="-s"
15354else
15355	INSTALL_OPT_S=
15356fi
15357
15358: ${INSTALL:=install}
15359echo "$as_me:15359: checking if install accepts -p option" >&5
15360echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
15361if test "${cf_cv_install_p+set}" = set; then
15362  echo $ECHO_N "(cached) $ECHO_C" >&6
15363else
15364
15365	rm -rf conftest*
15366	date >conftest.in
15367	mkdir conftest.out
15368	sleep 3
15369	if $INSTALL -p conftest.in conftest.out 2>/dev/null
15370	then
15371		if test -f conftest.out/conftest.in
15372		then
15373			test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
15374			test conftest.out/conftest.in -nt conftest.in 2>conftest.err
15375			if test -s conftest.err
15376			then
15377				cf_cv_install_p=no
15378			else
15379				cf_cv_install_p=yes
15380			fi
15381		else
15382			cf_cv_install_p=no
15383		fi
15384	else
15385		cf_cv_install_p=no
15386	fi
15387	rm -rf conftest*
15388
15389fi
15390echo "$as_me:15390: result: $cf_cv_install_p" >&5
15391echo "${ECHO_T}$cf_cv_install_p" >&6
15392
15393echo "$as_me:15393: checking if install needs to be told about ownership" >&5
15394echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
15395case `$ac_config_guess` in
15396(*minix)
15397	with_install_o=yes
15398	;;
15399(*)
15400	with_install_o=no
15401	;;
15402esac
15403
15404echo "$as_me:15404: result: $with_install_o" >&5
15405echo "${ECHO_T}$with_install_o" >&6
15406if test "x$with_install_o" = xyes
15407then
15408	INSTALL_OPT_O=`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`
15409else
15410	INSTALL_OPT_O=
15411fi
15412
15413# If we're avoiding relinking of shared libraries during install, that is to
15414# avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
15415# the install program has "-p" (for preserving timestamps).
15416cf_cv_do_reranlib=yes
15417if test "x$cf_cv_install_p" = xyes
15418then
15419	if test "x$cf_cv_do_relink" != xyes
15420	then
15421		cf_cv_do_reranlib=no
15422		INSTALL_OPT_P="-p"
15423		INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
15424	fi
15425fi
15426
15427###	use option --enable-warnings to turn on all gcc warnings
15428echo "$as_me:15428: checking if you want to see compiler warnings" >&5
15429echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
15430
15431# Check whether --enable-warnings or --disable-warnings was given.
15432if test "${enable_warnings+set}" = set; then
15433  enableval="$enable_warnings"
15434  with_warnings=$enableval
15435fi;
15436echo "$as_me:15436: result: $with_warnings" >&5
15437echo "${ECHO_T}$with_warnings" >&6
15438
15439if test "x$with_warnings" = "xyes"; then
15440
15441 	ADAFLAGS="$ADAFLAGS -gnatg"
15442
15443if test "x$have_x" = xyes; then
15444
15445cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15446cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15447cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15448LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15449for cf_X_CFLAGS in $X_CFLAGS
15450do
15451	case "x$cf_X_CFLAGS" in
15452	x-[IUD]*)
15453		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15454		;;
15455	*)
15456		CFLAGS="$CFLAGS $cf_X_CFLAGS"
15457		;;
15458	esac
15459done
15460
15461cat >conftest.$ac_ext <<_ACEOF
15462#line 15462 "configure"
15463#include "confdefs.h"
15464
15465#include <stdlib.h>
15466#include <X11/Intrinsic.h>
15467
15468int
15469main (void)
15470{
15471String foo = malloc(1)
15472  ;
15473  return 0;
15474}
15475_ACEOF
15476rm -f conftest.$ac_objext
15477if { (eval echo "$as_me:15477: \"$ac_compile\"") >&5
15478  (eval $ac_compile) 2>&5
15479  ac_status=$?
15480  echo "$as_me:15480: \$? = $ac_status" >&5
15481  (exit $ac_status); } &&
15482         { ac_try='test -s conftest.$ac_objext'
15483  { (eval echo "$as_me:15483: \"$ac_try\"") >&5
15484  (eval $ac_try) 2>&5
15485  ac_status=$?
15486  echo "$as_me:15486: \$? = $ac_status" >&5
15487  (exit $ac_status); }; }; then
15488
15489echo "$as_me:15489: checking for X11/Xt const-feature" >&5
15490echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15491if test "${cf_cv_const_x_string+set}" = set; then
15492  echo $ECHO_N "(cached) $ECHO_C" >&6
15493else
15494
15495	cat >conftest.$ac_ext <<_ACEOF
15496#line 15496 "configure"
15497#include "confdefs.h"
15498
15499#define _CONST_X_STRING	/* X11R7.8 (perhaps) */
15500#undef  XTSTRINGDEFINES	/* X11R5 and later */
15501#include <stdlib.h>
15502#include <X11/Intrinsic.h>
15503
15504int
15505main (void)
15506{
15507String foo = malloc(1); *foo = 0
15508  ;
15509  return 0;
15510}
15511_ACEOF
15512rm -f conftest.$ac_objext
15513if { (eval echo "$as_me:15513: \"$ac_compile\"") >&5
15514  (eval $ac_compile) 2>&5
15515  ac_status=$?
15516  echo "$as_me:15516: \$? = $ac_status" >&5
15517  (exit $ac_status); } &&
15518         { ac_try='test -s conftest.$ac_objext'
15519  { (eval echo "$as_me:15519: \"$ac_try\"") >&5
15520  (eval $ac_try) 2>&5
15521  ac_status=$?
15522  echo "$as_me:15522: \$? = $ac_status" >&5
15523  (exit $ac_status); }; }; then
15524
15525			cf_cv_const_x_string=no
15526
15527else
15528  echo "$as_me: failed program was:" >&5
15529cat conftest.$ac_ext >&5
15530
15531			cf_cv_const_x_string=yes
15532
15533fi
15534rm -f conftest.$ac_objext conftest.$ac_ext
15535
15536fi
15537echo "$as_me:15537: result: $cf_cv_const_x_string" >&5
15538echo "${ECHO_T}$cf_cv_const_x_string" >&6
15539
15540LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15541CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15542CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15543
15544case $cf_cv_const_x_string in
15545(no)
15546
15547	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15548	CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15549
15550	;;
15551(*)
15552
15553	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15554	CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15555
15556	;;
15557esac
15558
15559else
15560  echo "$as_me: failed program was:" >&5
15561cat conftest.$ac_ext >&5
15562fi
15563rm -f conftest.$ac_objext conftest.$ac_ext
15564 fi
15565cat > conftest.$ac_ext <<EOF
15566#line 15566 "${as_me:-configure}"
15567int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15568EOF
15569if test "$INTEL_COMPILER" = yes
15570then
15571# The "-wdXXX" options suppress warnings:
15572# remark #1419: external declaration in primary source file
15573# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15574# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15575# remark #193: zero used for undefined preprocessing identifier
15576# remark #593: variable "curs_sb_left_arrow" was set but never used
15577# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15578# remark #869: parameter "tw" was never referenced
15579# remark #981: operands are evaluated in unspecified order
15580# warning #279: controlling expression is constant
15581
15582	{ echo "$as_me:15582: checking for $CC warning options..." >&5
15583echo "$as_me: checking for $CC warning options..." >&6;}
15584	cf_save_CFLAGS="$CFLAGS"
15585	EXTRA_CFLAGS="-Wall"
15586	for cf_opt in \
15587		wd1419 \
15588		wd1683 \
15589		wd1684 \
15590		wd193 \
15591		wd593 \
15592		wd279 \
15593		wd810 \
15594		wd869 \
15595		wd981
15596	do
15597		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15598		if { (eval echo "$as_me:15598: \"$ac_compile\"") >&5
15599  (eval $ac_compile) 2>&5
15600  ac_status=$?
15601  echo "$as_me:15601: \$? = $ac_status" >&5
15602  (exit $ac_status); }; then
15603			test -n "$verbose" && echo "$as_me:15603: result: ... -$cf_opt" >&5
15604echo "${ECHO_T}... -$cf_opt" >&6
15605			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15606		fi
15607	done
15608	CFLAGS="$cf_save_CFLAGS"
15609elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15610then
15611	{ echo "$as_me:15611: checking for $CC warning options..." >&5
15612echo "$as_me: checking for $CC warning options..." >&6;}
15613	cf_save_CFLAGS="$CFLAGS"
15614	EXTRA_CFLAGS=
15615	cf_warn_CONST=""
15616	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15617	cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15618	test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15619	for cf_opt in W Wall \
15620		Wbad-function-cast \
15621		Wcast-align \
15622		Wcast-qual \
15623		Wdeclaration-after-statement \
15624		Wextra \
15625		Winline \
15626		Wmissing-declarations \
15627		Wmissing-prototypes \
15628		Wnested-externs \
15629		Wpointer-arith \
15630		Wshadow \
15631		Wstrict-prototypes \
15632		Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15633	do
15634		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15635		if { (eval echo "$as_me:15635: \"$ac_compile\"") >&5
15636  (eval $ac_compile) 2>&5
15637  ac_status=$?
15638  echo "$as_me:15638: \$? = $ac_status" >&5
15639  (exit $ac_status); }; then
15640			test -n "$verbose" && echo "$as_me:15640: result: ... -$cf_opt" >&5
15641echo "${ECHO_T}... -$cf_opt" >&6
15642			case $cf_opt in
15643			(Winline)
15644				case $GCC_VERSION in
15645				([34].*)
15646					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
15647
15648echo "${as_me:-configure}:15648: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15649
15650					continue;;
15651				esac
15652				;;
15653			(Wpointer-arith)
15654				case $GCC_VERSION in
15655				([12].*)
15656					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
15657
15658echo "${as_me:-configure}:15658: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15659
15660					continue;;
15661				esac
15662				;;
15663			esac
15664			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15665		fi
15666	done
15667	CFLAGS="$cf_save_CFLAGS"
15668fi
15669rm -rf conftest*
15670
15671	if test "x$cf_with_cxx" = xyes ; then
15672
15673INTEL_CPLUSPLUS=no
15674
15675if test "$GCC" = yes ; then
15676	case $host_os in
15677	(linux*|gnu*)
15678		echo "$as_me:15678: checking if this is really Intel C++ compiler" >&5
15679echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
15680		cf_save_CFLAGS="$CXXFLAGS"
15681		CXXFLAGS="$CXXFLAGS -no-gcc"
15682		cat >conftest.$ac_ext <<_ACEOF
15683#line 15683 "configure"
15684#include "confdefs.h"
15685
15686int
15687main (void)
15688{
15689
15690#ifdef __INTEL_COMPILER
15691#else
15692make an error
15693#endif
15694
15695  ;
15696  return 0;
15697}
15698_ACEOF
15699rm -f conftest.$ac_objext
15700if { (eval echo "$as_me:15700: \"$ac_compile\"") >&5
15701  (eval $ac_compile) 2>&5
15702  ac_status=$?
15703  echo "$as_me:15703: \$? = $ac_status" >&5
15704  (exit $ac_status); } &&
15705         { ac_try='test -s conftest.$ac_objext'
15706  { (eval echo "$as_me:15706: \"$ac_try\"") >&5
15707  (eval $ac_try) 2>&5
15708  ac_status=$?
15709  echo "$as_me:15709: \$? = $ac_status" >&5
15710  (exit $ac_status); }; }; then
15711  INTEL_CPLUSPLUS=yes
15712cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15713
15714else
15715  echo "$as_me: failed program was:" >&5
15716cat conftest.$ac_ext >&5
15717fi
15718rm -f conftest.$ac_objext conftest.$ac_ext
15719		CXXFLAGS="$cf_save_CFLAGS"
15720		echo "$as_me:15720: result: $INTEL_CPLUSPLUS" >&5
15721echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
15722		;;
15723	esac
15724fi
15725
15726CLANG_CPLUSPLUS=no
15727
15728if test "$GCC" = yes ; then
15729	echo "$as_me:15729: checking if this is really Clang C++ compiler" >&5
15730echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
15731	cf_save_CFLAGS="$CXXFLAGS"
15732	CXXFLAGS="$CXXFLAGS -Qunused-arguments"
15733	cat >conftest.$ac_ext <<_ACEOF
15734#line 15734 "configure"
15735#include "confdefs.h"
15736
15737int
15738main (void)
15739{
15740
15741#ifdef __clang__
15742#else
15743make an error
15744#endif
15745
15746  ;
15747  return 0;
15748}
15749_ACEOF
15750rm -f conftest.$ac_objext
15751if { (eval echo "$as_me:15751: \"$ac_compile\"") >&5
15752  (eval $ac_compile) 2>&5
15753  ac_status=$?
15754  echo "$as_me:15754: \$? = $ac_status" >&5
15755  (exit $ac_status); } &&
15756         { ac_try='test -s conftest.$ac_objext'
15757  { (eval echo "$as_me:15757: \"$ac_try\"") >&5
15758  (eval $ac_try) 2>&5
15759  ac_status=$?
15760  echo "$as_me:15760: \$? = $ac_status" >&5
15761  (exit $ac_status); }; }; then
15762  CLANG_CPLUSPLUS=yes
15763cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15764
15765else
15766  echo "$as_me: failed program was:" >&5
15767cat conftest.$ac_ext >&5
15768fi
15769rm -f conftest.$ac_objext conftest.$ac_ext
15770	CXXFLAGS="$cf_save_CFLAGS"
15771	echo "$as_me:15771: result: $CLANG_CPLUSPLUS" >&5
15772echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
15773fi
15774
15775ac_ext=cc
15776ac_cpp='$CXXCPP $CPPFLAGS'
15777ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15778ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15779ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15780ac_main_return=return
15781
15782cat > conftest.$ac_ext <<EOF
15783#line 15783 "configure"
15784int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15785EOF
15786
15787if test "$INTEL_CPLUSPLUS" = yes
15788then
15789# The "-wdXXX" options suppress warnings:
15790# remark #1419: external declaration in primary source file
15791# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15792# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15793# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15794# remark #193: zero used for undefined preprocessing identifier
15795# remark #593: variable "curs_sb_left_arrow" was set but never used
15796# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15797# remark #869: parameter "tw" was never referenced
15798# remark #981: operands are evaluated in unspecified order
15799# warning #269: invalid format string conversion
15800
15801	{ echo "$as_me:15801: checking for $CC warning options..." >&5
15802echo "$as_me: checking for $CC warning options..." >&6;}
15803	cf_save_CXXFLAGS="$CXXFLAGS"
15804	EXTRA_CXXFLAGS="-Wall"
15805	for cf_opt in \
15806		wd1419 \
15807		wd1682 \
15808		wd1683 \
15809		wd1684 \
15810		wd193 \
15811		wd279 \
15812		wd593 \
15813		wd810 \
15814		wd869 \
15815		wd981
15816	do
15817		CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
15818		if { (eval echo "$as_me:15818: \"$ac_compile\"") >&5
15819  (eval $ac_compile) 2>&5
15820  ac_status=$?
15821  echo "$as_me:15821: \$? = $ac_status" >&5
15822  (exit $ac_status); }; then
15823			test -n "$verbose" && echo "$as_me:15823: result: ... -$cf_opt" >&5
15824echo "${ECHO_T}... -$cf_opt" >&6
15825			EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15826		fi
15827	done
15828	CXXFLAGS="$cf_save_CXXFLAGS"
15829
15830elif test "$GXX" = yes
15831then
15832	{ echo "$as_me:15832: checking for $CXX warning options..." >&5
15833echo "$as_me: checking for $CXX warning options..." >&6;}
15834	cf_save_CXXFLAGS="$CXXFLAGS"
15835	EXTRA_CXXFLAGS="-W -Wall"
15836	cf_gxx_extra_warnings=""
15837	test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
15838	case "$GCC_VERSION" in
15839	([1-2].*)
15840		;;
15841	(*)
15842		cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
15843		;;
15844	esac
15845	for cf_opt in \
15846		Wabi \
15847		fabi-version=0 \
15848		Wextra \
15849		Wignored-qualifiers \
15850		Wlogical-op \
15851		Woverloaded-virtual \
15852		Wsign-promo \
15853		Wsynth \
15854		Wold-style-cast \
15855		Wcast-align \
15856		Wcast-qual \
15857		Wpointer-arith \
15858		Wshadow \
15859		Wundef $cf_gxx_extra_warnings Wno-unused
15860	do
15861		CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
15862		if { (eval echo "$as_me:15862: \"$ac_compile\"") >&5
15863  (eval $ac_compile) 2>&5
15864  ac_status=$?
15865  echo "$as_me:15865: \$? = $ac_status" >&5
15866  (exit $ac_status); }; then
15867			test -n "$verbose" && echo "$as_me:15867: result: ... -$cf_opt" >&5
15868echo "${ECHO_T}... -$cf_opt" >&6
15869			EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15870		else
15871			test -n "$verbose" && echo "$as_me:15871: result: ... no -$cf_opt" >&5
15872echo "${ECHO_T}... no -$cf_opt" >&6
15873		fi
15874	done
15875	CXXFLAGS="$cf_save_CXXFLAGS"
15876fi
15877
15878rm -rf conftest*
15879ac_ext=c
15880ac_cpp='$CPP $CPPFLAGS'
15881ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15882ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15883ac_compiler_gnu=$ac_cv_c_compiler_gnu
15884ac_main_return=return
15885
15886	fi
15887fi
15888
15889if test "$GCC" = yes
15890then
15891cat > conftest.i <<EOF
15892#ifndef GCC_PRINTF
15893#define GCC_PRINTF 0
15894#endif
15895#ifndef GCC_SCANF
15896#define GCC_SCANF 0
15897#endif
15898#ifndef GCC_NORETURN
15899#define GCC_NORETURN /* nothing */
15900#endif
15901#ifndef GCC_UNUSED
15902#define GCC_UNUSED /* nothing */
15903#endif
15904EOF
15905if test "$GCC" = yes
15906then
15907	{ echo "$as_me:15907: checking for $CC __attribute__ directives..." >&5
15908echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15909cat > conftest.$ac_ext <<EOF
15910#line 15910 "${as_me:-configure}"
15911#include "confdefs.h"
15912#include "conftest.h"
15913#include "conftest.i"
15914#if	GCC_PRINTF
15915#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15916#else
15917#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15918#endif
15919#if	GCC_SCANF
15920#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15921#else
15922#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15923#endif
15924extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15925extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15926extern void foo(void) GCC_NORETURN;
15927int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15928EOF
15929	cf_printf_attribute=no
15930	cf_scanf_attribute=no
15931	for cf_attribute in scanf printf unused noreturn
15932	do
15933
15934cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15935
15936		cf_directive="__attribute__(($cf_attribute))"
15937		echo "checking for $CC $cf_directive" 1>&5
15938
15939		case $cf_attribute in
15940		(printf)
15941			cf_printf_attribute=yes
15942			cat >conftest.h <<EOF
15943#define GCC_$cf_ATTRIBUTE 1
15944EOF
15945			;;
15946		(scanf)
15947			cf_scanf_attribute=yes
15948			cat >conftest.h <<EOF
15949#define GCC_$cf_ATTRIBUTE 1
15950EOF
15951			;;
15952		(*)
15953			cat >conftest.h <<EOF
15954#define GCC_$cf_ATTRIBUTE $cf_directive
15955EOF
15956			;;
15957		esac
15958
15959		if { (eval echo "$as_me:15959: \"$ac_compile\"") >&5
15960  (eval $ac_compile) 2>&5
15961  ac_status=$?
15962  echo "$as_me:15962: \$? = $ac_status" >&5
15963  (exit $ac_status); }; then
15964			test -n "$verbose" && echo "$as_me:15964: result: ... $cf_attribute" >&5
15965echo "${ECHO_T}... $cf_attribute" >&6
15966			cat conftest.h >>confdefs.h
15967			case $cf_attribute in
15968			(noreturn)
15969
15970cat >>confdefs.h <<EOF
15971#define GCC_NORETURN $cf_directive
15972EOF
15973
15974				;;
15975			(printf)
15976				cf_value='/* nothing */'
15977				if test "$cf_printf_attribute" != no ; then
15978					cf_value='__attribute__((format(printf,fmt,var)))'
15979
15980cat >>confdefs.h <<\EOF
15981#define GCC_PRINTF 1
15982EOF
15983
15984				fi
15985
15986cat >>confdefs.h <<EOF
15987#define GCC_PRINTFLIKE(fmt,var) $cf_value
15988EOF
15989
15990				;;
15991			(scanf)
15992				cf_value='/* nothing */'
15993				if test "$cf_scanf_attribute" != no ; then
15994					cf_value='__attribute__((format(scanf,fmt,var)))'
15995
15996cat >>confdefs.h <<\EOF
15997#define GCC_SCANF 1
15998EOF
15999
16000				fi
16001
16002cat >>confdefs.h <<EOF
16003#define GCC_SCANFLIKE(fmt,var) $cf_value
16004EOF
16005
16006				;;
16007			(unused)
16008
16009cat >>confdefs.h <<EOF
16010#define GCC_UNUSED $cf_directive
16011EOF
16012
16013				;;
16014			esac
16015		fi
16016	done
16017else
16018	fgrep define conftest.i >>confdefs.h
16019fi
16020rm -rf conftest*
16021fi
16022
16023echo "$as_me:16023: checking if you want to work around bogus compiler/loader warnings" >&5
16024echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16025
16026# Check whether --enable-string-hacks or --disable-string-hacks was given.
16027if test "${enable_string_hacks+set}" = set; then
16028  enableval="$enable_string_hacks"
16029  with_string_hacks=$enableval
16030else
16031  with_string_hacks=no
16032fi;
16033echo "$as_me:16033: result: $with_string_hacks" >&5
16034echo "${ECHO_T}$with_string_hacks" >&6
16035
16036if test "x$with_string_hacks" = "xyes"; then
16037
16038cat >>confdefs.h <<\EOF
16039#define USE_STRING_HACKS 1
16040EOF
16041
16042	{ echo "$as_me:16042: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16043echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
16044	echo "$as_me:16044: checking for strlcat" >&5
16045echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
16046if test "${ac_cv_func_strlcat+set}" = set; then
16047  echo $ECHO_N "(cached) $ECHO_C" >&6
16048else
16049  cat >conftest.$ac_ext <<_ACEOF
16050#line 16050 "configure"
16051#include "confdefs.h"
16052#define strlcat autoconf_temporary
16053#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
16054#undef strlcat
16055
16056#ifdef __cplusplus
16057extern "C"
16058#endif
16059
16060/* We use char because int might match the return type of a gcc2
16061   builtin and then its argument prototype would still apply.  */
16062char strlcat (void);
16063
16064int
16065main (void)
16066{
16067
16068/* The GNU C library defines stubs for functions which it implements
16069    to always fail with ENOSYS.  Some functions are actually named
16070    something starting with __ and the normal name is an alias.  */
16071#if defined (__stub_strlcat) || defined (__stub___strlcat)
16072#error found stub for strlcat
16073#endif
16074
16075	return strlcat ();
16076  ;
16077  return 0;
16078}
16079_ACEOF
16080rm -f conftest.$ac_objext conftest$ac_exeext
16081if { (eval echo "$as_me:16081: \"$ac_link\"") >&5
16082  (eval $ac_link) 2>&5
16083  ac_status=$?
16084  echo "$as_me:16084: \$? = $ac_status" >&5
16085  (exit $ac_status); } &&
16086         { ac_try='test -s conftest$ac_exeext'
16087  { (eval echo "$as_me:16087: \"$ac_try\"") >&5
16088  (eval $ac_try) 2>&5
16089  ac_status=$?
16090  echo "$as_me:16090: \$? = $ac_status" >&5
16091  (exit $ac_status); }; }; then
16092  ac_cv_func_strlcat=yes
16093else
16094  echo "$as_me: failed program was:" >&5
16095cat conftest.$ac_ext >&5
16096ac_cv_func_strlcat=no
16097fi
16098rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16099fi
16100echo "$as_me:16100: result: $ac_cv_func_strlcat" >&5
16101echo "${ECHO_T}$ac_cv_func_strlcat" >&6
16102if test $ac_cv_func_strlcat = yes; then
16103
16104cat >>confdefs.h <<\EOF
16105#define HAVE_STRLCAT 1
16106EOF
16107
16108else
16109
16110		echo "$as_me:16110: checking for strlcat in -lbsd" >&5
16111echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
16112if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
16113  echo $ECHO_N "(cached) $ECHO_C" >&6
16114else
16115  ac_check_lib_save_LIBS=$LIBS
16116LIBS="-lbsd  $LIBS"
16117cat >conftest.$ac_ext <<_ACEOF
16118#line 16118 "configure"
16119#include "confdefs.h"
16120
16121/* Override any gcc2 internal prototype to avoid an error.  */
16122#ifdef __cplusplus
16123extern "C"
16124#endif
16125/* We use char because int might match the return type of a gcc2
16126   builtin and then its argument prototype would still apply.  */
16127char strlcat ();
16128int
16129main (void)
16130{
16131strlcat ();
16132  ;
16133  return 0;
16134}
16135_ACEOF
16136rm -f conftest.$ac_objext conftest$ac_exeext
16137if { (eval echo "$as_me:16137: \"$ac_link\"") >&5
16138  (eval $ac_link) 2>&5
16139  ac_status=$?
16140  echo "$as_me:16140: \$? = $ac_status" >&5
16141  (exit $ac_status); } &&
16142         { ac_try='test -s conftest$ac_exeext'
16143  { (eval echo "$as_me:16143: \"$ac_try\"") >&5
16144  (eval $ac_try) 2>&5
16145  ac_status=$?
16146  echo "$as_me:16146: \$? = $ac_status" >&5
16147  (exit $ac_status); }; }; then
16148  ac_cv_lib_bsd_strlcat=yes
16149else
16150  echo "$as_me: failed program was:" >&5
16151cat conftest.$ac_ext >&5
16152ac_cv_lib_bsd_strlcat=no
16153fi
16154rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16155LIBS=$ac_check_lib_save_LIBS
16156fi
16157echo "$as_me:16157: result: $ac_cv_lib_bsd_strlcat" >&5
16158echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
16159if test $ac_cv_lib_bsd_strlcat = yes; then
16160
16161cf_add_libs="$LIBS"
16162# reverse order
16163cf_add_0lib=
16164for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16165# filter duplicates
16166for cf_add_1lib in $cf_add_0lib; do
16167	for cf_add_2lib in $cf_add_libs; do
16168		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16169			cf_add_1lib=
16170			break
16171		fi
16172	done
16173	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16174done
16175LIBS="$cf_add_libs"
16176
16177for ac_header in bsd/string.h
16178do
16179as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16180echo "$as_me:16180: checking for $ac_header" >&5
16181echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16182if eval "test \"\${$as_ac_Header+set}\" = set"; then
16183  echo $ECHO_N "(cached) $ECHO_C" >&6
16184else
16185  cat >conftest.$ac_ext <<_ACEOF
16186#line 16186 "configure"
16187#include "confdefs.h"
16188#include <$ac_header>
16189_ACEOF
16190if { (eval echo "$as_me:16190: \"$ac_cpp conftest.$ac_ext\"") >&5
16191  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16192  ac_status=$?
16193  egrep -v '^ *\+' conftest.er1 >conftest.err
16194  rm -f conftest.er1
16195  cat conftest.err >&5
16196  echo "$as_me:16196: \$? = $ac_status" >&5
16197  (exit $ac_status); } >/dev/null; then
16198  if test -s conftest.err; then
16199    ac_cpp_err=$ac_c_preproc_warn_flag
16200  else
16201    ac_cpp_err=
16202  fi
16203else
16204  ac_cpp_err=yes
16205fi
16206if test -z "$ac_cpp_err"; then
16207  eval "$as_ac_Header=yes"
16208else
16209  echo "$as_me: failed program was:" >&5
16210  cat conftest.$ac_ext >&5
16211  eval "$as_ac_Header=no"
16212fi
16213rm -f conftest.err conftest.$ac_ext
16214fi
16215echo "$as_me:16215: result: `eval echo '${'$as_ac_Header'}'`" >&5
16216echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16217if test `eval echo '${'$as_ac_Header'}'` = yes; then
16218  cat >>confdefs.h <<EOF
16219#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16220EOF
16221
16222fi
16223done
16224
16225cat >>confdefs.h <<\EOF
16226#define HAVE_STRLCAT 1
16227EOF
16228
16229fi
16230
16231fi
16232
16233for ac_func in strlcpy snprintf
16234do
16235as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16236echo "$as_me:16236: checking for $ac_func" >&5
16237echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16238if eval "test \"\${$as_ac_var+set}\" = set"; then
16239  echo $ECHO_N "(cached) $ECHO_C" >&6
16240else
16241  cat >conftest.$ac_ext <<_ACEOF
16242#line 16242 "configure"
16243#include "confdefs.h"
16244#define $ac_func autoconf_temporary
16245#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
16246#undef $ac_func
16247
16248#ifdef __cplusplus
16249extern "C"
16250#endif
16251
16252/* We use char because int might match the return type of a gcc2
16253   builtin and then its argument prototype would still apply.  */
16254char $ac_func (void);
16255
16256int
16257main (void)
16258{
16259
16260/* The GNU C library defines stubs for functions which it implements
16261    to always fail with ENOSYS.  Some functions are actually named
16262    something starting with __ and the normal name is an alias.  */
16263#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16264#error found stub for $ac_func
16265#endif
16266
16267	return $ac_func ();
16268  ;
16269  return 0;
16270}
16271_ACEOF
16272rm -f conftest.$ac_objext conftest$ac_exeext
16273if { (eval echo "$as_me:16273: \"$ac_link\"") >&5
16274  (eval $ac_link) 2>&5
16275  ac_status=$?
16276  echo "$as_me:16276: \$? = $ac_status" >&5
16277  (exit $ac_status); } &&
16278         { ac_try='test -s conftest$ac_exeext'
16279  { (eval echo "$as_me:16279: \"$ac_try\"") >&5
16280  (eval $ac_try) 2>&5
16281  ac_status=$?
16282  echo "$as_me:16282: \$? = $ac_status" >&5
16283  (exit $ac_status); }; }; then
16284  eval "$as_ac_var=yes"
16285else
16286  echo "$as_me: failed program was:" >&5
16287cat conftest.$ac_ext >&5
16288eval "$as_ac_var=no"
16289fi
16290rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16291fi
16292echo "$as_me:16292: result: `eval echo '${'$as_ac_var'}'`" >&5
16293echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16294if test `eval echo '${'$as_ac_var'}'` = yes; then
16295  cat >>confdefs.h <<EOF
16296#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16297EOF
16298
16299fi
16300done
16301
16302fi
16303
16304###	use option --enable-assertions to turn on generation of assertion code
16305echo "$as_me:16305: checking if you want to enable runtime assertions" >&5
16306echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16307
16308# Check whether --enable-assertions or --disable-assertions was given.
16309if test "${enable_assertions+set}" = set; then
16310  enableval="$enable_assertions"
16311  with_assertions=$enableval
16312else
16313  with_assertions=no
16314fi;
16315echo "$as_me:16315: result: $with_assertions" >&5
16316echo "${ECHO_T}$with_assertions" >&6
16317if test -n "$GCC"
16318then
16319	if test "$with_assertions" = no
16320	then
16321		CPPFLAGS="$CPPFLAGS -DNDEBUG"
16322	else
16323
16324 	ADAFLAGS="$ADAFLAGS -gnata"
16325
16326	fi
16327fi
16328
16329###	use option --disable-leaks to suppress "permanent" leaks, for testing
16330
16331echo "$as_me:16331: checking if you want to use dmalloc for testing" >&5
16332echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16333
16334# Check whether --with-dmalloc or --without-dmalloc was given.
16335if test "${with_dmalloc+set}" = set; then
16336  withval="$with_dmalloc"
16337
16338cat >>confdefs.h <<EOF
16339#define USE_DMALLOC 1
16340EOF
16341
16342	: ${with_cflags:=-g}
16343	: ${with_no_leaks:=yes}
16344	 with_dmalloc=yes
16345else
16346  with_dmalloc=
16347fi;
16348echo "$as_me:16348: result: ${with_dmalloc:-no}" >&5
16349echo "${ECHO_T}${with_dmalloc:-no}" >&6
16350
16351case .$with_cflags in
16352(.*-g*)
16353	case .$CFLAGS in
16354	(.*-g*)
16355		;;
16356	(*)
16357
16358cf_fix_cppflags=no
16359cf_new_cflags=
16360cf_new_cppflags=
16361cf_new_extra_cppflags=
16362
16363for cf_add_cflags in -g
16364do
16365case $cf_fix_cppflags in
16366(no)
16367	case $cf_add_cflags in
16368	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16369		case $cf_add_cflags in
16370		(-D*)
16371			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16372
16373			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16374				&& test -z "${cf_tst_cflags}" \
16375				&& cf_fix_cppflags=yes
16376
16377			if test $cf_fix_cppflags = yes ; then
16378
16379	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16380	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16381
16382				continue
16383			elif test "${cf_tst_cflags}" = "\"'" ; then
16384
16385	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16386	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16387
16388				continue
16389			fi
16390			;;
16391		esac
16392		case "$CPPFLAGS" in
16393		(*$cf_add_cflags)
16394			;;
16395		(*)
16396			case $cf_add_cflags in
16397			(-D*)
16398				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16399
16400CPPFLAGS=`echo "$CPPFLAGS" | \
16401	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
16402		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
16403
16404				;;
16405			esac
16406
16407	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16408	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16409
16410			;;
16411		esac
16412		;;
16413	(*)
16414
16415	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16416	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16417
16418		;;
16419	esac
16420	;;
16421(yes)
16422
16423	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16424	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16425
16426	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16427
16428	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16429		&& test -z "${cf_tst_cflags}" \
16430		&& cf_fix_cppflags=no
16431	;;
16432esac
16433done
16434
16435if test -n "$cf_new_cflags" ; then
16436
16437	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16438	CFLAGS="${CFLAGS}$cf_new_cflags"
16439
16440fi
16441
16442if test -n "$cf_new_cppflags" ; then
16443
16444	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16445	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16446
16447fi
16448
16449if test -n "$cf_new_extra_cppflags" ; then
16450
16451	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16452	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16453
16454fi
16455
16456		;;
16457	esac
16458	;;
16459esac
16460
16461if test "$with_dmalloc" = yes ; then
16462	echo "$as_me:16462: checking for dmalloc.h" >&5
16463echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16464if test "${ac_cv_header_dmalloc_h+set}" = set; then
16465  echo $ECHO_N "(cached) $ECHO_C" >&6
16466else
16467  cat >conftest.$ac_ext <<_ACEOF
16468#line 16468 "configure"
16469#include "confdefs.h"
16470#include <dmalloc.h>
16471_ACEOF
16472if { (eval echo "$as_me:16472: \"$ac_cpp conftest.$ac_ext\"") >&5
16473  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16474  ac_status=$?
16475  egrep -v '^ *\+' conftest.er1 >conftest.err
16476  rm -f conftest.er1
16477  cat conftest.err >&5
16478  echo "$as_me:16478: \$? = $ac_status" >&5
16479  (exit $ac_status); } >/dev/null; then
16480  if test -s conftest.err; then
16481    ac_cpp_err=$ac_c_preproc_warn_flag
16482  else
16483    ac_cpp_err=
16484  fi
16485else
16486  ac_cpp_err=yes
16487fi
16488if test -z "$ac_cpp_err"; then
16489  ac_cv_header_dmalloc_h=yes
16490else
16491  echo "$as_me: failed program was:" >&5
16492  cat conftest.$ac_ext >&5
16493  ac_cv_header_dmalloc_h=no
16494fi
16495rm -f conftest.err conftest.$ac_ext
16496fi
16497echo "$as_me:16497: result: $ac_cv_header_dmalloc_h" >&5
16498echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
16499if test $ac_cv_header_dmalloc_h = yes; then
16500
16501echo "$as_me:16501: checking for dmalloc_debug in -ldmalloc" >&5
16502echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
16503if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
16504  echo $ECHO_N "(cached) $ECHO_C" >&6
16505else
16506  ac_check_lib_save_LIBS=$LIBS
16507LIBS="-ldmalloc  $LIBS"
16508cat >conftest.$ac_ext <<_ACEOF
16509#line 16509 "configure"
16510#include "confdefs.h"
16511
16512/* Override any gcc2 internal prototype to avoid an error.  */
16513#ifdef __cplusplus
16514extern "C"
16515#endif
16516/* We use char because int might match the return type of a gcc2
16517   builtin and then its argument prototype would still apply.  */
16518char dmalloc_debug ();
16519int
16520main (void)
16521{
16522dmalloc_debug ();
16523  ;
16524  return 0;
16525}
16526_ACEOF
16527rm -f conftest.$ac_objext conftest$ac_exeext
16528if { (eval echo "$as_me:16528: \"$ac_link\"") >&5
16529  (eval $ac_link) 2>&5
16530  ac_status=$?
16531  echo "$as_me:16531: \$? = $ac_status" >&5
16532  (exit $ac_status); } &&
16533         { ac_try='test -s conftest$ac_exeext'
16534  { (eval echo "$as_me:16534: \"$ac_try\"") >&5
16535  (eval $ac_try) 2>&5
16536  ac_status=$?
16537  echo "$as_me:16537: \$? = $ac_status" >&5
16538  (exit $ac_status); }; }; then
16539  ac_cv_lib_dmalloc_dmalloc_debug=yes
16540else
16541  echo "$as_me: failed program was:" >&5
16542cat conftest.$ac_ext >&5
16543ac_cv_lib_dmalloc_dmalloc_debug=no
16544fi
16545rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16546LIBS=$ac_check_lib_save_LIBS
16547fi
16548echo "$as_me:16548: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16549echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16550if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16551  cat >>confdefs.h <<EOF
16552#define HAVE_LIBDMALLOC 1
16553EOF
16554
16555  LIBS="-ldmalloc $LIBS"
16556
16557fi
16558
16559fi
16560
16561fi
16562
16563echo "$as_me:16563: checking if you want to use dbmalloc for testing" >&5
16564echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16565
16566# Check whether --with-dbmalloc or --without-dbmalloc was given.
16567if test "${with_dbmalloc+set}" = set; then
16568  withval="$with_dbmalloc"
16569
16570cat >>confdefs.h <<EOF
16571#define USE_DBMALLOC 1
16572EOF
16573
16574	: ${with_cflags:=-g}
16575	: ${with_no_leaks:=yes}
16576	 with_dbmalloc=yes
16577else
16578  with_dbmalloc=
16579fi;
16580echo "$as_me:16580: result: ${with_dbmalloc:-no}" >&5
16581echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16582
16583case .$with_cflags in
16584(.*-g*)
16585	case .$CFLAGS in
16586	(.*-g*)
16587		;;
16588	(*)
16589
16590cf_fix_cppflags=no
16591cf_new_cflags=
16592cf_new_cppflags=
16593cf_new_extra_cppflags=
16594
16595for cf_add_cflags in -g
16596do
16597case $cf_fix_cppflags in
16598(no)
16599	case $cf_add_cflags in
16600	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16601		case $cf_add_cflags in
16602		(-D*)
16603			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16604
16605			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16606				&& test -z "${cf_tst_cflags}" \
16607				&& cf_fix_cppflags=yes
16608
16609			if test $cf_fix_cppflags = yes ; then
16610
16611	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16612	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16613
16614				continue
16615			elif test "${cf_tst_cflags}" = "\"'" ; then
16616
16617	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16618	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16619
16620				continue
16621			fi
16622			;;
16623		esac
16624		case "$CPPFLAGS" in
16625		(*$cf_add_cflags)
16626			;;
16627		(*)
16628			case $cf_add_cflags in
16629			(-D*)
16630				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16631
16632CPPFLAGS=`echo "$CPPFLAGS" | \
16633	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
16634		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
16635
16636				;;
16637			esac
16638
16639	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16640	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16641
16642			;;
16643		esac
16644		;;
16645	(*)
16646
16647	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16648	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16649
16650		;;
16651	esac
16652	;;
16653(yes)
16654
16655	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16656	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16657
16658	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16659
16660	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16661		&& test -z "${cf_tst_cflags}" \
16662		&& cf_fix_cppflags=no
16663	;;
16664esac
16665done
16666
16667if test -n "$cf_new_cflags" ; then
16668
16669	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16670	CFLAGS="${CFLAGS}$cf_new_cflags"
16671
16672fi
16673
16674if test -n "$cf_new_cppflags" ; then
16675
16676	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16677	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16678
16679fi
16680
16681if test -n "$cf_new_extra_cppflags" ; then
16682
16683	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16684	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16685
16686fi
16687
16688		;;
16689	esac
16690	;;
16691esac
16692
16693if test "$with_dbmalloc" = yes ; then
16694	echo "$as_me:16694: checking for dbmalloc.h" >&5
16695echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16696if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16697  echo $ECHO_N "(cached) $ECHO_C" >&6
16698else
16699  cat >conftest.$ac_ext <<_ACEOF
16700#line 16700 "configure"
16701#include "confdefs.h"
16702#include <dbmalloc.h>
16703_ACEOF
16704if { (eval echo "$as_me:16704: \"$ac_cpp conftest.$ac_ext\"") >&5
16705  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16706  ac_status=$?
16707  egrep -v '^ *\+' conftest.er1 >conftest.err
16708  rm -f conftest.er1
16709  cat conftest.err >&5
16710  echo "$as_me:16710: \$? = $ac_status" >&5
16711  (exit $ac_status); } >/dev/null; then
16712  if test -s conftest.err; then
16713    ac_cpp_err=$ac_c_preproc_warn_flag
16714  else
16715    ac_cpp_err=
16716  fi
16717else
16718  ac_cpp_err=yes
16719fi
16720if test -z "$ac_cpp_err"; then
16721  ac_cv_header_dbmalloc_h=yes
16722else
16723  echo "$as_me: failed program was:" >&5
16724  cat conftest.$ac_ext >&5
16725  ac_cv_header_dbmalloc_h=no
16726fi
16727rm -f conftest.err conftest.$ac_ext
16728fi
16729echo "$as_me:16729: result: $ac_cv_header_dbmalloc_h" >&5
16730echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16731if test $ac_cv_header_dbmalloc_h = yes; then
16732
16733echo "$as_me:16733: checking for debug_malloc in -ldbmalloc" >&5
16734echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16735if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16736  echo $ECHO_N "(cached) $ECHO_C" >&6
16737else
16738  ac_check_lib_save_LIBS=$LIBS
16739LIBS="-ldbmalloc  $LIBS"
16740cat >conftest.$ac_ext <<_ACEOF
16741#line 16741 "configure"
16742#include "confdefs.h"
16743
16744/* Override any gcc2 internal prototype to avoid an error.  */
16745#ifdef __cplusplus
16746extern "C"
16747#endif
16748/* We use char because int might match the return type of a gcc2
16749   builtin and then its argument prototype would still apply.  */
16750char debug_malloc ();
16751int
16752main (void)
16753{
16754debug_malloc ();
16755  ;
16756  return 0;
16757}
16758_ACEOF
16759rm -f conftest.$ac_objext conftest$ac_exeext
16760if { (eval echo "$as_me:16760: \"$ac_link\"") >&5
16761  (eval $ac_link) 2>&5
16762  ac_status=$?
16763  echo "$as_me:16763: \$? = $ac_status" >&5
16764  (exit $ac_status); } &&
16765         { ac_try='test -s conftest$ac_exeext'
16766  { (eval echo "$as_me:16766: \"$ac_try\"") >&5
16767  (eval $ac_try) 2>&5
16768  ac_status=$?
16769  echo "$as_me:16769: \$? = $ac_status" >&5
16770  (exit $ac_status); }; }; then
16771  ac_cv_lib_dbmalloc_debug_malloc=yes
16772else
16773  echo "$as_me: failed program was:" >&5
16774cat conftest.$ac_ext >&5
16775ac_cv_lib_dbmalloc_debug_malloc=no
16776fi
16777rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16778LIBS=$ac_check_lib_save_LIBS
16779fi
16780echo "$as_me:16780: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16781echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16782if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16783  cat >>confdefs.h <<EOF
16784#define HAVE_LIBDBMALLOC 1
16785EOF
16786
16787  LIBS="-ldbmalloc $LIBS"
16788
16789fi
16790
16791fi
16792
16793fi
16794
16795echo "$as_me:16795: checking if you want to use valgrind for testing" >&5
16796echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16797
16798# Check whether --with-valgrind or --without-valgrind was given.
16799if test "${with_valgrind+set}" = set; then
16800  withval="$with_valgrind"
16801
16802cat >>confdefs.h <<EOF
16803#define USE_VALGRIND 1
16804EOF
16805
16806	: ${with_cflags:=-g}
16807	: ${with_no_leaks:=yes}
16808	 with_valgrind=yes
16809else
16810  with_valgrind=
16811fi;
16812echo "$as_me:16812: result: ${with_valgrind:-no}" >&5
16813echo "${ECHO_T}${with_valgrind:-no}" >&6
16814
16815case .$with_cflags in
16816(.*-g*)
16817	case .$CFLAGS in
16818	(.*-g*)
16819		;;
16820	(*)
16821
16822cf_fix_cppflags=no
16823cf_new_cflags=
16824cf_new_cppflags=
16825cf_new_extra_cppflags=
16826
16827for cf_add_cflags in -g
16828do
16829case $cf_fix_cppflags in
16830(no)
16831	case $cf_add_cflags in
16832	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16833		case $cf_add_cflags in
16834		(-D*)
16835			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16836
16837			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16838				&& test -z "${cf_tst_cflags}" \
16839				&& cf_fix_cppflags=yes
16840
16841			if test $cf_fix_cppflags = yes ; then
16842
16843	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16844	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16845
16846				continue
16847			elif test "${cf_tst_cflags}" = "\"'" ; then
16848
16849	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16850	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16851
16852				continue
16853			fi
16854			;;
16855		esac
16856		case "$CPPFLAGS" in
16857		(*$cf_add_cflags)
16858			;;
16859		(*)
16860			case $cf_add_cflags in
16861			(-D*)
16862				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16863
16864CPPFLAGS=`echo "$CPPFLAGS" | \
16865	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
16866		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
16867
16868				;;
16869			esac
16870
16871	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16872	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16873
16874			;;
16875		esac
16876		;;
16877	(*)
16878
16879	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16880	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16881
16882		;;
16883	esac
16884	;;
16885(yes)
16886
16887	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16888	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16889
16890	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16891
16892	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16893		&& test -z "${cf_tst_cflags}" \
16894		&& cf_fix_cppflags=no
16895	;;
16896esac
16897done
16898
16899if test -n "$cf_new_cflags" ; then
16900
16901	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16902	CFLAGS="${CFLAGS}$cf_new_cflags"
16903
16904fi
16905
16906if test -n "$cf_new_cppflags" ; then
16907
16908	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16909	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16910
16911fi
16912
16913if test -n "$cf_new_extra_cppflags" ; then
16914
16915	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16916	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16917
16918fi
16919
16920		;;
16921	esac
16922	;;
16923esac
16924
16925echo "$as_me:16925: checking if you want to perform memory-leak testing" >&5
16926echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16927
16928# Check whether --enable-leaks or --disable-leaks was given.
16929if test "${enable_leaks+set}" = set; then
16930  enableval="$enable_leaks"
16931  if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16932else
16933  : ${with_no_leaks:=no}
16934fi;
16935echo "$as_me:16935: result: $with_no_leaks" >&5
16936echo "${ECHO_T}$with_no_leaks" >&6
16937
16938if test "$with_no_leaks" = yes ; then
16939
16940cat >>confdefs.h <<\EOF
16941#define NO_LEAKS 1
16942EOF
16943
16944cat >>confdefs.h <<\EOF
16945#define YY_NO_LEAKS 1
16946EOF
16947
16948fi
16949
16950cat >>confdefs.h <<\EOF
16951#define HAVE_NC_ALLOC_H 1
16952EOF
16953
16954###	use option --enable-expanded to generate certain macros as functions
16955
16956# Check whether --enable-expanded or --disable-expanded was given.
16957if test "${enable_expanded+set}" = set; then
16958  enableval="$enable_expanded"
16959  test "x$enableval" = xyes &&
16960cat >>confdefs.h <<\EOF
16961#define NCURSES_EXPANDED 1
16962EOF
16963
16964fi;
16965
16966###	use option --disable-macros to suppress macros in favor of functions
16967
16968# Check whether --enable-macros or --disable-macros was given.
16969if test "${enable_macros+set}" = set; then
16970  enableval="$enable_macros"
16971  test "$enableval" = no &&
16972cat >>confdefs.h <<\EOF
16973#define NCURSES_NOMACROS 1
16974EOF
16975
16976fi;
16977
16978# Normally we only add trace() to the debug-library.  Allow this to be
16979# extended to all models of the ncurses library:
16980cf_all_traces=no
16981case "$CFLAGS $CPPFLAGS" in
16982(*-DTRACE*)
16983	cf_all_traces=yes
16984	;;
16985esac
16986
16987echo "$as_me:16987: checking whether to add trace feature to all models" >&5
16988echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16989
16990# Check whether --with-trace or --without-trace was given.
16991if test "${with_trace+set}" = set; then
16992  withval="$with_trace"
16993  cf_with_trace=$withval
16994else
16995  cf_with_trace=$cf_all_traces
16996fi;
16997echo "$as_me:16997: result: $cf_with_trace" >&5
16998echo "${ECHO_T}$cf_with_trace" >&6
16999
17000if test "x$cf_with_trace" = xyes ; then
17001	LIB_TRACING=all
17002	ADA_TRACE=TRUE
17003
17004cf_fix_cppflags=no
17005cf_new_cflags=
17006cf_new_cppflags=
17007cf_new_extra_cppflags=
17008
17009for cf_add_cflags in -DTRACE
17010do
17011case $cf_fix_cppflags in
17012(no)
17013	case $cf_add_cflags in
17014	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17015		case $cf_add_cflags in
17016		(-D*)
17017			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17018
17019			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17020				&& test -z "${cf_tst_cflags}" \
17021				&& cf_fix_cppflags=yes
17022
17023			if test $cf_fix_cppflags = yes ; then
17024
17025	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17026	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17027
17028				continue
17029			elif test "${cf_tst_cflags}" = "\"'" ; then
17030
17031	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17032	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17033
17034				continue
17035			fi
17036			;;
17037		esac
17038		case "$CPPFLAGS" in
17039		(*$cf_add_cflags)
17040			;;
17041		(*)
17042			case $cf_add_cflags in
17043			(-D*)
17044				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17045
17046CPPFLAGS=`echo "$CPPFLAGS" | \
17047	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17048		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17049
17050				;;
17051			esac
17052
17053	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17054	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17055
17056			;;
17057		esac
17058		;;
17059	(*)
17060
17061	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17062	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17063
17064		;;
17065	esac
17066	;;
17067(yes)
17068
17069	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17070	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17071
17072	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17073
17074	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17075		&& test -z "${cf_tst_cflags}" \
17076		&& cf_fix_cppflags=no
17077	;;
17078esac
17079done
17080
17081if test -n "$cf_new_cflags" ; then
17082
17083	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17084	CFLAGS="${CFLAGS}$cf_new_cflags"
17085
17086fi
17087
17088if test -n "$cf_new_cppflags" ; then
17089
17090	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17091	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17092
17093fi
17094
17095if test -n "$cf_new_extra_cppflags" ; then
17096
17097	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17098	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17099
17100fi
17101
17102cat >>confdefs.h <<\EOF
17103#define HAVE__TRACEF 1
17104EOF
17105
17106else
17107	LIB_TRACING=DEBUG
17108	ADA_TRACE=FALSE
17109fi
17110
17111echo "$as_me:17111: checking if we want to use GNAT projects" >&5
17112echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17113
17114# Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17115if test "${enable_gnat_projects+set}" = set; then
17116  enableval="$enable_gnat_projects"
17117  test "$enableval" != no && enableval=yes
17118	if test "$enableval" != "yes" ; then
17119    enable_gnat_projects=no
17120	else
17121		enable_gnat_projects=yes
17122	fi
17123else
17124  enableval=yes
17125	enable_gnat_projects=yes
17126
17127fi;
17128echo "$as_me:17128: result: $enable_gnat_projects" >&5
17129echo "${ECHO_T}$enable_gnat_projects" >&6
17130
17131###	Checks for libraries.
17132case $cf_cv_system_name in
17133(*mingw32*|*mingw64*)
17134	CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
17135	# Note: WINVER may be a problem with Windows 10
17136	;;
17137(*)
17138echo "$as_me:17138: checking for gettimeofday" >&5
17139echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17140if test "${ac_cv_func_gettimeofday+set}" = set; then
17141  echo $ECHO_N "(cached) $ECHO_C" >&6
17142else
17143  cat >conftest.$ac_ext <<_ACEOF
17144#line 17144 "configure"
17145#include "confdefs.h"
17146#define gettimeofday autoconf_temporary
17147#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
17148#undef gettimeofday
17149
17150#ifdef __cplusplus
17151extern "C"
17152#endif
17153
17154/* We use char because int might match the return type of a gcc2
17155   builtin and then its argument prototype would still apply.  */
17156char gettimeofday (void);
17157
17158int
17159main (void)
17160{
17161
17162/* The GNU C library defines stubs for functions which it implements
17163    to always fail with ENOSYS.  Some functions are actually named
17164    something starting with __ and the normal name is an alias.  */
17165#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
17166#error found stub for gettimeofday
17167#endif
17168
17169	return gettimeofday ();
17170  ;
17171  return 0;
17172}
17173_ACEOF
17174rm -f conftest.$ac_objext conftest$ac_exeext
17175if { (eval echo "$as_me:17175: \"$ac_link\"") >&5
17176  (eval $ac_link) 2>&5
17177  ac_status=$?
17178  echo "$as_me:17178: \$? = $ac_status" >&5
17179  (exit $ac_status); } &&
17180         { ac_try='test -s conftest$ac_exeext'
17181  { (eval echo "$as_me:17181: \"$ac_try\"") >&5
17182  (eval $ac_try) 2>&5
17183  ac_status=$?
17184  echo "$as_me:17184: \$? = $ac_status" >&5
17185  (exit $ac_status); }; }; then
17186  ac_cv_func_gettimeofday=yes
17187else
17188  echo "$as_me: failed program was:" >&5
17189cat conftest.$ac_ext >&5
17190ac_cv_func_gettimeofday=no
17191fi
17192rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17193fi
17194echo "$as_me:17194: result: $ac_cv_func_gettimeofday" >&5
17195echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17196if test $ac_cv_func_gettimeofday = yes; then
17197
17198cat >>confdefs.h <<\EOF
17199#define HAVE_GETTIMEOFDAY 1
17200EOF
17201
17202else
17203
17204echo "$as_me:17204: checking for gettimeofday in -lbsd" >&5
17205echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17206if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17207  echo $ECHO_N "(cached) $ECHO_C" >&6
17208else
17209  ac_check_lib_save_LIBS=$LIBS
17210LIBS="-lbsd  $LIBS"
17211cat >conftest.$ac_ext <<_ACEOF
17212#line 17212 "configure"
17213#include "confdefs.h"
17214
17215/* Override any gcc2 internal prototype to avoid an error.  */
17216#ifdef __cplusplus
17217extern "C"
17218#endif
17219/* We use char because int might match the return type of a gcc2
17220   builtin and then its argument prototype would still apply.  */
17221char gettimeofday ();
17222int
17223main (void)
17224{
17225gettimeofday ();
17226  ;
17227  return 0;
17228}
17229_ACEOF
17230rm -f conftest.$ac_objext conftest$ac_exeext
17231if { (eval echo "$as_me:17231: \"$ac_link\"") >&5
17232  (eval $ac_link) 2>&5
17233  ac_status=$?
17234  echo "$as_me:17234: \$? = $ac_status" >&5
17235  (exit $ac_status); } &&
17236         { ac_try='test -s conftest$ac_exeext'
17237  { (eval echo "$as_me:17237: \"$ac_try\"") >&5
17238  (eval $ac_try) 2>&5
17239  ac_status=$?
17240  echo "$as_me:17240: \$? = $ac_status" >&5
17241  (exit $ac_status); }; }; then
17242  ac_cv_lib_bsd_gettimeofday=yes
17243else
17244  echo "$as_me: failed program was:" >&5
17245cat conftest.$ac_ext >&5
17246ac_cv_lib_bsd_gettimeofday=no
17247fi
17248rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17249LIBS=$ac_check_lib_save_LIBS
17250fi
17251echo "$as_me:17251: result: $ac_cv_lib_bsd_gettimeofday" >&5
17252echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17253if test $ac_cv_lib_bsd_gettimeofday = yes; then
17254
17255cat >>confdefs.h <<\EOF
17256#define HAVE_GETTIMEOFDAY 1
17257EOF
17258
17259cf_add_libs="$LIBS"
17260# reverse order
17261cf_add_0lib=
17262for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17263# filter duplicates
17264for cf_add_1lib in $cf_add_0lib; do
17265	for cf_add_2lib in $cf_add_libs; do
17266		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17267			cf_add_1lib=
17268			break
17269		fi
17270	done
17271	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17272done
17273LIBS="$cf_add_libs"
17274
17275fi
17276
17277fi
17278	;;
17279esac
17280
17281echo "$as_me:17281: checking if -lm needed for math functions" >&5
17282echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
17283if test "${cf_cv_need_libm+set}" = set; then
17284  echo $ECHO_N "(cached) $ECHO_C" >&6
17285else
17286
17287	cat >conftest.$ac_ext <<_ACEOF
17288#line 17288 "configure"
17289#include "confdefs.h"
17290
17291	#include <stdio.h>
17292	#include <stdlib.h>
17293	#include <math.h>
17294
17295int
17296main (void)
17297{
17298double x = rand(); printf("result = %g\n", pow(sin(x),x))
17299  ;
17300  return 0;
17301}
17302_ACEOF
17303rm -f conftest.$ac_objext conftest$ac_exeext
17304if { (eval echo "$as_me:17304: \"$ac_link\"") >&5
17305  (eval $ac_link) 2>&5
17306  ac_status=$?
17307  echo "$as_me:17307: \$? = $ac_status" >&5
17308  (exit $ac_status); } &&
17309         { ac_try='test -s conftest$ac_exeext'
17310  { (eval echo "$as_me:17310: \"$ac_try\"") >&5
17311  (eval $ac_try) 2>&5
17312  ac_status=$?
17313  echo "$as_me:17313: \$? = $ac_status" >&5
17314  (exit $ac_status); }; }; then
17315  cf_cv_need_libm=no
17316else
17317  echo "$as_me: failed program was:" >&5
17318cat conftest.$ac_ext >&5
17319cf_cv_need_libm=yes
17320fi
17321rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17322fi
17323echo "$as_me:17323: result: $cf_cv_need_libm" >&5
17324echo "${ECHO_T}$cf_cv_need_libm" >&6
17325if test "$cf_cv_need_libm" = yes
17326then
17327MATH_LIB=-lm
17328fi
17329
17330###	Checks for header files.
17331echo "$as_me:17331: checking for ANSI C header files" >&5
17332echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17333if test "${ac_cv_header_stdc+set}" = set; then
17334  echo $ECHO_N "(cached) $ECHO_C" >&6
17335else
17336  cat >conftest.$ac_ext <<_ACEOF
17337#line 17337 "configure"
17338#include "confdefs.h"
17339#include <stdlib.h>
17340#include <stdarg.h>
17341#include <string.h>
17342#include <float.h>
17343
17344_ACEOF
17345if { (eval echo "$as_me:17345: \"$ac_cpp conftest.$ac_ext\"") >&5
17346  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17347  ac_status=$?
17348  egrep -v '^ *\+' conftest.er1 >conftest.err
17349  rm -f conftest.er1
17350  cat conftest.err >&5
17351  echo "$as_me:17351: \$? = $ac_status" >&5
17352  (exit $ac_status); } >/dev/null; then
17353  if test -s conftest.err; then
17354    ac_cpp_err=$ac_c_preproc_warn_flag
17355  else
17356    ac_cpp_err=
17357  fi
17358else
17359  ac_cpp_err=yes
17360fi
17361if test -z "$ac_cpp_err"; then
17362  ac_cv_header_stdc=yes
17363else
17364  echo "$as_me: failed program was:" >&5
17365  cat conftest.$ac_ext >&5
17366  ac_cv_header_stdc=no
17367fi
17368rm -f conftest.err conftest.$ac_ext
17369
17370if test $ac_cv_header_stdc = yes; then
17371  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17372  cat >conftest.$ac_ext <<_ACEOF
17373#line 17373 "configure"
17374#include "confdefs.h"
17375#include <string.h>
17376
17377_ACEOF
17378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17379  egrep "memchr" >/dev/null 2>&1; then
17380  :
17381else
17382  ac_cv_header_stdc=no
17383fi
17384rm -rf conftest*
17385
17386fi
17387
17388if test $ac_cv_header_stdc = yes; then
17389  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17390  cat >conftest.$ac_ext <<_ACEOF
17391#line 17391 "configure"
17392#include "confdefs.h"
17393#include <stdlib.h>
17394
17395_ACEOF
17396if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17397  egrep "free" >/dev/null 2>&1; then
17398  :
17399else
17400  ac_cv_header_stdc=no
17401fi
17402rm -rf conftest*
17403
17404fi
17405
17406if test $ac_cv_header_stdc = yes; then
17407  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17408  if test "$cross_compiling" = yes; then
17409  :
17410else
17411  cat >conftest.$ac_ext <<_ACEOF
17412#line 17412 "configure"
17413#include "confdefs.h"
17414#include <ctype.h>
17415#if ((' ' & 0x0FF) == 0x020)
17416# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17417# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17418#else
17419# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17420                     || ('j' <= (c) && (c) <= 'r') \
17421                     || ('s' <= (c) && (c) <= 'z'))
17422# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17423#endif
17424
17425#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17426int
17427main (void)
17428{
17429  int i;
17430  for (i = 0; i < 256; i++)
17431    if (XOR (islower (i), ISLOWER (i))
17432        || toupper (i) != TOUPPER (i))
17433      $ac_main_return(2);
17434  $ac_main_return (0);
17435}
17436_ACEOF
17437rm -f conftest$ac_exeext
17438if { (eval echo "$as_me:17438: \"$ac_link\"") >&5
17439  (eval $ac_link) 2>&5
17440  ac_status=$?
17441  echo "$as_me:17441: \$? = $ac_status" >&5
17442  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17443  { (eval echo "$as_me:17443: \"$ac_try\"") >&5
17444  (eval $ac_try) 2>&5
17445  ac_status=$?
17446  echo "$as_me:17446: \$? = $ac_status" >&5
17447  (exit $ac_status); }; }; then
17448  :
17449else
17450  echo "$as_me: program exited with status $ac_status" >&5
17451echo "$as_me: failed program was:" >&5
17452cat conftest.$ac_ext >&5
17453ac_cv_header_stdc=no
17454fi
17455rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17456fi
17457fi
17458fi
17459echo "$as_me:17459: result: $ac_cv_header_stdc" >&5
17460echo "${ECHO_T}$ac_cv_header_stdc" >&6
17461if test $ac_cv_header_stdc = yes; then
17462
17463cat >>confdefs.h <<\EOF
17464#define STDC_HEADERS 1
17465EOF
17466
17467fi
17468
17469ac_header_dirent=no
17470for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17471  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17472echo "$as_me:17472: checking for $ac_hdr that defines DIR" >&5
17473echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
17474if eval "test \"\${$as_ac_Header+set}\" = set"; then
17475  echo $ECHO_N "(cached) $ECHO_C" >&6
17476else
17477  cat >conftest.$ac_ext <<_ACEOF
17478#line 17478 "configure"
17479#include "confdefs.h"
17480#include <sys/types.h>
17481#include <$ac_hdr>
17482
17483int
17484main (void)
17485{
17486if ((DIR *) 0)
17487return 0;
17488  ;
17489  return 0;
17490}
17491_ACEOF
17492rm -f conftest.$ac_objext
17493if { (eval echo "$as_me:17493: \"$ac_compile\"") >&5
17494  (eval $ac_compile) 2>&5
17495  ac_status=$?
17496  echo "$as_me:17496: \$? = $ac_status" >&5
17497  (exit $ac_status); } &&
17498         { ac_try='test -s conftest.$ac_objext'
17499  { (eval echo "$as_me:17499: \"$ac_try\"") >&5
17500  (eval $ac_try) 2>&5
17501  ac_status=$?
17502  echo "$as_me:17502: \$? = $ac_status" >&5
17503  (exit $ac_status); }; }; then
17504  eval "$as_ac_Header=yes"
17505else
17506  echo "$as_me: failed program was:" >&5
17507cat conftest.$ac_ext >&5
17508eval "$as_ac_Header=no"
17509fi
17510rm -f conftest.$ac_objext conftest.$ac_ext
17511fi
17512echo "$as_me:17512: result: `eval echo '${'$as_ac_Header'}'`" >&5
17513echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17514if test `eval echo '${'$as_ac_Header'}'` = yes; then
17515  cat >>confdefs.h <<EOF
17516#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17517EOF
17518
17519ac_header_dirent=$ac_hdr; break
17520fi
17521
17522done
17523# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17524if test $ac_header_dirent = dirent.h; then
17525  echo "$as_me:17525: checking for opendir in -ldir" >&5
17526echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17527if test "${ac_cv_lib_dir_opendir+set}" = set; then
17528  echo $ECHO_N "(cached) $ECHO_C" >&6
17529else
17530  ac_check_lib_save_LIBS=$LIBS
17531LIBS="-ldir  $LIBS"
17532cat >conftest.$ac_ext <<_ACEOF
17533#line 17533 "configure"
17534#include "confdefs.h"
17535
17536/* Override any gcc2 internal prototype to avoid an error.  */
17537#ifdef __cplusplus
17538extern "C"
17539#endif
17540/* We use char because int might match the return type of a gcc2
17541   builtin and then its argument prototype would still apply.  */
17542char opendir ();
17543int
17544main (void)
17545{
17546opendir ();
17547  ;
17548  return 0;
17549}
17550_ACEOF
17551rm -f conftest.$ac_objext conftest$ac_exeext
17552if { (eval echo "$as_me:17552: \"$ac_link\"") >&5
17553  (eval $ac_link) 2>&5
17554  ac_status=$?
17555  echo "$as_me:17555: \$? = $ac_status" >&5
17556  (exit $ac_status); } &&
17557         { ac_try='test -s conftest$ac_exeext'
17558  { (eval echo "$as_me:17558: \"$ac_try\"") >&5
17559  (eval $ac_try) 2>&5
17560  ac_status=$?
17561  echo "$as_me:17561: \$? = $ac_status" >&5
17562  (exit $ac_status); }; }; then
17563  ac_cv_lib_dir_opendir=yes
17564else
17565  echo "$as_me: failed program was:" >&5
17566cat conftest.$ac_ext >&5
17567ac_cv_lib_dir_opendir=no
17568fi
17569rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17570LIBS=$ac_check_lib_save_LIBS
17571fi
17572echo "$as_me:17572: result: $ac_cv_lib_dir_opendir" >&5
17573echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17574if test $ac_cv_lib_dir_opendir = yes; then
17575  LIBS="$LIBS -ldir"
17576fi
17577
17578else
17579  echo "$as_me:17579: checking for opendir in -lx" >&5
17580echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17581if test "${ac_cv_lib_x_opendir+set}" = set; then
17582  echo $ECHO_N "(cached) $ECHO_C" >&6
17583else
17584  ac_check_lib_save_LIBS=$LIBS
17585LIBS="-lx  $LIBS"
17586cat >conftest.$ac_ext <<_ACEOF
17587#line 17587 "configure"
17588#include "confdefs.h"
17589
17590/* Override any gcc2 internal prototype to avoid an error.  */
17591#ifdef __cplusplus
17592extern "C"
17593#endif
17594/* We use char because int might match the return type of a gcc2
17595   builtin and then its argument prototype would still apply.  */
17596char opendir ();
17597int
17598main (void)
17599{
17600opendir ();
17601  ;
17602  return 0;
17603}
17604_ACEOF
17605rm -f conftest.$ac_objext conftest$ac_exeext
17606if { (eval echo "$as_me:17606: \"$ac_link\"") >&5
17607  (eval $ac_link) 2>&5
17608  ac_status=$?
17609  echo "$as_me:17609: \$? = $ac_status" >&5
17610  (exit $ac_status); } &&
17611         { ac_try='test -s conftest$ac_exeext'
17612  { (eval echo "$as_me:17612: \"$ac_try\"") >&5
17613  (eval $ac_try) 2>&5
17614  ac_status=$?
17615  echo "$as_me:17615: \$? = $ac_status" >&5
17616  (exit $ac_status); }; }; then
17617  ac_cv_lib_x_opendir=yes
17618else
17619  echo "$as_me: failed program was:" >&5
17620cat conftest.$ac_ext >&5
17621ac_cv_lib_x_opendir=no
17622fi
17623rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17624LIBS=$ac_check_lib_save_LIBS
17625fi
17626echo "$as_me:17626: result: $ac_cv_lib_x_opendir" >&5
17627echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17628if test $ac_cv_lib_x_opendir = yes; then
17629  LIBS="$LIBS -lx"
17630fi
17631
17632fi
17633
17634echo "$as_me:17634: checking whether time.h and sys/time.h may both be included" >&5
17635echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17636if test "${ac_cv_header_time+set}" = set; then
17637  echo $ECHO_N "(cached) $ECHO_C" >&6
17638else
17639  cat >conftest.$ac_ext <<_ACEOF
17640#line 17640 "configure"
17641#include "confdefs.h"
17642#include <sys/types.h>
17643#include <sys/time.h>
17644#include <time.h>
17645
17646int
17647main (void)
17648{
17649if ((struct tm *) 0)
17650return 0;
17651  ;
17652  return 0;
17653}
17654_ACEOF
17655rm -f conftest.$ac_objext
17656if { (eval echo "$as_me:17656: \"$ac_compile\"") >&5
17657  (eval $ac_compile) 2>&5
17658  ac_status=$?
17659  echo "$as_me:17659: \$? = $ac_status" >&5
17660  (exit $ac_status); } &&
17661         { ac_try='test -s conftest.$ac_objext'
17662  { (eval echo "$as_me:17662: \"$ac_try\"") >&5
17663  (eval $ac_try) 2>&5
17664  ac_status=$?
17665  echo "$as_me:17665: \$? = $ac_status" >&5
17666  (exit $ac_status); }; }; then
17667  ac_cv_header_time=yes
17668else
17669  echo "$as_me: failed program was:" >&5
17670cat conftest.$ac_ext >&5
17671ac_cv_header_time=no
17672fi
17673rm -f conftest.$ac_objext conftest.$ac_ext
17674fi
17675echo "$as_me:17675: result: $ac_cv_header_time" >&5
17676echo "${ECHO_T}$ac_cv_header_time" >&6
17677if test $ac_cv_header_time = yes; then
17678
17679cat >>confdefs.h <<\EOF
17680#define TIME_WITH_SYS_TIME 1
17681EOF
17682
17683fi
17684
17685cf_regex_func=no
17686
17687cf_regex_libs="regex re"
17688case $host_os in
17689(mingw*)
17690	cf_regex_libs="gnurx $cf_regex_libs"
17691	;;
17692esac
17693
17694echo "$as_me:17694: checking for regcomp" >&5
17695echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
17696if test "${ac_cv_func_regcomp+set}" = set; then
17697  echo $ECHO_N "(cached) $ECHO_C" >&6
17698else
17699  cat >conftest.$ac_ext <<_ACEOF
17700#line 17700 "configure"
17701#include "confdefs.h"
17702#define regcomp autoconf_temporary
17703#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
17704#undef regcomp
17705
17706#ifdef __cplusplus
17707extern "C"
17708#endif
17709
17710/* We use char because int might match the return type of a gcc2
17711   builtin and then its argument prototype would still apply.  */
17712char regcomp (void);
17713
17714int
17715main (void)
17716{
17717
17718/* The GNU C library defines stubs for functions which it implements
17719    to always fail with ENOSYS.  Some functions are actually named
17720    something starting with __ and the normal name is an alias.  */
17721#if defined (__stub_regcomp) || defined (__stub___regcomp)
17722#error found stub for regcomp
17723#endif
17724
17725	return regcomp ();
17726  ;
17727  return 0;
17728}
17729_ACEOF
17730rm -f conftest.$ac_objext conftest$ac_exeext
17731if { (eval echo "$as_me:17731: \"$ac_link\"") >&5
17732  (eval $ac_link) 2>&5
17733  ac_status=$?
17734  echo "$as_me:17734: \$? = $ac_status" >&5
17735  (exit $ac_status); } &&
17736         { ac_try='test -s conftest$ac_exeext'
17737  { (eval echo "$as_me:17737: \"$ac_try\"") >&5
17738  (eval $ac_try) 2>&5
17739  ac_status=$?
17740  echo "$as_me:17740: \$? = $ac_status" >&5
17741  (exit $ac_status); }; }; then
17742  ac_cv_func_regcomp=yes
17743else
17744  echo "$as_me: failed program was:" >&5
17745cat conftest.$ac_ext >&5
17746ac_cv_func_regcomp=no
17747fi
17748rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17749fi
17750echo "$as_me:17750: result: $ac_cv_func_regcomp" >&5
17751echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17752if test $ac_cv_func_regcomp = yes; then
17753  cf_regex_func=regcomp
17754else
17755
17756	for cf_regex_lib in $cf_regex_libs
17757	do
17758		as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17759echo "$as_me:17759: checking for regcomp in -l$cf_regex_lib" >&5
17760echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17761if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17762  echo $ECHO_N "(cached) $ECHO_C" >&6
17763else
17764  ac_check_lib_save_LIBS=$LIBS
17765LIBS="-l$cf_regex_lib  $LIBS"
17766cat >conftest.$ac_ext <<_ACEOF
17767#line 17767 "configure"
17768#include "confdefs.h"
17769
17770/* Override any gcc2 internal prototype to avoid an error.  */
17771#ifdef __cplusplus
17772extern "C"
17773#endif
17774/* We use char because int might match the return type of a gcc2
17775   builtin and then its argument prototype would still apply.  */
17776char regcomp ();
17777int
17778main (void)
17779{
17780regcomp ();
17781  ;
17782  return 0;
17783}
17784_ACEOF
17785rm -f conftest.$ac_objext conftest$ac_exeext
17786if { (eval echo "$as_me:17786: \"$ac_link\"") >&5
17787  (eval $ac_link) 2>&5
17788  ac_status=$?
17789  echo "$as_me:17789: \$? = $ac_status" >&5
17790  (exit $ac_status); } &&
17791         { ac_try='test -s conftest$ac_exeext'
17792  { (eval echo "$as_me:17792: \"$ac_try\"") >&5
17793  (eval $ac_try) 2>&5
17794  ac_status=$?
17795  echo "$as_me:17795: \$? = $ac_status" >&5
17796  (exit $ac_status); }; }; then
17797  eval "$as_ac_Lib=yes"
17798else
17799  echo "$as_me: failed program was:" >&5
17800cat conftest.$ac_ext >&5
17801eval "$as_ac_Lib=no"
17802fi
17803rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17804LIBS=$ac_check_lib_save_LIBS
17805fi
17806echo "$as_me:17806: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17807echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17808if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17809
17810cf_add_libs="$LIBS"
17811# reverse order
17812cf_add_0lib=
17813for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17814# filter duplicates
17815for cf_add_1lib in $cf_add_0lib; do
17816	for cf_add_2lib in $cf_add_libs; do
17817		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17818			cf_add_1lib=
17819			break
17820		fi
17821	done
17822	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17823done
17824LIBS="$cf_add_libs"
17825
17826				cf_regex_func=regcomp
17827				break
17828fi
17829
17830	done
17831
17832fi
17833
17834if test "$cf_regex_func" = no ; then
17835	echo "$as_me:17835: checking for compile" >&5
17836echo $ECHO_N "checking for compile... $ECHO_C" >&6
17837if test "${ac_cv_func_compile+set}" = set; then
17838  echo $ECHO_N "(cached) $ECHO_C" >&6
17839else
17840  cat >conftest.$ac_ext <<_ACEOF
17841#line 17841 "configure"
17842#include "confdefs.h"
17843#define compile autoconf_temporary
17844#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
17845#undef compile
17846
17847#ifdef __cplusplus
17848extern "C"
17849#endif
17850
17851/* We use char because int might match the return type of a gcc2
17852   builtin and then its argument prototype would still apply.  */
17853char compile (void);
17854
17855int
17856main (void)
17857{
17858
17859/* The GNU C library defines stubs for functions which it implements
17860    to always fail with ENOSYS.  Some functions are actually named
17861    something starting with __ and the normal name is an alias.  */
17862#if defined (__stub_compile) || defined (__stub___compile)
17863#error found stub for compile
17864#endif
17865
17866	return compile ();
17867  ;
17868  return 0;
17869}
17870_ACEOF
17871rm -f conftest.$ac_objext conftest$ac_exeext
17872if { (eval echo "$as_me:17872: \"$ac_link\"") >&5
17873  (eval $ac_link) 2>&5
17874  ac_status=$?
17875  echo "$as_me:17875: \$? = $ac_status" >&5
17876  (exit $ac_status); } &&
17877         { ac_try='test -s conftest$ac_exeext'
17878  { (eval echo "$as_me:17878: \"$ac_try\"") >&5
17879  (eval $ac_try) 2>&5
17880  ac_status=$?
17881  echo "$as_me:17881: \$? = $ac_status" >&5
17882  (exit $ac_status); }; }; then
17883  ac_cv_func_compile=yes
17884else
17885  echo "$as_me: failed program was:" >&5
17886cat conftest.$ac_ext >&5
17887ac_cv_func_compile=no
17888fi
17889rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17890fi
17891echo "$as_me:17891: result: $ac_cv_func_compile" >&5
17892echo "${ECHO_T}$ac_cv_func_compile" >&6
17893if test $ac_cv_func_compile = yes; then
17894  cf_regex_func=compile
17895else
17896
17897		echo "$as_me:17897: checking for compile in -lgen" >&5
17898echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
17899if test "${ac_cv_lib_gen_compile+set}" = set; then
17900  echo $ECHO_N "(cached) $ECHO_C" >&6
17901else
17902  ac_check_lib_save_LIBS=$LIBS
17903LIBS="-lgen  $LIBS"
17904cat >conftest.$ac_ext <<_ACEOF
17905#line 17905 "configure"
17906#include "confdefs.h"
17907
17908/* Override any gcc2 internal prototype to avoid an error.  */
17909#ifdef __cplusplus
17910extern "C"
17911#endif
17912/* We use char because int might match the return type of a gcc2
17913   builtin and then its argument prototype would still apply.  */
17914char compile ();
17915int
17916main (void)
17917{
17918compile ();
17919  ;
17920  return 0;
17921}
17922_ACEOF
17923rm -f conftest.$ac_objext conftest$ac_exeext
17924if { (eval echo "$as_me:17924: \"$ac_link\"") >&5
17925  (eval $ac_link) 2>&5
17926  ac_status=$?
17927  echo "$as_me:17927: \$? = $ac_status" >&5
17928  (exit $ac_status); } &&
17929         { ac_try='test -s conftest$ac_exeext'
17930  { (eval echo "$as_me:17930: \"$ac_try\"") >&5
17931  (eval $ac_try) 2>&5
17932  ac_status=$?
17933  echo "$as_me:17933: \$? = $ac_status" >&5
17934  (exit $ac_status); }; }; then
17935  ac_cv_lib_gen_compile=yes
17936else
17937  echo "$as_me: failed program was:" >&5
17938cat conftest.$ac_ext >&5
17939ac_cv_lib_gen_compile=no
17940fi
17941rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17942LIBS=$ac_check_lib_save_LIBS
17943fi
17944echo "$as_me:17944: result: $ac_cv_lib_gen_compile" >&5
17945echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
17946if test $ac_cv_lib_gen_compile = yes; then
17947
17948cf_add_libs="$LIBS"
17949# reverse order
17950cf_add_0lib=
17951for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17952# filter duplicates
17953for cf_add_1lib in $cf_add_0lib; do
17954	for cf_add_2lib in $cf_add_libs; do
17955		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17956			cf_add_1lib=
17957			break
17958		fi
17959	done
17960	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17961done
17962LIBS="$cf_add_libs"
17963
17964				cf_regex_func=compile
17965fi
17966
17967fi
17968
17969fi
17970
17971if test "$cf_regex_func" = no ; then
17972	{ echo "$as_me:17972: WARNING: cannot find regular expression library" >&5
17973echo "$as_me: WARNING: cannot find regular expression library" >&2;}
17974fi
17975
17976echo "$as_me:17976: checking for regular-expression headers" >&5
17977echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
17978if test "${cf_cv_regex_hdrs+set}" = set; then
17979  echo $ECHO_N "(cached) $ECHO_C" >&6
17980else
17981
17982cf_cv_regex_hdrs=no
17983case $cf_regex_func in
17984(compile)
17985	for cf_regex_hdr in regexp.h regexpr.h
17986	do
17987		cat >conftest.$ac_ext <<_ACEOF
17988#line 17988 "configure"
17989#include "confdefs.h"
17990#include <$cf_regex_hdr>
17991int
17992main (void)
17993{
17994
17995			char *p = compile("", "", "", 0);
17996			int x = step("", "");
17997
17998  ;
17999  return 0;
18000}
18001_ACEOF
18002rm -f conftest.$ac_objext conftest$ac_exeext
18003if { (eval echo "$as_me:18003: \"$ac_link\"") >&5
18004  (eval $ac_link) 2>&5
18005  ac_status=$?
18006  echo "$as_me:18006: \$? = $ac_status" >&5
18007  (exit $ac_status); } &&
18008         { ac_try='test -s conftest$ac_exeext'
18009  { (eval echo "$as_me:18009: \"$ac_try\"") >&5
18010  (eval $ac_try) 2>&5
18011  ac_status=$?
18012  echo "$as_me:18012: \$? = $ac_status" >&5
18013  (exit $ac_status); }; }; then
18014
18015			cf_cv_regex_hdrs=$cf_regex_hdr
18016			break
18017
18018else
18019  echo "$as_me: failed program was:" >&5
18020cat conftest.$ac_ext >&5
18021fi
18022rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18023	done
18024	;;
18025(*)
18026	for cf_regex_hdr in regex.h
18027	do
18028		cat >conftest.$ac_ext <<_ACEOF
18029#line 18029 "configure"
18030#include "confdefs.h"
18031#include <sys/types.h>
18032#include <$cf_regex_hdr>
18033int
18034main (void)
18035{
18036
18037			regex_t *p;
18038			int x = regcomp(p, "", 0);
18039			int y = regexec(p, "", 0, 0, 0);
18040			regfree(p);
18041
18042  ;
18043  return 0;
18044}
18045_ACEOF
18046rm -f conftest.$ac_objext conftest$ac_exeext
18047if { (eval echo "$as_me:18047: \"$ac_link\"") >&5
18048  (eval $ac_link) 2>&5
18049  ac_status=$?
18050  echo "$as_me:18050: \$? = $ac_status" >&5
18051  (exit $ac_status); } &&
18052         { ac_try='test -s conftest$ac_exeext'
18053  { (eval echo "$as_me:18053: \"$ac_try\"") >&5
18054  (eval $ac_try) 2>&5
18055  ac_status=$?
18056  echo "$as_me:18056: \$? = $ac_status" >&5
18057  (exit $ac_status); }; }; then
18058
18059			cf_cv_regex_hdrs=$cf_regex_hdr
18060			break
18061
18062else
18063  echo "$as_me: failed program was:" >&5
18064cat conftest.$ac_ext >&5
18065fi
18066rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18067	done
18068	;;
18069esac
18070
18071fi
18072echo "$as_me:18072: result: $cf_cv_regex_hdrs" >&5
18073echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18074
18075case $cf_cv_regex_hdrs in
18076	(no)		{ echo "$as_me:18076: WARNING: no regular expression header found" >&5
18077echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18078	(regex.h)
18079cat >>confdefs.h <<\EOF
18080#define HAVE_REGEX_H_FUNCS 1
18081EOF
18082 ;;
18083	(regexp.h)
18084cat >>confdefs.h <<\EOF
18085#define HAVE_REGEXP_H_FUNCS 1
18086EOF
18087 ;;
18088	(regexpr.h)
18089cat >>confdefs.h <<\EOF
18090#define HAVE_REGEXPR_H_FUNCS 1
18091EOF
18092 ;;
18093esac
18094
18095for ac_header in \
18096fcntl.h \
18097getopt.h \
18098limits.h \
18099locale.h \
18100math.h \
18101poll.h \
18102sys/bsdtypes.h \
18103sys/ioctl.h \
18104sys/param.h \
18105sys/poll.h \
18106sys/select.h \
18107sys/time.h \
18108sys/times.h \
18109ttyent.h \
18110unistd.h \
18111wctype.h \
18112
18113do
18114as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18115echo "$as_me:18115: checking for $ac_header" >&5
18116echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18117if eval "test \"\${$as_ac_Header+set}\" = set"; then
18118  echo $ECHO_N "(cached) $ECHO_C" >&6
18119else
18120  cat >conftest.$ac_ext <<_ACEOF
18121#line 18121 "configure"
18122#include "confdefs.h"
18123#include <$ac_header>
18124_ACEOF
18125if { (eval echo "$as_me:18125: \"$ac_cpp conftest.$ac_ext\"") >&5
18126  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18127  ac_status=$?
18128  egrep -v '^ *\+' conftest.er1 >conftest.err
18129  rm -f conftest.er1
18130  cat conftest.err >&5
18131  echo "$as_me:18131: \$? = $ac_status" >&5
18132  (exit $ac_status); } >/dev/null; then
18133  if test -s conftest.err; then
18134    ac_cpp_err=$ac_c_preproc_warn_flag
18135  else
18136    ac_cpp_err=
18137  fi
18138else
18139  ac_cpp_err=yes
18140fi
18141if test -z "$ac_cpp_err"; then
18142  eval "$as_ac_Header=yes"
18143else
18144  echo "$as_me: failed program was:" >&5
18145  cat conftest.$ac_ext >&5
18146  eval "$as_ac_Header=no"
18147fi
18148rm -f conftest.err conftest.$ac_ext
18149fi
18150echo "$as_me:18150: result: `eval echo '${'$as_ac_Header'}'`" >&5
18151echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18152if test `eval echo '${'$as_ac_Header'}'` = yes; then
18153  cat >>confdefs.h <<EOF
18154#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18155EOF
18156
18157fi
18158done
18159
18160for ac_header in unistd.h getopt.h
18161do
18162as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18163echo "$as_me:18163: checking for $ac_header" >&5
18164echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18165if eval "test \"\${$as_ac_Header+set}\" = set"; then
18166  echo $ECHO_N "(cached) $ECHO_C" >&6
18167else
18168  cat >conftest.$ac_ext <<_ACEOF
18169#line 18169 "configure"
18170#include "confdefs.h"
18171#include <$ac_header>
18172_ACEOF
18173if { (eval echo "$as_me:18173: \"$ac_cpp conftest.$ac_ext\"") >&5
18174  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18175  ac_status=$?
18176  egrep -v '^ *\+' conftest.er1 >conftest.err
18177  rm -f conftest.er1
18178  cat conftest.err >&5
18179  echo "$as_me:18179: \$? = $ac_status" >&5
18180  (exit $ac_status); } >/dev/null; then
18181  if test -s conftest.err; then
18182    ac_cpp_err=$ac_c_preproc_warn_flag
18183  else
18184    ac_cpp_err=
18185  fi
18186else
18187  ac_cpp_err=yes
18188fi
18189if test -z "$ac_cpp_err"; then
18190  eval "$as_ac_Header=yes"
18191else
18192  echo "$as_me: failed program was:" >&5
18193  cat conftest.$ac_ext >&5
18194  eval "$as_ac_Header=no"
18195fi
18196rm -f conftest.err conftest.$ac_ext
18197fi
18198echo "$as_me:18198: result: `eval echo '${'$as_ac_Header'}'`" >&5
18199echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18200if test `eval echo '${'$as_ac_Header'}'` = yes; then
18201  cat >>confdefs.h <<EOF
18202#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18203EOF
18204
18205fi
18206done
18207
18208echo "$as_me:18208: checking for header declaring getopt variables" >&5
18209echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18210if test "${cf_cv_getopt_header+set}" = set; then
18211  echo $ECHO_N "(cached) $ECHO_C" >&6
18212else
18213
18214cf_cv_getopt_header=none
18215for cf_header in stdio.h stdlib.h unistd.h getopt.h
18216do
18217cat >conftest.$ac_ext <<_ACEOF
18218#line 18218 "configure"
18219#include "confdefs.h"
18220
18221#include <$cf_header>
18222int
18223main (void)
18224{
18225int x = optind; char *y = optarg
18226  ;
18227  return 0;
18228}
18229_ACEOF
18230rm -f conftest.$ac_objext
18231if { (eval echo "$as_me:18231: \"$ac_compile\"") >&5
18232  (eval $ac_compile) 2>&5
18233  ac_status=$?
18234  echo "$as_me:18234: \$? = $ac_status" >&5
18235  (exit $ac_status); } &&
18236         { ac_try='test -s conftest.$ac_objext'
18237  { (eval echo "$as_me:18237: \"$ac_try\"") >&5
18238  (eval $ac_try) 2>&5
18239  ac_status=$?
18240  echo "$as_me:18240: \$? = $ac_status" >&5
18241  (exit $ac_status); }; }; then
18242  cf_cv_getopt_header=$cf_header
18243 break
18244else
18245  echo "$as_me: failed program was:" >&5
18246cat conftest.$ac_ext >&5
18247fi
18248rm -f conftest.$ac_objext conftest.$ac_ext
18249done
18250
18251fi
18252echo "$as_me:18252: result: $cf_cv_getopt_header" >&5
18253echo "${ECHO_T}$cf_cv_getopt_header" >&6
18254if test $cf_cv_getopt_header != none ; then
18255
18256cat >>confdefs.h <<\EOF
18257#define HAVE_GETOPT_HEADER 1
18258EOF
18259
18260fi
18261if test $cf_cv_getopt_header = getopt.h ; then
18262
18263cat >>confdefs.h <<\EOF
18264#define NEED_GETOPT_H 1
18265EOF
18266
18267fi
18268
18269echo "$as_me:18269: checking if external environ is declared" >&5
18270echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
18271if test "${cf_cv_dcl_environ+set}" = set; then
18272  echo $ECHO_N "(cached) $ECHO_C" >&6
18273else
18274
18275    cat >conftest.$ac_ext <<_ACEOF
18276#line 18276 "configure"
18277#include "confdefs.h"
18278
18279#ifdef HAVE_STDLIB_H
18280#include <stdlib.h>
18281#endif
18282#include <unistd.h>
18283int
18284main (void)
18285{
18286int x = (int) environ
18287  ;
18288  return 0;
18289}
18290_ACEOF
18291rm -f conftest.$ac_objext
18292if { (eval echo "$as_me:18292: \"$ac_compile\"") >&5
18293  (eval $ac_compile) 2>&5
18294  ac_status=$?
18295  echo "$as_me:18295: \$? = $ac_status" >&5
18296  (exit $ac_status); } &&
18297         { ac_try='test -s conftest.$ac_objext'
18298  { (eval echo "$as_me:18298: \"$ac_try\"") >&5
18299  (eval $ac_try) 2>&5
18300  ac_status=$?
18301  echo "$as_me:18301: \$? = $ac_status" >&5
18302  (exit $ac_status); }; }; then
18303  cf_cv_dcl_environ=yes
18304else
18305  echo "$as_me: failed program was:" >&5
18306cat conftest.$ac_ext >&5
18307cf_cv_dcl_environ=no
18308fi
18309rm -f conftest.$ac_objext conftest.$ac_ext
18310
18311fi
18312echo "$as_me:18312: result: $cf_cv_dcl_environ" >&5
18313echo "${ECHO_T}$cf_cv_dcl_environ" >&6
18314
18315if test "$cf_cv_dcl_environ" = no ; then
18316
18317cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18318
18319    cat >>confdefs.h <<EOF
18320#define $cf_result 1
18321EOF
18322
18323fi
18324
18325# It's possible (for near-UNIX clones) that the data doesn't exist
18326
18327echo "$as_me:18327: checking if external environ exists" >&5
18328echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
18329if test "${cf_cv_have_environ+set}" = set; then
18330  echo $ECHO_N "(cached) $ECHO_C" >&6
18331else
18332
18333	cat >conftest.$ac_ext <<_ACEOF
18334#line 18334 "configure"
18335#include "confdefs.h"
18336
18337#undef environ
18338extern int environ;
18339
18340int
18341main (void)
18342{
18343environ = 2
18344  ;
18345  return 0;
18346}
18347_ACEOF
18348rm -f conftest.$ac_objext conftest$ac_exeext
18349if { (eval echo "$as_me:18349: \"$ac_link\"") >&5
18350  (eval $ac_link) 2>&5
18351  ac_status=$?
18352  echo "$as_me:18352: \$? = $ac_status" >&5
18353  (exit $ac_status); } &&
18354         { ac_try='test -s conftest$ac_exeext'
18355  { (eval echo "$as_me:18355: \"$ac_try\"") >&5
18356  (eval $ac_try) 2>&5
18357  ac_status=$?
18358  echo "$as_me:18358: \$? = $ac_status" >&5
18359  (exit $ac_status); }; }; then
18360  cf_cv_have_environ=yes
18361else
18362  echo "$as_me: failed program was:" >&5
18363cat conftest.$ac_ext >&5
18364cf_cv_have_environ=no
18365fi
18366rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18367
18368fi
18369echo "$as_me:18369: result: $cf_cv_have_environ" >&5
18370echo "${ECHO_T}$cf_cv_have_environ" >&6
18371
18372if test "$cf_cv_have_environ" = yes ; then
18373
18374cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18375
18376	cat >>confdefs.h <<EOF
18377#define $cf_result 1
18378EOF
18379
18380fi
18381
18382echo "$as_me:18382: checking for getenv" >&5
18383echo $ECHO_N "checking for getenv... $ECHO_C" >&6
18384if test "${ac_cv_func_getenv+set}" = set; then
18385  echo $ECHO_N "(cached) $ECHO_C" >&6
18386else
18387  cat >conftest.$ac_ext <<_ACEOF
18388#line 18388 "configure"
18389#include "confdefs.h"
18390#define getenv autoconf_temporary
18391#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
18392#undef getenv
18393
18394#ifdef __cplusplus
18395extern "C"
18396#endif
18397
18398/* We use char because int might match the return type of a gcc2
18399   builtin and then its argument prototype would still apply.  */
18400char getenv (void);
18401
18402int
18403main (void)
18404{
18405
18406/* The GNU C library defines stubs for functions which it implements
18407    to always fail with ENOSYS.  Some functions are actually named
18408    something starting with __ and the normal name is an alias.  */
18409#if defined (__stub_getenv) || defined (__stub___getenv)
18410#error found stub for getenv
18411#endif
18412
18413	return getenv ();
18414  ;
18415  return 0;
18416}
18417_ACEOF
18418rm -f conftest.$ac_objext conftest$ac_exeext
18419if { (eval echo "$as_me:18419: \"$ac_link\"") >&5
18420  (eval $ac_link) 2>&5
18421  ac_status=$?
18422  echo "$as_me:18422: \$? = $ac_status" >&5
18423  (exit $ac_status); } &&
18424         { ac_try='test -s conftest$ac_exeext'
18425  { (eval echo "$as_me:18425: \"$ac_try\"") >&5
18426  (eval $ac_try) 2>&5
18427  ac_status=$?
18428  echo "$as_me:18428: \$? = $ac_status" >&5
18429  (exit $ac_status); }; }; then
18430  ac_cv_func_getenv=yes
18431else
18432  echo "$as_me: failed program was:" >&5
18433cat conftest.$ac_ext >&5
18434ac_cv_func_getenv=no
18435fi
18436rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18437fi
18438echo "$as_me:18438: result: $ac_cv_func_getenv" >&5
18439echo "${ECHO_T}$ac_cv_func_getenv" >&6
18440
18441for ac_func in putenv setenv strdup
18442do
18443as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18444echo "$as_me:18444: checking for $ac_func" >&5
18445echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18446if eval "test \"\${$as_ac_var+set}\" = set"; then
18447  echo $ECHO_N "(cached) $ECHO_C" >&6
18448else
18449  cat >conftest.$ac_ext <<_ACEOF
18450#line 18450 "configure"
18451#include "confdefs.h"
18452#define $ac_func autoconf_temporary
18453#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
18454#undef $ac_func
18455
18456#ifdef __cplusplus
18457extern "C"
18458#endif
18459
18460/* We use char because int might match the return type of a gcc2
18461   builtin and then its argument prototype would still apply.  */
18462char $ac_func (void);
18463
18464int
18465main (void)
18466{
18467
18468/* The GNU C library defines stubs for functions which it implements
18469    to always fail with ENOSYS.  Some functions are actually named
18470    something starting with __ and the normal name is an alias.  */
18471#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18472#error found stub for $ac_func
18473#endif
18474
18475	return $ac_func ();
18476  ;
18477  return 0;
18478}
18479_ACEOF
18480rm -f conftest.$ac_objext conftest$ac_exeext
18481if { (eval echo "$as_me:18481: \"$ac_link\"") >&5
18482  (eval $ac_link) 2>&5
18483  ac_status=$?
18484  echo "$as_me:18484: \$? = $ac_status" >&5
18485  (exit $ac_status); } &&
18486         { ac_try='test -s conftest$ac_exeext'
18487  { (eval echo "$as_me:18487: \"$ac_try\"") >&5
18488  (eval $ac_try) 2>&5
18489  ac_status=$?
18490  echo "$as_me:18490: \$? = $ac_status" >&5
18491  (exit $ac_status); }; }; then
18492  eval "$as_ac_var=yes"
18493else
18494  echo "$as_me: failed program was:" >&5
18495cat conftest.$ac_ext >&5
18496eval "$as_ac_var=no"
18497fi
18498rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18499fi
18500echo "$as_me:18500: result: `eval echo '${'$as_ac_var'}'`" >&5
18501echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18502if test `eval echo '${'$as_ac_var'}'` = yes; then
18503  cat >>confdefs.h <<EOF
18504#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18505EOF
18506
18507fi
18508done
18509
18510echo "$as_me:18510: checking if getenv returns consistent values" >&5
18511echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
18512if test "${cf_cv_consistent_getenv+set}" = set; then
18513  echo $ECHO_N "(cached) $ECHO_C" >&6
18514else
18515
18516if test "$cross_compiling" = yes; then
18517  cf_cv_consistent_getenv=unknown
18518else
18519  cat >conftest.$ac_ext <<_ACEOF
18520#line 18520 "configure"
18521#include "confdefs.h"
18522
18523#include <stdlib.h>
18524#include <unistd.h>
18525#include <stdio.h>
18526#include <string.h>
18527#include <sys/types.h>
18528
18529#if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
18530extern char **environ;	/* POSIX, but some systems are not... */
18531#endif
18532
18533#if defined(HAVE_STRDUP)
18534#define str_alloc(s) strdup(s)
18535#else
18536#define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
18537#endif
18538
18539static void set_value(const char *name, const char *value)
18540{
18541#if defined(HAVE_SETENV)
18542	setenv(name, value, 1);
18543#elif defined(HAVE_PUTENV)
18544	char buffer[1024];
18545	sprintf(buffer, "%s=%s", name, value);
18546	putenv(str_alloc(buffer));
18547#else
18548#error neither putenv/setenv found
18549#endif
18550}
18551int main(void)
18552{
18553	int pass;
18554	size_t numenv, limit, j;
18555	char **mynames;
18556	char **myvalues;
18557	char **mypointer;
18558	char *equals;
18559	for (numenv = 0; environ[numenv]; ++numenv) ;
18560	limit = numenv + 10;
18561	mynames = (char **) calloc(limit + 1, sizeof(char *));
18562	myvalues = (char **) calloc(limit + 1, sizeof(char *));
18563	mypointer = (char **) calloc(limit + 1, sizeof(char *));
18564#if defined(HAVE_ENVIRON)
18565	for (j = 0; environ[j]; ++j) {
18566		mynames[j] = str_alloc(environ[j]);
18567		equals = strchr(mynames[j], '=');
18568		if (equals != 0) {
18569			*equals++ = '\0';
18570			myvalues[j] = str_alloc(equals);
18571		} else {
18572			myvalues[j] = str_alloc("");
18573		}
18574	}
18575#endif
18576	for (j = numenv; j < limit; ++j) {
18577		char name[80];
18578		char value[80];
18579		size_t found;
18580		size_t k = 0;
18581		do {
18582			size_t jk;
18583			found = 0;
18584			sprintf(name, "TERM%lu", (unsigned long) k);
18585			for (jk = 0; jk < j; ++jk) {
18586				if (!strcmp(name, mynames[jk])) {
18587					found = 1;
18588					++k;
18589					break;
18590				}
18591			}
18592		} while (found);
18593		sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
18594		set_value(name, value);
18595		mynames[j] = str_alloc(name);
18596		myvalues[j] = str_alloc(value);
18597	}
18598	for (pass = 0; pass < 3; ++pass) {
18599		for (j = 0; j < limit; ++j) {
18600			char *value = getenv(mynames[j]);
18601			if (pass) {
18602				if (value == 0) {
18603					fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
18604					${cf_cv_main_return:-return}(1);
18605				} else if (value != mypointer[j]) {
18606					fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
18607					${cf_cv_main_return:-return}(1);
18608				} else if (strcmp(value, myvalues[j])) {
18609					fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
18610					${cf_cv_main_return:-return}(1);
18611				}
18612			} else {
18613				size_t k;
18614				mypointer[j] = value;
18615				for (k = 0; k < j; ++k) {
18616					if (mypointer[j] == mypointer[k]) {
18617						fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
18618						${cf_cv_main_return:-return}(1);
18619					}
18620				}
18621			}
18622		}
18623	}
18624	${cf_cv_main_return:-return}(0);
18625}
18626
18627_ACEOF
18628rm -f conftest$ac_exeext
18629if { (eval echo "$as_me:18629: \"$ac_link\"") >&5
18630  (eval $ac_link) 2>&5
18631  ac_status=$?
18632  echo "$as_me:18632: \$? = $ac_status" >&5
18633  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18634  { (eval echo "$as_me:18634: \"$ac_try\"") >&5
18635  (eval $ac_try) 2>&5
18636  ac_status=$?
18637  echo "$as_me:18637: \$? = $ac_status" >&5
18638  (exit $ac_status); }; }; then
18639  cf_cv_consistent_getenv=yes
18640else
18641  echo "$as_me: program exited with status $ac_status" >&5
18642echo "$as_me: failed program was:" >&5
18643cat conftest.$ac_ext >&5
18644cf_cv_consistent_getenv=no
18645fi
18646rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18647fi
18648
18649fi
18650echo "$as_me:18650: result: $cf_cv_consistent_getenv" >&5
18651echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
18652
18653if test "x$cf_cv_consistent_getenv" = xno
18654then
18655
18656cat >>confdefs.h <<\EOF
18657#define HAVE_CONSISTENT_GETENV 1
18658EOF
18659
18660fi
18661
18662if test "x$cf_cv_consistent_getenv" = xno && \
18663	test "x$cf_with_trace" = xyes
18664then
18665	{ echo "$as_me:18665: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
18666echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
18667fi
18668
18669# check for ISC (this may also define _POSIX_SOURCE)
18670# Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
18671if test "x$ISC" = xyes ; then
18672
18673echo "$as_me:18673: checking for main in -lcposix" >&5
18674echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
18675if test "${ac_cv_lib_cposix_main+set}" = set; then
18676  echo $ECHO_N "(cached) $ECHO_C" >&6
18677else
18678  ac_check_lib_save_LIBS=$LIBS
18679LIBS="-lcposix  $LIBS"
18680cat >conftest.$ac_ext <<_ACEOF
18681#line 18681 "configure"
18682#include "confdefs.h"
18683
18684int
18685main (void)
18686{
18687main ();
18688  ;
18689  return 0;
18690}
18691_ACEOF
18692rm -f conftest.$ac_objext conftest$ac_exeext
18693if { (eval echo "$as_me:18693: \"$ac_link\"") >&5
18694  (eval $ac_link) 2>&5
18695  ac_status=$?
18696  echo "$as_me:18696: \$? = $ac_status" >&5
18697  (exit $ac_status); } &&
18698         { ac_try='test -s conftest$ac_exeext'
18699  { (eval echo "$as_me:18699: \"$ac_try\"") >&5
18700  (eval $ac_try) 2>&5
18701  ac_status=$?
18702  echo "$as_me:18702: \$? = $ac_status" >&5
18703  (exit $ac_status); }; }; then
18704  ac_cv_lib_cposix_main=yes
18705else
18706  echo "$as_me: failed program was:" >&5
18707cat conftest.$ac_ext >&5
18708ac_cv_lib_cposix_main=no
18709fi
18710rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18711LIBS=$ac_check_lib_save_LIBS
18712fi
18713echo "$as_me:18713: result: $ac_cv_lib_cposix_main" >&5
18714echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
18715if test $ac_cv_lib_cposix_main = yes; then
18716  cat >>confdefs.h <<EOF
18717#define HAVE_LIBCPOSIX 1
18718EOF
18719
18720  LIBS="-lcposix $LIBS"
18721
18722fi
18723
18724	echo "$as_me:18724: checking for bzero in -linet" >&5
18725echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
18726if test "${ac_cv_lib_inet_bzero+set}" = set; then
18727  echo $ECHO_N "(cached) $ECHO_C" >&6
18728else
18729  ac_check_lib_save_LIBS=$LIBS
18730LIBS="-linet  $LIBS"
18731cat >conftest.$ac_ext <<_ACEOF
18732#line 18732 "configure"
18733#include "confdefs.h"
18734
18735/* Override any gcc2 internal prototype to avoid an error.  */
18736#ifdef __cplusplus
18737extern "C"
18738#endif
18739/* We use char because int might match the return type of a gcc2
18740   builtin and then its argument prototype would still apply.  */
18741char bzero ();
18742int
18743main (void)
18744{
18745bzero ();
18746  ;
18747  return 0;
18748}
18749_ACEOF
18750rm -f conftest.$ac_objext conftest$ac_exeext
18751if { (eval echo "$as_me:18751: \"$ac_link\"") >&5
18752  (eval $ac_link) 2>&5
18753  ac_status=$?
18754  echo "$as_me:18754: \$? = $ac_status" >&5
18755  (exit $ac_status); } &&
18756         { ac_try='test -s conftest$ac_exeext'
18757  { (eval echo "$as_me:18757: \"$ac_try\"") >&5
18758  (eval $ac_try) 2>&5
18759  ac_status=$?
18760  echo "$as_me:18760: \$? = $ac_status" >&5
18761  (exit $ac_status); }; }; then
18762  ac_cv_lib_inet_bzero=yes
18763else
18764  echo "$as_me: failed program was:" >&5
18765cat conftest.$ac_ext >&5
18766ac_cv_lib_inet_bzero=no
18767fi
18768rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18769LIBS=$ac_check_lib_save_LIBS
18770fi
18771echo "$as_me:18771: result: $ac_cv_lib_inet_bzero" >&5
18772echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
18773if test $ac_cv_lib_inet_bzero = yes; then
18774
18775cf_add_libs="$LIBS"
18776# reverse order
18777cf_add_0lib=
18778for cf_add_1lib in -linet; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18779# filter duplicates
18780for cf_add_1lib in $cf_add_0lib; do
18781	for cf_add_2lib in $cf_add_libs; do
18782		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18783			cf_add_1lib=
18784			break
18785		fi
18786	done
18787	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18788done
18789LIBS="$cf_add_libs"
18790
18791fi
18792fi
18793
18794echo "$as_me:18794: checking if sys/time.h works with sys/select.h" >&5
18795echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18796if test "${cf_cv_sys_time_select+set}" = set; then
18797  echo $ECHO_N "(cached) $ECHO_C" >&6
18798else
18799
18800cat >conftest.$ac_ext <<_ACEOF
18801#line 18801 "configure"
18802#include "confdefs.h"
18803
18804#include <sys/types.h>
18805#ifdef HAVE_SYS_TIME_H
18806#include <sys/time.h>
18807#endif
18808#ifdef HAVE_SYS_SELECT_H
18809#include <sys/select.h>
18810#endif
18811
18812int
18813main (void)
18814{
18815
18816  ;
18817  return 0;
18818}
18819_ACEOF
18820rm -f conftest.$ac_objext
18821if { (eval echo "$as_me:18821: \"$ac_compile\"") >&5
18822  (eval $ac_compile) 2>&5
18823  ac_status=$?
18824  echo "$as_me:18824: \$? = $ac_status" >&5
18825  (exit $ac_status); } &&
18826         { ac_try='test -s conftest.$ac_objext'
18827  { (eval echo "$as_me:18827: \"$ac_try\"") >&5
18828  (eval $ac_try) 2>&5
18829  ac_status=$?
18830  echo "$as_me:18830: \$? = $ac_status" >&5
18831  (exit $ac_status); }; }; then
18832  cf_cv_sys_time_select=yes
18833else
18834  echo "$as_me: failed program was:" >&5
18835cat conftest.$ac_ext >&5
18836cf_cv_sys_time_select=no
18837fi
18838rm -f conftest.$ac_objext conftest.$ac_ext
18839
18840fi
18841
18842echo "$as_me:18842: result: $cf_cv_sys_time_select" >&5
18843echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18844test "$cf_cv_sys_time_select" = yes &&
18845cat >>confdefs.h <<\EOF
18846#define HAVE_SYS_TIME_SELECT 1
18847EOF
18848
18849###	checks for compiler characteristics
18850ac_ext=c
18851ac_cpp='$CPP $CPPFLAGS'
18852ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18853ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18854ac_compiler_gnu=$ac_cv_c_compiler_gnu
18855ac_main_return=return
18856
18857echo "$as_me:18857: checking for an ANSI C-conforming const" >&5
18858echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
18859if test "${ac_cv_c_const+set}" = set; then
18860  echo $ECHO_N "(cached) $ECHO_C" >&6
18861else
18862  cat >conftest.$ac_ext <<_ACEOF
18863#line 18863 "configure"
18864#include "confdefs.h"
18865
18866int
18867main (void)
18868{
18869/* FIXME: Include the comments suggested by Paul. */
18870#ifndef __cplusplus
18871  /* Ultrix mips cc rejects this.  */
18872  typedef int charset[2];
18873  const charset x;
18874  /* SunOS 4.1.1 cc rejects this.  */
18875  char const *const *ccp;
18876  char **p;
18877  /* NEC SVR4.0.2 mips cc rejects this.  */
18878  struct point {int x, y;};
18879  static struct point const zero = {0,0};
18880  /* AIX XL C 1.02.0.0 rejects this.
18881     It does not let you subtract one const X* pointer from another in
18882     an arm of an if-expression whose if-part is not a constant
18883     expression */
18884  const char *g = "string";
18885  ccp = &g + (g ? g-g : 0);
18886  /* HPUX 7.0 cc rejects these. */
18887  ++ccp;
18888  p = (char**) ccp;
18889  ccp = (char const *const *) p;
18890  { /* SCO 3.2v4 cc rejects this.  */
18891    char *t;
18892    char const *s = 0 ? (char *) 0 : (char const *) 0;
18893
18894    *t++ = 0;
18895  }
18896  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
18897    int x[] = {25, 17};
18898    const int *foo = &x[0];
18899    ++foo;
18900  }
18901  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
18902    typedef const int *iptr;
18903    iptr p = 0;
18904    ++p;
18905  }
18906  { /* AIX XL C 1.02.0.0 rejects this saying
18907       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18908    struct s { int j; const int *ap[3]; };
18909    struct s *b; b->j = 5;
18910  }
18911  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18912    const int foo = 10;
18913  }
18914#endif
18915
18916  ;
18917  return 0;
18918}
18919_ACEOF
18920rm -f conftest.$ac_objext
18921if { (eval echo "$as_me:18921: \"$ac_compile\"") >&5
18922  (eval $ac_compile) 2>&5
18923  ac_status=$?
18924  echo "$as_me:18924: \$? = $ac_status" >&5
18925  (exit $ac_status); } &&
18926         { ac_try='test -s conftest.$ac_objext'
18927  { (eval echo "$as_me:18927: \"$ac_try\"") >&5
18928  (eval $ac_try) 2>&5
18929  ac_status=$?
18930  echo "$as_me:18930: \$? = $ac_status" >&5
18931  (exit $ac_status); }; }; then
18932  ac_cv_c_const=yes
18933else
18934  echo "$as_me: failed program was:" >&5
18935cat conftest.$ac_ext >&5
18936ac_cv_c_const=no
18937fi
18938rm -f conftest.$ac_objext conftest.$ac_ext
18939fi
18940echo "$as_me:18940: result: $ac_cv_c_const" >&5
18941echo "${ECHO_T}$ac_cv_c_const" >&6
18942if test $ac_cv_c_const = no; then
18943
18944cat >>confdefs.h <<\EOF
18945#define const
18946EOF
18947
18948fi
18949
18950echo "$as_me:18950: checking for inline" >&5
18951echo $ECHO_N "checking for inline... $ECHO_C" >&6
18952if test "${ac_cv_c_inline+set}" = set; then
18953  echo $ECHO_N "(cached) $ECHO_C" >&6
18954else
18955  ac_cv_c_inline=no
18956for ac_kw in inline __inline__ __inline; do
18957  cat >conftest.$ac_ext <<_ACEOF
18958#line 18958 "configure"
18959#include "confdefs.h"
18960#ifndef __cplusplus
18961static $ac_kw int static_foo () {return 0; }
18962$ac_kw int foo () {return 0; }
18963#endif
18964
18965_ACEOF
18966rm -f conftest.$ac_objext
18967if { (eval echo "$as_me:18967: \"$ac_compile\"") >&5
18968  (eval $ac_compile) 2>&5
18969  ac_status=$?
18970  echo "$as_me:18970: \$? = $ac_status" >&5
18971  (exit $ac_status); } &&
18972         { ac_try='test -s conftest.$ac_objext'
18973  { (eval echo "$as_me:18973: \"$ac_try\"") >&5
18974  (eval $ac_try) 2>&5
18975  ac_status=$?
18976  echo "$as_me:18976: \$? = $ac_status" >&5
18977  (exit $ac_status); }; }; then
18978  ac_cv_c_inline=$ac_kw; break
18979else
18980  echo "$as_me: failed program was:" >&5
18981cat conftest.$ac_ext >&5
18982fi
18983rm -f conftest.$ac_objext conftest.$ac_ext
18984done
18985
18986fi
18987echo "$as_me:18987: result: $ac_cv_c_inline" >&5
18988echo "${ECHO_T}$ac_cv_c_inline" >&6
18989case $ac_cv_c_inline in
18990  inline | yes) ;;
18991  no)
18992cat >>confdefs.h <<\EOF
18993#define inline
18994EOF
18995 ;;
18996  *)  cat >>confdefs.h <<EOF
18997#define inline $ac_cv_c_inline
18998EOF
18999 ;;
19000esac
19001
19002NCURSES_INLINE=
19003if test "$ac_cv_c_inline" != no ; then
19004	NCURSES_INLINE=inline
19005	if test "$INTEL_COMPILER" = yes
19006	then
19007		:
19008	elif test "$CLANG_COMPILER" = yes
19009	then
19010		:
19011	elif test "$GCC" = yes
19012	then
19013		echo "$as_me:19013: checking if $CC supports options to tune inlining" >&5
19014echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
19015if test "${cf_cv_gcc_inline+set}" = set; then
19016  echo $ECHO_N "(cached) $ECHO_C" >&6
19017else
19018
19019		cf_save_CFLAGS=$CFLAGS
19020		CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
19021		cat >conftest.$ac_ext <<_ACEOF
19022#line 19022 "configure"
19023#include "confdefs.h"
19024inline int foo(void) { return 1; }
19025int
19026main (void)
19027{
19028${cf_cv_main_return:-return} foo()
19029  ;
19030  return 0;
19031}
19032_ACEOF
19033rm -f conftest.$ac_objext
19034if { (eval echo "$as_me:19034: \"$ac_compile\"") >&5
19035  (eval $ac_compile) 2>&5
19036  ac_status=$?
19037  echo "$as_me:19037: \$? = $ac_status" >&5
19038  (exit $ac_status); } &&
19039         { ac_try='test -s conftest.$ac_objext'
19040  { (eval echo "$as_me:19040: \"$ac_try\"") >&5
19041  (eval $ac_try) 2>&5
19042  ac_status=$?
19043  echo "$as_me:19043: \$? = $ac_status" >&5
19044  (exit $ac_status); }; }; then
19045  cf_cv_gcc_inline=yes
19046else
19047  echo "$as_me: failed program was:" >&5
19048cat conftest.$ac_ext >&5
19049cf_cv_gcc_inline=no
19050fi
19051rm -f conftest.$ac_objext conftest.$ac_ext
19052		CFLAGS=$cf_save_CFLAGS
19053
19054fi
19055echo "$as_me:19055: result: $cf_cv_gcc_inline" >&5
19056echo "${ECHO_T}$cf_cv_gcc_inline" >&6
19057		if test "$cf_cv_gcc_inline" = yes ; then
19058
19059cf_fix_cppflags=no
19060cf_new_cflags=
19061cf_new_cppflags=
19062cf_new_extra_cppflags=
19063
19064for cf_add_cflags in --param max-inline-insns-single=1200
19065do
19066case $cf_fix_cppflags in
19067(no)
19068	case $cf_add_cflags in
19069	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19070		case $cf_add_cflags in
19071		(-D*)
19072			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19073
19074			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19075				&& test -z "${cf_tst_cflags}" \
19076				&& cf_fix_cppflags=yes
19077
19078			if test $cf_fix_cppflags = yes ; then
19079
19080	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19081	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19082
19083				continue
19084			elif test "${cf_tst_cflags}" = "\"'" ; then
19085
19086	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19087	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19088
19089				continue
19090			fi
19091			;;
19092		esac
19093		case "$CPPFLAGS" in
19094		(*$cf_add_cflags)
19095			;;
19096		(*)
19097			case $cf_add_cflags in
19098			(-D*)
19099				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19100
19101CPPFLAGS=`echo "$CPPFLAGS" | \
19102	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19103		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19104
19105				;;
19106			esac
19107
19108	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19109	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19110
19111			;;
19112		esac
19113		;;
19114	(*)
19115
19116	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19117	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19118
19119		;;
19120	esac
19121	;;
19122(yes)
19123
19124	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19125	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19126
19127	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19128
19129	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19130		&& test -z "${cf_tst_cflags}" \
19131		&& cf_fix_cppflags=no
19132	;;
19133esac
19134done
19135
19136if test -n "$cf_new_cflags" ; then
19137
19138	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19139	CFLAGS="${CFLAGS}$cf_new_cflags"
19140
19141fi
19142
19143if test -n "$cf_new_cppflags" ; then
19144
19145	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19146	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19147
19148fi
19149
19150if test -n "$cf_new_extra_cppflags" ; then
19151
19152	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19153	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19154
19155fi
19156
19157		fi
19158	fi
19159fi
19160
19161echo "$as_me:19161: checking for signal global datatype" >&5
19162echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
19163if test "${cf_cv_sig_atomic_t+set}" = set; then
19164  echo $ECHO_N "(cached) $ECHO_C" >&6
19165else
19166
19167	for cf_type in \
19168		"volatile sig_atomic_t" \
19169		"sig_atomic_t" \
19170		"int"
19171	do
19172	cat >conftest.$ac_ext <<_ACEOF
19173#line 19173 "configure"
19174#include "confdefs.h"
19175
19176#include <sys/types.h>
19177#include <signal.h>
19178#include <stdio.h>
19179
19180extern $cf_type x;
19181$cf_type x;
19182static void handler(int sig)
19183{
19184	x = 5;
19185}
19186int
19187main (void)
19188{
19189signal(SIGINT, handler);
19190		 x = 1
19191  ;
19192  return 0;
19193}
19194_ACEOF
19195rm -f conftest.$ac_objext
19196if { (eval echo "$as_me:19196: \"$ac_compile\"") >&5
19197  (eval $ac_compile) 2>&5
19198  ac_status=$?
19199  echo "$as_me:19199: \$? = $ac_status" >&5
19200  (exit $ac_status); } &&
19201         { ac_try='test -s conftest.$ac_objext'
19202  { (eval echo "$as_me:19202: \"$ac_try\"") >&5
19203  (eval $ac_try) 2>&5
19204  ac_status=$?
19205  echo "$as_me:19205: \$? = $ac_status" >&5
19206  (exit $ac_status); }; }; then
19207  cf_cv_sig_atomic_t=$cf_type
19208else
19209  echo "$as_me: failed program was:" >&5
19210cat conftest.$ac_ext >&5
19211cf_cv_sig_atomic_t=no
19212fi
19213rm -f conftest.$ac_objext conftest.$ac_ext
19214		test "$cf_cv_sig_atomic_t" != no && break
19215	done
19216
19217fi
19218
19219echo "$as_me:19219: result: $cf_cv_sig_atomic_t" >&5
19220echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
19221test "$cf_cv_sig_atomic_t" != no &&
19222cat >>confdefs.h <<EOF
19223#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
19224EOF
19225
19226if test $NCURSES_CHTYPE = auto ; then
19227
19228echo "$as_me:19228: checking for type of chtype" >&5
19229echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
19230if test "${cf_cv_typeof_chtype+set}" = set; then
19231  echo $ECHO_N "(cached) $ECHO_C" >&6
19232else
19233
19234		if test "$cross_compiling" = yes; then
19235  cf_cv_typeof_chtype=long
19236else
19237  cat >conftest.$ac_ext <<_ACEOF
19238#line 19238 "configure"
19239#include "confdefs.h"
19240
19241#define WANT_BITS 31
19242#include <stdio.h>
19243int main(void)
19244{
19245	FILE *fp = fopen("cf_test.out", "w");
19246	if (fp != 0) {
19247		char *result = "long";
19248		if (sizeof(unsigned long) > sizeof(unsigned int)) {
19249			int n;
19250			unsigned int x, y;
19251			for (n = 0; n < WANT_BITS; n++) {
19252				x = (1 << n);
19253				y = (x >> n);
19254				if (y != 1 || x == 0) {
19255					x = 0;
19256					break;
19257				}
19258			}
19259			/*
19260			 * If x is nonzero, an int is big enough for the bits
19261			 * that we want.
19262			 */
19263			result = (x != 0) ? "int" : "long";
19264		}
19265		fputs(result, fp);
19266		fclose(fp);
19267	}
19268	${cf_cv_main_return:-return}(0);
19269}
19270
19271_ACEOF
19272rm -f conftest$ac_exeext
19273if { (eval echo "$as_me:19273: \"$ac_link\"") >&5
19274  (eval $ac_link) 2>&5
19275  ac_status=$?
19276  echo "$as_me:19276: \$? = $ac_status" >&5
19277  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19278  { (eval echo "$as_me:19278: \"$ac_try\"") >&5
19279  (eval $ac_try) 2>&5
19280  ac_status=$?
19281  echo "$as_me:19281: \$? = $ac_status" >&5
19282  (exit $ac_status); }; }; then
19283  cf_cv_typeof_chtype=`cat cf_test.out`
19284else
19285  echo "$as_me: program exited with status $ac_status" >&5
19286echo "$as_me: failed program was:" >&5
19287cat conftest.$ac_ext >&5
19288cf_cv_typeof_chtype=long
19289fi
19290rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19291fi
19292		rm -f cf_test.out
19293
19294fi
19295
19296echo "$as_me:19296: result: $cf_cv_typeof_chtype" >&5
19297echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
19298
19299cat >>confdefs.h <<EOF
19300#define TYPEOF_CHTYPE $cf_cv_typeof_chtype
19301EOF
19302
19303else
19304	cf_cv_typeof_chtype=$NCURSES_CHTYPE
19305fi
19306test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
19307
19308echo "$as_me:19308: checking if unsigned literals are legal" >&5
19309echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
19310if test "${cf_cv_unsigned_literals+set}" = set; then
19311  echo $ECHO_N "(cached) $ECHO_C" >&6
19312else
19313
19314	cat >conftest.$ac_ext <<_ACEOF
19315#line 19315 "configure"
19316#include "confdefs.h"
19317
19318int
19319main (void)
19320{
19321long x = 1L + 1UL + 1U + 1
19322  ;
19323  return 0;
19324}
19325_ACEOF
19326rm -f conftest.$ac_objext
19327if { (eval echo "$as_me:19327: \"$ac_compile\"") >&5
19328  (eval $ac_compile) 2>&5
19329  ac_status=$?
19330  echo "$as_me:19330: \$? = $ac_status" >&5
19331  (exit $ac_status); } &&
19332         { ac_try='test -s conftest.$ac_objext'
19333  { (eval echo "$as_me:19333: \"$ac_try\"") >&5
19334  (eval $ac_try) 2>&5
19335  ac_status=$?
19336  echo "$as_me:19336: \$? = $ac_status" >&5
19337  (exit $ac_status); }; }; then
19338  cf_cv_unsigned_literals=yes
19339else
19340  echo "$as_me: failed program was:" >&5
19341cat conftest.$ac_ext >&5
19342cf_cv_unsigned_literals=no
19343fi
19344rm -f conftest.$ac_objext conftest.$ac_ext
19345
19346fi
19347
19348echo "$as_me:19348: result: $cf_cv_unsigned_literals" >&5
19349echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
19350
19351cf_cv_1UL="1"
19352test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
19353test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
19354
19355if test $NCURSES_MMASK_T = auto ; then
19356	cf_cv_typeof_mmask_t=long
19357else
19358	cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
19359fi
19360test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
19361
19362###	Checks for external-data
19363
19364echo "$as_me:19364: checking if external errno is declared" >&5
19365echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
19366if test "${cf_cv_dcl_errno+set}" = set; then
19367  echo $ECHO_N "(cached) $ECHO_C" >&6
19368else
19369
19370	cat >conftest.$ac_ext <<_ACEOF
19371#line 19371 "configure"
19372#include "confdefs.h"
19373
19374#ifdef HAVE_STDLIB_H
19375#include <stdlib.h>
19376#endif
19377#include <stdio.h>
19378#include <sys/types.h>
19379#include <errno.h>
19380int
19381main (void)
19382{
19383int x = (int) errno
19384  ;
19385  return 0;
19386}
19387_ACEOF
19388rm -f conftest.$ac_objext
19389if { (eval echo "$as_me:19389: \"$ac_compile\"") >&5
19390  (eval $ac_compile) 2>&5
19391  ac_status=$?
19392  echo "$as_me:19392: \$? = $ac_status" >&5
19393  (exit $ac_status); } &&
19394         { ac_try='test -s conftest.$ac_objext'
19395  { (eval echo "$as_me:19395: \"$ac_try\"") >&5
19396  (eval $ac_try) 2>&5
19397  ac_status=$?
19398  echo "$as_me:19398: \$? = $ac_status" >&5
19399  (exit $ac_status); }; }; then
19400  cf_cv_dcl_errno=yes
19401else
19402  echo "$as_me: failed program was:" >&5
19403cat conftest.$ac_ext >&5
19404cf_cv_dcl_errno=no
19405fi
19406rm -f conftest.$ac_objext conftest.$ac_ext
19407
19408fi
19409echo "$as_me:19409: result: $cf_cv_dcl_errno" >&5
19410echo "${ECHO_T}$cf_cv_dcl_errno" >&6
19411
19412if test "$cf_cv_dcl_errno" = no ; then
19413
19414cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19415
19416	cat >>confdefs.h <<EOF
19417#define $cf_result 1
19418EOF
19419
19420fi
19421
19422# It's possible (for near-UNIX clones) that the data doesn't exist
19423
19424echo "$as_me:19424: checking if external errno exists" >&5
19425echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
19426if test "${cf_cv_have_errno+set}" = set; then
19427  echo $ECHO_N "(cached) $ECHO_C" >&6
19428else
19429
19430	cat >conftest.$ac_ext <<_ACEOF
19431#line 19431 "configure"
19432#include "confdefs.h"
19433
19434#undef errno
19435extern int errno;
19436
19437int
19438main (void)
19439{
19440errno = 2
19441  ;
19442  return 0;
19443}
19444_ACEOF
19445rm -f conftest.$ac_objext conftest$ac_exeext
19446if { (eval echo "$as_me:19446: \"$ac_link\"") >&5
19447  (eval $ac_link) 2>&5
19448  ac_status=$?
19449  echo "$as_me:19449: \$? = $ac_status" >&5
19450  (exit $ac_status); } &&
19451         { ac_try='test -s conftest$ac_exeext'
19452  { (eval echo "$as_me:19452: \"$ac_try\"") >&5
19453  (eval $ac_try) 2>&5
19454  ac_status=$?
19455  echo "$as_me:19455: \$? = $ac_status" >&5
19456  (exit $ac_status); }; }; then
19457  cf_cv_have_errno=yes
19458else
19459  echo "$as_me: failed program was:" >&5
19460cat conftest.$ac_ext >&5
19461cf_cv_have_errno=no
19462fi
19463rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19464
19465fi
19466echo "$as_me:19466: result: $cf_cv_have_errno" >&5
19467echo "${ECHO_T}$cf_cv_have_errno" >&6
19468
19469if test "$cf_cv_have_errno" = yes ; then
19470
19471cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19472
19473	cat >>confdefs.h <<EOF
19474#define $cf_result 1
19475EOF
19476
19477fi
19478
19479echo "$as_me:19479: checking if data-only library module links" >&5
19480echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
19481if test "${cf_cv_link_dataonly+set}" = set; then
19482  echo $ECHO_N "(cached) $ECHO_C" >&6
19483else
19484
19485	rm -f conftest.a
19486	cat >conftest.$ac_ext <<EOF
19487#line 19487 "configure"
19488int	testdata[3] = { 123, 456, 789 };
19489EOF
19490	if { (eval echo "$as_me:19490: \"$ac_compile\"") >&5
19491  (eval $ac_compile) 2>&5
19492  ac_status=$?
19493  echo "$as_me:19493: \$? = $ac_status" >&5
19494  (exit $ac_status); } ; then
19495		mv conftest.o data.o && \
19496		( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
19497	fi
19498	rm -f conftest.$ac_ext data.o
19499	cat >conftest.$ac_ext <<EOF
19500#line 19500 "configure"
19501int	testfunc(void)
19502{
19503#if defined(NeXT)
19504	${cf_cv_main_return:-return}(1);	/* I'm told this linker is broken */
19505#else
19506	extern int testdata[3];
19507	return testdata[0] == 123
19508	   &&  testdata[1] == 456
19509	   &&  testdata[2] == 789;
19510#endif
19511}
19512EOF
19513	if { (eval echo "$as_me:19513: \"$ac_compile\"") >&5
19514  (eval $ac_compile) 2>&5
19515  ac_status=$?
19516  echo "$as_me:19516: \$? = $ac_status" >&5
19517  (exit $ac_status); }; then
19518		mv conftest.o func.o && \
19519		( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
19520	fi
19521	rm -f conftest.$ac_ext func.o
19522	( eval $RANLIB conftest.a ) 2>&5 >/dev/null
19523	cf_saveLIBS="$LIBS"
19524	LIBS="conftest.a $LIBS"
19525	if test "$cross_compiling" = yes; then
19526  cf_cv_link_dataonly=unknown
19527else
19528  cat >conftest.$ac_ext <<_ACEOF
19529#line 19529 "configure"
19530#include "confdefs.h"
19531
19532	int main(void)
19533	{
19534		extern int testfunc();
19535		${cf_cv_main_return:-return} (!testfunc());
19536	}
19537
19538_ACEOF
19539rm -f conftest$ac_exeext
19540if { (eval echo "$as_me:19540: \"$ac_link\"") >&5
19541  (eval $ac_link) 2>&5
19542  ac_status=$?
19543  echo "$as_me:19543: \$? = $ac_status" >&5
19544  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19545  { (eval echo "$as_me:19545: \"$ac_try\"") >&5
19546  (eval $ac_try) 2>&5
19547  ac_status=$?
19548  echo "$as_me:19548: \$? = $ac_status" >&5
19549  (exit $ac_status); }; }; then
19550  cf_cv_link_dataonly=yes
19551else
19552  echo "$as_me: program exited with status $ac_status" >&5
19553echo "$as_me: failed program was:" >&5
19554cat conftest.$ac_ext >&5
19555cf_cv_link_dataonly=no
19556fi
19557rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19558fi
19559	LIBS="$cf_saveLIBS"
19560
19561fi
19562
19563echo "$as_me:19563: result: $cf_cv_link_dataonly" >&5
19564echo "${ECHO_T}$cf_cv_link_dataonly" >&6
19565
19566if test "$cf_cv_link_dataonly" = no ; then
19567
19568cat >>confdefs.h <<\EOF
19569#define BROKEN_LINKER 1
19570EOF
19571
19572	BROKEN_LINKER=1
19573fi
19574
19575###	Checks for library functions.
19576
19577for ac_func in \
19578getcwd \
19579getegid \
19580geteuid \
19581getopt \
19582getttynam \
19583issetugid \
19584localeconv \
19585poll \
19586putenv \
19587remove \
19588select \
19589setbuf \
19590setbuffer \
19591setenv \
19592setvbuf \
19593sigaction \
19594sigvec \
19595strdup \
19596strstr \
19597sysconf \
19598tcgetpgrp \
19599times \
19600tsearch \
19601vsnprintf \
19602
19603do
19604as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19605echo "$as_me:19605: checking for $ac_func" >&5
19606echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19607if eval "test \"\${$as_ac_var+set}\" = set"; then
19608  echo $ECHO_N "(cached) $ECHO_C" >&6
19609else
19610  cat >conftest.$ac_ext <<_ACEOF
19611#line 19611 "configure"
19612#include "confdefs.h"
19613#define $ac_func autoconf_temporary
19614#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
19615#undef $ac_func
19616
19617#ifdef __cplusplus
19618extern "C"
19619#endif
19620
19621/* We use char because int might match the return type of a gcc2
19622   builtin and then its argument prototype would still apply.  */
19623char $ac_func (void);
19624
19625int
19626main (void)
19627{
19628
19629/* The GNU C library defines stubs for functions which it implements
19630    to always fail with ENOSYS.  Some functions are actually named
19631    something starting with __ and the normal name is an alias.  */
19632#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19633#error found stub for $ac_func
19634#endif
19635
19636	return $ac_func ();
19637  ;
19638  return 0;
19639}
19640_ACEOF
19641rm -f conftest.$ac_objext conftest$ac_exeext
19642if { (eval echo "$as_me:19642: \"$ac_link\"") >&5
19643  (eval $ac_link) 2>&5
19644  ac_status=$?
19645  echo "$as_me:19645: \$? = $ac_status" >&5
19646  (exit $ac_status); } &&
19647         { ac_try='test -s conftest$ac_exeext'
19648  { (eval echo "$as_me:19648: \"$ac_try\"") >&5
19649  (eval $ac_try) 2>&5
19650  ac_status=$?
19651  echo "$as_me:19651: \$? = $ac_status" >&5
19652  (exit $ac_status); }; }; then
19653  eval "$as_ac_var=yes"
19654else
19655  echo "$as_me: failed program was:" >&5
19656cat conftest.$ac_ext >&5
19657eval "$as_ac_var=no"
19658fi
19659rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19660fi
19661echo "$as_me:19661: result: `eval echo '${'$as_ac_var'}'`" >&5
19662echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19663if test `eval echo '${'$as_ac_var'}'` = yes; then
19664  cat >>confdefs.h <<EOF
19665#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19666EOF
19667
19668fi
19669done
19670
19671if test "x$ac_cv_func_getopt" = xno && \
19672   test "x$cf_with_progs$cf_with_tests" != xnono; then
19673	{ { echo "$as_me:19673: error: getopt is required for building programs" >&5
19674echo "$as_me: error: getopt is required for building programs" >&2;}
19675   { (exit 1); exit 1; }; }
19676fi
19677
19678if test "x$with_safe_sprintf" = xyes
19679then
19680	if test "x$ac_cv_func_vsnprintf" = xyes
19681	then
19682		{ echo "$as_me:19682: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
19683echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
19684	else
19685
19686cat >>confdefs.h <<\EOF
19687#define USE_SAFE_SPRINTF 1
19688EOF
19689
19690	fi
19691fi
19692
19693if test "x$with_getcap" = "xyes" ; then
19694
19695echo "$as_me:19695: checking for terminal-capability database functions" >&5
19696echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
19697if test "${cf_cv_cgetent+set}" = set; then
19698  echo $ECHO_N "(cached) $ECHO_C" >&6
19699else
19700
19701cat >conftest.$ac_ext <<_ACEOF
19702#line 19702 "configure"
19703#include "confdefs.h"
19704
19705#include <stdlib.h>
19706int
19707main (void)
19708{
19709
19710	char temp[128];
19711	char *buf = temp;
19712	char *db_array = temp;
19713	cgetent(&buf, &db_array, "vt100");
19714	cgetcap(buf, "tc", '=');
19715	cgetmatch(buf, "tc");
19716
19717  ;
19718  return 0;
19719}
19720_ACEOF
19721rm -f conftest.$ac_objext conftest$ac_exeext
19722if { (eval echo "$as_me:19722: \"$ac_link\"") >&5
19723  (eval $ac_link) 2>&5
19724  ac_status=$?
19725  echo "$as_me:19725: \$? = $ac_status" >&5
19726  (exit $ac_status); } &&
19727         { ac_try='test -s conftest$ac_exeext'
19728  { (eval echo "$as_me:19728: \"$ac_try\"") >&5
19729  (eval $ac_try) 2>&5
19730  ac_status=$?
19731  echo "$as_me:19731: \$? = $ac_status" >&5
19732  (exit $ac_status); }; }; then
19733  cf_cv_cgetent=yes
19734else
19735  echo "$as_me: failed program was:" >&5
19736cat conftest.$ac_ext >&5
19737cf_cv_cgetent=no
19738fi
19739rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19740
19741fi
19742echo "$as_me:19742: result: $cf_cv_cgetent" >&5
19743echo "${ECHO_T}$cf_cv_cgetent" >&6
19744
19745if test "$cf_cv_cgetent" = yes
19746then
19747
19748cat >>confdefs.h <<\EOF
19749#define HAVE_BSD_CGETENT 1
19750EOF
19751
19752echo "$as_me:19752: checking if cgetent uses const parameter" >&5
19753echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
19754if test "${cf_cv_cgetent_const+set}" = set; then
19755  echo $ECHO_N "(cached) $ECHO_C" >&6
19756else
19757
19758cat >conftest.$ac_ext <<_ACEOF
19759#line 19759 "configure"
19760#include "confdefs.h"
19761
19762#pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
19763#include <stdlib.h>
19764int
19765main (void)
19766{
19767
19768	char temp[128];
19769	char *buf = temp;
19770#ifndef _NETBSD_SOURCE			/* given, since April 2004 in stdlib.h */
19771	const char *db_array = temp;
19772	cgetent(&buf, &db_array, "vt100");
19773#endif
19774	cgetcap(buf, "tc", '=');
19775	cgetmatch(buf, "tc");
19776
19777  ;
19778  return 0;
19779}
19780_ACEOF
19781rm -f conftest.$ac_objext conftest$ac_exeext
19782if { (eval echo "$as_me:19782: \"$ac_link\"") >&5
19783  (eval $ac_link) 2>&5
19784  ac_status=$?
19785  echo "$as_me:19785: \$? = $ac_status" >&5
19786  (exit $ac_status); } &&
19787         { ac_try='test -s conftest$ac_exeext'
19788  { (eval echo "$as_me:19788: \"$ac_try\"") >&5
19789  (eval $ac_try) 2>&5
19790  ac_status=$?
19791  echo "$as_me:19791: \$? = $ac_status" >&5
19792  (exit $ac_status); }; }; then
19793  cf_cv_cgetent_const=yes
19794else
19795  echo "$as_me: failed program was:" >&5
19796cat conftest.$ac_ext >&5
19797cf_cv_cgetent_const=no
19798fi
19799rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19800
19801fi
19802echo "$as_me:19802: result: $cf_cv_cgetent_const" >&5
19803echo "${ECHO_T}$cf_cv_cgetent_const" >&6
19804	if test "$cf_cv_cgetent_const" = yes
19805	then
19806
19807cat >>confdefs.h <<EOF
19808#define CGETENT_CONST const
19809EOF
19810
19811	fi
19812fi
19813
19814fi
19815
19816echo "$as_me:19816: checking for isascii" >&5
19817echo $ECHO_N "checking for isascii... $ECHO_C" >&6
19818if test "${cf_cv_have_isascii+set}" = set; then
19819  echo $ECHO_N "(cached) $ECHO_C" >&6
19820else
19821
19822	cat >conftest.$ac_ext <<_ACEOF
19823#line 19823 "configure"
19824#include "confdefs.h"
19825#include <ctype.h>
19826int
19827main (void)
19828{
19829int x = isascii(' ')
19830  ;
19831  return 0;
19832}
19833_ACEOF
19834rm -f conftest.$ac_objext conftest$ac_exeext
19835if { (eval echo "$as_me:19835: \"$ac_link\"") >&5
19836  (eval $ac_link) 2>&5
19837  ac_status=$?
19838  echo "$as_me:19838: \$? = $ac_status" >&5
19839  (exit $ac_status); } &&
19840         { ac_try='test -s conftest$ac_exeext'
19841  { (eval echo "$as_me:19841: \"$ac_try\"") >&5
19842  (eval $ac_try) 2>&5
19843  ac_status=$?
19844  echo "$as_me:19844: \$? = $ac_status" >&5
19845  (exit $ac_status); }; }; then
19846  cf_cv_have_isascii=yes
19847else
19848  echo "$as_me: failed program was:" >&5
19849cat conftest.$ac_ext >&5
19850cf_cv_have_isascii=no
19851fi
19852rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19853
19854fi
19855echo "$as_me:19855: result: $cf_cv_have_isascii" >&5
19856echo "${ECHO_T}$cf_cv_have_isascii" >&6
19857test "$cf_cv_have_isascii" = yes &&
19858cat >>confdefs.h <<\EOF
19859#define HAVE_ISASCII 1
19860EOF
19861
19862if test "$ac_cv_func_sigaction" = yes; then
19863echo "$as_me:19863: checking whether sigaction needs _POSIX_SOURCE" >&5
19864echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
19865cat >conftest.$ac_ext <<_ACEOF
19866#line 19866 "configure"
19867#include "confdefs.h"
19868
19869#include <sys/types.h>
19870#include <signal.h>
19871int
19872main (void)
19873{
19874struct sigaction act
19875  ;
19876  return 0;
19877}
19878_ACEOF
19879rm -f conftest.$ac_objext
19880if { (eval echo "$as_me:19880: \"$ac_compile\"") >&5
19881  (eval $ac_compile) 2>&5
19882  ac_status=$?
19883  echo "$as_me:19883: \$? = $ac_status" >&5
19884  (exit $ac_status); } &&
19885         { ac_try='test -s conftest.$ac_objext'
19886  { (eval echo "$as_me:19886: \"$ac_try\"") >&5
19887  (eval $ac_try) 2>&5
19888  ac_status=$?
19889  echo "$as_me:19889: \$? = $ac_status" >&5
19890  (exit $ac_status); }; }; then
19891  sigact_bad=no
19892else
19893  echo "$as_me: failed program was:" >&5
19894cat conftest.$ac_ext >&5
19895
19896cat >conftest.$ac_ext <<_ACEOF
19897#line 19897 "configure"
19898#include "confdefs.h"
19899
19900#define _POSIX_SOURCE
19901#include <sys/types.h>
19902#include <signal.h>
19903int
19904main (void)
19905{
19906struct sigaction act
19907  ;
19908  return 0;
19909}
19910_ACEOF
19911rm -f conftest.$ac_objext
19912if { (eval echo "$as_me:19912: \"$ac_compile\"") >&5
19913  (eval $ac_compile) 2>&5
19914  ac_status=$?
19915  echo "$as_me:19915: \$? = $ac_status" >&5
19916  (exit $ac_status); } &&
19917         { ac_try='test -s conftest.$ac_objext'
19918  { (eval echo "$as_me:19918: \"$ac_try\"") >&5
19919  (eval $ac_try) 2>&5
19920  ac_status=$?
19921  echo "$as_me:19921: \$? = $ac_status" >&5
19922  (exit $ac_status); }; }; then
19923  sigact_bad=yes
19924
19925cat >>confdefs.h <<\EOF
19926#define _POSIX_SOURCE 1
19927EOF
19928
19929else
19930  echo "$as_me: failed program was:" >&5
19931cat conftest.$ac_ext >&5
19932sigact_bad=unknown
19933fi
19934rm -f conftest.$ac_objext conftest.$ac_ext
19935fi
19936rm -f conftest.$ac_objext conftest.$ac_ext
19937echo "$as_me:19937: result: $sigact_bad" >&5
19938echo "${ECHO_T}$sigact_bad" >&6
19939fi
19940
19941echo "$as_me:19941: checking if nanosleep really works" >&5
19942echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
19943if test "${cf_cv_func_nanosleep+set}" = set; then
19944  echo $ECHO_N "(cached) $ECHO_C" >&6
19945else
19946
19947if test "$cross_compiling" = yes; then
19948  cf_cv_func_nanosleep=unknown
19949else
19950  cat >conftest.$ac_ext <<_ACEOF
19951#line 19951 "configure"
19952#include "confdefs.h"
19953
19954#include <stdio.h>
19955#include <errno.h>
19956#include <time.h>
19957
19958#ifdef HAVE_SYS_TIME_H
19959#include <sys/time.h>
19960#endif
19961
19962int main(void) {
19963	struct timespec ts1, ts2;
19964	int code;
19965	ts1.tv_sec  = 0;
19966	ts1.tv_nsec = 750000000;
19967	ts2.tv_sec  = 0;
19968	ts2.tv_nsec = 0;
19969	errno = 0;
19970	code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
19971	${cf_cv_main_return:-return}(code != 0);
19972}
19973
19974_ACEOF
19975rm -f conftest$ac_exeext
19976if { (eval echo "$as_me:19976: \"$ac_link\"") >&5
19977  (eval $ac_link) 2>&5
19978  ac_status=$?
19979  echo "$as_me:19979: \$? = $ac_status" >&5
19980  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19981  { (eval echo "$as_me:19981: \"$ac_try\"") >&5
19982  (eval $ac_try) 2>&5
19983  ac_status=$?
19984  echo "$as_me:19984: \$? = $ac_status" >&5
19985  (exit $ac_status); }; }; then
19986  cf_cv_func_nanosleep=yes
19987else
19988  echo "$as_me: program exited with status $ac_status" >&5
19989echo "$as_me: failed program was:" >&5
19990cat conftest.$ac_ext >&5
19991cf_cv_func_nanosleep=no
19992fi
19993rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19994fi
19995fi
19996echo "$as_me:19996: result: $cf_cv_func_nanosleep" >&5
19997echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
19998
19999test "$cf_cv_func_nanosleep" = "yes" &&
20000cat >>confdefs.h <<\EOF
20001#define HAVE_NANOSLEEP 1
20002EOF
20003
20004for ac_header in \
20005termio.h \
20006termios.h \
20007unistd.h \
20008sys/ioctl.h \
20009sys/termio.h \
20010
20011do
20012as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20013echo "$as_me:20013: checking for $ac_header" >&5
20014echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20015if eval "test \"\${$as_ac_Header+set}\" = set"; then
20016  echo $ECHO_N "(cached) $ECHO_C" >&6
20017else
20018  cat >conftest.$ac_ext <<_ACEOF
20019#line 20019 "configure"
20020#include "confdefs.h"
20021#include <$ac_header>
20022_ACEOF
20023if { (eval echo "$as_me:20023: \"$ac_cpp conftest.$ac_ext\"") >&5
20024  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20025  ac_status=$?
20026  egrep -v '^ *\+' conftest.er1 >conftest.err
20027  rm -f conftest.er1
20028  cat conftest.err >&5
20029  echo "$as_me:20029: \$? = $ac_status" >&5
20030  (exit $ac_status); } >/dev/null; then
20031  if test -s conftest.err; then
20032    ac_cpp_err=$ac_c_preproc_warn_flag
20033  else
20034    ac_cpp_err=
20035  fi
20036else
20037  ac_cpp_err=yes
20038fi
20039if test -z "$ac_cpp_err"; then
20040  eval "$as_ac_Header=yes"
20041else
20042  echo "$as_me: failed program was:" >&5
20043  cat conftest.$ac_ext >&5
20044  eval "$as_ac_Header=no"
20045fi
20046rm -f conftest.err conftest.$ac_ext
20047fi
20048echo "$as_me:20048: result: `eval echo '${'$as_ac_Header'}'`" >&5
20049echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20050if test `eval echo '${'$as_ac_Header'}'` = yes; then
20051  cat >>confdefs.h <<EOF
20052#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20053EOF
20054
20055fi
20056done
20057
20058if test "$ac_cv_header_termios_h" = yes ; then
20059	case "$CFLAGS $CPPFLAGS" in
20060	(*-D_POSIX_SOURCE*)
20061		termios_bad=dunno ;;
20062	(*)	termios_bad=maybe ;;
20063	esac
20064	if test "$termios_bad" = maybe ; then
20065	echo "$as_me:20065: checking whether termios.h needs _POSIX_SOURCE" >&5
20066echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
20067	cat >conftest.$ac_ext <<_ACEOF
20068#line 20068 "configure"
20069#include "confdefs.h"
20070#include <termios.h>
20071int
20072main (void)
20073{
20074struct termios foo; int x = foo.c_iflag
20075  ;
20076  return 0;
20077}
20078_ACEOF
20079rm -f conftest.$ac_objext
20080if { (eval echo "$as_me:20080: \"$ac_compile\"") >&5
20081  (eval $ac_compile) 2>&5
20082  ac_status=$?
20083  echo "$as_me:20083: \$? = $ac_status" >&5
20084  (exit $ac_status); } &&
20085         { ac_try='test -s conftest.$ac_objext'
20086  { (eval echo "$as_me:20086: \"$ac_try\"") >&5
20087  (eval $ac_try) 2>&5
20088  ac_status=$?
20089  echo "$as_me:20089: \$? = $ac_status" >&5
20090  (exit $ac_status); }; }; then
20091  termios_bad=no
20092else
20093  echo "$as_me: failed program was:" >&5
20094cat conftest.$ac_ext >&5
20095
20096		cat >conftest.$ac_ext <<_ACEOF
20097#line 20097 "configure"
20098#include "confdefs.h"
20099
20100#define _POSIX_SOURCE
20101#include <termios.h>
20102int
20103main (void)
20104{
20105struct termios foo; int x = foo.c_iflag
20106  ;
20107  return 0;
20108}
20109_ACEOF
20110rm -f conftest.$ac_objext
20111if { (eval echo "$as_me:20111: \"$ac_compile\"") >&5
20112  (eval $ac_compile) 2>&5
20113  ac_status=$?
20114  echo "$as_me:20114: \$? = $ac_status" >&5
20115  (exit $ac_status); } &&
20116         { ac_try='test -s conftest.$ac_objext'
20117  { (eval echo "$as_me:20117: \"$ac_try\"") >&5
20118  (eval $ac_try) 2>&5
20119  ac_status=$?
20120  echo "$as_me:20120: \$? = $ac_status" >&5
20121  (exit $ac_status); }; }; then
20122  termios_bad=unknown
20123else
20124  echo "$as_me: failed program was:" >&5
20125cat conftest.$ac_ext >&5
20126termios_bad=yes
20127cat >>confdefs.h <<\EOF
20128#define _POSIX_SOURCE 1
20129EOF
20130
20131fi
20132rm -f conftest.$ac_objext conftest.$ac_ext
20133
20134fi
20135rm -f conftest.$ac_objext conftest.$ac_ext
20136	echo "$as_me:20136: result: $termios_bad" >&5
20137echo "${ECHO_T}$termios_bad" >&6
20138	fi
20139fi
20140
20141echo "$as_me:20141: checking for tcgetattr" >&5
20142echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
20143if test "${cf_cv_have_tcgetattr+set}" = set; then
20144  echo $ECHO_N "(cached) $ECHO_C" >&6
20145else
20146
20147cat >conftest.$ac_ext <<_ACEOF
20148#line 20148 "configure"
20149#include "confdefs.h"
20150
20151#include <sys/types.h>
20152#ifdef HAVE_UNISTD_H
20153#include <unistd.h>
20154#endif
20155#ifdef HAVE_TERMIOS_H
20156#include <termios.h>
20157#define TTY struct termios
20158#else
20159#ifdef HAVE_TERMIO_H
20160#include <termio.h>
20161#define TTY struct termio
20162#endif
20163#endif
20164
20165int
20166main (void)
20167{
20168
20169TTY foo;
20170tcgetattr(1, &foo);
20171  ;
20172  return 0;
20173}
20174_ACEOF
20175rm -f conftest.$ac_objext conftest$ac_exeext
20176if { (eval echo "$as_me:20176: \"$ac_link\"") >&5
20177  (eval $ac_link) 2>&5
20178  ac_status=$?
20179  echo "$as_me:20179: \$? = $ac_status" >&5
20180  (exit $ac_status); } &&
20181         { ac_try='test -s conftest$ac_exeext'
20182  { (eval echo "$as_me:20182: \"$ac_try\"") >&5
20183  (eval $ac_try) 2>&5
20184  ac_status=$?
20185  echo "$as_me:20185: \$? = $ac_status" >&5
20186  (exit $ac_status); }; }; then
20187  cf_cv_have_tcgetattr=yes
20188else
20189  echo "$as_me: failed program was:" >&5
20190cat conftest.$ac_ext >&5
20191cf_cv_have_tcgetattr=no
20192fi
20193rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20194fi
20195echo "$as_me:20195: result: $cf_cv_have_tcgetattr" >&5
20196echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
20197test "$cf_cv_have_tcgetattr" = yes &&
20198cat >>confdefs.h <<\EOF
20199#define HAVE_TCGETATTR 1
20200EOF
20201
20202echo "$as_me:20202: checking for vsscanf function or workaround" >&5
20203echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
20204if test "${cf_cv_func_vsscanf+set}" = set; then
20205  echo $ECHO_N "(cached) $ECHO_C" >&6
20206else
20207
20208cat >conftest.$ac_ext <<_ACEOF
20209#line 20209 "configure"
20210#include "confdefs.h"
20211
20212#include <stdarg.h>
20213#include <stdio.h>
20214int
20215main (void)
20216{
20217
20218	va_list ap;
20219	vsscanf("from", "%d", ap)
20220  ;
20221  return 0;
20222}
20223_ACEOF
20224rm -f conftest.$ac_objext conftest$ac_exeext
20225if { (eval echo "$as_me:20225: \"$ac_link\"") >&5
20226  (eval $ac_link) 2>&5
20227  ac_status=$?
20228  echo "$as_me:20228: \$? = $ac_status" >&5
20229  (exit $ac_status); } &&
20230         { ac_try='test -s conftest$ac_exeext'
20231  { (eval echo "$as_me:20231: \"$ac_try\"") >&5
20232  (eval $ac_try) 2>&5
20233  ac_status=$?
20234  echo "$as_me:20234: \$? = $ac_status" >&5
20235  (exit $ac_status); }; }; then
20236  cf_cv_func_vsscanf=vsscanf
20237else
20238  echo "$as_me: failed program was:" >&5
20239cat conftest.$ac_ext >&5
20240
20241cat >conftest.$ac_ext <<_ACEOF
20242#line 20242 "configure"
20243#include "confdefs.h"
20244
20245#include <stdarg.h>
20246#include <stdio.h>
20247int
20248main (void)
20249{
20250
20251	FILE strbuf;
20252	char *str = "from";
20253
20254	strbuf._flag = _IOREAD;
20255	strbuf._ptr = strbuf._base = (unsigned char *) str;
20256	strbuf._cnt = strlen(str);
20257	strbuf._file = _NFILE;
20258	return (vfscanf(&strbuf, "%d", ap))
20259  ;
20260  return 0;
20261}
20262_ACEOF
20263rm -f conftest.$ac_objext conftest$ac_exeext
20264if { (eval echo "$as_me:20264: \"$ac_link\"") >&5
20265  (eval $ac_link) 2>&5
20266  ac_status=$?
20267  echo "$as_me:20267: \$? = $ac_status" >&5
20268  (exit $ac_status); } &&
20269         { ac_try='test -s conftest$ac_exeext'
20270  { (eval echo "$as_me:20270: \"$ac_try\"") >&5
20271  (eval $ac_try) 2>&5
20272  ac_status=$?
20273  echo "$as_me:20273: \$? = $ac_status" >&5
20274  (exit $ac_status); }; }; then
20275  cf_cv_func_vsscanf=vfscanf
20276else
20277  echo "$as_me: failed program was:" >&5
20278cat conftest.$ac_ext >&5
20279
20280cat >conftest.$ac_ext <<_ACEOF
20281#line 20281 "configure"
20282#include "confdefs.h"
20283
20284#include <stdarg.h>
20285#include <stdio.h>
20286int
20287main (void)
20288{
20289
20290	FILE strbuf;
20291	char *str = "from";
20292
20293	strbuf._flag = _IOREAD;
20294	strbuf._ptr = strbuf._base = (unsigned char *) str;
20295	strbuf._cnt = strlen(str);
20296	strbuf._file = _NFILE;
20297	return (_doscan(&strbuf, "%d", ap))
20298  ;
20299  return 0;
20300}
20301_ACEOF
20302rm -f conftest.$ac_objext conftest$ac_exeext
20303if { (eval echo "$as_me:20303: \"$ac_link\"") >&5
20304  (eval $ac_link) 2>&5
20305  ac_status=$?
20306  echo "$as_me:20306: \$? = $ac_status" >&5
20307  (exit $ac_status); } &&
20308         { ac_try='test -s conftest$ac_exeext'
20309  { (eval echo "$as_me:20309: \"$ac_try\"") >&5
20310  (eval $ac_try) 2>&5
20311  ac_status=$?
20312  echo "$as_me:20312: \$? = $ac_status" >&5
20313  (exit $ac_status); }; }; then
20314  cf_cv_func_vsscanf=_doscan
20315else
20316  echo "$as_me: failed program was:" >&5
20317cat conftest.$ac_ext >&5
20318
20319cf_cv_func_vsscanf=no
20320fi
20321rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20322fi
20323rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20324fi
20325rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20326fi
20327echo "$as_me:20327: result: $cf_cv_func_vsscanf" >&5
20328echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
20329
20330case $cf_cv_func_vsscanf in
20331(vsscanf)
20332cat >>confdefs.h <<\EOF
20333#define HAVE_VSSCANF 1
20334EOF
20335;;
20336(vfscanf)
20337cat >>confdefs.h <<\EOF
20338#define HAVE_VFSCANF 1
20339EOF
20340;;
20341(_doscan)
20342cat >>confdefs.h <<\EOF
20343#define HAVE__DOSCAN 1
20344EOF
20345;;
20346esac
20347
20348for ac_header in \
20349unistd.h \
20350
20351do
20352as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20353echo "$as_me:20353: checking for $ac_header" >&5
20354echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20355if eval "test \"\${$as_ac_Header+set}\" = set"; then
20356  echo $ECHO_N "(cached) $ECHO_C" >&6
20357else
20358  cat >conftest.$ac_ext <<_ACEOF
20359#line 20359 "configure"
20360#include "confdefs.h"
20361#include <$ac_header>
20362_ACEOF
20363if { (eval echo "$as_me:20363: \"$ac_cpp conftest.$ac_ext\"") >&5
20364  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20365  ac_status=$?
20366  egrep -v '^ *\+' conftest.er1 >conftest.err
20367  rm -f conftest.er1
20368  cat conftest.err >&5
20369  echo "$as_me:20369: \$? = $ac_status" >&5
20370  (exit $ac_status); } >/dev/null; then
20371  if test -s conftest.err; then
20372    ac_cpp_err=$ac_c_preproc_warn_flag
20373  else
20374    ac_cpp_err=
20375  fi
20376else
20377  ac_cpp_err=yes
20378fi
20379if test -z "$ac_cpp_err"; then
20380  eval "$as_ac_Header=yes"
20381else
20382  echo "$as_me: failed program was:" >&5
20383  cat conftest.$ac_ext >&5
20384  eval "$as_ac_Header=no"
20385fi
20386rm -f conftest.err conftest.$ac_ext
20387fi
20388echo "$as_me:20388: result: `eval echo '${'$as_ac_Header'}'`" >&5
20389echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20390if test `eval echo '${'$as_ac_Header'}'` = yes; then
20391  cat >>confdefs.h <<EOF
20392#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20393EOF
20394
20395fi
20396done
20397
20398echo "$as_me:20398: checking for working mkstemp" >&5
20399echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
20400if test "${cf_cv_func_mkstemp+set}" = set; then
20401  echo $ECHO_N "(cached) $ECHO_C" >&6
20402else
20403
20404rm -rf conftest*
20405if test "$cross_compiling" = yes; then
20406  cf_cv_func_mkstemp=maybe
20407else
20408  cat >conftest.$ac_ext <<_ACEOF
20409#line 20409 "configure"
20410#include "confdefs.h"
20411
20412#include <sys/types.h>
20413#ifdef HAVE_UNISTD_H
20414#include <unistd.h>
20415#endif
20416#include <stdlib.h>
20417#include <stdio.h>
20418#include <string.h>
20419#include <sys/stat.h>
20420int main(void)
20421{
20422	char *tmpl = "conftestXXXXXX";
20423	char name[2][80];
20424	int n;
20425	int result = 0;
20426	int fd;
20427	struct stat sb;
20428
20429	umask(077);
20430	for (n = 0; n < 2; ++n) {
20431		strcpy(name[n], tmpl);
20432		if ((fd = mkstemp(name[n])) >= 0) {
20433			if (!strcmp(name[n], tmpl)
20434			 || stat(name[n], &sb) != 0
20435			 || (sb.st_mode & S_IFMT) != S_IFREG
20436			 || (sb.st_mode & 077) != 0) {
20437				result = 1;
20438			}
20439			close(fd);
20440		}
20441	}
20442	if (result == 0
20443	 && !strcmp(name[0], name[1]))
20444		result = 1;
20445	${cf_cv_main_return:-return}(result);
20446}
20447
20448_ACEOF
20449rm -f conftest$ac_exeext
20450if { (eval echo "$as_me:20450: \"$ac_link\"") >&5
20451  (eval $ac_link) 2>&5
20452  ac_status=$?
20453  echo "$as_me:20453: \$? = $ac_status" >&5
20454  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20455  { (eval echo "$as_me:20455: \"$ac_try\"") >&5
20456  (eval $ac_try) 2>&5
20457  ac_status=$?
20458  echo "$as_me:20458: \$? = $ac_status" >&5
20459  (exit $ac_status); }; }; then
20460  cf_cv_func_mkstemp=yes
20461
20462else
20463  echo "$as_me: program exited with status $ac_status" >&5
20464echo "$as_me: failed program was:" >&5
20465cat conftest.$ac_ext >&5
20466cf_cv_func_mkstemp=no
20467
20468fi
20469rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20470fi
20471
20472fi
20473echo "$as_me:20473: result: $cf_cv_func_mkstemp" >&5
20474echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
20475if test "x$cf_cv_func_mkstemp" = xmaybe ; then
20476	echo "$as_me:20476: checking for mkstemp" >&5
20477echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
20478if test "${ac_cv_func_mkstemp+set}" = set; then
20479  echo $ECHO_N "(cached) $ECHO_C" >&6
20480else
20481  cat >conftest.$ac_ext <<_ACEOF
20482#line 20482 "configure"
20483#include "confdefs.h"
20484#define mkstemp autoconf_temporary
20485#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
20486#undef mkstemp
20487
20488#ifdef __cplusplus
20489extern "C"
20490#endif
20491
20492/* We use char because int might match the return type of a gcc2
20493   builtin and then its argument prototype would still apply.  */
20494char mkstemp (void);
20495
20496int
20497main (void)
20498{
20499
20500/* The GNU C library defines stubs for functions which it implements
20501    to always fail with ENOSYS.  Some functions are actually named
20502    something starting with __ and the normal name is an alias.  */
20503#if defined (__stub_mkstemp) || defined (__stub___mkstemp)
20504#error found stub for mkstemp
20505#endif
20506
20507	return mkstemp ();
20508  ;
20509  return 0;
20510}
20511_ACEOF
20512rm -f conftest.$ac_objext conftest$ac_exeext
20513if { (eval echo "$as_me:20513: \"$ac_link\"") >&5
20514  (eval $ac_link) 2>&5
20515  ac_status=$?
20516  echo "$as_me:20516: \$? = $ac_status" >&5
20517  (exit $ac_status); } &&
20518         { ac_try='test -s conftest$ac_exeext'
20519  { (eval echo "$as_me:20519: \"$ac_try\"") >&5
20520  (eval $ac_try) 2>&5
20521  ac_status=$?
20522  echo "$as_me:20522: \$? = $ac_status" >&5
20523  (exit $ac_status); }; }; then
20524  ac_cv_func_mkstemp=yes
20525else
20526  echo "$as_me: failed program was:" >&5
20527cat conftest.$ac_ext >&5
20528ac_cv_func_mkstemp=no
20529fi
20530rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20531fi
20532echo "$as_me:20532: result: $ac_cv_func_mkstemp" >&5
20533echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
20534
20535fi
20536if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
20537
20538cat >>confdefs.h <<\EOF
20539#define HAVE_MKSTEMP 1
20540EOF
20541
20542fi
20543
20544# setup for prototype of fallback for vsscanf()
20545
20546if test "$cf_cv_func_vsscanf" = vsscanf ; then
20547	HAVE_VSSCANF=1
20548else
20549	HAVE_VSSCANF=0
20550fi
20551
20552if test "x$cross_compiling" = xyes ; then
20553	{ echo "$as_me:20553: WARNING: cross compiling: assume setvbuf params not reversed" >&5
20554echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
20555else
20556	echo "$as_me:20556: checking whether setvbuf arguments are reversed" >&5
20557echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
20558if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
20559  echo $ECHO_N "(cached) $ECHO_C" >&6
20560else
20561  if test "$cross_compiling" = yes; then
20562  { { echo "$as_me:20562: error: cannot run test program while cross compiling" >&5
20563echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20564   { (exit 1); exit 1; }; }
20565else
20566  cat >conftest.$ac_ext <<_ACEOF
20567#line 20567 "configure"
20568#include "confdefs.h"
20569#include <stdio.h>
20570/* If setvbuf has the reversed format, exit 0. */
20571int
20572main (void)
20573{
20574  /* This call has the arguments reversed.
20575     A reversed system may check and see that the address of main
20576     is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
20577  if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
20578    $ac_main_return(1);
20579  putc('\r', stdout);
20580  $ac_main_return(0);			/* Non-reversed systems segv here.  */
20581}
20582_ACEOF
20583rm -f conftest$ac_exeext
20584if { (eval echo "$as_me:20584: \"$ac_link\"") >&5
20585  (eval $ac_link) 2>&5
20586  ac_status=$?
20587  echo "$as_me:20587: \$? = $ac_status" >&5
20588  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20589  { (eval echo "$as_me:20589: \"$ac_try\"") >&5
20590  (eval $ac_try) 2>&5
20591  ac_status=$?
20592  echo "$as_me:20592: \$? = $ac_status" >&5
20593  (exit $ac_status); }; }; then
20594  ac_cv_func_setvbuf_reversed=yes
20595else
20596  echo "$as_me: program exited with status $ac_status" >&5
20597echo "$as_me: failed program was:" >&5
20598cat conftest.$ac_ext >&5
20599ac_cv_func_setvbuf_reversed=no
20600fi
20601rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20602fi
20603rm -f core core.* *.core
20604fi
20605echo "$as_me:20605: result: $ac_cv_func_setvbuf_reversed" >&5
20606echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
20607if test $ac_cv_func_setvbuf_reversed = yes; then
20608
20609cat >>confdefs.h <<\EOF
20610#define SETVBUF_REVERSED 1
20611EOF
20612
20613fi
20614
20615fi
20616echo "$as_me:20616: checking for intptr_t" >&5
20617echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
20618if test "${ac_cv_type_intptr_t+set}" = set; then
20619  echo $ECHO_N "(cached) $ECHO_C" >&6
20620else
20621  cat >conftest.$ac_ext <<_ACEOF
20622#line 20622 "configure"
20623#include "confdefs.h"
20624$ac_includes_default
20625int
20626main (void)
20627{
20628if ((intptr_t *) 0)
20629  return 0;
20630if (sizeof (intptr_t))
20631  return 0;
20632  ;
20633  return 0;
20634}
20635_ACEOF
20636rm -f conftest.$ac_objext
20637if { (eval echo "$as_me:20637: \"$ac_compile\"") >&5
20638  (eval $ac_compile) 2>&5
20639  ac_status=$?
20640  echo "$as_me:20640: \$? = $ac_status" >&5
20641  (exit $ac_status); } &&
20642         { ac_try='test -s conftest.$ac_objext'
20643  { (eval echo "$as_me:20643: \"$ac_try\"") >&5
20644  (eval $ac_try) 2>&5
20645  ac_status=$?
20646  echo "$as_me:20646: \$? = $ac_status" >&5
20647  (exit $ac_status); }; }; then
20648  ac_cv_type_intptr_t=yes
20649else
20650  echo "$as_me: failed program was:" >&5
20651cat conftest.$ac_ext >&5
20652ac_cv_type_intptr_t=no
20653fi
20654rm -f conftest.$ac_objext conftest.$ac_ext
20655fi
20656echo "$as_me:20656: result: $ac_cv_type_intptr_t" >&5
20657echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
20658if test $ac_cv_type_intptr_t = yes; then
20659  :
20660else
20661
20662cat >>confdefs.h <<EOF
20663#define intptr_t long
20664EOF
20665
20666fi
20667
20668echo "$as_me:20668: checking for ssize_t" >&5
20669echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
20670if test "${ac_cv_type_ssize_t+set}" = set; then
20671  echo $ECHO_N "(cached) $ECHO_C" >&6
20672else
20673  cat >conftest.$ac_ext <<_ACEOF
20674#line 20674 "configure"
20675#include "confdefs.h"
20676$ac_includes_default
20677int
20678main (void)
20679{
20680if ((ssize_t *) 0)
20681  return 0;
20682if (sizeof (ssize_t))
20683  return 0;
20684  ;
20685  return 0;
20686}
20687_ACEOF
20688rm -f conftest.$ac_objext
20689if { (eval echo "$as_me:20689: \"$ac_compile\"") >&5
20690  (eval $ac_compile) 2>&5
20691  ac_status=$?
20692  echo "$as_me:20692: \$? = $ac_status" >&5
20693  (exit $ac_status); } &&
20694         { ac_try='test -s conftest.$ac_objext'
20695  { (eval echo "$as_me:20695: \"$ac_try\"") >&5
20696  (eval $ac_try) 2>&5
20697  ac_status=$?
20698  echo "$as_me:20698: \$? = $ac_status" >&5
20699  (exit $ac_status); }; }; then
20700  ac_cv_type_ssize_t=yes
20701else
20702  echo "$as_me: failed program was:" >&5
20703cat conftest.$ac_ext >&5
20704ac_cv_type_ssize_t=no
20705fi
20706rm -f conftest.$ac_objext conftest.$ac_ext
20707fi
20708echo "$as_me:20708: result: $ac_cv_type_ssize_t" >&5
20709echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
20710if test $ac_cv_type_ssize_t = yes; then
20711  :
20712else
20713
20714cat >>confdefs.h <<EOF
20715#define ssize_t int
20716EOF
20717
20718fi
20719
20720echo "$as_me:20720: checking for type sigaction_t" >&5
20721echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
20722if test "${cf_cv_type_sigaction+set}" = set; then
20723  echo $ECHO_N "(cached) $ECHO_C" >&6
20724else
20725
20726	cat >conftest.$ac_ext <<_ACEOF
20727#line 20727 "configure"
20728#include "confdefs.h"
20729
20730#include <signal.h>
20731int
20732main (void)
20733{
20734sigaction_t x
20735  ;
20736  return 0;
20737}
20738_ACEOF
20739rm -f conftest.$ac_objext
20740if { (eval echo "$as_me:20740: \"$ac_compile\"") >&5
20741  (eval $ac_compile) 2>&5
20742  ac_status=$?
20743  echo "$as_me:20743: \$? = $ac_status" >&5
20744  (exit $ac_status); } &&
20745         { ac_try='test -s conftest.$ac_objext'
20746  { (eval echo "$as_me:20746: \"$ac_try\"") >&5
20747  (eval $ac_try) 2>&5
20748  ac_status=$?
20749  echo "$as_me:20749: \$? = $ac_status" >&5
20750  (exit $ac_status); }; }; then
20751  cf_cv_type_sigaction=yes
20752else
20753  echo "$as_me: failed program was:" >&5
20754cat conftest.$ac_ext >&5
20755cf_cv_type_sigaction=no
20756fi
20757rm -f conftest.$ac_objext conftest.$ac_ext
20758fi
20759
20760echo "$as_me:20760: result: $cf_cv_type_sigaction" >&5
20761echo "${ECHO_T}$cf_cv_type_sigaction" >&6
20762test "$cf_cv_type_sigaction" = yes &&
20763cat >>confdefs.h <<\EOF
20764#define HAVE_TYPE_SIGACTION 1
20765EOF
20766
20767echo "$as_me:20767: checking declaration of size-change" >&5
20768echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
20769if test "${cf_cv_sizechange+set}" = set; then
20770  echo $ECHO_N "(cached) $ECHO_C" >&6
20771else
20772
20773	cf_cv_sizechange=unknown
20774	cf_save_CPPFLAGS="$CPPFLAGS"
20775
20776for cf_opts in "" "NEED_PTEM_H"
20777do
20778
20779	CPPFLAGS="$cf_save_CPPFLAGS"
20780	if test -n "$cf_opts"
20781	then
20782
20783	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20784	CPPFLAGS="${CPPFLAGS}-D$cf_opts"
20785
20786	fi
20787	cat >conftest.$ac_ext <<_ACEOF
20788#line 20788 "configure"
20789#include "confdefs.h"
20790#include <sys/types.h>
20791#ifdef HAVE_TERMIOS_H
20792#include <termios.h>
20793#else
20794#ifdef HAVE_TERMIO_H
20795#include <termio.h>
20796#endif
20797#endif
20798
20799#ifdef NEED_PTEM_H
20800/* This is a workaround for SCO:  they neglected to define struct winsize in
20801 * termios.h -- it's only in termio.h and ptem.h
20802 */
20803#include <sys/stream.h>
20804#include <sys/ptem.h>
20805#endif
20806
20807#ifdef HAVE_SYS_IOCTL_H
20808#include <sys/ioctl.h>
20809#endif
20810
20811int
20812main (void)
20813{
20814
20815#ifdef TIOCGSIZE
20816	struct ttysize win;	/* SunOS 3.0... */
20817	int y = win.ts_lines;
20818	int x = win.ts_cols;
20819#else
20820#ifdef TIOCGWINSZ
20821	struct winsize win;	/* everything else */
20822	int y = win.ws_row;
20823	int x = win.ws_col;
20824#else
20825	no TIOCGSIZE or TIOCGWINSZ
20826#endif /* TIOCGWINSZ */
20827#endif /* TIOCGSIZE */
20828
20829  ;
20830  return 0;
20831}
20832_ACEOF
20833rm -f conftest.$ac_objext
20834if { (eval echo "$as_me:20834: \"$ac_compile\"") >&5
20835  (eval $ac_compile) 2>&5
20836  ac_status=$?
20837  echo "$as_me:20837: \$? = $ac_status" >&5
20838  (exit $ac_status); } &&
20839         { ac_try='test -s conftest.$ac_objext'
20840  { (eval echo "$as_me:20840: \"$ac_try\"") >&5
20841  (eval $ac_try) 2>&5
20842  ac_status=$?
20843  echo "$as_me:20843: \$? = $ac_status" >&5
20844  (exit $ac_status); }; }; then
20845  cf_cv_sizechange=yes
20846else
20847  echo "$as_me: failed program was:" >&5
20848cat conftest.$ac_ext >&5
20849cf_cv_sizechange=no
20850fi
20851rm -f conftest.$ac_objext conftest.$ac_ext
20852
20853	CPPFLAGS="$cf_save_CPPFLAGS"
20854	if test "$cf_cv_sizechange" = yes ; then
20855		echo "size-change succeeded ($cf_opts)" >&5
20856		test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
20857		break
20858	fi
20859done
20860
20861fi
20862echo "$as_me:20862: result: $cf_cv_sizechange" >&5
20863echo "${ECHO_T}$cf_cv_sizechange" >&6
20864if test "$cf_cv_sizechange" != no ; then
20865
20866cat >>confdefs.h <<\EOF
20867#define HAVE_SIZECHANGE 1
20868EOF
20869
20870	case $cf_cv_sizechange in
20871	(NEED*)
20872		cat >>confdefs.h <<EOF
20873#define $cf_cv_sizechange  1
20874EOF
20875
20876		;;
20877	esac
20878fi
20879
20880echo "$as_me:20880: checking for memmove" >&5
20881echo $ECHO_N "checking for memmove... $ECHO_C" >&6
20882if test "${ac_cv_func_memmove+set}" = set; then
20883  echo $ECHO_N "(cached) $ECHO_C" >&6
20884else
20885  cat >conftest.$ac_ext <<_ACEOF
20886#line 20886 "configure"
20887#include "confdefs.h"
20888#define memmove autoconf_temporary
20889#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
20890#undef memmove
20891
20892#ifdef __cplusplus
20893extern "C"
20894#endif
20895
20896/* We use char because int might match the return type of a gcc2
20897   builtin and then its argument prototype would still apply.  */
20898char memmove (void);
20899
20900int
20901main (void)
20902{
20903
20904/* The GNU C library defines stubs for functions which it implements
20905    to always fail with ENOSYS.  Some functions are actually named
20906    something starting with __ and the normal name is an alias.  */
20907#if defined (__stub_memmove) || defined (__stub___memmove)
20908#error found stub for memmove
20909#endif
20910
20911	return memmove ();
20912  ;
20913  return 0;
20914}
20915_ACEOF
20916rm -f conftest.$ac_objext conftest$ac_exeext
20917if { (eval echo "$as_me:20917: \"$ac_link\"") >&5
20918  (eval $ac_link) 2>&5
20919  ac_status=$?
20920  echo "$as_me:20920: \$? = $ac_status" >&5
20921  (exit $ac_status); } &&
20922         { ac_try='test -s conftest$ac_exeext'
20923  { (eval echo "$as_me:20923: \"$ac_try\"") >&5
20924  (eval $ac_try) 2>&5
20925  ac_status=$?
20926  echo "$as_me:20926: \$? = $ac_status" >&5
20927  (exit $ac_status); }; }; then
20928  ac_cv_func_memmove=yes
20929else
20930  echo "$as_me: failed program was:" >&5
20931cat conftest.$ac_ext >&5
20932ac_cv_func_memmove=no
20933fi
20934rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20935fi
20936echo "$as_me:20936: result: $ac_cv_func_memmove" >&5
20937echo "${ECHO_T}$ac_cv_func_memmove" >&6
20938if test $ac_cv_func_memmove = yes; then
20939  :
20940else
20941
20942echo "$as_me:20942: checking for bcopy" >&5
20943echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
20944if test "${ac_cv_func_bcopy+set}" = set; then
20945  echo $ECHO_N "(cached) $ECHO_C" >&6
20946else
20947  cat >conftest.$ac_ext <<_ACEOF
20948#line 20948 "configure"
20949#include "confdefs.h"
20950#define bcopy autoconf_temporary
20951#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
20952#undef bcopy
20953
20954#ifdef __cplusplus
20955extern "C"
20956#endif
20957
20958/* We use char because int might match the return type of a gcc2
20959   builtin and then its argument prototype would still apply.  */
20960char bcopy (void);
20961
20962int
20963main (void)
20964{
20965
20966/* The GNU C library defines stubs for functions which it implements
20967    to always fail with ENOSYS.  Some functions are actually named
20968    something starting with __ and the normal name is an alias.  */
20969#if defined (__stub_bcopy) || defined (__stub___bcopy)
20970#error found stub for bcopy
20971#endif
20972
20973	return bcopy ();
20974  ;
20975  return 0;
20976}
20977_ACEOF
20978rm -f conftest.$ac_objext conftest$ac_exeext
20979if { (eval echo "$as_me:20979: \"$ac_link\"") >&5
20980  (eval $ac_link) 2>&5
20981  ac_status=$?
20982  echo "$as_me:20982: \$? = $ac_status" >&5
20983  (exit $ac_status); } &&
20984         { ac_try='test -s conftest$ac_exeext'
20985  { (eval echo "$as_me:20985: \"$ac_try\"") >&5
20986  (eval $ac_try) 2>&5
20987  ac_status=$?
20988  echo "$as_me:20988: \$? = $ac_status" >&5
20989  (exit $ac_status); }; }; then
20990  ac_cv_func_bcopy=yes
20991else
20992  echo "$as_me: failed program was:" >&5
20993cat conftest.$ac_ext >&5
20994ac_cv_func_bcopy=no
20995fi
20996rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20997fi
20998echo "$as_me:20998: result: $ac_cv_func_bcopy" >&5
20999echo "${ECHO_T}$ac_cv_func_bcopy" >&6
21000if test $ac_cv_func_bcopy = yes; then
21001
21002	echo "$as_me:21002: checking if bcopy does overlapping moves" >&5
21003echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
21004if test "${cf_cv_good_bcopy+set}" = set; then
21005  echo $ECHO_N "(cached) $ECHO_C" >&6
21006else
21007
21008		if test "$cross_compiling" = yes; then
21009  cf_cv_good_bcopy=unknown
21010else
21011  cat >conftest.$ac_ext <<_ACEOF
21012#line 21012 "configure"
21013#include "confdefs.h"
21014
21015int main(void) {
21016	static char data[] = "abcdefghijklmnopqrstuwwxyz";
21017	char temp[40];
21018	bcopy(data, temp, sizeof(data));
21019	bcopy(temp+10, temp, 15);
21020	bcopy(temp+5, temp+15, 10);
21021	${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
21022}
21023
21024_ACEOF
21025rm -f conftest$ac_exeext
21026if { (eval echo "$as_me:21026: \"$ac_link\"") >&5
21027  (eval $ac_link) 2>&5
21028  ac_status=$?
21029  echo "$as_me:21029: \$? = $ac_status" >&5
21030  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21031  { (eval echo "$as_me:21031: \"$ac_try\"") >&5
21032  (eval $ac_try) 2>&5
21033  ac_status=$?
21034  echo "$as_me:21034: \$? = $ac_status" >&5
21035  (exit $ac_status); }; }; then
21036  cf_cv_good_bcopy=yes
21037else
21038  echo "$as_me: program exited with status $ac_status" >&5
21039echo "$as_me: failed program was:" >&5
21040cat conftest.$ac_ext >&5
21041cf_cv_good_bcopy=no
21042fi
21043rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21044fi
21045
21046fi
21047echo "$as_me:21047: result: $cf_cv_good_bcopy" >&5
21048echo "${ECHO_T}$cf_cv_good_bcopy" >&6
21049
21050else
21051  cf_cv_good_bcopy=no
21052fi
21053
21054	if test "$cf_cv_good_bcopy" = yes ; then
21055
21056cat >>confdefs.h <<\EOF
21057#define USE_OK_BCOPY 1
21058EOF
21059
21060	else
21061
21062cat >>confdefs.h <<\EOF
21063#define USE_MY_MEMMOVE 1
21064EOF
21065
21066	fi
21067
21068fi
21069
21070tty 2>&1 >/dev/null || {
21071for ac_func in posix_openpt
21072do
21073as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21074echo "$as_me:21074: checking for $ac_func" >&5
21075echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21076if eval "test \"\${$as_ac_var+set}\" = set"; then
21077  echo $ECHO_N "(cached) $ECHO_C" >&6
21078else
21079  cat >conftest.$ac_ext <<_ACEOF
21080#line 21080 "configure"
21081#include "confdefs.h"
21082#define $ac_func autoconf_temporary
21083#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
21084#undef $ac_func
21085
21086#ifdef __cplusplus
21087extern "C"
21088#endif
21089
21090/* We use char because int might match the return type of a gcc2
21091   builtin and then its argument prototype would still apply.  */
21092char $ac_func (void);
21093
21094int
21095main (void)
21096{
21097
21098/* The GNU C library defines stubs for functions which it implements
21099    to always fail with ENOSYS.  Some functions are actually named
21100    something starting with __ and the normal name is an alias.  */
21101#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21102#error found stub for $ac_func
21103#endif
21104
21105	return $ac_func ();
21106  ;
21107  return 0;
21108}
21109_ACEOF
21110rm -f conftest.$ac_objext conftest$ac_exeext
21111if { (eval echo "$as_me:21111: \"$ac_link\"") >&5
21112  (eval $ac_link) 2>&5
21113  ac_status=$?
21114  echo "$as_me:21114: \$? = $ac_status" >&5
21115  (exit $ac_status); } &&
21116         { ac_try='test -s conftest$ac_exeext'
21117  { (eval echo "$as_me:21117: \"$ac_try\"") >&5
21118  (eval $ac_try) 2>&5
21119  ac_status=$?
21120  echo "$as_me:21120: \$? = $ac_status" >&5
21121  (exit $ac_status); }; }; then
21122  eval "$as_ac_var=yes"
21123else
21124  echo "$as_me: failed program was:" >&5
21125cat conftest.$ac_ext >&5
21126eval "$as_ac_var=no"
21127fi
21128rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21129fi
21130echo "$as_me:21130: result: `eval echo '${'$as_ac_var'}'`" >&5
21131echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21132if test `eval echo '${'$as_ac_var'}'` = yes; then
21133  cat >>confdefs.h <<EOF
21134#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21135EOF
21136
21137fi
21138done
21139 }
21140echo "$as_me:21140: checking if poll really works" >&5
21141echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
21142if test "${cf_cv_working_poll+set}" = set; then
21143  echo $ECHO_N "(cached) $ECHO_C" >&6
21144else
21145
21146if test "$cross_compiling" = yes; then
21147  cf_cv_working_poll=unknown
21148else
21149  cat >conftest.$ac_ext <<_ACEOF
21150#line 21150 "configure"
21151#include "confdefs.h"
21152
21153#include <stdlib.h>
21154#include <stdio.h>
21155#include <unistd.h>
21156#include <fcntl.h>
21157#ifdef HAVE_POLL_H
21158#include <poll.h>
21159#else
21160#include <sys/poll.h>
21161#endif
21162int main(void) {
21163	struct pollfd myfds;
21164	int ret;
21165
21166	/* check for Darwin bug with respect to "devices" */
21167	myfds.fd = open("/dev/null", 1);	/* O_WRONLY */
21168	if (myfds.fd < 0)
21169		myfds.fd = 0;
21170	myfds.events = POLLIN;
21171	myfds.revents = 0;
21172
21173	ret = poll(&myfds, 1, 100);
21174
21175	if (ret < 0 || (myfds.revents & POLLNVAL)) {
21176		ret = -1;
21177	} else {
21178		int fd = 0;
21179		if (!isatty(fd)) {
21180			fd = open("/dev/tty", 2);	/* O_RDWR */
21181		}
21182#ifdef HAVE_POSIX_OPENPT
21183		if (fd < 0) {
21184			fd = posix_openpt(O_RDWR);
21185		}
21186#endif
21187
21188		if (fd >= 0) {
21189			/* also check with standard input */
21190			myfds.fd = fd;
21191			myfds.events = POLLIN;
21192			myfds.revents = 0;
21193			ret = poll(&myfds, 1, 100);
21194		} else {
21195			ret = -1;
21196		}
21197	}
21198	${cf_cv_main_return:-return}(ret < 0);
21199}
21200_ACEOF
21201rm -f conftest$ac_exeext
21202if { (eval echo "$as_me:21202: \"$ac_link\"") >&5
21203  (eval $ac_link) 2>&5
21204  ac_status=$?
21205  echo "$as_me:21205: \$? = $ac_status" >&5
21206  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21207  { (eval echo "$as_me:21207: \"$ac_try\"") >&5
21208  (eval $ac_try) 2>&5
21209  ac_status=$?
21210  echo "$as_me:21210: \$? = $ac_status" >&5
21211  (exit $ac_status); }; }; then
21212  cf_cv_working_poll=yes
21213else
21214  echo "$as_me: program exited with status $ac_status" >&5
21215echo "$as_me: failed program was:" >&5
21216cat conftest.$ac_ext >&5
21217cf_cv_working_poll=no
21218fi
21219rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21220fi
21221fi
21222echo "$as_me:21222: result: $cf_cv_working_poll" >&5
21223echo "${ECHO_T}$cf_cv_working_poll" >&6
21224test "$cf_cv_working_poll" = "yes" &&
21225cat >>confdefs.h <<\EOF
21226#define HAVE_WORKING_POLL 1
21227EOF
21228
21229echo "$as_me:21229: checking for va_copy" >&5
21230echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21231if test "${cf_cv_have_va_copy+set}" = set; then
21232  echo $ECHO_N "(cached) $ECHO_C" >&6
21233else
21234
21235cat >conftest.$ac_ext <<_ACEOF
21236#line 21236 "configure"
21237#include "confdefs.h"
21238
21239#include <stdarg.h>
21240
21241int
21242main (void)
21243{
21244
21245	static va_list dst;
21246	static va_list src;
21247	va_copy(dst, src)
21248  ;
21249  return 0;
21250}
21251_ACEOF
21252rm -f conftest.$ac_objext conftest$ac_exeext
21253if { (eval echo "$as_me:21253: \"$ac_link\"") >&5
21254  (eval $ac_link) 2>&5
21255  ac_status=$?
21256  echo "$as_me:21256: \$? = $ac_status" >&5
21257  (exit $ac_status); } &&
21258         { ac_try='test -s conftest$ac_exeext'
21259  { (eval echo "$as_me:21259: \"$ac_try\"") >&5
21260  (eval $ac_try) 2>&5
21261  ac_status=$?
21262  echo "$as_me:21262: \$? = $ac_status" >&5
21263  (exit $ac_status); }; }; then
21264  cf_cv_have_va_copy=yes
21265else
21266  echo "$as_me: failed program was:" >&5
21267cat conftest.$ac_ext >&5
21268cf_cv_have_va_copy=no
21269fi
21270rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21271fi
21272echo "$as_me:21272: result: $cf_cv_have_va_copy" >&5
21273echo "${ECHO_T}$cf_cv_have_va_copy" >&6
21274
21275if test "$cf_cv_have_va_copy" = yes;
21276then
21277
21278cat >>confdefs.h <<\EOF
21279#define HAVE_VA_COPY 1
21280EOF
21281
21282else # !cf_cv_have_va_copy
21283
21284echo "$as_me:21284: checking for __va_copy" >&5
21285echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
21286if test "${cf_cv_have___va_copy+set}" = set; then
21287  echo $ECHO_N "(cached) $ECHO_C" >&6
21288else
21289
21290cat >conftest.$ac_ext <<_ACEOF
21291#line 21291 "configure"
21292#include "confdefs.h"
21293
21294#include <stdarg.h>
21295
21296int
21297main (void)
21298{
21299
21300	static va_list dst;
21301	static va_list src;
21302	__va_copy(dst, src)
21303  ;
21304  return 0;
21305}
21306_ACEOF
21307rm -f conftest.$ac_objext conftest$ac_exeext
21308if { (eval echo "$as_me:21308: \"$ac_link\"") >&5
21309  (eval $ac_link) 2>&5
21310  ac_status=$?
21311  echo "$as_me:21311: \$? = $ac_status" >&5
21312  (exit $ac_status); } &&
21313         { ac_try='test -s conftest$ac_exeext'
21314  { (eval echo "$as_me:21314: \"$ac_try\"") >&5
21315  (eval $ac_try) 2>&5
21316  ac_status=$?
21317  echo "$as_me:21317: \$? = $ac_status" >&5
21318  (exit $ac_status); }; }; then
21319  cf_cv_have___va_copy=yes
21320else
21321  echo "$as_me: failed program was:" >&5
21322cat conftest.$ac_ext >&5
21323cf_cv_have___va_copy=no
21324fi
21325rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21326fi
21327echo "$as_me:21327: result: $cf_cv_have___va_copy" >&5
21328echo "${ECHO_T}$cf_cv_have___va_copy" >&6
21329
21330if test "$cf_cv_have___va_copy" = yes
21331then
21332
21333cat >>confdefs.h <<\EOF
21334#define HAVE___VA_COPY 1
21335EOF
21336
21337else # !cf_cv_have___va_copy
21338
21339echo "$as_me:21339: checking for __builtin_va_copy" >&5
21340echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
21341if test "${cf_cv_have___builtin_va_copy+set}" = set; then
21342  echo $ECHO_N "(cached) $ECHO_C" >&6
21343else
21344
21345cat >conftest.$ac_ext <<_ACEOF
21346#line 21346 "configure"
21347#include "confdefs.h"
21348
21349#include <stdarg.h>
21350
21351int
21352main (void)
21353{
21354
21355	static va_list dst;
21356	static va_list src;
21357	__builtin_va_copy(dst, src)
21358  ;
21359  return 0;
21360}
21361_ACEOF
21362rm -f conftest.$ac_objext conftest$ac_exeext
21363if { (eval echo "$as_me:21363: \"$ac_link\"") >&5
21364  (eval $ac_link) 2>&5
21365  ac_status=$?
21366  echo "$as_me:21366: \$? = $ac_status" >&5
21367  (exit $ac_status); } &&
21368         { ac_try='test -s conftest$ac_exeext'
21369  { (eval echo "$as_me:21369: \"$ac_try\"") >&5
21370  (eval $ac_try) 2>&5
21371  ac_status=$?
21372  echo "$as_me:21372: \$? = $ac_status" >&5
21373  (exit $ac_status); }; }; then
21374  cf_cv_have___builtin_va_copy=yes
21375else
21376  echo "$as_me: failed program was:" >&5
21377cat conftest.$ac_ext >&5
21378cf_cv_have___builtin_va_copy=no
21379fi
21380rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21381fi
21382echo "$as_me:21382: result: $cf_cv_have___builtin_va_copy" >&5
21383echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
21384
21385test "$cf_cv_have___builtin_va_copy" = yes &&
21386
21387cat >>confdefs.h <<\EOF
21388#define HAVE___BUILTIN_VA_COPY 1
21389EOF
21390
21391fi # cf_cv_have___va_copy
21392
21393fi # cf_cv_have_va_copy
21394
21395case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
21396(*yes*)
21397	;;
21398
21399(*)
21400	echo "$as_me:21400: checking if we can simply copy va_list" >&5
21401echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
21402if test "${cf_cv_pointer_va_list+set}" = set; then
21403  echo $ECHO_N "(cached) $ECHO_C" >&6
21404else
21405
21406cat >conftest.$ac_ext <<_ACEOF
21407#line 21407 "configure"
21408#include "confdefs.h"
21409
21410#include <stdarg.h>
21411
21412int
21413main (void)
21414{
21415
21416	va_list dst;
21417	va_list src;
21418	dst = src
21419  ;
21420  return 0;
21421}
21422_ACEOF
21423rm -f conftest.$ac_objext conftest$ac_exeext
21424if { (eval echo "$as_me:21424: \"$ac_link\"") >&5
21425  (eval $ac_link) 2>&5
21426  ac_status=$?
21427  echo "$as_me:21427: \$? = $ac_status" >&5
21428  (exit $ac_status); } &&
21429         { ac_try='test -s conftest$ac_exeext'
21430  { (eval echo "$as_me:21430: \"$ac_try\"") >&5
21431  (eval $ac_try) 2>&5
21432  ac_status=$?
21433  echo "$as_me:21433: \$? = $ac_status" >&5
21434  (exit $ac_status); }; }; then
21435  cf_cv_pointer_va_list=yes
21436else
21437  echo "$as_me: failed program was:" >&5
21438cat conftest.$ac_ext >&5
21439cf_cv_pointer_va_list=no
21440fi
21441rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21442fi
21443echo "$as_me:21443: result: $cf_cv_pointer_va_list" >&5
21444echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
21445
21446	if test "$cf_cv_pointer_va_list" = no
21447	then
21448		echo "$as_me:21448: checking if we can copy va_list indirectly" >&5
21449echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
21450if test "${cf_cv_array_va_list+set}" = set; then
21451  echo $ECHO_N "(cached) $ECHO_C" >&6
21452else
21453
21454cat >conftest.$ac_ext <<_ACEOF
21455#line 21455 "configure"
21456#include "confdefs.h"
21457
21458#include <stdarg.h>
21459
21460int
21461main (void)
21462{
21463
21464	va_list dst;
21465	va_list src;
21466	*dst = *src
21467  ;
21468  return 0;
21469}
21470_ACEOF
21471rm -f conftest.$ac_objext conftest$ac_exeext
21472if { (eval echo "$as_me:21472: \"$ac_link\"") >&5
21473  (eval $ac_link) 2>&5
21474  ac_status=$?
21475  echo "$as_me:21475: \$? = $ac_status" >&5
21476  (exit $ac_status); } &&
21477         { ac_try='test -s conftest$ac_exeext'
21478  { (eval echo "$as_me:21478: \"$ac_try\"") >&5
21479  (eval $ac_try) 2>&5
21480  ac_status=$?
21481  echo "$as_me:21481: \$? = $ac_status" >&5
21482  (exit $ac_status); }; }; then
21483  cf_cv_array_va_list=yes
21484else
21485  echo "$as_me: failed program was:" >&5
21486cat conftest.$ac_ext >&5
21487cf_cv_array_va_list=no
21488fi
21489rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21490fi
21491echo "$as_me:21491: result: $cf_cv_array_va_list" >&5
21492echo "${ECHO_T}$cf_cv_array_va_list" >&6
21493		test "$cf_cv_array_va_list" = yes &&
21494cat >>confdefs.h <<\EOF
21495#define ARRAY_VA_LIST 1
21496EOF
21497
21498	fi
21499	;;
21500esac
21501
21502echo "$as_me:21502: checking for pid_t" >&5
21503echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
21504if test "${ac_cv_type_pid_t+set}" = set; then
21505  echo $ECHO_N "(cached) $ECHO_C" >&6
21506else
21507  cat >conftest.$ac_ext <<_ACEOF
21508#line 21508 "configure"
21509#include "confdefs.h"
21510$ac_includes_default
21511int
21512main (void)
21513{
21514if ((pid_t *) 0)
21515  return 0;
21516if (sizeof (pid_t))
21517  return 0;
21518  ;
21519  return 0;
21520}
21521_ACEOF
21522rm -f conftest.$ac_objext
21523if { (eval echo "$as_me:21523: \"$ac_compile\"") >&5
21524  (eval $ac_compile) 2>&5
21525  ac_status=$?
21526  echo "$as_me:21526: \$? = $ac_status" >&5
21527  (exit $ac_status); } &&
21528         { ac_try='test -s conftest.$ac_objext'
21529  { (eval echo "$as_me:21529: \"$ac_try\"") >&5
21530  (eval $ac_try) 2>&5
21531  ac_status=$?
21532  echo "$as_me:21532: \$? = $ac_status" >&5
21533  (exit $ac_status); }; }; then
21534  ac_cv_type_pid_t=yes
21535else
21536  echo "$as_me: failed program was:" >&5
21537cat conftest.$ac_ext >&5
21538ac_cv_type_pid_t=no
21539fi
21540rm -f conftest.$ac_objext conftest.$ac_ext
21541fi
21542echo "$as_me:21542: result: $ac_cv_type_pid_t" >&5
21543echo "${ECHO_T}$ac_cv_type_pid_t" >&6
21544if test $ac_cv_type_pid_t = yes; then
21545  :
21546else
21547
21548cat >>confdefs.h <<EOF
21549#define pid_t int
21550EOF
21551
21552fi
21553
21554for ac_header in unistd.h vfork.h
21555do
21556as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21557echo "$as_me:21557: checking for $ac_header" >&5
21558echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21559if eval "test \"\${$as_ac_Header+set}\" = set"; then
21560  echo $ECHO_N "(cached) $ECHO_C" >&6
21561else
21562  cat >conftest.$ac_ext <<_ACEOF
21563#line 21563 "configure"
21564#include "confdefs.h"
21565#include <$ac_header>
21566_ACEOF
21567if { (eval echo "$as_me:21567: \"$ac_cpp conftest.$ac_ext\"") >&5
21568  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21569  ac_status=$?
21570  egrep -v '^ *\+' conftest.er1 >conftest.err
21571  rm -f conftest.er1
21572  cat conftest.err >&5
21573  echo "$as_me:21573: \$? = $ac_status" >&5
21574  (exit $ac_status); } >/dev/null; then
21575  if test -s conftest.err; then
21576    ac_cpp_err=$ac_c_preproc_warn_flag
21577  else
21578    ac_cpp_err=
21579  fi
21580else
21581  ac_cpp_err=yes
21582fi
21583if test -z "$ac_cpp_err"; then
21584  eval "$as_ac_Header=yes"
21585else
21586  echo "$as_me: failed program was:" >&5
21587  cat conftest.$ac_ext >&5
21588  eval "$as_ac_Header=no"
21589fi
21590rm -f conftest.err conftest.$ac_ext
21591fi
21592echo "$as_me:21592: result: `eval echo '${'$as_ac_Header'}'`" >&5
21593echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21594if test `eval echo '${'$as_ac_Header'}'` = yes; then
21595  cat >>confdefs.h <<EOF
21596#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21597EOF
21598
21599fi
21600done
21601
21602for ac_func in fork vfork
21603do
21604as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21605echo "$as_me:21605: checking for $ac_func" >&5
21606echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21607if eval "test \"\${$as_ac_var+set}\" = set"; then
21608  echo $ECHO_N "(cached) $ECHO_C" >&6
21609else
21610  cat >conftest.$ac_ext <<_ACEOF
21611#line 21611 "configure"
21612#include "confdefs.h"
21613#define $ac_func autoconf_temporary
21614#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
21615#undef $ac_func
21616
21617#ifdef __cplusplus
21618extern "C"
21619#endif
21620
21621/* We use char because int might match the return type of a gcc2
21622   builtin and then its argument prototype would still apply.  */
21623char $ac_func (void);
21624
21625int
21626main (void)
21627{
21628
21629/* The GNU C library defines stubs for functions which it implements
21630    to always fail with ENOSYS.  Some functions are actually named
21631    something starting with __ and the normal name is an alias.  */
21632#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21633#error found stub for $ac_func
21634#endif
21635
21636	return $ac_func ();
21637  ;
21638  return 0;
21639}
21640_ACEOF
21641rm -f conftest.$ac_objext conftest$ac_exeext
21642if { (eval echo "$as_me:21642: \"$ac_link\"") >&5
21643  (eval $ac_link) 2>&5
21644  ac_status=$?
21645  echo "$as_me:21645: \$? = $ac_status" >&5
21646  (exit $ac_status); } &&
21647         { ac_try='test -s conftest$ac_exeext'
21648  { (eval echo "$as_me:21648: \"$ac_try\"") >&5
21649  (eval $ac_try) 2>&5
21650  ac_status=$?
21651  echo "$as_me:21651: \$? = $ac_status" >&5
21652  (exit $ac_status); }; }; then
21653  eval "$as_ac_var=yes"
21654else
21655  echo "$as_me: failed program was:" >&5
21656cat conftest.$ac_ext >&5
21657eval "$as_ac_var=no"
21658fi
21659rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21660fi
21661echo "$as_me:21661: result: `eval echo '${'$as_ac_var'}'`" >&5
21662echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21663if test `eval echo '${'$as_ac_var'}'` = yes; then
21664  cat >>confdefs.h <<EOF
21665#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21666EOF
21667
21668fi
21669done
21670
21671ac_cv_func_fork_works=$ac_cv_func_fork
21672if test "x$ac_cv_func_fork" = xyes; then
21673  echo "$as_me:21673: checking for working fork" >&5
21674echo $ECHO_N "checking for working fork... $ECHO_C" >&6
21675if test "${ac_cv_func_fork_works+set}" = set; then
21676  echo $ECHO_N "(cached) $ECHO_C" >&6
21677else
21678  if test "$cross_compiling" = yes; then
21679  ac_cv_func_fork_works=cross
21680else
21681  cat >conftest.$ac_ext <<_ACEOF
21682/* By Rüdiger Kuhlmann. */
21683      #include <sys/types.h>
21684      #if HAVE_UNISTD_H
21685      # include <unistd.h>
21686      #endif
21687      /* Some systems only have a dummy stub for fork() */
21688      int main (void)
21689      {
21690        if (fork() < 0)
21691          $ac_main_return (1);
21692        $ac_main_return (0);
21693      }
21694_ACEOF
21695rm -f conftest$ac_exeext
21696if { (eval echo "$as_me:21696: \"$ac_link\"") >&5
21697  (eval $ac_link) 2>&5
21698  ac_status=$?
21699  echo "$as_me:21699: \$? = $ac_status" >&5
21700  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21701  { (eval echo "$as_me:21701: \"$ac_try\"") >&5
21702  (eval $ac_try) 2>&5
21703  ac_status=$?
21704  echo "$as_me:21704: \$? = $ac_status" >&5
21705  (exit $ac_status); }; }; then
21706  ac_cv_func_fork_works=yes
21707else
21708  echo "$as_me: program exited with status $ac_status" >&5
21709echo "$as_me: failed program was:" >&5
21710cat conftest.$ac_ext >&5
21711ac_cv_func_fork_works=no
21712fi
21713rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21714fi
21715fi
21716echo "$as_me:21716: result: $ac_cv_func_fork_works" >&5
21717echo "${ECHO_T}$ac_cv_func_fork_works" >&6
21718
21719fi
21720if test "x$ac_cv_func_fork_works" = xcross; then
21721  case $host in
21722    *-*-amigaos* | *-*-msdosdjgpp*)
21723      # Override, as these systems have only a dummy fork() stub
21724      ac_cv_func_fork_works=no
21725      ;;
21726    *)
21727      ac_cv_func_fork_works=yes
21728      ;;
21729  esac
21730  { echo "$as_me:21730: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
21731echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
21732fi
21733ac_cv_func_vfork_works=$ac_cv_func_vfork
21734if test "x$ac_cv_func_vfork" = xyes; then
21735  echo "$as_me:21735: checking for working vfork" >&5
21736echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
21737if test "${ac_cv_func_vfork_works+set}" = set; then
21738  echo $ECHO_N "(cached) $ECHO_C" >&6
21739else
21740  if test "$cross_compiling" = yes; then
21741  ac_cv_func_vfork_works=cross
21742else
21743  cat >conftest.$ac_ext <<_ACEOF
21744#line 21744 "configure"
21745#include "confdefs.h"
21746/* Thanks to Paul Eggert for this test.  */
21747#include <stdio.h>
21748#include <sys/types.h>
21749#include <sys/stat.h>
21750#if HAVE_UNISTD_H
21751# include <unistd.h>
21752#endif
21753#if HAVE_VFORK_H
21754# include <vfork.h>
21755#endif
21756/* On some sparc systems, changes by the child to local and incoming
21757   argument registers are propagated back to the parent.  The compiler
21758   is told about this with #include <vfork.h>, but some compilers
21759   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
21760   static variable whose address is put into a register that is
21761   clobbered by the vfork.  */
21762static
21763#ifdef __cplusplus
21764sparc_address_test (int arg)
21765# else
21766sparc_address_test (arg) int arg;
21767#endif
21768{
21769  static pid_t child;
21770  if (!child) {
21771    child = vfork ();
21772    if (child < 0) {
21773      perror ("vfork");
21774      _exit(2);
21775    }
21776    if (!child) {
21777      arg = getpid();
21778      write(-1, "", 0);
21779      _exit (arg);
21780    }
21781  }
21782}
21783
21784int
21785main (void)
21786{
21787  pid_t parent = getpid ();
21788  pid_t child;
21789
21790  sparc_address_test ();
21791
21792  child = vfork ();
21793
21794  if (child == 0) {
21795    /* Here is another test for sparc vfork register problems.  This
21796       test uses lots of local variables, at least as many local
21797       variables as main has allocated so far including compiler
21798       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
21799       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
21800       reuse the register of parent for one of the local variables,
21801       since it will think that parent can't possibly be used any more
21802       in this routine.  Assigning to the local variable will thus
21803       munge parent in the parent process.  */
21804    pid_t
21805      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
21806      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
21807    /* Convince the compiler that p..p7 are live; otherwise, it might
21808       use the same hardware register for all 8 local variables.  */
21809    if (p != p1 || p != p2 || p != p3 || p != p4
21810	|| p != p5 || p != p6 || p != p7)
21811      _exit(1);
21812
21813    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
21814       from child file descriptors.  If the child closes a descriptor
21815       before it execs or exits, this munges the parent's descriptor
21816       as well.  Test for this by closing stdout in the child.  */
21817    _exit(close(fileno(stdout)) != 0);
21818  } else {
21819    int status;
21820    struct stat st;
21821
21822    while (wait(&status) != child)
21823      ;
21824    $ac_main_return(
21825	 /* Was there some problem with vforking?  */
21826	 child < 0
21827
21828	 /* Did the child fail?  (This shouldn't happen.)  */
21829	 || status
21830
21831	 /* Did the vfork/compiler bug occur?  */
21832	 || parent != getpid()
21833
21834	 /* Did the file descriptor bug occur?  */
21835	 || fstat(fileno(stdout), &st) != 0
21836	 );
21837  }
21838}
21839_ACEOF
21840rm -f conftest$ac_exeext
21841if { (eval echo "$as_me:21841: \"$ac_link\"") >&5
21842  (eval $ac_link) 2>&5
21843  ac_status=$?
21844  echo "$as_me:21844: \$? = $ac_status" >&5
21845  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21846  { (eval echo "$as_me:21846: \"$ac_try\"") >&5
21847  (eval $ac_try) 2>&5
21848  ac_status=$?
21849  echo "$as_me:21849: \$? = $ac_status" >&5
21850  (exit $ac_status); }; }; then
21851  ac_cv_func_vfork_works=yes
21852else
21853  echo "$as_me: program exited with status $ac_status" >&5
21854echo "$as_me: failed program was:" >&5
21855cat conftest.$ac_ext >&5
21856ac_cv_func_vfork_works=no
21857fi
21858rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21859fi
21860fi
21861echo "$as_me:21861: result: $ac_cv_func_vfork_works" >&5
21862echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
21863
21864fi;
21865if test "x$ac_cv_func_fork_works" = xcross; then
21866  ac_cv_func_vfork_works=ac_cv_func_vfork
21867  { echo "$as_me:21867: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
21868echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
21869fi
21870
21871if test "x$ac_cv_func_vfork_works" = xyes; then
21872
21873cat >>confdefs.h <<\EOF
21874#define HAVE_WORKING_VFORK 1
21875EOF
21876
21877else
21878
21879cat >>confdefs.h <<\EOF
21880#define vfork fork
21881EOF
21882
21883fi
21884if test "x$ac_cv_func_fork_works" = xyes; then
21885
21886cat >>confdefs.h <<\EOF
21887#define HAVE_WORKING_FORK 1
21888EOF
21889
21890fi
21891
21892echo "$as_me:21892: checking if fopen accepts explicit binary mode" >&5
21893echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
21894if test "${cf_cv_fopen_bin_r+set}" = set; then
21895  echo $ECHO_N "(cached) $ECHO_C" >&6
21896else
21897
21898	if test "$cross_compiling" = yes; then
21899  cf_cv_fopen_bin_r=unknown
21900else
21901  cat >conftest.$ac_ext <<_ACEOF
21902#line 21902 "configure"
21903#include "confdefs.h"
21904
21905#include <stdio.h>
21906int main(void) {
21907	FILE *fp = fopen("conftest.tmp", "wb");
21908	int rc = 0;
21909	if (fp != 0) {
21910		int p, q;
21911		for (p = 0; p < 256; ++p) {
21912			fputc(p, fp);
21913		}
21914		fclose(fp);
21915		fp = fopen("conftest.tmp", "rb");
21916		if (fp != 0) {
21917			for (p = 0; p < 256; ++p) {
21918				q = fgetc(fp);
21919				if (q != p) {
21920					rc = 1;
21921					break;
21922				}
21923			}
21924		} else {
21925			rc = 1;
21926		}
21927	} else {
21928		rc = 1;
21929	}
21930	${cf_cv_main_return:-return} (rc);
21931}
21932
21933_ACEOF
21934rm -f conftest$ac_exeext
21935if { (eval echo "$as_me:21935: \"$ac_link\"") >&5
21936  (eval $ac_link) 2>&5
21937  ac_status=$?
21938  echo "$as_me:21938: \$? = $ac_status" >&5
21939  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21940  { (eval echo "$as_me:21940: \"$ac_try\"") >&5
21941  (eval $ac_try) 2>&5
21942  ac_status=$?
21943  echo "$as_me:21943: \$? = $ac_status" >&5
21944  (exit $ac_status); }; }; then
21945  cf_cv_fopen_bin_r=yes
21946else
21947  echo "$as_me: program exited with status $ac_status" >&5
21948echo "$as_me: failed program was:" >&5
21949cat conftest.$ac_ext >&5
21950cf_cv_fopen_bin_r=no
21951fi
21952rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21953fi
21954
21955fi
21956echo "$as_me:21956: result: $cf_cv_fopen_bin_r" >&5
21957echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
21958test "x$cf_cv_fopen_bin_r" != xno &&
21959cat >>confdefs.h <<\EOF
21960#define USE_FOPEN_BIN_R 1
21961EOF
21962
21963# special check for test/ditto.c
21964
21965echo "$as_me:21965: checking for openpty in -lutil" >&5
21966echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
21967if test "${ac_cv_lib_util_openpty+set}" = set; then
21968  echo $ECHO_N "(cached) $ECHO_C" >&6
21969else
21970  ac_check_lib_save_LIBS=$LIBS
21971LIBS="-lutil  $LIBS"
21972cat >conftest.$ac_ext <<_ACEOF
21973#line 21973 "configure"
21974#include "confdefs.h"
21975
21976/* Override any gcc2 internal prototype to avoid an error.  */
21977#ifdef __cplusplus
21978extern "C"
21979#endif
21980/* We use char because int might match the return type of a gcc2
21981   builtin and then its argument prototype would still apply.  */
21982char openpty ();
21983int
21984main (void)
21985{
21986openpty ();
21987  ;
21988  return 0;
21989}
21990_ACEOF
21991rm -f conftest.$ac_objext conftest$ac_exeext
21992if { (eval echo "$as_me:21992: \"$ac_link\"") >&5
21993  (eval $ac_link) 2>&5
21994  ac_status=$?
21995  echo "$as_me:21995: \$? = $ac_status" >&5
21996  (exit $ac_status); } &&
21997         { ac_try='test -s conftest$ac_exeext'
21998  { (eval echo "$as_me:21998: \"$ac_try\"") >&5
21999  (eval $ac_try) 2>&5
22000  ac_status=$?
22001  echo "$as_me:22001: \$? = $ac_status" >&5
22002  (exit $ac_status); }; }; then
22003  ac_cv_lib_util_openpty=yes
22004else
22005  echo "$as_me: failed program was:" >&5
22006cat conftest.$ac_ext >&5
22007ac_cv_lib_util_openpty=no
22008fi
22009rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22010LIBS=$ac_check_lib_save_LIBS
22011fi
22012echo "$as_me:22012: result: $ac_cv_lib_util_openpty" >&5
22013echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
22014if test $ac_cv_lib_util_openpty = yes; then
22015  cf_cv_lib_util=yes
22016else
22017  cf_cv_lib_util=no
22018fi
22019
22020echo "$as_me:22020: checking for openpty header" >&5
22021echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
22022if test "${cf_cv_func_openpty+set}" = set; then
22023  echo $ECHO_N "(cached) $ECHO_C" >&6
22024else
22025
22026	cf_save_LIBS="$LIBS"
22027	test $cf_cv_lib_util = yes && {
22028cf_add_libs="$LIBS"
22029# reverse order
22030cf_add_0lib=
22031for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22032# filter duplicates
22033for cf_add_1lib in $cf_add_0lib; do
22034	for cf_add_2lib in $cf_add_libs; do
22035		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22036			cf_add_1lib=
22037			break
22038		fi
22039	done
22040	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22041done
22042LIBS="$cf_add_libs"
22043 }
22044	for cf_header in pty.h libutil.h util.h
22045	do
22046	cat >conftest.$ac_ext <<_ACEOF
22047#line 22047 "configure"
22048#include "confdefs.h"
22049
22050#include <$cf_header>
22051
22052int
22053main (void)
22054{
22055
22056	int x = openpty((int *)0, (int *)0, (char *)0,
22057				   (struct termios *)0, (struct winsize *)0);
22058
22059  ;
22060  return 0;
22061}
22062_ACEOF
22063rm -f conftest.$ac_objext conftest$ac_exeext
22064if { (eval echo "$as_me:22064: \"$ac_link\"") >&5
22065  (eval $ac_link) 2>&5
22066  ac_status=$?
22067  echo "$as_me:22067: \$? = $ac_status" >&5
22068  (exit $ac_status); } &&
22069         { ac_try='test -s conftest$ac_exeext'
22070  { (eval echo "$as_me:22070: \"$ac_try\"") >&5
22071  (eval $ac_try) 2>&5
22072  ac_status=$?
22073  echo "$as_me:22073: \$? = $ac_status" >&5
22074  (exit $ac_status); }; }; then
22075
22076		cf_cv_func_openpty=$cf_header
22077		break
22078
22079else
22080  echo "$as_me: failed program was:" >&5
22081cat conftest.$ac_ext >&5
22082
22083		cf_cv_func_openpty=no
22084
22085fi
22086rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22087	done
22088	LIBS="$cf_save_LIBS"
22089
22090fi
22091echo "$as_me:22091: result: $cf_cv_func_openpty" >&5
22092echo "${ECHO_T}$cf_cv_func_openpty" >&6
22093
22094if test "$cf_cv_func_openpty" != no ; then
22095
22096cat >>confdefs.h <<EOF
22097#define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
22098EOF
22099
22100cat >>confdefs.h <<\EOF
22101#define USE_XTERM_PTY 1
22102EOF
22103
22104	if test "x$cf_cv_lib_util" = xyes ; then
22105
22106cf_add_libs="$TEST_LIBS"
22107# reverse order
22108cf_add_0lib=
22109for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22110# filter duplicates
22111for cf_add_1lib in $cf_add_0lib; do
22112	for cf_add_2lib in $cf_add_libs; do
22113		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22114			cf_add_1lib=
22115			break
22116		fi
22117	done
22118	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22119done
22120TEST_LIBS="$cf_add_libs"
22121
22122	fi
22123fi
22124
22125if test "$with_hashed_db" != no ; then
22126
22127cat >>confdefs.h <<\EOF
22128#define USE_HASHED_DB 1
22129EOF
22130
22131case $with_hashed_db in
22132(yes|*able*)
22133	;;
22134(*)
22135	if test -d "$with_hashed_db" ; then
22136
22137if test -n "$with_hashed_db/include" ; then
22138  for cf_add_incdir in $with_hashed_db/include
22139  do
22140	while test $cf_add_incdir != /usr/include
22141	do
22142	  if test -d $cf_add_incdir
22143	  then
22144		cf_have_incdir=no
22145		if test -n "$CFLAGS$CPPFLAGS" ; then
22146		  # a loop is needed to ensure we can add subdirs of existing dirs
22147		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22148			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22149			  cf_have_incdir=yes; break
22150			fi
22151		  done
22152		fi
22153
22154		if test "$cf_have_incdir" = no ; then
22155		  if test "$cf_add_incdir" = /usr/local/include ; then
22156			if test "$GCC" = yes
22157			then
22158			  cf_save_CPPFLAGS=$CPPFLAGS
22159
22160	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22161	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22162
22163			  cat >conftest.$ac_ext <<_ACEOF
22164#line 22164 "configure"
22165#include "confdefs.h"
22166#include <stdio.h>
22167int
22168main (void)
22169{
22170printf("Hello")
22171  ;
22172  return 0;
22173}
22174_ACEOF
22175rm -f conftest.$ac_objext
22176if { (eval echo "$as_me:22176: \"$ac_compile\"") >&5
22177  (eval $ac_compile) 2>&5
22178  ac_status=$?
22179  echo "$as_me:22179: \$? = $ac_status" >&5
22180  (exit $ac_status); } &&
22181         { ac_try='test -s conftest.$ac_objext'
22182  { (eval echo "$as_me:22182: \"$ac_try\"") >&5
22183  (eval $ac_try) 2>&5
22184  ac_status=$?
22185  echo "$as_me:22185: \$? = $ac_status" >&5
22186  (exit $ac_status); }; }; then
22187  :
22188else
22189  echo "$as_me: failed program was:" >&5
22190cat conftest.$ac_ext >&5
22191cf_have_incdir=yes
22192fi
22193rm -f conftest.$ac_objext conftest.$ac_ext
22194			  CPPFLAGS=$cf_save_CPPFLAGS
22195			fi
22196		  fi
22197		fi
22198
22199		if test "$cf_have_incdir" = no ; then
22200		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
22201
22202echo "${as_me:-configure}:22202: testing adding $cf_add_incdir to include-path ..." 1>&5
22203
22204		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22205
22206		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22207		  test "$cf_top_incdir" = "$cf_add_incdir" && break
22208		  cf_add_incdir="$cf_top_incdir"
22209		else
22210		  break
22211		fi
22212	  else
22213		break
22214	  fi
22215	done
22216  done
22217fi
22218
22219if test -n "$with_hashed_db/lib" ; then
22220	for cf_add_libdir in $with_hashed_db/lib
22221	do
22222		if test $cf_add_libdir = /usr/lib ; then
22223			:
22224		elif test -d $cf_add_libdir
22225		then
22226			cf_have_libdir=no
22227			if test -n "$LDFLAGS$LIBS" ; then
22228				# a loop is needed to ensure we can add subdirs of existing dirs
22229				for cf_test_libdir in $LDFLAGS $LIBS ; do
22230					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22231						cf_have_libdir=yes; break
22232					fi
22233				done
22234			fi
22235			if test "$cf_have_libdir" = no ; then
22236				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
22237
22238echo "${as_me:-configure}:22238: testing adding $cf_add_libdir to library-path ..." 1>&5
22239
22240				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22241			fi
22242		fi
22243	done
22244fi
22245
22246	else
22247		case "$with_hashed_db" in
22248		(./*|../*|/*)
22249			{ echo "$as_me:22249: WARNING: no such directory $with_hashed_db" >&5
22250echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
22251			;;
22252		(*)
22253
22254cf_search=
22255
22256test "x$prefix" != "xNONE" && \
22257test -d "$prefix" && \
22258 {
22259	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
22260	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
22261	test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
22262	test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
22263	test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
22264	test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
22265}
22266
22267for cf_subdir_prefix in \
22268	/usr \
22269	/usr/local \
22270	/usr/pkg \
22271	/opt \
22272	/opt/local \
22273	$HOME
22274do
22275
22276test "x$cf_subdir_prefix" != "x$prefix" && \
22277test -d "$cf_subdir_prefix" && \
22278(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22279	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
22280	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
22281	test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
22282	test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
22283	test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
22284	test -d $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db"
22285}
22286
22287done
22288
22289	for cf_item in $cf_search
22290	do
22291		case $cf_item in
22292		(*/$with_hashed_db)
22293
22294if test -n "$cf_item" ; then
22295  for cf_add_incdir in $cf_item
22296  do
22297	while test $cf_add_incdir != /usr/include
22298	do
22299	  if test -d $cf_add_incdir
22300	  then
22301		cf_have_incdir=no
22302		if test -n "$CFLAGS$CPPFLAGS" ; then
22303		  # a loop is needed to ensure we can add subdirs of existing dirs
22304		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22305			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22306			  cf_have_incdir=yes; break
22307			fi
22308		  done
22309		fi
22310
22311		if test "$cf_have_incdir" = no ; then
22312		  if test "$cf_add_incdir" = /usr/local/include ; then
22313			if test "$GCC" = yes
22314			then
22315			  cf_save_CPPFLAGS=$CPPFLAGS
22316
22317	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22318	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22319
22320			  cat >conftest.$ac_ext <<_ACEOF
22321#line 22321 "configure"
22322#include "confdefs.h"
22323#include <stdio.h>
22324int
22325main (void)
22326{
22327printf("Hello")
22328  ;
22329  return 0;
22330}
22331_ACEOF
22332rm -f conftest.$ac_objext
22333if { (eval echo "$as_me:22333: \"$ac_compile\"") >&5
22334  (eval $ac_compile) 2>&5
22335  ac_status=$?
22336  echo "$as_me:22336: \$? = $ac_status" >&5
22337  (exit $ac_status); } &&
22338         { ac_try='test -s conftest.$ac_objext'
22339  { (eval echo "$as_me:22339: \"$ac_try\"") >&5
22340  (eval $ac_try) 2>&5
22341  ac_status=$?
22342  echo "$as_me:22342: \$? = $ac_status" >&5
22343  (exit $ac_status); }; }; then
22344  :
22345else
22346  echo "$as_me: failed program was:" >&5
22347cat conftest.$ac_ext >&5
22348cf_have_incdir=yes
22349fi
22350rm -f conftest.$ac_objext conftest.$ac_ext
22351			  CPPFLAGS=$cf_save_CPPFLAGS
22352			fi
22353		  fi
22354		fi
22355
22356		if test "$cf_have_incdir" = no ; then
22357		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
22358
22359echo "${as_me:-configure}:22359: testing adding $cf_add_incdir to include-path ..." 1>&5
22360
22361		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22362
22363		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22364		  test "$cf_top_incdir" = "$cf_add_incdir" && break
22365		  cf_add_incdir="$cf_top_incdir"
22366		else
22367		  break
22368		fi
22369	  else
22370		break
22371	  fi
22372	done
22373  done
22374fi
22375
22376			;;
22377		esac
22378	done
22379
22380cf_search=
22381
22382test "x$prefix" != "xNONE" && \
22383test -d "$prefix" && \
22384 {
22385	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
22386	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
22387	test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
22388	test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
22389	test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
22390	test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
22391}
22392
22393for cf_subdir_prefix in \
22394	/usr \
22395	/usr/local \
22396	/usr/pkg \
22397	/opt \
22398	/opt/local \
22399	$HOME
22400do
22401
22402test "x$cf_subdir_prefix" != "x$prefix" && \
22403test -d "$cf_subdir_prefix" && \
22404(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22405	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
22406	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
22407	test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
22408	test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
22409	test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
22410	test -d $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db"
22411}
22412
22413done
22414
22415	for cf_item in $cf_search
22416	do
22417		case $cf_item in
22418		(*/$with_hashed_db)
22419
22420if test -n "$cf_item" ; then
22421	for cf_add_libdir in $cf_item
22422	do
22423		if test $cf_add_libdir = /usr/lib ; then
22424			:
22425		elif test -d $cf_add_libdir
22426		then
22427			cf_have_libdir=no
22428			if test -n "$LDFLAGS$LIBS" ; then
22429				# a loop is needed to ensure we can add subdirs of existing dirs
22430				for cf_test_libdir in $LDFLAGS $LIBS ; do
22431					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22432						cf_have_libdir=yes; break
22433					fi
22434				done
22435			fi
22436			if test "$cf_have_libdir" = no ; then
22437				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
22438
22439echo "${as_me:-configure}:22439: testing adding $cf_add_libdir to library-path ..." 1>&5
22440
22441				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22442			fi
22443		fi
22444	done
22445fi
22446
22447			;;
22448		esac
22449	done
22450
22451			;;
22452		esac
22453	fi
22454esac
22455
22456echo "$as_me:22456: checking for db.h" >&5
22457echo $ECHO_N "checking for db.h... $ECHO_C" >&6
22458if test "${ac_cv_header_db_h+set}" = set; then
22459  echo $ECHO_N "(cached) $ECHO_C" >&6
22460else
22461  cat >conftest.$ac_ext <<_ACEOF
22462#line 22462 "configure"
22463#include "confdefs.h"
22464#include <db.h>
22465_ACEOF
22466if { (eval echo "$as_me:22466: \"$ac_cpp conftest.$ac_ext\"") >&5
22467  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22468  ac_status=$?
22469  egrep -v '^ *\+' conftest.er1 >conftest.err
22470  rm -f conftest.er1
22471  cat conftest.err >&5
22472  echo "$as_me:22472: \$? = $ac_status" >&5
22473  (exit $ac_status); } >/dev/null; then
22474  if test -s conftest.err; then
22475    ac_cpp_err=$ac_c_preproc_warn_flag
22476  else
22477    ac_cpp_err=
22478  fi
22479else
22480  ac_cpp_err=yes
22481fi
22482if test -z "$ac_cpp_err"; then
22483  ac_cv_header_db_h=yes
22484else
22485  echo "$as_me: failed program was:" >&5
22486  cat conftest.$ac_ext >&5
22487  ac_cv_header_db_h=no
22488fi
22489rm -f conftest.err conftest.$ac_ext
22490fi
22491echo "$as_me:22491: result: $ac_cv_header_db_h" >&5
22492echo "${ECHO_T}$ac_cv_header_db_h" >&6
22493if test $ac_cv_header_db_h = yes; then
22494
22495echo "$as_me:22495: checking for version of db" >&5
22496echo $ECHO_N "checking for version of db... $ECHO_C" >&6
22497if test "${cf_cv_hashed_db_version+set}" = set; then
22498  echo $ECHO_N "(cached) $ECHO_C" >&6
22499else
22500
22501cf_cv_hashed_db_version=unknown
22502
22503for cf_db_version in 1 2 3 4 5 6
22504do
22505
22506echo "${as_me:-configure}:22506: testing checking for db version $cf_db_version ..." 1>&5
22507
22508	cat >conftest.$ac_ext <<_ACEOF
22509#line 22509 "configure"
22510#include "confdefs.h"
22511
22512$ac_includes_default
22513#include <db.h>
22514
22515#ifdef DB_VERSION_MAJOR
22516	/* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
22517#if $cf_db_version == DB_VERSION_MAJOR
22518	/* ok */
22519#else
22520	make an error
22521#endif
22522#else
22523#if $cf_db_version == 1
22524	/* ok: assuming this is DB 1.8.5 */
22525#else
22526	make an error
22527#endif
22528#endif
22529
22530int
22531main (void)
22532{
22533DBT *foo = 0
22534  ;
22535  return 0;
22536}
22537_ACEOF
22538rm -f conftest.$ac_objext
22539if { (eval echo "$as_me:22539: \"$ac_compile\"") >&5
22540  (eval $ac_compile) 2>&5
22541  ac_status=$?
22542  echo "$as_me:22542: \$? = $ac_status" >&5
22543  (exit $ac_status); } &&
22544         { ac_try='test -s conftest.$ac_objext'
22545  { (eval echo "$as_me:22545: \"$ac_try\"") >&5
22546  (eval $ac_try) 2>&5
22547  ac_status=$?
22548  echo "$as_me:22548: \$? = $ac_status" >&5
22549  (exit $ac_status); }; }; then
22550
22551	cf_cv_hashed_db_version=$cf_db_version
22552	break
22553
22554else
22555  echo "$as_me: failed program was:" >&5
22556cat conftest.$ac_ext >&5
22557fi
22558rm -f conftest.$ac_objext conftest.$ac_ext
22559done
22560
22561fi
22562echo "$as_me:22562: result: $cf_cv_hashed_db_version" >&5
22563echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
22564
22565if test "$cf_cv_hashed_db_version" = unknown ; then
22566	{ { echo "$as_me:22566: error: Cannot determine version of db" >&5
22567echo "$as_me: error: Cannot determine version of db" >&2;}
22568   { (exit 1); exit 1; }; }
22569else
22570
22571echo "$as_me:22571: checking for db libraries" >&5
22572echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
22573if test "${cf_cv_hashed_db_libs+set}" = set; then
22574  echo $ECHO_N "(cached) $ECHO_C" >&6
22575else
22576
22577cf_cv_hashed_db_libs=unknown
22578for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
22579do
22580	cf_save_libs="$LIBS"
22581	if test -n "$cf_db_libs"; then
22582
22583cf_add_libs="$LIBS"
22584# reverse order
22585cf_add_0lib=
22586for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22587# filter duplicates
22588for cf_add_1lib in $cf_add_0lib; do
22589	for cf_add_2lib in $cf_add_libs; do
22590		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22591			cf_add_1lib=
22592			break
22593		fi
22594	done
22595	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22596done
22597LIBS="$cf_add_libs"
22598
22599	fi
22600
22601echo "${as_me:-configure}:22601: testing checking for library "$cf_db_libs" ..." 1>&5
22602
22603	cat >conftest.$ac_ext <<_ACEOF
22604#line 22604 "configure"
22605#include "confdefs.h"
22606
22607$ac_includes_default
22608#include <db.h>
22609
22610int
22611main (void)
22612{
22613
22614	char *path = "/tmp/foo";
22615#ifdef DB_VERSION_MAJOR
22616#if DB_VERSION_MAJOR >= 4
22617	DB *result = 0;
22618	db_create(&result, NULL, 0);
22619	result->open(result,
22620		NULL,
22621		path,
22622		path,
22623		DB_HASH,
22624		DB_CREATE,
22625		0644);
22626#elif DB_VERSION_MAJOR >= 3
22627	DB *result = 0;
22628	db_create(&result, NULL, 0);
22629	result->open(result,
22630		path,
22631		path,
22632		DB_HASH,
22633		DB_CREATE,
22634		0644);
22635#elif DB_VERSION_MAJOR >= 2
22636	DB *result = 0;
22637	db_open(path,
22638		DB_HASH,
22639		DB_CREATE,
22640		0644,
22641		(DB_ENV *) 0,
22642		(DB_INFO *) 0,
22643		&result);
22644#endif /* DB_VERSION_MAJOR */
22645#else
22646	DB *result = dbopen(path,
22647		     2,
22648		     0644,
22649		     DB_HASH,
22650		     0);
22651#endif
22652	${cf_cv_main_return:-return}(result != 0)
22653
22654  ;
22655  return 0;
22656}
22657_ACEOF
22658rm -f conftest.$ac_objext conftest$ac_exeext
22659if { (eval echo "$as_me:22659: \"$ac_link\"") >&5
22660  (eval $ac_link) 2>&5
22661  ac_status=$?
22662  echo "$as_me:22662: \$? = $ac_status" >&5
22663  (exit $ac_status); } &&
22664         { ac_try='test -s conftest$ac_exeext'
22665  { (eval echo "$as_me:22665: \"$ac_try\"") >&5
22666  (eval $ac_try) 2>&5
22667  ac_status=$?
22668  echo "$as_me:22668: \$? = $ac_status" >&5
22669  (exit $ac_status); }; }; then
22670
22671	if test -n "$cf_db_libs" ; then
22672		cf_cv_hashed_db_libs=$cf_db_libs
22673	else
22674		cf_cv_hashed_db_libs=default
22675	fi
22676	LIBS="$cf_save_libs"
22677	break
22678
22679else
22680  echo "$as_me: failed program was:" >&5
22681cat conftest.$ac_ext >&5
22682fi
22683rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22684	LIBS="$cf_save_libs"
22685done
22686
22687fi
22688echo "$as_me:22688: result: $cf_cv_hashed_db_libs" >&5
22689echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
22690
22691	if test "$cf_cv_hashed_db_libs" = unknown ; then
22692		{ { echo "$as_me:22692: error: Cannot determine library for db" >&5
22693echo "$as_me: error: Cannot determine library for db" >&2;}
22694   { (exit 1); exit 1; }; }
22695	elif test "$cf_cv_hashed_db_libs" != default ; then
22696
22697cf_add_libs="$LIBS"
22698# reverse order
22699cf_add_0lib=
22700for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22701# filter duplicates
22702for cf_add_1lib in $cf_add_0lib; do
22703	for cf_add_2lib in $cf_add_libs; do
22704		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22705			cf_add_1lib=
22706			break
22707		fi
22708	done
22709	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22710done
22711LIBS="$cf_add_libs"
22712
22713	fi
22714fi
22715
22716else
22717
22718	{ { echo "$as_me:22718: error: Cannot find db.h" >&5
22719echo "$as_me: error: Cannot find db.h" >&2;}
22720   { (exit 1); exit 1; }; }
22721
22722fi
22723
22724fi
22725
22726if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
22727	CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22728	CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22729fi
22730
22731# Just in case, check if the C compiler has a bool type.
22732
22733echo "$as_me:22733: checking if we should include stdbool.h" >&5
22734echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
22735
22736if test "${cf_cv_header_stdbool_h+set}" = set; then
22737  echo $ECHO_N "(cached) $ECHO_C" >&6
22738else
22739
22740	cat >conftest.$ac_ext <<_ACEOF
22741#line 22741 "configure"
22742#include "confdefs.h"
22743
22744int
22745main (void)
22746{
22747bool foo = false
22748  ;
22749  return 0;
22750}
22751_ACEOF
22752rm -f conftest.$ac_objext
22753if { (eval echo "$as_me:22753: \"$ac_compile\"") >&5
22754  (eval $ac_compile) 2>&5
22755  ac_status=$?
22756  echo "$as_me:22756: \$? = $ac_status" >&5
22757  (exit $ac_status); } &&
22758         { ac_try='test -s conftest.$ac_objext'
22759  { (eval echo "$as_me:22759: \"$ac_try\"") >&5
22760  (eval $ac_try) 2>&5
22761  ac_status=$?
22762  echo "$as_me:22762: \$? = $ac_status" >&5
22763  (exit $ac_status); }; }; then
22764  cf_cv_header_stdbool_h=0
22765else
22766  echo "$as_me: failed program was:" >&5
22767cat conftest.$ac_ext >&5
22768cat >conftest.$ac_ext <<_ACEOF
22769#line 22769 "configure"
22770#include "confdefs.h"
22771
22772#ifndef __BEOS__
22773#include <stdbool.h>
22774#endif
22775
22776int
22777main (void)
22778{
22779bool foo = false
22780  ;
22781  return 0;
22782}
22783_ACEOF
22784rm -f conftest.$ac_objext
22785if { (eval echo "$as_me:22785: \"$ac_compile\"") >&5
22786  (eval $ac_compile) 2>&5
22787  ac_status=$?
22788  echo "$as_me:22788: \$? = $ac_status" >&5
22789  (exit $ac_status); } &&
22790         { ac_try='test -s conftest.$ac_objext'
22791  { (eval echo "$as_me:22791: \"$ac_try\"") >&5
22792  (eval $ac_try) 2>&5
22793  ac_status=$?
22794  echo "$as_me:22794: \$? = $ac_status" >&5
22795  (exit $ac_status); }; }; then
22796  cf_cv_header_stdbool_h=1
22797else
22798  echo "$as_me: failed program was:" >&5
22799cat conftest.$ac_ext >&5
22800cf_cv_header_stdbool_h=0
22801fi
22802rm -f conftest.$ac_objext conftest.$ac_ext
22803fi
22804rm -f conftest.$ac_objext conftest.$ac_ext
22805fi
22806
22807if test "$cf_cv_header_stdbool_h" = 1
22808then	echo "$as_me:22808: result: yes" >&5
22809echo "${ECHO_T}yes" >&6
22810else	echo "$as_me:22810: result: no" >&5
22811echo "${ECHO_T}no" >&6
22812fi
22813
22814echo "$as_me:22814: checking for builtin bool type" >&5
22815echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
22816
22817if test "${cf_cv_cc_bool_type+set}" = set; then
22818  echo $ECHO_N "(cached) $ECHO_C" >&6
22819else
22820
22821	cat >conftest.$ac_ext <<_ACEOF
22822#line 22822 "configure"
22823#include "confdefs.h"
22824
22825#include <stdio.h>
22826#include <sys/types.h>
22827
22828int
22829main (void)
22830{
22831bool x = false
22832  ;
22833  return 0;
22834}
22835_ACEOF
22836rm -f conftest.$ac_objext
22837if { (eval echo "$as_me:22837: \"$ac_compile\"") >&5
22838  (eval $ac_compile) 2>&5
22839  ac_status=$?
22840  echo "$as_me:22840: \$? = $ac_status" >&5
22841  (exit $ac_status); } &&
22842         { ac_try='test -s conftest.$ac_objext'
22843  { (eval echo "$as_me:22843: \"$ac_try\"") >&5
22844  (eval $ac_try) 2>&5
22845  ac_status=$?
22846  echo "$as_me:22846: \$? = $ac_status" >&5
22847  (exit $ac_status); }; }; then
22848  cf_cv_cc_bool_type=1
22849else
22850  echo "$as_me: failed program was:" >&5
22851cat conftest.$ac_ext >&5
22852cf_cv_cc_bool_type=0
22853fi
22854rm -f conftest.$ac_objext conftest.$ac_ext
22855
22856fi
22857
22858if test "$cf_cv_cc_bool_type" = 1
22859then	echo "$as_me:22859: result: yes" >&5
22860echo "${ECHO_T}yes" >&6
22861else	echo "$as_me:22861: result: no" >&5
22862echo "${ECHO_T}no" >&6
22863fi
22864
22865# Check for C++ compiler characteristics (and ensure that it's there!)
22866if test -n "$CXX" ; then
22867	ac_ext=cc
22868ac_cpp='$CXXCPP $CPPFLAGS'
22869ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22870ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22871ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22872ac_main_return=return
22873
22874if test -n "$GXX" ; then
22875
22876	cf_save="$LIBS"
22877	LIBS="$LIBS $CXXLIBS"
22878	echo "$as_me:22878: checking if we already have C++ library" >&5
22879echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
22880	cat >conftest.$ac_ext <<_ACEOF
22881#line 22881 "configure"
22882#include "confdefs.h"
22883
22884			#include <iostream>
22885int
22886main (void)
22887{
22888
22889			std::cout << "Hello World!" << std::endl;
22890  ;
22891  return 0;
22892}
22893_ACEOF
22894rm -f conftest.$ac_objext conftest$ac_exeext
22895if { (eval echo "$as_me:22895: \"$ac_link\"") >&5
22896  (eval $ac_link) 2>&5
22897  ac_status=$?
22898  echo "$as_me:22898: \$? = $ac_status" >&5
22899  (exit $ac_status); } &&
22900         { ac_try='test -s conftest$ac_exeext'
22901  { (eval echo "$as_me:22901: \"$ac_try\"") >&5
22902  (eval $ac_try) 2>&5
22903  ac_status=$?
22904  echo "$as_me:22904: \$? = $ac_status" >&5
22905  (exit $ac_status); }; }; then
22906  cf_have_libstdcpp=yes
22907else
22908  echo "$as_me: failed program was:" >&5
22909cat conftest.$ac_ext >&5
22910cf_have_libstdcpp=no
22911fi
22912rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22913	echo "$as_me:22913: result: $cf_have_libstdcpp" >&5
22914echo "${ECHO_T}$cf_have_libstdcpp" >&6
22915	LIBS="$cf_save"
22916
22917	if test $cf_have_libstdcpp != yes
22918	then
22919		case $cf_cv_system_name in
22920		(os2*)
22921			if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
22922				cf_stdcpp_libname=stdcpp
22923			else
22924				cf_stdcpp_libname=stdc++
22925			fi
22926			;;
22927		(*)
22928			cf_stdcpp_libname=stdc++
22929			;;
22930		esac
22931
22932		echo "$as_me:22932: checking for library $cf_stdcpp_libname" >&5
22933echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
22934if test "${cf_cv_libstdcpp+set}" = set; then
22935  echo $ECHO_N "(cached) $ECHO_C" >&6
22936else
22937
22938			cf_save="$LIBS"
22939			LIBS="$LIBS $CXXLIBS"
22940
22941cf_add_libs="$LIBS"
22942# reverse order
22943cf_add_0lib=
22944for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22945# filter duplicates
22946for cf_add_1lib in $cf_add_0lib; do
22947	for cf_add_2lib in $cf_add_libs; do
22948		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22949			cf_add_1lib=
22950			break
22951		fi
22952	done
22953	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22954done
22955LIBS="$cf_add_libs"
22956
22957		cat >conftest.$ac_ext <<_ACEOF
22958#line 22958 "configure"
22959#include "confdefs.h"
22960
22961				#include <iostream>
22962int
22963main (void)
22964{
22965
22966				std::cout << "Hello World!" << std::endl;
22967  ;
22968  return 0;
22969}
22970_ACEOF
22971rm -f conftest.$ac_objext conftest$ac_exeext
22972if { (eval echo "$as_me:22972: \"$ac_link\"") >&5
22973  (eval $ac_link) 2>&5
22974  ac_status=$?
22975  echo "$as_me:22975: \$? = $ac_status" >&5
22976  (exit $ac_status); } &&
22977         { ac_try='test -s conftest$ac_exeext'
22978  { (eval echo "$as_me:22978: \"$ac_try\"") >&5
22979  (eval $ac_try) 2>&5
22980  ac_status=$?
22981  echo "$as_me:22981: \$? = $ac_status" >&5
22982  (exit $ac_status); }; }; then
22983  cf_cv_libstdcpp=yes
22984else
22985  echo "$as_me: failed program was:" >&5
22986cat conftest.$ac_ext >&5
22987cf_cv_libstdcpp=no
22988fi
22989rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22990			LIBS="$cf_save"
22991
22992fi
22993echo "$as_me:22993: result: $cf_cv_libstdcpp" >&5
22994echo "${ECHO_T}$cf_cv_libstdcpp" >&6
22995		test "$cf_cv_libstdcpp" = yes && {
22996cf_add_libs="$CXXLIBS"
22997# reverse order
22998cf_add_0lib=
22999for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23000# filter duplicates
23001for cf_add_1lib in $cf_add_0lib; do
23002	for cf_add_2lib in $cf_add_libs; do
23003		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23004			cf_add_1lib=
23005			break
23006		fi
23007	done
23008	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23009done
23010CXXLIBS="$cf_add_libs"
23011 }
23012	fi
23013fi
23014
23015	echo "$as_me:23015: checking whether $CXX understands -c and -o together" >&5
23016echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
23017if test "${cf_cv_prog_CXX_c_o+set}" = set; then
23018  echo $ECHO_N "(cached) $ECHO_C" >&6
23019else
23020
23021cat > conftest.$ac_ext <<CF_EOF
23022int main(void)
23023{
23024	${cf_cv_main_return:-return}(0);
23025}
23026CF_EOF
23027# We do the test twice because some compilers refuse to overwrite an
23028# existing .o file with -o, though they will create one.
23029ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
23030if { (eval echo "$as_me:23030: \"$ac_try\"") >&5
23031  (eval $ac_try) 2>&5
23032  ac_status=$?
23033  echo "$as_me:23033: \$? = $ac_status" >&5
23034  (exit $ac_status); } &&
23035  test -f conftest2.$ac_objext && { (eval echo "$as_me:23035: \"$ac_try\"") >&5
23036  (eval $ac_try) 2>&5
23037  ac_status=$?
23038  echo "$as_me:23038: \$? = $ac_status" >&5
23039  (exit $ac_status); };
23040then
23041  eval cf_cv_prog_CXX_c_o=yes
23042else
23043  eval cf_cv_prog_CXX_c_o=no
23044fi
23045rm -rf conftest*
23046
23047fi
23048if test $cf_cv_prog_CXX_c_o = yes; then
23049  echo "$as_me:23049: result: yes" >&5
23050echo "${ECHO_T}yes" >&6
23051else
23052  echo "$as_me:23052: result: no" >&5
23053echo "${ECHO_T}no" >&6
23054fi
23055
23056	case $GXX_VERSION in
23057	(1*|2.0-6*)
23058		cf_cxx_library=yes
23059		;;
23060	(*-2.7*|2.7*)
23061
23062cf_cxx_library=unknown
23063case $cf_cv_system_name in
23064(os2*)
23065	cf_gpp_libname=gpp
23066	;;
23067(*)
23068	cf_gpp_libname=g++
23069	;;
23070esac
23071if test "$GXX" = yes; then
23072	echo "$as_me:23072: checking for lib$cf_gpp_libname" >&5
23073echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
23074	cf_save="$LIBS"
23075
23076cf_add_libs="$LIBS"
23077# reverse order
23078cf_add_0lib=
23079for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23080# filter duplicates
23081for cf_add_1lib in $cf_add_0lib; do
23082	for cf_add_2lib in $cf_add_libs; do
23083		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23084			cf_add_1lib=
23085			break
23086		fi
23087	done
23088	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23089done
23090LIBS="$cf_add_libs"
23091
23092	cat >conftest.$ac_ext <<_ACEOF
23093#line 23093 "configure"
23094#include "confdefs.h"
23095
23096#include <$cf_gpp_libname/builtin.h>
23097
23098int
23099main (void)
23100{
23101two_arg_error_handler_t foo2 = lib_error_handler
23102  ;
23103  return 0;
23104}
23105_ACEOF
23106rm -f conftest.$ac_objext conftest$ac_exeext
23107if { (eval echo "$as_me:23107: \"$ac_link\"") >&5
23108  (eval $ac_link) 2>&5
23109  ac_status=$?
23110  echo "$as_me:23110: \$? = $ac_status" >&5
23111  (exit $ac_status); } &&
23112         { ac_try='test -s conftest$ac_exeext'
23113  { (eval echo "$as_me:23113: \"$ac_try\"") >&5
23114  (eval $ac_try) 2>&5
23115  ac_status=$?
23116  echo "$as_me:23116: \$? = $ac_status" >&5
23117  (exit $ac_status); }; }; then
23118  cf_cxx_library=yes
23119
23120cf_add_libs="$CXXLIBS"
23121# reverse order
23122cf_add_0lib=
23123for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23124# filter duplicates
23125for cf_add_1lib in $cf_add_0lib; do
23126	for cf_add_2lib in $cf_add_libs; do
23127		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23128			cf_add_1lib=
23129			break
23130		fi
23131	done
23132	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23133done
23134CXXLIBS="$cf_add_libs"
23135
23136	 if test "$cf_gpp_libname" = cpp ; then
23137
23138cat >>confdefs.h <<\EOF
23139#define HAVE_GPP_BUILTIN_H 1
23140EOF
23141
23142	 else
23143
23144cat >>confdefs.h <<\EOF
23145#define HAVE_GXX_BUILTIN_H 1
23146EOF
23147
23148	 fi
23149else
23150  echo "$as_me: failed program was:" >&5
23151cat conftest.$ac_ext >&5
23152cat >conftest.$ac_ext <<_ACEOF
23153#line 23153 "configure"
23154#include "confdefs.h"
23155
23156#include <builtin.h>
23157
23158int
23159main (void)
23160{
23161two_arg_error_handler_t foo2 = lib_error_handler
23162  ;
23163  return 0;
23164}
23165_ACEOF
23166rm -f conftest.$ac_objext conftest$ac_exeext
23167if { (eval echo "$as_me:23167: \"$ac_link\"") >&5
23168  (eval $ac_link) 2>&5
23169  ac_status=$?
23170  echo "$as_me:23170: \$? = $ac_status" >&5
23171  (exit $ac_status); } &&
23172         { ac_try='test -s conftest$ac_exeext'
23173  { (eval echo "$as_me:23173: \"$ac_try\"") >&5
23174  (eval $ac_try) 2>&5
23175  ac_status=$?
23176  echo "$as_me:23176: \$? = $ac_status" >&5
23177  (exit $ac_status); }; }; then
23178  cf_cxx_library=yes
23179
23180cf_add_libs="$CXXLIBS"
23181# reverse order
23182cf_add_0lib=
23183for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23184# filter duplicates
23185for cf_add_1lib in $cf_add_0lib; do
23186	for cf_add_2lib in $cf_add_libs; do
23187		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23188			cf_add_1lib=
23189			break
23190		fi
23191	done
23192	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23193done
23194CXXLIBS="$cf_add_libs"
23195
23196cat >>confdefs.h <<\EOF
23197#define HAVE_BUILTIN_H 1
23198EOF
23199
23200else
23201  echo "$as_me: failed program was:" >&5
23202cat conftest.$ac_ext >&5
23203cf_cxx_library=no
23204fi
23205rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23206fi
23207rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23208	LIBS="$cf_save"
23209	echo "$as_me:23209: result: $cf_cxx_library" >&5
23210echo "${ECHO_T}$cf_cxx_library" >&6
23211fi
23212
23213		;;
23214	(*)
23215		cf_cxx_library=no
23216		;;
23217	esac
23218
23219	ac_ext=cc
23220ac_cpp='$CXXCPP $CPPFLAGS'
23221ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23222ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23223ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23224ac_main_return=return
23225echo "$as_me:23225: checking how to run the C++ preprocessor" >&5
23226echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
23227if test -z "$CXXCPP"; then
23228  if test "${ac_cv_prog_CXXCPP+set}" = set; then
23229  echo $ECHO_N "(cached) $ECHO_C" >&6
23230else
23231      # Double quotes because CXXCPP needs to be expanded
23232    for CXXCPP in "$CXX -E" "/lib/cpp"
23233    do
23234      ac_preproc_ok=false
23235for ac_cxx_preproc_warn_flag in '' yes
23236do
23237  # Use a header file that comes with gcc, so configuring glibc
23238  # with a fresh cross-compiler works.
23239  # On the NeXT, cc -E runs the code through the compiler's parser,
23240  # not just through cpp. "Syntax error" is here to catch this case.
23241  cat >conftest.$ac_ext <<_ACEOF
23242#line 23242 "configure"
23243#include "confdefs.h"
23244#include <assert.h>
23245                     Syntax error
23246_ACEOF
23247if { (eval echo "$as_me:23247: \"$ac_cpp conftest.$ac_ext\"") >&5
23248  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23249  ac_status=$?
23250  egrep -v '^ *\+' conftest.er1 >conftest.err
23251  rm -f conftest.er1
23252  cat conftest.err >&5
23253  echo "$as_me:23253: \$? = $ac_status" >&5
23254  (exit $ac_status); } >/dev/null; then
23255  if test -s conftest.err; then
23256    ac_cpp_err=$ac_cxx_preproc_warn_flag
23257  else
23258    ac_cpp_err=
23259  fi
23260else
23261  ac_cpp_err=yes
23262fi
23263if test -z "$ac_cpp_err"; then
23264  :
23265else
23266  echo "$as_me: failed program was:" >&5
23267  cat conftest.$ac_ext >&5
23268  # Broken: fails on valid input.
23269continue
23270fi
23271rm -f conftest.err conftest.$ac_ext
23272
23273  # OK, works on sane cases.  Now check whether non-existent headers
23274  # can be detected and how.
23275  cat >conftest.$ac_ext <<_ACEOF
23276#line 23276 "configure"
23277#include "confdefs.h"
23278#include <ac_nonexistent.h>
23279_ACEOF
23280if { (eval echo "$as_me:23280: \"$ac_cpp conftest.$ac_ext\"") >&5
23281  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23282  ac_status=$?
23283  egrep -v '^ *\+' conftest.er1 >conftest.err
23284  rm -f conftest.er1
23285  cat conftest.err >&5
23286  echo "$as_me:23286: \$? = $ac_status" >&5
23287  (exit $ac_status); } >/dev/null; then
23288  if test -s conftest.err; then
23289    ac_cpp_err=$ac_cxx_preproc_warn_flag
23290  else
23291    ac_cpp_err=
23292  fi
23293else
23294  ac_cpp_err=yes
23295fi
23296if test -z "$ac_cpp_err"; then
23297  # Broken: success on invalid input.
23298continue
23299else
23300  echo "$as_me: failed program was:" >&5
23301  cat conftest.$ac_ext >&5
23302  # Passes both tests.
23303ac_preproc_ok=:
23304break
23305fi
23306rm -f conftest.err conftest.$ac_ext
23307
23308done
23309# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23310rm -f conftest.err conftest.$ac_ext
23311if $ac_preproc_ok; then
23312  break
23313fi
23314
23315    done
23316    ac_cv_prog_CXXCPP=$CXXCPP
23317
23318fi
23319  CXXCPP=$ac_cv_prog_CXXCPP
23320else
23321  ac_cv_prog_CXXCPP=$CXXCPP
23322fi
23323echo "$as_me:23323: result: $CXXCPP" >&5
23324echo "${ECHO_T}$CXXCPP" >&6
23325ac_preproc_ok=false
23326for ac_cxx_preproc_warn_flag in '' yes
23327do
23328  # Use a header file that comes with gcc, so configuring glibc
23329  # with a fresh cross-compiler works.
23330  # On the NeXT, cc -E runs the code through the compiler's parser,
23331  # not just through cpp. "Syntax error" is here to catch this case.
23332  cat >conftest.$ac_ext <<_ACEOF
23333#line 23333 "configure"
23334#include "confdefs.h"
23335#include <assert.h>
23336                     Syntax error
23337_ACEOF
23338if { (eval echo "$as_me:23338: \"$ac_cpp conftest.$ac_ext\"") >&5
23339  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23340  ac_status=$?
23341  egrep -v '^ *\+' conftest.er1 >conftest.err
23342  rm -f conftest.er1
23343  cat conftest.err >&5
23344  echo "$as_me:23344: \$? = $ac_status" >&5
23345  (exit $ac_status); } >/dev/null; then
23346  if test -s conftest.err; then
23347    ac_cpp_err=$ac_cxx_preproc_warn_flag
23348  else
23349    ac_cpp_err=
23350  fi
23351else
23352  ac_cpp_err=yes
23353fi
23354if test -z "$ac_cpp_err"; then
23355  :
23356else
23357  echo "$as_me: failed program was:" >&5
23358  cat conftest.$ac_ext >&5
23359  # Broken: fails on valid input.
23360continue
23361fi
23362rm -f conftest.err conftest.$ac_ext
23363
23364  # OK, works on sane cases.  Now check whether non-existent headers
23365  # can be detected and how.
23366  cat >conftest.$ac_ext <<_ACEOF
23367#line 23367 "configure"
23368#include "confdefs.h"
23369#include <ac_nonexistent.h>
23370_ACEOF
23371if { (eval echo "$as_me:23371: \"$ac_cpp conftest.$ac_ext\"") >&5
23372  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23373  ac_status=$?
23374  egrep -v '^ *\+' conftest.er1 >conftest.err
23375  rm -f conftest.er1
23376  cat conftest.err >&5
23377  echo "$as_me:23377: \$? = $ac_status" >&5
23378  (exit $ac_status); } >/dev/null; then
23379  if test -s conftest.err; then
23380    ac_cpp_err=$ac_cxx_preproc_warn_flag
23381  else
23382    ac_cpp_err=
23383  fi
23384else
23385  ac_cpp_err=yes
23386fi
23387if test -z "$ac_cpp_err"; then
23388  # Broken: success on invalid input.
23389continue
23390else
23391  echo "$as_me: failed program was:" >&5
23392  cat conftest.$ac_ext >&5
23393  # Passes both tests.
23394ac_preproc_ok=:
23395break
23396fi
23397rm -f conftest.err conftest.$ac_ext
23398
23399done
23400# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23401rm -f conftest.err conftest.$ac_ext
23402if $ac_preproc_ok; then
23403  :
23404else
23405  { { echo "$as_me:23405: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
23406echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
23407   { (exit 1); exit 1; }; }
23408fi
23409
23410ac_ext=cc
23411ac_cpp='$CXXCPP $CPPFLAGS'
23412ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23413ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23414ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23415ac_main_return=return
23416
23417for ac_header in typeinfo
23418do
23419as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23420echo "$as_me:23420: checking for $ac_header" >&5
23421echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23422if eval "test \"\${$as_ac_Header+set}\" = set"; then
23423  echo $ECHO_N "(cached) $ECHO_C" >&6
23424else
23425  cat >conftest.$ac_ext <<_ACEOF
23426#line 23426 "configure"
23427#include "confdefs.h"
23428#include <$ac_header>
23429_ACEOF
23430if { (eval echo "$as_me:23430: \"$ac_cpp conftest.$ac_ext\"") >&5
23431  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23432  ac_status=$?
23433  egrep -v '^ *\+' conftest.er1 >conftest.err
23434  rm -f conftest.er1
23435  cat conftest.err >&5
23436  echo "$as_me:23436: \$? = $ac_status" >&5
23437  (exit $ac_status); } >/dev/null; then
23438  if test -s conftest.err; then
23439    ac_cpp_err=$ac_cxx_preproc_warn_flag
23440  else
23441    ac_cpp_err=
23442  fi
23443else
23444  ac_cpp_err=yes
23445fi
23446if test -z "$ac_cpp_err"; then
23447  eval "$as_ac_Header=yes"
23448else
23449  echo "$as_me: failed program was:" >&5
23450  cat conftest.$ac_ext >&5
23451  eval "$as_ac_Header=no"
23452fi
23453rm -f conftest.err conftest.$ac_ext
23454fi
23455echo "$as_me:23455: result: `eval echo '${'$as_ac_Header'}'`" >&5
23456echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23457if test `eval echo '${'$as_ac_Header'}'` = yes; then
23458  cat >>confdefs.h <<EOF
23459#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23460EOF
23461
23462fi
23463done
23464
23465for ac_header in iostream
23466do
23467as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23468echo "$as_me:23468: checking for $ac_header" >&5
23469echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23470if eval "test \"\${$as_ac_Header+set}\" = set"; then
23471  echo $ECHO_N "(cached) $ECHO_C" >&6
23472else
23473  cat >conftest.$ac_ext <<_ACEOF
23474#line 23474 "configure"
23475#include "confdefs.h"
23476#include <$ac_header>
23477_ACEOF
23478if { (eval echo "$as_me:23478: \"$ac_cpp conftest.$ac_ext\"") >&5
23479  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23480  ac_status=$?
23481  egrep -v '^ *\+' conftest.er1 >conftest.err
23482  rm -f conftest.er1
23483  cat conftest.err >&5
23484  echo "$as_me:23484: \$? = $ac_status" >&5
23485  (exit $ac_status); } >/dev/null; then
23486  if test -s conftest.err; then
23487    ac_cpp_err=$ac_cxx_preproc_warn_flag
23488  else
23489    ac_cpp_err=
23490  fi
23491else
23492  ac_cpp_err=yes
23493fi
23494if test -z "$ac_cpp_err"; then
23495  eval "$as_ac_Header=yes"
23496else
23497  echo "$as_me: failed program was:" >&5
23498  cat conftest.$ac_ext >&5
23499  eval "$as_ac_Header=no"
23500fi
23501rm -f conftest.err conftest.$ac_ext
23502fi
23503echo "$as_me:23503: result: `eval echo '${'$as_ac_Header'}'`" >&5
23504echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23505if test `eval echo '${'$as_ac_Header'}'` = yes; then
23506  cat >>confdefs.h <<EOF
23507#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23508EOF
23509
23510fi
23511done
23512
23513if test x"$ac_cv_header_iostream" = xyes ; then
23514	echo "$as_me:23514: checking if iostream uses std-namespace" >&5
23515echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
23516	cat >conftest.$ac_ext <<_ACEOF
23517#line 23517 "configure"
23518#include "confdefs.h"
23519
23520#include <iostream>
23521using std::endl;
23522using std::cerr;
23523int
23524main (void)
23525{
23526
23527cerr << "testing" << endl;
23528
23529  ;
23530  return 0;
23531}
23532_ACEOF
23533rm -f conftest.$ac_objext
23534if { (eval echo "$as_me:23534: \"$ac_compile\"") >&5
23535  (eval $ac_compile) 2>&5
23536  ac_status=$?
23537  echo "$as_me:23537: \$? = $ac_status" >&5
23538  (exit $ac_status); } &&
23539         { ac_try='test -s conftest.$ac_objext'
23540  { (eval echo "$as_me:23540: \"$ac_try\"") >&5
23541  (eval $ac_try) 2>&5
23542  ac_status=$?
23543  echo "$as_me:23543: \$? = $ac_status" >&5
23544  (exit $ac_status); }; }; then
23545  cf_iostream_namespace=yes
23546else
23547  echo "$as_me: failed program was:" >&5
23548cat conftest.$ac_ext >&5
23549cf_iostream_namespace=no
23550fi
23551rm -f conftest.$ac_objext conftest.$ac_ext
23552	echo "$as_me:23552: result: $cf_iostream_namespace" >&5
23553echo "${ECHO_T}$cf_iostream_namespace" >&6
23554	if test "$cf_iostream_namespace" = yes ; then
23555
23556cat >>confdefs.h <<\EOF
23557#define IOSTREAM_NAMESPACE 1
23558EOF
23559
23560	fi
23561fi
23562
23563echo "$as_me:23563: checking if we should include stdbool.h" >&5
23564echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23565
23566if test "${cf_cv_header_stdbool_h+set}" = set; then
23567  echo $ECHO_N "(cached) $ECHO_C" >&6
23568else
23569
23570	cat >conftest.$ac_ext <<_ACEOF
23571#line 23571 "configure"
23572#include "confdefs.h"
23573
23574int
23575main (void)
23576{
23577bool foo = false
23578  ;
23579  return 0;
23580}
23581_ACEOF
23582rm -f conftest.$ac_objext
23583if { (eval echo "$as_me:23583: \"$ac_compile\"") >&5
23584  (eval $ac_compile) 2>&5
23585  ac_status=$?
23586  echo "$as_me:23586: \$? = $ac_status" >&5
23587  (exit $ac_status); } &&
23588         { ac_try='test -s conftest.$ac_objext'
23589  { (eval echo "$as_me:23589: \"$ac_try\"") >&5
23590  (eval $ac_try) 2>&5
23591  ac_status=$?
23592  echo "$as_me:23592: \$? = $ac_status" >&5
23593  (exit $ac_status); }; }; then
23594  cf_cv_header_stdbool_h=0
23595else
23596  echo "$as_me: failed program was:" >&5
23597cat conftest.$ac_ext >&5
23598cat >conftest.$ac_ext <<_ACEOF
23599#line 23599 "configure"
23600#include "confdefs.h"
23601
23602#ifndef __BEOS__
23603#include <stdbool.h>
23604#endif
23605
23606int
23607main (void)
23608{
23609bool foo = false
23610  ;
23611  return 0;
23612}
23613_ACEOF
23614rm -f conftest.$ac_objext
23615if { (eval echo "$as_me:23615: \"$ac_compile\"") >&5
23616  (eval $ac_compile) 2>&5
23617  ac_status=$?
23618  echo "$as_me:23618: \$? = $ac_status" >&5
23619  (exit $ac_status); } &&
23620         { ac_try='test -s conftest.$ac_objext'
23621  { (eval echo "$as_me:23621: \"$ac_try\"") >&5
23622  (eval $ac_try) 2>&5
23623  ac_status=$?
23624  echo "$as_me:23624: \$? = $ac_status" >&5
23625  (exit $ac_status); }; }; then
23626  cf_cv_header_stdbool_h=1
23627else
23628  echo "$as_me: failed program was:" >&5
23629cat conftest.$ac_ext >&5
23630cf_cv_header_stdbool_h=0
23631fi
23632rm -f conftest.$ac_objext conftest.$ac_ext
23633fi
23634rm -f conftest.$ac_objext conftest.$ac_ext
23635fi
23636
23637if test "$cf_cv_header_stdbool_h" = 1
23638then	echo "$as_me:23638: result: yes" >&5
23639echo "${ECHO_T}yes" >&6
23640else	echo "$as_me:23640: result: no" >&5
23641echo "${ECHO_T}no" >&6
23642fi
23643
23644echo "$as_me:23644: checking for builtin bool type" >&5
23645echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23646
23647if test "${cf_cv_builtin_bool+set}" = set; then
23648  echo $ECHO_N "(cached) $ECHO_C" >&6
23649else
23650
23651	cat >conftest.$ac_ext <<_ACEOF
23652#line 23652 "configure"
23653#include "confdefs.h"
23654
23655#include <stdio.h>
23656#include <sys/types.h>
23657
23658int
23659main (void)
23660{
23661bool x = false
23662  ;
23663  return 0;
23664}
23665_ACEOF
23666rm -f conftest.$ac_objext
23667if { (eval echo "$as_me:23667: \"$ac_compile\"") >&5
23668  (eval $ac_compile) 2>&5
23669  ac_status=$?
23670  echo "$as_me:23670: \$? = $ac_status" >&5
23671  (exit $ac_status); } &&
23672         { ac_try='test -s conftest.$ac_objext'
23673  { (eval echo "$as_me:23673: \"$ac_try\"") >&5
23674  (eval $ac_try) 2>&5
23675  ac_status=$?
23676  echo "$as_me:23676: \$? = $ac_status" >&5
23677  (exit $ac_status); }; }; then
23678  cf_cv_builtin_bool=1
23679else
23680  echo "$as_me: failed program was:" >&5
23681cat conftest.$ac_ext >&5
23682cf_cv_builtin_bool=0
23683fi
23684rm -f conftest.$ac_objext conftest.$ac_ext
23685
23686fi
23687
23688if test "$cf_cv_builtin_bool" = 1
23689then	echo "$as_me:23689: result: yes" >&5
23690echo "${ECHO_T}yes" >&6
23691else	echo "$as_me:23691: result: no" >&5
23692echo "${ECHO_T}no" >&6
23693fi
23694
23695echo "$as_me:23695: checking for size of bool" >&5
23696echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
23697if test "${cf_cv_type_of_bool+set}" = set; then
23698  echo $ECHO_N "(cached) $ECHO_C" >&6
23699else
23700
23701	rm -f cf_test.out
23702	if test "$cross_compiling" = yes; then
23703  cf_cv_type_of_bool=unknown
23704else
23705  cat >conftest.$ac_ext <<_ACEOF
23706#line 23706 "configure"
23707#include "confdefs.h"
23708
23709#include <stdlib.h>
23710#include <stdio.h>
23711
23712#if defined(__cplusplus)
23713
23714#ifdef HAVE_GXX_BUILTIN_H
23715#include <g++/builtin.h>
23716#elif HAVE_GPP_BUILTIN_H
23717#include <gpp/builtin.h>
23718#elif HAVE_BUILTIN_H
23719#include <builtin.h>
23720#endif
23721
23722#else
23723
23724#if $cf_cv_header_stdbool_h
23725#include <stdbool.h>
23726#endif
23727
23728#endif
23729
23730int main(void)
23731{
23732	FILE *fp = fopen("cf_test.out", "w");
23733	if (fp != 0) {
23734		bool x = true;
23735		if ((bool)(-x) >= 0)
23736			fputs("unsigned ", fp);
23737		if (sizeof(x) == sizeof(int))       fputs("int",  fp);
23738		else if (sizeof(x) == sizeof(char)) fputs("char", fp);
23739		else if (sizeof(x) == sizeof(short))fputs("short",fp);
23740		else if (sizeof(x) == sizeof(long)) fputs("long", fp);
23741		fclose(fp);
23742	}
23743	${cf_cv_main_return:-return}(0);
23744}
23745
23746_ACEOF
23747rm -f conftest$ac_exeext
23748if { (eval echo "$as_me:23748: \"$ac_link\"") >&5
23749  (eval $ac_link) 2>&5
23750  ac_status=$?
23751  echo "$as_me:23751: \$? = $ac_status" >&5
23752  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23753  { (eval echo "$as_me:23753: \"$ac_try\"") >&5
23754  (eval $ac_try) 2>&5
23755  ac_status=$?
23756  echo "$as_me:23756: \$? = $ac_status" >&5
23757  (exit $ac_status); }; }; then
23758  cf_cv_type_of_bool=`cat cf_test.out`
23759		 if test -z "$cf_cv_type_of_bool"; then
23760		   cf_cv_type_of_bool=unknown
23761		 fi
23762else
23763  echo "$as_me: program exited with status $ac_status" >&5
23764echo "$as_me: failed program was:" >&5
23765cat conftest.$ac_ext >&5
23766cf_cv_type_of_bool=unknown
23767fi
23768rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23769fi
23770
23771fi
23772
23773	rm -f cf_test.out
23774echo "$as_me:23774: result: $cf_cv_type_of_bool" >&5
23775echo "${ECHO_T}$cf_cv_type_of_bool" >&6
23776if test "$cf_cv_type_of_bool" = unknown ; then
23777	case .$NCURSES_BOOL in
23778	(.auto|.) NCURSES_BOOL=unsigned;;
23779	esac
23780	{ echo "$as_me:23780: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
23781echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
23782	cf_cv_type_of_bool=$NCURSES_BOOL
23783fi
23784
23785echo "$as_me:23785: checking for special defines needed for etip.h" >&5
23786echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
23787cf_save_CXXFLAGS="$CXXFLAGS"
23788cf_result="none"
23789
23790# etip.h includes ncurses.h which includes ncurses_dll.h
23791# But ncurses_dll.h is generated - fix here.
23792test -d include || mkdir include
23793test -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
23794
23795for cf_math in "" MATH_H
23796do
23797for cf_excp in "" MATH_EXCEPTION
23798do
23799	CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
23800	test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
23801	test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
23802cat >conftest.$ac_ext <<_ACEOF
23803#line 23803 "configure"
23804#include "confdefs.h"
23805
23806#include <etip.h.in>
23807
23808int
23809main (void)
23810{
23811
23812  ;
23813  return 0;
23814}
23815_ACEOF
23816rm -f conftest.$ac_objext
23817if { (eval echo "$as_me:23817: \"$ac_compile\"") >&5
23818  (eval $ac_compile) 2>&5
23819  ac_status=$?
23820  echo "$as_me:23820: \$? = $ac_status" >&5
23821  (exit $ac_status); } &&
23822         { ac_try='test -s conftest.$ac_objext'
23823  { (eval echo "$as_me:23823: \"$ac_try\"") >&5
23824  (eval $ac_try) 2>&5
23825  ac_status=$?
23826  echo "$as_me:23826: \$? = $ac_status" >&5
23827  (exit $ac_status); }; }; then
23828
23829	test -n "$cf_math" && cat >>confdefs.h <<EOF
23830#define ETIP_NEEDS_${cf_math} 1
23831EOF
23832
23833	test -n "$cf_excp" && cat >>confdefs.h <<EOF
23834#define ETIP_NEEDS_${cf_excp} 1
23835EOF
23836
23837	cf_result="$cf_math $cf_excp"
23838	break 2
23839
23840else
23841  echo "$as_me: failed program was:" >&5
23842cat conftest.$ac_ext >&5
23843fi
23844rm -f conftest.$ac_objext conftest.$ac_ext
23845done
23846done
23847echo "$as_me:23847: result: $cf_result" >&5
23848echo "${ECHO_T}$cf_result" >&6
23849CXXFLAGS="$cf_save_CXXFLAGS"
23850
23851if test -n "$CXX"; then
23852echo "$as_me:23852: checking if $CXX accepts parameter initialization" >&5
23853echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
23854if test "${cf_cv_cpp_param_init+set}" = set; then
23855  echo $ECHO_N "(cached) $ECHO_C" >&6
23856else
23857
23858	ac_ext=cc
23859ac_cpp='$CXXCPP $CPPFLAGS'
23860ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23861ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23862ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23863ac_main_return=return
23864
23865	if test "$cross_compiling" = yes; then
23866  cf_cv_cpp_param_init=unknown
23867else
23868  cat >conftest.$ac_ext <<_ACEOF
23869#line 23869 "configure"
23870#include "confdefs.h"
23871
23872class TEST {
23873private:
23874	int value;
23875public:
23876	TEST(int x = 1);
23877	~TEST();
23878};
23879
23880TEST::TEST(int x = 1)	// some compilers do not like second initializer
23881{
23882	value = x;
23883}
23884int main(void) { }
23885
23886_ACEOF
23887rm -f conftest$ac_exeext
23888if { (eval echo "$as_me:23888: \"$ac_link\"") >&5
23889  (eval $ac_link) 2>&5
23890  ac_status=$?
23891  echo "$as_me:23891: \$? = $ac_status" >&5
23892  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23893  { (eval echo "$as_me:23893: \"$ac_try\"") >&5
23894  (eval $ac_try) 2>&5
23895  ac_status=$?
23896  echo "$as_me:23896: \$? = $ac_status" >&5
23897  (exit $ac_status); }; }; then
23898  cf_cv_cpp_param_init=yes
23899else
23900  echo "$as_me: program exited with status $ac_status" >&5
23901echo "$as_me: failed program was:" >&5
23902cat conftest.$ac_ext >&5
23903cf_cv_cpp_param_init=no
23904fi
23905rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23906fi
23907	ac_ext=cc
23908ac_cpp='$CXXCPP $CPPFLAGS'
23909ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23910ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23911ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23912ac_main_return=return
23913
23914fi
23915echo "$as_me:23915: result: $cf_cv_cpp_param_init" >&5
23916echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
23917fi
23918test "$cf_cv_cpp_param_init" = yes &&
23919cat >>confdefs.h <<\EOF
23920#define CPP_HAS_PARAM_INIT 1
23921EOF
23922
23923if test -n "$CXX"; then
23924
23925echo "$as_me:23925: checking if $CXX accepts static_cast" >&5
23926echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
23927if test "${cf_cv_cpp_static_cast+set}" = set; then
23928  echo $ECHO_N "(cached) $ECHO_C" >&6
23929else
23930
23931	ac_ext=cc
23932ac_cpp='$CXXCPP $CPPFLAGS'
23933ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23934ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23935ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23936ac_main_return=return
23937
23938	cat >conftest.$ac_ext <<_ACEOF
23939#line 23939 "configure"
23940#include "confdefs.h"
23941
23942class NCursesPanel
23943{
23944public:
23945  NCursesPanel(int nlines,
23946	       int ncols,
23947	       int begin_y = 0,
23948	       int begin_x = 0)
23949  {
23950  }
23951  NCursesPanel();
23952  ~NCursesPanel();
23953};
23954
23955template<class T> class NCursesUserPanel : public NCursesPanel
23956{
23957public:
23958  NCursesUserPanel (int nlines,
23959		    int ncols,
23960		    int begin_y = 0,
23961		    int begin_x = 0,
23962		    const T* p_UserData = static_cast<T*>(0))
23963    : NCursesPanel (nlines, ncols, begin_y, begin_x)
23964  {
23965  };
23966  NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
23967  {
23968  };
23969
23970  virtual ~NCursesUserPanel() {};
23971};
23972
23973int
23974main (void)
23975{
23976
23977	const char* p_UserData = static_cast<char*>(0)
23978  ;
23979  return 0;
23980}
23981_ACEOF
23982rm -f conftest.$ac_objext
23983if { (eval echo "$as_me:23983: \"$ac_compile\"") >&5
23984  (eval $ac_compile) 2>&5
23985  ac_status=$?
23986  echo "$as_me:23986: \$? = $ac_status" >&5
23987  (exit $ac_status); } &&
23988         { ac_try='test -s conftest.$ac_objext'
23989  { (eval echo "$as_me:23989: \"$ac_try\"") >&5
23990  (eval $ac_try) 2>&5
23991  ac_status=$?
23992  echo "$as_me:23992: \$? = $ac_status" >&5
23993  (exit $ac_status); }; }; then
23994  cf_cv_cpp_static_cast=yes
23995else
23996  echo "$as_me: failed program was:" >&5
23997cat conftest.$ac_ext >&5
23998cf_cv_cpp_static_cast=no
23999fi
24000rm -f conftest.$ac_objext conftest.$ac_ext
24001
24002	ac_ext=cc
24003ac_cpp='$CXXCPP $CPPFLAGS'
24004ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24005ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24006ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24007ac_main_return=return
24008
24009fi
24010echo "$as_me:24010: result: $cf_cv_cpp_static_cast" >&5
24011echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
24012
24013fi
24014
24015test "$cf_cv_cpp_static_cast" = yes &&
24016cat >>confdefs.h <<\EOF
24017#define CPP_HAS_STATIC_CAST 1
24018EOF
24019
24020	CXX_AR='$(AR)'
24021	CXX_ARFLAGS='$(ARFLAGS)'
24022	case $cf_cv_system_name in
24023	(irix*)
24024	    if test "$GXX" != yes ; then
24025		CXX_AR='$(CXX)'
24026		CXX_ARFLAGS='-ar -o'
24027	    fi
24028	    ;;
24029	(sco3.2v5*)
24030	    CXXLDFLAGS="-u main"
24031	    ;;
24032	(solaris2*)
24033	    if test "$GXX" != yes ; then
24034		CXX_AR='$(CXX)'
24035		CXX_ARFLAGS='-xar -o'
24036	    fi
24037	    ;;
24038	esac
24039
24040else
24041	cf_cxx_library=no
24042	cf_cv_builtin_bool=1
24043
24044	# Just because we are not configuring against C++ right now does not
24045	# mean that a user will not want to use C++.  Some distributors disable
24046	# the C++ portion of this configuration as a shortcut (or just to avoid
24047	# compiling the demo in the c++ directory).  So we need a reasonable
24048	# default for the 'bool' type.
24049	#
24050	# Caveat: since the storage of the bool type is not standardized, it
24051	# may change.
24052
24053	if test "$NCURSES_BOOL" != auto ; then
24054		cf_cv_type_of_bool=$NCURSES_BOOL
24055		cf_cv_header_stdbool_h=0
24056	else
24057		if test "$cf_cv_header_stdbool_h" = 1 ; then
24058
24059echo "$as_me:24059: checking for size of bool" >&5
24060echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24061if test "${cf_cv_type_of_bool+set}" = set; then
24062  echo $ECHO_N "(cached) $ECHO_C" >&6
24063else
24064
24065	rm -f cf_test.out
24066	if test "$cross_compiling" = yes; then
24067  cf_cv_type_of_bool=unknown
24068else
24069  cat >conftest.$ac_ext <<_ACEOF
24070#line 24070 "configure"
24071#include "confdefs.h"
24072
24073#include <stdlib.h>
24074#include <stdio.h>
24075
24076#if defined(__cplusplus)
24077
24078#ifdef HAVE_GXX_BUILTIN_H
24079#include <g++/builtin.h>
24080#elif HAVE_GPP_BUILTIN_H
24081#include <gpp/builtin.h>
24082#elif HAVE_BUILTIN_H
24083#include <builtin.h>
24084#endif
24085
24086#else
24087
24088#if $cf_cv_header_stdbool_h
24089#include <stdbool.h>
24090#endif
24091
24092#endif
24093
24094int main(void)
24095{
24096	FILE *fp = fopen("cf_test.out", "w");
24097	if (fp != 0) {
24098		bool x = true;
24099		if ((bool)(-x) >= 0)
24100			fputs("unsigned ", fp);
24101		if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24102		else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24103		else if (sizeof(x) == sizeof(short))fputs("short",fp);
24104		else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24105		fclose(fp);
24106	}
24107	${cf_cv_main_return:-return}(0);
24108}
24109
24110_ACEOF
24111rm -f conftest$ac_exeext
24112if { (eval echo "$as_me:24112: \"$ac_link\"") >&5
24113  (eval $ac_link) 2>&5
24114  ac_status=$?
24115  echo "$as_me:24115: \$? = $ac_status" >&5
24116  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24117  { (eval echo "$as_me:24117: \"$ac_try\"") >&5
24118  (eval $ac_try) 2>&5
24119  ac_status=$?
24120  echo "$as_me:24120: \$? = $ac_status" >&5
24121  (exit $ac_status); }; }; then
24122  cf_cv_type_of_bool=`cat cf_test.out`
24123		 if test -z "$cf_cv_type_of_bool"; then
24124		   cf_cv_type_of_bool=unknown
24125		 fi
24126else
24127  echo "$as_me: program exited with status $ac_status" >&5
24128echo "$as_me: failed program was:" >&5
24129cat conftest.$ac_ext >&5
24130cf_cv_type_of_bool=unknown
24131fi
24132rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24133fi
24134
24135fi
24136
24137	rm -f cf_test.out
24138echo "$as_me:24138: result: $cf_cv_type_of_bool" >&5
24139echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24140if test "$cf_cv_type_of_bool" = unknown ; then
24141	case .$NCURSES_BOOL in
24142	(.auto|.) NCURSES_BOOL=unsigned;;
24143	esac
24144	{ echo "$as_me:24144: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24145echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24146	cf_cv_type_of_bool=$NCURSES_BOOL
24147fi
24148
24149		else
24150			echo "$as_me:24150: checking for fallback type of bool" >&5
24151echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
24152			case "$host_cpu" in
24153			(i?86)	cf_cv_type_of_bool=char	;;
24154			(*)	cf_cv_type_of_bool=int	;;
24155			esac
24156			echo "$as_me:24156: result: $cf_cv_type_of_bool" >&5
24157echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24158		fi
24159	fi
24160fi
24161
24162# If the C compiler did not declare bool, and we did not determine that the C++
24163# compiler does not declare bool, turn on an ifdef in curses.h that makes the
24164# ncurses library use the same type as C++ bool.  Note that this allows one to
24165# specify the type of bool in a configure-script option and postpone
24166# integration with the C++ compiler provided that the types are compatible.
24167USE_CXX_BOOL=1
24168if test $cf_cv_cc_bool_type = 1
24169then
24170	# oops: C has a bool.  Unlikely, but C++ could differ.
24171	USE_CXX_BOOL=0
24172elif test $cf_cv_builtin_bool = 0
24173then
24174	# C++ has no bool
24175	USE_CXX_BOOL=0
24176else
24177	# this is the normal case
24178	USE_CXX_BOOL='defined(__cplusplus)'
24179fi
24180
24181if test -f "${srcdir}/Ada95/Makefile.in" ; then
24182
24183	if test "$cf_with_ada" != "no" ; then
24184		if test "$with_libtool" != "no"; then
24185			{ echo "$as_me:24185: WARNING: libtool does not support Ada - disabling feature" >&5
24186echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
24187			cf_with_ada=no
24188		fi
24189	fi
24190
24191	if test "$cf_with_ada" != "no" ; then
24192
24193for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
24194do
24195
24196cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24197
24198	unset ac_cv_path_cf_TEMP_gnat
24199	unset cf_TEMP_gnat
24200	# Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
24201set dummy $cf_prog_gnat; ac_word=$2
24202echo "$as_me:24202: checking for $ac_word" >&5
24203echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24204if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
24205  echo $ECHO_N "(cached) $ECHO_C" >&6
24206else
24207  case $cf_TEMP_gnat in
24208  [\\/]* | ?:[\\/]*)
24209  ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
24210  ;;
24211  *)
24212  ac_save_IFS=$IFS; IFS=$ac_path_separator
24213ac_dummy="$PATH"
24214for ac_dir in $ac_dummy; do
24215  IFS=$ac_save_IFS
24216  test -z "$ac_dir" && ac_dir=.
24217  if $as_executable_p "$ac_dir/$ac_word"; then
24218   ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
24219   echo "$as_me:24219: found $ac_dir/$ac_word" >&5
24220   break
24221fi
24222done
24223
24224  test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
24225  ;;
24226esac
24227fi
24228cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
24229
24230if test -n "$cf_TEMP_gnat"; then
24231  echo "$as_me:24231: result: $cf_TEMP_gnat" >&5
24232echo "${ECHO_T}$cf_TEMP_gnat" >&6
24233else
24234  echo "$as_me:24234: result: no" >&5
24235echo "${ECHO_T}no" >&6
24236fi
24237
24238	eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
24239
24240	if test "x$cf_TEMP_gnat" != xno; then
24241		unset cf_cv_gnat_version
24242		unset cf_TEMP_gnat
24243
24244echo "$as_me:24244: checking for $cf_prog_gnat version" >&5
24245echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
24246if test "${cf_cv_gnat_version+set}" = set; then
24247  echo $ECHO_N "(cached) $ECHO_C" >&6
24248else
24249
24250cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
24251	grep '[0-9].[0-9][0-9]*' |\
24252	sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24253
24254fi
24255echo "$as_me:24255: result: $cf_cv_gnat_version" >&5
24256echo "${ECHO_T}$cf_cv_gnat_version" >&6
24257test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24258eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
24259
24260	fi
24261	eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
24262
24263	unset cf_TEMP_gnat
24264	unset cf_cv_gnat_version
24265	unset ac_cv_path_cf_TEMP_gnat
24266done
24267
24268if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
24269	cf_ada_make=
24270	cf_cv_prog_gnat_correct=no
24271else
24272	cf_ada_make=gnatmake
24273	if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
24274		# gprconfig is newer than gnatmake; we can continue...
24275		cf_ada_config="##"
24276	else
24277		rm -rf conftest* *~conftest*
24278		if mkdir conftest.src
24279		then
24280			cf_ada_config=""
24281			cd conftest.src
24282			for cf_gprconfig in Ada C
24283			do
24284				echo "$as_me:24284: checking for gprconfig name for $cf_gprconfig" >&5
24285echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
24286				if test $cf_gprconfig = C
24287				then
24288					for cf_gprconfig_param in \
24289						$cf_gprconfig,,,,GNATGCC \
24290						$cf_gprconfig,,,,GCC \
24291						$cf_gprconfig
24292					do
24293						cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24294						test -n "$cf_gprconfig_value" && break
24295					done
24296				else
24297					cf_gprconfig_param=$cf_gprconfig
24298					cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24299				fi
24300				if test -n "$cf_gprconfig_value"
24301				then
24302					eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
24303					echo "$as_me:24303: result: $cf_gprconfig_value" >&5
24304echo "${ECHO_T}$cf_gprconfig_value" >&6
24305				else
24306					echo "$as_me:24306: result: missing" >&5
24307echo "${ECHO_T}missing" >&6
24308					cf_ada_config="#"
24309					break
24310				fi
24311			done
24312			cd ..
24313			rm -rf conftest* *~conftest*
24314		fi
24315	fi
24316	if test "x$cf_ada_config" != "x#"
24317	then
24318
24319echo "$as_me:24319: checking for gnat version" >&5
24320echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
24321if test "${cf_cv_gnat_version+set}" = set; then
24322  echo $ECHO_N "(cached) $ECHO_C" >&6
24323else
24324
24325cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
24326	grep '[0-9].[0-9][0-9]*' |\
24327	sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24328
24329fi
24330echo "$as_me:24330: result: $cf_cv_gnat_version" >&5
24331echo "${ECHO_T}$cf_cv_gnat_version" >&6
24332test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24333
24334case $cf_cv_gnat_version in
24335(3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
24336	cf_cv_prog_gnat_correct=yes
24337	;;
24338(*)
24339	{ echo "$as_me:24339: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
24340echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
24341	cf_cv_prog_gnat_correct=no
24342	;;
24343esac
24344
24345		# Extract the first word of "m4", so it can be a program name with args.
24346set dummy m4; ac_word=$2
24347echo "$as_me:24347: checking for $ac_word" >&5
24348echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24349if test "${ac_cv_prog_M4_exists+set}" = set; then
24350  echo $ECHO_N "(cached) $ECHO_C" >&6
24351else
24352  if test -n "$M4_exists"; then
24353  ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
24354else
24355  ac_save_IFS=$IFS; IFS=$ac_path_separator
24356ac_dummy="$PATH"
24357for ac_dir in $ac_dummy; do
24358  IFS=$ac_save_IFS
24359  test -z "$ac_dir" && ac_dir=.
24360  $as_executable_p "$ac_dir/$ac_word" || continue
24361ac_cv_prog_M4_exists="yes"
24362echo "$as_me:24362: found $ac_dir/$ac_word" >&5
24363break
24364done
24365
24366  test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
24367fi
24368fi
24369M4_exists=$ac_cv_prog_M4_exists
24370if test -n "$M4_exists"; then
24371  echo "$as_me:24371: result: $M4_exists" >&5
24372echo "${ECHO_T}$M4_exists" >&6
24373else
24374  echo "$as_me:24374: result: no" >&5
24375echo "${ECHO_T}no" >&6
24376fi
24377
24378		if test "$ac_cv_prog_M4_exists" = no; then
24379			cf_cv_prog_gnat_correct=no
24380			{ echo "$as_me:24380: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
24381echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
24382		fi
24383		if test "$cf_cv_prog_gnat_correct" = yes; then
24384			echo "$as_me:24384: checking if GNAT works" >&5
24385echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
24386
24387rm -rf conftest* *~conftest*
24388cat >>conftest.ads <<CF_EOF
24389procedure conftest;
24390CF_EOF
24391cat >>conftest.adb <<CF_EOF
24392with Text_IO;
24393with GNAT.OS_Lib;
24394procedure conftest is
24395begin
24396   Text_IO.Put ("Hello World");
24397   Text_IO.New_Line;
24398   GNAT.OS_Lib.OS_Exit (0);
24399end conftest;
24400CF_EOF
24401if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24402   if ( ./conftest 1>&5 2>&1 ) ; then
24403      cf_cv_prog_gnat_correct=yes
24404   else
24405      cf_cv_prog_gnat_correct=no
24406   fi
24407else
24408   cf_cv_prog_gnat_correct=no
24409fi
24410rm -rf conftest* *~conftest*
24411
24412			echo "$as_me:24412: result: $cf_cv_prog_gnat_correct" >&5
24413echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
24414		fi
24415	else
24416		cf_cv_prog_gnat_correct=no
24417	fi
24418fi
24419
24420		if test	"x$cf_cv_prog_gnat_correct" = xyes; then
24421
24422 	ADAFLAGS="$ADAFLAGS -gnatpn"
24423
24424	echo "$as_me:24424: checking optimization options for ADAFLAGS" >&5
24425echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
24426	case "$CFLAGS" in
24427	(*-g*)
24428
24429 	ADAFLAGS="$ADAFLAGS -g"
24430
24431		;;
24432	esac
24433	case "$CFLAGS" in
24434	(*-O*)
24435		cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ 	].*//'`
24436
24437 	ADAFLAGS="$ADAFLAGS $cf_O_flag"
24438
24439		;;
24440	esac
24441	echo "$as_me:24441: result: $ADAFLAGS" >&5
24442echo "${ECHO_T}$ADAFLAGS" >&6
24443
24444echo "$as_me:24444: checking if GNATPREP supports -T option" >&5
24445echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
24446if test "${cf_cv_gnatprep_opt_t+set}" = set; then
24447  echo $ECHO_N "(cached) $ECHO_C" >&6
24448else
24449
24450cf_cv_gnatprep_opt_t=no
24451gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
24452
24453fi
24454echo "$as_me:24454: result: $cf_cv_gnatprep_opt_t" >&5
24455echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
24456test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
24457
24458echo "$as_me:24458: checking if GNAT supports generics" >&5
24459echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
24460case $cf_cv_gnat_version in
24461(3.[1-9]*|[4-9].*)
24462	cf_gnat_generics=yes
24463	;;
24464(*)
24465	cf_gnat_generics=no
24466	;;
24467esac
24468echo "$as_me:24468: result: $cf_gnat_generics" >&5
24469echo "${ECHO_T}$cf_gnat_generics" >&6
24470
24471if test "$cf_gnat_generics" = yes
24472then
24473	cf_compile_generics=generics
24474	cf_generic_objects="\${GENOBJS}"
24475else
24476	cf_compile_generics=
24477	cf_generic_objects=
24478fi
24479
24480echo "$as_me:24480: checking if GNAT supports SIGINT" >&5
24481echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
24482if test "${cf_cv_gnat_sigint+set}" = set; then
24483  echo $ECHO_N "(cached) $ECHO_C" >&6
24484else
24485
24486rm -rf conftest* *~conftest*
24487cat >>conftest.ads <<CF_EOF
24488with Ada.Interrupts.Names;
24489
24490package ConfTest is
24491
24492   pragma Warnings (Off);  --  the next pragma exists since 3.11p
24493   pragma Unreserve_All_Interrupts;
24494   pragma Warnings (On);
24495
24496   protected Process is
24497      procedure Stop;
24498      function Continue return Boolean;
24499      pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
24500   private
24501      Done : Boolean := False;
24502   end Process;
24503
24504end ConfTest;
24505CF_EOF
24506cat >>conftest.adb <<CF_EOF
24507package body ConfTest is
24508   protected body Process is
24509      procedure Stop is
24510      begin
24511         Done := True;
24512      end Stop;
24513      function Continue return Boolean is
24514      begin
24515         return not Done;
24516      end Continue;
24517   end Process;
24518end ConfTest;
24519CF_EOF
24520if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24521      cf_cv_gnat_sigint=yes
24522else
24523   cf_cv_gnat_sigint=no
24524fi
24525rm -rf conftest* *~conftest*
24526
24527fi
24528echo "$as_me:24528: result: $cf_cv_gnat_sigint" >&5
24529echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
24530
24531if test $cf_cv_gnat_sigint = yes ; then
24532	USE_GNAT_SIGINT=""
24533else
24534	USE_GNAT_SIGINT="#"
24535fi
24536
24537cf_gnat_libraries=no
24538cf_gnat_projects=no
24539
24540if test "$enable_gnat_projects" != no ; then
24541echo "$as_me:24541: checking if GNAT supports project files" >&5
24542echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
24543case $cf_cv_gnat_version in
24544(3.[0-9]*)
24545	;;
24546(*)
24547	case $cf_cv_system_name in
24548	(cygwin*|msys*)
24549		;;
24550	(*)
24551		rm -rf conftest* *~conftest*
24552		if mkdir conftest.src conftest.bin conftest.lib
24553		then
24554			cd conftest.src
24555			rm -rf conftest* *~conftest*
24556			cat >>library.gpr <<CF_EOF
24557project Library is
24558  Kind := External ("LIB_KIND");
24559  for Library_Name use "ConfTest";
24560  for Object_Dir use ".";
24561  for Library_ALI_Dir use External("LIBRARY_DIR");
24562  for Library_Version use External ("SONAME");
24563  for Library_Kind use Kind;
24564  for Library_Dir use External("BUILD_DIR");
24565  Source_Dir := External ("SOURCE_DIR");
24566  for Source_Dirs use (Source_Dir);
24567end Library;
24568CF_EOF
24569			cat >>confpackage.ads <<CF_EOF
24570package ConfPackage is
24571   procedure conftest;
24572end ConfPackage;
24573CF_EOF
24574			cat >>confpackage.adb <<CF_EOF
24575with Text_IO;
24576package body ConfPackage is
24577   procedure conftest is
24578   begin
24579      Text_IO.Put ("Hello World");
24580      Text_IO.New_Line;
24581   end conftest;
24582end ConfPackage;
24583CF_EOF
24584			if ( $cf_ada_make $ADAFLAGS \
24585					-Plibrary.gpr \
24586					-XBUILD_DIR=`cd ../conftest.bin;pwd` \
24587					-XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
24588					-XSOURCE_DIR=`pwd` \
24589					-XSONAME=libConfTest.so.1 \
24590					-XLIB_KIND=static 1>&5 2>&1 ) ; then
24591				cf_gnat_projects=yes
24592			fi
24593			cd ..
24594		fi
24595		if test -f conftest.lib/confpackage.ali
24596		then
24597			cf_gnat_libraries=yes
24598		fi
24599		rm -rf conftest* *~conftest*
24600		;;
24601	esac
24602	;;
24603esac
24604echo "$as_me:24604: result: $cf_gnat_projects" >&5
24605echo "${ECHO_T}$cf_gnat_projects" >&6
24606fi # enable_gnat_projects
24607
24608if test $cf_gnat_projects = yes
24609then
24610	echo "$as_me:24610: checking if GNAT supports libraries" >&5
24611echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
24612	echo "$as_me:24612: result: $cf_gnat_libraries" >&5
24613echo "${ECHO_T}$cf_gnat_libraries" >&6
24614fi
24615
24616if test "$cf_gnat_projects" = yes
24617then
24618	USE_OLD_MAKERULES="#"
24619	USE_GNAT_PROJECTS=""
24620else
24621	USE_OLD_MAKERULES=""
24622	USE_GNAT_PROJECTS="#"
24623fi
24624
24625if test "$cf_gnat_libraries" = yes
24626then
24627	USE_GNAT_LIBRARIES=""
24628else
24629	USE_GNAT_LIBRARIES="#"
24630fi
24631
24632echo "$as_me:24632: checking for ada-compiler" >&5
24633echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
24634
24635# Check whether --with-ada-compiler or --without-ada-compiler was given.
24636if test "${with_ada_compiler+set}" = set; then
24637  withval="$with_ada_compiler"
24638  cf_ada_compiler=$withval
24639else
24640  cf_ada_compiler=gnatmake
24641fi;
24642
24643echo "$as_me:24643: result: $cf_ada_compiler" >&5
24644echo "${ECHO_T}$cf_ada_compiler" >&6
24645
24646			cf_ada_package=terminal_interface
24647
24648echo "$as_me:24648: checking for ada-include" >&5
24649echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
24650
24651# Check whether --with-ada-include or --without-ada-include was given.
24652if test "${with_ada_include+set}" = set; then
24653  withval="$with_ada_include"
24654
24655else
24656  withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
24657fi; if test -n "$prefix/share/ada/adainclude" ; then
24658
24659if test "x$prefix" != xNONE; then
24660	cf_path_syntax="$prefix"
24661else
24662	cf_path_syntax="$ac_default_prefix"
24663fi
24664
24665case ".$withval" in
24666(.\$\(*\)*|.\'*\'*)
24667	;;
24668(..|./*|.\\*)
24669	;;
24670(.[a-zA-Z]:[\\/]*) # OS/2 EMX
24671	;;
24672(.\${*prefix}*|.\${*dir}*)
24673	eval withval="$withval"
24674	case ".$withval" in
24675	(.NONE/*)
24676		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24677		;;
24678	esac
24679	;;
24680(.no|.NONE/*)
24681	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24682	;;
24683(*)
24684	{ { echo "$as_me:24684: error: expected a pathname, not \"$withval\"" >&5
24685echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24686   { (exit 1); exit 1; }; }
24687	;;
24688esac
24689
24690fi
24691eval ADA_INCLUDE="$withval"
24692
24693echo "$as_me:24693: result: $ADA_INCLUDE" >&5
24694echo "${ECHO_T}$ADA_INCLUDE" >&6
24695
24696echo "$as_me:24696: checking for ada-objects" >&5
24697echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
24698
24699# Check whether --with-ada-objects or --without-ada-objects was given.
24700if test "${with_ada_objects+set}" = set; then
24701  withval="$with_ada_objects"
24702
24703else
24704  withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
24705fi; if test -n "$prefix/lib/ada/adalib" ; then
24706
24707if test "x$prefix" != xNONE; then
24708	cf_path_syntax="$prefix"
24709else
24710	cf_path_syntax="$ac_default_prefix"
24711fi
24712
24713case ".$withval" in
24714(.\$\(*\)*|.\'*\'*)
24715	;;
24716(..|./*|.\\*)
24717	;;
24718(.[a-zA-Z]:[\\/]*) # OS/2 EMX
24719	;;
24720(.\${*prefix}*|.\${*dir}*)
24721	eval withval="$withval"
24722	case ".$withval" in
24723	(.NONE/*)
24724		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24725		;;
24726	esac
24727	;;
24728(.no|.NONE/*)
24729	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24730	;;
24731(*)
24732	{ { echo "$as_me:24732: error: expected a pathname, not \"$withval\"" >&5
24733echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24734   { (exit 1); exit 1; }; }
24735	;;
24736esac
24737
24738fi
24739eval ADA_OBJECTS="$withval"
24740
24741echo "$as_me:24741: result: $ADA_OBJECTS" >&5
24742echo "${ECHO_T}$ADA_OBJECTS" >&6
24743
24744echo "$as_me:24744: checking if an Ada95 shared-library should be built" >&5
24745echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
24746
24747# Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
24748if test "${with_ada_sharedlib+set}" = set; then
24749  withval="$with_ada_sharedlib"
24750  with_ada_sharedlib=$withval
24751else
24752  with_ada_sharedlib=no
24753fi;
24754echo "$as_me:24754: result: $with_ada_sharedlib" >&5
24755echo "${ECHO_T}$with_ada_sharedlib" >&6
24756
24757if test "x$with_ada_sharedlib" != xno
24758then
24759	if test "x$cf_gnat_projects" != xyes
24760	then
24761		{ echo "$as_me:24761: WARNING: disabling shared-library since GNAT projects are not supported" >&5
24762echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
24763		with_ada_sharedlib=no
24764	fi
24765fi
24766
24767ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
24768MAKE_ADA_SHAREDLIB="#"
24769
24770if test "x$with_ada_sharedlib" != xno
24771then
24772	MAKE_ADA_SHAREDLIB=
24773	if test "x$with_ada_sharedlib" != xyes
24774	then
24775		ADA_SHAREDLIB="$with_ada_sharedlib"
24776	fi
24777fi
24778
24779			# allow the Ada binding to be renamed
24780
24781echo "$as_me:24781: checking for ada-libname" >&5
24782echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
24783
24784# Check whether --with-ada-libname or --without-ada-libname was given.
24785if test "${with_ada_libname+set}" = set; then
24786  withval="$with_ada_libname"
24787  ADA_LIBNAME=$withval
24788else
24789  ADA_LIBNAME=AdaCurses
24790fi;
24791case "x$ADA_LIBNAME" in
24792(x|xyes|xno)
24793	ADA_LIBNAME=AdaCurses
24794	;;
24795esac
24796
24797echo "$as_me:24797: result: $ADA_LIBNAME" >&5
24798echo "${ECHO_T}$ADA_LIBNAME" >&6
24799
24800		fi
24801	fi
24802else
24803	cf_with_ada=no
24804fi
24805
24806# do this "late" to avoid conflict with header-checks
24807if test "x$with_widec" = xyes ; then
24808	echo "$as_me:24808: checking for wchar_t" >&5
24809echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
24810if test "${ac_cv_type_wchar_t+set}" = set; then
24811  echo $ECHO_N "(cached) $ECHO_C" >&6
24812else
24813  cat >conftest.$ac_ext <<_ACEOF
24814#line 24814 "configure"
24815#include "confdefs.h"
24816$ac_includes_default
24817int
24818main (void)
24819{
24820if ((wchar_t *) 0)
24821  return 0;
24822if (sizeof (wchar_t))
24823  return 0;
24824  ;
24825  return 0;
24826}
24827_ACEOF
24828rm -f conftest.$ac_objext
24829if { (eval echo "$as_me:24829: \"$ac_compile\"") >&5
24830  (eval $ac_compile) 2>&5
24831  ac_status=$?
24832  echo "$as_me:24832: \$? = $ac_status" >&5
24833  (exit $ac_status); } &&
24834         { ac_try='test -s conftest.$ac_objext'
24835  { (eval echo "$as_me:24835: \"$ac_try\"") >&5
24836  (eval $ac_try) 2>&5
24837  ac_status=$?
24838  echo "$as_me:24838: \$? = $ac_status" >&5
24839  (exit $ac_status); }; }; then
24840  ac_cv_type_wchar_t=yes
24841else
24842  echo "$as_me: failed program was:" >&5
24843cat conftest.$ac_ext >&5
24844ac_cv_type_wchar_t=no
24845fi
24846rm -f conftest.$ac_objext conftest.$ac_ext
24847fi
24848echo "$as_me:24848: result: $ac_cv_type_wchar_t" >&5
24849echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
24850
24851echo "$as_me:24851: checking size of wchar_t" >&5
24852echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
24853if test "${ac_cv_sizeof_wchar_t+set}" = set; then
24854  echo $ECHO_N "(cached) $ECHO_C" >&6
24855else
24856  if test "$ac_cv_type_wchar_t" = yes; then
24857  if test "$cross_compiling" = yes; then
24858  # Depending upon the size, compute the lo and hi bounds.
24859cat >conftest.$ac_ext <<_ACEOF
24860#line 24860 "configure"
24861#include "confdefs.h"
24862$ac_includes_default
24863int
24864main (void)
24865{
24866int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
24867  ;
24868  return 0;
24869}
24870_ACEOF
24871rm -f conftest.$ac_objext
24872if { (eval echo "$as_me:24872: \"$ac_compile\"") >&5
24873  (eval $ac_compile) 2>&5
24874  ac_status=$?
24875  echo "$as_me:24875: \$? = $ac_status" >&5
24876  (exit $ac_status); } &&
24877         { ac_try='test -s conftest.$ac_objext'
24878  { (eval echo "$as_me:24878: \"$ac_try\"") >&5
24879  (eval $ac_try) 2>&5
24880  ac_status=$?
24881  echo "$as_me:24881: \$? = $ac_status" >&5
24882  (exit $ac_status); }; }; then
24883  ac_lo=0 ac_mid=0
24884  while :; do
24885    cat >conftest.$ac_ext <<_ACEOF
24886#line 24886 "configure"
24887#include "confdefs.h"
24888$ac_includes_default
24889int
24890main (void)
24891{
24892int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
24893  ;
24894  return 0;
24895}
24896_ACEOF
24897rm -f conftest.$ac_objext
24898if { (eval echo "$as_me:24898: \"$ac_compile\"") >&5
24899  (eval $ac_compile) 2>&5
24900  ac_status=$?
24901  echo "$as_me:24901: \$? = $ac_status" >&5
24902  (exit $ac_status); } &&
24903         { ac_try='test -s conftest.$ac_objext'
24904  { (eval echo "$as_me:24904: \"$ac_try\"") >&5
24905  (eval $ac_try) 2>&5
24906  ac_status=$?
24907  echo "$as_me:24907: \$? = $ac_status" >&5
24908  (exit $ac_status); }; }; then
24909  ac_hi=$ac_mid; break
24910else
24911  echo "$as_me: failed program was:" >&5
24912cat conftest.$ac_ext >&5
24913ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
24914fi
24915rm -f conftest.$ac_objext conftest.$ac_ext
24916  done
24917else
24918  echo "$as_me: failed program was:" >&5
24919cat conftest.$ac_ext >&5
24920ac_hi=-1 ac_mid=-1
24921  while :; do
24922    cat >conftest.$ac_ext <<_ACEOF
24923#line 24923 "configure"
24924#include "confdefs.h"
24925$ac_includes_default
24926int
24927main (void)
24928{
24929int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
24930  ;
24931  return 0;
24932}
24933_ACEOF
24934rm -f conftest.$ac_objext
24935if { (eval echo "$as_me:24935: \"$ac_compile\"") >&5
24936  (eval $ac_compile) 2>&5
24937  ac_status=$?
24938  echo "$as_me:24938: \$? = $ac_status" >&5
24939  (exit $ac_status); } &&
24940         { ac_try='test -s conftest.$ac_objext'
24941  { (eval echo "$as_me:24941: \"$ac_try\"") >&5
24942  (eval $ac_try) 2>&5
24943  ac_status=$?
24944  echo "$as_me:24944: \$? = $ac_status" >&5
24945  (exit $ac_status); }; }; then
24946  ac_lo=$ac_mid; break
24947else
24948  echo "$as_me: failed program was:" >&5
24949cat conftest.$ac_ext >&5
24950ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
24951fi
24952rm -f conftest.$ac_objext conftest.$ac_ext
24953  done
24954fi
24955rm -f conftest.$ac_objext conftest.$ac_ext
24956# Binary search between lo and hi bounds.
24957while test "x$ac_lo" != "x$ac_hi"; do
24958  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24959  cat >conftest.$ac_ext <<_ACEOF
24960#line 24960 "configure"
24961#include "confdefs.h"
24962$ac_includes_default
24963int
24964main (void)
24965{
24966int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
24967  ;
24968  return 0;
24969}
24970_ACEOF
24971rm -f conftest.$ac_objext
24972if { (eval echo "$as_me:24972: \"$ac_compile\"") >&5
24973  (eval $ac_compile) 2>&5
24974  ac_status=$?
24975  echo "$as_me:24975: \$? = $ac_status" >&5
24976  (exit $ac_status); } &&
24977         { ac_try='test -s conftest.$ac_objext'
24978  { (eval echo "$as_me:24978: \"$ac_try\"") >&5
24979  (eval $ac_try) 2>&5
24980  ac_status=$?
24981  echo "$as_me:24981: \$? = $ac_status" >&5
24982  (exit $ac_status); }; }; then
24983  ac_hi=$ac_mid
24984else
24985  echo "$as_me: failed program was:" >&5
24986cat conftest.$ac_ext >&5
24987ac_lo=`expr $ac_mid + 1`
24988fi
24989rm -f conftest.$ac_objext conftest.$ac_ext
24990done
24991ac_cv_sizeof_wchar_t=$ac_lo
24992else
24993  if test "$cross_compiling" = yes; then
24994  { { echo "$as_me:24994: error: cannot run test program while cross compiling" >&5
24995echo "$as_me: error: cannot run test program while cross compiling" >&2;}
24996   { (exit 1); exit 1; }; }
24997else
24998  cat >conftest.$ac_ext <<_ACEOF
24999#line 24999 "configure"
25000#include "confdefs.h"
25001$ac_includes_default
25002int
25003main (void)
25004{
25005FILE *f = fopen ("conftest.val", "w");
25006if (!f)
25007  $ac_main_return (1);
25008fprintf (f, "%d", (sizeof (wchar_t)));
25009fclose (f);
25010  ;
25011  return 0;
25012}
25013_ACEOF
25014rm -f conftest$ac_exeext
25015if { (eval echo "$as_me:25015: \"$ac_link\"") >&5
25016  (eval $ac_link) 2>&5
25017  ac_status=$?
25018  echo "$as_me:25018: \$? = $ac_status" >&5
25019  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25020  { (eval echo "$as_me:25020: \"$ac_try\"") >&5
25021  (eval $ac_try) 2>&5
25022  ac_status=$?
25023  echo "$as_me:25023: \$? = $ac_status" >&5
25024  (exit $ac_status); }; }; then
25025  ac_cv_sizeof_wchar_t=`cat conftest.val`
25026else
25027  echo "$as_me: program exited with status $ac_status" >&5
25028echo "$as_me: failed program was:" >&5
25029cat conftest.$ac_ext >&5
25030fi
25031rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25032fi
25033fi
25034rm -f conftest.val
25035else
25036  ac_cv_sizeof_wchar_t=0
25037fi
25038fi
25039echo "$as_me:25039: result: $ac_cv_sizeof_wchar_t" >&5
25040echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
25041cat >>confdefs.h <<EOF
25042#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
25043EOF
25044
25045	# cross-compiling to mingw can run into the problem that attempting to
25046	# link with the regex library fails, causing the test to not set this to
25047	# a number.  "recent" autoconf does not address this problem either -TD
25048	if test -z "$ac_cv_sizeof_wchar_t"
25049	then
25050		test -n "$verbose" && echo "	test failed (assume 2)" 1>&6
25051
25052echo "${as_me:-configure}:25052: testing test failed (assume 2) ..." 1>&5
25053
25054		sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
25055		mv confdefs.tmp confdefs.h
25056		echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
25057	fi
25058fi
25059
25060### Construct the ncurses library-subsets, if any, from this set of keywords:
25061###	none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
25062###
25063### ticlib modules may be a separate library, otherwise contained in termlib.
25064### termlib modules may be a separate library, otherwise contained in ncurses.
25065###
25066### The of "+" or " " between the tokens controls the way the script
25067### chooses to split module lists into libraries.
25068###
25069### (see CF_LIB_RULES).
25070echo "$as_me:25070: checking for library subsets" >&5
25071echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
25072LIB_SUBSETS=
25073
25074if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
25075	LIB_SUBSETS="${LIB_SUBSETS}ticlib"
25076	if test "$with_ticlib" != no ; then
25077		LIB_SUBSETS="${LIB_SUBSETS} "
25078	else
25079		LIB_SUBSETS="${LIB_SUBSETS}+"
25080	fi
25081fi
25082
25083LIB_SUBSETS="${LIB_SUBSETS}termlib"
25084test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
25085
25086if test "$with_termlib" != no ; then
25087	LIB_SUBSETS="${LIB_SUBSETS} "
25088else
25089	LIB_SUBSETS="${LIB_SUBSETS}+"
25090fi
25091
25092LIB_SUBSETS="${LIB_SUBSETS}base"
25093
25094# Most term-driver calls are to tinfo, but some like init_pair are to the
25095# base library (so it resides in base).
25096if test "$with_term_driver" != no ; then
25097	LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
25098	case $cf_cv_system_name in
25099	(*mingw32*|*mingw64*)
25100		LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
25101		CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
25102		;;
25103	(*)
25104		LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
25105		;;
25106	esac
25107fi
25108
25109test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
25110test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
25111
25112echo "$as_me:25112: result: $LIB_SUBSETS" >&5
25113echo "${ECHO_T}$LIB_SUBSETS" >&6
25114
25115### Construct the list of include-directories to be generated
25116
25117if test "$srcdir" != "."; then
25118	CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
25119fi
25120CPPFLAGS="-I../include $CPPFLAGS"
25121if test "$srcdir" != "."; then
25122	CPPFLAGS="-I\${srcdir} $CPPFLAGS"
25123fi
25124CPPFLAGS="-I. $CPPFLAGS"
25125
25126ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
25127if test "$srcdir" != "."; then
25128	ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
25129fi
25130if test "$GCC" != yes; then
25131	ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25132elif test "$includedir" != "/usr/include"; then
25133	if test "$includedir" = '${prefix}/include' ; then
25134		if test x$prefix != x/usr ; then
25135			ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25136		fi
25137	else
25138		ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25139	fi
25140fi
25141
25142### Build up pieces for makefile rules
25143echo "$as_me:25143: checking default library suffix" >&5
25144echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
25145
25146	case $DFT_LWR_MODEL in
25147	(libtool) DFT_ARG_SUFFIX=''   ;;
25148	(normal)  DFT_ARG_SUFFIX=''   ;;
25149	(debug)   DFT_ARG_SUFFIX='_g' ;;
25150	(profile) DFT_ARG_SUFFIX='_p' ;;
25151	(shared)  DFT_ARG_SUFFIX=''   ;;
25152	esac
25153	test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
25154echo "$as_me:25154: result: $DFT_ARG_SUFFIX" >&5
25155echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
25156
25157echo "$as_me:25157: checking default library-dependency suffix" >&5
25158echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
25159
25160	case X$DFT_LWR_MODEL in
25161	(Xlibtool)
25162		DFT_LIB_SUFFIX='.la'
25163		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25164		;;
25165	(Xdebug)
25166		DFT_LIB_SUFFIX='_g.a'
25167		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25168		;;
25169	(Xprofile)
25170		DFT_LIB_SUFFIX='_p.a'
25171		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25172		;;
25173	(Xshared)
25174		case $cf_cv_system_name in
25175		(aix[5-7]*)
25176			DFT_LIB_SUFFIX='.so'
25177			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25178			;;
25179		(cygwin*|msys*|mingw*)
25180			DFT_LIB_SUFFIX='.dll'
25181			DFT_DEP_SUFFIX='.dll.a'
25182			;;
25183		(darwin*)
25184			DFT_LIB_SUFFIX='.dylib'
25185			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25186			;;
25187		(hpux*)
25188			case $target in
25189			(ia64*)
25190				DFT_LIB_SUFFIX='.so'
25191				DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25192				;;
25193			(*)
25194				DFT_LIB_SUFFIX='.sl'
25195				DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25196				;;
25197			esac
25198			;;
25199		(*)
25200			DFT_LIB_SUFFIX='.so'
25201			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25202			;;
25203		esac
25204		;;
25205	(*)
25206		DFT_LIB_SUFFIX='.a'
25207		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25208		;;
25209	esac
25210	if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25211	then
25212		DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
25213		DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
25214	fi
25215echo "$as_me:25215: result: $DFT_DEP_SUFFIX" >&5
25216echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
25217
25218echo "$as_me:25218: checking default object directory" >&5
25219echo $ECHO_N "checking default object directory... $ECHO_C" >&6
25220
25221	case $DFT_LWR_MODEL in
25222	(libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
25223	(normal)  DFT_OBJ_SUBDIR='objects' ;;
25224	(debug)   DFT_OBJ_SUBDIR='obj_g' ;;
25225	(profile) DFT_OBJ_SUBDIR='obj_p' ;;
25226	(shared)
25227		case $cf_cv_system_name in
25228		(cygwin|msys)
25229			DFT_OBJ_SUBDIR='objects' ;;
25230		(*)
25231			DFT_OBJ_SUBDIR='obj_s' ;;
25232		esac
25233	esac
25234echo "$as_me:25234: result: $DFT_OBJ_SUBDIR" >&5
25235echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
25236
25237if test "x$cf_with_cxx" = xyes ; then
25238echo "$as_me:25238: checking c++ library-dependency suffix" >&5
25239echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
25240if test "$with_libtool" != "no"; then
25241	# libtool thinks it can make c++ shared libraries (perhaps only g++)
25242	CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25243elif test "$with_shared_cxx" != "no"; then
25244	# also for g++ users...
25245	CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25246else
25247	# we normally make a static library because C/C++ library rules differ
25248
25249	case Xnormal in
25250	(Xlibtool)
25251		CXX_LIB_SUFFIX='.la'
25252		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25253		;;
25254	(Xdebug)
25255		CXX_LIB_SUFFIX='_g.a'
25256		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25257		;;
25258	(Xprofile)
25259		CXX_LIB_SUFFIX='_p.a'
25260		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25261		;;
25262	(Xshared)
25263		case $cf_cv_system_name in
25264		(aix[5-7]*)
25265			CXX_LIB_SUFFIX='.so'
25266			CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25267			;;
25268		(cygwin*|msys*|mingw*)
25269			CXX_LIB_SUFFIX='.dll'
25270			CXX_DEP_SUFFIX='.dll.a'
25271			;;
25272		(darwin*)
25273			CXX_LIB_SUFFIX='.dylib'
25274			CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25275			;;
25276		(hpux*)
25277			case $target in
25278			(ia64*)
25279				CXX_LIB_SUFFIX='.so'
25280				CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25281				;;
25282			(*)
25283				CXX_LIB_SUFFIX='.sl'
25284				CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25285				;;
25286			esac
25287			;;
25288		(*)
25289			CXX_LIB_SUFFIX='.so'
25290			CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25291			;;
25292		esac
25293		;;
25294	(*)
25295		CXX_LIB_SUFFIX='.a'
25296		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25297		;;
25298	esac
25299	if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25300	then
25301		CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
25302		CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
25303	fi
25304
25305fi
25306echo "$as_me:25306: result: $CXX_LIB_SUFFIX" >&5
25307echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
25308
25309fi
25310
25311# do not want -ldl in build except as needed for -lncurses dependency
25312if test "x$with_dlsym" = xyes ; then
25313if test $DFT_LWR_MODEL = shared || \
25314   test $DFT_LWR_MODEL = libtool ; then
25315
25316# remove dl library from $LIBS
25317LIBS=`echo "$LIBS" | sed -e 's/-ldl[ 	]//g' -e 's/-ldl$//'`
25318
25319fi
25320fi
25321### Set up low-level terminfo dependencies for makefiles.
25322
25323# TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
25324# do not need libdl
25325TICS_LIST=
25326if test "x$with_dlsym" = xyes ; then
25327
25328# remove dl library from $SHLIB_LIST
25329TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[ 	]//g' -e 's/-ldl$//'`
25330
25331fi
25332
25333USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
25334USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
25335USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
25336if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
25337then
25338	USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
25339fi
25340
25341if test "$with_ticlib" != no ; then
25342
25343	if test "x$with_ticlib" != xyes ; then
25344		TICS_NAME=$with_ticlib
25345		TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25346		TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25347		TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25348		TICS_LIB_SUFFIX="${with_ticlib}"
25349	else
25350		TICS_SUFFIX=${DFT_LIB_SUFFIX}
25351		TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
25352		TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
25353		TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
25354	fi
25355	TICS_LDFLAGS="-L${LIB_DIR}"
25356	TICS_LIBS="-l${TICS_ARG_SUFFIX}"
25357else
25358	TICS_SUFFIX=${DFT_LIB_SUFFIX}
25359	TICS_LDFLAGS="-L${LIB_DIR}"
25360	TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25361fi
25362
25363if test "$with_termlib" != no ; then
25364
25365	if test "x$with_termlib" != xyes ; then
25366		TINFO_NAME=$with_termlib
25367		TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25368		TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25369		TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25370		TINFO_LIB_SUFFIX="${with_termlib}"
25371	else
25372		TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25373		TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
25374		TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
25375		TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
25376	fi
25377
25378	TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25379	TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25380	if test "$DFT_LWR_MODEL" = "libtool"; then
25381		TEST_ARGS="${TEST_DEPS}"
25382		TEST_ARG2="${TEST_DEP2}"
25383		TINFO_LDFLAGS="-L${LIB_DIR}"
25384		TINFO_LIBS="$TEST_ARGS"
25385		TICS_LIST="$SHLIB_LIST $TEST_ARGS"
25386		SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
25387	else
25388		TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
25389		TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
25390		if test "x$with_term_driver" != xno ; then
25391			TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25392			TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
25393			TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25394		else
25395			TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25396			TINFO_LIBS="$TEST_ARGS"
25397		fi
25398		TINFO_LDFLAGS="-L${LIB_DIR}"
25399		SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25400	fi
25401else
25402	# the next lines are needed for linking libtic over libncurses
25403	TINFO_NAME=${LIB_NAME}
25404	TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25405	TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
25406	if test "x$with_tic_depends" = xyes ; then
25407		TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25408	else
25409		TICS_LIST="$SHLIB_LIST"
25410	fi
25411
25412	TINFO_LDFLAGS="-L${LIB_DIR}"
25413	TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25414fi
25415
25416if test "$DFT_LWR_MODEL" = shared ; then
25417	case $cf_cv_system_name in
25418	(cygwin*|msys*)
25419		# "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
25420		TINFO_SUFFIX=.dll
25421		;;
25422	esac
25423fi
25424
25425if test "x$with_dlsym" = xyes ; then
25426
25427# remove dl library from $TICS_LIST
25428TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[ 	]//g' -e 's/-ldl$//'`
25429
25430fi
25431
25432if test "$DFT_LWR_MODEL" = "libtool"; then
25433	OBJEXT=lo
25434fi
25435
25436# needed for Ada95
25437TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
25438
25439case $DFT_LWR_MODEL in
25440(normal|debug|profile)
25441
25442if test "$GCC" = yes ; then
25443	case $cf_cv_system_name in
25444	(OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
25445		LDFLAGS_STATIC=
25446		LDFLAGS_SHARED=
25447		;;
25448	(*) 	# normally, except when broken
25449		LDFLAGS_STATIC=-static
25450		LDFLAGS_SHARED=-dynamic
25451		;;
25452	esac
25453else
25454	case $cf_cv_system_name in
25455	(aix[4-7]*) 	# from ld manpage
25456		LDFLAGS_STATIC=-bstatic
25457		LDFLAGS_SHARED=-bdynamic
25458		;;
25459	(hpux*)		# from ld manpage for hpux10.20, hpux11.11
25460		# We could also use just "archive" and "shared".
25461		LDFLAGS_STATIC=-Wl,-a,archive_shared
25462		LDFLAGS_SHARED=-Wl,-a,shared_archive
25463		;;
25464	(irix*)		# from ld manpage IRIX64
25465		LDFLAGS_STATIC=-Bstatic
25466		LDFLAGS_SHARED=-Bdynamic
25467		;;
25468	(osf[45]*)	# from ld manpage osf4.0d, osf5.1
25469		# alternative "-oldstyle_liblookup" (not in cc manpage)
25470		LDFLAGS_STATIC=-noso
25471		LDFLAGS_SHARED=-so_archive
25472		;;
25473	(solaris2*)
25474		LDFLAGS_STATIC=-Bstatic
25475		LDFLAGS_SHARED=-Bdynamic
25476		;;
25477	esac
25478fi
25479
25480if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
25481then
25482	echo "$as_me:25482: checking if linker supports switching between static/dynamic" >&5
25483echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
25484
25485	rm -f libconftest.a
25486	cat >conftest.$ac_ext <<EOF
25487#line 25487 "configure"
25488#include <stdio.h>
25489int cf_ldflags_static(FILE *fp) { return fflush(fp); }
25490EOF
25491	if { (eval echo "$as_me:25491: \"$ac_compile\"") >&5
25492  (eval $ac_compile) 2>&5
25493  ac_status=$?
25494  echo "$as_me:25494: \$? = $ac_status" >&5
25495  (exit $ac_status); } ; then
25496		( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
25497		( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
25498	fi
25499	rm -f conftest.*
25500
25501	cf_save_LIBS="$LIBS"
25502
25503	LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
25504	cat >conftest.$ac_ext <<_ACEOF
25505#line 25505 "configure"
25506#include "confdefs.h"
25507
25508#line 25508 "configure"
25509#include <stdio.h>
25510int cf_ldflags_static(FILE *fp);
25511
25512int
25513main (void)
25514{
25515
25516	return cf_ldflags_static(stdin);
25517
25518  ;
25519  return 0;
25520}
25521_ACEOF
25522rm -f conftest.$ac_objext conftest$ac_exeext
25523if { (eval echo "$as_me:25523: \"$ac_link\"") >&5
25524  (eval $ac_link) 2>&5
25525  ac_status=$?
25526  echo "$as_me:25526: \$? = $ac_status" >&5
25527  (exit $ac_status); } &&
25528         { ac_try='test -s conftest$ac_exeext'
25529  { (eval echo "$as_me:25529: \"$ac_try\"") >&5
25530  (eval $ac_try) 2>&5
25531  ac_status=$?
25532  echo "$as_me:25532: \$? = $ac_status" >&5
25533  (exit $ac_status); }; }; then
25534
25535	# some linkers simply ignore the -dynamic
25536	case x`file conftest$ac_exeext 2>/dev/null` in
25537	(*static*)
25538		cf_ldflags_static=no
25539		;;
25540	(*)
25541		cf_ldflags_static=yes
25542		;;
25543	esac
25544
25545else
25546  echo "$as_me: failed program was:" >&5
25547cat conftest.$ac_ext >&5
25548cf_ldflags_static=no
25549fi
25550rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25551
25552	rm -f libconftest.*
25553	LIBS="$cf_save_LIBS"
25554
25555	echo "$as_me:25555: result: $cf_ldflags_static" >&5
25556echo "${ECHO_T}$cf_ldflags_static" >&6
25557
25558	if test $cf_ldflags_static != yes
25559	then
25560		LDFLAGS_STATIC=
25561		LDFLAGS_SHARED=
25562	fi
25563else
25564	LDFLAGS_STATIC=
25565	LDFLAGS_SHARED=
25566fi
25567
25568	;;
25569esac
25570
25571echo "$as_me:25571: checking where we will install curses.h" >&5
25572echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
25573
25574includesubdir=
25575if test "$with_overwrite" = no && \
25576 ( test "x$includedir" = 'x${prefix}/include' || \
25577   test "x$includedir" = "x${prefix}/include" )
25578then
25579	includesubdir="/ncurses${USE_LIB_SUFFIX}"
25580fi
25581echo "$as_me:25581: result: ${includedir}${includesubdir}" >&5
25582echo "${ECHO_T}${includedir}${includesubdir}" >&6
25583
25584### Resolve a conflict between normal and wide-curses by forcing applications
25585### that will need libutf8 to add it to their configure script.
25586if test "$with_overwrite" != no ; then
25587if test "$NCURSES_LIBUTF8" = 1 ; then
25588	NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
25589	{ echo "$as_me:25589: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
25590echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
25591fi
25592fi
25593WITH_OVERWRITE=$with_overwrite
25594
25595# used to separate tack out of the tree
25596NCURSES_TREE=
25597
25598### predefined stuff for the test programs
25599
25600cat >>confdefs.h <<\EOF
25601#define HAVE_SLK_COLOR 1
25602EOF
25603
25604### Construct the list of subdirectories for which we'll customize makefiles
25605### with the appropriate compile-rules.
25606
25607echo "$as_me:25607: checking for src modules" >&5
25608echo $ECHO_N "checking for src modules... $ECHO_C" >&6
25609
25610# dependencies and linker-arguments for test-programs
25611TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
25612TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
25613if test "$DFT_LWR_MODEL" = "libtool"; then
25614	TEST_ARGS="${TEST_DEPS}"
25615	TEST_ARG2="${TEST_DEP2}"
25616else
25617	TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25618	TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
25619fi
25620
25621PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
25622cf_cv_src_modules=
25623for cf_dir in $modules_to_build
25624do
25625	if test -f $srcdir/$cf_dir/modules; then
25626
25627		# We may/may not have tack in the distribution, though the
25628		# makefile is.
25629		if test $cf_dir = tack ; then
25630			if test "x$cf_with_tack" != "xyes"; then
25631				continue
25632			fi
25633		fi
25634
25635		if test -z "$cf_cv_src_modules"; then
25636			cf_cv_src_modules=$cf_dir
25637		else
25638			cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
25639		fi
25640
25641		# Make the ncurses_cfg.h file record the library interface files as
25642		# well.  These are header files that are the same name as their
25643		# directory.  Ncurses is the only library that does not follow
25644		# that pattern.
25645		if test $cf_dir = tack ; then
25646			continue
25647		elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
25648
25649cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25650
25651			cat >>confdefs.h <<EOF
25652#define HAVE_${cf_have_include}_H 1
25653EOF
25654
25655			cat >>confdefs.h <<EOF
25656#define HAVE_LIB${cf_have_include} 1
25657EOF
25658
25659			TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
25660			TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
25661			if test "$DFT_LWR_MODEL" = "libtool"; then
25662				TEST_ARGS="${TEST_DEPS}"
25663				TEST_ARG2="${TEST_DEP2}"
25664			else
25665				TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
25666				TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
25667			fi
25668			PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
25669		fi
25670	fi
25671done
25672echo "$as_me:25672: result: $cf_cv_src_modules" >&5
25673echo "${ECHO_T}$cf_cv_src_modules" >&6
25674
25675TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
25676TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
25677
25678SRC_SUBDIRS=
25679if test "x$cf_with_manpages" != xno ; then
25680	SRC_SUBDIRS="$SRC_SUBDIRS man"
25681fi
25682SRC_SUBDIRS="$SRC_SUBDIRS include"
25683for cf_dir in $cf_cv_src_modules
25684do
25685	SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
25686done
25687if test "x$cf_with_tests" != "xno" ; then
25688	SRC_SUBDIRS="$SRC_SUBDIRS test"
25689fi
25690# always make this, to install the ncurses-config script
25691SRC_SUBDIRS="$SRC_SUBDIRS misc"
25692if test "$cf_with_cxx_binding" != no; then
25693	PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
25694	SRC_SUBDIRS="$SRC_SUBDIRS c++"
25695fi
25696
25697test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
25698test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
25699
25700ADA_SUBDIRS=
25701if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
25702	SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
25703	ADA_SUBDIRS="gen src"
25704	if test "x$cf_with_tests" != "xno" ; then
25705		ADA_SUBDIRS="$ADA_SUBDIRS samples"
25706	fi
25707fi
25708
25709SUB_MAKEFILES=
25710for cf_dir in $SRC_SUBDIRS
25711do
25712	SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
25713done
25714
25715if test -n "$ADA_SUBDIRS"; then
25716	for cf_dir in $ADA_SUBDIRS
25717	do
25718		SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
25719	done
25720
25721fi
25722
25723if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25724   SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
25725   SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
25726   SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
25727fi
25728
25729DIRS_TO_MAKE="lib"
25730for cf_item in $cf_list_models
25731do
25732
25733	case $cf_item in
25734	(libtool) cf_subdir='obj_lo'  ;;
25735	(normal)  cf_subdir='objects' ;;
25736	(debug)   cf_subdir='obj_g' ;;
25737	(profile) cf_subdir='obj_p' ;;
25738	(shared)
25739		case $cf_cv_system_name in
25740		(cygwin|msys)
25741			cf_subdir='objects' ;;
25742		(*)
25743			cf_subdir='obj_s' ;;
25744		esac
25745	esac
25746
25747	for cf_item2 in $DIRS_TO_MAKE
25748	do
25749		test $cf_item2 = $cf_subdir && break
25750	done
25751	test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
25752done
25753for cf_dir in $DIRS_TO_MAKE
25754do
25755	test ! -d $cf_dir && mkdir $cf_dir
25756done
25757
25758# symbols that differ when compiling Ada95 by itself.
25759NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
25760
25761# values to use as strings
25762
25763cat >>confdefs.h <<EOF
25764#define NCURSES_PATHSEP '$PATH_SEPARATOR'
25765EOF
25766
25767cat >>confdefs.h <<EOF
25768#define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
25769EOF
25770
25771### Now that we're done running tests, add the compiler-warnings, if any
25772
25773cf_fix_cppflags=no
25774cf_new_cflags=
25775cf_new_cppflags=
25776cf_new_extra_cppflags=
25777
25778for cf_add_cflags in $EXTRA_CFLAGS
25779do
25780case $cf_fix_cppflags in
25781(no)
25782	case $cf_add_cflags in
25783	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
25784		case $cf_add_cflags in
25785		(-D*)
25786			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
25787
25788			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25789				&& test -z "${cf_tst_cflags}" \
25790				&& cf_fix_cppflags=yes
25791
25792			if test $cf_fix_cppflags = yes ; then
25793
25794	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25795	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25796
25797				continue
25798			elif test "${cf_tst_cflags}" = "\"'" ; then
25799
25800	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25801	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25802
25803				continue
25804			fi
25805			;;
25806		esac
25807		case "$CPPFLAGS" in
25808		(*$cf_add_cflags)
25809			;;
25810		(*)
25811			case $cf_add_cflags in
25812			(-D*)
25813				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
25814
25815CPPFLAGS=`echo "$CPPFLAGS" | \
25816	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
25817		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
25818
25819				;;
25820			esac
25821
25822	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
25823	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
25824
25825			;;
25826		esac
25827		;;
25828	(*)
25829
25830	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
25831	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
25832
25833		;;
25834	esac
25835	;;
25836(yes)
25837
25838	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25839	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25840
25841	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
25842
25843	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25844		&& test -z "${cf_tst_cflags}" \
25845		&& cf_fix_cppflags=no
25846	;;
25847esac
25848done
25849
25850if test -n "$cf_new_cflags" ; then
25851
25852	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
25853	CFLAGS="${CFLAGS}$cf_new_cflags"
25854
25855fi
25856
25857if test -n "$cf_new_cppflags" ; then
25858
25859	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
25860	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
25861
25862fi
25863
25864if test -n "$cf_new_extra_cppflags" ; then
25865
25866	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
25867	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
25868
25869fi
25870
25871### Define substitutions for header files to avoid name-pollution
25872
25873if test "x$cf_cv_have_tcgetattr" = xyes ; then
25874	HAVE_TCGETATTR=1
25875else
25876	HAVE_TCGETATTR=0
25877fi
25878
25879if test "x$ac_cv_header_stdint_h" = xyes ; then
25880	HAVE_STDINT_H=1
25881else
25882	HAVE_STDINT_H=0
25883fi
25884
25885if test "x$ac_cv_header_termio_h" = xyes ; then
25886	HAVE_TERMIO_H=1
25887else
25888	HAVE_TERMIO_H=0
25889fi
25890
25891if test "x$ac_cv_header_termios_h" = xyes ; then
25892	HAVE_TERMIOS_H=1
25893else
25894	HAVE_TERMIOS_H=0
25895fi
25896
25897################################################################################
25898test "x$use_database" = xyes && \
25899SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
25900
25901SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
25902SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
25903
25904if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
25905SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
25906fi
25907
25908if test "x$cf_with_tests" != xno ; then
25909	MAKE_TESTS=
25910else
25911	MAKE_TESTS="#"
25912fi
25913
25914ADAHTML_DIR=../../doc/html/ada
25915
25916# these could be configurable, but are not currently
25917PANEL_NAME=panel
25918MENU_NAME=menu
25919FORM_NAME=form
25920CXX_NAME=ncurses++
25921
25922# workaround for OS/2 (20151017)
25923case $cf_cv_system_name in
25924(os2*)
25925	LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
25926	;;
25927(*)
25928	LIBTOOL_OPTS_CXX=
25929	;;
25930esac
25931
25932# workaround for g++ versus Solaris (20131116)
25933case $cf_cv_system_name in
25934(solaris2*)
25935	case "x$CPPFLAGS" in
25936	(*-D_XOPEN_SOURCE_EXTENDED*)
25937		test -n "$verbose" && echo "	moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
25938
25939echo "${as_me:-configure}:25939: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
25940
25941		CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
25942		CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
25943		;;
25944	esac
25945	;;
25946esac
25947
25948# Help to automatically enable the extended curses features when using either
25949# the *-config or the ".pc" files by adding defines.
25950echo "$as_me:25950: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
25951echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
25952PKG_CFLAGS=
25953for cf_loop1 in $CPPFLAGS_after_XOPEN
25954do
25955	cf_found=no
25956	for cf_loop2 in $CPPFLAGS_before_XOPEN
25957	do
25958		if test "x$cf_loop1" = "x$cf_loop2"
25959		then
25960			cf_found=yes
25961			break
25962		fi
25963	done
25964	test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
25965done
25966echo "$as_me:25966: result: $PKG_CFLAGS" >&5
25967echo "${ECHO_T}$PKG_CFLAGS" >&6
25968
25969# AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
25970case "x$NCURSES_OSPEED" in
25971(*short*)
25972	cf_compatible=1
25973	;;
25974(*)
25975	cf_compatible=0
25976	;;
25977esac
25978
25979cat >>confdefs.h <<EOF
25980#define NCURSES_OSPEED_COMPAT $cf_compatible
25981EOF
25982
25983case "x$cf_cv_typeof_chtype" in
25984(xshort|xint|xlong)
25985	cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
25986	;;
25987esac
25988
25989case "x$cf_cv_typeof_mmask_t" in
25990(xshort|xint|xlong)
25991	cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
25992	;;
25993esac
25994
25995# substitute into misc/Makefile to suppress
25996# (un)install.data from the
25997# (un)install rules.
25998if test "x$cf_with_db_install" = "xno"; then
25999	MISC_INSTALL_DATA=
26000	MISC_UNINSTALL_DATA=
26001else
26002	MISC_INSTALL_DATA=install.data
26003	MISC_UNINSTALL_DATA=uninstall.data
26004fi
26005
26006if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
26007	MAKE_DATABASE="#"
26008else
26009	MAKE_DATABASE="$MAKE_TERMINFO"
26010fi
26011
26012if test -n "$PACKAGE"
26013then
26014	PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
26015	export PACKAGE
26016	echo "package: $PACKAGE"
26017fi
26018
26019UNALTERED_SYMS=
26020cf_filter_syms=no
26021
26022if test -n "$RESULTING_SYMS"
26023then
26024	cf_filter_syms=$cf_dft_filter_syms
26025	test -n "$verbose" && echo "	will map symbols to ABI=$cf_cv_abi_version" 1>&6
26026
26027echo "${as_me:-configure}:26027: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
26028
26029fi
26030
26031if test "x$WILDCARD_SYMS" = xno
26032then
26033	cf_filter_syms=yes
26034fi
26035
26036test "x$cf_with_trace" = xyes && NCURSES_INLINE=
26037
26038UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
26039if test $cf_filter_syms = yes
26040then
26041	RESULTING_SYMS=resulting.map
26042fi
26043
26044if test "x$cross_compiling" = xyes ; then
26045	ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
26046	CHECK_BUILD="#"
26047else
26048	ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
26049	CHECK_BUILD=
26050fi
26051
26052# This is used for the *-config script and *.pc data files.
26053
26054echo "$as_me:26054: checking for linker search path" >&5
26055echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26056if test "${cf_cv_ld_searchpath+set}" = set; then
26057  echo $ECHO_N "(cached) $ECHO_C" >&6
26058else
26059
26060if test "$cross_compiling" != yes ; then
26061
26062# GNU binutils' ld does not involve permissions which may stop ldconfig.
26063cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26064
26065# The -NX options tell newer versions of Linux ldconfig to not attempt to
26066# update the cache, which makes it run faster.
26067test -z "$cf_pathlist" && \
26068	cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[ 	]/d' -e 's/:$//' | sort -u`
26069
26070test -z "$cf_pathlist" &&
26071	cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[ 	]/d' -e 's/:$//p' | sort -u`
26072
26073# This works with OpenBSD 6.5, which lists only filenames
26074test -z "$cf_pathlist" &&
26075	cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26076
26077if test -z "$cf_pathlist"
26078then
26079	# dyld default path with MacOS
26080	if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26081	then
26082		# do this to bypass check
26083		cf_cv_ld_searchpath='$HOME/lib'
26084		cf_pathlist="/usr/local/lib /lib /usr/lib"
26085	fi
26086fi
26087
26088if test -z "$cf_pathlist"
26089then
26090	# Solaris is hardcoded
26091	if test -d /opt/SUNWspro/lib
26092	then
26093		cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
26094	elif test -d /usr/ccs/lib
26095	then
26096		cf_pathlist="/usr/ccs/lib /usr/lib"
26097	fi
26098fi
26099
26100fi
26101
26102# If nothing else, assume it is conventional
26103test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26104
26105# Finally, check that this is only directories
26106for cf_path in $0 $cf_pathlist
26107do
26108	if test -d "$cf_path"; then
26109		test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26110		cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26111	fi
26112done
26113
26114# Ensure that it is nonempty
26115test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26116
26117fi
26118echo "$as_me:26118: result: $cf_cv_ld_searchpath" >&5
26119echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26120
26121LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26122
26123cat >>confdefs.h <<\EOF
26124#define HAVE_CURSES_DATA_BOOLNAMES 1
26125EOF
26126
26127ac_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_MAKEFILES Makefile"
26128ac_config_commands="$ac_config_commands default"
26129cat >confcache <<\_ACEOF
26130# This file is a shell script that caches the results of configure
26131# tests run on this system so they can be shared between configure
26132# scripts and configure runs, see configure's option --config-cache.
26133# It is not useful on other systems.  If it contains results you don't
26134# want to keep, you may remove or edit it.
26135#
26136# config.status only pays attention to the cache file if you give it
26137# the --recheck option to rerun configure.
26138#
26139# `ac_cv_env_foo' variables (set or unset) will be overriden when
26140# loading this file, other *unset* `ac_cv_foo' will be assigned the
26141# following values.
26142
26143_ACEOF
26144
26145# The following way of writing the cache mishandles newlines in values,
26146# but we know of no workaround that is simple, portable, and efficient.
26147# So, don't put newlines in cache variables' values.
26148# Ultrix sh set writes to stderr and can't be redirected directly,
26149# and sets the high bit in the cache file unless we assign to the vars.
26150{
26151  (set) 2>&1 |
26152    case `(ac_space=' '; set | grep ac_space) 2>&1` in
26153    *ac_space=\ *)
26154      # `set' does not quote correctly, so add quotes (double-quote
26155      # substitution turns \\\\ into \\, and sed turns \\ into \).
26156      sed -n \
26157        "s/'/'\\\\''/g;
26158    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26159      ;;
26160    *)
26161      # `set' quotes correctly as required by POSIX, so do not add quotes.
26162      sed -n \
26163        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26164      ;;
26165    esac;
26166} |
26167  sed '
26168     t clear
26169     : clear
26170     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26171     t end
26172     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26173     : end' >>confcache
26174if cmp -s $cache_file confcache; then :; else
26175  if test -w $cache_file; then
26176    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26177    cat confcache >$cache_file
26178  else
26179    echo "not updating unwritable cache $cache_file"
26180  fi
26181fi
26182rm -f confcache
26183
26184test "x$prefix" = xNONE && prefix=$ac_default_prefix
26185# Let make expand exec_prefix.
26186test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26187
26188# VPATH may cause trouble with some makes, so we remove $(srcdir),
26189# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26190# trailing colons and then remove the whole line if VPATH becomes empty
26191# (actually we leave an empty line to preserve line numbers).
26192if test "x$srcdir" = x.; then
26193  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
26194s/:*\$(srcdir):*/:/;
26195s/:*\${srcdir}:*/:/;
26196s/:*@srcdir@:*/:/;
26197s/^\([^=]*=[ 	]*\):*/\1/;
26198s/:*$//;
26199s/^[^=]*=[ 	]*$//;
26200}'
26201fi
26202
26203DEFS=-DHAVE_CONFIG_H
26204
26205: ${CONFIG_STATUS=./config.status}
26206ac_clean_files_save=$ac_clean_files
26207ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26208{ echo "$as_me:26208: creating $CONFIG_STATUS" >&5
26209echo "$as_me: creating $CONFIG_STATUS" >&6;}
26210cat >$CONFIG_STATUS <<_ACEOF
26211#! $SHELL
26212# Generated automatically by configure.
26213# Run this file to recreate the current configuration.
26214# Compiler output produced by configure, useful for debugging
26215# configure, is in config.log if it exists.
26216
26217debug=false
26218SHELL=\${CONFIG_SHELL-$SHELL}
26219ac_cs_invocation="\$0 \$@"
26220
26221_ACEOF
26222
26223cat >>$CONFIG_STATUS <<\_ACEOF
26224# Be Bourne compatible
26225if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26226  emulate sh
26227  NULLCMD=:
26228elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26229  set -o posix
26230fi
26231
26232# Name of the executable.
26233as_me=`echo "$0" |sed 's,.*[\\/],,'`
26234
26235if expr a : '\(a\)' >/dev/null 2>&1; then
26236  as_expr=expr
26237else
26238  as_expr=false
26239fi
26240
26241rm -f conf$$ conf$$.exe conf$$.file
26242echo >conf$$.file
26243if ln -s conf$$.file conf$$ 2>/dev/null; then
26244  # We could just check for DJGPP; but this test a) works b) is more generic
26245  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26246  if test -f conf$$.exe; then
26247    # Don't use ln at all; we don't have any links
26248    as_ln_s='cp -p'
26249  else
26250    as_ln_s='ln -s'
26251  fi
26252elif ln conf$$.file conf$$ 2>/dev/null; then
26253  as_ln_s=ln
26254else
26255  as_ln_s='cp -p'
26256fi
26257rm -f conf$$ conf$$.exe conf$$.file
26258
26259as_executable_p="test -f"
26260
26261# Support unset when possible.
26262if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26263  as_unset=unset
26264else
26265  as_unset=false
26266fi
26267
26268# NLS nuisances.
26269$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26270$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26271$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26272$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26273$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26274$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26275$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26276$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26277
26278# IFS
26279# We need space, tab and new line, in precisely that order.
26280as_nl='
26281'
26282IFS=" 	$as_nl"
26283
26284# CDPATH.
26285$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26286
26287exec 6>&1
26288
26289_ACEOF
26290
26291# Files that config.status was made for.
26292if test -n "$ac_config_files"; then
26293  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
26294fi
26295
26296if test -n "$ac_config_headers"; then
26297  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
26298fi
26299
26300if test -n "$ac_config_links"; then
26301  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
26302fi
26303
26304if test -n "$ac_config_commands"; then
26305  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
26306fi
26307
26308cat >>$CONFIG_STATUS <<\EOF
26309
26310ac_cs_usage="\
26311\`$as_me' instantiates files from templates according to the
26312current configuration.
26313
26314Usage: $0 [OPTIONS] [FILE]...
26315
26316  -h, --help       print this help, then exit
26317  -V, --version    print version number, then exit
26318  -d, --debug      don't remove temporary files
26319      --recheck    update $as_me by reconfiguring in the same conditions
26320  --file=FILE[:TEMPLATE]
26321                   instantiate the configuration file FILE
26322  --header=FILE[:TEMPLATE]
26323                   instantiate the configuration header FILE
26324
26325Configuration files:
26326$config_files
26327
26328Configuration headers:
26329$config_headers
26330
26331Configuration commands:
26332$config_commands
26333
26334Report bugs to <dickey@invisible-island.net>."
26335EOF
26336
26337cat >>$CONFIG_STATUS <<EOF
26338ac_cs_version="\\
26339config.status
26340configured by $0, generated by GNU Autoconf 2.52.20200111,
26341  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
26342
26343Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
26344Free Software Foundation, Inc.
26345This config.status script is free software; the Free Software Foundation
26346gives unlimited permission to copy, distribute and modify it."
26347srcdir=$srcdir
26348INSTALL="$INSTALL"
26349EOF
26350
26351cat >>$CONFIG_STATUS <<\EOF
26352# If no file are specified by the user, then we need to provide default
26353# value.  By we need to know if files were specified by the user.
26354ac_need_defaults=:
26355while test $# != 0
26356do
26357  case $1 in
26358  --*=*)
26359    ac_option=`expr "x$1" : 'x\([^=]*\)='`
26360    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
26361    shift
26362    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
26363    shift
26364    ;;
26365  -*);;
26366  *) # This is not an option, so the user has probably given explicit
26367     # arguments.
26368     ac_need_defaults=false;;
26369  esac
26370
26371  case $1 in
26372  # Handling of the options.
26373EOF
26374cat >>$CONFIG_STATUS <<EOF
26375  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26376    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
26377    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
26378EOF
26379cat >>$CONFIG_STATUS <<\EOF
26380  --version | --vers* | -V )
26381    echo "$ac_cs_version"; exit 0 ;;
26382  --he | --h)
26383    # Conflict between --help and --header
26384    { { echo "$as_me:26384: error: ambiguous option: $1
26385Try \`$0 --help' for more information." >&5
26386echo "$as_me: error: ambiguous option: $1
26387Try \`$0 --help' for more information." >&2;}
26388   { (exit 1); exit 1; }; };;
26389  --help | --hel | -h )
26390    echo "$ac_cs_usage"; exit 0 ;;
26391  --debug | --d* | -d )
26392    debug=: ;;
26393  --file | --fil | --fi | --f )
26394    shift
26395    CONFIG_FILES="$CONFIG_FILES $1"
26396    ac_need_defaults=false;;
26397  --header | --heade | --head | --hea )
26398    shift
26399    CONFIG_HEADERS="$CONFIG_HEADERS $1"
26400    ac_need_defaults=false;;
26401
26402  # This is an error.
26403  -*) { { echo "$as_me:26403: error: unrecognized option: $1
26404Try \`$0 --help' for more information." >&5
26405echo "$as_me: error: unrecognized option: $1
26406Try \`$0 --help' for more information." >&2;}
26407   { (exit 1); exit 1; }; } ;;
26408
26409  *) ac_config_targets="$ac_config_targets $1" ;;
26410
26411  esac
26412  shift
26413done
26414
26415exec 5>>config.log
26416cat >&5 << _ACEOF
26417
26418## ----------------------- ##
26419## Running config.status.  ##
26420## ----------------------- ##
26421
26422This file was extended by $as_me 2.52.20200111, executed with
26423  CONFIG_FILES    = $CONFIG_FILES
26424  CONFIG_HEADERS  = $CONFIG_HEADERS
26425  CONFIG_LINKS    = $CONFIG_LINKS
26426  CONFIG_COMMANDS = $CONFIG_COMMANDS
26427  > $ac_cs_invocation
26428on `(hostname || uname -n) 2>/dev/null | sed 1q`
26429
26430_ACEOF
26431EOF
26432
26433cat >>$CONFIG_STATUS <<EOF
26434#
26435# INIT-COMMANDS section.
26436#
26437
26438### Special initialization commands, used to pass information from the
26439### configuration-run into config.status
26440
26441AWK="$AWK"
26442ALTERNATE_SYMS="$ALTERNATE_SYMS"
26443DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
26444DFT_LWR_MODEL="$DFT_LWR_MODEL"
26445ECHO_LD="$ECHO_LD"
26446EXTRA_SUFFIX="$EXTRA_SUFFIX"
26447LDCONFIG="$LDCONFIG"
26448LIBTOOL_VERSION="$LIBTOOL_VERSION"
26449LIB_NAME="$LIB_NAME"
26450LIB_PREFIX="$LIB_PREFIX"
26451LIB_SUBSETS="$LIB_SUBSETS"
26452LIB_SUFFIX="$LIB_SUFFIX"
26453LIB_TRACING="$LIB_TRACING"
26454LN_S="$LN_S"
26455MAKE_TERMINFO="$MAKE_TERMINFO"
26456NCURSES_MAJOR="$NCURSES_MAJOR"
26457NCURSES_MINOR="$NCURSES_MINOR"
26458NCURSES_OSPEED="$NCURSES_OSPEED"
26459NCURSES_PATCH="$NCURSES_PATCH"
26460SRC_SUBDIRS="$SRC_SUBDIRS"
26461TERMINFO="$TERMINFO"
26462TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
26463TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
26464TICS_NAME="$TICS_NAME"
26465TICS_SUFFIX="$TICS_SUFFIX"
26466TIC_PATH="$TIC_PATH"
26467TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
26468TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
26469TINFO_NAME="$TINFO_NAME"
26470TINFO_SUFFIX="$TINFO_SUFFIX"
26471UNALTERED_SYMS="$UNALTERED_SYMS"
26472USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
26473USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
26474USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
26475USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
26476WILDCARD_SYMS="$WILDCARD_SYMS"
26477WITH_CURSES_H="$with_curses_h"
26478WITH_ECHO="${enable_echo:=yes}"
26479WITH_OVERWRITE="$with_overwrite"
26480cf_LIST_MODELS="$cf_list_models"
26481cf_cv_abi_version="$cf_cv_abi_version"
26482cf_cv_do_relink="$cf_cv_do_relink"
26483cf_cv_do_reranlib="$cf_cv_do_reranlib"
26484cf_cv_do_symlinks="$cf_cv_do_symlinks"
26485cf_cv_enable_lp64="$cf_cv_enable_lp64"
26486cf_cv_enable_opaque="$cf_cv_enable_opaque"
26487cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
26488cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
26489cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
26490cf_cv_rel_version="$cf_cv_rel_version"
26491cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
26492cf_cv_shared_soname='$cf_cv_shared_soname'
26493cf_cv_shlib_version="$cf_cv_shlib_version"
26494cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
26495cf_cv_system_name="$cf_cv_system_name"
26496cf_cv_term_driver="$with_term_driver"
26497cf_with_ada="$cf_with_ada"
26498cf_with_cxx_binding="$cf_with_cxx_binding"
26499cf_with_db_install="$cf_with_db_install"
26500cf_with_manpages="$cf_with_manpages"
26501cf_with_tests="$cf_with_tests"
26502host="$host"
26503target="$target"
26504with_shared_cxx="$with_shared_cxx"
26505
26506EOF
26507
26508cat >>$CONFIG_STATUS <<\EOF
26509for ac_config_target in $ac_config_targets
26510do
26511  case "$ac_config_target" in
26512  # Handling of arguments.
26513  "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
26514  "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
26515  "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
26516  "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
26517  "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
26518  "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
26519  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26520  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26521  "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
26522  *) { { echo "$as_me:26522: error: invalid argument: $ac_config_target" >&5
26523echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26524   { (exit 1); exit 1; }; };;
26525  esac
26526done
26527
26528# If the user did not use the arguments to specify the items to instantiate,
26529# then the envvar interface is used.  Set only those that are not.
26530# We use the long form for the default assignment because of an extremely
26531# bizarre bug on SunOS 4.1.3.
26532if $ac_need_defaults; then
26533  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26534  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26535  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26536fi
26537
26538# Create a temporary directory, and hook for its removal unless debugging.
26539$debug ||
26540{
26541  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
26542  trap '{ (exit 1); exit 1; }' 1 2 13 15
26543}
26544
26545# Create a (secure) tmp directory for tmp files.
26546: ${TMPDIR=/tmp}
26547{
26548  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
26549  test -n "$tmp" && test -d "$tmp"
26550}  ||
26551{
26552  tmp=$TMPDIR/cs$$-$RANDOM
26553  (umask 077 && mkdir $tmp)
26554} ||
26555{
26556   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
26557   { (exit 1); exit 1; }
26558}
26559
26560EOF
26561
26562cat >>$CONFIG_STATUS <<EOF
26563
26564#
26565# CONFIG_FILES section.
26566#
26567
26568# No need to generate the scripts if there are no CONFIG_FILES.
26569# This happens for instance when ./config.status config.h
26570if test -n "\$CONFIG_FILES"; then
26571  # Protect against being on the right side of a sed subst in config.status.
26572  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
26573   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
26574s,@SHELL@,$SHELL,;t t
26575s,@exec_prefix@,$exec_prefix,;t t
26576s,@prefix@,$prefix,;t t
26577s,@program_transform_name@,$program_transform_name,;t t
26578s,@bindir@,$bindir,;t t
26579s,@sbindir@,$sbindir,;t t
26580s,@libexecdir@,$libexecdir,;t t
26581s,@datarootdir@,$datarootdir,;t t
26582s,@datadir@,$datadir,;t t
26583s,@sysconfdir@,$sysconfdir,;t t
26584s,@sharedstatedir@,$sharedstatedir,;t t
26585s,@localstatedir@,$localstatedir,;t t
26586s,@runstatedir@,$runstatedir,;t t
26587s,@libdir@,$libdir,;t t
26588s,@includedir@,$includedir,;t t
26589s,@oldincludedir@,$oldincludedir,;t t
26590s,@infodir@,$infodir,;t t
26591s,@mandir@,$mandir,;t t
26592s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
26593s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
26594s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
26595s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
26596s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
26597s,@build_alias@,$build_alias,;t t
26598s,@host_alias@,$host_alias,;t t
26599s,@target_alias@,$target_alias,;t t
26600s,@ECHO_C@,$ECHO_C,;t t
26601s,@ECHO_N@,$ECHO_N,;t t
26602s,@ECHO_T@,$ECHO_T,;t t
26603s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
26604s,@DEFS@,$DEFS,;t t
26605s,@LIBS@,$LIBS,;t t
26606s,@top_builddir@,$top_builddir,;t t
26607s,@EGREP@,$EGREP,;t t
26608s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
26609s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
26610s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
26611s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
26612s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
26613s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
26614s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
26615s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
26616s,@VERSION@,$VERSION,;t t
26617s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
26618s,@VERSION_MINOR@,$VERSION_MINOR,;t t
26619s,@VERSION_PATCH@,$VERSION_PATCH,;t t
26620s,@PACKAGE@,$PACKAGE,;t t
26621s,@build@,$build,;t t
26622s,@build_cpu@,$build_cpu,;t t
26623s,@build_vendor@,$build_vendor,;t t
26624s,@build_os@,$build_os,;t t
26625s,@host@,$host,;t t
26626s,@host_cpu@,$host_cpu,;t t
26627s,@host_vendor@,$host_vendor,;t t
26628s,@host_os@,$host_os,;t t
26629s,@target@,$target,;t t
26630s,@target_cpu@,$target_cpu,;t t
26631s,@target_vendor@,$target_vendor,;t t
26632s,@target_os@,$target_os,;t t
26633s,@CC@,$CC,;t t
26634s,@CFLAGS@,$CFLAGS,;t t
26635s,@LDFLAGS@,$LDFLAGS,;t t
26636s,@CPPFLAGS@,$CPPFLAGS,;t t
26637s,@ac_ct_CC@,$ac_ct_CC,;t t
26638s,@EXEEXT@,$EXEEXT,;t t
26639s,@OBJEXT@,$OBJEXT,;t t
26640s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
26641s,@CPP@,$CPP,;t t
26642s,@LDCONFIG@,$LDCONFIG,;t t
26643s,@CXX@,$CXX,;t t
26644s,@CXXFLAGS@,$CXXFLAGS,;t t
26645s,@ac_ct_CXX@,$ac_ct_CXX,;t t
26646s,@AWK@,$AWK,;t t
26647s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
26648s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
26649s,@INSTALL_DATA@,$INSTALL_DATA,;t t
26650s,@LINT@,$LINT,;t t
26651s,@LINT_OPTS@,$LINT_OPTS,;t t
26652s,@LN_S@,$LN_S,;t t
26653s,@cf_config_suffix@,$cf_config_suffix,;t t
26654s,@PKG_CONFIG@,$PKG_CONFIG,;t t
26655s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
26656s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
26657s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
26658s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
26659s,@SET_MAKE@,$SET_MAKE,;t t
26660s,@CTAGS@,$CTAGS,;t t
26661s,@ETAGS@,$ETAGS,;t t
26662s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
26663s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
26664s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
26665s,@RANLIB@,$RANLIB,;t t
26666s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
26667s,@LD@,$LD,;t t
26668s,@ac_ct_LD@,$ac_ct_LD,;t t
26669s,@AR@,$AR,;t t
26670s,@ac_ct_AR@,$ac_ct_AR,;t t
26671s,@NM@,$NM,;t t
26672s,@ac_ct_NM@,$ac_ct_NM,;t t
26673s,@ARFLAGS@,$ARFLAGS,;t t
26674s,@DESTDIR@,$DESTDIR,;t t
26675s,@BUILD_CC@,$BUILD_CC,;t t
26676s,@BUILD_CPP@,$BUILD_CPP,;t t
26677s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
26678s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
26679s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
26680s,@BUILD_LIBS@,$BUILD_LIBS,;t t
26681s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
26682s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
26683s,@cf_list_models@,$cf_list_models,;t t
26684s,@ABI_VERSION@,$ABI_VERSION,;t t
26685s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
26686s,@LIBTOOL@,$LIBTOOL,;t t
26687s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
26688s,@LT_UNDEF@,$LT_UNDEF,;t t
26689s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
26690s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
26691s,@LIB_CREATE@,$LIB_CREATE,;t t
26692s,@LIB_OBJECT@,$LIB_OBJECT,;t t
26693s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
26694s,@LIB_PREP@,$LIB_PREP,;t t
26695s,@LIB_CLEAN@,$LIB_CLEAN,;t t
26696s,@LIB_COMPILE@,$LIB_COMPILE,;t t
26697s,@LIB_LINK@,$LIB_LINK,;t t
26698s,@LIB_INSTALL@,$LIB_INSTALL,;t t
26699s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
26700s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
26701s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
26702s,@TICS_NAME@,$TICS_NAME,;t t
26703s,@TINFO_NAME@,$TINFO_NAME,;t t
26704s,@LIB_NAME@,$LIB_NAME,;t t
26705s,@LIB_PREFIX@,$LIB_PREFIX,;t t
26706s,@CC_G_OPT@,$CC_G_OPT,;t t
26707s,@CXX_G_OPT@,$CXX_G_OPT,;t t
26708s,@LD_MODEL@,$LD_MODEL,;t t
26709s,@shlibdir@,$shlibdir,;t t
26710s,@MAKE_DLLS@,$MAKE_DLLS,;t t
26711s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
26712s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
26713s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
26714s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
26715s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
26716s,@LINK_PROGS@,$LINK_PROGS,;t t
26717s,@LINK_TESTS@,$LINK_TESTS,;t t
26718s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
26719s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
26720s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
26721s,@INSTALL_LIB@,$INSTALL_LIB,;t t
26722s,@RPATH_LIST@,$RPATH_LIST,;t t
26723s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
26724s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
26725s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
26726s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
26727s,@cf_ldd_prog@,$cf_ldd_prog,;t t
26728s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
26729s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
26730s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
26731s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
26732s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
26733s,@TIC@,$TIC,;t t
26734s,@INFOCMP@,$INFOCMP,;t t
26735s,@WHICH_XTERM@,$WHICH_XTERM,;t t
26736s,@XTERM_KBS@,$XTERM_KBS,;t t
26737s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
26738s,@TERMINFO@,$TERMINFO,;t t
26739s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
26740s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
26741s,@TERMPATH@,$TERMPATH,;t t
26742s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
26743s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
26744s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
26745s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
26746s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
26747s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
26748s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
26749s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
26750s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
26751s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
26752s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
26753s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
26754s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
26755s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
26756s,@RGB_PATH@,$RGB_PATH,;t t
26757s,@no_x11_rgb@,$no_x11_rgb,;t t
26758s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
26759s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
26760s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
26761s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
26762s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
26763s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
26764s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
26765s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
26766s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
26767s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
26768s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
26769s,@NCURSES_CONST@,$NCURSES_CONST,;t t
26770s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
26771s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
26772s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
26773s,@PTHREAD@,$PTHREAD,;t t
26774s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
26775s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
26776s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
26777s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
26778s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
26779s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
26780s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
26781s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
26782s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
26783s,@ECHO_LT@,$ECHO_LT,;t t
26784s,@ECHO_LD@,$ECHO_LD,;t t
26785s,@RULE_CC@,$RULE_CC,;t t
26786s,@SHOW_CC@,$SHOW_CC,;t t
26787s,@ECHO_CC@,$ECHO_CC,;t t
26788s,@ECHO_LINK@,$ECHO_LINK,;t t
26789s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
26790s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
26791s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
26792s,@ADAFLAGS@,$ADAFLAGS,;t t
26793s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
26794s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
26795s,@ADA_TRACE@,$ADA_TRACE,;t t
26796s,@MATH_LIB@,$MATH_LIB,;t t
26797s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
26798s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
26799s,@cf_cv_1UL@,$cf_cv_1UL,;t t
26800s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
26801s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
26802s,@TEST_LIBS@,$TEST_LIBS,;t t
26803s,@TEST_LIBS2@,$TEST_LIBS2,;t t
26804s,@CXXCPP@,$CXXCPP,;t t
26805s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
26806s,@CXX_AR@,$CXX_AR,;t t
26807s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
26808s,@CXXLIBS@,$CXXLIBS,;t t
26809s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
26810s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
26811s,@M4_exists@,$M4_exists,;t t
26812s,@cf_ada_make@,$cf_ada_make,;t t
26813s,@cf_ada_config@,$cf_ada_config,;t t
26814s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
26815s,@cf_ada_config_C@,$cf_ada_config_C,;t t
26816s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
26817s,@cf_compile_generics@,$cf_compile_generics,;t t
26818s,@cf_generic_objects@,$cf_generic_objects,;t t
26819s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
26820s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
26821s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
26822s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
26823s,@cf_ada_compiler@,$cf_ada_compiler,;t t
26824s,@cf_ada_package@,$cf_ada_package,;t t
26825s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
26826s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
26827s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
26828s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
26829s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
26830s,@ACPPFLAGS@,$ACPPFLAGS,;t t
26831s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
26832s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
26833s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
26834s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
26835s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
26836s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
26837s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
26838s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
26839s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
26840s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
26841s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
26842s,@TICS_LIBS@,$TICS_LIBS,;t t
26843s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
26844s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
26845s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
26846s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
26847s,@TINFO_LIBS@,$TINFO_LIBS,;t t
26848s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
26849s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
26850s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
26851s,@includesubdir@,$includesubdir,;t t
26852s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
26853s,@TICS_LIST@,$TICS_LIST,;t t
26854s,@TINFO_LIST@,$TINFO_LIST,;t t
26855s,@SHLIB_LIST@,$SHLIB_LIST,;t t
26856s,@NCURSES_TREE@,$NCURSES_TREE,;t t
26857s,@TEST_ARGS@,$TEST_ARGS,;t t
26858s,@TEST_DEPS@,$TEST_DEPS,;t t
26859s,@TEST_ARG2@,$TEST_ARG2,;t t
26860s,@TEST_DEP2@,$TEST_DEP2,;t t
26861s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
26862s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
26863s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
26864s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
26865s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
26866s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
26867s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
26868s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
26869s,@cross_compiling@,$cross_compiling,;t t
26870s,@MAKE_TESTS@,$MAKE_TESTS,;t t
26871s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
26872s,@PANEL_NAME@,$PANEL_NAME,;t t
26873s,@MENU_NAME@,$MENU_NAME,;t t
26874s,@FORM_NAME@,$FORM_NAME,;t t
26875s,@CXX_NAME@,$CXX_NAME,;t t
26876s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
26877s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
26878s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
26879s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
26880s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
26881s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
26882s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
26883s,@CHECK_BUILD@,$CHECK_BUILD,;t t
26884s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
26885s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
26886CEOF
26887
26888EOF
26889
26890  cat >>$CONFIG_STATUS <<\EOF
26891  # Split the substitutions into bite-sized pieces for seds with
26892  # small command number limits, like on Digital OSF/1 and HP-UX.
26893  ac_max_sed_lines=48
26894  ac_sed_frag=1 # Number of current file.
26895  ac_beg=1 # First line for current file.
26896  ac_end=$ac_max_sed_lines # Line after last line for current file.
26897  ac_more_lines=:
26898  ac_sed_cmds=
26899  while $ac_more_lines; do
26900    if test $ac_beg -gt 1; then
26901      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26902    else
26903      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26904    fi
26905    if test ! -s $tmp/subs.frag; then
26906      ac_more_lines=false
26907    else
26908      # The purpose of the label and of the branching condition is to
26909      # speed up the sed processing (if there are no `@' at all, there
26910      # is no need to browse any of the substitutions).
26911      # These are the two extra sed commands mentioned above.
26912      (echo ':t
26913  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
26914      # It is possible to make a multiline substitution using escaped newlines.
26915      # Ensure that we do not split the substitution between script fragments.
26916      ac_BEG=$ac_end
26917      ac_END=`expr $ac_end + $ac_max_sed_lines`
26918      sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
26919      if test -s $tmp/subs.next; then
26920        grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
26921        if test ! -s $tmp/subs.edit; then
26922          grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
26923          if test ! -s $tmp/subs.edit; then
26924            if test $ac_beg -gt 1; then
26925              ac_end=`expr $ac_end - 1`
26926              continue
26927            fi
26928          fi
26929        fi
26930      fi
26931
26932      if test -z "$ac_sed_cmds"; then
26933        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
26934      else
26935        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
26936      fi
26937      ac_sed_frag=`expr $ac_sed_frag + 1`
26938      ac_beg=$ac_end
26939      ac_end=`expr $ac_end + $ac_max_sed_lines`
26940    fi
26941  done
26942  if test -z "$ac_sed_cmds"; then
26943    ac_sed_cmds=cat
26944  fi
26945fi # test -n "$CONFIG_FILES"
26946
26947EOF
26948cat >>$CONFIG_STATUS <<\EOF
26949for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
26950  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
26951  case $ac_file in
26952  - | *:- | *:-:* ) # input from stdin
26953        cat >$tmp/stdin
26954        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26955        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26956  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26957        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26958  * )   ac_file_in=$ac_file.in ;;
26959  esac
26960
26961  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
26962  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26963         X"$ac_file" : 'X\(//\)[^/]' \| \
26964         X"$ac_file" : 'X\(//\)$' \| \
26965         X"$ac_file" : 'X\(/\)' \| \
26966         .     : '\(.\)' 2>/dev/null ||
26967echo X"$ac_file" |
26968    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26969  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26970  	  /^X\(\/\/\)$/{ s//\1/; q; }
26971  	  /^X\(\/\).*/{ s//\1/; q; }
26972  	  s/.*/./; q'`
26973  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
26974    { case "$ac_dir" in
26975  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
26976  *)                      as_incr_dir=.;;
26977esac
26978as_dummy="$ac_dir"
26979for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
26980  case $as_mkdir_dir in
26981    # Skip DOS drivespec
26982    ?:) as_incr_dir=$as_mkdir_dir ;;
26983    *)
26984      as_incr_dir=$as_incr_dir/$as_mkdir_dir
26985      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
26986    ;;
26987  esac
26988done; }
26989
26990    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
26991    # A "../" for each directory in $ac_dir_suffix.
26992    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
26993  else
26994    ac_dir_suffix= ac_dots=
26995  fi
26996
26997  case $srcdir in
26998  .)  ac_srcdir=.
26999      if test -z "$ac_dots"; then
27000         ac_top_srcdir=.
27001      else
27002         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
27003      fi ;;
27004  [\\/]* | ?:[\\/]* )
27005      ac_srcdir=$srcdir$ac_dir_suffix;
27006      ac_top_srcdir=$srcdir ;;
27007  *) # Relative path.
27008    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
27009    ac_top_srcdir=$ac_dots$srcdir ;;
27010  esac
27011
27012  case $INSTALL in
27013  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27014  *) ac_INSTALL=$ac_dots$INSTALL ;;
27015  esac
27016
27017  if test x"$ac_file" != x-; then
27018    { echo "$as_me:27018: creating $ac_file" >&5
27019echo "$as_me: creating $ac_file" >&6;}
27020    rm -f "$ac_file"
27021  fi
27022  # Let's still pretend it is `configure' which instantiates (i.e., don't
27023  # use $as_me), people would be surprised to read:
27024  #    /* config.h.  Generated automatically by config.status.  */
27025  configure_input="Generated automatically from `echo $ac_file_in |
27026                                                 sed 's,.*/,,'` by configure."
27027
27028  # First look for the input files in the build tree, otherwise in the
27029  # src tree.
27030  ac_file_inputs=`IFS=:
27031    for f in $ac_file_in; do
27032      case $f in
27033      -) echo $tmp/stdin ;;
27034      [\\/$]*)
27035         # Absolute (can't be DOS-style, as IFS=:)
27036         test -f "$f" || { { echo "$as_me:27036: error: cannot find input file: $f" >&5
27037echo "$as_me: error: cannot find input file: $f" >&2;}
27038   { (exit 1); exit 1; }; }
27039         echo $f;;
27040      *) # Relative
27041         if test -f "$f"; then
27042           # Build tree
27043           echo $f
27044         elif test -f "$srcdir/$f"; then
27045           # Source tree
27046           echo $srcdir/$f
27047         else
27048           # /dev/null tree
27049           { { echo "$as_me:27049: error: cannot find input file: $f" >&5
27050echo "$as_me: error: cannot find input file: $f" >&2;}
27051   { (exit 1); exit 1; }; }
27052         fi;;
27053      esac
27054    done` || { (exit 1); exit 1; }
27055EOF
27056cat >>$CONFIG_STATUS <<\EOF
27057  ac_warn_datarootdir=no
27058  if test x"$ac_file" != x-; then
27059    for ac_item in $ac_file_inputs
27060    do
27061      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
27062      if test -n "$ac_seen"; then
27063        ac_used=`grep '@datarootdir@' $ac_item`
27064        if test -z "$ac_used"; then
27065          { echo "$as_me:27065: WARNING: datarootdir was used implicitly but not set:
27066$ac_seen" >&5
27067echo "$as_me: WARNING: datarootdir was used implicitly but not set:
27068$ac_seen" >&2;}
27069          ac_warn_datarootdir=yes
27070        fi
27071      fi
27072      ac_seen=`grep '${datarootdir}' $ac_item`
27073      if test -n "$ac_seen"; then
27074        { echo "$as_me:27074: WARNING: datarootdir was used explicitly but not set:
27075$ac_seen" >&5
27076echo "$as_me: WARNING: datarootdir was used explicitly but not set:
27077$ac_seen" >&2;}
27078        ac_warn_datarootdir=yes
27079      fi
27080    done
27081  fi
27082
27083if test "x$ac_warn_datarootdir" = xyes; then
27084  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
27085fi
27086
27087EOF
27088cat >>$CONFIG_STATUS <<EOF
27089  sed "$ac_vpsub
27090$extrasub
27091EOF
27092cat >>$CONFIG_STATUS <<\EOF
27093:t
27094/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27095s,@configure_input@,$configure_input,;t t
27096s,@srcdir@,$ac_srcdir,;t t
27097s,@top_srcdir@,$ac_top_srcdir,;t t
27098s,@INSTALL@,$ac_INSTALL,;t t
27099" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
27100  rm -f $tmp/stdin
27101  if test x"$ac_file" != x-; then
27102    cp $tmp/out $ac_file
27103
27104    for ac_name in prefix exec_prefix datarootdir
27105    do
27106        ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
27107        if test -n "$ac_seen"; then
27108            ac_init=`egrep '[ 	]*'$ac_name'[ 	]*=' $ac_file`
27109            if test -z "$ac_init"; then
27110              ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
27111              { echo "$as_me:27111: WARNING: Variable $ac_name is used but was not set:
27112$ac_seen" >&5
27113echo "$as_me: WARNING: Variable $ac_name is used but was not set:
27114$ac_seen" >&2;}
27115            fi
27116        fi
27117    done
27118    egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
27119    egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
27120    if test -s $tmp/out; then
27121      ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
27122      { echo "$as_me:27122: WARNING: Some variables may not be substituted:
27123$ac_seen" >&5
27124echo "$as_me: WARNING: Some variables may not be substituted:
27125$ac_seen" >&2;}
27126    fi
27127  else
27128    cat $tmp/out
27129  fi
27130  rm -f $tmp/out
27131
27132done
27133EOF
27134cat >>$CONFIG_STATUS <<\EOF
27135
27136#
27137# CONFIG_HEADER section.
27138#
27139
27140# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27141# NAME is the cpp macro being defined and VALUE is the value it is being given.
27142#
27143# ac_d sets the value in "#define NAME VALUE" lines.
27144ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
27145ac_dB='[ 	].*$,\1#\2'
27146ac_dC=' '
27147ac_dD=',;t'
27148# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27149ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
27150ac_iB='\([ 	]\),\1#\2define\3'
27151ac_iC=' '
27152ac_iD='\4,;t'
27153# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27154ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
27155ac_uB='$,\1#\2define\3'
27156ac_uC=' '
27157ac_uD=',;t'
27158
27159for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27160  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27161  case $ac_file in
27162  - | *:- | *:-:* ) # input from stdin
27163        cat >$tmp/stdin
27164        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27165        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27166  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27167        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27168  * )   ac_file_in=$ac_file.in ;;
27169  esac
27170
27171  test x"$ac_file" != x- && { echo "$as_me:27171: creating $ac_file" >&5
27172echo "$as_me: creating $ac_file" >&6;}
27173
27174  # First look for the input files in the build tree, otherwise in the
27175  # src tree.
27176  ac_file_inputs=`IFS=:
27177    for f in $ac_file_in; do
27178      case $f in
27179      -) echo $tmp/stdin ;;
27180      [\\/$]*)
27181         # Absolute (can't be DOS-style, as IFS=:)
27182         test -f "$f" || { { echo "$as_me:27182: error: cannot find input file: $f" >&5
27183echo "$as_me: error: cannot find input file: $f" >&2;}
27184   { (exit 1); exit 1; }; }
27185         echo $f;;
27186      *) # Relative
27187         if test -f "$f"; then
27188           # Build tree
27189           echo $f
27190         elif test -f "$srcdir/$f"; then
27191           # Source tree
27192           echo $srcdir/$f
27193         else
27194           # /dev/null tree
27195           { { echo "$as_me:27195: error: cannot find input file: $f" >&5
27196echo "$as_me: error: cannot find input file: $f" >&2;}
27197   { (exit 1); exit 1; }; }
27198         fi;;
27199      esac
27200    done` || { (exit 1); exit 1; }
27201  # Remove the trailing spaces.
27202  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
27203
27204EOF
27205
27206# Transform confdefs.h into a list of #define's.  We won't use it as a sed
27207# script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27208# be either 'cat' or 'sort'.
27209cat confdefs.h | uniq >conftest.vals
27210
27211# Break up conftest.vals because some shells have a limit on
27212# the size of here documents, and old seds have small limits too.
27213
27214rm -f conftest.tail
27215echo '  rm -f conftest.frag' >> $CONFIG_STATUS
27216while grep . conftest.vals >/dev/null
27217do
27218  # Write chunks of a limited-size here document to conftest.frag.
27219  echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
27220  sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
27221  echo 'CEOF' >> $CONFIG_STATUS
27222  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
27223  rm -f conftest.vals
27224  mv conftest.tail conftest.vals
27225done
27226rm -f conftest.vals
27227
27228# Run sed to substitute the contents of conftest.frag into $tmp/in at the
27229# marker @DEFS@.
27230echo '  cat >> conftest.edit <<CEOF
27231/@DEFS@/r conftest.frag
27232/@DEFS@/d
27233CEOF
27234sed -f conftest.edit $tmp/in > $tmp/out
27235rm -f $tmp/in
27236mv $tmp/out $tmp/in
27237rm -f conftest.edit conftest.frag
27238' >> $CONFIG_STATUS
27239
27240cat >>$CONFIG_STATUS <<\EOF
27241  # Let's still pretend it is `configure' which instantiates (i.e., don't
27242  # use $as_me), people would be surprised to read:
27243  #    /* config.h.  Generated automatically by config.status.  */
27244  if test x"$ac_file" = x-; then
27245    echo "/* Generated automatically by configure.  */" >$tmp/config.h
27246  else
27247    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27248  fi
27249  cat $tmp/in >>$tmp/config.h
27250  rm -f $tmp/in
27251  if test x"$ac_file" != x-; then
27252    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
27253      { echo "$as_me:27253: $ac_file is unchanged" >&5
27254echo "$as_me: $ac_file is unchanged" >&6;}
27255    else
27256      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27257         X"$ac_file" : 'X\(//\)[^/]' \| \
27258         X"$ac_file" : 'X\(//\)$' \| \
27259         X"$ac_file" : 'X\(/\)' \| \
27260         .     : '\(.\)' 2>/dev/null ||
27261echo X"$ac_file" |
27262    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27263  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27264  	  /^X\(\/\/\)$/{ s//\1/; q; }
27265  	  /^X\(\/\).*/{ s//\1/; q; }
27266  	  s/.*/./; q'`
27267      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27268        { case "$ac_dir" in
27269  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27270  *)                      as_incr_dir=.;;
27271esac
27272as_dummy="$ac_dir"
27273for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27274  case $as_mkdir_dir in
27275    # Skip DOS drivespec
27276    ?:) as_incr_dir=$as_mkdir_dir ;;
27277    *)
27278      as_incr_dir=$as_incr_dir/$as_mkdir_dir
27279      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27280    ;;
27281  esac
27282done; }
27283
27284      fi
27285      rm -f $ac_file
27286      mv $tmp/config.h $ac_file
27287    fi
27288  else
27289    cat $tmp/config.h
27290    rm -f $tmp/config.h
27291  fi
27292done
27293EOF
27294cat >>$CONFIG_STATUS <<\EOF
27295#
27296# CONFIG_COMMANDS section.
27297#
27298for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
27299  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
27300  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
27301
27302  case $ac_dest in
27303    default )
27304if test "x$cf_with_tests" != xno ; then
27305
27306for cf_dir in test
27307do
27308	if test ! -d $srcdir/$cf_dir; then
27309		continue
27310	elif test -f $srcdir/$cf_dir/programs; then
27311		$AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
27312	fi
27313done
27314
27315fi
27316
27317cf_prefix=$LIB_PREFIX
27318
27319case $cf_cv_shlib_version in
27320(cygdll|msysdll|mingw)
27321	TINFO_NAME=$TINFO_ARG_SUFFIX
27322	TINFO_SUFFIX=.dll
27323	;;
27324esac
27325
27326if test -n "$TINFO_SUFFIX" ; then
27327	case $TINFO_SUFFIX in
27328	(tw*)
27329		TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
27330		TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
27331		;;
27332	(t*)
27333		TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
27334		TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
27335		;;
27336	(w*)
27337		TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
27338		TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
27339		;;
27340	esac
27341fi
27342
27343for cf_dir in $SRC_SUBDIRS
27344do
27345	if test ! -d $srcdir/$cf_dir ; then
27346		continue
27347	elif test -f $srcdir/$cf_dir/modules; then
27348
27349		SHARED_LIB=
27350		Libs_To_Make=
27351		cf_awk_program=
27352		if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
27353		then
27354			cf_awk_program="$cf_awk_program\
27355/deprecated in ABI${cf_cv_abi_version}/ { next; }\
27356{ sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
27357"
27358		fi
27359
27360		if test "x$WILDCARD_SYMS" = xno
27361		then
27362			cf_awk_program="$cf_awk_program\
27363/[ 	]_\\*;/ { skip=1; next; }\
27364"
27365		fi
27366
27367		if test "x$cf_awk_program" != "x"
27368		then
27369			cat >>$cf_dir/Makefile <<CF_EOF
27370
27371# Generated by CF_LIB_RULES
27372resulting.map: $UNALTERED_SYMS
27373	$AWK 'BEGIN { skip = 1; last=""; } \
27374$cf_awk_program \
27375{ if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
27376 skip = 0; last = \$\$0; } \
27377END { print last; }' < $UNALTERED_SYMS >\$@
27378
27379distclean::
27380	rm -f resulting.map
27381CF_EOF
27382		fi
27383
27384		for cf_item in $cf_LIST_MODELS
27385		do
27386
27387	case X$cf_item in
27388	(Xlibtool)
27389		cf_suffix='.la'
27390		cf_depsuf=$cf_suffix
27391		;;
27392	(Xdebug)
27393		cf_suffix='_g.a'
27394		cf_depsuf=$cf_suffix
27395		;;
27396	(Xprofile)
27397		cf_suffix='_p.a'
27398		cf_depsuf=$cf_suffix
27399		;;
27400	(Xshared)
27401		case $cf_cv_system_name in
27402		(aix[5-7]*)
27403			cf_suffix='.so'
27404			cf_depsuf=$cf_suffix
27405			;;
27406		(cygwin*|msys*|mingw*)
27407			cf_suffix='.dll'
27408			cf_depsuf='.dll.a'
27409			;;
27410		(darwin*)
27411			cf_suffix='.dylib'
27412			cf_depsuf=$cf_suffix
27413			;;
27414		(hpux*)
27415			case $target in
27416			(ia64*)
27417				cf_suffix='.so'
27418				cf_depsuf=$cf_suffix
27419				;;
27420			(*)
27421				cf_suffix='.sl'
27422				cf_depsuf=$cf_suffix
27423				;;
27424			esac
27425			;;
27426		(*)
27427			cf_suffix='.so'
27428			cf_depsuf=$cf_suffix
27429			;;
27430		esac
27431		;;
27432	(*)
27433		cf_suffix='.a'
27434		cf_depsuf=$cf_suffix
27435		;;
27436	esac
27437	if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27438	then
27439		cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27440		cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27441	fi
27442
27443			cf_libname=$cf_dir
27444			test "$cf_dir" = c++ && cf_libname=ncurses++
27445			if test $cf_item = shared ; then
27446				if test -n "${LIB_SUFFIX}"
27447				then
27448					cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27449				else
27450					cf_shared_suffix="$cf_suffix"
27451				fi
27452				if test "$cf_cv_do_symlinks" = yes ; then
27453					cf_version_name=
27454
27455					case "$cf_cv_shlib_version" in
27456					(rel)
27457						cf_version_name=REL_VERSION
27458						;;
27459					(abi)
27460						cf_version_name=ABI_VERSION
27461						;;
27462					esac
27463
27464					if test -n "$cf_version_name"
27465					then
27466						case "$cf_cv_system_name" in
27467						(darwin*)
27468							# "w", etc?
27469							cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
27470							;;
27471						(*)
27472							cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
27473							;;
27474						esac
27475					fi
27476					if test -n "${USE_LIB_SUFFIX}"
27477					then
27478						cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27479					else
27480						cf_shared_suffix="$cf_suffix"
27481					fi
27482				fi
27483				# cygwin needs import library, and has unique naming convention
27484				# use autodetected ${cf_prefix} for import lib and static lib, but
27485				# use 'cyg' prefix for shared lib.
27486				case $cf_cv_shlib_version in
27487				(cygdll)
27488					cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27489					cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
27490					;;
27491				(msysdll)
27492					cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27493					cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
27494					;;
27495				(mingw)
27496					cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27497					cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
27498					;;
27499				(*)
27500					cf_add_lib=
27501					;;
27502				esac
27503				if test -n "$cf_add_lib"
27504				then
27505					Libs_To_Make="$Libs_To_Make $cf_add_lib"
27506					continue
27507				fi
27508			fi
27509			cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
27510			Libs_To_Make="$Libs_To_Make $cf_add_lib"
27511		done
27512
27513		if test $cf_dir = ncurses ; then
27514			cf_subsets="$LIB_SUBSETS"
27515			cf_r_parts="$cf_subsets"
27516			cf_liblist="$Libs_To_Make"
27517
27518			while test -n "$cf_r_parts"
27519			do
27520				cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
27521				cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
27522				if test "$cf_l_parts" != "$cf_r_parts" ; then
27523					cf_add_lib=
27524					case $cf_l_parts in
27525					(*termlib*)
27526						cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
27527						;;
27528					(*ticlib*)
27529						cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
27530						;;
27531					(*)
27532						break
27533						;;
27534					esac
27535					if test -n "$cf_add_lib"; then
27536						Libs_To_Make="$cf_add_lib $Libs_To_Make"
27537					fi
27538				else
27539					break
27540				fi
27541			done
27542		else
27543			cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
27544		fi
27545
27546		if test $cf_dir = c++; then
27547			if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
27548				cf_list=
27549				for cf_item in $Libs_To_Make
27550				do
27551					case $cf_item in
27552					(*.a)
27553						;;
27554					(*)
27555						cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
27556						;;
27557					esac
27558					for cf_test in $cf_list
27559					do
27560						if test "$cf_test" = "$cf_item"
27561						then
27562							cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
27563							cf_item=
27564							break
27565						fi
27566					done
27567					test -n "$cf_item" && cf_list="$cf_list $cf_item"
27568				done
27569				Libs_To_Make="$cf_list"
27570			fi
27571		fi
27572
27573		sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
27574		    -e "s%@SHARED_LIB@%$SHARED_LIB%" \
27575			$cf_dir/Makefile >$cf_dir/Makefile.out
27576		mv $cf_dir/Makefile.out $cf_dir/Makefile
27577
27578		$AWK -f $srcdir/mk-0th.awk \
27579			libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
27580			$srcdir/$cf_dir/modules >>$cf_dir/Makefile
27581
27582		for cf_subset in $cf_subsets
27583		do
27584			cf_subdirs=
27585			for cf_item in $cf_LIST_MODELS
27586			do
27587
27588			echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
27589
27590cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27591
27592			CXX_MODEL=$cf_ITEM
27593			if test "$CXX_MODEL" = SHARED; then
27594				case $cf_cv_shlib_version in
27595				(cygdll|msysdll|mingw)
27596					test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "	overriding CXX_MODEL to SHARED" 1>&6
27597
27598echo "${as_me:-configure}:27598: testing overriding CXX_MODEL to SHARED ..." 1>&5
27599
27600					with_shared_cxx=yes
27601					;;
27602				(*)
27603					test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
27604					;;
27605				esac
27606			fi
27607
27608	case X$cf_item in
27609	(Xlibtool)
27610		cf_suffix='.la'
27611		cf_depsuf=$cf_suffix
27612		;;
27613	(Xdebug)
27614		cf_suffix='_g.a'
27615		cf_depsuf=$cf_suffix
27616		;;
27617	(Xprofile)
27618		cf_suffix='_p.a'
27619		cf_depsuf=$cf_suffix
27620		;;
27621	(Xshared)
27622		case $cf_cv_system_name in
27623		(aix[5-7]*)
27624			cf_suffix='.so'
27625			cf_depsuf=$cf_suffix
27626			;;
27627		(cygwin*|msys*|mingw*)
27628			cf_suffix='.dll'
27629			cf_depsuf='.dll.a'
27630			;;
27631		(darwin*)
27632			cf_suffix='.dylib'
27633			cf_depsuf=$cf_suffix
27634			;;
27635		(hpux*)
27636			case $target in
27637			(ia64*)
27638				cf_suffix='.so'
27639				cf_depsuf=$cf_suffix
27640				;;
27641			(*)
27642				cf_suffix='.sl'
27643				cf_depsuf=$cf_suffix
27644				;;
27645			esac
27646			;;
27647		(*)
27648			cf_suffix='.so'
27649			cf_depsuf=$cf_suffix
27650			;;
27651		esac
27652		;;
27653	(*)
27654		cf_suffix='.a'
27655		cf_depsuf=$cf_suffix
27656		;;
27657	esac
27658	if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27659	then
27660		cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27661		cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27662	fi
27663
27664	case $cf_item in
27665	(libtool) cf_subdir='obj_lo'  ;;
27666	(normal)  cf_subdir='objects' ;;
27667	(debug)   cf_subdir='obj_g' ;;
27668	(profile) cf_subdir='obj_p' ;;
27669	(shared)
27670		case $cf_cv_system_name in
27671		(cygwin|msys)
27672			cf_subdir='objects' ;;
27673		(*)
27674			cf_subdir='obj_s' ;;
27675		esac
27676	esac
27677
27678			# Test for case where we build libtinfo with a different name.
27679			cf_libname=$cf_dir
27680			if test $cf_dir = ncurses ; then
27681				case $cf_subset in
27682				(*base*)
27683					cf_libname=${cf_libname}$USE_LIB_SUFFIX
27684					;;
27685				(*termlib*)
27686					cf_libname=$TINFO_LIB_SUFFIX
27687					;;
27688				(ticlib*)
27689					cf_libname=$TICS_LIB_SUFFIX
27690					;;
27691				esac
27692			elif test $cf_dir = c++ ; then
27693				cf_libname=ncurses++$USE_LIB_SUFFIX
27694			else
27695				cf_libname=${cf_libname}$USE_LIB_SUFFIX
27696			fi
27697			if test -n "${USE_ARG_SUFFIX}" ; then
27698				# undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
27699				cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
27700			fi
27701
27702			# These dependencies really are for development, not
27703			# builds, but they are useful in porting, too.
27704			cf_depend="../include/ncurses_cfg.h"
27705			if test "$srcdir" = "."; then
27706				cf_reldir="."
27707			else
27708				cf_reldir="\${srcdir}"
27709			fi
27710
27711			if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
27712				cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
27713			elif test -f $srcdir/$cf_dir/curses.priv.h; then
27714				cf_depend="$cf_depend $cf_reldir/curses.priv.h"
27715			fi
27716
27717 			cf_dir_suffix=
27718 			old_cf_suffix="$cf_suffix"
27719 			if test "$cf_cv_shlib_version_infix" = yes ; then
27720			if test -n "$USE_LIB_SUFFIX" ; then
27721				case $USE_LIB_SUFFIX in
27722				(tw*)
27723					cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
27724					cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
27725					cf_dir_suffix=tw$EXTRA_SUFFIX
27726					;;
27727				(t*)
27728					cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
27729					cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
27730					cf_dir_suffix=t$EXTRA_SUFFIX
27731					;;
27732				(w*)
27733					cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
27734					cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
27735					cf_dir_suffix=w$EXTRA_SUFFIX
27736					;;
27737				(*)
27738					cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
27739					cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
27740					cf_dir_suffix=$EXTRA_SUFFIX
27741					;;
27742				esac
27743			fi
27744 			fi
27745
27746			$AWK -f $srcdir/mk-1st.awk \
27747				name=${cf_libname}${cf_dir_suffix} \
27748				traces=$LIB_TRACING \
27749				MODEL=$cf_ITEM \
27750				CXX_MODEL=$CXX_MODEL \
27751				model=$cf_subdir \
27752				prefix=$cf_prefix \
27753				suffix=$cf_suffix \
27754				subset=$cf_subset \
27755				driver=$cf_cv_term_driver \
27756				SymLink="$LN_S" \
27757				TermlibRoot=$TINFO_NAME \
27758				TermlibSuffix=$TINFO_SUFFIX \
27759				ShlibVer=$cf_cv_shlib_version \
27760				ShlibVerInfix=$cf_cv_shlib_version_infix \
27761				ReLink=${cf_cv_do_relink:-no} \
27762				ReRanlib=${cf_cv_do_reranlib:-yes} \
27763				DoLinks=$cf_cv_do_symlinks \
27764				rmSoLocs=$cf_cv_rm_so_locs \
27765				ldconfig="$LDCONFIG" \
27766				overwrite=$WITH_OVERWRITE \
27767				depend="$cf_depend" \
27768				host="$host" \
27769				libtool_version="$LIBTOOL_VERSION" \
27770				$srcdir/$cf_dir/modules >>$cf_dir/Makefile
27771
27772			cf_suffix="$old_cf_suffix"
27773
27774			for cf_subdir2 in $cf_subdirs lib
27775			do
27776				test $cf_subdir = $cf_subdir2 && break
27777			done
27778			test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
27779			$AWK -f $srcdir/mk-2nd.awk \
27780				name=$cf_dir \
27781				traces=$LIB_TRACING \
27782				MODEL=$cf_ITEM \
27783				model=$cf_subdir \
27784				subset=$cf_subset \
27785				srcdir=$srcdir \
27786				echo=$WITH_ECHO \
27787				crenames=$cf_cv_prog_CC_c_o \
27788				cxxrenames=$cf_cv_prog_CXX_c_o \
27789				$srcdir/$cf_dir/modules >>$cf_dir/Makefile
27790			cf_subdirs="$cf_subdirs $cf_subdir"
27791			done
27792		done
27793	fi
27794
27795	echo '	cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
27796done
27797
27798for cf_dir in $SRC_SUBDIRS
27799do
27800	if test ! -d $srcdir/$cf_dir ; then
27801		continue
27802	fi
27803
27804	if test -f $cf_dir/Makefile ; then
27805		case "$cf_dir" in
27806		(Ada95)
27807			echo 'libs \' >> Makefile
27808			echo 'install.libs \' >> Makefile
27809			echo 'uninstall.libs ::' >> Makefile
27810			echo '	cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
27811			;;
27812		esac
27813	fi
27814
27815	if test -f $srcdir/$cf_dir/modules; then
27816		echo >> Makefile
27817		if test -f $srcdir/$cf_dir/headers; then
27818cat >> Makefile <<CF_EOF
27819install.includes \\
27820uninstall.includes \\
27821CF_EOF
27822		fi
27823if test "$cf_dir" != "c++" ; then
27824echo 'lint \' >> Makefile
27825fi
27826cat >> Makefile <<CF_EOF
27827libs \\
27828lintlib \\
27829install.libs \\
27830uninstall.libs \\
27831install.$cf_dir \\
27832uninstall.$cf_dir ::
27833	cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27834CF_EOF
27835	elif test -f $srcdir/$cf_dir/headers; then
27836cat >> Makefile <<CF_EOF
27837
27838libs \\
27839install.libs \\
27840uninstall.libs \\
27841install.includes \\
27842uninstall.includes ::
27843	cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27844CF_EOF
27845fi
27846done
27847
27848if test "x$cf_with_db_install" = xyes; then
27849cat >> Makefile <<CF_EOF
27850
27851install.libs uninstall.libs \\
27852install.data uninstall.data ::
27853$MAKE_TERMINFO	cd misc && \${MAKE} \${TOP_MFLAGS} \$@
27854CF_EOF
27855else
27856cat >> Makefile <<CF_EOF
27857
27858install.libs uninstall.libs ::
27859	cd misc && \${MAKE} \${TOP_MFLAGS} \$@
27860CF_EOF
27861fi
27862
27863if test "x$cf_with_manpages" = xyes; then
27864cat >> Makefile <<CF_EOF
27865
27866install.man \\
27867uninstall.man ::
27868	cd man && \${MAKE} \${TOP_MFLAGS} \$@
27869CF_EOF
27870fi
27871
27872cat >> Makefile <<CF_EOF
27873
27874distclean ::
27875	rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
27876	rm -f headers.sh headers.sed mk_shared_lib.sh
27877	rm -f edit_man.* man_alias.*
27878	rm -rf \${DIRS_TO_MAKE}
27879CF_EOF
27880
27881# Special case: tack's manpage lives in its own directory.
27882if test "x$cf_with_manpages" = xyes; then
27883if test "x$cf_with_tack" = "xyes"; then
27884cat >> Makefile <<CF_EOF
27885
27886install.man \\
27887uninstall.man ::
27888	cd tack && \${MAKE} \${TOP_MFLAGS} \$@
27889CF_EOF
27890fi
27891fi
27892
27893rm -f headers.sed headers.sh
27894
27895echo creating headers.sh
27896cat >headers.sh <<CF_EOF
27897#! $SHELL
27898# This shell script is generated by the 'configure' script.  It is invoked in a
27899# subdirectory of the build tree.  It generates a sed-script in the parent
27900# directory that is used to adjust includes for header files that reside in a
27901# subdirectory of /usr/include, etc.
27902PRG=""
27903while test \$# != 3
27904do
27905PRG="\$PRG \$1"; shift
27906done
27907DST=\$1
27908REF=\$2
27909SRC=\$3
27910TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
27911TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
27912echo installing \$SRC in \$DST
27913CF_EOF
27914
27915if test $WITH_CURSES_H = yes; then
27916	cat >>headers.sh <<CF_EOF
27917case \$DST in
27918(/*/include/*)
27919	END=\`basename \$DST\`
27920	for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
27921	do
27922		NAME=\`basename \$i\`
27923		echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
27924	done
27925	;;
27926(*)
27927	echo "" >> \$TMPSED
27928	;;
27929esac
27930CF_EOF
27931
27932else
27933	cat >>headers.sh <<CF_EOF
27934case \$DST in
27935(/*/include/*)
27936	END=\`basename \$DST\`
27937	for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
27938	do
27939		NAME=\`basename \$i\`
27940		if test "\$NAME" = "curses.h"
27941		then
27942			echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
27943			NAME=ncurses.h
27944		fi
27945		echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
27946	done
27947	;;
27948(*)
27949	echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
27950	;;
27951esac
27952CF_EOF
27953fi
27954cat >>headers.sh <<CF_EOF
27955rm -f \$TMPSRC
27956sed -f \$TMPSED \$SRC > \$TMPSRC
27957NAME=\`basename \$SRC\`
27958CF_EOF
27959if test $WITH_CURSES_H != yes; then
27960	cat >>headers.sh <<CF_EOF
27961test "\$NAME" = "curses.h" && NAME=ncurses.h
27962CF_EOF
27963fi
27964cat >>headers.sh <<CF_EOF
27965# Just in case someone gzip'd manpages, remove the conflicting copy.
27966test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
27967
27968eval \$PRG \$TMPSRC \$DST/\$NAME
27969rm -f \$TMPSRC \$TMPSED
27970CF_EOF
27971
27972chmod 0755 headers.sh
27973
27974for cf_dir in $SRC_SUBDIRS
27975do
27976	if test ! -d $srcdir/$cf_dir ; then
27977		continue
27978	fi
27979
27980	if test -f $srcdir/$cf_dir/headers; then
27981		$AWK -f $srcdir/mk-hdr.awk \
27982			subset="$LIB_SUBSETS" \
27983			compat="$WITH_CURSES_H" \
27984			$srcdir/$cf_dir/headers >>$cf_dir/Makefile
27985	fi
27986
27987	if test -f $srcdir/$cf_dir/modules; then
27988		if test "$cf_dir" != "c++" ; then
27989			cat >>$cf_dir/Makefile <<"CF_EOF"
27990depend : ${AUTO_SRC}
27991	makedepend -- ${CPPFLAGS} -- ${C_SRC}
27992
27993# DO NOT DELETE THIS LINE -- make depend depends on it.
27994CF_EOF
27995		fi
27996	fi
27997done
27998
27999if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28000if test -z "$USE_OLD_MAKERULES" ; then
28001	$AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
28002fi
28003fi
28004 ;;
28005  esac
28006done
28007EOF
28008
28009cat >>$CONFIG_STATUS <<\EOF
28010
28011{ (exit 0); exit 0; }
28012EOF
28013chmod +x $CONFIG_STATUS
28014ac_clean_files=$ac_clean_files_save
28015
28016# configure is writing to config.log, and then calls config.status.
28017# config.status does its own redirection, appending to config.log.
28018# Unfortunately, on DOS this fails, as config.log is still kept open
28019# by configure, so config.status won't be able to write to it; its
28020# output is simply discarded.  So we exec the FD to /dev/null,
28021# effectively closing config.log, so it can be properly (re)opened and
28022# appended to by config.status.  When coming back to configure, we
28023# need to make the FD available again.
28024if test "$no_create" != yes; then
28025  ac_cs_success=:
28026  exec 5>/dev/null
28027  $SHELL $CONFIG_STATUS || ac_cs_success=false
28028  exec 5>>config.log
28029  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28030  # would make configure fail if this is the last instruction.
28031  $ac_cs_success || { (exit 1); exit 1; }
28032fi
28033${MAKE:-make} preinstall
28034