xref: /freebsd/contrib/ncurses/configure (revision 68ad2b0d7af2a3571c4abac9afa712f9b09b721c)
1#! /bin/sh
2# From configure.in Revision: 1.824 .
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by Autoconf 2.52.20250126.
5#
6# Copyright 2003-2022,2023	Thomas E. Dickey
7# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8# Free Software Foundation, Inc.
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11
12# Avoid depending upon Character Ranges.
13as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16as_cr_digits='0123456789'
17as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19# Sed expression to map a string onto a valid variable name.
20as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22# Sed expression to map a string onto a valid CPP name.
23as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25# Be Bourne compatible
26if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27  emulate sh
28  NULLCMD=:
29elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30  set -o posix
31fi
32
33# Name of the executable.
34as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36if expr a : '\(a\)' >/dev/null 2>&1; then
37  as_expr="expr"
38else
39  as_expr="false"
40fi
41
42rm -f conf$$ conf$$.exe conf$$.file
43echo >conf$$.file
44if ln -s conf$$.file conf$$ 2>/dev/null; then
45  # We could just check for DJGPP; but this test a) works b) is more generic
46  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47  if test -f conf$$.exe; then
48    # Don't use ln at all; we don't have any links
49    as_ln_s='cp -p'
50  else
51    as_ln_s='ln -s'
52  fi
53elif ln conf$$.file conf$$ 2>/dev/null; then
54  as_ln_s='ln'
55else
56  as_ln_s='cp -p'
57fi
58rm -f conf$$ conf$$.exe conf$$.file
59
60as_executable_p="test -f"
61
62# Support unset when possible.
63if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64  as_unset="unset"
65else
66  as_unset="false"
67fi
68
69# NLS nuisances.
70$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79# IFS
80# We need space, tab and new line, in precisely that order.
81as_nl='
82'
83IFS=" 	$as_nl"
84
85# CDPATH.
86$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88# Name of the host.
89# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90# so uname gets run too.
91ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93exec 6>&1
94
95#
96# Initializations.
97#
98ac_default_prefix=/usr/local
99cross_compiling=no
100subdirs=
101MFLAGS=
102MAKEFLAGS=
103SHELL=${CONFIG_SHELL-/bin/sh}
104
105# Maximum number of lines to put in a shell here document.
106# This variable seems obsolete.  It should probably be removed, and
107# only ac_max_sed_lines should be used.
108: "${ac_max_here_lines=38}"
109
110ac_unique_file="ncurses/base/lib_initscr.c"
111# Factoring default headers for most tests.
112ac_includes_default="\
113#include <stdio.h>
114#if HAVE_SYS_TYPES_H
115# include <sys/types.h>
116#endif
117#if HAVE_SYS_STAT_H
118# include <sys/stat.h>
119#endif
120#if STDC_HEADERS
121# include <stdlib.h>
122# include <stddef.h>
123#else
124# if HAVE_STDLIB_H
125#  include <stdlib.h>
126# endif
127#endif
128#if HAVE_STRING_H
129# if !STDC_HEADERS && HAVE_MEMORY_H
130#  include <memory.h>
131# endif
132# include <string.h>
133#endif
134#if HAVE_STRINGS_H
135# include <strings.h>
136#endif
137#if HAVE_INTTYPES_H
138# include <inttypes.h>
139#else
140# if HAVE_STDINT_H
141#  include <stdint.h>
142# endif
143#endif
144#if HAVE_UNISTD_H
145# include <unistd.h>
146#endif"
147
148# Initialize some variables set by options.
149ac_init_help=
150ac_init_version=false
151# The variables have the same names as the options, with
152# dashes changed to underlines.
153cache_file=/dev/null
154exec_prefix=NONE
155no_create=
156no_recursion=
157prefix=NONE
158program_prefix=NONE
159program_suffix=NONE
160program_transform_name=s,x,x,
161silent=
162site=
163srcdir=
164verbose=
165x_includes=NONE
166x_libraries=NONE
167
168# Installation directory options.
169# These are left unexpanded so users can "make install exec_prefix=/foo"
170# and all the variables that are supposed to be based on exec_prefix
171# by default will actually change.
172# Use braces instead of parens because sh, perl, etc. also accept them.
173bindir='${exec_prefix}/bin'
174sbindir='${exec_prefix}/sbin'
175libexecdir='${exec_prefix}/libexec'
176datarootdir='${prefix}/share'
177datadir='${datarootdir}'
178sysconfdir='${prefix}/etc'
179sharedstatedir='${prefix}/com'
180localstatedir='${prefix}/var'
181runstatedir='${localstatedir}/run'
182libdir='${exec_prefix}/lib'
183includedir='${prefix}/include'
184oldincludedir='/usr/include'
185infodir='${datarootdir}/info'
186mandir='${datarootdir}/man'
187
188# Identity of this package.
189PACKAGE_NAME=
190PACKAGE_TARNAME=
191PACKAGE_VERSION=
192PACKAGE_STRING=
193PACKAGE_BUGREPORT=
194
195ac_prev=
196for ac_option
197do
198  # If the previous option needs an argument, assign it.
199  if test -n "$ac_prev"; then
200    eval "$ac_prev=\$ac_option"
201    ac_prev=
202    continue
203  fi
204
205  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207  # Accept the important Cygnus configure options, so we can diagnose typos.
208
209  case "$ac_option" in
210
211  -bindir | --bindir | --bindi | --bind | --bin | --bi)
212    ac_prev=bindir ;;
213  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214    bindir=$ac_optarg ;;
215
216  -build | --build | --buil | --bui | --bu)
217    ac_prev=build_alias ;;
218  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219    build_alias=$ac_optarg ;;
220
221  -cache-file | --cache-file | --cache-fil | --cache-fi \
222  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223    ac_prev=cache_file ;;
224  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226    cache_file=$ac_optarg ;;
227
228  --config-cache | -C)
229    cache_file=config.cache ;;
230
231  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232    ac_prev=datadir ;;
233  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234  | --da=*)
235    datadir=$ac_optarg ;;
236
237  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238  | --dataroo | --dataro | --datar)
239    ac_prev=datarootdir ;;
240  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242    datarootdir=$ac_optarg ;;
243
244  -disable-* | --disable-*)
245    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246    # Reject names that are not valid shell variable names.
247    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249   { (exit 1); exit 1; }; }
250    ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251    eval "enable_$ac_feature=no" ;;
252
253  -enable-* | --enable-*)
254    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255    # Reject names that are not valid shell variable names.
256    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258   { (exit 1); exit 1; }; }
259    ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260    case "$ac_option" in
261      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262      *) ac_optarg=yes ;;
263    esac
264    eval "enable_$ac_feature='$ac_optarg'" ;;
265
266  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268  | --exec | --exe | --ex)
269    ac_prev=exec_prefix ;;
270  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272  | --exec=* | --exe=* | --ex=*)
273    exec_prefix=$ac_optarg ;;
274
275  -gas | --gas | --ga | --g)
276    # Obsolete; use --with-gas.
277    with_gas=yes ;;
278
279  -help | --help | --hel | --he | -h)
280    ac_init_help=long ;;
281  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282    ac_init_help=recursive ;;
283  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284    ac_init_help=short ;;
285
286  -host | --host | --hos | --ho)
287    ac_prev=host_alias ;;
288  -host=* | --host=* | --hos=* | --ho=*)
289    host_alias=$ac_optarg ;;
290
291  -includedir | --includedir | --includedi | --included | --include \
292  | --includ | --inclu | --incl | --inc)
293    ac_prev=includedir ;;
294  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295  | --includ=* | --inclu=* | --incl=* | --inc=*)
296    includedir=$ac_optarg ;;
297
298  -infodir | --infodir | --infodi | --infod | --info | --inf)
299    ac_prev=infodir ;;
300  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301    infodir=$ac_optarg ;;
302
303  -libdir | --libdir | --libdi | --libd)
304    ac_prev=libdir ;;
305  -libdir=* | --libdir=* | --libdi=* | --libd=*)
306    libdir=$ac_optarg ;;
307
308  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309  | --libexe | --libex | --libe)
310    ac_prev=libexecdir ;;
311  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312  | --libexe=* | --libex=* | --libe=*)
313    libexecdir=$ac_optarg ;;
314
315  -localstatedir | --localstatedir | --localstatedi | --localstated \
316  | --localstate | --localstat | --localsta | --localst \
317  | --locals | --local | --loca | --loc | --lo)
318    ac_prev=localstatedir ;;
319  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322    localstatedir=$ac_optarg ;;
323
324  -runstatedir | --runstatedir | --runstatedi | --runstated \
325  | --runstate | --runstat | --runsta | --runst \
326  | --runs | --run | --ru)
327    ac_prev=runstatedir ;;
328  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329  | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330  | --runs=* | --run=* | --ru=*)
331    runstatedir=$ac_optarg ;;
332
333  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334    ac_prev=mandir ;;
335  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336    mandir=$ac_optarg ;;
337
338  -nfp | --nfp | --nf)
339    # Obsolete; use --without-fp.
340    with_fp=no ;;
341
342  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343  | --no-cr | --no-c)
344    no_create=yes ;;
345
346  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348    no_recursion=yes ;;
349
350  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352  | --oldin | --oldi | --old | --ol | --o)
353    ac_prev=oldincludedir ;;
354  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357    oldincludedir=$ac_optarg ;;
358
359  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360    ac_prev=prefix ;;
361  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362    prefix=$ac_optarg ;;
363
364  -program-prefix | --program-prefix | --program-prefi | --program-pref \
365  | --program-pre | --program-pr | --program-p)
366    ac_prev=program_prefix ;;
367  -program-prefix=* | --program-prefix=* | --program-prefi=* \
368  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369    program_prefix=$ac_optarg ;;
370
371  -program-suffix | --program-suffix | --program-suffi | --program-suff \
372  | --program-suf | --program-su | --program-s)
373    ac_prev=program_suffix ;;
374  -program-suffix=* | --program-suffix=* | --program-suffi=* \
375  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376    program_suffix=$ac_optarg ;;
377
378  -program-transform-name | --program-transform-name \
379  | --program-transform-nam | --program-transform-na \
380  | --program-transform-n | --program-transform- \
381  | --program-transform | --program-transfor \
382  | --program-transfo | --program-transf \
383  | --program-trans | --program-tran \
384  | --progr-tra | --program-tr | --program-t)
385    ac_prev=program_transform_name ;;
386  -program-transform-name=* | --program-transform-name=* \
387  | --program-transform-nam=* | --program-transform-na=* \
388  | --program-transform-n=* | --program-transform-=* \
389  | --program-transform=* | --program-transfor=* \
390  | --program-transfo=* | --program-transf=* \
391  | --program-trans=* | --program-tran=* \
392  | --progr-tra=* | --program-tr=* | --program-t=*)
393    program_transform_name=$ac_optarg ;;
394
395  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396  | -silent | --silent | --silen | --sile | --sil)
397    silent=yes ;;
398
399  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400    ac_prev=sbindir ;;
401  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402  | --sbi=* | --sb=*)
403    sbindir=$ac_optarg ;;
404
405  -sharedstatedir | --sharedstatedir | --sharedstatedi \
406  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407  | --sharedst | --shareds | --shared | --share | --shar \
408  | --sha | --sh)
409    ac_prev=sharedstatedir ;;
410  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413  | --sha=* | --sh=*)
414    sharedstatedir=$ac_optarg ;;
415
416  -site | --site | --sit)
417    ac_prev=site ;;
418  -site=* | --site=* | --sit=*)
419    site=$ac_optarg ;;
420
421  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422    ac_prev=srcdir ;;
423  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424    srcdir=$ac_optarg ;;
425
426  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427  | --syscon | --sysco | --sysc | --sys | --sy)
428    ac_prev=sysconfdir ;;
429  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431    sysconfdir=$ac_optarg ;;
432
433  -target | --target | --targe | --targ | --tar | --ta | --t)
434    ac_prev=target_alias ;;
435  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436    target_alias=$ac_optarg ;;
437
438  -v | -verbose | --verbose | --verbos | --verbo | --verb)
439    verbose=yes ;;
440
441  -version | --version | --versio | --versi | --vers | -V)
442    ac_init_version=: ;;
443
444  -with-* | --with-*)
445    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446    # Reject names that are not valid shell variable names.
447    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448      { echo "$as_me: error: invalid package name: $ac_package" >&2
449   { (exit 1); exit 1; }; }
450    ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451    case "$ac_option" in
452      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453      *) ac_optarg=yes ;;
454    esac
455    eval "with_$ac_package='$ac_optarg'" ;;
456
457  -without-* | --without-*)
458    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459    # Reject names that are not valid shell variable names.
460    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461      { echo "$as_me: error: invalid package name: $ac_package" >&2
462   { (exit 1); exit 1; }; }
463    ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464    eval "with_$ac_package=no" ;;
465
466  --x)
467    # Obsolete; use --with-x.
468    with_x=yes ;;
469
470  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471  | --x-incl | --x-inc | --x-in | --x-i)
472    ac_prev=x_includes ;;
473  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475    x_includes=$ac_optarg ;;
476
477  -x-libraries | --x-libraries | --x-librarie | --x-librari \
478  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479    ac_prev=x_libraries ;;
480  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482    x_libraries=$ac_optarg ;;
483
484  -*dir | -dvi* | -doc* | -html* | -local* | -pdf* | -ps* )
485    echo "$as_me: WARNING: unsupported option: $ac_option" >&2
486    ;;
487
488  -*) { echo "$as_me: error: unrecognized option: $ac_option
489Try \`$0 --help' for more information." >&2
490   { (exit 1); exit 1; }; }
491    ;;
492
493  *=*)
494    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
495    # Reject names that are not valid shell variable names.
496    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
497      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
498   { (exit 1); exit 1; }; }
499    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
500    eval "$ac_envvar='$ac_optarg'"
501    export "$ac_envvar" ;;
502
503  *)
504    # FIXME: should be removed in autoconf 3.0.
505    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
506    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
507      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
508    : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
509    ;;
510
511  esac
512done
513
514if test -n "$ac_prev"; then
515  ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
516  { echo "$as_me: error: missing argument to $ac_option" >&2
517   { (exit 1); exit 1; }; }
518fi
519
520# Be sure to have absolute paths.
521for ac_var in exec_prefix prefix
522do
523  eval ac_val=$`echo "$ac_var"`
524  case "$ac_val" in
525    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
526    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
527   { (exit 1); exit 1; }; };;
528  esac
529done
530
531# Be sure to have absolute paths.
532for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
533              localstatedir libdir includedir oldincludedir infodir mandir
534do
535  eval ac_val=$`echo "$ac_var"`
536  case "$ac_val" in
537    [\\/$]* | ?:[\\/]* ) ;;
538    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
539   { (exit 1); exit 1; }; };;
540  esac
541done
542
543# There might be people who depend on the old broken behavior: `$host'
544# used to hold the argument of --host etc.
545build=$build_alias
546host=$host_alias
547target=$target_alias
548
549# FIXME: should be removed in autoconf 3.0.
550if test "x$host_alias" != x; then
551  if test "x$build_alias" = x; then
552    cross_compiling=maybe
553    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
554    If a cross compiler is detected then cross compile mode will be used." >&2
555  elif test "x$build_alias" != "x$host_alias"; then
556    cross_compiling=yes
557  fi
558fi
559
560ac_tool_prefix=
561test -n "$host_alias" && ac_tool_prefix=$host_alias-
562
563test "$silent" = yes && exec 6>/dev/null
564
565# Find the source files, if location was not specified.
566if test -z "$srcdir"; then
567  ac_srcdir_defaulted=yes
568  # Try the directory containing this script, then its parent.
569  ac_prog=$0
570  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
571  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
572  srcdir=$ac_confdir
573  if test ! -r "$srcdir/$ac_unique_file"; then
574    srcdir=..
575  fi
576else
577  ac_srcdir_defaulted=no
578fi
579if test ! -r "$srcdir/$ac_unique_file"; then
580  if test "$ac_srcdir_defaulted" = yes; then
581    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
582   { (exit 1); exit 1; }; }
583  else
584    { echo "$as_me: error: cannot find sources in $srcdir" >&2
585   { (exit 1); exit 1; }; }
586  fi
587fi
588srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
589ac_env_build_alias_set=${build_alias+set}
590ac_env_build_alias_value=$build_alias
591ac_cv_env_build_alias_set=${build_alias+set}
592ac_cv_env_build_alias_value=$build_alias
593ac_env_host_alias_set=${host_alias+set}
594ac_env_host_alias_value=$host_alias
595ac_cv_env_host_alias_set=${host_alias+set}
596ac_cv_env_host_alias_value=$host_alias
597ac_env_target_alias_set=${target_alias+set}
598ac_env_target_alias_value=$target_alias
599ac_cv_env_target_alias_set=${target_alias+set}
600ac_cv_env_target_alias_value=$target_alias
601ac_env_CC_set=${CC+set}
602ac_env_CC_value=$CC
603ac_cv_env_CC_set=${CC+set}
604ac_cv_env_CC_value=$CC
605ac_env_CFLAGS_set=${CFLAGS+set}
606ac_env_CFLAGS_value=$CFLAGS
607ac_cv_env_CFLAGS_set=${CFLAGS+set}
608ac_cv_env_CFLAGS_value=$CFLAGS
609ac_env_LDFLAGS_set=${LDFLAGS+set}
610ac_env_LDFLAGS_value=$LDFLAGS
611ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
612ac_cv_env_LDFLAGS_value=$LDFLAGS
613ac_env_CPPFLAGS_set=${CPPFLAGS+set}
614ac_env_CPPFLAGS_value=$CPPFLAGS
615ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
616ac_cv_env_CPPFLAGS_value=$CPPFLAGS
617ac_env_CPP_set=${CPP+set}
618ac_env_CPP_value=$CPP
619ac_cv_env_CPP_set=${CPP+set}
620ac_cv_env_CPP_value=$CPP
621ac_env_CXX_set=${CXX+set}
622ac_env_CXX_value=$CXX
623ac_cv_env_CXX_set=${CXX+set}
624ac_cv_env_CXX_value=$CXX
625ac_env_CXXFLAGS_set=${CXXFLAGS+set}
626ac_env_CXXFLAGS_value=$CXXFLAGS
627ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
628ac_cv_env_CXXFLAGS_value=$CXXFLAGS
629ac_env_CXXCPP_set=${CXXCPP+set}
630ac_env_CXXCPP_value=$CXXCPP
631ac_cv_env_CXXCPP_set=${CXXCPP+set}
632ac_cv_env_CXXCPP_value=$CXXCPP
633
634#
635# Report the --help message.
636#
637if test "$ac_init_help" = "long"; then
638  # Omit some internal or obsolete options to make the list less imposing.
639  # This message is too long to be a string in the A/UX 3.1 sh.
640  cat <<EOF
641\`configure' configures this package to adapt to many kinds of systems.
642
643Usage: $0 [OPTION]... [VAR=VALUE]...
644
645To assign environment variables (e.g., CC, CFLAGS...), specify them as
646VAR=VALUE.  See below for descriptions of some of the useful variables.
647
648Defaults for the options are specified in brackets.
649
650Configuration:
651  -h, --help              display this help and exit
652      --help=short        display options specific to this package
653      --help=recursive    display the short help of all the included packages
654  -V, --version           display version information and exit
655  -q, --quiet, --silent   do not print \`checking...' messages
656      --cache-file=FILE   cache test results in FILE [disabled]
657  -C, --config-cache      alias for \`--cache-file=config.cache'
658  -n, --no-create         do not create output files
659      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
660
661EOF
662
663  cat <<EOF
664Installation directories:
665  --prefix=PREFIX         install architecture-independent files in PREFIX
666                          [$ac_default_prefix]
667  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
668                          [PREFIX]
669
670By default, \`make install' will install all the files in
671\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
672an installation prefix other than \`$ac_default_prefix' using \`--prefix',
673for instance \`--prefix=\$HOME'.
674
675For better control, use the options below.
676
677Fine tuning of the installation directories:
678  --bindir=DIR            user executables [EPREFIX/bin]
679  --sbindir=DIR           system admin executables [EPREFIX/sbin]
680  --libexecdir=DIR        program executables [EPREFIX/libexec]
681  --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
682  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
683  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
684  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
685  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
686  --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
687  --libdir=DIR            object code libraries [EPREFIX/lib]
688  --includedir=DIR        C header files [PREFIX/include]
689  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
690  --infodir=DIR           info documentation [DATAROOTDIR/info]
691  --mandir=DIR            man documentation [DATAROOTDIR/man]
692EOF
693
694  cat <<\EOF
695
696Program names:
697  --program-prefix=PREFIX            prepend PREFIX to installed program names
698  --program-suffix=SUFFIX            append SUFFIX to installed program names
699  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
700
701System types:
702  --build=BUILD           configure for building on BUILD [guessed]
703  --host=HOST       build programs to run on HOST [BUILD]
704  --target=TARGET   configure for building compilers for TARGET [HOST]
705EOF
706fi
707
708if test -n "$ac_init_help"; then
709
710  cat <<\EOF
711
712Optional Packages:
713  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
714  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
715
716Optional Features:
717  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
718  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
719
720  --with-rel-version=XXX  override derived release version
721  --with-abi-version=XXX  override derived ABI version
722  --with-system-type=XXX  test: override derived host system-type
723  --with-abi-altered=XXX  override visible ABI version, for packaging
724  --without-ada           suppress check for Ada compiler
725  --without-cxx           do not adjust ncurses bool to match C++
726  --without-cxx-binding   do not build C++ binding and demo
727  --disable-db-install    suppress install of terminal database
728  --without-manpages      suppress install of manpages
729  --without-progs         suppress build/install with programs (e.g., tic)
730  --without-tests         suppress build/install with test-programs
731  --without-curses-h      install curses.h as ncurses.h only
732  --with-config-suffix=X  name ncurses*X-config file with X
733  --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD
734  --with-pkg-config-libdir[=XXX] use given directory for installing pc-files
735  --enable-pc-files       generate and install .pc files for pkg-config
736  --with-pc-suffix[=XXX]  suffix pkg-config files with XXX
737  --enable-mixed-case     tic should assume mixed-case filenames
738  --with-install-prefix=DESTDIR use DESTDIR as installation directory prefix
739  --enable-install-prefix merge DESTDIR with installation prefix
740Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
741  --with-build-cc=XXX     the build C compiler ($BUILD_CC)
742  --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
743  --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
744  --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
745  --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
746  --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
747Options to Specify the Libraries Built/Used:
748  --disable-libtool-version  enable to use libtool's incompatible naming scheme
749  --with-libtool          generate libraries with libtool
750  --with-shared           generate shared-libraries
751  --with-normal           generate normal-libraries (default)
752  --with-debug            generate debug-libraries (default)
753  --with-profile          generate profile-libraries
754  --with-cxx-shared       generate C++ shared-libraries
755  --with-lib-prefix       override library-prefix
756  --with-termlib          generate separate terminfo library
757  --with-ticlib           generate separate tic library
758  --enable-rpath          use rpath option when generating shared libraries
759  --disable-relink        relink shared libraries during install
760  --with-shlib-version[={rel|abi}] use release or ABI version in shared library file names
761  --with-libtool-opts[=XXX] give libtool additional options XXX
762  --with-export-syms[=SYM-FILE] limit symbols exported by libtool to those listed in SYM-FILE
763  --with-versioned-syms[=MAP-FILE] version ELF shared library symbols per MAP-FILE
764  --with-gpm              use Alessandro Rubini's GPM library
765  --without-dlsym         do not use dlsym() to load GPM dynamically
766  --with-pcre2            use PCRE2 for regular-expressions
767  --with-sysmouse         use sysmouse (FreeBSD console)
768  --disable-lib-suffixes  disable library suffixes
769  --disable-rpath-hack    don't add rpath options for additional libraries
770  --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
771Fine-Tuning Your Configuration:
772  --with-extra-suffix[=X] append extra suffix X to header/library paths
773  --disable-overwrite     put headers in subdir, omit link to -lcurses
774  --disable-database      do not use terminfo, only fallbacks/termcap
775  --with-database=XXX     specify terminfo source to install
776  --with-hashed-db        specify hashed-database library
777  --with-fallbacks=XXX    specify list of fallback terminal descriptions
778  --with-tic-path=XXX     specify path of tic for fallbacks
779  --with-infocmp-path=XXX     specify path of infocmp for fallbacks
780  --without-xterm-new     specify if xterm terminfo should be old version
781  --with-xterm-kbs[=XXX]  specify if xterm backspace-key sends BS or DEL
782  --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
783  --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
784  --disable-big-core      assume machine has little memory
785  --disable-big-strings   assume compiler has only standard-size strings
786  --enable-termcap        compile in termcap fallback support
787  --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
788  --enable-getcap         fast termcap load, no xrefs to terminfo
789  --enable-getcap-cache   cache translated termcaps in ~/.terminfo
790  --disable-home-terminfo drop ~/.terminfo from terminfo search-path
791  --disable-root-environ  restrict root use of ncurses environment variables
792  --disable-root-access   restrict file-access when running setuid
793  --disable-setuid-environ restrict setuid use of ncurses environment variables
794  --enable-symlinks       make tic use symbolic links not hard links
795  --enable-broken_linker  compile with broken-linker support code
796  --enable-bsdpad         recognize BSD-style prefix padding
797  --disable-widec         compile without wide character and UTF-8 support
798  --disable-lp64          allow chtype to be long (ignore _LP64)
799  --disable-largefile     omit support for large files
800  --disable-tparm-varargs compile tparm() without varargs interface
801  --disable-tic-depends   link tic library without explicit dependency on ncurses library
802  --enable-wattr-macros   enable wattr* macros
803  --with-x11-rgb=FILE     obtain X11 color definitions from FILE (default: EPREFIX/lib/X11/rgb.txt)
804  --with-bool=TYPE        fall back to TYPE for curses 'bool' typedef
805  --with-caps=alt         compile with alternate Caps file
806  --with-chtype=TYPE      override type of chtype
807  --with-ospeed=TYPE      override type of ospeed variable
808  --with-mmask-t=TYPE     override type of mmask_t
809  --with-ccharw-max=XXX   override size CCHARW_MAX
810  --enable-signed-char    use signed chars for Boolean array in term.h
811  --with-tparm-arg=TYPE   override parameter type of tparm
812  --with-rcs-ids          compile-in RCS identifiers
813Extensions:
814  --disable-ext-funcs     disable function-extensions
815  --enable-sp-funcs       enable SCREEN-extensions
816  --enable-term-driver    enable terminal-driver
817  --enable-const          compile with extra/non-standard const
818  --enable-ext-colors     compile for 256-color support
819  --enable-rgb-color      compile for extended direct-color
820  --enable-ext-mouse      compile for extended mouse-encoding
821  --enable-ext-putwin     compile with extended putwin/screendump
822  --enable-no-padding     compile with $NCURSES_NO_PADDING code
823  --enable-sigwinch       compile with SIGWINCH handler
824  --enable-tcap-names     compile with user-definable terminal capabilities
825  --enable-named-pipes    use named pipes with Windows driver
826Reentrant Code:
827  --with-pthread          use POSIX thread library
828  --enable-pthreads-eintr enable EINTR in wgetch with pthreads
829  --enable-weak-symbols   enable weak-symbols for pthreads
830  --enable-reentrant      compile with reentrant code
831  --disable-opaque-curses do not make WINDOW, etc., structures opaque
832  --disable-opaque-form   do not make form library structures opaque
833  --disable-opaque-menu   do not make menu library structures opaque
834  --disable-opaque-panel  do not make panel library structures opaque
835  --with-wrap-prefix=XXX  override prefix used for public variables
836Development Code:
837  --without-develop       disable development options
838  --enable-check-size     compile-in code to detect screensize of serial terminals
839  --enable-hard-tabs      compile with hard-tabs code
840  --enable-xmc-glitch     compile with support for xmc (magic-cookie)
841Experimental Code:
842  --disable-assumed-color do not assume anything about default-colors
843  --disable-hashmap       compile without hashmap scrolling-optimization
844  --enable-colorfgbg      compile-in experimental $COLORFGBG code
845  --enable-fvisibility    compile with -fvisibility=hidden
846  --enable-interop        compile-in interop bindings
847  --enable-safe-sprintf   compile with experimental safe-sprintf code
848  --disable-scroll-hints  compile without scroll-hints code
849  --enable-wgetch-events  compile with wgetch-events code
850  --enable-exp-win32      obsolete option for Windows driver
851Testing/development Options:
852  --disable-echo          do not display "compiling" commands
853  --disable-stripping     do not strip (debug info) installed executables
854  --with-strip-program=XX specify program to use when stripping in install
855  --enable-warnings       test: turn on gcc compiler warnings
856  --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
857  --enable-string-hacks   work around bogus compiler/loader warnings
858  --enable-assertions     test: turn on generation of assertion code
859  --with-dmalloc          test: use Gray Watson's dmalloc library
860  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
861  --with-valgrind         test: use valgrind
862  --disable-leaks         test: free permanent memory, analyze leaks
863  --enable-expanded       test: generate functions for certain macros
864  --disable-macros        test: use functions rather than macros
865  --with-trace            test: add trace() function to all models of ncurses
866  --disable-gnat-projects test: disable GNAT projects even if usable
867Ada Binding Options:
868  --with-ada-compiler[=CMD] use CMD as Ada95 compiler (default: gnatmake)
869  --with-ada-include=DIR  find Ada95 includes in DIR (default: PREFIX/share/ada/adainclude)
870  --with-ada-objects=DIR  find Ada95 objects in DIR (default: PREFIX/lib/ada/adalib)
871  --with-ada-sharedlib    build Ada95 shared library; requires GNAT project support
872  --with-ada-libname[=XXX]  use XXX as Ada95 library name
873Library basenames for pkgsrc:
874  --with-form-libname[=XXX] override ifelse(,,form,) basename of library
875  --with-menu-libname[=XXX] override ifelse(,,menu,) basename of library
876  --with-panel-libname[=XXX] override ifelse(,,panel,) basename of library
877  --with-cxx-libname[=XXX] override ifelse(ncurses++,,cxx,ncurses++) basename of library
878Options to Specify How Manpages are Installed:
879  --with-manpage-format   specify man page format: gzip/compress/bzip2/xz,
880                          BSDI/normal and optionally formatted/catonly,
881                          e.g., gzip,formatted
882  --with-manpage-renames  specify man page renaming
883  --with-manpage-aliases  specify man page aliases using .so
884  --with-manpage-symlinks specify man page aliases using symlinks
885  --with-manpage-tbl      specify man page processing with tbl
886
887Some influential environment variables:
888  CC          C compiler command
889  CFLAGS      C compiler flags
890  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
891              nonstandard directory <lib dir>
892  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
893              headers in a nonstandard directory <include dir>
894  CPP         C preprocessor
895  CXX         C++ compiler command
896  CXXFLAGS    C++ compiler flags
897  CXXCPP      C++ preprocessor
898
899Use these variables to override the choices made by `configure' or to help
900it to find libraries and programs with nonstandard names/locations.
901
902EOF
903fi
904
905if test "$ac_init_help" = "recursive"; then
906  # If there are subdirs, report their specific --help.
907  ac_popdir=`pwd`
908  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
909    cd "$ac_subdir"
910    # A "../" for each directory in /$ac_subdir.
911    ac_dots=`echo "$ac_subdir" |
912             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
913
914    case "$srcdir" in
915    .) # No --srcdir option.  We are building in place.
916      ac_sub_srcdir="$srcdir" ;;
917    [\\/]* | ?:[\\/]* ) # Absolute path.
918      ac_sub_srcdir="$srcdir/$ac_subdir" ;;
919    *) # Relative path.
920      ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
921    esac
922
923    # Check for guested configure; otherwise get Cygnus style configure.
924    if test -f "$ac_sub_srcdir/configure.gnu"; then
925      echo
926      $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
927    elif test -f "$ac_sub_srcdir/configure"; then
928      echo
929      $SHELL "$ac_sub_srcdir/configure" --help=recursive
930    elif test -f "$ac_sub_srcdir/configure.ac" ||
931           test -f "$ac_sub_srcdir/configure.in"; then
932      echo
933      "$ac_configure" --help
934    else
935      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
936    fi
937    cd "$ac_popdir"
938  done
939fi
940
941test -n "$ac_init_help" && exit 0
942if "$ac_init_version"; then
943  cat <<\EOF
944
945Copyright 2003-2022,2023	Thomas E. Dickey
946Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
947Free Software Foundation, Inc.
948This configure script is free software; the Free Software Foundation
949gives unlimited permission to copy, distribute and modify it.
950EOF
951  exit 0
952fi
953exec 5>config.log
954cat >&5 <<EOF
955This file contains any messages produced by compilers while
956running configure, to aid debugging if configure makes a mistake.
957
958It was created by $as_me, which was
959generated by GNU Autoconf 2.52.20250126.  Invocation command line was
960
961  $ $0 $@
962
963EOF
964{
965cat <<_ASUNAME
966## ---------- ##
967## Platform.  ##
968## ---------- ##
969
970hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
971uname -m = `(uname -m) 2>/dev/null || echo unknown`
972uname -r = `(uname -r) 2>/dev/null || echo unknown`
973uname -s = `(uname -s) 2>/dev/null || echo unknown`
974uname -v = `(uname -v) 2>/dev/null || echo unknown`
975
976/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
977/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
978
979/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
980/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
981/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
982hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
983/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
984/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
985/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
986
987PATH = $PATH
988
989_ASUNAME
990} >&5
991
992cat >&5 <<EOF
993## ------------ ##
994## Core tests.  ##
995## ------------ ##
996
997EOF
998
999# Keep a trace of the command line.
1000# Strip out --no-create and --no-recursion so they do not pile up.
1001# Also quote any args containing shell meta-characters.
1002ac_configure_args=
1003ac_sep=
1004for ac_arg
1005do
1006  case "$ac_arg" in
1007  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1008  | --no-cr | --no-c) ;;
1009  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1010  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1011  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1012    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1013    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1014    ac_sep=" " ;;
1015  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1016     ac_sep=" " ;;
1017  esac
1018  # Get rid of the leading space.
1019done
1020
1021# When interrupted or exit'd, cleanup temporary files, and complete
1022# config.log.  We remove comments because anyway the quotes in there
1023# would cause problems or look ugly.
1024trap 'exit_status=$?
1025  # Save into config.log some information that might help in debugging.
1026  echo >&5
1027  echo "## ----------------- ##" >&5
1028  echo "## Cache variables.  ##" >&5
1029  echo "## ----------------- ##" >&5
1030  echo >&5
1031  # The following way of writing the cache mishandles newlines in values,
1032{
1033  (set) 2>&1 |
1034    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1035    *ac_space=\ *)
1036      sed -n \
1037        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1038    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1039      ;;
1040    *)
1041      sed -n \
1042        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1043      ;;
1044    esac;
1045} >&5
1046  sed "/^$/d" confdefs.h >conftest.log
1047  if test -s conftest.log; then
1048    echo >&5
1049    echo "## ------------ ##" >&5
1050    echo "## confdefs.h.  ##" >&5
1051    echo "## ------------ ##" >&5
1052    echo >&5
1053    cat conftest.log >&5
1054  fi
1055  (echo; echo) >&5
1056  test "$ac_signal" != 0 &&
1057    echo "$as_me: caught signal $ac_signal" >&5
1058  echo "$as_me: exit $exit_status" >&5
1059  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1060    exit $exit_status
1061     ' 0
1062for ac_signal in 1 2 13 15; do
1063  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1064done
1065ac_signal=0
1066
1067# confdefs.h avoids OS command line length limits that DEFS can exceed.
1068rm -rf conftest* confdefs.h
1069# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1070echo >confdefs.h
1071
1072# Let the site file select an alternate cache file if it wants to.
1073# Prefer explicitly selected file to automatically selected ones.
1074if test -z "$CONFIG_SITE"; then
1075  if test "x$prefix" != xNONE; then
1076    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1077  else
1078    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1079  fi
1080fi
1081for ac_site_file in $CONFIG_SITE; do
1082  if test -r "$ac_site_file"; then
1083    { echo "$as_me:1083: loading site script $ac_site_file" >&5
1084echo "$as_me: loading site script $ac_site_file" >&6;}
1085    cat "$ac_site_file" >&5
1086    . "$ac_site_file"
1087  fi
1088done
1089
1090if test -r "$cache_file"; then
1091  # Some versions of bash will fail to source /dev/null (special
1092  # files actually), so we avoid doing that.
1093  if test -f "$cache_file"; then
1094    { echo "$as_me:1094: loading cache $cache_file" >&5
1095echo "$as_me: loading cache $cache_file" >&6;}
1096    case $cache_file in
1097      [\\/]* | ?:[\\/]* ) . $cache_file;;
1098      *)                      . ./$cache_file;;
1099    esac
1100  fi
1101else
1102  { echo "$as_me:1102: creating cache $cache_file" >&5
1103echo "$as_me: creating cache $cache_file" >&6;}
1104  >$cache_file
1105fi
1106
1107# Check that the precious variables saved in the cache have kept the same
1108# value.
1109ac_cache_corrupted=false
1110for ac_var in `(set) 2>&1 |
1111               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1112  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1113  eval ac_new_set=\$ac_env_${ac_var}_set
1114  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1115  eval ac_new_val="\$ac_env_${ac_var}_value"
1116  case "$ac_old_set,$ac_new_set" in
1117    set,)
1118      { echo "$as_me:1118: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1119echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1120      ac_cache_corrupted=: ;;
1121    ,set)
1122      { echo "$as_me:1122: error: \`$ac_var' was not set in the previous run" >&5
1123echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1124      ac_cache_corrupted=: ;;
1125    ,);;
1126    *)
1127      if test "x$ac_old_val" != "x$ac_new_val"; then
1128        { echo "$as_me:1128: error: \`$ac_var' has changed since the previous run:" >&5
1129echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1130        { echo "$as_me:1130:   former value:  $ac_old_val" >&5
1131echo "$as_me:   former value:  $ac_old_val" >&2;}
1132        { echo "$as_me:1132:   current value: $ac_new_val" >&5
1133echo "$as_me:   current value: $ac_new_val" >&2;}
1134        ac_cache_corrupted=:
1135      fi;;
1136  esac
1137  # Pass precious variables to config.status.  It doesn't matter if
1138  # we pass some twice (in addition to the command line arguments).
1139  if test "$ac_new_set" = set; then
1140    case "$ac_new_val" in
1141    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1142      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1143      ac_configure_args="$ac_configure_args '$ac_arg'"
1144      ;;
1145    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1146       ;;
1147    esac
1148  fi
1149done
1150if "$ac_cache_corrupted"; then
1151  { echo "$as_me:1151: error: changes in the environment can compromise the build" >&5
1152echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1153  { { echo "$as_me:1153: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1154echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1155   { (exit 1); exit 1; }; }
1156fi
1157
1158ac_ext=c
1159ac_cpp='$CPP $CPPFLAGS'
1160ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1161ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1162ac_compiler_gnu=$ac_cv_c_compiler_gnu
1163ac_main_return="return"
1164
1165case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1166  *c*,-n*) ECHO_N=
1167           ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1168           ECHO_T='	'
1169           ;;
1170  *c*,*  ) ECHO_N=-n
1171           ECHO_C=
1172           ECHO_T=
1173           ;;
1174  *)       ECHO_N=
1175           ECHO_C='\c'
1176           ECHO_T=
1177           ;;
1178esac
1179echo "#! $SHELL" >conftest.sh
1180echo  "exit 0"   >>conftest.sh
1181chmod +x conftest.sh
1182if { (echo "$as_me:1182: PATH=\".;.\"; conftest.sh") >&5
1183  (PATH=".;."; conftest.sh) 2>&5
1184  ac_status=$?
1185  echo "$as_me:1185: \$? = $ac_status" >&5
1186  (exit "$ac_status"); }; then
1187  ac_path_separator=';'
1188else
1189  ac_path_separator=:
1190fi
1191PATH_SEPARATOR="$ac_path_separator"
1192rm -f conftest.sh
1193
1194ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1195
1196top_builddir=`pwd`
1197
1198for ac_prog in ggrep grep
1199do
1200  # Extract the first word of "$ac_prog", so it can be a program name with args.
1201set dummy $ac_prog; ac_word=$2
1202echo "$as_me:1202: checking for $ac_word" >&5
1203echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1204if test "${ac_cv_prog_GREP+set}" = set; then
1205  echo $ECHO_N "(cached) $ECHO_C" >&6
1206else
1207  if test -n "$GREP"; then
1208  ac_cv_prog_GREP="$GREP" # Let the user override the test.
1209else
1210  ac_save_IFS=$IFS; IFS=$ac_path_separator
1211ac_dummy="$PATH"
1212for ac_dir in $ac_dummy; do
1213  IFS=$ac_save_IFS
1214  test -z "$ac_dir" && ac_dir=.
1215  $as_executable_p "$ac_dir/$ac_word" || continue
1216ac_cv_prog_GREP="$ac_prog"
1217echo "$as_me:1217: found $ac_dir/$ac_word" >&5
1218break
1219done
1220
1221fi
1222fi
1223GREP=$ac_cv_prog_GREP
1224if test -n "$GREP"; then
1225  echo "$as_me:1225: result: $GREP" >&5
1226echo "${ECHO_T}$GREP" >&6
1227else
1228  echo "$as_me:1228: result: no" >&5
1229echo "${ECHO_T}no" >&6
1230fi
1231
1232  test -n "$GREP" && break
1233done
1234test -n "$GREP" || GREP=": "
1235
1236echo "$as_me:1236: checking for egrep" >&5
1237echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1238if test "${ac_cv_path_EGREP+set}" = set; then
1239  echo $ECHO_N "(cached) $ECHO_C" >&6
1240else
1241  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1242   then ac_cv_path_EGREP="$GREP -E"
1243   else
1244     for ac_prog in gegrep egrep
1245do
1246  # Extract the first word of "$ac_prog", so it can be a program name with args.
1247set dummy $ac_prog; ac_word=$2
1248echo "$as_me:1248: checking for $ac_word" >&5
1249echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1250if test "${ac_cv_path_EGREP+set}" = set; then
1251  echo $ECHO_N "(cached) $ECHO_C" >&6
1252else
1253  case $EGREP in
1254  [\\/]* | ?:[\\/]*)
1255  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1256  ;;
1257  *)
1258  ac_save_IFS=$IFS; IFS=$ac_path_separator
1259ac_dummy="$PATH"
1260for ac_dir in $ac_dummy; do
1261  IFS=$ac_save_IFS
1262  test -z "$ac_dir" && ac_dir=.
1263  if $as_executable_p "$ac_dir/$ac_word"; then
1264   ac_cv_path_EGREP="$ac_dir/$ac_word"
1265   echo "$as_me:1265: found $ac_dir/$ac_word" >&5
1266   break
1267fi
1268done
1269
1270  ;;
1271esac
1272fi
1273EGREP=$ac_cv_path_EGREP
1274
1275if test -n "$EGREP"; then
1276  echo "$as_me:1276: result: $EGREP" >&5
1277echo "${ECHO_T}$EGREP" >&6
1278else
1279  echo "$as_me:1279: result: no" >&5
1280echo "${ECHO_T}no" >&6
1281fi
1282
1283  test -n "$EGREP" && break
1284done
1285test -n "$EGREP" || EGREP=": "
1286
1287     test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1287: error: cannot find workable egrep" >&5
1288echo "$as_me: error: cannot find workable egrep" >&2;}
1289   { (exit 1); exit 1; }; }
1290   fi
1291fi
1292echo "$as_me:1292: result: $ac_cv_path_EGREP" >&5
1293echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1294 EGREP="$ac_cv_path_EGREP"
1295
1296NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[ 	]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1297NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[ 	]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1298NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[ 	]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1299cf_cv_abi_version=${NCURSES_MAJOR}
1300cf_cv_abi_default=${NCURSES_MAJOR}
1301cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1302cf_cv_timestamp=`date`
1303echo "$as_me:1303: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&5
1304echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&6
1305
1306if test -f "$srcdir/VERSION" ; then
1307	echo "$as_me:1307: checking for package version" >&5
1308echo $ECHO_N "checking for package version... $ECHO_C" >&6
1309
1310	# if there are not enough fields, cut returns the last one...
1311	cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1312	cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1313	cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1314
1315	# this is how CF_BUNDLED_INTL uses $VERSION:
1316	VERSION="$cf_field1"
1317
1318	VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1319	test -z "$VERSION_MAJOR" && { { echo "$as_me:1319: error: missing major-version" >&5
1320echo "$as_me: error: missing major-version" >&2;}
1321   { (exit 1); exit 1; }; }
1322
1323	VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1324	test -z "$VERSION_MINOR" && { { echo "$as_me:1324: error: missing minor-version" >&5
1325echo "$as_me: error: missing minor-version" >&2;}
1326   { (exit 1); exit 1; }; }
1327
1328	echo "$as_me:1328: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1329echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1330
1331	echo "$as_me:1331: checking for package patch date" >&5
1332echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1333	VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1334	case .$VERSION_PATCH in
1335	(.)
1336		{ { echo "$as_me:1336: error: missing patch-date $VERSION_PATCH" >&5
1337echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1338   { (exit 1); exit 1; }; }
1339		;;
1340	(.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1341		;;
1342	(*)
1343		{ { echo "$as_me:1343: error: illegal patch-date $VERSION_PATCH" >&5
1344echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1345   { (exit 1); exit 1; }; }
1346		;;
1347	esac
1348	echo "$as_me:1348: result: $VERSION_PATCH" >&5
1349echo "${ECHO_T}$VERSION_PATCH" >&6
1350else
1351	{ { echo "$as_me:1351: error: did not find $srcdir/VERSION" >&5
1352echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1353   { (exit 1); exit 1; }; }
1354fi
1355
1356# show the actual data that we have for versions:
1357test -n "$verbose" && echo "	ABI VERSION $VERSION" 1>&6
1358
1359echo "${as_me:-configure}:1359: testing ABI VERSION $VERSION ..." 1>&5
1360
1361test -n "$verbose" && echo "	VERSION_MAJOR $VERSION_MAJOR" 1>&6
1362
1363echo "${as_me:-configure}:1363: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1364
1365test -n "$verbose" && echo "	VERSION_MINOR $VERSION_MINOR" 1>&6
1366
1367echo "${as_me:-configure}:1367: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1368
1369test -n "$verbose" && echo "	VERSION_PATCH $VERSION_PATCH" 1>&6
1370
1371echo "${as_me:-configure}:1371: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1372
1373	PROGRAM=NCURSES
1374	PACKAGE=ncurses
1375
1376cat >>confdefs.h <<EOF
1377#define PACKAGE "$PACKAGE"
1378EOF
1379
1380cat >>confdefs.h <<EOF
1381#define NCURSES_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1382EOF
1383
1384cat >>confdefs.h <<EOF
1385#define NCURSES_PATCHDATE ${VERSION_PATCH}
1386EOF
1387
1388test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1389
1390# Check whether --with-rel-version or --without-rel-version was given.
1391if test "${with_rel_version+set}" = set; then
1392  withval="$with_rel_version"
1393  { echo "$as_me:1393: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1394echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1395 cf_cv_rel_version=$withval
1396fi;
1397
1398 NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1399 NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1400 test -n "NCURSES_MINOR" || NCURSES_MINOR=0
1401
1402if test -n "$NCURSES_MAJOR" ; then
1403  case `echo "$NCURSES_MAJOR" | sed -e 's/^[0-9]*$/0/g'` in
1404  (0)
1405 	;;
1406  (*)
1407	{ { echo "$as_me:1407: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1408echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1409   { (exit 1); exit 1; }; }
1410 	;;
1411  esac
1412else
1413  { { echo "$as_me:1413: error: Release major-version value is empty" >&5
1414echo "$as_me: error: Release major-version value is empty" >&2;}
1415   { (exit 1); exit 1; }; }
1416fi
1417
1418if test -n "$NCURSES_MINOR" ; then
1419  case `echo "$NCURSES_MINOR" | sed -e 's/^[0-9]*$/0/g'` in
1420  (0)
1421 	;;
1422  (*)
1423	{ { echo "$as_me:1423: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1424echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1425   { (exit 1); exit 1; }; }
1426 	;;
1427  esac
1428else
1429  { { echo "$as_me:1429: error: Release minor-version value is empty" >&5
1430echo "$as_me: error: Release minor-version value is empty" >&2;}
1431   { (exit 1); exit 1; }; }
1432fi
1433
1434test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1435
1436# Check whether --with-abi-version or --without-abi-version was given.
1437if test "${with_abi_version+set}" = set; then
1438  withval="$with_abi_version"
1439
1440	if test "x$cf_cv_abi_version" != "x$withval"
1441	then
1442		{ echo "$as_me:1442: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1443echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1444		case "$cf_cv_rel_version" in
1445		(5.*)
1446			cf_cv_rel_version=$withval.0
1447			;;
1448		(6.*)
1449			cf_cv_rel_version=$withval.9	# FIXME: should be 10 as of 6.0 release
1450			;;
1451		esac
1452	fi
1453	cf_cv_abi_version=$withval
1454fi;
1455
1456if test -n "$cf_cv_abi_version" ; then
1457  case `echo "$cf_cv_abi_version" | sed -e 's/^[0-9]*$/0/g'` in
1458  (0)
1459 	;;
1460  (*)
1461	{ { echo "$as_me:1461: error: ABI version is not a number: $cf_cv_abi_version" >&5
1462echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1463   { (exit 1); exit 1; }; }
1464 	;;
1465  esac
1466else
1467  { { echo "$as_me:1467: error: ABI version value is empty" >&5
1468echo "$as_me: error: ABI version value is empty" >&2;}
1469   { (exit 1); exit 1; }; }
1470fi
1471
1472cf_cv_abi_default=$cf_cv_abi_version
1473
1474if test "x$cf_cv_abi_version" != "x$with_abi_version"
1475then
1476	case "$cf_cv_rel_version" in
1477	(5.*)
1478		cf_cv_rel_version=$with_abi_version.0
1479		;;
1480	esac
1481fi
1482
1483ac_aux_dir=
1484for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1485  if test -f "$ac_dir/install-sh"; then
1486    ac_aux_dir=$ac_dir
1487    ac_install_sh="$ac_aux_dir/install-sh -c"
1488    break
1489  elif test -f "$ac_dir/install.sh"; then
1490    ac_aux_dir=$ac_dir
1491    ac_install_sh="$ac_aux_dir/install.sh -c"
1492    break
1493  elif test -f "$ac_dir/shtool"; then
1494    ac_aux_dir=$ac_dir
1495    ac_install_sh="$ac_aux_dir/shtool install -c"
1496    break
1497  fi
1498done
1499if test -z "$ac_aux_dir"; then
1500  { { echo "$as_me:1500: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1501echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1502   { (exit 1); exit 1; }; }
1503fi
1504ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1505ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1506ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1507
1508# Make sure we can run config.sub.
1509$ac_config_sub sun4 >/dev/null 2>&1 ||
1510  { { echo "$as_me:1510: error: cannot run $ac_config_sub" >&5
1511echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1512   { (exit 1); exit 1; }; }
1513
1514echo "$as_me:1514: checking build system type" >&5
1515echo $ECHO_N "checking build system type... $ECHO_C" >&6
1516if test "${ac_cv_build+set}" = set; then
1517  echo $ECHO_N "(cached) $ECHO_C" >&6
1518else
1519  ac_cv_build_alias=$build_alias
1520test -z "$ac_cv_build_alias" &&
1521  ac_cv_build_alias=`$ac_config_guess`
1522test -z "$ac_cv_build_alias" &&
1523  { { echo "$as_me:1523: error: cannot guess build type; you must specify one" >&5
1524echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1525   { (exit 1); exit 1; }; }
1526ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1527  { { echo "$as_me:1527: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1528echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1529   { (exit 1); exit 1; }; }
1530
1531fi
1532echo "$as_me:1532: result: $ac_cv_build" >&5
1533echo "${ECHO_T}$ac_cv_build" >&6
1534build=$ac_cv_build
1535build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1536build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1537build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1538
1539echo "$as_me:1539: checking host system type" >&5
1540echo $ECHO_N "checking host system type... $ECHO_C" >&6
1541if test "${ac_cv_host+set}" = set; then
1542  echo $ECHO_N "(cached) $ECHO_C" >&6
1543else
1544  ac_cv_host_alias=$host_alias
1545test -z "$ac_cv_host_alias" &&
1546  ac_cv_host_alias=$ac_cv_build_alias
1547ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1548  { { echo "$as_me:1548: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1549echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1550   { (exit 1); exit 1; }; }
1551
1552fi
1553echo "$as_me:1553: result: $ac_cv_host" >&5
1554echo "${ECHO_T}$ac_cv_host" >&6
1555host=$ac_cv_host
1556host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1557host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1558host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1559
1560if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1561	echo "$as_me:1561: checking target system type" >&5
1562echo $ECHO_N "checking target system type... $ECHO_C" >&6
1563if test "${ac_cv_target+set}" = set; then
1564  echo $ECHO_N "(cached) $ECHO_C" >&6
1565else
1566  ac_cv_target_alias=$target_alias
1567test "x$ac_cv_target_alias" = "x" &&
1568  ac_cv_target_alias=$ac_cv_host_alias
1569ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1570  { { echo "$as_me:1570: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1571echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1572   { (exit 1); exit 1; }; }
1573
1574fi
1575echo "$as_me:1575: result: $ac_cv_target" >&5
1576echo "${ECHO_T}$ac_cv_target" >&6
1577target=$ac_cv_target
1578target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1579target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1580target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1581
1582# The aliases save the names the user supplied, while $host etc.
1583# will get canonicalized.
1584test -n "$target_alias" &&
1585  test "$program_prefix$program_suffix$program_transform_name" = \
1586    NONENONEs,x,x, &&
1587  program_prefix=${target_alias}-
1588	system_name="$host_os"
1589else
1590	system_name="`(uname -s -r) 2>/dev/null`"
1591	if test -z "$system_name" ; then
1592		system_name="`(hostname) 2>/dev/null`"
1593	fi
1594fi
1595test -n "$system_name" &&
1596cat >>confdefs.h <<EOF
1597#define SYSTEM_NAME "$system_name"
1598EOF
1599
1600if test "${cf_cv_system_name+set}" = set; then
1601  echo $ECHO_N "(cached) $ECHO_C" >&6
1602else
1603  cf_cv_system_name="$system_name"
1604fi
1605
1606test -z "$system_name" && system_name="$cf_cv_system_name"
1607test -n "$cf_cv_system_name" && echo "$as_me:1607: result: Configuring for $cf_cv_system_name" >&5
1608echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1609
1610if test ".$system_name" != ".$cf_cv_system_name" ; then
1611	echo "$as_me:1611: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1612echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1613	{ { echo "$as_me:1613: error: \"Please remove config.cache and try again.\"" >&5
1614echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1615   { (exit 1); exit 1; }; }
1616fi
1617
1618# Check whether --with-system-type or --without-system-type was given.
1619if test "${with_system_type+set}" = set; then
1620  withval="$with_system_type"
1621  { echo "$as_me:1621: WARNING: overriding system type to $withval" >&5
1622echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1623	cf_cv_system_name=$withval
1624	host_os=$withval
1625
1626fi;
1627
1628###	Save the given $CFLAGS to allow user-override.
1629cf_user_CFLAGS="$CFLAGS"
1630
1631###	Default install-location
1632echo "$as_me:1632: checking for fgrep" >&5
1633echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1634if test "${ac_cv_path_FGREP+set}" = set; then
1635  echo $ECHO_N "(cached) $ECHO_C" >&6
1636else
1637  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1638   then ac_cv_path_FGREP="$GREP -F"
1639   else
1640     for ac_prog in gfgrep fgrep
1641do
1642  # Extract the first word of "$ac_prog", so it can be a program name with args.
1643set dummy $ac_prog; ac_word=$2
1644echo "$as_me:1644: checking for $ac_word" >&5
1645echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1646if test "${ac_cv_path_FGREP+set}" = set; then
1647  echo $ECHO_N "(cached) $ECHO_C" >&6
1648else
1649  case $FGREP in
1650  [\\/]* | ?:[\\/]*)
1651  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1652  ;;
1653  *)
1654  ac_save_IFS=$IFS; IFS=$ac_path_separator
1655ac_dummy="$PATH"
1656for ac_dir in $ac_dummy; do
1657  IFS=$ac_save_IFS
1658  test -z "$ac_dir" && ac_dir=.
1659  if $as_executable_p "$ac_dir/$ac_word"; then
1660   ac_cv_path_FGREP="$ac_dir/$ac_word"
1661   echo "$as_me:1661: found $ac_dir/$ac_word" >&5
1662   break
1663fi
1664done
1665
1666  ;;
1667esac
1668fi
1669FGREP=$ac_cv_path_FGREP
1670
1671if test -n "$FGREP"; then
1672  echo "$as_me:1672: result: $FGREP" >&5
1673echo "${ECHO_T}$FGREP" >&6
1674else
1675  echo "$as_me:1675: result: no" >&5
1676echo "${ECHO_T}no" >&6
1677fi
1678
1679  test -n "$FGREP" && break
1680done
1681test -n "$FGREP" || FGREP=": "
1682
1683     test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1683: error: cannot find workable fgrep" >&5
1684echo "$as_me: error: cannot find workable fgrep" >&2;}
1685   { (exit 1); exit 1; }; }
1686   fi
1687fi
1688echo "$as_me:1688: result: $ac_cv_path_FGREP" >&5
1689echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1690 FGREP="$ac_cv_path_FGREP"
1691
1692echo "$as_me:1692: checking for prefix" >&5
1693echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1694if test "x$prefix" = "xNONE" ; then
1695	case "$cf_cv_system_name" in
1696		# non-vendor systems don't have a conflict
1697	(openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1698		prefix=/usr
1699		;;
1700	(*)	prefix=$ac_default_prefix
1701		;;
1702	esac
1703fi
1704echo "$as_me:1704: result: $prefix" >&5
1705echo "${ECHO_T}$prefix" >&6
1706
1707if test "x$prefix" = "xNONE" ; then
1708echo "$as_me:1708: checking for default include-directory" >&5
1709echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1710test -n "$verbose" && echo 1>&6
1711for cf_symbol in \
1712	"$includedir" \
1713	"$includedir/ncurses" \
1714	"$prefix/include" \
1715	"$prefix/include/ncurses" \
1716	/usr/local/include \
1717	/usr/local/include/ncurses \
1718	/usr/include \
1719	/usr/include/ncurses
1720do
1721	cf_dir=`eval echo "$cf_symbol"`
1722	if test -f "$cf_dir/curses.h" ; then
1723	if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1724		includedir="$cf_symbol"
1725		test -n "$verbose"  && echo $ECHO_N "	found " 1>&6
1726		break
1727	fi
1728	fi
1729	test -n "$verbose"  && echo "	tested $cf_dir" 1>&6
1730done
1731echo "$as_me:1731: result: $includedir" >&5
1732echo "${ECHO_T}$includedir" >&6
1733fi
1734
1735### Defaults for ncurses ABI
1736
1737# ABI 5 defaults:
1738cf_dft_ccharw_max=5
1739cf_dft_chtype=auto
1740cf_dft_ext_colors=no
1741cf_dft_ext_const=no
1742cf_dft_ext_mouse=no
1743cf_dft_ext_mouse2=no
1744cf_dft_ext_putwin=no
1745cf_dft_ext_spfuncs=no
1746cf_dft_filter_syms=no
1747cf_dft_interop=no
1748cf_dft_mmask_t=auto
1749cf_dft_opaque_curses=no
1750cf_dft_ordinate_type=short
1751cf_dft_rgb_color=no
1752cf_dft_signed_char=no
1753cf_dft_tparm_arg=long
1754cf_dft_widec=no
1755cf_dft_with_lp64=no
1756
1757# ABI 6 default differences from ABI 5:
1758case x$cf_cv_abi_default in
1759(x[6789])
1760	cf_dft_chtype=uint32_t
1761	cf_dft_ext_colors=yes
1762	cf_dft_ext_const=yes
1763	cf_dft_ext_mouse=yes
1764	cf_dft_ext_putwin=yes
1765	cf_dft_ext_spfuncs=yes
1766	cf_dft_filter_syms=yes
1767	cf_dft_interop=yes
1768	cf_dft_mmask_t=uint32_t
1769	cf_dft_opaque_curses=yes
1770	cf_dft_tparm_arg=intptr_t
1771	cf_dft_widec=yes
1772	cf_dft_with_lp64=yes
1773	;;
1774esac
1775
1776# ABI 7 default differences from ABI 6:
1777case x$cf_cv_abi_default in
1778(x[789])
1779	cf_dft_ccharw_max=6
1780	cf_dft_ext_mouse2=yes
1781	cf_dft_mmask_t=uint64_t
1782	cf_dft_ordinate_type=int
1783	cf_dft_rgb_color=yes
1784	cf_dft_signed_char=yes
1785	# also: remove the wgetch-events feature in ABI 7
1786	;;
1787esac
1788
1789### override ABI version, e.g., packagers
1790
1791# Check whether --with-abi-altered or --without-abi-altered was given.
1792if test "${with_abi_altered+set}" = set; then
1793  withval="$with_abi_altered"
1794
1795if test -n "$withval" ; then
1796  case `echo "$withval" | sed -e 's/^[0-9]*$/0/g'` in
1797  (0)
1798 	;;
1799  (*)
1800	{ { echo "$as_me:1800: error: ABI altered is not a number: $withval" >&5
1801echo "$as_me: error: ABI altered is not a number: $withval" >&2;}
1802   { (exit 1); exit 1; }; }
1803 	;;
1804  esac
1805else
1806  { { echo "$as_me:1806: error: ABI altered value is empty" >&5
1807echo "$as_me: error: ABI altered value is empty" >&2;}
1808   { (exit 1); exit 1; }; }
1809fi
1810
1811	if test "$cf_cv_abi_version" != "$withval"
1812	then
1813		{ echo "$as_me:1813: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&5
1814echo "$as_me: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&2;}
1815		cf_cv_abi_version=$withval
1816	fi
1817
1818fi;
1819
1820###	Checks for programs.
1821
1822# Check whether --with-ada or --without-ada was given.
1823if test "${with_ada+set}" = set; then
1824  withval="$with_ada"
1825  cf_with_ada=$withval
1826else
1827  cf_with_ada=yes
1828fi;
1829
1830cf_prog_cc="gcc cc"
1831if test "x$cf_with_ada" = xyes
1832then
1833
1834for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
1835do
1836
1837cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1838
1839	unset ac_cv_path_cf_TEMP_gnat
1840	unset cf_TEMP_gnat
1841	# Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
1842set dummy $cf_prog_gnat; ac_word=$2
1843echo "$as_me:1843: checking for $ac_word" >&5
1844echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1845if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
1846  echo $ECHO_N "(cached) $ECHO_C" >&6
1847else
1848  case $cf_TEMP_gnat in
1849  [\\/]* | ?:[\\/]*)
1850  ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
1851  ;;
1852  *)
1853  ac_save_IFS=$IFS; IFS=$ac_path_separator
1854ac_dummy="$PATH"
1855for ac_dir in $ac_dummy; do
1856  IFS=$ac_save_IFS
1857  test -z "$ac_dir" && ac_dir=.
1858  if $as_executable_p "$ac_dir/$ac_word"; then
1859   ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
1860   echo "$as_me:1860: found $ac_dir/$ac_word" >&5
1861   break
1862fi
1863done
1864
1865  test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
1866  ;;
1867esac
1868fi
1869cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
1870
1871if test -n "$cf_TEMP_gnat"; then
1872  echo "$as_me:1872: result: $cf_TEMP_gnat" >&5
1873echo "${ECHO_T}$cf_TEMP_gnat" >&6
1874else
1875  echo "$as_me:1875: result: no" >&5
1876echo "${ECHO_T}no" >&6
1877fi
1878
1879	eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
1880
1881	if test "x$cf_TEMP_gnat" != xno; then
1882		unset cf_cv_gnat_version
1883		unset cf_TEMP_gnat
1884
1885echo "$as_me:1885: checking for $cf_prog_gnat version" >&5
1886echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
1887if test "${cf_cv_gnat_version+set}" = set; then
1888  echo $ECHO_N "(cached) $ECHO_C" >&6
1889else
1890
1891cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
1892	grep '[0-9].[0-9][0-9]*' |\
1893	sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
1894
1895fi
1896echo "$as_me:1896: result: $cf_cv_gnat_version" >&5
1897echo "${ECHO_T}$cf_cv_gnat_version" >&6
1898test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
1899eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
1900
1901	fi
1902	eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
1903
1904	unset cf_TEMP_gnat
1905	unset cf_cv_gnat_version
1906	unset ac_cv_path_cf_TEMP_gnat
1907done
1908
1909if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
1910	cf_ada_make=
1911	cf_cv_prog_gnat_correct=no
1912else
1913	cf_ada_make=gnatmake
1914	if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
1915		# gprconfig is newer than gnatmake; we can continue...
1916		cf_ada_config="##"
1917	else
1918		rm -rf ./conftest* ./*~conftest*
1919		if mkdir conftest.src
1920		then
1921			cf_ada_config=""
1922			cd conftest.src
1923			for cf_gprconfig in Ada C
1924			do
1925				echo "$as_me:1925: checking for gprconfig name for $cf_gprconfig" >&5
1926echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
1927				if test "$cf_gprconfig" = C
1928				then
1929					for cf_gprconfig_param in \
1930						"$cf_gprconfig,,,,GNATGCC" \
1931						"$cf_gprconfig,,,,GCC" \
1932						"$cf_gprconfig"
1933					do
1934						cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
1935						test -n "$cf_gprconfig_value" && break
1936					done
1937				else
1938					cf_gprconfig_param=$cf_gprconfig
1939					cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
1940				fi
1941				if test -n "$cf_gprconfig_value"
1942				then
1943					eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
1944					echo "$as_me:1944: result: $cf_gprconfig_value" >&5
1945echo "${ECHO_T}$cf_gprconfig_value" >&6
1946				else
1947					echo "$as_me:1947: result: missing" >&5
1948echo "${ECHO_T}missing" >&6
1949					cf_ada_config="#"
1950					break
1951				fi
1952			done
1953			cd ..
1954			rm -rf ./conftest* ./*~conftest*
1955		fi
1956	fi
1957	if test "x$cf_ada_config" != "x#"
1958	then
1959
1960echo "$as_me:1960: checking for gnat version" >&5
1961echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
1962if test "${cf_cv_gnat_version+set}" = set; then
1963  echo $ECHO_N "(cached) $ECHO_C" >&6
1964else
1965
1966cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
1967	grep '[0-9].[0-9][0-9]*' |\
1968	sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
1969
1970fi
1971echo "$as_me:1971: result: $cf_cv_gnat_version" >&5
1972echo "${ECHO_T}$cf_cv_gnat_version" >&6
1973test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
1974
1975case "$cf_cv_gnat_version" in
1976(3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
1977	cf_cv_prog_gnat_correct=yes
1978	;;
1979(*)
1980	{ echo "$as_me:1980: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
1981echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
1982	cf_cv_prog_gnat_correct=no
1983	;;
1984esac
1985
1986		# Extract the first word of "m4", so it can be a program name with args.
1987set dummy m4; ac_word=$2
1988echo "$as_me:1988: checking for $ac_word" >&5
1989echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1990if test "${ac_cv_prog_M4_exists+set}" = set; then
1991  echo $ECHO_N "(cached) $ECHO_C" >&6
1992else
1993  if test -n "$M4_exists"; then
1994  ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
1995else
1996  ac_save_IFS=$IFS; IFS=$ac_path_separator
1997ac_dummy="$PATH"
1998for ac_dir in $ac_dummy; do
1999  IFS=$ac_save_IFS
2000  test -z "$ac_dir" && ac_dir=.
2001  $as_executable_p "$ac_dir/$ac_word" || continue
2002ac_cv_prog_M4_exists="yes"
2003echo "$as_me:2003: found $ac_dir/$ac_word" >&5
2004break
2005done
2006
2007  test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
2008fi
2009fi
2010M4_exists=$ac_cv_prog_M4_exists
2011if test -n "$M4_exists"; then
2012  echo "$as_me:2012: result: $M4_exists" >&5
2013echo "${ECHO_T}$M4_exists" >&6
2014else
2015  echo "$as_me:2015: result: no" >&5
2016echo "${ECHO_T}no" >&6
2017fi
2018
2019		if test "$ac_cv_prog_M4_exists" = no; then
2020			cf_cv_prog_gnat_correct=no
2021			{ echo "$as_me:2021: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
2022echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
2023		fi
2024		if test "$cf_cv_prog_gnat_correct" = yes; then
2025			echo "$as_me:2025: checking if GNAT works" >&5
2026echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
2027
2028rm -rf ./conftest* ./*~conftest*
2029cat >>conftest.ads <<CF_EOF
2030procedure conftest;
2031CF_EOF
2032cat >>conftest.adb <<CF_EOF
2033with Text_IO;
2034with GNAT.OS_Lib;
2035procedure conftest is
2036begin
2037   Text_IO.Put ("Hello World");
2038   Text_IO.New_Line;
2039   GNAT.OS_Lib.OS_Exit (0);
2040end conftest;
2041CF_EOF
2042if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
2043   if ( ./conftest 1>&5 2>&1 ) ; then
2044      cf_cv_prog_gnat_correct=yes
2045   else
2046      cf_cv_prog_gnat_correct=no
2047   fi
2048else
2049   cf_cv_prog_gnat_correct=no
2050fi
2051rm -rf ./conftest* ./*~conftest*
2052
2053			echo "$as_me:2053: result: $cf_cv_prog_gnat_correct" >&5
2054echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
2055		fi
2056	else
2057		cf_cv_prog_gnat_correct=no
2058	fi
2059fi
2060
2061	if test	"x$cf_cv_prog_gnat_correct" = xyes; then
2062		# gcc's developers chose to deprecate gnatgcc before making gprconfig
2063		# work.  They replaced gnatgcc in gcc 13 with a script which spits out
2064		# a warning offering advice which could never work.
2065		#
2066		# Here is a workaround.
2067		# Extract the first word of "gnatgcc", so it can be a program name with args.
2068set dummy gnatgcc; ac_word=$2
2069echo "$as_me:2069: checking for $ac_word" >&5
2070echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2071if test "${ac_cv_path_cf_cv_path_gnatgcc+set}" = set; then
2072  echo $ECHO_N "(cached) $ECHO_C" >&6
2073else
2074  case $cf_cv_path_gnatgcc in
2075  [\\/]* | ?:[\\/]*)
2076  ac_cv_path_cf_cv_path_gnatgcc="$cf_cv_path_gnatgcc" # Let the user override the test with a path.
2077  ;;
2078  *)
2079  ac_save_IFS=$IFS; IFS=$ac_path_separator
2080ac_dummy="$PATH"
2081for ac_dir in $ac_dummy; do
2082  IFS=$ac_save_IFS
2083  test -z "$ac_dir" && ac_dir=.
2084  if $as_executable_p "$ac_dir/$ac_word"; then
2085   ac_cv_path_cf_cv_path_gnatgcc="$ac_dir/$ac_word"
2086   echo "$as_me:2086: found $ac_dir/$ac_word" >&5
2087   break
2088fi
2089done
2090
2091  test -z "$ac_cv_path_cf_cv_path_gnatgcc" && ac_cv_path_cf_cv_path_gnatgcc="no"
2092  ;;
2093esac
2094fi
2095cf_cv_path_gnatgcc=$ac_cv_path_cf_cv_path_gnatgcc
2096
2097if test -n "$cf_cv_path_gnatgcc"; then
2098  echo "$as_me:2098: result: $cf_cv_path_gnatgcc" >&5
2099echo "${ECHO_T}$cf_cv_path_gnatgcc" >&6
2100else
2101  echo "$as_me:2101: result: no" >&5
2102echo "${ECHO_T}no" >&6
2103fi
2104
2105		if test "$cf_cv_path_gnatgcc" != no
2106		then
2107			echo "$as_me:2107: checking for improvement" >&5
2108echo $ECHO_N "checking for improvement... $ECHO_C" >&6
2109			cf_file_gnatgcc=`file -L "$cf_cv_path_gnatgcc" 2>/dev/null`
2110			case "x$cf_file_gnatgcc" in
2111			(*script*)
2112				cf_cv_path_gnatgcc=`sh -x "$cf_cv_path_gnatgcc" --version 2>&1 | grep -w exec | sed -e 's/^[ 	]*+[ 	]*//' -e 's/exec[ 	]//' -e 's/ .*//'`
2113				;;
2114			(*)
2115				cf_cv_path_gnatgcc=no
2116				;;
2117			esac
2118			echo "$as_me:2118: result: $cf_cv_path_gnatgcc" >&5
2119echo "${ECHO_T}$cf_cv_path_gnatgcc" >&6
2120			test "$cf_cv_path_gnatgcc" = no && cf_cv_path_gnatgcc=gnatgcc
2121			cf_prog_cc="$cf_cv_path_gnatgcc $cf_prog_cc"
2122		fi
2123	fi
2124fi
2125case "$cf_prog_cc" in
2126(*/*)
2127	CC="$cf_prog_cc"
2128
2129	;;
2130(*)
2131
2132ac_ext=c
2133ac_cpp='$CPP $CPPFLAGS'
2134ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2135ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2136ac_compiler_gnu=$ac_cv_c_compiler_gnu
2137ac_main_return="return"
2138if test -n "$ac_tool_prefix"; then
2139  for ac_prog in $cf_prog_cc
2140  do
2141    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2142set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2143echo "$as_me:2143: checking for $ac_word" >&5
2144echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2145if test "${ac_cv_prog_CC+set}" = set; then
2146  echo $ECHO_N "(cached) $ECHO_C" >&6
2147else
2148  if test -n "$CC"; then
2149  ac_cv_prog_CC="$CC" # Let the user override the test.
2150else
2151  ac_save_IFS=$IFS; IFS=$ac_path_separator
2152ac_dummy="$PATH"
2153for ac_dir in $ac_dummy; do
2154  IFS=$ac_save_IFS
2155  test -z "$ac_dir" && ac_dir=.
2156  $as_executable_p "$ac_dir/$ac_word" || continue
2157ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2158echo "$as_me:2158: found $ac_dir/$ac_word" >&5
2159break
2160done
2161
2162fi
2163fi
2164CC=$ac_cv_prog_CC
2165if test -n "$CC"; then
2166  echo "$as_me:2166: result: $CC" >&5
2167echo "${ECHO_T}$CC" >&6
2168else
2169  echo "$as_me:2169: result: no" >&5
2170echo "${ECHO_T}no" >&6
2171fi
2172
2173    test -n "$CC" && break
2174  done
2175fi
2176if test -z "$CC"; then
2177  ac_ct_CC=$CC
2178  for ac_prog in $cf_prog_cc
2179do
2180  # Extract the first word of "$ac_prog", so it can be a program name with args.
2181set dummy $ac_prog; ac_word=$2
2182echo "$as_me:2182: checking for $ac_word" >&5
2183echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2184if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2185  echo $ECHO_N "(cached) $ECHO_C" >&6
2186else
2187  if test -n "$ac_ct_CC"; then
2188  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2189else
2190  ac_save_IFS=$IFS; IFS=$ac_path_separator
2191ac_dummy="$PATH"
2192for ac_dir in $ac_dummy; do
2193  IFS=$ac_save_IFS
2194  test -z "$ac_dir" && ac_dir=.
2195  $as_executable_p "$ac_dir/$ac_word" || continue
2196ac_cv_prog_ac_ct_CC="$ac_prog"
2197echo "$as_me:2197: found $ac_dir/$ac_word" >&5
2198break
2199done
2200
2201fi
2202fi
2203ac_ct_CC=$ac_cv_prog_ac_ct_CC
2204if test -n "$ac_ct_CC"; then
2205  echo "$as_me:2205: result: $ac_ct_CC" >&5
2206echo "${ECHO_T}$ac_ct_CC" >&6
2207else
2208  echo "$as_me:2208: result: no" >&5
2209echo "${ECHO_T}no" >&6
2210fi
2211
2212  test -n "$ac_ct_CC" && break
2213done
2214
2215  CC=$ac_ct_CC
2216fi
2217
2218test -z "$CC" && { { echo "$as_me:2218: error: no acceptable cc found in \$PATH" >&5
2219echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
2220   { (exit 1); exit 1; }; }
2221
2222# Provide some information about the compiler.
2223echo "$as_me:2223:" \
2224     "checking for C compiler version" >&5
2225ac_compiler=`set X $ac_compile; echo "$2"`
2226{ (eval echo "$as_me:2226: \"$ac_compiler --version </dev/null >&5\"") >&5
2227  (eval $ac_compiler --version </dev/null >&5) 2>&5
2228  ac_status=$?
2229  echo "$as_me:2229: \$? = $ac_status" >&5
2230  (exit "$ac_status"); }
2231{ (eval echo "$as_me:2231: \"$ac_compiler -v </dev/null >&5\"") >&5
2232  (eval $ac_compiler -v </dev/null >&5) 2>&5
2233  ac_status=$?
2234  echo "$as_me:2234: \$? = $ac_status" >&5
2235  (exit "$ac_status"); }
2236{ (eval echo "$as_me:2236: \"$ac_compiler -V </dev/null >&5\"") >&5
2237  (eval $ac_compiler -V </dev/null >&5) 2>&5
2238  ac_status=$?
2239  echo "$as_me:2239: \$? = $ac_status" >&5
2240  (exit "$ac_status"); }
2241
2242cat >"conftest.$ac_ext" <<_ACEOF
2243#line 2243 "configure"
2244#include "confdefs.h"
2245
2246int
2247main (void)
2248{
2249
2250  ;
2251  return 0;
2252}
2253_ACEOF
2254ac_clean_files_save=$ac_clean_files
2255ac_clean_files="$ac_clean_files a.out a.exe"
2256# Try to create an executable without -o first, disregard a.out.
2257# It will help us diagnose broken compilers, and finding out an intuition
2258# of exeext.
2259echo "$as_me:2259: checking for C compiler default output" >&5
2260echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2261ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
2262if { (eval echo "$as_me:2262: \"$ac_link_default\"") >&5
2263  (eval $ac_link_default) 2>&5
2264  ac_status=$?
2265  echo "$as_me:2265: \$? = $ac_status" >&5
2266  (exit "$ac_status"); }; then
2267  # Find the output, starting from the most likely.  This scheme is
2268# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2269# resort.
2270for ac_file in `ls a.exe conftest.exe 2>/dev/null;
2271                ls a.out conftest 2>/dev/null;
2272                ls a.* conftest.* 2>/dev/null`; do
2273  case $ac_file in
2274    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2275    a.out ) # We found the default executable, but exeext='' is most
2276            # certainly right.
2277            break;;
2278    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2279          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2280          export ac_cv_exeext
2281          break;;
2282    * ) break;;
2283  esac
2284done
2285else
2286  echo "$as_me: failed program was:" >&5
2287cat "conftest.$ac_ext" >&5
2288{ { echo "$as_me:2288: error: C compiler cannot create executables" >&5
2289echo "$as_me: error: C compiler cannot create executables" >&2;}
2290   { (exit 77); exit 77; }; }
2291fi
2292
2293ac_exeext=$ac_cv_exeext
2294echo "$as_me:2294: result: $ac_file" >&5
2295echo "${ECHO_T}$ac_file" >&6
2296
2297# Check the compiler produces executables we can run.  If not, either
2298# the compiler is broken, or we cross compile.
2299echo "$as_me:2299: checking whether the C compiler works" >&5
2300echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2301# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2302# If not cross compiling, check that we can run a simple program.
2303if test "$cross_compiling" != yes; then
2304  if { ac_try='./$ac_file'
2305  { (eval echo "$as_me:2305: \"$ac_try\"") >&5
2306  (eval $ac_try) 2>&5
2307  ac_status=$?
2308  echo "$as_me:2308: \$? = $ac_status" >&5
2309  (exit "$ac_status"); }; }; then
2310    cross_compiling=no
2311  else
2312    if test "$cross_compiling" = maybe; then
2313	cross_compiling=yes
2314    else
2315	{ { echo "$as_me:2315: error: cannot run C compiled programs.
2316If you meant to cross compile, use \`--host'." >&5
2317echo "$as_me: error: cannot run C compiled programs.
2318If you meant to cross compile, use \`--host'." >&2;}
2319   { (exit 1); exit 1; }; }
2320    fi
2321  fi
2322fi
2323echo "$as_me:2323: result: yes" >&5
2324echo "${ECHO_T}yes" >&6
2325
2326rm -f a.out a.exe "conftest$ac_cv_exeext"
2327ac_clean_files=$ac_clean_files_save
2328# Check the compiler produces executables we can run.  If not, either
2329# the compiler is broken, or we cross compile.
2330echo "$as_me:2330: checking whether we are cross compiling" >&5
2331echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2332echo "$as_me:2332: result: $cross_compiling" >&5
2333echo "${ECHO_T}$cross_compiling" >&6
2334
2335echo "$as_me:2335: checking for executable suffix" >&5
2336echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
2337if { (eval echo "$as_me:2337: \"$ac_link\"") >&5
2338  (eval $ac_link) 2>&5
2339  ac_status=$?
2340  echo "$as_me:2340: \$? = $ac_status" >&5
2341  (exit "$ac_status"); }; then
2342  # If both `conftest.exe' and `conftest' are `present' (well, observable)
2343# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2344# work properly (i.e., refer to `conftest.exe'), while it won't with
2345# `rm'.
2346for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2347  case $ac_file in
2348    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2349    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2350          export ac_cv_exeext
2351          break;;
2352    * ) break;;
2353  esac
2354done
2355else
2356  { { echo "$as_me:2356: error: cannot compute EXEEXT: cannot compile and link" >&5
2357echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2358   { (exit 1); exit 1; }; }
2359fi
2360
2361rm -f "conftest$ac_cv_exeext"
2362echo "$as_me:2362: result: $ac_cv_exeext" >&5
2363echo "${ECHO_T}$ac_cv_exeext" >&6
2364
2365rm -f "conftest.$ac_ext"
2366EXEEXT=$ac_cv_exeext
2367ac_exeext=$EXEEXT
2368echo "$as_me:2368: checking for object suffix" >&5
2369echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2370if test "${ac_cv_objext+set}" = set; then
2371  echo $ECHO_N "(cached) $ECHO_C" >&6
2372else
2373  cat >"conftest.$ac_ext" <<_ACEOF
2374#line 2374 "configure"
2375#include "confdefs.h"
2376
2377int
2378main (void)
2379{
2380
2381  ;
2382  return 0;
2383}
2384_ACEOF
2385rm -f conftest.o conftest.obj
2386if { (eval echo "$as_me:2386: \"$ac_compile\"") >&5
2387  (eval $ac_compile) 2>&5
2388  ac_status=$?
2389  echo "$as_me:2389: \$? = $ac_status" >&5
2390  (exit "$ac_status"); }; then
2391  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2392  case $ac_file in
2393    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2394    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2395       break;;
2396  esac
2397done
2398else
2399  echo "$as_me: failed program was:" >&5
2400cat "conftest.$ac_ext" >&5
2401{ { echo "$as_me:2401: error: cannot compute OBJEXT: cannot compile" >&5
2402echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2403   { (exit 1); exit 1; }; }
2404fi
2405
2406rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2407fi
2408echo "$as_me:2408: result: $ac_cv_objext" >&5
2409echo "${ECHO_T}$ac_cv_objext" >&6
2410OBJEXT=$ac_cv_objext
2411ac_objext=$OBJEXT
2412echo "$as_me:2412: checking whether we are using the GNU C compiler" >&5
2413echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2414if test "${ac_cv_c_compiler_gnu+set}" = set; then
2415  echo $ECHO_N "(cached) $ECHO_C" >&6
2416else
2417  cat >"conftest.$ac_ext" <<_ACEOF
2418#line 2418 "configure"
2419#include "confdefs.h"
2420
2421int
2422main (void)
2423{
2424#ifndef __GNUC__
2425       choke me
2426#endif
2427
2428  ;
2429  return 0;
2430}
2431_ACEOF
2432rm -f "conftest.$ac_objext"
2433if { (eval echo "$as_me:2433: \"$ac_compile\"") >&5
2434  (eval $ac_compile) 2>&5
2435  ac_status=$?
2436  echo "$as_me:2436: \$? = $ac_status" >&5
2437  (exit "$ac_status"); } &&
2438         { ac_try='test -s "conftest.$ac_objext"'
2439  { (eval echo "$as_me:2439: \"$ac_try\"") >&5
2440  (eval $ac_try) 2>&5
2441  ac_status=$?
2442  echo "$as_me:2442: \$? = $ac_status" >&5
2443  (exit "$ac_status"); }; }; then
2444  ac_compiler_gnu=yes
2445else
2446  echo "$as_me: failed program was:" >&5
2447cat "conftest.$ac_ext" >&5
2448ac_compiler_gnu=no
2449fi
2450rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2451ac_cv_c_compiler_gnu=$ac_compiler_gnu
2452
2453fi
2454echo "$as_me:2454: result: $ac_cv_c_compiler_gnu" >&5
2455echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2456GCC=`test $ac_compiler_gnu = yes && echo yes`
2457ac_test_CFLAGS=${CFLAGS+set}
2458ac_save_CFLAGS=$CFLAGS
2459CFLAGS="-g"
2460echo "$as_me:2460: checking whether $CC accepts -g" >&5
2461echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2462if test "${ac_cv_prog_cc_g+set}" = set; then
2463  echo $ECHO_N "(cached) $ECHO_C" >&6
2464else
2465  cat >"conftest.$ac_ext" <<_ACEOF
2466#line 2466 "configure"
2467#include "confdefs.h"
2468
2469int
2470main (void)
2471{
2472
2473  ;
2474  return 0;
2475}
2476_ACEOF
2477rm -f "conftest.$ac_objext"
2478if { (eval echo "$as_me:2478: \"$ac_compile\"") >&5
2479  (eval $ac_compile) 2>&5
2480  ac_status=$?
2481  echo "$as_me:2481: \$? = $ac_status" >&5
2482  (exit "$ac_status"); } &&
2483         { ac_try='test -s "conftest.$ac_objext"'
2484  { (eval echo "$as_me:2484: \"$ac_try\"") >&5
2485  (eval $ac_try) 2>&5
2486  ac_status=$?
2487  echo "$as_me:2487: \$? = $ac_status" >&5
2488  (exit "$ac_status"); }; }; then
2489  ac_cv_prog_cc_g=yes
2490else
2491  echo "$as_me: failed program was:" >&5
2492cat "conftest.$ac_ext" >&5
2493ac_cv_prog_cc_g=no
2494fi
2495rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2496fi
2497echo "$as_me:2497: result: $ac_cv_prog_cc_g" >&5
2498echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2499if test "$ac_test_CFLAGS" = set; then
2500  CFLAGS=$ac_save_CFLAGS
2501elif test $ac_cv_prog_cc_g = yes; then
2502  if test "$GCC" = yes; then
2503    CFLAGS="-g -O2"
2504  else
2505    CFLAGS="-g"
2506  fi
2507else
2508  if test "$GCC" = yes; then
2509    CFLAGS="-O2"
2510  else
2511    CFLAGS=
2512  fi
2513fi
2514# Some people use a C++ compiler to compile C.  Since we use `exit',
2515# in C++ we need to declare it.  In case someone uses the same compiler
2516# for both compiling C and C++ we need to have the C++ compiler decide
2517# the declaration of exit, since it's the most demanding environment.
2518cat >"conftest.$ac_ext" <<_ACEOF
2519#ifndef __cplusplus
2520  choke me
2521#endif
2522_ACEOF
2523rm -f "conftest.$ac_objext"
2524if { (eval echo "$as_me:2524: \"$ac_compile\"") >&5
2525  (eval $ac_compile) 2>&5
2526  ac_status=$?
2527  echo "$as_me:2527: \$? = $ac_status" >&5
2528  (exit "$ac_status"); } &&
2529         { ac_try='test -s "conftest.$ac_objext"'
2530  { (eval echo "$as_me:2530: \"$ac_try\"") >&5
2531  (eval $ac_try) 2>&5
2532  ac_status=$?
2533  echo "$as_me:2533: \$? = $ac_status" >&5
2534  (exit "$ac_status"); }; }; then
2535  for ac_declaration in \
2536   ''\
2537   '#include <stdlib.h>' \
2538   'extern "C" void std::exit (int) throw (); using std::exit;' \
2539   'extern "C" void std::exit (int); using std::exit;' \
2540   'extern "C" void exit (int) throw ();' \
2541   'extern "C" void exit (int);' \
2542   'void exit (int);'
2543do
2544  cat >"conftest.$ac_ext" <<_ACEOF
2545#line 2545 "configure"
2546#include "confdefs.h"
2547#include <stdlib.h>
2548$ac_declaration
2549int
2550main (void)
2551{
2552exit (42);
2553  ;
2554  return 0;
2555}
2556_ACEOF
2557rm -f "conftest.$ac_objext"
2558if { (eval echo "$as_me:2558: \"$ac_compile\"") >&5
2559  (eval $ac_compile) 2>&5
2560  ac_status=$?
2561  echo "$as_me:2561: \$? = $ac_status" >&5
2562  (exit "$ac_status"); } &&
2563         { ac_try='test -s "conftest.$ac_objext"'
2564  { (eval echo "$as_me:2564: \"$ac_try\"") >&5
2565  (eval $ac_try) 2>&5
2566  ac_status=$?
2567  echo "$as_me:2567: \$? = $ac_status" >&5
2568  (exit "$ac_status"); }; }; then
2569  :
2570else
2571  echo "$as_me: failed program was:" >&5
2572cat "conftest.$ac_ext" >&5
2573continue
2574fi
2575rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2576  cat >"conftest.$ac_ext" <<_ACEOF
2577#line 2577 "configure"
2578#include "confdefs.h"
2579$ac_declaration
2580int
2581main (void)
2582{
2583exit (42);
2584  ;
2585  return 0;
2586}
2587_ACEOF
2588rm -f "conftest.$ac_objext"
2589if { (eval echo "$as_me:2589: \"$ac_compile\"") >&5
2590  (eval $ac_compile) 2>&5
2591  ac_status=$?
2592  echo "$as_me:2592: \$? = $ac_status" >&5
2593  (exit "$ac_status"); } &&
2594         { ac_try='test -s "conftest.$ac_objext"'
2595  { (eval echo "$as_me:2595: \"$ac_try\"") >&5
2596  (eval $ac_try) 2>&5
2597  ac_status=$?
2598  echo "$as_me:2598: \$? = $ac_status" >&5
2599  (exit "$ac_status"); }; }; then
2600  break
2601else
2602  echo "$as_me: failed program was:" >&5
2603cat "conftest.$ac_ext" >&5
2604fi
2605rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2606done
2607rm -rf conftest*
2608if test -n "$ac_declaration"; then
2609  echo '#ifdef __cplusplus' >>confdefs.h
2610  echo "$ac_declaration"    >>confdefs.h
2611  echo '#endif'             >>confdefs.h
2612fi
2613
2614else
2615  echo "$as_me: failed program was:" >&5
2616cat "conftest.$ac_ext" >&5
2617fi
2618rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2619ac_ext=c
2620ac_cpp='$CPP $CPPFLAGS'
2621ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2622ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2623ac_compiler_gnu=$ac_cv_c_compiler_gnu
2624ac_main_return="return"
2625
2626GCC_VERSION=none
2627if test "$GCC" = yes ; then
2628	echo "$as_me:2628: checking version of $CC" >&5
2629echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2630	GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2631	test -z "$GCC_VERSION" && GCC_VERSION=unknown
2632	echo "$as_me:2632: result: $GCC_VERSION" >&5
2633echo "${ECHO_T}$GCC_VERSION" >&6
2634fi
2635
2636INTEL_COMPILER=no
2637
2638if test "$GCC" = yes ; then
2639	case "$host_os" in
2640	(linux*|gnu*)
2641		echo "$as_me:2641: checking if this is really Intel C compiler" >&5
2642echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2643		cf_save_CFLAGS="$CFLAGS"
2644		CFLAGS="$CFLAGS -no-gcc"
2645		cat >"conftest.$ac_ext" <<_ACEOF
2646#line 2646 "configure"
2647#include "confdefs.h"
2648
2649int
2650main (void)
2651{
2652
2653#ifdef __INTEL_COMPILER
2654#else
2655#error __INTEL_COMPILER is not defined
2656#endif
2657
2658  ;
2659  return 0;
2660}
2661_ACEOF
2662rm -f "conftest.$ac_objext"
2663if { (eval echo "$as_me:2663: \"$ac_compile\"") >&5
2664  (eval $ac_compile) 2>&5
2665  ac_status=$?
2666  echo "$as_me:2666: \$? = $ac_status" >&5
2667  (exit "$ac_status"); } &&
2668         { ac_try='test -s "conftest.$ac_objext"'
2669  { (eval echo "$as_me:2669: \"$ac_try\"") >&5
2670  (eval $ac_try) 2>&5
2671  ac_status=$?
2672  echo "$as_me:2672: \$? = $ac_status" >&5
2673  (exit "$ac_status"); }; }; then
2674  INTEL_COMPILER=yes
2675cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2676
2677else
2678  echo "$as_me: failed program was:" >&5
2679cat "conftest.$ac_ext" >&5
2680fi
2681rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2682		CFLAGS="$cf_save_CFLAGS"
2683		echo "$as_me:2683: result: $INTEL_COMPILER" >&5
2684echo "${ECHO_T}$INTEL_COMPILER" >&6
2685		;;
2686	esac
2687fi
2688
2689CLANG_COMPILER=no
2690
2691if test "$GCC" = yes ; then
2692	echo "$as_me:2692: checking if this is really Clang C compiler" >&5
2693echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2694	cf_save_CFLAGS="$CFLAGS"
2695	cat >"conftest.$ac_ext" <<_ACEOF
2696#line 2696 "configure"
2697#include "confdefs.h"
2698
2699int
2700main (void)
2701{
2702
2703#ifdef __clang__
2704#else
2705#error __clang__ is not defined
2706#endif
2707
2708  ;
2709  return 0;
2710}
2711_ACEOF
2712rm -f "conftest.$ac_objext"
2713if { (eval echo "$as_me:2713: \"$ac_compile\"") >&5
2714  (eval $ac_compile) 2>&5
2715  ac_status=$?
2716  echo "$as_me:2716: \$? = $ac_status" >&5
2717  (exit "$ac_status"); } &&
2718         { ac_try='test -s "conftest.$ac_objext"'
2719  { (eval echo "$as_me:2719: \"$ac_try\"") >&5
2720  (eval $ac_try) 2>&5
2721  ac_status=$?
2722  echo "$as_me:2722: \$? = $ac_status" >&5
2723  (exit "$ac_status"); }; }; then
2724  CLANG_COMPILER=yes
2725
2726else
2727  echo "$as_me: failed program was:" >&5
2728cat "conftest.$ac_ext" >&5
2729fi
2730rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2731	CFLAGS="$cf_save_CFLAGS"
2732	echo "$as_me:2732: result: $CLANG_COMPILER" >&5
2733echo "${ECHO_T}$CLANG_COMPILER" >&6
2734fi
2735
2736CLANG_VERSION=none
2737
2738if test "x$CLANG_COMPILER" = "xyes" ; then
2739	case "$CC" in
2740	(c[1-9][0-9]|*/c[1-9][0-9])
2741		{ echo "$as_me:2741: WARNING: replacing broken compiler alias $CC" >&5
2742echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2743		CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2744		CC=clang
2745		;;
2746	esac
2747
2748	echo "$as_me:2748: checking version of $CC" >&5
2749echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2750	CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2751	test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2752	echo "$as_me:2752: result: $CLANG_VERSION" >&5
2753echo "${ECHO_T}$CLANG_VERSION" >&6
2754
2755	for cf_clang_opt in \
2756		-Qunused-arguments \
2757		-Wno-error=implicit-function-declaration
2758	do
2759		echo "$as_me:2759: checking if option $cf_clang_opt works" >&5
2760echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2761		cf_save_CFLAGS="$CFLAGS"
2762		CFLAGS="$CFLAGS $cf_clang_opt"
2763		cat >"conftest.$ac_ext" <<_ACEOF
2764#line 2764 "configure"
2765#include "confdefs.h"
2766
2767			#include <stdio.h>
2768int
2769main (void)
2770{
2771
2772			printf("hello!\\n");
2773  ;
2774  return 0;
2775}
2776_ACEOF
2777rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2778if { (eval echo "$as_me:2778: \"$ac_link\"") >&5
2779  (eval $ac_link) 2>&5
2780  ac_status=$?
2781  echo "$as_me:2781: \$? = $ac_status" >&5
2782  (exit "$ac_status"); } &&
2783         { ac_try='test -s "conftest$ac_exeext"'
2784  { (eval echo "$as_me:2784: \"$ac_try\"") >&5
2785  (eval $ac_try) 2>&5
2786  ac_status=$?
2787  echo "$as_me:2787: \$? = $ac_status" >&5
2788  (exit "$ac_status"); }; }; then
2789
2790			cf_clang_optok=yes
2791else
2792  echo "$as_me: failed program was:" >&5
2793cat "conftest.$ac_ext" >&5
2794
2795			cf_clang_optok=no
2796fi
2797rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2798		echo "$as_me:2798: result: $cf_clang_optok" >&5
2799echo "${ECHO_T}$cf_clang_optok" >&6
2800		CFLAGS="$cf_save_CFLAGS"
2801		if test "$cf_clang_optok" = yes; then
2802			test -n "$verbose" && echo "	adding option $cf_clang_opt" 1>&6
2803
2804echo "${as_me:-configure}:2804: testing adding option $cf_clang_opt ..." 1>&5
2805
2806	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2807	CFLAGS="${CFLAGS}$cf_clang_opt"
2808
2809		fi
2810	done
2811fi
2812
2813echo "$as_me:2813: checking for $CC option to accept ANSI C" >&5
2814echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2815if test "${ac_cv_prog_cc_stdc+set}" = set; then
2816  echo $ECHO_N "(cached) $ECHO_C" >&6
2817else
2818  ac_cv_prog_cc_stdc=no
2819ac_save_CC=$CC
2820cat >"conftest.$ac_ext" <<_ACEOF
2821#line 2821 "configure"
2822#include "confdefs.h"
2823#include <stdarg.h>
2824#include <stdio.h>
2825#include <sys/types.h>
2826#include <sys/stat.h>
2827/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2828struct buf { int x; };
2829FILE * (*rcsopen) (struct buf *, struct stat *, int);
2830static char *e (char **p, int i)
2831{
2832  return p[i];
2833}
2834static char *f (char * (*g) (char **, int), char **p, ...)
2835{
2836  char *s;
2837  va_list v;
2838  va_start (v,p);
2839  s = g (p, va_arg (v,int));
2840  va_end (v);
2841  return s;
2842}
2843int test (int i, double x);
2844struct s1 {int (*f) (int a);};
2845struct s2 {int (*f) (double a);};
2846int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2847int argc;
2848char **argv;
2849int
2850main (void)
2851{
2852return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2853  ;
2854  return 0;
2855}
2856_ACEOF
2857# Don't try gcc -ansi; that turns off useful extensions and
2858# breaks some systems' header files.
2859# AIX			-qlanglvl=ansi
2860# Ultrix and OSF/1	-std1
2861# HP-UX 10.20 and later	-Ae
2862# HP-UX older versions	-Aa -D_HPUX_SOURCE
2863# SVR4			-Xc -D__EXTENSIONS__
2864for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2865do
2866  CC="$ac_save_CC $ac_arg"
2867  rm -f "conftest.$ac_objext"
2868if { (eval echo "$as_me:2868: \"$ac_compile\"") >&5
2869  (eval $ac_compile) 2>&5
2870  ac_status=$?
2871  echo "$as_me:2871: \$? = $ac_status" >&5
2872  (exit "$ac_status"); } &&
2873         { ac_try='test -s "conftest.$ac_objext"'
2874  { (eval echo "$as_me:2874: \"$ac_try\"") >&5
2875  (eval $ac_try) 2>&5
2876  ac_status=$?
2877  echo "$as_me:2877: \$? = $ac_status" >&5
2878  (exit "$ac_status"); }; }; then
2879  ac_cv_prog_cc_stdc=$ac_arg
2880break
2881else
2882  echo "$as_me: failed program was:" >&5
2883cat "conftest.$ac_ext" >&5
2884fi
2885rm -f "conftest.$ac_objext"
2886done
2887rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2888CC=$ac_save_CC
2889
2890fi
2891
2892case "x$ac_cv_prog_cc_stdc" in
2893  x|xno)
2894    echo "$as_me:2894: result: none needed" >&5
2895echo "${ECHO_T}none needed" >&6 ;;
2896  *)
2897    echo "$as_me:2897: result: $ac_cv_prog_cc_stdc" >&5
2898echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2899    CC="$CC $ac_cv_prog_cc_stdc" ;;
2900esac
2901
2902# This should have been defined by AC_PROG_CC
2903: "${CC:=cc}"
2904
2905echo "$as_me:2905: checking \$CFLAGS variable" >&5
2906echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2907case "x$CFLAGS" in
2908(*-[IUD]*)
2909	echo "$as_me:2909: result: broken" >&5
2910echo "${ECHO_T}broken" >&6
2911	{ echo "$as_me:2911: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2912echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2913	cf_flags="$CFLAGS"
2914	CFLAGS=
2915	for cf_arg in $cf_flags
2916	do
2917
2918cf_fix_cppflags=no
2919cf_new_cflags=
2920cf_new_cppflags=
2921cf_new_extra_cppflags=
2922
2923for cf_add_cflags in $cf_arg
2924do
2925case "$cf_fix_cppflags" in
2926(no)
2927	case "$cf_add_cflags" in
2928	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2929		case "$cf_add_cflags" in
2930		(-D*)
2931			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2932
2933			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2934				&& test -z "${cf_tst_cflags}" \
2935				&& cf_fix_cppflags=yes
2936
2937			if test "$cf_fix_cppflags" = yes ; then
2938
2939	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2940	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2941
2942				continue
2943			elif test "${cf_tst_cflags}" = "\"'" ; then
2944
2945	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2946	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2947
2948				continue
2949			fi
2950			;;
2951		esac
2952		case "$CPPFLAGS" in
2953		(*$cf_add_cflags)
2954			;;
2955		(*)
2956			case "$cf_add_cflags" in
2957			(-D*)
2958				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2959
2960CPPFLAGS=`echo "$CPPFLAGS" | \
2961	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2962		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2963
2964				;;
2965			esac
2966
2967	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2968	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2969
2970			;;
2971		esac
2972		;;
2973	(*)
2974
2975	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2976	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2977
2978		;;
2979	esac
2980	;;
2981(yes)
2982
2983	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2984	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2985
2986	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2987
2988	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2989		&& test -z "${cf_tst_cflags}" \
2990		&& cf_fix_cppflags=no
2991	;;
2992esac
2993done
2994
2995if test -n "$cf_new_cflags" ; then
2996
2997	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2998	CFLAGS="${CFLAGS}$cf_new_cflags"
2999
3000fi
3001
3002if test -n "$cf_new_cppflags" ; then
3003
3004	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3005	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3006
3007fi
3008
3009if test -n "$cf_new_extra_cppflags" ; then
3010
3011	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3012	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3013
3014fi
3015
3016	done
3017	;;
3018(*)
3019	echo "$as_me:3019: result: ok" >&5
3020echo "${ECHO_T}ok" >&6
3021	;;
3022esac
3023
3024echo "$as_me:3024: checking \$CC variable" >&5
3025echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
3026case "$CC" in
3027(*[\ \	]-*)
3028	echo "$as_me:3028: result: broken" >&5
3029echo "${ECHO_T}broken" >&6
3030	{ echo "$as_me:3030: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
3031echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
3032	# humor him...
3033	cf_prog=`echo "$CC" | sed -e 's/	/ /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
3034	cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
3035	CC="$cf_prog"
3036	for cf_arg in $cf_flags
3037	do
3038		case "x$cf_arg" in
3039		(x-[IUDfgOW]*)
3040
3041cf_fix_cppflags=no
3042cf_new_cflags=
3043cf_new_cppflags=
3044cf_new_extra_cppflags=
3045
3046for cf_add_cflags in $cf_arg
3047do
3048case "$cf_fix_cppflags" in
3049(no)
3050	case "$cf_add_cflags" in
3051	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3052		case "$cf_add_cflags" in
3053		(-D*)
3054			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3055
3056			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3057				&& test -z "${cf_tst_cflags}" \
3058				&& cf_fix_cppflags=yes
3059
3060			if test "$cf_fix_cppflags" = yes ; then
3061
3062	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3063	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3064
3065				continue
3066			elif test "${cf_tst_cflags}" = "\"'" ; then
3067
3068	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3069	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3070
3071				continue
3072			fi
3073			;;
3074		esac
3075		case "$CPPFLAGS" in
3076		(*$cf_add_cflags)
3077			;;
3078		(*)
3079			case "$cf_add_cflags" in
3080			(-D*)
3081				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3082
3083CPPFLAGS=`echo "$CPPFLAGS" | \
3084	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3085		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3086
3087				;;
3088			esac
3089
3090	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3091	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3092
3093			;;
3094		esac
3095		;;
3096	(*)
3097
3098	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3099	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3100
3101		;;
3102	esac
3103	;;
3104(yes)
3105
3106	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3107	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3108
3109	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3110
3111	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3112		&& test -z "${cf_tst_cflags}" \
3113		&& cf_fix_cppflags=no
3114	;;
3115esac
3116done
3117
3118if test -n "$cf_new_cflags" ; then
3119
3120	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3121	CFLAGS="${CFLAGS}$cf_new_cflags"
3122
3123fi
3124
3125if test -n "$cf_new_cppflags" ; then
3126
3127	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3128	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3129
3130fi
3131
3132if test -n "$cf_new_extra_cppflags" ; then
3133
3134	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3135	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3136
3137fi
3138
3139			;;
3140		(*)
3141			CC="$CC $cf_arg"
3142			;;
3143		esac
3144	done
3145	test -n "$verbose" && echo "	resulting CC: '$CC'" 1>&6
3146
3147echo "${as_me:-configure}:3147: testing resulting CC: '$CC' ..." 1>&5
3148
3149	test -n "$verbose" && echo "	resulting CFLAGS: '$CFLAGS'" 1>&6
3150
3151echo "${as_me:-configure}:3151: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
3152
3153	test -n "$verbose" && echo "	resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
3154
3155echo "${as_me:-configure}:3155: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
3156
3157	;;
3158(*)
3159	echo "$as_me:3159: result: ok" >&5
3160echo "${ECHO_T}ok" >&6
3161	;;
3162esac
3163
3164	;;
3165esac
3166
3167ac_ext=c
3168ac_cpp='$CPP $CPPFLAGS'
3169ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3170ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3171ac_compiler_gnu=$ac_cv_c_compiler_gnu
3172ac_main_return="return"
3173echo "$as_me:3173: checking how to run the C preprocessor" >&5
3174echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3175# On Suns, sometimes $CPP names a directory.
3176if test -n "$CPP" && test -d "$CPP"; then
3177  CPP=
3178fi
3179if test -z "$CPP"; then
3180  if test "${ac_cv_prog_CPP+set}" = set; then
3181  echo $ECHO_N "(cached) $ECHO_C" >&6
3182else
3183      # Double quotes because CPP needs to be expanded
3184    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3185    do
3186      ac_preproc_ok=false
3187for ac_c_preproc_warn_flag in '' yes
3188do
3189  # Use a header file that comes with gcc, so configuring glibc
3190  # with a fresh cross-compiler works.
3191  # On the NeXT, cc -E runs the code through the compiler's parser,
3192  # not just through cpp. "Syntax error" is here to catch this case.
3193  cat >"conftest.$ac_ext" <<_ACEOF
3194#line 3194 "configure"
3195#include "confdefs.h"
3196#include <assert.h>
3197                     Syntax error
3198_ACEOF
3199if { (eval echo "$as_me:3199: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3200  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3201  ac_status=$?
3202  $EGREP -v '^ *\+' conftest.er1 >conftest.err
3203  rm -f conftest.er1
3204  cat conftest.err >&5
3205  echo "$as_me:3205: \$? = $ac_status" >&5
3206  (exit "$ac_status"); } >/dev/null; then
3207  if test -s conftest.err; then
3208    ac_cpp_err=$ac_c_preproc_warn_flag
3209  else
3210    ac_cpp_err=
3211  fi
3212else
3213  ac_cpp_err=yes
3214fi
3215if test -z "$ac_cpp_err"; then
3216  :
3217else
3218  echo "$as_me: failed program was:" >&5
3219  cat "conftest.$ac_ext" >&5
3220  # Broken: fails on valid input.
3221continue
3222fi
3223rm -f conftest.err "conftest.$ac_ext"
3224
3225  # OK, works on sane cases.  Now check whether non-existent headers
3226  # can be detected and how.
3227  cat >"conftest.$ac_ext" <<_ACEOF
3228#line 3228 "configure"
3229#include "confdefs.h"
3230#include <ac_nonexistent.h>
3231_ACEOF
3232if { (eval echo "$as_me:3232: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3233  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3234  ac_status=$?
3235  $EGREP -v '^ *\+' conftest.er1 >conftest.err
3236  rm -f conftest.er1
3237  cat conftest.err >&5
3238  echo "$as_me:3238: \$? = $ac_status" >&5
3239  (exit "$ac_status"); } >/dev/null; then
3240  if test -s conftest.err; then
3241    ac_cpp_err=$ac_c_preproc_warn_flag
3242  else
3243    ac_cpp_err=
3244  fi
3245else
3246  ac_cpp_err=yes
3247fi
3248if test -z "$ac_cpp_err"; then
3249  # Broken: success on invalid input.
3250continue
3251else
3252  echo "$as_me: failed program was:" >&5
3253  cat "conftest.$ac_ext" >&5
3254  # Passes both tests.
3255ac_preproc_ok=:
3256break
3257fi
3258rm -f conftest.err "conftest.$ac_ext"
3259
3260done
3261# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3262rm -f conftest.err "conftest.$ac_ext"
3263if $ac_preproc_ok; then
3264  break
3265fi
3266
3267    done
3268    ac_cv_prog_CPP=$CPP
3269
3270fi
3271  CPP=$ac_cv_prog_CPP
3272else
3273  ac_cv_prog_CPP=$CPP
3274fi
3275echo "$as_me:3275: result: $CPP" >&5
3276echo "${ECHO_T}$CPP" >&6
3277ac_preproc_ok=false
3278for ac_c_preproc_warn_flag in '' yes
3279do
3280  # Use a header file that comes with gcc, so configuring glibc
3281  # with a fresh cross-compiler works.
3282  # On the NeXT, cc -E runs the code through the compiler's parser,
3283  # not just through cpp. "Syntax error" is here to catch this case.
3284  cat >"conftest.$ac_ext" <<_ACEOF
3285#line 3285 "configure"
3286#include "confdefs.h"
3287#include <assert.h>
3288                     Syntax error
3289_ACEOF
3290if { (eval echo "$as_me:3290: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3291  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3292  ac_status=$?
3293  $EGREP -v '^ *\+' conftest.er1 >conftest.err
3294  rm -f conftest.er1
3295  cat conftest.err >&5
3296  echo "$as_me:3296: \$? = $ac_status" >&5
3297  (exit "$ac_status"); } >/dev/null; then
3298  if test -s conftest.err; then
3299    ac_cpp_err=$ac_c_preproc_warn_flag
3300  else
3301    ac_cpp_err=
3302  fi
3303else
3304  ac_cpp_err=yes
3305fi
3306if test -z "$ac_cpp_err"; then
3307  :
3308else
3309  echo "$as_me: failed program was:" >&5
3310  cat "conftest.$ac_ext" >&5
3311  # Broken: fails on valid input.
3312continue
3313fi
3314rm -f conftest.err "conftest.$ac_ext"
3315
3316  # OK, works on sane cases.  Now check whether non-existent headers
3317  # can be detected and how.
3318  cat >"conftest.$ac_ext" <<_ACEOF
3319#line 3319 "configure"
3320#include "confdefs.h"
3321#include <ac_nonexistent.h>
3322_ACEOF
3323if { (eval echo "$as_me:3323: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3324  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3325  ac_status=$?
3326  $EGREP -v '^ *\+' conftest.er1 >conftest.err
3327  rm -f conftest.er1
3328  cat conftest.err >&5
3329  echo "$as_me:3329: \$? = $ac_status" >&5
3330  (exit "$ac_status"); } >/dev/null; then
3331  if test -s conftest.err; then
3332    ac_cpp_err=$ac_c_preproc_warn_flag
3333  else
3334    ac_cpp_err=
3335  fi
3336else
3337  ac_cpp_err=yes
3338fi
3339if test -z "$ac_cpp_err"; then
3340  # Broken: success on invalid input.
3341continue
3342else
3343  echo "$as_me: failed program was:" >&5
3344  cat "conftest.$ac_ext" >&5
3345  # Passes both tests.
3346ac_preproc_ok=:
3347break
3348fi
3349rm -f conftest.err "conftest.$ac_ext"
3350
3351done
3352# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3353rm -f conftest.err "conftest.$ac_ext"
3354if $ac_preproc_ok; then
3355  :
3356else
3357  { { echo "$as_me:3357: error: C preprocessor \"$CPP\" fails sanity check" >&5
3358echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3359   { (exit 1); exit 1; }; }
3360fi
3361
3362ac_ext=c
3363ac_cpp='$CPP $CPPFLAGS'
3364ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3365ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3366ac_compiler_gnu=$ac_cv_c_compiler_gnu
3367ac_main_return="return"
3368
3369if test $ac_cv_c_compiler_gnu = yes; then
3370    echo "$as_me:3370: checking whether $CC needs -traditional" >&5
3371echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3372if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3373  echo $ECHO_N "(cached) $ECHO_C" >&6
3374else
3375    ac_pattern="Autoconf.*'x'"
3376  cat >"conftest.$ac_ext" <<_ACEOF
3377#line 3377 "configure"
3378#include "confdefs.h"
3379#include <sgtty.h>
3380int Autoconf = TIOCGETP;
3381_ACEOF
3382if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3383  $EGREP "$ac_pattern" >/dev/null 2>&1; then
3384  ac_cv_prog_gcc_traditional=yes
3385else
3386  ac_cv_prog_gcc_traditional=no
3387fi
3388rm -rf conftest*
3389
3390  if test $ac_cv_prog_gcc_traditional = no; then
3391    cat >"conftest.$ac_ext" <<_ACEOF
3392#line 3392 "configure"
3393#include "confdefs.h"
3394#include <termio.h>
3395int Autoconf = TCGETA;
3396_ACEOF
3397if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3398  $EGREP "$ac_pattern" >/dev/null 2>&1; then
3399  ac_cv_prog_gcc_traditional=yes
3400fi
3401rm -rf conftest*
3402
3403  fi
3404fi
3405echo "$as_me:3405: result: $ac_cv_prog_gcc_traditional" >&5
3406echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3407  if test $ac_cv_prog_gcc_traditional = yes; then
3408    CC="$CC -traditional"
3409  fi
3410fi
3411
3412echo "$as_me:3412: checking whether $CC understands -c and -o together" >&5
3413echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3414if test "${cf_cv_prog_CC_c_o+set}" = set; then
3415  echo $ECHO_N "(cached) $ECHO_C" >&6
3416else
3417
3418cat > conftest.$ac_ext <<CF_EOF
3419int main(void)
3420{
3421	${cf_cv_main_return:-return}(0);
3422}
3423CF_EOF
3424# We do the test twice because some compilers refuse to overwrite an
3425# existing .o file with -o, though they will create one.
3426ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3427if { (eval echo "$as_me:3427: \"$ac_try\"") >&5
3428  (eval $ac_try) 2>&5
3429  ac_status=$?
3430  echo "$as_me:3430: \$? = $ac_status" >&5
3431  (exit "$ac_status"); } &&
3432  test -f conftest2.$ac_objext && { (eval echo "$as_me:3432: \"$ac_try\"") >&5
3433  (eval $ac_try) 2>&5
3434  ac_status=$?
3435  echo "$as_me:3435: \$? = $ac_status" >&5
3436  (exit "$ac_status"); };
3437then
3438  eval cf_cv_prog_CC_c_o=yes
3439else
3440  eval cf_cv_prog_CC_c_o=no
3441fi
3442rm -rf ./conftest*
3443
3444fi
3445if test "$cf_cv_prog_CC_c_o" = yes; then
3446  echo "$as_me:3446: result: yes" >&5
3447echo "${ECHO_T}yes" >&6
3448else
3449  echo "$as_me:3449: result: no" >&5
3450echo "${ECHO_T}no" >&6
3451fi
3452
3453if test "$cross_compiling" = yes ; then
3454	LDCONFIG=:
3455else
3456	case "$cf_cv_system_name" in
3457	(dragonfly*|mirbsd*|freebsd*)
3458		test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3459		;;
3460	(*) LDPATH=$PATH:/sbin:/usr/sbin
3461		# Extract the first word of "ldconfig", so it can be a program name with args.
3462set dummy ldconfig; ac_word=$2
3463echo "$as_me:3463: checking for $ac_word" >&5
3464echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3465if test "${ac_cv_path_LDCONFIG+set}" = set; then
3466  echo $ECHO_N "(cached) $ECHO_C" >&6
3467else
3468  case $LDCONFIG in
3469  [\\/]* | ?:[\\/]*)
3470  ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3471  ;;
3472  *)
3473  ac_save_IFS=$IFS; IFS=$ac_path_separator
3474ac_dummy="$LDPATH"
3475for ac_dir in $ac_dummy; do
3476  IFS=$ac_save_IFS
3477  test -z "$ac_dir" && ac_dir=.
3478  if $as_executable_p "$ac_dir/$ac_word"; then
3479   ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3480   echo "$as_me:3480: found $ac_dir/$ac_word" >&5
3481   break
3482fi
3483done
3484
3485  ;;
3486esac
3487fi
3488LDCONFIG=$ac_cv_path_LDCONFIG
3489
3490if test -n "$LDCONFIG"; then
3491  echo "$as_me:3491: result: $LDCONFIG" >&5
3492echo "${ECHO_T}$LDCONFIG" >&6
3493else
3494  echo "$as_me:3494: result: no" >&5
3495echo "${ECHO_T}no" >&6
3496fi
3497
3498		;;
3499	esac
3500fi
3501
3502echo "$as_me:3502: checking if you want to ensure bool is consistent with C++" >&5
3503echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3504
3505# Check whether --with-cxx or --without-cxx was given.
3506if test "${with_cxx+set}" = set; then
3507  withval="$with_cxx"
3508  cf_with_cxx=$withval
3509else
3510  cf_with_cxx=yes
3511fi;
3512echo "$as_me:3512: result: $cf_with_cxx" >&5
3513echo "${ECHO_T}$cf_with_cxx" >&6
3514if test "X$cf_with_cxx" = Xno ; then
3515	CXX=""
3516	GXX=""
3517else
3518	# with autoconf 2.13, we can change the error to a warning:
3519		ac_ext=cc
3520ac_cpp='$CXXCPP $CPPFLAGS'
3521ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3522ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3523ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3524ac_main_return="return"
3525if test -n "$ac_tool_prefix"; then
3526  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3527  do
3528    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3529set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3530echo "$as_me:3530: checking for $ac_word" >&5
3531echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3532if test "${ac_cv_prog_CXX+set}" = set; then
3533  echo $ECHO_N "(cached) $ECHO_C" >&6
3534else
3535  if test -n "$CXX"; then
3536  ac_cv_prog_CXX="$CXX" # Let the user override the test.
3537else
3538  ac_save_IFS=$IFS; IFS=$ac_path_separator
3539ac_dummy="$PATH"
3540for ac_dir in $ac_dummy; do
3541  IFS=$ac_save_IFS
3542  test -z "$ac_dir" && ac_dir=.
3543  $as_executable_p "$ac_dir/$ac_word" || continue
3544ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3545echo "$as_me:3545: found $ac_dir/$ac_word" >&5
3546break
3547done
3548
3549fi
3550fi
3551CXX=$ac_cv_prog_CXX
3552if test -n "$CXX"; then
3553  echo "$as_me:3553: result: $CXX" >&5
3554echo "${ECHO_T}$CXX" >&6
3555else
3556  echo "$as_me:3556: result: no" >&5
3557echo "${ECHO_T}no" >&6
3558fi
3559
3560    test -n "$CXX" && break
3561  done
3562fi
3563if test -z "$CXX"; then
3564  ac_ct_CXX=$CXX
3565  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3566do
3567  # Extract the first word of "$ac_prog", so it can be a program name with args.
3568set dummy $ac_prog; ac_word=$2
3569echo "$as_me:3569: checking for $ac_word" >&5
3570echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3571if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3572  echo $ECHO_N "(cached) $ECHO_C" >&6
3573else
3574  if test -n "$ac_ct_CXX"; then
3575  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3576else
3577  ac_save_IFS=$IFS; IFS=$ac_path_separator
3578ac_dummy="$PATH"
3579for ac_dir in $ac_dummy; do
3580  IFS=$ac_save_IFS
3581  test -z "$ac_dir" && ac_dir=.
3582  $as_executable_p "$ac_dir/$ac_word" || continue
3583ac_cv_prog_ac_ct_CXX="$ac_prog"
3584echo "$as_me:3584: found $ac_dir/$ac_word" >&5
3585break
3586done
3587
3588fi
3589fi
3590ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3591if test -n "$ac_ct_CXX"; then
3592  echo "$as_me:3592: result: $ac_ct_CXX" >&5
3593echo "${ECHO_T}$ac_ct_CXX" >&6
3594else
3595  echo "$as_me:3595: result: no" >&5
3596echo "${ECHO_T}no" >&6
3597fi
3598
3599  test -n "$ac_ct_CXX" && break
3600done
3601test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3602
3603  CXX=$ac_ct_CXX
3604fi
3605
3606# Provide some information about the compiler.
3607echo "$as_me:3607:" \
3608     "checking for C++ compiler version" >&5
3609ac_compiler=`set X $ac_compile; echo $2`
3610{ (eval echo "$as_me:3610: \"$ac_compiler --version </dev/null >&5\"") >&5
3611  (eval $ac_compiler --version </dev/null >&5) 2>&5
3612  ac_status=$?
3613  echo "$as_me:3613: \$? = $ac_status" >&5
3614  (exit "$ac_status"); }
3615{ (eval echo "$as_me:3615: \"$ac_compiler -v </dev/null >&5\"") >&5
3616  (eval $ac_compiler -v </dev/null >&5) 2>&5
3617  ac_status=$?
3618  echo "$as_me:3618: \$? = $ac_status" >&5
3619  (exit "$ac_status"); }
3620{ (eval echo "$as_me:3620: \"$ac_compiler -V </dev/null >&5\"") >&5
3621  (eval $ac_compiler -V </dev/null >&5) 2>&5
3622  ac_status=$?
3623  echo "$as_me:3623: \$? = $ac_status" >&5
3624  (exit "$ac_status"); }
3625
3626echo "$as_me:3626: checking whether we are using the GNU C++ compiler" >&5
3627echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3628if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3629  echo $ECHO_N "(cached) $ECHO_C" >&6
3630else
3631  cat >"conftest.$ac_ext" <<_ACEOF
3632#line 3632 "configure"
3633#include "confdefs.h"
3634
3635int
3636main (void)
3637{
3638#ifndef __GNUC__
3639       choke me
3640#endif
3641
3642  ;
3643  return 0;
3644}
3645_ACEOF
3646rm -f "conftest.$ac_objext"
3647if { (eval echo "$as_me:3647: \"$ac_compile\"") >&5
3648  (eval $ac_compile) 2>&5
3649  ac_status=$?
3650  echo "$as_me:3650: \$? = $ac_status" >&5
3651  (exit "$ac_status"); } &&
3652         { ac_try='test -s "conftest.$ac_objext"'
3653  { (eval echo "$as_me:3653: \"$ac_try\"") >&5
3654  (eval $ac_try) 2>&5
3655  ac_status=$?
3656  echo "$as_me:3656: \$? = $ac_status" >&5
3657  (exit "$ac_status"); }; }; then
3658  ac_compiler_gnu=yes
3659else
3660  echo "$as_me: failed program was:" >&5
3661cat "conftest.$ac_ext" >&5
3662ac_compiler_gnu=no
3663fi
3664rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3665ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3666
3667fi
3668echo "$as_me:3668: result: $ac_cv_cxx_compiler_gnu" >&5
3669echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3670GXX=`test $ac_compiler_gnu = yes && echo yes`
3671ac_test_CXXFLAGS=${CXXFLAGS+set}
3672ac_save_CXXFLAGS=$CXXFLAGS
3673CXXFLAGS="-g"
3674echo "$as_me:3674: checking whether $CXX accepts -g" >&5
3675echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3676if test "${ac_cv_prog_cxx_g+set}" = set; then
3677  echo $ECHO_N "(cached) $ECHO_C" >&6
3678else
3679  cat >"conftest.$ac_ext" <<_ACEOF
3680#line 3680 "configure"
3681#include "confdefs.h"
3682
3683int
3684main (void)
3685{
3686
3687  ;
3688  return 0;
3689}
3690_ACEOF
3691rm -f "conftest.$ac_objext"
3692if { (eval echo "$as_me:3692: \"$ac_compile\"") >&5
3693  (eval $ac_compile) 2>&5
3694  ac_status=$?
3695  echo "$as_me:3695: \$? = $ac_status" >&5
3696  (exit "$ac_status"); } &&
3697         { ac_try='test -s "conftest.$ac_objext"'
3698  { (eval echo "$as_me:3698: \"$ac_try\"") >&5
3699  (eval $ac_try) 2>&5
3700  ac_status=$?
3701  echo "$as_me:3701: \$? = $ac_status" >&5
3702  (exit "$ac_status"); }; }; then
3703  ac_cv_prog_cxx_g=yes
3704else
3705  echo "$as_me: failed program was:" >&5
3706cat "conftest.$ac_ext" >&5
3707ac_cv_prog_cxx_g=no
3708fi
3709rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3710fi
3711echo "$as_me:3711: result: $ac_cv_prog_cxx_g" >&5
3712echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3713if test "$ac_test_CXXFLAGS" = set; then
3714  CXXFLAGS=$ac_save_CXXFLAGS
3715elif test $ac_cv_prog_cxx_g = yes; then
3716  if test "$GXX" = yes; then
3717    CXXFLAGS="-g -O2"
3718  else
3719    CXXFLAGS="-g"
3720  fi
3721else
3722  if test "$GXX" = yes; then
3723    CXXFLAGS="-O2"
3724  else
3725    CXXFLAGS=
3726  fi
3727fi
3728for ac_declaration in \
3729   ''\
3730   '#include <stdlib.h>' \
3731   'extern "C" void std::exit (int) throw (); using std::exit;' \
3732   'extern "C" void std::exit (int); using std::exit;' \
3733   'extern "C" void exit (int) throw ();' \
3734   'extern "C" void exit (int);' \
3735   'void exit (int);'
3736do
3737  cat >"conftest.$ac_ext" <<_ACEOF
3738#line 3738 "configure"
3739#include "confdefs.h"
3740#include <stdlib.h>
3741$ac_declaration
3742int
3743main (void)
3744{
3745exit (42);
3746  ;
3747  return 0;
3748}
3749_ACEOF
3750rm -f "conftest.$ac_objext"
3751if { (eval echo "$as_me:3751: \"$ac_compile\"") >&5
3752  (eval $ac_compile) 2>&5
3753  ac_status=$?
3754  echo "$as_me:3754: \$? = $ac_status" >&5
3755  (exit "$ac_status"); } &&
3756         { ac_try='test -s "conftest.$ac_objext"'
3757  { (eval echo "$as_me:3757: \"$ac_try\"") >&5
3758  (eval $ac_try) 2>&5
3759  ac_status=$?
3760  echo "$as_me:3760: \$? = $ac_status" >&5
3761  (exit "$ac_status"); }; }; then
3762  :
3763else
3764  echo "$as_me: failed program was:" >&5
3765cat "conftest.$ac_ext" >&5
3766continue
3767fi
3768rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3769  cat >"conftest.$ac_ext" <<_ACEOF
3770#line 3770 "configure"
3771#include "confdefs.h"
3772$ac_declaration
3773int
3774main (void)
3775{
3776exit (42);
3777  ;
3778  return 0;
3779}
3780_ACEOF
3781rm -f "conftest.$ac_objext"
3782if { (eval echo "$as_me:3782: \"$ac_compile\"") >&5
3783  (eval $ac_compile) 2>&5
3784  ac_status=$?
3785  echo "$as_me:3785: \$? = $ac_status" >&5
3786  (exit "$ac_status"); } &&
3787         { ac_try='test -s "conftest.$ac_objext"'
3788  { (eval echo "$as_me:3788: \"$ac_try\"") >&5
3789  (eval $ac_try) 2>&5
3790  ac_status=$?
3791  echo "$as_me:3791: \$? = $ac_status" >&5
3792  (exit "$ac_status"); }; }; then
3793  break
3794else
3795  echo "$as_me: failed program was:" >&5
3796cat "conftest.$ac_ext" >&5
3797fi
3798rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3799done
3800rm -rf conftest*
3801if test -n "$ac_declaration"; then
3802  echo '#ifdef __cplusplus' >>confdefs.h
3803  echo "$ac_declaration"    >>confdefs.h
3804  echo '#endif'             >>confdefs.h
3805fi
3806
3807ac_ext=c
3808ac_cpp='$CPP $CPPFLAGS'
3809ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3810ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3811ac_compiler_gnu=$ac_cv_c_compiler_gnu
3812ac_main_return="return"
3813
3814	ac_ext=cc
3815ac_cpp='$CXXCPP $CPPFLAGS'
3816ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3817ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3818ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3819ac_main_return="return"
3820
3821	if test "x$cf_with_cxx" != xno
3822	then
3823		# Several of the C++ configurations do not work, particularly when
3824		# cross-compiling (20140913 -TD)
3825		echo "$as_me:3825: checking if $CXX works" >&5
3826echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3827
3828		save_CPPFLAGS="$CPPFLAGS"
3829		eval cf_includedir=${includedir}
3830		CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3831
3832cat >"conftest.$ac_ext" <<_ACEOF
3833#line 3833 "configure"
3834#include "confdefs.h"
3835
3836#include <stdlib.h>
3837#include <stdio.h>
3838
3839int
3840main (void)
3841{
3842
3843		printf("Hello world!\n")
3844
3845  ;
3846  return 0;
3847}
3848_ACEOF
3849rm -f "conftest.$ac_objext"
3850if { (eval echo "$as_me:3850: \"$ac_compile\"") >&5
3851  (eval $ac_compile) 2>&5
3852  ac_status=$?
3853  echo "$as_me:3853: \$? = $ac_status" >&5
3854  (exit "$ac_status"); } &&
3855         { ac_try='test -s "conftest.$ac_objext"'
3856  { (eval echo "$as_me:3856: \"$ac_try\"") >&5
3857  (eval $ac_try) 2>&5
3858  ac_status=$?
3859  echo "$as_me:3859: \$? = $ac_status" >&5
3860  (exit "$ac_status"); }; }; then
3861  cf_cxx_works=yes
3862else
3863  echo "$as_me: failed program was:" >&5
3864cat "conftest.$ac_ext" >&5
3865cf_cxx_works=no
3866fi
3867rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3868		CPPFLAGS="$save_CPPFLAGS"
3869
3870		echo "$as_me:3870: result: $cf_cxx_works" >&5
3871echo "${ECHO_T}$cf_cxx_works" >&6
3872		if test "x$cf_cxx_works" = xno
3873		then
3874			{ echo "$as_me:3874: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3875echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3876			cf_with_cxx=no; CXX=""; GXX="";
3877		fi
3878	fi
3879	ac_ext=c
3880ac_cpp='$CPP $CPPFLAGS'
3881ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3882ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3883ac_compiler_gnu=$ac_cv_c_compiler_gnu
3884ac_main_return="return"
3885
3886	# autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3887	if test "$CXX" = "g++" ; then
3888		# Extract the first word of "g++", so it can be a program name with args.
3889set dummy g++; ac_word=$2
3890echo "$as_me:3890: checking for $ac_word" >&5
3891echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3892if test "${ac_cv_path_CXX+set}" = set; then
3893  echo $ECHO_N "(cached) $ECHO_C" >&6
3894else
3895  case $CXX in
3896  [\\/]* | ?:[\\/]*)
3897  ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3898  ;;
3899  *)
3900  ac_save_IFS=$IFS; IFS=$ac_path_separator
3901ac_dummy="$PATH"
3902for ac_dir in $ac_dummy; do
3903  IFS=$ac_save_IFS
3904  test -z "$ac_dir" && ac_dir=.
3905  if $as_executable_p "$ac_dir/$ac_word"; then
3906   ac_cv_path_CXX="$ac_dir/$ac_word"
3907   echo "$as_me:3907: found $ac_dir/$ac_word" >&5
3908   break
3909fi
3910done
3911
3912  ;;
3913esac
3914fi
3915CXX=$ac_cv_path_CXX
3916
3917if test -n "$CXX"; then
3918  echo "$as_me:3918: result: $CXX" >&5
3919echo "${ECHO_T}$CXX" >&6
3920else
3921  echo "$as_me:3921: result: no" >&5
3922echo "${ECHO_T}no" >&6
3923fi
3924
3925	fi
3926	case "x$CXX" in
3927	(x|xg++)
3928		{ echo "$as_me:3928: WARNING: You don't have any C++ compiler, too bad" >&5
3929echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3930		cf_with_cxx=no; CXX=""; GXX="";
3931		;;
3932	esac
3933fi
3934
3935GXX_VERSION=none
3936if test "$GXX" = yes; then
3937	echo "$as_me:3937: checking version of ${CXX:-g++}" >&5
3938echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3939	GXX_VERSION="`${CXX:-g++} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3940	if test -z "$GXX_VERSION"
3941	then
3942		GXX_VERSION=unknown
3943		GXX=no
3944	fi
3945	echo "$as_me:3945: result: $GXX_VERSION" >&5
3946echo "${ECHO_T}$GXX_VERSION" >&6
3947fi
3948
3949case "$GXX_VERSION" in
3950([1-9][0-9].*)
3951	;;
3952(1.*|2.[0-6]*)
3953	{ echo "$as_me:3953: WARNING: templates do not work" >&5
3954echo "$as_me: WARNING: templates do not work" >&2;}
3955	;;
3956esac
3957
3958echo "$as_me:3958: checking if you want to build C++ binding and demo" >&5
3959echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3960
3961# Check whether --with-cxx-binding or --without-cxx-binding was given.
3962if test "${with_cxx_binding+set}" = set; then
3963  withval="$with_cxx_binding"
3964  cf_with_cxx_binding=$withval
3965else
3966  cf_with_cxx_binding=$cf_with_cxx
3967fi;
3968echo "$as_me:3968: result: $cf_with_cxx_binding" >&5
3969echo "${ECHO_T}$cf_with_cxx_binding" >&6
3970
3971echo "$as_me:3971: checking if you want to build with Ada" >&5
3972echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3973echo "$as_me:3973: result: $cf_with_ada" >&5
3974echo "${ECHO_T}$cf_with_ada" >&6
3975
3976echo "$as_me:3976: checking if you want to install terminal database" >&5
3977echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3978
3979# Check whether --enable-db-install or --disable-db-install was given.
3980if test "${enable_db_install+set}" = set; then
3981  enableval="$enable_db_install"
3982  cf_with_db_install=$enableval
3983else
3984  cf_with_db_install=yes
3985fi;
3986echo "$as_me:3986: result: $cf_with_db_install" >&5
3987echo "${ECHO_T}$cf_with_db_install" >&6
3988
3989echo "$as_me:3989: checking if you want to install manpages" >&5
3990echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3991
3992# Check whether --with-manpages or --without-manpages was given.
3993if test "${with_manpages+set}" = set; then
3994  withval="$with_manpages"
3995  cf_with_manpages=$withval
3996else
3997  cf_with_manpages=yes
3998fi;
3999echo "$as_me:3999: result: $cf_with_manpages" >&5
4000echo "${ECHO_T}$cf_with_manpages" >&6
4001
4002echo "$as_me:4002: checking if you want to build programs such as tic" >&5
4003echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
4004
4005# Check whether --with-progs or --without-progs was given.
4006if test "${with_progs+set}" = set; then
4007  withval="$with_progs"
4008  cf_with_progs=$withval
4009else
4010  cf_with_progs=yes
4011fi;
4012echo "$as_me:4012: result: $cf_with_progs" >&5
4013echo "${ECHO_T}$cf_with_progs" >&6
4014
4015echo "$as_me:4015: checking if you want to build test-programs" >&5
4016echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
4017
4018# Check whether --with-tests or --without-tests was given.
4019if test "${with_tests+set}" = set; then
4020  withval="$with_tests"
4021  cf_with_tests=$withval
4022else
4023  cf_with_tests=yes
4024fi;
4025echo "$as_me:4025: result: $cf_with_tests" >&5
4026echo "${ECHO_T}$cf_with_tests" >&6
4027
4028echo "$as_me:4028: checking if you wish to install curses.h" >&5
4029echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
4030
4031# Check whether --with-curses-h or --without-curses-h was given.
4032if test "${with_curses_h+set}" = set; then
4033  withval="$with_curses_h"
4034  with_curses_h=$withval
4035else
4036  with_curses_h=yes
4037fi;
4038echo "$as_me:4038: result: $with_curses_h" >&5
4039echo "${ECHO_T}$with_curses_h" >&6
4040
4041modules_to_build="ncurses"
4042test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
4043modules_to_build="$modules_to_build panel menu form"
4044
4045test "$program_prefix" != NONE &&
4046  program_transform_name="s,^,$program_prefix,;$program_transform_name"
4047# Use a double $ so make ignores it.
4048test "$program_suffix" != NONE &&
4049  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
4050# Double any \ or $.  echo might interpret backslashes.
4051# By default was `s,x,x', remove it if useless.
4052cat <<\_ACEOF >conftest.sed
4053s/[\\$]/&&/g;s/;s,x,x,$//
4054_ACEOF
4055program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
4056rm conftest.sed
4057
4058for ac_prog in mawk gawk nawk awk
4059do
4060  # Extract the first word of "$ac_prog", so it can be a program name with args.
4061set dummy $ac_prog; ac_word=$2
4062echo "$as_me:4062: checking for $ac_word" >&5
4063echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4064if test "${ac_cv_prog_AWK+set}" = set; then
4065  echo $ECHO_N "(cached) $ECHO_C" >&6
4066else
4067  if test -n "$AWK"; then
4068  ac_cv_prog_AWK="$AWK" # Let the user override the test.
4069else
4070  ac_save_IFS=$IFS; IFS=$ac_path_separator
4071ac_dummy="$PATH"
4072for ac_dir in $ac_dummy; do
4073  IFS=$ac_save_IFS
4074  test -z "$ac_dir" && ac_dir=.
4075  $as_executable_p "$ac_dir/$ac_word" || continue
4076ac_cv_prog_AWK="$ac_prog"
4077echo "$as_me:4077: found $ac_dir/$ac_word" >&5
4078break
4079done
4080
4081fi
4082fi
4083AWK=$ac_cv_prog_AWK
4084if test -n "$AWK"; then
4085  echo "$as_me:4085: result: $AWK" >&5
4086echo "${ECHO_T}$AWK" >&6
4087else
4088  echo "$as_me:4088: result: no" >&5
4089echo "${ECHO_T}no" >&6
4090fi
4091
4092  test -n "$AWK" && break
4093done
4094
4095test -z "$AWK" && { { echo "$as_me:4095: error: No awk program found" >&5
4096echo "$as_me: error: No awk program found" >&2;}
4097   { (exit 1); exit 1; }; }
4098
4099case "$cf_cv_system_name" in
4100(cygwin*|msys*|mingw32*|mingw64|os2*)
4101	GLOB_FULLPATH_POSIX='/*'
4102	GLOB_FULLPATH_OTHER='[a-zA-Z]:[\\/]*'
4103	;;
4104(*)
4105	GLOB_FULLPATH_POSIX='/*'
4106	GLOB_FULLPATH_OTHER=$GLOB_FULLPATH_POSIX
4107	;;
4108esac
4109
4110# Find a good install program.  We prefer a C program (faster),
4111# so one script is as good as another.  But avoid the broken or
4112# incompatible versions:
4113# SysV /etc/install, /usr/sbin/install
4114# SunOS /usr/etc/install
4115# IRIX /sbin/install
4116# AIX /bin/install
4117# AmigaOS /C/install, which installs bootblocks on floppy discs
4118# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4119# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4120# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4121# ./install, which can be erroneously created by make from ./install.sh.
4122echo "$as_me:4122: checking for a BSD compatible install" >&5
4123echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
4124if test -z "$INSTALL"; then
4125if test "${ac_cv_path_install+set}" = set; then
4126  echo $ECHO_N "(cached) $ECHO_C" >&6
4127else
4128    ac_save_IFS=$IFS; IFS=$ac_path_separator
4129  for ac_dir in $PATH; do
4130    IFS=$ac_save_IFS
4131    # Account for people who put trailing slashes in PATH elements.
4132    case $ac_dir/ in
4133    / | ./ | .// | /cC/* \
4134    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
4135    | /usr/ucb/* ) ;;
4136    *)
4137      # OSF1 and SCO ODT 3.0 have their own names for install.
4138      # Don't use installbsd from OSF since it installs stuff as root
4139      # by default.
4140      for ac_prog in ginstall scoinst install; do
4141        if $as_executable_p "$ac_dir/$ac_prog"; then
4142	  if test $ac_prog = install &&
4143            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
4144	    # AIX install.  It has an incompatible calling convention.
4145	    :
4146	  elif test $ac_prog = install &&
4147	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
4148	    # program-specific install script used by HP pwplus--don't use.
4149	    :
4150	  else
4151	    ac_cv_path_install="$ac_dir/$ac_prog -c"
4152	    break 2
4153	  fi
4154	fi
4155      done
4156      ;;
4157    esac
4158  done
4159
4160fi
4161  if test "${ac_cv_path_install+set}" = set; then
4162    INSTALL=$ac_cv_path_install
4163  else
4164    # As a last resort, use the slow shell script.  We don't cache a
4165    # path for INSTALL within a source directory, because that will
4166    # break other packages using the cache if that directory is
4167    # removed, or if the path is relative.
4168    INSTALL=$ac_install_sh
4169  fi
4170fi
4171echo "$as_me:4171: result: $INSTALL" >&5
4172echo "${ECHO_T}$INSTALL" >&6
4173
4174# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4175# It thinks the first close brace ends the variable substitution.
4176test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4177
4178test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4179
4180test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4181
4182if test "x$INSTALL" = "x./install-sh -c"; then
4183	if test -f /usr/sbin/install ; then
4184		case "$host_os" in
4185		(linux*gnu*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
4186			INSTALL=/usr/sbin/install
4187			;;
4188		esac
4189	fi
4190fi
4191case x$INSTALL in
4192(x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
4193	;;
4194(*)
4195	cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
4196	test -z "$cf_dir" && cf_dir=.
4197	INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
4198	;;
4199esac
4200
4201for ac_prog in lint cppcheck splint
4202do
4203  # Extract the first word of "$ac_prog", so it can be a program name with args.
4204set dummy $ac_prog; ac_word=$2
4205echo "$as_me:4205: checking for $ac_word" >&5
4206echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4207if test "${ac_cv_prog_LINT+set}" = set; then
4208  echo $ECHO_N "(cached) $ECHO_C" >&6
4209else
4210  if test -n "$LINT"; then
4211  ac_cv_prog_LINT="$LINT" # Let the user override the test.
4212else
4213  ac_save_IFS=$IFS; IFS=$ac_path_separator
4214ac_dummy="$PATH"
4215for ac_dir in $ac_dummy; do
4216  IFS=$ac_save_IFS
4217  test -z "$ac_dir" && ac_dir=.
4218  $as_executable_p "$ac_dir/$ac_word" || continue
4219ac_cv_prog_LINT="$ac_prog"
4220echo "$as_me:4220: found $ac_dir/$ac_word" >&5
4221break
4222done
4223
4224fi
4225fi
4226LINT=$ac_cv_prog_LINT
4227if test -n "$LINT"; then
4228  echo "$as_me:4228: result: $LINT" >&5
4229echo "${ECHO_T}$LINT" >&6
4230else
4231  echo "$as_me:4231: result: no" >&5
4232echo "${ECHO_T}no" >&6
4233fi
4234
4235  test -n "$LINT" && break
4236done
4237
4238case "x$LINT" in
4239(xlint|x*/lint) # NetBSD 10
4240	test -z "$LINT_OPTS" && LINT_OPTS="-chapbrxzgFS -v -Ac11"
4241	;;
4242(xcppcheck|x*/cppcheck)
4243	test -z "$LINT_OPTS" && LINT_OPTS="--enable=all -D__CPPCHECK__"
4244	;;
4245esac
4246
4247echo "$as_me:4247: checking whether ln -s works" >&5
4248echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4249LN_S=$as_ln_s
4250if test "$LN_S" = "ln -s"; then
4251  echo "$as_me:4251: result: yes" >&5
4252echo "${ECHO_T}yes" >&6
4253else
4254  echo "$as_me:4254: result: no, using $LN_S" >&5
4255echo "${ECHO_T}no, using $LN_S" >&6
4256fi
4257
4258echo "$as_me:4258: checking if $LN_S -f options work" >&5
4259echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
4260
4261rm -f conf$$.src conf$$dst
4262echo >conf$$.dst
4263echo first >conf$$.src
4264if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
4265	cf_prog_ln_sf=yes
4266else
4267	cf_prog_ln_sf=no
4268fi
4269rm -f conf$$.dst conf$$src
4270echo "$as_me:4270: result: $cf_prog_ln_sf" >&5
4271echo "${ECHO_T}$cf_prog_ln_sf" >&6
4272
4273test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
4274
4275echo "$as_me:4275: checking for long file names" >&5
4276echo $ECHO_N "checking for long file names... $ECHO_C" >&6
4277if test "${ac_cv_sys_long_file_names+set}" = set; then
4278  echo $ECHO_N "(cached) $ECHO_C" >&6
4279else
4280  ac_cv_sys_long_file_names=yes
4281# Test for long file names in all the places we know might matter:
4282#      .		the current directory, where building will happen
4283#      $prefix/lib	where we will be installing things
4284#      $exec_prefix/lib	likewise
4285# eval it to expand exec_prefix.
4286#      $TMPDIR		if set, where it might want to write temporary files
4287# if $TMPDIR is not set:
4288#      /tmp		where it might want to write temporary files
4289#      /var/tmp		likewise
4290#      /usr/tmp		likewise
4291if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4292  ac_tmpdirs=$TMPDIR
4293else
4294  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4295fi
4296for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
4297  test -d "$ac_dir" || continue
4298  test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
4299  ac_xdir=$ac_dir/cf$$
4300  (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
4301  ac_tf1=$ac_xdir/conftest9012345
4302  ac_tf2=$ac_xdir/conftest9012346
4303  (echo 1 >"$ac_tf1") 2>/dev/null
4304  (echo 2 >"$ac_tf2") 2>/dev/null
4305  ac_val=`cat "$ac_tf1" 2>/dev/null`
4306  if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
4307    ac_cv_sys_long_file_names=no
4308    rm -rf "$ac_xdir" 2>/dev/null
4309    break
4310  fi
4311  rm -rf "$ac_xdir" 2>/dev/null
4312done
4313fi
4314echo "$as_me:4314: result: $ac_cv_sys_long_file_names" >&5
4315echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
4316if test "$ac_cv_sys_long_file_names" = yes; then
4317
4318cat >>confdefs.h <<\EOF
4319#define HAVE_LONG_FILE_NAMES 1
4320EOF
4321
4322fi
4323
4324# Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
4325# of package conflict.
4326cf_config_suffix=
4327
4328# Check whether --with-config-suffix or --without-config-suffix was given.
4329if test "${with_config_suffix+set}" = set; then
4330  withval="$with_config_suffix"
4331  case "x$withval" in
4332	(xyes|xno)
4333		{ echo "$as_me:4333: WARNING: expected a value for config-suffix option" >&5
4334echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
4335		;;
4336	(*)	cf_config_suffix="$withval"
4337		;;
4338	esac
4339fi;
4340
4341# If we find pkg-config, check if we should install the ".pc" files.
4342
4343echo "$as_me:4343: checking if you want to use pkg-config" >&5
4344echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4345
4346# Check whether --with-pkg-config or --without-pkg-config was given.
4347if test "${with_pkg_config+set}" = set; then
4348  withval="$with_pkg_config"
4349  cf_pkg_config=$withval
4350else
4351  cf_pkg_config=yes
4352fi;
4353echo "$as_me:4353: result: $cf_pkg_config" >&5
4354echo "${ECHO_T}$cf_pkg_config" >&6
4355
4356case "$cf_pkg_config" in
4357(no)
4358	PKG_CONFIG=none
4359	;;
4360(yes)
4361
4362if test -n "$ac_tool_prefix"; then
4363  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4364set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4365echo "$as_me:4365: checking for $ac_word" >&5
4366echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4367if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4368  echo $ECHO_N "(cached) $ECHO_C" >&6
4369else
4370  case $PKG_CONFIG in
4371  [\\/]* | ?:[\\/]*)
4372  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4373  ;;
4374  *)
4375  ac_save_IFS=$IFS; IFS=$ac_path_separator
4376ac_dummy="$PATH"
4377for ac_dir in $ac_dummy; do
4378  IFS=$ac_save_IFS
4379  test -z "$ac_dir" && ac_dir=.
4380  if $as_executable_p "$ac_dir/$ac_word"; then
4381   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4382   echo "$as_me:4382: found $ac_dir/$ac_word" >&5
4383   break
4384fi
4385done
4386
4387  ;;
4388esac
4389fi
4390PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4391
4392if test -n "$PKG_CONFIG"; then
4393  echo "$as_me:4393: result: $PKG_CONFIG" >&5
4394echo "${ECHO_T}$PKG_CONFIG" >&6
4395else
4396  echo "$as_me:4396: result: no" >&5
4397echo "${ECHO_T}no" >&6
4398fi
4399
4400fi
4401if test -z "$ac_cv_path_PKG_CONFIG"; then
4402  ac_pt_PKG_CONFIG=$PKG_CONFIG
4403  # Extract the first word of "pkg-config", so it can be a program name with args.
4404set dummy pkg-config; ac_word=$2
4405echo "$as_me:4405: checking for $ac_word" >&5
4406echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4407if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4408  echo $ECHO_N "(cached) $ECHO_C" >&6
4409else
4410  case $ac_pt_PKG_CONFIG in
4411  [\\/]* | ?:[\\/]*)
4412  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4413  ;;
4414  *)
4415  ac_save_IFS=$IFS; IFS=$ac_path_separator
4416ac_dummy="$PATH"
4417for ac_dir in $ac_dummy; do
4418  IFS=$ac_save_IFS
4419  test -z "$ac_dir" && ac_dir=.
4420  if $as_executable_p "$ac_dir/$ac_word"; then
4421   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4422   echo "$as_me:4422: found $ac_dir/$ac_word" >&5
4423   break
4424fi
4425done
4426
4427  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4428  ;;
4429esac
4430fi
4431ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4432
4433if test -n "$ac_pt_PKG_CONFIG"; then
4434  echo "$as_me:4434: result: $ac_pt_PKG_CONFIG" >&5
4435echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4436else
4437  echo "$as_me:4437: result: no" >&5
4438echo "${ECHO_T}no" >&6
4439fi
4440
4441  PKG_CONFIG=$ac_pt_PKG_CONFIG
4442else
4443  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4444fi
4445
4446	;;
4447(*)
4448	PKG_CONFIG=$withval
4449	;;
4450esac
4451
4452test -z "$PKG_CONFIG" && PKG_CONFIG=none
4453if test "$PKG_CONFIG" != none ; then
4454
4455if test "x$prefix" != xNONE; then
4456	cf_path_syntax="$prefix"
4457else
4458	cf_path_syntax="$ac_default_prefix"
4459fi
4460
4461case "x$PKG_CONFIG" in
4462(x\$\(*\)*|x\'*\'*)
4463	;;
4464(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
4465	;;
4466(x\$\{*prefix\}*|x\$\{*dir\}*)
4467	eval PKG_CONFIG="$PKG_CONFIG"
4468	case "x$PKG_CONFIG" in
4469	(xNONE/*)
4470		PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4471		;;
4472	esac
4473	;;
4474(xno|xNONE/*)
4475	PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4476	;;
4477(*)
4478	{ { echo "$as_me:4478: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4479echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4480   { (exit 1); exit 1; }; }
4481	;;
4482esac
4483
4484elif test "x$cf_pkg_config" != xno ; then
4485	{ echo "$as_me:4485: WARNING: pkg-config is not installed" >&5
4486echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4487fi
4488
4489case "$PKG_CONFIG" in
4490(no|none|yes)
4491	echo "$as_me:4491: checking for pkg-config library directory" >&5
4492echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4493	;;
4494(*)
4495	echo "$as_me:4495: checking for $PKG_CONFIG library directory" >&5
4496echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4497	;;
4498esac
4499
4500# if $PKG_CONFIG_LIBDIR is set, try to use that
4501if test -n "$PKG_CONFIG_PATH"; then
4502	cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[ 	]*,,' -e 's,[ 	]*$,,'`
4503elif test -n "$PKG_CONFIG_LIBDIR"; then
4504	cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ 	]*,,' -e 's,[ 	]*$,,'`
4505else
4506	cf_search_path=auto
4507fi
4508
4509# if the option is used, let that override.  otherwise default to "libdir"
4510
4511# Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4512if test "${with_pkg_config_libdir+set}" = set; then
4513  withval="$with_pkg_config_libdir"
4514  cf_search_path=$withval
4515else
4516  test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4517fi;
4518
4519case "x$cf_search_path" in
4520(xlibdir)
4521	PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4522	echo "$as_me:4522: result: $PKG_CONFIG_LIBDIR" >&5
4523echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4524	cf_search_path=
4525	;;
4526(x)
4527	;;
4528(x$GLOB_FULLPATH_POSIX\ *|x$GLOB_FULLPATH_OTHER\ *)
4529	PKG_CONFIG_LIBDIR=
4530	;;
4531(x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
4532	PKG_CONFIG_LIBDIR="$cf_search_path"
4533	echo "$as_me:4533: result: $PKG_CONFIG_LIBDIR" >&5
4534echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4535	cf_search_path=
4536	;;
4537(xyes|xauto)
4538	echo "$as_me:4538: result: auto" >&5
4539echo "${ECHO_T}auto" >&6
4540	cf_search_path=
4541	# Look for the library directory using the same prefix as the executable
4542	echo "$as_me:4542: checking for search-list" >&5
4543echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4544	if test "x$PKG_CONFIG" != xnone
4545	then
4546		# works for pkg-config since version 0.24 (2009)
4547		# works for pkgconf since version 0.8.3 (2012)
4548		for cf_pkg_program in \
4549			`echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4550			pkg-config \
4551			pkgconf
4552		do
4553			cf_raw_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null`
4554			case "$cf_raw_search_path" in
4555			(*\\*)
4556				cf_search_path=`echo "$cf_raw_search_path" | tr ';' ' ' | tr '\' '/'`
4557				;;
4558			(*/*)
4559				cf_search_path=`echo "$cf_raw_search_path" | tr : ' '`
4560				;;
4561			esac
4562			test -n "$cf_search_path" && break
4563		done
4564
4565		# works for pkg-config since import in 2005 of original 2001 HP code.
4566		test -z "$cf_search_path" && \
4567		cf_search_path=`
4568		"$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4569/^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4570	sub(\"^[^']*'\",\"\"); \
4571	sub(\"'.*\",\"\"); \
4572	printf \" %s\", \\$0; } \
4573{ next; } \
4574"`
4575	fi
4576
4577	echo "$as_me:4577: result: $cf_search_path" >&5
4578echo "${ECHO_T}$cf_search_path" >&6
4579	;;
4580(*)
4581	{ { echo "$as_me:4581: error: Unexpected option value: $cf_search_path" >&5
4582echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4583   { (exit 1); exit 1; }; }
4584	;;
4585esac
4586
4587if test -n "$cf_search_path"
4588then
4589	echo "$as_me:4589: checking for first directory" >&5
4590echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4591	cf_pkg_config_path=none
4592	for cf_config in $cf_search_path
4593	do
4594		if test -d "$cf_config"
4595		then
4596			cf_pkg_config_path=$cf_config
4597			break
4598		fi
4599	done
4600	echo "$as_me:4600: result: $cf_pkg_config_path" >&5
4601echo "${ECHO_T}$cf_pkg_config_path" >&6
4602
4603	if test "x$cf_pkg_config_path" != xnone ; then
4604		# limit this to the first directory found
4605		PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4606	fi
4607
4608	if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4609	then
4610		echo "$as_me:4610: checking for workaround" >&5
4611echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4612		if test "$prefix" = "NONE" ; then
4613			cf_prefix="$ac_default_prefix"
4614		else
4615			cf_prefix="$prefix"
4616		fi
4617		eval cf_libdir=$libdir
4618		cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4619		cf_backup=
4620		for cf_config in $cf_search_path
4621		do
4622			case $cf_config in
4623			$cf_libdir/pkgconfig)
4624				PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4625				break
4626				;;
4627			*)
4628				test -z "$cf_backup" && cf_backup=$cf_config
4629				;;
4630			esac
4631		done
4632		test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4633		echo "$as_me:4633: result: $PKG_CONFIG_LIBDIR" >&5
4634echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4635	fi
4636fi
4637
4638if test "x$PKG_CONFIG" != xnone
4639then
4640	echo "$as_me:4640: checking if we should install .pc files for $PKG_CONFIG" >&5
4641echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4642else
4643	echo "$as_me:4643: checking if we should install .pc files" >&5
4644echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4645fi
4646
4647# Check whether --enable-pc-files or --disable-pc-files was given.
4648if test "${enable_pc_files+set}" = set; then
4649  enableval="$enable_pc_files"
4650  enable_pc_files=$enableval
4651else
4652  enable_pc_files=no
4653fi;
4654echo "$as_me:4654: result: $enable_pc_files" >&5
4655echo "${ECHO_T}$enable_pc_files" >&6
4656
4657if test "x$enable_pc_files" != xno
4658then
4659	MAKE_PC_FILES=
4660	case "x$PKG_CONFIG_LIBDIR" in
4661	(xno|xnone|xyes|x)
4662		{ echo "$as_me:4662: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4663echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4664		;;
4665	(*)
4666		cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4667
4668if test "x$prefix" != xNONE; then
4669	cf_path_syntax="$prefix"
4670else
4671	cf_path_syntax="$ac_default_prefix"
4672fi
4673
4674case "x$cf_pkg_config_libdir" in
4675(x\$\(*\)*|x\'*\'*)
4676	;;
4677(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
4678	;;
4679(x\$\{*prefix\}*|x\$\{*dir\}*)
4680	eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4681	case "x$cf_pkg_config_libdir" in
4682	(xNONE/*)
4683		cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4684		;;
4685	esac
4686	;;
4687(xno|xNONE/*)
4688	cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4689	;;
4690(*)
4691	{ { echo "$as_me:4691: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4692echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4693   { (exit 1); exit 1; }; }
4694	;;
4695esac
4696
4697		;;
4698	esac
4699else
4700	MAKE_PC_FILES="#"
4701fi
4702
4703if test -z "$MAKE_PC_FILES"
4704then
4705	echo "$as_me:4705: checking for suffix to add to pkg-config files" >&5
4706echo $ECHO_N "checking for suffix to add to pkg-config files... $ECHO_C" >&6
4707
4708# Check whether --with-pc-suffix or --without-pc-suffix was given.
4709if test "${with_pc_suffix+set}" = set; then
4710  withval="$with_pc_suffix"
4711  case "x$withval" in
4712	(xyes|xno)
4713		PC_MODULE_SUFFIX=
4714		;;
4715	(*)	PC_MODULE_SUFFIX="$withval"
4716		;;
4717	esac
4718fi;
4719	test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4720	echo "$as_me:4720: result: $PC_MODULE_SUFFIX" >&5
4721echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4722	test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4723
4724fi
4725
4726echo "$as_me:4726: checking if we should assume mixed-case filenames" >&5
4727echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4728
4729# Check whether --enable-mixed-case or --disable-mixed-case was given.
4730if test "${enable_mixed_case+set}" = set; then
4731  enableval="$enable_mixed_case"
4732  enable_mixedcase=$enableval
4733else
4734  enable_mixedcase=auto
4735fi;
4736echo "$as_me:4736: result: $enable_mixedcase" >&5
4737echo "${ECHO_T}$enable_mixedcase" >&6
4738if test "$enable_mixedcase" = "auto" ; then
4739
4740echo "$as_me:4740: checking if filesystem supports mixed-case filenames" >&5
4741echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4742if test "${cf_cv_mixedcase+set}" = set; then
4743  echo $ECHO_N "(cached) $ECHO_C" >&6
4744else
4745
4746if test "$cross_compiling" = yes ; then
4747	case "$target_alias" in
4748	(*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4749		cf_cv_mixedcase=no
4750		;;
4751	(*)
4752		cf_cv_mixedcase=yes
4753		;;
4754	esac
4755else
4756	rm -f conftest CONFTEST
4757	echo test >conftest
4758	if test -f CONFTEST ; then
4759		cf_cv_mixedcase=no
4760	else
4761		cf_cv_mixedcase=yes
4762	fi
4763	rm -f conftest CONFTEST
4764fi
4765
4766fi
4767echo "$as_me:4767: result: $cf_cv_mixedcase" >&5
4768echo "${ECHO_T}$cf_cv_mixedcase" >&6
4769test "$cf_cv_mixedcase" = yes &&
4770cat >>confdefs.h <<\EOF
4771#define MIXEDCASE_FILENAMES 1
4772EOF
4773
4774else
4775	cf_cv_mixedcase=$enable_mixedcase
4776	if test "x$enable_mixedcase" = "xyes" ; then
4777
4778cat >>confdefs.h <<\EOF
4779#define MIXEDCASE_FILENAMES 1
4780EOF
4781
4782	fi
4783fi
4784
4785# do this after mixed-case option (tags/TAGS is not as important as tic).
4786echo "$as_me:4786: checking whether ${MAKE-make} sets \${MAKE}" >&5
4787echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4788set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4789if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4790  echo $ECHO_N "(cached) $ECHO_C" >&6
4791else
4792  cat >conftest.make <<\EOF
4793all:
4794	@echo 'ac_maketemp="${MAKE}"'
4795EOF
4796# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4797eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4798if test -n "$ac_maketemp"; then
4799  eval ac_cv_prog_make_${ac_make}_set=yes
4800else
4801  eval ac_cv_prog_make_${ac_make}_set=no
4802fi
4803rm -f conftest.make
4804fi
4805if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4806  echo "$as_me:4806: result: yes" >&5
4807echo "${ECHO_T}yes" >&6
4808  SET_MAKE=
4809else
4810  echo "$as_me:4810: result: no" >&5
4811echo "${ECHO_T}no" >&6
4812  SET_MAKE="MAKE=${MAKE-make}"
4813fi
4814
4815echo "$as_me:4815: checking for \".PHONY\" make-support" >&5
4816echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4817if test "${cf_cv_make_PHONY+set}" = set; then
4818  echo $ECHO_N "(cached) $ECHO_C" >&6
4819else
4820
4821	rm -rf conftest*
4822	(
4823		mkdir conftest || exit 1
4824		cd conftest
4825		cat >makefile <<'CF_EOF'
4826.PHONY: always
4827DATA=0
4828always:	always.out
4829	@echo "** making $@ $(DATA)"
4830once: once.out
4831	@echo "** making $@ $(DATA)"
4832always.out:
4833	@echo "** making $@ $(DATA)"
4834	echo $(DATA) > $@
4835once.out:
4836	@echo "** making $@ $(DATA)"
4837	echo $(DATA) > $@
4838CF_EOF
4839		for cf_data in 1 2 3
4840		do
4841			${MAKE:-make} always DATA=$cf_data
4842			${MAKE:-make} once   DATA=$cf_data
4843			${MAKE:-make} -t always once
4844			if test -f always ; then
4845				echo "no (case 1)" > ../conftest.tmp
4846			elif test ! -f always.out ; then
4847				echo "no (case 2)" > ../conftest.tmp
4848			elif test ! -f once.out ; then
4849				echo "no (case 3)" > ../conftest.tmp
4850			elif ! cmp -s always.out once.out ; then
4851				echo "no (case 4)" > ../conftest.tmp
4852				diff always.out once.out
4853			else
4854				cf_check="`cat always.out`"
4855				if test "x$cf_check" != "x$cf_data" ; then
4856					echo "no (case 5)" > ../conftest.tmp
4857				else
4858					echo yes > ../conftest.tmp
4859					rm -f ./*.out
4860					continue
4861				fi
4862			fi
4863			break
4864		done
4865	) >&5 2>&1
4866	cf_cv_make_PHONY="`cat conftest.tmp`"
4867	rm -rf conftest*
4868
4869fi
4870echo "$as_me:4870: result: $cf_cv_make_PHONY" >&5
4871echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4872MAKE_NO_PHONY="#"
4873MAKE_PHONY="#"
4874test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4875test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4876
4877for ac_prog in exctags ctags
4878do
4879  # Extract the first word of "$ac_prog", so it can be a program name with args.
4880set dummy $ac_prog; ac_word=$2
4881echo "$as_me:4881: checking for $ac_word" >&5
4882echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4883if test "${ac_cv_prog_CTAGS+set}" = set; then
4884  echo $ECHO_N "(cached) $ECHO_C" >&6
4885else
4886  if test -n "$CTAGS"; then
4887  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4888else
4889  ac_save_IFS=$IFS; IFS=$ac_path_separator
4890ac_dummy="$PATH"
4891for ac_dir in $ac_dummy; do
4892  IFS=$ac_save_IFS
4893  test -z "$ac_dir" && ac_dir=.
4894  $as_executable_p "$ac_dir/$ac_word" || continue
4895ac_cv_prog_CTAGS="$ac_prog"
4896echo "$as_me:4896: found $ac_dir/$ac_word" >&5
4897break
4898done
4899
4900fi
4901fi
4902CTAGS=$ac_cv_prog_CTAGS
4903if test -n "$CTAGS"; then
4904  echo "$as_me:4904: result: $CTAGS" >&5
4905echo "${ECHO_T}$CTAGS" >&6
4906else
4907  echo "$as_me:4907: result: no" >&5
4908echo "${ECHO_T}no" >&6
4909fi
4910
4911  test -n "$CTAGS" && break
4912done
4913
4914for ac_prog in exetags etags
4915do
4916  # Extract the first word of "$ac_prog", so it can be a program name with args.
4917set dummy $ac_prog; ac_word=$2
4918echo "$as_me:4918: checking for $ac_word" >&5
4919echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4920if test "${ac_cv_prog_ETAGS+set}" = set; then
4921  echo $ECHO_N "(cached) $ECHO_C" >&6
4922else
4923  if test -n "$ETAGS"; then
4924  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4925else
4926  ac_save_IFS=$IFS; IFS=$ac_path_separator
4927ac_dummy="$PATH"
4928for ac_dir in $ac_dummy; do
4929  IFS=$ac_save_IFS
4930  test -z "$ac_dir" && ac_dir=.
4931  $as_executable_p "$ac_dir/$ac_word" || continue
4932ac_cv_prog_ETAGS="$ac_prog"
4933echo "$as_me:4933: found $ac_dir/$ac_word" >&5
4934break
4935done
4936
4937fi
4938fi
4939ETAGS=$ac_cv_prog_ETAGS
4940if test -n "$ETAGS"; then
4941  echo "$as_me:4941: result: $ETAGS" >&5
4942echo "${ECHO_T}$ETAGS" >&6
4943else
4944  echo "$as_me:4944: result: no" >&5
4945echo "${ECHO_T}no" >&6
4946fi
4947
4948  test -n "$ETAGS" && break
4949done
4950
4951# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4952set dummy ${CTAGS:-ctags}; ac_word=$2
4953echo "$as_me:4953: checking for $ac_word" >&5
4954echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4955if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4956  echo $ECHO_N "(cached) $ECHO_C" >&6
4957else
4958  if test -n "$MAKE_LOWER_TAGS"; then
4959  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4960else
4961  ac_save_IFS=$IFS; IFS=$ac_path_separator
4962ac_dummy="$PATH"
4963for ac_dir in $ac_dummy; do
4964  IFS=$ac_save_IFS
4965  test -z "$ac_dir" && ac_dir=.
4966  $as_executable_p "$ac_dir/$ac_word" || continue
4967ac_cv_prog_MAKE_LOWER_TAGS="yes"
4968echo "$as_me:4968: found $ac_dir/$ac_word" >&5
4969break
4970done
4971
4972  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4973fi
4974fi
4975MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4976if test -n "$MAKE_LOWER_TAGS"; then
4977  echo "$as_me:4977: result: $MAKE_LOWER_TAGS" >&5
4978echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4979else
4980  echo "$as_me:4980: result: no" >&5
4981echo "${ECHO_T}no" >&6
4982fi
4983
4984if test "$cf_cv_mixedcase" = yes ; then
4985	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4986set dummy ${ETAGS:-etags}; ac_word=$2
4987echo "$as_me:4987: checking for $ac_word" >&5
4988echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4989if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4990  echo $ECHO_N "(cached) $ECHO_C" >&6
4991else
4992  if test -n "$MAKE_UPPER_TAGS"; then
4993  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4994else
4995  ac_save_IFS=$IFS; IFS=$ac_path_separator
4996ac_dummy="$PATH"
4997for ac_dir in $ac_dummy; do
4998  IFS=$ac_save_IFS
4999  test -z "$ac_dir" && ac_dir=.
5000  $as_executable_p "$ac_dir/$ac_word" || continue
5001ac_cv_prog_MAKE_UPPER_TAGS="yes"
5002echo "$as_me:5002: found $ac_dir/$ac_word" >&5
5003break
5004done
5005
5006  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
5007fi
5008fi
5009MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
5010if test -n "$MAKE_UPPER_TAGS"; then
5011  echo "$as_me:5011: result: $MAKE_UPPER_TAGS" >&5
5012echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
5013else
5014  echo "$as_me:5014: result: no" >&5
5015echo "${ECHO_T}no" >&6
5016fi
5017
5018else
5019	MAKE_UPPER_TAGS=no
5020fi
5021
5022if test "$MAKE_UPPER_TAGS" = yes ; then
5023	MAKE_UPPER_TAGS=
5024else
5025	MAKE_UPPER_TAGS="#"
5026fi
5027
5028if test "$MAKE_LOWER_TAGS" = yes ; then
5029	MAKE_LOWER_TAGS=
5030else
5031	MAKE_LOWER_TAGS="#"
5032fi
5033
5034if test -n "$ac_tool_prefix"; then
5035  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5036set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5037echo "$as_me:5037: checking for $ac_word" >&5
5038echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5039if test "${ac_cv_prog_RANLIB+set}" = set; then
5040  echo $ECHO_N "(cached) $ECHO_C" >&6
5041else
5042  if test -n "$RANLIB"; then
5043  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5044else
5045  ac_save_IFS=$IFS; IFS=$ac_path_separator
5046ac_dummy="$PATH"
5047for ac_dir in $ac_dummy; do
5048  IFS=$ac_save_IFS
5049  test -z "$ac_dir" && ac_dir=.
5050  $as_executable_p "$ac_dir/$ac_word" || continue
5051ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5052echo "$as_me:5052: found $ac_dir/$ac_word" >&5
5053break
5054done
5055
5056fi
5057fi
5058RANLIB=$ac_cv_prog_RANLIB
5059if test -n "$RANLIB"; then
5060  echo "$as_me:5060: result: $RANLIB" >&5
5061echo "${ECHO_T}$RANLIB" >&6
5062else
5063  echo "$as_me:5063: result: no" >&5
5064echo "${ECHO_T}no" >&6
5065fi
5066
5067fi
5068if test -z "$ac_cv_prog_RANLIB"; then
5069  ac_ct_RANLIB=$RANLIB
5070  # Extract the first word of "ranlib", so it can be a program name with args.
5071set dummy ranlib; ac_word=$2
5072echo "$as_me:5072: checking for $ac_word" >&5
5073echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5074if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5075  echo $ECHO_N "(cached) $ECHO_C" >&6
5076else
5077  if test -n "$ac_ct_RANLIB"; then
5078  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5079else
5080  ac_save_IFS=$IFS; IFS=$ac_path_separator
5081ac_dummy="$PATH"
5082for ac_dir in $ac_dummy; do
5083  IFS=$ac_save_IFS
5084  test -z "$ac_dir" && ac_dir=.
5085  $as_executable_p "$ac_dir/$ac_word" || continue
5086ac_cv_prog_ac_ct_RANLIB="ranlib"
5087echo "$as_me:5087: found $ac_dir/$ac_word" >&5
5088break
5089done
5090
5091  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
5092fi
5093fi
5094ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5095if test -n "$ac_ct_RANLIB"; then
5096  echo "$as_me:5096: result: $ac_ct_RANLIB" >&5
5097echo "${ECHO_T}$ac_ct_RANLIB" >&6
5098else
5099  echo "$as_me:5099: result: no" >&5
5100echo "${ECHO_T}no" >&6
5101fi
5102
5103  RANLIB=$ac_ct_RANLIB
5104else
5105  RANLIB="$ac_cv_prog_RANLIB"
5106fi
5107
5108if test -n "$ac_tool_prefix"; then
5109  # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
5110set dummy ${ac_tool_prefix}ld; ac_word=$2
5111echo "$as_me:5111: checking for $ac_word" >&5
5112echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5113if test "${ac_cv_prog_LD+set}" = set; then
5114  echo $ECHO_N "(cached) $ECHO_C" >&6
5115else
5116  if test -n "$LD"; then
5117  ac_cv_prog_LD="$LD" # Let the user override the test.
5118else
5119  ac_save_IFS=$IFS; IFS=$ac_path_separator
5120ac_dummy="$PATH"
5121for ac_dir in $ac_dummy; do
5122  IFS=$ac_save_IFS
5123  test -z "$ac_dir" && ac_dir=.
5124  $as_executable_p "$ac_dir/$ac_word" || continue
5125ac_cv_prog_LD="${ac_tool_prefix}ld"
5126echo "$as_me:5126: found $ac_dir/$ac_word" >&5
5127break
5128done
5129
5130fi
5131fi
5132LD=$ac_cv_prog_LD
5133if test -n "$LD"; then
5134  echo "$as_me:5134: result: $LD" >&5
5135echo "${ECHO_T}$LD" >&6
5136else
5137  echo "$as_me:5137: result: no" >&5
5138echo "${ECHO_T}no" >&6
5139fi
5140
5141fi
5142if test -z "$ac_cv_prog_LD"; then
5143  ac_ct_LD=$LD
5144  # Extract the first word of "ld", so it can be a program name with args.
5145set dummy ld; ac_word=$2
5146echo "$as_me:5146: checking for $ac_word" >&5
5147echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5148if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
5149  echo $ECHO_N "(cached) $ECHO_C" >&6
5150else
5151  if test -n "$ac_ct_LD"; then
5152  ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
5153else
5154  ac_save_IFS=$IFS; IFS=$ac_path_separator
5155ac_dummy="$PATH"
5156for ac_dir in $ac_dummy; do
5157  IFS=$ac_save_IFS
5158  test -z "$ac_dir" && ac_dir=.
5159  $as_executable_p "$ac_dir/$ac_word" || continue
5160ac_cv_prog_ac_ct_LD="ld"
5161echo "$as_me:5161: found $ac_dir/$ac_word" >&5
5162break
5163done
5164
5165  test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
5166fi
5167fi
5168ac_ct_LD=$ac_cv_prog_ac_ct_LD
5169if test -n "$ac_ct_LD"; then
5170  echo "$as_me:5170: result: $ac_ct_LD" >&5
5171echo "${ECHO_T}$ac_ct_LD" >&6
5172else
5173  echo "$as_me:5173: result: no" >&5
5174echo "${ECHO_T}no" >&6
5175fi
5176
5177  LD=$ac_ct_LD
5178else
5179  LD="$ac_cv_prog_LD"
5180fi
5181
5182if test -n "$ac_tool_prefix"; then
5183  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5184set dummy ${ac_tool_prefix}ar; ac_word=$2
5185echo "$as_me:5185: checking for $ac_word" >&5
5186echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5187if test "${ac_cv_prog_AR+set}" = set; then
5188  echo $ECHO_N "(cached) $ECHO_C" >&6
5189else
5190  if test -n "$AR"; then
5191  ac_cv_prog_AR="$AR" # Let the user override the test.
5192else
5193  ac_save_IFS=$IFS; IFS=$ac_path_separator
5194ac_dummy="$PATH"
5195for ac_dir in $ac_dummy; do
5196  IFS=$ac_save_IFS
5197  test -z "$ac_dir" && ac_dir=.
5198  $as_executable_p "$ac_dir/$ac_word" || continue
5199ac_cv_prog_AR="${ac_tool_prefix}ar"
5200echo "$as_me:5200: found $ac_dir/$ac_word" >&5
5201break
5202done
5203
5204fi
5205fi
5206AR=$ac_cv_prog_AR
5207if test -n "$AR"; then
5208  echo "$as_me:5208: result: $AR" >&5
5209echo "${ECHO_T}$AR" >&6
5210else
5211  echo "$as_me:5211: result: no" >&5
5212echo "${ECHO_T}no" >&6
5213fi
5214
5215fi
5216if test -z "$ac_cv_prog_AR"; then
5217  ac_ct_AR=$AR
5218  # Extract the first word of "ar", so it can be a program name with args.
5219set dummy ar; ac_word=$2
5220echo "$as_me:5220: checking for $ac_word" >&5
5221echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5222if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5223  echo $ECHO_N "(cached) $ECHO_C" >&6
5224else
5225  if test -n "$ac_ct_AR"; then
5226  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5227else
5228  ac_save_IFS=$IFS; IFS=$ac_path_separator
5229ac_dummy="$PATH"
5230for ac_dir in $ac_dummy; do
5231  IFS=$ac_save_IFS
5232  test -z "$ac_dir" && ac_dir=.
5233  $as_executable_p "$ac_dir/$ac_word" || continue
5234ac_cv_prog_ac_ct_AR="ar"
5235echo "$as_me:5235: found $ac_dir/$ac_word" >&5
5236break
5237done
5238
5239  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5240fi
5241fi
5242ac_ct_AR=$ac_cv_prog_ac_ct_AR
5243if test -n "$ac_ct_AR"; then
5244  echo "$as_me:5244: result: $ac_ct_AR" >&5
5245echo "${ECHO_T}$ac_ct_AR" >&6
5246else
5247  echo "$as_me:5247: result: no" >&5
5248echo "${ECHO_T}no" >&6
5249fi
5250
5251  AR=$ac_ct_AR
5252else
5253  AR="$ac_cv_prog_AR"
5254fi
5255
5256if test -n "$ac_tool_prefix"; then
5257  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
5258set dummy ${ac_tool_prefix}nm; ac_word=$2
5259echo "$as_me:5259: checking for $ac_word" >&5
5260echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5261if test "${ac_cv_prog_NM+set}" = set; then
5262  echo $ECHO_N "(cached) $ECHO_C" >&6
5263else
5264  if test -n "$NM"; then
5265  ac_cv_prog_NM="$NM" # Let the user override the test.
5266else
5267  ac_save_IFS=$IFS; IFS=$ac_path_separator
5268ac_dummy="$PATH"
5269for ac_dir in $ac_dummy; do
5270  IFS=$ac_save_IFS
5271  test -z "$ac_dir" && ac_dir=.
5272  $as_executable_p "$ac_dir/$ac_word" || continue
5273ac_cv_prog_NM="${ac_tool_prefix}nm"
5274echo "$as_me:5274: found $ac_dir/$ac_word" >&5
5275break
5276done
5277
5278fi
5279fi
5280NM=$ac_cv_prog_NM
5281if test -n "$NM"; then
5282  echo "$as_me:5282: result: $NM" >&5
5283echo "${ECHO_T}$NM" >&6
5284else
5285  echo "$as_me:5285: result: no" >&5
5286echo "${ECHO_T}no" >&6
5287fi
5288
5289fi
5290if test -z "$ac_cv_prog_NM"; then
5291  ac_ct_NM=$NM
5292  # Extract the first word of "nm", so it can be a program name with args.
5293set dummy nm; ac_word=$2
5294echo "$as_me:5294: checking for $ac_word" >&5
5295echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5296if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
5297  echo $ECHO_N "(cached) $ECHO_C" >&6
5298else
5299  if test -n "$ac_ct_NM"; then
5300  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5301else
5302  ac_save_IFS=$IFS; IFS=$ac_path_separator
5303ac_dummy="$PATH"
5304for ac_dir in $ac_dummy; do
5305  IFS=$ac_save_IFS
5306  test -z "$ac_dir" && ac_dir=.
5307  $as_executable_p "$ac_dir/$ac_word" || continue
5308ac_cv_prog_ac_ct_NM="nm"
5309echo "$as_me:5309: found $ac_dir/$ac_word" >&5
5310break
5311done
5312
5313  test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5314fi
5315fi
5316ac_ct_NM=$ac_cv_prog_ac_ct_NM
5317if test -n "$ac_ct_NM"; then
5318  echo "$as_me:5318: result: $ac_ct_NM" >&5
5319echo "${ECHO_T}$ac_ct_NM" >&6
5320else
5321  echo "$as_me:5321: result: no" >&5
5322echo "${ECHO_T}no" >&6
5323fi
5324
5325  NM=$ac_ct_NM
5326else
5327  NM="$ac_cv_prog_NM"
5328fi
5329
5330if test -n "$ac_tool_prefix"; then
5331  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5332set dummy ${ac_tool_prefix}ar; ac_word=$2
5333echo "$as_me:5333: checking for $ac_word" >&5
5334echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5335if test "${ac_cv_prog_AR+set}" = set; then
5336  echo $ECHO_N "(cached) $ECHO_C" >&6
5337else
5338  if test -n "$AR"; then
5339  ac_cv_prog_AR="$AR" # Let the user override the test.
5340else
5341  ac_save_IFS=$IFS; IFS=$ac_path_separator
5342ac_dummy="$PATH"
5343for ac_dir in $ac_dummy; do
5344  IFS=$ac_save_IFS
5345  test -z "$ac_dir" && ac_dir=.
5346  $as_executable_p "$ac_dir/$ac_word" || continue
5347ac_cv_prog_AR="${ac_tool_prefix}ar"
5348echo "$as_me:5348: found $ac_dir/$ac_word" >&5
5349break
5350done
5351
5352fi
5353fi
5354AR=$ac_cv_prog_AR
5355if test -n "$AR"; then
5356  echo "$as_me:5356: result: $AR" >&5
5357echo "${ECHO_T}$AR" >&6
5358else
5359  echo "$as_me:5359: result: no" >&5
5360echo "${ECHO_T}no" >&6
5361fi
5362
5363fi
5364if test -z "$ac_cv_prog_AR"; then
5365  ac_ct_AR=$AR
5366  # Extract the first word of "ar", so it can be a program name with args.
5367set dummy ar; ac_word=$2
5368echo "$as_me:5368: checking for $ac_word" >&5
5369echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5370if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5371  echo $ECHO_N "(cached) $ECHO_C" >&6
5372else
5373  if test -n "$ac_ct_AR"; then
5374  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5375else
5376  ac_save_IFS=$IFS; IFS=$ac_path_separator
5377ac_dummy="$PATH"
5378for ac_dir in $ac_dummy; do
5379  IFS=$ac_save_IFS
5380  test -z "$ac_dir" && ac_dir=.
5381  $as_executable_p "$ac_dir/$ac_word" || continue
5382ac_cv_prog_ac_ct_AR="ar"
5383echo "$as_me:5383: found $ac_dir/$ac_word" >&5
5384break
5385done
5386
5387  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5388fi
5389fi
5390ac_ct_AR=$ac_cv_prog_ac_ct_AR
5391if test -n "$ac_ct_AR"; then
5392  echo "$as_me:5392: result: $ac_ct_AR" >&5
5393echo "${ECHO_T}$ac_ct_AR" >&6
5394else
5395  echo "$as_me:5395: result: no" >&5
5396echo "${ECHO_T}no" >&6
5397fi
5398
5399  AR=$ac_ct_AR
5400else
5401  AR="$ac_cv_prog_AR"
5402fi
5403
5404echo "$as_me:5404: checking for options to update archives" >&5
5405echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5406if test "${cf_cv_ar_flags+set}" = set; then
5407  echo $ECHO_N "(cached) $ECHO_C" >&6
5408else
5409
5410	case "$cf_cv_system_name" in
5411	(*-msvc*)
5412		cf_cv_ar_flags=''
5413		cat >mk_static_lib.sh <<-EOF
5414		#!$SHELL
5415		MSVC_BIN="$AR"
5416		out="\$1"
5417		shift
5418		exec \$MSVC_BIN -out:"\$out" \$@
5419		EOF
5420		chmod +x mk_static_lib.sh
5421		AR=`pwd`/mk_static_lib.sh
5422		;;
5423	(*)
5424		cf_cv_ar_flags=unknown
5425		for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5426		do
5427
5428			# check if $ARFLAGS already contains this choice
5429			if test "x$ARFLAGS" != "x" ; then
5430				cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5431				if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5432					cf_cv_ar_flags=
5433					break
5434				fi
5435			fi
5436
5437			rm -f "conftest.$ac_cv_objext"
5438			rm -f conftest.a
5439
5440			cat >"conftest.$ac_ext" <<EOF
5441#line 5441 "configure"
5442int	testdata[3] = { 123, 456, 789 };
5443EOF
5444			if { (eval echo "$as_me:5444: \"$ac_compile\"") >&5
5445  (eval $ac_compile) 2>&5
5446  ac_status=$?
5447  echo "$as_me:5447: \$? = $ac_status" >&5
5448  (exit "$ac_status"); } ; then
5449				echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5450				$AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5451				if test -f conftest.a ; then
5452					cf_cv_ar_flags="$cf_ar_flags"
5453					break
5454				fi
5455			else
5456				test -n "$verbose" && echo "	cannot compile test-program" 1>&6
5457
5458echo "${as_me:-configure}:5458: testing cannot compile test-program ..." 1>&5
5459
5460				break
5461			fi
5462		done
5463		rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5464		;;
5465	esac
5466
5467fi
5468echo "$as_me:5468: result: $cf_cv_ar_flags" >&5
5469echo "${ECHO_T}$cf_cv_ar_flags" >&6
5470
5471if test -n "$ARFLAGS" ; then
5472	if test -n "$cf_cv_ar_flags" ; then
5473		ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5474	fi
5475else
5476	ARFLAGS=$cf_cv_ar_flags
5477fi
5478
5479echo "$as_me:5479: checking for an installation directory prefix" >&5
5480echo $ECHO_N "checking for an installation directory prefix... $ECHO_C" >&6
5481
5482# Check whether --with-install-prefix or --without-install-prefix was given.
5483if test "${with_install_prefix+set}" = set; then
5484  withval="$with_install_prefix"
5485  case "x$withval" in
5486	(xyes|xno)
5487		;;
5488	(*)	DESTDIR="$withval"
5489		;;
5490	esac
5491fi;
5492echo "$as_me:5492: result: ${DESTDIR:-(none)}" >&5
5493echo "${ECHO_T}${DESTDIR:-(none)}" >&6
5494
5495SET_DESTDIR=
5496test -n "$DESTDIR" && SET_DESTDIR="DESTDIR=$DESTDIR"
5497
5498echo "$as_me:5498: checking if installation directory prefix should be merged" >&5
5499echo $ECHO_N "checking if installation directory prefix should be merged... $ECHO_C" >&6
5500
5501# Check whether --enable-install-prefix or --disable-install-prefix was given.
5502if test "${enable_install_prefix+set}" = set; then
5503  enableval="$enable_install_prefix"
5504  test "$enableval" != yes && enableval=no
5505	if test "$enableval" != "no" ; then
5506    cf_install_prefix=yes
5507	else
5508		cf_install_prefix=no
5509	fi
5510else
5511  enableval=no
5512	cf_install_prefix=no
5513
5514fi;
5515echo "$as_me:5515: result: $cf_install_prefix" >&5
5516echo "${ECHO_T}$cf_install_prefix" >&6
5517
5518if test "$cf_install_prefix" = yes ; then
5519	MERGE_PREFIX=':$(prefix)%=%'
5520else
5521	MERGE_PREFIX=''
5522fi
5523
5524###############################################################################
5525
5526# If we're cross-compiling, allow the user to override the tools and their
5527# options.  The configure script is oriented toward identifying the host
5528# compiler, etc., but we need a build compiler to generate parts of the source.
5529
5530case "$cf_cv_system_name" in
5531(*-msvc*)
5532	LDFLAGS="$LDFLAGS user32.lib"
5533	export LDFLAGS
5534	;;
5535esac
5536
5537if test "$cross_compiling" = yes ; then
5538
5539	# defaults that we might want to override
5540	: ${BUILD_CFLAGS:=''}
5541	: ${BUILD_CPPFLAGS:=''}
5542	: ${BUILD_LDFLAGS:=''}
5543	: ${BUILD_LIBS:=''}
5544	: ${BUILD_EXEEXT:='$x'}
5545	: ${BUILD_OBJEXT:='o'}
5546
5547# Check whether --with-build-cc or --without-build-cc was given.
5548if test "${with_build_cc+set}" = set; then
5549  withval="$with_build_cc"
5550  BUILD_CC="$withval"
5551else
5552  for ac_prog in gcc clang c99 c89 cc cl
5553do
5554  # Extract the first word of "$ac_prog", so it can be a program name with args.
5555set dummy $ac_prog; ac_word=$2
5556echo "$as_me:5556: checking for $ac_word" >&5
5557echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5558if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5559  echo $ECHO_N "(cached) $ECHO_C" >&6
5560else
5561  if test -n "$BUILD_CC"; then
5562  ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5563else
5564  ac_save_IFS=$IFS; IFS=$ac_path_separator
5565ac_dummy="$PATH"
5566for ac_dir in $ac_dummy; do
5567  IFS=$ac_save_IFS
5568  test -z "$ac_dir" && ac_dir=.
5569  $as_executable_p "$ac_dir/$ac_word" || continue
5570ac_cv_prog_BUILD_CC="$ac_prog"
5571echo "$as_me:5571: found $ac_dir/$ac_word" >&5
5572break
5573done
5574
5575fi
5576fi
5577BUILD_CC=$ac_cv_prog_BUILD_CC
5578if test -n "$BUILD_CC"; then
5579  echo "$as_me:5579: result: $BUILD_CC" >&5
5580echo "${ECHO_T}$BUILD_CC" >&6
5581else
5582  echo "$as_me:5582: result: no" >&5
5583echo "${ECHO_T}no" >&6
5584fi
5585
5586  test -n "$BUILD_CC" && break
5587done
5588test -n "$BUILD_CC" || BUILD_CC="none"
5589
5590fi;
5591	echo "$as_me:5591: checking for native build C compiler" >&5
5592echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5593	echo "$as_me:5593: result: $BUILD_CC" >&5
5594echo "${ECHO_T}$BUILD_CC" >&6
5595
5596	echo "$as_me:5596: checking for native build C preprocessor" >&5
5597echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5598
5599# Check whether --with-build-cpp or --without-build-cpp was given.
5600if test "${with_build_cpp+set}" = set; then
5601  withval="$with_build_cpp"
5602  BUILD_CPP="$withval"
5603else
5604  BUILD_CPP='${BUILD_CC} -E'
5605fi;
5606	echo "$as_me:5606: result: $BUILD_CPP" >&5
5607echo "${ECHO_T}$BUILD_CPP" >&6
5608
5609	echo "$as_me:5609: checking for native build C flags" >&5
5610echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5611
5612# Check whether --with-build-cflags or --without-build-cflags was given.
5613if test "${with_build_cflags+set}" = set; then
5614  withval="$with_build_cflags"
5615  BUILD_CFLAGS="$withval"
5616fi;
5617	echo "$as_me:5617: result: $BUILD_CFLAGS" >&5
5618echo "${ECHO_T}$BUILD_CFLAGS" >&6
5619
5620	echo "$as_me:5620: checking for native build C preprocessor-flags" >&5
5621echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5622
5623# Check whether --with-build-cppflags or --without-build-cppflags was given.
5624if test "${with_build_cppflags+set}" = set; then
5625  withval="$with_build_cppflags"
5626  BUILD_CPPFLAGS="$withval"
5627fi;
5628	echo "$as_me:5628: result: $BUILD_CPPFLAGS" >&5
5629echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5630
5631	echo "$as_me:5631: checking for native build linker-flags" >&5
5632echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5633
5634# Check whether --with-build-ldflags or --without-build-ldflags was given.
5635if test "${with_build_ldflags+set}" = set; then
5636  withval="$with_build_ldflags"
5637  BUILD_LDFLAGS="$withval"
5638fi;
5639	echo "$as_me:5639: result: $BUILD_LDFLAGS" >&5
5640echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5641
5642	echo "$as_me:5642: checking for native build linker-libraries" >&5
5643echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5644
5645# Check whether --with-build-libs or --without-build-libs was given.
5646if test "${with_build_libs+set}" = set; then
5647  withval="$with_build_libs"
5648  BUILD_LIBS="$withval"
5649fi;
5650	echo "$as_me:5650: result: $BUILD_LIBS" >&5
5651echo "${ECHO_T}$BUILD_LIBS" >&6
5652
5653	# this assumes we're on Unix.
5654	BUILD_EXEEXT=
5655	BUILD_OBJEXT=o
5656
5657	: ${BUILD_CC:='${CC}'}
5658
5659	echo "$as_me:5659: checking if the build-compiler \"$BUILD_CC\" works" >&5
5660echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
5661
5662	cf_save_crossed=$cross_compiling
5663	cf_save_ac_link=$ac_link
5664	cross_compiling=no
5665	cf_build_cppflags=$BUILD_CPPFLAGS
5666	test "$cf_build_cppflags" = "#" && cf_build_cppflags=
5667	ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
5668
5669	if test "$cross_compiling" = yes; then
5670  cf_ok_build_cc=unknown
5671else
5672  cat >"conftest.$ac_ext" <<_ACEOF
5673#line 5673 "configure"
5674#include "confdefs.h"
5675#include <stdio.h>
5676		int main(int argc, char *argv[])
5677		{
5678			${cf_cv_main_return:-return}(argc < 0 || argv == (void*)0 || argv[0] == (void*)0);
5679		}
5680
5681_ACEOF
5682rm -f "conftest$ac_exeext"
5683if { (eval echo "$as_me:5683: \"$ac_link\"") >&5
5684  (eval $ac_link) 2>&5
5685  ac_status=$?
5686  echo "$as_me:5686: \$? = $ac_status" >&5
5687  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5688  { (eval echo "$as_me:5688: \"$ac_try\"") >&5
5689  (eval $ac_try) 2>&5
5690  ac_status=$?
5691  echo "$as_me:5691: \$? = $ac_status" >&5
5692  (exit "$ac_status"); }; }; then
5693  cf_ok_build_cc=yes
5694else
5695  echo "$as_me: program exited with status $ac_status" >&5
5696echo "$as_me: failed program was:" >&5
5697cat "conftest.$ac_ext" >&5
5698cf_ok_build_cc=no
5699fi
5700rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5701fi
5702
5703	cross_compiling=$cf_save_crossed
5704	ac_link=$cf_save_ac_link
5705
5706	echo "$as_me:5706: result: $cf_ok_build_cc" >&5
5707echo "${ECHO_T}$cf_ok_build_cc" >&6
5708
5709	if test "$cf_ok_build_cc" != yes
5710	then
5711		{ { echo "$as_me:5711: error: Cross-build requires two compilers.
5712Use --with-build-cc to specify the native compiler." >&5
5713echo "$as_me: error: Cross-build requires two compilers.
5714Use --with-build-cc to specify the native compiler." >&2;}
5715   { (exit 1); exit 1; }; }
5716	fi
5717
5718else
5719	: ${BUILD_CC:='${CC}'}
5720	: ${BUILD_CPP:='${CPP}'}
5721	: ${BUILD_CFLAGS:='${CFLAGS}'}
5722	: ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5723	: ${BUILD_LDFLAGS:='${LDFLAGS}'}
5724	: ${BUILD_LIBS:='${LIBS}'}
5725	: ${BUILD_EXEEXT:='$x'}
5726	: ${BUILD_OBJEXT:='o'}
5727fi
5728
5729###############################################################################
5730
5731### Options to allow the user to specify the set of libraries which are used.
5732### Use "--without-normal --with-shared" to allow the default model to be
5733### shared, for example.
5734cf_list_models=""
5735
5736echo "$as_me:5736: checking if libtool -version-number should be used" >&5
5737echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5738
5739# Check whether --enable-libtool-version or --disable-libtool-version was given.
5740if test "${enable_libtool_version+set}" = set; then
5741  enableval="$enable_libtool_version"
5742  test "$enableval" != no && enableval=yes
5743	if test "$enableval" != "yes" ; then
5744    cf_libtool_version=no
5745	else
5746		cf_libtool_version=yes
5747	fi
5748else
5749  enableval=yes
5750	cf_libtool_version=yes
5751
5752fi;
5753echo "$as_me:5753: result: $cf_libtool_version" >&5
5754echo "${ECHO_T}$cf_libtool_version" >&6
5755
5756if test "$cf_libtool_version" = yes ; then
5757	LIBTOOL_VERSION="-version-number"
5758else
5759	LIBTOOL_VERSION="-version-info"
5760	case "x$VERSION" in
5761	(x)
5762		{ echo "$as_me:5762: WARNING: VERSION was not set" >&5
5763echo "$as_me: WARNING: VERSION was not set" >&2;}
5764		;;
5765	(x*.*.*)
5766		ABI_VERSION="$VERSION"
5767		test -n "$verbose" && echo "	ABI_VERSION: $ABI_VERSION" 1>&6
5768
5769echo "${as_me:-configure}:5769: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5770
5771		;;
5772	(x*:*:*)
5773		ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5774		test -n "$verbose" && echo "	ABI_VERSION: $ABI_VERSION" 1>&6
5775
5776echo "${as_me:-configure}:5776: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5777
5778		;;
5779	(*)
5780		{ echo "$as_me:5780: WARNING: unexpected VERSION value: $VERSION" >&5
5781echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5782		;;
5783	esac
5784fi
5785
5786LIBTOOL=
5787
5788# common library maintenance symbols that are convenient for libtool scripts:
5789LIB_CREATE='${AR} -cr'
5790LIB_OBJECT='${OBJECTS}'
5791LIB_SUFFIX=.a
5792LIB_PREP="$RANLIB"
5793
5794# symbols used to prop libtool up to enable it to determine what it should be
5795# doing:
5796LIB_CLEAN=
5797LIB_COMPILE=
5798LIB_LINK='${CC}'
5799LIB_INSTALL=
5800LIB_UNINSTALL=
5801
5802echo "$as_me:5802: checking if you want to build libraries with libtool" >&5
5803echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5804
5805# Check whether --with-libtool or --without-libtool was given.
5806if test "${with_libtool+set}" = set; then
5807  withval="$with_libtool"
5808  with_libtool=$withval
5809else
5810  with_libtool=no
5811fi;
5812echo "$as_me:5812: result: $with_libtool" >&5
5813echo "${ECHO_T}$with_libtool" >&6
5814if test "$with_libtool" != "no"; then
5815
5816	if test "$with_libtool" != "yes" ; then
5817
5818if test "x$prefix" != xNONE; then
5819	cf_path_syntax="$prefix"
5820else
5821	cf_path_syntax="$ac_default_prefix"
5822fi
5823
5824case "x$with_libtool" in
5825(x\$\(*\)*|x\'*\'*)
5826	;;
5827(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
5828	;;
5829(x\$\{*prefix\}*|x\$\{*dir\}*)
5830	eval with_libtool="$with_libtool"
5831	case "x$with_libtool" in
5832	(xNONE/*)
5833		with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5834		;;
5835	esac
5836	;;
5837(xno|xNONE/*)
5838	with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5839	;;
5840(*)
5841	{ { echo "$as_me:5841: error: expected a pathname, not \"$with_libtool\"" >&5
5842echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5843   { (exit 1); exit 1; }; }
5844	;;
5845esac
5846
5847		LIBTOOL=$with_libtool
5848	else
5849		if test -n "$ac_tool_prefix"; then
5850  for ac_prog in libtool glibtool
5851  do
5852    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5853set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5854echo "$as_me:5854: checking for $ac_word" >&5
5855echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5856if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5857  echo $ECHO_N "(cached) $ECHO_C" >&6
5858else
5859  if test -n "$LIBTOOL"; then
5860  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5861else
5862  ac_save_IFS=$IFS; IFS=$ac_path_separator
5863ac_dummy="$PATH"
5864for ac_dir in $ac_dummy; do
5865  IFS=$ac_save_IFS
5866  test -z "$ac_dir" && ac_dir=.
5867  $as_executable_p "$ac_dir/$ac_word" || continue
5868ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5869echo "$as_me:5869: found $ac_dir/$ac_word" >&5
5870break
5871done
5872
5873fi
5874fi
5875LIBTOOL=$ac_cv_prog_LIBTOOL
5876if test -n "$LIBTOOL"; then
5877  echo "$as_me:5877: result: $LIBTOOL" >&5
5878echo "${ECHO_T}$LIBTOOL" >&6
5879else
5880  echo "$as_me:5880: result: no" >&5
5881echo "${ECHO_T}no" >&6
5882fi
5883
5884    test -n "$LIBTOOL" && break
5885  done
5886fi
5887if test -z "$LIBTOOL"; then
5888  ac_ct_LIBTOOL=$LIBTOOL
5889  for ac_prog in libtool glibtool
5890do
5891  # Extract the first word of "$ac_prog", so it can be a program name with args.
5892set dummy $ac_prog; ac_word=$2
5893echo "$as_me:5893: checking for $ac_word" >&5
5894echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5895if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5896  echo $ECHO_N "(cached) $ECHO_C" >&6
5897else
5898  if test -n "$ac_ct_LIBTOOL"; then
5899  ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5900else
5901  ac_save_IFS=$IFS; IFS=$ac_path_separator
5902ac_dummy="$PATH"
5903for ac_dir in $ac_dummy; do
5904  IFS=$ac_save_IFS
5905  test -z "$ac_dir" && ac_dir=.
5906  $as_executable_p "$ac_dir/$ac_word" || continue
5907ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5908echo "$as_me:5908: found $ac_dir/$ac_word" >&5
5909break
5910done
5911
5912fi
5913fi
5914ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5915if test -n "$ac_ct_LIBTOOL"; then
5916  echo "$as_me:5916: result: $ac_ct_LIBTOOL" >&5
5917echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5918else
5919  echo "$as_me:5919: result: no" >&5
5920echo "${ECHO_T}no" >&6
5921fi
5922
5923  test -n "$ac_ct_LIBTOOL" && break
5924done
5925test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5926
5927  LIBTOOL=$ac_ct_LIBTOOL
5928fi
5929
5930if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5931then
5932	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.].*//'`
5933else
5934	cf_cv_libtool_version=
5935fi
5936test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5937
5938		if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5939		then
5940
5941unset ac_cv_prog_ac_ct_LIBTOOL
5942unset ac_ct_LIBTOOL
5943unset LIBTOOL
5944
5945			if test -n "$ac_tool_prefix"; then
5946  for ac_prog in glibtool
5947  do
5948    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5949set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5950echo "$as_me:5950: checking for $ac_word" >&5
5951echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5952if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5953  echo $ECHO_N "(cached) $ECHO_C" >&6
5954else
5955  if test -n "$LIBTOOL"; then
5956  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5957else
5958  ac_save_IFS=$IFS; IFS=$ac_path_separator
5959ac_dummy="$PATH"
5960for ac_dir in $ac_dummy; do
5961  IFS=$ac_save_IFS
5962  test -z "$ac_dir" && ac_dir=.
5963  $as_executable_p "$ac_dir/$ac_word" || continue
5964ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5965echo "$as_me:5965: found $ac_dir/$ac_word" >&5
5966break
5967done
5968
5969fi
5970fi
5971LIBTOOL=$ac_cv_prog_LIBTOOL
5972if test -n "$LIBTOOL"; then
5973  echo "$as_me:5973: result: $LIBTOOL" >&5
5974echo "${ECHO_T}$LIBTOOL" >&6
5975else
5976  echo "$as_me:5976: result: no" >&5
5977echo "${ECHO_T}no" >&6
5978fi
5979
5980    test -n "$LIBTOOL" && break
5981  done
5982fi
5983if test -z "$LIBTOOL"; then
5984  ac_ct_LIBTOOL=$LIBTOOL
5985  for ac_prog in glibtool
5986do
5987  # Extract the first word of "$ac_prog", so it can be a program name with args.
5988set dummy $ac_prog; ac_word=$2
5989echo "$as_me:5989: checking for $ac_word" >&5
5990echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5991if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5992  echo $ECHO_N "(cached) $ECHO_C" >&6
5993else
5994  if test -n "$ac_ct_LIBTOOL"; then
5995  ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5996else
5997  ac_save_IFS=$IFS; IFS=$ac_path_separator
5998ac_dummy="$PATH"
5999for ac_dir in $ac_dummy; do
6000  IFS=$ac_save_IFS
6001  test -z "$ac_dir" && ac_dir=.
6002  $as_executable_p "$ac_dir/$ac_word" || continue
6003ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
6004echo "$as_me:6004: found $ac_dir/$ac_word" >&5
6005break
6006done
6007
6008fi
6009fi
6010ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
6011if test -n "$ac_ct_LIBTOOL"; then
6012  echo "$as_me:6012: result: $ac_ct_LIBTOOL" >&5
6013echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
6014else
6015  echo "$as_me:6015: result: no" >&5
6016echo "${ECHO_T}no" >&6
6017fi
6018
6019  test -n "$ac_ct_LIBTOOL" && break
6020done
6021test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
6022
6023  LIBTOOL=$ac_ct_LIBTOOL
6024fi
6025
6026if test -n "$LIBTOOL" && test "$LIBTOOL" != none
6027then
6028	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.].*//'`
6029else
6030	cf_cv_libtool_version=
6031fi
6032test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
6033
6034		fi
6035	fi
6036	if test -z "$LIBTOOL" ; then
6037		{ { echo "$as_me:6037: error: Cannot find libtool" >&5
6038echo "$as_me: error: Cannot find libtool" >&2;}
6039   { (exit 1); exit 1; }; }
6040	fi
6041	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
6042	LIB_OBJECT='${OBJECTS:.${OBJEXT}=.lo}'
6043	LIB_SUFFIX=.la
6044	LIB_CLEAN='${LIBTOOL} --mode=clean'
6045	LIB_COMPILE='${LIBTOOL} --mode=compile'
6046	LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
6047	LIB_INSTALL='${LIBTOOL} --mode=install'
6048	LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
6049	LIB_PREP=:
6050
6051if test -n "$LIBTOOL" && test "$LIBTOOL" != none
6052then
6053	echo "$as_me:6053: checking version of $LIBTOOL" >&5
6054echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
6055
6056if test -n "$LIBTOOL" && test "$LIBTOOL" != none
6057then
6058	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.].*//'`
6059else
6060	cf_cv_libtool_version=
6061fi
6062test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
6063
6064	echo "$as_me:6064: result: $cf_cv_libtool_version" >&5
6065echo "${ECHO_T}$cf_cv_libtool_version" >&6
6066
6067	if test -n "$cf_cv_libtool_version"
6068	then
6069		cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
6070		case "x$cf_check_libtool_version" in
6071		(*...GNU-libtool...*)
6072			;;
6073		(*)
6074			{ { echo "$as_me:6074: error: This is not GNU libtool" >&5
6075echo "$as_me: error: This is not GNU libtool" >&2;}
6076   { (exit 1); exit 1; }; }
6077			;;
6078		esac
6079	else
6080		{ { echo "$as_me:6080: error: No version found for $LIBTOOL" >&5
6081echo "$as_me: error: No version found for $LIBTOOL" >&2;}
6082   { (exit 1); exit 1; }; }
6083	fi
6084
6085else
6086	{ { echo "$as_me:6086: error: GNU libtool has not been found" >&5
6087echo "$as_me: error: GNU libtool has not been found" >&2;}
6088   { (exit 1); exit 1; }; }
6089fi
6090
6091	# special hack to add -no-undefined (which libtool should do for itself)
6092	LT_UNDEF=
6093	case "$cf_cv_system_name" in
6094	(cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
6095		LT_UNDEF=-no-undefined
6096		;;
6097	esac
6098
6099	# special hack to add --tag option for C++ compiler
6100	case "$cf_cv_libtool_version" in
6101	(1.[5-9]*|[2-9].[0-9.a-z]*)
6102		LIBTOOL_CXX="$LIBTOOL --tag=CXX"
6103		LIBTOOL="$LIBTOOL --tag=CC"
6104		;;
6105	(*)
6106		LIBTOOL_CXX="$LIBTOOL"
6107		;;
6108	esac
6109else
6110	LIBTOOL=""
6111	LIBTOOL_CXX=""
6112fi
6113
6114test -z "$LIBTOOL" && ECHO_LT=
6115
6116if test "$with_libtool" != "no" ; then
6117
6118cf_list_models="$cf_list_models libtool"
6119
6120else
6121
6122echo "$as_me:6122: checking if you want to build shared libraries" >&5
6123echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
6124
6125# Check whether --with-shared or --without-shared was given.
6126if test "${with_shared+set}" = set; then
6127  withval="$with_shared"
6128  with_shared=$withval
6129else
6130  with_shared=no
6131fi;
6132echo "$as_me:6132: result: $with_shared" >&5
6133echo "${ECHO_T}$with_shared" >&6
6134test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
6135
6136echo "$as_me:6136: checking if you want to build static libraries" >&5
6137echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
6138
6139# Check whether --with-normal or --without-normal was given.
6140if test "${with_normal+set}" = set; then
6141  withval="$with_normal"
6142  with_normal=$withval
6143else
6144  with_normal=yes
6145fi;
6146echo "$as_me:6146: result: $with_normal" >&5
6147echo "${ECHO_T}$with_normal" >&6
6148test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
6149
6150echo "$as_me:6150: checking if you want to build debug libraries" >&5
6151echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
6152
6153# Check whether --with-debug or --without-debug was given.
6154if test "${with_debug+set}" = set; then
6155  withval="$with_debug"
6156  with_debug=$withval
6157else
6158  with_debug=yes
6159fi;
6160echo "$as_me:6160: result: $with_debug" >&5
6161echo "${ECHO_T}$with_debug" >&6
6162test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
6163
6164echo "$as_me:6164: checking if you want to build profiling libraries" >&5
6165echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
6166
6167# Check whether --with-profile or --without-profile was given.
6168if test "${with_profile+set}" = set; then
6169  withval="$with_profile"
6170  with_profile=$withval
6171else
6172  with_profile=no
6173fi;
6174echo "$as_me:6174: result: $with_profile" >&5
6175echo "${ECHO_T}$with_profile" >&6
6176test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
6177
6178fi
6179
6180if test "X$cf_with_cxx_binding" != Xno; then
6181if test "x$with_shared" = "xyes"; then
6182echo "$as_me:6182: checking if you want to build C++ shared libraries" >&5
6183echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
6184
6185# Check whether --with-cxx-shared or --without-cxx-shared was given.
6186if test "${with_cxx_shared+set}" = set; then
6187  withval="$with_cxx_shared"
6188  with_shared_cxx=$withval
6189else
6190  with_shared_cxx=no
6191fi;
6192echo "$as_me:6192: result: $with_shared_cxx" >&5
6193echo "${ECHO_T}$with_shared_cxx" >&6
6194fi
6195fi
6196
6197###############################################################################
6198
6199echo "$as_me:6199: checking for specified models" >&5
6200echo $ECHO_N "checking for specified models... $ECHO_C" >&6
6201test -z "$cf_list_models" && cf_list_models=normal
6202test "$with_libtool" != "no" && cf_list_models=libtool
6203echo "$as_me:6203: result: $cf_list_models" >&5
6204echo "${ECHO_T}$cf_list_models" >&6
6205
6206### Use the first model as the default, and save its suffix for use in building
6207### up test-applications.
6208echo "$as_me:6208: checking for default model" >&5
6209echo $ECHO_N "checking for default model... $ECHO_C" >&6
6210DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
6211echo "$as_me:6211: result: $DFT_LWR_MODEL" >&5
6212echo "${ECHO_T}$DFT_LWR_MODEL" >&6
6213
6214DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6215
6216TICS_NAME=tic
6217
6218TINFO_NAME=tinfo
6219
6220LIB_NAME=ncurses
6221
6222LIB_DIR=../lib
6223LIB_2ND=../../lib
6224
6225echo "$as_me:6225: checking if you want to have a library-prefix" >&5
6226echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
6227
6228# Check whether --with-lib-prefix or --without-lib-prefix was given.
6229if test "${with_lib_prefix+set}" = set; then
6230  withval="$with_lib_prefix"
6231  with_lib_prefix=$withval
6232else
6233  with_lib_prefix=auto
6234fi;
6235echo "$as_me:6235: result: $with_lib_prefix" >&5
6236echo "${ECHO_T}$with_lib_prefix" >&6
6237
6238if test "$with_lib_prefix" = auto
6239then
6240
6241	case "$cf_cv_system_name" in
6242	(OS/2*|os2*)
6243		if test "$DFT_LWR_MODEL" = libtool; then
6244			LIB_PREFIX='lib'
6245		else
6246			LIB_PREFIX=''
6247		fi
6248		;;
6249	(*-msvc*)
6250		LIB_PREFIX=''
6251		;;
6252	(*)	LIB_PREFIX='lib'
6253		;;
6254	esac
6255cf_prefix=$LIB_PREFIX
6256
6257elif test "$with_lib_prefix" = no
6258then
6259	LIB_PREFIX=
6260else
6261	LIB_PREFIX=$with_lib_prefix
6262fi
6263
6264LIB_SUFFIX=
6265
6266	echo "$as_me:6266: checking for PATH separator" >&5
6267echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
6268	case "$cf_cv_system_name" in
6269	(os2*)	PATH_SEPARATOR=';'  ;;
6270	(*)	${PATH_SEPARATOR:=':'}  ;;
6271	esac
6272
6273	echo "$as_me:6273: result: $PATH_SEPARATOR" >&5
6274echo "${ECHO_T}$PATH_SEPARATOR" >&6
6275
6276# headers needed for checks...
6277echo "$as_me:6277: checking for ANSI C header files" >&5
6278echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6279if test "${ac_cv_header_stdc+set}" = set; then
6280  echo $ECHO_N "(cached) $ECHO_C" >&6
6281else
6282  cat >"conftest.$ac_ext" <<_ACEOF
6283#line 6283 "configure"
6284#include "confdefs.h"
6285#include <stdlib.h>
6286#include <stdarg.h>
6287#include <string.h>
6288#include <float.h>
6289
6290_ACEOF
6291if { (eval echo "$as_me:6291: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6292  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6293  ac_status=$?
6294  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6295  rm -f conftest.er1
6296  cat conftest.err >&5
6297  echo "$as_me:6297: \$? = $ac_status" >&5
6298  (exit "$ac_status"); } >/dev/null; then
6299  if test -s conftest.err; then
6300    ac_cpp_err=$ac_c_preproc_warn_flag
6301  else
6302    ac_cpp_err=
6303  fi
6304else
6305  ac_cpp_err=yes
6306fi
6307if test -z "$ac_cpp_err"; then
6308  ac_cv_header_stdc=yes
6309else
6310  echo "$as_me: failed program was:" >&5
6311  cat "conftest.$ac_ext" >&5
6312  ac_cv_header_stdc=no
6313fi
6314rm -f conftest.err "conftest.$ac_ext"
6315
6316if test $ac_cv_header_stdc = yes; then
6317  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6318  cat >"conftest.$ac_ext" <<_ACEOF
6319#line 6319 "configure"
6320#include "confdefs.h"
6321#include <string.h>
6322
6323_ACEOF
6324if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6325  $EGREP "memchr" >/dev/null 2>&1; then
6326  :
6327else
6328  ac_cv_header_stdc=no
6329fi
6330rm -rf conftest*
6331
6332fi
6333
6334if test $ac_cv_header_stdc = yes; then
6335  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6336  cat >"conftest.$ac_ext" <<_ACEOF
6337#line 6337 "configure"
6338#include "confdefs.h"
6339#include <stdlib.h>
6340
6341_ACEOF
6342if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6343  $EGREP "free" >/dev/null 2>&1; then
6344  :
6345else
6346  ac_cv_header_stdc=no
6347fi
6348rm -rf conftest*
6349
6350fi
6351
6352if test $ac_cv_header_stdc = yes; then
6353  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6354  if test "$cross_compiling" = yes; then
6355  :
6356else
6357  cat >"conftest.$ac_ext" <<_ACEOF
6358#line 6358 "configure"
6359#include "confdefs.h"
6360#include <ctype.h>
6361#if ((' ' & 0x0FF) == 0x020)
6362# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6363# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6364#else
6365# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6366                     || ('j' <= (c) && (c) <= 'r') \
6367                     || ('s' <= (c) && (c) <= 'z'))
6368# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6369#endif
6370
6371#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6372int
6373main (void)
6374{
6375  int i;
6376  for (i = 0; i < 256; i++)
6377    if (XOR (islower (i), ISLOWER (i))
6378        || toupper (i) != TOUPPER (i))
6379      $ac_main_return(2);
6380  $ac_main_return (0);
6381}
6382_ACEOF
6383rm -f "conftest$ac_exeext"
6384if { (eval echo "$as_me:6384: \"$ac_link\"") >&5
6385  (eval $ac_link) 2>&5
6386  ac_status=$?
6387  echo "$as_me:6387: \$? = $ac_status" >&5
6388  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6389  { (eval echo "$as_me:6389: \"$ac_try\"") >&5
6390  (eval $ac_try) 2>&5
6391  ac_status=$?
6392  echo "$as_me:6392: \$? = $ac_status" >&5
6393  (exit "$ac_status"); }; }; then
6394  :
6395else
6396  echo "$as_me: program exited with status $ac_status" >&5
6397echo "$as_me: failed program was:" >&5
6398cat "conftest.$ac_ext" >&5
6399ac_cv_header_stdc=no
6400fi
6401rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6402fi
6403fi
6404fi
6405echo "$as_me:6405: result: $ac_cv_header_stdc" >&5
6406echo "${ECHO_T}$ac_cv_header_stdc" >&6
6407if test $ac_cv_header_stdc = yes; then
6408
6409cat >>confdefs.h <<\EOF
6410#define STDC_HEADERS 1
6411EOF
6412
6413fi
6414
6415# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6416
6417for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6418                  inttypes.h stdint.h unistd.h
6419do
6420as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6421echo "$as_me:6421: checking for $ac_header" >&5
6422echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6423if eval "test \"\${$as_ac_Header+set}\" = set"; then
6424  echo $ECHO_N "(cached) $ECHO_C" >&6
6425else
6426  cat >"conftest.$ac_ext" <<_ACEOF
6427#line 6427 "configure"
6428#include "confdefs.h"
6429$ac_includes_default
6430#include <$ac_header>
6431_ACEOF
6432rm -f "conftest.$ac_objext"
6433if { (eval echo "$as_me:6433: \"$ac_compile\"") >&5
6434  (eval $ac_compile) 2>&5
6435  ac_status=$?
6436  echo "$as_me:6436: \$? = $ac_status" >&5
6437  (exit "$ac_status"); } &&
6438         { ac_try='test -s "conftest.$ac_objext"'
6439  { (eval echo "$as_me:6439: \"$ac_try\"") >&5
6440  (eval $ac_try) 2>&5
6441  ac_status=$?
6442  echo "$as_me:6442: \$? = $ac_status" >&5
6443  (exit "$ac_status"); }; }; then
6444  eval "$as_ac_Header=yes"
6445else
6446  echo "$as_me: failed program was:" >&5
6447cat "conftest.$ac_ext" >&5
6448eval "$as_ac_Header=no"
6449fi
6450rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6451fi
6452echo "$as_me:6452: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6453echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6454if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6455  cat >>confdefs.h <<EOF
6456#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6457EOF
6458
6459fi
6460done
6461
6462echo "$as_me:6462: checking whether exit is declared" >&5
6463echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
6464if test "${ac_cv_have_decl_exit+set}" = set; then
6465  echo $ECHO_N "(cached) $ECHO_C" >&6
6466else
6467  cat >"conftest.$ac_ext" <<_ACEOF
6468#line 6468 "configure"
6469#include "confdefs.h"
6470$ac_includes_default
6471int
6472main (void)
6473{
6474#ifndef exit
6475  (void) exit;
6476#endif
6477
6478  ;
6479  return 0;
6480}
6481_ACEOF
6482rm -f "conftest.$ac_objext"
6483if { (eval echo "$as_me:6483: \"$ac_compile\"") >&5
6484  (eval $ac_compile) 2>&5
6485  ac_status=$?
6486  echo "$as_me:6486: \$? = $ac_status" >&5
6487  (exit "$ac_status"); } &&
6488         { ac_try='test -s "conftest.$ac_objext"'
6489  { (eval echo "$as_me:6489: \"$ac_try\"") >&5
6490  (eval $ac_try) 2>&5
6491  ac_status=$?
6492  echo "$as_me:6492: \$? = $ac_status" >&5
6493  (exit "$ac_status"); }; }; then
6494  ac_cv_have_decl_exit=yes
6495else
6496  echo "$as_me: failed program was:" >&5
6497cat "conftest.$ac_ext" >&5
6498ac_cv_have_decl_exit=no
6499fi
6500rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6501fi
6502echo "$as_me:6502: result: $ac_cv_have_decl_exit" >&5
6503echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
6504
6505ac_header_dirent=no
6506for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
6507  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6508echo "$as_me:6508: checking for $ac_hdr that defines DIR" >&5
6509echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
6510if eval "test \"\${$as_ac_Header+set}\" = set"; then
6511  echo $ECHO_N "(cached) $ECHO_C" >&6
6512else
6513  cat >"conftest.$ac_ext" <<_ACEOF
6514#line 6514 "configure"
6515#include "confdefs.h"
6516#include <sys/types.h>
6517#include <$ac_hdr>
6518
6519int
6520main (void)
6521{
6522if ((DIR *) 0)
6523return 0;
6524  ;
6525  return 0;
6526}
6527_ACEOF
6528rm -f "conftest.$ac_objext"
6529if { (eval echo "$as_me:6529: \"$ac_compile\"") >&5
6530  (eval $ac_compile) 2>&5
6531  ac_status=$?
6532  echo "$as_me:6532: \$? = $ac_status" >&5
6533  (exit "$ac_status"); } &&
6534         { ac_try='test -s "conftest.$ac_objext"'
6535  { (eval echo "$as_me:6535: \"$ac_try\"") >&5
6536  (eval $ac_try) 2>&5
6537  ac_status=$?
6538  echo "$as_me:6538: \$? = $ac_status" >&5
6539  (exit "$ac_status"); }; }; then
6540  eval "$as_ac_Header=yes"
6541else
6542  echo "$as_me: failed program was:" >&5
6543cat "conftest.$ac_ext" >&5
6544eval "$as_ac_Header=no"
6545fi
6546rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6547fi
6548echo "$as_me:6548: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6549echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6550if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6551  cat >>confdefs.h <<EOF
6552#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
6553EOF
6554
6555ac_header_dirent=$ac_hdr; break
6556fi
6557
6558done
6559# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6560if test $ac_header_dirent = dirent.h; then
6561  echo "$as_me:6561: checking for opendir in -ldir" >&5
6562echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
6563if test "${ac_cv_lib_dir_opendir+set}" = set; then
6564  echo $ECHO_N "(cached) $ECHO_C" >&6
6565else
6566  ac_check_lib_save_LIBS=$LIBS
6567LIBS="-ldir  $LIBS"
6568cat >"conftest.$ac_ext" <<_ACEOF
6569#line 6569 "configure"
6570#include "confdefs.h"
6571
6572/* Override any gcc2 internal prototype to avoid an error.  */
6573#ifdef __cplusplus
6574extern "C"
6575#endif
6576/* We use char because int might match the return type of a gcc2
6577   builtin and then its argument prototype would still apply.  */
6578char opendir (void);
6579int
6580main (void)
6581{
6582opendir ();
6583  ;
6584  return 0;
6585}
6586_ACEOF
6587rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6588if { (eval echo "$as_me:6588: \"$ac_link\"") >&5
6589  (eval $ac_link) 2>&5
6590  ac_status=$?
6591  echo "$as_me:6591: \$? = $ac_status" >&5
6592  (exit "$ac_status"); } &&
6593         { ac_try='test -s "conftest$ac_exeext"'
6594  { (eval echo "$as_me:6594: \"$ac_try\"") >&5
6595  (eval $ac_try) 2>&5
6596  ac_status=$?
6597  echo "$as_me:6597: \$? = $ac_status" >&5
6598  (exit "$ac_status"); }; }; then
6599  ac_cv_lib_dir_opendir=yes
6600else
6601  echo "$as_me: failed program was:" >&5
6602cat "conftest.$ac_ext" >&5
6603ac_cv_lib_dir_opendir=no
6604fi
6605rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6606LIBS=$ac_check_lib_save_LIBS
6607fi
6608echo "$as_me:6608: result: $ac_cv_lib_dir_opendir" >&5
6609echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
6610if test "$ac_cv_lib_dir_opendir" = yes; then
6611  LIBS="$LIBS -ldir"
6612fi
6613
6614else
6615  echo "$as_me:6615: checking for opendir in -lx" >&5
6616echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
6617if test "${ac_cv_lib_x_opendir+set}" = set; then
6618  echo $ECHO_N "(cached) $ECHO_C" >&6
6619else
6620  ac_check_lib_save_LIBS=$LIBS
6621LIBS="-lx  $LIBS"
6622cat >"conftest.$ac_ext" <<_ACEOF
6623#line 6623 "configure"
6624#include "confdefs.h"
6625
6626/* Override any gcc2 internal prototype to avoid an error.  */
6627#ifdef __cplusplus
6628extern "C"
6629#endif
6630/* We use char because int might match the return type of a gcc2
6631   builtin and then its argument prototype would still apply.  */
6632char opendir (void);
6633int
6634main (void)
6635{
6636opendir ();
6637  ;
6638  return 0;
6639}
6640_ACEOF
6641rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6642if { (eval echo "$as_me:6642: \"$ac_link\"") >&5
6643  (eval $ac_link) 2>&5
6644  ac_status=$?
6645  echo "$as_me:6645: \$? = $ac_status" >&5
6646  (exit "$ac_status"); } &&
6647         { ac_try='test -s "conftest$ac_exeext"'
6648  { (eval echo "$as_me:6648: \"$ac_try\"") >&5
6649  (eval $ac_try) 2>&5
6650  ac_status=$?
6651  echo "$as_me:6651: \$? = $ac_status" >&5
6652  (exit "$ac_status"); }; }; then
6653  ac_cv_lib_x_opendir=yes
6654else
6655  echo "$as_me: failed program was:" >&5
6656cat "conftest.$ac_ext" >&5
6657ac_cv_lib_x_opendir=no
6658fi
6659rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6660LIBS=$ac_check_lib_save_LIBS
6661fi
6662echo "$as_me:6662: result: $ac_cv_lib_x_opendir" >&5
6663echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
6664if test "$ac_cv_lib_x_opendir" = yes; then
6665  LIBS="$LIBS -lx"
6666fi
6667
6668fi
6669
6670###############################################################################
6671
6672echo "$as_me:6672: checking if you want to build a separate terminfo library" >&5
6673echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
6674
6675# Check whether --with-termlib or --without-termlib was given.
6676if test "${with_termlib+set}" = set; then
6677  withval="$with_termlib"
6678  with_termlib=$withval
6679else
6680  with_termlib=no
6681fi;
6682echo "$as_me:6682: result: $with_termlib" >&5
6683echo "${ECHO_T}$with_termlib" >&6
6684
6685echo "$as_me:6685: checking if you want to build a separate tic library" >&5
6686echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
6687
6688# Check whether --with-ticlib or --without-ticlib was given.
6689if test "${with_ticlib+set}" = set; then
6690  withval="$with_ticlib"
6691  with_ticlib=$withval
6692else
6693  with_ticlib=no
6694fi;
6695echo "$as_me:6695: result: $with_ticlib" >&5
6696echo "${ECHO_T}$with_ticlib" >&6
6697
6698if test X"$CC_G_OPT" = X"" ; then
6699	CC_G_OPT='-g'
6700	test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
6701fi
6702
6703if test X"$CXX_G_OPT" = X"" ; then
6704	CXX_G_OPT='-g'
6705	test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
6706fi
6707
6708echo "$as_me:6708: checking for default loader flags" >&5
6709echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
6710case "$DFT_LWR_MODEL" in
6711(libtool) LD_MODEL=''   ;;
6712(normal)  LD_MODEL=''   ;;
6713(debug)   LD_MODEL=$CC_G_OPT ;;
6714(profile) LD_MODEL='-pg';;
6715(shared)  LD_MODEL=''   ;;
6716esac
6717echo "$as_me:6717: result: ${LD_MODEL:-(none)}" >&5
6718echo "${ECHO_T}${LD_MODEL:-(none)}" >&6
6719
6720case "$DFT_LWR_MODEL" in
6721(shared)
6722
6723echo "$as_me:6723: checking if rpath option should be used" >&5
6724echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
6725
6726# Check whether --enable-rpath or --disable-rpath was given.
6727if test "${enable_rpath+set}" = set; then
6728  enableval="$enable_rpath"
6729  cf_cv_enable_rpath=$enableval
6730else
6731  cf_cv_enable_rpath=no
6732fi;
6733echo "$as_me:6733: result: $cf_cv_enable_rpath" >&5
6734echo "${ECHO_T}$cf_cv_enable_rpath" >&6
6735
6736echo "$as_me:6736: checking if shared libraries should be relinked during install" >&5
6737echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
6738
6739# Check whether --enable-relink or --disable-relink was given.
6740if test "${enable_relink+set}" = set; then
6741  enableval="$enable_relink"
6742  cf_cv_do_relink=$enableval
6743else
6744  cf_cv_do_relink=yes
6745fi;
6746echo "$as_me:6746: result: $cf_cv_do_relink" >&5
6747echo "${ECHO_T}$cf_cv_do_relink" >&6
6748	;;
6749esac
6750
6751# we will build libraries one-level down.
6752rel_builddir=..
6753
6754LD_RPATH_OPT=
6755if test "x$cf_cv_enable_rpath" != xno
6756then
6757	echo "$as_me:6757: checking for an rpath option" >&5
6758echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
6759	case "$cf_cv_system_name" in
6760	(irix*)
6761		if test "$GCC" = yes; then
6762			LD_RPATH_OPT="-Wl,-rpath,"
6763		else
6764			LD_RPATH_OPT="-rpath "
6765		fi
6766		;;
6767	(linux*|gnu*|k*bsd*-gnu|freebsd*)
6768		LD_RPATH_OPT="-Wl,-rpath,"
6769		;;
6770	(openbsd[2-9].*|mirbsd*)
6771		LD_RPATH_OPT="-Wl,-rpath,"
6772		;;
6773	(dragonfly*)
6774		LD_RPATH_OPT="-rpath "
6775		;;
6776	(netbsd*)
6777		LD_RPATH_OPT="-Wl,-rpath,"
6778		;;
6779	(osf*|mls+*)
6780		LD_RPATH_OPT="-rpath "
6781		;;
6782	(solaris2*)
6783		LD_RPATH_OPT="-R"
6784		;;
6785	(*)
6786		;;
6787	esac
6788	echo "$as_me:6788: result: $LD_RPATH_OPT" >&5
6789echo "${ECHO_T}$LD_RPATH_OPT" >&6
6790
6791	case "x$LD_RPATH_OPT" in
6792	(x-R*)
6793		echo "$as_me:6793: checking if we need a space after rpath option" >&5
6794echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6795		cf_save_LIBS="$LIBS"
6796
6797cf_add_libs="$LIBS"
6798# reverse order
6799cf_add_0lib=
6800for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6801# filter duplicates
6802for cf_add_1lib in $cf_add_0lib; do
6803	for cf_add_2lib in $cf_add_libs; do
6804		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6805			cf_add_1lib=
6806			break
6807		fi
6808	done
6809	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6810done
6811LIBS="$cf_add_libs"
6812
6813		cat >"conftest.$ac_ext" <<_ACEOF
6814#line 6814 "configure"
6815#include "confdefs.h"
6816
6817int
6818main (void)
6819{
6820
6821  ;
6822  return 0;
6823}
6824_ACEOF
6825rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6826if { (eval echo "$as_me:6826: \"$ac_link\"") >&5
6827  (eval $ac_link) 2>&5
6828  ac_status=$?
6829  echo "$as_me:6829: \$? = $ac_status" >&5
6830  (exit "$ac_status"); } &&
6831         { ac_try='test -s "conftest$ac_exeext"'
6832  { (eval echo "$as_me:6832: \"$ac_try\"") >&5
6833  (eval $ac_try) 2>&5
6834  ac_status=$?
6835  echo "$as_me:6835: \$? = $ac_status" >&5
6836  (exit "$ac_status"); }; }; then
6837  cf_rpath_space=no
6838else
6839  echo "$as_me: failed program was:" >&5
6840cat "conftest.$ac_ext" >&5
6841cf_rpath_space=yes
6842fi
6843rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6844		LIBS="$cf_save_LIBS"
6845		echo "$as_me:6845: result: $cf_rpath_space" >&5
6846echo "${ECHO_T}$cf_rpath_space" >&6
6847		test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6848		;;
6849	esac
6850fi
6851
6852	RM_SHARED_OPTS=
6853	LOCAL_LDFLAGS=
6854	LOCAL_LDFLAGS2=
6855	LD_SHARED_OPTS=
6856	INSTALL_LIB="-m 644"
6857	: ${rel_builddir:=.}
6858
6859	shlibdir=$libdir
6860
6861	MAKE_DLLS="#"
6862
6863	cf_cv_do_symlinks=no
6864	cf_ld_rpath_opt=
6865	test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6866
6867	echo "$as_me:6867: checking whether to use release or ABI version in shared library file names" >&5
6868echo $ECHO_N "checking whether to use release or ABI version in shared library file names... $ECHO_C" >&6
6869
6870# Check whether --with-shlib-version or --without-shlib-version was given.
6871if test "${with_shlib_version+set}" = set; then
6872  withval="$with_shlib_version"
6873  test -z "$withval" && withval=auto
6874	case "$withval" in
6875	(yes)
6876		cf_cv_shlib_version=auto
6877		;;
6878	(rel|abi|auto)
6879		cf_cv_shlib_version=$withval
6880		;;
6881	(*)
6882		echo "$as_me:6882: result: $withval" >&5
6883echo "${ECHO_T}$withval" >&6
6884		{ { echo "$as_me:6884: error: option value must be one of: rel, abi, or auto" >&5
6885echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6886   { (exit 1); exit 1; }; }
6887		;;
6888	esac
6889
6890else
6891  cf_cv_shlib_version=auto
6892fi;
6893	echo "$as_me:6893: result: $cf_cv_shlib_version" >&5
6894echo "${ECHO_T}$cf_cv_shlib_version" >&6
6895
6896	cf_cv_rm_so_locs=no
6897	cf_try_cflags=
6898
6899	# Some less-capable ports of gcc support only -fpic
6900	CC_SHARED_OPTS=
6901
6902	cf_try_fPIC=no
6903	if test "$GCC" = yes
6904	then
6905		cf_try_fPIC=yes
6906	else
6907		case "$cf_cv_system_name" in
6908		(*linux*)	# e.g., PGI compiler
6909			cf_try_fPIC=yes
6910			;;
6911		esac
6912	fi
6913
6914	if test "$cf_try_fPIC" = yes
6915	then
6916		echo "$as_me:6916: checking which $CC option to use" >&5
6917echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6918		cf_save_CFLAGS="$CFLAGS"
6919		for CC_SHARED_OPTS in -fPIC -fpic ''
6920		do
6921			CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6922			cat >"conftest.$ac_ext" <<_ACEOF
6923#line 6923 "configure"
6924#include "confdefs.h"
6925#include <stdio.h>
6926int
6927main (void)
6928{
6929int x = 1; (void)x
6930  ;
6931  return 0;
6932}
6933_ACEOF
6934rm -f "conftest.$ac_objext"
6935if { (eval echo "$as_me:6935: \"$ac_compile\"") >&5
6936  (eval $ac_compile) 2>&5
6937  ac_status=$?
6938  echo "$as_me:6938: \$? = $ac_status" >&5
6939  (exit "$ac_status"); } &&
6940         { ac_try='test -s "conftest.$ac_objext"'
6941  { (eval echo "$as_me:6941: \"$ac_try\"") >&5
6942  (eval $ac_try) 2>&5
6943  ac_status=$?
6944  echo "$as_me:6944: \$? = $ac_status" >&5
6945  (exit "$ac_status"); }; }; then
6946  break
6947else
6948  echo "$as_me: failed program was:" >&5
6949cat "conftest.$ac_ext" >&5
6950fi
6951rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6952		done
6953		echo "$as_me:6953: result: $CC_SHARED_OPTS" >&5
6954echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6955		CFLAGS="$cf_save_CFLAGS"
6956	fi
6957
6958	cf_cv_shlib_version_infix=no
6959
6960	case "$cf_cv_system_name" in
6961	(aix4.3-9*|aix[5-7]*)
6962		if test "$GCC" = yes; then
6963			CC_SHARED_OPTS='-Wl,-brtl'
6964			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6965		else
6966			CC_SHARED_OPTS='-brtl'
6967			# as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6968			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6969		fi
6970		;;
6971	(beos*)
6972		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6973		;;
6974	(cygwin*)
6975		CC_SHARED_OPTS=
6976		MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6977		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6978		cf_cv_shlib_version=cygdll
6979		cf_cv_shlib_version_infix=cygdll
6980		shlibdir=$bindir
6981		MAKE_DLLS=
6982		cat >mk_shared_lib.sh <<-CF_EOF
6983		#!$SHELL
6984		SHARED_LIB=\$1
6985		IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6986		shift
6987		cat <<-EOF
6988		Linking shared library
6989		** SHARED_LIB \$SHARED_LIB
6990		** IMPORT_LIB \$IMPORT_LIB
6991EOF
6992		exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6993CF_EOF
6994		chmod +x mk_shared_lib.sh
6995		;;
6996	(msys*)
6997		CC_SHARED_OPTS=
6998		MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6999		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
7000		cf_cv_shlib_version=msysdll
7001		cf_cv_shlib_version_infix=msysdll
7002		shlibdir=$bindir
7003		MAKE_DLLS=
7004		cat >mk_shared_lib.sh <<-CF_EOF
7005		#!$SHELL
7006		SHARED_LIB=\$1
7007		IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7008		shift
7009		cat <<-EOF
7010		Linking shared library
7011		** SHARED_LIB \$SHARED_LIB
7012		** IMPORT_LIB \$IMPORT_LIB
7013EOF
7014		exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
7015CF_EOF
7016		chmod +x mk_shared_lib.sh
7017		;;
7018	(darwin*)
7019		cf_try_cflags="no-cpp-precomp"
7020		CC_SHARED_OPTS="-dynamic"
7021		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
7022		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
7023		cf_cv_shlib_version_infix=yes
7024		echo "$as_me:7024: checking if ld -search_paths_first works" >&5
7025echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
7026if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
7027  echo $ECHO_N "(cached) $ECHO_C" >&6
7028else
7029
7030			cf_save_LDFLAGS=$LDFLAGS
7031			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7032			cat >"conftest.$ac_ext" <<_ACEOF
7033#line 7033 "configure"
7034#include "confdefs.h"
7035
7036int
7037main (void)
7038{
7039int i;
7040  ;
7041  return 0;
7042}
7043_ACEOF
7044rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7045if { (eval echo "$as_me:7045: \"$ac_link\"") >&5
7046  (eval $ac_link) 2>&5
7047  ac_status=$?
7048  echo "$as_me:7048: \$? = $ac_status" >&5
7049  (exit "$ac_status"); } &&
7050         { ac_try='test -s "conftest$ac_exeext"'
7051  { (eval echo "$as_me:7051: \"$ac_try\"") >&5
7052  (eval $ac_try) 2>&5
7053  ac_status=$?
7054  echo "$as_me:7054: \$? = $ac_status" >&5
7055  (exit "$ac_status"); }; }; then
7056  cf_cv_ldflags_search_paths_first=yes
7057else
7058  echo "$as_me: failed program was:" >&5
7059cat "conftest.$ac_ext" >&5
7060cf_cv_ldflags_search_paths_first=no
7061fi
7062rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7063				LDFLAGS=$cf_save_LDFLAGS
7064fi
7065echo "$as_me:7065: result: $cf_cv_ldflags_search_paths_first" >&5
7066echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
7067		if test "$cf_cv_ldflags_search_paths_first" = yes; then
7068			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7069		fi
7070		;;
7071	(haiku*)
7072
7073	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7074	if test "$cf_cv_shlib_version" = rel; then
7075		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7076	else
7077		cf_cv_shared_soname='`basename $@`'
7078	fi
7079
7080		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7081		;;
7082	(hpux[7-8]*)
7083		# HP-UX 8.07 ld lacks "+b" option used for libdir search-list
7084		if test "$GCC" != yes; then
7085			CC_SHARED_OPTS='+Z'
7086		fi
7087		MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
7088		INSTALL_LIB="-m 555"
7089		;;
7090	(hpux*)
7091		# (tested with gcc 2.7.2 -- I don't have c89)
7092		if test "$GCC" = yes; then
7093			LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7094		else
7095			CC_SHARED_OPTS='+Z'
7096			LD_SHARED_OPTS='-Wl,+b,${libdir}'
7097		fi
7098		MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
7099		# HP-UX shared libraries must be executable, and should be
7100		# readonly to exploit a quirk in the memory manager.
7101		INSTALL_LIB="-m 555"
7102		;;
7103	(interix*)
7104		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7105		if test "$cf_cv_shlib_version" = rel; then
7106			cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7107		else
7108			cf_shared_soname='`basename $@`'
7109		fi
7110		CC_SHARED_OPTS=
7111		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
7112		;;
7113	(irix*)
7114		if test "$cf_cv_enable_rpath" = yes ; then
7115			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7116		fi
7117		# tested with IRIX 5.2 and 'cc'.
7118		if test "$GCC" != yes; then
7119			CC_SHARED_OPTS='-KPIC'
7120			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
7121		else
7122			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
7123		fi
7124		cf_cv_rm_so_locs=yes
7125		;;
7126	(linux*|gnu*|k*bsd*-gnu)
7127		if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7128			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7129			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7130		fi
7131		if test "$cf_cv_enable_rpath" = yes ; then
7132			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7133		fi
7134
7135	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7136	if test "$cf_cv_shlib_version" = rel; then
7137		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7138	else
7139		cf_cv_shared_soname='`basename $@`'
7140	fi
7141
7142		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7143		;;
7144	(mingw*msvc*)
7145		cf_cv_shlib_version=msvcdll
7146		cf_cv_shlib_version_infix=msvcdll
7147		shlibdir=$bindir
7148		MAKE_DLLS=
7149		if test "$DFT_LWR_MODEL" = "shared" ; then
7150			LOCAL_LDFLAGS="-link -dll"
7151			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7152			EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
7153		fi
7154		CC_SHARED_OPTS=
7155		MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
7156		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
7157		cat >mk_shared_lib.sh <<-CF_EOF
7158		#!$SHELL
7159		SHARED_LIB=\$1
7160		IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
7161		shift
7162		my_ld=\$1
7163		shift
7164		cat <<-EOF
7165		Linking shared library
7166		** SHARED LIB \$SHARED_LIB
7167		** IMPORT_LIB \$IMPORT_LIB
7168EOF
7169		args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
7170		exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
7171		mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
7172CF_EOF
7173		chmod +x mk_shared_lib.sh
7174		cat >mk_prog.sh <<-CF_EOF
7175		#!$SHELL
7176		shift
7177		# Ignore first argument (compiler) and use LD (link.exe) unconditionally
7178		LD="$LD"
7179		clopts=()
7180		ldopts=("/subsystem:console")
7181		libs=()
7182		isdll=0
7183		while test \$# -gt 0; do
7184			case "\$1" in
7185				-link)
7186					# ignore -link argument
7187					;;
7188				-M[TD] | -M[TD]d)
7189					# ignore runtime-library option
7190					;;
7191				-dll)
7192					isdll=1
7193					;;
7194				-W* | -w*)
7195					# ignore warnings
7196					;;
7197				-D*)
7198					clopts+=("\$1")
7199					;;
7200				-I*)
7201					clopts+=("\$1")
7202					;;
7203				-l*)
7204					libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
7205					;;
7206				-L*)
7207					ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
7208					;;
7209				*.obj | *.$OBJEXT)
7210					ldopts+=("\$1")
7211					;;
7212				-Wl,*)
7213					for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
7214						ldopts+=("\${linkarg}")
7215					done
7216					;;
7217				*.lib)
7218					ldopts+=("\$1")
7219					;;
7220				-o)
7221					shift
7222					ldopts+=("-out:\$1")
7223					;;
7224				*)
7225					clopts+=("\$1")
7226					ldopts+=("\$1")
7227					;;
7228			esac
7229			shift
7230		done
7231		if [ "\$isdll" -ne 0 ]; then
7232			for lib in \${libs[*]}; do
7233				ldopts+=("\$lib.dll.lib")
7234			done
7235		else
7236			for lib in \${libs[*]}; do
7237				ldopts+=("\$lib.lib")
7238			done
7239		fi
7240		cat <<-EOF
7241		Creating program
7242		** ld options:   "\${ldopts[@]}"
7243EOF
7244		exec \$LD \${ldopts[@]}
7245CF_EOF
7246		chmod +x mk_prog.sh
7247		LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
7248		LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
7249		;;
7250	(mingw*)
7251		cf_cv_shlib_version=mingw
7252		cf_cv_shlib_version_infix=mingw
7253		shlibdir=$bindir
7254		MAKE_DLLS=
7255		if test "$DFT_LWR_MODEL" = "shared" ; then
7256			LOCAL_LDFLAGS="-Wl,--enable-auto-import"
7257			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7258			EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
7259		fi
7260		CC_SHARED_OPTS=
7261		MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7262		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
7263		cat >mk_shared_lib.sh <<-CF_EOF
7264		#!$SHELL
7265		SHARED_LIB=\$1
7266		IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
7267		shift
7268		cat <<-EOF
7269		Linking shared library
7270		** SHARED_LIB \$SHARED_LIB
7271		** IMPORT_LIB \$IMPORT_LIB
7272EOF
7273		exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
7274CF_EOF
7275		chmod +x mk_shared_lib.sh
7276		;;
7277	(openbsd[2-9].*|mirbsd*)
7278		if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7279			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7280			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7281		fi
7282		if test "$cf_cv_enable_rpath" = yes ; then
7283			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7284		fi
7285		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7286
7287	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7288	if test "$cf_cv_shlib_version" = rel; then
7289		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7290	else
7291		cf_cv_shared_soname='`basename $@`'
7292	fi
7293
7294		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7295		;;
7296	(nskJ*)
7297		CC_SHARED_OPTS=
7298		MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
7299		;;
7300	(nskL*)
7301		CC_SHARED_OPTS=
7302		MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
7303		;;
7304	(nto-qnx*|openbsd*|freebsd[12].*)
7305		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7306		MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
7307		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7308		;;
7309	(dragonfly*|freebsd*)
7310		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7311		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7312			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7313			LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
7314			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7315		fi
7316
7317	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7318	if test "$cf_cv_shlib_version" = rel; then
7319		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7320	else
7321		cf_cv_shared_soname='`basename $@`'
7322	fi
7323
7324		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7325		;;
7326	(netbsd*)
7327		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7328		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7329			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7330			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7331			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7332			if test "$cf_cv_shlib_version" = auto; then
7333			if test -f /usr/libexec/ld.elf_so; then
7334				cf_cv_shlib_version=abi
7335			else
7336				cf_cv_shlib_version=rel
7337			fi
7338			fi
7339
7340	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7341	if test "$cf_cv_shlib_version" = rel; then
7342		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7343	else
7344		cf_cv_shared_soname='`basename $@`'
7345	fi
7346
7347			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7348		else
7349			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
7350		fi
7351		;;
7352	(osf*|mls+*)
7353		# tested with OSF/1 V3.2 and 'cc'
7354		# tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7355		# link with shared libs).
7356		MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7357		case "$host_os" in
7358		(osf4*)
7359			MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7360			;;
7361		esac
7362		MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7363		if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7364			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7365			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7366		fi
7367		cf_cv_rm_so_locs=yes
7368		;;
7369	(sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
7370		# tested with osr5.0.5
7371		if test "$GCC" != yes; then
7372			CC_SHARED_OPTS='-belf -KPIC'
7373		fi
7374		MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7375		if test "$cf_cv_enable_rpath" = yes ; then
7376			# only way is to set LD_RUN_PATH but no switch for it
7377			RUN_PATH=$libdir
7378		fi
7379		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7380		LINK_PROGS='LD_RUN_PATH=${libdir}'
7381		LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7382		;;
7383	(sunos4*)
7384		# tested with SunOS 4.1.1 and gcc 2.7.0
7385		if test "$GCC" != yes; then
7386			CC_SHARED_OPTS='-KPIC'
7387		fi
7388		MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
7389		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7390		;;
7391	(solaris2*)
7392		# tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7393		# tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7394		if test "$DFT_LWR_MODEL" = "shared" ; then
7395			LOCAL_LDFLAGS="-R\$(LOCAL_LIBDIR):\${libdir}"
7396			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7397		fi
7398		if test "$cf_cv_enable_rpath" = yes ; then
7399			EXTRA_LDFLAGS="-R\${libdir} $EXTRA_LDFLAGS"
7400		fi
7401
7402	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7403	if test "$cf_cv_shlib_version" = rel; then
7404		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7405	else
7406		cf_cv_shared_soname='`basename $@`'
7407	fi
7408
7409		if test "$GCC" != yes; then
7410			cf_save_CFLAGS="$CFLAGS"
7411			for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7412			do
7413				CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7414				cat >"conftest.$ac_ext" <<_ACEOF
7415#line 7415 "configure"
7416#include "confdefs.h"
7417#include <stdio.h>
7418int
7419main (void)
7420{
7421printf("Hello\\n");
7422  ;
7423  return 0;
7424}
7425_ACEOF
7426rm -f "conftest.$ac_objext"
7427if { (eval echo "$as_me:7427: \"$ac_compile\"") >&5
7428  (eval $ac_compile) 2>&5
7429  ac_status=$?
7430  echo "$as_me:7430: \$? = $ac_status" >&5
7431  (exit "$ac_status"); } &&
7432         { ac_try='test -s "conftest.$ac_objext"'
7433  { (eval echo "$as_me:7433: \"$ac_try\"") >&5
7434  (eval $ac_try) 2>&5
7435  ac_status=$?
7436  echo "$as_me:7436: \$? = $ac_status" >&5
7437  (exit "$ac_status"); }; }; then
7438  break
7439else
7440  echo "$as_me: failed program was:" >&5
7441cat "conftest.$ac_ext" >&5
7442fi
7443rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7444			done
7445			CFLAGS="$cf_save_CFLAGS"
7446			CC_SHARED_OPTS=$cf_shared_opts
7447			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@'
7448		else
7449			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@'
7450		fi
7451		;;
7452	(sysv5uw7*|unix_sv*)
7453		# tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7454		if test "$GCC" != yes; then
7455			CC_SHARED_OPTS='-KPIC'
7456		fi
7457		MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
7458		;;
7459	(*)
7460		CC_SHARED_OPTS='unknown'
7461		MK_SHARED_LIB='echo unknown'
7462		;;
7463	esac
7464
7465	# This works if the last tokens in $MK_SHARED_LIB are the -o target.
7466	case "$cf_cv_shlib_version" in
7467	(rel|abi)
7468		case "$MK_SHARED_LIB" in
7469		(*'-o $@')
7470			test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7471			;;
7472		(*)
7473			{ echo "$as_me:7473: WARNING: ignored --with-shlib-version" >&5
7474echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7475			;;
7476		esac
7477		;;
7478	esac
7479
7480	if test -n "$cf_try_cflags"
7481	then
7482cat > conftest.$ac_ext <<EOF
7483#line 7483 "${as_me:-configure}"
7484#include <stdio.h>
7485int main(int argc, char *argv[])
7486{
7487	printf("hello\\n");
7488	return (argv[argc-1] == NULL) ;
7489}
7490EOF
7491		cf_save_CFLAGS="$CFLAGS"
7492		for cf_opt in $cf_try_cflags
7493		do
7494			CFLAGS="$cf_save_CFLAGS -$cf_opt"
7495			echo "$as_me:7495: checking if CFLAGS option -$cf_opt works" >&5
7496echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
7497			if { (eval echo "$as_me:7497: \"$ac_compile\"") >&5
7498  (eval $ac_compile) 2>&5
7499  ac_status=$?
7500  echo "$as_me:7500: \$? = $ac_status" >&5
7501  (exit "$ac_status"); }; then
7502				echo "$as_me:7502: result: yes" >&5
7503echo "${ECHO_T}yes" >&6
7504				cf_save_CFLAGS="$CFLAGS"
7505			else
7506				echo "$as_me:7506: result: no" >&5
7507echo "${ECHO_T}no" >&6
7508			fi
7509		done
7510		CFLAGS="$cf_save_CFLAGS"
7511	fi
7512
7513	# RPATH_LIST is a colon-separated list of directories
7514	test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7515	test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7516
7517	test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
7518
7519	test -n "$verbose" && echo "	CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7520
7521echo "${as_me:-configure}:7521: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7522
7523	test -n "$verbose" && echo "	MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7524
7525echo "${as_me:-configure}:7525: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7526
7527for model in $cf_list_models ; do
7528	case "$model" in
7529	(libtool)
7530
7531echo "$as_me:7531: checking for additional libtool options" >&5
7532echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
7533
7534# Check whether --with-libtool-opts or --without-libtool-opts was given.
7535if test "${with_libtool_opts+set}" = set; then
7536  withval="$with_libtool_opts"
7537  with_libtool_opts=$withval
7538else
7539  with_libtool_opts=no
7540fi;
7541echo "$as_me:7541: result: $with_libtool_opts" >&5
7542echo "${ECHO_T}$with_libtool_opts" >&6
7543
7544case .$with_libtool_opts in
7545(.yes|.no|.)
7546	;;
7547(*)
7548	LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
7549	;;
7550esac
7551
7552echo "$as_me:7552: checking if exported-symbols file should be used" >&5
7553echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
7554
7555# Check whether --with-export-syms or --without-export-syms was given.
7556if test "${with_export_syms+set}" = set; then
7557  withval="$with_export_syms"
7558  with_export_syms=$withval
7559else
7560  with_export_syms=no
7561fi;
7562if test "x$with_export_syms" = xyes
7563then
7564	with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
7565
7566fi
7567echo "$as_me:7567: result: $with_export_syms" >&5
7568echo "${ECHO_T}$with_export_syms" >&6
7569if test "x$with_export_syms" != xno
7570then
7571	EXPORT_SYMS="-export-symbols $with_export_syms"
7572
7573fi
7574
7575		;;
7576	(shared)
7577		if test "$CC_SHARED_OPTS" = "unknown"; then
7578			{ { echo "$as_me:7578: error: Shared libraries are not supported in this version" >&5
7579echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
7580   { (exit 1); exit 1; }; }
7581		fi
7582		# workaround for inept transition to PIE vs PIC...
7583		echo "$as_me:7583: checking if current CFLAGS link properly" >&5
7584echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
7585		cat >"conftest.$ac_ext" <<_ACEOF
7586#line 7586 "configure"
7587#include "confdefs.h"
7588#include <stdio.h>
7589int
7590main (void)
7591{
7592printf("Hello work\\n");
7593  ;
7594  return 0;
7595}
7596_ACEOF
7597rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7598if { (eval echo "$as_me:7598: \"$ac_link\"") >&5
7599  (eval $ac_link) 2>&5
7600  ac_status=$?
7601  echo "$as_me:7601: \$? = $ac_status" >&5
7602  (exit "$ac_status"); } &&
7603         { ac_try='test -s "conftest$ac_exeext"'
7604  { (eval echo "$as_me:7604: \"$ac_try\"") >&5
7605  (eval $ac_try) 2>&5
7606  ac_status=$?
7607  echo "$as_me:7607: \$? = $ac_status" >&5
7608  (exit "$ac_status"); }; }; then
7609  cf_cflags_work=yes
7610else
7611  echo "$as_me: failed program was:" >&5
7612cat "conftest.$ac_ext" >&5
7613cf_cflags_work=no
7614fi
7615rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7616		echo "$as_me:7616: result: $cf_cflags_work" >&5
7617echo "${ECHO_T}$cf_cflags_work" >&6
7618		if test "$cf_cflags_work" = no
7619		then
7620			test -n "$verbose" && echo "	try to work around by appending shared-options" 1>&6
7621
7622echo "${as_me:-configure}:7622: testing try to work around by appending shared-options ..." 1>&5
7623
7624			CFLAGS="$CFLAGS $CC_SHARED_OPTS"
7625		fi
7626
7627if test "$with_libtool" = "yes" ; then
7628	:
7629elif test "$with_shared" = "yes" ; then
7630echo "$as_me:7630: checking if versioned-symbols file should be used" >&5
7631echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
7632
7633# Check whether --with-versioned-syms or --without-versioned-syms was given.
7634if test "${with_versioned_syms+set}" = set; then
7635  withval="$with_versioned_syms"
7636  with_versioned_syms=$withval
7637else
7638  with_versioned_syms=no
7639fi;
7640case "x$with_versioned_syms" in
7641(xyes)
7642	with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
7643
7644	;;
7645(xno)
7646	;;
7647(x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
7648	test -f "$with_versioned_syms" || { { echo "$as_me:7648: error: expected a filename: $with_versioned_syms" >&5
7649echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7650   { (exit 1); exit 1; }; }
7651	;;
7652(*)
7653	test -f "$with_versioned_syms" || { { echo "$as_me:7653: error: expected a filename: $with_versioned_syms" >&5
7654echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7655   { (exit 1); exit 1; }; }
7656	with_versioned_syms=`pwd`/"$with_versioned_syms"
7657	;;
7658esac
7659echo "$as_me:7659: result: $with_versioned_syms" >&5
7660echo "${ECHO_T}$with_versioned_syms" >&6
7661
7662RESULTING_SYMS=
7663VERSIONED_SYMS=
7664WILDCARD_SYMS=
7665
7666if test "x$with_versioned_syms" != xno
7667then
7668	RESULTING_SYMS=$with_versioned_syms
7669	case "x$MK_SHARED_LIB" in
7670	(*-Wl,*)
7671		VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
7672		MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
7673		test -n "$verbose" && echo "	MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7674
7675echo "${as_me:-configure}:7675: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7676
7677		LIB_CREATE="$MK_SHARED_LIB"
7678		;;
7679	(*-dy\ *)
7680		VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
7681		MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
7682		test -n "$verbose" && echo "	MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7683
7684echo "${as_me:-configure}:7684: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7685
7686		LIB_CREATE="$MK_SHARED_LIB"
7687		;;
7688	(*)
7689		{ echo "$as_me:7689: WARNING: this system does not support versioned-symbols" >&5
7690echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
7691		;;
7692	esac
7693
7694	# Linux ld can selectively override scope, e.g., of symbols beginning with
7695	# "_" by first declaring some as global, and then using a wildcard to
7696	# declare the others as local.  Some other loaders cannot do this.  Check
7697	# by constructing a (very) simple shared library and inspecting its
7698	# symbols.
7699	if test "x$VERSIONED_SYMS" != "x"
7700	then
7701		echo "$as_me:7701: checking if wildcards can be used to selectively omit symbols" >&5
7702echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
7703		WILDCARD_SYMS=no
7704
7705		# make sources
7706		rm -f conftest.*
7707
7708		cat >conftest.ver <<EOF
7709module_1.0 {
7710global:
7711	globalf1;
7712local:
7713	localf1;
7714};
7715module_2.0 {
7716global:
7717	globalf2;
7718local:
7719	localf2;
7720	_*;
7721} module_1.0;
7722submodule_1.0 {
7723global:
7724	subglobalf1;
7725	_ismissing;
7726local:
7727	sublocalf1;
7728};
7729submodule_2.0 {
7730global:
7731	subglobalf2;
7732local:
7733	sublocalf2;
7734	_*;
7735} submodule_1.0;
7736EOF
7737		cat >conftest.$ac_ext <<EOF
7738#line 7738 "configure"
7739extern int _ismissing(void);    int _ismissing(void)  { return 1; }
7740extern int _localf1(void);      int _localf1(void)    { return 1; }
7741extern int _localf2(void);      int _localf2(void)    { return 2; }
7742extern int globalf1(void);      int globalf1(void)    { return 1; }
7743extern int globalf2(void);      int globalf2(void)    { return 2; }
7744extern int _sublocalf1(void);   int _sublocalf1(void) { return 1; }
7745extern int _sublocalf2(void);   int _sublocalf2(void) { return 2; }
7746extern int subglobalf1(void);   int subglobalf1(void) { return 1; }
7747extern int subglobalf2(void);   int subglobalf2(void) { return 2; }
7748EOF
7749		cat >conftest.mk <<EOF
7750CC=${CC}
7751CFLAGS=${CFLAGS}
7752CPPFLAGS=${CPPFLAGS}
7753LDFLAGS=${LDFLAGS}
7754LIBS=${LIBS}
7755VERSIONED_SYMS=${VERSIONED_SYMS}
7756RESULTING_SYMS=conftest.ver
7757MK_SHARED_LIB=${MK_SHARED_LIB}
7758conftest.so: conftest.$ac_cv_objext
7759		\$(MK_SHARED_LIB) conftest.$ac_cv_objext
7760EOF
7761
7762		# compile source, make library
7763		if make -f conftest.mk 2>&5 >/dev/null
7764		then
7765			# test for missing symbol in either Data or Text section
7766			cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[ 	][DT][ 	]'`"
7767			test -n "$cf_missing" && WILDCARD_SYMS=yes
7768		fi
7769		echo "$as_me:7769: result: $WILDCARD_SYMS" >&5
7770echo "${ECHO_T}$WILDCARD_SYMS" >&6
7771		rm -f conftest.*
7772	fi
7773fi
7774
7775fi
7776
7777		;;
7778	esac
7779done
7780
7781### Checks for special libraries, must be done up-front.
7782SHLIB_LIST=""
7783
7784echo "$as_me:7784: checking if you want to link with the GPM mouse library" >&5
7785echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
7786
7787# Check whether --with-gpm or --without-gpm was given.
7788if test "${with_gpm+set}" = set; then
7789  withval="$with_gpm"
7790  with_gpm=$withval
7791else
7792  with_gpm=maybe
7793fi;
7794echo "$as_me:7794: result: $with_gpm" >&5
7795echo "${ECHO_T}$with_gpm" >&6
7796
7797if test "$with_gpm" != no ; then
7798	echo "$as_me:7798: checking for gpm.h" >&5
7799echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7800if test "${ac_cv_header_gpm_h+set}" = set; then
7801  echo $ECHO_N "(cached) $ECHO_C" >&6
7802else
7803  cat >"conftest.$ac_ext" <<_ACEOF
7804#line 7804 "configure"
7805#include "confdefs.h"
7806#include <gpm.h>
7807_ACEOF
7808if { (eval echo "$as_me:7808: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7809  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7810  ac_status=$?
7811  $EGREP -v '^ *\+' conftest.er1 >conftest.err
7812  rm -f conftest.er1
7813  cat conftest.err >&5
7814  echo "$as_me:7814: \$? = $ac_status" >&5
7815  (exit "$ac_status"); } >/dev/null; then
7816  if test -s conftest.err; then
7817    ac_cpp_err=$ac_c_preproc_warn_flag
7818  else
7819    ac_cpp_err=
7820  fi
7821else
7822  ac_cpp_err=yes
7823fi
7824if test -z "$ac_cpp_err"; then
7825  ac_cv_header_gpm_h=yes
7826else
7827  echo "$as_me: failed program was:" >&5
7828  cat "conftest.$ac_ext" >&5
7829  ac_cv_header_gpm_h=no
7830fi
7831rm -f conftest.err "conftest.$ac_ext"
7832fi
7833echo "$as_me:7833: result: $ac_cv_header_gpm_h" >&5
7834echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7835if test "$ac_cv_header_gpm_h" = yes; then
7836
7837cat >>confdefs.h <<\EOF
7838#define HAVE_GPM_H 1
7839EOF
7840
7841		if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7842			test -n "$verbose" && echo "	assuming we really have GPM library" 1>&6
7843
7844echo "${as_me:-configure}:7844: testing assuming we really have GPM library ..." 1>&5
7845
7846cat >>confdefs.h <<\EOF
7847#define HAVE_LIBGPM 1
7848EOF
7849
7850			with_gpm=yes
7851		else
7852			echo "$as_me:7852: checking for Gpm_Open in -lgpm" >&5
7853echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7854if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7855  echo $ECHO_N "(cached) $ECHO_C" >&6
7856else
7857  ac_check_lib_save_LIBS=$LIBS
7858LIBS="-lgpm  $LIBS"
7859cat >"conftest.$ac_ext" <<_ACEOF
7860#line 7860 "configure"
7861#include "confdefs.h"
7862
7863/* Override any gcc2 internal prototype to avoid an error.  */
7864#ifdef __cplusplus
7865extern "C"
7866#endif
7867/* We use char because int might match the return type of a gcc2
7868   builtin and then its argument prototype would still apply.  */
7869char Gpm_Open (void);
7870int
7871main (void)
7872{
7873Gpm_Open ();
7874  ;
7875  return 0;
7876}
7877_ACEOF
7878rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7879if { (eval echo "$as_me:7879: \"$ac_link\"") >&5
7880  (eval $ac_link) 2>&5
7881  ac_status=$?
7882  echo "$as_me:7882: \$? = $ac_status" >&5
7883  (exit "$ac_status"); } &&
7884         { ac_try='test -s "conftest$ac_exeext"'
7885  { (eval echo "$as_me:7885: \"$ac_try\"") >&5
7886  (eval $ac_try) 2>&5
7887  ac_status=$?
7888  echo "$as_me:7888: \$? = $ac_status" >&5
7889  (exit "$ac_status"); }; }; then
7890  ac_cv_lib_gpm_Gpm_Open=yes
7891else
7892  echo "$as_me: failed program was:" >&5
7893cat "conftest.$ac_ext" >&5
7894ac_cv_lib_gpm_Gpm_Open=no
7895fi
7896rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7897LIBS=$ac_check_lib_save_LIBS
7898fi
7899echo "$as_me:7899: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7900echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7901if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7902  with_gpm=yes
7903else
7904
7905				if test "$with_gpm" = maybe; then
7906					{ echo "$as_me:7906: WARNING: Cannot link with GPM library" >&5
7907echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7908					with_gpm=no
7909				else
7910					{ { echo "$as_me:7910: error: Cannot link with GPM library" >&5
7911echo "$as_me: error: Cannot link with GPM library" >&2;}
7912   { (exit 1); exit 1; }; }
7913				fi
7914
7915fi
7916
7917		fi
7918
7919else
7920
7921		test "$with_gpm" != maybe && { echo "$as_me:7921: WARNING: Cannot find GPM header" >&5
7922echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7923		with_gpm=no
7924
7925fi
7926
7927fi
7928
7929if test "$with_gpm" != no ; then
7930	echo "$as_me:7930: checking if you want to load GPM dynamically" >&5
7931echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7932
7933# Check whether --with-dlsym or --without-dlsym was given.
7934if test "${with_dlsym+set}" = set; then
7935  withval="$with_dlsym"
7936  with_dlsym=$withval
7937else
7938  with_dlsym=yes
7939fi;
7940	echo "$as_me:7940: result: $with_dlsym" >&5
7941echo "${ECHO_T}$with_dlsym" >&6
7942	if test "x$with_dlsym" = xyes ; then
7943
7944cf_have_dlsym=no
7945echo "$as_me:7945: checking for dlsym" >&5
7946echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7947if test "${ac_cv_func_dlsym+set}" = set; then
7948  echo $ECHO_N "(cached) $ECHO_C" >&6
7949else
7950  cat >"conftest.$ac_ext" <<_ACEOF
7951#line 7951 "configure"
7952#include "confdefs.h"
7953#define dlsym autoconf_temporary
7954#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
7955#undef dlsym
7956
7957#ifdef __cplusplus
7958extern "C"
7959#endif
7960
7961/* We use char because int might match the return type of a gcc2
7962   builtin and then its argument prototype would still apply.  */
7963char dlsym (void);
7964
7965int
7966main (void)
7967{
7968
7969/* The GNU C library defines stubs for functions which it implements
7970    to always fail with ENOSYS.  Some functions are actually named
7971    something starting with __ and the normal name is an alias.  */
7972#if defined (__stub_dlsym) || defined (__stub___dlsym)
7973#error found stub for dlsym
7974#endif
7975
7976	return dlsym ();
7977  ;
7978  return 0;
7979}
7980_ACEOF
7981rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7982if { (eval echo "$as_me:7982: \"$ac_link\"") >&5
7983  (eval $ac_link) 2>&5
7984  ac_status=$?
7985  echo "$as_me:7985: \$? = $ac_status" >&5
7986  (exit "$ac_status"); } &&
7987         { ac_try='test -s "conftest$ac_exeext"'
7988  { (eval echo "$as_me:7988: \"$ac_try\"") >&5
7989  (eval $ac_try) 2>&5
7990  ac_status=$?
7991  echo "$as_me:7991: \$? = $ac_status" >&5
7992  (exit "$ac_status"); }; }; then
7993  ac_cv_func_dlsym=yes
7994else
7995  echo "$as_me: failed program was:" >&5
7996cat "conftest.$ac_ext" >&5
7997ac_cv_func_dlsym=no
7998fi
7999rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8000fi
8001echo "$as_me:8001: result: $ac_cv_func_dlsym" >&5
8002echo "${ECHO_T}$ac_cv_func_dlsym" >&6
8003if test "$ac_cv_func_dlsym" = yes; then
8004  cf_have_dlsym=yes
8005else
8006
8007cf_have_libdl=no
8008echo "$as_me:8008: checking for dlsym in -ldl" >&5
8009echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
8010if test "${ac_cv_lib_dl_dlsym+set}" = set; then
8011  echo $ECHO_N "(cached) $ECHO_C" >&6
8012else
8013  ac_check_lib_save_LIBS=$LIBS
8014LIBS="-ldl  $LIBS"
8015cat >"conftest.$ac_ext" <<_ACEOF
8016#line 8016 "configure"
8017#include "confdefs.h"
8018
8019/* Override any gcc2 internal prototype to avoid an error.  */
8020#ifdef __cplusplus
8021extern "C"
8022#endif
8023/* We use char because int might match the return type of a gcc2
8024   builtin and then its argument prototype would still apply.  */
8025char dlsym (void);
8026int
8027main (void)
8028{
8029dlsym ();
8030  ;
8031  return 0;
8032}
8033_ACEOF
8034rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8035if { (eval echo "$as_me:8035: \"$ac_link\"") >&5
8036  (eval $ac_link) 2>&5
8037  ac_status=$?
8038  echo "$as_me:8038: \$? = $ac_status" >&5
8039  (exit "$ac_status"); } &&
8040         { ac_try='test -s "conftest$ac_exeext"'
8041  { (eval echo "$as_me:8041: \"$ac_try\"") >&5
8042  (eval $ac_try) 2>&5
8043  ac_status=$?
8044  echo "$as_me:8044: \$? = $ac_status" >&5
8045  (exit "$ac_status"); }; }; then
8046  ac_cv_lib_dl_dlsym=yes
8047else
8048  echo "$as_me: failed program was:" >&5
8049cat "conftest.$ac_ext" >&5
8050ac_cv_lib_dl_dlsym=no
8051fi
8052rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8053LIBS=$ac_check_lib_save_LIBS
8054fi
8055echo "$as_me:8055: result: $ac_cv_lib_dl_dlsym" >&5
8056echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
8057if test "$ac_cv_lib_dl_dlsym" = yes; then
8058
8059	cf_have_dlsym=yes
8060	cf_have_libdl=yes
8061fi
8062
8063fi
8064
8065if test "$cf_have_dlsym" = yes ; then
8066	test "$cf_have_libdl" = yes && {
8067cf_add_libs="$LIBS"
8068# reverse order
8069cf_add_0lib=
8070for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8071# filter duplicates
8072for cf_add_1lib in $cf_add_0lib; do
8073	for cf_add_2lib in $cf_add_libs; do
8074		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8075			cf_add_1lib=
8076			break
8077		fi
8078	done
8079	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8080done
8081LIBS="$cf_add_libs"
8082 }
8083
8084	echo "$as_me:8084: checking whether able to link to dl*() functions" >&5
8085echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
8086	cat >"conftest.$ac_ext" <<_ACEOF
8087#line 8087 "configure"
8088#include "confdefs.h"
8089
8090	#include <stdio.h>
8091	#include <dlfcn.h>
8092
8093int
8094main (void)
8095{
8096
8097		void *obj;
8098		if ((obj = dlopen("filename", 0)) != NULL) {
8099			if (dlsym(obj, "symbolname") == 0) {
8100			dlclose(obj);
8101			}
8102		}
8103  ;
8104  return 0;
8105}
8106_ACEOF
8107rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8108if { (eval echo "$as_me:8108: \"$ac_link\"") >&5
8109  (eval $ac_link) 2>&5
8110  ac_status=$?
8111  echo "$as_me:8111: \$? = $ac_status" >&5
8112  (exit "$ac_status"); } &&
8113         { ac_try='test -s "conftest$ac_exeext"'
8114  { (eval echo "$as_me:8114: \"$ac_try\"") >&5
8115  (eval $ac_try) 2>&5
8116  ac_status=$?
8117  echo "$as_me:8117: \$? = $ac_status" >&5
8118  (exit "$ac_status"); }; }; then
8119
8120cat >>confdefs.h <<\EOF
8121#define HAVE_LIBDL 1
8122EOF
8123
8124else
8125  echo "$as_me: failed program was:" >&5
8126cat "conftest.$ac_ext" >&5
8127
8128		{ { echo "$as_me:8128: error: Cannot link test program for libdl" >&5
8129echo "$as_me: error: Cannot link test program for libdl" >&2;}
8130   { (exit 1); exit 1; }; }
8131fi
8132rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8133	echo "$as_me:8133: result: ok" >&5
8134echo "${ECHO_T}ok" >&6
8135else
8136	{ { echo "$as_me:8136: error: Cannot find dlsym function" >&5
8137echo "$as_me: error: Cannot find dlsym function" >&2;}
8138   { (exit 1); exit 1; }; }
8139fi
8140
8141		if test "x$with_gpm" != xyes ; then
8142			test -n "$verbose" && echo "	assuming soname for gpm is $with_gpm" 1>&6
8143
8144echo "${as_me:-configure}:8144: testing assuming soname for gpm is $with_gpm ..." 1>&5
8145
8146			cf_cv_gpm_soname="$with_gpm"
8147		else
8148
8149echo "$as_me:8149: checking for soname of gpm library" >&5
8150echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
8151if test "${cf_cv_gpm_soname+set}" = set; then
8152  echo $ECHO_N "(cached) $ECHO_C" >&6
8153else
8154
8155cf_cv_gpm_soname=unknown
8156if test "$cross_compiling" != yes ; then
8157cat >conftest.$ac_ext <<CF_EOF
8158#include <gpm.h>
8159int main(void)
8160{
8161if (Gpm_Open(0,0)) Gpm_Close();
8162	${cf_cv_main_return:-return}(0);
8163}
8164CF_EOF
8165cf_save_LIBS="$LIBS"
8166
8167cf_add_libs="$LIBS"
8168# reverse order
8169cf_add_0lib=
8170for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8171# filter duplicates
8172for cf_add_1lib in $cf_add_0lib; do
8173	for cf_add_2lib in $cf_add_libs; do
8174		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8175			cf_add_1lib=
8176			break
8177		fi
8178	done
8179	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8180done
8181LIBS="$cf_add_libs"
8182
8183	if { (eval echo "$as_me:8183: \"$ac_compile\"") >&5
8184  (eval $ac_compile) 2>&5
8185  ac_status=$?
8186  echo "$as_me:8186: \$? = $ac_status" >&5
8187  (exit "$ac_status"); } ; then
8188		if { (eval echo "$as_me:8188: \"$ac_link\"") >&5
8189  (eval $ac_link) 2>&5
8190  ac_status=$?
8191  echo "$as_me:8191: \$? = $ac_status" >&5
8192  (exit "$ac_status"); } ; then
8193			cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
8194			test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
8195		fi
8196	fi
8197rm -rf ./conftest*
8198LIBS="$cf_save_LIBS"
8199fi
8200
8201fi
8202echo "$as_me:8202: result: $cf_cv_gpm_soname" >&5
8203echo "${ECHO_T}$cf_cv_gpm_soname" >&6
8204
8205		fi
8206		test "$cf_cv_gpm_soname" != "unknown" &&
8207cat >>confdefs.h <<EOF
8208#define LIBGPM_SONAME "$cf_cv_gpm_soname"
8209EOF
8210
8211		SHLIB_LIST="-ldl $SHLIB_LIST"
8212
8213cf_add_libs="$PRIVATE_LIBS"
8214# reverse order
8215cf_add_0lib=
8216for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8217# filter duplicates
8218for cf_add_1lib in $cf_add_0lib; do
8219	for cf_add_2lib in $cf_add_libs; do
8220		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8221			cf_add_1lib=
8222			break
8223		fi
8224	done
8225	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8226done
8227PRIVATE_LIBS="$cf_add_libs"
8228
8229	else
8230		SHLIB_LIST="-lgpm $SHLIB_LIST"
8231
8232cf_add_libs="$TEST_LIBS"
8233# reverse order
8234cf_add_0lib=
8235for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8236# filter duplicates
8237for cf_add_1lib in $cf_add_0lib; do
8238	for cf_add_2lib in $cf_add_libs; do
8239		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8240			cf_add_1lib=
8241			break
8242		fi
8243	done
8244	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8245done
8246TEST_LIBS="$cf_add_libs"
8247
8248cf_add_libs="$PRIVATE_LIBS"
8249# reverse order
8250cf_add_0lib=
8251for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8252# filter duplicates
8253for cf_add_1lib in $cf_add_0lib; do
8254	for cf_add_2lib in $cf_add_libs; do
8255		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8256			cf_add_1lib=
8257			break
8258		fi
8259	done
8260	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8261done
8262PRIVATE_LIBS="$cf_add_libs"
8263
8264	fi
8265
8266cat >>confdefs.h <<\EOF
8267#define HAVE_LIBGPM 1
8268EOF
8269
8270echo "$as_me:8270: checking for Gpm_Wgetch in -lgpm" >&5
8271echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
8272if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
8273  echo $ECHO_N "(cached) $ECHO_C" >&6
8274else
8275  ac_check_lib_save_LIBS=$LIBS
8276LIBS="-lgpm  $LIBS"
8277cat >"conftest.$ac_ext" <<_ACEOF
8278#line 8278 "configure"
8279#include "confdefs.h"
8280
8281/* Override any gcc2 internal prototype to avoid an error.  */
8282#ifdef __cplusplus
8283extern "C"
8284#endif
8285/* We use char because int might match the return type of a gcc2
8286   builtin and then its argument prototype would still apply.  */
8287char Gpm_Wgetch (void);
8288int
8289main (void)
8290{
8291Gpm_Wgetch ();
8292  ;
8293  return 0;
8294}
8295_ACEOF
8296rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8297if { (eval echo "$as_me:8297: \"$ac_link\"") >&5
8298  (eval $ac_link) 2>&5
8299  ac_status=$?
8300  echo "$as_me:8300: \$? = $ac_status" >&5
8301  (exit "$ac_status"); } &&
8302         { ac_try='test -s "conftest$ac_exeext"'
8303  { (eval echo "$as_me:8303: \"$ac_try\"") >&5
8304  (eval $ac_try) 2>&5
8305  ac_status=$?
8306  echo "$as_me:8306: \$? = $ac_status" >&5
8307  (exit "$ac_status"); }; }; then
8308  ac_cv_lib_gpm_Gpm_Wgetch=yes
8309else
8310  echo "$as_me: failed program was:" >&5
8311cat "conftest.$ac_ext" >&5
8312ac_cv_lib_gpm_Gpm_Wgetch=no
8313fi
8314rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8315LIBS=$ac_check_lib_save_LIBS
8316fi
8317echo "$as_me:8317: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
8318echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
8319if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
8320
8321echo "$as_me:8321: checking if GPM is weakly bound to curses library" >&5
8322echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
8323if test "${cf_cv_check_gpm_wgetch+set}" = set; then
8324  echo $ECHO_N "(cached) $ECHO_C" >&6
8325else
8326
8327cf_cv_check_gpm_wgetch=unknown
8328if test "$cross_compiling" != yes ; then
8329
8330cat >conftest.$ac_ext <<CF_EOF
8331#include <gpm.h>
8332int main(void)
8333{
8334	Gpm_Wgetch();
8335	${cf_cv_main_return:-return}(0);
8336}
8337CF_EOF
8338
8339	cf_save_LIBS="$LIBS"
8340	# This only works if we can look at the symbol table.  If a shared
8341	# library is stripped for install, we cannot use that.  So we're forced
8342	# to rely on the static library, noting that some packagers may not
8343	# include it.
8344	LIBS="-static -lgpm -dynamic $LIBS"
8345	if { (eval echo "$as_me:8345: \"$ac_compile\"") >&5
8346  (eval $ac_compile) 2>&5
8347  ac_status=$?
8348  echo "$as_me:8348: \$? = $ac_status" >&5
8349  (exit "$ac_status"); } ; then
8350		if { (eval echo "$as_me:8350: \"$ac_link\"") >&5
8351  (eval $ac_link) 2>&5
8352  ac_status=$?
8353  echo "$as_me:8353: \$? = $ac_status" >&5
8354  (exit "$ac_status"); } ; then
8355			cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
8356			test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
8357			test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
8358		fi
8359	fi
8360	rm -rf ./conftest*
8361	LIBS="$cf_save_LIBS"
8362fi
8363
8364fi
8365echo "$as_me:8365: result: $cf_cv_check_gpm_wgetch" >&5
8366echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
8367
8368if test "$cf_cv_check_gpm_wgetch" != yes ; then
8369	{ echo "$as_me:8369: WARNING: GPM library is already linked with curses - read the FAQ" >&5
8370echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
8371fi
8372
8373fi
8374
8375fi
8376
8377echo "$as_me:8377: checking if you want to use PCRE2 for regular-expressions" >&5
8378echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
8379
8380# Check whether --with-pcre2 or --without-pcre2 was given.
8381if test "${with_pcre2+set}" = set; then
8382  withval="$with_pcre2"
8383
8384fi;
8385test -z "$with_pcre2" && with_pcre2=no
8386echo "$as_me:8386: result: $with_pcre2" >&5
8387echo "${ECHO_T}$with_pcre2" >&6
8388
8389if test "x$with_pcre2" != xno ; then
8390	cf_with_pcre2_ok=no
8391	for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
8392	do
8393
8394if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
8395	test -n "$verbose" && echo "	found package $cf_with_pcre2" 1>&6
8396
8397echo "${as_me:-configure}:8397: testing found package $cf_with_pcre2 ..." 1>&5
8398
8399	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
8400	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
8401	test -n "$verbose" && echo "	package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
8402
8403echo "${as_me:-configure}:8403: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8404
8405	test -n "$verbose" && echo "	package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
8406
8407echo "${as_me:-configure}:8407: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
8408
8409for cf_required in $cf_with_pcre2
8410do
8411	# check for duplicates
8412	for cf_require_pkg in $REQUIRE_PKG
8413	do
8414		if test "$cf_required" = "$cf_require_pkg"
8415		then
8416			cf_required=
8417			break
8418		fi
8419	done
8420	test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
8421done
8422
8423cf_fix_cppflags=no
8424cf_new_cflags=
8425cf_new_cppflags=
8426cf_new_extra_cppflags=
8427
8428for cf_add_cflags in $cf_pkgconfig_incs
8429do
8430case "$cf_fix_cppflags" in
8431(no)
8432	case "$cf_add_cflags" in
8433	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8434		case "$cf_add_cflags" in
8435		(-D*)
8436			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8437
8438			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8439				&& test -z "${cf_tst_cflags}" \
8440				&& cf_fix_cppflags=yes
8441
8442			if test "$cf_fix_cppflags" = yes ; then
8443
8444	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8445	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8446
8447				continue
8448			elif test "${cf_tst_cflags}" = "\"'" ; then
8449
8450	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8451	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8452
8453				continue
8454			fi
8455			;;
8456		esac
8457		case "$CPPFLAGS" in
8458		(*$cf_add_cflags)
8459			;;
8460		(*)
8461			case "$cf_add_cflags" in
8462			(-D*)
8463				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8464
8465CPPFLAGS=`echo "$CPPFLAGS" | \
8466	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8467		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8468
8469				;;
8470			esac
8471
8472	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8473	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8474
8475			;;
8476		esac
8477		;;
8478	(*)
8479
8480	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8481	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8482
8483		;;
8484	esac
8485	;;
8486(yes)
8487
8488	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8489	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8490
8491	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8492
8493	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8494		&& test -z "${cf_tst_cflags}" \
8495		&& cf_fix_cppflags=no
8496	;;
8497esac
8498done
8499
8500if test -n "$cf_new_cflags" ; then
8501
8502	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8503	CFLAGS="${CFLAGS}$cf_new_cflags"
8504
8505fi
8506
8507if test -n "$cf_new_cppflags" ; then
8508
8509	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8510	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8511
8512fi
8513
8514if test -n "$cf_new_extra_cppflags" ; then
8515
8516	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8517	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8518
8519fi
8520
8521cf_add_libs="$LIBS"
8522# reverse order
8523cf_add_0lib=
8524for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8525# filter duplicates
8526for cf_add_1lib in $cf_add_0lib; do
8527	for cf_add_2lib in $cf_add_libs; do
8528		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8529			cf_add_1lib=
8530			break
8531		fi
8532	done
8533	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8534done
8535LIBS="$cf_add_libs"
8536
8537	cf_with_pcre2_ok=yes; break
8538else
8539	cf_pkgconfig_incs=
8540	cf_pkgconfig_libs=
8541	:
8542fi
8543
8544	done
8545	cf_with_pcre2_ok=yes || { { echo "$as_me:8545: error: Cannot find PCRE2 library" >&5
8546echo "$as_me: error: Cannot find PCRE2 library" >&2;}
8547   { (exit 1); exit 1; }; }
8548
8549cat >>confdefs.h <<\EOF
8550#define HAVE_LIB_PCRE2 1
8551EOF
8552
8553	# if pkgconfig gave no results, look for the libraries directly
8554	case "$LIBS" in
8555	(*pcre2-posix*|*pcreposix*)
8556		;;
8557	(*)
8558		echo "$as_me:8558: checking for regcomp in -lpcre2-posix" >&5
8559echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
8560if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
8561  echo $ECHO_N "(cached) $ECHO_C" >&6
8562else
8563  ac_check_lib_save_LIBS=$LIBS
8564LIBS="-lpcre2-posix  $LIBS"
8565cat >"conftest.$ac_ext" <<_ACEOF
8566#line 8566 "configure"
8567#include "confdefs.h"
8568
8569/* Override any gcc2 internal prototype to avoid an error.  */
8570#ifdef __cplusplus
8571extern "C"
8572#endif
8573/* We use char because int might match the return type of a gcc2
8574   builtin and then its argument prototype would still apply.  */
8575char regcomp (void);
8576int
8577main (void)
8578{
8579regcomp ();
8580  ;
8581  return 0;
8582}
8583_ACEOF
8584rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8585if { (eval echo "$as_me:8585: \"$ac_link\"") >&5
8586  (eval $ac_link) 2>&5
8587  ac_status=$?
8588  echo "$as_me:8588: \$? = $ac_status" >&5
8589  (exit "$ac_status"); } &&
8590         { ac_try='test -s "conftest$ac_exeext"'
8591  { (eval echo "$as_me:8591: \"$ac_try\"") >&5
8592  (eval $ac_try) 2>&5
8593  ac_status=$?
8594  echo "$as_me:8594: \$? = $ac_status" >&5
8595  (exit "$ac_status"); }; }; then
8596  ac_cv_lib_pcre2_posix_regcomp=yes
8597else
8598  echo "$as_me: failed program was:" >&5
8599cat "conftest.$ac_ext" >&5
8600ac_cv_lib_pcre2_posix_regcomp=no
8601fi
8602rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8603LIBS=$ac_check_lib_save_LIBS
8604fi
8605echo "$as_me:8605: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
8606echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
8607if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
8608
8609cf_add_libs="$LIBS"
8610# reverse order
8611cf_add_0lib=
8612for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8613# filter duplicates
8614for cf_add_1lib in $cf_add_0lib; do
8615	for cf_add_2lib in $cf_add_libs; do
8616		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8617			cf_add_1lib=
8618			break
8619		fi
8620	done
8621	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8622done
8623LIBS="$cf_add_libs"
8624
8625else
8626  echo "$as_me:8626: checking for regcomp in -lpcreposix" >&5
8627echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
8628if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
8629  echo $ECHO_N "(cached) $ECHO_C" >&6
8630else
8631  ac_check_lib_save_LIBS=$LIBS
8632LIBS="-lpcreposix  $LIBS"
8633cat >"conftest.$ac_ext" <<_ACEOF
8634#line 8634 "configure"
8635#include "confdefs.h"
8636
8637/* Override any gcc2 internal prototype to avoid an error.  */
8638#ifdef __cplusplus
8639extern "C"
8640#endif
8641/* We use char because int might match the return type of a gcc2
8642   builtin and then its argument prototype would still apply.  */
8643char regcomp (void);
8644int
8645main (void)
8646{
8647regcomp ();
8648  ;
8649  return 0;
8650}
8651_ACEOF
8652rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8653if { (eval echo "$as_me:8653: \"$ac_link\"") >&5
8654  (eval $ac_link) 2>&5
8655  ac_status=$?
8656  echo "$as_me:8656: \$? = $ac_status" >&5
8657  (exit "$ac_status"); } &&
8658         { ac_try='test -s "conftest$ac_exeext"'
8659  { (eval echo "$as_me:8659: \"$ac_try\"") >&5
8660  (eval $ac_try) 2>&5
8661  ac_status=$?
8662  echo "$as_me:8662: \$? = $ac_status" >&5
8663  (exit "$ac_status"); }; }; then
8664  ac_cv_lib_pcreposix_regcomp=yes
8665else
8666  echo "$as_me: failed program was:" >&5
8667cat "conftest.$ac_ext" >&5
8668ac_cv_lib_pcreposix_regcomp=no
8669fi
8670rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8671LIBS=$ac_check_lib_save_LIBS
8672fi
8673echo "$as_me:8673: result: $ac_cv_lib_pcreposix_regcomp" >&5
8674echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
8675if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
8676
8677cf_add_libs="$LIBS"
8678# reverse order
8679cf_add_0lib=
8680for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8681# filter duplicates
8682for cf_add_1lib in $cf_add_0lib; do
8683	for cf_add_2lib in $cf_add_libs; do
8684		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8685			cf_add_1lib=
8686			break
8687		fi
8688	done
8689	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8690done
8691LIBS="$cf_add_libs"
8692
8693else
8694  { { echo "$as_me:8694: error: Cannot find PCRE2 POSIX library" >&5
8695echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
8696   { (exit 1); exit 1; }; }
8697fi
8698
8699fi
8700
8701		;;
8702	esac
8703
8704	# either way, check for the library header files
8705
8706for ac_header in pcre2posix.h pcreposix.h
8707do
8708as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8709echo "$as_me:8709: checking for $ac_header" >&5
8710echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8711if eval "test \"\${$as_ac_Header+set}\" = set"; then
8712  echo $ECHO_N "(cached) $ECHO_C" >&6
8713else
8714  cat >"conftest.$ac_ext" <<_ACEOF
8715#line 8715 "configure"
8716#include "confdefs.h"
8717#include <$ac_header>
8718_ACEOF
8719if { (eval echo "$as_me:8719: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8720  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8721  ac_status=$?
8722  $EGREP -v '^ *\+' conftest.er1 >conftest.err
8723  rm -f conftest.er1
8724  cat conftest.err >&5
8725  echo "$as_me:8725: \$? = $ac_status" >&5
8726  (exit "$ac_status"); } >/dev/null; then
8727  if test -s conftest.err; then
8728    ac_cpp_err=$ac_c_preproc_warn_flag
8729  else
8730    ac_cpp_err=
8731  fi
8732else
8733  ac_cpp_err=yes
8734fi
8735if test -z "$ac_cpp_err"; then
8736  eval "$as_ac_Header=yes"
8737else
8738  echo "$as_me: failed program was:" >&5
8739  cat "conftest.$ac_ext" >&5
8740  eval "$as_ac_Header=no"
8741fi
8742rm -f conftest.err "conftest.$ac_ext"
8743fi
8744echo "$as_me:8744: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8745echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8746if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8747  cat >>confdefs.h <<EOF
8748#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8749EOF
8750
8751fi
8752done
8753
8754for ac_func in PCRE2regcomp
8755do
8756as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8757echo "$as_me:8757: checking for $ac_func" >&5
8758echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8759if eval "test \"\${$as_ac_var+set}\" = set"; then
8760  echo $ECHO_N "(cached) $ECHO_C" >&6
8761else
8762  cat >"conftest.$ac_ext" <<_ACEOF
8763#line 8763 "configure"
8764#include "confdefs.h"
8765#define $ac_func autoconf_temporary
8766#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
8767#undef $ac_func
8768
8769#ifdef __cplusplus
8770extern "C"
8771#endif
8772
8773/* We use char because int might match the return type of a gcc2
8774   builtin and then its argument prototype would still apply.  */
8775char $ac_func (void);
8776
8777int
8778main (void)
8779{
8780
8781/* The GNU C library defines stubs for functions which it implements
8782    to always fail with ENOSYS.  Some functions are actually named
8783    something starting with __ and the normal name is an alias.  */
8784#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8785#error found stub for $ac_func
8786#endif
8787
8788	return $ac_func ();
8789  ;
8790  return 0;
8791}
8792_ACEOF
8793rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8794if { (eval echo "$as_me:8794: \"$ac_link\"") >&5
8795  (eval $ac_link) 2>&5
8796  ac_status=$?
8797  echo "$as_me:8797: \$? = $ac_status" >&5
8798  (exit "$ac_status"); } &&
8799         { ac_try='test -s "conftest$ac_exeext"'
8800  { (eval echo "$as_me:8800: \"$ac_try\"") >&5
8801  (eval $ac_try) 2>&5
8802  ac_status=$?
8803  echo "$as_me:8803: \$? = $ac_status" >&5
8804  (exit "$ac_status"); }; }; then
8805  eval "$as_ac_var=yes"
8806else
8807  echo "$as_me: failed program was:" >&5
8808cat "conftest.$ac_ext" >&5
8809eval "$as_ac_var=no"
8810fi
8811rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8812fi
8813echo "$as_me:8813: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8814echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8815if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8816  cat >>confdefs.h <<EOF
8817#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8818EOF
8819
8820fi
8821done
8822
8823fi
8824
8825# not everyone has "test -c"
8826if test -c /dev/sysmouse 2>/dev/null ; then
8827echo "$as_me:8827: checking if you want to use sysmouse" >&5
8828echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8829
8830# Check whether --with-sysmouse or --without-sysmouse was given.
8831if test "${with_sysmouse+set}" = set; then
8832  withval="$with_sysmouse"
8833  cf_with_sysmouse=$withval
8834else
8835  cf_with_sysmouse=maybe
8836fi;
8837	if test "$cf_with_sysmouse" != no ; then
8838	cat >"conftest.$ac_ext" <<_ACEOF
8839#line 8839 "configure"
8840#include "confdefs.h"
8841
8842#include <osreldate.h>
8843#if (__FreeBSD_version >= 400017)
8844#include <sys/consio.h>
8845#include <sys/fbio.h>
8846#else
8847#include <machine/console.h>
8848#endif
8849
8850int
8851main (void)
8852{
8853
8854	struct mouse_info the_mouse;
8855	ioctl(0, CONS_MOUSECTL, &the_mouse);
8856
8857  ;
8858  return 0;
8859}
8860_ACEOF
8861rm -f "conftest.$ac_objext"
8862if { (eval echo "$as_me:8862: \"$ac_compile\"") >&5
8863  (eval $ac_compile) 2>&5
8864  ac_status=$?
8865  echo "$as_me:8865: \$? = $ac_status" >&5
8866  (exit "$ac_status"); } &&
8867         { ac_try='test -s "conftest.$ac_objext"'
8868  { (eval echo "$as_me:8868: \"$ac_try\"") >&5
8869  (eval $ac_try) 2>&5
8870  ac_status=$?
8871  echo "$as_me:8871: \$? = $ac_status" >&5
8872  (exit "$ac_status"); }; }; then
8873  cf_with_sysmouse=yes
8874else
8875  echo "$as_me: failed program was:" >&5
8876cat "conftest.$ac_ext" >&5
8877cf_with_sysmouse=no
8878fi
8879rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8880	fi
8881echo "$as_me:8881: result: $cf_with_sysmouse" >&5
8882echo "${ECHO_T}$cf_with_sysmouse" >&6
8883test "$cf_with_sysmouse" = yes &&
8884cat >>confdefs.h <<\EOF
8885#define USE_SYSMOUSE 1
8886EOF
8887
8888fi
8889
8890# pretend that ncurses==ncursesw==ncursest
8891echo "$as_me:8891: checking if you want to disable library suffixes" >&5
8892echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8893
8894# Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8895if test "${enable_lib_suffixes+set}" = set; then
8896  enableval="$enable_lib_suffixes"
8897  test "$enableval" != no && enableval=yes
8898	if test "$enableval" != "yes" ; then
8899    disable_lib_suffixes=yes
8900	else
8901		disable_lib_suffixes=no
8902	fi
8903else
8904  enableval=yes
8905	disable_lib_suffixes=no
8906
8907fi;
8908echo "$as_me:8908: result: $disable_lib_suffixes" >&5
8909echo "${ECHO_T}$disable_lib_suffixes" >&6
8910
8911### If we're building with rpath, try to link non-standard libs that way too.
8912if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8913
8914echo "$as_me:8914: checking if rpath-hack should be disabled" >&5
8915echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8916
8917# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8918if test "${enable_rpath_hack+set}" = set; then
8919  enableval="$enable_rpath_hack"
8920  test "$enableval" != no && enableval=yes
8921	if test "$enableval" != "yes" ; then
8922    enable_rpath_hack=no
8923	else
8924		enable_rpath_hack=yes
8925	fi
8926else
8927  enableval=yes
8928	enable_rpath_hack=yes
8929
8930fi;
8931if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8932echo "$as_me:8932: result: $cf_disable_rpath_hack" >&5
8933echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8934
8935if test "$enable_rpath_hack" = yes ; then
8936
8937echo "$as_me:8937: checking for updated LDFLAGS" >&5
8938echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8939if test -n "$LD_RPATH_OPT" ; then
8940	echo "$as_me:8940: result: maybe" >&5
8941echo "${ECHO_T}maybe" >&6
8942
8943	for ac_prog in ldd
8944do
8945  # Extract the first word of "$ac_prog", so it can be a program name with args.
8946set dummy $ac_prog; ac_word=$2
8947echo "$as_me:8947: checking for $ac_word" >&5
8948echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8949if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8950  echo $ECHO_N "(cached) $ECHO_C" >&6
8951else
8952  if test -n "$cf_ldd_prog"; then
8953  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8954else
8955  ac_save_IFS=$IFS; IFS=$ac_path_separator
8956ac_dummy="$PATH"
8957for ac_dir in $ac_dummy; do
8958  IFS=$ac_save_IFS
8959  test -z "$ac_dir" && ac_dir=.
8960  $as_executable_p "$ac_dir/$ac_word" || continue
8961ac_cv_prog_cf_ldd_prog="$ac_prog"
8962echo "$as_me:8962: found $ac_dir/$ac_word" >&5
8963break
8964done
8965
8966fi
8967fi
8968cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8969if test -n "$cf_ldd_prog"; then
8970  echo "$as_me:8970: result: $cf_ldd_prog" >&5
8971echo "${ECHO_T}$cf_ldd_prog" >&6
8972else
8973  echo "$as_me:8973: result: no" >&5
8974echo "${ECHO_T}no" >&6
8975fi
8976
8977  test -n "$cf_ldd_prog" && break
8978done
8979test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8980
8981	cf_rpath_list="/usr/lib /lib"
8982	if test "$cf_ldd_prog" != no
8983	then
8984		cf_rpath_oops=
8985
8986cat >"conftest.$ac_ext" <<_ACEOF
8987#line 8987 "configure"
8988#include "confdefs.h"
8989#include <stdio.h>
8990int
8991main (void)
8992{
8993printf("Hello");
8994  ;
8995  return 0;
8996}
8997_ACEOF
8998rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8999if { (eval echo "$as_me:8999: \"$ac_link\"") >&5
9000  (eval $ac_link) 2>&5
9001  ac_status=$?
9002  echo "$as_me:9002: \$? = $ac_status" >&5
9003  (exit "$ac_status"); } &&
9004         { ac_try='test -s "conftest$ac_exeext"'
9005  { (eval echo "$as_me:9005: \"$ac_try\"") >&5
9006  (eval $ac_try) 2>&5
9007  ac_status=$?
9008  echo "$as_me:9008: \$? = $ac_status" >&5
9009  (exit "$ac_status"); }; }; then
9010  cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
9011		 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
9012else
9013  echo "$as_me: failed program was:" >&5
9014cat "conftest.$ac_ext" >&5
9015fi
9016rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9017
9018		# If we passed the link-test, but get a "not found" on a given library,
9019		# this could be due to inept reconfiguration of gcc to make it only
9020		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
9021		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
9022		# /usr/local libraries.
9023		if test -n "$cf_rpath_oops"
9024		then
9025			for cf_rpath_src in $cf_rpath_oops
9026			do
9027				for cf_rpath_dir in \
9028					/usr/local \
9029					/usr/pkg \
9030					/opt/sfw
9031				do
9032					if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
9033					then
9034						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
9035
9036echo "${as_me:-configure}:9036: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
9037
9038						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
9039						break
9040					fi
9041				done
9042			done
9043		fi
9044	fi
9045
9046	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
9047
9048echo "${as_me:-configure}:9048: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
9049
9050test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
9051
9052echo "${as_me:-configure}:9052: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
9053
9054cf_rpath_dst=
9055for cf_rpath_src in $LDFLAGS
9056do
9057	case "$cf_rpath_src" in
9058	(-L*)
9059
9060		# check if this refers to a directory which we will ignore
9061		cf_rpath_skip=no
9062		if test -n "$cf_rpath_list"
9063		then
9064			for cf_rpath_item in $cf_rpath_list
9065			do
9066				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
9067				then
9068					cf_rpath_skip=yes
9069					break
9070				fi
9071			done
9072		fi
9073
9074		if test "$cf_rpath_skip" = no
9075		then
9076			# transform the option
9077			if test "$LD_RPATH_OPT" = "-R " ; then
9078				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
9079			else
9080				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
9081			fi
9082
9083			# if we have not already added this, add it now
9084			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
9085			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
9086			then
9087				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
9088
9089echo "${as_me:-configure}:9089: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
9090
9091				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
9092			fi
9093		fi
9094		;;
9095	esac
9096	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
9097done
9098LDFLAGS=$cf_rpath_dst
9099
9100test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
9101
9102echo "${as_me:-configure}:9102: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
9103
9104test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
9105
9106echo "${as_me:-configure}:9106: testing ...checking LIBS $LIBS ..." 1>&5
9107
9108cf_rpath_dst=
9109for cf_rpath_src in $LIBS
9110do
9111	case "$cf_rpath_src" in
9112	(-L*)
9113
9114		# check if this refers to a directory which we will ignore
9115		cf_rpath_skip=no
9116		if test -n "$cf_rpath_list"
9117		then
9118			for cf_rpath_item in $cf_rpath_list
9119			do
9120				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
9121				then
9122					cf_rpath_skip=yes
9123					break
9124				fi
9125			done
9126		fi
9127
9128		if test "$cf_rpath_skip" = no
9129		then
9130			# transform the option
9131			if test "$LD_RPATH_OPT" = "-R " ; then
9132				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
9133			else
9134				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
9135			fi
9136
9137			# if we have not already added this, add it now
9138			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
9139			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
9140			then
9141				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
9142
9143echo "${as_me:-configure}:9143: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
9144
9145				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
9146			fi
9147		fi
9148		;;
9149	esac
9150	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
9151done
9152LIBS=$cf_rpath_dst
9153
9154test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
9155
9156echo "${as_me:-configure}:9156: testing ...checked LIBS $LIBS ..." 1>&5
9157
9158	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
9159
9160echo "${as_me:-configure}:9160: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
9161
9162else
9163	echo "$as_me:9163: result: no" >&5
9164echo "${ECHO_T}no" >&6
9165fi
9166
9167fi
9168
9169fi
9170
9171### Depending on the system, someone may use rpath to build ncurses but not
9172# want users of the package to rely upon that feature.  Give those people an
9173# option to suppress that detail from EXTRA_LDFLAGS.
9174EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
9175if test -n "$EXTRA_PKG_LDFLAGS"
9176then
9177	echo "$as_me:9177: checking if you want to disable extra LDFLAGS for package-scripts" >&5
9178echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
9179
9180# Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
9181if test "${enable_pkg_ldflags+set}" = set; then
9182  enableval="$enable_pkg_ldflags"
9183  test "$enableval" != no && enableval=yes
9184	if test "$enableval" != "yes" ; then
9185    disable_pkg_ldflags=yes
9186	else
9187		disable_pkg_ldflags=no
9188	fi
9189else
9190  enableval=yes
9191	disable_pkg_ldflags=no
9192
9193fi;
9194	echo "$as_me:9194: result: $disable_pkg_ldflags" >&5
9195echo "${ECHO_T}$disable_pkg_ldflags" >&6
9196	test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
9197fi
9198
9199###############################################################################
9200
9201###	use option --with-extra-suffix to append suffix to headers and libraries
9202echo "$as_me:9202: checking for extra suffix to append to header/library paths" >&5
9203echo $ECHO_N "checking for extra suffix to append to header/library paths... $ECHO_C" >&6
9204EXTRA_SUFFIX=
9205
9206# Check whether --with-extra-suffix or --without-extra-suffix was given.
9207if test "${with_extra_suffix+set}" = set; then
9208  withval="$with_extra_suffix"
9209  case x$withval in
9210	(xno)
9211		;;
9212	(xyes|x)
9213		EXTRA_SUFFIX=$cf_cv_abi_version
9214		;;
9215	(*)
9216		EXTRA_SUFFIX=$withval
9217		;;
9218	esac
9219
9220fi;
9221echo "$as_me:9221: result: ${EXTRA_SUFFIX:-(none)}" >&5
9222echo "${ECHO_T}${EXTRA_SUFFIX:-(none)}" >&6
9223
9224###	use option --disable-overwrite to leave out the link to -lcurses
9225echo "$as_me:9225: checking if you wish to install ncurses overwriting curses" >&5
9226echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
9227
9228# Check whether --enable-overwrite or --disable-overwrite was given.
9229if test "${enable_overwrite+set}" = set; then
9230  enableval="$enable_overwrite"
9231  with_overwrite=$enableval
9232else
9233  if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
9234fi;
9235echo "$as_me:9235: result: $with_overwrite" >&5
9236echo "${ECHO_T}$with_overwrite" >&6
9237
9238echo "$as_me:9238: checking if external terminfo-database is used" >&5
9239echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
9240
9241# Check whether --enable-database or --disable-database was given.
9242if test "${enable_database+set}" = set; then
9243  enableval="$enable_database"
9244  use_database=$enableval
9245else
9246  use_database=yes
9247fi;
9248echo "$as_me:9248: result: $use_database" >&5
9249echo "${ECHO_T}$use_database" >&6
9250
9251case "$host_os" in
9252(os2*)
9253	TERMINFO_SRC='${top_srcdir}/misc/emx.src'
9254	;;
9255(*)
9256	TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
9257	;;
9258esac
9259
9260NCURSES_USE_DATABASE=0
9261if test "$use_database" != no ; then
9262	NCURSES_USE_DATABASE=1
9263
9264	echo "$as_me:9264: checking which terminfo source-file will be installed" >&5
9265echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
9266
9267# Check whether --with-database or --without-database was given.
9268if test "${with_database+set}" = set; then
9269  withval="$with_database"
9270  TERMINFO_SRC=$withval
9271fi;
9272	echo "$as_me:9272: result: $TERMINFO_SRC" >&5
9273echo "${ECHO_T}$TERMINFO_SRC" >&6
9274
9275	echo "$as_me:9275: checking whether to use hashed database instead of directory/tree" >&5
9276echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
9277
9278# Check whether --with-hashed-db or --without-hashed-db was given.
9279if test "${with_hashed_db+set}" = set; then
9280  withval="$with_hashed_db"
9281
9282else
9283  with_hashed_db=no
9284fi;
9285	echo "$as_me:9285: result: $with_hashed_db" >&5
9286echo "${ECHO_T}$with_hashed_db" >&6
9287else
9288	with_hashed_db=no
9289fi
9290
9291echo "$as_me:9291: checking for list of fallback terminal descriptions" >&5
9292echo $ECHO_N "checking for list of fallback terminal descriptions... $ECHO_C" >&6
9293
9294# Check whether --with-fallbacks or --without-fallbacks was given.
9295if test "${with_fallbacks+set}" = set; then
9296  withval="$with_fallbacks"
9297  with_fallback=$withval
9298else
9299  with_fallback=
9300fi;
9301echo "$as_me:9301: result: ${with_fallback:-(none)}" >&5
9302echo "${ECHO_T}${with_fallback:-(none)}" >&6
9303
9304case ".$with_fallback" in
9305(.|.no)
9306	FALLBACK_LIST=
9307	;;
9308(.yes)
9309	{ echo "$as_me:9309: WARNING: expected a list of terminal descriptions" >&5
9310echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
9311	;;
9312(*)
9313	FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
9314	;;
9315esac
9316
9317# The fallback feature in ncurses relies upon tic/infocmp outside the build
9318# tree for generating the terminal descriptions that will be compiled into the
9319# library.  If your toolchain is old, it may not handle current terminal
9320# databases.  Use configure-options to point to the tools which will be used,
9321# rather than the first ones found on the $PATH.
9322if test -n "$ac_tool_prefix"; then
9323  # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
9324set dummy ${ac_tool_prefix}tic; ac_word=$2
9325echo "$as_me:9325: checking for $ac_word" >&5
9326echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9327if test "${ac_cv_prog_TIC+set}" = set; then
9328  echo $ECHO_N "(cached) $ECHO_C" >&6
9329else
9330  if test -n "$TIC"; then
9331  ac_cv_prog_TIC="$TIC" # Let the user override the test.
9332else
9333  ac_save_IFS=$IFS; IFS=$ac_path_separator
9334ac_dummy="$PATH"
9335for ac_dir in $ac_dummy; do
9336  IFS=$ac_save_IFS
9337  test -z "$ac_dir" && ac_dir=.
9338  $as_executable_p "$ac_dir/$ac_word" || continue
9339ac_cv_prog_TIC="${ac_tool_prefix}tic"
9340echo "$as_me:9340: found $ac_dir/$ac_word" >&5
9341break
9342done
9343
9344fi
9345fi
9346TIC=$ac_cv_prog_TIC
9347if test -n "$TIC"; then
9348  echo "$as_me:9348: result: $TIC" >&5
9349echo "${ECHO_T}$TIC" >&6
9350else
9351  echo "$as_me:9351: result: no" >&5
9352echo "${ECHO_T}no" >&6
9353fi
9354
9355fi
9356if test -z "$ac_cv_prog_TIC"; then
9357  ac_ct_TIC=$TIC
9358  # Extract the first word of "tic", so it can be a program name with args.
9359set dummy tic; ac_word=$2
9360echo "$as_me:9360: checking for $ac_word" >&5
9361echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9362if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
9363  echo $ECHO_N "(cached) $ECHO_C" >&6
9364else
9365  if test -n "$ac_ct_TIC"; then
9366  ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
9367else
9368  ac_save_IFS=$IFS; IFS=$ac_path_separator
9369ac_dummy="$PATH"
9370for ac_dir in $ac_dummy; do
9371  IFS=$ac_save_IFS
9372  test -z "$ac_dir" && ac_dir=.
9373  $as_executable_p "$ac_dir/$ac_word" || continue
9374ac_cv_prog_ac_ct_TIC="tic"
9375echo "$as_me:9375: found $ac_dir/$ac_word" >&5
9376break
9377done
9378
9379fi
9380fi
9381ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
9382if test -n "$ac_ct_TIC"; then
9383  echo "$as_me:9383: result: $ac_ct_TIC" >&5
9384echo "${ECHO_T}$ac_ct_TIC" >&6
9385else
9386  echo "$as_me:9386: result: no" >&5
9387echo "${ECHO_T}no" >&6
9388fi
9389
9390  TIC=$ac_ct_TIC
9391else
9392  TIC="$ac_cv_prog_TIC"
9393fi
9394
9395if test -n "$ac_tool_prefix"; then
9396  # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
9397set dummy ${ac_tool_prefix}infocmp; ac_word=$2
9398echo "$as_me:9398: checking for $ac_word" >&5
9399echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9400if test "${ac_cv_prog_INFOCMP+set}" = set; then
9401  echo $ECHO_N "(cached) $ECHO_C" >&6
9402else
9403  if test -n "$INFOCMP"; then
9404  ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
9405else
9406  ac_save_IFS=$IFS; IFS=$ac_path_separator
9407ac_dummy="$PATH"
9408for ac_dir in $ac_dummy; do
9409  IFS=$ac_save_IFS
9410  test -z "$ac_dir" && ac_dir=.
9411  $as_executable_p "$ac_dir/$ac_word" || continue
9412ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
9413echo "$as_me:9413: found $ac_dir/$ac_word" >&5
9414break
9415done
9416
9417fi
9418fi
9419INFOCMP=$ac_cv_prog_INFOCMP
9420if test -n "$INFOCMP"; then
9421  echo "$as_me:9421: result: $INFOCMP" >&5
9422echo "${ECHO_T}$INFOCMP" >&6
9423else
9424  echo "$as_me:9424: result: no" >&5
9425echo "${ECHO_T}no" >&6
9426fi
9427
9428fi
9429if test -z "$ac_cv_prog_INFOCMP"; then
9430  ac_ct_INFOCMP=$INFOCMP
9431  # Extract the first word of "infocmp", so it can be a program name with args.
9432set dummy infocmp; ac_word=$2
9433echo "$as_me:9433: checking for $ac_word" >&5
9434echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9435if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
9436  echo $ECHO_N "(cached) $ECHO_C" >&6
9437else
9438  if test -n "$ac_ct_INFOCMP"; then
9439  ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
9440else
9441  ac_save_IFS=$IFS; IFS=$ac_path_separator
9442ac_dummy="$PATH"
9443for ac_dir in $ac_dummy; do
9444  IFS=$ac_save_IFS
9445  test -z "$ac_dir" && ac_dir=.
9446  $as_executable_p "$ac_dir/$ac_word" || continue
9447ac_cv_prog_ac_ct_INFOCMP="infocmp"
9448echo "$as_me:9448: found $ac_dir/$ac_word" >&5
9449break
9450done
9451
9452fi
9453fi
9454ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
9455if test -n "$ac_ct_INFOCMP"; then
9456  echo "$as_me:9456: result: $ac_ct_INFOCMP" >&5
9457echo "${ECHO_T}$ac_ct_INFOCMP" >&6
9458else
9459  echo "$as_me:9459: result: no" >&5
9460echo "${ECHO_T}no" >&6
9461fi
9462
9463  INFOCMP=$ac_ct_INFOCMP
9464else
9465  INFOCMP="$ac_cv_prog_INFOCMP"
9466fi
9467
9468if test -n "$FALLBACK_LIST"
9469then
9470
9471# Check whether --with-tic-path or --without-tic-path was given.
9472if test "${with_tic_path+set}" = set; then
9473  withval="$with_tic_path"
9474  echo "$as_me:9474: checking for tic program for fallbacks" >&5
9475echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
9476		TIC=$withval
9477		echo "$as_me:9477: result: $TIC" >&5
9478echo "${ECHO_T}$TIC" >&6
9479
9480if test "x$prefix" != xNONE; then
9481	cf_path_syntax="$prefix"
9482else
9483	cf_path_syntax="$ac_default_prefix"
9484fi
9485
9486case "x$TIC" in
9487(x\$\(*\)*|x\'*\'*)
9488	;;
9489(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
9490	;;
9491(x\$\{*prefix\}*|x\$\{*dir\}*)
9492	eval TIC="$TIC"
9493	case "x$TIC" in
9494	(xNONE/*)
9495		TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9496		;;
9497	esac
9498	;;
9499(xno|xNONE/*)
9500	TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9501	;;
9502(*)
9503	{ { echo "$as_me:9503: error: expected a pathname, not \"$TIC\"" >&5
9504echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
9505   { (exit 1); exit 1; }; }
9506	;;
9507esac
9508
9509else
9510
9511test -z "$TIC" && TIC="tic"
9512for ac_prog in $TIC tic
9513do
9514  # Extract the first word of "$ac_prog", so it can be a program name with args.
9515set dummy $ac_prog; ac_word=$2
9516echo "$as_me:9516: checking for $ac_word" >&5
9517echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9518if test "${ac_cv_path_TIC+set}" = set; then
9519  echo $ECHO_N "(cached) $ECHO_C" >&6
9520else
9521  case $TIC in
9522  [\\/]* | ?:[\\/]*)
9523  ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
9524  ;;
9525  *)
9526  ac_save_IFS=$IFS; IFS=$ac_path_separator
9527ac_dummy="$PATH:/usr/local/ncurses/bin"
9528for ac_dir in $ac_dummy; do
9529  IFS=$ac_save_IFS
9530  test -z "$ac_dir" && ac_dir=.
9531  if $as_executable_p "$ac_dir/$ac_word"; then
9532   ac_cv_path_TIC="$ac_dir/$ac_word"
9533   echo "$as_me:9533: found $ac_dir/$ac_word" >&5
9534   break
9535fi
9536done
9537
9538  ;;
9539esac
9540fi
9541TIC=$ac_cv_path_TIC
9542
9543if test -n "$TIC"; then
9544  echo "$as_me:9544: result: $TIC" >&5
9545echo "${ECHO_T}$TIC" >&6
9546else
9547  echo "$as_me:9547: result: no" >&5
9548echo "${ECHO_T}no" >&6
9549fi
9550
9551  test -n "$TIC" && break
9552done
9553test -n "$TIC" || TIC="$TIC"
9554
9555cf_path_prog=""
9556cf_path_args=""
9557IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9558for cf_temp in $ac_cv_path_TIC
9559do
9560	if test -z "$cf_path_prog" ; then
9561		if test "$with_full_paths" = yes ; then
9562
9563if test "x$prefix" != xNONE; then
9564	cf_path_syntax="$prefix"
9565else
9566	cf_path_syntax="$ac_default_prefix"
9567fi
9568
9569case "x$cf_temp" in
9570(x\$\(*\)*|x\'*\'*)
9571	;;
9572(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
9573	;;
9574(x\$\{*prefix\}*|x\$\{*dir\}*)
9575	eval cf_temp="$cf_temp"
9576	case "x$cf_temp" in
9577	(xNONE/*)
9578		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9579		;;
9580	esac
9581	;;
9582(xno|xNONE/*)
9583	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9584	;;
9585(*)
9586	break
9587	;;
9588esac
9589
9590			cf_path_prog="$cf_temp"
9591		else
9592			cf_path_prog="`basename "$cf_temp"`"
9593		fi
9594	elif test -z "$cf_path_args" ; then
9595		cf_path_args="$cf_temp"
9596	else
9597		cf_path_args="$cf_path_args $cf_temp"
9598	fi
9599done
9600IFS="$cf_save_ifs"
9601
9602if test -n "$cf_path_prog" ; then
9603
9604echo "${as_me:-configure}:9604: testing defining path for ${cf_path_prog} ..." 1>&5
9605
9606cat >>confdefs.h <<EOF
9607#define TIC_PATH "$cf_path_prog"
9608EOF
9609
9610	test -n "$cf_path_args" &&
9611cat >>confdefs.h <<EOF
9612#define TIC_ARGS "$cf_path_args"
9613EOF
9614
9615fi
9616
9617		if test -z "$TIC"
9618		then
9619			{ echo "$as_me:9619: WARNING: no tic program found for fallbacks" >&5
9620echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
9621		fi
9622
9623fi;
9624
9625# Check whether --with-infocmp-path or --without-infocmp-path was given.
9626if test "${with_infocmp_path+set}" = set; then
9627  withval="$with_infocmp_path"
9628  echo "$as_me:9628: checking for infocmp program for fallbacks" >&5
9629echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
9630		INFOCMP=$withval
9631		echo "$as_me:9631: result: $INFOCMP" >&5
9632echo "${ECHO_T}$INFOCMP" >&6
9633
9634if test "x$prefix" != xNONE; then
9635	cf_path_syntax="$prefix"
9636else
9637	cf_path_syntax="$ac_default_prefix"
9638fi
9639
9640case "x$INFOCMP" in
9641(x\$\(*\)*|x\'*\'*)
9642	;;
9643(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
9644	;;
9645(x\$\{*prefix\}*|x\$\{*dir\}*)
9646	eval INFOCMP="$INFOCMP"
9647	case "x$INFOCMP" in
9648	(xNONE/*)
9649		INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9650		;;
9651	esac
9652	;;
9653(xno|xNONE/*)
9654	INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9655	;;
9656(*)
9657	{ { echo "$as_me:9657: error: expected a pathname, not \"$INFOCMP\"" >&5
9658echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
9659   { (exit 1); exit 1; }; }
9660	;;
9661esac
9662
9663else
9664
9665test -z "$INFOCMP" && INFOCMP="infocmp"
9666for ac_prog in $INFOCMP infocmp
9667do
9668  # Extract the first word of "$ac_prog", so it can be a program name with args.
9669set dummy $ac_prog; ac_word=$2
9670echo "$as_me:9670: checking for $ac_word" >&5
9671echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9672if test "${ac_cv_path_INFOCMP+set}" = set; then
9673  echo $ECHO_N "(cached) $ECHO_C" >&6
9674else
9675  case $INFOCMP in
9676  [\\/]* | ?:[\\/]*)
9677  ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
9678  ;;
9679  *)
9680  ac_save_IFS=$IFS; IFS=$ac_path_separator
9681ac_dummy="$PATH:/usr/local/ncurses/bin"
9682for ac_dir in $ac_dummy; do
9683  IFS=$ac_save_IFS
9684  test -z "$ac_dir" && ac_dir=.
9685  if $as_executable_p "$ac_dir/$ac_word"; then
9686   ac_cv_path_INFOCMP="$ac_dir/$ac_word"
9687   echo "$as_me:9687: found $ac_dir/$ac_word" >&5
9688   break
9689fi
9690done
9691
9692  ;;
9693esac
9694fi
9695INFOCMP=$ac_cv_path_INFOCMP
9696
9697if test -n "$INFOCMP"; then
9698  echo "$as_me:9698: result: $INFOCMP" >&5
9699echo "${ECHO_T}$INFOCMP" >&6
9700else
9701  echo "$as_me:9701: result: no" >&5
9702echo "${ECHO_T}no" >&6
9703fi
9704
9705  test -n "$INFOCMP" && break
9706done
9707test -n "$INFOCMP" || INFOCMP="$INFOCMP"
9708
9709cf_path_prog=""
9710cf_path_args=""
9711IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9712for cf_temp in $ac_cv_path_INFOCMP
9713do
9714	if test -z "$cf_path_prog" ; then
9715		if test "$with_full_paths" = yes ; then
9716
9717if test "x$prefix" != xNONE; then
9718	cf_path_syntax="$prefix"
9719else
9720	cf_path_syntax="$ac_default_prefix"
9721fi
9722
9723case "x$cf_temp" in
9724(x\$\(*\)*|x\'*\'*)
9725	;;
9726(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
9727	;;
9728(x\$\{*prefix\}*|x\$\{*dir\}*)
9729	eval cf_temp="$cf_temp"
9730	case "x$cf_temp" in
9731	(xNONE/*)
9732		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9733		;;
9734	esac
9735	;;
9736(xno|xNONE/*)
9737	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9738	;;
9739(*)
9740	break
9741	;;
9742esac
9743
9744			cf_path_prog="$cf_temp"
9745		else
9746			cf_path_prog="`basename "$cf_temp"`"
9747		fi
9748	elif test -z "$cf_path_args" ; then
9749		cf_path_args="$cf_temp"
9750	else
9751		cf_path_args="$cf_path_args $cf_temp"
9752	fi
9753done
9754IFS="$cf_save_ifs"
9755
9756if test -n "$cf_path_prog" ; then
9757
9758echo "${as_me:-configure}:9758: testing defining path for ${cf_path_prog} ..." 1>&5
9759
9760cat >>confdefs.h <<EOF
9761#define INFOCMP_PATH "$cf_path_prog"
9762EOF
9763
9764	test -n "$cf_path_args" &&
9765cat >>confdefs.h <<EOF
9766#define INFOCMP_ARGS "$cf_path_args"
9767EOF
9768
9769fi
9770
9771		if test -z "$INFOCMP"
9772		then
9773			{ echo "$as_me:9773: WARNING: no infocmp program found for fallbacks" >&5
9774echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
9775		fi
9776
9777fi;
9778
9779	test -z "$TIC" && FALLBACK_LIST=
9780	test -z "$INFOCMP" && FALLBACK_LIST=
9781	if test -z "$FALLBACK_LIST"
9782	then
9783		{ echo "$as_me:9783: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
9784echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
9785	fi
9786fi
9787
9788USE_FALLBACKS=
9789test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
9790
9791echo "$as_me:9791: checking if you want modern xterm or antique" >&5
9792echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
9793
9794# Check whether --with-xterm-new or --without-xterm-new was given.
9795if test "${with_xterm_new+set}" = set; then
9796  withval="$with_xterm_new"
9797  with_xterm_new=$withval
9798else
9799  with_xterm_new=yes
9800fi;
9801case "$with_xterm_new" in
9802(no) with_xterm_new=xterm-old;;
9803(*)	 with_xterm_new=xterm-new;;
9804esac
9805echo "$as_me:9805: result: $with_xterm_new" >&5
9806echo "${ECHO_T}$with_xterm_new" >&6
9807WHICH_XTERM=$with_xterm_new
9808
9809case $host_os in
9810(linux*gnu*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc|linux*musl|openbsd*|darwin*)
9811	want_xterm_kbs=DEL
9812	;;
9813(*)
9814	want_xterm_kbs=BS
9815	;;
9816esac
9817
9818echo "$as_me:9818: checking if xterm backspace-key sends BS or DEL" >&5
9819echo $ECHO_N "checking if xterm backspace-key sends BS or DEL... $ECHO_C" >&6
9820
9821# Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9822if test "${with_xterm_kbs+set}" = set; then
9823  withval="$with_xterm_kbs"
9824  with_xterm_kbs=$withval
9825else
9826  with_xterm_kbs=auto
9827fi;
9828case x$with_xterm_kbs in
9829(xyes|xno|xBS|xbs|x8)
9830	with_xterm_kbs=BS
9831	;;
9832(xDEL|xdel|x127)
9833	with_xterm_kbs=DEL
9834	;;
9835(xauto)
9836	with_xterm_kbs=$want_xterm_kbs
9837	;;
9838(*)
9839	with_xterm_kbs=$withval
9840	;;
9841esac
9842echo "$as_me:9842: result: $with_xterm_kbs" >&5
9843echo "${ECHO_T}$with_xterm_kbs" >&6
9844XTERM_KBS=$with_xterm_kbs
9845
9846if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9847then
9848	{ echo "$as_me:9848: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&5
9849echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&2;}
9850fi
9851
9852MAKE_TERMINFO=
9853if test "$use_database" = no ; then
9854	TERMINFO="${datadir}/terminfo"
9855	MAKE_TERMINFO="#"
9856else
9857
9858echo "$as_me:9858: checking for list of terminfo directories" >&5
9859echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9860
9861# Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9862if test "${with_terminfo_dirs+set}" = set; then
9863  withval="$with_terminfo_dirs"
9864
9865else
9866  withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9867fi;
9868IFS="${IFS:- 	}"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9869cf_dst_path=
9870for cf_src_path in $withval
9871do
9872
9873if test "x$prefix" != xNONE; then
9874	cf_path_syntax="$prefix"
9875else
9876	cf_path_syntax="$ac_default_prefix"
9877fi
9878
9879case "x$cf_src_path" in
9880(x\$\(*\)*|x\'*\'*)
9881	;;
9882(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
9883	;;
9884(x\$\{*prefix\}*|x\$\{*dir\}*)
9885	eval cf_src_path="$cf_src_path"
9886	case "x$cf_src_path" in
9887	(xNONE/*)
9888		cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9889		;;
9890	esac
9891	;;
9892(xno|xNONE/*)
9893	cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9894	;;
9895(*)
9896	{ { echo "$as_me:9896: error: expected a pathname, not \"$cf_src_path\"" >&5
9897echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9898   { (exit 1); exit 1; }; }
9899	;;
9900esac
9901
9902  test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9903  cf_dst_path="${cf_dst_path}${cf_src_path}"
9904done
9905IFS="$ac_save_ifs"
9906
9907# This may use the prefix/exec_prefix symbols which will only yield "NONE"
9908# so we have to check/work around.  We do prefer the result of "eval"...
9909eval cf_dst_eval="$cf_dst_path"
9910case "x$cf_dst_eval" in
9911(xNONE*)
9912	TERMINFO_DIRS=$cf_dst_path
9913	;;
9914(*)
9915	TERMINFO_DIRS="$cf_dst_eval"
9916	;;
9917esac
9918
9919echo "$as_me:9919: result: $TERMINFO_DIRS" >&5
9920echo "${ECHO_T}$TERMINFO_DIRS" >&6
9921test -n "$TERMINFO_DIRS" &&
9922cat >>confdefs.h <<EOF
9923#define TERMINFO_DIRS "$TERMINFO_DIRS"
9924EOF
9925
9926case "x$TERMINFO" in
9927x???:*)
9928	{ echo "$as_me:9928: WARNING: ignoring non-directory/file TERMINFO value" >&5
9929echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9930	unset TERMINFO
9931	;;
9932esac
9933
9934echo "$as_me:9934: checking for default terminfo directory" >&5
9935echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9936
9937# Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9938if test "${with_default_terminfo_dir+set}" = set; then
9939  withval="$with_default_terminfo_dir"
9940
9941else
9942  withval="${TERMINFO:-${datadir}/terminfo}"
9943fi; if test -n "${datadir}/terminfo" ; then
9944
9945if test "x$prefix" != xNONE; then
9946	cf_path_syntax="$prefix"
9947else
9948	cf_path_syntax="$ac_default_prefix"
9949fi
9950
9951case "x$withval" in
9952(x\$\(*\)*|x\'*\'*)
9953	;;
9954(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
9955	;;
9956(x\$\{*prefix\}*|x\$\{*dir\}*)
9957	eval withval="$withval"
9958	case "x$withval" in
9959	(xNONE/*)
9960		withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9961		;;
9962	esac
9963	;;
9964(xno|xNONE/*)
9965	withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9966	;;
9967(*)
9968	{ { echo "$as_me:9968: error: expected a pathname, not \"$withval\"" >&5
9969echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9970   { (exit 1); exit 1; }; }
9971	;;
9972esac
9973
9974fi
9975eval TERMINFO="$withval"
9976
9977echo "$as_me:9977: result: $TERMINFO" >&5
9978echo "${ECHO_T}$TERMINFO" >&6
9979
9980cat >>confdefs.h <<EOF
9981#define TERMINFO "$TERMINFO"
9982EOF
9983
9984fi
9985
9986###	use option --disable-big-core to make tic run on small machines
9987###	We need 4Mb, check if we can allocate 50% more than that.
9988echo "$as_me:9988: checking if big-core option selected" >&5
9989echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9990
9991# Check whether --enable-big-core or --disable-big-core was given.
9992if test "${enable_big_core+set}" = set; then
9993  enableval="$enable_big_core"
9994  with_big_core=$enableval
9995else
9996  if test "$cross_compiling" = yes; then
9997  with_big_core=no
9998else
9999  cat >"conftest.$ac_ext" <<_ACEOF
10000#line 10000 "configure"
10001#include "confdefs.h"
10002
10003#include <stdlib.h>
10004#include <string.h>
10005int main(void) {
10006	unsigned long n = 6000000L;
10007	char *s = malloc(n);
10008	if (s != 0)
10009		s[0] = s[n-1] = 0;
10010	${cf_cv_main_return:-return}(s == 0);
10011}
10012_ACEOF
10013rm -f "conftest$ac_exeext"
10014if { (eval echo "$as_me:10014: \"$ac_link\"") >&5
10015  (eval $ac_link) 2>&5
10016  ac_status=$?
10017  echo "$as_me:10017: \$? = $ac_status" >&5
10018  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10019  { (eval echo "$as_me:10019: \"$ac_try\"") >&5
10020  (eval $ac_try) 2>&5
10021  ac_status=$?
10022  echo "$as_me:10022: \$? = $ac_status" >&5
10023  (exit "$ac_status"); }; }; then
10024  with_big_core=yes
10025else
10026  echo "$as_me: program exited with status $ac_status" >&5
10027echo "$as_me: failed program was:" >&5
10028cat "conftest.$ac_ext" >&5
10029with_big_core=no
10030fi
10031rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10032fi
10033fi;
10034echo "$as_me:10034: result: $with_big_core" >&5
10035echo "${ECHO_T}$with_big_core" >&6
10036test "x$with_big_core" = "xyes" &&
10037cat >>confdefs.h <<\EOF
10038#define HAVE_BIG_CORE 1
10039EOF
10040
10041### ISO C only guarantees 512-char strings, we have tables which load faster
10042### when constructed using "big" strings.  More than the C compiler, the awk
10043### program is a limit on most vendor UNIX systems.  Check that we can build.
10044echo "$as_me:10044: checking if big-strings option selected" >&5
10045echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
10046
10047# Check whether --enable-big-strings or --disable-big-strings was given.
10048if test "${enable_big_strings+set}" = set; then
10049  enableval="$enable_big_strings"
10050  with_big_strings=$enableval
10051else
10052
10053	case x$AWK in
10054	(x)
10055		eval with_big_strings=no
10056		;;
10057	(*)
10058		if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
10059			| $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
10060			eval with_big_strings=yes
10061		else
10062			eval with_big_strings=no
10063		fi
10064		;;
10065	esac
10066
10067fi;
10068echo "$as_me:10068: result: $with_big_strings" >&5
10069echo "${ECHO_T}$with_big_strings" >&6
10070
10071USE_BIG_STRINGS=0
10072test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
10073
10074###	use option --enable-termcap to compile in the termcap fallback support
10075echo "$as_me:10075: checking if you want termcap-fallback support" >&5
10076echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
10077
10078# Check whether --enable-termcap or --disable-termcap was given.
10079if test "${enable_termcap+set}" = set; then
10080  enableval="$enable_termcap"
10081  with_termcap=$enableval
10082else
10083  with_termcap=no
10084fi;
10085echo "$as_me:10085: result: $with_termcap" >&5
10086echo "${ECHO_T}$with_termcap" >&6
10087
10088NCURSES_USE_TERMCAP=0
10089if test "x$with_termcap" != "xyes" ; then
10090	if test "$use_database" = no ; then
10091		if test -z "$with_fallback" ; then
10092			{ { echo "$as_me:10092: error: You have disabled the database w/o specifying fallbacks" >&5
10093echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
10094   { (exit 1); exit 1; }; }
10095		fi
10096	fi
10097
10098cat >>confdefs.h <<\EOF
10099#define PURE_TERMINFO 1
10100EOF
10101
10102else
10103
10104	if test "$with_ticlib" != no ; then
10105		{ { echo "$as_me:10105: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
10106echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
10107   { (exit 1); exit 1; }; }
10108	fi
10109
10110	NCURSES_USE_TERMCAP=1
10111	echo "$as_me:10111: checking for list of termcap files" >&5
10112echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
10113
10114# Check whether --with-termpath or --without-termpath was given.
10115if test "${with_termpath+set}" = set; then
10116  withval="$with_termpath"
10117
10118else
10119  withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
10120fi;
10121IFS="${IFS:- 	}"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
10122cf_dst_path=
10123for cf_src_path in $withval
10124do
10125
10126if test "x$prefix" != xNONE; then
10127	cf_path_syntax="$prefix"
10128else
10129	cf_path_syntax="$ac_default_prefix"
10130fi
10131
10132case "x$cf_src_path" in
10133(x\$\(*\)*|x\'*\'*)
10134	;;
10135(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
10136	;;
10137(x\$\{*prefix\}*|x\$\{*dir\}*)
10138	eval cf_src_path="$cf_src_path"
10139	case "x$cf_src_path" in
10140	(xNONE/*)
10141		cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
10142		;;
10143	esac
10144	;;
10145(xno|xNONE/*)
10146	cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
10147	;;
10148(*)
10149	{ { echo "$as_me:10149: error: expected a pathname, not \"$cf_src_path\"" >&5
10150echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
10151   { (exit 1); exit 1; }; }
10152	;;
10153esac
10154
10155  test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
10156  cf_dst_path="${cf_dst_path}${cf_src_path}"
10157done
10158IFS="$ac_save_ifs"
10159
10160# This may use the prefix/exec_prefix symbols which will only yield "NONE"
10161# so we have to check/work around.  We do prefer the result of "eval"...
10162eval cf_dst_eval="$cf_dst_path"
10163case "x$cf_dst_eval" in
10164(xNONE*)
10165	TERMPATH=$cf_dst_path
10166	;;
10167(*)
10168	TERMPATH="$cf_dst_eval"
10169	;;
10170esac
10171
10172	echo "$as_me:10172: result: $TERMPATH" >&5
10173echo "${ECHO_T}$TERMPATH" >&6
10174	test -n "$TERMPATH" &&
10175cat >>confdefs.h <<EOF
10176#define TERMPATH "$TERMPATH"
10177EOF
10178
10179	###	use option --enable-getcap to use a hacked getcap for reading termcaps
10180	echo "$as_me:10180: checking if fast termcap-loader is needed" >&5
10181echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
10182
10183# Check whether --enable-getcap or --disable-getcap was given.
10184if test "${enable_getcap+set}" = set; then
10185  enableval="$enable_getcap"
10186  with_getcap=$enableval
10187else
10188  with_getcap=no
10189fi;
10190	echo "$as_me:10190: result: $with_getcap" >&5
10191echo "${ECHO_T}$with_getcap" >&6
10192	test "x$with_getcap" = "xyes" &&
10193cat >>confdefs.h <<\EOF
10194#define USE_GETCAP 1
10195EOF
10196
10197	echo "$as_me:10197: checking if translated termcaps will be cached in ~/.terminfo" >&5
10198echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
10199
10200# Check whether --enable-getcap-cache or --disable-getcap-cache was given.
10201if test "${enable_getcap_cache+set}" = set; then
10202  enableval="$enable_getcap_cache"
10203  with_getcap_cache=$enableval
10204else
10205  with_getcap_cache=no
10206fi;
10207	echo "$as_me:10207: result: $with_getcap_cache" >&5
10208echo "${ECHO_T}$with_getcap_cache" >&6
10209	test "x$with_getcap_cache" = "xyes" &&
10210cat >>confdefs.h <<\EOF
10211#define USE_GETCAP_CACHE 1
10212EOF
10213
10214fi
10215
10216###   Use option --disable-home-terminfo to completely remove ~/.terminfo
10217echo "$as_me:10217: checking if ~/.terminfo is wanted" >&5
10218echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
10219
10220# Check whether --enable-home-terminfo or --disable-home-terminfo was given.
10221if test "${enable_home_terminfo+set}" = set; then
10222  enableval="$enable_home_terminfo"
10223  with_home_terminfo=$enableval
10224else
10225  with_home_terminfo=yes
10226fi;
10227echo "$as_me:10227: result: $with_home_terminfo" >&5
10228echo "${ECHO_T}$with_home_terminfo" >&6
10229test "x$with_home_terminfo" = "xyes" &&
10230cat >>confdefs.h <<\EOF
10231#define USE_HOME_TERMINFO 1
10232EOF
10233
10234echo "$as_me:10234: checking for conventional multiuser system" >&5
10235echo $ECHO_N "checking for conventional multiuser system... $ECHO_C" >&6
10236if test "${cf_cv_multiuser+set}" = set; then
10237  echo $ECHO_N "(cached) $ECHO_C" >&6
10238else
10239
10240	cf_cv_multiuser=no
10241	if test -f /etc/passwd
10242	then
10243		sed \
10244			-e '/true$/d' \
10245			-e '/false$/d' \
10246			-e '/nologin$/d' \
10247			-e '/^[^:]*:[^:]*:[0-9]:/d' \
10248			-e '/^[^:]*:[^:]*:[0-9][0-9]:/d' \
10249			-e '/:$/d' < /etc/passwd >conftest.tmp
10250		test -s conftest.tmp && cf_cv_multiuser=yes
10251		rm -f conftest.tmp
10252	fi
10253
10254fi
10255echo "$as_me:10255: result: $cf_cv_multiuser" >&5
10256echo "${ECHO_T}$cf_cv_multiuser" >&6
10257
10258if test "$cf_cv_multiuser" = yes; then
10259
10260echo "$as_me:10260: checking if you want to permit root to use ncurses environment variables" >&5
10261echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
10262
10263# Check whether --enable-root-environ or --disable-root-environ was given.
10264if test "${enable_root_environ+set}" = set; then
10265  enableval="$enable_root_environ"
10266  with_root_environ=$enableval
10267else
10268  with_root_environ=yes
10269fi;
10270echo "$as_me:10270: result: $with_root_environ" >&5
10271echo "${ECHO_T}$with_root_environ" >&6
10272test "x$with_root_environ" = xyes &&
10273cat >>confdefs.h <<\EOF
10274#define USE_ROOT_ENVIRON 1
10275EOF
10276
10277echo "$as_me:10277: checking if you want to permit setuid programs to access all files" >&5
10278echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
10279
10280# Check whether --enable-root-access or --disable-root-access was given.
10281if test "${enable_root_access+set}" = set; then
10282  enableval="$enable_root_access"
10283  with_root_access=$enableval
10284else
10285  with_root_access=yes
10286fi;
10287echo "$as_me:10287: result: $with_root_access" >&5
10288echo "${ECHO_T}$with_root_access" >&6
10289test "x$with_root_access" = xyes &&
10290cat >>confdefs.h <<\EOF
10291#define USE_ROOT_ACCESS 1
10292EOF
10293
10294echo "$as_me:10294: checking if you want to permit setuid use of ncurses environment variables" >&5
10295echo $ECHO_N "checking if you want to permit setuid use of ncurses environment variables... $ECHO_C" >&6
10296
10297# Check whether --enable-setuid-environ or --disable-setuid-environ was given.
10298if test "${enable_setuid_environ+set}" = set; then
10299  enableval="$enable_setuid_environ"
10300  with_setuid_environ=$enableval
10301else
10302  with_setuid_environ=$with_root_environ
10303fi;
10304echo "$as_me:10304: result: $with_setuid_environ" >&5
10305echo "${ECHO_T}$with_setuid_environ" >&6
10306test "x$with_setuid_environ" = xyes &&
10307cat >>confdefs.h <<\EOF
10308#define USE_SETUID_ENVIRON 1
10309EOF
10310
10311else
10312	if test -n "$enable_root_environ$enable_root_access$enable_setuid_environ"
10313	then
10314		{ echo "$as_me:10314: WARNING: ignoring options used only for multiuser systems" >&5
10315echo "$as_me: WARNING: ignoring options used only for multiuser systems" >&2;}
10316	fi
10317
10318fi # cf_cv_multiuser
10319
10320###   Use option --enable-symlinks to make tic use symlinks, not hard links
10321###   to reduce storage requirements for the terminfo database.
10322
10323for ac_header in \
10324unistd.h \
10325
10326do
10327as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10328echo "$as_me:10328: checking for $ac_header" >&5
10329echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10330if eval "test \"\${$as_ac_Header+set}\" = set"; then
10331  echo $ECHO_N "(cached) $ECHO_C" >&6
10332else
10333  cat >"conftest.$ac_ext" <<_ACEOF
10334#line 10334 "configure"
10335#include "confdefs.h"
10336#include <$ac_header>
10337_ACEOF
10338if { (eval echo "$as_me:10338: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10339  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10340  ac_status=$?
10341  $EGREP -v '^ *\+' conftest.er1 >conftest.err
10342  rm -f conftest.er1
10343  cat conftest.err >&5
10344  echo "$as_me:10344: \$? = $ac_status" >&5
10345  (exit "$ac_status"); } >/dev/null; then
10346  if test -s conftest.err; then
10347    ac_cpp_err=$ac_c_preproc_warn_flag
10348  else
10349    ac_cpp_err=
10350  fi
10351else
10352  ac_cpp_err=yes
10353fi
10354if test -z "$ac_cpp_err"; then
10355  eval "$as_ac_Header=yes"
10356else
10357  echo "$as_me: failed program was:" >&5
10358  cat "conftest.$ac_ext" >&5
10359  eval "$as_ac_Header=no"
10360fi
10361rm -f conftest.err "conftest.$ac_ext"
10362fi
10363echo "$as_me:10363: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10364echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10365if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10366  cat >>confdefs.h <<EOF
10367#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10368EOF
10369
10370fi
10371done
10372
10373for ac_func in \
10374	remove \
10375	unlink
10376do
10377as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10378echo "$as_me:10378: checking for $ac_func" >&5
10379echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10380if eval "test \"\${$as_ac_var+set}\" = set"; then
10381  echo $ECHO_N "(cached) $ECHO_C" >&6
10382else
10383  cat >"conftest.$ac_ext" <<_ACEOF
10384#line 10384 "configure"
10385#include "confdefs.h"
10386#define $ac_func autoconf_temporary
10387#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
10388#undef $ac_func
10389
10390#ifdef __cplusplus
10391extern "C"
10392#endif
10393
10394/* We use char because int might match the return type of a gcc2
10395   builtin and then its argument prototype would still apply.  */
10396char $ac_func (void);
10397
10398int
10399main (void)
10400{
10401
10402/* The GNU C library defines stubs for functions which it implements
10403    to always fail with ENOSYS.  Some functions are actually named
10404    something starting with __ and the normal name is an alias.  */
10405#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10406#error found stub for $ac_func
10407#endif
10408
10409	return $ac_func ();
10410  ;
10411  return 0;
10412}
10413_ACEOF
10414rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10415if { (eval echo "$as_me:10415: \"$ac_link\"") >&5
10416  (eval $ac_link) 2>&5
10417  ac_status=$?
10418  echo "$as_me:10418: \$? = $ac_status" >&5
10419  (exit "$ac_status"); } &&
10420         { ac_try='test -s "conftest$ac_exeext"'
10421  { (eval echo "$as_me:10421: \"$ac_try\"") >&5
10422  (eval $ac_try) 2>&5
10423  ac_status=$?
10424  echo "$as_me:10424: \$? = $ac_status" >&5
10425  (exit "$ac_status"); }; }; then
10426  eval "$as_ac_var=yes"
10427else
10428  echo "$as_me: failed program was:" >&5
10429cat "conftest.$ac_ext" >&5
10430eval "$as_ac_var=no"
10431fi
10432rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10433fi
10434echo "$as_me:10434: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10435echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10436if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10437  cat >>confdefs.h <<EOF
10438#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10439EOF
10440
10441fi
10442done
10443
10444if test "$cross_compiling" = yes ; then
10445
10446for ac_func in \
10447		link \
10448		symlink
10449do
10450as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10451echo "$as_me:10451: checking for $ac_func" >&5
10452echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10453if eval "test \"\${$as_ac_var+set}\" = set"; then
10454  echo $ECHO_N "(cached) $ECHO_C" >&6
10455else
10456  cat >"conftest.$ac_ext" <<_ACEOF
10457#line 10457 "configure"
10458#include "confdefs.h"
10459#define $ac_func autoconf_temporary
10460#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
10461#undef $ac_func
10462
10463#ifdef __cplusplus
10464extern "C"
10465#endif
10466
10467/* We use char because int might match the return type of a gcc2
10468   builtin and then its argument prototype would still apply.  */
10469char $ac_func (void);
10470
10471int
10472main (void)
10473{
10474
10475/* The GNU C library defines stubs for functions which it implements
10476    to always fail with ENOSYS.  Some functions are actually named
10477    something starting with __ and the normal name is an alias.  */
10478#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10479#error found stub for $ac_func
10480#endif
10481
10482	return $ac_func ();
10483  ;
10484  return 0;
10485}
10486_ACEOF
10487rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10488if { (eval echo "$as_me:10488: \"$ac_link\"") >&5
10489  (eval $ac_link) 2>&5
10490  ac_status=$?
10491  echo "$as_me:10491: \$? = $ac_status" >&5
10492  (exit "$ac_status"); } &&
10493         { ac_try='test -s "conftest$ac_exeext"'
10494  { (eval echo "$as_me:10494: \"$ac_try\"") >&5
10495  (eval $ac_try) 2>&5
10496  ac_status=$?
10497  echo "$as_me:10497: \$? = $ac_status" >&5
10498  (exit "$ac_status"); }; }; then
10499  eval "$as_ac_var=yes"
10500else
10501  echo "$as_me: failed program was:" >&5
10502cat "conftest.$ac_ext" >&5
10503eval "$as_ac_var=no"
10504fi
10505rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10506fi
10507echo "$as_me:10507: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10508echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10509if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10510  cat >>confdefs.h <<EOF
10511#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10512EOF
10513
10514fi
10515done
10516
10517else
10518	echo "$as_me:10518: checking if link/symlink functions work" >&5
10519echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
10520if test "${cf_cv_link_funcs+set}" = set; then
10521  echo $ECHO_N "(cached) $ECHO_C" >&6
10522else
10523
10524		cf_cv_link_funcs=
10525		for cf_func in link symlink ; do
10526			if test "$cross_compiling" = yes; then
10527
10528			eval 'ac_cv_func_'$cf_func'=error'
10529else
10530  cat >"conftest.$ac_ext" <<_ACEOF
10531#line 10531 "configure"
10532#include "confdefs.h"
10533
10534$ac_includes_default
10535
10536int main(void)
10537{
10538	int fail = 0;
10539	char src[] = "conftest.tmp";
10540	char dst[] = "conftest.chk";
10541	struct stat src_sb, dst_sb;
10542	FILE *fp = fopen(src, "w");
10543	if (fp == NULL) { fail = 3; } else {
10544		fclose(fp); stat(src, &src_sb);
10545		if ($cf_func(src, dst) < 0) {
10546			fail = 1;
10547		} else if (stat(dst, &dst_sb) < 0) {
10548			fail = 2;
10549		} else {
10550			long diff = (dst_sb.st_mtime - src_sb.st_mtime);
10551			if (diff < 0) diff = -diff;
10552			if (diff > 2) fail = 3;
10553		}
10554	}
10555#ifdef HAVE_UNLINK
10556	unlink(dst); unlink(src);
10557#else
10558	remove(dst); remove(src);
10559#endif
10560	${cf_cv_main_return:-return} (fail);
10561}
10562
10563_ACEOF
10564rm -f "conftest$ac_exeext"
10565if { (eval echo "$as_me:10565: \"$ac_link\"") >&5
10566  (eval $ac_link) 2>&5
10567  ac_status=$?
10568  echo "$as_me:10568: \$? = $ac_status" >&5
10569  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10570  { (eval echo "$as_me:10570: \"$ac_try\"") >&5
10571  (eval $ac_try) 2>&5
10572  ac_status=$?
10573  echo "$as_me:10573: \$? = $ac_status" >&5
10574  (exit "$ac_status"); }; }; then
10575
10576			cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
10577			eval 'ac_cv_func_'$cf_func'=yes'
10578else
10579  echo "$as_me: program exited with status $ac_status" >&5
10580echo "$as_me: failed program was:" >&5
10581cat "conftest.$ac_ext" >&5
10582
10583			eval 'ac_cv_func_'$cf_func'=no'
10584fi
10585rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10586fi
10587		done
10588		test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
10589
10590fi
10591echo "$as_me:10591: result: $cf_cv_link_funcs" >&5
10592echo "${ECHO_T}$cf_cv_link_funcs" >&6
10593	test "$ac_cv_func_link"    = yes &&
10594cat >>confdefs.h <<\EOF
10595#define HAVE_LINK 1
10596EOF
10597
10598	test "$ac_cv_func_symlink" = yes &&
10599cat >>confdefs.h <<\EOF
10600#define HAVE_SYMLINK 1
10601EOF
10602
10603fi
10604
10605with_links=no
10606with_symlinks=no
10607
10608# soft links (symbolic links) are useful for some systems where hard links do
10609# not work, or to make it simpler to copy terminfo trees around.
10610if test "x$ac_cv_func_symlink" = xyes ; then
10611	echo "$as_me:10611: checking if tic should use symbolic links" >&5
10612echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
10613
10614# Check whether --enable-symlinks or --disable-symlinks was given.
10615if test "${enable_symlinks+set}" = set; then
10616  enableval="$enable_symlinks"
10617  with_symlinks=$enableval
10618else
10619  with_symlinks=no
10620fi;
10621	echo "$as_me:10621: result: $with_symlinks" >&5
10622echo "${ECHO_T}$with_symlinks" >&6
10623fi
10624
10625# If we have hard links and did not choose to use soft links instead, there is
10626# no reason to make this choice optional - use the hard links.
10627if test "$with_symlinks" = no ; then
10628	echo "$as_me:10628: checking if tic should use hard links" >&5
10629echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
10630	if test "x$ac_cv_func_link" = xyes ; then
10631		with_links=yes
10632	else
10633		with_links=no
10634	fi
10635	echo "$as_me:10635: result: $with_links" >&5
10636echo "${ECHO_T}$with_links" >&6
10637fi
10638
10639test "x$with_links" = xyes &&
10640cat >>confdefs.h <<\EOF
10641#define USE_LINKS 1
10642EOF
10643
10644test "x$with_symlinks" = xyes &&
10645cat >>confdefs.h <<\EOF
10646#define USE_SYMLINKS 1
10647EOF
10648
10649###   use option --enable-broken-linker to force on use of broken-linker support
10650
10651echo "$as_me:10651: checking if you want broken-linker support code" >&5
10652echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10653
10654# Check whether --enable-broken_linker or --disable-broken_linker was given.
10655if test "${enable_broken_linker+set}" = set; then
10656  enableval="$enable_broken_linker"
10657  with_broken_linker=$enableval
10658else
10659  with_broken_linker=no
10660fi;
10661echo "$as_me:10661: result: $with_broken_linker" >&5
10662echo "${ECHO_T}$with_broken_linker" >&6
10663
10664: "${BROKEN_LINKER:=0}"
10665if test "x$with_broken_linker" = xyes ; then
10666
10667cat >>confdefs.h <<\EOF
10668#define BROKEN_LINKER 1
10669EOF
10670
10671	BROKEN_LINKER=1
10672fi
10673
10674###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
10675echo "$as_me:10675: checking if tputs should process BSD-style prefix padding" >&5
10676echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
10677
10678# Check whether --enable-bsdpad or --disable-bsdpad was given.
10679if test "${enable_bsdpad+set}" = set; then
10680  enableval="$enable_bsdpad"
10681  with_bsdpad=$enableval
10682else
10683  with_bsdpad=no
10684fi;
10685echo "$as_me:10685: result: $with_bsdpad" >&5
10686echo "${ECHO_T}$with_bsdpad" >&6
10687test "x$with_bsdpad" = xyes &&
10688cat >>confdefs.h <<\EOF
10689#define BSD_TPUTS 1
10690EOF
10691
10692###   use option --enable-widec to turn on use of wide-character support
10693NCURSES_CH_T=chtype
10694NCURSES_LIBUTF8=0
10695
10696NEED_WCHAR_H=0
10697NCURSES_MBSTATE_T=0
10698NCURSES_WCHAR_T=0
10699NCURSES_WINT_T=0
10700
10701# Check to define _XOPEN_SOURCE "automatically"
10702CPPFLAGS_before_XOPEN="$CPPFLAGS"
10703
10704echo "$as_me:10704: checking if the POSIX test-macros are already defined" >&5
10705echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
10706if test "${cf_cv_posix_visible+set}" = set; then
10707  echo $ECHO_N "(cached) $ECHO_C" >&6
10708else
10709
10710cat >"conftest.$ac_ext" <<_ACEOF
10711#line 10711 "configure"
10712#include "confdefs.h"
10713#include <stdio.h>
10714int
10715main (void)
10716{
10717
10718#if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
10719	&& defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
10720	&& defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
10721	&& defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
10722#error conflicting symbols found
10723#endif
10724
10725  ;
10726  return 0;
10727}
10728_ACEOF
10729rm -f "conftest.$ac_objext"
10730if { (eval echo "$as_me:10730: \"$ac_compile\"") >&5
10731  (eval $ac_compile) 2>&5
10732  ac_status=$?
10733  echo "$as_me:10733: \$? = $ac_status" >&5
10734  (exit "$ac_status"); } &&
10735         { ac_try='test -s "conftest.$ac_objext"'
10736  { (eval echo "$as_me:10736: \"$ac_try\"") >&5
10737  (eval $ac_try) 2>&5
10738  ac_status=$?
10739  echo "$as_me:10739: \$? = $ac_status" >&5
10740  (exit "$ac_status"); }; }; then
10741  cf_cv_posix_visible=no
10742else
10743  echo "$as_me: failed program was:" >&5
10744cat "conftest.$ac_ext" >&5
10745cf_cv_posix_visible=yes
10746fi
10747rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10748
10749fi
10750echo "$as_me:10750: result: $cf_cv_posix_visible" >&5
10751echo "${ECHO_T}$cf_cv_posix_visible" >&6
10752
10753if test "$cf_cv_posix_visible" = no; then
10754
10755cf_XOPEN_SOURCE=600
10756cf_POSIX_C_SOURCE=199506L
10757cf_xopen_source=
10758
10759case "$host_os" in
10760(aix[4-7]*)
10761	cf_xopen_source="-D_ALL_SOURCE"
10762	;;
10763(darwin[0-8].*)
10764	cf_xopen_source="-D_APPLE_C_SOURCE"
10765	;;
10766(darwin*)
10767	cf_xopen_source="-D_DARWIN_C_SOURCE"
10768	cf_XOPEN_SOURCE=
10769	;;
10770(freebsd*|dragonfly*|midnightbsd*)
10771	# 5.x headers associate
10772	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10773	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10774	cf_POSIX_C_SOURCE=200112L
10775	cf_XOPEN_SOURCE=600
10776	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10777	;;
10778(hpux11*)
10779	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10780	;;
10781(hpux*)
10782	cf_xopen_source="-D_HPUX_SOURCE"
10783	;;
10784(irix[56].*)
10785	cf_xopen_source="-D_SGI_SOURCE"
10786	cf_XOPEN_SOURCE=
10787	;;
10788(linux*gnu*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
10789
10790cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10791
10792echo "$as_me:10792: checking if this is the GNU C library" >&5
10793echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10794if test "${cf_cv_gnu_library+set}" = set; then
10795  echo $ECHO_N "(cached) $ECHO_C" >&6
10796else
10797
10798cat >"conftest.$ac_ext" <<_ACEOF
10799#line 10799 "configure"
10800#include "confdefs.h"
10801#include <sys/types.h>
10802int
10803main (void)
10804{
10805
10806	#if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10807		return 0;
10808	#elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10809		return 0;
10810	#else
10811	#	error not GNU C library
10812	#endif
10813  ;
10814  return 0;
10815}
10816_ACEOF
10817rm -f "conftest.$ac_objext"
10818if { (eval echo "$as_me:10818: \"$ac_compile\"") >&5
10819  (eval $ac_compile) 2>&5
10820  ac_status=$?
10821  echo "$as_me:10821: \$? = $ac_status" >&5
10822  (exit "$ac_status"); } &&
10823         { ac_try='test -s "conftest.$ac_objext"'
10824  { (eval echo "$as_me:10824: \"$ac_try\"") >&5
10825  (eval $ac_try) 2>&5
10826  ac_status=$?
10827  echo "$as_me:10827: \$? = $ac_status" >&5
10828  (exit "$ac_status"); }; }; then
10829  cf_cv_gnu_library=yes
10830else
10831  echo "$as_me: failed program was:" >&5
10832cat "conftest.$ac_ext" >&5
10833cf_cv_gnu_library=no
10834fi
10835rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10836
10837fi
10838echo "$as_me:10838: result: $cf_cv_gnu_library" >&5
10839echo "${ECHO_T}$cf_cv_gnu_library" >&6
10840
10841if test x$cf_cv_gnu_library = xyes; then
10842
10843	# With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10844	# was changed to help a little.  newlib incorporated the change about 4
10845	# years later.
10846	echo "$as_me:10846: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10847echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10848if test "${cf_cv_gnu_library_219+set}" = set; then
10849  echo $ECHO_N "(cached) $ECHO_C" >&6
10850else
10851
10852		cf_save="$CPPFLAGS"
10853
10854	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10855	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10856
10857		cat >"conftest.$ac_ext" <<_ACEOF
10858#line 10858 "configure"
10859#include "confdefs.h"
10860#include <sys/types.h>
10861int
10862main (void)
10863{
10864
10865			#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10866				return 0;
10867			#elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10868				return 0;
10869			#else
10870			#	error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10871			#endif
10872  ;
10873  return 0;
10874}
10875_ACEOF
10876rm -f "conftest.$ac_objext"
10877if { (eval echo "$as_me:10877: \"$ac_compile\"") >&5
10878  (eval $ac_compile) 2>&5
10879  ac_status=$?
10880  echo "$as_me:10880: \$? = $ac_status" >&5
10881  (exit "$ac_status"); } &&
10882         { ac_try='test -s "conftest.$ac_objext"'
10883  { (eval echo "$as_me:10883: \"$ac_try\"") >&5
10884  (eval $ac_try) 2>&5
10885  ac_status=$?
10886  echo "$as_me:10886: \$? = $ac_status" >&5
10887  (exit "$ac_status"); }; }; then
10888  cf_cv_gnu_library_219=yes
10889else
10890  echo "$as_me: failed program was:" >&5
10891cat "conftest.$ac_ext" >&5
10892cf_cv_gnu_library_219=no
10893fi
10894rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10895		CPPFLAGS="$cf_save"
10896
10897fi
10898echo "$as_me:10898: result: $cf_cv_gnu_library_219" >&5
10899echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10900
10901	if test "x$cf_cv_gnu_library_219" = xyes; then
10902		cf_save="$CPPFLAGS"
10903		echo "$as_me:10903: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10904echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10905if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10906  echo $ECHO_N "(cached) $ECHO_C" >&6
10907else
10908
10909cf_fix_cppflags=no
10910cf_new_cflags=
10911cf_new_cppflags=
10912cf_new_extra_cppflags=
10913
10914for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10915do
10916case "$cf_fix_cppflags" in
10917(no)
10918	case "$cf_add_cflags" in
10919	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10920		case "$cf_add_cflags" in
10921		(-D*)
10922			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10923
10924			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10925				&& test -z "${cf_tst_cflags}" \
10926				&& cf_fix_cppflags=yes
10927
10928			if test "$cf_fix_cppflags" = yes ; then
10929
10930	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10931	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10932
10933				continue
10934			elif test "${cf_tst_cflags}" = "\"'" ; then
10935
10936	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10937	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10938
10939				continue
10940			fi
10941			;;
10942		esac
10943		case "$CPPFLAGS" in
10944		(*$cf_add_cflags)
10945			;;
10946		(*)
10947			case "$cf_add_cflags" in
10948			(-D*)
10949				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10950
10951CPPFLAGS=`echo "$CPPFLAGS" | \
10952	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10953		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10954
10955				;;
10956			esac
10957
10958	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10959	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10960
10961			;;
10962		esac
10963		;;
10964	(*)
10965
10966	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10967	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10968
10969		;;
10970	esac
10971	;;
10972(yes)
10973
10974	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10975	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10976
10977	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10978
10979	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10980		&& test -z "${cf_tst_cflags}" \
10981		&& cf_fix_cppflags=no
10982	;;
10983esac
10984done
10985
10986if test -n "$cf_new_cflags" ; then
10987
10988	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10989	CFLAGS="${CFLAGS}$cf_new_cflags"
10990
10991fi
10992
10993if test -n "$cf_new_cppflags" ; then
10994
10995	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10996	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10997
10998fi
10999
11000if test -n "$cf_new_extra_cppflags" ; then
11001
11002	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11003	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11004
11005fi
11006
11007			cat >"conftest.$ac_ext" <<_ACEOF
11008#line 11008 "configure"
11009#include "confdefs.h"
11010
11011				#include <limits.h>
11012				#include <sys/types.h>
11013
11014int
11015main (void)
11016{
11017
11018				#if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
11019					return 0;
11020				#else
11021				#	error GNU C library is too old
11022				#endif
11023  ;
11024  return 0;
11025}
11026_ACEOF
11027rm -f "conftest.$ac_objext"
11028if { (eval echo "$as_me:11028: \"$ac_compile\"") >&5
11029  (eval $ac_compile) 2>&5
11030  ac_status=$?
11031  echo "$as_me:11031: \$? = $ac_status" >&5
11032  (exit "$ac_status"); } &&
11033         { ac_try='test -s "conftest.$ac_objext"'
11034  { (eval echo "$as_me:11034: \"$ac_try\"") >&5
11035  (eval $ac_try) 2>&5
11036  ac_status=$?
11037  echo "$as_me:11037: \$? = $ac_status" >&5
11038  (exit "$ac_status"); }; }; then
11039  cf_cv_gnu_dftsrc_219=yes
11040else
11041  echo "$as_me: failed program was:" >&5
11042cat "conftest.$ac_ext" >&5
11043cf_cv_gnu_dftsrc_219=no
11044fi
11045rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11046
11047fi
11048echo "$as_me:11048: result: $cf_cv_gnu_dftsrc_219" >&5
11049echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
11050		test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
11051	else
11052		cf_cv_gnu_dftsrc_219=maybe
11053	fi
11054
11055	if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
11056
11057		echo "$as_me:11057: checking if we must define _GNU_SOURCE" >&5
11058echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
11059if test "${cf_cv_gnu_source+set}" = set; then
11060  echo $ECHO_N "(cached) $ECHO_C" >&6
11061else
11062
11063		cat >"conftest.$ac_ext" <<_ACEOF
11064#line 11064 "configure"
11065#include "confdefs.h"
11066#include <sys/types.h>
11067int
11068main (void)
11069{
11070
11071			#ifndef _XOPEN_SOURCE
11072			#error	expected _XOPEN_SOURCE to be defined
11073			#endif
11074  ;
11075  return 0;
11076}
11077_ACEOF
11078rm -f "conftest.$ac_objext"
11079if { (eval echo "$as_me:11079: \"$ac_compile\"") >&5
11080  (eval $ac_compile) 2>&5
11081  ac_status=$?
11082  echo "$as_me:11082: \$? = $ac_status" >&5
11083  (exit "$ac_status"); } &&
11084         { ac_try='test -s "conftest.$ac_objext"'
11085  { (eval echo "$as_me:11085: \"$ac_try\"") >&5
11086  (eval $ac_try) 2>&5
11087  ac_status=$?
11088  echo "$as_me:11088: \$? = $ac_status" >&5
11089  (exit "$ac_status"); }; }; then
11090  cf_cv_gnu_source=no
11091else
11092  echo "$as_me: failed program was:" >&5
11093cat "conftest.$ac_ext" >&5
11094cf_save="$CPPFLAGS"
11095
11096cf_fix_cppflags=no
11097cf_new_cflags=
11098cf_new_cppflags=
11099cf_new_extra_cppflags=
11100
11101for cf_add_cflags in -D_GNU_SOURCE
11102do
11103case "$cf_fix_cppflags" in
11104(no)
11105	case "$cf_add_cflags" in
11106	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11107		case "$cf_add_cflags" in
11108		(-D*)
11109			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11110
11111			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11112				&& test -z "${cf_tst_cflags}" \
11113				&& cf_fix_cppflags=yes
11114
11115			if test "$cf_fix_cppflags" = yes ; then
11116
11117	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11118	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11119
11120				continue
11121			elif test "${cf_tst_cflags}" = "\"'" ; then
11122
11123	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11124	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11125
11126				continue
11127			fi
11128			;;
11129		esac
11130		case "$CPPFLAGS" in
11131		(*$cf_add_cflags)
11132			;;
11133		(*)
11134			case "$cf_add_cflags" in
11135			(-D*)
11136				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11137
11138CPPFLAGS=`echo "$CPPFLAGS" | \
11139	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11140		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11141
11142				;;
11143			esac
11144
11145	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11146	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11147
11148			;;
11149		esac
11150		;;
11151	(*)
11152
11153	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11154	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11155
11156		;;
11157	esac
11158	;;
11159(yes)
11160
11161	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11162	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11163
11164	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11165
11166	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11167		&& test -z "${cf_tst_cflags}" \
11168		&& cf_fix_cppflags=no
11169	;;
11170esac
11171done
11172
11173if test -n "$cf_new_cflags" ; then
11174
11175	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11176	CFLAGS="${CFLAGS}$cf_new_cflags"
11177
11178fi
11179
11180if test -n "$cf_new_cppflags" ; then
11181
11182	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11183	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11184
11185fi
11186
11187if test -n "$cf_new_extra_cppflags" ; then
11188
11189	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11190	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11191
11192fi
11193
11194			 cat >"conftest.$ac_ext" <<_ACEOF
11195#line 11195 "configure"
11196#include "confdefs.h"
11197#include <sys/types.h>
11198int
11199main (void)
11200{
11201
11202				#ifdef _XOPEN_SOURCE
11203				#error	expected _XOPEN_SOURCE to be undefined
11204				#endif
11205  ;
11206  return 0;
11207}
11208_ACEOF
11209rm -f "conftest.$ac_objext"
11210if { (eval echo "$as_me:11210: \"$ac_compile\"") >&5
11211  (eval $ac_compile) 2>&5
11212  ac_status=$?
11213  echo "$as_me:11213: \$? = $ac_status" >&5
11214  (exit "$ac_status"); } &&
11215         { ac_try='test -s "conftest.$ac_objext"'
11216  { (eval echo "$as_me:11216: \"$ac_try\"") >&5
11217  (eval $ac_try) 2>&5
11218  ac_status=$?
11219  echo "$as_me:11219: \$? = $ac_status" >&5
11220  (exit "$ac_status"); }; }; then
11221  cf_cv_gnu_source=no
11222else
11223  echo "$as_me: failed program was:" >&5
11224cat "conftest.$ac_ext" >&5
11225cf_cv_gnu_source=yes
11226fi
11227rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11228			CPPFLAGS="$cf_save"
11229
11230fi
11231rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11232
11233fi
11234echo "$as_me:11234: result: $cf_cv_gnu_source" >&5
11235echo "${ECHO_T}$cf_cv_gnu_source" >&6
11236
11237		if test "$cf_cv_gnu_source" = yes
11238		then
11239		echo "$as_me:11239: checking if we should also define _DEFAULT_SOURCE" >&5
11240echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
11241if test "${cf_cv_default_source+set}" = set; then
11242  echo $ECHO_N "(cached) $ECHO_C" >&6
11243else
11244
11245	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11246	CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
11247
11248			cat >"conftest.$ac_ext" <<_ACEOF
11249#line 11249 "configure"
11250#include "confdefs.h"
11251#include <sys/types.h>
11252int
11253main (void)
11254{
11255
11256				#ifdef _DEFAULT_SOURCE
11257				#error	expected _DEFAULT_SOURCE to be undefined
11258				#endif
11259  ;
11260  return 0;
11261}
11262_ACEOF
11263rm -f "conftest.$ac_objext"
11264if { (eval echo "$as_me:11264: \"$ac_compile\"") >&5
11265  (eval $ac_compile) 2>&5
11266  ac_status=$?
11267  echo "$as_me:11267: \$? = $ac_status" >&5
11268  (exit "$ac_status"); } &&
11269         { ac_try='test -s "conftest.$ac_objext"'
11270  { (eval echo "$as_me:11270: \"$ac_try\"") >&5
11271  (eval $ac_try) 2>&5
11272  ac_status=$?
11273  echo "$as_me:11273: \$? = $ac_status" >&5
11274  (exit "$ac_status"); }; }; then
11275  cf_cv_default_source=no
11276else
11277  echo "$as_me: failed program was:" >&5
11278cat "conftest.$ac_ext" >&5
11279cf_cv_default_source=yes
11280fi
11281rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11282
11283fi
11284echo "$as_me:11284: result: $cf_cv_default_source" >&5
11285echo "${ECHO_T}$cf_cv_default_source" >&6
11286			if test "$cf_cv_default_source" = yes
11287			then
11288
11289	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11290	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
11291
11292			fi
11293		fi
11294	fi
11295
11296fi
11297
11298	;;
11299linux*musl)
11300	cf_xopen_source="-D_BSD_SOURCE"
11301	;;
11302(minix*)
11303	cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
11304	;;
11305(mirbsd*)
11306	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
11307	cf_XOPEN_SOURCE=
11308
11309if test "$cf_cv_posix_visible" = no; then
11310
11311cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11312
11313cf_save_CFLAGS="$CFLAGS"
11314cf_save_CPPFLAGS="$CPPFLAGS"
11315
11316cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11317	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
11318		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
11319
11320cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11321	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
11322		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
11323
11324echo "$as_me:11324: checking if we should define _POSIX_C_SOURCE" >&5
11325echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11326if test "${cf_cv_posix_c_source+set}" = set; then
11327  echo $ECHO_N "(cached) $ECHO_C" >&6
11328else
11329
11330echo "${as_me:-configure}:11330: testing if the symbol is already defined go no further ..." 1>&5
11331
11332	cat >"conftest.$ac_ext" <<_ACEOF
11333#line 11333 "configure"
11334#include "confdefs.h"
11335#include <sys/types.h>
11336int
11337main (void)
11338{
11339
11340#ifndef _POSIX_C_SOURCE
11341#error _POSIX_C_SOURCE is not defined
11342#endif
11343  ;
11344  return 0;
11345}
11346_ACEOF
11347rm -f "conftest.$ac_objext"
11348if { (eval echo "$as_me:11348: \"$ac_compile\"") >&5
11349  (eval $ac_compile) 2>&5
11350  ac_status=$?
11351  echo "$as_me:11351: \$? = $ac_status" >&5
11352  (exit "$ac_status"); } &&
11353         { ac_try='test -s "conftest.$ac_objext"'
11354  { (eval echo "$as_me:11354: \"$ac_try\"") >&5
11355  (eval $ac_try) 2>&5
11356  ac_status=$?
11357  echo "$as_me:11357: \$? = $ac_status" >&5
11358  (exit "$ac_status"); }; }; then
11359  cf_cv_posix_c_source=no
11360else
11361  echo "$as_me: failed program was:" >&5
11362cat "conftest.$ac_ext" >&5
11363cf_want_posix_source=no
11364	 case .$cf_POSIX_C_SOURCE in
11365	 (.[12]??*)
11366		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11367		;;
11368	 (.2)
11369		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11370		cf_want_posix_source=yes
11371		;;
11372	 (.*)
11373		cf_want_posix_source=yes
11374		;;
11375	 esac
11376	 if test "$cf_want_posix_source" = yes ; then
11377		cat >"conftest.$ac_ext" <<_ACEOF
11378#line 11378 "configure"
11379#include "confdefs.h"
11380#include <sys/types.h>
11381int
11382main (void)
11383{
11384
11385#ifdef _POSIX_SOURCE
11386#error _POSIX_SOURCE is defined
11387#endif
11388  ;
11389  return 0;
11390}
11391_ACEOF
11392rm -f "conftest.$ac_objext"
11393if { (eval echo "$as_me:11393: \"$ac_compile\"") >&5
11394  (eval $ac_compile) 2>&5
11395  ac_status=$?
11396  echo "$as_me:11396: \$? = $ac_status" >&5
11397  (exit "$ac_status"); } &&
11398         { ac_try='test -s "conftest.$ac_objext"'
11399  { (eval echo "$as_me:11399: \"$ac_try\"") >&5
11400  (eval $ac_try) 2>&5
11401  ac_status=$?
11402  echo "$as_me:11402: \$? = $ac_status" >&5
11403  (exit "$ac_status"); }; }; then
11404  :
11405else
11406  echo "$as_me: failed program was:" >&5
11407cat "conftest.$ac_ext" >&5
11408cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11409fi
11410rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11411	 fi
11412
11413echo "${as_me:-configure}:11413: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11414
11415	 CFLAGS="$cf_trim_CFLAGS"
11416	 CPPFLAGS="$cf_trim_CPPFLAGS"
11417
11418	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11419	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11420
11421echo "${as_me:-configure}:11421: testing if the second compile does not leave our definition intact error ..." 1>&5
11422
11423	 cat >"conftest.$ac_ext" <<_ACEOF
11424#line 11424 "configure"
11425#include "confdefs.h"
11426#include <sys/types.h>
11427int
11428main (void)
11429{
11430
11431#ifndef _POSIX_C_SOURCE
11432#error _POSIX_C_SOURCE is not defined
11433#endif
11434  ;
11435  return 0;
11436}
11437_ACEOF
11438rm -f "conftest.$ac_objext"
11439if { (eval echo "$as_me:11439: \"$ac_compile\"") >&5
11440  (eval $ac_compile) 2>&5
11441  ac_status=$?
11442  echo "$as_me:11442: \$? = $ac_status" >&5
11443  (exit "$ac_status"); } &&
11444         { ac_try='test -s "conftest.$ac_objext"'
11445  { (eval echo "$as_me:11445: \"$ac_try\"") >&5
11446  (eval $ac_try) 2>&5
11447  ac_status=$?
11448  echo "$as_me:11448: \$? = $ac_status" >&5
11449  (exit "$ac_status"); }; }; then
11450  :
11451else
11452  echo "$as_me: failed program was:" >&5
11453cat "conftest.$ac_ext" >&5
11454cf_cv_posix_c_source=no
11455fi
11456rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11457	 CFLAGS="$cf_save_CFLAGS"
11458	 CPPFLAGS="$cf_save_CPPFLAGS"
11459
11460fi
11461rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11462
11463fi
11464echo "$as_me:11464: result: $cf_cv_posix_c_source" >&5
11465echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11466
11467if test "$cf_cv_posix_c_source" != no ; then
11468	CFLAGS="$cf_trim_CFLAGS"
11469	CPPFLAGS="$cf_trim_CPPFLAGS"
11470
11471cf_fix_cppflags=no
11472cf_new_cflags=
11473cf_new_cppflags=
11474cf_new_extra_cppflags=
11475
11476for cf_add_cflags in $cf_cv_posix_c_source
11477do
11478case "$cf_fix_cppflags" in
11479(no)
11480	case "$cf_add_cflags" in
11481	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11482		case "$cf_add_cflags" in
11483		(-D*)
11484			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11485
11486			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11487				&& test -z "${cf_tst_cflags}" \
11488				&& cf_fix_cppflags=yes
11489
11490			if test "$cf_fix_cppflags" = yes ; then
11491
11492	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11493	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11494
11495				continue
11496			elif test "${cf_tst_cflags}" = "\"'" ; then
11497
11498	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11499	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11500
11501				continue
11502			fi
11503			;;
11504		esac
11505		case "$CPPFLAGS" in
11506		(*$cf_add_cflags)
11507			;;
11508		(*)
11509			case "$cf_add_cflags" in
11510			(-D*)
11511				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11512
11513CPPFLAGS=`echo "$CPPFLAGS" | \
11514	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11515		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11516
11517				;;
11518			esac
11519
11520	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11521	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11522
11523			;;
11524		esac
11525		;;
11526	(*)
11527
11528	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11529	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11530
11531		;;
11532	esac
11533	;;
11534(yes)
11535
11536	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11537	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11538
11539	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11540
11541	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11542		&& test -z "${cf_tst_cflags}" \
11543		&& cf_fix_cppflags=no
11544	;;
11545esac
11546done
11547
11548if test -n "$cf_new_cflags" ; then
11549
11550	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11551	CFLAGS="${CFLAGS}$cf_new_cflags"
11552
11553fi
11554
11555if test -n "$cf_new_cppflags" ; then
11556
11557	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11558	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11559
11560fi
11561
11562if test -n "$cf_new_extra_cppflags" ; then
11563
11564	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11565	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11566
11567fi
11568
11569fi
11570
11571fi # cf_cv_posix_visible
11572
11573	;;
11574(netbsd*)
11575	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11576	;;
11577(openbsd[6-9]*)
11578	# OpenBSD 6.x has broken locale support, both compile-time and runtime.
11579	# see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
11580	# Abusing the conformance level is a workaround.
11581	{ echo "$as_me:11581: WARNING: this system does not provide usable locale support" >&5
11582echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
11583	cf_xopen_source="-D_BSD_SOURCE"
11584	cf_XOPEN_SOURCE=700
11585	;;
11586(openbsd[4-5]*)
11587	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11588	cf_xopen_source="-D_BSD_SOURCE"
11589	cf_XOPEN_SOURCE=600
11590	;;
11591(openbsd*)
11592	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11593	;;
11594(osf[45]*)
11595	cf_xopen_source="-D_OSF_SOURCE"
11596	;;
11597(nto-qnx*)
11598	cf_xopen_source="-D_QNX_SOURCE"
11599	;;
11600(sco*)
11601	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11602	;;
11603(solaris2.*)
11604	cf_xopen_source="-D__EXTENSIONS__"
11605	cf_cv_xopen_source=broken
11606	;;
11607(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11608	cf_XOPEN_SOURCE=
11609	cf_POSIX_C_SOURCE=
11610	;;
11611(*)
11612
11613echo "$as_me:11613: checking if we should define _XOPEN_SOURCE" >&5
11614echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11615if test "${cf_cv_xopen_source+set}" = set; then
11616  echo $ECHO_N "(cached) $ECHO_C" >&6
11617else
11618
11619	cat >"conftest.$ac_ext" <<_ACEOF
11620#line 11620 "configure"
11621#include "confdefs.h"
11622
11623$ac_includes_default
11624
11625int
11626main (void)
11627{
11628
11629#ifndef _XOPEN_SOURCE
11630#error _XOPEN_SOURCE is not defined
11631#endif
11632
11633  ;
11634  return 0;
11635}
11636_ACEOF
11637rm -f "conftest.$ac_objext"
11638if { (eval echo "$as_me:11638: \"$ac_compile\"") >&5
11639  (eval $ac_compile) 2>&5
11640  ac_status=$?
11641  echo "$as_me:11641: \$? = $ac_status" >&5
11642  (exit "$ac_status"); } &&
11643         { ac_try='test -s "conftest.$ac_objext"'
11644  { (eval echo "$as_me:11644: \"$ac_try\"") >&5
11645  (eval $ac_try) 2>&5
11646  ac_status=$?
11647  echo "$as_me:11647: \$? = $ac_status" >&5
11648  (exit "$ac_status"); }; }; then
11649  cf_cv_xopen_source=no
11650else
11651  echo "$as_me: failed program was:" >&5
11652cat "conftest.$ac_ext" >&5
11653cf_save="$CPPFLAGS"
11654
11655	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11656	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11657
11658	 cat >"conftest.$ac_ext" <<_ACEOF
11659#line 11659 "configure"
11660#include "confdefs.h"
11661
11662$ac_includes_default
11663
11664int
11665main (void)
11666{
11667
11668#ifndef _XOPEN_SOURCE
11669#error _XOPEN_SOURCE is not defined
11670#endif
11671
11672  ;
11673  return 0;
11674}
11675_ACEOF
11676rm -f "conftest.$ac_objext"
11677if { (eval echo "$as_me:11677: \"$ac_compile\"") >&5
11678  (eval $ac_compile) 2>&5
11679  ac_status=$?
11680  echo "$as_me:11680: \$? = $ac_status" >&5
11681  (exit "$ac_status"); } &&
11682         { ac_try='test -s "conftest.$ac_objext"'
11683  { (eval echo "$as_me:11683: \"$ac_try\"") >&5
11684  (eval $ac_try) 2>&5
11685  ac_status=$?
11686  echo "$as_me:11686: \$? = $ac_status" >&5
11687  (exit "$ac_status"); }; }; then
11688  cf_cv_xopen_source=no
11689else
11690  echo "$as_me: failed program was:" >&5
11691cat "conftest.$ac_ext" >&5
11692cf_cv_xopen_source=$cf_XOPEN_SOURCE
11693fi
11694rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11695		CPPFLAGS="$cf_save"
11696
11697fi
11698rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11699
11700fi
11701echo "$as_me:11701: result: $cf_cv_xopen_source" >&5
11702echo "${ECHO_T}$cf_cv_xopen_source" >&6
11703
11704if test "$cf_cv_xopen_source" != no ; then
11705
11706CFLAGS=`echo "$CFLAGS" | \
11707	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
11708		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
11709
11710CPPFLAGS=`echo "$CPPFLAGS" | \
11711	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
11712		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
11713
11714	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11715
11716for cf_add_cflags in $cf_temp_xopen_source
11717do
11718	case "x$cf_add_cflags" in
11719	(x-[DU]*)
11720
11721cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11722while true
11723do
11724	cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11725	test "$CFLAGS" != "$cf_old_cflag" || break
11726
11727	CFLAGS="$cf_old_cflag"
11728done
11729
11730cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11731while true
11732do
11733	cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11734	test "$CPPFLAGS" != "$cf_old_cflag" || break
11735
11736	CPPFLAGS="$cf_old_cflag"
11737done
11738
11739		;;
11740	esac
11741
11742cf_fix_cppflags=no
11743cf_new_cflags=
11744cf_new_cppflags=
11745cf_new_extra_cppflags=
11746
11747for cf_add_cflags in $cf_add_cflags
11748do
11749case "$cf_fix_cppflags" in
11750(no)
11751	case "$cf_add_cflags" in
11752	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11753		case "$cf_add_cflags" in
11754		(-D*)
11755			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11756
11757			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11758				&& test -z "${cf_tst_cflags}" \
11759				&& cf_fix_cppflags=yes
11760
11761			if test "$cf_fix_cppflags" = yes ; then
11762
11763	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11764	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11765
11766				continue
11767			elif test "${cf_tst_cflags}" = "\"'" ; then
11768
11769	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11770	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11771
11772				continue
11773			fi
11774			;;
11775		esac
11776		case "$CPPFLAGS" in
11777		(*$cf_add_cflags)
11778			;;
11779		(*)
11780			case "$cf_add_cflags" in
11781			(-D*)
11782				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11783
11784CPPFLAGS=`echo "$CPPFLAGS" | \
11785	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11786		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11787
11788				;;
11789			esac
11790
11791	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11792	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11793
11794			;;
11795		esac
11796		;;
11797	(*)
11798
11799	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11800	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11801
11802		;;
11803	esac
11804	;;
11805(yes)
11806
11807	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11808	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11809
11810	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11811
11812	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11813		&& test -z "${cf_tst_cflags}" \
11814		&& cf_fix_cppflags=no
11815	;;
11816esac
11817done
11818
11819if test -n "$cf_new_cflags" ; then
11820
11821	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11822	CFLAGS="${CFLAGS}$cf_new_cflags"
11823
11824fi
11825
11826if test -n "$cf_new_cppflags" ; then
11827
11828	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11829	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11830
11831fi
11832
11833if test -n "$cf_new_extra_cppflags" ; then
11834
11835	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11836	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11837
11838fi
11839
11840done
11841
11842fi
11843
11844	cf_save_xopen_cppflags="$CPPFLAGS"
11845
11846if test "$cf_cv_posix_visible" = no; then
11847
11848cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11849
11850cf_save_CFLAGS="$CFLAGS"
11851cf_save_CPPFLAGS="$CPPFLAGS"
11852
11853cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11854	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
11855		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
11856
11857cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11858	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
11859		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
11860
11861echo "$as_me:11861: checking if we should define _POSIX_C_SOURCE" >&5
11862echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11863if test "${cf_cv_posix_c_source+set}" = set; then
11864  echo $ECHO_N "(cached) $ECHO_C" >&6
11865else
11866
11867echo "${as_me:-configure}:11867: testing if the symbol is already defined go no further ..." 1>&5
11868
11869	cat >"conftest.$ac_ext" <<_ACEOF
11870#line 11870 "configure"
11871#include "confdefs.h"
11872#include <sys/types.h>
11873int
11874main (void)
11875{
11876
11877#ifndef _POSIX_C_SOURCE
11878#error _POSIX_C_SOURCE is not defined
11879#endif
11880  ;
11881  return 0;
11882}
11883_ACEOF
11884rm -f "conftest.$ac_objext"
11885if { (eval echo "$as_me:11885: \"$ac_compile\"") >&5
11886  (eval $ac_compile) 2>&5
11887  ac_status=$?
11888  echo "$as_me:11888: \$? = $ac_status" >&5
11889  (exit "$ac_status"); } &&
11890         { ac_try='test -s "conftest.$ac_objext"'
11891  { (eval echo "$as_me:11891: \"$ac_try\"") >&5
11892  (eval $ac_try) 2>&5
11893  ac_status=$?
11894  echo "$as_me:11894: \$? = $ac_status" >&5
11895  (exit "$ac_status"); }; }; then
11896  cf_cv_posix_c_source=no
11897else
11898  echo "$as_me: failed program was:" >&5
11899cat "conftest.$ac_ext" >&5
11900cf_want_posix_source=no
11901	 case .$cf_POSIX_C_SOURCE in
11902	 (.[12]??*)
11903		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11904		;;
11905	 (.2)
11906		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11907		cf_want_posix_source=yes
11908		;;
11909	 (.*)
11910		cf_want_posix_source=yes
11911		;;
11912	 esac
11913	 if test "$cf_want_posix_source" = yes ; then
11914		cat >"conftest.$ac_ext" <<_ACEOF
11915#line 11915 "configure"
11916#include "confdefs.h"
11917#include <sys/types.h>
11918int
11919main (void)
11920{
11921
11922#ifdef _POSIX_SOURCE
11923#error _POSIX_SOURCE is defined
11924#endif
11925  ;
11926  return 0;
11927}
11928_ACEOF
11929rm -f "conftest.$ac_objext"
11930if { (eval echo "$as_me:11930: \"$ac_compile\"") >&5
11931  (eval $ac_compile) 2>&5
11932  ac_status=$?
11933  echo "$as_me:11933: \$? = $ac_status" >&5
11934  (exit "$ac_status"); } &&
11935         { ac_try='test -s "conftest.$ac_objext"'
11936  { (eval echo "$as_me:11936: \"$ac_try\"") >&5
11937  (eval $ac_try) 2>&5
11938  ac_status=$?
11939  echo "$as_me:11939: \$? = $ac_status" >&5
11940  (exit "$ac_status"); }; }; then
11941  :
11942else
11943  echo "$as_me: failed program was:" >&5
11944cat "conftest.$ac_ext" >&5
11945cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11946fi
11947rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11948	 fi
11949
11950echo "${as_me:-configure}:11950: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11951
11952	 CFLAGS="$cf_trim_CFLAGS"
11953	 CPPFLAGS="$cf_trim_CPPFLAGS"
11954
11955	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11956	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11957
11958echo "${as_me:-configure}:11958: testing if the second compile does not leave our definition intact error ..." 1>&5
11959
11960	 cat >"conftest.$ac_ext" <<_ACEOF
11961#line 11961 "configure"
11962#include "confdefs.h"
11963#include <sys/types.h>
11964int
11965main (void)
11966{
11967
11968#ifndef _POSIX_C_SOURCE
11969#error _POSIX_C_SOURCE is not defined
11970#endif
11971  ;
11972  return 0;
11973}
11974_ACEOF
11975rm -f "conftest.$ac_objext"
11976if { (eval echo "$as_me:11976: \"$ac_compile\"") >&5
11977  (eval $ac_compile) 2>&5
11978  ac_status=$?
11979  echo "$as_me:11979: \$? = $ac_status" >&5
11980  (exit "$ac_status"); } &&
11981         { ac_try='test -s "conftest.$ac_objext"'
11982  { (eval echo "$as_me:11982: \"$ac_try\"") >&5
11983  (eval $ac_try) 2>&5
11984  ac_status=$?
11985  echo "$as_me:11985: \$? = $ac_status" >&5
11986  (exit "$ac_status"); }; }; then
11987  :
11988else
11989  echo "$as_me: failed program was:" >&5
11990cat "conftest.$ac_ext" >&5
11991cf_cv_posix_c_source=no
11992fi
11993rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11994	 CFLAGS="$cf_save_CFLAGS"
11995	 CPPFLAGS="$cf_save_CPPFLAGS"
11996
11997fi
11998rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11999
12000fi
12001echo "$as_me:12001: result: $cf_cv_posix_c_source" >&5
12002echo "${ECHO_T}$cf_cv_posix_c_source" >&6
12003
12004if test "$cf_cv_posix_c_source" != no ; then
12005	CFLAGS="$cf_trim_CFLAGS"
12006	CPPFLAGS="$cf_trim_CPPFLAGS"
12007
12008cf_fix_cppflags=no
12009cf_new_cflags=
12010cf_new_cppflags=
12011cf_new_extra_cppflags=
12012
12013for cf_add_cflags in $cf_cv_posix_c_source
12014do
12015case "$cf_fix_cppflags" in
12016(no)
12017	case "$cf_add_cflags" in
12018	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12019		case "$cf_add_cflags" in
12020		(-D*)
12021			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12022
12023			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12024				&& test -z "${cf_tst_cflags}" \
12025				&& cf_fix_cppflags=yes
12026
12027			if test "$cf_fix_cppflags" = yes ; then
12028
12029	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12030	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12031
12032				continue
12033			elif test "${cf_tst_cflags}" = "\"'" ; then
12034
12035	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12036	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12037
12038				continue
12039			fi
12040			;;
12041		esac
12042		case "$CPPFLAGS" in
12043		(*$cf_add_cflags)
12044			;;
12045		(*)
12046			case "$cf_add_cflags" in
12047			(-D*)
12048				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12049
12050CPPFLAGS=`echo "$CPPFLAGS" | \
12051	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12052		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12053
12054				;;
12055			esac
12056
12057	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12058	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12059
12060			;;
12061		esac
12062		;;
12063	(*)
12064
12065	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12066	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12067
12068		;;
12069	esac
12070	;;
12071(yes)
12072
12073	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12074	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12075
12076	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12077
12078	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12079		&& test -z "${cf_tst_cflags}" \
12080		&& cf_fix_cppflags=no
12081	;;
12082esac
12083done
12084
12085if test -n "$cf_new_cflags" ; then
12086
12087	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12088	CFLAGS="${CFLAGS}$cf_new_cflags"
12089
12090fi
12091
12092if test -n "$cf_new_cppflags" ; then
12093
12094	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12095	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12096
12097fi
12098
12099if test -n "$cf_new_extra_cppflags" ; then
12100
12101	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12102	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12103
12104fi
12105
12106fi
12107
12108fi # cf_cv_posix_visible
12109
12110	# Some of these niche implementations use copy/paste, double-check...
12111	if test "$cf_cv_xopen_source" = no ; then
12112		test -n "$verbose" && echo "	checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
12113
12114echo "${as_me:-configure}:12114: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
12115
12116		cat >"conftest.$ac_ext" <<_ACEOF
12117#line 12117 "configure"
12118#include "confdefs.h"
12119
12120$ac_includes_default
12121
12122int
12123main (void)
12124{
12125
12126#ifndef _XOPEN_SOURCE
12127#error _XOPEN_SOURCE is not defined
12128#endif
12129
12130  ;
12131  return 0;
12132}
12133_ACEOF
12134rm -f "conftest.$ac_objext"
12135if { (eval echo "$as_me:12135: \"$ac_compile\"") >&5
12136  (eval $ac_compile) 2>&5
12137  ac_status=$?
12138  echo "$as_me:12138: \$? = $ac_status" >&5
12139  (exit "$ac_status"); } &&
12140         { ac_try='test -s "conftest.$ac_objext"'
12141  { (eval echo "$as_me:12141: \"$ac_try\"") >&5
12142  (eval $ac_try) 2>&5
12143  ac_status=$?
12144  echo "$as_me:12144: \$? = $ac_status" >&5
12145  (exit "$ac_status"); }; }; then
12146  :
12147else
12148  echo "$as_me: failed program was:" >&5
12149cat "conftest.$ac_ext" >&5
12150
12151			{ echo "$as_me:12151: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
12152echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
12153			CPPFLAGS="$cf_save_xopen_cppflags"
12154fi
12155rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12156	fi
12157	;;
12158esac
12159
12160if test -n "$cf_xopen_source" ; then
12161
12162for cf_add_cflags in $cf_xopen_source
12163do
12164	case "x$cf_add_cflags" in
12165	(x-[DU]*)
12166
12167cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12168while true
12169do
12170	cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
12171	test "$CFLAGS" != "$cf_old_cflag" || break
12172	test -n "$verbose" && echo "	removing old option $cf_add_cflags from CFLAGS" 1>&6
12173
12174echo "${as_me:-configure}:12174: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
12175
12176	CFLAGS="$cf_old_cflag"
12177done
12178
12179cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12180while true
12181do
12182	cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
12183	test "$CPPFLAGS" != "$cf_old_cflag" || break
12184	test -n "$verbose" && echo "	removing old option $cf_add_cflags from CPPFLAGS" 1>&6
12185
12186echo "${as_me:-configure}:12186: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
12187
12188	CPPFLAGS="$cf_old_cflag"
12189done
12190
12191		;;
12192	esac
12193
12194cf_fix_cppflags=no
12195cf_new_cflags=
12196cf_new_cppflags=
12197cf_new_extra_cppflags=
12198
12199for cf_add_cflags in $cf_add_cflags
12200do
12201case "$cf_fix_cppflags" in
12202(no)
12203	case "$cf_add_cflags" in
12204	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12205		case "$cf_add_cflags" in
12206		(-D*)
12207			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12208
12209			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12210				&& test -z "${cf_tst_cflags}" \
12211				&& cf_fix_cppflags=yes
12212
12213			if test "$cf_fix_cppflags" = yes ; then
12214
12215	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12216	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12217
12218				continue
12219			elif test "${cf_tst_cflags}" = "\"'" ; then
12220
12221	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12222	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12223
12224				continue
12225			fi
12226			;;
12227		esac
12228		case "$CPPFLAGS" in
12229		(*$cf_add_cflags)
12230			;;
12231		(*)
12232			case "$cf_add_cflags" in
12233			(-D*)
12234				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12235
12236CPPFLAGS=`echo "$CPPFLAGS" | \
12237	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12238		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12239
12240				;;
12241			esac
12242
12243	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12244	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12245
12246			;;
12247		esac
12248		;;
12249	(*)
12250
12251	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12252	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12253
12254		;;
12255	esac
12256	;;
12257(yes)
12258
12259	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12260	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12261
12262	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12263
12264	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12265		&& test -z "${cf_tst_cflags}" \
12266		&& cf_fix_cppflags=no
12267	;;
12268esac
12269done
12270
12271if test -n "$cf_new_cflags" ; then
12272	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
12273
12274echo "${as_me:-configure}:12274: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12275
12276	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12277	CFLAGS="${CFLAGS}$cf_new_cflags"
12278
12279fi
12280
12281if test -n "$cf_new_cppflags" ; then
12282	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12283
12284echo "${as_me:-configure}:12284: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12285
12286	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12287	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12288
12289fi
12290
12291if test -n "$cf_new_extra_cppflags" ; then
12292	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12293
12294echo "${as_me:-configure}:12294: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12295
12296	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12297	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12298
12299fi
12300
12301done
12302
12303fi
12304
12305if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
12306	echo "$as_me:12306: checking if _XOPEN_SOURCE really is set" >&5
12307echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
12308	cat >"conftest.$ac_ext" <<_ACEOF
12309#line 12309 "configure"
12310#include "confdefs.h"
12311#include <stdlib.h>
12312int
12313main (void)
12314{
12315
12316#ifndef _XOPEN_SOURCE
12317#error _XOPEN_SOURCE is not defined
12318#endif
12319  ;
12320  return 0;
12321}
12322_ACEOF
12323rm -f "conftest.$ac_objext"
12324if { (eval echo "$as_me:12324: \"$ac_compile\"") >&5
12325  (eval $ac_compile) 2>&5
12326  ac_status=$?
12327  echo "$as_me:12327: \$? = $ac_status" >&5
12328  (exit "$ac_status"); } &&
12329         { ac_try='test -s "conftest.$ac_objext"'
12330  { (eval echo "$as_me:12330: \"$ac_try\"") >&5
12331  (eval $ac_try) 2>&5
12332  ac_status=$?
12333  echo "$as_me:12333: \$? = $ac_status" >&5
12334  (exit "$ac_status"); }; }; then
12335  cf_XOPEN_SOURCE_set=yes
12336else
12337  echo "$as_me: failed program was:" >&5
12338cat "conftest.$ac_ext" >&5
12339cf_XOPEN_SOURCE_set=no
12340fi
12341rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12342	echo "$as_me:12342: result: $cf_XOPEN_SOURCE_set" >&5
12343echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
12344	if test "$cf_XOPEN_SOURCE_set" = yes
12345	then
12346		cat >"conftest.$ac_ext" <<_ACEOF
12347#line 12347 "configure"
12348#include "confdefs.h"
12349#include <stdlib.h>
12350int
12351main (void)
12352{
12353
12354#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
12355#error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
12356#endif
12357  ;
12358  return 0;
12359}
12360_ACEOF
12361rm -f "conftest.$ac_objext"
12362if { (eval echo "$as_me:12362: \"$ac_compile\"") >&5
12363  (eval $ac_compile) 2>&5
12364  ac_status=$?
12365  echo "$as_me:12365: \$? = $ac_status" >&5
12366  (exit "$ac_status"); } &&
12367         { ac_try='test -s "conftest.$ac_objext"'
12368  { (eval echo "$as_me:12368: \"$ac_try\"") >&5
12369  (eval $ac_try) 2>&5
12370  ac_status=$?
12371  echo "$as_me:12371: \$? = $ac_status" >&5
12372  (exit "$ac_status"); }; }; then
12373  cf_XOPEN_SOURCE_set_ok=yes
12374else
12375  echo "$as_me: failed program was:" >&5
12376cat "conftest.$ac_ext" >&5
12377cf_XOPEN_SOURCE_set_ok=no
12378fi
12379rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12380		if test "$cf_XOPEN_SOURCE_set_ok" = no
12381		then
12382			{ echo "$as_me:12382: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12383echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12384		fi
12385	else
12386
12387echo "$as_me:12387: checking if we should define _XOPEN_SOURCE" >&5
12388echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12389if test "${cf_cv_xopen_source+set}" = set; then
12390  echo $ECHO_N "(cached) $ECHO_C" >&6
12391else
12392
12393	cat >"conftest.$ac_ext" <<_ACEOF
12394#line 12394 "configure"
12395#include "confdefs.h"
12396
12397$ac_includes_default
12398
12399int
12400main (void)
12401{
12402
12403#ifndef _XOPEN_SOURCE
12404#error _XOPEN_SOURCE is not defined
12405#endif
12406
12407  ;
12408  return 0;
12409}
12410_ACEOF
12411rm -f "conftest.$ac_objext"
12412if { (eval echo "$as_me:12412: \"$ac_compile\"") >&5
12413  (eval $ac_compile) 2>&5
12414  ac_status=$?
12415  echo "$as_me:12415: \$? = $ac_status" >&5
12416  (exit "$ac_status"); } &&
12417         { ac_try='test -s "conftest.$ac_objext"'
12418  { (eval echo "$as_me:12418: \"$ac_try\"") >&5
12419  (eval $ac_try) 2>&5
12420  ac_status=$?
12421  echo "$as_me:12421: \$? = $ac_status" >&5
12422  (exit "$ac_status"); }; }; then
12423  cf_cv_xopen_source=no
12424else
12425  echo "$as_me: failed program was:" >&5
12426cat "conftest.$ac_ext" >&5
12427cf_save="$CPPFLAGS"
12428
12429	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12430	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12431
12432	 cat >"conftest.$ac_ext" <<_ACEOF
12433#line 12433 "configure"
12434#include "confdefs.h"
12435
12436$ac_includes_default
12437
12438int
12439main (void)
12440{
12441
12442#ifndef _XOPEN_SOURCE
12443#error _XOPEN_SOURCE is not defined
12444#endif
12445
12446  ;
12447  return 0;
12448}
12449_ACEOF
12450rm -f "conftest.$ac_objext"
12451if { (eval echo "$as_me:12451: \"$ac_compile\"") >&5
12452  (eval $ac_compile) 2>&5
12453  ac_status=$?
12454  echo "$as_me:12454: \$? = $ac_status" >&5
12455  (exit "$ac_status"); } &&
12456         { ac_try='test -s "conftest.$ac_objext"'
12457  { (eval echo "$as_me:12457: \"$ac_try\"") >&5
12458  (eval $ac_try) 2>&5
12459  ac_status=$?
12460  echo "$as_me:12460: \$? = $ac_status" >&5
12461  (exit "$ac_status"); }; }; then
12462  cf_cv_xopen_source=no
12463else
12464  echo "$as_me: failed program was:" >&5
12465cat "conftest.$ac_ext" >&5
12466cf_cv_xopen_source=$cf_XOPEN_SOURCE
12467fi
12468rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12469		CPPFLAGS="$cf_save"
12470
12471fi
12472rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12473
12474fi
12475echo "$as_me:12475: result: $cf_cv_xopen_source" >&5
12476echo "${ECHO_T}$cf_cv_xopen_source" >&6
12477
12478if test "$cf_cv_xopen_source" != no ; then
12479
12480CFLAGS=`echo "$CFLAGS" | \
12481	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
12482		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
12483
12484CPPFLAGS=`echo "$CPPFLAGS" | \
12485	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
12486		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
12487
12488	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12489
12490for cf_add_cflags in $cf_temp_xopen_source
12491do
12492	case "x$cf_add_cflags" in
12493	(x-[DU]*)
12494
12495cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12496while true
12497do
12498	cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
12499	test "$CFLAGS" != "$cf_old_cflag" || break
12500
12501	CFLAGS="$cf_old_cflag"
12502done
12503
12504cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12505while true
12506do
12507	cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
12508	test "$CPPFLAGS" != "$cf_old_cflag" || break
12509
12510	CPPFLAGS="$cf_old_cflag"
12511done
12512
12513		;;
12514	esac
12515
12516cf_fix_cppflags=no
12517cf_new_cflags=
12518cf_new_cppflags=
12519cf_new_extra_cppflags=
12520
12521for cf_add_cflags in $cf_add_cflags
12522do
12523case "$cf_fix_cppflags" in
12524(no)
12525	case "$cf_add_cflags" in
12526	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12527		case "$cf_add_cflags" in
12528		(-D*)
12529			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12530
12531			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12532				&& test -z "${cf_tst_cflags}" \
12533				&& cf_fix_cppflags=yes
12534
12535			if test "$cf_fix_cppflags" = yes ; then
12536
12537	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12538	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12539
12540				continue
12541			elif test "${cf_tst_cflags}" = "\"'" ; then
12542
12543	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12544	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12545
12546				continue
12547			fi
12548			;;
12549		esac
12550		case "$CPPFLAGS" in
12551		(*$cf_add_cflags)
12552			;;
12553		(*)
12554			case "$cf_add_cflags" in
12555			(-D*)
12556				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12557
12558CPPFLAGS=`echo "$CPPFLAGS" | \
12559	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12560		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12561
12562				;;
12563			esac
12564
12565	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12566	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12567
12568			;;
12569		esac
12570		;;
12571	(*)
12572
12573	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12574	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12575
12576		;;
12577	esac
12578	;;
12579(yes)
12580
12581	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12582	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12583
12584	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12585
12586	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12587		&& test -z "${cf_tst_cflags}" \
12588		&& cf_fix_cppflags=no
12589	;;
12590esac
12591done
12592
12593if test -n "$cf_new_cflags" ; then
12594
12595	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12596	CFLAGS="${CFLAGS}$cf_new_cflags"
12597
12598fi
12599
12600if test -n "$cf_new_cppflags" ; then
12601
12602	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12603	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12604
12605fi
12606
12607if test -n "$cf_new_extra_cppflags" ; then
12608
12609	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12610	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12611
12612fi
12613
12614done
12615
12616fi
12617
12618	fi
12619fi
12620fi # cf_cv_posix_visible
12621
12622CPPFLAGS_after_XOPEN="$CPPFLAGS"
12623
12624# Work around breakage on OS X
12625
12626echo "$as_me:12626: checking if SIGWINCH is defined" >&5
12627echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
12628if test "${cf_cv_define_sigwinch+set}" = set; then
12629  echo $ECHO_N "(cached) $ECHO_C" >&6
12630else
12631
12632	cat >"conftest.$ac_ext" <<_ACEOF
12633#line 12633 "configure"
12634#include "confdefs.h"
12635
12636#include <sys/types.h>
12637#include <sys/signal.h>
12638
12639int
12640main (void)
12641{
12642int x = SIGWINCH; (void)x
12643  ;
12644  return 0;
12645}
12646_ACEOF
12647rm -f "conftest.$ac_objext"
12648if { (eval echo "$as_me:12648: \"$ac_compile\"") >&5
12649  (eval $ac_compile) 2>&5
12650  ac_status=$?
12651  echo "$as_me:12651: \$? = $ac_status" >&5
12652  (exit "$ac_status"); } &&
12653         { ac_try='test -s "conftest.$ac_objext"'
12654  { (eval echo "$as_me:12654: \"$ac_try\"") >&5
12655  (eval $ac_try) 2>&5
12656  ac_status=$?
12657  echo "$as_me:12657: \$? = $ac_status" >&5
12658  (exit "$ac_status"); }; }; then
12659  cf_cv_define_sigwinch=yes
12660else
12661  echo "$as_me: failed program was:" >&5
12662cat "conftest.$ac_ext" >&5
12663cat >"conftest.$ac_ext" <<_ACEOF
12664#line 12664 "configure"
12665#include "confdefs.h"
12666
12667#undef _XOPEN_SOURCE
12668#undef _POSIX_SOURCE
12669#undef _POSIX_C_SOURCE
12670#include <sys/types.h>
12671#include <sys/signal.h>
12672
12673int
12674main (void)
12675{
12676int x = SIGWINCH; (void)x
12677  ;
12678  return 0;
12679}
12680_ACEOF
12681rm -f "conftest.$ac_objext"
12682if { (eval echo "$as_me:12682: \"$ac_compile\"") >&5
12683  (eval $ac_compile) 2>&5
12684  ac_status=$?
12685  echo "$as_me:12685: \$? = $ac_status" >&5
12686  (exit "$ac_status"); } &&
12687         { ac_try='test -s "conftest.$ac_objext"'
12688  { (eval echo "$as_me:12688: \"$ac_try\"") >&5
12689  (eval $ac_try) 2>&5
12690  ac_status=$?
12691  echo "$as_me:12691: \$? = $ac_status" >&5
12692  (exit "$ac_status"); }; }; then
12693  cf_cv_define_sigwinch=maybe
12694else
12695  echo "$as_me: failed program was:" >&5
12696cat "conftest.$ac_ext" >&5
12697cf_cv_define_sigwinch=no
12698fi
12699rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12700
12701fi
12702rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12703
12704fi
12705echo "$as_me:12705: result: $cf_cv_define_sigwinch" >&5
12706echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
12707
12708if test "$cf_cv_define_sigwinch" = maybe ; then
12709echo "$as_me:12709: checking for actual SIGWINCH definition" >&5
12710echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
12711if test "${cf_cv_fixup_sigwinch+set}" = set; then
12712  echo $ECHO_N "(cached) $ECHO_C" >&6
12713else
12714
12715cf_cv_fixup_sigwinch=unknown
12716cf_sigwinch=32
12717while test "$cf_sigwinch" != 1
12718do
12719	cat >"conftest.$ac_ext" <<_ACEOF
12720#line 12720 "configure"
12721#include "confdefs.h"
12722
12723#undef _XOPEN_SOURCE
12724#undef _POSIX_SOURCE
12725#undef _POSIX_C_SOURCE
12726#include <sys/types.h>
12727#include <sys/signal.h>
12728
12729int
12730main (void)
12731{
12732
12733#if SIGWINCH != $cf_sigwinch
12734#error SIGWINCH is not $cf_sigwinch
12735#endif
12736int x = SIGWINCH; (void)x
12737  ;
12738  return 0;
12739}
12740_ACEOF
12741rm -f "conftest.$ac_objext"
12742if { (eval echo "$as_me:12742: \"$ac_compile\"") >&5
12743  (eval $ac_compile) 2>&5
12744  ac_status=$?
12745  echo "$as_me:12745: \$? = $ac_status" >&5
12746  (exit "$ac_status"); } &&
12747         { ac_try='test -s "conftest.$ac_objext"'
12748  { (eval echo "$as_me:12748: \"$ac_try\"") >&5
12749  (eval $ac_try) 2>&5
12750  ac_status=$?
12751  echo "$as_me:12751: \$? = $ac_status" >&5
12752  (exit "$ac_status"); }; }; then
12753  cf_cv_fixup_sigwinch=$cf_sigwinch
12754	 break
12755else
12756  echo "$as_me: failed program was:" >&5
12757cat "conftest.$ac_ext" >&5
12758fi
12759rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12760
12761cf_sigwinch="`expr "$cf_sigwinch" - 1`"
12762done
12763
12764fi
12765echo "$as_me:12765: result: $cf_cv_fixup_sigwinch" >&5
12766echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
12767
12768	if test "$cf_cv_fixup_sigwinch" != unknown ; then
12769		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
12770	fi
12771fi
12772
12773# Checks for CODESET support.
12774
12775echo "$as_me:12775: checking for nl_langinfo and CODESET" >&5
12776echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
12777if test "${am_cv_langinfo_codeset+set}" = set; then
12778  echo $ECHO_N "(cached) $ECHO_C" >&6
12779else
12780  cat >"conftest.$ac_ext" <<_ACEOF
12781#line 12781 "configure"
12782#include "confdefs.h"
12783
12784$ac_includes_default
12785#include <langinfo.h>
12786int
12787main (void)
12788{
12789char* cs = nl_langinfo(CODESET); (void)cs
12790  ;
12791  return 0;
12792}
12793_ACEOF
12794rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12795if { (eval echo "$as_me:12795: \"$ac_link\"") >&5
12796  (eval $ac_link) 2>&5
12797  ac_status=$?
12798  echo "$as_me:12798: \$? = $ac_status" >&5
12799  (exit "$ac_status"); } &&
12800         { ac_try='test -s "conftest$ac_exeext"'
12801  { (eval echo "$as_me:12801: \"$ac_try\"") >&5
12802  (eval $ac_try) 2>&5
12803  ac_status=$?
12804  echo "$as_me:12804: \$? = $ac_status" >&5
12805  (exit "$ac_status"); }; }; then
12806  am_cv_langinfo_codeset=yes
12807else
12808  echo "$as_me: failed program was:" >&5
12809cat "conftest.$ac_ext" >&5
12810am_cv_langinfo_codeset=no
12811fi
12812rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12813
12814fi
12815echo "$as_me:12815: result: $am_cv_langinfo_codeset" >&5
12816echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
12817	if test "$am_cv_langinfo_codeset" = yes; then
12818
12819cat >>confdefs.h <<\EOF
12820#define HAVE_LANGINFO_CODESET 1
12821EOF
12822
12823	fi
12824
12825# use these variables to work around a defect in gcc's fixincludes.
12826NCURSES_OK_WCHAR_T=
12827NCURSES_OK_WINT_T=
12828
12829echo "$as_me:12829: checking if you want wide-character code" >&5
12830echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12831
12832# Check whether --enable-widec or --disable-widec was given.
12833if test "${enable_widec+set}" = set; then
12834  enableval="$enable_widec"
12835  with_widec=$enableval
12836else
12837  with_widec=$cf_dft_widec
12838fi;
12839echo "$as_me:12839: result: $with_widec" >&5
12840echo "${ECHO_T}$with_widec" >&6
12841
12842NCURSES_WCWIDTH_GRAPHICS=1
12843
12844if test "x$with_widec" = xyes ; then
12845	if test "x$disable_lib_suffixes" = xno ; then
12846		LIB_SUFFIX="w${LIB_SUFFIX}"
12847	fi
12848
12849cat >>confdefs.h <<\EOF
12850#define USE_WIDEC_SUPPORT 1
12851EOF
12852
12853cat >>confdefs.h <<\EOF
12854#define NCURSES_WIDECHAR 1
12855EOF
12856
12857	case "$CPPFLAGS" in
12858	(*_XOPEN_SOURCE=*)
12859		;;
12860	(*)
12861		{ echo "$as_me:12861: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12862echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12863		# CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12864		CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12865		;;
12866	esac
12867
12868for ac_header in \
12869wchar.h \
12870wctype.h \
12871
12872do
12873as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12874echo "$as_me:12874: checking for $ac_header" >&5
12875echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12876if eval "test \"\${$as_ac_Header+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 <$ac_header>
12883_ACEOF
12884if { (eval echo "$as_me:12884: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12885  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12886  ac_status=$?
12887  $EGREP -v '^ *\+' conftest.er1 >conftest.err
12888  rm -f conftest.er1
12889  cat conftest.err >&5
12890  echo "$as_me:12890: \$? = $ac_status" >&5
12891  (exit "$ac_status"); } >/dev/null; then
12892  if test -s conftest.err; then
12893    ac_cpp_err=$ac_c_preproc_warn_flag
12894  else
12895    ac_cpp_err=
12896  fi
12897else
12898  ac_cpp_err=yes
12899fi
12900if test -z "$ac_cpp_err"; then
12901  eval "$as_ac_Header=yes"
12902else
12903  echo "$as_me: failed program was:" >&5
12904  cat "conftest.$ac_ext" >&5
12905  eval "$as_ac_Header=no"
12906fi
12907rm -f conftest.err "conftest.$ac_ext"
12908fi
12909echo "$as_me:12909: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12910echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12911if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12912  cat >>confdefs.h <<EOF
12913#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12914EOF
12915
12916fi
12917done
12918
12919echo "$as_me:12919: checking if wchar.h can be used as is" >&5
12920echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12921if test "${cf_cv_wchar_h_okay+set}" = set; then
12922  echo $ECHO_N "(cached) $ECHO_C" >&6
12923else
12924
12925cat >"conftest.$ac_ext" <<_ACEOF
12926#line 12926 "configure"
12927#include "confdefs.h"
12928
12929$ac_includes_default
12930#ifdef HAVE_WCHAR_H
12931#include <wchar.h>
12932#endif
12933#ifdef HAVE_WCTYPE_H
12934#include <wctype.h>
12935#endif
12936
12937int
12938main (void)
12939{
12940
12941	wint_t foo = 0;
12942	int bar = iswpunct(foo); (void) bar
12943  ;
12944  return 0;
12945}
12946_ACEOF
12947rm -f "conftest.$ac_objext"
12948if { (eval echo "$as_me:12948: \"$ac_compile\"") >&5
12949  (eval $ac_compile) 2>&5
12950  ac_status=$?
12951  echo "$as_me:12951: \$? = $ac_status" >&5
12952  (exit "$ac_status"); } &&
12953         { ac_try='test -s "conftest.$ac_objext"'
12954  { (eval echo "$as_me:12954: \"$ac_try\"") >&5
12955  (eval $ac_try) 2>&5
12956  ac_status=$?
12957  echo "$as_me:12957: \$? = $ac_status" >&5
12958  (exit "$ac_status"); }; }; then
12959  cf_cv_wchar_h_okay=yes
12960else
12961  echo "$as_me: failed program was:" >&5
12962cat "conftest.$ac_ext" >&5
12963cf_cv_wchar_h_okay=no
12964fi
12965rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12966fi
12967echo "$as_me:12967: result: $cf_cv_wchar_h_okay" >&5
12968echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12969
12970if test "$cf_cv_wchar_h_okay" = no
12971then
12972
12973echo "$as_me:12973: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12974echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12975cat >"conftest.$ac_ext" <<_ACEOF
12976#line 12976 "configure"
12977#include "confdefs.h"
12978#include <sys/types.h>
12979
12980int
12981main (void)
12982{
12983
12984#ifndef _XOPEN_SOURCE_EXTENDED
12985#error _XOPEN_SOURCE_EXTENDED is not defined
12986#endif
12987  ;
12988  return 0;
12989}
12990_ACEOF
12991rm -f "conftest.$ac_objext"
12992if { (eval echo "$as_me:12992: \"$ac_compile\"") >&5
12993  (eval $ac_compile) 2>&5
12994  ac_status=$?
12995  echo "$as_me:12995: \$? = $ac_status" >&5
12996  (exit "$ac_status"); } &&
12997         { ac_try='test -s "conftest.$ac_objext"'
12998  { (eval echo "$as_me:12998: \"$ac_try\"") >&5
12999  (eval $ac_try) 2>&5
13000  ac_status=$?
13001  echo "$as_me:13001: \$? = $ac_status" >&5
13002  (exit "$ac_status"); }; }; then
13003  cf_result=no
13004else
13005  echo "$as_me: failed program was:" >&5
13006cat "conftest.$ac_ext" >&5
13007cf_result=yes
13008fi
13009rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13010echo "$as_me:13010: result: $cf_result" >&5
13011echo "${ECHO_T}$cf_result" >&6
13012
13013if test "$cf_result" = yes ; then
13014	CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
13015elif test "x" != "x" ; then
13016	echo "$as_me:13016: checking checking for compatible value versus " >&5
13017echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
13018	cat >"conftest.$ac_ext" <<_ACEOF
13019#line 13019 "configure"
13020#include "confdefs.h"
13021#include <sys/types.h>
13022
13023int
13024main (void)
13025{
13026
13027#if _XOPEN_SOURCE_EXTENDED- < 0
13028#error _XOPEN_SOURCE_EXTENDED- is negative
13029#endif
13030  ;
13031  return 0;
13032}
13033_ACEOF
13034rm -f "conftest.$ac_objext"
13035if { (eval echo "$as_me:13035: \"$ac_compile\"") >&5
13036  (eval $ac_compile) 2>&5
13037  ac_status=$?
13038  echo "$as_me:13038: \$? = $ac_status" >&5
13039  (exit "$ac_status"); } &&
13040         { ac_try='test -s "conftest.$ac_objext"'
13041  { (eval echo "$as_me:13041: \"$ac_try\"") >&5
13042  (eval $ac_try) 2>&5
13043  ac_status=$?
13044  echo "$as_me:13044: \$? = $ac_status" >&5
13045  (exit "$ac_status"); }; }; then
13046  cf_result=yes
13047else
13048  echo "$as_me: failed program was:" >&5
13049cat "conftest.$ac_ext" >&5
13050cf_result=no
13051fi
13052rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13053	echo "$as_me:13053: result: $cf_result" >&5
13054echo "${ECHO_T}$cf_result" >&6
13055	if test "$cf_result" = no ; then
13056		# perhaps we can override it - try...
13057		CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
13058	fi
13059fi
13060
13061fi
13062
13063echo "$as_me:13063: checking if wcwidth agrees graphics are single-width" >&5
13064echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
13065if test "${cf_cv_wcwidth_graphics+set}" = set; then
13066  echo $ECHO_N "(cached) $ECHO_C" >&6
13067else
13068
13069cat >conftest.in <<CF_EOF
13070-	VT100 symbols
130710x250c	upper left corner
130720x2514	lower left corner
130730x2510	upper right corner
130740x2518	lower right corner
130750x251c	tee pointing left
130760x2524	tee pointing right
130770x2534	tee pointing up
130780x252c	tee pointing down
130790x2500	horizontal line
130800x2502	vertical line
130810x253c	large plus or crossover
130820x23ba	scan line 1
130830x23bd	scan line 9
130840x25c6	diamond
130850x2592	checker board (stipple)
130860x00b0	degree symbol
130870x00b1	plus/minus
130880x00b7	bullet
13089-	Teletype 5410v1 symbols
130900x2190	arrow pointing left
130910x2192	arrow pointing right
130920x2193	arrow pointing down
130930x2191	arrow pointing up
130940x2592	board of squares
130950x2603	lantern symbol
130960x25ae	solid square block
13097-	these defaults were invented for ncurses
130980x23bb	scan line 3
130990x23bc	scan line 7
131000x2264	less-than-or-equal-to
131010x2265	greater-than-or-equal-to
131020x03c0	greek pi
131030x2260	not-equal
131040x00a3	pound-sterling symbol
13105-	thick-line-drawing
131060x250f	upper left corner
131070x2517	lower left corner
131080x2513	upper right corner
131090x251b	lower right corner
131100x2523	tee pointing left
131110x252b	tee pointing right
131120x253b	tee pointing up
131130x2533	tee pointing down
131140x2501	horizontal line
131150x2503	vertical line
131160x254b	large plus or crossover
13117-	double-line-drawing
131180x2554	upper left corner
131190x255a	lower left corner
131200x2557	upper right corner
131210x255d	lower right corner
131220x2563	tee pointing left
131230x2560	tee pointing right
131240x2569	tee pointing up
131250x2566	tee pointing down
131260x2550	horizontal line
131270x2551	vertical line
131280x256c	large plus or crossover
13129CF_EOF
13130if test "$cross_compiling" = yes; then
13131  cf_cv_wcwidth_graphics=unknown
13132else
13133  cat >"conftest.$ac_ext" <<_ACEOF
13134#line 13134 "configure"
13135#include "confdefs.h"
13136
13137$ac_includes_default
13138
13139#include <locale.h>
13140#include <wchar.h>
13141
13142#define MY_LEN 80
13143
13144int
13145main(void)
13146{
13147	FILE *fp;
13148	unsigned value;
13149	char buffer[MY_LEN + 1];
13150	char notes[MY_LEN + 1];
13151	int totals = 0;
13152	int passed = 0;
13153
13154	if (setlocale(LC_ALL, "en_US.UTF8") ||
13155		setlocale(LC_ALL, "en_US.UTF-8") ||
13156		setlocale(LC_ALL, "en_US.utf8") ||
13157		setlocale(LC_ALL, "en_US.utf-8")) {
13158		if ((fp = fopen("conftest.in", "r")) != NULL) {
13159			while (fgets(buffer, MY_LEN, fp) != NULL) {
13160				if (*buffer == '-') {
13161					fprintf(stderr, "\\t%s", buffer);
13162				} else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
13163					++totals;
13164					if (wcwidth((int)value) == 1)
13165						++passed;
13166					fprintf(stderr, "%d\\t%s", wcwidth((int)value), buffer);
13167				} else {
13168					fprintf(stderr, "?\\t%s", buffer);
13169				}
13170			}
13171		}
13172	}
13173	fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
13174	return (totals == passed) ? 0 : 1;
13175}
13176
13177_ACEOF
13178rm -f "conftest$ac_exeext"
13179if { (eval echo "$as_me:13179: \"$ac_link\"") >&5
13180  (eval $ac_link) 2>&5
13181  ac_status=$?
13182  echo "$as_me:13182: \$? = $ac_status" >&5
13183  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
13184  { (eval echo "$as_me:13184: \"$ac_try\"") >&5
13185  (eval $ac_try) 2>&5
13186  ac_status=$?
13187  echo "$as_me:13187: \$? = $ac_status" >&5
13188  (exit "$ac_status"); }; }; then
13189  cf_cv_wcwidth_graphics=yes
13190else
13191  echo "$as_me: program exited with status $ac_status" >&5
13192echo "$as_me: failed program was:" >&5
13193cat "conftest.$ac_ext" >&5
13194cf_cv_wcwidth_graphics=no
13195fi
13196rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
13197fi
13198
13199fi
13200echo "$as_me:13200: result: $cf_cv_wcwidth_graphics" >&5
13201echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
13202
13203	test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
13204
13205	# with_overwrite=no
13206	NCURSES_CH_T=cchar_t
13207
13208for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs wcwidth
13209do
13210as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13211echo "$as_me:13211: checking for $ac_func" >&5
13212echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13213if eval "test \"\${$as_ac_var+set}\" = set"; then
13214  echo $ECHO_N "(cached) $ECHO_C" >&6
13215else
13216  cat >"conftest.$ac_ext" <<_ACEOF
13217#line 13217 "configure"
13218#include "confdefs.h"
13219#define $ac_func autoconf_temporary
13220#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
13221#undef $ac_func
13222
13223#ifdef __cplusplus
13224extern "C"
13225#endif
13226
13227/* We use char because int might match the return type of a gcc2
13228   builtin and then its argument prototype would still apply.  */
13229char $ac_func (void);
13230
13231int
13232main (void)
13233{
13234
13235/* The GNU C library defines stubs for functions which it implements
13236    to always fail with ENOSYS.  Some functions are actually named
13237    something starting with __ and the normal name is an alias.  */
13238#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13239#error found stub for $ac_func
13240#endif
13241
13242	return $ac_func ();
13243  ;
13244  return 0;
13245}
13246_ACEOF
13247rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13248if { (eval echo "$as_me:13248: \"$ac_link\"") >&5
13249  (eval $ac_link) 2>&5
13250  ac_status=$?
13251  echo "$as_me:13251: \$? = $ac_status" >&5
13252  (exit "$ac_status"); } &&
13253         { ac_try='test -s "conftest$ac_exeext"'
13254  { (eval echo "$as_me:13254: \"$ac_try\"") >&5
13255  (eval $ac_try) 2>&5
13256  ac_status=$?
13257  echo "$as_me:13257: \$? = $ac_status" >&5
13258  (exit "$ac_status"); }; }; then
13259  eval "$as_ac_var=yes"
13260else
13261  echo "$as_me: failed program was:" >&5
13262cat "conftest.$ac_ext" >&5
13263eval "$as_ac_var=no"
13264fi
13265rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13266fi
13267echo "$as_me:13267: result: `eval echo '${'"$as_ac_var"'}'`" >&5
13268echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
13269if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
13270  cat >>confdefs.h <<EOF
13271#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13272EOF
13273
13274fi
13275done
13276
13277	if test "x$ac_cv_func_putwc" != xyes ; then
13278
13279for ac_header in wchar.h
13280do
13281as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13282echo "$as_me:13282: checking for $ac_header" >&5
13283echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13284if eval "test \"\${$as_ac_Header+set}\" = set"; then
13285  echo $ECHO_N "(cached) $ECHO_C" >&6
13286else
13287  cat >"conftest.$ac_ext" <<_ACEOF
13288#line 13288 "configure"
13289#include "confdefs.h"
13290#include <$ac_header>
13291_ACEOF
13292if { (eval echo "$as_me:13292: \"$ac_cpp "conftest.$ac_ext"\"") >&5
13293  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
13294  ac_status=$?
13295  $EGREP -v '^ *\+' conftest.er1 >conftest.err
13296  rm -f conftest.er1
13297  cat conftest.err >&5
13298  echo "$as_me:13298: \$? = $ac_status" >&5
13299  (exit "$ac_status"); } >/dev/null; then
13300  if test -s conftest.err; then
13301    ac_cpp_err=$ac_c_preproc_warn_flag
13302  else
13303    ac_cpp_err=
13304  fi
13305else
13306  ac_cpp_err=yes
13307fi
13308if test -z "$ac_cpp_err"; then
13309  eval "$as_ac_Header=yes"
13310else
13311  echo "$as_me: failed program was:" >&5
13312  cat "conftest.$ac_ext" >&5
13313  eval "$as_ac_Header=no"
13314fi
13315rm -f conftest.err "conftest.$ac_ext"
13316fi
13317echo "$as_me:13317: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
13318echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
13319if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
13320  cat >>confdefs.h <<EOF
13321#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13322EOF
13323
13324fi
13325done
13326
13327echo "$as_me:13327: checking for multibyte character support" >&5
13328echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
13329if test "${cf_cv_utf8_lib+set}" = set; then
13330  echo $ECHO_N "(cached) $ECHO_C" >&6
13331else
13332
13333	cf_save_LIBS="$LIBS"
13334	cat >"conftest.$ac_ext" <<_ACEOF
13335#line 13335 "configure"
13336#include "confdefs.h"
13337
13338$ac_includes_default
13339#ifdef HAVE_WCHAR_H
13340#include <wchar.h>
13341#endif
13342
13343int
13344main (void)
13345{
13346putwc(0,0);
13347  ;
13348  return 0;
13349}
13350_ACEOF
13351rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13352if { (eval echo "$as_me:13352: \"$ac_link\"") >&5
13353  (eval $ac_link) 2>&5
13354  ac_status=$?
13355  echo "$as_me:13355: \$? = $ac_status" >&5
13356  (exit "$ac_status"); } &&
13357         { ac_try='test -s "conftest$ac_exeext"'
13358  { (eval echo "$as_me:13358: \"$ac_try\"") >&5
13359  (eval $ac_try) 2>&5
13360  ac_status=$?
13361  echo "$as_me:13361: \$? = $ac_status" >&5
13362  (exit "$ac_status"); }; }; then
13363  cf_cv_utf8_lib=yes
13364else
13365  echo "$as_me: failed program was:" >&5
13366cat "conftest.$ac_ext" >&5
13367
13368# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
13369# will be set on completion of the AC_LINK_IFELSE below.
13370cf_cv_header_path_utf8=
13371cf_cv_library_path_utf8=
13372
13373echo "${as_me:-configure}:13373: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
13374
13375cf_save_LIBS="$LIBS"
13376
13377cat >"conftest.$ac_ext" <<_ACEOF
13378#line 13378 "configure"
13379#include "confdefs.h"
13380
13381#include <libutf8.h>
13382int
13383main (void)
13384{
13385putwc(0,0);
13386  ;
13387  return 0;
13388}
13389_ACEOF
13390rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13391if { (eval echo "$as_me:13391: \"$ac_link\"") >&5
13392  (eval $ac_link) 2>&5
13393  ac_status=$?
13394  echo "$as_me:13394: \$? = $ac_status" >&5
13395  (exit "$ac_status"); } &&
13396         { ac_try='test -s "conftest$ac_exeext"'
13397  { (eval echo "$as_me:13397: \"$ac_try\"") >&5
13398  (eval $ac_try) 2>&5
13399  ac_status=$?
13400  echo "$as_me:13400: \$? = $ac_status" >&5
13401  (exit "$ac_status"); }; }; then
13402
13403	cf_cv_find_linkage_utf8=yes
13404	cf_cv_header_path_utf8=/usr/include
13405	cf_cv_library_path_utf8=/usr/lib
13406
13407else
13408  echo "$as_me: failed program was:" >&5
13409cat "conftest.$ac_ext" >&5
13410
13411LIBS="-lutf8  $cf_save_LIBS"
13412
13413cat >"conftest.$ac_ext" <<_ACEOF
13414#line 13414 "configure"
13415#include "confdefs.h"
13416
13417#include <libutf8.h>
13418int
13419main (void)
13420{
13421putwc(0,0);
13422  ;
13423  return 0;
13424}
13425_ACEOF
13426rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13427if { (eval echo "$as_me:13427: \"$ac_link\"") >&5
13428  (eval $ac_link) 2>&5
13429  ac_status=$?
13430  echo "$as_me:13430: \$? = $ac_status" >&5
13431  (exit "$ac_status"); } &&
13432         { ac_try='test -s "conftest$ac_exeext"'
13433  { (eval echo "$as_me:13433: \"$ac_try\"") >&5
13434  (eval $ac_try) 2>&5
13435  ac_status=$?
13436  echo "$as_me:13436: \$? = $ac_status" >&5
13437  (exit "$ac_status"); }; }; then
13438
13439	cf_cv_find_linkage_utf8=yes
13440	cf_cv_header_path_utf8=/usr/include
13441	cf_cv_library_path_utf8=/usr/lib
13442	cf_cv_library_file_utf8="-lutf8"
13443
13444else
13445  echo "$as_me: failed program was:" >&5
13446cat "conftest.$ac_ext" >&5
13447
13448	cf_cv_find_linkage_utf8=no
13449	LIBS="$cf_save_LIBS"
13450
13451	test -n "$verbose" && echo "	find linkage for utf8 library" 1>&6
13452
13453echo "${as_me:-configure}:13453: testing find linkage for utf8 library ..." 1>&5
13454
13455echo "${as_me:-configure}:13455: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
13456
13457	cf_save_CPPFLAGS="$CPPFLAGS"
13458	cf_test_CPPFLAGS="$CPPFLAGS"
13459
13460cf_search=
13461
13462# collect the current set of include-directories from compiler flags
13463cf_header_path_list=""
13464if test -n "${CFLAGS}${CPPFLAGS}" ; then
13465	for cf_header_path in $CPPFLAGS $CFLAGS
13466	do
13467		case "$cf_header_path" in
13468		(-I*)
13469			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13470
13471test "x$cf_header_path" != "xNONE" && \
13472test -d "$cf_header_path" && \
13473 {
13474	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
13475	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
13476	test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
13477	test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
13478	test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
13479	test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
13480}
13481
13482			cf_header_path_list="$cf_header_path_list $cf_search"
13483			;;
13484		esac
13485	done
13486fi
13487
13488# add the variations for the package we are looking for
13489
13490cf_search=
13491
13492test "x$prefix" != "xNONE" && \
13493test -d "$prefix" && \
13494 {
13495	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
13496	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
13497	test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
13498	test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
13499	test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
13500	test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
13501}
13502
13503for cf_subdir_prefix in \
13504	/usr \
13505	/usr/local \
13506	/usr/pkg \
13507	/opt \
13508	/opt/local \
13509	$HOME
13510do
13511
13512test "x$cf_subdir_prefix" != "x$prefix" && \
13513test -d "$cf_subdir_prefix" && \
13514{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13515	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
13516	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
13517	test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13518	test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13519	test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13520	test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
13521}
13522
13523done
13524
13525test "$includedir" != NONE && \
13526test "$includedir" != "/usr/include" && \
13527test -d "$includedir" && {
13528	test -d "$includedir" &&    cf_search="$cf_search $includedir"
13529	test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
13530}
13531
13532test "$oldincludedir" != NONE && \
13533test "$oldincludedir" != "/usr/include" && \
13534test -d "$oldincludedir" && {
13535	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
13536	test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
13537}
13538
13539cf_search="$cf_search $cf_header_path_list"
13540
13541	for cf_cv_header_path_utf8 in $cf_search
13542	do
13543		if test -d "$cf_cv_header_path_utf8" ; then
13544			test -n "$verbose" && echo "	... testing $cf_cv_header_path_utf8" 1>&6
13545
13546echo "${as_me:-configure}:13546: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
13547
13548			CPPFLAGS="$cf_save_CPPFLAGS"
13549
13550	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13551	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13552
13553			cat >"conftest.$ac_ext" <<_ACEOF
13554#line 13554 "configure"
13555#include "confdefs.h"
13556
13557#include <libutf8.h>
13558int
13559main (void)
13560{
13561putwc(0,0);
13562  ;
13563  return 0;
13564}
13565_ACEOF
13566rm -f "conftest.$ac_objext"
13567if { (eval echo "$as_me:13567: \"$ac_compile\"") >&5
13568  (eval $ac_compile) 2>&5
13569  ac_status=$?
13570  echo "$as_me:13570: \$? = $ac_status" >&5
13571  (exit "$ac_status"); } &&
13572         { ac_try='test -s "conftest.$ac_objext"'
13573  { (eval echo "$as_me:13573: \"$ac_try\"") >&5
13574  (eval $ac_try) 2>&5
13575  ac_status=$?
13576  echo "$as_me:13576: \$? = $ac_status" >&5
13577  (exit "$ac_status"); }; }; then
13578
13579				test -n "$verbose" && echo "	... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13580
13581echo "${as_me:-configure}:13581: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
13582
13583				cf_cv_find_linkage_utf8=maybe
13584				cf_test_CPPFLAGS="$CPPFLAGS"
13585				break
13586else
13587  echo "$as_me: failed program was:" >&5
13588cat "conftest.$ac_ext" >&5
13589
13590				CPPFLAGS="$cf_save_CPPFLAGS"
13591
13592fi
13593rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13594		fi
13595	done
13596
13597	if test "$cf_cv_find_linkage_utf8" = maybe ; then
13598
13599echo "${as_me:-configure}:13599: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
13600
13601		cf_save_LIBS="$LIBS"
13602		cf_save_LDFLAGS="$LDFLAGS"
13603
13604		if test "$cf_cv_find_linkage_utf8" != yes ; then
13605
13606cf_search=
13607cf_library_path_list=""
13608if test -n "${LDFLAGS}${LIBS}" ; then
13609	for cf_library_path in $LDFLAGS $LIBS
13610	do
13611		case "$cf_library_path" in
13612		(-L*)
13613			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13614
13615test "x$cf_library_path" != "xNONE" && \
13616test -d "$cf_library_path" && \
13617 {
13618	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
13619	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
13620	test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
13621	test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13622	test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
13623	test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
13624}
13625
13626			cf_library_path_list="$cf_library_path_list $cf_search"
13627			;;
13628		esac
13629	done
13630fi
13631
13632cf_search=
13633
13634test "x$prefix" != "xNONE" && \
13635test -d "$prefix" && \
13636 {
13637	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
13638	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
13639	test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
13640	test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
13641	test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
13642	test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
13643}
13644
13645for cf_subdir_prefix in \
13646	/usr \
13647	/usr/local \
13648	/usr/pkg \
13649	/opt \
13650	/opt/local \
13651	$HOME
13652do
13653
13654test "x$cf_subdir_prefix" != "x$prefix" && \
13655test -d "$cf_subdir_prefix" && \
13656{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13657	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
13658	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
13659	test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13660	test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13661	test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13662	test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
13663}
13664
13665done
13666
13667cf_search="$cf_library_path_list $cf_search"
13668
13669			for cf_cv_library_path_utf8 in $cf_search
13670			do
13671				if test -d "$cf_cv_library_path_utf8" ; then
13672					test -n "$verbose" && echo "	... testing $cf_cv_library_path_utf8" 1>&6
13673
13674echo "${as_me:-configure}:13674: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
13675
13676					CPPFLAGS="$cf_test_CPPFLAGS"
13677					LIBS="-lutf8  $cf_save_LIBS"
13678					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
13679					cat >"conftest.$ac_ext" <<_ACEOF
13680#line 13680 "configure"
13681#include "confdefs.h"
13682
13683#include <libutf8.h>
13684int
13685main (void)
13686{
13687putwc(0,0);
13688  ;
13689  return 0;
13690}
13691_ACEOF
13692rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13693if { (eval echo "$as_me:13693: \"$ac_link\"") >&5
13694  (eval $ac_link) 2>&5
13695  ac_status=$?
13696  echo "$as_me:13696: \$? = $ac_status" >&5
13697  (exit "$ac_status"); } &&
13698         { ac_try='test -s "conftest$ac_exeext"'
13699  { (eval echo "$as_me:13699: \"$ac_try\"") >&5
13700  (eval $ac_try) 2>&5
13701  ac_status=$?
13702  echo "$as_me:13702: \$? = $ac_status" >&5
13703  (exit "$ac_status"); }; }; then
13704
13705					test -n "$verbose" && echo "	... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13706
13707echo "${as_me:-configure}:13707: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
13708
13709					cf_cv_find_linkage_utf8=yes
13710					cf_cv_library_file_utf8="-lutf8"
13711					break
13712else
13713  echo "$as_me: failed program was:" >&5
13714cat "conftest.$ac_ext" >&5
13715
13716					CPPFLAGS="$cf_save_CPPFLAGS"
13717					LIBS="$cf_save_LIBS"
13718					LDFLAGS="$cf_save_LDFLAGS"
13719
13720fi
13721rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13722				fi
13723			done
13724			CPPFLAGS="$cf_save_CPPFLAGS"
13725			LDFLAGS="$cf_save_LDFLAGS"
13726		fi
13727
13728	else
13729		cf_cv_find_linkage_utf8=no
13730	fi
13731
13732fi
13733rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13734
13735fi
13736rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13737
13738LIBS="$cf_save_LIBS"
13739
13740if test "$cf_cv_find_linkage_utf8" = yes ; then
13741cf_cv_utf8_lib=add-on
13742else
13743cf_cv_utf8_lib=no
13744fi
13745
13746fi
13747rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13748fi
13749echo "$as_me:13749: result: $cf_cv_utf8_lib" >&5
13750echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13751
13752# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13753# ncurses/ncursesw:
13754if test "$cf_cv_utf8_lib" = "add-on" ; then
13755
13756cat >>confdefs.h <<\EOF
13757#define HAVE_LIBUTF8_H 1
13758EOF
13759
13760if test -n "$cf_cv_header_path_utf8" ; then
13761  for cf_add_incdir in $cf_cv_header_path_utf8
13762  do
13763	while test "$cf_add_incdir" != /usr/include
13764	do
13765	  if test -d "$cf_add_incdir"
13766	  then
13767		cf_have_incdir=no
13768		if test -n "$CFLAGS$CPPFLAGS" ; then
13769		  # a loop is needed to ensure we can add subdirs of existing dirs
13770		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13771			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13772			  cf_have_incdir=yes; break
13773			fi
13774		  done
13775		fi
13776
13777		if test "$cf_have_incdir" = no ; then
13778		  if test "$cf_add_incdir" = /usr/local/include ; then
13779			if test "$GCC" = yes
13780			then
13781			  cf_save_CPPFLAGS=$CPPFLAGS
13782
13783	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13784	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13785
13786			  cat >"conftest.$ac_ext" <<_ACEOF
13787#line 13787 "configure"
13788#include "confdefs.h"
13789#include <stdio.h>
13790int
13791main (void)
13792{
13793printf("Hello")
13794  ;
13795  return 0;
13796}
13797_ACEOF
13798rm -f "conftest.$ac_objext"
13799if { (eval echo "$as_me:13799: \"$ac_compile\"") >&5
13800  (eval $ac_compile) 2>&5
13801  ac_status=$?
13802  echo "$as_me:13802: \$? = $ac_status" >&5
13803  (exit "$ac_status"); } &&
13804         { ac_try='test -s "conftest.$ac_objext"'
13805  { (eval echo "$as_me:13805: \"$ac_try\"") >&5
13806  (eval $ac_try) 2>&5
13807  ac_status=$?
13808  echo "$as_me:13808: \$? = $ac_status" >&5
13809  (exit "$ac_status"); }; }; then
13810  :
13811else
13812  echo "$as_me: failed program was:" >&5
13813cat "conftest.$ac_ext" >&5
13814cf_have_incdir=yes
13815fi
13816rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13817			  CPPFLAGS=$cf_save_CPPFLAGS
13818			fi
13819		  fi
13820		fi
13821
13822		if test "$cf_have_incdir" = no ; then
13823		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
13824
13825echo "${as_me:-configure}:13825: testing adding $cf_add_incdir to include-path ..." 1>&5
13826
13827		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13828
13829		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13830		  test "$cf_top_incdir" = "$cf_add_incdir" && break
13831		  cf_add_incdir="$cf_top_incdir"
13832		else
13833		  break
13834		fi
13835	  else
13836		break
13837	  fi
13838	done
13839  done
13840fi
13841
13842if test -n "$cf_cv_library_path_utf8" ; then
13843	for cf_add_libdir in $cf_cv_library_path_utf8
13844	do
13845		if test "$cf_add_libdir" = /usr/lib ; then
13846			:
13847		elif test -d "$cf_add_libdir"
13848		then
13849			cf_have_libdir=no
13850			if test -n "$LDFLAGS$LIBS" ; then
13851				# a loop is needed to ensure we can add subdirs of existing dirs
13852				for cf_test_libdir in $LDFLAGS $LIBS ; do
13853					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13854						cf_have_libdir=yes; break
13855					fi
13856				done
13857			fi
13858			if test "$cf_have_libdir" = no ; then
13859				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
13860
13861echo "${as_me:-configure}:13861: testing adding $cf_add_libdir to library-path ..." 1>&5
13862
13863				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13864			fi
13865		fi
13866	done
13867fi
13868
13869cf_add_libs="$LIBS"
13870# reverse order
13871cf_add_0lib=
13872for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13873# filter duplicates
13874for cf_add_1lib in $cf_add_0lib; do
13875	for cf_add_2lib in $cf_add_libs; do
13876		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13877			cf_add_1lib=
13878			break
13879		fi
13880	done
13881	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13882done
13883LIBS="$cf_add_libs"
13884
13885fi
13886
13887		if test "$cf_cv_utf8_lib" != no ; then
13888			NCURSES_LIBUTF8=1
13889		fi
13890	fi
13891
13892# This is needed on Tru64 5.0 to declare mbstate_t
13893echo "$as_me:13893: checking if we must include wchar.h to declare mbstate_t" >&5
13894echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13895if test "${cf_cv_mbstate_t+set}" = set; then
13896  echo $ECHO_N "(cached) $ECHO_C" >&6
13897else
13898
13899cat >"conftest.$ac_ext" <<_ACEOF
13900#line 13900 "configure"
13901#include "confdefs.h"
13902
13903#include <stdlib.h>
13904#include <stdarg.h>
13905#include <stdio.h>
13906#ifdef HAVE_LIBUTF8_H
13907#include <libutf8.h>
13908#endif
13909int
13910main (void)
13911{
13912mbstate_t state; (void)state
13913  ;
13914  return 0;
13915}
13916_ACEOF
13917rm -f "conftest.$ac_objext"
13918if { (eval echo "$as_me:13918: \"$ac_compile\"") >&5
13919  (eval $ac_compile) 2>&5
13920  ac_status=$?
13921  echo "$as_me:13921: \$? = $ac_status" >&5
13922  (exit "$ac_status"); } &&
13923         { ac_try='test -s "conftest.$ac_objext"'
13924  { (eval echo "$as_me:13924: \"$ac_try\"") >&5
13925  (eval $ac_try) 2>&5
13926  ac_status=$?
13927  echo "$as_me:13927: \$? = $ac_status" >&5
13928  (exit "$ac_status"); }; }; then
13929  cf_cv_mbstate_t=no
13930else
13931  echo "$as_me: failed program was:" >&5
13932cat "conftest.$ac_ext" >&5
13933cat >"conftest.$ac_ext" <<_ACEOF
13934#line 13934 "configure"
13935#include "confdefs.h"
13936
13937#include <stdlib.h>
13938#include <stdarg.h>
13939#include <stdio.h>
13940#include <wchar.h>
13941#ifdef HAVE_LIBUTF8_H
13942#include <libutf8.h>
13943#endif
13944int
13945main (void)
13946{
13947mbstate_t value; (void) value
13948  ;
13949  return 0;
13950}
13951_ACEOF
13952rm -f "conftest.$ac_objext"
13953if { (eval echo "$as_me:13953: \"$ac_compile\"") >&5
13954  (eval $ac_compile) 2>&5
13955  ac_status=$?
13956  echo "$as_me:13956: \$? = $ac_status" >&5
13957  (exit "$ac_status"); } &&
13958         { ac_try='test -s "conftest.$ac_objext"'
13959  { (eval echo "$as_me:13959: \"$ac_try\"") >&5
13960  (eval $ac_try) 2>&5
13961  ac_status=$?
13962  echo "$as_me:13962: \$? = $ac_status" >&5
13963  (exit "$ac_status"); }; }; then
13964  cf_cv_mbstate_t=yes
13965else
13966  echo "$as_me: failed program was:" >&5
13967cat "conftest.$ac_ext" >&5
13968cf_cv_mbstate_t=unknown
13969fi
13970rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13971fi
13972rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13973fi
13974echo "$as_me:13974: result: $cf_cv_mbstate_t" >&5
13975echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13976
13977if test "$cf_cv_mbstate_t" = yes ; then
13978
13979cat >>confdefs.h <<\EOF
13980#define NEED_WCHAR_H 1
13981EOF
13982
13983	NEED_WCHAR_H=1
13984fi
13985
13986# if we do not find mbstate_t in either place, use substitution to provide a fallback.
13987if test "$cf_cv_mbstate_t" = unknown ; then
13988	NCURSES_MBSTATE_T=1
13989fi
13990
13991# This is needed on Tru64 5.0 to declare wchar_t
13992echo "$as_me:13992: checking if we must include wchar.h to declare wchar_t" >&5
13993echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13994if test "${cf_cv_wchar_t+set}" = set; then
13995  echo $ECHO_N "(cached) $ECHO_C" >&6
13996else
13997
13998cat >"conftest.$ac_ext" <<_ACEOF
13999#line 13999 "configure"
14000#include "confdefs.h"
14001
14002#include <stdlib.h>
14003#include <stdarg.h>
14004#include <stdio.h>
14005#ifdef HAVE_LIBUTF8_H
14006#include <libutf8.h>
14007#endif
14008int
14009main (void)
14010{
14011wchar_t state; (void)state
14012  ;
14013  return 0;
14014}
14015_ACEOF
14016rm -f "conftest.$ac_objext"
14017if { (eval echo "$as_me:14017: \"$ac_compile\"") >&5
14018  (eval $ac_compile) 2>&5
14019  ac_status=$?
14020  echo "$as_me:14020: \$? = $ac_status" >&5
14021  (exit "$ac_status"); } &&
14022         { ac_try='test -s "conftest.$ac_objext"'
14023  { (eval echo "$as_me:14023: \"$ac_try\"") >&5
14024  (eval $ac_try) 2>&5
14025  ac_status=$?
14026  echo "$as_me:14026: \$? = $ac_status" >&5
14027  (exit "$ac_status"); }; }; then
14028  cf_cv_wchar_t=no
14029else
14030  echo "$as_me: failed program was:" >&5
14031cat "conftest.$ac_ext" >&5
14032cat >"conftest.$ac_ext" <<_ACEOF
14033#line 14033 "configure"
14034#include "confdefs.h"
14035
14036#include <stdlib.h>
14037#include <stdarg.h>
14038#include <stdio.h>
14039#include <wchar.h>
14040#ifdef HAVE_LIBUTF8_H
14041#include <libutf8.h>
14042#endif
14043int
14044main (void)
14045{
14046wchar_t value; (void) value
14047  ;
14048  return 0;
14049}
14050_ACEOF
14051rm -f "conftest.$ac_objext"
14052if { (eval echo "$as_me:14052: \"$ac_compile\"") >&5
14053  (eval $ac_compile) 2>&5
14054  ac_status=$?
14055  echo "$as_me:14055: \$? = $ac_status" >&5
14056  (exit "$ac_status"); } &&
14057         { ac_try='test -s "conftest.$ac_objext"'
14058  { (eval echo "$as_me:14058: \"$ac_try\"") >&5
14059  (eval $ac_try) 2>&5
14060  ac_status=$?
14061  echo "$as_me:14061: \$? = $ac_status" >&5
14062  (exit "$ac_status"); }; }; then
14063  cf_cv_wchar_t=yes
14064else
14065  echo "$as_me: failed program was:" >&5
14066cat "conftest.$ac_ext" >&5
14067cf_cv_wchar_t=unknown
14068fi
14069rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14070fi
14071rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14072fi
14073echo "$as_me:14073: result: $cf_cv_wchar_t" >&5
14074echo "${ECHO_T}$cf_cv_wchar_t" >&6
14075
14076if test "$cf_cv_wchar_t" = yes ; then
14077
14078cat >>confdefs.h <<\EOF
14079#define NEED_WCHAR_H 1
14080EOF
14081
14082	NEED_WCHAR_H=1
14083fi
14084
14085# if we do not find wchar_t in either place, use substitution to provide a fallback.
14086if test "$cf_cv_wchar_t" = unknown ; then
14087	NCURSES_WCHAR_T=1
14088fi
14089
14090# if we find wchar_t in either place, use substitution to provide a fallback.
14091if test "$cf_cv_wchar_t" != unknown ; then
14092	NCURSES_OK_WCHAR_T=1
14093fi
14094
14095# This is needed on Tru64 5.0 to declare wint_t
14096echo "$as_me:14096: checking if we must include wchar.h to declare wint_t" >&5
14097echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
14098if test "${cf_cv_wint_t+set}" = set; then
14099  echo $ECHO_N "(cached) $ECHO_C" >&6
14100else
14101
14102cat >"conftest.$ac_ext" <<_ACEOF
14103#line 14103 "configure"
14104#include "confdefs.h"
14105
14106#include <stdlib.h>
14107#include <stdarg.h>
14108#include <stdio.h>
14109#ifdef HAVE_LIBUTF8_H
14110#include <libutf8.h>
14111#endif
14112int
14113main (void)
14114{
14115wint_t state; (void)state
14116  ;
14117  return 0;
14118}
14119_ACEOF
14120rm -f "conftest.$ac_objext"
14121if { (eval echo "$as_me:14121: \"$ac_compile\"") >&5
14122  (eval $ac_compile) 2>&5
14123  ac_status=$?
14124  echo "$as_me:14124: \$? = $ac_status" >&5
14125  (exit "$ac_status"); } &&
14126         { ac_try='test -s "conftest.$ac_objext"'
14127  { (eval echo "$as_me:14127: \"$ac_try\"") >&5
14128  (eval $ac_try) 2>&5
14129  ac_status=$?
14130  echo "$as_me:14130: \$? = $ac_status" >&5
14131  (exit "$ac_status"); }; }; then
14132  cf_cv_wint_t=no
14133else
14134  echo "$as_me: failed program was:" >&5
14135cat "conftest.$ac_ext" >&5
14136cat >"conftest.$ac_ext" <<_ACEOF
14137#line 14137 "configure"
14138#include "confdefs.h"
14139
14140#include <stdlib.h>
14141#include <stdarg.h>
14142#include <stdio.h>
14143#include <wchar.h>
14144#ifdef HAVE_LIBUTF8_H
14145#include <libutf8.h>
14146#endif
14147int
14148main (void)
14149{
14150wint_t value; (void) value
14151  ;
14152  return 0;
14153}
14154_ACEOF
14155rm -f "conftest.$ac_objext"
14156if { (eval echo "$as_me:14156: \"$ac_compile\"") >&5
14157  (eval $ac_compile) 2>&5
14158  ac_status=$?
14159  echo "$as_me:14159: \$? = $ac_status" >&5
14160  (exit "$ac_status"); } &&
14161         { ac_try='test -s "conftest.$ac_objext"'
14162  { (eval echo "$as_me:14162: \"$ac_try\"") >&5
14163  (eval $ac_try) 2>&5
14164  ac_status=$?
14165  echo "$as_me:14165: \$? = $ac_status" >&5
14166  (exit "$ac_status"); }; }; then
14167  cf_cv_wint_t=yes
14168else
14169  echo "$as_me: failed program was:" >&5
14170cat "conftest.$ac_ext" >&5
14171cf_cv_wint_t=unknown
14172fi
14173rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14174fi
14175rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14176fi
14177echo "$as_me:14177: result: $cf_cv_wint_t" >&5
14178echo "${ECHO_T}$cf_cv_wint_t" >&6
14179
14180if test "$cf_cv_wint_t" = yes ; then
14181
14182cat >>confdefs.h <<\EOF
14183#define NEED_WCHAR_H 1
14184EOF
14185
14186	NEED_WCHAR_H=1
14187fi
14188
14189# if we do not find wint_t in either place, use substitution to provide a fallback.
14190if test "$cf_cv_wint_t" = unknown ; then
14191	NCURSES_WINT_T=1
14192fi
14193
14194# if we find wint_t in either place, use substitution to provide a fallback.
14195if test "$cf_cv_wint_t" != unknown ; then
14196	NCURSES_OK_WINT_T=1
14197fi
14198
14199	if test "$NCURSES_MBSTATE_T" != 0; then
14200
14201cat >>confdefs.h <<\EOF
14202#define NEED_MBSTATE_T_DEF 1
14203EOF
14204
14205	fi
14206fi
14207
14208###   use option --disable-lp64 to allow long chtype
14209echo "$as_me:14209: checking whether to enable _LP64 definition in curses.h" >&5
14210echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
14211
14212# Check whether --enable-lp64 or --disable-lp64 was given.
14213if test "${enable_lp64+set}" = set; then
14214  enableval="$enable_lp64"
14215  with_lp64=$enableval
14216else
14217  with_lp64=$cf_dft_with_lp64
14218fi;
14219echo "$as_me:14219: result: $with_lp64" >&5
14220echo "${ECHO_T}$with_lp64" >&6
14221
14222if test "x$with_lp64" = xyes ; then
14223	cf_cv_enable_lp64=1
14224else
14225	cf_cv_enable_lp64=0
14226fi
14227
14228# Check whether --enable-largefile or --disable-largefile was given.
14229if test "${enable_largefile+set}" = set; then
14230  enableval="$enable_largefile"
14231
14232fi;
14233if test "$enable_largefile" != no; then
14234
14235  echo "$as_me:14235: checking for special C compiler options needed for large files" >&5
14236echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14237if test "${ac_cv_sys_largefile_CC+set}" = set; then
14238  echo $ECHO_N "(cached) $ECHO_C" >&6
14239else
14240  ac_cv_sys_largefile_CC=no
14241     if test "$GCC" != yes; then
14242       ac_save_CC=$CC
14243       while :; do
14244     	 # IRIX 6.2 and later do not support large files by default,
14245     	 # so use the C compiler's -n32 option if that helps.
14246         cat >"conftest.$ac_ext" <<_ACEOF
14247#line 14247 "configure"
14248#include "confdefs.h"
14249#include <sys/types.h>
14250 /* Check that off_t can represent 2**63 - 1 correctly.
14251    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14252    since some C++ compilers masquerading as C compilers
14253    incorrectly reject 9223372036854775807.  */
14254#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14255  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14256		       && LARGE_OFF_T % 2147483647 == 1)
14257		      ? 1 : -1];
14258int
14259main (void)
14260{
14261
14262  ;
14263  return 0;
14264}
14265_ACEOF
14266     	 rm -f "conftest.$ac_objext"
14267if { (eval echo "$as_me:14267: \"$ac_compile\"") >&5
14268  (eval $ac_compile) 2>&5
14269  ac_status=$?
14270  echo "$as_me:14270: \$? = $ac_status" >&5
14271  (exit "$ac_status"); } &&
14272         { ac_try='test -s "conftest.$ac_objext"'
14273  { (eval echo "$as_me:14273: \"$ac_try\"") >&5
14274  (eval $ac_try) 2>&5
14275  ac_status=$?
14276  echo "$as_me:14276: \$? = $ac_status" >&5
14277  (exit "$ac_status"); }; }; then
14278  break
14279else
14280  echo "$as_me: failed program was:" >&5
14281cat "conftest.$ac_ext" >&5
14282fi
14283rm -f "conftest.$ac_objext"
14284     	 CC="$CC -n32"
14285     	 rm -f "conftest.$ac_objext"
14286if { (eval echo "$as_me:14286: \"$ac_compile\"") >&5
14287  (eval $ac_compile) 2>&5
14288  ac_status=$?
14289  echo "$as_me:14289: \$? = $ac_status" >&5
14290  (exit "$ac_status"); } &&
14291         { ac_try='test -s "conftest.$ac_objext"'
14292  { (eval echo "$as_me:14292: \"$ac_try\"") >&5
14293  (eval $ac_try) 2>&5
14294  ac_status=$?
14295  echo "$as_me:14295: \$? = $ac_status" >&5
14296  (exit "$ac_status"); }; }; then
14297  ac_cv_sys_largefile_CC=' -n32'; break
14298else
14299  echo "$as_me: failed program was:" >&5
14300cat "conftest.$ac_ext" >&5
14301fi
14302rm -f "conftest.$ac_objext"
14303         break
14304       done
14305       CC=$ac_save_CC
14306       rm -f "conftest.$ac_ext"
14307    fi
14308fi
14309echo "$as_me:14309: result: $ac_cv_sys_largefile_CC" >&5
14310echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
14311  if test "$ac_cv_sys_largefile_CC" != no; then
14312    CC=$CC$ac_cv_sys_largefile_CC
14313  fi
14314
14315  echo "$as_me:14315: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14316echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
14317if test "${ac_cv_sys_file_offset_bits+set}" = set; then
14318  echo $ECHO_N "(cached) $ECHO_C" >&6
14319else
14320  while :; do
14321  ac_cv_sys_file_offset_bits=no
14322  cat >"conftest.$ac_ext" <<_ACEOF
14323#line 14323 "configure"
14324#include "confdefs.h"
14325#include <sys/types.h>
14326 /* Check that off_t can represent 2**63 - 1 correctly.
14327    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14328    since some C++ compilers masquerading as C compilers
14329    incorrectly reject 9223372036854775807.  */
14330#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14331  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14332		       && LARGE_OFF_T % 2147483647 == 1)
14333		      ? 1 : -1];
14334int
14335main (void)
14336{
14337
14338  ;
14339  return 0;
14340}
14341_ACEOF
14342rm -f "conftest.$ac_objext"
14343if { (eval echo "$as_me:14343: \"$ac_compile\"") >&5
14344  (eval $ac_compile) 2>&5
14345  ac_status=$?
14346  echo "$as_me:14346: \$? = $ac_status" >&5
14347  (exit "$ac_status"); } &&
14348         { ac_try='test -s "conftest.$ac_objext"'
14349  { (eval echo "$as_me:14349: \"$ac_try\"") >&5
14350  (eval $ac_try) 2>&5
14351  ac_status=$?
14352  echo "$as_me:14352: \$? = $ac_status" >&5
14353  (exit "$ac_status"); }; }; then
14354  break
14355else
14356  echo "$as_me: failed program was:" >&5
14357cat "conftest.$ac_ext" >&5
14358fi
14359rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14360  cat >"conftest.$ac_ext" <<_ACEOF
14361#line 14361 "configure"
14362#include "confdefs.h"
14363#define _FILE_OFFSET_BITS 64
14364#include <sys/types.h>
14365 /* Check that off_t can represent 2**63 - 1 correctly.
14366    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14367    since some C++ compilers masquerading as C compilers
14368    incorrectly reject 9223372036854775807.  */
14369#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14370  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14371		       && LARGE_OFF_T % 2147483647 == 1)
14372		      ? 1 : -1];
14373int
14374main (void)
14375{
14376
14377  ;
14378  return 0;
14379}
14380_ACEOF
14381rm -f "conftest.$ac_objext"
14382if { (eval echo "$as_me:14382: \"$ac_compile\"") >&5
14383  (eval $ac_compile) 2>&5
14384  ac_status=$?
14385  echo "$as_me:14385: \$? = $ac_status" >&5
14386  (exit "$ac_status"); } &&
14387         { ac_try='test -s "conftest.$ac_objext"'
14388  { (eval echo "$as_me:14388: \"$ac_try\"") >&5
14389  (eval $ac_try) 2>&5
14390  ac_status=$?
14391  echo "$as_me:14391: \$? = $ac_status" >&5
14392  (exit "$ac_status"); }; }; then
14393  ac_cv_sys_file_offset_bits=64; break
14394else
14395  echo "$as_me: failed program was:" >&5
14396cat "conftest.$ac_ext" >&5
14397fi
14398rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14399  break
14400done
14401fi
14402echo "$as_me:14402: result: $ac_cv_sys_file_offset_bits" >&5
14403echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14404if test "$ac_cv_sys_file_offset_bits" != no; then
14405
14406cat >>confdefs.h <<EOF
14407#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14408EOF
14409
14410fi
14411rm -rf conftest*
14412  echo "$as_me:14412: checking for _LARGE_FILES value needed for large files" >&5
14413echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14414if test "${ac_cv_sys_large_files+set}" = set; then
14415  echo $ECHO_N "(cached) $ECHO_C" >&6
14416else
14417  while :; do
14418  ac_cv_sys_large_files=no
14419  cat >"conftest.$ac_ext" <<_ACEOF
14420#line 14420 "configure"
14421#include "confdefs.h"
14422#include <sys/types.h>
14423 /* Check that off_t can represent 2**63 - 1 correctly.
14424    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14425    since some C++ compilers masquerading as C compilers
14426    incorrectly reject 9223372036854775807.  */
14427#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14428  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14429		       && LARGE_OFF_T % 2147483647 == 1)
14430		      ? 1 : -1];
14431int
14432main (void)
14433{
14434
14435  ;
14436  return 0;
14437}
14438_ACEOF
14439rm -f "conftest.$ac_objext"
14440if { (eval echo "$as_me:14440: \"$ac_compile\"") >&5
14441  (eval $ac_compile) 2>&5
14442  ac_status=$?
14443  echo "$as_me:14443: \$? = $ac_status" >&5
14444  (exit "$ac_status"); } &&
14445         { ac_try='test -s "conftest.$ac_objext"'
14446  { (eval echo "$as_me:14446: \"$ac_try\"") >&5
14447  (eval $ac_try) 2>&5
14448  ac_status=$?
14449  echo "$as_me:14449: \$? = $ac_status" >&5
14450  (exit "$ac_status"); }; }; then
14451  break
14452else
14453  echo "$as_me: failed program was:" >&5
14454cat "conftest.$ac_ext" >&5
14455fi
14456rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14457  cat >"conftest.$ac_ext" <<_ACEOF
14458#line 14458 "configure"
14459#include "confdefs.h"
14460#define _LARGE_FILES 1
14461#include <sys/types.h>
14462 /* Check that off_t can represent 2**63 - 1 correctly.
14463    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14464    since some C++ compilers masquerading as C compilers
14465    incorrectly reject 9223372036854775807.  */
14466#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14467  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14468		       && LARGE_OFF_T % 2147483647 == 1)
14469		      ? 1 : -1];
14470int
14471main (void)
14472{
14473
14474  ;
14475  return 0;
14476}
14477_ACEOF
14478rm -f "conftest.$ac_objext"
14479if { (eval echo "$as_me:14479: \"$ac_compile\"") >&5
14480  (eval $ac_compile) 2>&5
14481  ac_status=$?
14482  echo "$as_me:14482: \$? = $ac_status" >&5
14483  (exit "$ac_status"); } &&
14484         { ac_try='test -s "conftest.$ac_objext"'
14485  { (eval echo "$as_me:14485: \"$ac_try\"") >&5
14486  (eval $ac_try) 2>&5
14487  ac_status=$?
14488  echo "$as_me:14488: \$? = $ac_status" >&5
14489  (exit "$ac_status"); }; }; then
14490  ac_cv_sys_large_files=1; break
14491else
14492  echo "$as_me: failed program was:" >&5
14493cat "conftest.$ac_ext" >&5
14494fi
14495rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14496  break
14497done
14498fi
14499echo "$as_me:14499: result: $ac_cv_sys_large_files" >&5
14500echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14501if test "$ac_cv_sys_large_files" != no; then
14502
14503cat >>confdefs.h <<EOF
14504#define _LARGE_FILES $ac_cv_sys_large_files
14505EOF
14506
14507fi
14508rm -rf conftest*
14509fi
14510
14511	if test "$enable_largefile" != no ; then
14512	echo "$as_me:14512: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14513echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14514if test "${ac_cv_sys_largefile_source+set}" = set; then
14515  echo $ECHO_N "(cached) $ECHO_C" >&6
14516else
14517  while :; do
14518  ac_cv_sys_largefile_source=no
14519  cat >"conftest.$ac_ext" <<_ACEOF
14520#line 14520 "configure"
14521#include "confdefs.h"
14522#include <stdio.h>
14523    #include <sys/types.h>
14524int
14525main (void)
14526{
14527
14528    int (*my_fseeko)(FILE *, off_t, int) = fseeko;
14529    return my_fseeko(stdin, 0, 0);
14530  ;
14531  return 0;
14532}
14533_ACEOF
14534rm -f "conftest.$ac_objext"
14535if { (eval echo "$as_me:14535: \"$ac_compile\"") >&5
14536  (eval $ac_compile) 2>&5
14537  ac_status=$?
14538  echo "$as_me:14538: \$? = $ac_status" >&5
14539  (exit "$ac_status"); } &&
14540         { ac_try='test -s "conftest.$ac_objext"'
14541  { (eval echo "$as_me:14541: \"$ac_try\"") >&5
14542  (eval $ac_try) 2>&5
14543  ac_status=$?
14544  echo "$as_me:14544: \$? = $ac_status" >&5
14545  (exit "$ac_status"); }; }; then
14546  break
14547else
14548  echo "$as_me: failed program was:" >&5
14549cat "conftest.$ac_ext" >&5
14550fi
14551rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14552  cat >"conftest.$ac_ext" <<_ACEOF
14553#line 14553 "configure"
14554#include "confdefs.h"
14555#define _LARGEFILE_SOURCE 1
14556#include <stdio.h>
14557    #include <sys/types.h>
14558int
14559main (void)
14560{
14561
14562    int (*my_fseeko)(FILE *, off_t, int) = fseeko;
14563    return my_fseeko(stdin, 0, 0);
14564  ;
14565  return 0;
14566}
14567_ACEOF
14568rm -f "conftest.$ac_objext"
14569if { (eval echo "$as_me:14569: \"$ac_compile\"") >&5
14570  (eval $ac_compile) 2>&5
14571  ac_status=$?
14572  echo "$as_me:14572: \$? = $ac_status" >&5
14573  (exit "$ac_status"); } &&
14574         { ac_try='test -s "conftest.$ac_objext"'
14575  { (eval echo "$as_me:14575: \"$ac_try\"") >&5
14576  (eval $ac_try) 2>&5
14577  ac_status=$?
14578  echo "$as_me:14578: \$? = $ac_status" >&5
14579  (exit "$ac_status"); }; }; then
14580  ac_cv_sys_largefile_source=1; break
14581else
14582  echo "$as_me: failed program was:" >&5
14583cat "conftest.$ac_ext" >&5
14584fi
14585rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14586  break
14587done
14588fi
14589echo "$as_me:14589: result: $ac_cv_sys_largefile_source" >&5
14590echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14591if test "$ac_cv_sys_largefile_source" != no; then
14592
14593cat >>confdefs.h <<EOF
14594#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14595EOF
14596
14597fi
14598rm -rf conftest*
14599
14600# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14601# in glibc 2.1.3, but that breaks too many other things.
14602# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14603echo "$as_me:14603: checking for fseeko" >&5
14604echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14605if test "${ac_cv_func_fseeko+set}" = set; then
14606  echo $ECHO_N "(cached) $ECHO_C" >&6
14607else
14608  cat >"conftest.$ac_ext" <<_ACEOF
14609#line 14609 "configure"
14610#include "confdefs.h"
14611#include <stdio.h>
14612                             #include <sys/types.h>
14613int
14614main (void)
14615{
14616int (*my_fseeko)(FILE *, off_t, int) = fseeko;
14617                            return my_fseeko && my_fseeko (stdin, 0, 0);
14618  ;
14619  return 0;
14620}
14621_ACEOF
14622rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14623if { (eval echo "$as_me:14623: \"$ac_link\"") >&5
14624  (eval $ac_link) 2>&5
14625  ac_status=$?
14626  echo "$as_me:14626: \$? = $ac_status" >&5
14627  (exit "$ac_status"); } &&
14628         { ac_try='test -s "conftest$ac_exeext"'
14629  { (eval echo "$as_me:14629: \"$ac_try\"") >&5
14630  (eval $ac_try) 2>&5
14631  ac_status=$?
14632  echo "$as_me:14632: \$? = $ac_status" >&5
14633  (exit "$ac_status"); }; }; then
14634  ac_cv_func_fseeko=yes
14635else
14636  echo "$as_me: failed program was:" >&5
14637cat "conftest.$ac_ext" >&5
14638ac_cv_func_fseeko=no
14639fi
14640rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14641fi
14642echo "$as_me:14642: result: $ac_cv_func_fseeko" >&5
14643echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14644if test $ac_cv_func_fseeko = yes; then
14645
14646cat >>confdefs.h <<\EOF
14647#define HAVE_FSEEKO 1
14648EOF
14649
14650fi
14651
14652	# Normally we would collect these definitions in the config.h,
14653	# but (like _XOPEN_SOURCE), some environments rely on having these
14654	# defined before any of the system headers are included.  Another
14655	# case comes up with C++, e.g., on AIX the compiler compiles the
14656	# header files by themselves before looking at the body files it is
14657	# told to compile.  For ncurses, those header files do not include
14658	# the config.h
14659	if test "$ac_cv_sys_large_files" != no
14660	then
14661
14662	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14663	CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14664
14665	fi
14666	if test "$ac_cv_sys_largefile_source" != no
14667	then
14668
14669	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14670	CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14671
14672	fi
14673	if test "$ac_cv_sys_file_offset_bits" != no
14674	then
14675
14676	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14677	CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14678
14679	fi
14680
14681	echo "$as_me:14681: checking whether to use struct dirent64" >&5
14682echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14683if test "${cf_cv_struct_dirent64+set}" = set; then
14684  echo $ECHO_N "(cached) $ECHO_C" >&6
14685else
14686
14687		cat >"conftest.$ac_ext" <<_ACEOF
14688#line 14688 "configure"
14689#include "confdefs.h"
14690
14691#pragma GCC diagnostic error "-Wincompatible-pointer-types"
14692#include <sys/types.h>
14693#include <dirent.h>
14694
14695#ifndef __REDIRECT
14696/* if transitional largefile support is setup, this is true */
14697extern struct dirent64 * readdir(DIR *);
14698#endif
14699
14700int
14701main (void)
14702{
14703
14704		DIR *dp = opendir(".");
14705		struct dirent64 *x = readdir(dp);
14706		struct dirent *y = readdir(dp);
14707		int z = x - y;
14708		(void)z;
14709
14710  ;
14711  return 0;
14712}
14713_ACEOF
14714rm -f "conftest.$ac_objext"
14715if { (eval echo "$as_me:14715: \"$ac_compile\"") >&5
14716  (eval $ac_compile) 2>&5
14717  ac_status=$?
14718  echo "$as_me:14718: \$? = $ac_status" >&5
14719  (exit "$ac_status"); } &&
14720         { ac_try='test -s "conftest.$ac_objext"'
14721  { (eval echo "$as_me:14721: \"$ac_try\"") >&5
14722  (eval $ac_try) 2>&5
14723  ac_status=$?
14724  echo "$as_me:14724: \$? = $ac_status" >&5
14725  (exit "$ac_status"); }; }; then
14726  cf_cv_struct_dirent64=yes
14727else
14728  echo "$as_me: failed program was:" >&5
14729cat "conftest.$ac_ext" >&5
14730cf_cv_struct_dirent64=no
14731fi
14732rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14733
14734fi
14735echo "$as_me:14735: result: $cf_cv_struct_dirent64" >&5
14736echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14737	test "$cf_cv_struct_dirent64" = yes &&
14738cat >>confdefs.h <<\EOF
14739#define HAVE_STRUCT_DIRENT64 1
14740EOF
14741
14742	fi
14743
14744###   use option --disable-tparm-varargs to make tparm() conform to X/Open
14745echo "$as_me:14745: checking if you want tparm not to use X/Open fixed-parameter list" >&5
14746echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
14747
14748# Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
14749if test "${enable_tparm_varargs+set}" = set; then
14750  enableval="$enable_tparm_varargs"
14751  with_tparm_varargs=$enableval
14752else
14753  with_tparm_varargs=yes
14754fi;
14755echo "$as_me:14755: result: $with_tparm_varargs" >&5
14756echo "${ECHO_T}$with_tparm_varargs" >&6
14757NCURSES_TPARM_VARARGS=0
14758test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
14759
14760###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
14761if test "$with_ticlib" != no ; then
14762echo "$as_me:14762: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
14763echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
14764
14765# Check whether --enable-tic-depends or --disable-tic-depends was given.
14766if test "${enable_tic_depends+set}" = set; then
14767  enableval="$enable_tic_depends"
14768  with_tic_depends=$enableval
14769else
14770  with_tic_depends=yes
14771fi;
14772echo "$as_me:14772: result: $with_tic_depends" >&5
14773echo "${ECHO_T}$with_tic_depends" >&6
14774else
14775	with_tic_depends=no
14776fi
14777
14778###   use option --enable-wattr-macros to enable wattr* macros in curses.h
14779echo "$as_me:14779: checking if you want to enable wattr* macros" >&5
14780echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
14781
14782# Check whether --enable-wattr-macros or --disable-wattr-macros was given.
14783if test "${enable_wattr_macros+set}" = set; then
14784  enableval="$enable_wattr_macros"
14785  with_wattr_macros=$enableval
14786else
14787  with_wattr_macros=no
14788fi;
14789if [ "x$with_wattr_macros" != xyes ]; then
14790	NCURSES_WATTR_MACROS=0
14791	echo "$as_me:14791: result: no" >&5
14792echo "${ECHO_T}no" >&6
14793else
14794	NCURSES_WATTR_MACROS=1
14795	echo "$as_me:14795: result: yes" >&5
14796echo "${ECHO_T}yes" >&6
14797fi
14798
14799echo "$as_me:14799: checking for X11 rgb file" >&5
14800echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14801
14802# Check whether --with-x11-rgb or --without-x11-rgb was given.
14803if test "${with_x11_rgb+set}" = set; then
14804  withval="$with_x11_rgb"
14805  RGB_PATH=$withval
14806else
14807  RGB_PATH=auto
14808fi;
14809
14810if test "x$RGB_PATH" = xauto
14811then
14812	RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14813	for cf_path in \
14814		/opt/local/share/X11/rgb.txt \
14815		/opt/X11/share/X11/rgb.txt \
14816		/usr/share/X11/rgb.txt \
14817		/usr/X11/share/X11/rgb.txt \
14818		/usr/X11/lib/X11/rgb.txt \
14819		/usr/lib/X11/rgb.txt \
14820		/etc/X11/rgb.txt \
14821		/usr/pkg/lib/X11/rgb.txt \
14822		/usr/X11R7/lib/X11/rgb.txt \
14823		/usr/X11R6/lib/X11/rgb.txt \
14824		/usr/X11R5/lib/X11/rgb.txt \
14825		/usr/X11R4/lib/X11/rgb.txt \
14826		/usr/local/lib/X11/rgb.txt \
14827		/usr/local/share/X11/rgb.txt \
14828		/usr/lib64/X11/rgb.txt
14829	do
14830		if test -f "$cf_path" ; then
14831			RGB_PATH="$cf_path"
14832			break
14833		fi
14834	done
14835else
14836	cf_path=$RGB_PATH
14837
14838if test "x$prefix" != xNONE; then
14839	cf_path_syntax="$prefix"
14840else
14841	cf_path_syntax="$ac_default_prefix"
14842fi
14843
14844case "x$cf_path" in
14845(x\$\(*\)*|x\'*\'*)
14846	;;
14847(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
14848	;;
14849(x\$\{*prefix\}*|x\$\{*dir\}*)
14850	eval cf_path="$cf_path"
14851	case "x$cf_path" in
14852	(xNONE/*)
14853		cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14854		;;
14855	esac
14856	;;
14857(xno|xNONE/*)
14858	cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14859	;;
14860(*)
14861	{ { echo "$as_me:14861: error: expected a pathname, not \"$cf_path\"" >&5
14862echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14863   { (exit 1); exit 1; }; }
14864	;;
14865esac
14866
14867fi
14868
14869echo "$as_me:14869: result: $RGB_PATH" >&5
14870echo "${ECHO_T}$RGB_PATH" >&6
14871
14872cat >>confdefs.h <<EOF
14873#define RGB_PATH "$cf_path"
14874EOF
14875
14876no_x11_rgb=
14877if test "$RGB_PATH" = no
14878then
14879	no_x11_rgb="#"
14880fi
14881
14882###   use option --with-bool to override bool's type
14883
14884echo "$as_me:14884: checking for type of bool" >&5
14885echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14886
14887# Check whether --with-bool or --without-bool was given.
14888if test "${with_bool+set}" = set; then
14889  withval="$with_bool"
14890  NCURSES_BOOL="$withval"
14891else
14892  NCURSES_BOOL=auto
14893fi;
14894echo "$as_me:14894: result: $NCURSES_BOOL" >&5
14895echo "${ECHO_T}$NCURSES_BOOL" >&6
14896case x$NCURSES_BOOL in
14897(x|xyes|xno)
14898	{ { echo "$as_me:14898: error: expected a type name for bool" >&5
14899echo "$as_me: error: expected a type name for bool" >&2;}
14900   { (exit 1); exit 1; }; }
14901	;;
14902esac
14903
14904echo "$as_me:14904: checking for alternate terminal capabilities file" >&5
14905echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14906
14907# Check whether --with-caps or --without-caps was given.
14908if test "${with_caps+set}" = set; then
14909  withval="$with_caps"
14910  TERMINFO_CAPS=Caps.$withval
14911else
14912  TERMINFO_CAPS=Caps
14913fi;
14914if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14915then
14916	{ echo "$as_me:14916: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14917echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14918	TERMINFO_CAPS=Caps
14919fi
14920echo "$as_me:14920: result: $TERMINFO_CAPS" >&5
14921echo "${ECHO_T}$TERMINFO_CAPS" >&6
14922
14923###   use option --with-chtype to override chtype's type
14924
14925echo "$as_me:14925: checking for type of chtype" >&5
14926echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14927
14928# Check whether --with-chtype or --without-chtype was given.
14929if test "${with_chtype+set}" = set; then
14930  withval="$with_chtype"
14931  NCURSES_CHTYPE="$withval"
14932else
14933  NCURSES_CHTYPE=$cf_dft_chtype
14934fi;
14935echo "$as_me:14935: result: $NCURSES_CHTYPE" >&5
14936echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14937case x$NCURSES_CHTYPE in
14938(x|xyes|xno)
14939	{ { echo "$as_me:14939: error: expected a type name for chtype" >&5
14940echo "$as_me: error: expected a type name for chtype" >&2;}
14941   { (exit 1); exit 1; }; }
14942	;;
14943esac
14944
14945###   use option --with-ospeed to override ospeed's type
14946
14947echo "$as_me:14947: checking for type of ospeed" >&5
14948echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14949
14950# Check whether --with-ospeed or --without-ospeed was given.
14951if test "${with_ospeed+set}" = set; then
14952  withval="$with_ospeed"
14953  NCURSES_OSPEED="$withval"
14954else
14955  NCURSES_OSPEED=short
14956fi;
14957echo "$as_me:14957: result: $NCURSES_OSPEED" >&5
14958echo "${ECHO_T}$NCURSES_OSPEED" >&6
14959case x$NCURSES_OSPEED in
14960(x|xyes|xno)
14961	{ { echo "$as_me:14961: error: expected a type name for ospeed" >&5
14962echo "$as_me: error: expected a type name for ospeed" >&2;}
14963   { (exit 1); exit 1; }; }
14964	;;
14965esac
14966
14967###   use option --with-mmask-t to override mmask_t's type
14968
14969echo "$as_me:14969: checking for type of mmask-t" >&5
14970echo $ECHO_N "checking for type of mmask-t... $ECHO_C" >&6
14971
14972# Check whether --with-mmask-t or --without-mmask-t was given.
14973if test "${with_mmask_t+set}" = set; then
14974  withval="$with_mmask_t"
14975  NCURSES_MMASK_T="$withval"
14976else
14977  NCURSES_MMASK_T=$cf_dft_mmask_t
14978fi;
14979echo "$as_me:14979: result: $NCURSES_MMASK_T" >&5
14980echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14981case x$NCURSES_MMASK_T in
14982(x|xyes|xno)
14983	{ { echo "$as_me:14983: error: expected a type name for mmask-t" >&5
14984echo "$as_me: error: expected a type name for mmask-t" >&2;}
14985   { (exit 1); exit 1; }; }
14986	;;
14987esac
14988
14989###   option --enable-lp64 can give unexpected results
14990if test "$cf_cv_enable_lp64" = 1 ; then
14991	test -n "$with_chtype"  && test "$NCURSES_CHTYPE"  != unsigned && { echo "$as_me:14991: WARNING: option --enable-lp64 overrides --with-chtype" >&5
14992echo "$as_me: WARNING: option --enable-lp64 overrides --with-chtype" >&2;}
14993	test -n "$with_mmask_t" && test "$NCURSES_MMASK_T" != unsigned && { echo "$as_me:14993: WARNING: option --enable-lp64 overrides --with-mmask-t" >&5
14994echo "$as_me: WARNING: option --enable-lp64 overrides --with-mmask-t" >&2;}
14995fi
14996
14997###   use option --with-ccharw-max to override CCHARW_MAX size
14998echo "$as_me:14998: checking for size CCHARW_MAX" >&5
14999echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
15000
15001# Check whether --with-ccharw-max or --without-ccharw-max was given.
15002if test "${with_ccharw_max+set}" = set; then
15003  withval="$with_ccharw_max"
15004  NCURSES_CCHARW_MAX="$withval"
15005else
15006  NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
15007fi;
15008echo "$as_me:15008: result: $NCURSES_CCHARW_MAX" >&5
15009echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
15010
15011echo "$as_me:15011: checking for signed char" >&5
15012echo $ECHO_N "checking for signed char... $ECHO_C" >&6
15013if test "${ac_cv_type_signed_char+set}" = set; then
15014  echo $ECHO_N "(cached) $ECHO_C" >&6
15015else
15016  cat >"conftest.$ac_ext" <<_ACEOF
15017#line 15017 "configure"
15018#include "confdefs.h"
15019$ac_includes_default
15020int
15021main (void)
15022{
15023if ((signed char *) 0)
15024  return 0;
15025if (sizeof (signed char))
15026  return 0;
15027  ;
15028  return 0;
15029}
15030_ACEOF
15031rm -f "conftest.$ac_objext"
15032if { (eval echo "$as_me:15032: \"$ac_compile\"") >&5
15033  (eval $ac_compile) 2>&5
15034  ac_status=$?
15035  echo "$as_me:15035: \$? = $ac_status" >&5
15036  (exit "$ac_status"); } &&
15037         { ac_try='test -s "conftest.$ac_objext"'
15038  { (eval echo "$as_me:15038: \"$ac_try\"") >&5
15039  (eval $ac_try) 2>&5
15040  ac_status=$?
15041  echo "$as_me:15041: \$? = $ac_status" >&5
15042  (exit "$ac_status"); }; }; then
15043  ac_cv_type_signed_char=yes
15044else
15045  echo "$as_me: failed program was:" >&5
15046cat "conftest.$ac_ext" >&5
15047ac_cv_type_signed_char=no
15048fi
15049rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15050fi
15051echo "$as_me:15051: result: $ac_cv_type_signed_char" >&5
15052echo "${ECHO_T}$ac_cv_type_signed_char" >&6
15053
15054echo "$as_me:15054: checking size of signed char" >&5
15055echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
15056if test "${ac_cv_sizeof_signed_char+set}" = set; then
15057  echo $ECHO_N "(cached) $ECHO_C" >&6
15058else
15059  if test "$ac_cv_type_signed_char" = yes; then
15060  if test "$cross_compiling" = yes; then
15061  # Depending upon the size, compute the lo and hi bounds.
15062cat >"conftest.$ac_ext" <<_ACEOF
15063#line 15063 "configure"
15064#include "confdefs.h"
15065$ac_includes_default
15066int
15067main (void)
15068{
15069int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
15070  ;
15071  return 0;
15072}
15073_ACEOF
15074rm -f "conftest.$ac_objext"
15075if { (eval echo "$as_me:15075: \"$ac_compile\"") >&5
15076  (eval $ac_compile) 2>&5
15077  ac_status=$?
15078  echo "$as_me:15078: \$? = $ac_status" >&5
15079  (exit "$ac_status"); } &&
15080         { ac_try='test -s "conftest.$ac_objext"'
15081  { (eval echo "$as_me:15081: \"$ac_try\"") >&5
15082  (eval $ac_try) 2>&5
15083  ac_status=$?
15084  echo "$as_me:15084: \$? = $ac_status" >&5
15085  (exit "$ac_status"); }; }; then
15086  ac_lo=0 ac_mid=0
15087  while :; do
15088    cat >"conftest.$ac_ext" <<_ACEOF
15089#line 15089 "configure"
15090#include "confdefs.h"
15091$ac_includes_default
15092int
15093main (void)
15094{
15095int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
15096  ;
15097  return 0;
15098}
15099_ACEOF
15100rm -f "conftest.$ac_objext"
15101if { (eval echo "$as_me:15101: \"$ac_compile\"") >&5
15102  (eval $ac_compile) 2>&5
15103  ac_status=$?
15104  echo "$as_me:15104: \$? = $ac_status" >&5
15105  (exit "$ac_status"); } &&
15106         { ac_try='test -s "conftest.$ac_objext"'
15107  { (eval echo "$as_me:15107: \"$ac_try\"") >&5
15108  (eval $ac_try) 2>&5
15109  ac_status=$?
15110  echo "$as_me:15110: \$? = $ac_status" >&5
15111  (exit "$ac_status"); }; }; then
15112  ac_hi=$ac_mid; break
15113else
15114  echo "$as_me: failed program was:" >&5
15115cat "conftest.$ac_ext" >&5
15116ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
15117fi
15118rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15119  done
15120else
15121  echo "$as_me: failed program was:" >&5
15122cat "conftest.$ac_ext" >&5
15123ac_hi=-1 ac_mid=-1
15124  while :; do
15125    cat >"conftest.$ac_ext" <<_ACEOF
15126#line 15126 "configure"
15127#include "confdefs.h"
15128$ac_includes_default
15129int
15130main (void)
15131{
15132int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
15133  ;
15134  return 0;
15135}
15136_ACEOF
15137rm -f "conftest.$ac_objext"
15138if { (eval echo "$as_me:15138: \"$ac_compile\"") >&5
15139  (eval $ac_compile) 2>&5
15140  ac_status=$?
15141  echo "$as_me:15141: \$? = $ac_status" >&5
15142  (exit "$ac_status"); } &&
15143         { ac_try='test -s "conftest.$ac_objext"'
15144  { (eval echo "$as_me:15144: \"$ac_try\"") >&5
15145  (eval $ac_try) 2>&5
15146  ac_status=$?
15147  echo "$as_me:15147: \$? = $ac_status" >&5
15148  (exit "$ac_status"); }; }; then
15149  ac_lo=$ac_mid; break
15150else
15151  echo "$as_me: failed program was:" >&5
15152cat "conftest.$ac_ext" >&5
15153ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
15154fi
15155rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15156  done
15157fi
15158rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15159# Binary search between lo and hi bounds.
15160while test "x$ac_lo" != "x$ac_hi"; do
15161  ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
15162  cat >"conftest.$ac_ext" <<_ACEOF
15163#line 15163 "configure"
15164#include "confdefs.h"
15165$ac_includes_default
15166int
15167main (void)
15168{
15169int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
15170  ;
15171  return 0;
15172}
15173_ACEOF
15174rm -f "conftest.$ac_objext"
15175if { (eval echo "$as_me:15175: \"$ac_compile\"") >&5
15176  (eval $ac_compile) 2>&5
15177  ac_status=$?
15178  echo "$as_me:15178: \$? = $ac_status" >&5
15179  (exit "$ac_status"); } &&
15180         { ac_try='test -s "conftest.$ac_objext"'
15181  { (eval echo "$as_me:15181: \"$ac_try\"") >&5
15182  (eval $ac_try) 2>&5
15183  ac_status=$?
15184  echo "$as_me:15184: \$? = $ac_status" >&5
15185  (exit "$ac_status"); }; }; then
15186  ac_hi=$ac_mid
15187else
15188  echo "$as_me: failed program was:" >&5
15189cat "conftest.$ac_ext" >&5
15190ac_lo=`expr "$ac_mid" + 1`
15191fi
15192rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15193done
15194ac_cv_sizeof_signed_char=$ac_lo
15195else
15196  if test "$cross_compiling" = yes; then
15197  { { echo "$as_me:15197: error: cannot run test program while cross compiling" >&5
15198echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15199   { (exit 1); exit 1; }; }
15200else
15201  cat >"conftest.$ac_ext" <<_ACEOF
15202#line 15202 "configure"
15203#include "confdefs.h"
15204$ac_includes_default
15205int
15206main (void)
15207{
15208FILE *f = fopen ("conftest.val", "w");
15209if (!f)
15210  $ac_main_return (1);
15211fprintf (f, "%ld", (long)(sizeof (signed char)));
15212fclose (f);
15213  ;
15214  return 0;
15215}
15216_ACEOF
15217rm -f "conftest$ac_exeext"
15218if { (eval echo "$as_me:15218: \"$ac_link\"") >&5
15219  (eval $ac_link) 2>&5
15220  ac_status=$?
15221  echo "$as_me:15221: \$? = $ac_status" >&5
15222  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
15223  { (eval echo "$as_me:15223: \"$ac_try\"") >&5
15224  (eval $ac_try) 2>&5
15225  ac_status=$?
15226  echo "$as_me:15226: \$? = $ac_status" >&5
15227  (exit "$ac_status"); }; }; then
15228  ac_cv_sizeof_signed_char=`cat conftest.val`
15229else
15230  echo "$as_me: program exited with status $ac_status" >&5
15231echo "$as_me: failed program was:" >&5
15232cat "conftest.$ac_ext" >&5
15233fi
15234rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
15235fi
15236fi
15237rm -f conftest.val
15238else
15239  ac_cv_sizeof_signed_char=0
15240fi
15241fi
15242echo "$as_me:15242: result: $ac_cv_sizeof_signed_char" >&5
15243echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
15244cat >>confdefs.h <<EOF
15245#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
15246EOF
15247
15248if test "$ac_cv_sizeof_signed_char" = 1 ; then
15249	NCURSES_SBOOL="signed char"
15250else
15251	NCURSES_SBOOL="char"
15252fi
15253echo "$as_me:15253: checking whether to use signed chars for Boolean array in term.h" >&5
15254echo $ECHO_N "checking whether to use signed chars for Boolean array in term.h... $ECHO_C" >&6
15255
15256# Check whether --enable-signed-char or --disable-signed-char was given.
15257if test "${enable_signed_char+set}" = set; then
15258  enableval="$enable_signed_char"
15259  with_signed_char=$enableval
15260else
15261  with_signed_char=$cf_dft_signed_char
15262fi;
15263echo "$as_me:15263: result: $with_signed_char" >&5
15264echo "${ECHO_T}$with_signed_char" >&6
15265test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
15266
15267###   use option --with-tparm-arg to override tparm's argument type
15268
15269echo "$as_me:15269: checking for type of tparm-arg" >&5
15270echo $ECHO_N "checking for type of tparm-arg... $ECHO_C" >&6
15271
15272# Check whether --with-tparm-arg or --without-tparm-arg was given.
15273if test "${with_tparm_arg+set}" = set; then
15274  withval="$with_tparm_arg"
15275  NCURSES_TPARM_ARG="$withval"
15276else
15277  NCURSES_TPARM_ARG=$cf_dft_tparm_arg
15278fi;
15279echo "$as_me:15279: result: $NCURSES_TPARM_ARG" >&5
15280echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
15281case x$NCURSES_TPARM_ARG in
15282(x|xyes|xno)
15283	{ { echo "$as_me:15283: error: expected a type name for tparm-arg" >&5
15284echo "$as_me: error: expected a type name for tparm-arg" >&2;}
15285   { (exit 1); exit 1; }; }
15286	;;
15287esac
15288
15289### Enable compiling-in rcs id's
15290echo "$as_me:15290: checking if RCS identifiers should be compiled-in" >&5
15291echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
15292
15293# Check whether --with-rcs-ids or --without-rcs-ids was given.
15294if test "${with_rcs_ids+set}" = set; then
15295  withval="$with_rcs_ids"
15296  with_rcs_ids=$withval
15297else
15298  with_rcs_ids=no
15299fi;
15300echo "$as_me:15300: result: $with_rcs_ids" >&5
15301echo "${ECHO_T}$with_rcs_ids" >&6
15302test "x$with_rcs_ids" = xyes &&
15303cat >>confdefs.h <<\EOF
15304#define USE_RCS_IDS 1
15305EOF
15306
15307###############################################################################
15308
15309### Note that some functions (such as const) are normally disabled anyway.
15310echo "$as_me:15310: checking if you want to build with function extensions" >&5
15311echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15312
15313# Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15314if test "${enable_ext_funcs+set}" = set; then
15315  enableval="$enable_ext_funcs"
15316  with_ext_funcs=$enableval
15317else
15318  with_ext_funcs=yes
15319fi;
15320echo "$as_me:15320: result: $with_ext_funcs" >&5
15321echo "${ECHO_T}$with_ext_funcs" >&6
15322if test "x$with_ext_funcs" = xyes ; then
15323	NCURSES_EXT_FUNCS=1
15324
15325cat >>confdefs.h <<\EOF
15326#define NCURSES_EXT_FUNCS 1
15327EOF
15328
15329cat >>confdefs.h <<\EOF
15330#define HAVE_ASSUME_DEFAULT_COLORS 1
15331EOF
15332
15333cat >>confdefs.h <<\EOF
15334#define HAVE_CURSES_VERSION 1
15335EOF
15336
15337cat >>confdefs.h <<\EOF
15338#define HAVE_HAS_KEY 1
15339EOF
15340
15341cat >>confdefs.h <<\EOF
15342#define HAVE_RESIZETERM 1
15343EOF
15344
15345cat >>confdefs.h <<\EOF
15346#define HAVE_RESIZE_TERM 1
15347EOF
15348
15349cat >>confdefs.h <<\EOF
15350#define HAVE_TERM_ENTRY_H 1
15351EOF
15352
15353cat >>confdefs.h <<\EOF
15354#define HAVE_USE_DEFAULT_COLORS 1
15355EOF
15356
15357cat >>confdefs.h <<\EOF
15358#define HAVE_USE_SCREEN 1
15359EOF
15360
15361cat >>confdefs.h <<\EOF
15362#define HAVE_USE_WINDOW 1
15363EOF
15364
15365cat >>confdefs.h <<\EOF
15366#define HAVE_WRESIZE 1
15367EOF
15368
15369	GENERATED_EXT_FUNCS=generated
15370else
15371	cf_dft_ext_spfuncs=no
15372	cf_dft_ext_colors=no
15373	NCURSES_EXT_FUNCS=0
15374	GENERATED_EXT_FUNCS=
15375fi
15376
15377echo "$as_me:15377: checking if you want to build with SCREEN extensions" >&5
15378echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15379
15380# Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15381if test "${enable_sp_funcs+set}" = set; then
15382  enableval="$enable_sp_funcs"
15383  with_sp_funcs=$enableval
15384else
15385  with_sp_funcs=$cf_dft_ext_spfuncs
15386fi;
15387echo "$as_me:15387: result: $with_sp_funcs" >&5
15388echo "${ECHO_T}$with_sp_funcs" >&6
15389if test "x$with_sp_funcs" = xyes ; then
15390	NCURSES_SP_FUNCS=1
15391
15392cat >>confdefs.h <<\EOF
15393#define NCURSES_SP_FUNCS 1
15394EOF
15395
15396cat >>confdefs.h <<\EOF
15397#define HAVE_TPUTS_SP 1
15398EOF
15399
15400	GENERATED_SP_FUNCS=generated
15401else
15402	NCURSES_SP_FUNCS=0
15403	GENERATED_SP_FUNCS=
15404fi
15405
15406case "$cf_cv_system_name" in
15407(*mingw32*|*mingw64*|*-msvc*)
15408	cf_dft_term_driver=yes
15409	;;
15410(*)
15411	cf_dft_term_driver=no
15412	;;
15413esac
15414
15415echo "$as_me:15415: checking if you want to build with terminal-driver" >&5
15416echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15417
15418# Check whether --enable-term-driver or --disable-term-driver was given.
15419if test "${enable_term_driver+set}" = set; then
15420  enableval="$enable_term_driver"
15421  with_term_driver=$enableval
15422else
15423  with_term_driver=$cf_dft_term_driver
15424fi;
15425echo "$as_me:15425: result: $with_term_driver" >&5
15426echo "${ECHO_T}$with_term_driver" >&6
15427if test "x$with_term_driver" = xyes ; then
15428
15429cat >>confdefs.h <<\EOF
15430#define USE_TERM_DRIVER 1
15431EOF
15432
15433	if test "x$with_termlib" != xno ; then
15434		{ { echo "$as_me:15434: error: The term-driver option conflicts with the termlib option" >&5
15435echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15436   { (exit 1); exit 1; }; }
15437	fi
15438	if test "x$with_sp_funcs" != xyes ; then
15439		{ { echo "$as_me:15439: error: The term-driver option relies upon sp-funcs" >&5
15440echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15441   { (exit 1); exit 1; }; }
15442	fi
15443fi
15444
15445###   use option --enable-const to turn on use of const beyond that in XSI.
15446echo "$as_me:15446: checking for extended use of const keyword" >&5
15447echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15448
15449# Check whether --enable-const or --disable-const was given.
15450if test "${enable_const+set}" = set; then
15451  enableval="$enable_const"
15452  with_ext_const=$enableval
15453else
15454  with_ext_const=$cf_dft_ext_const
15455fi;
15456echo "$as_me:15456: result: $with_ext_const" >&5
15457echo "${ECHO_T}$with_ext_const" >&6
15458NCURSES_CONST='/*nothing*/'
15459if test "x$with_ext_const" = xyes ; then
15460	NCURSES_CONST=const
15461fi
15462
15463###   use option --enable-ext-colors to turn on use of colors beyond 16.
15464NCURSES_EXT_COLORS=0
15465NCURSES_RGB_COLORS=0
15466echo "$as_me:15466: checking if you want to use extended colors" >&5
15467echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15468
15469# Check whether --enable-ext-colors or --disable-ext-colors was given.
15470if test "${enable_ext_colors+set}" = set; then
15471  enableval="$enable_ext_colors"
15472  with_ext_colors=$enableval
15473else
15474  with_ext_colors=$cf_dft_ext_colors
15475fi;
15476echo "$as_me:15476: result: $with_ext_colors" >&5
15477echo "${ECHO_T}$with_ext_colors" >&6
15478if test "x$with_ext_colors" = xyes ; then
15479	if test "x$with_widec" != xyes ; then
15480		{ echo "$as_me:15480: WARNING: This option applies only to wide-character library" >&5
15481echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15482	else
15483		# cannot be ABI 5 since it changes sizeof(cchar_t)
15484
15485if test "${with_abi_version+set}" != set; then
15486	case "$cf_cv_rel_version" in
15487	(5.*)
15488		cf_cv_rel_version=6.0
15489		cf_cv_abi_version=6
15490		cf_cv_abi_default=6
15491		{ echo "$as_me:15491: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15492echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15493		;;
15494	esac
15495fi
15496
15497		NCURSES_EXT_COLORS=1
15498
15499cat >>confdefs.h <<\EOF
15500#define NCURSES_EXT_COLORS 1
15501EOF
15502
15503cat >>confdefs.h <<\EOF
15504#define HAVE_ALLOC_PAIR 1
15505EOF
15506
15507cat >>confdefs.h <<\EOF
15508#define HAVE_INIT_EXTENDED_COLOR 1
15509EOF
15510
15511cat >>confdefs.h <<\EOF
15512#define HAVE_RESET_COLOR_PAIRS 1
15513EOF
15514
15515	fi
15516	###   use option --enable-rgb-color to extend support for direct-color
15517	echo "$as_me:15517: checking if you want to extend support for direct color" >&5
15518echo $ECHO_N "checking if you want to extend support for direct color... $ECHO_C" >&6
15519
15520# Check whether --enable-rgb-color or --disable-rgb-color was given.
15521if test "${enable_rgb_color+set}" = set; then
15522  enableval="$enable_rgb_color"
15523  with_rgb_color=$enableval
15524else
15525  with_rgb_color=$cf_dft_rgb_color
15526fi;
15527	echo "$as_me:15527: result: $with_rgb_color" >&5
15528echo "${ECHO_T}$with_rgb_color" >&6
15529	if test "x$with_rgb_color" = xyes ; then
15530		NCURSES_RGB_COLORS=1
15531
15532cat >>confdefs.h <<\EOF
15533#define NCURSES_RGB_COLORS 1
15534EOF
15535
15536	fi
15537fi
15538
15539###   use option --enable-ext-mouse to modify coding to support 5-button mice
15540echo "$as_me:15540: checking if you want to use extended mouse encoding" >&5
15541echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15542
15543# Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15544if test "${enable_ext_mouse+set}" = set; then
15545  enableval="$enable_ext_mouse"
15546  with_ext_mouse=$enableval
15547else
15548  with_ext_mouse=$cf_dft_ext_mouse
15549fi;
15550echo "$as_me:15550: result: $with_ext_mouse" >&5
15551echo "${ECHO_T}$with_ext_mouse" >&6
15552if test "x$with_ext_mouse" = xyes ; then
15553
15554if test "${with_abi_version+set}" != set; then
15555	case "$cf_cv_rel_version" in
15556	(5.*)
15557		cf_cv_rel_version=6.0
15558		cf_cv_abi_version=6
15559		cf_cv_abi_default=6
15560		{ echo "$as_me:15560: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15561echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15562		;;
15563	esac
15564fi
15565
15566fi
15567
15568if test $cf_cv_abi_default -le 5 ; then
15569	NCURSES_MOUSE_VERSION=1
15570elif test $cf_cv_abi_default -le 6 ; then
15571	NCURSES_MOUSE_VERSION=2
15572else
15573	NCURSES_MOUSE_VERSION=3
15574fi
15575
15576###   use option --enable-ext-putwin to turn on extended screendumps
15577echo "$as_me:15577: checking if you want to use extended putwin/screendump" >&5
15578echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15579
15580# Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15581if test "${enable_ext_putwin+set}" = set; then
15582  enableval="$enable_ext_putwin"
15583  with_ext_putwin=$enableval
15584else
15585  with_ext_putwin=$cf_dft_ext_putwin
15586fi;
15587echo "$as_me:15587: result: $with_ext_putwin" >&5
15588echo "${ECHO_T}$with_ext_putwin" >&6
15589if test "x$with_ext_putwin" = xyes ; then
15590
15591cat >>confdefs.h <<\EOF
15592#define NCURSES_EXT_PUTWIN 1
15593EOF
15594
15595fi
15596
15597echo "$as_me:15597: checking if you want \$NCURSES_NO_PADDING code" >&5
15598echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15599
15600# Check whether --enable-no-padding or --disable-no-padding was given.
15601if test "${enable_no_padding+set}" = set; then
15602  enableval="$enable_no_padding"
15603  with_no_padding=$enableval
15604else
15605  with_no_padding=$with_ext_funcs
15606fi;
15607echo "$as_me:15607: result: $with_no_padding" >&5
15608echo "${ECHO_T}$with_no_padding" >&6
15609test "x$with_no_padding" = xyes &&
15610cat >>confdefs.h <<\EOF
15611#define NCURSES_NO_PADDING 1
15612EOF
15613
15614###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15615echo "$as_me:15615: checking if you want SIGWINCH handler" >&5
15616echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15617
15618# Check whether --enable-sigwinch or --disable-sigwinch was given.
15619if test "${enable_sigwinch+set}" = set; then
15620  enableval="$enable_sigwinch"
15621  with_sigwinch=$enableval
15622else
15623  with_sigwinch=$with_ext_funcs
15624fi;
15625echo "$as_me:15625: result: $with_sigwinch" >&5
15626echo "${ECHO_T}$with_sigwinch" >&6
15627if test "x$with_sigwinch" = xyes
15628then
15629
15630cat >>confdefs.h <<\EOF
15631#define USE_SIGWINCH 1
15632EOF
15633
15634	cf_cv_enable_sigwinch=1
15635else
15636	cf_cv_enable_sigwinch=0
15637fi
15638
15639###   use option --enable-tcap-names to allow user to define new capabilities
15640echo "$as_me:15640: checking if you want user-definable terminal capabilities like termcap" >&5
15641echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15642
15643# Check whether --enable-tcap-names or --disable-tcap-names was given.
15644if test "${enable_tcap_names+set}" = set; then
15645  enableval="$enable_tcap_names"
15646  with_tcap_names=$enableval
15647else
15648  with_tcap_names=$with_ext_funcs
15649fi;
15650echo "$as_me:15650: result: $with_tcap_names" >&5
15651echo "${ECHO_T}$with_tcap_names" >&6
15652NCURSES_XNAMES=0
15653if test "x$with_tcap_names" = xyes; then
15654	NCURSES_XNAMES=1
15655
15656cat >>confdefs.h <<\EOF
15657#define NCURSES_XNAMES 1
15658EOF
15659
15660fi
15661
15662##############################################################################
15663
15664USE_NAMED_PIPES=0
15665INTERNALS_HDR=
15666
15667case "$cf_cv_system_name" in
15668(*mingw32*|*mingw64*|*-msvc*)
15669
15670echo "$as_me:15670: checking for named pipe functions" >&5
15671echo $ECHO_N "checking for named pipe functions... $ECHO_C" >&6
15672if test "${cf_cv_named_pipes+set}" = set; then
15673  echo $ECHO_N "(cached) $ECHO_C" >&6
15674else
15675
15676	cf_save_CPPFLAGS="$CPPFLAGS"
15677	CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
15678	cat >"conftest.$ac_ext" <<_ACEOF
15679#line 15679 "configure"
15680#include "confdefs.h"
15681#include <windows.h>
15682int
15683main (void)
15684{
15685
15686		HANDLE handle = 0;
15687		ULONG pPid = 0;
15688		if (GetNamedPipeInfo(handle, NULL, NULL, NULL, NULL)) {
15689			if (GetNamedPipeServerProcessId(handle, &pPid)) {
15690				${cf_cv_main_return:-return} (0);
15691			}
15692		}
15693
15694  ;
15695  return 0;
15696}
15697_ACEOF
15698rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15699if { (eval echo "$as_me:15699: \"$ac_link\"") >&5
15700  (eval $ac_link) 2>&5
15701  ac_status=$?
15702  echo "$as_me:15702: \$? = $ac_status" >&5
15703  (exit "$ac_status"); } &&
15704         { ac_try='test -s "conftest$ac_exeext"'
15705  { (eval echo "$as_me:15705: \"$ac_try\"") >&5
15706  (eval $ac_try) 2>&5
15707  ac_status=$?
15708  echo "$as_me:15708: \$? = $ac_status" >&5
15709  (exit "$ac_status"); }; }; then
15710  cf_cv_named_pipes=yes
15711else
15712  echo "$as_me: failed program was:" >&5
15713cat "conftest.$ac_ext" >&5
15714cf_cv_named_pipes=no
15715fi
15716rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15717	CPPFLAGS="$cf_save_CPPFLAGS"
15718
15719fi
15720echo "$as_me:15720: result: $cf_cv_named_pipes" >&5
15721echo "${ECHO_T}$cf_cv_named_pipes" >&6
15722	if test "$cf_cv_named_pipes" = yes; then
15723		echo "$as_me:15723: checking if you want to use named pipes with -Windows driver" >&5
15724echo $ECHO_N "checking if you want to use named pipes with -Windows driver... $ECHO_C" >&6
15725
15726# Check whether --enable-named-pipes or --disable-named-pipes was given.
15727if test "${enable_named_pipes+set}" = set; then
15728  enableval="$enable_named_pipes"
15729  with_named_pipes=$enableval
15730else
15731  with_named_pipes=no
15732fi;
15733		echo "$as_me:15733: result: $with_named_pipes" >&5
15734echo "${ECHO_T}$with_named_pipes" >&6
15735	else
15736		with_named_pipes=no
15737	fi
15738	if test "x$with_named_pipes" = xyes
15739	then
15740
15741cat >>confdefs.h <<\EOF
15742#define USE_NAMED_PIPES 1
15743EOF
15744
15745		USE_NAMED_PIPES=1
15746	fi
15747	INTERNALS_HDR='../include/nc_win32.h'
15748	# MinGW32 sets $WD to its directory.
15749	if test -n "$WD"
15750	then
15751		if test -d "$WD"
15752		then
15753
15754cat >>confdefs.h <<\EOF
15755#define USE_DOS_PATHS 1
15756EOF
15757
15758		fi
15759	fi
15760	;;
15761esac
15762
15763##############################################################################
15764
15765echo "$as_me:15765: checking if you want to link with the pthread library" >&5
15766echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15767
15768# Check whether --with-pthread or --without-pthread was given.
15769if test "${with_pthread+set}" = set; then
15770  withval="$with_pthread"
15771  with_pthread=$withval
15772else
15773  with_pthread=no
15774fi;
15775echo "$as_me:15775: result: $with_pthread" >&5
15776echo "${ECHO_T}$with_pthread" >&6
15777
15778if test "$with_pthread" != no ; then
15779	echo "$as_me:15779: checking for pthread.h" >&5
15780echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15781if test "${ac_cv_header_pthread_h+set}" = set; then
15782  echo $ECHO_N "(cached) $ECHO_C" >&6
15783else
15784  cat >"conftest.$ac_ext" <<_ACEOF
15785#line 15785 "configure"
15786#include "confdefs.h"
15787#include <pthread.h>
15788_ACEOF
15789if { (eval echo "$as_me:15789: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15790  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15791  ac_status=$?
15792  $EGREP -v '^ *\+' conftest.er1 >conftest.err
15793  rm -f conftest.er1
15794  cat conftest.err >&5
15795  echo "$as_me:15795: \$? = $ac_status" >&5
15796  (exit "$ac_status"); } >/dev/null; then
15797  if test -s conftest.err; then
15798    ac_cpp_err=$ac_c_preproc_warn_flag
15799  else
15800    ac_cpp_err=
15801  fi
15802else
15803  ac_cpp_err=yes
15804fi
15805if test -z "$ac_cpp_err"; then
15806  ac_cv_header_pthread_h=yes
15807else
15808  echo "$as_me: failed program was:" >&5
15809  cat "conftest.$ac_ext" >&5
15810  ac_cv_header_pthread_h=no
15811fi
15812rm -f conftest.err "conftest.$ac_ext"
15813fi
15814echo "$as_me:15814: result: $ac_cv_header_pthread_h" >&5
15815echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15816if test "$ac_cv_header_pthread_h" = yes; then
15817
15818cat >>confdefs.h <<\EOF
15819#define HAVE_PTHREADS_H 1
15820EOF
15821
15822	for cf_lib_pthread in pthread c_r
15823	do
15824	    echo "$as_me:15824: checking if we can link with the $cf_lib_pthread library" >&5
15825echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15826	    cf_save_LIBS="$LIBS"
15827
15828cf_add_libs="$LIBS"
15829# reverse order
15830cf_add_0lib=
15831for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15832# filter duplicates
15833for cf_add_1lib in $cf_add_0lib; do
15834	for cf_add_2lib in $cf_add_libs; do
15835		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15836			cf_add_1lib=
15837			break
15838		fi
15839	done
15840	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15841done
15842LIBS="$cf_add_libs"
15843
15844	    cat >"conftest.$ac_ext" <<_ACEOF
15845#line 15845 "configure"
15846#include "confdefs.h"
15847
15848#include <pthread.h>
15849
15850int
15851main (void)
15852{
15853
15854		int rc = pthread_create(0,0,0,0);
15855		int r2 = pthread_mutexattr_settype(0, 0);
15856
15857  ;
15858  return 0;
15859}
15860_ACEOF
15861rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15862if { (eval echo "$as_me:15862: \"$ac_link\"") >&5
15863  (eval $ac_link) 2>&5
15864  ac_status=$?
15865  echo "$as_me:15865: \$? = $ac_status" >&5
15866  (exit "$ac_status"); } &&
15867         { ac_try='test -s "conftest$ac_exeext"'
15868  { (eval echo "$as_me:15868: \"$ac_try\"") >&5
15869  (eval $ac_try) 2>&5
15870  ac_status=$?
15871  echo "$as_me:15871: \$? = $ac_status" >&5
15872  (exit "$ac_status"); }; }; then
15873  with_pthread=yes
15874else
15875  echo "$as_me: failed program was:" >&5
15876cat "conftest.$ac_ext" >&5
15877with_pthread=no
15878fi
15879rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15880	    LIBS="$cf_save_LIBS"
15881	    echo "$as_me:15881: result: $with_pthread" >&5
15882echo "${ECHO_T}$with_pthread" >&6
15883	    test "$with_pthread" = yes && break
15884	done
15885
15886	if test "$with_pthread" = yes ; then
15887
15888cf_add_libs="$LIBS"
15889# reverse order
15890cf_add_0lib=
15891for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15892# filter duplicates
15893for cf_add_1lib in $cf_add_0lib; do
15894	for cf_add_2lib in $cf_add_libs; do
15895		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15896			cf_add_1lib=
15897			break
15898		fi
15899	done
15900	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15901done
15902LIBS="$cf_add_libs"
15903
15904cat >>confdefs.h <<\EOF
15905#define HAVE_LIBPTHREADS 1
15906EOF
15907
15908	else
15909	    { { echo "$as_me:15909: error: Cannot link with pthread library" >&5
15910echo "$as_me: error: Cannot link with pthread library" >&2;}
15911   { (exit 1); exit 1; }; }
15912	fi
15913
15914fi
15915
15916fi
15917
15918if test "x$with_pthread" != xno; then
15919	echo "$as_me:15919: checking for pthread_kill" >&5
15920echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15921if test "${ac_cv_func_pthread_kill+set}" = set; then
15922  echo $ECHO_N "(cached) $ECHO_C" >&6
15923else
15924  cat >"conftest.$ac_ext" <<_ACEOF
15925#line 15925 "configure"
15926#include "confdefs.h"
15927#define pthread_kill autoconf_temporary
15928#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
15929#undef pthread_kill
15930
15931#ifdef __cplusplus
15932extern "C"
15933#endif
15934
15935/* We use char because int might match the return type of a gcc2
15936   builtin and then its argument prototype would still apply.  */
15937char pthread_kill (void);
15938
15939int
15940main (void)
15941{
15942
15943/* The GNU C library defines stubs for functions which it implements
15944    to always fail with ENOSYS.  Some functions are actually named
15945    something starting with __ and the normal name is an alias.  */
15946#if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15947#error found stub for pthread_kill
15948#endif
15949
15950	return pthread_kill ();
15951  ;
15952  return 0;
15953}
15954_ACEOF
15955rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15956if { (eval echo "$as_me:15956: \"$ac_link\"") >&5
15957  (eval $ac_link) 2>&5
15958  ac_status=$?
15959  echo "$as_me:15959: \$? = $ac_status" >&5
15960  (exit "$ac_status"); } &&
15961         { ac_try='test -s "conftest$ac_exeext"'
15962  { (eval echo "$as_me:15962: \"$ac_try\"") >&5
15963  (eval $ac_try) 2>&5
15964  ac_status=$?
15965  echo "$as_me:15965: \$? = $ac_status" >&5
15966  (exit "$ac_status"); }; }; then
15967  ac_cv_func_pthread_kill=yes
15968else
15969  echo "$as_me: failed program was:" >&5
15970cat "conftest.$ac_ext" >&5
15971ac_cv_func_pthread_kill=no
15972fi
15973rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15974fi
15975echo "$as_me:15975: result: $ac_cv_func_pthread_kill" >&5
15976echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15977if test "$ac_cv_func_pthread_kill" = yes; then
15978
15979		echo "$as_me:15979: checking if you want to allow EINTR in wgetch with pthreads" >&5
15980echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15981
15982# Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15983if test "${enable_pthreads_eintr+set}" = set; then
15984  enableval="$enable_pthreads_eintr"
15985  use_pthreads_eintr=$enableval
15986else
15987  use_pthreads_eintr=no
15988fi;
15989		echo "$as_me:15989: result: $use_pthreads_eintr" >&5
15990echo "${ECHO_T}$use_pthreads_eintr" >&6
15991		if test "x$use_pthreads_eintr" = xyes ; then
15992
15993cat >>confdefs.h <<\EOF
15994#define USE_PTHREADS_EINTR 1
15995EOF
15996
15997		fi
15998fi
15999
16000	echo "$as_me:16000: checking if you want to use weak-symbols for pthreads" >&5
16001echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
16002
16003# Check whether --enable-weak-symbols or --disable-weak-symbols was given.
16004if test "${enable_weak_symbols+set}" = set; then
16005  enableval="$enable_weak_symbols"
16006  use_weak_symbols=$enableval
16007else
16008  use_weak_symbols=no
16009fi;
16010	echo "$as_me:16010: result: $use_weak_symbols" >&5
16011echo "${ECHO_T}$use_weak_symbols" >&6
16012	if test "x$use_weak_symbols" = xyes ; then
16013
16014echo "$as_me:16014: checking if $CC supports weak symbols" >&5
16015echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
16016if test "${cf_cv_weak_symbols+set}" = set; then
16017  echo $ECHO_N "(cached) $ECHO_C" >&6
16018else
16019
16020cat >"conftest.$ac_ext" <<_ACEOF
16021#line 16021 "configure"
16022#include "confdefs.h"
16023
16024#include <stdio.h>
16025int
16026main (void)
16027{
16028
16029#if defined(__GNUC__)
16030#  if defined __USE_ISOC99
16031#    define _cat_pragma(exp)	_Pragma(#exp)
16032#    define _weak_pragma(exp)	_cat_pragma(weak name)
16033#  else
16034#    define _weak_pragma(exp)
16035#  endif
16036#  define _declare(name)	__extension__ extern __typeof__(name) name
16037#  define weak_symbol(name)	_weak_pragma(name) _declare(name) __attribute__((weak))
16038#endif
16039
16040weak_symbol(fopen);
16041
16042  ;
16043  return 0;
16044}
16045_ACEOF
16046rm -f "conftest.$ac_objext"
16047if { (eval echo "$as_me:16047: \"$ac_compile\"") >&5
16048  (eval $ac_compile) 2>&5
16049  ac_status=$?
16050  echo "$as_me:16050: \$? = $ac_status" >&5
16051  (exit "$ac_status"); } &&
16052         { ac_try='test -s "conftest.$ac_objext"'
16053  { (eval echo "$as_me:16053: \"$ac_try\"") >&5
16054  (eval $ac_try) 2>&5
16055  ac_status=$?
16056  echo "$as_me:16056: \$? = $ac_status" >&5
16057  (exit "$ac_status"); }; }; then
16058  cf_cv_weak_symbols=yes
16059else
16060  echo "$as_me: failed program was:" >&5
16061cat "conftest.$ac_ext" >&5
16062cf_cv_weak_symbols=no
16063fi
16064rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16065
16066fi
16067echo "$as_me:16067: result: $cf_cv_weak_symbols" >&5
16068echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16069
16070	else
16071		cf_cv_weak_symbols=no
16072	fi
16073
16074	if test "x$cf_cv_weak_symbols" = xyes ; then
16075
16076cat >>confdefs.h <<\EOF
16077#define USE_WEAK_SYMBOLS 1
16078EOF
16079
16080	fi
16081fi
16082
16083PTHREAD=
16084if test "x$with_pthread" = "xyes" ; then
16085
16086cat >>confdefs.h <<\EOF
16087#define USE_PTHREADS 1
16088EOF
16089
16090	enable_reentrant=yes
16091	if test "x$cf_cv_weak_symbols" = xyes ; then
16092		PTHREAD=-lpthread
16093
16094cf_add_libs="$PRIVATE_LIBS"
16095# reverse order
16096cf_add_0lib=
16097for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16098# filter duplicates
16099for cf_add_1lib in $cf_add_0lib; do
16100	for cf_add_2lib in $cf_add_libs; do
16101		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16102			cf_add_1lib=
16103			break
16104		fi
16105	done
16106	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16107done
16108PRIVATE_LIBS="$cf_add_libs"
16109
16110	fi
16111fi
16112
16113# Reentrant code has to be opaque; there's little advantage to making ncurses
16114# opaque outside of that, so there is no --enable-opaque option.  We can use
16115# this option without --with-pthreads, but this will be always set for
16116# pthreads.
16117echo "$as_me:16117: checking if you want reentrant code" >&5
16118echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16119
16120# Check whether --enable-reentrant or --disable-reentrant was given.
16121if test "${enable_reentrant+set}" = set; then
16122  enableval="$enable_reentrant"
16123  with_reentrant=$enableval
16124else
16125  with_reentrant=no
16126fi;
16127echo "$as_me:16127: result: $with_reentrant" >&5
16128echo "${ECHO_T}$with_reentrant" >&6
16129if test "x$with_reentrant" = xyes ; then
16130	cf_cv_enable_reentrant=1
16131	cf_cv_enable_opaque="NCURSES_INTERNALS"
16132	NCURSES_SIZE_T=int
16133	if test "x$cf_cv_weak_symbols" = xyes ; then
16134
16135# remove pthread library from $LIBS
16136LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ 	]//g' -e 's/-lpthread$//'`
16137
16138cf_add_libs="$TEST_LIBS"
16139# reverse order
16140cf_add_0lib=
16141for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16142# filter duplicates
16143for cf_add_1lib in $cf_add_0lib; do
16144	for cf_add_2lib in $cf_add_libs; do
16145		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16146			cf_add_1lib=
16147			break
16148		fi
16149	done
16150	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16151done
16152TEST_LIBS="$cf_add_libs"
16153
16154cf_add_libs="$TEST_LIBS2"
16155# reverse order
16156cf_add_0lib=
16157for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16158# filter duplicates
16159for cf_add_1lib in $cf_add_0lib; do
16160	for cf_add_2lib in $cf_add_libs; do
16161		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16162			cf_add_1lib=
16163			break
16164		fi
16165	done
16166	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16167done
16168TEST_LIBS2="$cf_add_libs"
16169
16170cf_add_libs="$PRIVATE_LIBS"
16171# reverse order
16172cf_add_0lib=
16173for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16174# filter duplicates
16175for cf_add_1lib in $cf_add_0lib; do
16176	for cf_add_2lib in $cf_add_libs; do
16177		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16178			cf_add_1lib=
16179			break
16180		fi
16181	done
16182	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16183done
16184PRIVATE_LIBS="$cf_add_libs"
16185
16186	else
16187		# when not using weak symbols but with_reentrant,
16188		# add 't' to the library suffix on all platforms
16189		# except cygwin, where we only do that if ALSO
16190		# compiling with full thread support.
16191		case "$host" in
16192		(*cygwin* | *msys*)
16193			if test "$with_pthread" = "yes" ; then
16194				if test "x$disable_lib_suffixes" = "xno" ; then
16195					LIB_SUFFIX="t${LIB_SUFFIX}"
16196				fi
16197			fi ;;
16198		(*)
16199			if test "x$disable_lib_suffixes" = "xno" ; then
16200				LIB_SUFFIX="t${LIB_SUFFIX}"
16201			fi
16202			;;
16203		esac
16204	fi
16205
16206cat >>confdefs.h <<\EOF
16207#define USE_REENTRANT 1
16208EOF
16209
16210if test "${with_abi_version+set}" != set; then
16211	case "$cf_cv_rel_version" in
16212	(5.*)
16213		cf_cv_rel_version=6.0
16214		cf_cv_abi_version=6
16215		cf_cv_abi_default=6
16216		{ echo "$as_me:16216: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16217echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16218		;;
16219	esac
16220fi
16221
16222else
16223	cf_cv_enable_reentrant=0
16224	cf_cv_enable_opaque="NCURSES_OPAQUE"
16225	NCURSES_SIZE_T=$cf_dft_ordinate_type
16226fi
16227
16228echo "$as_me:16228: checking whether curses library structures should be opaque" >&5
16229echo $ECHO_N "checking whether curses library structures should be opaque... $ECHO_C" >&6
16230
16231# Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16232if test "${enable_opaque_curses+set}" = set; then
16233  enableval="$enable_opaque_curses"
16234  test "$enableval" != no && enableval=yes
16235	if test "$enableval" != "yes" ; then
16236    enable_opaque_curses=no
16237	else
16238
16239	 test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16240	 test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16241
16242	fi
16243else
16244  enableval=yes
16245
16246	 test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16247	 test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16248
16249fi;
16250echo "$as_me:16250: result: $enable_opaque_curses" >&5
16251echo "${ECHO_T}$enable_opaque_curses" >&6
16252
16253test "$cf_cv_enable_reentrant" = 1 && \
16254test "$enable_opaque_curses" = no && \
16255{ { echo "$as_me:16255: error: reentrant configuration requires opaque library" >&5
16256echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16257   { (exit 1); exit 1; }; }
16258
16259echo "$as_me:16259: checking whether form library structures should be opaque" >&5
16260echo $ECHO_N "checking whether form library structures should be opaque... $ECHO_C" >&6
16261
16262# Check whether --enable-opaque-form or --disable-opaque-form was given.
16263if test "${enable_opaque_form+set}" = set; then
16264  enableval="$enable_opaque_form"
16265  test "$enableval" != no && enableval=yes
16266	if test "$enableval" != "yes" ; then
16267    enable_opaque_form=no
16268	else
16269		enable_opaque_form=$cf_dft_opaque_curses
16270	fi
16271else
16272  enableval=yes
16273	enable_opaque_form=$cf_dft_opaque_curses
16274
16275fi;
16276echo "$as_me:16276: result: $enable_opaque_form" >&5
16277echo "${ECHO_T}$enable_opaque_form" >&6
16278
16279echo "$as_me:16279: checking whether menu library structures should be opaque" >&5
16280echo $ECHO_N "checking whether menu library structures should be opaque... $ECHO_C" >&6
16281
16282# Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16283if test "${enable_opaque_menu+set}" = set; then
16284  enableval="$enable_opaque_menu"
16285  test "$enableval" != no && enableval=yes
16286	if test "$enableval" != "yes" ; then
16287    enable_opaque_menu=no
16288	else
16289		enable_opaque_menu=$cf_dft_opaque_curses
16290	fi
16291else
16292  enableval=yes
16293	enable_opaque_menu=$cf_dft_opaque_curses
16294
16295fi;
16296echo "$as_me:16296: result: $enable_opaque_menu" >&5
16297echo "${ECHO_T}$enable_opaque_menu" >&6
16298
16299echo "$as_me:16299: checking whether panel library structures should be opaque" >&5
16300echo $ECHO_N "checking whether panel library structures should be opaque... $ECHO_C" >&6
16301
16302# Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16303if test "${enable_opaque_panel+set}" = set; then
16304  enableval="$enable_opaque_panel"
16305  test "$enableval" != no && enableval=yes
16306	if test "$enableval" != "yes" ; then
16307    enable_opaque_panel=no
16308	else
16309		enable_opaque_panel=$cf_dft_opaque_curses
16310	fi
16311else
16312  enableval=yes
16313	enable_opaque_panel=$cf_dft_opaque_curses
16314
16315fi;
16316echo "$as_me:16316: result: $enable_opaque_panel" >&5
16317echo "${ECHO_T}$enable_opaque_panel" >&6
16318
16319NCURSES_OPAQUE=0;		test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16320NCURSES_OPAQUE_FORM=0;	test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16321NCURSES_OPAQUE_MENU=0;	test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16322NCURSES_OPAQUE_PANEL=0;	test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16323
16324### Allow using a different wrap-prefix
16325if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16326	echo "$as_me:16326: checking for prefix used to wrap public variables" >&5
16327echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16328
16329# Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16330if test "${with_wrap_prefix+set}" = set; then
16331  withval="$with_wrap_prefix"
16332  NCURSES_WRAP_PREFIX=$withval
16333else
16334  NCURSES_WRAP_PREFIX=_nc_
16335fi;
16336	echo "$as_me:16336: result: $NCURSES_WRAP_PREFIX" >&5
16337echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16338else
16339	NCURSES_WRAP_PREFIX=_nc_
16340fi
16341
16342cat >>confdefs.h <<EOF
16343#define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16344EOF
16345
16346###############################################################################
16347# These options are relatively safe to experiment with.
16348
16349echo "$as_me:16349: checking if you want all development code" >&5
16350echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16351
16352# Check whether --with-develop or --without-develop was given.
16353if test "${with_develop+set}" = set; then
16354  withval="$with_develop"
16355  with_develop=$withval
16356else
16357  with_develop=no
16358fi;
16359echo "$as_me:16359: result: $with_develop" >&5
16360echo "${ECHO_T}$with_develop" >&6
16361
16362###   use option --enable-check-size to detect screensize with CPR
16363echo "$as_me:16363: checking if you want to check screensize of serial terminals" >&5
16364echo $ECHO_N "checking if you want to check screensize of serial terminals... $ECHO_C" >&6
16365
16366# Check whether --enable-check-size or --disable-check-size was given.
16367if test "${enable_check_size+set}" = set; then
16368  enableval="$enable_check_size"
16369
16370else
16371  enable_check_size=$with_develop
16372fi;
16373echo "$as_me:16373: result: $enable_check_size" >&5
16374echo "${ECHO_T}$enable_check_size" >&6
16375test "x$enable_check_size" = xyes &&
16376cat >>confdefs.h <<\EOF
16377#define USE_CHECK_SIZE 1
16378EOF
16379
16380###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16381echo "$as_me:16381: checking if you want hard-tabs code" >&5
16382echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16383
16384# Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16385if test "${enable_hard_tabs+set}" = set; then
16386  enableval="$enable_hard_tabs"
16387
16388else
16389  enable_hard_tabs=$with_develop
16390fi;
16391echo "$as_me:16391: result: $enable_hard_tabs" >&5
16392echo "${ECHO_T}$enable_hard_tabs" >&6
16393test "x$enable_hard_tabs" = xyes &&
16394cat >>confdefs.h <<\EOF
16395#define USE_HARD_TABS 1
16396EOF
16397
16398###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16399echo "$as_me:16399: checking if you want limited support for xmc" >&5
16400echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16401
16402# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16403if test "${enable_xmc_glitch+set}" = set; then
16404  enableval="$enable_xmc_glitch"
16405
16406else
16407  enable_xmc_glitch=$with_develop
16408fi;
16409echo "$as_me:16409: result: $enable_xmc_glitch" >&5
16410echo "${ECHO_T}$enable_xmc_glitch" >&6
16411test "x$enable_xmc_glitch" = xyes &&
16412cat >>confdefs.h <<\EOF
16413#define USE_XMC_SUPPORT 1
16414EOF
16415
16416###############################################################################
16417# These are just experimental, probably should not be in a package:
16418
16419echo "$as_me:16419: checking if you do not want to assume colors are white-on-black" >&5
16420echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16421
16422# Check whether --enable-assumed-color or --disable-assumed-color was given.
16423if test "${enable_assumed_color+set}" = set; then
16424  enableval="$enable_assumed_color"
16425  with_assumed_color=$enableval
16426else
16427  with_assumed_color=yes
16428fi;
16429echo "$as_me:16429: result: $with_assumed_color" >&5
16430echo "${ECHO_T}$with_assumed_color" >&6
16431test "x$with_assumed_color" = xyes &&
16432cat >>confdefs.h <<\EOF
16433#define USE_ASSUMED_COLOR 1
16434EOF
16435
16436###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16437echo "$as_me:16437: checking if you want hashmap scrolling-optimization code" >&5
16438echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16439
16440# Check whether --enable-hashmap or --disable-hashmap was given.
16441if test "${enable_hashmap+set}" = set; then
16442  enableval="$enable_hashmap"
16443  with_hashmap=$enableval
16444else
16445  with_hashmap=yes
16446fi;
16447echo "$as_me:16447: result: $with_hashmap" >&5
16448echo "${ECHO_T}$with_hashmap" >&6
16449test "x$with_hashmap" = xyes &&
16450cat >>confdefs.h <<\EOF
16451#define USE_HASHMAP 1
16452EOF
16453
16454###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16455echo "$as_me:16455: checking if you want colorfgbg code" >&5
16456echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16457
16458# Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16459if test "${enable_colorfgbg+set}" = set; then
16460  enableval="$enable_colorfgbg"
16461  with_colorfgbg=$enableval
16462else
16463  with_colorfgbg=no
16464fi;
16465echo "$as_me:16465: result: $with_colorfgbg" >&5
16466echo "${ECHO_T}$with_colorfgbg" >&6
16467test "x$with_colorfgbg" = xyes &&
16468cat >>confdefs.h <<\EOF
16469#define USE_COLORFGBG 1
16470EOF
16471
16472###   use option --enable-fvisibility to turn on use of gcc-specific feature
16473echo "$as_me:16473: checking if you want to use gcc -fvisibility option" >&5
16474echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16475
16476# Check whether --enable-fvisibility or --disable-fvisibility was given.
16477if test "${enable_fvisibility+set}" = set; then
16478  enableval="$enable_fvisibility"
16479  cf_with_fvisibility=$enableval
16480else
16481  cf_with_fvisibility=no
16482fi;
16483echo "$as_me:16483: result: $cf_with_fvisibility" >&5
16484echo "${ECHO_T}$cf_with_fvisibility" >&6
16485
16486NCURSES_IMPEXP=
16487NCURSES_CXX_IMPEXP=
16488if test "x$cf_with_fvisibility" = xyes; then
16489
16490echo "$as_me:16490: checking if $CC -fvisibility=hidden option works" >&5
16491echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16492if test "${cf_cv_fvisibility_hidden+set}" = set; then
16493  echo $ECHO_N "(cached) $ECHO_C" >&6
16494else
16495
16496    cf_save_cflags="$CFLAGS"
16497    CFLAGS="$CFLAGS -fvisibility=hidden"
16498    cat >"conftest.$ac_ext" <<_ACEOF
16499#line 16499 "configure"
16500#include "confdefs.h"
16501
16502__attribute__ ((visibility("default"))) int somefunc() {return 42;}
16503
16504int
16505main (void)
16506{
16507
16508	if (somefunc()) return 1;
16509
16510  ;
16511  return 0;
16512}
16513_ACEOF
16514rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16515if { (eval echo "$as_me:16515: \"$ac_link\"") >&5
16516  (eval $ac_link) 2>&5
16517  ac_status=$?
16518  echo "$as_me:16518: \$? = $ac_status" >&5
16519  (exit "$ac_status"); } &&
16520         { ac_try='test -s "conftest$ac_exeext"'
16521  { (eval echo "$as_me:16521: \"$ac_try\"") >&5
16522  (eval $ac_try) 2>&5
16523  ac_status=$?
16524  echo "$as_me:16524: \$? = $ac_status" >&5
16525  (exit "$ac_status"); }; }; then
16526  cf_cv_fvisibility_hidden=yes
16527else
16528  echo "$as_me: failed program was:" >&5
16529cat "conftest.$ac_ext" >&5
16530cf_cv_fvisibility_hidden=no
16531fi
16532rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16533    CFLAGS=$cf_save_cflags
16534
16535fi
16536echo "$as_me:16536: result: $cf_cv_fvisibility_hidden" >&5
16537echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16538
16539	if test "x$cf_cv_fvisibility_hidden" = xyes
16540	then
16541
16542cf_fix_cppflags=no
16543cf_new_cflags=
16544cf_new_cppflags=
16545cf_new_extra_cppflags=
16546
16547for cf_add_cflags in -fvisibility=hidden
16548do
16549case "$cf_fix_cppflags" in
16550(no)
16551	case "$cf_add_cflags" in
16552	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16553		case "$cf_add_cflags" in
16554		(-D*)
16555			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16556
16557			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16558				&& test -z "${cf_tst_cflags}" \
16559				&& cf_fix_cppflags=yes
16560
16561			if test "$cf_fix_cppflags" = yes ; then
16562
16563	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16564	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16565
16566				continue
16567			elif test "${cf_tst_cflags}" = "\"'" ; then
16568
16569	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16570	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16571
16572				continue
16573			fi
16574			;;
16575		esac
16576		case "$CPPFLAGS" in
16577		(*$cf_add_cflags)
16578			;;
16579		(*)
16580			case "$cf_add_cflags" in
16581			(-D*)
16582				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16583
16584CPPFLAGS=`echo "$CPPFLAGS" | \
16585	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
16586		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
16587
16588				;;
16589			esac
16590
16591	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16592	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16593
16594			;;
16595		esac
16596		;;
16597	(*)
16598
16599	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16600	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16601
16602		;;
16603	esac
16604	;;
16605(yes)
16606
16607	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16608	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16609
16610	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16611
16612	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16613		&& test -z "${cf_tst_cflags}" \
16614		&& cf_fix_cppflags=no
16615	;;
16616esac
16617done
16618
16619if test -n "$cf_new_cflags" ; then
16620
16621	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16622	CFLAGS="${CFLAGS}$cf_new_cflags"
16623
16624fi
16625
16626if test -n "$cf_new_cppflags" ; then
16627
16628	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16629	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16630
16631fi
16632
16633if test -n "$cf_new_extra_cppflags" ; then
16634
16635	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16636	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16637
16638fi
16639
16640		NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16641	fi
16642	if test -n "$CXX"
16643	then
16644		ac_ext=cc
16645ac_cpp='$CXXCPP $CPPFLAGS'
16646ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16647ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16648ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16649ac_main_return="return"
16650
16651echo "$as_me:16651: checking if $CXX -fvisibility=hidden option works" >&5
16652echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16653if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16654  echo $ECHO_N "(cached) $ECHO_C" >&6
16655else
16656
16657    cf_save_cflags="$CXXFLAGS"
16658    CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16659    cat >"conftest.$ac_ext" <<_ACEOF
16660#line 16660 "configure"
16661#include "confdefs.h"
16662
16663__attribute__ ((visibility("default"))) int somefunc() {return 42;}
16664
16665int
16666main (void)
16667{
16668
16669	if (somefunc()) return 1;
16670
16671  ;
16672  return 0;
16673}
16674_ACEOF
16675rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16676if { (eval echo "$as_me:16676: \"$ac_link\"") >&5
16677  (eval $ac_link) 2>&5
16678  ac_status=$?
16679  echo "$as_me:16679: \$? = $ac_status" >&5
16680  (exit "$ac_status"); } &&
16681         { ac_try='test -s "conftest$ac_exeext"'
16682  { (eval echo "$as_me:16682: \"$ac_try\"") >&5
16683  (eval $ac_try) 2>&5
16684  ac_status=$?
16685  echo "$as_me:16685: \$? = $ac_status" >&5
16686  (exit "$ac_status"); }; }; then
16687  cf_cv_fvisibility_hidden2=yes
16688else
16689  echo "$as_me: failed program was:" >&5
16690cat "conftest.$ac_ext" >&5
16691cf_cv_fvisibility_hidden2=no
16692fi
16693rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16694    CXXFLAGS=$cf_save_cflags
16695
16696fi
16697echo "$as_me:16697: result: $cf_cv_fvisibility_hidden2" >&5
16698echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16699
16700		if test "x$cf_cv_fvisibility_hidden2" = xyes
16701		then
16702
16703cf_save_CXXFLAGS="$CFLAGS"
16704CFLAGS="$CXXFLAGS"
16705
16706cf_fix_cppflags=no
16707cf_new_cflags=
16708cf_new_cppflags=
16709cf_new_extra_cppflags=
16710
16711for cf_add_cflags in -fvisibility=hidden
16712do
16713case "$cf_fix_cppflags" in
16714(no)
16715	case "$cf_add_cflags" in
16716	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16717		case "$cf_add_cflags" in
16718		(-D*)
16719			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16720
16721			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16722				&& test -z "${cf_tst_cflags}" \
16723				&& cf_fix_cppflags=yes
16724
16725			if test "$cf_fix_cppflags" = yes ; then
16726
16727	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16728	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16729
16730				continue
16731			elif test "${cf_tst_cflags}" = "\"'" ; then
16732
16733	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16734	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16735
16736				continue
16737			fi
16738			;;
16739		esac
16740		case "$CPPFLAGS" in
16741		(*$cf_add_cflags)
16742			;;
16743		(*)
16744			case "$cf_add_cflags" in
16745			(-D*)
16746				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16747
16748CPPFLAGS=`echo "$CPPFLAGS" | \
16749	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
16750		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
16751
16752				;;
16753			esac
16754
16755	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16756	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16757
16758			;;
16759		esac
16760		;;
16761	(*)
16762
16763	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16764	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16765
16766		;;
16767	esac
16768	;;
16769(yes)
16770
16771	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16772	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16773
16774	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16775
16776	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16777		&& test -z "${cf_tst_cflags}" \
16778		&& cf_fix_cppflags=no
16779	;;
16780esac
16781done
16782
16783if test -n "$cf_new_cflags" ; then
16784
16785	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16786	CFLAGS="${CFLAGS}$cf_new_cflags"
16787
16788fi
16789
16790if test -n "$cf_new_cppflags" ; then
16791
16792	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16793	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16794
16795fi
16796
16797if test -n "$cf_new_extra_cppflags" ; then
16798
16799	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16800	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16801
16802fi
16803
16804CXXFLAGS="$CFLAGS"
16805CFLAGS="$cf_save_CXXFLAGS"
16806
16807			NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16808		fi
16809		ac_ext=c
16810ac_cpp='$CPP $CPPFLAGS'
16811ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16812ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16813ac_compiler_gnu=$ac_cv_c_compiler_gnu
16814ac_main_return="return"
16815
16816	fi
16817fi
16818
16819###   use option --enable-interop to turn on use of bindings used for interop
16820echo "$as_me:16820: checking if you want interop bindings" >&5
16821echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16822
16823# Check whether --enable-interop or --disable-interop was given.
16824if test "${enable_interop+set}" = set; then
16825  enableval="$enable_interop"
16826  with_exp_interop=$enableval
16827else
16828  with_exp_interop=$cf_dft_interop
16829fi;
16830echo "$as_me:16830: result: $with_exp_interop" >&5
16831echo "${ECHO_T}$with_exp_interop" >&6
16832
16833NCURSES_INTEROP_FUNCS=0
16834test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16835
16836echo "$as_me:16836: checking if you want experimental safe-sprintf code" >&5
16837echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16838
16839# Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16840if test "${enable_safe_sprintf+set}" = set; then
16841  enableval="$enable_safe_sprintf"
16842  with_safe_sprintf=$enableval
16843else
16844  with_safe_sprintf=no
16845fi;
16846echo "$as_me:16846: result: $with_safe_sprintf" >&5
16847echo "${ECHO_T}$with_safe_sprintf" >&6
16848
16849###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16850# when hashmap is used scroll hints are useless
16851if test "$with_hashmap" = no ; then
16852echo "$as_me:16852: checking if you want to experiment without scrolling-hints code" >&5
16853echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16854
16855# Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16856if test "${enable_scroll_hints+set}" = set; then
16857  enableval="$enable_scroll_hints"
16858  with_scroll_hints=$enableval
16859else
16860  with_scroll_hints=yes
16861fi;
16862echo "$as_me:16862: result: $with_scroll_hints" >&5
16863echo "${ECHO_T}$with_scroll_hints" >&6
16864test "x$with_scroll_hints" = xyes &&
16865cat >>confdefs.h <<\EOF
16866#define USE_SCROLL_HINTS 1
16867EOF
16868
16869fi
16870
16871case x$cf_cv_abi_default in
16872(x[789])
16873	NCURSES_WGETCH_EVENTS=0
16874	;;
16875(*)
16876echo "$as_me:16876: checking if you want wgetch-events code" >&5
16877echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16878
16879# Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16880if test "${enable_wgetch_events+set}" = set; then
16881  enableval="$enable_wgetch_events"
16882  with_wgetch_events=$enableval
16883else
16884  with_wgetch_events=no
16885fi;
16886echo "$as_me:16886: result: $with_wgetch_events" >&5
16887echo "${ECHO_T}$with_wgetch_events" >&6
16888if test "x$with_wgetch_events" = xyes ; then
16889
16890cat >>confdefs.h <<\EOF
16891#define NCURSES_WGETCH_EVENTS 1
16892EOF
16893
16894	NCURSES_WGETCH_EVENTS=1
16895else
16896	NCURSES_WGETCH_EVENTS=0
16897fi
16898esac
16899
16900case "$cf_cv_system_name" in
16901(*mingw32*|*mingw64*|*-msvc*)
16902
16903# Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16904if test "${enable_exp_win32+set}" = set; then
16905  enableval="$enable_exp_win32"
16906  { echo "$as_me:16906: WARNING: The --enable-exp-win32 option is obsolete" >&5
16907echo "$as_me: WARNING: The --enable-exp-win32 option is obsolete" >&2;}
16908fi;
16909	;;
16910esac
16911
16912###############################################################################
16913
16914###	use option --disable-echo to suppress full display compiling commands
16915
16916echo "$as_me:16916: checking if you want to see long compiling messages" >&5
16917echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16918
16919# Check whether --enable-echo or --disable-echo was given.
16920if test "${enable_echo+set}" = set; then
16921  enableval="$enable_echo"
16922  test "$enableval" != no && enableval=yes
16923	if test "$enableval" != "yes" ; then
16924
16925	ECHO_LT='--silent'
16926	ECHO_LD='@echo linking $@;'
16927	RULE_CC='@echo compiling $<'
16928	SHOW_CC='@echo compiling $@'
16929	ECHO_CC='@'
16930
16931	else
16932
16933	ECHO_LT=''
16934	ECHO_LD=''
16935	RULE_CC=''
16936	SHOW_CC=''
16937	ECHO_CC=''
16938
16939	fi
16940else
16941  enableval=yes
16942
16943	ECHO_LT=''
16944	ECHO_LD=''
16945	RULE_CC=''
16946	SHOW_CC=''
16947	ECHO_CC=''
16948
16949fi;
16950echo "$as_me:16950: result: $enableval" >&5
16951echo "${ECHO_T}$enableval" >&6
16952
16953if test "x$enable_echo" = xyes; then
16954	ECHO_LINK=
16955else
16956	ECHO_LINK='@ echo linking $@ ... ;'
16957	test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16958	test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16959fi
16960
16961# --disable-stripping is used for debugging
16962
16963echo "$as_me:16963: checking if you want to install stripped executables" >&5
16964echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16965
16966# Check whether --enable-stripping or --disable-stripping was given.
16967if test "${enable_stripping+set}" = set; then
16968  enableval="$enable_stripping"
16969  test "$enableval" != no && enableval=yes
16970	if test "$enableval" != "yes" ; then
16971    enable_stripping=no
16972	else
16973		enable_stripping=yes
16974	fi
16975else
16976  enableval=yes
16977	enable_stripping=yes
16978
16979fi;
16980echo "$as_me:16980: result: $enable_stripping" >&5
16981echo "${ECHO_T}$enable_stripping" >&6
16982
16983if test "$enable_stripping" = yes
16984then
16985	INSTALL_OPT_S="-s"
16986else
16987	INSTALL_OPT_S=
16988fi
16989
16990: "${INSTALL:=install}"
16991echo "$as_me:16991: checking if install accepts -p option" >&5
16992echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16993if test "${cf_cv_install_p+set}" = set; then
16994  echo $ECHO_N "(cached) $ECHO_C" >&6
16995else
16996
16997	rm -rf ./conftest*
16998	date >conftest.in
16999	mkdir conftest.out
17000	sleep 3
17001	if $INSTALL -p conftest.in conftest.out 2>/dev/null
17002	then
17003		if test -f conftest.out/conftest.in
17004		then
17005			test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
17006			test conftest.out/conftest.in -nt conftest.in 2>conftest.err
17007			if test -s conftest.err
17008			then
17009				cf_cv_install_p=no
17010			else
17011				cf_cv_install_p=yes
17012			fi
17013		else
17014			cf_cv_install_p=no
17015		fi
17016	else
17017		cf_cv_install_p=no
17018	fi
17019	rm -rf ./conftest*
17020
17021fi
17022echo "$as_me:17022: result: $cf_cv_install_p" >&5
17023echo "${ECHO_T}$cf_cv_install_p" >&6
17024
17025echo "$as_me:17025: checking if install needs to be told about ownership" >&5
17026echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
17027case `$ac_config_guess` in
17028(*minix)
17029	with_install_o=yes
17030	;;
17031(*)
17032	with_install_o=no
17033	;;
17034esac
17035
17036echo "$as_me:17036: result: $with_install_o" >&5
17037echo "${ECHO_T}$with_install_o" >&6
17038if test "x$with_install_o" = xyes
17039then
17040	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'`"
17041else
17042	INSTALL_OPT_O=
17043fi
17044
17045if test -n "$INSTALL_OPT_S"
17046then
17047	echo "$as_me:17047: checking if you want to specify strip-program" >&5
17048echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6
17049
17050# Check whether --with-strip-program or --without-strip-program was given.
17051if test "${with_strip_program+set}" = set; then
17052  withval="$with_strip_program"
17053  with_strip_program=$withval
17054else
17055  with_strip_program=no
17056fi;
17057	echo "$as_me:17057: result: $with_strip_program" >&5
17058echo "${ECHO_T}$with_strip_program" >&6
17059	if test "$with_strip_program" != no
17060	then
17061		echo "$as_me:17061: checking if strip-program is supported with this installer" >&5
17062echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6
17063		cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'`
17064		check_install_strip=no
17065		if test -f "$cf_install_program"
17066		then
17067			check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
17068			if test -n "$check_install_version"
17069			then
17070				check_install_strip="option"
17071			else
17072				for check_strip_variable in STRIPBIN STRIP
17073				do
17074					if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null
17075					then
17076						check_install_strip="environ"
17077						break
17078					fi
17079				done
17080			fi
17081		fi
17082		echo "$as_me:17082: result: $check_install_strip" >&5
17083echo "${ECHO_T}$check_install_strip" >&6
17084		case "$check_install_strip" in
17085		(no)
17086			{ echo "$as_me:17086: WARNING: $cf_install_program does not support strip program option" >&5
17087echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;}
17088			with_strip_program=no
17089			;;
17090		(environ)
17091			cat >install.tmp <<-CF_EOF
17092			#! $SHELL
17093			STRIPBIN="$with_strip_program" \\
17094			STRIP="$with_strip_program" \\
17095			$INSTALL "$@"
17096			CF_EOF
17097			INSTALL="`pwd`/install.tmp"
17098			chmod +x "$INSTALL"
17099			test -n "$verbose" && echo "	created $INSTALL" 1>&6
17100
17101echo "${as_me:-configure}:17101: testing created $INSTALL ..." 1>&5
17102
17103			;;
17104		(option)
17105			INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
17106			;;
17107		esac
17108	fi
17109fi
17110
17111# If we're avoiding relinking of shared libraries during install, that is to
17112# avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
17113# the install program has "-p" (for preserving timestamps).
17114cf_cv_do_reranlib=yes
17115if test "x$cf_cv_install_p" = xyes
17116then
17117	if test "x$cf_cv_do_relink" != xyes
17118	then
17119		cf_cv_do_reranlib=no
17120		INSTALL_OPT_P="-p"
17121		INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
17122	fi
17123fi
17124
17125###	use option --enable-warnings to turn on all gcc warnings
17126
17127echo "$as_me:17127: checking if you want to use C11 _Noreturn feature" >&5
17128echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17129
17130# Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17131if test "${enable_stdnoreturn+set}" = set; then
17132  enableval="$enable_stdnoreturn"
17133  test "$enableval" != yes && enableval=no
17134	if test "$enableval" != "no" ; then
17135    enable_stdnoreturn=yes
17136	else
17137		enable_stdnoreturn=no
17138	fi
17139else
17140  enableval=no
17141	enable_stdnoreturn=no
17142
17143fi;
17144echo "$as_me:17144: result: $enable_stdnoreturn" >&5
17145echo "${ECHO_T}$enable_stdnoreturn" >&6
17146
17147if test $enable_stdnoreturn = yes; then
17148echo "$as_me:17148: checking for C11 _Noreturn feature" >&5
17149echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17150if test "${cf_cv_c11_noreturn+set}" = set; then
17151  echo $ECHO_N "(cached) $ECHO_C" >&6
17152else
17153  cat >"conftest.$ac_ext" <<_ACEOF
17154#line 17154 "configure"
17155#include "confdefs.h"
17156
17157$ac_includes_default
17158#include <stdnoreturn.h>
17159static _Noreturn void giveup(void) { exit(0); }
17160
17161int
17162main (void)
17163{
17164if (feof(stdin)) giveup()
17165  ;
17166  return 0;
17167}
17168_ACEOF
17169rm -f "conftest.$ac_objext"
17170if { (eval echo "$as_me:17170: \"$ac_compile\"") >&5
17171  (eval $ac_compile) 2>&5
17172  ac_status=$?
17173  echo "$as_me:17173: \$? = $ac_status" >&5
17174  (exit "$ac_status"); } &&
17175         { ac_try='test -s "conftest.$ac_objext"'
17176  { (eval echo "$as_me:17176: \"$ac_try\"") >&5
17177  (eval $ac_try) 2>&5
17178  ac_status=$?
17179  echo "$as_me:17179: \$? = $ac_status" >&5
17180  (exit "$ac_status"); }; }; then
17181  cf_cv_c11_noreturn=yes
17182else
17183  echo "$as_me: failed program was:" >&5
17184cat "conftest.$ac_ext" >&5
17185cf_cv_c11_noreturn=no
17186fi
17187rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17188
17189fi
17190echo "$as_me:17190: result: $cf_cv_c11_noreturn" >&5
17191echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17192else
17193	cf_cv_c11_noreturn=no,
17194fi
17195
17196if test "$cf_cv_c11_noreturn" = yes; then
17197
17198cat >>confdefs.h <<\EOF
17199#define HAVE_STDNORETURN_H 1
17200EOF
17201
17202cat >>confdefs.h <<EOF
17203#define STDC_NORETURN _Noreturn
17204EOF
17205
17206	HAVE_STDNORETURN_H=1
17207else
17208	HAVE_STDNORETURN_H=0
17209fi
17210
17211if test "$GCC" = yes || test "$GXX" = yes
17212then
17213
17214if test "$GCC" = yes || test "$GXX" = yes
17215then
17216	case $CFLAGS in
17217	(*-Werror=*)
17218		cf_temp_flags=
17219		for cf_temp_scan in $CFLAGS
17220		do
17221			case "x$cf_temp_scan" in
17222			(x-Werror=format*)
17223
17224	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17225	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17226
17227				;;
17228			(x-Werror=*)
17229
17230	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17231	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17232
17233				;;
17234			(*)
17235
17236	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17237	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17238
17239				;;
17240			esac
17241		done
17242		if test "x$CFLAGS" != "x$cf_temp_flags"
17243		then
17244			test -n "$verbose" && echo "	repairing CFLAGS: $CFLAGS" 1>&6
17245
17246echo "${as_me:-configure}:17246: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17247
17248			CFLAGS="$cf_temp_flags"
17249			test -n "$verbose" && echo "	... fixed $CFLAGS" 1>&6
17250
17251echo "${as_me:-configure}:17251: testing ... fixed $CFLAGS ..." 1>&5
17252
17253			test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
17254
17255echo "${as_me:-configure}:17255: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17256
17257		fi
17258		;;
17259	esac
17260fi
17261
17262if test "$GCC" = yes || test "$GXX" = yes
17263then
17264	case $CPPFLAGS in
17265	(*-Werror=*)
17266		cf_temp_flags=
17267		for cf_temp_scan in $CPPFLAGS
17268		do
17269			case "x$cf_temp_scan" in
17270			(x-Werror=format*)
17271
17272	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17273	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17274
17275				;;
17276			(x-Werror=*)
17277
17278	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17279	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17280
17281				;;
17282			(*)
17283
17284	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17285	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17286
17287				;;
17288			esac
17289		done
17290		if test "x$CPPFLAGS" != "x$cf_temp_flags"
17291		then
17292			test -n "$verbose" && echo "	repairing CPPFLAGS: $CPPFLAGS" 1>&6
17293
17294echo "${as_me:-configure}:17294: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17295
17296			CPPFLAGS="$cf_temp_flags"
17297			test -n "$verbose" && echo "	... fixed $CPPFLAGS" 1>&6
17298
17299echo "${as_me:-configure}:17299: testing ... fixed $CPPFLAGS ..." 1>&5
17300
17301			test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
17302
17303echo "${as_me:-configure}:17303: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17304
17305		fi
17306		;;
17307	esac
17308fi
17309
17310if test "$GCC" = yes || test "$GXX" = yes
17311then
17312	case $LDFLAGS in
17313	(*-Werror=*)
17314		cf_temp_flags=
17315		for cf_temp_scan in $LDFLAGS
17316		do
17317			case "x$cf_temp_scan" in
17318			(x-Werror=format*)
17319
17320	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17321	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17322
17323				;;
17324			(x-Werror=*)
17325
17326	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17327	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17328
17329				;;
17330			(*)
17331
17332	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17333	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17334
17335				;;
17336			esac
17337		done
17338		if test "x$LDFLAGS" != "x$cf_temp_flags"
17339		then
17340			test -n "$verbose" && echo "	repairing LDFLAGS: $LDFLAGS" 1>&6
17341
17342echo "${as_me:-configure}:17342: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17343
17344			LDFLAGS="$cf_temp_flags"
17345			test -n "$verbose" && echo "	... fixed $LDFLAGS" 1>&6
17346
17347echo "${as_me:-configure}:17347: testing ... fixed $LDFLAGS ..." 1>&5
17348
17349			test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
17350
17351echo "${as_me:-configure}:17351: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17352
17353		fi
17354		;;
17355	esac
17356fi
17357
17358echo "$as_me:17358: checking if you want to turn on gcc warnings" >&5
17359echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17360
17361# Check whether --enable-warnings or --disable-warnings was given.
17362if test "${enable_warnings+set}" = set; then
17363  enableval="$enable_warnings"
17364  test "$enableval" != yes && enableval=no
17365	if test "$enableval" != "no" ; then
17366    enable_warnings=yes
17367	else
17368		enable_warnings=no
17369	fi
17370else
17371  enableval=no
17372	enable_warnings=no
17373
17374fi;
17375echo "$as_me:17375: result: $enable_warnings" >&5
17376echo "${ECHO_T}$enable_warnings" >&6
17377if test "$enable_warnings" = "yes"
17378then
17379
17380if test "x$have_x" = xyes; then
17381
17382cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17383cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17384cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17385LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17386for cf_X_CFLAGS in $X_CFLAGS
17387do
17388	case "x$cf_X_CFLAGS" in
17389	x-[IUD]*)
17390		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17391		;;
17392	*)
17393		CFLAGS="$CFLAGS $cf_X_CFLAGS"
17394		;;
17395	esac
17396done
17397
17398cat >"conftest.$ac_ext" <<_ACEOF
17399#line 17399 "configure"
17400#include "confdefs.h"
17401
17402$ac_includes_default
17403#include <X11/Intrinsic.h>
17404
17405int
17406main (void)
17407{
17408String foo = malloc(1); free((void*)foo)
17409  ;
17410  return 0;
17411}
17412_ACEOF
17413rm -f "conftest.$ac_objext"
17414if { (eval echo "$as_me:17414: \"$ac_compile\"") >&5
17415  (eval $ac_compile) 2>&5
17416  ac_status=$?
17417  echo "$as_me:17417: \$? = $ac_status" >&5
17418  (exit "$ac_status"); } &&
17419         { ac_try='test -s "conftest.$ac_objext"'
17420  { (eval echo "$as_me:17420: \"$ac_try\"") >&5
17421  (eval $ac_try) 2>&5
17422  ac_status=$?
17423  echo "$as_me:17423: \$? = $ac_status" >&5
17424  (exit "$ac_status"); }; }; then
17425
17426echo "$as_me:17426: checking for X11/Xt const-feature" >&5
17427echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17428if test "${cf_cv_const_x_string+set}" = set; then
17429  echo $ECHO_N "(cached) $ECHO_C" >&6
17430else
17431
17432	cat >"conftest.$ac_ext" <<_ACEOF
17433#line 17433 "configure"
17434#include "confdefs.h"
17435
17436#undef  _CONST_X_STRING
17437#define _CONST_X_STRING	/* X11R7.8 (perhaps) */
17438#undef  XTSTRINGDEFINES	/* X11R5 and later */
17439$ac_includes_default
17440#include <X11/Intrinsic.h>
17441
17442int
17443main (void)
17444{
17445String foo = malloc(1); *foo = 0
17446  ;
17447  return 0;
17448}
17449_ACEOF
17450rm -f "conftest.$ac_objext"
17451if { (eval echo "$as_me:17451: \"$ac_compile\"") >&5
17452  (eval $ac_compile) 2>&5
17453  ac_status=$?
17454  echo "$as_me:17454: \$? = $ac_status" >&5
17455  (exit "$ac_status"); } &&
17456         { ac_try='test -s "conftest.$ac_objext"'
17457  { (eval echo "$as_me:17457: \"$ac_try\"") >&5
17458  (eval $ac_try) 2>&5
17459  ac_status=$?
17460  echo "$as_me:17460: \$? = $ac_status" >&5
17461  (exit "$ac_status"); }; }; then
17462
17463			cf_cv_const_x_string=no
17464
17465else
17466  echo "$as_me: failed program was:" >&5
17467cat "conftest.$ac_ext" >&5
17468
17469			cf_cv_const_x_string=yes
17470
17471fi
17472rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17473
17474fi
17475echo "$as_me:17475: result: $cf_cv_const_x_string" >&5
17476echo "${ECHO_T}$cf_cv_const_x_string" >&6
17477
17478LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17479CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17480CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17481
17482case "$cf_cv_const_x_string" in
17483(no)
17484
17485	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17486	CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17487
17488	;;
17489(*)
17490
17491	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17492	CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17493
17494	;;
17495esac
17496
17497else
17498  echo "$as_me: failed program was:" >&5
17499cat "conftest.$ac_ext" >&5
17500fi
17501rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17502 fi
17503cat > "conftest.$ac_ext" <<EOF
17504#line 17504 "${as_me:-configure}"
17505int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17506EOF
17507if test "$INTEL_COMPILER" = yes
17508then
17509# The "-wdXXX" options suppress warnings:
17510# remark #1419: external declaration in primary source file
17511# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17512# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17513# remark #193: zero used for undefined preprocessing identifier
17514# remark #593: variable "curs_sb_left_arrow" was set but never used
17515# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17516# remark #869: parameter "tw" was never referenced
17517# remark #981: operands are evaluated in unspecified order
17518# warning #279: controlling expression is constant
17519
17520	echo "$as_me:17520: checking for $CC warning options" >&5
17521echo $ECHO_N "checking for $CC warning options... $ECHO_C" >&6
17522	test -n "$verbose" && echo "$as_me:17522: result: " >&5
17523echo "${ECHO_T}" >&6
17524	cf_save_CFLAGS="$CFLAGS"
17525	EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17526	for cf_opt in \
17527		wd1419 \
17528		wd1683 \
17529		wd1684 \
17530		wd193 \
17531		wd593 \
17532		wd279 \
17533		wd810 \
17534		wd869 \
17535		wd981
17536	do
17537		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17538		if { (eval echo "$as_me:17538: \"$ac_compile\"") >&5
17539  (eval $ac_compile) 2>&5
17540  ac_status=$?
17541  echo "$as_me:17541: \$? = $ac_status" >&5
17542  (exit "$ac_status"); }; then
17543			test -n "$verbose" && echo "$as_me:17543: result: ... -$cf_opt" >&5
17544echo "${ECHO_T}... -$cf_opt" >&6
17545			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17546		fi
17547	done
17548	CFLAGS="$cf_save_CFLAGS"
17549elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17550then
17551	echo "$as_me:17551: checking for $CC warning options" >&5
17552echo $ECHO_N "checking for $CC warning options... $ECHO_C" >&6
17553	test -n "$verbose" && echo "$as_me:17553: result: " >&5
17554echo "${ECHO_T}" >&6
17555	cf_save_CFLAGS="$CFLAGS"
17556	cf_warn_CONST=""
17557	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17558	cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17559	test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17560	for cf_opt in W Wall \
17561		Wbad-function-cast \
17562		Wcast-align \
17563		Wcast-qual \
17564		Wdeclaration-after-statement \
17565		Wextra \
17566		Winline \
17567		Wmissing-declarations \
17568		Wmissing-prototypes \
17569		Wnested-externs \
17570		Wpointer-arith \
17571		Wshadow \
17572		Wstrict-prototypes \
17573		Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17574	do
17575		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17576		if { (eval echo "$as_me:17576: \"$ac_compile\"") >&5
17577  (eval $ac_compile) 2>&5
17578  ac_status=$?
17579  echo "$as_me:17579: \$? = $ac_status" >&5
17580  (exit "$ac_status"); }; then
17581			test -n "$verbose" && echo "$as_me:17581: result: ... -$cf_opt" >&5
17582echo "${ECHO_T}... -$cf_opt" >&6
17583			case "$cf_opt" in
17584			(Winline)
17585				case "$GCC_VERSION" in
17586				([34].*)
17587					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
17588
17589echo "${as_me:-configure}:17589: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17590
17591					continue;;
17592				esac
17593				;;
17594			(Wpointer-arith)
17595				case "$GCC_VERSION" in
17596				([12].*)
17597					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
17598
17599echo "${as_me:-configure}:17599: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17600
17601					continue;;
17602				esac
17603				;;
17604			esac
17605			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17606		fi
17607	done
17608	CFLAGS="$cf_save_CFLAGS"
17609fi
17610rm -rf ./conftest*
17611
17612fi
17613
17614if test "$GCC" = yes || test "$GXX" = yes
17615then
17616cat > conftest.i <<EOF
17617#ifndef GCC_PRINTF
17618#define GCC_PRINTF 0
17619#endif
17620#ifndef GCC_SCANF
17621#define GCC_SCANF 0
17622#endif
17623#ifndef GCC_NORETURN
17624#define GCC_NORETURN /* nothing */
17625#endif
17626#ifndef GCC_UNUSED
17627#define GCC_UNUSED /* nothing */
17628#endif
17629EOF
17630if test "$GCC" = yes
17631then
17632	echo "$as_me:17632: checking for $CC __attribute__ directives" >&5
17633echo $ECHO_N "checking for $CC __attribute__ directives... $ECHO_C" >&6
17634	test -n "$verbose" && echo "$as_me:17634: result: " >&5
17635echo "${ECHO_T}" >&6
17636cat > "conftest.$ac_ext" <<EOF
17637#line 17637 "${as_me:-configure}"
17638#include <stdio.h>
17639#include "confdefs.h"
17640#include "conftest.h"
17641#include "conftest.i"
17642#if	GCC_PRINTF
17643#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17644#else
17645#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17646#endif
17647#if	GCC_SCANF
17648#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17649#else
17650#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17651#endif
17652extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17653extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17654extern GCC_NORETURN void foo(void);
17655int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17656EOF
17657	cf_printf_attribute=no
17658	cf_scanf_attribute=no
17659	for cf_attribute in scanf printf unused noreturn
17660	do
17661
17662cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17663
17664		cf_directive="__attribute__(($cf_attribute))"
17665		echo "checking for $CC $cf_directive" 1>&5
17666
17667		case "$cf_attribute" in
17668		(printf)
17669			cf_printf_attribute=yes
17670			cat >conftest.h <<EOF
17671#define GCC_$cf_ATTRIBUTE 1
17672EOF
17673			;;
17674		(scanf)
17675			cf_scanf_attribute=yes
17676			cat >conftest.h <<EOF
17677#define GCC_$cf_ATTRIBUTE 1
17678EOF
17679			;;
17680		(*)
17681			cat >conftest.h <<EOF
17682#define GCC_$cf_ATTRIBUTE $cf_directive
17683EOF
17684			;;
17685		esac
17686
17687		if { (eval echo "$as_me:17687: \"$ac_compile\"") >&5
17688  (eval $ac_compile) 2>&5
17689  ac_status=$?
17690  echo "$as_me:17690: \$? = $ac_status" >&5
17691  (exit "$ac_status"); }; then
17692			test -n "$verbose" && echo "$as_me:17692: result: ... $cf_attribute" >&5
17693echo "${ECHO_T}... $cf_attribute" >&6
17694			cat conftest.h >>confdefs.h
17695			case "$cf_attribute" in
17696			(noreturn)
17697
17698cat >>confdefs.h <<EOF
17699#define GCC_NORETURN $cf_directive
17700EOF
17701
17702				;;
17703			(printf)
17704				cf_value='/* nothing */'
17705				if test "$cf_printf_attribute" != no ; then
17706					cf_value='__attribute__((format(printf,fmt,var)))'
17707
17708cat >>confdefs.h <<\EOF
17709#define GCC_PRINTF 1
17710EOF
17711
17712				fi
17713
17714cat >>confdefs.h <<EOF
17715#define GCC_PRINTFLIKE(fmt,var) $cf_value
17716EOF
17717
17718				;;
17719			(scanf)
17720				cf_value='/* nothing */'
17721				if test "$cf_scanf_attribute" != no ; then
17722					cf_value='__attribute__((format(scanf,fmt,var)))'
17723
17724cat >>confdefs.h <<\EOF
17725#define GCC_SCANF 1
17726EOF
17727
17728				fi
17729
17730cat >>confdefs.h <<EOF
17731#define GCC_SCANFLIKE(fmt,var) $cf_value
17732EOF
17733
17734				;;
17735			(unused)
17736
17737cat >>confdefs.h <<EOF
17738#define GCC_UNUSED $cf_directive
17739EOF
17740
17741				;;
17742			esac
17743		fi
17744	done
17745else
17746	${FGREP-fgrep} define conftest.i >>confdefs.h
17747fi
17748rm -rf ./conftest*
17749fi
17750
17751fi
17752
17753if test "x$enable_warnings" = "xyes"; then
17754
17755 	ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17756
17757	if test "x$cf_with_cxx" = xyes ; then
17758
17759INTEL_CPLUSPLUS=no
17760
17761if test "$GCC" = yes ; then
17762	case "$host_os" in
17763	(linux*|gnu*)
17764		echo "$as_me:17764: checking if this is really Intel C++ compiler" >&5
17765echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17766		cf_save_CFLAGS="$CXXFLAGS"
17767		CXXFLAGS="$CXXFLAGS -no-gcc"
17768		cat >"conftest.$ac_ext" <<_ACEOF
17769#line 17769 "configure"
17770#include "confdefs.h"
17771
17772int
17773main (void)
17774{
17775
17776#ifdef __INTEL_COMPILER
17777#else
17778#error __INTEL_COMPILER is not defined
17779#endif
17780
17781  ;
17782  return 0;
17783}
17784_ACEOF
17785rm -f "conftest.$ac_objext"
17786if { (eval echo "$as_me:17786: \"$ac_compile\"") >&5
17787  (eval $ac_compile) 2>&5
17788  ac_status=$?
17789  echo "$as_me:17789: \$? = $ac_status" >&5
17790  (exit "$ac_status"); } &&
17791         { ac_try='test -s "conftest.$ac_objext"'
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  INTEL_CPLUSPLUS=yes
17798cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17799
17800else
17801  echo "$as_me: failed program was:" >&5
17802cat "conftest.$ac_ext" >&5
17803fi
17804rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17805		CXXFLAGS="$cf_save_CFLAGS"
17806		echo "$as_me:17806: result: $INTEL_CPLUSPLUS" >&5
17807echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17808		;;
17809	esac
17810fi
17811
17812CLANG_CPLUSPLUS=no
17813
17814if test "$GCC" = yes ; then
17815	echo "$as_me:17815: checking if this is really Clang C++ compiler" >&5
17816echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17817	cf_save_CFLAGS="$CXXFLAGS"
17818	cat >"conftest.$ac_ext" <<_ACEOF
17819#line 17819 "configure"
17820#include "confdefs.h"
17821
17822int
17823main (void)
17824{
17825
17826#ifdef __clang__
17827#else
17828#error __clang__ is not defined
17829#endif
17830
17831  ;
17832  return 0;
17833}
17834_ACEOF
17835rm -f "conftest.$ac_objext"
17836if { (eval echo "$as_me:17836: \"$ac_compile\"") >&5
17837  (eval $ac_compile) 2>&5
17838  ac_status=$?
17839  echo "$as_me:17839: \$? = $ac_status" >&5
17840  (exit "$ac_status"); } &&
17841         { ac_try='test -s "conftest.$ac_objext"'
17842  { (eval echo "$as_me:17842: \"$ac_try\"") >&5
17843  (eval $ac_try) 2>&5
17844  ac_status=$?
17845  echo "$as_me:17845: \$? = $ac_status" >&5
17846  (exit "$ac_status"); }; }; then
17847  CLANG_CPLUSPLUS=yes
17848
17849else
17850  echo "$as_me: failed program was:" >&5
17851cat "conftest.$ac_ext" >&5
17852fi
17853rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17854	CXXFLAGS="$cf_save_CFLAGS"
17855	echo "$as_me:17855: result: $CLANG_CPLUSPLUS" >&5
17856echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17857fi
17858
17859CLANG_VERSION=none
17860
17861if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17862	case "$CC" in
17863	(c[1-9][0-9]|*/c[1-9][0-9])
17864		{ echo "$as_me:17864: WARNING: replacing broken compiler alias $CC" >&5
17865echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17866		CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17867		CC=clang
17868		;;
17869	esac
17870
17871	echo "$as_me:17871: checking version of $CC" >&5
17872echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17873	CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
17874	test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17875	echo "$as_me:17875: result: $CLANG_VERSION" >&5
17876echo "${ECHO_T}$CLANG_VERSION" >&6
17877
17878	for cf_clang_opt in \
17879		-Qunused-arguments \
17880		-Wno-error=implicit-function-declaration
17881	do
17882		echo "$as_me:17882: checking if option $cf_clang_opt works" >&5
17883echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17884		cf_save_CFLAGS="$CFLAGS"
17885		CFLAGS="$CFLAGS $cf_clang_opt"
17886		cat >"conftest.$ac_ext" <<_ACEOF
17887#line 17887 "configure"
17888#include "confdefs.h"
17889
17890			#include <stdio.h>
17891int
17892main (void)
17893{
17894
17895			printf("hello!\\n");
17896  ;
17897  return 0;
17898}
17899_ACEOF
17900rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17901if { (eval echo "$as_me:17901: \"$ac_link\"") >&5
17902  (eval $ac_link) 2>&5
17903  ac_status=$?
17904  echo "$as_me:17904: \$? = $ac_status" >&5
17905  (exit "$ac_status"); } &&
17906         { ac_try='test -s "conftest$ac_exeext"'
17907  { (eval echo "$as_me:17907: \"$ac_try\"") >&5
17908  (eval $ac_try) 2>&5
17909  ac_status=$?
17910  echo "$as_me:17910: \$? = $ac_status" >&5
17911  (exit "$ac_status"); }; }; then
17912
17913			cf_clang_optok=yes
17914else
17915  echo "$as_me: failed program was:" >&5
17916cat "conftest.$ac_ext" >&5
17917
17918			cf_clang_optok=no
17919fi
17920rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17921		echo "$as_me:17921: result: $cf_clang_optok" >&5
17922echo "${ECHO_T}$cf_clang_optok" >&6
17923		CFLAGS="$cf_save_CFLAGS"
17924		if test "$cf_clang_optok" = yes; then
17925			test -n "$verbose" && echo "	adding option $cf_clang_opt" 1>&6
17926
17927echo "${as_me:-configure}:17927: testing adding option $cf_clang_opt ..." 1>&5
17928
17929	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17930	CFLAGS="${CFLAGS}$cf_clang_opt"
17931
17932		fi
17933	done
17934fi
17935
17936ac_ext=cc
17937ac_cpp='$CXXCPP $CPPFLAGS'
17938ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17939ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17940ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17941ac_main_return="return"
17942
17943cat > conftest.$ac_ext <<EOF
17944#line 17944 "configure"
17945int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17946EOF
17947
17948if test "$INTEL_CPLUSPLUS" = yes
17949then
17950# The "-wdXXX" options suppress warnings:
17951# remark #1419: external declaration in primary source file
17952# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17953# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17954# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17955# remark #193: zero used for undefined preprocessing identifier
17956# remark #593: variable "curs_sb_left_arrow" was set but never used
17957# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17958# remark #869: parameter "tw" was never referenced
17959# remark #981: operands are evaluated in unspecified order
17960# warning #269: invalid format string conversion
17961
17962	echo "$as_me:17962: checking for $CC warning options" >&5
17963echo $ECHO_N "checking for $CC warning options... $ECHO_C" >&6
17964	test -n "$verbose" && echo "$as_me:17964: result: " >&5
17965echo "${ECHO_T}" >&6
17966	cf_save_CXXFLAGS="$CXXFLAGS"
17967	EXTRA_CXXFLAGS="-Wall"
17968	for cf_opt in \
17969		wd1419 \
17970		wd1682 \
17971		wd1683 \
17972		wd1684 \
17973		wd193 \
17974		wd279 \
17975		wd593 \
17976		wd810 \
17977		wd869 \
17978		wd981
17979	do
17980		CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17981		if { (eval echo "$as_me:17981: \"$ac_compile\"") >&5
17982  (eval $ac_compile) 2>&5
17983  ac_status=$?
17984  echo "$as_me:17984: \$? = $ac_status" >&5
17985  (exit "$ac_status"); }; then
17986			test -n "$verbose" && echo "$as_me:17986: result: ... -$cf_opt" >&5
17987echo "${ECHO_T}... -$cf_opt" >&6
17988			EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17989		fi
17990	done
17991	CXXFLAGS="$cf_save_CXXFLAGS"
17992
17993elif test "$GXX" = yes
17994then
17995	echo "$as_me:17995: checking for $CXX warning options" >&5
17996echo $ECHO_N "checking for $CXX warning options... $ECHO_C" >&6
17997	test -n "$verbose" && echo "$as_me:17997: result: " >&5
17998echo "${ECHO_T}" >&6
17999	cf_save_CXXFLAGS="$CXXFLAGS"
18000	EXTRA_CXXFLAGS="-W -Wall"
18001	cf_gxx_extra_warnings=""
18002	test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
18003	case "$GXX_VERSION" in
18004	([1-2].*)
18005		;;
18006	(*)
18007		cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
18008		;;
18009	esac
18010	for cf_opt in \
18011		Wabi \
18012		fabi-version=0 \
18013		Wextra \
18014		Wignored-qualifiers \
18015		Wlogical-op \
18016		Woverloaded-virtual \
18017		Wsign-promo \
18018		Wsynth \
18019		Wold-style-cast \
18020		Wcast-align \
18021		Wcast-qual \
18022		Wpointer-arith \
18023		Wshadow \
18024		Wundef $cf_gxx_extra_warnings Wno-unused
18025	do
18026		CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
18027		if { (eval echo "$as_me:18027: \"$ac_compile\"") >&5
18028  (eval $ac_compile) 2>&5
18029  ac_status=$?
18030  echo "$as_me:18030: \$? = $ac_status" >&5
18031  (exit "$ac_status"); }; then
18032			test -n "$verbose" && echo "$as_me:18032: result: ... -$cf_opt" >&5
18033echo "${ECHO_T}... -$cf_opt" >&6
18034			EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
18035		else
18036			test -n "$verbose" && echo "$as_me:18036: result: ... no -$cf_opt" >&5
18037echo "${ECHO_T}... no -$cf_opt" >&6
18038		fi
18039	done
18040	CXXFLAGS="$cf_save_CXXFLAGS"
18041fi
18042
18043rm -rf ./conftest*
18044ac_ext=c
18045ac_cpp='$CPP $CPPFLAGS'
18046ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
18047ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
18048ac_compiler_gnu=$ac_cv_c_compiler_gnu
18049ac_main_return="return"
18050
18051	fi
18052fi
18053
18054echo "$as_me:18054: checking if you want to work around bogus compiler/loader warnings" >&5
18055echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
18056
18057# Check whether --enable-string-hacks or --disable-string-hacks was given.
18058if test "${enable_string_hacks+set}" = set; then
18059  enableval="$enable_string_hacks"
18060  enable_string_hacks=$enableval
18061else
18062  enable_string_hacks=no
18063fi;
18064echo "$as_me:18064: result: $enable_string_hacks" >&5
18065echo "${ECHO_T}$enable_string_hacks" >&6
18066
18067if test "x$enable_string_hacks" = "xyes"; then
18068
18069cat >>confdefs.h <<\EOF
18070#define USE_STRING_HACKS 1
18071EOF
18072
18073	{ echo "$as_me:18073: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
18074echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
18075	echo "$as_me:18075: checking for strlcat" >&5
18076echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
18077if test "${ac_cv_func_strlcat+set}" = set; then
18078  echo $ECHO_N "(cached) $ECHO_C" >&6
18079else
18080  cat >"conftest.$ac_ext" <<_ACEOF
18081#line 18081 "configure"
18082#include "confdefs.h"
18083#define strlcat autoconf_temporary
18084#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
18085#undef strlcat
18086
18087#ifdef __cplusplus
18088extern "C"
18089#endif
18090
18091/* We use char because int might match the return type of a gcc2
18092   builtin and then its argument prototype would still apply.  */
18093char strlcat (void);
18094
18095int
18096main (void)
18097{
18098
18099/* The GNU C library defines stubs for functions which it implements
18100    to always fail with ENOSYS.  Some functions are actually named
18101    something starting with __ and the normal name is an alias.  */
18102#if defined (__stub_strlcat) || defined (__stub___strlcat)
18103#error found stub for strlcat
18104#endif
18105
18106	return strlcat ();
18107  ;
18108  return 0;
18109}
18110_ACEOF
18111rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18112if { (eval echo "$as_me:18112: \"$ac_link\"") >&5
18113  (eval $ac_link) 2>&5
18114  ac_status=$?
18115  echo "$as_me:18115: \$? = $ac_status" >&5
18116  (exit "$ac_status"); } &&
18117         { ac_try='test -s "conftest$ac_exeext"'
18118  { (eval echo "$as_me:18118: \"$ac_try\"") >&5
18119  (eval $ac_try) 2>&5
18120  ac_status=$?
18121  echo "$as_me:18121: \$? = $ac_status" >&5
18122  (exit "$ac_status"); }; }; then
18123  ac_cv_func_strlcat=yes
18124else
18125  echo "$as_me: failed program was:" >&5
18126cat "conftest.$ac_ext" >&5
18127ac_cv_func_strlcat=no
18128fi
18129rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18130fi
18131echo "$as_me:18131: result: $ac_cv_func_strlcat" >&5
18132echo "${ECHO_T}$ac_cv_func_strlcat" >&6
18133if test "$ac_cv_func_strlcat" = yes; then
18134
18135cat >>confdefs.h <<\EOF
18136#define HAVE_STRLCAT 1
18137EOF
18138
18139else
18140
18141		echo "$as_me:18141: checking for strlcat in -lbsd" >&5
18142echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18143if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18144  echo $ECHO_N "(cached) $ECHO_C" >&6
18145else
18146  ac_check_lib_save_LIBS=$LIBS
18147LIBS="-lbsd  $LIBS"
18148cat >"conftest.$ac_ext" <<_ACEOF
18149#line 18149 "configure"
18150#include "confdefs.h"
18151
18152/* Override any gcc2 internal prototype to avoid an error.  */
18153#ifdef __cplusplus
18154extern "C"
18155#endif
18156/* We use char because int might match the return type of a gcc2
18157   builtin and then its argument prototype would still apply.  */
18158char strlcat (void);
18159int
18160main (void)
18161{
18162strlcat ();
18163  ;
18164  return 0;
18165}
18166_ACEOF
18167rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18168if { (eval echo "$as_me:18168: \"$ac_link\"") >&5
18169  (eval $ac_link) 2>&5
18170  ac_status=$?
18171  echo "$as_me:18171: \$? = $ac_status" >&5
18172  (exit "$ac_status"); } &&
18173         { ac_try='test -s "conftest$ac_exeext"'
18174  { (eval echo "$as_me:18174: \"$ac_try\"") >&5
18175  (eval $ac_try) 2>&5
18176  ac_status=$?
18177  echo "$as_me:18177: \$? = $ac_status" >&5
18178  (exit "$ac_status"); }; }; then
18179  ac_cv_lib_bsd_strlcat=yes
18180else
18181  echo "$as_me: failed program was:" >&5
18182cat "conftest.$ac_ext" >&5
18183ac_cv_lib_bsd_strlcat=no
18184fi
18185rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18186LIBS=$ac_check_lib_save_LIBS
18187fi
18188echo "$as_me:18188: result: $ac_cv_lib_bsd_strlcat" >&5
18189echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18190if test "$ac_cv_lib_bsd_strlcat" = yes; then
18191
18192cf_add_libs="$LIBS"
18193# reverse order
18194cf_add_0lib=
18195for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18196# filter duplicates
18197for cf_add_1lib in $cf_add_0lib; do
18198	for cf_add_2lib in $cf_add_libs; do
18199		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18200			cf_add_1lib=
18201			break
18202		fi
18203	done
18204	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18205done
18206LIBS="$cf_add_libs"
18207
18208for ac_header in bsd/string.h
18209do
18210as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18211echo "$as_me:18211: checking for $ac_header" >&5
18212echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18213if eval "test \"\${$as_ac_Header+set}\" = set"; then
18214  echo $ECHO_N "(cached) $ECHO_C" >&6
18215else
18216  cat >"conftest.$ac_ext" <<_ACEOF
18217#line 18217 "configure"
18218#include "confdefs.h"
18219#include <$ac_header>
18220_ACEOF
18221if { (eval echo "$as_me:18221: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18222  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18223  ac_status=$?
18224  $EGREP -v '^ *\+' conftest.er1 >conftest.err
18225  rm -f conftest.er1
18226  cat conftest.err >&5
18227  echo "$as_me:18227: \$? = $ac_status" >&5
18228  (exit "$ac_status"); } >/dev/null; then
18229  if test -s conftest.err; then
18230    ac_cpp_err=$ac_c_preproc_warn_flag
18231  else
18232    ac_cpp_err=
18233  fi
18234else
18235  ac_cpp_err=yes
18236fi
18237if test -z "$ac_cpp_err"; then
18238  eval "$as_ac_Header=yes"
18239else
18240  echo "$as_me: failed program was:" >&5
18241  cat "conftest.$ac_ext" >&5
18242  eval "$as_ac_Header=no"
18243fi
18244rm -f conftest.err "conftest.$ac_ext"
18245fi
18246echo "$as_me:18246: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18247echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18248if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18249  cat >>confdefs.h <<EOF
18250#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18251EOF
18252
18253fi
18254done
18255
18256cat >>confdefs.h <<\EOF
18257#define HAVE_STRLCAT 1
18258EOF
18259
18260fi
18261
18262fi
18263
18264for ac_func in strlcpy snprintf
18265do
18266as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18267echo "$as_me:18267: checking for $ac_func" >&5
18268echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18269if eval "test \"\${$as_ac_var+set}\" = set"; then
18270  echo $ECHO_N "(cached) $ECHO_C" >&6
18271else
18272  cat >"conftest.$ac_ext" <<_ACEOF
18273#line 18273 "configure"
18274#include "confdefs.h"
18275#define $ac_func autoconf_temporary
18276#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
18277#undef $ac_func
18278
18279#ifdef __cplusplus
18280extern "C"
18281#endif
18282
18283/* We use char because int might match the return type of a gcc2
18284   builtin and then its argument prototype would still apply.  */
18285char $ac_func (void);
18286
18287int
18288main (void)
18289{
18290
18291/* The GNU C library defines stubs for functions which it implements
18292    to always fail with ENOSYS.  Some functions are actually named
18293    something starting with __ and the normal name is an alias.  */
18294#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18295#error found stub for $ac_func
18296#endif
18297
18298	return $ac_func ();
18299  ;
18300  return 0;
18301}
18302_ACEOF
18303rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18304if { (eval echo "$as_me:18304: \"$ac_link\"") >&5
18305  (eval $ac_link) 2>&5
18306  ac_status=$?
18307  echo "$as_me:18307: \$? = $ac_status" >&5
18308  (exit "$ac_status"); } &&
18309         { ac_try='test -s "conftest$ac_exeext"'
18310  { (eval echo "$as_me:18310: \"$ac_try\"") >&5
18311  (eval $ac_try) 2>&5
18312  ac_status=$?
18313  echo "$as_me:18313: \$? = $ac_status" >&5
18314  (exit "$ac_status"); }; }; then
18315  eval "$as_ac_var=yes"
18316else
18317  echo "$as_me: failed program was:" >&5
18318cat "conftest.$ac_ext" >&5
18319eval "$as_ac_var=no"
18320fi
18321rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18322fi
18323echo "$as_me:18323: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18324echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18325if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18326  cat >>confdefs.h <<EOF
18327#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18328EOF
18329
18330fi
18331done
18332
18333fi
18334
18335###	use option --enable-assertions to turn on generation of assertion code
18336echo "$as_me:18336: checking if you want to enable runtime assertions" >&5
18337echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18338
18339# Check whether --enable-assertions or --disable-assertions was given.
18340if test "${enable_assertions+set}" = set; then
18341  enableval="$enable_assertions"
18342  with_assertions=$enableval
18343else
18344  with_assertions=no
18345fi;
18346echo "$as_me:18346: result: $with_assertions" >&5
18347echo "${ECHO_T}$with_assertions" >&6
18348if test -n "$GCC"
18349then
18350	if test "$with_assertions" = no
18351	then
18352		CPPFLAGS="$CPPFLAGS -DNDEBUG"
18353	else
18354
18355 	ADAFLAGS="$ADAFLAGS -gnata"
18356
18357	fi
18358fi
18359
18360###	use option --disable-leaks to suppress "permanent" leaks, for testing
18361
18362echo "$as_me:18362: checking if you want to use dmalloc for testing" >&5
18363echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18364
18365# Check whether --with-dmalloc or --without-dmalloc was given.
18366if test "${with_dmalloc+set}" = set; then
18367  withval="$with_dmalloc"
18368  case "x$withval" in
18369	(x|xno) ;;
18370	(*)
18371		: "${with_cflags:=-g}"
18372		: "${enable_leaks:=no}"
18373		with_dmalloc=yes
18374
18375cat >>confdefs.h <<EOF
18376#define USE_DMALLOC 1
18377EOF
18378
18379		;;
18380	esac
18381else
18382  with_dmalloc=
18383fi;
18384echo "$as_me:18384: result: ${with_dmalloc:-no}" >&5
18385echo "${ECHO_T}${with_dmalloc:-no}" >&6
18386
18387case ".$with_cflags" in
18388(.*-g*)
18389	case .$CFLAGS in
18390	(.*-g*)
18391		;;
18392	(*)
18393
18394cf_fix_cppflags=no
18395cf_new_cflags=
18396cf_new_cppflags=
18397cf_new_extra_cppflags=
18398
18399for cf_add_cflags in -g
18400do
18401case "$cf_fix_cppflags" in
18402(no)
18403	case "$cf_add_cflags" in
18404	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18405		case "$cf_add_cflags" in
18406		(-D*)
18407			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18408
18409			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18410				&& test -z "${cf_tst_cflags}" \
18411				&& cf_fix_cppflags=yes
18412
18413			if test "$cf_fix_cppflags" = yes ; then
18414
18415	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18416	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18417
18418				continue
18419			elif test "${cf_tst_cflags}" = "\"'" ; then
18420
18421	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18422	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18423
18424				continue
18425			fi
18426			;;
18427		esac
18428		case "$CPPFLAGS" in
18429		(*$cf_add_cflags)
18430			;;
18431		(*)
18432			case "$cf_add_cflags" in
18433			(-D*)
18434				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18435
18436CPPFLAGS=`echo "$CPPFLAGS" | \
18437	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
18438		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
18439
18440				;;
18441			esac
18442
18443	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18444	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18445
18446			;;
18447		esac
18448		;;
18449	(*)
18450
18451	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18452	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18453
18454		;;
18455	esac
18456	;;
18457(yes)
18458
18459	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18460	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18461
18462	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18463
18464	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18465		&& test -z "${cf_tst_cflags}" \
18466		&& cf_fix_cppflags=no
18467	;;
18468esac
18469done
18470
18471if test -n "$cf_new_cflags" ; then
18472
18473	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18474	CFLAGS="${CFLAGS}$cf_new_cflags"
18475
18476fi
18477
18478if test -n "$cf_new_cppflags" ; then
18479
18480	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18481	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18482
18483fi
18484
18485if test -n "$cf_new_extra_cppflags" ; then
18486
18487	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18488	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18489
18490fi
18491
18492		;;
18493	esac
18494	;;
18495esac
18496
18497if test "$with_dmalloc" = yes ; then
18498	echo "$as_me:18498: checking for dmalloc.h" >&5
18499echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18500if test "${ac_cv_header_dmalloc_h+set}" = set; then
18501  echo $ECHO_N "(cached) $ECHO_C" >&6
18502else
18503  cat >"conftest.$ac_ext" <<_ACEOF
18504#line 18504 "configure"
18505#include "confdefs.h"
18506#include <dmalloc.h>
18507_ACEOF
18508if { (eval echo "$as_me:18508: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18509  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18510  ac_status=$?
18511  $EGREP -v '^ *\+' conftest.er1 >conftest.err
18512  rm -f conftest.er1
18513  cat conftest.err >&5
18514  echo "$as_me:18514: \$? = $ac_status" >&5
18515  (exit "$ac_status"); } >/dev/null; then
18516  if test -s conftest.err; then
18517    ac_cpp_err=$ac_c_preproc_warn_flag
18518  else
18519    ac_cpp_err=
18520  fi
18521else
18522  ac_cpp_err=yes
18523fi
18524if test -z "$ac_cpp_err"; then
18525  ac_cv_header_dmalloc_h=yes
18526else
18527  echo "$as_me: failed program was:" >&5
18528  cat "conftest.$ac_ext" >&5
18529  ac_cv_header_dmalloc_h=no
18530fi
18531rm -f conftest.err "conftest.$ac_ext"
18532fi
18533echo "$as_me:18533: result: $ac_cv_header_dmalloc_h" >&5
18534echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18535if test "$ac_cv_header_dmalloc_h" = yes; then
18536
18537echo "$as_me:18537: checking for dmalloc_debug in -ldmalloc" >&5
18538echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18539if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18540  echo $ECHO_N "(cached) $ECHO_C" >&6
18541else
18542  ac_check_lib_save_LIBS=$LIBS
18543LIBS="-ldmalloc  $LIBS"
18544cat >"conftest.$ac_ext" <<_ACEOF
18545#line 18545 "configure"
18546#include "confdefs.h"
18547
18548/* Override any gcc2 internal prototype to avoid an error.  */
18549#ifdef __cplusplus
18550extern "C"
18551#endif
18552/* We use char because int might match the return type of a gcc2
18553   builtin and then its argument prototype would still apply.  */
18554char dmalloc_debug (void);
18555int
18556main (void)
18557{
18558dmalloc_debug ();
18559  ;
18560  return 0;
18561}
18562_ACEOF
18563rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18564if { (eval echo "$as_me:18564: \"$ac_link\"") >&5
18565  (eval $ac_link) 2>&5
18566  ac_status=$?
18567  echo "$as_me:18567: \$? = $ac_status" >&5
18568  (exit "$ac_status"); } &&
18569         { ac_try='test -s "conftest$ac_exeext"'
18570  { (eval echo "$as_me:18570: \"$ac_try\"") >&5
18571  (eval $ac_try) 2>&5
18572  ac_status=$?
18573  echo "$as_me:18573: \$? = $ac_status" >&5
18574  (exit "$ac_status"); }; }; then
18575  ac_cv_lib_dmalloc_dmalloc_debug=yes
18576else
18577  echo "$as_me: failed program was:" >&5
18578cat "conftest.$ac_ext" >&5
18579ac_cv_lib_dmalloc_dmalloc_debug=no
18580fi
18581rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18582LIBS=$ac_check_lib_save_LIBS
18583fi
18584echo "$as_me:18584: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18585echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18586if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18587  cat >>confdefs.h <<EOF
18588#define HAVE_LIBDMALLOC 1
18589EOF
18590
18591  LIBS="-ldmalloc $LIBS"
18592
18593fi
18594
18595fi
18596
18597fi
18598
18599echo "$as_me:18599: checking if you want to use dbmalloc for testing" >&5
18600echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18601
18602# Check whether --with-dbmalloc or --without-dbmalloc was given.
18603if test "${with_dbmalloc+set}" = set; then
18604  withval="$with_dbmalloc"
18605  case "x$withval" in
18606	(x|xno) ;;
18607	(*)
18608		: "${with_cflags:=-g}"
18609		: "${enable_leaks:=no}"
18610		with_dbmalloc=yes
18611
18612cat >>confdefs.h <<EOF
18613#define USE_DBMALLOC 1
18614EOF
18615
18616		;;
18617	esac
18618else
18619  with_dbmalloc=
18620fi;
18621echo "$as_me:18621: result: ${with_dbmalloc:-no}" >&5
18622echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18623
18624case ".$with_cflags" in
18625(.*-g*)
18626	case .$CFLAGS in
18627	(.*-g*)
18628		;;
18629	(*)
18630
18631cf_fix_cppflags=no
18632cf_new_cflags=
18633cf_new_cppflags=
18634cf_new_extra_cppflags=
18635
18636for cf_add_cflags in -g
18637do
18638case "$cf_fix_cppflags" in
18639(no)
18640	case "$cf_add_cflags" in
18641	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18642		case "$cf_add_cflags" in
18643		(-D*)
18644			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18645
18646			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18647				&& test -z "${cf_tst_cflags}" \
18648				&& cf_fix_cppflags=yes
18649
18650			if test "$cf_fix_cppflags" = yes ; then
18651
18652	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18653	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18654
18655				continue
18656			elif test "${cf_tst_cflags}" = "\"'" ; then
18657
18658	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18659	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18660
18661				continue
18662			fi
18663			;;
18664		esac
18665		case "$CPPFLAGS" in
18666		(*$cf_add_cflags)
18667			;;
18668		(*)
18669			case "$cf_add_cflags" in
18670			(-D*)
18671				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18672
18673CPPFLAGS=`echo "$CPPFLAGS" | \
18674	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
18675		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
18676
18677				;;
18678			esac
18679
18680	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18681	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18682
18683			;;
18684		esac
18685		;;
18686	(*)
18687
18688	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18689	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18690
18691		;;
18692	esac
18693	;;
18694(yes)
18695
18696	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18697	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18698
18699	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18700
18701	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18702		&& test -z "${cf_tst_cflags}" \
18703		&& cf_fix_cppflags=no
18704	;;
18705esac
18706done
18707
18708if test -n "$cf_new_cflags" ; then
18709
18710	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18711	CFLAGS="${CFLAGS}$cf_new_cflags"
18712
18713fi
18714
18715if test -n "$cf_new_cppflags" ; then
18716
18717	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18718	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18719
18720fi
18721
18722if test -n "$cf_new_extra_cppflags" ; then
18723
18724	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18725	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18726
18727fi
18728
18729		;;
18730	esac
18731	;;
18732esac
18733
18734if test "$with_dbmalloc" = yes ; then
18735	echo "$as_me:18735: checking for dbmalloc.h" >&5
18736echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18737if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18738  echo $ECHO_N "(cached) $ECHO_C" >&6
18739else
18740  cat >"conftest.$ac_ext" <<_ACEOF
18741#line 18741 "configure"
18742#include "confdefs.h"
18743#include <dbmalloc.h>
18744_ACEOF
18745if { (eval echo "$as_me:18745: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18746  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18747  ac_status=$?
18748  $EGREP -v '^ *\+' conftest.er1 >conftest.err
18749  rm -f conftest.er1
18750  cat conftest.err >&5
18751  echo "$as_me:18751: \$? = $ac_status" >&5
18752  (exit "$ac_status"); } >/dev/null; then
18753  if test -s conftest.err; then
18754    ac_cpp_err=$ac_c_preproc_warn_flag
18755  else
18756    ac_cpp_err=
18757  fi
18758else
18759  ac_cpp_err=yes
18760fi
18761if test -z "$ac_cpp_err"; then
18762  ac_cv_header_dbmalloc_h=yes
18763else
18764  echo "$as_me: failed program was:" >&5
18765  cat "conftest.$ac_ext" >&5
18766  ac_cv_header_dbmalloc_h=no
18767fi
18768rm -f conftest.err "conftest.$ac_ext"
18769fi
18770echo "$as_me:18770: result: $ac_cv_header_dbmalloc_h" >&5
18771echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18772if test "$ac_cv_header_dbmalloc_h" = yes; then
18773
18774echo "$as_me:18774: checking for debug_malloc in -ldbmalloc" >&5
18775echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18776if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18777  echo $ECHO_N "(cached) $ECHO_C" >&6
18778else
18779  ac_check_lib_save_LIBS=$LIBS
18780LIBS="-ldbmalloc  $LIBS"
18781cat >"conftest.$ac_ext" <<_ACEOF
18782#line 18782 "configure"
18783#include "confdefs.h"
18784
18785/* Override any gcc2 internal prototype to avoid an error.  */
18786#ifdef __cplusplus
18787extern "C"
18788#endif
18789/* We use char because int might match the return type of a gcc2
18790   builtin and then its argument prototype would still apply.  */
18791char debug_malloc (void);
18792int
18793main (void)
18794{
18795debug_malloc ();
18796  ;
18797  return 0;
18798}
18799_ACEOF
18800rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18801if { (eval echo "$as_me:18801: \"$ac_link\"") >&5
18802  (eval $ac_link) 2>&5
18803  ac_status=$?
18804  echo "$as_me:18804: \$? = $ac_status" >&5
18805  (exit "$ac_status"); } &&
18806         { ac_try='test -s "conftest$ac_exeext"'
18807  { (eval echo "$as_me:18807: \"$ac_try\"") >&5
18808  (eval $ac_try) 2>&5
18809  ac_status=$?
18810  echo "$as_me:18810: \$? = $ac_status" >&5
18811  (exit "$ac_status"); }; }; then
18812  ac_cv_lib_dbmalloc_debug_malloc=yes
18813else
18814  echo "$as_me: failed program was:" >&5
18815cat "conftest.$ac_ext" >&5
18816ac_cv_lib_dbmalloc_debug_malloc=no
18817fi
18818rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18819LIBS=$ac_check_lib_save_LIBS
18820fi
18821echo "$as_me:18821: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18822echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18823if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18824  cat >>confdefs.h <<EOF
18825#define HAVE_LIBDBMALLOC 1
18826EOF
18827
18828  LIBS="-ldbmalloc $LIBS"
18829
18830fi
18831
18832fi
18833
18834fi
18835
18836echo "$as_me:18836: checking if you want to use valgrind for testing" >&5
18837echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18838
18839# Check whether --with-valgrind or --without-valgrind was given.
18840if test "${with_valgrind+set}" = set; then
18841  withval="$with_valgrind"
18842  case "x$withval" in
18843	(x|xno) ;;
18844	(*)
18845		: "${with_cflags:=-g}"
18846		: "${enable_leaks:=no}"
18847		with_valgrind=yes
18848
18849cat >>confdefs.h <<EOF
18850#define USE_VALGRIND 1
18851EOF
18852
18853		;;
18854	esac
18855else
18856  with_valgrind=
18857fi;
18858echo "$as_me:18858: result: ${with_valgrind:-no}" >&5
18859echo "${ECHO_T}${with_valgrind:-no}" >&6
18860
18861case ".$with_cflags" in
18862(.*-g*)
18863	case .$CFLAGS in
18864	(.*-g*)
18865		;;
18866	(*)
18867
18868cf_fix_cppflags=no
18869cf_new_cflags=
18870cf_new_cppflags=
18871cf_new_extra_cppflags=
18872
18873for cf_add_cflags in -g
18874do
18875case "$cf_fix_cppflags" in
18876(no)
18877	case "$cf_add_cflags" in
18878	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18879		case "$cf_add_cflags" in
18880		(-D*)
18881			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18882
18883			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18884				&& test -z "${cf_tst_cflags}" \
18885				&& cf_fix_cppflags=yes
18886
18887			if test "$cf_fix_cppflags" = yes ; then
18888
18889	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18890	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18891
18892				continue
18893			elif test "${cf_tst_cflags}" = "\"'" ; then
18894
18895	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18896	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18897
18898				continue
18899			fi
18900			;;
18901		esac
18902		case "$CPPFLAGS" in
18903		(*$cf_add_cflags)
18904			;;
18905		(*)
18906			case "$cf_add_cflags" in
18907			(-D*)
18908				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18909
18910CPPFLAGS=`echo "$CPPFLAGS" | \
18911	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
18912		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
18913
18914				;;
18915			esac
18916
18917	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18918	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18919
18920			;;
18921		esac
18922		;;
18923	(*)
18924
18925	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18926	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18927
18928		;;
18929	esac
18930	;;
18931(yes)
18932
18933	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18934	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18935
18936	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18937
18938	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18939		&& test -z "${cf_tst_cflags}" \
18940		&& cf_fix_cppflags=no
18941	;;
18942esac
18943done
18944
18945if test -n "$cf_new_cflags" ; then
18946
18947	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18948	CFLAGS="${CFLAGS}$cf_new_cflags"
18949
18950fi
18951
18952if test -n "$cf_new_cppflags" ; then
18953
18954	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18955	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18956
18957fi
18958
18959if test -n "$cf_new_extra_cppflags" ; then
18960
18961	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18962	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18963
18964fi
18965
18966		;;
18967	esac
18968	;;
18969esac
18970
18971echo "$as_me:18971: checking if you want to perform memory-leak testing" >&5
18972echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18973
18974# Check whether --enable-leaks or --disable-leaks was given.
18975if test "${enable_leaks+set}" = set; then
18976  enableval="$enable_leaks"
18977  enable_leaks=$enableval
18978else
18979  enable_leaks=yes
18980fi;
18981if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18982echo "$as_me:18982: result: $with_no_leaks" >&5
18983echo "${ECHO_T}$with_no_leaks" >&6
18984
18985if test "$enable_leaks" = no ; then
18986
18987cat >>confdefs.h <<\EOF
18988#define NO_LEAKS 1
18989EOF
18990
18991cat >>confdefs.h <<\EOF
18992#define YY_NO_LEAKS 1
18993EOF
18994
18995fi
18996
18997cat >>confdefs.h <<\EOF
18998#define HAVE_NC_ALLOC_H 1
18999EOF
19000
19001###	use option --enable-expanded to generate certain macros as functions
19002
19003# Check whether --enable-expanded or --disable-expanded was given.
19004if test "${enable_expanded+set}" = set; then
19005  enableval="$enable_expanded"
19006  test "x$enableval" = xyes &&
19007cat >>confdefs.h <<\EOF
19008#define NCURSES_EXPANDED 1
19009EOF
19010
19011fi;
19012
19013###	use option --disable-macros to suppress macros in favor of functions
19014
19015# Check whether --enable-macros or --disable-macros was given.
19016if test "${enable_macros+set}" = set; then
19017  enableval="$enable_macros"
19018  test "$enableval" = no &&
19019cat >>confdefs.h <<\EOF
19020#define NCURSES_NOMACROS 1
19021EOF
19022
19023fi;
19024
19025# Normally we only add trace() to the debug-library.  Allow this to be
19026# extended to all models of the ncurses library:
19027cf_all_traces=no
19028case "$CFLAGS $CPPFLAGS" in
19029(*-DTRACE*)
19030	cf_all_traces=yes
19031	;;
19032esac
19033
19034echo "$as_me:19034: checking whether to add trace feature to all models" >&5
19035echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
19036
19037# Check whether --with-trace or --without-trace was given.
19038if test "${with_trace+set}" = set; then
19039  withval="$with_trace"
19040  cf_with_trace=$withval
19041else
19042  cf_with_trace=$cf_all_traces
19043fi;
19044echo "$as_me:19044: result: $cf_with_trace" >&5
19045echo "${ECHO_T}$cf_with_trace" >&6
19046
19047if test "x$cf_with_trace" = xyes ; then
19048	LIB_TRACING=all
19049	ADA_TRACE=TRUE
19050
19051cat >>confdefs.h <<\EOF
19052#define TRACE 1
19053EOF
19054
19055cat >>confdefs.h <<\EOF
19056#define HAVE__TRACEF 1
19057EOF
19058
19059else
19060	LIB_TRACING=DEBUG
19061	ADA_TRACE=FALSE
19062fi
19063
19064echo "$as_me:19064: checking if we want to use GNAT projects" >&5
19065echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19066
19067# Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19068if test "${enable_gnat_projects+set}" = set; then
19069  enableval="$enable_gnat_projects"
19070  test "$enableval" != no && enableval=yes
19071	if test "$enableval" != "yes" ; then
19072    enable_gnat_projects=no
19073	else
19074		enable_gnat_projects=yes
19075	fi
19076else
19077  enableval=yes
19078	enable_gnat_projects=yes
19079
19080fi;
19081echo "$as_me:19081: result: $enable_gnat_projects" >&5
19082echo "${ECHO_T}$enable_gnat_projects" >&6
19083
19084###	Checks for libraries.
19085case "$cf_cv_system_name" in
19086(*mingw32*|*mingw64*)
19087	# Note: WINVER may be a problem with Windows 10
19088	if test "x$with_named_pipes" = xyes ; then
19089		CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19090	else
19091		CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19092	fi
19093
19094echo "$as_me:19094: checking if ssp library is needed" >&5
19095echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19096if test "${cf_cv_need_libssp+set}" = set; then
19097  echo $ECHO_N "(cached) $ECHO_C" >&6
19098else
19099
19100cat >"conftest.$ac_ext" <<_ACEOF
19101#line 19101 "configure"
19102#include "confdefs.h"
19103
19104#include <sys/types.h>
19105#include <dirent.h>
19106
19107int
19108main (void)
19109{
19110
19111       DIR *dp = opendir(".");
19112
19113  ;
19114  return 0;
19115}
19116_ACEOF
19117rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19118if { (eval echo "$as_me:19118: \"$ac_link\"") >&5
19119  (eval $ac_link) 2>&5
19120  ac_status=$?
19121  echo "$as_me:19121: \$? = $ac_status" >&5
19122  (exit "$ac_status"); } &&
19123         { ac_try='test -s "conftest$ac_exeext"'
19124  { (eval echo "$as_me:19124: \"$ac_try\"") >&5
19125  (eval $ac_try) 2>&5
19126  ac_status=$?
19127  echo "$as_me:19127: \$? = $ac_status" >&5
19128  (exit "$ac_status"); }; }; then
19129  cf_cv_need_libssp=no
19130else
19131  echo "$as_me: failed program was:" >&5
19132cat "conftest.$ac_ext" >&5
19133
19134	cf_save_LIBS="$LIBS"
19135	LIBS="$LIBS -lssp"
19136	cat >"conftest.$ac_ext" <<_ACEOF
19137#line 19137 "configure"
19138#include "confdefs.h"
19139
19140#include <sys/types.h>
19141#include <dirent.h>
19142
19143int
19144main (void)
19145{
19146
19147		   DIR *dp = opendir(".");
19148
19149  ;
19150  return 0;
19151}
19152_ACEOF
19153rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19154if { (eval echo "$as_me:19154: \"$ac_link\"") >&5
19155  (eval $ac_link) 2>&5
19156  ac_status=$?
19157  echo "$as_me:19157: \$? = $ac_status" >&5
19158  (exit "$ac_status"); } &&
19159         { ac_try='test -s "conftest$ac_exeext"'
19160  { (eval echo "$as_me:19160: \"$ac_try\"") >&5
19161  (eval $ac_try) 2>&5
19162  ac_status=$?
19163  echo "$as_me:19163: \$? = $ac_status" >&5
19164  (exit "$ac_status"); }; }; then
19165  cf_cv_need_libssp=yes
19166else
19167  echo "$as_me: failed program was:" >&5
19168cat "conftest.$ac_ext" >&5
19169cf_cv_need_libssp=maybe
19170fi
19171rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19172	LIBS="$cf_save_LIBS"
19173
19174fi
19175rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19176fi
19177echo "$as_me:19177: result: $cf_cv_need_libssp" >&5
19178echo "${ECHO_T}$cf_cv_need_libssp" >&6
19179
19180if test "x$cf_cv_need_libssp" = xyes
19181then
19182
19183cf_add_libs="$LIBS"
19184# reverse order
19185cf_add_0lib=
19186for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19187# filter duplicates
19188for cf_add_1lib in $cf_add_0lib; do
19189	for cf_add_2lib in $cf_add_libs; do
19190		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19191			cf_add_1lib=
19192			break
19193		fi
19194	done
19195	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19196done
19197LIBS="$cf_add_libs"
19198
19199fi
19200
19201	;;
19202(*)
19203	;;
19204esac
19205
19206echo "$as_me:19206: checking if -lm needed for math functions" >&5
19207echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19208if test "${cf_cv_need_libm+set}" = set; then
19209  echo $ECHO_N "(cached) $ECHO_C" >&6
19210else
19211
19212	cat >"conftest.$ac_ext" <<_ACEOF
19213#line 19213 "configure"
19214#include "confdefs.h"
19215
19216		#include <stdio.h>
19217		#include <stdlib.h>
19218		#include <math.h>
19219
19220int
19221main (void)
19222{
19223double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19224  ;
19225  return 0;
19226}
19227_ACEOF
19228rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19229if { (eval echo "$as_me:19229: \"$ac_link\"") >&5
19230  (eval $ac_link) 2>&5
19231  ac_status=$?
19232  echo "$as_me:19232: \$? = $ac_status" >&5
19233  (exit "$ac_status"); } &&
19234         { ac_try='test -s "conftest$ac_exeext"'
19235  { (eval echo "$as_me:19235: \"$ac_try\"") >&5
19236  (eval $ac_try) 2>&5
19237  ac_status=$?
19238  echo "$as_me:19238: \$? = $ac_status" >&5
19239  (exit "$ac_status"); }; }; then
19240  cf_cv_need_libm=no
19241else
19242  echo "$as_me: failed program was:" >&5
19243cat "conftest.$ac_ext" >&5
19244cf_cv_need_libm=yes
19245fi
19246rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19247fi
19248echo "$as_me:19248: result: $cf_cv_need_libm" >&5
19249echo "${ECHO_T}$cf_cv_need_libm" >&6
19250
19251if test "$cf_cv_need_libm" = yes
19252then
19253
19254	cf_save_LIBS="$LIBS"
19255	LIBS="$LIBS -lm"
19256	echo "$as_me:19256: checking if -lm is available for math functions" >&5
19257echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19258if test "${cf_cv_have_libm+set}" = set; then
19259  echo $ECHO_N "(cached) $ECHO_C" >&6
19260else
19261
19262	cat >"conftest.$ac_ext" <<_ACEOF
19263#line 19263 "configure"
19264#include "confdefs.h"
19265
19266		#include <stdio.h>
19267		#include <stdlib.h>
19268		#include <math.h>
19269
19270int
19271main (void)
19272{
19273double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19274  ;
19275  return 0;
19276}
19277_ACEOF
19278rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19279if { (eval echo "$as_me:19279: \"$ac_link\"") >&5
19280  (eval $ac_link) 2>&5
19281  ac_status=$?
19282  echo "$as_me:19282: \$? = $ac_status" >&5
19283  (exit "$ac_status"); } &&
19284         { ac_try='test -s "conftest$ac_exeext"'
19285  { (eval echo "$as_me:19285: \"$ac_try\"") >&5
19286  (eval $ac_try) 2>&5
19287  ac_status=$?
19288  echo "$as_me:19288: \$? = $ac_status" >&5
19289  (exit "$ac_status"); }; }; then
19290  cf_cv_have_libm=yes
19291else
19292  echo "$as_me: failed program was:" >&5
19293cat "conftest.$ac_ext" >&5
19294cf_cv_have_libm=no
19295fi
19296rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19297fi
19298echo "$as_me:19298: result: $cf_cv_have_libm" >&5
19299echo "${ECHO_T}$cf_cv_have_libm" >&6
19300	LIBS="$cf_save_LIBS"
19301
19302	if test "$cf_cv_have_libm" = yes
19303	then
19304		MATH_LIB=-lm
19305	fi
19306else
19307	cf_cv_have_libm=yes
19308fi
19309
19310if test "$cf_cv_have_libm" = yes
19311then
19312
19313cat >>confdefs.h <<\EOF
19314#define HAVE_MATH_FUNCS 1
19315EOF
19316
19317fi
19318
19319###	Checks for header files.
19320echo "$as_me:19320: checking whether time.h and sys/time.h may both be included" >&5
19321echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19322if test "${ac_cv_header_time+set}" = set; then
19323  echo $ECHO_N "(cached) $ECHO_C" >&6
19324else
19325  cat >"conftest.$ac_ext" <<_ACEOF
19326#line 19326 "configure"
19327#include "confdefs.h"
19328#include <sys/types.h>
19329#include <sys/time.h>
19330#include <time.h>
19331
19332int
19333main (void)
19334{
19335if ((struct tm *) 0)
19336return 0;
19337  ;
19338  return 0;
19339}
19340_ACEOF
19341rm -f "conftest.$ac_objext"
19342if { (eval echo "$as_me:19342: \"$ac_compile\"") >&5
19343  (eval $ac_compile) 2>&5
19344  ac_status=$?
19345  echo "$as_me:19345: \$? = $ac_status" >&5
19346  (exit "$ac_status"); } &&
19347         { ac_try='test -s "conftest.$ac_objext"'
19348  { (eval echo "$as_me:19348: \"$ac_try\"") >&5
19349  (eval $ac_try) 2>&5
19350  ac_status=$?
19351  echo "$as_me:19351: \$? = $ac_status" >&5
19352  (exit "$ac_status"); }; }; then
19353  ac_cv_header_time=yes
19354else
19355  echo "$as_me: failed program was:" >&5
19356cat "conftest.$ac_ext" >&5
19357ac_cv_header_time=no
19358fi
19359rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19360fi
19361echo "$as_me:19361: result: $ac_cv_header_time" >&5
19362echo "${ECHO_T}$ac_cv_header_time" >&6
19363if test $ac_cv_header_time = yes; then
19364
19365cat >>confdefs.h <<\EOF
19366#define TIME_WITH_SYS_TIME 1
19367EOF
19368
19369fi
19370
19371cf_regex_func=no
19372cf_regex_libs=
19373case "$host_os" in
19374(mingw*)
19375	# -lsystre -ltre -lintl -liconv
19376	echo "$as_me:19376: checking for regcomp in -lsystre" >&5
19377echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19378if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19379  echo $ECHO_N "(cached) $ECHO_C" >&6
19380else
19381  ac_check_lib_save_LIBS=$LIBS
19382LIBS="-lsystre  $LIBS"
19383cat >"conftest.$ac_ext" <<_ACEOF
19384#line 19384 "configure"
19385#include "confdefs.h"
19386
19387/* Override any gcc2 internal prototype to avoid an error.  */
19388#ifdef __cplusplus
19389extern "C"
19390#endif
19391/* We use char because int might match the return type of a gcc2
19392   builtin and then its argument prototype would still apply.  */
19393char regcomp (void);
19394int
19395main (void)
19396{
19397regcomp ();
19398  ;
19399  return 0;
19400}
19401_ACEOF
19402rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19403if { (eval echo "$as_me:19403: \"$ac_link\"") >&5
19404  (eval $ac_link) 2>&5
19405  ac_status=$?
19406  echo "$as_me:19406: \$? = $ac_status" >&5
19407  (exit "$ac_status"); } &&
19408         { ac_try='test -s "conftest$ac_exeext"'
19409  { (eval echo "$as_me:19409: \"$ac_try\"") >&5
19410  (eval $ac_try) 2>&5
19411  ac_status=$?
19412  echo "$as_me:19412: \$? = $ac_status" >&5
19413  (exit "$ac_status"); }; }; then
19414  ac_cv_lib_systre_regcomp=yes
19415else
19416  echo "$as_me: failed program was:" >&5
19417cat "conftest.$ac_ext" >&5
19418ac_cv_lib_systre_regcomp=no
19419fi
19420rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19421LIBS=$ac_check_lib_save_LIBS
19422fi
19423echo "$as_me:19423: result: $ac_cv_lib_systre_regcomp" >&5
19424echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19425if test "$ac_cv_lib_systre_regcomp" = yes; then
19426
19427		echo "$as_me:19427: checking for libiconv_open in -liconv" >&5
19428echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19429if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19430  echo $ECHO_N "(cached) $ECHO_C" >&6
19431else
19432  ac_check_lib_save_LIBS=$LIBS
19433LIBS="-liconv  $LIBS"
19434cat >"conftest.$ac_ext" <<_ACEOF
19435#line 19435 "configure"
19436#include "confdefs.h"
19437
19438/* Override any gcc2 internal prototype to avoid an error.  */
19439#ifdef __cplusplus
19440extern "C"
19441#endif
19442/* We use char because int might match the return type of a gcc2
19443   builtin and then its argument prototype would still apply.  */
19444char libiconv_open (void);
19445int
19446main (void)
19447{
19448libiconv_open ();
19449  ;
19450  return 0;
19451}
19452_ACEOF
19453rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19454if { (eval echo "$as_me:19454: \"$ac_link\"") >&5
19455  (eval $ac_link) 2>&5
19456  ac_status=$?
19457  echo "$as_me:19457: \$? = $ac_status" >&5
19458  (exit "$ac_status"); } &&
19459         { ac_try='test -s "conftest$ac_exeext"'
19460  { (eval echo "$as_me:19460: \"$ac_try\"") >&5
19461  (eval $ac_try) 2>&5
19462  ac_status=$?
19463  echo "$as_me:19463: \$? = $ac_status" >&5
19464  (exit "$ac_status"); }; }; then
19465  ac_cv_lib_iconv_libiconv_open=yes
19466else
19467  echo "$as_me: failed program was:" >&5
19468cat "conftest.$ac_ext" >&5
19469ac_cv_lib_iconv_libiconv_open=no
19470fi
19471rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19472LIBS=$ac_check_lib_save_LIBS
19473fi
19474echo "$as_me:19474: result: $ac_cv_lib_iconv_libiconv_open" >&5
19475echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19476if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19477
19478cf_add_libs="$LIBS"
19479# reverse order
19480cf_add_0lib=
19481for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19482# filter duplicates
19483for cf_add_1lib in $cf_add_0lib; do
19484	for cf_add_2lib in $cf_add_libs; do
19485		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19486			cf_add_1lib=
19487			break
19488		fi
19489	done
19490	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19491done
19492LIBS="$cf_add_libs"
19493
19494fi
19495
19496		echo "$as_me:19496: checking for libintl_gettext in -lintl" >&5
19497echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19498if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19499  echo $ECHO_N "(cached) $ECHO_C" >&6
19500else
19501  ac_check_lib_save_LIBS=$LIBS
19502LIBS="-lintl  $LIBS"
19503cat >"conftest.$ac_ext" <<_ACEOF
19504#line 19504 "configure"
19505#include "confdefs.h"
19506
19507/* Override any gcc2 internal prototype to avoid an error.  */
19508#ifdef __cplusplus
19509extern "C"
19510#endif
19511/* We use char because int might match the return type of a gcc2
19512   builtin and then its argument prototype would still apply.  */
19513char libintl_gettext (void);
19514int
19515main (void)
19516{
19517libintl_gettext ();
19518  ;
19519  return 0;
19520}
19521_ACEOF
19522rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19523if { (eval echo "$as_me:19523: \"$ac_link\"") >&5
19524  (eval $ac_link) 2>&5
19525  ac_status=$?
19526  echo "$as_me:19526: \$? = $ac_status" >&5
19527  (exit "$ac_status"); } &&
19528         { ac_try='test -s "conftest$ac_exeext"'
19529  { (eval echo "$as_me:19529: \"$ac_try\"") >&5
19530  (eval $ac_try) 2>&5
19531  ac_status=$?
19532  echo "$as_me:19532: \$? = $ac_status" >&5
19533  (exit "$ac_status"); }; }; then
19534  ac_cv_lib_intl_libintl_gettext=yes
19535else
19536  echo "$as_me: failed program was:" >&5
19537cat "conftest.$ac_ext" >&5
19538ac_cv_lib_intl_libintl_gettext=no
19539fi
19540rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19541LIBS=$ac_check_lib_save_LIBS
19542fi
19543echo "$as_me:19543: result: $ac_cv_lib_intl_libintl_gettext" >&5
19544echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19545if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19546
19547cf_add_libs="$LIBS"
19548# reverse order
19549cf_add_0lib=
19550for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19551# filter duplicates
19552for cf_add_1lib in $cf_add_0lib; do
19553	for cf_add_2lib in $cf_add_libs; do
19554		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19555			cf_add_1lib=
19556			break
19557		fi
19558	done
19559	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19560done
19561LIBS="$cf_add_libs"
19562
19563fi
19564
19565		echo "$as_me:19565: checking for tre_regcomp in -ltre" >&5
19566echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19567if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19568  echo $ECHO_N "(cached) $ECHO_C" >&6
19569else
19570  ac_check_lib_save_LIBS=$LIBS
19571LIBS="-ltre  $LIBS"
19572cat >"conftest.$ac_ext" <<_ACEOF
19573#line 19573 "configure"
19574#include "confdefs.h"
19575
19576/* Override any gcc2 internal prototype to avoid an error.  */
19577#ifdef __cplusplus
19578extern "C"
19579#endif
19580/* We use char because int might match the return type of a gcc2
19581   builtin and then its argument prototype would still apply.  */
19582char tre_regcomp (void);
19583int
19584main (void)
19585{
19586tre_regcomp ();
19587  ;
19588  return 0;
19589}
19590_ACEOF
19591rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19592if { (eval echo "$as_me:19592: \"$ac_link\"") >&5
19593  (eval $ac_link) 2>&5
19594  ac_status=$?
19595  echo "$as_me:19595: \$? = $ac_status" >&5
19596  (exit "$ac_status"); } &&
19597         { ac_try='test -s "conftest$ac_exeext"'
19598  { (eval echo "$as_me:19598: \"$ac_try\"") >&5
19599  (eval $ac_try) 2>&5
19600  ac_status=$?
19601  echo "$as_me:19601: \$? = $ac_status" >&5
19602  (exit "$ac_status"); }; }; then
19603  ac_cv_lib_tre_tre_regcomp=yes
19604else
19605  echo "$as_me: failed program was:" >&5
19606cat "conftest.$ac_ext" >&5
19607ac_cv_lib_tre_tre_regcomp=no
19608fi
19609rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19610LIBS=$ac_check_lib_save_LIBS
19611fi
19612echo "$as_me:19612: result: $ac_cv_lib_tre_tre_regcomp" >&5
19613echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19614if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19615
19616cf_add_libs="$LIBS"
19617# reverse order
19618cf_add_0lib=
19619for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19620# filter duplicates
19621for cf_add_1lib in $cf_add_0lib; do
19622	for cf_add_2lib in $cf_add_libs; do
19623		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19624			cf_add_1lib=
19625			break
19626		fi
19627	done
19628	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19629done
19630LIBS="$cf_add_libs"
19631
19632fi
19633
19634cf_add_libs="$LIBS"
19635# reverse order
19636cf_add_0lib=
19637for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19638# filter duplicates
19639for cf_add_1lib in $cf_add_0lib; do
19640	for cf_add_2lib in $cf_add_libs; do
19641		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19642			cf_add_1lib=
19643			break
19644		fi
19645	done
19646	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19647done
19648LIBS="$cf_add_libs"
19649
19650		cf_regex_func=regcomp
19651
19652else
19653
19654		echo "$as_me:19654: checking for regcomp in -lgnurx" >&5
19655echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19656if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19657  echo $ECHO_N "(cached) $ECHO_C" >&6
19658else
19659  ac_check_lib_save_LIBS=$LIBS
19660LIBS="-lgnurx  $LIBS"
19661cat >"conftest.$ac_ext" <<_ACEOF
19662#line 19662 "configure"
19663#include "confdefs.h"
19664
19665/* Override any gcc2 internal prototype to avoid an error.  */
19666#ifdef __cplusplus
19667extern "C"
19668#endif
19669/* We use char because int might match the return type of a gcc2
19670   builtin and then its argument prototype would still apply.  */
19671char regcomp (void);
19672int
19673main (void)
19674{
19675regcomp ();
19676  ;
19677  return 0;
19678}
19679_ACEOF
19680rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19681if { (eval echo "$as_me:19681: \"$ac_link\"") >&5
19682  (eval $ac_link) 2>&5
19683  ac_status=$?
19684  echo "$as_me:19684: \$? = $ac_status" >&5
19685  (exit "$ac_status"); } &&
19686         { ac_try='test -s "conftest$ac_exeext"'
19687  { (eval echo "$as_me:19687: \"$ac_try\"") >&5
19688  (eval $ac_try) 2>&5
19689  ac_status=$?
19690  echo "$as_me:19690: \$? = $ac_status" >&5
19691  (exit "$ac_status"); }; }; then
19692  ac_cv_lib_gnurx_regcomp=yes
19693else
19694  echo "$as_me: failed program was:" >&5
19695cat "conftest.$ac_ext" >&5
19696ac_cv_lib_gnurx_regcomp=no
19697fi
19698rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19699LIBS=$ac_check_lib_save_LIBS
19700fi
19701echo "$as_me:19701: result: $ac_cv_lib_gnurx_regcomp" >&5
19702echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19703if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19704
19705cf_add_libs="$LIBS"
19706# reverse order
19707cf_add_0lib=
19708for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19709# filter duplicates
19710for cf_add_1lib in $cf_add_0lib; do
19711	for cf_add_2lib in $cf_add_libs; do
19712		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19713			cf_add_1lib=
19714			break
19715		fi
19716	done
19717	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19718done
19719LIBS="$cf_add_libs"
19720
19721			cf_regex_func=regcomp
19722fi
19723
19724fi
19725
19726	;;
19727(*)
19728	cf_regex_libs="regex re"
19729	echo "$as_me:19729: checking for regcomp" >&5
19730echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19731if test "${ac_cv_func_regcomp+set}" = set; then
19732  echo $ECHO_N "(cached) $ECHO_C" >&6
19733else
19734  cat >"conftest.$ac_ext" <<_ACEOF
19735#line 19735 "configure"
19736#include "confdefs.h"
19737#define regcomp autoconf_temporary
19738#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
19739#undef regcomp
19740
19741#ifdef __cplusplus
19742extern "C"
19743#endif
19744
19745/* We use char because int might match the return type of a gcc2
19746   builtin and then its argument prototype would still apply.  */
19747char regcomp (void);
19748
19749int
19750main (void)
19751{
19752
19753/* The GNU C library defines stubs for functions which it implements
19754    to always fail with ENOSYS.  Some functions are actually named
19755    something starting with __ and the normal name is an alias.  */
19756#if defined (__stub_regcomp) || defined (__stub___regcomp)
19757#error found stub for regcomp
19758#endif
19759
19760	return regcomp ();
19761  ;
19762  return 0;
19763}
19764_ACEOF
19765rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19766if { (eval echo "$as_me:19766: \"$ac_link\"") >&5
19767  (eval $ac_link) 2>&5
19768  ac_status=$?
19769  echo "$as_me:19769: \$? = $ac_status" >&5
19770  (exit "$ac_status"); } &&
19771         { ac_try='test -s "conftest$ac_exeext"'
19772  { (eval echo "$as_me:19772: \"$ac_try\"") >&5
19773  (eval $ac_try) 2>&5
19774  ac_status=$?
19775  echo "$as_me:19775: \$? = $ac_status" >&5
19776  (exit "$ac_status"); }; }; then
19777  ac_cv_func_regcomp=yes
19778else
19779  echo "$as_me: failed program was:" >&5
19780cat "conftest.$ac_ext" >&5
19781ac_cv_func_regcomp=no
19782fi
19783rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19784fi
19785echo "$as_me:19785: result: $ac_cv_func_regcomp" >&5
19786echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19787if test "$ac_cv_func_regcomp" = yes; then
19788  cf_regex_func=regcomp
19789else
19790
19791		for cf_regex_lib in $cf_regex_libs
19792		do
19793			as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19794echo "$as_me:19794: checking for regcomp in -l$cf_regex_lib" >&5
19795echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19796if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19797  echo $ECHO_N "(cached) $ECHO_C" >&6
19798else
19799  ac_check_lib_save_LIBS=$LIBS
19800LIBS="-l$cf_regex_lib  $LIBS"
19801cat >"conftest.$ac_ext" <<_ACEOF
19802#line 19802 "configure"
19803#include "confdefs.h"
19804
19805/* Override any gcc2 internal prototype to avoid an error.  */
19806#ifdef __cplusplus
19807extern "C"
19808#endif
19809/* We use char because int might match the return type of a gcc2
19810   builtin and then its argument prototype would still apply.  */
19811char regcomp (void);
19812int
19813main (void)
19814{
19815regcomp ();
19816  ;
19817  return 0;
19818}
19819_ACEOF
19820rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19821if { (eval echo "$as_me:19821: \"$ac_link\"") >&5
19822  (eval $ac_link) 2>&5
19823  ac_status=$?
19824  echo "$as_me:19824: \$? = $ac_status" >&5
19825  (exit "$ac_status"); } &&
19826         { ac_try='test -s "conftest$ac_exeext"'
19827  { (eval echo "$as_me:19827: \"$ac_try\"") >&5
19828  (eval $ac_try) 2>&5
19829  ac_status=$?
19830  echo "$as_me:19830: \$? = $ac_status" >&5
19831  (exit "$ac_status"); }; }; then
19832  eval "$as_ac_Lib=yes"
19833else
19834  echo "$as_me: failed program was:" >&5
19835cat "conftest.$ac_ext" >&5
19836eval "$as_ac_Lib=no"
19837fi
19838rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19839LIBS=$ac_check_lib_save_LIBS
19840fi
19841echo "$as_me:19841: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19842echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19843if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19844
19845cf_add_libs="$LIBS"
19846# reverse order
19847cf_add_0lib=
19848for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19849# filter duplicates
19850for cf_add_1lib in $cf_add_0lib; do
19851	for cf_add_2lib in $cf_add_libs; do
19852		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19853			cf_add_1lib=
19854			break
19855		fi
19856	done
19857	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19858done
19859LIBS="$cf_add_libs"
19860
19861					cf_regex_func=regcomp
19862					break
19863fi
19864
19865		done
19866
19867fi
19868
19869	;;
19870esac
19871
19872if test "$cf_regex_func" = no ; then
19873	echo "$as_me:19873: checking for compile" >&5
19874echo $ECHO_N "checking for compile... $ECHO_C" >&6
19875if test "${ac_cv_func_compile+set}" = set; then
19876  echo $ECHO_N "(cached) $ECHO_C" >&6
19877else
19878  cat >"conftest.$ac_ext" <<_ACEOF
19879#line 19879 "configure"
19880#include "confdefs.h"
19881#define compile autoconf_temporary
19882#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
19883#undef compile
19884
19885#ifdef __cplusplus
19886extern "C"
19887#endif
19888
19889/* We use char because int might match the return type of a gcc2
19890   builtin and then its argument prototype would still apply.  */
19891char compile (void);
19892
19893int
19894main (void)
19895{
19896
19897/* The GNU C library defines stubs for functions which it implements
19898    to always fail with ENOSYS.  Some functions are actually named
19899    something starting with __ and the normal name is an alias.  */
19900#if defined (__stub_compile) || defined (__stub___compile)
19901#error found stub for compile
19902#endif
19903
19904	return compile ();
19905  ;
19906  return 0;
19907}
19908_ACEOF
19909rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19910if { (eval echo "$as_me:19910: \"$ac_link\"") >&5
19911  (eval $ac_link) 2>&5
19912  ac_status=$?
19913  echo "$as_me:19913: \$? = $ac_status" >&5
19914  (exit "$ac_status"); } &&
19915         { ac_try='test -s "conftest$ac_exeext"'
19916  { (eval echo "$as_me:19916: \"$ac_try\"") >&5
19917  (eval $ac_try) 2>&5
19918  ac_status=$?
19919  echo "$as_me:19919: \$? = $ac_status" >&5
19920  (exit "$ac_status"); }; }; then
19921  ac_cv_func_compile=yes
19922else
19923  echo "$as_me: failed program was:" >&5
19924cat "conftest.$ac_ext" >&5
19925ac_cv_func_compile=no
19926fi
19927rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19928fi
19929echo "$as_me:19929: result: $ac_cv_func_compile" >&5
19930echo "${ECHO_T}$ac_cv_func_compile" >&6
19931if test "$ac_cv_func_compile" = yes; then
19932  cf_regex_func=compile
19933else
19934
19935		echo "$as_me:19935: checking for compile in -lgen" >&5
19936echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19937if test "${ac_cv_lib_gen_compile+set}" = set; then
19938  echo $ECHO_N "(cached) $ECHO_C" >&6
19939else
19940  ac_check_lib_save_LIBS=$LIBS
19941LIBS="-lgen  $LIBS"
19942cat >"conftest.$ac_ext" <<_ACEOF
19943#line 19943 "configure"
19944#include "confdefs.h"
19945
19946/* Override any gcc2 internal prototype to avoid an error.  */
19947#ifdef __cplusplus
19948extern "C"
19949#endif
19950/* We use char because int might match the return type of a gcc2
19951   builtin and then its argument prototype would still apply.  */
19952char compile (void);
19953int
19954main (void)
19955{
19956compile ();
19957  ;
19958  return 0;
19959}
19960_ACEOF
19961rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19962if { (eval echo "$as_me:19962: \"$ac_link\"") >&5
19963  (eval $ac_link) 2>&5
19964  ac_status=$?
19965  echo "$as_me:19965: \$? = $ac_status" >&5
19966  (exit "$ac_status"); } &&
19967         { ac_try='test -s "conftest$ac_exeext"'
19968  { (eval echo "$as_me:19968: \"$ac_try\"") >&5
19969  (eval $ac_try) 2>&5
19970  ac_status=$?
19971  echo "$as_me:19971: \$? = $ac_status" >&5
19972  (exit "$ac_status"); }; }; then
19973  ac_cv_lib_gen_compile=yes
19974else
19975  echo "$as_me: failed program was:" >&5
19976cat "conftest.$ac_ext" >&5
19977ac_cv_lib_gen_compile=no
19978fi
19979rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19980LIBS=$ac_check_lib_save_LIBS
19981fi
19982echo "$as_me:19982: result: $ac_cv_lib_gen_compile" >&5
19983echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19984if test "$ac_cv_lib_gen_compile" = yes; then
19985
19986cf_add_libs="$LIBS"
19987# reverse order
19988cf_add_0lib=
19989for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19990# filter duplicates
19991for cf_add_1lib in $cf_add_0lib; do
19992	for cf_add_2lib in $cf_add_libs; do
19993		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19994			cf_add_1lib=
19995			break
19996		fi
19997	done
19998	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19999done
20000LIBS="$cf_add_libs"
20001
20002				cf_regex_func=compile
20003fi
20004
20005fi
20006
20007fi
20008
20009if test "$cf_regex_func" = no ; then
20010	{ echo "$as_me:20010: WARNING: cannot find regular expression library" >&5
20011echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20012fi
20013
20014echo "$as_me:20014: checking for regular-expression headers" >&5
20015echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20016if test "${cf_cv_regex_hdrs+set}" = set; then
20017  echo $ECHO_N "(cached) $ECHO_C" >&6
20018else
20019
20020cf_cv_regex_hdrs=no
20021case "$cf_regex_func" in
20022(compile)
20023	for cf_regex_hdr in regexp.h regexpr.h
20024	do
20025		cat >"conftest.$ac_ext" <<_ACEOF
20026#line 20026 "configure"
20027#include "confdefs.h"
20028#include <$cf_regex_hdr>
20029int
20030main (void)
20031{
20032
20033			char *p = compile("", "", "", 0);
20034			int x = step("", "");
20035			(void)p;
20036			(void)x;
20037
20038  ;
20039  return 0;
20040}
20041_ACEOF
20042rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20043if { (eval echo "$as_me:20043: \"$ac_link\"") >&5
20044  (eval $ac_link) 2>&5
20045  ac_status=$?
20046  echo "$as_me:20046: \$? = $ac_status" >&5
20047  (exit "$ac_status"); } &&
20048         { ac_try='test -s "conftest$ac_exeext"'
20049  { (eval echo "$as_me:20049: \"$ac_try\"") >&5
20050  (eval $ac_try) 2>&5
20051  ac_status=$?
20052  echo "$as_me:20052: \$? = $ac_status" >&5
20053  (exit "$ac_status"); }; }; then
20054
20055			cf_cv_regex_hdrs=$cf_regex_hdr
20056			break
20057
20058else
20059  echo "$as_me: failed program was:" >&5
20060cat "conftest.$ac_ext" >&5
20061fi
20062rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20063	done
20064	;;
20065(*)
20066	for cf_regex_hdr in regex.h
20067	do
20068		cat >"conftest.$ac_ext" <<_ACEOF
20069#line 20069 "configure"
20070#include "confdefs.h"
20071#include <sys/types.h>
20072#include <stdio.h>
20073#include <$cf_regex_hdr>
20074int
20075main (void)
20076{
20077
20078			regex_t *p = NULL;
20079			int x = regcomp(p, "", 0);
20080			int y = regexec(p, "", 0, 0, 0);
20081			(void)x;
20082			(void)y;
20083			regfree(p);
20084
20085  ;
20086  return 0;
20087}
20088_ACEOF
20089rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20090if { (eval echo "$as_me:20090: \"$ac_link\"") >&5
20091  (eval $ac_link) 2>&5
20092  ac_status=$?
20093  echo "$as_me:20093: \$? = $ac_status" >&5
20094  (exit "$ac_status"); } &&
20095         { ac_try='test -s "conftest$ac_exeext"'
20096  { (eval echo "$as_me:20096: \"$ac_try\"") >&5
20097  (eval $ac_try) 2>&5
20098  ac_status=$?
20099  echo "$as_me:20099: \$? = $ac_status" >&5
20100  (exit "$ac_status"); }; }; then
20101
20102			cf_cv_regex_hdrs=$cf_regex_hdr
20103			break
20104
20105else
20106  echo "$as_me: failed program was:" >&5
20107cat "conftest.$ac_ext" >&5
20108fi
20109rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20110	done
20111	;;
20112esac
20113
20114fi
20115echo "$as_me:20115: result: $cf_cv_regex_hdrs" >&5
20116echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20117
20118case "$cf_cv_regex_hdrs" in
20119	(no)		{ echo "$as_me:20119: WARNING: no regular expression header found" >&5
20120echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20121	(regex.h)
20122cat >>confdefs.h <<\EOF
20123#define HAVE_REGEX_H_FUNCS 1
20124EOF
20125 ;;
20126	(regexp.h)
20127cat >>confdefs.h <<\EOF
20128#define HAVE_REGEXP_H_FUNCS 1
20129EOF
20130 ;;
20131	(regexpr.h)
20132cat >>confdefs.h <<\EOF
20133#define HAVE_REGEXPR_H_FUNCS 1
20134EOF
20135 ;;
20136esac
20137
20138for ac_header in \
20139alloca.h \
20140fcntl.h \
20141getopt.h \
20142limits.h \
20143locale.h \
20144malloc.h \
20145math.h \
20146poll.h \
20147sys/auxv.h \
20148sys/fsuid.h \
20149sys/ioctl.h \
20150sys/param.h \
20151sys/poll.h \
20152sys/select.h \
20153sys/time.h \
20154sys/times.h \
20155unistd.h \
20156wctype.h \
20157
20158do
20159as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20160echo "$as_me:20160: checking for $ac_header" >&5
20161echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20162if eval "test \"\${$as_ac_Header+set}\" = set"; then
20163  echo $ECHO_N "(cached) $ECHO_C" >&6
20164else
20165  cat >"conftest.$ac_ext" <<_ACEOF
20166#line 20166 "configure"
20167#include "confdefs.h"
20168#include <$ac_header>
20169_ACEOF
20170if { (eval echo "$as_me:20170: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20171  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20172  ac_status=$?
20173  $EGREP -v '^ *\+' conftest.er1 >conftest.err
20174  rm -f conftest.er1
20175  cat conftest.err >&5
20176  echo "$as_me:20176: \$? = $ac_status" >&5
20177  (exit "$ac_status"); } >/dev/null; then
20178  if test -s conftest.err; then
20179    ac_cpp_err=$ac_c_preproc_warn_flag
20180  else
20181    ac_cpp_err=
20182  fi
20183else
20184  ac_cpp_err=yes
20185fi
20186if test -z "$ac_cpp_err"; then
20187  eval "$as_ac_Header=yes"
20188else
20189  echo "$as_me: failed program was:" >&5
20190  cat "conftest.$ac_ext" >&5
20191  eval "$as_ac_Header=no"
20192fi
20193rm -f conftest.err "conftest.$ac_ext"
20194fi
20195echo "$as_me:20195: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20196echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20197if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20198  cat >>confdefs.h <<EOF
20199#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20200EOF
20201
20202fi
20203done
20204
20205for ac_header in getopt.h
20206do
20207as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20208echo "$as_me:20208: checking for $ac_header" >&5
20209echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20210if eval "test \"\${$as_ac_Header+set}\" = set"; then
20211  echo $ECHO_N "(cached) $ECHO_C" >&6
20212else
20213  cat >"conftest.$ac_ext" <<_ACEOF
20214#line 20214 "configure"
20215#include "confdefs.h"
20216#include <$ac_header>
20217_ACEOF
20218if { (eval echo "$as_me:20218: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20219  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20220  ac_status=$?
20221  $EGREP -v '^ *\+' conftest.er1 >conftest.err
20222  rm -f conftest.er1
20223  cat conftest.err >&5
20224  echo "$as_me:20224: \$? = $ac_status" >&5
20225  (exit "$ac_status"); } >/dev/null; then
20226  if test -s conftest.err; then
20227    ac_cpp_err=$ac_c_preproc_warn_flag
20228  else
20229    ac_cpp_err=
20230  fi
20231else
20232  ac_cpp_err=yes
20233fi
20234if test -z "$ac_cpp_err"; then
20235  eval "$as_ac_Header=yes"
20236else
20237  echo "$as_me: failed program was:" >&5
20238  cat "conftest.$ac_ext" >&5
20239  eval "$as_ac_Header=no"
20240fi
20241rm -f conftest.err "conftest.$ac_ext"
20242fi
20243echo "$as_me:20243: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20244echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20245if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20246  cat >>confdefs.h <<EOF
20247#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20248EOF
20249
20250fi
20251done
20252
20253echo "$as_me:20253: checking for header declaring getopt variables" >&5
20254echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20255if test "${cf_cv_getopt_header+set}" = set; then
20256  echo $ECHO_N "(cached) $ECHO_C" >&6
20257else
20258
20259cf_cv_getopt_header=none
20260for cf_header in stdio.h stdlib.h unistd.h getopt.h
20261do
20262cat >"conftest.$ac_ext" <<_ACEOF
20263#line 20263 "configure"
20264#include "confdefs.h"
20265
20266#include <$cf_header>
20267int
20268main (void)
20269{
20270int x = optind; char *y = optarg; (void)x; (void)y
20271  ;
20272  return 0;
20273}
20274_ACEOF
20275rm -f "conftest.$ac_objext"
20276if { (eval echo "$as_me:20276: \"$ac_compile\"") >&5
20277  (eval $ac_compile) 2>&5
20278  ac_status=$?
20279  echo "$as_me:20279: \$? = $ac_status" >&5
20280  (exit "$ac_status"); } &&
20281         { ac_try='test -s "conftest.$ac_objext"'
20282  { (eval echo "$as_me:20282: \"$ac_try\"") >&5
20283  (eval $ac_try) 2>&5
20284  ac_status=$?
20285  echo "$as_me:20285: \$? = $ac_status" >&5
20286  (exit "$ac_status"); }; }; then
20287  cf_cv_getopt_header=$cf_header
20288 break
20289else
20290  echo "$as_me: failed program was:" >&5
20291cat "conftest.$ac_ext" >&5
20292fi
20293rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20294done
20295
20296fi
20297echo "$as_me:20297: result: $cf_cv_getopt_header" >&5
20298echo "${ECHO_T}$cf_cv_getopt_header" >&6
20299if test "$cf_cv_getopt_header" != none ; then
20300
20301cat >>confdefs.h <<\EOF
20302#define HAVE_GETOPT_HEADER 1
20303EOF
20304
20305fi
20306if test "$cf_cv_getopt_header" = getopt.h ; then
20307
20308cat >>confdefs.h <<\EOF
20309#define NEED_GETOPT_H 1
20310EOF
20311
20312fi
20313
20314echo "$as_me:20314: checking if external environ is declared" >&5
20315echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20316if test "${cf_cv_dcl_environ+set}" = set; then
20317  echo $ECHO_N "(cached) $ECHO_C" >&6
20318else
20319
20320    cat >"conftest.$ac_ext" <<_ACEOF
20321#line 20321 "configure"
20322#include "confdefs.h"
20323
20324$ac_includes_default
20325int
20326main (void)
20327{
20328void* x = (void*) environ; (void)x
20329  ;
20330  return 0;
20331}
20332_ACEOF
20333rm -f "conftest.$ac_objext"
20334if { (eval echo "$as_me:20334: \"$ac_compile\"") >&5
20335  (eval $ac_compile) 2>&5
20336  ac_status=$?
20337  echo "$as_me:20337: \$? = $ac_status" >&5
20338  (exit "$ac_status"); } &&
20339         { ac_try='test -s "conftest.$ac_objext"'
20340  { (eval echo "$as_me:20340: \"$ac_try\"") >&5
20341  (eval $ac_try) 2>&5
20342  ac_status=$?
20343  echo "$as_me:20343: \$? = $ac_status" >&5
20344  (exit "$ac_status"); }; }; then
20345  cf_cv_dcl_environ=yes
20346else
20347  echo "$as_me: failed program was:" >&5
20348cat "conftest.$ac_ext" >&5
20349cf_cv_dcl_environ=no
20350fi
20351rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20352
20353fi
20354echo "$as_me:20354: result: $cf_cv_dcl_environ" >&5
20355echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20356
20357if test "$cf_cv_dcl_environ" = no ; then
20358
20359cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20360
20361    cat >>confdefs.h <<EOF
20362#define $cf_result 1
20363EOF
20364
20365fi
20366
20367# It's possible (for near-UNIX clones) that the data doesn't exist
20368
20369echo "$as_me:20369: checking if external environ exists" >&5
20370echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20371if test "${cf_cv_have_environ+set}" = set; then
20372  echo $ECHO_N "(cached) $ECHO_C" >&6
20373else
20374
20375	cat >"conftest.$ac_ext" <<_ACEOF
20376#line 20376 "configure"
20377#include "confdefs.h"
20378
20379#undef environ
20380extern int environ;
20381
20382int
20383main (void)
20384{
20385environ = 2
20386  ;
20387  return 0;
20388}
20389_ACEOF
20390rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20391if { (eval echo "$as_me:20391: \"$ac_link\"") >&5
20392  (eval $ac_link) 2>&5
20393  ac_status=$?
20394  echo "$as_me:20394: \$? = $ac_status" >&5
20395  (exit "$ac_status"); } &&
20396         { ac_try='test -s "conftest$ac_exeext"'
20397  { (eval echo "$as_me:20397: \"$ac_try\"") >&5
20398  (eval $ac_try) 2>&5
20399  ac_status=$?
20400  echo "$as_me:20400: \$? = $ac_status" >&5
20401  (exit "$ac_status"); }; }; then
20402  cf_cv_have_environ=yes
20403else
20404  echo "$as_me: failed program was:" >&5
20405cat "conftest.$ac_ext" >&5
20406cf_cv_have_environ=no
20407fi
20408rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20409
20410fi
20411echo "$as_me:20411: result: $cf_cv_have_environ" >&5
20412echo "${ECHO_T}$cf_cv_have_environ" >&6
20413
20414if test "$cf_cv_have_environ" = yes ; then
20415
20416cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20417
20418	cat >>confdefs.h <<EOF
20419#define $cf_result 1
20420EOF
20421
20422fi
20423
20424echo "$as_me:20424: checking for getenv" >&5
20425echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20426if test "${ac_cv_func_getenv+set}" = set; then
20427  echo $ECHO_N "(cached) $ECHO_C" >&6
20428else
20429  cat >"conftest.$ac_ext" <<_ACEOF
20430#line 20430 "configure"
20431#include "confdefs.h"
20432#define getenv autoconf_temporary
20433#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
20434#undef getenv
20435
20436#ifdef __cplusplus
20437extern "C"
20438#endif
20439
20440/* We use char because int might match the return type of a gcc2
20441   builtin and then its argument prototype would still apply.  */
20442char getenv (void);
20443
20444int
20445main (void)
20446{
20447
20448/* The GNU C library defines stubs for functions which it implements
20449    to always fail with ENOSYS.  Some functions are actually named
20450    something starting with __ and the normal name is an alias.  */
20451#if defined (__stub_getenv) || defined (__stub___getenv)
20452#error found stub for getenv
20453#endif
20454
20455	return getenv ();
20456  ;
20457  return 0;
20458}
20459_ACEOF
20460rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20461if { (eval echo "$as_me:20461: \"$ac_link\"") >&5
20462  (eval $ac_link) 2>&5
20463  ac_status=$?
20464  echo "$as_me:20464: \$? = $ac_status" >&5
20465  (exit "$ac_status"); } &&
20466         { ac_try='test -s "conftest$ac_exeext"'
20467  { (eval echo "$as_me:20467: \"$ac_try\"") >&5
20468  (eval $ac_try) 2>&5
20469  ac_status=$?
20470  echo "$as_me:20470: \$? = $ac_status" >&5
20471  (exit "$ac_status"); }; }; then
20472  ac_cv_func_getenv=yes
20473else
20474  echo "$as_me: failed program was:" >&5
20475cat "conftest.$ac_ext" >&5
20476ac_cv_func_getenv=no
20477fi
20478rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20479fi
20480echo "$as_me:20480: result: $ac_cv_func_getenv" >&5
20481echo "${ECHO_T}$ac_cv_func_getenv" >&6
20482
20483for ac_func in putenv setenv strdup
20484do
20485as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20486echo "$as_me:20486: checking for $ac_func" >&5
20487echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20488if eval "test \"\${$as_ac_var+set}\" = set"; then
20489  echo $ECHO_N "(cached) $ECHO_C" >&6
20490else
20491  cat >"conftest.$ac_ext" <<_ACEOF
20492#line 20492 "configure"
20493#include "confdefs.h"
20494#define $ac_func autoconf_temporary
20495#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
20496#undef $ac_func
20497
20498#ifdef __cplusplus
20499extern "C"
20500#endif
20501
20502/* We use char because int might match the return type of a gcc2
20503   builtin and then its argument prototype would still apply.  */
20504char $ac_func (void);
20505
20506int
20507main (void)
20508{
20509
20510/* The GNU C library defines stubs for functions which it implements
20511    to always fail with ENOSYS.  Some functions are actually named
20512    something starting with __ and the normal name is an alias.  */
20513#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20514#error found stub for $ac_func
20515#endif
20516
20517	return $ac_func ();
20518  ;
20519  return 0;
20520}
20521_ACEOF
20522rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20523if { (eval echo "$as_me:20523: \"$ac_link\"") >&5
20524  (eval $ac_link) 2>&5
20525  ac_status=$?
20526  echo "$as_me:20526: \$? = $ac_status" >&5
20527  (exit "$ac_status"); } &&
20528         { ac_try='test -s "conftest$ac_exeext"'
20529  { (eval echo "$as_me:20529: \"$ac_try\"") >&5
20530  (eval $ac_try) 2>&5
20531  ac_status=$?
20532  echo "$as_me:20532: \$? = $ac_status" >&5
20533  (exit "$ac_status"); }; }; then
20534  eval "$as_ac_var=yes"
20535else
20536  echo "$as_me: failed program was:" >&5
20537cat "conftest.$ac_ext" >&5
20538eval "$as_ac_var=no"
20539fi
20540rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20541fi
20542echo "$as_me:20542: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20543echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20544if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20545  cat >>confdefs.h <<EOF
20546#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20547EOF
20548
20549fi
20550done
20551
20552echo "$as_me:20552: checking if getenv returns consistent values" >&5
20553echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20554if test "${cf_cv_consistent_getenv+set}" = set; then
20555  echo $ECHO_N "(cached) $ECHO_C" >&6
20556else
20557
20558if test "$cross_compiling" = yes; then
20559  cf_cv_consistent_getenv=unknown
20560else
20561  cat >"conftest.$ac_ext" <<_ACEOF
20562#line 20562 "configure"
20563#include "confdefs.h"
20564
20565$ac_includes_default
20566
20567#if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20568extern char **environ;	/* POSIX, but some systems are not... */
20569#endif
20570
20571#if defined(HAVE_STRDUP)
20572#define str_alloc(s) strdup(s)
20573#else
20574#define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20575#endif
20576
20577static void set_value(const char *name, const char *value)
20578{
20579#if defined(HAVE_SETENV)
20580	setenv(name, value, 1);
20581#elif defined(HAVE_PUTENV)
20582	char buffer[1024];
20583	sprintf(buffer, "%s=%s", name, value);
20584	putenv(str_alloc(buffer));
20585#else
20586#error neither putenv/setenv found
20587#endif
20588}
20589int main(void)
20590{
20591	int pass;
20592	size_t numenv, limit, j;
20593	char **mynames;
20594	char **myvalues;
20595	char **mypointer;
20596	char *equals;
20597	for (numenv = 0; environ[numenv]; ++numenv) ;
20598	limit = numenv + 10;
20599	mynames = (char **) calloc(limit + 1, sizeof(char *));
20600	myvalues = (char **) calloc(limit + 1, sizeof(char *));
20601	mypointer = (char **) calloc(limit + 1, sizeof(char *));
20602#if defined(HAVE_ENVIRON)
20603	for (j = 0; environ[j]; ++j) {
20604		mynames[j] = str_alloc(environ[j]);
20605		equals = strchr(mynames[j], '=');
20606		if (equals != NULL) {
20607			*equals++ = '\\0';
20608			myvalues[j] = str_alloc(equals);
20609		} else {
20610			myvalues[j] = str_alloc("");
20611		}
20612	}
20613#endif
20614	for (j = numenv; j < limit; ++j) {
20615		char name[80];
20616		char value[80];
20617		size_t found;
20618		size_t k = 0;
20619		do {
20620			size_t jk;
20621			found = 0;
20622			sprintf(name, "TERM%lu", (unsigned long) k);
20623			for (jk = 0; jk < j; ++jk) {
20624				if (!strcmp(name, mynames[jk])) {
20625					found = 1;
20626					++k;
20627					break;
20628				}
20629			}
20630		} while (found);
20631		sprintf(value, "%lu:%p", (unsigned long) k, (void*)&mynames[j]);
20632		set_value(name, value);
20633		mynames[j] = str_alloc(name);
20634		myvalues[j] = str_alloc(value);
20635	}
20636	for (pass = 0; pass < 3; ++pass) {
20637		for (j = 0; j < limit; ++j) {
20638			char *value = getenv(mynames[j]);
20639			if (pass) {
20640				if (value == 0) {
20641					fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20642					${cf_cv_main_return:-return}(1);
20643				} else if (value != mypointer[j]) {
20644					fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20645					${cf_cv_main_return:-return}(1);
20646				} else if (strcmp(value, myvalues[j])) {
20647					fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20648					${cf_cv_main_return:-return}(1);
20649				}
20650			} else {
20651				size_t k;
20652				mypointer[j] = value;
20653				for (k = 0; k < j; ++k) {
20654					if (mypointer[j] == mypointer[k]) {
20655						fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20656						${cf_cv_main_return:-return}(1);
20657					}
20658				}
20659			}
20660		}
20661	}
20662	${cf_cv_main_return:-return}(0);
20663}
20664
20665_ACEOF
20666rm -f "conftest$ac_exeext"
20667if { (eval echo "$as_me:20667: \"$ac_link\"") >&5
20668  (eval $ac_link) 2>&5
20669  ac_status=$?
20670  echo "$as_me:20670: \$? = $ac_status" >&5
20671  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20672  { (eval echo "$as_me:20672: \"$ac_try\"") >&5
20673  (eval $ac_try) 2>&5
20674  ac_status=$?
20675  echo "$as_me:20675: \$? = $ac_status" >&5
20676  (exit "$ac_status"); }; }; then
20677  cf_cv_consistent_getenv=yes
20678else
20679  echo "$as_me: program exited with status $ac_status" >&5
20680echo "$as_me: failed program was:" >&5
20681cat "conftest.$ac_ext" >&5
20682cf_cv_consistent_getenv=no
20683fi
20684rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20685fi
20686
20687fi
20688echo "$as_me:20688: result: $cf_cv_consistent_getenv" >&5
20689echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20690
20691if test "x$cf_cv_consistent_getenv" = xno
20692then
20693
20694cat >>confdefs.h <<\EOF
20695#define HAVE_CONSISTENT_GETENV 1
20696EOF
20697
20698fi
20699
20700if test "x$cf_cv_consistent_getenv" = xno && \
20701	test "x$cf_with_trace" = xyes
20702then
20703	{ echo "$as_me:20703: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20704echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20705fi
20706
20707echo "$as_me:20707: checking if sys/time.h works with sys/select.h" >&5
20708echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20709if test "${cf_cv_sys_time_select+set}" = set; then
20710  echo $ECHO_N "(cached) $ECHO_C" >&6
20711else
20712
20713cat >"conftest.$ac_ext" <<_ACEOF
20714#line 20714 "configure"
20715#include "confdefs.h"
20716
20717#include <sys/types.h>
20718#ifdef HAVE_SYS_TIME_H
20719#include <sys/time.h>
20720#endif
20721#ifdef HAVE_SYS_SELECT_H
20722#include <sys/select.h>
20723#endif
20724
20725int
20726main (void)
20727{
20728
20729  ;
20730  return 0;
20731}
20732_ACEOF
20733rm -f "conftest.$ac_objext"
20734if { (eval echo "$as_me:20734: \"$ac_compile\"") >&5
20735  (eval $ac_compile) 2>&5
20736  ac_status=$?
20737  echo "$as_me:20737: \$? = $ac_status" >&5
20738  (exit "$ac_status"); } &&
20739         { ac_try='test -s "conftest.$ac_objext"'
20740  { (eval echo "$as_me:20740: \"$ac_try\"") >&5
20741  (eval $ac_try) 2>&5
20742  ac_status=$?
20743  echo "$as_me:20743: \$? = $ac_status" >&5
20744  (exit "$ac_status"); }; }; then
20745  cf_cv_sys_time_select=yes
20746else
20747  echo "$as_me: failed program was:" >&5
20748cat "conftest.$ac_ext" >&5
20749cf_cv_sys_time_select=no
20750fi
20751rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20752
20753fi
20754
20755echo "$as_me:20755: result: $cf_cv_sys_time_select" >&5
20756echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20757test "$cf_cv_sys_time_select" = yes &&
20758cat >>confdefs.h <<\EOF
20759#define HAVE_SYS_TIME_SELECT 1
20760EOF
20761
20762###	checks for compiler characteristics
20763ac_ext=c
20764ac_cpp='$CPP $CPPFLAGS'
20765ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20766ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20767ac_compiler_gnu=$ac_cv_c_compiler_gnu
20768ac_main_return="return"
20769
20770echo "$as_me:20770: checking for an ANSI C-conforming const" >&5
20771echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20772if test "${ac_cv_c_const+set}" = set; then
20773  echo $ECHO_N "(cached) $ECHO_C" >&6
20774else
20775  cat >"conftest.$ac_ext" <<_ACEOF
20776#line 20776 "configure"
20777#include "confdefs.h"
20778
20779int
20780main (void)
20781{
20782/* FIXME: Include the comments suggested by Paul. */
20783#ifndef __cplusplus
20784  /* Ultrix mips cc rejects this.  */
20785  typedef int charset[2];
20786  const charset x;
20787  /* SunOS 4.1.1 cc rejects this.  */
20788  char const *const *ccp;
20789  char **p;
20790  /* NEC SVR4.0.2 mips cc rejects this.  */
20791  struct point {int x, y;};
20792  static struct point const zero = {0,0};
20793  /* AIX XL C 1.02.0.0 rejects this.
20794     It does not let you subtract one const X* pointer from another in
20795     an arm of an if-expression whose if-part is not a constant
20796     expression */
20797  const char *g = "string";
20798  ccp = &g + (g ? g-g : 0);
20799  /* HPUX 7.0 cc rejects these. */
20800  ++ccp;
20801  p = (char**) ccp;
20802  ccp = (char const *const *) p;
20803  { /* SCO 3.2v4 cc rejects this.  */
20804    char *t;
20805    char const *s = 0 ? (char *) 0 : (char const *) 0;
20806
20807    *t++ = 0;
20808	(void)s; (void)x; (void)zero;
20809  }
20810  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20811    int x[] = {25, 17};
20812    const int *foo = &x[0];
20813    ++foo;
20814	(void)foo;
20815  }
20816  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20817    typedef const int *iptr;
20818    iptr p = 0;
20819    ++p;
20820	(void)p;
20821  }
20822  { /* AIX XL C 1.02.0.0 rejects this saying
20823       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20824    struct s { int j; const int *ap[3]; };
20825    struct s *b; b->j = 5;
20826  }
20827  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20828    const int foo = 10;
20829	(void)foo;
20830  }
20831#endif
20832
20833  ;
20834  return 0;
20835}
20836_ACEOF
20837rm -f "conftest.$ac_objext"
20838if { (eval echo "$as_me:20838: \"$ac_compile\"") >&5
20839  (eval $ac_compile) 2>&5
20840  ac_status=$?
20841  echo "$as_me:20841: \$? = $ac_status" >&5
20842  (exit "$ac_status"); } &&
20843         { ac_try='test -s "conftest.$ac_objext"'
20844  { (eval echo "$as_me:20844: \"$ac_try\"") >&5
20845  (eval $ac_try) 2>&5
20846  ac_status=$?
20847  echo "$as_me:20847: \$? = $ac_status" >&5
20848  (exit "$ac_status"); }; }; then
20849  ac_cv_c_const=yes
20850else
20851  echo "$as_me: failed program was:" >&5
20852cat "conftest.$ac_ext" >&5
20853ac_cv_c_const=no
20854fi
20855rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20856fi
20857echo "$as_me:20857: result: $ac_cv_c_const" >&5
20858echo "${ECHO_T}$ac_cv_c_const" >&6
20859if test $ac_cv_c_const = no; then
20860
20861cat >>confdefs.h <<\EOF
20862#define const
20863EOF
20864
20865fi
20866
20867echo "$as_me:20867: checking for inline" >&5
20868echo $ECHO_N "checking for inline... $ECHO_C" >&6
20869if test "${ac_cv_c_inline+set}" = set; then
20870  echo $ECHO_N "(cached) $ECHO_C" >&6
20871else
20872  ac_cv_c_inline=no
20873for ac_kw in inline __inline__ __inline; do
20874  cat >"conftest.$ac_ext" <<_ACEOF
20875#line 20875 "configure"
20876#include "confdefs.h"
20877#ifndef __cplusplus
20878static $ac_kw int static_foo (void) {return 0; }
20879$ac_kw int foo (void) {return 0; }
20880#endif
20881
20882_ACEOF
20883rm -f "conftest.$ac_objext"
20884if { (eval echo "$as_me:20884: \"$ac_compile\"") >&5
20885  (eval $ac_compile) 2>&5
20886  ac_status=$?
20887  echo "$as_me:20887: \$? = $ac_status" >&5
20888  (exit "$ac_status"); } &&
20889         { ac_try='test -s "conftest.$ac_objext"'
20890  { (eval echo "$as_me:20890: \"$ac_try\"") >&5
20891  (eval $ac_try) 2>&5
20892  ac_status=$?
20893  echo "$as_me:20893: \$? = $ac_status" >&5
20894  (exit "$ac_status"); }; }; then
20895  ac_cv_c_inline=$ac_kw; break
20896else
20897  echo "$as_me: failed program was:" >&5
20898cat "conftest.$ac_ext" >&5
20899fi
20900rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20901done
20902
20903fi
20904echo "$as_me:20904: result: $ac_cv_c_inline" >&5
20905echo "${ECHO_T}$ac_cv_c_inline" >&6
20906case $ac_cv_c_inline in
20907  inline | yes) ;;
20908  no)
20909cat >>confdefs.h <<\EOF
20910#define inline
20911EOF
20912 ;;
20913  *)  cat >>confdefs.h <<EOF
20914#define inline $ac_cv_c_inline
20915EOF
20916 ;;
20917esac
20918
20919NCURSES_INLINE=
20920if test "$ac_cv_c_inline" != no ; then
20921	NCURSES_INLINE=inline
20922	if test "$INTEL_COMPILER" = yes
20923	then
20924		:
20925	elif test "$CLANG_COMPILER" = yes
20926	then
20927		:
20928	elif test "$GCC" = yes
20929	then
20930		echo "$as_me:20930: checking if $CC supports options to tune inlining" >&5
20931echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20932if test "${cf_cv_gcc_inline+set}" = set; then
20933  echo $ECHO_N "(cached) $ECHO_C" >&6
20934else
20935
20936		cf_save_CFLAGS=$CFLAGS
20937		CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20938		cat >"conftest.$ac_ext" <<_ACEOF
20939#line 20939 "configure"
20940#include "confdefs.h"
20941inline int foo(void) { return 1; }
20942int
20943main (void)
20944{
20945${cf_cv_main_return:-return} foo()
20946  ;
20947  return 0;
20948}
20949_ACEOF
20950rm -f "conftest.$ac_objext"
20951if { (eval echo "$as_me:20951: \"$ac_compile\"") >&5
20952  (eval $ac_compile) 2>&5
20953  ac_status=$?
20954  echo "$as_me:20954: \$? = $ac_status" >&5
20955  (exit "$ac_status"); } &&
20956         { ac_try='test -s "conftest.$ac_objext"'
20957  { (eval echo "$as_me:20957: \"$ac_try\"") >&5
20958  (eval $ac_try) 2>&5
20959  ac_status=$?
20960  echo "$as_me:20960: \$? = $ac_status" >&5
20961  (exit "$ac_status"); }; }; then
20962  cf_cv_gcc_inline=yes
20963else
20964  echo "$as_me: failed program was:" >&5
20965cat "conftest.$ac_ext" >&5
20966cf_cv_gcc_inline=no
20967fi
20968rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20969		CFLAGS=$cf_save_CFLAGS
20970
20971fi
20972echo "$as_me:20972: result: $cf_cv_gcc_inline" >&5
20973echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20974		if test "$cf_cv_gcc_inline" = yes ; then
20975
20976cf_fix_cppflags=no
20977cf_new_cflags=
20978cf_new_cppflags=
20979cf_new_extra_cppflags=
20980
20981for cf_add_cflags in --param max-inline-insns-single=1200
20982do
20983case "$cf_fix_cppflags" in
20984(no)
20985	case "$cf_add_cflags" in
20986	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20987		case "$cf_add_cflags" in
20988		(-D*)
20989			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20990
20991			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20992				&& test -z "${cf_tst_cflags}" \
20993				&& cf_fix_cppflags=yes
20994
20995			if test "$cf_fix_cppflags" = yes ; then
20996
20997	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20998	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20999
21000				continue
21001			elif test "${cf_tst_cflags}" = "\"'" ; then
21002
21003	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21004	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21005
21006				continue
21007			fi
21008			;;
21009		esac
21010		case "$CPPFLAGS" in
21011		(*$cf_add_cflags)
21012			;;
21013		(*)
21014			case "$cf_add_cflags" in
21015			(-D*)
21016				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21017
21018CPPFLAGS=`echo "$CPPFLAGS" | \
21019	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
21020		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
21021
21022				;;
21023			esac
21024
21025	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21026	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21027
21028			;;
21029		esac
21030		;;
21031	(*)
21032
21033	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21034	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21035
21036		;;
21037	esac
21038	;;
21039(yes)
21040
21041	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21042	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21043
21044	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21045
21046	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21047		&& test -z "${cf_tst_cflags}" \
21048		&& cf_fix_cppflags=no
21049	;;
21050esac
21051done
21052
21053if test -n "$cf_new_cflags" ; then
21054
21055	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21056	CFLAGS="${CFLAGS}$cf_new_cflags"
21057
21058fi
21059
21060if test -n "$cf_new_cppflags" ; then
21061
21062	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21063	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21064
21065fi
21066
21067if test -n "$cf_new_extra_cppflags" ; then
21068
21069	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21070	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21071
21072fi
21073
21074		fi
21075	fi
21076fi
21077
21078echo "$as_me:21078: checking for signal global datatype" >&5
21079echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21080if test "${cf_cv_sig_atomic_t+set}" = set; then
21081  echo $ECHO_N "(cached) $ECHO_C" >&6
21082else
21083
21084	for cf_type in \
21085		"volatile sig_atomic_t" \
21086		"sig_atomic_t" \
21087		"int"
21088	do
21089	cat >"conftest.$ac_ext" <<_ACEOF
21090#line 21090 "configure"
21091#include "confdefs.h"
21092
21093#include <sys/types.h>
21094#include <signal.h>
21095#include <stdio.h>
21096
21097extern $cf_type x;
21098$cf_type x;
21099static void handler(int sig)
21100{
21101	(void)sig;
21102	x = 5;
21103}
21104int
21105main (void)
21106{
21107signal(SIGINT, handler);
21108		 x = 1
21109  ;
21110  return 0;
21111}
21112_ACEOF
21113rm -f "conftest.$ac_objext"
21114if { (eval echo "$as_me:21114: \"$ac_compile\"") >&5
21115  (eval $ac_compile) 2>&5
21116  ac_status=$?
21117  echo "$as_me:21117: \$? = $ac_status" >&5
21118  (exit "$ac_status"); } &&
21119         { ac_try='test -s "conftest.$ac_objext"'
21120  { (eval echo "$as_me:21120: \"$ac_try\"") >&5
21121  (eval $ac_try) 2>&5
21122  ac_status=$?
21123  echo "$as_me:21123: \$? = $ac_status" >&5
21124  (exit "$ac_status"); }; }; then
21125  cf_cv_sig_atomic_t=$cf_type
21126else
21127  echo "$as_me: failed program was:" >&5
21128cat "conftest.$ac_ext" >&5
21129cf_cv_sig_atomic_t=no
21130fi
21131rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21132		test "$cf_cv_sig_atomic_t" != no && break
21133	done
21134
21135fi
21136
21137echo "$as_me:21137: result: $cf_cv_sig_atomic_t" >&5
21138echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21139test "$cf_cv_sig_atomic_t" != no &&
21140cat >>confdefs.h <<EOF
21141#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21142EOF
21143
21144if test "$NCURSES_CHTYPE" = auto ; then
21145
21146echo "$as_me:21146: checking for type of chtype" >&5
21147echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21148if test "${cf_cv_typeof_chtype+set}" = set; then
21149  echo $ECHO_N "(cached) $ECHO_C" >&6
21150else
21151
21152		if test "$cross_compiling" = yes; then
21153  cf_cv_typeof_chtype=long
21154else
21155  cat >"conftest.$ac_ext" <<_ACEOF
21156#line 21156 "configure"
21157#include "confdefs.h"
21158
21159$ac_includes_default
21160#define WANT_BITS 31
21161int main(void)
21162{
21163	FILE *fp = fopen("cf_test.out", "w");
21164	if (fp != NULL) {
21165		char *result = "long";
21166		if (sizeof(unsigned long) > sizeof(unsigned int)) {
21167			int n;
21168			unsigned int x, y;
21169			for (n = 0; n < WANT_BITS; n++) {
21170				x = (1 << n);
21171				y = (x >> n);
21172				if (y != 1 || x == 0) {
21173					x = 0;
21174					break;
21175				}
21176			}
21177			/*
21178			 * If x is nonzero, an int is big enough for the bits
21179			 * that we want.
21180			 */
21181			result = (x != 0) ? "int" : "long";
21182		}
21183		fputs(result, fp);
21184		fclose(fp);
21185	}
21186	${cf_cv_main_return:-return}(0);
21187}
21188
21189_ACEOF
21190rm -f "conftest$ac_exeext"
21191if { (eval echo "$as_me:21191: \"$ac_link\"") >&5
21192  (eval $ac_link) 2>&5
21193  ac_status=$?
21194  echo "$as_me:21194: \$? = $ac_status" >&5
21195  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21196  { (eval echo "$as_me:21196: \"$ac_try\"") >&5
21197  (eval $ac_try) 2>&5
21198  ac_status=$?
21199  echo "$as_me:21199: \$? = $ac_status" >&5
21200  (exit "$ac_status"); }; }; then
21201  cf_cv_typeof_chtype=`cat cf_test.out`
21202else
21203  echo "$as_me: program exited with status $ac_status" >&5
21204echo "$as_me: failed program was:" >&5
21205cat "conftest.$ac_ext" >&5
21206cf_cv_typeof_chtype=long
21207fi
21208rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21209fi
21210		rm -f cf_test.out
21211
21212fi
21213
21214echo "$as_me:21214: result: $cf_cv_typeof_chtype" >&5
21215echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21216
21217cat >>confdefs.h <<EOF
21218#define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21219EOF
21220
21221else
21222	cf_cv_typeof_chtype=$NCURSES_CHTYPE
21223fi
21224test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21225
21226echo "$as_me:21226: checking if unsigned literals are legal" >&5
21227echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21228if test "${cf_cv_unsigned_literals+set}" = set; then
21229  echo $ECHO_N "(cached) $ECHO_C" >&6
21230else
21231
21232	cat >"conftest.$ac_ext" <<_ACEOF
21233#line 21233 "configure"
21234#include "confdefs.h"
21235
21236int
21237main (void)
21238{
21239long x = 1L + 1UL + 1U + 1; (void)x
21240  ;
21241  return 0;
21242}
21243_ACEOF
21244rm -f "conftest.$ac_objext"
21245if { (eval echo "$as_me:21245: \"$ac_compile\"") >&5
21246  (eval $ac_compile) 2>&5
21247  ac_status=$?
21248  echo "$as_me:21248: \$? = $ac_status" >&5
21249  (exit "$ac_status"); } &&
21250         { ac_try='test -s "conftest.$ac_objext"'
21251  { (eval echo "$as_me:21251: \"$ac_try\"") >&5
21252  (eval $ac_try) 2>&5
21253  ac_status=$?
21254  echo "$as_me:21254: \$? = $ac_status" >&5
21255  (exit "$ac_status"); }; }; then
21256  cf_cv_unsigned_literals=yes
21257else
21258  echo "$as_me: failed program was:" >&5
21259cat "conftest.$ac_ext" >&5
21260cf_cv_unsigned_literals=no
21261fi
21262rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21263
21264fi
21265
21266echo "$as_me:21266: result: $cf_cv_unsigned_literals" >&5
21267echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21268
21269cf_cv_1UL="1"
21270test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21271test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21272
21273if test "$NCURSES_MMASK_T" = auto ; then
21274	cf_cv_typeof_mmask_t=long
21275else
21276	cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21277fi
21278test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21279
21280###	Checks for external-data
21281
21282echo "$as_me:21282: checking if external errno is declared" >&5
21283echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21284if test "${cf_cv_dcl_errno+set}" = set; then
21285  echo $ECHO_N "(cached) $ECHO_C" >&6
21286else
21287
21288	cat >"conftest.$ac_ext" <<_ACEOF
21289#line 21289 "configure"
21290#include "confdefs.h"
21291
21292$ac_includes_default
21293#include <errno.h>
21294int
21295main (void)
21296{
21297int x = (int) errno; (void)x
21298  ;
21299  return 0;
21300}
21301_ACEOF
21302rm -f "conftest.$ac_objext"
21303if { (eval echo "$as_me:21303: \"$ac_compile\"") >&5
21304  (eval $ac_compile) 2>&5
21305  ac_status=$?
21306  echo "$as_me:21306: \$? = $ac_status" >&5
21307  (exit "$ac_status"); } &&
21308         { ac_try='test -s "conftest.$ac_objext"'
21309  { (eval echo "$as_me:21309: \"$ac_try\"") >&5
21310  (eval $ac_try) 2>&5
21311  ac_status=$?
21312  echo "$as_me:21312: \$? = $ac_status" >&5
21313  (exit "$ac_status"); }; }; then
21314  cf_cv_dcl_errno=yes
21315else
21316  echo "$as_me: failed program was:" >&5
21317cat "conftest.$ac_ext" >&5
21318cf_cv_dcl_errno=no
21319fi
21320rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21321
21322fi
21323echo "$as_me:21323: result: $cf_cv_dcl_errno" >&5
21324echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21325
21326if test "$cf_cv_dcl_errno" = no ; then
21327
21328cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21329
21330	cat >>confdefs.h <<EOF
21331#define $cf_result 1
21332EOF
21333
21334fi
21335
21336# It's possible (for near-UNIX clones) that the data doesn't exist
21337
21338echo "$as_me:21338: checking if external errno exists" >&5
21339echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21340if test "${cf_cv_have_errno+set}" = set; then
21341  echo $ECHO_N "(cached) $ECHO_C" >&6
21342else
21343
21344	cat >"conftest.$ac_ext" <<_ACEOF
21345#line 21345 "configure"
21346#include "confdefs.h"
21347
21348#undef errno
21349extern int errno;
21350
21351int
21352main (void)
21353{
21354errno = 2
21355  ;
21356  return 0;
21357}
21358_ACEOF
21359rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21360if { (eval echo "$as_me:21360: \"$ac_link\"") >&5
21361  (eval $ac_link) 2>&5
21362  ac_status=$?
21363  echo "$as_me:21363: \$? = $ac_status" >&5
21364  (exit "$ac_status"); } &&
21365         { ac_try='test -s "conftest$ac_exeext"'
21366  { (eval echo "$as_me:21366: \"$ac_try\"") >&5
21367  (eval $ac_try) 2>&5
21368  ac_status=$?
21369  echo "$as_me:21369: \$? = $ac_status" >&5
21370  (exit "$ac_status"); }; }; then
21371  cf_cv_have_errno=yes
21372else
21373  echo "$as_me: failed program was:" >&5
21374cat "conftest.$ac_ext" >&5
21375cf_cv_have_errno=no
21376fi
21377rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21378
21379fi
21380echo "$as_me:21380: result: $cf_cv_have_errno" >&5
21381echo "${ECHO_T}$cf_cv_have_errno" >&6
21382
21383if test "$cf_cv_have_errno" = yes ; then
21384
21385cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21386
21387	cat >>confdefs.h <<EOF
21388#define $cf_result 1
21389EOF
21390
21391fi
21392
21393echo "$as_me:21393: checking if data-only library module links" >&5
21394echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21395if test "${cf_cv_link_dataonly+set}" = set; then
21396  echo $ECHO_N "(cached) $ECHO_C" >&6
21397else
21398
21399	rm -f conftest.a
21400	cat >conftest.$ac_ext <<EOF
21401#line 21401 "configure"
21402int	testdata[3] = { 123, 456, 789 };
21403EOF
21404	if { (eval echo "$as_me:21404: \"$ac_compile\"") >&5
21405  (eval $ac_compile) 2>&5
21406  ac_status=$?
21407  echo "$as_me:21407: \$? = $ac_status" >&5
21408  (exit "$ac_status"); } ; then
21409		mv conftest.$OBJEXT data.$OBJEXT && \
21410		( $AR $ARFLAGS conftest.a data.$OBJEXT ) 2>&5 1>/dev/null
21411	fi
21412	rm -f conftest.$ac_ext data.$OBJEXT
21413	cat >conftest.$ac_ext <<EOF
21414#line 21414 "configure"
21415extern int testfunc(void);
21416#if defined(NeXT)
21417int	testfunc(void)
21418{
21419	${cf_cv_main_return:-return}(1);	/* I'm told this linker is broken */
21420}
21421#else
21422extern int testdata[3];
21423int	testfunc(void)
21424{
21425	return testdata[0] == 123
21426	   &&  testdata[1] == 456
21427	   &&  testdata[2] == 789;
21428}
21429#endif
21430EOF
21431	if { (eval echo "$as_me:21431: \"$ac_compile\"") >&5
21432  (eval $ac_compile) 2>&5
21433  ac_status=$?
21434  echo "$as_me:21434: \$? = $ac_status" >&5
21435  (exit "$ac_status"); }; then
21436		mv conftest.$OBJEXT func.$OBJEXT && \
21437		( $AR $ARFLAGS conftest.a func.$OBJEXT ) 2>&5 1>/dev/null
21438	fi
21439	rm -f conftest.$ac_ext func.$OBJEXT
21440	( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21441	cf_saveLIBS="$LIBS"
21442	LIBS="conftest.a $LIBS"
21443	if test "$cross_compiling" = yes; then
21444  cf_cv_link_dataonly=unknown
21445else
21446  cat >"conftest.$ac_ext" <<_ACEOF
21447#line 21447 "configure"
21448#include "confdefs.h"
21449
21450	extern int testfunc(void);
21451	int main(void)
21452	{
21453		${cf_cv_main_return:-return} (!testfunc());
21454	}
21455
21456_ACEOF
21457rm -f "conftest$ac_exeext"
21458if { (eval echo "$as_me:21458: \"$ac_link\"") >&5
21459  (eval $ac_link) 2>&5
21460  ac_status=$?
21461  echo "$as_me:21461: \$? = $ac_status" >&5
21462  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21463  { (eval echo "$as_me:21463: \"$ac_try\"") >&5
21464  (eval $ac_try) 2>&5
21465  ac_status=$?
21466  echo "$as_me:21466: \$? = $ac_status" >&5
21467  (exit "$ac_status"); }; }; then
21468  cf_cv_link_dataonly=yes
21469else
21470  echo "$as_me: program exited with status $ac_status" >&5
21471echo "$as_me: failed program was:" >&5
21472cat "conftest.$ac_ext" >&5
21473cf_cv_link_dataonly=no
21474fi
21475rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21476fi
21477	LIBS="$cf_saveLIBS"
21478
21479fi
21480
21481echo "$as_me:21481: result: $cf_cv_link_dataonly" >&5
21482echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21483
21484if test "$cf_cv_link_dataonly" = no ; then
21485
21486cat >>confdefs.h <<\EOF
21487#define BROKEN_LINKER 1
21488EOF
21489
21490	BROKEN_LINKER=1
21491fi
21492
21493###	Checks for library functions.
21494
21495cf_save_libs="$LIBS"
21496echo "$as_me:21496: checking for clock_gettime" >&5
21497echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
21498if test "${ac_cv_func_clock_gettime+set}" = set; then
21499  echo $ECHO_N "(cached) $ECHO_C" >&6
21500else
21501  cat >"conftest.$ac_ext" <<_ACEOF
21502#line 21502 "configure"
21503#include "confdefs.h"
21504#define clock_gettime autoconf_temporary
21505#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
21506#undef clock_gettime
21507
21508#ifdef __cplusplus
21509extern "C"
21510#endif
21511
21512/* We use char because int might match the return type of a gcc2
21513   builtin and then its argument prototype would still apply.  */
21514char clock_gettime (void);
21515
21516int
21517main (void)
21518{
21519
21520/* The GNU C library defines stubs for functions which it implements
21521    to always fail with ENOSYS.  Some functions are actually named
21522    something starting with __ and the normal name is an alias.  */
21523#if defined (__stub_clock_gettime) || defined (__stub___clock_gettime)
21524#error found stub for clock_gettime
21525#endif
21526
21527	return clock_gettime ();
21528  ;
21529  return 0;
21530}
21531_ACEOF
21532rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21533if { (eval echo "$as_me:21533: \"$ac_link\"") >&5
21534  (eval $ac_link) 2>&5
21535  ac_status=$?
21536  echo "$as_me:21536: \$? = $ac_status" >&5
21537  (exit "$ac_status"); } &&
21538         { ac_try='test -s "conftest$ac_exeext"'
21539  { (eval echo "$as_me:21539: \"$ac_try\"") >&5
21540  (eval $ac_try) 2>&5
21541  ac_status=$?
21542  echo "$as_me:21542: \$? = $ac_status" >&5
21543  (exit "$ac_status"); }; }; then
21544  ac_cv_func_clock_gettime=yes
21545else
21546  echo "$as_me: failed program was:" >&5
21547cat "conftest.$ac_ext" >&5
21548ac_cv_func_clock_gettime=no
21549fi
21550rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21551fi
21552echo "$as_me:21552: result: $ac_cv_func_clock_gettime" >&5
21553echo "${ECHO_T}$ac_cv_func_clock_gettime" >&6
21554if test "$ac_cv_func_clock_gettime" = yes; then
21555  cf_cv_test_clock_gettime=yes
21556else
21557  echo "$as_me:21557: checking for clock_gettime in -lrt" >&5
21558echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6
21559if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
21560  echo $ECHO_N "(cached) $ECHO_C" >&6
21561else
21562  ac_check_lib_save_LIBS=$LIBS
21563LIBS="-lrt  $LIBS"
21564cat >"conftest.$ac_ext" <<_ACEOF
21565#line 21565 "configure"
21566#include "confdefs.h"
21567
21568/* Override any gcc2 internal prototype to avoid an error.  */
21569#ifdef __cplusplus
21570extern "C"
21571#endif
21572/* We use char because int might match the return type of a gcc2
21573   builtin and then its argument prototype would still apply.  */
21574char clock_gettime (void);
21575int
21576main (void)
21577{
21578clock_gettime ();
21579  ;
21580  return 0;
21581}
21582_ACEOF
21583rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21584if { (eval echo "$as_me:21584: \"$ac_link\"") >&5
21585  (eval $ac_link) 2>&5
21586  ac_status=$?
21587  echo "$as_me:21587: \$? = $ac_status" >&5
21588  (exit "$ac_status"); } &&
21589         { ac_try='test -s "conftest$ac_exeext"'
21590  { (eval echo "$as_me:21590: \"$ac_try\"") >&5
21591  (eval $ac_try) 2>&5
21592  ac_status=$?
21593  echo "$as_me:21593: \$? = $ac_status" >&5
21594  (exit "$ac_status"); }; }; then
21595  ac_cv_lib_rt_clock_gettime=yes
21596else
21597  echo "$as_me: failed program was:" >&5
21598cat "conftest.$ac_ext" >&5
21599ac_cv_lib_rt_clock_gettime=no
21600fi
21601rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21602LIBS=$ac_check_lib_save_LIBS
21603fi
21604echo "$as_me:21604: result: $ac_cv_lib_rt_clock_gettime" >&5
21605echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6
21606if test "$ac_cv_lib_rt_clock_gettime" = yes; then
21607  LIBS="-lrt $LIBS"
21608		 cf_cv_test_clock_gettime=yes
21609else
21610  cf_cv_test_clock_gettime=no
21611fi
21612
21613fi
21614
21615if test "$cf_cv_test_clock_gettime" = yes ; then
21616echo "$as_me:21616: checking if clock_gettime links" >&5
21617echo $ECHO_N "checking if clock_gettime links... $ECHO_C" >&6
21618if test "${cf_cv_func_clock_gettime+set}" = set; then
21619  echo $ECHO_N "(cached) $ECHO_C" >&6
21620else
21621
21622		cat >"conftest.$ac_ext" <<_ACEOF
21623#line 21623 "configure"
21624#include "confdefs.h"
21625
21626$ac_includes_default
21627#include <time.h>
21628
21629int
21630main (void)
21631{
21632struct timespec ts;
21633		int rc = clock_gettime(CLOCK_REALTIME, &ts)
21634			   + clock_gettime(CLOCK_MONOTONIC, &ts);
21635		 (void) rc; (void)ts
21636  ;
21637  return 0;
21638}
21639_ACEOF
21640rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21641if { (eval echo "$as_me:21641: \"$ac_link\"") >&5
21642  (eval $ac_link) 2>&5
21643  ac_status=$?
21644  echo "$as_me:21644: \$? = $ac_status" >&5
21645  (exit "$ac_status"); } &&
21646         { ac_try='test -s "conftest$ac_exeext"'
21647  { (eval echo "$as_me:21647: \"$ac_try\"") >&5
21648  (eval $ac_try) 2>&5
21649  ac_status=$?
21650  echo "$as_me:21650: \$? = $ac_status" >&5
21651  (exit "$ac_status"); }; }; then
21652  cf_cv_func_clock_gettime=yes
21653else
21654  echo "$as_me: failed program was:" >&5
21655cat "conftest.$ac_ext" >&5
21656cf_cv_func_clock_gettime=no
21657fi
21658rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21659
21660fi
21661echo "$as_me:21661: result: $cf_cv_func_clock_gettime" >&5
21662echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
21663else
21664	cf_cv_func_clock_gettime=no
21665fi
21666
21667if test "$cf_cv_func_clock_gettime" = yes
21668then
21669
21670cat >>confdefs.h <<\EOF
21671#define HAVE_CLOCK_GETTIME 1
21672EOF
21673
21674else
21675echo "$as_me:21675: checking for gettimeofday" >&5
21676echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
21677if test "${ac_cv_func_gettimeofday+set}" = set; then
21678  echo $ECHO_N "(cached) $ECHO_C" >&6
21679else
21680  cat >"conftest.$ac_ext" <<_ACEOF
21681#line 21681 "configure"
21682#include "confdefs.h"
21683#define gettimeofday autoconf_temporary
21684#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
21685#undef gettimeofday
21686
21687#ifdef __cplusplus
21688extern "C"
21689#endif
21690
21691/* We use char because int might match the return type of a gcc2
21692   builtin and then its argument prototype would still apply.  */
21693char gettimeofday (void);
21694
21695int
21696main (void)
21697{
21698
21699/* The GNU C library defines stubs for functions which it implements
21700    to always fail with ENOSYS.  Some functions are actually named
21701    something starting with __ and the normal name is an alias.  */
21702#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
21703#error found stub for gettimeofday
21704#endif
21705
21706	return gettimeofday ();
21707  ;
21708  return 0;
21709}
21710_ACEOF
21711rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21712if { (eval echo "$as_me:21712: \"$ac_link\"") >&5
21713  (eval $ac_link) 2>&5
21714  ac_status=$?
21715  echo "$as_me:21715: \$? = $ac_status" >&5
21716  (exit "$ac_status"); } &&
21717         { ac_try='test -s "conftest$ac_exeext"'
21718  { (eval echo "$as_me:21718: \"$ac_try\"") >&5
21719  (eval $ac_try) 2>&5
21720  ac_status=$?
21721  echo "$as_me:21721: \$? = $ac_status" >&5
21722  (exit "$ac_status"); }; }; then
21723  ac_cv_func_gettimeofday=yes
21724else
21725  echo "$as_me: failed program was:" >&5
21726cat "conftest.$ac_ext" >&5
21727ac_cv_func_gettimeofday=no
21728fi
21729rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21730fi
21731echo "$as_me:21731: result: $ac_cv_func_gettimeofday" >&5
21732echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
21733if test "$ac_cv_func_gettimeofday" = yes; then
21734
21735cat >>confdefs.h <<\EOF
21736#define HAVE_GETTIMEOFDAY 1
21737EOF
21738
21739else
21740
21741echo "$as_me:21741: checking for gettimeofday in -lbsd" >&5
21742echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
21743if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
21744  echo $ECHO_N "(cached) $ECHO_C" >&6
21745else
21746  ac_check_lib_save_LIBS=$LIBS
21747LIBS="-lbsd  $LIBS"
21748cat >"conftest.$ac_ext" <<_ACEOF
21749#line 21749 "configure"
21750#include "confdefs.h"
21751
21752/* Override any gcc2 internal prototype to avoid an error.  */
21753#ifdef __cplusplus
21754extern "C"
21755#endif
21756/* We use char because int might match the return type of a gcc2
21757   builtin and then its argument prototype would still apply.  */
21758char gettimeofday (void);
21759int
21760main (void)
21761{
21762gettimeofday ();
21763  ;
21764  return 0;
21765}
21766_ACEOF
21767rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21768if { (eval echo "$as_me:21768: \"$ac_link\"") >&5
21769  (eval $ac_link) 2>&5
21770  ac_status=$?
21771  echo "$as_me:21771: \$? = $ac_status" >&5
21772  (exit "$ac_status"); } &&
21773         { ac_try='test -s "conftest$ac_exeext"'
21774  { (eval echo "$as_me:21774: \"$ac_try\"") >&5
21775  (eval $ac_try) 2>&5
21776  ac_status=$?
21777  echo "$as_me:21777: \$? = $ac_status" >&5
21778  (exit "$ac_status"); }; }; then
21779  ac_cv_lib_bsd_gettimeofday=yes
21780else
21781  echo "$as_me: failed program was:" >&5
21782cat "conftest.$ac_ext" >&5
21783ac_cv_lib_bsd_gettimeofday=no
21784fi
21785rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21786LIBS=$ac_check_lib_save_LIBS
21787fi
21788echo "$as_me:21788: result: $ac_cv_lib_bsd_gettimeofday" >&5
21789echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
21790if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
21791
21792cat >>confdefs.h <<\EOF
21793#define HAVE_GETTIMEOFDAY 1
21794EOF
21795
21796cf_add_libs="$LIBS"
21797# reverse order
21798cf_add_0lib=
21799for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21800# filter duplicates
21801for cf_add_1lib in $cf_add_0lib; do
21802	for cf_add_2lib in $cf_add_libs; do
21803		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21804			cf_add_1lib=
21805			break
21806		fi
21807	done
21808	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21809done
21810LIBS="$cf_add_libs"
21811
21812fi
21813
21814fi
21815fi
21816
21817for ac_func in \
21818fpathconf \
21819getcwd \
21820getauxval \
21821getegid \
21822geteuid \
21823getopt \
21824getuid \
21825issetugid \
21826localeconv \
21827poll \
21828remove \
21829select \
21830setbuf \
21831setbuffer \
21832setfsuid \
21833setvbuf \
21834sigaction \
21835sigvec \
21836snprintf \
21837strdup \
21838strstr \
21839sysconf \
21840tcgetpgrp \
21841times \
21842tsearch \
21843vsnprintf \
21844
21845do
21846as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21847echo "$as_me:21847: checking for $ac_func" >&5
21848echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21849if eval "test \"\${$as_ac_var+set}\" = set"; then
21850  echo $ECHO_N "(cached) $ECHO_C" >&6
21851else
21852  cat >"conftest.$ac_ext" <<_ACEOF
21853#line 21853 "configure"
21854#include "confdefs.h"
21855#define $ac_func autoconf_temporary
21856#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
21857#undef $ac_func
21858
21859#ifdef __cplusplus
21860extern "C"
21861#endif
21862
21863/* We use char because int might match the return type of a gcc2
21864   builtin and then its argument prototype would still apply.  */
21865char $ac_func (void);
21866
21867int
21868main (void)
21869{
21870
21871/* The GNU C library defines stubs for functions which it implements
21872    to always fail with ENOSYS.  Some functions are actually named
21873    something starting with __ and the normal name is an alias.  */
21874#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21875#error found stub for $ac_func
21876#endif
21877
21878	return $ac_func ();
21879  ;
21880  return 0;
21881}
21882_ACEOF
21883rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21884if { (eval echo "$as_me:21884: \"$ac_link\"") >&5
21885  (eval $ac_link) 2>&5
21886  ac_status=$?
21887  echo "$as_me:21887: \$? = $ac_status" >&5
21888  (exit "$ac_status"); } &&
21889         { ac_try='test -s "conftest$ac_exeext"'
21890  { (eval echo "$as_me:21890: \"$ac_try\"") >&5
21891  (eval $ac_try) 2>&5
21892  ac_status=$?
21893  echo "$as_me:21893: \$? = $ac_status" >&5
21894  (exit "$ac_status"); }; }; then
21895  eval "$as_ac_var=yes"
21896else
21897  echo "$as_me: failed program was:" >&5
21898cat "conftest.$ac_ext" >&5
21899eval "$as_ac_var=no"
21900fi
21901rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21902fi
21903echo "$as_me:21903: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21904echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21905if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21906  cat >>confdefs.h <<EOF
21907#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21908EOF
21909
21910fi
21911done
21912
21913echo "$as_me:21913: checking if _PATH_TTYS is defined in ttyent.h" >&5
21914echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21915if test "${cf_cv_PATH_TTYS+set}" = set; then
21916  echo $ECHO_N "(cached) $ECHO_C" >&6
21917else
21918
21919cat >"conftest.$ac_ext" <<_ACEOF
21920#line 21920 "configure"
21921#include "confdefs.h"
21922
21923#include <stdio.h>
21924#include <ttyent.h>
21925int
21926main (void)
21927{
21928
21929FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21930  ;
21931  return 0;
21932}
21933_ACEOF
21934rm -f "conftest.$ac_objext"
21935if { (eval echo "$as_me:21935: \"$ac_compile\"") >&5
21936  (eval $ac_compile) 2>&5
21937  ac_status=$?
21938  echo "$as_me:21938: \$? = $ac_status" >&5
21939  (exit "$ac_status"); } &&
21940         { ac_try='test -s "conftest.$ac_objext"'
21941  { (eval echo "$as_me:21941: \"$ac_try\"") >&5
21942  (eval $ac_try) 2>&5
21943  ac_status=$?
21944  echo "$as_me:21944: \$? = $ac_status" >&5
21945  (exit "$ac_status"); }; }; then
21946  cf_cv_PATH_TTYS=yes
21947else
21948  echo "$as_me: failed program was:" >&5
21949cat "conftest.$ac_ext" >&5
21950cf_cv_PATH_TTYS=no
21951fi
21952rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21953fi
21954echo "$as_me:21954: result: $cf_cv_PATH_TTYS" >&5
21955echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21956
21957if test $cf_cv_PATH_TTYS = no
21958then
21959	for cf_ttys in /etc/ttytype /etc/ttys
21960	do
21961		if test -f $cf_ttys
21962		then
21963			cf_cv_PATH_TTYS=maybe
21964
21965cat >>confdefs.h <<\EOF
21966#define _PATH_TTYS $cf_ttys
21967EOF
21968
21969			break
21970		fi
21971	done
21972fi
21973
21974if test $cf_cv_PATH_TTYS != no
21975then
21976	echo "$as_me:21976: checking if _PATH_TTYS file exists" >&5
21977echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21978if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21979  echo $ECHO_N "(cached) $ECHO_C" >&6
21980else
21981
21982		if test "$cross_compiling" = yes; then
21983  cf_cv_have_PATH_TTYS=unknown
21984else
21985  cat >"conftest.$ac_ext" <<_ACEOF
21986#line 21986 "configure"
21987#include "confdefs.h"
21988
21989$ac_includes_default
21990#include <ttyent.h>
21991
21992int main(void) {
21993	FILE *fp = fopen(_PATH_TTYS, "r");
21994	${cf_cv_main_return:-return} (fp == NULL);
21995}
21996_ACEOF
21997rm -f "conftest$ac_exeext"
21998if { (eval echo "$as_me:21998: \"$ac_link\"") >&5
21999  (eval $ac_link) 2>&5
22000  ac_status=$?
22001  echo "$as_me:22001: \$? = $ac_status" >&5
22002  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22003  { (eval echo "$as_me:22003: \"$ac_try\"") >&5
22004  (eval $ac_try) 2>&5
22005  ac_status=$?
22006  echo "$as_me:22006: \$? = $ac_status" >&5
22007  (exit "$ac_status"); }; }; then
22008  cf_cv_have_PATH_TTYS=yes
22009else
22010  echo "$as_me: program exited with status $ac_status" >&5
22011echo "$as_me: failed program was:" >&5
22012cat "conftest.$ac_ext" >&5
22013cf_cv_have_PATH_TTYS=no
22014fi
22015rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22016fi
22017fi
22018echo "$as_me:22018: result: $cf_cv_have_PATH_TTYS" >&5
22019echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
22020	test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
22021fi
22022
22023if test $cf_cv_PATH_TTYS != no
22024then
22025
22026cat >>confdefs.h <<\EOF
22027#define HAVE_PATH_TTYS 1
22028EOF
22029
22030	echo "$as_me:22030: checking for getttynam" >&5
22031echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
22032if test "${cf_cv_func_getttynam+set}" = set; then
22033  echo $ECHO_N "(cached) $ECHO_C" >&6
22034else
22035
22036		cat >"conftest.$ac_ext" <<_ACEOF
22037#line 22037 "configure"
22038#include "confdefs.h"
22039#include <ttyent.h>
22040int
22041main (void)
22042{
22043struct ttyent *fp = getttynam("/dev/tty"); (void)fp
22044  ;
22045  return 0;
22046}
22047_ACEOF
22048rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22049if { (eval echo "$as_me:22049: \"$ac_link\"") >&5
22050  (eval $ac_link) 2>&5
22051  ac_status=$?
22052  echo "$as_me:22052: \$? = $ac_status" >&5
22053  (exit "$ac_status"); } &&
22054         { ac_try='test -s "conftest$ac_exeext"'
22055  { (eval echo "$as_me:22055: \"$ac_try\"") >&5
22056  (eval $ac_try) 2>&5
22057  ac_status=$?
22058  echo "$as_me:22058: \$? = $ac_status" >&5
22059  (exit "$ac_status"); }; }; then
22060  cf_cv_func_getttynam=yes
22061else
22062  echo "$as_me: failed program was:" >&5
22063cat "conftest.$ac_ext" >&5
22064cf_cv_func_getttynam=no
22065fi
22066rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22067fi
22068echo "$as_me:22068: result: $cf_cv_func_getttynam" >&5
22069echo "${ECHO_T}$cf_cv_func_getttynam" >&6
22070	test "$cf_cv_func_getttynam" = yes &&
22071cat >>confdefs.h <<\EOF
22072#define HAVE_GETTTYNAM 1
22073EOF
22074
22075fi
22076
22077if test "x$ac_cv_func_getopt" = xno && \
22078   test "x$cf_with_progs$cf_with_tests" != xnono; then
22079	{ { echo "$as_me:22079: error: getopt is required for building programs" >&5
22080echo "$as_me: error: getopt is required for building programs" >&2;}
22081   { (exit 1); exit 1; }; }
22082fi
22083
22084if test "x$with_safe_sprintf" = xyes
22085then
22086	if test "x$ac_cv_func_vsnprintf" = xyes
22087	then
22088		{ echo "$as_me:22088: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
22089echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
22090	else
22091
22092cat >>confdefs.h <<\EOF
22093#define USE_SAFE_SPRINTF 1
22094EOF
22095
22096	fi
22097fi
22098
22099if test "x$with_getcap" = "xyes" ; then
22100
22101echo "$as_me:22101: checking for terminal-capability database functions" >&5
22102echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
22103if test "${cf_cv_cgetent+set}" = set; then
22104  echo $ECHO_N "(cached) $ECHO_C" >&6
22105else
22106
22107cat >"conftest.$ac_ext" <<_ACEOF
22108#line 22108 "configure"
22109#include "confdefs.h"
22110
22111$ac_includes_default
22112int
22113main (void)
22114{
22115
22116	char temp[128];
22117	char *buf = temp;
22118	char *db_array = temp;
22119	cgetent(&buf, &db_array, "vt100");
22120	cgetcap(buf, "tc", '=');
22121	cgetmatch(buf, "tc");
22122
22123  ;
22124  return 0;
22125}
22126_ACEOF
22127rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22128if { (eval echo "$as_me:22128: \"$ac_link\"") >&5
22129  (eval $ac_link) 2>&5
22130  ac_status=$?
22131  echo "$as_me:22131: \$? = $ac_status" >&5
22132  (exit "$ac_status"); } &&
22133         { ac_try='test -s "conftest$ac_exeext"'
22134  { (eval echo "$as_me:22134: \"$ac_try\"") >&5
22135  (eval $ac_try) 2>&5
22136  ac_status=$?
22137  echo "$as_me:22137: \$? = $ac_status" >&5
22138  (exit "$ac_status"); }; }; then
22139  cf_cv_cgetent=yes
22140else
22141  echo "$as_me: failed program was:" >&5
22142cat "conftest.$ac_ext" >&5
22143cf_cv_cgetent=no
22144fi
22145rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22146
22147fi
22148echo "$as_me:22148: result: $cf_cv_cgetent" >&5
22149echo "${ECHO_T}$cf_cv_cgetent" >&6
22150
22151if test "$cf_cv_cgetent" = yes
22152then
22153
22154cat >>confdefs.h <<\EOF
22155#define HAVE_BSD_CGETENT 1
22156EOF
22157
22158echo "$as_me:22158: checking if cgetent uses const parameter" >&5
22159echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
22160if test "${cf_cv_cgetent_const+set}" = set; then
22161  echo $ECHO_N "(cached) $ECHO_C" >&6
22162else
22163
22164cat >"conftest.$ac_ext" <<_ACEOF
22165#line 22165 "configure"
22166#include "confdefs.h"
22167
22168#pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
22169$ac_includes_default
22170int
22171main (void)
22172{
22173
22174	char temp[128];
22175	char *buf = temp;
22176#ifndef _NETBSD_SOURCE			/* given, since April 2004 in stdlib.h */
22177	const char *db_array = temp;
22178	cgetent(&buf, &db_array, "vt100");
22179#endif
22180	cgetcap(buf, "tc", '=');
22181	cgetmatch(buf, "tc");
22182
22183  ;
22184  return 0;
22185}
22186_ACEOF
22187rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22188if { (eval echo "$as_me:22188: \"$ac_link\"") >&5
22189  (eval $ac_link) 2>&5
22190  ac_status=$?
22191  echo "$as_me:22191: \$? = $ac_status" >&5
22192  (exit "$ac_status"); } &&
22193         { ac_try='test -s "conftest$ac_exeext"'
22194  { (eval echo "$as_me:22194: \"$ac_try\"") >&5
22195  (eval $ac_try) 2>&5
22196  ac_status=$?
22197  echo "$as_me:22197: \$? = $ac_status" >&5
22198  (exit "$ac_status"); }; }; then
22199  cf_cv_cgetent_const=yes
22200else
22201  echo "$as_me: failed program was:" >&5
22202cat "conftest.$ac_ext" >&5
22203cf_cv_cgetent_const=no
22204fi
22205rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22206
22207fi
22208echo "$as_me:22208: result: $cf_cv_cgetent_const" >&5
22209echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22210	if test "$cf_cv_cgetent_const" = yes
22211	then
22212
22213cat >>confdefs.h <<EOF
22214#define CGETENT_CONST const
22215EOF
22216
22217	fi
22218fi
22219
22220fi
22221
22222echo "$as_me:22222: checking for isascii" >&5
22223echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22224if test "${cf_cv_have_isascii+set}" = set; then
22225  echo $ECHO_N "(cached) $ECHO_C" >&6
22226else
22227
22228	cat >"conftest.$ac_ext" <<_ACEOF
22229#line 22229 "configure"
22230#include "confdefs.h"
22231#include <ctype.h>
22232int
22233main (void)
22234{
22235int x = isascii(' '); (void)x
22236  ;
22237  return 0;
22238}
22239_ACEOF
22240rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22241if { (eval echo "$as_me:22241: \"$ac_link\"") >&5
22242  (eval $ac_link) 2>&5
22243  ac_status=$?
22244  echo "$as_me:22244: \$? = $ac_status" >&5
22245  (exit "$ac_status"); } &&
22246         { ac_try='test -s "conftest$ac_exeext"'
22247  { (eval echo "$as_me:22247: \"$ac_try\"") >&5
22248  (eval $ac_try) 2>&5
22249  ac_status=$?
22250  echo "$as_me:22250: \$? = $ac_status" >&5
22251  (exit "$ac_status"); }; }; then
22252  cf_cv_have_isascii=yes
22253else
22254  echo "$as_me: failed program was:" >&5
22255cat "conftest.$ac_ext" >&5
22256cf_cv_have_isascii=no
22257fi
22258rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22259
22260fi
22261echo "$as_me:22261: result: $cf_cv_have_isascii" >&5
22262echo "${ECHO_T}$cf_cv_have_isascii" >&6
22263test "$cf_cv_have_isascii" = yes &&
22264cat >>confdefs.h <<\EOF
22265#define HAVE_ISASCII 1
22266EOF
22267
22268if test "$ac_cv_func_sigaction" = yes; then
22269echo "$as_me:22269: checking whether sigaction needs _POSIX_SOURCE" >&5
22270echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22271cat >"conftest.$ac_ext" <<_ACEOF
22272#line 22272 "configure"
22273#include "confdefs.h"
22274
22275#include <sys/types.h>
22276#include <signal.h>
22277int
22278main (void)
22279{
22280struct sigaction act; (void)act
22281  ;
22282  return 0;
22283}
22284_ACEOF
22285rm -f "conftest.$ac_objext"
22286if { (eval echo "$as_me:22286: \"$ac_compile\"") >&5
22287  (eval $ac_compile) 2>&5
22288  ac_status=$?
22289  echo "$as_me:22289: \$? = $ac_status" >&5
22290  (exit "$ac_status"); } &&
22291         { ac_try='test -s "conftest.$ac_objext"'
22292  { (eval echo "$as_me:22292: \"$ac_try\"") >&5
22293  (eval $ac_try) 2>&5
22294  ac_status=$?
22295  echo "$as_me:22295: \$? = $ac_status" >&5
22296  (exit "$ac_status"); }; }; then
22297  sigact_bad=no
22298else
22299  echo "$as_me: failed program was:" >&5
22300cat "conftest.$ac_ext" >&5
22301
22302cat >"conftest.$ac_ext" <<_ACEOF
22303#line 22303 "configure"
22304#include "confdefs.h"
22305
22306#define _POSIX_SOURCE
22307#include <sys/types.h>
22308#include <signal.h>
22309int
22310main (void)
22311{
22312struct sigaction act; (void)act
22313  ;
22314  return 0;
22315}
22316_ACEOF
22317rm -f "conftest.$ac_objext"
22318if { (eval echo "$as_me:22318: \"$ac_compile\"") >&5
22319  (eval $ac_compile) 2>&5
22320  ac_status=$?
22321  echo "$as_me:22321: \$? = $ac_status" >&5
22322  (exit "$ac_status"); } &&
22323         { ac_try='test -s "conftest.$ac_objext"'
22324  { (eval echo "$as_me:22324: \"$ac_try\"") >&5
22325  (eval $ac_try) 2>&5
22326  ac_status=$?
22327  echo "$as_me:22327: \$? = $ac_status" >&5
22328  (exit "$ac_status"); }; }; then
22329  sigact_bad=yes
22330
22331cat >>confdefs.h <<\EOF
22332#define _POSIX_SOURCE 1
22333EOF
22334
22335else
22336  echo "$as_me: failed program was:" >&5
22337cat "conftest.$ac_ext" >&5
22338sigact_bad=unknown
22339fi
22340rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22341fi
22342rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22343echo "$as_me:22343: result: $sigact_bad" >&5
22344echo "${ECHO_T}$sigact_bad" >&6
22345fi
22346
22347echo "$as_me:22347: checking if nanosleep really works" >&5
22348echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22349if test "${cf_cv_func_nanosleep+set}" = set; then
22350  echo $ECHO_N "(cached) $ECHO_C" >&6
22351else
22352
22353if test "$cross_compiling" = yes; then
22354  cf_cv_func_nanosleep=unknown
22355else
22356  cat >"conftest.$ac_ext" <<_ACEOF
22357#line 22357 "configure"
22358#include "confdefs.h"
22359
22360$ac_includes_default
22361
22362#include <errno.h>
22363#include <time.h>
22364
22365#ifdef HAVE_SYS_TIME_H
22366#include <sys/time.h>
22367#endif
22368
22369int main(void) {
22370	struct timespec ts1, ts2;
22371	int code;
22372	ts1.tv_sec  = 0;
22373	ts1.tv_nsec = 750000000;
22374	ts2.tv_sec  = 0;
22375	ts2.tv_nsec = 0;
22376	errno = 0;
22377	code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22378	${cf_cv_main_return:-return}(code != 0);
22379}
22380
22381_ACEOF
22382rm -f "conftest$ac_exeext"
22383if { (eval echo "$as_me:22383: \"$ac_link\"") >&5
22384  (eval $ac_link) 2>&5
22385  ac_status=$?
22386  echo "$as_me:22386: \$? = $ac_status" >&5
22387  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22388  { (eval echo "$as_me:22388: \"$ac_try\"") >&5
22389  (eval $ac_try) 2>&5
22390  ac_status=$?
22391  echo "$as_me:22391: \$? = $ac_status" >&5
22392  (exit "$ac_status"); }; }; then
22393  cf_cv_func_nanosleep=yes
22394else
22395  echo "$as_me: program exited with status $ac_status" >&5
22396echo "$as_me: failed program was:" >&5
22397cat "conftest.$ac_ext" >&5
22398cf_cv_func_nanosleep=no
22399fi
22400rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22401fi
22402fi
22403echo "$as_me:22403: result: $cf_cv_func_nanosleep" >&5
22404echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22405
22406test "$cf_cv_func_nanosleep" = "yes" &&
22407cat >>confdefs.h <<\EOF
22408#define HAVE_NANOSLEEP 1
22409EOF
22410
22411for ac_header in sgtty.h \
22412termio.h \
22413termios.h \
22414unistd.h \
22415sys/ioctl.h \
22416sys/termio.h \
22417
22418do
22419as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22420echo "$as_me:22420: checking for $ac_header" >&5
22421echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22422if eval "test \"\${$as_ac_Header+set}\" = set"; then
22423  echo $ECHO_N "(cached) $ECHO_C" >&6
22424else
22425  cat >"conftest.$ac_ext" <<_ACEOF
22426#line 22426 "configure"
22427#include "confdefs.h"
22428#include <$ac_header>
22429_ACEOF
22430if { (eval echo "$as_me:22430: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22431  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22432  ac_status=$?
22433  $EGREP -v '^ *\+' conftest.er1 >conftest.err
22434  rm -f conftest.er1
22435  cat conftest.err >&5
22436  echo "$as_me:22436: \$? = $ac_status" >&5
22437  (exit "$ac_status"); } >/dev/null; then
22438  if test -s conftest.err; then
22439    ac_cpp_err=$ac_c_preproc_warn_flag
22440  else
22441    ac_cpp_err=
22442  fi
22443else
22444  ac_cpp_err=yes
22445fi
22446if test -z "$ac_cpp_err"; then
22447  eval "$as_ac_Header=yes"
22448else
22449  echo "$as_me: failed program was:" >&5
22450  cat "conftest.$ac_ext" >&5
22451  eval "$as_ac_Header=no"
22452fi
22453rm -f conftest.err "conftest.$ac_ext"
22454fi
22455echo "$as_me:22455: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22456echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22457if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22458  cat >>confdefs.h <<EOF
22459#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22460EOF
22461
22462fi
22463done
22464
22465if test "$ac_cv_header_termios_h" = yes ; then
22466	case "$CFLAGS $CPPFLAGS" in
22467	(*-D_POSIX_SOURCE*)
22468		termios_bad=dunno ;;
22469	(*)	termios_bad=maybe ;;
22470	esac
22471	if test "$termios_bad" = maybe ; then
22472	echo "$as_me:22472: checking whether termios.h needs _POSIX_SOURCE" >&5
22473echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22474	cat >"conftest.$ac_ext" <<_ACEOF
22475#line 22475 "configure"
22476#include "confdefs.h"
22477#include <termios.h>
22478int
22479main (void)
22480{
22481struct termios foo; int x = (int)(foo.c_iflag = 1); (void)x
22482  ;
22483  return 0;
22484}
22485_ACEOF
22486rm -f "conftest.$ac_objext"
22487if { (eval echo "$as_me:22487: \"$ac_compile\"") >&5
22488  (eval $ac_compile) 2>&5
22489  ac_status=$?
22490  echo "$as_me:22490: \$? = $ac_status" >&5
22491  (exit "$ac_status"); } &&
22492         { ac_try='test -s "conftest.$ac_objext"'
22493  { (eval echo "$as_me:22493: \"$ac_try\"") >&5
22494  (eval $ac_try) 2>&5
22495  ac_status=$?
22496  echo "$as_me:22496: \$? = $ac_status" >&5
22497  (exit "$ac_status"); }; }; then
22498  termios_bad=no
22499else
22500  echo "$as_me: failed program was:" >&5
22501cat "conftest.$ac_ext" >&5
22502
22503		cat >"conftest.$ac_ext" <<_ACEOF
22504#line 22504 "configure"
22505#include "confdefs.h"
22506
22507#define _POSIX_SOURCE
22508#include <termios.h>
22509int
22510main (void)
22511{
22512struct termios foo; int x = (int)(foo.c_iflag = 2); (void)x
22513  ;
22514  return 0;
22515}
22516_ACEOF
22517rm -f "conftest.$ac_objext"
22518if { (eval echo "$as_me:22518: \"$ac_compile\"") >&5
22519  (eval $ac_compile) 2>&5
22520  ac_status=$?
22521  echo "$as_me:22521: \$? = $ac_status" >&5
22522  (exit "$ac_status"); } &&
22523         { ac_try='test -s "conftest.$ac_objext"'
22524  { (eval echo "$as_me:22524: \"$ac_try\"") >&5
22525  (eval $ac_try) 2>&5
22526  ac_status=$?
22527  echo "$as_me:22527: \$? = $ac_status" >&5
22528  (exit "$ac_status"); }; }; then
22529  termios_bad=unknown
22530else
22531  echo "$as_me: failed program was:" >&5
22532cat "conftest.$ac_ext" >&5
22533termios_bad=yes
22534cat >>confdefs.h <<\EOF
22535#define _POSIX_SOURCE 1
22536EOF
22537
22538fi
22539rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22540
22541fi
22542rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22543	echo "$as_me:22543: result: $termios_bad" >&5
22544echo "${ECHO_T}$termios_bad" >&6
22545	fi
22546fi
22547
22548echo "$as_me:22548: checking for tcgetattr" >&5
22549echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22550if test "${cf_cv_have_tcgetattr+set}" = set; then
22551  echo $ECHO_N "(cached) $ECHO_C" >&6
22552else
22553
22554cat >"conftest.$ac_ext" <<_ACEOF
22555#line 22555 "configure"
22556#include "confdefs.h"
22557
22558#include <sys/types.h>
22559#ifdef HAVE_UNISTD_H
22560#include <unistd.h>
22561#endif
22562#ifdef HAVE_TERMIOS_H
22563#include <termios.h>
22564#define TTY struct termios
22565#else
22566#ifdef HAVE_TERMIO_H
22567#include <termio.h>
22568#define TTY struct termio
22569#endif
22570#endif
22571
22572int
22573main (void)
22574{
22575
22576TTY foo;
22577tcgetattr(1, &foo);
22578  ;
22579  return 0;
22580}
22581_ACEOF
22582rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22583if { (eval echo "$as_me:22583: \"$ac_link\"") >&5
22584  (eval $ac_link) 2>&5
22585  ac_status=$?
22586  echo "$as_me:22586: \$? = $ac_status" >&5
22587  (exit "$ac_status"); } &&
22588         { ac_try='test -s "conftest$ac_exeext"'
22589  { (eval echo "$as_me:22589: \"$ac_try\"") >&5
22590  (eval $ac_try) 2>&5
22591  ac_status=$?
22592  echo "$as_me:22592: \$? = $ac_status" >&5
22593  (exit "$ac_status"); }; }; then
22594  cf_cv_have_tcgetattr=yes
22595else
22596  echo "$as_me: failed program was:" >&5
22597cat "conftest.$ac_ext" >&5
22598cf_cv_have_tcgetattr=no
22599fi
22600rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22601fi
22602echo "$as_me:22602: result: $cf_cv_have_tcgetattr" >&5
22603echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22604test "$cf_cv_have_tcgetattr" = yes &&
22605cat >>confdefs.h <<\EOF
22606#define HAVE_TCGETATTR 1
22607EOF
22608
22609echo "$as_me:22609: checking for vsscanf function or workaround" >&5
22610echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22611if test "${cf_cv_func_vsscanf+set}" = set; then
22612  echo $ECHO_N "(cached) $ECHO_C" >&6
22613else
22614
22615cat >"conftest.$ac_ext" <<_ACEOF
22616#line 22616 "configure"
22617#include "confdefs.h"
22618
22619#include <stdarg.h>
22620#include <stdio.h>
22621
22622static void
22623myfunc(const char *str, const char *fmt, ...)
22624{
22625	va_list ap;
22626	va_start(ap, fmt);
22627	vsscanf(str, fmt, ap);
22628	va_end(ap);
22629}
22630
22631int
22632main (void)
22633{
22634
22635	myfunc("55", "%d");
22636
22637  ;
22638  return 0;
22639}
22640_ACEOF
22641rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22642if { (eval echo "$as_me:22642: \"$ac_link\"") >&5
22643  (eval $ac_link) 2>&5
22644  ac_status=$?
22645  echo "$as_me:22645: \$? = $ac_status" >&5
22646  (exit "$ac_status"); } &&
22647         { ac_try='test -s "conftest$ac_exeext"'
22648  { (eval echo "$as_me:22648: \"$ac_try\"") >&5
22649  (eval $ac_try) 2>&5
22650  ac_status=$?
22651  echo "$as_me:22651: \$? = $ac_status" >&5
22652  (exit "$ac_status"); }; }; then
22653  cf_cv_func_vsscanf=vsscanf
22654else
22655  echo "$as_me: failed program was:" >&5
22656cat "conftest.$ac_ext" >&5
22657
22658cat >"conftest.$ac_ext" <<_ACEOF
22659#line 22659 "configure"
22660#include "confdefs.h"
22661
22662#include <stdarg.h>
22663#include <stdio.h>
22664int
22665main (void)
22666{
22667
22668	FILE strbuf;
22669	char *str = "from";
22670
22671	strbuf._flag = _IOREAD;
22672	strbuf._ptr = strbuf._base = (unsigned char *) str;
22673	strbuf._cnt = strlen(str);
22674	strbuf._file = _NFILE;
22675	return (vfscanf(&strbuf, "%d", ap))
22676  ;
22677  return 0;
22678}
22679_ACEOF
22680rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22681if { (eval echo "$as_me:22681: \"$ac_link\"") >&5
22682  (eval $ac_link) 2>&5
22683  ac_status=$?
22684  echo "$as_me:22684: \$? = $ac_status" >&5
22685  (exit "$ac_status"); } &&
22686         { ac_try='test -s "conftest$ac_exeext"'
22687  { (eval echo "$as_me:22687: \"$ac_try\"") >&5
22688  (eval $ac_try) 2>&5
22689  ac_status=$?
22690  echo "$as_me:22690: \$? = $ac_status" >&5
22691  (exit "$ac_status"); }; }; then
22692  cf_cv_func_vsscanf=vfscanf
22693else
22694  echo "$as_me: failed program was:" >&5
22695cat "conftest.$ac_ext" >&5
22696
22697cat >"conftest.$ac_ext" <<_ACEOF
22698#line 22698 "configure"
22699#include "confdefs.h"
22700
22701#include <stdarg.h>
22702#include <stdio.h>
22703int
22704main (void)
22705{
22706
22707	FILE strbuf;
22708	char *str = "from";
22709
22710	strbuf._flag = _IOREAD;
22711	strbuf._ptr = strbuf._base = (unsigned char *) str;
22712	strbuf._cnt = strlen(str);
22713	strbuf._file = _NFILE;
22714	return (_doscan(&strbuf, "%d", ap))
22715  ;
22716  return 0;
22717}
22718_ACEOF
22719rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22720if { (eval echo "$as_me:22720: \"$ac_link\"") >&5
22721  (eval $ac_link) 2>&5
22722  ac_status=$?
22723  echo "$as_me:22723: \$? = $ac_status" >&5
22724  (exit "$ac_status"); } &&
22725         { ac_try='test -s "conftest$ac_exeext"'
22726  { (eval echo "$as_me:22726: \"$ac_try\"") >&5
22727  (eval $ac_try) 2>&5
22728  ac_status=$?
22729  echo "$as_me:22729: \$? = $ac_status" >&5
22730  (exit "$ac_status"); }; }; then
22731  cf_cv_func_vsscanf=_doscan
22732else
22733  echo "$as_me: failed program was:" >&5
22734cat "conftest.$ac_ext" >&5
22735
22736cf_cv_func_vsscanf=no
22737fi
22738rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22739fi
22740rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22741fi
22742rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22743fi
22744echo "$as_me:22744: result: $cf_cv_func_vsscanf" >&5
22745echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22746
22747case "$cf_cv_func_vsscanf" in
22748(vsscanf)
22749cat >>confdefs.h <<\EOF
22750#define HAVE_VSSCANF 1
22751EOF
22752;;
22753(vfscanf)
22754cat >>confdefs.h <<\EOF
22755#define HAVE_VFSCANF 1
22756EOF
22757;;
22758(_doscan)
22759cat >>confdefs.h <<\EOF
22760#define HAVE__DOSCAN 1
22761EOF
22762;;
22763esac
22764
22765for ac_header in \
22766unistd.h \
22767
22768do
22769as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22770echo "$as_me:22770: checking for $ac_header" >&5
22771echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22772if eval "test \"\${$as_ac_Header+set}\" = set"; then
22773  echo $ECHO_N "(cached) $ECHO_C" >&6
22774else
22775  cat >"conftest.$ac_ext" <<_ACEOF
22776#line 22776 "configure"
22777#include "confdefs.h"
22778#include <$ac_header>
22779_ACEOF
22780if { (eval echo "$as_me:22780: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22781  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22782  ac_status=$?
22783  $EGREP -v '^ *\+' conftest.er1 >conftest.err
22784  rm -f conftest.er1
22785  cat conftest.err >&5
22786  echo "$as_me:22786: \$? = $ac_status" >&5
22787  (exit "$ac_status"); } >/dev/null; then
22788  if test -s conftest.err; then
22789    ac_cpp_err=$ac_c_preproc_warn_flag
22790  else
22791    ac_cpp_err=
22792  fi
22793else
22794  ac_cpp_err=yes
22795fi
22796if test -z "$ac_cpp_err"; then
22797  eval "$as_ac_Header=yes"
22798else
22799  echo "$as_me: failed program was:" >&5
22800  cat "conftest.$ac_ext" >&5
22801  eval "$as_ac_Header=no"
22802fi
22803rm -f conftest.err "conftest.$ac_ext"
22804fi
22805echo "$as_me:22805: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22806echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22807if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22808  cat >>confdefs.h <<EOF
22809#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22810EOF
22811
22812fi
22813done
22814
22815echo "$as_me:22815: checking for working mkstemp" >&5
22816echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22817if test "${cf_cv_func_mkstemp+set}" = set; then
22818  echo $ECHO_N "(cached) $ECHO_C" >&6
22819else
22820
22821rm -rf ./conftest*
22822if test "$cross_compiling" = yes; then
22823  cf_cv_func_mkstemp=maybe
22824else
22825  cat >"conftest.$ac_ext" <<_ACEOF
22826#line 22826 "configure"
22827#include "confdefs.h"
22828
22829$ac_includes_default
22830
22831int main(void)
22832{
22833	static char tmpl[] = "conftestXXXXXX";
22834	char name[2][80];
22835	int n;
22836	int result = 0;
22837	int fd;
22838	struct stat sb;
22839
22840	umask(077);
22841	for (n = 0; n < 2; ++n) {
22842		strcpy(name[n], tmpl);
22843		if ((fd = mkstemp(name[n])) >= 0) {
22844			if (!strcmp(name[n], tmpl)
22845			 || stat(name[n], &sb) != 0
22846			 || (sb.st_mode & S_IFMT) != S_IFREG
22847			 || (sb.st_mode & 077) != 0) {
22848				result = 1;
22849			}
22850			close(fd);
22851		}
22852	}
22853	if (result == 0
22854	 && !strcmp(name[0], name[1]))
22855		result = 1;
22856	${cf_cv_main_return:-return}(result);
22857}
22858
22859_ACEOF
22860rm -f "conftest$ac_exeext"
22861if { (eval echo "$as_me:22861: \"$ac_link\"") >&5
22862  (eval $ac_link) 2>&5
22863  ac_status=$?
22864  echo "$as_me:22864: \$? = $ac_status" >&5
22865  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22866  { (eval echo "$as_me:22866: \"$ac_try\"") >&5
22867  (eval $ac_try) 2>&5
22868  ac_status=$?
22869  echo "$as_me:22869: \$? = $ac_status" >&5
22870  (exit "$ac_status"); }; }; then
22871  cf_cv_func_mkstemp=yes
22872
22873else
22874  echo "$as_me: program exited with status $ac_status" >&5
22875echo "$as_me: failed program was:" >&5
22876cat "conftest.$ac_ext" >&5
22877cf_cv_func_mkstemp=no
22878
22879fi
22880rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22881fi
22882
22883fi
22884echo "$as_me:22884: result: $cf_cv_func_mkstemp" >&5
22885echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22886if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22887	echo "$as_me:22887: checking for mkstemp" >&5
22888echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22889if test "${ac_cv_func_mkstemp+set}" = set; then
22890  echo $ECHO_N "(cached) $ECHO_C" >&6
22891else
22892  cat >"conftest.$ac_ext" <<_ACEOF
22893#line 22893 "configure"
22894#include "confdefs.h"
22895#define mkstemp autoconf_temporary
22896#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
22897#undef mkstemp
22898
22899#ifdef __cplusplus
22900extern "C"
22901#endif
22902
22903/* We use char because int might match the return type of a gcc2
22904   builtin and then its argument prototype would still apply.  */
22905char mkstemp (void);
22906
22907int
22908main (void)
22909{
22910
22911/* The GNU C library defines stubs for functions which it implements
22912    to always fail with ENOSYS.  Some functions are actually named
22913    something starting with __ and the normal name is an alias.  */
22914#if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22915#error found stub for mkstemp
22916#endif
22917
22918	return mkstemp ();
22919  ;
22920  return 0;
22921}
22922_ACEOF
22923rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22924if { (eval echo "$as_me:22924: \"$ac_link\"") >&5
22925  (eval $ac_link) 2>&5
22926  ac_status=$?
22927  echo "$as_me:22927: \$? = $ac_status" >&5
22928  (exit "$ac_status"); } &&
22929         { ac_try='test -s "conftest$ac_exeext"'
22930  { (eval echo "$as_me:22930: \"$ac_try\"") >&5
22931  (eval $ac_try) 2>&5
22932  ac_status=$?
22933  echo "$as_me:22933: \$? = $ac_status" >&5
22934  (exit "$ac_status"); }; }; then
22935  ac_cv_func_mkstemp=yes
22936else
22937  echo "$as_me: failed program was:" >&5
22938cat "conftest.$ac_ext" >&5
22939ac_cv_func_mkstemp=no
22940fi
22941rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22942fi
22943echo "$as_me:22943: result: $ac_cv_func_mkstemp" >&5
22944echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22945
22946fi
22947if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22948
22949cat >>confdefs.h <<\EOF
22950#define HAVE_MKSTEMP 1
22951EOF
22952
22953fi
22954
22955# setup for prototype of fallback for vsscanf()
22956
22957if test "$cf_cv_func_vsscanf" = vsscanf ; then
22958	HAVE_VSSCANF=1
22959else
22960	HAVE_VSSCANF=0
22961fi
22962
22963if test "x$cross_compiling" = xyes ; then
22964	{ echo "$as_me:22964: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22965echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22966else
22967	echo "$as_me:22967: checking whether setvbuf arguments are reversed" >&5
22968echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22969if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22970  echo $ECHO_N "(cached) $ECHO_C" >&6
22971else
22972  if test "$cross_compiling" = yes; then
22973  { { echo "$as_me:22973: error: cannot run test program while cross compiling" >&5
22974echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22975   { (exit 1); exit 1; }; }
22976else
22977  cat >"conftest.$ac_ext" <<_ACEOF
22978#line 22978 "configure"
22979#include "confdefs.h"
22980#include <stdio.h>
22981/* If setvbuf has the reversed format, exit 0. */
22982int
22983main (void)
22984{
22985  /* This call has the arguments reversed.
22986     A reversed system may check and see that the address of main
22987     is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22988  if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22989    $ac_main_return(1);
22990  putc('\r', stdout);
22991  $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22992}
22993_ACEOF
22994rm -f "conftest$ac_exeext"
22995if { (eval echo "$as_me:22995: \"$ac_link\"") >&5
22996  (eval $ac_link) 2>&5
22997  ac_status=$?
22998  echo "$as_me:22998: \$? = $ac_status" >&5
22999  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23000  { (eval echo "$as_me:23000: \"$ac_try\"") >&5
23001  (eval $ac_try) 2>&5
23002  ac_status=$?
23003  echo "$as_me:23003: \$? = $ac_status" >&5
23004  (exit "$ac_status"); }; }; then
23005  ac_cv_func_setvbuf_reversed=yes
23006else
23007  echo "$as_me: program exited with status $ac_status" >&5
23008echo "$as_me: failed program was:" >&5
23009cat "conftest.$ac_ext" >&5
23010ac_cv_func_setvbuf_reversed=no
23011fi
23012rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23013fi
23014rm -f core ./core.* ./*.core
23015fi
23016echo "$as_me:23016: result: $ac_cv_func_setvbuf_reversed" >&5
23017echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
23018if test $ac_cv_func_setvbuf_reversed = yes; then
23019
23020cat >>confdefs.h <<\EOF
23021#define SETVBUF_REVERSED 1
23022EOF
23023
23024fi
23025
23026fi
23027echo "$as_me:23027: checking for intptr_t" >&5
23028echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
23029if test "${ac_cv_type_intptr_t+set}" = set; then
23030  echo $ECHO_N "(cached) $ECHO_C" >&6
23031else
23032  cat >"conftest.$ac_ext" <<_ACEOF
23033#line 23033 "configure"
23034#include "confdefs.h"
23035$ac_includes_default
23036int
23037main (void)
23038{
23039if ((intptr_t *) 0)
23040  return 0;
23041if (sizeof (intptr_t))
23042  return 0;
23043  ;
23044  return 0;
23045}
23046_ACEOF
23047rm -f "conftest.$ac_objext"
23048if { (eval echo "$as_me:23048: \"$ac_compile\"") >&5
23049  (eval $ac_compile) 2>&5
23050  ac_status=$?
23051  echo "$as_me:23051: \$? = $ac_status" >&5
23052  (exit "$ac_status"); } &&
23053         { ac_try='test -s "conftest.$ac_objext"'
23054  { (eval echo "$as_me:23054: \"$ac_try\"") >&5
23055  (eval $ac_try) 2>&5
23056  ac_status=$?
23057  echo "$as_me:23057: \$? = $ac_status" >&5
23058  (exit "$ac_status"); }; }; then
23059  ac_cv_type_intptr_t=yes
23060else
23061  echo "$as_me: failed program was:" >&5
23062cat "conftest.$ac_ext" >&5
23063ac_cv_type_intptr_t=no
23064fi
23065rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23066fi
23067echo "$as_me:23067: result: $ac_cv_type_intptr_t" >&5
23068echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
23069if test "$ac_cv_type_intptr_t" = yes; then
23070  :
23071else
23072
23073cat >>confdefs.h <<EOF
23074#define intptr_t long
23075EOF
23076
23077fi
23078
23079echo "$as_me:23079: checking for ssize_t" >&5
23080echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
23081if test "${ac_cv_type_ssize_t+set}" = set; then
23082  echo $ECHO_N "(cached) $ECHO_C" >&6
23083else
23084  cat >"conftest.$ac_ext" <<_ACEOF
23085#line 23085 "configure"
23086#include "confdefs.h"
23087$ac_includes_default
23088int
23089main (void)
23090{
23091if ((ssize_t *) 0)
23092  return 0;
23093if (sizeof (ssize_t))
23094  return 0;
23095  ;
23096  return 0;
23097}
23098_ACEOF
23099rm -f "conftest.$ac_objext"
23100if { (eval echo "$as_me:23100: \"$ac_compile\"") >&5
23101  (eval $ac_compile) 2>&5
23102  ac_status=$?
23103  echo "$as_me:23103: \$? = $ac_status" >&5
23104  (exit "$ac_status"); } &&
23105         { ac_try='test -s "conftest.$ac_objext"'
23106  { (eval echo "$as_me:23106: \"$ac_try\"") >&5
23107  (eval $ac_try) 2>&5
23108  ac_status=$?
23109  echo "$as_me:23109: \$? = $ac_status" >&5
23110  (exit "$ac_status"); }; }; then
23111  ac_cv_type_ssize_t=yes
23112else
23113  echo "$as_me: failed program was:" >&5
23114cat "conftest.$ac_ext" >&5
23115ac_cv_type_ssize_t=no
23116fi
23117rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23118fi
23119echo "$as_me:23119: result: $ac_cv_type_ssize_t" >&5
23120echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
23121if test "$ac_cv_type_ssize_t" = yes; then
23122  :
23123else
23124
23125cat >>confdefs.h <<EOF
23126#define ssize_t int
23127EOF
23128
23129fi
23130
23131echo "$as_me:23131: checking for type sigaction_t" >&5
23132echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
23133if test "${cf_cv_type_sigaction+set}" = set; then
23134  echo $ECHO_N "(cached) $ECHO_C" >&6
23135else
23136
23137	cat >"conftest.$ac_ext" <<_ACEOF
23138#line 23138 "configure"
23139#include "confdefs.h"
23140
23141#include <signal.h>
23142int
23143main (void)
23144{
23145sigaction_t x; (void)x
23146  ;
23147  return 0;
23148}
23149_ACEOF
23150rm -f "conftest.$ac_objext"
23151if { (eval echo "$as_me:23151: \"$ac_compile\"") >&5
23152  (eval $ac_compile) 2>&5
23153  ac_status=$?
23154  echo "$as_me:23154: \$? = $ac_status" >&5
23155  (exit "$ac_status"); } &&
23156         { ac_try='test -s "conftest.$ac_objext"'
23157  { (eval echo "$as_me:23157: \"$ac_try\"") >&5
23158  (eval $ac_try) 2>&5
23159  ac_status=$?
23160  echo "$as_me:23160: \$? = $ac_status" >&5
23161  (exit "$ac_status"); }; }; then
23162  cf_cv_type_sigaction=yes
23163else
23164  echo "$as_me: failed program was:" >&5
23165cat "conftest.$ac_ext" >&5
23166cf_cv_type_sigaction=no
23167fi
23168rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23169fi
23170
23171echo "$as_me:23171: result: $cf_cv_type_sigaction" >&5
23172echo "${ECHO_T}$cf_cv_type_sigaction" >&6
23173test "$cf_cv_type_sigaction" = yes &&
23174cat >>confdefs.h <<\EOF
23175#define HAVE_TYPE_SIGACTION 1
23176EOF
23177
23178echo "$as_me:23178: checking declaration of size-change" >&5
23179echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
23180if test "${cf_cv_sizechange+set}" = set; then
23181  echo $ECHO_N "(cached) $ECHO_C" >&6
23182else
23183
23184	cf_cv_sizechange=unknown
23185	cf_save_CPPFLAGS="$CPPFLAGS"
23186
23187for cf_opts in "" "NEED_PTEM_H"
23188do
23189
23190	CPPFLAGS="$cf_save_CPPFLAGS"
23191	if test -n "$cf_opts"
23192	then
23193
23194	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23195	CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23196
23197	fi
23198	cat >"conftest.$ac_ext" <<_ACEOF
23199#line 23199 "configure"
23200#include "confdefs.h"
23201#include <sys/types.h>
23202#ifdef HAVE_TERMIOS_H
23203#include <termios.h>
23204#else
23205#ifdef HAVE_TERMIO_H
23206#include <termio.h>
23207#endif
23208#endif
23209
23210#ifdef NEED_PTEM_H
23211/* This is a workaround for SCO:  they neglected to define struct winsize in
23212 * termios.h -- it is only in termio.h and ptem.h
23213 */
23214#include <sys/stream.h>
23215#include <sys/ptem.h>
23216#endif
23217
23218#ifdef HAVE_SYS_IOCTL_H
23219#include <sys/ioctl.h>
23220#endif
23221
23222int
23223main (void)
23224{
23225
23226#ifdef TIOCGSIZE
23227	struct ttysize win;	/* SunOS 3.0... */
23228	int y = win.ts_lines = 2;
23229	int x = win.ts_cols = 1;
23230	(void)y;
23231	(void)x;
23232#else
23233#ifdef TIOCGWINSZ
23234	struct winsize win;	/* everything else */
23235	int y = win.ws_row = 2;
23236	int x = win.ws_col = 1;
23237	(void)y;
23238	(void)x;
23239#else
23240	no TIOCGSIZE or TIOCGWINSZ
23241#endif /* TIOCGWINSZ */
23242#endif /* TIOCGSIZE */
23243
23244  ;
23245  return 0;
23246}
23247_ACEOF
23248rm -f "conftest.$ac_objext"
23249if { (eval echo "$as_me:23249: \"$ac_compile\"") >&5
23250  (eval $ac_compile) 2>&5
23251  ac_status=$?
23252  echo "$as_me:23252: \$? = $ac_status" >&5
23253  (exit "$ac_status"); } &&
23254         { ac_try='test -s "conftest.$ac_objext"'
23255  { (eval echo "$as_me:23255: \"$ac_try\"") >&5
23256  (eval $ac_try) 2>&5
23257  ac_status=$?
23258  echo "$as_me:23258: \$? = $ac_status" >&5
23259  (exit "$ac_status"); }; }; then
23260  cf_cv_sizechange=yes
23261else
23262  echo "$as_me: failed program was:" >&5
23263cat "conftest.$ac_ext" >&5
23264cf_cv_sizechange=no
23265fi
23266rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23267
23268	CPPFLAGS="$cf_save_CPPFLAGS"
23269	if test "$cf_cv_sizechange" = yes ; then
23270		echo "size-change succeeded ($cf_opts)" >&5
23271		test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23272		break
23273	fi
23274done
23275
23276fi
23277echo "$as_me:23277: result: $cf_cv_sizechange" >&5
23278echo "${ECHO_T}$cf_cv_sizechange" >&6
23279if test "$cf_cv_sizechange" != no ; then
23280
23281cat >>confdefs.h <<\EOF
23282#define HAVE_SIZECHANGE 1
23283EOF
23284
23285	case "$cf_cv_sizechange" in
23286	(NEED*)
23287		cat >>confdefs.h <<EOF
23288#define $cf_cv_sizechange  1
23289EOF
23290
23291		;;
23292	esac
23293fi
23294
23295echo "$as_me:23295: checking for memmove" >&5
23296echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23297if test "${ac_cv_func_memmove+set}" = set; then
23298  echo $ECHO_N "(cached) $ECHO_C" >&6
23299else
23300  cat >"conftest.$ac_ext" <<_ACEOF
23301#line 23301 "configure"
23302#include "confdefs.h"
23303#define memmove autoconf_temporary
23304#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
23305#undef memmove
23306
23307#ifdef __cplusplus
23308extern "C"
23309#endif
23310
23311/* We use char because int might match the return type of a gcc2
23312   builtin and then its argument prototype would still apply.  */
23313char memmove (void);
23314
23315int
23316main (void)
23317{
23318
23319/* The GNU C library defines stubs for functions which it implements
23320    to always fail with ENOSYS.  Some functions are actually named
23321    something starting with __ and the normal name is an alias.  */
23322#if defined (__stub_memmove) || defined (__stub___memmove)
23323#error found stub for memmove
23324#endif
23325
23326	return memmove ();
23327  ;
23328  return 0;
23329}
23330_ACEOF
23331rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23332if { (eval echo "$as_me:23332: \"$ac_link\"") >&5
23333  (eval $ac_link) 2>&5
23334  ac_status=$?
23335  echo "$as_me:23335: \$? = $ac_status" >&5
23336  (exit "$ac_status"); } &&
23337         { ac_try='test -s "conftest$ac_exeext"'
23338  { (eval echo "$as_me:23338: \"$ac_try\"") >&5
23339  (eval $ac_try) 2>&5
23340  ac_status=$?
23341  echo "$as_me:23341: \$? = $ac_status" >&5
23342  (exit "$ac_status"); }; }; then
23343  ac_cv_func_memmove=yes
23344else
23345  echo "$as_me: failed program was:" >&5
23346cat "conftest.$ac_ext" >&5
23347ac_cv_func_memmove=no
23348fi
23349rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23350fi
23351echo "$as_me:23351: result: $ac_cv_func_memmove" >&5
23352echo "${ECHO_T}$ac_cv_func_memmove" >&6
23353if test "$ac_cv_func_memmove" = yes; then
23354  :
23355else
23356
23357echo "$as_me:23357: checking for bcopy" >&5
23358echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23359if test "${ac_cv_func_bcopy+set}" = set; then
23360  echo $ECHO_N "(cached) $ECHO_C" >&6
23361else
23362  cat >"conftest.$ac_ext" <<_ACEOF
23363#line 23363 "configure"
23364#include "confdefs.h"
23365#define bcopy autoconf_temporary
23366#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
23367#undef bcopy
23368
23369#ifdef __cplusplus
23370extern "C"
23371#endif
23372
23373/* We use char because int might match the return type of a gcc2
23374   builtin and then its argument prototype would still apply.  */
23375char bcopy (void);
23376
23377int
23378main (void)
23379{
23380
23381/* The GNU C library defines stubs for functions which it implements
23382    to always fail with ENOSYS.  Some functions are actually named
23383    something starting with __ and the normal name is an alias.  */
23384#if defined (__stub_bcopy) || defined (__stub___bcopy)
23385#error found stub for bcopy
23386#endif
23387
23388	return bcopy ();
23389  ;
23390  return 0;
23391}
23392_ACEOF
23393rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23394if { (eval echo "$as_me:23394: \"$ac_link\"") >&5
23395  (eval $ac_link) 2>&5
23396  ac_status=$?
23397  echo "$as_me:23397: \$? = $ac_status" >&5
23398  (exit "$ac_status"); } &&
23399         { ac_try='test -s "conftest$ac_exeext"'
23400  { (eval echo "$as_me:23400: \"$ac_try\"") >&5
23401  (eval $ac_try) 2>&5
23402  ac_status=$?
23403  echo "$as_me:23403: \$? = $ac_status" >&5
23404  (exit "$ac_status"); }; }; then
23405  ac_cv_func_bcopy=yes
23406else
23407  echo "$as_me: failed program was:" >&5
23408cat "conftest.$ac_ext" >&5
23409ac_cv_func_bcopy=no
23410fi
23411rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23412fi
23413echo "$as_me:23413: result: $ac_cv_func_bcopy" >&5
23414echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23415if test "$ac_cv_func_bcopy" = yes; then
23416
23417	echo "$as_me:23417: checking if bcopy does overlapping moves" >&5
23418echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23419if test "${cf_cv_good_bcopy+set}" = set; then
23420  echo $ECHO_N "(cached) $ECHO_C" >&6
23421else
23422
23423		if test "$cross_compiling" = yes; then
23424  cf_cv_good_bcopy=unknown
23425else
23426  cat >"conftest.$ac_ext" <<_ACEOF
23427#line 23427 "configure"
23428#include "confdefs.h"
23429
23430$ac_includes_default
23431
23432int main(void) {
23433	static char data[] = "abcdefghijklmnopqrstuwwxyz";
23434	char temp[40];
23435	bcopy(data, temp, sizeof(data));
23436	bcopy(temp+10, temp, 15);
23437	bcopy(temp+5, temp+15, 10);
23438	${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23439}
23440
23441_ACEOF
23442rm -f "conftest$ac_exeext"
23443if { (eval echo "$as_me:23443: \"$ac_link\"") >&5
23444  (eval $ac_link) 2>&5
23445  ac_status=$?
23446  echo "$as_me:23446: \$? = $ac_status" >&5
23447  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23448  { (eval echo "$as_me:23448: \"$ac_try\"") >&5
23449  (eval $ac_try) 2>&5
23450  ac_status=$?
23451  echo "$as_me:23451: \$? = $ac_status" >&5
23452  (exit "$ac_status"); }; }; then
23453  cf_cv_good_bcopy=yes
23454else
23455  echo "$as_me: program exited with status $ac_status" >&5
23456echo "$as_me: failed program was:" >&5
23457cat "conftest.$ac_ext" >&5
23458cf_cv_good_bcopy=no
23459fi
23460rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23461fi
23462
23463fi
23464echo "$as_me:23464: result: $cf_cv_good_bcopy" >&5
23465echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23466
23467else
23468  cf_cv_good_bcopy=no
23469fi
23470
23471	if test "$cf_cv_good_bcopy" = yes ; then
23472
23473cat >>confdefs.h <<\EOF
23474#define USE_OK_BCOPY 1
23475EOF
23476
23477	else
23478
23479cat >>confdefs.h <<\EOF
23480#define USE_MY_MEMMOVE 1
23481EOF
23482
23483	fi
23484
23485fi
23486
23487tty >/dev/null 2>&1 || {
23488for ac_func in posix_openpt
23489do
23490as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23491echo "$as_me:23491: checking for $ac_func" >&5
23492echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23493if eval "test \"\${$as_ac_var+set}\" = set"; then
23494  echo $ECHO_N "(cached) $ECHO_C" >&6
23495else
23496  cat >"conftest.$ac_ext" <<_ACEOF
23497#line 23497 "configure"
23498#include "confdefs.h"
23499#define $ac_func autoconf_temporary
23500#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
23501#undef $ac_func
23502
23503#ifdef __cplusplus
23504extern "C"
23505#endif
23506
23507/* We use char because int might match the return type of a gcc2
23508   builtin and then its argument prototype would still apply.  */
23509char $ac_func (void);
23510
23511int
23512main (void)
23513{
23514
23515/* The GNU C library defines stubs for functions which it implements
23516    to always fail with ENOSYS.  Some functions are actually named
23517    something starting with __ and the normal name is an alias.  */
23518#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23519#error found stub for $ac_func
23520#endif
23521
23522	return $ac_func ();
23523  ;
23524  return 0;
23525}
23526_ACEOF
23527rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23528if { (eval echo "$as_me:23528: \"$ac_link\"") >&5
23529  (eval $ac_link) 2>&5
23530  ac_status=$?
23531  echo "$as_me:23531: \$? = $ac_status" >&5
23532  (exit "$ac_status"); } &&
23533         { ac_try='test -s "conftest$ac_exeext"'
23534  { (eval echo "$as_me:23534: \"$ac_try\"") >&5
23535  (eval $ac_try) 2>&5
23536  ac_status=$?
23537  echo "$as_me:23537: \$? = $ac_status" >&5
23538  (exit "$ac_status"); }; }; then
23539  eval "$as_ac_var=yes"
23540else
23541  echo "$as_me: failed program was:" >&5
23542cat "conftest.$ac_ext" >&5
23543eval "$as_ac_var=no"
23544fi
23545rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23546fi
23547echo "$as_me:23547: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23548echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23549if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23550  cat >>confdefs.h <<EOF
23551#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23552EOF
23553
23554fi
23555done
23556 }
23557echo "$as_me:23557: checking if poll really works" >&5
23558echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23559if test "${cf_cv_working_poll+set}" = set; then
23560  echo $ECHO_N "(cached) $ECHO_C" >&6
23561else
23562
23563if test "$cross_compiling" = yes; then
23564  cf_cv_working_poll=unknown
23565else
23566  cat >"conftest.$ac_ext" <<_ACEOF
23567#line 23567 "configure"
23568#include "confdefs.h"
23569
23570$ac_includes_default
23571
23572#include <fcntl.h>
23573
23574#ifdef HAVE_POLL_H
23575#include <poll.h>
23576#else
23577#include <sys/poll.h>
23578#endif
23579
23580int main(void) {
23581	struct pollfd myfds;
23582	int ret;
23583
23584	/* check for Darwin bug with respect to "devices" */
23585	myfds.fd = open("/dev/null", 1);	/* O_WRONLY */
23586	if (myfds.fd < 0)
23587		myfds.fd = 0;
23588	myfds.events = POLLIN;
23589	myfds.revents = 0;
23590
23591	ret = poll(&myfds, 1, 100);
23592
23593	if (ret < 0 || (myfds.revents & POLLNVAL)) {
23594		ret = -1;
23595	} else {
23596		int fd = 0;
23597		if (!isatty(fd)) {
23598			fd = open("/dev/tty", 2);	/* O_RDWR */
23599		}
23600#ifdef HAVE_POSIX_OPENPT
23601		if (fd < 0) {
23602			fd = posix_openpt(O_RDWR);
23603		}
23604#endif
23605
23606		if (fd >= 0) {
23607			/* also check with standard input */
23608			myfds.fd = fd;
23609			myfds.events = POLLIN;
23610			myfds.revents = 0;
23611			ret = poll(&myfds, 1, 100);
23612		} else {
23613			ret = -1;
23614		}
23615	}
23616	${cf_cv_main_return:-return}(ret < 0);
23617}
23618_ACEOF
23619rm -f "conftest$ac_exeext"
23620if { (eval echo "$as_me:23620: \"$ac_link\"") >&5
23621  (eval $ac_link) 2>&5
23622  ac_status=$?
23623  echo "$as_me:23623: \$? = $ac_status" >&5
23624  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23625  { (eval echo "$as_me:23625: \"$ac_try\"") >&5
23626  (eval $ac_try) 2>&5
23627  ac_status=$?
23628  echo "$as_me:23628: \$? = $ac_status" >&5
23629  (exit "$ac_status"); }; }; then
23630  cf_cv_working_poll=yes
23631else
23632  echo "$as_me: program exited with status $ac_status" >&5
23633echo "$as_me: failed program was:" >&5
23634cat "conftest.$ac_ext" >&5
23635cf_cv_working_poll=no
23636fi
23637rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23638fi
23639fi
23640echo "$as_me:23640: result: $cf_cv_working_poll" >&5
23641echo "${ECHO_T}$cf_cv_working_poll" >&6
23642test "$cf_cv_working_poll" = "yes" &&
23643cat >>confdefs.h <<\EOF
23644#define HAVE_WORKING_POLL 1
23645EOF
23646
23647echo "$as_me:23647: checking if MB_LEN_MAX is usable" >&5
23648echo $ECHO_N "checking if MB_LEN_MAX is usable... $ECHO_C" >&6
23649if test "${cf_cv_mb_len_max+set}" = set; then
23650  echo $ECHO_N "(cached) $ECHO_C" >&6
23651else
23652
23653cat >"conftest.$ac_ext" <<_ACEOF
23654#line 23654 "configure"
23655#include "confdefs.h"
23656
23657$ac_includes_default
23658#include <limits.h>
23659int
23660main (void)
23661{
23662
23663#if defined(MB_LEN_MAX) && MB_LEN_MAX >= 6
23664	${cf_cv_main_return:-return}(0);
23665#else
23666#error MB_LEN_MAX is not usable
23667#endif
23668
23669  ;
23670  return 0;
23671}
23672_ACEOF
23673rm -f "conftest.$ac_objext"
23674if { (eval echo "$as_me:23674: \"$ac_compile\"") >&5
23675  (eval $ac_compile) 2>&5
23676  ac_status=$?
23677  echo "$as_me:23677: \$? = $ac_status" >&5
23678  (exit "$ac_status"); } &&
23679         { ac_try='test -s "conftest.$ac_objext"'
23680  { (eval echo "$as_me:23680: \"$ac_try\"") >&5
23681  (eval $ac_try) 2>&5
23682  ac_status=$?
23683  echo "$as_me:23683: \$? = $ac_status" >&5
23684  (exit "$ac_status"); }; }; then
23685  cf_cv_mb_len_max=yes
23686else
23687  echo "$as_me: failed program was:" >&5
23688cat "conftest.$ac_ext" >&5
23689cf_cv_mb_len_max=no
23690fi
23691rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23692fi
23693echo "$as_me:23693: result: $cf_cv_mb_len_max" >&5
23694echo "${ECHO_T}$cf_cv_mb_len_max" >&6
23695if test "$cf_cv_mb_len_max" = yes
23696then
23697
23698cat >>confdefs.h <<\EOF
23699#define HAVE_CONSISTENT_MB_LEN_MAX 1
23700EOF
23701
23702else
23703	{ echo "$as_me:23703: WARNING: MB_LEN_MAX is missing/inconsistent in system headers" >&5
23704echo "$as_me: WARNING: MB_LEN_MAX is missing/inconsistent in system headers" >&2;}
23705fi
23706
23707echo "$as_me:23707: checking for va_copy" >&5
23708echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23709if test "${cf_cv_have_va_copy+set}" = set; then
23710  echo $ECHO_N "(cached) $ECHO_C" >&6
23711else
23712
23713cat >"conftest.$ac_ext" <<_ACEOF
23714#line 23714 "configure"
23715#include "confdefs.h"
23716
23717#include <stdarg.h>
23718
23719int
23720main (void)
23721{
23722
23723	static va_list dst;
23724	static va_list src;
23725	va_copy(dst, src)
23726  ;
23727  return 0;
23728}
23729_ACEOF
23730rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23731if { (eval echo "$as_me:23731: \"$ac_link\"") >&5
23732  (eval $ac_link) 2>&5
23733  ac_status=$?
23734  echo "$as_me:23734: \$? = $ac_status" >&5
23735  (exit "$ac_status"); } &&
23736         { ac_try='test -s "conftest$ac_exeext"'
23737  { (eval echo "$as_me:23737: \"$ac_try\"") >&5
23738  (eval $ac_try) 2>&5
23739  ac_status=$?
23740  echo "$as_me:23740: \$? = $ac_status" >&5
23741  (exit "$ac_status"); }; }; then
23742  cf_cv_have_va_copy=yes
23743else
23744  echo "$as_me: failed program was:" >&5
23745cat "conftest.$ac_ext" >&5
23746cf_cv_have_va_copy=no
23747fi
23748rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23749fi
23750echo "$as_me:23750: result: $cf_cv_have_va_copy" >&5
23751echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23752
23753if test "$cf_cv_have_va_copy" = yes;
23754then
23755
23756cat >>confdefs.h <<\EOF
23757#define HAVE_VA_COPY 1
23758EOF
23759
23760else # !cf_cv_have_va_copy
23761
23762echo "$as_me:23762: checking for __va_copy" >&5
23763echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23764if test "${cf_cv_have___va_copy+set}" = set; then
23765  echo $ECHO_N "(cached) $ECHO_C" >&6
23766else
23767
23768cat >"conftest.$ac_ext" <<_ACEOF
23769#line 23769 "configure"
23770#include "confdefs.h"
23771
23772#include <stdarg.h>
23773
23774int
23775main (void)
23776{
23777
23778	static va_list dst;
23779	static va_list src;
23780	__va_copy(dst, src)
23781  ;
23782  return 0;
23783}
23784_ACEOF
23785rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23786if { (eval echo "$as_me:23786: \"$ac_link\"") >&5
23787  (eval $ac_link) 2>&5
23788  ac_status=$?
23789  echo "$as_me:23789: \$? = $ac_status" >&5
23790  (exit "$ac_status"); } &&
23791         { ac_try='test -s "conftest$ac_exeext"'
23792  { (eval echo "$as_me:23792: \"$ac_try\"") >&5
23793  (eval $ac_try) 2>&5
23794  ac_status=$?
23795  echo "$as_me:23795: \$? = $ac_status" >&5
23796  (exit "$ac_status"); }; }; then
23797  cf_cv_have___va_copy=yes
23798else
23799  echo "$as_me: failed program was:" >&5
23800cat "conftest.$ac_ext" >&5
23801cf_cv_have___va_copy=no
23802fi
23803rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23804fi
23805echo "$as_me:23805: result: $cf_cv_have___va_copy" >&5
23806echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23807
23808if test "$cf_cv_have___va_copy" = yes
23809then
23810
23811cat >>confdefs.h <<\EOF
23812#define HAVE___VA_COPY 1
23813EOF
23814
23815else # !cf_cv_have___va_copy
23816
23817echo "$as_me:23817: checking for __builtin_va_copy" >&5
23818echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23819if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23820  echo $ECHO_N "(cached) $ECHO_C" >&6
23821else
23822
23823cat >"conftest.$ac_ext" <<_ACEOF
23824#line 23824 "configure"
23825#include "confdefs.h"
23826
23827#include <stdarg.h>
23828
23829int
23830main (void)
23831{
23832
23833	static va_list dst;
23834	static va_list src;
23835	__builtin_va_copy(dst, src)
23836  ;
23837  return 0;
23838}
23839_ACEOF
23840rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23841if { (eval echo "$as_me:23841: \"$ac_link\"") >&5
23842  (eval $ac_link) 2>&5
23843  ac_status=$?
23844  echo "$as_me:23844: \$? = $ac_status" >&5
23845  (exit "$ac_status"); } &&
23846         { ac_try='test -s "conftest$ac_exeext"'
23847  { (eval echo "$as_me:23847: \"$ac_try\"") >&5
23848  (eval $ac_try) 2>&5
23849  ac_status=$?
23850  echo "$as_me:23850: \$? = $ac_status" >&5
23851  (exit "$ac_status"); }; }; then
23852  cf_cv_have___builtin_va_copy=yes
23853else
23854  echo "$as_me: failed program was:" >&5
23855cat "conftest.$ac_ext" >&5
23856cf_cv_have___builtin_va_copy=no
23857fi
23858rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23859fi
23860echo "$as_me:23860: result: $cf_cv_have___builtin_va_copy" >&5
23861echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23862
23863test "$cf_cv_have___builtin_va_copy" = yes &&
23864
23865cat >>confdefs.h <<\EOF
23866#define HAVE___BUILTIN_VA_COPY 1
23867EOF
23868
23869fi # cf_cv_have___va_copy
23870
23871fi # cf_cv_have_va_copy
23872
23873case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23874(*yes*)
23875	;;
23876
23877(*)
23878	echo "$as_me:23878: checking if we can simply copy va_list" >&5
23879echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23880if test "${cf_cv_pointer_va_list+set}" = set; then
23881  echo $ECHO_N "(cached) $ECHO_C" >&6
23882else
23883
23884cat >"conftest.$ac_ext" <<_ACEOF
23885#line 23885 "configure"
23886#include "confdefs.h"
23887
23888#include <stdarg.h>
23889
23890int
23891main (void)
23892{
23893
23894	va_list dst;
23895	va_list src;
23896	dst = src
23897  ;
23898  return 0;
23899}
23900_ACEOF
23901rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23902if { (eval echo "$as_me:23902: \"$ac_link\"") >&5
23903  (eval $ac_link) 2>&5
23904  ac_status=$?
23905  echo "$as_me:23905: \$? = $ac_status" >&5
23906  (exit "$ac_status"); } &&
23907         { ac_try='test -s "conftest$ac_exeext"'
23908  { (eval echo "$as_me:23908: \"$ac_try\"") >&5
23909  (eval $ac_try) 2>&5
23910  ac_status=$?
23911  echo "$as_me:23911: \$? = $ac_status" >&5
23912  (exit "$ac_status"); }; }; then
23913  cf_cv_pointer_va_list=yes
23914else
23915  echo "$as_me: failed program was:" >&5
23916cat "conftest.$ac_ext" >&5
23917cf_cv_pointer_va_list=no
23918fi
23919rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23920fi
23921echo "$as_me:23921: result: $cf_cv_pointer_va_list" >&5
23922echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23923
23924	if test "$cf_cv_pointer_va_list" = no
23925	then
23926		echo "$as_me:23926: checking if we can copy va_list indirectly" >&5
23927echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23928if test "${cf_cv_array_va_list+set}" = set; then
23929  echo $ECHO_N "(cached) $ECHO_C" >&6
23930else
23931
23932cat >"conftest.$ac_ext" <<_ACEOF
23933#line 23933 "configure"
23934#include "confdefs.h"
23935
23936#include <stdarg.h>
23937
23938int
23939main (void)
23940{
23941
23942	va_list dst;
23943	va_list src;
23944	*dst = *src
23945  ;
23946  return 0;
23947}
23948_ACEOF
23949rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23950if { (eval echo "$as_me:23950: \"$ac_link\"") >&5
23951  (eval $ac_link) 2>&5
23952  ac_status=$?
23953  echo "$as_me:23953: \$? = $ac_status" >&5
23954  (exit "$ac_status"); } &&
23955         { ac_try='test -s "conftest$ac_exeext"'
23956  { (eval echo "$as_me:23956: \"$ac_try\"") >&5
23957  (eval $ac_try) 2>&5
23958  ac_status=$?
23959  echo "$as_me:23959: \$? = $ac_status" >&5
23960  (exit "$ac_status"); }; }; then
23961  cf_cv_array_va_list=yes
23962else
23963  echo "$as_me: failed program was:" >&5
23964cat "conftest.$ac_ext" >&5
23965cf_cv_array_va_list=no
23966fi
23967rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23968fi
23969echo "$as_me:23969: result: $cf_cv_array_va_list" >&5
23970echo "${ECHO_T}$cf_cv_array_va_list" >&6
23971		test "$cf_cv_array_va_list" = yes &&
23972cat >>confdefs.h <<\EOF
23973#define ARRAY_VA_LIST 1
23974EOF
23975
23976	fi
23977	;;
23978esac
23979
23980echo "$as_me:23980: checking for pid_t" >&5
23981echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23982if test "${ac_cv_type_pid_t+set}" = set; then
23983  echo $ECHO_N "(cached) $ECHO_C" >&6
23984else
23985  cat >"conftest.$ac_ext" <<_ACEOF
23986#line 23986 "configure"
23987#include "confdefs.h"
23988$ac_includes_default
23989int
23990main (void)
23991{
23992if ((pid_t *) 0)
23993  return 0;
23994if (sizeof (pid_t))
23995  return 0;
23996  ;
23997  return 0;
23998}
23999_ACEOF
24000rm -f "conftest.$ac_objext"
24001if { (eval echo "$as_me:24001: \"$ac_compile\"") >&5
24002  (eval $ac_compile) 2>&5
24003  ac_status=$?
24004  echo "$as_me:24004: \$? = $ac_status" >&5
24005  (exit "$ac_status"); } &&
24006         { ac_try='test -s "conftest.$ac_objext"'
24007  { (eval echo "$as_me:24007: \"$ac_try\"") >&5
24008  (eval $ac_try) 2>&5
24009  ac_status=$?
24010  echo "$as_me:24010: \$? = $ac_status" >&5
24011  (exit "$ac_status"); }; }; then
24012  ac_cv_type_pid_t=yes
24013else
24014  echo "$as_me: failed program was:" >&5
24015cat "conftest.$ac_ext" >&5
24016ac_cv_type_pid_t=no
24017fi
24018rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24019fi
24020echo "$as_me:24020: result: $ac_cv_type_pid_t" >&5
24021echo "${ECHO_T}$ac_cv_type_pid_t" >&6
24022if test "$ac_cv_type_pid_t" = yes; then
24023  :
24024else
24025
24026cat >>confdefs.h <<EOF
24027#define pid_t int
24028EOF
24029
24030fi
24031
24032for ac_header in unistd.h vfork.h
24033do
24034as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24035echo "$as_me:24035: checking for $ac_header" >&5
24036echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24037if eval "test \"\${$as_ac_Header+set}\" = set"; then
24038  echo $ECHO_N "(cached) $ECHO_C" >&6
24039else
24040  cat >"conftest.$ac_ext" <<_ACEOF
24041#line 24041 "configure"
24042#include "confdefs.h"
24043#include <$ac_header>
24044_ACEOF
24045if { (eval echo "$as_me:24045: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24046  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24047  ac_status=$?
24048  $EGREP -v '^ *\+' conftest.er1 >conftest.err
24049  rm -f conftest.er1
24050  cat conftest.err >&5
24051  echo "$as_me:24051: \$? = $ac_status" >&5
24052  (exit "$ac_status"); } >/dev/null; then
24053  if test -s conftest.err; then
24054    ac_cpp_err=$ac_c_preproc_warn_flag
24055  else
24056    ac_cpp_err=
24057  fi
24058else
24059  ac_cpp_err=yes
24060fi
24061if test -z "$ac_cpp_err"; then
24062  eval "$as_ac_Header=yes"
24063else
24064  echo "$as_me: failed program was:" >&5
24065  cat "conftest.$ac_ext" >&5
24066  eval "$as_ac_Header=no"
24067fi
24068rm -f conftest.err "conftest.$ac_ext"
24069fi
24070echo "$as_me:24070: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24071echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24072if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24073  cat >>confdefs.h <<EOF
24074#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24075EOF
24076
24077fi
24078done
24079
24080for ac_func in fork vfork
24081do
24082as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24083echo "$as_me:24083: checking for $ac_func" >&5
24084echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24085if eval "test \"\${$as_ac_var+set}\" = set"; then
24086  echo $ECHO_N "(cached) $ECHO_C" >&6
24087else
24088  cat >"conftest.$ac_ext" <<_ACEOF
24089#line 24089 "configure"
24090#include "confdefs.h"
24091#define $ac_func autoconf_temporary
24092#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
24093#undef $ac_func
24094
24095#ifdef __cplusplus
24096extern "C"
24097#endif
24098
24099/* We use char because int might match the return type of a gcc2
24100   builtin and then its argument prototype would still apply.  */
24101char $ac_func (void);
24102
24103int
24104main (void)
24105{
24106
24107/* The GNU C library defines stubs for functions which it implements
24108    to always fail with ENOSYS.  Some functions are actually named
24109    something starting with __ and the normal name is an alias.  */
24110#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24111#error found stub for $ac_func
24112#endif
24113
24114	return $ac_func ();
24115  ;
24116  return 0;
24117}
24118_ACEOF
24119rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24120if { (eval echo "$as_me:24120: \"$ac_link\"") >&5
24121  (eval $ac_link) 2>&5
24122  ac_status=$?
24123  echo "$as_me:24123: \$? = $ac_status" >&5
24124  (exit "$ac_status"); } &&
24125         { ac_try='test -s "conftest$ac_exeext"'
24126  { (eval echo "$as_me:24126: \"$ac_try\"") >&5
24127  (eval $ac_try) 2>&5
24128  ac_status=$?
24129  echo "$as_me:24129: \$? = $ac_status" >&5
24130  (exit "$ac_status"); }; }; then
24131  eval "$as_ac_var=yes"
24132else
24133  echo "$as_me: failed program was:" >&5
24134cat "conftest.$ac_ext" >&5
24135eval "$as_ac_var=no"
24136fi
24137rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24138fi
24139echo "$as_me:24139: result: `eval echo '${'"$as_ac_var"'}'`" >&5
24140echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
24141if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
24142  cat >>confdefs.h <<EOF
24143#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24144EOF
24145
24146fi
24147done
24148
24149ac_cv_func_fork_works=$ac_cv_func_fork
24150if test "x$ac_cv_func_fork" = xyes; then
24151  echo "$as_me:24151: checking for working fork" >&5
24152echo $ECHO_N "checking for working fork... $ECHO_C" >&6
24153if test "${ac_cv_func_fork_works+set}" = set; then
24154  echo $ECHO_N "(cached) $ECHO_C" >&6
24155else
24156  if test "$cross_compiling" = yes; then
24157  ac_cv_func_fork_works=cross
24158else
24159  cat >"conftest.$ac_ext" <<_ACEOF
24160/* By Rüdiger Kuhlmann. */
24161      #include <sys/types.h>
24162      #if HAVE_UNISTD_H
24163      # include <unistd.h>
24164      #endif
24165      /* Some systems only have a dummy stub for fork() */
24166      int main (void)
24167      {
24168        if (fork() < 0)
24169          $ac_main_return (1);
24170        $ac_main_return (0);
24171      }
24172_ACEOF
24173rm -f "conftest$ac_exeext"
24174if { (eval echo "$as_me:24174: \"$ac_link\"") >&5
24175  (eval $ac_link) 2>&5
24176  ac_status=$?
24177  echo "$as_me:24177: \$? = $ac_status" >&5
24178  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24179  { (eval echo "$as_me:24179: \"$ac_try\"") >&5
24180  (eval $ac_try) 2>&5
24181  ac_status=$?
24182  echo "$as_me:24182: \$? = $ac_status" >&5
24183  (exit "$ac_status"); }; }; then
24184  ac_cv_func_fork_works=yes
24185else
24186  echo "$as_me: program exited with status $ac_status" >&5
24187echo "$as_me: failed program was:" >&5
24188cat "conftest.$ac_ext" >&5
24189ac_cv_func_fork_works=no
24190fi
24191rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24192fi
24193fi
24194echo "$as_me:24194: result: $ac_cv_func_fork_works" >&5
24195echo "${ECHO_T}$ac_cv_func_fork_works" >&6
24196
24197fi
24198if test "x$ac_cv_func_fork_works" = xcross; then
24199  case $host in
24200    *-*-amigaos* | *-*-msdosdjgpp*)
24201      # Override, as these systems have only a dummy fork() stub
24202      ac_cv_func_fork_works=no
24203      ;;
24204    *)
24205      ac_cv_func_fork_works=yes
24206      ;;
24207  esac
24208  { echo "$as_me:24208: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
24209echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
24210fi
24211ac_cv_func_vfork_works=$ac_cv_func_vfork
24212if test "x$ac_cv_func_vfork" = xyes; then
24213  echo "$as_me:24213: checking for working vfork" >&5
24214echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
24215if test "${ac_cv_func_vfork_works+set}" = set; then
24216  echo $ECHO_N "(cached) $ECHO_C" >&6
24217else
24218  if test "$cross_compiling" = yes; then
24219  ac_cv_func_vfork_works=cross
24220else
24221  cat >"conftest.$ac_ext" <<_ACEOF
24222#line 24222 "configure"
24223#include "confdefs.h"
24224/* Thanks to Paul Eggert for this test.  */
24225#include <stdio.h>
24226#include <sys/types.h>
24227#include <sys/stat.h>
24228#if HAVE_UNISTD_H
24229# include <unistd.h>
24230#endif
24231#if HAVE_VFORK_H
24232# include <vfork.h>
24233#endif
24234/* On some sparc systems, changes by the child to local and incoming
24235   argument registers are propagated back to the parent.  The compiler
24236   is told about this with #include <vfork.h>, but some compilers
24237   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
24238   static variable whose address is put into a register that is
24239   clobbered by the vfork.  */
24240static
24241sparc_address_test (int arg)
24242{
24243  static pid_t child;
24244  if (!child) {
24245    child = vfork ();
24246    if (child < 0) {
24247      perror ("vfork");
24248      _exit(2);
24249    }
24250    if (!child) {
24251      arg = getpid();
24252      write(-1, "", 0);
24253      _exit (arg);
24254    }
24255  }
24256}
24257
24258int
24259main (void)
24260{
24261  pid_t parent = getpid ();
24262  pid_t child;
24263
24264  sparc_address_test ();
24265
24266  child = vfork ();
24267
24268  if (child == 0) {
24269    /* Here is another test for sparc vfork register problems.  This
24270       test uses lots of local variables, at least as many local
24271       variables as main has allocated so far including compiler
24272       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24273       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24274       reuse the register of parent for one of the local variables,
24275       since it will think that parent can't possibly be used any more
24276       in this routine.  Assigning to the local variable will thus
24277       munge parent in the parent process.  */
24278    pid_t
24279      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24280      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24281    /* Convince the compiler that p..p7 are live; otherwise, it might
24282       use the same hardware register for all 8 local variables.  */
24283    if (p != p1 || p != p2 || p != p3 || p != p4
24284        || p != p5 || p != p6 || p != p7)
24285      _exit(1);
24286
24287    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24288       from child file descriptors.  If the child closes a descriptor
24289       before it execs or exits, this munges the parent's descriptor
24290       as well.  Test for this by closing stdout in the child.  */
24291    _exit(close(fileno(stdout)) != 0);
24292  } else {
24293    int status;
24294    struct stat st;
24295
24296    while (wait(&status) != child)
24297      ;
24298    $ac_main_return(
24299         /* Was there some problem with vforking?  */
24300         child < 0
24301
24302         /* Did the child fail?  (This shouldn't happen.)  */
24303         || status
24304
24305         /* Did the vfork/compiler bug occur?  */
24306         || parent != getpid()
24307
24308         /* Did the file descriptor bug occur?  */
24309         || fstat(fileno(stdout), &st) != 0
24310         );
24311  }
24312}
24313_ACEOF
24314rm -f "conftest$ac_exeext"
24315if { (eval echo "$as_me:24315: \"$ac_link\"") >&5
24316  (eval $ac_link) 2>&5
24317  ac_status=$?
24318  echo "$as_me:24318: \$? = $ac_status" >&5
24319  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24320  { (eval echo "$as_me:24320: \"$ac_try\"") >&5
24321  (eval $ac_try) 2>&5
24322  ac_status=$?
24323  echo "$as_me:24323: \$? = $ac_status" >&5
24324  (exit "$ac_status"); }; }; then
24325  ac_cv_func_vfork_works=yes
24326else
24327  echo "$as_me: program exited with status $ac_status" >&5
24328echo "$as_me: failed program was:" >&5
24329cat "conftest.$ac_ext" >&5
24330ac_cv_func_vfork_works=no
24331fi
24332rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24333fi
24334fi
24335echo "$as_me:24335: result: $ac_cv_func_vfork_works" >&5
24336echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24337
24338fi;
24339if test "x$ac_cv_func_fork_works" = xcross; then
24340  ac_cv_func_vfork_works=ac_cv_func_vfork
24341  { echo "$as_me:24341: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24342echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24343fi
24344
24345if test "x$ac_cv_func_vfork_works" = xyes; then
24346
24347cat >>confdefs.h <<\EOF
24348#define HAVE_WORKING_VFORK 1
24349EOF
24350
24351else
24352
24353cat >>confdefs.h <<\EOF
24354#define vfork fork
24355EOF
24356
24357fi
24358if test "x$ac_cv_func_fork_works" = xyes; then
24359
24360cat >>confdefs.h <<\EOF
24361#define HAVE_WORKING_FORK 1
24362EOF
24363
24364fi
24365
24366echo "$as_me:24366: checking if fopen accepts explicit binary mode" >&5
24367echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24368if test "${cf_cv_fopen_bin_r+set}" = set; then
24369  echo $ECHO_N "(cached) $ECHO_C" >&6
24370else
24371
24372	if test "$cross_compiling" = yes; then
24373  cf_cv_fopen_bin_r=unknown
24374else
24375  cat >"conftest.$ac_ext" <<_ACEOF
24376#line 24376 "configure"
24377#include "confdefs.h"
24378
24379$ac_includes_default
24380
24381int main(void)
24382{
24383	FILE *fp = fopen("conftest.tmp", "wb");
24384	int rc = 0;
24385	if (fp != NULL) {
24386		int p, q;
24387		for (p = 0; p < 256; ++p) {
24388			fputc(p, fp);
24389		}
24390		fclose(fp);
24391		fp = fopen("conftest.tmp", "rb");
24392		if (fp != NULL) {
24393			for (p = 0; p < 256; ++p) {
24394				q = fgetc(fp);
24395				if (q != p) {
24396					rc = 1;
24397					break;
24398				}
24399			}
24400		} else {
24401			rc = 1;
24402		}
24403	} else {
24404		rc = 1;
24405	}
24406	${cf_cv_main_return:-return} (rc);
24407}
24408
24409_ACEOF
24410rm -f "conftest$ac_exeext"
24411if { (eval echo "$as_me:24411: \"$ac_link\"") >&5
24412  (eval $ac_link) 2>&5
24413  ac_status=$?
24414  echo "$as_me:24414: \$? = $ac_status" >&5
24415  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24416  { (eval echo "$as_me:24416: \"$ac_try\"") >&5
24417  (eval $ac_try) 2>&5
24418  ac_status=$?
24419  echo "$as_me:24419: \$? = $ac_status" >&5
24420  (exit "$ac_status"); }; }; then
24421  cf_cv_fopen_bin_r=yes
24422else
24423  echo "$as_me: program exited with status $ac_status" >&5
24424echo "$as_me: failed program was:" >&5
24425cat "conftest.$ac_ext" >&5
24426cf_cv_fopen_bin_r=no
24427fi
24428rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24429fi
24430
24431fi
24432echo "$as_me:24432: result: $cf_cv_fopen_bin_r" >&5
24433echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24434test "x$cf_cv_fopen_bin_r" != xno &&
24435cat >>confdefs.h <<\EOF
24436#define USE_FOPEN_BIN_R 1
24437EOF
24438
24439	echo "$as_me:24439: checking for cc_t" >&5
24440echo $ECHO_N "checking for cc_t... $ECHO_C" >&6
24441if test "${ac_cv_type_cc_t+set}" = set; then
24442  echo $ECHO_N "(cached) $ECHO_C" >&6
24443else
24444  cat >"conftest.$ac_ext" <<_ACEOF
24445#line 24445 "configure"
24446#include "confdefs.h"
24447
24448$ac_includes_default
24449#include <termios.h>
24450
24451int
24452main (void)
24453{
24454if ((cc_t *) 0)
24455  return 0;
24456if (sizeof (cc_t))
24457  return 0;
24458  ;
24459  return 0;
24460}
24461_ACEOF
24462rm -f "conftest.$ac_objext"
24463if { (eval echo "$as_me:24463: \"$ac_compile\"") >&5
24464  (eval $ac_compile) 2>&5
24465  ac_status=$?
24466  echo "$as_me:24466: \$? = $ac_status" >&5
24467  (exit "$ac_status"); } &&
24468         { ac_try='test -s "conftest.$ac_objext"'
24469  { (eval echo "$as_me:24469: \"$ac_try\"") >&5
24470  (eval $ac_try) 2>&5
24471  ac_status=$?
24472  echo "$as_me:24472: \$? = $ac_status" >&5
24473  (exit "$ac_status"); }; }; then
24474  ac_cv_type_cc_t=yes
24475else
24476  echo "$as_me: failed program was:" >&5
24477cat "conftest.$ac_ext" >&5
24478ac_cv_type_cc_t=no
24479fi
24480rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24481fi
24482echo "$as_me:24482: result: $ac_cv_type_cc_t" >&5
24483echo "${ECHO_T}$ac_cv_type_cc_t" >&6
24484if test "$ac_cv_type_cc_t" = yes; then
24485
24486cat >>confdefs.h <<EOF
24487#define HAVE_CC_T 1
24488EOF
24489
24490fi
24491
24492	echo "$as_me:24492: checking for speed_t" >&5
24493echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
24494if test "${ac_cv_type_speed_t+set}" = set; then
24495  echo $ECHO_N "(cached) $ECHO_C" >&6
24496else
24497  cat >"conftest.$ac_ext" <<_ACEOF
24498#line 24498 "configure"
24499#include "confdefs.h"
24500
24501$ac_includes_default
24502#include <termios.h>
24503
24504int
24505main (void)
24506{
24507if ((speed_t *) 0)
24508  return 0;
24509if (sizeof (speed_t))
24510  return 0;
24511  ;
24512  return 0;
24513}
24514_ACEOF
24515rm -f "conftest.$ac_objext"
24516if { (eval echo "$as_me:24516: \"$ac_compile\"") >&5
24517  (eval $ac_compile) 2>&5
24518  ac_status=$?
24519  echo "$as_me:24519: \$? = $ac_status" >&5
24520  (exit "$ac_status"); } &&
24521         { ac_try='test -s "conftest.$ac_objext"'
24522  { (eval echo "$as_me:24522: \"$ac_try\"") >&5
24523  (eval $ac_try) 2>&5
24524  ac_status=$?
24525  echo "$as_me:24525: \$? = $ac_status" >&5
24526  (exit "$ac_status"); }; }; then
24527  ac_cv_type_speed_t=yes
24528else
24529  echo "$as_me: failed program was:" >&5
24530cat "conftest.$ac_ext" >&5
24531ac_cv_type_speed_t=no
24532fi
24533rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24534fi
24535echo "$as_me:24535: result: $ac_cv_type_speed_t" >&5
24536echo "${ECHO_T}$ac_cv_type_speed_t" >&6
24537if test "$ac_cv_type_speed_t" = yes; then
24538
24539cat >>confdefs.h <<EOF
24540#define HAVE_SPEED_T 1
24541EOF
24542
24543fi
24544
24545	echo "$as_me:24545: checking for tcflag_t" >&5
24546echo $ECHO_N "checking for tcflag_t... $ECHO_C" >&6
24547if test "${ac_cv_type_tcflag_t+set}" = set; then
24548  echo $ECHO_N "(cached) $ECHO_C" >&6
24549else
24550  cat >"conftest.$ac_ext" <<_ACEOF
24551#line 24551 "configure"
24552#include "confdefs.h"
24553
24554$ac_includes_default
24555#include <termios.h>
24556
24557int
24558main (void)
24559{
24560if ((tcflag_t *) 0)
24561  return 0;
24562if (sizeof (tcflag_t))
24563  return 0;
24564  ;
24565  return 0;
24566}
24567_ACEOF
24568rm -f "conftest.$ac_objext"
24569if { (eval echo "$as_me:24569: \"$ac_compile\"") >&5
24570  (eval $ac_compile) 2>&5
24571  ac_status=$?
24572  echo "$as_me:24572: \$? = $ac_status" >&5
24573  (exit "$ac_status"); } &&
24574         { ac_try='test -s "conftest.$ac_objext"'
24575  { (eval echo "$as_me:24575: \"$ac_try\"") >&5
24576  (eval $ac_try) 2>&5
24577  ac_status=$?
24578  echo "$as_me:24578: \$? = $ac_status" >&5
24579  (exit "$ac_status"); }; }; then
24580  ac_cv_type_tcflag_t=yes
24581else
24582  echo "$as_me: failed program was:" >&5
24583cat "conftest.$ac_ext" >&5
24584ac_cv_type_tcflag_t=no
24585fi
24586rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24587fi
24588echo "$as_me:24588: result: $ac_cv_type_tcflag_t" >&5
24589echo "${ECHO_T}$ac_cv_type_tcflag_t" >&6
24590if test "$ac_cv_type_tcflag_t" = yes; then
24591
24592cat >>confdefs.h <<EOF
24593#define HAVE_TCFLAG_T 1
24594EOF
24595
24596fi
24597
24598	echo "$as_me:24598: checking for sigset_t" >&5
24599echo $ECHO_N "checking for sigset_t... $ECHO_C" >&6
24600if test "${ac_cv_type_sigset_t+set}" = set; then
24601  echo $ECHO_N "(cached) $ECHO_C" >&6
24602else
24603  cat >"conftest.$ac_ext" <<_ACEOF
24604#line 24604 "configure"
24605#include "confdefs.h"
24606
24607$ac_includes_default
24608#include <signal.h>
24609
24610int
24611main (void)
24612{
24613if ((sigset_t *) 0)
24614  return 0;
24615if (sizeof (sigset_t))
24616  return 0;
24617  ;
24618  return 0;
24619}
24620_ACEOF
24621rm -f "conftest.$ac_objext"
24622if { (eval echo "$as_me:24622: \"$ac_compile\"") >&5
24623  (eval $ac_compile) 2>&5
24624  ac_status=$?
24625  echo "$as_me:24625: \$? = $ac_status" >&5
24626  (exit "$ac_status"); } &&
24627         { ac_try='test -s "conftest.$ac_objext"'
24628  { (eval echo "$as_me:24628: \"$ac_try\"") >&5
24629  (eval $ac_try) 2>&5
24630  ac_status=$?
24631  echo "$as_me:24631: \$? = $ac_status" >&5
24632  (exit "$ac_status"); }; }; then
24633  ac_cv_type_sigset_t=yes
24634else
24635  echo "$as_me: failed program was:" >&5
24636cat "conftest.$ac_ext" >&5
24637ac_cv_type_sigset_t=no
24638fi
24639rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24640fi
24641echo "$as_me:24641: result: $ac_cv_type_sigset_t" >&5
24642echo "${ECHO_T}$ac_cv_type_sigset_t" >&6
24643if test "$ac_cv_type_sigset_t" = yes; then
24644
24645cat >>confdefs.h <<EOF
24646#define HAVE_SIGSET_T 1
24647EOF
24648
24649fi
24650
24651# special check for test/ditto.c
24652
24653echo "$as_me:24653: checking for openpty in -lutil" >&5
24654echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24655if test "${ac_cv_lib_util_openpty+set}" = set; then
24656  echo $ECHO_N "(cached) $ECHO_C" >&6
24657else
24658  ac_check_lib_save_LIBS=$LIBS
24659LIBS="-lutil  $LIBS"
24660cat >"conftest.$ac_ext" <<_ACEOF
24661#line 24661 "configure"
24662#include "confdefs.h"
24663
24664/* Override any gcc2 internal prototype to avoid an error.  */
24665#ifdef __cplusplus
24666extern "C"
24667#endif
24668/* We use char because int might match the return type of a gcc2
24669   builtin and then its argument prototype would still apply.  */
24670char openpty (void);
24671int
24672main (void)
24673{
24674openpty ();
24675  ;
24676  return 0;
24677}
24678_ACEOF
24679rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24680if { (eval echo "$as_me:24680: \"$ac_link\"") >&5
24681  (eval $ac_link) 2>&5
24682  ac_status=$?
24683  echo "$as_me:24683: \$? = $ac_status" >&5
24684  (exit "$ac_status"); } &&
24685         { ac_try='test -s "conftest$ac_exeext"'
24686  { (eval echo "$as_me:24686: \"$ac_try\"") >&5
24687  (eval $ac_try) 2>&5
24688  ac_status=$?
24689  echo "$as_me:24689: \$? = $ac_status" >&5
24690  (exit "$ac_status"); }; }; then
24691  ac_cv_lib_util_openpty=yes
24692else
24693  echo "$as_me: failed program was:" >&5
24694cat "conftest.$ac_ext" >&5
24695ac_cv_lib_util_openpty=no
24696fi
24697rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24698LIBS=$ac_check_lib_save_LIBS
24699fi
24700echo "$as_me:24700: result: $ac_cv_lib_util_openpty" >&5
24701echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24702if test "$ac_cv_lib_util_openpty" = yes; then
24703  cf_cv_lib_util=yes
24704else
24705  cf_cv_lib_util=no
24706fi
24707
24708echo "$as_me:24708: checking for openpty header" >&5
24709echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24710if test "${cf_cv_func_openpty+set}" = set; then
24711  echo $ECHO_N "(cached) $ECHO_C" >&6
24712else
24713
24714	cf_save_LIBS="$LIBS"
24715	test "$cf_cv_lib_util" = yes && {
24716cf_add_libs="$LIBS"
24717# reverse order
24718cf_add_0lib=
24719for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24720# filter duplicates
24721for cf_add_1lib in $cf_add_0lib; do
24722	for cf_add_2lib in $cf_add_libs; do
24723		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24724			cf_add_1lib=
24725			break
24726		fi
24727	done
24728	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24729done
24730LIBS="$cf_add_libs"
24731 }
24732	for cf_header in pty.h libutil.h util.h
24733	do
24734	cat >"conftest.$ac_ext" <<_ACEOF
24735#line 24735 "configure"
24736#include "confdefs.h"
24737
24738#include <$cf_header>
24739
24740int
24741main (void)
24742{
24743
24744	int x = openpty((int *)0, (int *)0, (char *)0,
24745				   (struct termios *)0, (struct winsize *)0);
24746	(void)x;
24747
24748  ;
24749  return 0;
24750}
24751_ACEOF
24752rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24753if { (eval echo "$as_me:24753: \"$ac_link\"") >&5
24754  (eval $ac_link) 2>&5
24755  ac_status=$?
24756  echo "$as_me:24756: \$? = $ac_status" >&5
24757  (exit "$ac_status"); } &&
24758         { ac_try='test -s "conftest$ac_exeext"'
24759  { (eval echo "$as_me:24759: \"$ac_try\"") >&5
24760  (eval $ac_try) 2>&5
24761  ac_status=$?
24762  echo "$as_me:24762: \$? = $ac_status" >&5
24763  (exit "$ac_status"); }; }; then
24764
24765		cf_cv_func_openpty=$cf_header
24766		break
24767
24768else
24769  echo "$as_me: failed program was:" >&5
24770cat "conftest.$ac_ext" >&5
24771
24772		cf_cv_func_openpty=no
24773
24774fi
24775rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24776	done
24777	LIBS="$cf_save_LIBS"
24778
24779fi
24780echo "$as_me:24780: result: $cf_cv_func_openpty" >&5
24781echo "${ECHO_T}$cf_cv_func_openpty" >&6
24782
24783if test "$cf_cv_func_openpty" != no ; then
24784
24785cat >>confdefs.h <<EOF
24786#define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24787EOF
24788
24789cat >>confdefs.h <<\EOF
24790#define USE_XTERM_PTY 1
24791EOF
24792
24793	if test "x$cf_cv_lib_util" = xyes ; then
24794
24795cf_add_libs="$TEST_LIBS"
24796# reverse order
24797cf_add_0lib=
24798for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24799# filter duplicates
24800for cf_add_1lib in $cf_add_0lib; do
24801	for cf_add_2lib in $cf_add_libs; do
24802		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24803			cf_add_1lib=
24804			break
24805		fi
24806	done
24807	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24808done
24809TEST_LIBS="$cf_add_libs"
24810
24811	fi
24812fi
24813
24814if test "$with_hashed_db" != no ; then
24815
24816cat >>confdefs.h <<\EOF
24817#define USE_HASHED_DB 1
24818EOF
24819
24820case $with_hashed_db in
24821(yes|*able*)
24822	;;
24823(*)
24824	if test -d "$with_hashed_db" ; then
24825
24826if test -n "$with_hashed_db/include" ; then
24827  for cf_add_incdir in $with_hashed_db/include
24828  do
24829	while test "$cf_add_incdir" != /usr/include
24830	do
24831	  if test -d "$cf_add_incdir"
24832	  then
24833		cf_have_incdir=no
24834		if test -n "$CFLAGS$CPPFLAGS" ; then
24835		  # a loop is needed to ensure we can add subdirs of existing dirs
24836		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24837			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24838			  cf_have_incdir=yes; break
24839			fi
24840		  done
24841		fi
24842
24843		if test "$cf_have_incdir" = no ; then
24844		  if test "$cf_add_incdir" = /usr/local/include ; then
24845			if test "$GCC" = yes
24846			then
24847			  cf_save_CPPFLAGS=$CPPFLAGS
24848
24849	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24850	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24851
24852			  cat >"conftest.$ac_ext" <<_ACEOF
24853#line 24853 "configure"
24854#include "confdefs.h"
24855#include <stdio.h>
24856int
24857main (void)
24858{
24859printf("Hello")
24860  ;
24861  return 0;
24862}
24863_ACEOF
24864rm -f "conftest.$ac_objext"
24865if { (eval echo "$as_me:24865: \"$ac_compile\"") >&5
24866  (eval $ac_compile) 2>&5
24867  ac_status=$?
24868  echo "$as_me:24868: \$? = $ac_status" >&5
24869  (exit "$ac_status"); } &&
24870         { ac_try='test -s "conftest.$ac_objext"'
24871  { (eval echo "$as_me:24871: \"$ac_try\"") >&5
24872  (eval $ac_try) 2>&5
24873  ac_status=$?
24874  echo "$as_me:24874: \$? = $ac_status" >&5
24875  (exit "$ac_status"); }; }; then
24876  :
24877else
24878  echo "$as_me: failed program was:" >&5
24879cat "conftest.$ac_ext" >&5
24880cf_have_incdir=yes
24881fi
24882rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24883			  CPPFLAGS=$cf_save_CPPFLAGS
24884			fi
24885		  fi
24886		fi
24887
24888		if test "$cf_have_incdir" = no ; then
24889		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
24890
24891echo "${as_me:-configure}:24891: testing adding $cf_add_incdir to include-path ..." 1>&5
24892
24893		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24894
24895		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24896		  test "$cf_top_incdir" = "$cf_add_incdir" && break
24897		  cf_add_incdir="$cf_top_incdir"
24898		else
24899		  break
24900		fi
24901	  else
24902		break
24903	  fi
24904	done
24905  done
24906fi
24907
24908if test -n "$with_hashed_db/lib" ; then
24909	for cf_add_libdir in $with_hashed_db/lib
24910	do
24911		if test "$cf_add_libdir" = /usr/lib ; then
24912			:
24913		elif test -d "$cf_add_libdir"
24914		then
24915			cf_have_libdir=no
24916			if test -n "$LDFLAGS$LIBS" ; then
24917				# a loop is needed to ensure we can add subdirs of existing dirs
24918				for cf_test_libdir in $LDFLAGS $LIBS ; do
24919					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24920						cf_have_libdir=yes; break
24921					fi
24922				done
24923			fi
24924			if test "$cf_have_libdir" = no ; then
24925				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
24926
24927echo "${as_me:-configure}:24927: testing adding $cf_add_libdir to library-path ..." 1>&5
24928
24929				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24930			fi
24931		fi
24932	done
24933fi
24934
24935	else
24936		case "$with_hashed_db" in
24937		(./*|../*|/*)
24938			{ echo "$as_me:24938: WARNING: no such directory $with_hashed_db" >&5
24939echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24940			;;
24941		(*)
24942
24943cf_search=
24944
24945test "x$prefix" != "xNONE" && \
24946test -d "$prefix" && \
24947 {
24948	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
24949	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24950	test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24951	test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24952	test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24953	test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24954}
24955
24956for cf_subdir_prefix in \
24957	/usr \
24958	/usr/local \
24959	/usr/pkg \
24960	/opt \
24961	/opt/local \
24962	$HOME
24963do
24964
24965test "x$cf_subdir_prefix" != "x$prefix" && \
24966test -d "$cf_subdir_prefix" && \
24967{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24968	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
24969	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24970	test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24971	test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24972	test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24973	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"
24974}
24975
24976done
24977
24978	for cf_item in $cf_search
24979	do
24980		case "$cf_item" in
24981		(*/$with_hashed_db)
24982
24983if test -n "$cf_item" ; then
24984  for cf_add_incdir in $cf_item
24985  do
24986	while test "$cf_add_incdir" != /usr/include
24987	do
24988	  if test -d "$cf_add_incdir"
24989	  then
24990		cf_have_incdir=no
24991		if test -n "$CFLAGS$CPPFLAGS" ; then
24992		  # a loop is needed to ensure we can add subdirs of existing dirs
24993		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24994			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24995			  cf_have_incdir=yes; break
24996			fi
24997		  done
24998		fi
24999
25000		if test "$cf_have_incdir" = no ; then
25001		  if test "$cf_add_incdir" = /usr/local/include ; then
25002			if test "$GCC" = yes
25003			then
25004			  cf_save_CPPFLAGS=$CPPFLAGS
25005
25006	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
25007	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
25008
25009			  cat >"conftest.$ac_ext" <<_ACEOF
25010#line 25010 "configure"
25011#include "confdefs.h"
25012#include <stdio.h>
25013int
25014main (void)
25015{
25016printf("Hello")
25017  ;
25018  return 0;
25019}
25020_ACEOF
25021rm -f "conftest.$ac_objext"
25022if { (eval echo "$as_me:25022: \"$ac_compile\"") >&5
25023  (eval $ac_compile) 2>&5
25024  ac_status=$?
25025  echo "$as_me:25025: \$? = $ac_status" >&5
25026  (exit "$ac_status"); } &&
25027         { ac_try='test -s "conftest.$ac_objext"'
25028  { (eval echo "$as_me:25028: \"$ac_try\"") >&5
25029  (eval $ac_try) 2>&5
25030  ac_status=$?
25031  echo "$as_me:25031: \$? = $ac_status" >&5
25032  (exit "$ac_status"); }; }; then
25033  :
25034else
25035  echo "$as_me: failed program was:" >&5
25036cat "conftest.$ac_ext" >&5
25037cf_have_incdir=yes
25038fi
25039rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25040			  CPPFLAGS=$cf_save_CPPFLAGS
25041			fi
25042		  fi
25043		fi
25044
25045		if test "$cf_have_incdir" = no ; then
25046		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
25047
25048echo "${as_me:-configure}:25048: testing adding $cf_add_incdir to include-path ..." 1>&5
25049
25050		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
25051
25052		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
25053		  test "$cf_top_incdir" = "$cf_add_incdir" && break
25054		  cf_add_incdir="$cf_top_incdir"
25055		else
25056		  break
25057		fi
25058	  else
25059		break
25060	  fi
25061	done
25062  done
25063fi
25064
25065			;;
25066		esac
25067	done
25068
25069cf_search=
25070
25071test "x$prefix" != "xNONE" && \
25072test -d "$prefix" && \
25073 {
25074	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
25075	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
25076	test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
25077	test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
25078	test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
25079	test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
25080}
25081
25082for cf_subdir_prefix in \
25083	/usr \
25084	/usr/local \
25085	/usr/pkg \
25086	/opt \
25087	/opt/local \
25088	$HOME
25089do
25090
25091test "x$cf_subdir_prefix" != "x$prefix" && \
25092test -d "$cf_subdir_prefix" && \
25093{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
25094	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
25095	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
25096	test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
25097	test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
25098	test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
25099	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"
25100}
25101
25102done
25103
25104	for cf_item in $cf_search
25105	do
25106		case "$cf_item" in
25107		(*/$with_hashed_db)
25108
25109if test -n "$cf_item" ; then
25110	for cf_add_libdir in $cf_item
25111	do
25112		if test "$cf_add_libdir" = /usr/lib ; then
25113			:
25114		elif test -d "$cf_add_libdir"
25115		then
25116			cf_have_libdir=no
25117			if test -n "$LDFLAGS$LIBS" ; then
25118				# a loop is needed to ensure we can add subdirs of existing dirs
25119				for cf_test_libdir in $LDFLAGS $LIBS ; do
25120					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
25121						cf_have_libdir=yes; break
25122					fi
25123				done
25124			fi
25125			if test "$cf_have_libdir" = no ; then
25126				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
25127
25128echo "${as_me:-configure}:25128: testing adding $cf_add_libdir to library-path ..." 1>&5
25129
25130				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
25131			fi
25132		fi
25133	done
25134fi
25135
25136			;;
25137		esac
25138	done
25139
25140			;;
25141		esac
25142	fi
25143esac
25144
25145echo "$as_me:25145: checking for db.h" >&5
25146echo $ECHO_N "checking for db.h... $ECHO_C" >&6
25147if test "${ac_cv_header_db_h+set}" = set; then
25148  echo $ECHO_N "(cached) $ECHO_C" >&6
25149else
25150  cat >"conftest.$ac_ext" <<_ACEOF
25151#line 25151 "configure"
25152#include "confdefs.h"
25153#include <db.h>
25154_ACEOF
25155if { (eval echo "$as_me:25155: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25156  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25157  ac_status=$?
25158  $EGREP -v '^ *\+' conftest.er1 >conftest.err
25159  rm -f conftest.er1
25160  cat conftest.err >&5
25161  echo "$as_me:25161: \$? = $ac_status" >&5
25162  (exit "$ac_status"); } >/dev/null; then
25163  if test -s conftest.err; then
25164    ac_cpp_err=$ac_c_preproc_warn_flag
25165  else
25166    ac_cpp_err=
25167  fi
25168else
25169  ac_cpp_err=yes
25170fi
25171if test -z "$ac_cpp_err"; then
25172  ac_cv_header_db_h=yes
25173else
25174  echo "$as_me: failed program was:" >&5
25175  cat "conftest.$ac_ext" >&5
25176  ac_cv_header_db_h=no
25177fi
25178rm -f conftest.err "conftest.$ac_ext"
25179fi
25180echo "$as_me:25180: result: $ac_cv_header_db_h" >&5
25181echo "${ECHO_T}$ac_cv_header_db_h" >&6
25182if test "$ac_cv_header_db_h" = yes; then
25183
25184echo "$as_me:25184: checking for version of db" >&5
25185echo $ECHO_N "checking for version of db... $ECHO_C" >&6
25186if test "${cf_cv_hashed_db_version+set}" = set; then
25187  echo $ECHO_N "(cached) $ECHO_C" >&6
25188else
25189
25190cf_cv_hashed_db_version=unknown
25191
25192for cf_db_version in 1 2 3 4 5 6
25193do
25194
25195echo "${as_me:-configure}:25195: testing checking for db version $cf_db_version ..." 1>&5
25196
25197	cat >"conftest.$ac_ext" <<_ACEOF
25198#line 25198 "configure"
25199#include "confdefs.h"
25200
25201$ac_includes_default
25202#include <db.h>
25203
25204#ifdef DB_VERSION_MAJOR
25205	/* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
25206#if $cf_db_version == DB_VERSION_MAJOR
25207	/* ok */
25208#else
25209	#error $cf_db_version is not DB_VERSION_MAJOR
25210#endif
25211#else
25212#if $cf_db_version == 1
25213	/* ok: assuming this is DB 1.8.5 */
25214#else
25215	#error $cf_db_version is not 1
25216#endif
25217#endif
25218
25219int
25220main (void)
25221{
25222DBT *foo = 0
25223  ;
25224  return 0;
25225}
25226_ACEOF
25227rm -f "conftest.$ac_objext"
25228if { (eval echo "$as_me:25228: \"$ac_compile\"") >&5
25229  (eval $ac_compile) 2>&5
25230  ac_status=$?
25231  echo "$as_me:25231: \$? = $ac_status" >&5
25232  (exit "$ac_status"); } &&
25233         { ac_try='test -s "conftest.$ac_objext"'
25234  { (eval echo "$as_me:25234: \"$ac_try\"") >&5
25235  (eval $ac_try) 2>&5
25236  ac_status=$?
25237  echo "$as_me:25237: \$? = $ac_status" >&5
25238  (exit "$ac_status"); }; }; then
25239
25240	cf_cv_hashed_db_version=$cf_db_version
25241	break
25242
25243else
25244  echo "$as_me: failed program was:" >&5
25245cat "conftest.$ac_ext" >&5
25246fi
25247rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25248done
25249
25250fi
25251echo "$as_me:25251: result: $cf_cv_hashed_db_version" >&5
25252echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
25253
25254if test "$cf_cv_hashed_db_version" = unknown ; then
25255	{ { echo "$as_me:25255: error: Cannot determine version of db" >&5
25256echo "$as_me: error: Cannot determine version of db" >&2;}
25257   { (exit 1); exit 1; }; }
25258else
25259
25260echo "$as_me:25260: checking for db libraries" >&5
25261echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
25262if test "${cf_cv_hashed_db_libs+set}" = set; then
25263  echo $ECHO_N "(cached) $ECHO_C" >&6
25264else
25265
25266cf_cv_hashed_db_libs=unknown
25267for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
25268do
25269	cf_save_libs="$LIBS"
25270	if test -n "$cf_db_libs"; then
25271
25272cf_add_libs="$LIBS"
25273# reverse order
25274cf_add_0lib=
25275for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25276# filter duplicates
25277for cf_add_1lib in $cf_add_0lib; do
25278	for cf_add_2lib in $cf_add_libs; do
25279		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25280			cf_add_1lib=
25281			break
25282		fi
25283	done
25284	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25285done
25286LIBS="$cf_add_libs"
25287
25288	fi
25289
25290echo "${as_me:-configure}:25290: testing checking for library $cf_db_libs ..." 1>&5
25291
25292	cat >"conftest.$ac_ext" <<_ACEOF
25293#line 25293 "configure"
25294#include "confdefs.h"
25295
25296$ac_includes_default
25297#include <db.h>
25298
25299int
25300main (void)
25301{
25302
25303	char *path = "/tmp/foo";
25304#ifdef DB_VERSION_MAJOR
25305#if DB_VERSION_MAJOR >= 4
25306	DB *result = NULL;
25307	db_create(&result, NULL, 0);
25308	result->open(result,
25309		NULL,
25310		path,
25311		path,
25312		DB_HASH,
25313		DB_CREATE,
25314		0644);
25315#elif DB_VERSION_MAJOR >= 3
25316	DB *result = NULL;
25317	db_create(&result, NULL, 0);
25318	result->open(result,
25319		path,
25320		path,
25321		DB_HASH,
25322		DB_CREATE,
25323		0644);
25324#elif DB_VERSION_MAJOR >= 2
25325	DB *result = NULL;
25326	db_open(path,
25327		DB_HASH,
25328		DB_CREATE,
25329		0644,
25330		(DB_ENV *) 0,
25331		(DB_INFO *) 0,
25332		&result);
25333#endif /* DB_VERSION_MAJOR */
25334#else
25335	DB *result = dbopen(path,
25336		     2,
25337		     0644,
25338		     DB_HASH,
25339		     0);
25340#endif
25341	${cf_cv_main_return:-return}(result != NULL)
25342
25343  ;
25344  return 0;
25345}
25346_ACEOF
25347rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25348if { (eval echo "$as_me:25348: \"$ac_link\"") >&5
25349  (eval $ac_link) 2>&5
25350  ac_status=$?
25351  echo "$as_me:25351: \$? = $ac_status" >&5
25352  (exit "$ac_status"); } &&
25353         { ac_try='test -s "conftest$ac_exeext"'
25354  { (eval echo "$as_me:25354: \"$ac_try\"") >&5
25355  (eval $ac_try) 2>&5
25356  ac_status=$?
25357  echo "$as_me:25357: \$? = $ac_status" >&5
25358  (exit "$ac_status"); }; }; then
25359
25360	if test -n "$cf_db_libs" ; then
25361		cf_cv_hashed_db_libs=$cf_db_libs
25362	else
25363		cf_cv_hashed_db_libs=default
25364	fi
25365	LIBS="$cf_save_libs"
25366	break
25367
25368else
25369  echo "$as_me: failed program was:" >&5
25370cat "conftest.$ac_ext" >&5
25371fi
25372rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25373	LIBS="$cf_save_libs"
25374done
25375
25376fi
25377echo "$as_me:25377: result: $cf_cv_hashed_db_libs" >&5
25378echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
25379
25380	if test "$cf_cv_hashed_db_libs" = unknown ; then
25381		{ { echo "$as_me:25381: error: Cannot determine library for db" >&5
25382echo "$as_me: error: Cannot determine library for db" >&2;}
25383   { (exit 1); exit 1; }; }
25384	elif test "$cf_cv_hashed_db_libs" != default ; then
25385
25386cf_add_libs="$LIBS"
25387# reverse order
25388cf_add_0lib=
25389for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25390# filter duplicates
25391for cf_add_1lib in $cf_add_0lib; do
25392	for cf_add_2lib in $cf_add_libs; do
25393		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25394			cf_add_1lib=
25395			break
25396		fi
25397	done
25398	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25399done
25400LIBS="$cf_add_libs"
25401
25402	fi
25403fi
25404
25405else
25406
25407	{ { echo "$as_me:25407: error: Cannot find db.h" >&5
25408echo "$as_me: error: Cannot find db.h" >&2;}
25409   { (exit 1); exit 1; }; }
25410
25411fi
25412
25413fi
25414
25415if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
25416	CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[	]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25417	CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[	]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25418fi
25419
25420# Just in case, check if the C compiler has a bool type.
25421
25422echo "$as_me:25422: checking if we can include stdbool.h" >&5
25423echo $ECHO_N "checking if we can include stdbool.h... $ECHO_C" >&6
25424if test "${cf_cv_header_stdbool_h+set}" = set; then
25425  echo $ECHO_N "(cached) $ECHO_C" >&6
25426else
25427
25428	cat >"conftest.$ac_ext" <<_ACEOF
25429#line 25429 "configure"
25430#include "confdefs.h"
25431
25432$ac_includes_default
25433#include <stdbool.h>
25434
25435int
25436main (void)
25437{
25438bool foo = false; (void)foo
25439  ;
25440  return 0;
25441}
25442_ACEOF
25443rm -f "conftest.$ac_objext"
25444if { (eval echo "$as_me:25444: \"$ac_compile\"") >&5
25445  (eval $ac_compile) 2>&5
25446  ac_status=$?
25447  echo "$as_me:25447: \$? = $ac_status" >&5
25448  (exit "$ac_status"); } &&
25449         { ac_try='test -s "conftest.$ac_objext"'
25450  { (eval echo "$as_me:25450: \"$ac_try\"") >&5
25451  (eval $ac_try) 2>&5
25452  ac_status=$?
25453  echo "$as_me:25453: \$? = $ac_status" >&5
25454  (exit "$ac_status"); }; }; then
25455  cf_cv_header_stdbool_h=yes
25456else
25457  echo "$as_me: failed program was:" >&5
25458cat "conftest.$ac_ext" >&5
25459cat >"conftest.$ac_ext" <<_ACEOF
25460#line 25460 "configure"
25461#include "confdefs.h"
25462
25463int
25464main (void)
25465{
25466bool foo = false; (void)foo
25467  ;
25468  return 0;
25469}
25470_ACEOF
25471rm -f "conftest.$ac_objext"
25472if { (eval echo "$as_me:25472: \"$ac_compile\"") >&5
25473  (eval $ac_compile) 2>&5
25474  ac_status=$?
25475  echo "$as_me:25475: \$? = $ac_status" >&5
25476  (exit "$ac_status"); } &&
25477         { ac_try='test -s "conftest.$ac_objext"'
25478  { (eval echo "$as_me:25478: \"$ac_try\"") >&5
25479  (eval $ac_try) 2>&5
25480  ac_status=$?
25481  echo "$as_me:25481: \$? = $ac_status" >&5
25482  (exit "$ac_status"); }; }; then
25483  cf_cv_header_stdbool_h=no
25484else
25485  echo "$as_me: failed program was:" >&5
25486cat "conftest.$ac_ext" >&5
25487fi
25488rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25489fi
25490rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25491fi
25492echo "$as_me:25492: result: $cf_cv_header_stdbool_h" >&5
25493echo "${ECHO_T}$cf_cv_header_stdbool_h" >&6
25494
25495if test "$cf_cv_header_stdbool_h" = yes
25496then	USE_STDBOOL_H=1
25497else	USE_STDBOOL_H=0
25498fi
25499
25500echo "$as_me:25500: checking for builtin bool type" >&5
25501echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25502if test "${cf_cv_cc_bool_type+set}" = set; then
25503  echo $ECHO_N "(cached) $ECHO_C" >&6
25504else
25505
25506	cat >"conftest.$ac_ext" <<_ACEOF
25507#line 25507 "configure"
25508#include "confdefs.h"
25509
25510$ac_includes_default
25511
25512int
25513main (void)
25514{
25515bool x = false; (void)x
25516  ;
25517  return 0;
25518}
25519_ACEOF
25520rm -f "conftest.$ac_objext"
25521if { (eval echo "$as_me:25521: \"$ac_compile\"") >&5
25522  (eval $ac_compile) 2>&5
25523  ac_status=$?
25524  echo "$as_me:25524: \$? = $ac_status" >&5
25525  (exit "$ac_status"); } &&
25526         { ac_try='test -s "conftest.$ac_objext"'
25527  { (eval echo "$as_me:25527: \"$ac_try\"") >&5
25528  (eval $ac_try) 2>&5
25529  ac_status=$?
25530  echo "$as_me:25530: \$? = $ac_status" >&5
25531  (exit "$ac_status"); }; }; then
25532  cf_cv_cc_bool_type=yes
25533else
25534  echo "$as_me: failed program was:" >&5
25535cat "conftest.$ac_ext" >&5
25536cf_cv_cc_bool_type=no
25537fi
25538rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25539fi
25540echo "$as_me:25540: result: $cf_cv_cc_bool_type" >&5
25541echo "${ECHO_T}$cf_cv_cc_bool_type" >&6
25542
25543if test "$cf_cv_cc_bool_type" = yes; then
25544	USE_BUILTIN_BOOL=1
25545else
25546	USE_BUILTIN_BOOL=0
25547fi
25548
25549test "$cf_cv_header_stdbool_h" = yes &&
25550cat >>confdefs.h <<\EOF
25551#define USE_STDBOOL_H 1
25552EOF
25553
25554# Check for C++ compiler characteristics (and ensure that it's there!)
25555if test -n "$CXX" ; then
25556	ac_ext=cc
25557ac_cpp='$CXXCPP $CPPFLAGS'
25558ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25559ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25560ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25561ac_main_return="return"
25562
25563if test -n "$GXX" ; then
25564
25565	cf_save="$LIBS"
25566	LIBS="$LIBS $CXXLIBS"
25567	echo "$as_me:25567: checking if we already have C++ library" >&5
25568echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25569	cat >"conftest.$ac_ext" <<_ACEOF
25570#line 25570 "configure"
25571#include "confdefs.h"
25572
25573			#include <iostream>
25574int
25575main (void)
25576{
25577
25578			std::cout << "Hello World!" << std::endl;
25579  ;
25580  return 0;
25581}
25582_ACEOF
25583rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25584if { (eval echo "$as_me:25584: \"$ac_link\"") >&5
25585  (eval $ac_link) 2>&5
25586  ac_status=$?
25587  echo "$as_me:25587: \$? = $ac_status" >&5
25588  (exit "$ac_status"); } &&
25589         { ac_try='test -s "conftest$ac_exeext"'
25590  { (eval echo "$as_me:25590: \"$ac_try\"") >&5
25591  (eval $ac_try) 2>&5
25592  ac_status=$?
25593  echo "$as_me:25593: \$? = $ac_status" >&5
25594  (exit "$ac_status"); }; }; then
25595  cf_have_libstdcpp=yes
25596else
25597  echo "$as_me: failed program was:" >&5
25598cat "conftest.$ac_ext" >&5
25599cf_have_libstdcpp=no
25600fi
25601rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25602	echo "$as_me:25602: result: $cf_have_libstdcpp" >&5
25603echo "${ECHO_T}$cf_have_libstdcpp" >&6
25604	LIBS="$cf_save"
25605
25606	if test "$cf_have_libstdcpp" != yes
25607	then
25608		case "$cf_cv_system_name" in
25609		(os2*)
25610			if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25611				cf_stdcpp_libname=stdcpp
25612			else
25613				cf_stdcpp_libname=stdc++
25614			fi
25615			;;
25616		(*)
25617			cf_stdcpp_libname=stdc++
25618			;;
25619		esac
25620
25621		echo "$as_me:25621: checking for library $cf_stdcpp_libname" >&5
25622echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25623if test "${cf_cv_libstdcpp+set}" = set; then
25624  echo $ECHO_N "(cached) $ECHO_C" >&6
25625else
25626
25627			cf_save="$LIBS"
25628			LIBS="$LIBS $CXXLIBS"
25629
25630cf_add_libs="$LIBS"
25631# reverse order
25632cf_add_0lib=
25633for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25634# filter duplicates
25635for cf_add_1lib in $cf_add_0lib; do
25636	for cf_add_2lib in $cf_add_libs; do
25637		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25638			cf_add_1lib=
25639			break
25640		fi
25641	done
25642	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25643done
25644LIBS="$cf_add_libs"
25645
25646		cat >"conftest.$ac_ext" <<_ACEOF
25647#line 25647 "configure"
25648#include "confdefs.h"
25649
25650				#include <iostream>
25651int
25652main (void)
25653{
25654
25655				std::cout << "Hello World!" << std::endl;
25656  ;
25657  return 0;
25658}
25659_ACEOF
25660rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25661if { (eval echo "$as_me:25661: \"$ac_link\"") >&5
25662  (eval $ac_link) 2>&5
25663  ac_status=$?
25664  echo "$as_me:25664: \$? = $ac_status" >&5
25665  (exit "$ac_status"); } &&
25666         { ac_try='test -s "conftest$ac_exeext"'
25667  { (eval echo "$as_me:25667: \"$ac_try\"") >&5
25668  (eval $ac_try) 2>&5
25669  ac_status=$?
25670  echo "$as_me:25670: \$? = $ac_status" >&5
25671  (exit "$ac_status"); }; }; then
25672  cf_cv_libstdcpp=yes
25673else
25674  echo "$as_me: failed program was:" >&5
25675cat "conftest.$ac_ext" >&5
25676cf_cv_libstdcpp=no
25677fi
25678rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25679			LIBS="$cf_save"
25680
25681fi
25682echo "$as_me:25682: result: $cf_cv_libstdcpp" >&5
25683echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25684		test "$cf_cv_libstdcpp" = yes && {
25685cf_add_libs="$CXXLIBS"
25686# reverse order
25687cf_add_0lib=
25688for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25689# filter duplicates
25690for cf_add_1lib in $cf_add_0lib; do
25691	for cf_add_2lib in $cf_add_libs; do
25692		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25693			cf_add_1lib=
25694			break
25695		fi
25696	done
25697	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25698done
25699CXXLIBS="$cf_add_libs"
25700 }
25701	fi
25702fi
25703
25704	echo "$as_me:25704: checking whether $CXX understands -c and -o together" >&5
25705echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25706if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25707  echo $ECHO_N "(cached) $ECHO_C" >&6
25708else
25709
25710cat > conftest.$ac_ext <<CF_EOF
25711int main(void)
25712{
25713	${cf_cv_main_return:-return}(0);
25714}
25715CF_EOF
25716# We do the test twice because some compilers refuse to overwrite an
25717# existing .o file with -o, though they will create one.
25718ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25719if { (eval echo "$as_me:25719: \"$ac_try\"") >&5
25720  (eval $ac_try) 2>&5
25721  ac_status=$?
25722  echo "$as_me:25722: \$? = $ac_status" >&5
25723  (exit "$ac_status"); } &&
25724  test -f conftest2.$ac_objext && { (eval echo "$as_me:25724: \"$ac_try\"") >&5
25725  (eval $ac_try) 2>&5
25726  ac_status=$?
25727  echo "$as_me:25727: \$? = $ac_status" >&5
25728  (exit "$ac_status"); };
25729then
25730  eval cf_cv_prog_CXX_c_o=yes
25731else
25732  eval cf_cv_prog_CXX_c_o=no
25733fi
25734rm -rf ./conftest*
25735
25736fi
25737if test "$cf_cv_prog_CXX_c_o" = yes; then
25738  echo "$as_me:25738: result: yes" >&5
25739echo "${ECHO_T}yes" >&6
25740else
25741  echo "$as_me:25741: result: no" >&5
25742echo "${ECHO_T}no" >&6
25743fi
25744
25745	case "$GXX_VERSION" in
25746	(1.*|2.[0-6]*|[1-9][0-9].*)
25747		cf_cxx_library=yes
25748		;;
25749	(*-2.7*|2.7*)
25750
25751cf_cxx_library=unknown
25752case "$cf_cv_system_name" in
25753(os2*)
25754	cf_gpp_libname=gpp
25755	;;
25756(*)
25757	cf_gpp_libname=g++
25758	;;
25759esac
25760if test "$GXX" = yes; then
25761	echo "$as_me:25761: checking for lib$cf_gpp_libname" >&5
25762echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25763	cf_save="$LIBS"
25764
25765cf_add_libs="$LIBS"
25766# reverse order
25767cf_add_0lib=
25768for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25769# filter duplicates
25770for cf_add_1lib in $cf_add_0lib; do
25771	for cf_add_2lib in $cf_add_libs; do
25772		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25773			cf_add_1lib=
25774			break
25775		fi
25776	done
25777	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25778done
25779LIBS="$cf_add_libs"
25780
25781	cat >"conftest.$ac_ext" <<_ACEOF
25782#line 25782 "configure"
25783#include "confdefs.h"
25784
25785#include <$cf_gpp_libname/builtin.h>
25786
25787int
25788main (void)
25789{
25790two_arg_error_handler_t foo2 = lib_error_handler
25791  ;
25792  return 0;
25793}
25794_ACEOF
25795rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25796if { (eval echo "$as_me:25796: \"$ac_link\"") >&5
25797  (eval $ac_link) 2>&5
25798  ac_status=$?
25799  echo "$as_me:25799: \$? = $ac_status" >&5
25800  (exit "$ac_status"); } &&
25801         { ac_try='test -s "conftest$ac_exeext"'
25802  { (eval echo "$as_me:25802: \"$ac_try\"") >&5
25803  (eval $ac_try) 2>&5
25804  ac_status=$?
25805  echo "$as_me:25805: \$? = $ac_status" >&5
25806  (exit "$ac_status"); }; }; then
25807  cf_cxx_library=yes
25808
25809cf_add_libs="$CXXLIBS"
25810# reverse order
25811cf_add_0lib=
25812for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25813# filter duplicates
25814for cf_add_1lib in $cf_add_0lib; do
25815	for cf_add_2lib in $cf_add_libs; do
25816		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25817			cf_add_1lib=
25818			break
25819		fi
25820	done
25821	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25822done
25823CXXLIBS="$cf_add_libs"
25824
25825	 if test "$cf_gpp_libname" = cpp ; then
25826
25827cat >>confdefs.h <<\EOF
25828#define HAVE_GPP_BUILTIN_H 1
25829EOF
25830
25831	 else
25832
25833cat >>confdefs.h <<\EOF
25834#define HAVE_GXX_BUILTIN_H 1
25835EOF
25836
25837	 fi
25838else
25839  echo "$as_me: failed program was:" >&5
25840cat "conftest.$ac_ext" >&5
25841cat >"conftest.$ac_ext" <<_ACEOF
25842#line 25842 "configure"
25843#include "confdefs.h"
25844
25845#include <builtin.h>
25846
25847int
25848main (void)
25849{
25850two_arg_error_handler_t foo2 = lib_error_handler
25851  ;
25852  return 0;
25853}
25854_ACEOF
25855rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25856if { (eval echo "$as_me:25856: \"$ac_link\"") >&5
25857  (eval $ac_link) 2>&5
25858  ac_status=$?
25859  echo "$as_me:25859: \$? = $ac_status" >&5
25860  (exit "$ac_status"); } &&
25861         { ac_try='test -s "conftest$ac_exeext"'
25862  { (eval echo "$as_me:25862: \"$ac_try\"") >&5
25863  (eval $ac_try) 2>&5
25864  ac_status=$?
25865  echo "$as_me:25865: \$? = $ac_status" >&5
25866  (exit "$ac_status"); }; }; then
25867  cf_cxx_library=yes
25868
25869cf_add_libs="$CXXLIBS"
25870# reverse order
25871cf_add_0lib=
25872for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25873# filter duplicates
25874for cf_add_1lib in $cf_add_0lib; do
25875	for cf_add_2lib in $cf_add_libs; do
25876		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25877			cf_add_1lib=
25878			break
25879		fi
25880	done
25881	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25882done
25883CXXLIBS="$cf_add_libs"
25884
25885cat >>confdefs.h <<\EOF
25886#define HAVE_BUILTIN_H 1
25887EOF
25888
25889else
25890  echo "$as_me: failed program was:" >&5
25891cat "conftest.$ac_ext" >&5
25892cf_cxx_library=no
25893fi
25894rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25895fi
25896rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25897	LIBS="$cf_save"
25898	echo "$as_me:25898: result: $cf_cxx_library" >&5
25899echo "${ECHO_T}$cf_cxx_library" >&6
25900fi
25901
25902		;;
25903	(*)
25904		cf_cxx_library=no
25905		;;
25906	esac
25907
25908	ac_ext=cc
25909ac_cpp='$CXXCPP $CPPFLAGS'
25910ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25911ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25912ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25913ac_main_return="return"
25914echo "$as_me:25914: checking how to run the C++ preprocessor" >&5
25915echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25916if test -z "$CXXCPP"; then
25917  if test "${ac_cv_prog_CXXCPP+set}" = set; then
25918  echo $ECHO_N "(cached) $ECHO_C" >&6
25919else
25920      # Double quotes because CXXCPP needs to be expanded
25921    for CXXCPP in "$CXX -E" "/lib/cpp"
25922    do
25923      ac_preproc_ok=false
25924for ac_cxx_preproc_warn_flag in '' yes
25925do
25926  # Use a header file that comes with gcc, so configuring glibc
25927  # with a fresh cross-compiler works.
25928  # On the NeXT, cc -E runs the code through the compiler's parser,
25929  # not just through cpp. "Syntax error" is here to catch this case.
25930  cat >"conftest.$ac_ext" <<_ACEOF
25931#line 25931 "configure"
25932#include "confdefs.h"
25933#include <assert.h>
25934                     Syntax error
25935_ACEOF
25936if { (eval echo "$as_me:25936: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25937  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25938  ac_status=$?
25939  $EGREP -v '^ *\+' conftest.er1 >conftest.err
25940  rm -f conftest.er1
25941  cat conftest.err >&5
25942  echo "$as_me:25942: \$? = $ac_status" >&5
25943  (exit "$ac_status"); } >/dev/null; then
25944  if test -s conftest.err; then
25945    ac_cpp_err=$ac_cxx_preproc_warn_flag
25946  else
25947    ac_cpp_err=
25948  fi
25949else
25950  ac_cpp_err=yes
25951fi
25952if test -z "$ac_cpp_err"; then
25953  :
25954else
25955  echo "$as_me: failed program was:" >&5
25956  cat "conftest.$ac_ext" >&5
25957  # Broken: fails on valid input.
25958continue
25959fi
25960rm -f conftest.err "conftest.$ac_ext"
25961
25962  # OK, works on sane cases.  Now check whether non-existent headers
25963  # can be detected and how.
25964  cat >"conftest.$ac_ext" <<_ACEOF
25965#line 25965 "configure"
25966#include "confdefs.h"
25967#include <ac_nonexistent.h>
25968_ACEOF
25969if { (eval echo "$as_me:25969: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25970  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25971  ac_status=$?
25972  $EGREP -v '^ *\+' conftest.er1 >conftest.err
25973  rm -f conftest.er1
25974  cat conftest.err >&5
25975  echo "$as_me:25975: \$? = $ac_status" >&5
25976  (exit "$ac_status"); } >/dev/null; then
25977  if test -s conftest.err; then
25978    ac_cpp_err=$ac_cxx_preproc_warn_flag
25979  else
25980    ac_cpp_err=
25981  fi
25982else
25983  ac_cpp_err=yes
25984fi
25985if test -z "$ac_cpp_err"; then
25986  # Broken: success on invalid input.
25987continue
25988else
25989  echo "$as_me: failed program was:" >&5
25990  cat "conftest.$ac_ext" >&5
25991  # Passes both tests.
25992ac_preproc_ok=:
25993break
25994fi
25995rm -f conftest.err "conftest.$ac_ext"
25996
25997done
25998# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25999rm -f conftest.err "conftest.$ac_ext"
26000if $ac_preproc_ok; then
26001  break
26002fi
26003
26004    done
26005    ac_cv_prog_CXXCPP=$CXXCPP
26006
26007fi
26008  CXXCPP=$ac_cv_prog_CXXCPP
26009else
26010  ac_cv_prog_CXXCPP=$CXXCPP
26011fi
26012echo "$as_me:26012: result: $CXXCPP" >&5
26013echo "${ECHO_T}$CXXCPP" >&6
26014ac_preproc_ok=false
26015for ac_cxx_preproc_warn_flag in '' yes
26016do
26017  # Use a header file that comes with gcc, so configuring glibc
26018  # with a fresh cross-compiler works.
26019  # On the NeXT, cc -E runs the code through the compiler's parser,
26020  # not just through cpp. "Syntax error" is here to catch this case.
26021  cat >"conftest.$ac_ext" <<_ACEOF
26022#line 26022 "configure"
26023#include "confdefs.h"
26024#include <assert.h>
26025                     Syntax error
26026_ACEOF
26027if { (eval echo "$as_me:26027: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26028  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26029  ac_status=$?
26030  $EGREP -v '^ *\+' conftest.er1 >conftest.err
26031  rm -f conftest.er1
26032  cat conftest.err >&5
26033  echo "$as_me:26033: \$? = $ac_status" >&5
26034  (exit "$ac_status"); } >/dev/null; then
26035  if test -s conftest.err; then
26036    ac_cpp_err=$ac_cxx_preproc_warn_flag
26037  else
26038    ac_cpp_err=
26039  fi
26040else
26041  ac_cpp_err=yes
26042fi
26043if test -z "$ac_cpp_err"; then
26044  :
26045else
26046  echo "$as_me: failed program was:" >&5
26047  cat "conftest.$ac_ext" >&5
26048  # Broken: fails on valid input.
26049continue
26050fi
26051rm -f conftest.err "conftest.$ac_ext"
26052
26053  # OK, works on sane cases.  Now check whether non-existent headers
26054  # can be detected and how.
26055  cat >"conftest.$ac_ext" <<_ACEOF
26056#line 26056 "configure"
26057#include "confdefs.h"
26058#include <ac_nonexistent.h>
26059_ACEOF
26060if { (eval echo "$as_me:26060: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26061  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26062  ac_status=$?
26063  $EGREP -v '^ *\+' conftest.er1 >conftest.err
26064  rm -f conftest.er1
26065  cat conftest.err >&5
26066  echo "$as_me:26066: \$? = $ac_status" >&5
26067  (exit "$ac_status"); } >/dev/null; then
26068  if test -s conftest.err; then
26069    ac_cpp_err=$ac_cxx_preproc_warn_flag
26070  else
26071    ac_cpp_err=
26072  fi
26073else
26074  ac_cpp_err=yes
26075fi
26076if test -z "$ac_cpp_err"; then
26077  # Broken: success on invalid input.
26078continue
26079else
26080  echo "$as_me: failed program was:" >&5
26081  cat "conftest.$ac_ext" >&5
26082  # Passes both tests.
26083ac_preproc_ok=:
26084break
26085fi
26086rm -f conftest.err "conftest.$ac_ext"
26087
26088done
26089# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
26090rm -f conftest.err "conftest.$ac_ext"
26091if $ac_preproc_ok; then
26092  :
26093else
26094  { { echo "$as_me:26094: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
26095echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
26096   { (exit 1); exit 1; }; }
26097fi
26098
26099ac_ext=cc
26100ac_cpp='$CXXCPP $CPPFLAGS'
26101ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26102ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26103ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26104ac_main_return="return"
26105
26106for ac_header in new exception typeinfo
26107do
26108as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26109echo "$as_me:26109: checking for $ac_header" >&5
26110echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26111if eval "test \"\${$as_ac_Header+set}\" = set"; then
26112  echo $ECHO_N "(cached) $ECHO_C" >&6
26113else
26114  cat >"conftest.$ac_ext" <<_ACEOF
26115#line 26115 "configure"
26116#include "confdefs.h"
26117#include <$ac_header>
26118_ACEOF
26119if { (eval echo "$as_me:26119: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26120  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26121  ac_status=$?
26122  $EGREP -v '^ *\+' conftest.er1 >conftest.err
26123  rm -f conftest.er1
26124  cat conftest.err >&5
26125  echo "$as_me:26125: \$? = $ac_status" >&5
26126  (exit "$ac_status"); } >/dev/null; then
26127  if test -s conftest.err; then
26128    ac_cpp_err=$ac_cxx_preproc_warn_flag
26129  else
26130    ac_cpp_err=
26131  fi
26132else
26133  ac_cpp_err=yes
26134fi
26135if test -z "$ac_cpp_err"; then
26136  eval "$as_ac_Header=yes"
26137else
26138  echo "$as_me: failed program was:" >&5
26139  cat "conftest.$ac_ext" >&5
26140  eval "$as_ac_Header=no"
26141fi
26142rm -f conftest.err "conftest.$ac_ext"
26143fi
26144echo "$as_me:26144: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
26145echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
26146if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
26147  cat >>confdefs.h <<EOF
26148#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26149EOF
26150
26151fi
26152done
26153
26154for ac_header in iostream
26155do
26156as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26157echo "$as_me:26157: checking for $ac_header" >&5
26158echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26159if eval "test \"\${$as_ac_Header+set}\" = set"; then
26160  echo $ECHO_N "(cached) $ECHO_C" >&6
26161else
26162  cat >"conftest.$ac_ext" <<_ACEOF
26163#line 26163 "configure"
26164#include "confdefs.h"
26165#include <$ac_header>
26166_ACEOF
26167if { (eval echo "$as_me:26167: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26168  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26169  ac_status=$?
26170  $EGREP -v '^ *\+' conftest.er1 >conftest.err
26171  rm -f conftest.er1
26172  cat conftest.err >&5
26173  echo "$as_me:26173: \$? = $ac_status" >&5
26174  (exit "$ac_status"); } >/dev/null; then
26175  if test -s conftest.err; then
26176    ac_cpp_err=$ac_cxx_preproc_warn_flag
26177  else
26178    ac_cpp_err=
26179  fi
26180else
26181  ac_cpp_err=yes
26182fi
26183if test -z "$ac_cpp_err"; then
26184  eval "$as_ac_Header=yes"
26185else
26186  echo "$as_me: failed program was:" >&5
26187  cat "conftest.$ac_ext" >&5
26188  eval "$as_ac_Header=no"
26189fi
26190rm -f conftest.err "conftest.$ac_ext"
26191fi
26192echo "$as_me:26192: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
26193echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
26194if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
26195  cat >>confdefs.h <<EOF
26196#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26197EOF
26198
26199fi
26200done
26201
26202if test x"$ac_cv_header_iostream" = xyes ; then
26203	echo "$as_me:26203: checking if iostream uses std-namespace" >&5
26204echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
26205	cat >"conftest.$ac_ext" <<_ACEOF
26206#line 26206 "configure"
26207#include "confdefs.h"
26208
26209#include <iostream>
26210using std::endl;
26211using std::cerr;
26212int
26213main (void)
26214{
26215
26216cerr << "testing" << endl;
26217
26218  ;
26219  return 0;
26220}
26221_ACEOF
26222rm -f "conftest.$ac_objext"
26223if { (eval echo "$as_me:26223: \"$ac_compile\"") >&5
26224  (eval $ac_compile) 2>&5
26225  ac_status=$?
26226  echo "$as_me:26226: \$? = $ac_status" >&5
26227  (exit "$ac_status"); } &&
26228         { ac_try='test -s "conftest.$ac_objext"'
26229  { (eval echo "$as_me:26229: \"$ac_try\"") >&5
26230  (eval $ac_try) 2>&5
26231  ac_status=$?
26232  echo "$as_me:26232: \$? = $ac_status" >&5
26233  (exit "$ac_status"); }; }; then
26234  cf_iostream_namespace=yes
26235else
26236  echo "$as_me: failed program was:" >&5
26237cat "conftest.$ac_ext" >&5
26238cf_iostream_namespace=no
26239fi
26240rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26241	echo "$as_me:26241: result: $cf_iostream_namespace" >&5
26242echo "${ECHO_T}$cf_iostream_namespace" >&6
26243	if test "$cf_iostream_namespace" = yes ; then
26244
26245cat >>confdefs.h <<\EOF
26246#define IOSTREAM_NAMESPACE 1
26247EOF
26248
26249	fi
26250fi
26251
26252echo "$as_me:26252: checking for builtin bool type" >&5
26253echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
26254if test "${cf_cv_builtin_bool+set}" = set; then
26255  echo $ECHO_N "(cached) $ECHO_C" >&6
26256else
26257
26258	cat >"conftest.$ac_ext" <<_ACEOF
26259#line 26259 "configure"
26260#include "confdefs.h"
26261
26262$ac_includes_default
26263
26264int
26265main (void)
26266{
26267bool x = false; (void)x
26268  ;
26269  return 0;
26270}
26271_ACEOF
26272rm -f "conftest.$ac_objext"
26273if { (eval echo "$as_me:26273: \"$ac_compile\"") >&5
26274  (eval $ac_compile) 2>&5
26275  ac_status=$?
26276  echo "$as_me:26276: \$? = $ac_status" >&5
26277  (exit "$ac_status"); } &&
26278         { ac_try='test -s "conftest.$ac_objext"'
26279  { (eval echo "$as_me:26279: \"$ac_try\"") >&5
26280  (eval $ac_try) 2>&5
26281  ac_status=$?
26282  echo "$as_me:26282: \$? = $ac_status" >&5
26283  (exit "$ac_status"); }; }; then
26284  cf_cv_builtin_bool=yes
26285else
26286  echo "$as_me: failed program was:" >&5
26287cat "conftest.$ac_ext" >&5
26288cf_cv_builtin_bool=no
26289fi
26290rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26291fi
26292echo "$as_me:26292: result: $cf_cv_builtin_bool" >&5
26293echo "${ECHO_T}$cf_cv_builtin_bool" >&6
26294
26295echo "$as_me:26295: checking for bool" >&5
26296echo $ECHO_N "checking for bool... $ECHO_C" >&6
26297if test "${ac_cv_type_bool+set}" = set; then
26298  echo $ECHO_N "(cached) $ECHO_C" >&6
26299else
26300  cat >"conftest.$ac_ext" <<_ACEOF
26301#line 26301 "configure"
26302#include "confdefs.h"
26303
26304$ac_includes_default
26305
26306#if defined(__cplusplus)
26307
26308#ifdef HAVE_GXX_BUILTIN_H
26309#include <g++/builtin.h>
26310#elif HAVE_GPP_BUILTIN_H
26311#include <gpp/builtin.h>
26312#elif HAVE_BUILTIN_H
26313#include <builtin.h>
26314#endif
26315
26316#else
26317
26318#if $USE_STDBOOL_H
26319#include <stdbool.h>
26320#endif
26321
26322#endif
26323
26324int
26325main (void)
26326{
26327if ((bool *) 0)
26328  return 0;
26329if (sizeof (bool))
26330  return 0;
26331  ;
26332  return 0;
26333}
26334_ACEOF
26335rm -f "conftest.$ac_objext"
26336if { (eval echo "$as_me:26336: \"$ac_compile\"") >&5
26337  (eval $ac_compile) 2>&5
26338  ac_status=$?
26339  echo "$as_me:26339: \$? = $ac_status" >&5
26340  (exit "$ac_status"); } &&
26341         { ac_try='test -s "conftest.$ac_objext"'
26342  { (eval echo "$as_me:26342: \"$ac_try\"") >&5
26343  (eval $ac_try) 2>&5
26344  ac_status=$?
26345  echo "$as_me:26345: \$? = $ac_status" >&5
26346  (exit "$ac_status"); }; }; then
26347  ac_cv_type_bool=yes
26348else
26349  echo "$as_me: failed program was:" >&5
26350cat "conftest.$ac_ext" >&5
26351ac_cv_type_bool=no
26352fi
26353rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26354fi
26355echo "$as_me:26355: result: $ac_cv_type_bool" >&5
26356echo "${ECHO_T}$ac_cv_type_bool" >&6
26357
26358echo "$as_me:26358: checking size of bool" >&5
26359echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26360if test "${ac_cv_sizeof_bool+set}" = set; then
26361  echo $ECHO_N "(cached) $ECHO_C" >&6
26362else
26363  if test "$ac_cv_type_bool" = yes; then
26364  if test "$cross_compiling" = yes; then
26365  # Depending upon the size, compute the lo and hi bounds.
26366cat >"conftest.$ac_ext" <<_ACEOF
26367#line 26367 "configure"
26368#include "confdefs.h"
26369
26370$ac_includes_default
26371
26372#if defined(__cplusplus)
26373
26374#ifdef HAVE_GXX_BUILTIN_H
26375#include <g++/builtin.h>
26376#elif HAVE_GPP_BUILTIN_H
26377#include <gpp/builtin.h>
26378#elif HAVE_BUILTIN_H
26379#include <builtin.h>
26380#endif
26381
26382#else
26383
26384#if $USE_STDBOOL_H
26385#include <stdbool.h>
26386#endif
26387
26388#endif
26389
26390int
26391main (void)
26392{
26393int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26394  ;
26395  return 0;
26396}
26397_ACEOF
26398rm -f "conftest.$ac_objext"
26399if { (eval echo "$as_me:26399: \"$ac_compile\"") >&5
26400  (eval $ac_compile) 2>&5
26401  ac_status=$?
26402  echo "$as_me:26402: \$? = $ac_status" >&5
26403  (exit "$ac_status"); } &&
26404         { ac_try='test -s "conftest.$ac_objext"'
26405  { (eval echo "$as_me:26405: \"$ac_try\"") >&5
26406  (eval $ac_try) 2>&5
26407  ac_status=$?
26408  echo "$as_me:26408: \$? = $ac_status" >&5
26409  (exit "$ac_status"); }; }; then
26410  ac_lo=0 ac_mid=0
26411  while :; do
26412    cat >"conftest.$ac_ext" <<_ACEOF
26413#line 26413 "configure"
26414#include "confdefs.h"
26415
26416$ac_includes_default
26417
26418#if defined(__cplusplus)
26419
26420#ifdef HAVE_GXX_BUILTIN_H
26421#include <g++/builtin.h>
26422#elif HAVE_GPP_BUILTIN_H
26423#include <gpp/builtin.h>
26424#elif HAVE_BUILTIN_H
26425#include <builtin.h>
26426#endif
26427
26428#else
26429
26430#if $USE_STDBOOL_H
26431#include <stdbool.h>
26432#endif
26433
26434#endif
26435
26436int
26437main (void)
26438{
26439int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26440  ;
26441  return 0;
26442}
26443_ACEOF
26444rm -f "conftest.$ac_objext"
26445if { (eval echo "$as_me:26445: \"$ac_compile\"") >&5
26446  (eval $ac_compile) 2>&5
26447  ac_status=$?
26448  echo "$as_me:26448: \$? = $ac_status" >&5
26449  (exit "$ac_status"); } &&
26450         { ac_try='test -s "conftest.$ac_objext"'
26451  { (eval echo "$as_me:26451: \"$ac_try\"") >&5
26452  (eval $ac_try) 2>&5
26453  ac_status=$?
26454  echo "$as_me:26454: \$? = $ac_status" >&5
26455  (exit "$ac_status"); }; }; then
26456  ac_hi=$ac_mid; break
26457else
26458  echo "$as_me: failed program was:" >&5
26459cat "conftest.$ac_ext" >&5
26460ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26461fi
26462rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26463  done
26464else
26465  echo "$as_me: failed program was:" >&5
26466cat "conftest.$ac_ext" >&5
26467ac_hi=-1 ac_mid=-1
26468  while :; do
26469    cat >"conftest.$ac_ext" <<_ACEOF
26470#line 26470 "configure"
26471#include "confdefs.h"
26472
26473$ac_includes_default
26474
26475#if defined(__cplusplus)
26476
26477#ifdef HAVE_GXX_BUILTIN_H
26478#include <g++/builtin.h>
26479#elif HAVE_GPP_BUILTIN_H
26480#include <gpp/builtin.h>
26481#elif HAVE_BUILTIN_H
26482#include <builtin.h>
26483#endif
26484
26485#else
26486
26487#if $USE_STDBOOL_H
26488#include <stdbool.h>
26489#endif
26490
26491#endif
26492
26493int
26494main (void)
26495{
26496int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26497  ;
26498  return 0;
26499}
26500_ACEOF
26501rm -f "conftest.$ac_objext"
26502if { (eval echo "$as_me:26502: \"$ac_compile\"") >&5
26503  (eval $ac_compile) 2>&5
26504  ac_status=$?
26505  echo "$as_me:26505: \$? = $ac_status" >&5
26506  (exit "$ac_status"); } &&
26507         { ac_try='test -s "conftest.$ac_objext"'
26508  { (eval echo "$as_me:26508: \"$ac_try\"") >&5
26509  (eval $ac_try) 2>&5
26510  ac_status=$?
26511  echo "$as_me:26511: \$? = $ac_status" >&5
26512  (exit "$ac_status"); }; }; then
26513  ac_lo=$ac_mid; break
26514else
26515  echo "$as_me: failed program was:" >&5
26516cat "conftest.$ac_ext" >&5
26517ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26518fi
26519rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26520  done
26521fi
26522rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26523# Binary search between lo and hi bounds.
26524while test "x$ac_lo" != "x$ac_hi"; do
26525  ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26526  cat >"conftest.$ac_ext" <<_ACEOF
26527#line 26527 "configure"
26528#include "confdefs.h"
26529
26530$ac_includes_default
26531
26532#if defined(__cplusplus)
26533
26534#ifdef HAVE_GXX_BUILTIN_H
26535#include <g++/builtin.h>
26536#elif HAVE_GPP_BUILTIN_H
26537#include <gpp/builtin.h>
26538#elif HAVE_BUILTIN_H
26539#include <builtin.h>
26540#endif
26541
26542#else
26543
26544#if $USE_STDBOOL_H
26545#include <stdbool.h>
26546#endif
26547
26548#endif
26549
26550int
26551main (void)
26552{
26553int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26554  ;
26555  return 0;
26556}
26557_ACEOF
26558rm -f "conftest.$ac_objext"
26559if { (eval echo "$as_me:26559: \"$ac_compile\"") >&5
26560  (eval $ac_compile) 2>&5
26561  ac_status=$?
26562  echo "$as_me:26562: \$? = $ac_status" >&5
26563  (exit "$ac_status"); } &&
26564         { ac_try='test -s "conftest.$ac_objext"'
26565  { (eval echo "$as_me:26565: \"$ac_try\"") >&5
26566  (eval $ac_try) 2>&5
26567  ac_status=$?
26568  echo "$as_me:26568: \$? = $ac_status" >&5
26569  (exit "$ac_status"); }; }; then
26570  ac_hi=$ac_mid
26571else
26572  echo "$as_me: failed program was:" >&5
26573cat "conftest.$ac_ext" >&5
26574ac_lo=`expr "$ac_mid" + 1`
26575fi
26576rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26577done
26578ac_cv_sizeof_bool=$ac_lo
26579else
26580  if test "$cross_compiling" = yes; then
26581  { { echo "$as_me:26581: error: cannot run test program while cross compiling" >&5
26582echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26583   { (exit 1); exit 1; }; }
26584else
26585  cat >"conftest.$ac_ext" <<_ACEOF
26586#line 26586 "configure"
26587#include "confdefs.h"
26588
26589$ac_includes_default
26590
26591#if defined(__cplusplus)
26592
26593#ifdef HAVE_GXX_BUILTIN_H
26594#include <g++/builtin.h>
26595#elif HAVE_GPP_BUILTIN_H
26596#include <gpp/builtin.h>
26597#elif HAVE_BUILTIN_H
26598#include <builtin.h>
26599#endif
26600
26601#else
26602
26603#if $USE_STDBOOL_H
26604#include <stdbool.h>
26605#endif
26606
26607#endif
26608
26609int
26610main (void)
26611{
26612FILE *f = fopen ("conftest.val", "w");
26613if (!f)
26614  $ac_main_return (1);
26615fprintf (f, "%ld", (long)(sizeof (bool)));
26616fclose (f);
26617  ;
26618  return 0;
26619}
26620_ACEOF
26621rm -f "conftest$ac_exeext"
26622if { (eval echo "$as_me:26622: \"$ac_link\"") >&5
26623  (eval $ac_link) 2>&5
26624  ac_status=$?
26625  echo "$as_me:26625: \$? = $ac_status" >&5
26626  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26627  { (eval echo "$as_me:26627: \"$ac_try\"") >&5
26628  (eval $ac_try) 2>&5
26629  ac_status=$?
26630  echo "$as_me:26630: \$? = $ac_status" >&5
26631  (exit "$ac_status"); }; }; then
26632  ac_cv_sizeof_bool=`cat conftest.val`
26633else
26634  echo "$as_me: program exited with status $ac_status" >&5
26635echo "$as_me: failed program was:" >&5
26636cat "conftest.$ac_ext" >&5
26637fi
26638rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26639fi
26640fi
26641rm -f conftest.val
26642else
26643  ac_cv_sizeof_bool=0
26644fi
26645fi
26646echo "$as_me:26646: result: $ac_cv_sizeof_bool" >&5
26647echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26648cat >>confdefs.h <<EOF
26649#define SIZEOF_BOOL $ac_cv_sizeof_bool
26650EOF
26651
26652echo "$as_me:26652: checking for type of bool" >&5
26653echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26654if test "${cf_cv_type_of_bool+set}" = set; then
26655  echo $ECHO_N "(cached) $ECHO_C" >&6
26656else
26657
26658	rm -f cf_test.out
26659	if test "$cross_compiling" = yes; then
26660
26661		case x$ac_cv_sizeof_bool in
26662		(x1) cf_cv_type_of_bool="unsigned char";;
26663		(x2) cf_cv_type_of_bool="unsigned short";;
26664		(x4) cf_cv_type_of_bool="unsigned int";;
26665		(x8) cf_cv_type_of_bool="unsigned long";;
26666		(*)  cf_cv_type_of_bool=unknown;;
26667		esac
26668
26669else
26670  cat >"conftest.$ac_ext" <<_ACEOF
26671#line 26671 "configure"
26672#include "confdefs.h"
26673
26674$ac_includes_default
26675
26676#if defined(__cplusplus)
26677
26678#ifdef HAVE_GXX_BUILTIN_H
26679#include <g++/builtin.h>
26680#elif HAVE_GPP_BUILTIN_H
26681#include <gpp/builtin.h>
26682#elif HAVE_BUILTIN_H
26683#include <builtin.h>
26684#endif
26685
26686#else
26687
26688#if $USE_STDBOOL_H
26689#include <stdbool.h>
26690#endif
26691
26692#endif
26693
26694int main(void)
26695{
26696	FILE *fp = fopen("cf_test.out", "w");
26697	if (fp != NULL) {
26698		bool x = true;
26699		if ((bool)(-x) >= 0)
26700			fputs("unsigned ", fp);
26701		if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26702		else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26703		else if (sizeof(x) == sizeof(short))fputs("short",fp);
26704		else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26705		fclose(fp);
26706	}
26707	${cf_cv_main_return:-return}(0);
26708}
26709
26710_ACEOF
26711rm -f "conftest$ac_exeext"
26712if { (eval echo "$as_me:26712: \"$ac_link\"") >&5
26713  (eval $ac_link) 2>&5
26714  ac_status=$?
26715  echo "$as_me:26715: \$? = $ac_status" >&5
26716  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26717  { (eval echo "$as_me:26717: \"$ac_try\"") >&5
26718  (eval $ac_try) 2>&5
26719  ac_status=$?
26720  echo "$as_me:26720: \$? = $ac_status" >&5
26721  (exit "$ac_status"); }; }; then
26722  cf_cv_type_of_bool=`cat cf_test.out`
26723		 if test -z "$cf_cv_type_of_bool"; then
26724		   cf_cv_type_of_bool=unknown
26725		 fi
26726else
26727  echo "$as_me: program exited with status $ac_status" >&5
26728echo "$as_me: failed program was:" >&5
26729cat "conftest.$ac_ext" >&5
26730cf_cv_type_of_bool=unknown
26731fi
26732rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26733fi
26734	rm -f cf_test.out
26735
26736fi
26737echo "$as_me:26737: result: $cf_cv_type_of_bool" >&5
26738echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26739
26740if test "$cf_cv_type_of_bool" = unknown ; then
26741	case .$NCURSES_BOOL in
26742	(.auto|.) NCURSES_BOOL=unsigned;;
26743	esac
26744	{ echo "$as_me:26744: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26745echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26746	cf_cv_type_of_bool=$NCURSES_BOOL
26747fi
26748
26749echo "$as_me:26749: checking for special defines needed for etip.h" >&5
26750echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26751cf_save_CXXFLAGS="$CXXFLAGS"
26752cf_result="none"
26753
26754# etip.h includes ncurses.h which includes ncurses_dll.h
26755# But ncurses_dll.h is generated - fix here.
26756test -d include || mkdir include
26757test -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
26758
26759for cf_math in "" MATH_H
26760do
26761for cf_excp in "" MATH_EXCEPTION
26762do
26763	CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26764	test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26765	test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26766cat >"conftest.$ac_ext" <<_ACEOF
26767#line 26767 "configure"
26768#include "confdefs.h"
26769
26770#include <etip.h.in>
26771
26772int
26773main (void)
26774{
26775
26776  ;
26777  return 0;
26778}
26779_ACEOF
26780rm -f "conftest.$ac_objext"
26781if { (eval echo "$as_me:26781: \"$ac_compile\"") >&5
26782  (eval $ac_compile) 2>&5
26783  ac_status=$?
26784  echo "$as_me:26784: \$? = $ac_status" >&5
26785  (exit "$ac_status"); } &&
26786         { ac_try='test -s "conftest.$ac_objext"'
26787  { (eval echo "$as_me:26787: \"$ac_try\"") >&5
26788  (eval $ac_try) 2>&5
26789  ac_status=$?
26790  echo "$as_me:26790: \$? = $ac_status" >&5
26791  (exit "$ac_status"); }; }; then
26792
26793	test -n "$cf_math" && cat >>confdefs.h <<EOF
26794#define ETIP_NEEDS_${cf_math} 1
26795EOF
26796
26797	test -n "$cf_excp" && cat >>confdefs.h <<EOF
26798#define ETIP_NEEDS_${cf_excp} 1
26799EOF
26800
26801	cf_result="$cf_math $cf_excp"
26802	break 2
26803
26804else
26805  echo "$as_me: failed program was:" >&5
26806cat "conftest.$ac_ext" >&5
26807fi
26808rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26809done
26810done
26811echo "$as_me:26811: result: ${cf_result:-(none)}" >&5
26812echo "${ECHO_T}${cf_result:-(none)}" >&6
26813CXXFLAGS="$cf_save_CXXFLAGS"
26814
26815if test -n "$CXX"; then
26816echo "$as_me:26816: checking if $CXX accepts override keyword" >&5
26817echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26818if test "${cf_cv_cpp_override+set}" = set; then
26819  echo $ECHO_N "(cached) $ECHO_C" >&6
26820else
26821
26822	ac_ext=cc
26823ac_cpp='$CXXCPP $CPPFLAGS'
26824ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26825ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26826ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26827ac_main_return="return"
26828
26829	if test "$cross_compiling" = yes; then
26830  cf_cv_cpp_override=unknown
26831else
26832  cat >"conftest.$ac_ext" <<_ACEOF
26833#line 26833 "configure"
26834#include "confdefs.h"
26835
26836class base
26837{
26838public:
26839	virtual int foo(float x) = 0;
26840};
26841
26842class derived: public base
26843{
26844public:
26845	int foo(float x) override { return x != 0.0 ? 1 : 0; }
26846};
26847
26848int main(void) { }
26849
26850_ACEOF
26851rm -f "conftest$ac_exeext"
26852if { (eval echo "$as_me:26852: \"$ac_link\"") >&5
26853  (eval $ac_link) 2>&5
26854  ac_status=$?
26855  echo "$as_me:26855: \$? = $ac_status" >&5
26856  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26857  { (eval echo "$as_me:26857: \"$ac_try\"") >&5
26858  (eval $ac_try) 2>&5
26859  ac_status=$?
26860  echo "$as_me:26860: \$? = $ac_status" >&5
26861  (exit "$ac_status"); }; }; then
26862  cf_cv_cpp_override=yes
26863else
26864  echo "$as_me: program exited with status $ac_status" >&5
26865echo "$as_me: failed program was:" >&5
26866cat "conftest.$ac_ext" >&5
26867cf_cv_cpp_override=no
26868fi
26869rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26870fi
26871	ac_ext=cc
26872ac_cpp='$CXXCPP $CPPFLAGS'
26873ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26874ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26875ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26876ac_main_return="return"
26877
26878fi
26879echo "$as_me:26879: result: $cf_cv_cpp_override" >&5
26880echo "${ECHO_T}$cf_cv_cpp_override" >&6
26881fi
26882test "$cf_cv_cpp_override" = yes &&
26883cat >>confdefs.h <<\EOF
26884#define CPP_HAS_OVERRIDE 1
26885EOF
26886
26887if test -n "$CXX"; then
26888echo "$as_me:26888: checking if $CXX accepts parameter initialization" >&5
26889echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26890if test "${cf_cv_cpp_param_init+set}" = set; then
26891  echo $ECHO_N "(cached) $ECHO_C" >&6
26892else
26893
26894	ac_ext=cc
26895ac_cpp='$CXXCPP $CPPFLAGS'
26896ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26897ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26898ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26899ac_main_return="return"
26900
26901	if test "$cross_compiling" = yes; then
26902  cf_cv_cpp_param_init=unknown
26903else
26904  cat >"conftest.$ac_ext" <<_ACEOF
26905#line 26905 "configure"
26906#include "confdefs.h"
26907
26908class TEST {
26909private:
26910	int value;
26911public:
26912	TEST(int x = 1);
26913	~TEST();
26914};
26915
26916TEST::TEST(int x = 1)	// some compilers do not like second initializer
26917{
26918	value = x;
26919}
26920int main(void) { }
26921
26922_ACEOF
26923rm -f "conftest$ac_exeext"
26924if { (eval echo "$as_me:26924: \"$ac_link\"") >&5
26925  (eval $ac_link) 2>&5
26926  ac_status=$?
26927  echo "$as_me:26927: \$? = $ac_status" >&5
26928  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26929  { (eval echo "$as_me:26929: \"$ac_try\"") >&5
26930  (eval $ac_try) 2>&5
26931  ac_status=$?
26932  echo "$as_me:26932: \$? = $ac_status" >&5
26933  (exit "$ac_status"); }; }; then
26934  cf_cv_cpp_param_init=yes
26935else
26936  echo "$as_me: program exited with status $ac_status" >&5
26937echo "$as_me: failed program was:" >&5
26938cat "conftest.$ac_ext" >&5
26939cf_cv_cpp_param_init=no
26940fi
26941rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26942fi
26943	ac_ext=cc
26944ac_cpp='$CXXCPP $CPPFLAGS'
26945ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26946ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26947ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26948ac_main_return="return"
26949
26950fi
26951echo "$as_me:26951: result: $cf_cv_cpp_param_init" >&5
26952echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26953fi
26954test "$cf_cv_cpp_param_init" = yes &&
26955cat >>confdefs.h <<\EOF
26956#define CPP_HAS_PARAM_INIT 1
26957EOF
26958
26959if test -n "$CXX"; then
26960
26961echo "$as_me:26961: checking if $CXX accepts static_cast" >&5
26962echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26963if test "${cf_cv_cpp_static_cast+set}" = set; then
26964  echo $ECHO_N "(cached) $ECHO_C" >&6
26965else
26966
26967	ac_ext=cc
26968ac_cpp='$CXXCPP $CPPFLAGS'
26969ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26970ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26971ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26972ac_main_return="return"
26973
26974	cat >"conftest.$ac_ext" <<_ACEOF
26975#line 26975 "configure"
26976#include "confdefs.h"
26977
26978class NCursesPanel
26979{
26980public:
26981  NCursesPanel(int nlines,
26982	       int ncols,
26983	       int begin_y = 0,
26984	       int begin_x = 0)
26985  {
26986  }
26987  NCursesPanel();
26988  ~NCursesPanel();
26989};
26990
26991template<class T> class NCursesUserPanel : public NCursesPanel
26992{
26993public:
26994  NCursesUserPanel (int nlines,
26995		    int ncols,
26996		    int begin_y = 0,
26997		    int begin_x = 0,
26998		    const T* p_UserData = static_cast<T*>(0))
26999    : NCursesPanel (nlines, ncols, begin_y, begin_x)
27000  {
27001  };
27002  NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
27003  {
27004  };
27005
27006  virtual ~NCursesUserPanel() {};
27007};
27008
27009int
27010main (void)
27011{
27012
27013	const char* p_UserData = static_cast<char*>(0)
27014  ;
27015  return 0;
27016}
27017_ACEOF
27018rm -f "conftest.$ac_objext"
27019if { (eval echo "$as_me:27019: \"$ac_compile\"") >&5
27020  (eval $ac_compile) 2>&5
27021  ac_status=$?
27022  echo "$as_me:27022: \$? = $ac_status" >&5
27023  (exit "$ac_status"); } &&
27024         { ac_try='test -s "conftest.$ac_objext"'
27025  { (eval echo "$as_me:27025: \"$ac_try\"") >&5
27026  (eval $ac_try) 2>&5
27027  ac_status=$?
27028  echo "$as_me:27028: \$? = $ac_status" >&5
27029  (exit "$ac_status"); }; }; then
27030  cf_cv_cpp_static_cast=yes
27031else
27032  echo "$as_me: failed program was:" >&5
27033cat "conftest.$ac_ext" >&5
27034cf_cv_cpp_static_cast=no
27035fi
27036rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27037
27038	ac_ext=cc
27039ac_cpp='$CXXCPP $CPPFLAGS'
27040ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
27041ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
27042ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27043ac_main_return="return"
27044
27045fi
27046echo "$as_me:27046: result: $cf_cv_cpp_static_cast" >&5
27047echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
27048
27049fi
27050
27051test "$cf_cv_cpp_static_cast" = yes &&
27052cat >>confdefs.h <<\EOF
27053#define CPP_HAS_STATIC_CAST 1
27054EOF
27055
27056	CXX_AR='$(AR)'
27057	CXX_ARFLAGS='$(ARFLAGS)'
27058	case "$cf_cv_system_name" in
27059	(irix*)
27060	    if test "$GXX" != yes ; then
27061		CXX_AR='$(CXX)'
27062		CXX_ARFLAGS='-ar -o'
27063	    fi
27064	    ;;
27065	(sco3.2v5*)
27066	    CXXLDFLAGS="-u main"
27067	    ;;
27068	(solaris2*)
27069	    if test "$GXX" != yes ; then
27070		CXX_AR='$(CXX)'
27071		CXX_ARFLAGS='-xar -o'
27072	    fi
27073	    ;;
27074	esac
27075
27076else
27077	cf_cxx_library=no
27078	cf_cv_builtin_bool=yes
27079
27080	# Just because we are not configuring against C++ right now does not
27081	# mean that a user will not want to use C++.  Some distributors disable
27082	# the C++ portion of this configuration as a shortcut (or just to avoid
27083	# compiling the demo in the c++ directory).  So we need a reasonable
27084	# default for the 'bool' type.
27085	#
27086	# Caveat: since the storage of the bool type is not standardized, it
27087	# may change.
27088
27089	if test "$NCURSES_BOOL" != auto ; then
27090		cf_cv_type_of_bool=$NCURSES_BOOL
27091		USE_STDBOOL_H=0
27092	else
27093
27094echo "$as_me:27094: checking for bool" >&5
27095echo $ECHO_N "checking for bool... $ECHO_C" >&6
27096if test "${ac_cv_type_bool+set}" = set; then
27097  echo $ECHO_N "(cached) $ECHO_C" >&6
27098else
27099  cat >"conftest.$ac_ext" <<_ACEOF
27100#line 27100 "configure"
27101#include "confdefs.h"
27102
27103$ac_includes_default
27104
27105#if defined(__cplusplus)
27106
27107#ifdef HAVE_GXX_BUILTIN_H
27108#include <g++/builtin.h>
27109#elif HAVE_GPP_BUILTIN_H
27110#include <gpp/builtin.h>
27111#elif HAVE_BUILTIN_H
27112#include <builtin.h>
27113#endif
27114
27115#else
27116
27117#if $USE_STDBOOL_H
27118#include <stdbool.h>
27119#endif
27120
27121#endif
27122
27123int
27124main (void)
27125{
27126if ((bool *) 0)
27127  return 0;
27128if (sizeof (bool))
27129  return 0;
27130  ;
27131  return 0;
27132}
27133_ACEOF
27134rm -f "conftest.$ac_objext"
27135if { (eval echo "$as_me:27135: \"$ac_compile\"") >&5
27136  (eval $ac_compile) 2>&5
27137  ac_status=$?
27138  echo "$as_me:27138: \$? = $ac_status" >&5
27139  (exit "$ac_status"); } &&
27140         { ac_try='test -s "conftest.$ac_objext"'
27141  { (eval echo "$as_me:27141: \"$ac_try\"") >&5
27142  (eval $ac_try) 2>&5
27143  ac_status=$?
27144  echo "$as_me:27144: \$? = $ac_status" >&5
27145  (exit "$ac_status"); }; }; then
27146  ac_cv_type_bool=yes
27147else
27148  echo "$as_me: failed program was:" >&5
27149cat "conftest.$ac_ext" >&5
27150ac_cv_type_bool=no
27151fi
27152rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27153fi
27154echo "$as_me:27154: result: $ac_cv_type_bool" >&5
27155echo "${ECHO_T}$ac_cv_type_bool" >&6
27156
27157echo "$as_me:27157: checking size of bool" >&5
27158echo $ECHO_N "checking size of bool... $ECHO_C" >&6
27159if test "${ac_cv_sizeof_bool+set}" = set; then
27160  echo $ECHO_N "(cached) $ECHO_C" >&6
27161else
27162  if test "$ac_cv_type_bool" = yes; then
27163  if test "$cross_compiling" = yes; then
27164  # Depending upon the size, compute the lo and hi bounds.
27165cat >"conftest.$ac_ext" <<_ACEOF
27166#line 27166 "configure"
27167#include "confdefs.h"
27168
27169$ac_includes_default
27170
27171#if defined(__cplusplus)
27172
27173#ifdef HAVE_GXX_BUILTIN_H
27174#include <g++/builtin.h>
27175#elif HAVE_GPP_BUILTIN_H
27176#include <gpp/builtin.h>
27177#elif HAVE_BUILTIN_H
27178#include <builtin.h>
27179#endif
27180
27181#else
27182
27183#if $USE_STDBOOL_H
27184#include <stdbool.h>
27185#endif
27186
27187#endif
27188
27189int
27190main (void)
27191{
27192int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
27193  ;
27194  return 0;
27195}
27196_ACEOF
27197rm -f "conftest.$ac_objext"
27198if { (eval echo "$as_me:27198: \"$ac_compile\"") >&5
27199  (eval $ac_compile) 2>&5
27200  ac_status=$?
27201  echo "$as_me:27201: \$? = $ac_status" >&5
27202  (exit "$ac_status"); } &&
27203         { ac_try='test -s "conftest.$ac_objext"'
27204  { (eval echo "$as_me:27204: \"$ac_try\"") >&5
27205  (eval $ac_try) 2>&5
27206  ac_status=$?
27207  echo "$as_me:27207: \$? = $ac_status" >&5
27208  (exit "$ac_status"); }; }; then
27209  ac_lo=0 ac_mid=0
27210  while :; do
27211    cat >"conftest.$ac_ext" <<_ACEOF
27212#line 27212 "configure"
27213#include "confdefs.h"
27214
27215$ac_includes_default
27216
27217#if defined(__cplusplus)
27218
27219#ifdef HAVE_GXX_BUILTIN_H
27220#include <g++/builtin.h>
27221#elif HAVE_GPP_BUILTIN_H
27222#include <gpp/builtin.h>
27223#elif HAVE_BUILTIN_H
27224#include <builtin.h>
27225#endif
27226
27227#else
27228
27229#if $USE_STDBOOL_H
27230#include <stdbool.h>
27231#endif
27232
27233#endif
27234
27235int
27236main (void)
27237{
27238int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27239  ;
27240  return 0;
27241}
27242_ACEOF
27243rm -f "conftest.$ac_objext"
27244if { (eval echo "$as_me:27244: \"$ac_compile\"") >&5
27245  (eval $ac_compile) 2>&5
27246  ac_status=$?
27247  echo "$as_me:27247: \$? = $ac_status" >&5
27248  (exit "$ac_status"); } &&
27249         { ac_try='test -s "conftest.$ac_objext"'
27250  { (eval echo "$as_me:27250: \"$ac_try\"") >&5
27251  (eval $ac_try) 2>&5
27252  ac_status=$?
27253  echo "$as_me:27253: \$? = $ac_status" >&5
27254  (exit "$ac_status"); }; }; then
27255  ac_hi=$ac_mid; break
27256else
27257  echo "$as_me: failed program was:" >&5
27258cat "conftest.$ac_ext" >&5
27259ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27260fi
27261rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27262  done
27263else
27264  echo "$as_me: failed program was:" >&5
27265cat "conftest.$ac_ext" >&5
27266ac_hi=-1 ac_mid=-1
27267  while :; do
27268    cat >"conftest.$ac_ext" <<_ACEOF
27269#line 27269 "configure"
27270#include "confdefs.h"
27271
27272$ac_includes_default
27273
27274#if defined(__cplusplus)
27275
27276#ifdef HAVE_GXX_BUILTIN_H
27277#include <g++/builtin.h>
27278#elif HAVE_GPP_BUILTIN_H
27279#include <gpp/builtin.h>
27280#elif HAVE_BUILTIN_H
27281#include <builtin.h>
27282#endif
27283
27284#else
27285
27286#if $USE_STDBOOL_H
27287#include <stdbool.h>
27288#endif
27289
27290#endif
27291
27292int
27293main (void)
27294{
27295int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
27296  ;
27297  return 0;
27298}
27299_ACEOF
27300rm -f "conftest.$ac_objext"
27301if { (eval echo "$as_me:27301: \"$ac_compile\"") >&5
27302  (eval $ac_compile) 2>&5
27303  ac_status=$?
27304  echo "$as_me:27304: \$? = $ac_status" >&5
27305  (exit "$ac_status"); } &&
27306         { ac_try='test -s "conftest.$ac_objext"'
27307  { (eval echo "$as_me:27307: \"$ac_try\"") >&5
27308  (eval $ac_try) 2>&5
27309  ac_status=$?
27310  echo "$as_me:27310: \$? = $ac_status" >&5
27311  (exit "$ac_status"); }; }; then
27312  ac_lo=$ac_mid; break
27313else
27314  echo "$as_me: failed program was:" >&5
27315cat "conftest.$ac_ext" >&5
27316ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27317fi
27318rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27319  done
27320fi
27321rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27322# Binary search between lo and hi bounds.
27323while test "x$ac_lo" != "x$ac_hi"; do
27324  ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27325  cat >"conftest.$ac_ext" <<_ACEOF
27326#line 27326 "configure"
27327#include "confdefs.h"
27328
27329$ac_includes_default
27330
27331#if defined(__cplusplus)
27332
27333#ifdef HAVE_GXX_BUILTIN_H
27334#include <g++/builtin.h>
27335#elif HAVE_GPP_BUILTIN_H
27336#include <gpp/builtin.h>
27337#elif HAVE_BUILTIN_H
27338#include <builtin.h>
27339#endif
27340
27341#else
27342
27343#if $USE_STDBOOL_H
27344#include <stdbool.h>
27345#endif
27346
27347#endif
27348
27349int
27350main (void)
27351{
27352int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27353  ;
27354  return 0;
27355}
27356_ACEOF
27357rm -f "conftest.$ac_objext"
27358if { (eval echo "$as_me:27358: \"$ac_compile\"") >&5
27359  (eval $ac_compile) 2>&5
27360  ac_status=$?
27361  echo "$as_me:27361: \$? = $ac_status" >&5
27362  (exit "$ac_status"); } &&
27363         { ac_try='test -s "conftest.$ac_objext"'
27364  { (eval echo "$as_me:27364: \"$ac_try\"") >&5
27365  (eval $ac_try) 2>&5
27366  ac_status=$?
27367  echo "$as_me:27367: \$? = $ac_status" >&5
27368  (exit "$ac_status"); }; }; then
27369  ac_hi=$ac_mid
27370else
27371  echo "$as_me: failed program was:" >&5
27372cat "conftest.$ac_ext" >&5
27373ac_lo=`expr "$ac_mid" + 1`
27374fi
27375rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27376done
27377ac_cv_sizeof_bool=$ac_lo
27378else
27379  if test "$cross_compiling" = yes; then
27380  { { echo "$as_me:27380: error: cannot run test program while cross compiling" >&5
27381echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27382   { (exit 1); exit 1; }; }
27383else
27384  cat >"conftest.$ac_ext" <<_ACEOF
27385#line 27385 "configure"
27386#include "confdefs.h"
27387
27388$ac_includes_default
27389
27390#if defined(__cplusplus)
27391
27392#ifdef HAVE_GXX_BUILTIN_H
27393#include <g++/builtin.h>
27394#elif HAVE_GPP_BUILTIN_H
27395#include <gpp/builtin.h>
27396#elif HAVE_BUILTIN_H
27397#include <builtin.h>
27398#endif
27399
27400#else
27401
27402#if $USE_STDBOOL_H
27403#include <stdbool.h>
27404#endif
27405
27406#endif
27407
27408int
27409main (void)
27410{
27411FILE *f = fopen ("conftest.val", "w");
27412if (!f)
27413  $ac_main_return (1);
27414fprintf (f, "%ld", (long)(sizeof (bool)));
27415fclose (f);
27416  ;
27417  return 0;
27418}
27419_ACEOF
27420rm -f "conftest$ac_exeext"
27421if { (eval echo "$as_me:27421: \"$ac_link\"") >&5
27422  (eval $ac_link) 2>&5
27423  ac_status=$?
27424  echo "$as_me:27424: \$? = $ac_status" >&5
27425  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27426  { (eval echo "$as_me:27426: \"$ac_try\"") >&5
27427  (eval $ac_try) 2>&5
27428  ac_status=$?
27429  echo "$as_me:27429: \$? = $ac_status" >&5
27430  (exit "$ac_status"); }; }; then
27431  ac_cv_sizeof_bool=`cat conftest.val`
27432else
27433  echo "$as_me: program exited with status $ac_status" >&5
27434echo "$as_me: failed program was:" >&5
27435cat "conftest.$ac_ext" >&5
27436fi
27437rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27438fi
27439fi
27440rm -f conftest.val
27441else
27442  ac_cv_sizeof_bool=0
27443fi
27444fi
27445echo "$as_me:27445: result: $ac_cv_sizeof_bool" >&5
27446echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27447cat >>confdefs.h <<EOF
27448#define SIZEOF_BOOL $ac_cv_sizeof_bool
27449EOF
27450
27451echo "$as_me:27451: checking for type of bool" >&5
27452echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27453if test "${cf_cv_type_of_bool+set}" = set; then
27454  echo $ECHO_N "(cached) $ECHO_C" >&6
27455else
27456
27457	rm -f cf_test.out
27458	if test "$cross_compiling" = yes; then
27459
27460		case x$ac_cv_sizeof_bool in
27461		(x1) cf_cv_type_of_bool="unsigned char";;
27462		(x2) cf_cv_type_of_bool="unsigned short";;
27463		(x4) cf_cv_type_of_bool="unsigned int";;
27464		(x8) cf_cv_type_of_bool="unsigned long";;
27465		(*)  cf_cv_type_of_bool=unknown;;
27466		esac
27467
27468else
27469  cat >"conftest.$ac_ext" <<_ACEOF
27470#line 27470 "configure"
27471#include "confdefs.h"
27472
27473$ac_includes_default
27474
27475#if defined(__cplusplus)
27476
27477#ifdef HAVE_GXX_BUILTIN_H
27478#include <g++/builtin.h>
27479#elif HAVE_GPP_BUILTIN_H
27480#include <gpp/builtin.h>
27481#elif HAVE_BUILTIN_H
27482#include <builtin.h>
27483#endif
27484
27485#else
27486
27487#if $USE_STDBOOL_H
27488#include <stdbool.h>
27489#endif
27490
27491#endif
27492
27493int main(void)
27494{
27495	FILE *fp = fopen("cf_test.out", "w");
27496	if (fp != NULL) {
27497		bool x = true;
27498		if ((bool)(-x) >= 0)
27499			fputs("unsigned ", fp);
27500		if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27501		else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27502		else if (sizeof(x) == sizeof(short))fputs("short",fp);
27503		else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27504		fclose(fp);
27505	}
27506	${cf_cv_main_return:-return}(0);
27507}
27508
27509_ACEOF
27510rm -f "conftest$ac_exeext"
27511if { (eval echo "$as_me:27511: \"$ac_link\"") >&5
27512  (eval $ac_link) 2>&5
27513  ac_status=$?
27514  echo "$as_me:27514: \$? = $ac_status" >&5
27515  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27516  { (eval echo "$as_me:27516: \"$ac_try\"") >&5
27517  (eval $ac_try) 2>&5
27518  ac_status=$?
27519  echo "$as_me:27519: \$? = $ac_status" >&5
27520  (exit "$ac_status"); }; }; then
27521  cf_cv_type_of_bool=`cat cf_test.out`
27522		 if test -z "$cf_cv_type_of_bool"; then
27523		   cf_cv_type_of_bool=unknown
27524		 fi
27525else
27526  echo "$as_me: program exited with status $ac_status" >&5
27527echo "$as_me: failed program was:" >&5
27528cat "conftest.$ac_ext" >&5
27529cf_cv_type_of_bool=unknown
27530fi
27531rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27532fi
27533	rm -f cf_test.out
27534
27535fi
27536echo "$as_me:27536: result: $cf_cv_type_of_bool" >&5
27537echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27538
27539if test "$cf_cv_type_of_bool" = unknown ; then
27540	case .$NCURSES_BOOL in
27541	(.auto|.) NCURSES_BOOL=unsigned;;
27542	esac
27543	{ echo "$as_me:27543: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27544echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27545	cf_cv_type_of_bool=$NCURSES_BOOL
27546fi
27547
27548	fi
27549fi
27550
27551# If the C compiler did not declare bool, and we did not determine that the C++
27552# compiler does not declare bool, turn on an ifdef in curses.h that makes the
27553# ncurses library use the same type as C++ bool.  Note that this allows one to
27554# specify the type of bool in a configure-script option and postpone
27555# integration with the C++ compiler provided that the types are compatible.
27556USE_CXX_BOOL=1
27557if test "$USE_BUILTIN_BOOL" = 1
27558then
27559	# oops: C has a bool.  Unlikely, but C++ could differ.
27560	USE_CXX_BOOL=0
27561elif test "$cf_cv_builtin_bool" = no
27562then
27563	# C++ has no bool
27564	USE_CXX_BOOL=0
27565else
27566	# this is the normal case
27567	USE_CXX_BOOL='defined(__cplusplus)'
27568fi
27569
27570if test -f "${srcdir}/Ada95/Makefile.in" ; then
27571
27572	if test "$cf_with_ada" != "no" ; then
27573		if test "$with_libtool" != "no"; then
27574			{ echo "$as_me:27574: WARNING: libtool does not support Ada - disabling feature" >&5
27575echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27576			cf_with_ada=no
27577		fi
27578	fi
27579
27580	if test "$cf_with_ada" != "no" ; then
27581		if test	"x$cf_cv_prog_gnat_correct" = xyes; then
27582
27583 	ADAFLAGS="$ADAFLAGS -gnatpn"
27584
27585	echo "$as_me:27585: checking optimization options for ADAFLAGS" >&5
27586echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27587	case "$CFLAGS" in
27588	(*-g*)
27589
27590 	ADAFLAGS="$ADAFLAGS -g"
27591
27592		;;
27593	esac
27594	case "$CFLAGS" in
27595	(*-O*)
27596		cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ 	].*//'`
27597
27598 	ADAFLAGS="$ADAFLAGS $cf_O_flag"
27599
27600		;;
27601	esac
27602	echo "$as_me:27602: result: $ADAFLAGS" >&5
27603echo "${ECHO_T}$ADAFLAGS" >&6
27604
27605echo "$as_me:27605: checking if GNATPREP supports -T option" >&5
27606echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27607if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27608  echo $ECHO_N "(cached) $ECHO_C" >&6
27609else
27610
27611cf_cv_gnatprep_opt_t=no
27612gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27613
27614fi
27615echo "$as_me:27615: result: $cf_cv_gnatprep_opt_t" >&5
27616echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27617test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27618
27619echo "$as_me:27619: checking if GNAT supports generics" >&5
27620echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27621case "$cf_cv_gnat_version" in
27622(3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27623	cf_gnat_generics=yes
27624	;;
27625(*)
27626	cf_gnat_generics=no
27627	;;
27628esac
27629echo "$as_me:27629: result: $cf_gnat_generics" >&5
27630echo "${ECHO_T}$cf_gnat_generics" >&6
27631
27632if test "$cf_gnat_generics" = yes
27633then
27634	cf_compile_generics=generics
27635	cf_generic_objects="\${GENOBJS}"
27636else
27637	cf_compile_generics=
27638	cf_generic_objects=
27639fi
27640
27641echo "$as_me:27641: checking if GNAT supports SIGINT" >&5
27642echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27643if test "${cf_cv_gnat_sigint+set}" = set; then
27644  echo $ECHO_N "(cached) $ECHO_C" >&6
27645else
27646
27647rm -rf ./conftest* ./*~conftest*
27648cat >>conftest.ads <<CF_EOF
27649with Ada.Interrupts.Names;
27650
27651package ConfTest is
27652
27653   pragma Warnings (Off);  --  the next pragma exists since 3.11p
27654   pragma Unreserve_All_Interrupts;
27655   pragma Warnings (On);
27656
27657   protected Process is
27658      procedure Stop;
27659      function Continue return Boolean;
27660      pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27661   private
27662      Done : Boolean := False;
27663   end Process;
27664
27665end ConfTest;
27666CF_EOF
27667cat >>conftest.adb <<CF_EOF
27668package body ConfTest is
27669   protected body Process is
27670      procedure Stop is
27671      begin
27672         Done := True;
27673      end Stop;
27674      function Continue return Boolean is
27675      begin
27676         return not Done;
27677      end Continue;
27678   end Process;
27679end ConfTest;
27680CF_EOF
27681if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27682      cf_cv_gnat_sigint=yes
27683else
27684   cf_cv_gnat_sigint=no
27685fi
27686rm -rf ./conftest* ./*~conftest*
27687
27688fi
27689echo "$as_me:27689: result: $cf_cv_gnat_sigint" >&5
27690echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27691
27692if test "$cf_cv_gnat_sigint" = yes ; then
27693	USE_GNAT_SIGINT=""
27694else
27695	USE_GNAT_SIGINT="#"
27696fi
27697
27698cf_gnat_libraries=no
27699cf_gnat_projects=no
27700
27701if test "$enable_gnat_projects" != no ; then
27702echo "$as_me:27702: checking if GNAT supports project files" >&5
27703echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27704case "$cf_cv_gnat_version" in
27705(3.[0-9]*)
27706	;;
27707(*)
27708	case "$cf_cv_system_name" in
27709	(cygwin*|msys*)
27710		;;
27711	(*)
27712		rm -rf ./conftest* ./*~conftest*
27713		if mkdir conftest.src conftest.bin conftest.lib
27714		then
27715			cd conftest.src
27716			rm -rf ./conftest* ./*~conftest*
27717			cat >>library.gpr <<CF_EOF
27718project Library is
27719  Kind := External ("LIB_KIND");
27720  for Library_Name use "ConfTest";
27721  for Object_Dir use ".";
27722  for Library_ALI_Dir use External("LIBRARY_DIR");
27723  for Library_Version use External ("SONAME");
27724  for Library_Kind use Kind;
27725  for Library_Dir use External("BUILD_DIR");
27726  Source_Dir := External ("SOURCE_DIR");
27727  for Source_Dirs use (Source_Dir);
27728end Library;
27729CF_EOF
27730			cat >>confpackage.ads <<CF_EOF
27731package ConfPackage is
27732   procedure conftest;
27733end ConfPackage;
27734CF_EOF
27735			cat >>confpackage.adb <<CF_EOF
27736with Text_IO;
27737package body ConfPackage is
27738   procedure conftest is
27739   begin
27740      Text_IO.Put ("Hello World");
27741      Text_IO.New_Line;
27742   end conftest;
27743end ConfPackage;
27744CF_EOF
27745			if ( "$cf_ada_make" $ADAFLAGS \
27746					-Plibrary.gpr \
27747					-XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27748					-XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27749					-XSOURCE_DIR="`pwd`" \
27750					-XSONAME=libConfTest.so.1 \
27751					-XLIB_KIND=static 1>&5 2>&1 ) ; then
27752				cf_gnat_projects=yes
27753			fi
27754			cd ..
27755		fi
27756		if test -f conftest.lib/confpackage.ali
27757		then
27758			cf_gnat_libraries=yes
27759		fi
27760		rm -rf ./conftest* ./*~conftest*
27761		;;
27762	esac
27763	;;
27764esac
27765echo "$as_me:27765: result: $cf_gnat_projects" >&5
27766echo "${ECHO_T}$cf_gnat_projects" >&6
27767fi # enable_gnat_projects
27768
27769if test "$cf_gnat_projects" = yes
27770then
27771	echo "$as_me:27771: checking if GNAT supports libraries" >&5
27772echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27773	echo "$as_me:27773: result: $cf_gnat_libraries" >&5
27774echo "${ECHO_T}$cf_gnat_libraries" >&6
27775fi
27776
27777USE_OLD_MAKERULES=""
27778USE_GNAT_PROJECTS="#"
27779USE_GNAT_MAKE_GPR="#"
27780USE_GNAT_GPRBUILD="#"
27781
27782if test "$cf_gnat_projects" = yes
27783then
27784	USE_OLD_MAKERULES="#"
27785	USE_GNAT_PROJECTS=""
27786	if test "$cf_cv_VERSION_GPRBUILD" != no
27787	then
27788		USE_GNAT_GPRBUILD=""
27789	elif test "$cf_cv_VERSION_GNATMAKE" != no
27790	then
27791		USE_GNAT_MAKE_GPR=""
27792	else
27793		{ echo "$as_me:27793: WARNING: use old makefile rules since tools are missing" >&5
27794echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27795	fi
27796fi
27797
27798if test "$cf_gnat_libraries" = yes
27799then
27800	USE_GNAT_LIBRARIES=""
27801else
27802	USE_GNAT_LIBRARIES="#"
27803fi
27804
27805echo "$as_me:27805: checking for Ada95 compiler" >&5
27806echo $ECHO_N "checking for Ada95 compiler... $ECHO_C" >&6
27807
27808# Check whether --with-ada-compiler or --without-ada-compiler was given.
27809if test "${with_ada_compiler+set}" = set; then
27810  withval="$with_ada_compiler"
27811  cf_ada_compiler=$withval
27812else
27813  cf_ada_compiler=gnatmake
27814fi;
27815
27816echo "$as_me:27816: result: $cf_ada_compiler" >&5
27817echo "${ECHO_T}$cf_ada_compiler" >&6
27818
27819			cf_ada_package=terminal_interface
27820
27821echo "$as_me:27821: checking for Ada95 include directory" >&5
27822echo $ECHO_N "checking for Ada95 include directory... $ECHO_C" >&6
27823
27824# Check whether --with-ada-include or --without-ada-include was given.
27825if test "${with_ada_include+set}" = set; then
27826  withval="$with_ada_include"
27827
27828else
27829  withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27830fi; if test -n "$prefix/share/ada/adainclude" ; then
27831
27832if test "x$prefix" != xNONE; then
27833	cf_path_syntax="$prefix"
27834else
27835	cf_path_syntax="$ac_default_prefix"
27836fi
27837
27838case "x$withval" in
27839(x\$\(*\)*|x\'*\'*)
27840	;;
27841(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
27842	;;
27843(x\$\{*prefix\}*|x\$\{*dir\}*)
27844	eval withval="$withval"
27845	case "x$withval" in
27846	(xNONE/*)
27847		withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27848		;;
27849	esac
27850	;;
27851(xno|xNONE/*)
27852	withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27853	;;
27854(*)
27855	{ { echo "$as_me:27855: error: expected a pathname, not \"$withval\"" >&5
27856echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27857   { (exit 1); exit 1; }; }
27858	;;
27859esac
27860
27861fi
27862eval ADA_INCLUDE="$withval"
27863
27864echo "$as_me:27864: result: $ADA_INCLUDE" >&5
27865echo "${ECHO_T}$ADA_INCLUDE" >&6
27866
27867echo "$as_me:27867: checking for Ada95 object directory" >&5
27868echo $ECHO_N "checking for Ada95 object directory... $ECHO_C" >&6
27869
27870# Check whether --with-ada-objects or --without-ada-objects was given.
27871if test "${with_ada_objects+set}" = set; then
27872  withval="$with_ada_objects"
27873
27874else
27875  withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27876fi; if test -n "$prefix/lib/ada/adalib" ; then
27877
27878if test "x$prefix" != xNONE; then
27879	cf_path_syntax="$prefix"
27880else
27881	cf_path_syntax="$ac_default_prefix"
27882fi
27883
27884case "x$withval" in
27885(x\$\(*\)*|x\'*\'*)
27886	;;
27887(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
27888	;;
27889(x\$\{*prefix\}*|x\$\{*dir\}*)
27890	eval withval="$withval"
27891	case "x$withval" in
27892	(xNONE/*)
27893		withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27894		;;
27895	esac
27896	;;
27897(xno|xNONE/*)
27898	withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27899	;;
27900(*)
27901	{ { echo "$as_me:27901: error: expected a pathname, not \"$withval\"" >&5
27902echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27903   { (exit 1); exit 1; }; }
27904	;;
27905esac
27906
27907fi
27908eval ADA_OBJECTS="$withval"
27909
27910echo "$as_me:27910: result: $ADA_OBJECTS" >&5
27911echo "${ECHO_T}$ADA_OBJECTS" >&6
27912
27913echo "$as_me:27913: checking whether to build an Ada95 shared library" >&5
27914echo $ECHO_N "checking whether to build an Ada95 shared library... $ECHO_C" >&6
27915
27916# Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27917if test "${with_ada_sharedlib+set}" = set; then
27918  withval="$with_ada_sharedlib"
27919  with_ada_sharedlib=$withval
27920else
27921  with_ada_sharedlib=no
27922fi;
27923cf_ada_sharedlib_warn=no
27924
27925if test "x$with_ada_sharedlib" != xno
27926then
27927	if test "x$cf_gnat_projects" != xyes
27928	then
27929		with_ada_sharedlib=no
27930		cf_ada_sharedlib_warn=yes
27931	fi
27932fi
27933
27934echo "$as_me:27934: result: $with_ada_sharedlib" >&5
27935echo "${ECHO_T}$with_ada_sharedlib" >&6
27936if test "x$cf_ada_sharedlib_warn" != xno
27937then
27938	{ echo "$as_me:27938: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&5
27939echo "$as_me: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&2;}
27940fi
27941
27942ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27943MAKE_ADA_SHAREDLIB="#"
27944
27945if test "x$with_ada_sharedlib" != xno
27946then
27947	MAKE_ADA_SHAREDLIB=
27948	if test "x$with_ada_sharedlib" != xyes
27949	then
27950		ADA_SHAREDLIB="$with_ada_sharedlib"
27951	fi
27952fi
27953
27954			# allow the Ada binding to be renamed
27955
27956echo "$as_me:27956: checking for Ada95 curses library name" >&5
27957echo $ECHO_N "checking for Ada95 curses library name... $ECHO_C" >&6
27958
27959# Check whether --with-ada-libname or --without-ada-libname was given.
27960if test "${with_ada_libname+set}" = set; then
27961  withval="$with_ada_libname"
27962  ADA_LIBNAME=$withval
27963else
27964  ADA_LIBNAME=AdaCurses
27965fi;
27966case "x$ADA_LIBNAME" in
27967(x|xyes|xno)
27968	ADA_LIBNAME=AdaCurses
27969	;;
27970esac
27971
27972echo "$as_me:27972: result: $ADA_LIBNAME" >&5
27973echo "${ECHO_T}$ADA_LIBNAME" >&6
27974
27975		fi
27976	fi
27977else
27978	cf_with_ada=no
27979fi
27980
27981# do this "late" to avoid conflict with header-checks
27982if test "x$with_widec" = xyes ; then
27983	echo "$as_me:27983: checking for wchar_t" >&5
27984echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27985if test "${ac_cv_type_wchar_t+set}" = set; then
27986  echo $ECHO_N "(cached) $ECHO_C" >&6
27987else
27988  cat >"conftest.$ac_ext" <<_ACEOF
27989#line 27989 "configure"
27990#include "confdefs.h"
27991$ac_includes_default
27992int
27993main (void)
27994{
27995if ((wchar_t *) 0)
27996  return 0;
27997if (sizeof (wchar_t))
27998  return 0;
27999  ;
28000  return 0;
28001}
28002_ACEOF
28003rm -f "conftest.$ac_objext"
28004if { (eval echo "$as_me:28004: \"$ac_compile\"") >&5
28005  (eval $ac_compile) 2>&5
28006  ac_status=$?
28007  echo "$as_me:28007: \$? = $ac_status" >&5
28008  (exit "$ac_status"); } &&
28009         { ac_try='test -s "conftest.$ac_objext"'
28010  { (eval echo "$as_me:28010: \"$ac_try\"") >&5
28011  (eval $ac_try) 2>&5
28012  ac_status=$?
28013  echo "$as_me:28013: \$? = $ac_status" >&5
28014  (exit "$ac_status"); }; }; then
28015  ac_cv_type_wchar_t=yes
28016else
28017  echo "$as_me: failed program was:" >&5
28018cat "conftest.$ac_ext" >&5
28019ac_cv_type_wchar_t=no
28020fi
28021rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28022fi
28023echo "$as_me:28023: result: $ac_cv_type_wchar_t" >&5
28024echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
28025
28026echo "$as_me:28026: checking size of wchar_t" >&5
28027echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
28028if test "${ac_cv_sizeof_wchar_t+set}" = set; then
28029  echo $ECHO_N "(cached) $ECHO_C" >&6
28030else
28031  if test "$ac_cv_type_wchar_t" = yes; then
28032  if test "$cross_compiling" = yes; then
28033  # Depending upon the size, compute the lo and hi bounds.
28034cat >"conftest.$ac_ext" <<_ACEOF
28035#line 28035 "configure"
28036#include "confdefs.h"
28037$ac_includes_default
28038int
28039main (void)
28040{
28041int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
28042  ;
28043  return 0;
28044}
28045_ACEOF
28046rm -f "conftest.$ac_objext"
28047if { (eval echo "$as_me:28047: \"$ac_compile\"") >&5
28048  (eval $ac_compile) 2>&5
28049  ac_status=$?
28050  echo "$as_me:28050: \$? = $ac_status" >&5
28051  (exit "$ac_status"); } &&
28052         { ac_try='test -s "conftest.$ac_objext"'
28053  { (eval echo "$as_me:28053: \"$ac_try\"") >&5
28054  (eval $ac_try) 2>&5
28055  ac_status=$?
28056  echo "$as_me:28056: \$? = $ac_status" >&5
28057  (exit "$ac_status"); }; }; then
28058  ac_lo=0 ac_mid=0
28059  while :; do
28060    cat >"conftest.$ac_ext" <<_ACEOF
28061#line 28061 "configure"
28062#include "confdefs.h"
28063$ac_includes_default
28064int
28065main (void)
28066{
28067int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28068  ;
28069  return 0;
28070}
28071_ACEOF
28072rm -f "conftest.$ac_objext"
28073if { (eval echo "$as_me:28073: \"$ac_compile\"") >&5
28074  (eval $ac_compile) 2>&5
28075  ac_status=$?
28076  echo "$as_me:28076: \$? = $ac_status" >&5
28077  (exit "$ac_status"); } &&
28078         { ac_try='test -s "conftest.$ac_objext"'
28079  { (eval echo "$as_me:28079: \"$ac_try\"") >&5
28080  (eval $ac_try) 2>&5
28081  ac_status=$?
28082  echo "$as_me:28082: \$? = $ac_status" >&5
28083  (exit "$ac_status"); }; }; then
28084  ac_hi=$ac_mid; break
28085else
28086  echo "$as_me: failed program was:" >&5
28087cat "conftest.$ac_ext" >&5
28088ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
28089fi
28090rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28091  done
28092else
28093  echo "$as_me: failed program was:" >&5
28094cat "conftest.$ac_ext" >&5
28095ac_hi=-1 ac_mid=-1
28096  while :; do
28097    cat >"conftest.$ac_ext" <<_ACEOF
28098#line 28098 "configure"
28099#include "confdefs.h"
28100$ac_includes_default
28101int
28102main (void)
28103{
28104int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
28105  ;
28106  return 0;
28107}
28108_ACEOF
28109rm -f "conftest.$ac_objext"
28110if { (eval echo "$as_me:28110: \"$ac_compile\"") >&5
28111  (eval $ac_compile) 2>&5
28112  ac_status=$?
28113  echo "$as_me:28113: \$? = $ac_status" >&5
28114  (exit "$ac_status"); } &&
28115         { ac_try='test -s "conftest.$ac_objext"'
28116  { (eval echo "$as_me:28116: \"$ac_try\"") >&5
28117  (eval $ac_try) 2>&5
28118  ac_status=$?
28119  echo "$as_me:28119: \$? = $ac_status" >&5
28120  (exit "$ac_status"); }; }; then
28121  ac_lo=$ac_mid; break
28122else
28123  echo "$as_me: failed program was:" >&5
28124cat "conftest.$ac_ext" >&5
28125ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
28126fi
28127rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28128  done
28129fi
28130rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28131# Binary search between lo and hi bounds.
28132while test "x$ac_lo" != "x$ac_hi"; do
28133  ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
28134  cat >"conftest.$ac_ext" <<_ACEOF
28135#line 28135 "configure"
28136#include "confdefs.h"
28137$ac_includes_default
28138int
28139main (void)
28140{
28141int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28142  ;
28143  return 0;
28144}
28145_ACEOF
28146rm -f "conftest.$ac_objext"
28147if { (eval echo "$as_me:28147: \"$ac_compile\"") >&5
28148  (eval $ac_compile) 2>&5
28149  ac_status=$?
28150  echo "$as_me:28150: \$? = $ac_status" >&5
28151  (exit "$ac_status"); } &&
28152         { ac_try='test -s "conftest.$ac_objext"'
28153  { (eval echo "$as_me:28153: \"$ac_try\"") >&5
28154  (eval $ac_try) 2>&5
28155  ac_status=$?
28156  echo "$as_me:28156: \$? = $ac_status" >&5
28157  (exit "$ac_status"); }; }; then
28158  ac_hi=$ac_mid
28159else
28160  echo "$as_me: failed program was:" >&5
28161cat "conftest.$ac_ext" >&5
28162ac_lo=`expr "$ac_mid" + 1`
28163fi
28164rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28165done
28166ac_cv_sizeof_wchar_t=$ac_lo
28167else
28168  if test "$cross_compiling" = yes; then
28169  { { echo "$as_me:28169: error: cannot run test program while cross compiling" >&5
28170echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28171   { (exit 1); exit 1; }; }
28172else
28173  cat >"conftest.$ac_ext" <<_ACEOF
28174#line 28174 "configure"
28175#include "confdefs.h"
28176$ac_includes_default
28177int
28178main (void)
28179{
28180FILE *f = fopen ("conftest.val", "w");
28181if (!f)
28182  $ac_main_return (1);
28183fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28184fclose (f);
28185  ;
28186  return 0;
28187}
28188_ACEOF
28189rm -f "conftest$ac_exeext"
28190if { (eval echo "$as_me:28190: \"$ac_link\"") >&5
28191  (eval $ac_link) 2>&5
28192  ac_status=$?
28193  echo "$as_me:28193: \$? = $ac_status" >&5
28194  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28195  { (eval echo "$as_me:28195: \"$ac_try\"") >&5
28196  (eval $ac_try) 2>&5
28197  ac_status=$?
28198  echo "$as_me:28198: \$? = $ac_status" >&5
28199  (exit "$ac_status"); }; }; then
28200  ac_cv_sizeof_wchar_t=`cat conftest.val`
28201else
28202  echo "$as_me: program exited with status $ac_status" >&5
28203echo "$as_me: failed program was:" >&5
28204cat "conftest.$ac_ext" >&5
28205fi
28206rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28207fi
28208fi
28209rm -f conftest.val
28210else
28211  ac_cv_sizeof_wchar_t=0
28212fi
28213fi
28214echo "$as_me:28214: result: $ac_cv_sizeof_wchar_t" >&5
28215echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28216cat >>confdefs.h <<EOF
28217#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28218EOF
28219
28220	# cross-compiling to mingw can run into the problem that attempting to
28221	# link with the regex library fails, causing the test to not set this to
28222	# a number.  "recent" autoconf does not address this problem either -TD
28223	if test -z "$ac_cv_sizeof_wchar_t"
28224	then
28225		test -n "$verbose" && echo "	test failed (assume 2)" 1>&6
28226
28227echo "${as_me:-configure}:28227: testing test failed (assume 2) ..." 1>&5
28228
28229		sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28230		mv confdefs.tmp confdefs.h
28231		echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28232	fi
28233fi
28234
28235### Construct the ncurses library-subsets, if any, from this set of keywords:
28236###	none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28237###
28238### ticlib modules may be a separate library, otherwise contained in termlib.
28239### termlib modules may be a separate library, otherwise contained in ncurses.
28240###
28241### The of "+" or " " between the tokens controls the way the script
28242### chooses to split module lists into libraries.
28243###
28244### (see CF_LIB_RULES).
28245echo "$as_me:28245: checking for library subsets" >&5
28246echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28247LIB_SUBSETS=
28248
28249if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28250	LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28251	if test "$with_ticlib" != no ; then
28252		LIB_SUBSETS="${LIB_SUBSETS} "
28253	else
28254		LIB_SUBSETS="${LIB_SUBSETS}+"
28255	fi
28256fi
28257
28258LIB_SUBSETS="${LIB_SUBSETS}termlib"
28259test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28260
28261if test "$with_termlib" != no ; then
28262	LIB_SUBSETS="${LIB_SUBSETS} "
28263else
28264	LIB_SUBSETS="${LIB_SUBSETS}+"
28265fi
28266
28267LIB_SUBSETS="${LIB_SUBSETS}base"
28268
28269# Most term-driver calls are to tinfo, but some like init_pair are to the
28270# base library (so it resides in base).
28271if test "$with_term_driver" != no ; then
28272	LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28273	case "$cf_cv_system_name" in
28274	(*mingw32*|*mingw64*)
28275		if test "x$with_named_pipes" = xyes ; then
28276			LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28277		else
28278			LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28279		fi
28280		CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28281		;;
28282	(*msys*|*cygwin*)
28283		LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_msys2"
28284		;;
28285	(*)
28286		LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28287		;;
28288	esac
28289elif test "x$with_named_pipes" = xyes ; then
28290	case "$cf_cv_system_name" in
28291	(*mingw32*|*mingw64*)
28292		LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28293		;;
28294	(*)
28295		;;
28296	esac
28297fi
28298
28299test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28300test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28301
28302echo "$as_me:28302: result: $LIB_SUBSETS" >&5
28303echo "${ECHO_T}$LIB_SUBSETS" >&6
28304
28305### Construct the list of include-directories to be generated
28306
28307if test "$srcdir" != "."; then
28308	CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28309fi
28310CPPFLAGS="-I../include $CPPFLAGS"
28311if test "$srcdir" != "."; then
28312	CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28313fi
28314CPPFLAGS="-I. $CPPFLAGS"
28315
28316ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28317if test "$srcdir" != "."; then
28318	ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28319fi
28320if test "$GCC" != yes; then
28321	ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28322elif test "$includedir" != "/usr/include"; then
28323	if test "$includedir" = '${prefix}/include' ; then
28324		if test x$prefix != x/usr ; then
28325			ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28326		fi
28327	else
28328		ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28329	fi
28330fi
28331
28332### Build up pieces for makefile rules
28333echo "$as_me:28333: checking default library suffix" >&5
28334echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28335
28336	case $DFT_LWR_MODEL in
28337	(libtool) DFT_ARG_SUFFIX=''   ;;
28338	(normal)  DFT_ARG_SUFFIX=''   ;;
28339	(debug)   DFT_ARG_SUFFIX='_g' ;;
28340	(profile) DFT_ARG_SUFFIX='_p' ;;
28341	(shared)  DFT_ARG_SUFFIX=''   ;;
28342	esac
28343	test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28344echo "$as_me:28344: result: $DFT_ARG_SUFFIX" >&5
28345echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28346
28347echo "$as_me:28347: checking default library-dependency suffix" >&5
28348echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28349
28350	case X$DFT_LWR_MODEL in
28351	(Xlibtool)
28352		DFT_LIB_SUFFIX='.la'
28353		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28354		;;
28355	(Xdebug)
28356		case "$cf_cv_system_name" in
28357		(*-msvc*)
28358			DFT_LIB_SUFFIX='_g.lib'
28359			;;
28360		(*)
28361			DFT_LIB_SUFFIX='_g.a'
28362			;;
28363		esac
28364		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28365		;;
28366	(Xprofile)
28367		case "$cf_cv_system_name" in
28368		(*-msvc*)
28369			DFT_LIB_SUFFIX='_p.lib'
28370			;;
28371		(*)
28372			DFT_LIB_SUFFIX='_p.a'
28373			;;
28374		esac
28375		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28376		;;
28377	(Xshared)
28378		case "$cf_cv_system_name" in
28379		(aix[5-7]*)
28380			DFT_LIB_SUFFIX='.so'
28381			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28382			;;
28383		(*-msvc*)
28384			DFT_LIB_SUFFIX='.dll'
28385			DFT_DEP_SUFFIX='.dll.lib'
28386			;;
28387		(cygwin*|msys*|mingw*)
28388			DFT_LIB_SUFFIX='.dll'
28389			DFT_DEP_SUFFIX='.dll.a'
28390			;;
28391		(darwin*)
28392			DFT_LIB_SUFFIX='.dylib'
28393			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28394			;;
28395		(hpux*)
28396			case "$target" in
28397			(ia64*)
28398				DFT_LIB_SUFFIX='.so'
28399				DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28400				;;
28401			(*)
28402				DFT_LIB_SUFFIX='.sl'
28403				DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28404				;;
28405			esac
28406			;;
28407		(*)
28408			DFT_LIB_SUFFIX='.so'
28409			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28410			;;
28411		esac
28412		;;
28413	(*)
28414		case "$target" in
28415		(*-msvc*)
28416			DFT_LIB_SUFFIX='.lib'
28417			;;
28418		(*)
28419			DFT_LIB_SUFFIX='.a'
28420			;;
28421		esac
28422		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28423		;;
28424	esac
28425	if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28426	then
28427		DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28428		DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28429	fi
28430echo "$as_me:28430: result: $DFT_DEP_SUFFIX" >&5
28431echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28432
28433echo "$as_me:28433: checking default object directory" >&5
28434echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28435
28436	case $DFT_LWR_MODEL in
28437	(libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28438	(normal)  DFT_OBJ_SUBDIR='objects' ;;
28439	(debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28440	(profile) DFT_OBJ_SUBDIR='obj_p' ;;
28441	(shared)
28442		case "$cf_cv_system_name" in
28443		(cygwin|msys)
28444			DFT_OBJ_SUBDIR='objects' ;;
28445		(*)
28446			DFT_OBJ_SUBDIR='obj_s' ;;
28447		esac
28448	esac
28449echo "$as_me:28449: result: $DFT_OBJ_SUBDIR" >&5
28450echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28451
28452if test "x$cf_with_cxx" = xyes ; then
28453echo "$as_me:28453: checking c++ library-dependency suffix" >&5
28454echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28455if test "$with_libtool" != "no"; then
28456	# libtool thinks it can make c++ shared libraries (perhaps only g++)
28457	CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28458elif test "$with_shared_cxx" != "no"; then
28459	# also for g++ users...
28460	CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28461else
28462	# we normally make a static library because C/C++ library rules differ
28463
28464	case Xnormal in
28465	(Xlibtool)
28466		CXX_LIB_SUFFIX='.la'
28467		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28468		;;
28469	(Xdebug)
28470		case "$cf_cv_system_name" in
28471		(*-msvc*)
28472			CXX_LIB_SUFFIX='_g.lib'
28473			;;
28474		(*)
28475			CXX_LIB_SUFFIX='_g.a'
28476			;;
28477		esac
28478		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28479		;;
28480	(Xprofile)
28481		case "$cf_cv_system_name" in
28482		(*-msvc*)
28483			CXX_LIB_SUFFIX='_p.lib'
28484			;;
28485		(*)
28486			CXX_LIB_SUFFIX='_p.a'
28487			;;
28488		esac
28489		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28490		;;
28491	(Xshared)
28492		case "$cf_cv_system_name" in
28493		(aix[5-7]*)
28494			CXX_LIB_SUFFIX='.so'
28495			CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28496			;;
28497		(*-msvc*)
28498			CXX_LIB_SUFFIX='.dll'
28499			CXX_DEP_SUFFIX='.dll.lib'
28500			;;
28501		(cygwin*|msys*|mingw*)
28502			CXX_LIB_SUFFIX='.dll'
28503			CXX_DEP_SUFFIX='.dll.a'
28504			;;
28505		(darwin*)
28506			CXX_LIB_SUFFIX='.dylib'
28507			CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28508			;;
28509		(hpux*)
28510			case "$target" in
28511			(ia64*)
28512				CXX_LIB_SUFFIX='.so'
28513				CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28514				;;
28515			(*)
28516				CXX_LIB_SUFFIX='.sl'
28517				CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28518				;;
28519			esac
28520			;;
28521		(*)
28522			CXX_LIB_SUFFIX='.so'
28523			CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28524			;;
28525		esac
28526		;;
28527	(*)
28528		case "$target" in
28529		(*-msvc*)
28530			CXX_LIB_SUFFIX='.lib'
28531			;;
28532		(*)
28533			CXX_LIB_SUFFIX='.a'
28534			;;
28535		esac
28536		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28537		;;
28538	esac
28539	if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28540	then
28541		CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28542		CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28543	fi
28544
28545fi
28546echo "$as_me:28546: result: $CXX_LIB_SUFFIX" >&5
28547echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28548
28549fi
28550
28551# do not want -ldl in build except as needed for -lncurses dependency
28552if test "x$with_dlsym" = xyes ; then
28553if test "$DFT_LWR_MODEL" = shared || \
28554   test "$DFT_LWR_MODEL" = libtool ; then
28555
28556# remove dl library from $LIBS
28557LIBS=`echo "$LIBS" | sed -e 's/-ldl[ 	]//g' -e 's/-ldl$//'`
28558
28559fi
28560fi
28561### Set up low-level terminfo dependencies for makefiles.
28562
28563# TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28564# do not need libdl
28565TICS_LIST=
28566if test "x$with_dlsym" = xyes ; then
28567
28568# remove dl library from $SHLIB_LIST
28569TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[ 	]//g' -e 's/-ldl$//'`
28570
28571fi
28572
28573USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28574ABI_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28575USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28576if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28577then
28578	USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28579fi
28580
28581if test "$with_ticlib" != no ; then
28582
28583	if test "x$with_ticlib" != xyes ; then
28584		TICS_NAME=$with_ticlib
28585		TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${ABI_SUFFIX}//"`"
28586		TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28587		TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28588		TICS_LIB_SUFFIX="${with_ticlib}"
28589	else
28590		TICS_SUFFIX=${DFT_LIB_SUFFIX}
28591		TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28592		TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28593		TICS_LIB_SUFFIX="${TICS_NAME}${ABI_SUFFIX}"
28594	fi
28595	TICS_LDFLAGS="-L${LIB_DIR}"
28596	TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28597else
28598	TICS_SUFFIX=${DFT_LIB_SUFFIX}
28599	TICS_LDFLAGS="-L${LIB_DIR}"
28600	TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28601fi
28602
28603if test "$with_termlib" != no ; then
28604
28605	if test "x$with_termlib" != xyes ; then
28606		TINFO_NAME=$with_termlib
28607		TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${ABI_SUFFIX}//"`"
28608		TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28609		TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28610		TINFO_LIB_SUFFIX="${with_termlib}"
28611	else
28612		TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28613		TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28614		TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28615		TINFO_LIB_SUFFIX="${TINFO_NAME}${ABI_SUFFIX}"
28616	fi
28617
28618	TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28619	TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28620	if test "$DFT_LWR_MODEL" = "libtool"; then
28621		TEST_ARGS="${TEST_DEPS}"
28622		TEST_ARG2="${TEST_DEP2}"
28623		TINFO_LDFLAGS="-L${LIB_DIR}"
28624		TINFO_LIBS="$TEST_ARGS"
28625		TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28626		SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28627	else
28628		TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28629		TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28630		if test "x$with_term_driver" != xno ; then
28631			TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28632			TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28633			TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28634		else
28635			TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28636			TINFO_LIBS="$TEST_ARGS"
28637		fi
28638		TINFO_LDFLAGS="-L${LIB_DIR}"
28639		SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28640	fi
28641else
28642	# the next lines are needed for linking libtic over libncurses
28643	TINFO_NAME=${LIB_NAME}
28644	TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28645	TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28646	if test "x$with_tic_depends" = xyes ; then
28647		TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28648	else
28649		TICS_LIST="$SHLIB_LIST"
28650	fi
28651
28652	TINFO_LDFLAGS="-L${LIB_DIR}"
28653	TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28654fi
28655
28656if test "$DFT_LWR_MODEL" = shared ; then
28657	case "$cf_cv_system_name" in
28658	(cygwin*|msys*)
28659		# "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28660		TINFO_SUFFIX=.dll
28661		;;
28662	esac
28663fi
28664
28665if test "x$with_dlsym" = xyes ; then
28666
28667# remove dl library from $TICS_LIST
28668TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[ 	]//g' -e 's/-ldl$//'`
28669
28670fi
28671
28672if test "$DFT_LWR_MODEL" = "libtool"; then
28673	OBJEXT=lo
28674fi
28675
28676# needed for Ada95
28677TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28678
28679case "$DFT_LWR_MODEL" in
28680(normal|debug|profile)
28681
28682if test "$GCC" = yes ; then
28683	case "$cf_cv_system_name" in
28684	(OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28685		LDFLAGS_STATIC=
28686		LDFLAGS_SHARED=
28687		;;
28688	(*) 	# normally, except when broken
28689		LDFLAGS_STATIC=-static
28690		LDFLAGS_SHARED=-dynamic
28691		;;
28692	esac
28693else
28694	case "$cf_cv_system_name" in
28695	(aix[4-7]*) 	# from ld man page
28696		LDFLAGS_STATIC=-bstatic
28697		LDFLAGS_SHARED=-bdynamic
28698		;;
28699	(hpux*)		# from ld man page for hpux10.20, hpux11.11
28700		# We could also use just "archive" and "shared".
28701		LDFLAGS_STATIC=-Wl,-a,archive_shared
28702		LDFLAGS_SHARED=-Wl,-a,shared_archive
28703		;;
28704	(irix*)		# from ld man page IRIX64
28705		LDFLAGS_STATIC=-Bstatic
28706		LDFLAGS_SHARED=-Bdynamic
28707		;;
28708	(osf[45]*)	# from ld man page osf4.0d, osf5.1
28709		# alternative "-oldstyle_liblookup" (not in cc man page)
28710		LDFLAGS_STATIC=-noso
28711		LDFLAGS_SHARED=-so_archive
28712		;;
28713	(solaris2*)
28714		LDFLAGS_STATIC=-Bstatic
28715		LDFLAGS_SHARED=-Bdynamic
28716		;;
28717	esac
28718fi
28719
28720if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28721then
28722	echo "$as_me:28722: checking if linker supports switching between static/dynamic" >&5
28723echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28724
28725	rm -f libconftest.a
28726	cat >conftest.$ac_ext <<EOF
28727#line 28727 "configure"
28728#include <stdio.h>
28729int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28730EOF
28731	if { (eval echo "$as_me:28731: \"$ac_compile\"") >&5
28732  (eval $ac_compile) 2>&5
28733  ac_status=$?
28734  echo "$as_me:28734: \$? = $ac_status" >&5
28735  (exit "$ac_status"); } ; then
28736		( $AR $ARFLAGS libconftest.a conftest.$OBJEXT ) 2>&5 1>/dev/null
28737		( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28738	fi
28739	rm -f conftest.*
28740
28741	cf_save_LIBS="$LIBS"
28742
28743	LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28744	cat >"conftest.$ac_ext" <<_ACEOF
28745#line 28745 "configure"
28746#include "confdefs.h"
28747
28748#line 28748 "configure"
28749#include <stdio.h>
28750int cf_ldflags_static(FILE *fp);
28751
28752int
28753main (void)
28754{
28755
28756	return cf_ldflags_static(stdin);
28757
28758  ;
28759  return 0;
28760}
28761_ACEOF
28762rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28763if { (eval echo "$as_me:28763: \"$ac_link\"") >&5
28764  (eval $ac_link) 2>&5
28765  ac_status=$?
28766  echo "$as_me:28766: \$? = $ac_status" >&5
28767  (exit "$ac_status"); } &&
28768         { ac_try='test -s "conftest$ac_exeext"'
28769  { (eval echo "$as_me:28769: \"$ac_try\"") >&5
28770  (eval $ac_try) 2>&5
28771  ac_status=$?
28772  echo "$as_me:28772: \$? = $ac_status" >&5
28773  (exit "$ac_status"); }; }; then
28774
28775	# some linkers simply ignore the -dynamic
28776	case x`file "conftest$ac_exeext" 2>/dev/null` in
28777	(*static*)
28778		cf_ldflags_static=no
28779		;;
28780	(*)
28781		cf_ldflags_static=yes
28782		;;
28783	esac
28784
28785else
28786  echo "$as_me: failed program was:" >&5
28787cat "conftest.$ac_ext" >&5
28788cf_ldflags_static=no
28789fi
28790rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28791
28792	rm -f libconftest.*
28793	LIBS="$cf_save_LIBS"
28794
28795	echo "$as_me:28795: result: $cf_ldflags_static" >&5
28796echo "${ECHO_T}$cf_ldflags_static" >&6
28797
28798	if test "$cf_ldflags_static" != yes
28799	then
28800		LDFLAGS_STATIC=
28801		LDFLAGS_SHARED=
28802	fi
28803else
28804	LDFLAGS_STATIC=
28805	LDFLAGS_SHARED=
28806fi
28807
28808	;;
28809esac
28810
28811echo "$as_me:28811: checking where we will install curses.h" >&5
28812echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28813
28814includesubdir=
28815if test "$with_overwrite" = no && \
28816 { test "x$includedir" = 'x${prefix}/include' || \
28817   test "x$includedir" = "x${prefix}/include"; }
28818then
28819	includesubdir="/ncurses${ABI_SUFFIX}"
28820fi
28821echo "$as_me:28821: result: ${includedir}${includesubdir}" >&5
28822echo "${ECHO_T}${includedir}${includesubdir}" >&6
28823
28824### Resolve a conflict between normal and wide-curses by forcing applications
28825### that will need libutf8 to add it to their configure script.
28826if test "$with_overwrite" != no ; then
28827if test "$NCURSES_LIBUTF8" = 1 ; then
28828	NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28829	{ echo "$as_me:28829: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28830echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28831fi
28832fi
28833WITH_OVERWRITE=$with_overwrite
28834
28835### At least on MinGW a shared library build without libtool
28836### requires adding the additional libs to the link list.
28837case "$cf_cv_system_name" in
28838(*mingw32*|*mingw64*)
28839	if test "$DFT_LWR_MODEL" != "libtool"; then
28840   	   SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28841	fi
28842	;;
28843*)	;;
28844esac
28845
28846### predefined stuff for the test programs
28847
28848cat >>confdefs.h <<\EOF
28849#define HAVE_SLK_COLOR 1
28850EOF
28851
28852# pkgsrc uses these
28853
28854echo "$as_me:28854: checking for desired basename for form library" >&5
28855echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28856
28857# Check whether --with-form-libname or --without-form-libname was given.
28858if test "${with_form_libname+set}" = set; then
28859  withval="$with_form_libname"
28860  with_lib_basename=$withval
28861else
28862  with_lib_basename=form
28863fi;
28864FORM_NAME="$with_lib_basename"
28865
28866case "x$FORM_NAME" in
28867(x|xno|xnone|xyes)
28868	FORM_NAME=form
28869	;;
28870(*)
28871	;;
28872esac
28873
28874echo "$as_me:28874: result: $FORM_NAME" >&5
28875echo "${ECHO_T}$FORM_NAME" >&6
28876
28877echo "$as_me:28877: checking for desired basename for menu library" >&5
28878echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28879
28880# Check whether --with-menu-libname or --without-menu-libname was given.
28881if test "${with_menu_libname+set}" = set; then
28882  withval="$with_menu_libname"
28883  with_lib_basename=$withval
28884else
28885  with_lib_basename=menu
28886fi;
28887MENU_NAME="$with_lib_basename"
28888
28889case "x$MENU_NAME" in
28890(x|xno|xnone|xyes)
28891	MENU_NAME=menu
28892	;;
28893(*)
28894	;;
28895esac
28896
28897echo "$as_me:28897: result: $MENU_NAME" >&5
28898echo "${ECHO_T}$MENU_NAME" >&6
28899
28900echo "$as_me:28900: checking for desired basename for panel library" >&5
28901echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28902
28903# Check whether --with-panel-libname or --without-panel-libname was given.
28904if test "${with_panel_libname+set}" = set; then
28905  withval="$with_panel_libname"
28906  with_lib_basename=$withval
28907else
28908  with_lib_basename=panel
28909fi;
28910PANEL_NAME="$with_lib_basename"
28911
28912case "x$PANEL_NAME" in
28913(x|xno|xnone|xyes)
28914	PANEL_NAME=panel
28915	;;
28916(*)
28917	;;
28918esac
28919
28920echo "$as_me:28920: result: $PANEL_NAME" >&5
28921echo "${ECHO_T}$PANEL_NAME" >&6
28922
28923echo "$as_me:28923: checking for desired basename for cxx library" >&5
28924echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28925
28926# Check whether --with-cxx-libname or --without-cxx-libname was given.
28927if test "${with_cxx_libname+set}" = set; then
28928  withval="$with_cxx_libname"
28929  with_lib_basename=$withval
28930else
28931  with_lib_basename=ncurses++
28932fi;
28933CXX_NAME="$with_lib_basename"
28934
28935case "x$CXX_NAME" in
28936(x|xno|xnone|xyes)
28937	CXX_NAME=ncurses++
28938	;;
28939(*)
28940	;;
28941esac
28942
28943echo "$as_me:28943: result: $CXX_NAME" >&5
28944echo "${ECHO_T}$CXX_NAME" >&6
28945
28946### Construct the list of subdirectories for which we'll customize makefiles
28947### with the appropriate compile-rules.
28948
28949echo "$as_me:28949: checking for src modules" >&5
28950echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28951
28952# dependencies and linker-arguments for test-programs
28953TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28954TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28955if test "$DFT_LWR_MODEL" = "libtool"; then
28956	TEST_ARGS="${TEST_DEPS}"
28957	TEST_ARG2="${TEST_DEP2}"
28958else
28959	TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28960	TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28961fi
28962
28963PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28964cf_cv_src_modules=
28965for cf_dir in $modules_to_build
28966do
28967	if test -f "$srcdir/$cf_dir/modules" ; then
28968
28969		if test -z "$cf_cv_src_modules"; then
28970			cf_cv_src_modules=$cf_dir
28971		else
28972			cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28973		fi
28974
28975		# Make the ncurses_cfg.h file record the library interface files as
28976		# well.  These are header files that are the same name as their
28977		# directory.  Ncurses is the only library that does not follow
28978		# that pattern.
28979		if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28980
28981cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28982
28983			cat >>confdefs.h <<EOF
28984#define HAVE_${cf_have_include}_H 1
28985EOF
28986
28987			cat >>confdefs.h <<EOF
28988#define HAVE_LIB${cf_have_include} 1
28989EOF
28990
28991cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28992
28993eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28994
28995			TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28996			TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28997			if test "$DFT_LWR_MODEL" = "libtool"; then
28998				TEST_ARGS="${TEST_DEPS}"
28999				TEST_ARG2="${TEST_DEP2}"
29000			else
29001				TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
29002				TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
29003			fi
29004			PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
29005		fi
29006	fi
29007done
29008echo "$as_me:29008: result: $cf_cv_src_modules" >&5
29009echo "${ECHO_T}$cf_cv_src_modules" >&6
29010
29011TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
29012TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
29013
29014SRC_SUBDIRS=
29015if test "x$cf_with_manpages" != xno ; then
29016	SRC_SUBDIRS="$SRC_SUBDIRS man"
29017fi
29018SRC_SUBDIRS="$SRC_SUBDIRS include"
29019for cf_dir in $cf_cv_src_modules
29020do
29021	SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
29022done
29023if test "x$cf_with_tests" != "xno" ; then
29024	SRC_SUBDIRS="$SRC_SUBDIRS test"
29025fi
29026# always make this, to install the ncurses-config script
29027SRC_SUBDIRS="$SRC_SUBDIRS misc"
29028if test "$cf_with_cxx_binding" != no; then
29029	PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
29030	SRC_SUBDIRS="$SRC_SUBDIRS c++"
29031fi
29032
29033test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
29034test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
29035
29036ADA_SUBDIRS=
29037if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
29038	SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
29039	ADA_SUBDIRS="gen src"
29040	if test "x$cf_with_tests" != "xno" ; then
29041		ADA_SUBDIRS="$ADA_SUBDIRS samples"
29042	fi
29043fi
29044
29045SUB_MAKEFILES=
29046for cf_dir in $SRC_SUBDIRS
29047do
29048	SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
29049done
29050
29051if test -n "$ADA_SUBDIRS"; then
29052	for cf_dir in $ADA_SUBDIRS
29053	do
29054		SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
29055	done
29056
29057fi
29058
29059if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
29060   SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
29061   SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
29062   SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
29063fi
29064
29065DIRS_TO_MAKE="lib"
29066for cf_item in $cf_list_models
29067do
29068
29069	case $cf_item in
29070	(libtool) cf_subdir='obj_lo'  ;;
29071	(normal)  cf_subdir='objects' ;;
29072	(debug)   cf_subdir='obj_g' ;;
29073	(profile) cf_subdir='obj_p' ;;
29074	(shared)
29075		case "$cf_cv_system_name" in
29076		(cygwin|msys)
29077			cf_subdir='objects' ;;
29078		(*)
29079			cf_subdir='obj_s' ;;
29080		esac
29081	esac
29082
29083	for cf_item2 in $DIRS_TO_MAKE
29084	do
29085		test "$cf_item2" = "$cf_subdir" && break
29086	done
29087	test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
29088done
29089for cf_dir in $DIRS_TO_MAKE
29090do
29091	test ! -d "$cf_dir" && mkdir "$cf_dir"
29092done
29093
29094# symbols that differ when compiling Ada95 by itself.
29095NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
29096
29097# values to use as strings
29098
29099cat >>confdefs.h <<EOF
29100#define NCURSES_PATHSEP '$PATH_SEPARATOR'
29101EOF
29102
29103cat >>confdefs.h <<EOF
29104#define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
29105EOF
29106
29107### Define substitutions for header files to avoid name-pollution
29108
29109if test "x$cf_cv_have_tcgetattr" = xyes ; then
29110	HAVE_TCGETATTR=1
29111else
29112	HAVE_TCGETATTR=0
29113fi
29114
29115if test "x$ac_cv_header_stdint_h" = xyes ; then
29116	HAVE_STDINT_H=1
29117else
29118	HAVE_STDINT_H=0
29119fi
29120
29121if test "x$ac_cv_header_sgtty_h" = xyes ; then
29122	HAVE_SGTTY_H=1
29123else
29124	HAVE_SGTTY_H=0
29125fi
29126
29127if test "x$ac_cv_header_termio_h" = xyes ; then
29128	HAVE_TERMIO_H=1
29129else
29130	HAVE_TERMIO_H=0
29131fi
29132
29133if test "x$ac_cv_header_termios_h" = xyes ; then
29134	HAVE_TERMIOS_H=1
29135else
29136	HAVE_TERMIOS_H=0
29137fi
29138
29139case "x${ac_cv_header_termios_h}${ac_cv_header_termio_h}${ac_cv_header_sgtty_h}${cf_cv_have_tcgetattr}" in
29140(*yes*)
29141	;;
29142(*)
29143	case "$cf_cv_system_name" in
29144	(*mingw32*|*mingw64*|*-msvc*)
29145		;;
29146	(*)
29147		{ { echo "$as_me:29147: error: No termio/termios/sgtty found" >&5
29148echo "$as_me: error: No termio/termios/sgtty found" >&2;}
29149   { (exit 1); exit 1; }; }
29150		;;
29151	esac
29152	;;
29153esac
29154
29155###############################################################################
29156
29157# Extract the first word of "tbl", so it can be a program name with args.
29158set dummy tbl; ac_word=$2
29159echo "$as_me:29159: checking for $ac_word" >&5
29160echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
29161if test "${ac_cv_path_NROFF_TBL+set}" = set; then
29162  echo $ECHO_N "(cached) $ECHO_C" >&6
29163else
29164  case $NROFF_TBL in
29165  [\\/]* | ?:[\\/]*)
29166  ac_cv_path_NROFF_TBL="$NROFF_TBL" # Let the user override the test with a path.
29167  ;;
29168  *)
29169  ac_save_IFS=$IFS; IFS=$ac_path_separator
29170ac_dummy="$PATH"
29171for ac_dir in $ac_dummy; do
29172  IFS=$ac_save_IFS
29173  test -z "$ac_dir" && ac_dir=.
29174  if $as_executable_p "$ac_dir/$ac_word"; then
29175   ac_cv_path_NROFF_TBL="$ac_dir/$ac_word"
29176   echo "$as_me:29176: found $ac_dir/$ac_word" >&5
29177   break
29178fi
29179done
29180
29181  ;;
29182esac
29183fi
29184NROFF_TBL=$ac_cv_path_NROFF_TBL
29185
29186if test -n "$NROFF_TBL"; then
29187  echo "$as_me:29187: result: $NROFF_TBL" >&5
29188echo "${ECHO_T}$NROFF_TBL" >&6
29189else
29190  echo "$as_me:29190: result: no" >&5
29191echo "${ECHO_T}no" >&6
29192fi
29193
29194echo "$as_me:29194: checking if $NROFF_TBL supports 'x' column modifier" >&5
29195echo $ECHO_N "checking if $NROFF_TBL supports 'x' column modifier... $ECHO_C" >&6
29196if test "${cf_cv_tbl_x_option_okay+set}" = set; then
29197  echo $ECHO_N "(cached) $ECHO_C" >&6
29198else
29199
29200	if test "$cross_compiling" = yes ; then
29201		cf_cv_tbl_x_option_okay=unknown
29202	else
29203		cf_cv_tbl_x_option_okay=no
29204		cat > conftest <<-CF_EOF
29205		.TS
29206		L.
29207		table cell
29208		.TE
29209		CF_EOF
29210		if $NROFF_TBL < conftest > /dev/null 2>&1
29211		then
29212			cat > conftest <<-CF_EOF
29213			.TS
29214			Lx.
29215			table cell
29216			.TE
29217			CF_EOF
29218			if $NROFF_TBL < conftest > /dev/null 2>&1
29219			then
29220				cf_cv_tbl_x_option_okay=yes
29221			fi
29222		else
29223			{ { echo "$as_me:29223: error: $NROFF_TBL not available." >&5
29224echo "$as_me: error: $NROFF_TBL not available." >&2;}
29225   { (exit 1); exit 1; }; }
29226		fi
29227		rm -f conftest
29228	fi
29229
29230fi
29231echo "$as_me:29231: result: $cf_cv_tbl_x_option_okay" >&5
29232echo "${ECHO_T}$cf_cv_tbl_x_option_okay" >&6
29233
29234TBL_X_OPTION=$cf_cv_tbl_x_option_okay
29235
29236echo "$as_me:29236: checking format of man pages" >&5
29237echo $ECHO_N "checking format of man pages... $ECHO_C" >&6
29238
29239# Check whether --with-manpage-format or --without-manpage-format was given.
29240if test "${with_manpage_format+set}" = set; then
29241  withval="$with_manpage_format"
29242  MANPAGE_FORMAT=$withval
29243else
29244  MANPAGE_FORMAT=unknown
29245fi;
29246
29247test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
29248MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
29249
29250cf_unknown=
29251
29252case "$MANPAGE_FORMAT" in
29253(unknown)
29254	if test -z "$MANPATH" ; then
29255		MANPATH="/usr/man:/usr/share/man"
29256	fi
29257
29258	# look for the 'date' man page (it is most likely to be installed!)
29259	MANPAGE_FORMAT=
29260	cf_preform="no"
29261	cf_catonly="yes"
29262	cf_example="date"
29263
29264	IFS="${IFS:- 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
29265	for cf_dir in $MANPATH; do
29266		test -z "$cf_dir" && cf_dir=/usr/man
29267		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
29268		do
29269			cf_test=`echo "$cf_name" | sed -e 's/*//'`
29270			if test "x$cf_test" = "x$cf_name" ; then
29271
29272				case "$cf_name" in
29273				(*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
29274				(*.xz)  MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
29275				(*.gz)  MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
29276				(*.Z)   MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
29277				(*.0)   MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
29278				(*)     MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
29279				esac
29280
29281				case "$cf_name" in
29282				($cf_dir/man*)
29283					cf_catonly=no
29284					;;
29285				($cf_dir/cat*)
29286					cf_preform=yes
29287					;;
29288				esac
29289				break
29290			fi
29291
29292			# if we found a match in either man* or cat*, stop looking
29293			if test -n "$MANPAGE_FORMAT" ; then
29294				cf_found=no
29295				test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
29296				test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
29297				case "$cf_name" in
29298				($cf_dir/cat*)
29299					cf_found=yes
29300					;;
29301				esac
29302				test "$cf_found" = yes && break
29303			fi
29304		done
29305		# only check the first directory in $MANPATH where we find man pages
29306		if test -n "$MANPAGE_FORMAT" ; then
29307			break
29308		fi
29309	done
29310	# if we did not find the example, just assume it is normal
29311	test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
29312	IFS="$ac_save_ifs"
29313	;;
29314(*)
29315	for cf_option in $MANPAGE_FORMAT; do
29316	case "$cf_option" in
29317	(xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
29318		;;
29319	(*)
29320		cf_unknown="$cf_unknown $cf_option"
29321		;;
29322	esac
29323	done
29324	;;
29325esac
29326
29327echo "$as_me:29327: result: $MANPAGE_FORMAT" >&5
29328echo "${ECHO_T}$MANPAGE_FORMAT" >&6
29329if test -n "$cf_unknown" ; then
29330	{ echo "$as_me:29330: WARNING: Unexpected man page format $cf_unknown" >&5
29331echo "$as_me: WARNING: Unexpected man page format $cf_unknown" >&2;}
29332fi
29333
29334cf_manpage_format=no
29335cf_manpage_inboth=no
29336cf_manpage_so_strip=
29337cf_manpage_compress=
29338cf_manpage_coptions=
29339
29340for cf_item in $MANPAGE_FORMAT
29341do
29342case "$cf_item" in
29343(catonly)
29344	cf_manpage_format=yes
29345	cf_manpage_inboth=no
29346	;;
29347(formatted)
29348	cf_manpage_format=yes
29349	cf_manpage_inboth=yes
29350	;;
29351(compress)
29352	cf_manpage_so_strip="Z"
29353	cf_manpage_compress=compress
29354	;;
29355(gzip)
29356	cf_manpage_so_strip="gz"
29357	cf_manpage_compress=gzip
29358	cf_manpage_coptions=-n
29359	;;
29360(bzip2)
29361	cf_manpage_so_strip="bz2"
29362	cf_manpage_compress=bzip2
29363	;;
29364(xz)
29365	cf_manpage_so_strip="xz"
29366	cf_manpage_compress=xz
29367	;;
29368esac
29369done
29370
29371echo "$as_me:29371: checking for man page renaming" >&5
29372echo $ECHO_N "checking for man page renaming... $ECHO_C" >&6
29373
29374# Check whether --with-manpage-renames or --without-manpage-renames was given.
29375if test "${with_manpage_renames+set}" = set; then
29376  withval="$with_manpage_renames"
29377  MANPAGE_RENAMES=$withval
29378else
29379  MANPAGE_RENAMES=yes
29380fi;
29381
29382case ".$MANPAGE_RENAMES" in
29383(.no)
29384	;;
29385(.|.yes)
29386	# Debian 'man' program?
29387	if test -f /etc/debian_version ; then
29388		MANPAGE_RENAMES=man/man_db.renames
29389	else
29390		MANPAGE_RENAMES=no
29391	fi
29392	;;
29393esac
29394
29395if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
29396	MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
29397elif test "$MANPAGE_RENAMES" = no ; then
29398	:
29399elif test ! -f "$MANPAGE_RENAMES" ; then
29400	{ { echo "$as_me:29400: error: not a filename: $MANPAGE_RENAMES" >&5
29401echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
29402   { (exit 1); exit 1; }; }
29403fi
29404
29405echo "$as_me:29405: result: $MANPAGE_RENAMES" >&5
29406echo "${ECHO_T}$MANPAGE_RENAMES" >&6
29407
29408echo "$as_me:29408: checking if man page aliases will be installed" >&5
29409echo $ECHO_N "checking if man page aliases will be installed... $ECHO_C" >&6
29410
29411# Check whether --with-manpage-aliases or --without-manpage-aliases was given.
29412if test "${with_manpage_aliases+set}" = set; then
29413  withval="$with_manpage_aliases"
29414  MANPAGE_ALIASES=$withval
29415else
29416  MANPAGE_ALIASES=yes
29417fi;
29418
29419echo "$as_me:29419: result: $MANPAGE_ALIASES" >&5
29420echo "${ECHO_T}$MANPAGE_ALIASES" >&6
29421
29422case "x$LN_S" in
29423(xln*)
29424	cf_use_symlinks=yes
29425	;;
29426(*)
29427	cf_use_symlinks=no
29428	;;
29429esac
29430
29431MANPAGE_SYMLINKS=no
29432if test "$MANPAGE_ALIASES" = yes ; then
29433echo "$as_me:29433: checking if man page symlinks should be used" >&5
29434echo $ECHO_N "checking if man page symlinks should be used... $ECHO_C" >&6
29435
29436# Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
29437if test "${with_manpage_symlinks+set}" = set; then
29438  withval="$with_manpage_symlinks"
29439  MANPAGE_SYMLINKS=$withval
29440else
29441  MANPAGE_SYMLINKS=$cf_use_symlinks
29442fi;
29443
29444if test "$cf_use_symlinks" = no; then
29445if test "$MANPAGE_SYMLINKS" = yes ; then
29446	{ echo "$as_me:29446: WARNING: cannot make symlinks" >&5
29447echo "$as_me: WARNING: cannot make symlinks" >&2;}
29448	MANPAGE_SYMLINKS=no
29449fi
29450fi
29451
29452echo "$as_me:29452: result: $MANPAGE_SYMLINKS" >&5
29453echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
29454fi
29455
29456echo "$as_me:29456: checking for man page tbl" >&5
29457echo $ECHO_N "checking for man page tbl... $ECHO_C" >&6
29458
29459# Check whether --with-manpage-tbl or --without-manpage-tbl was given.
29460if test "${with_manpage_tbl+set}" = set; then
29461  withval="$with_manpage_tbl"
29462  MANPAGE_TBL=$withval
29463else
29464  MANPAGE_TBL=no
29465fi;
29466
29467echo "$as_me:29467: result: $MANPAGE_TBL" >&5
29468echo "${ECHO_T}$MANPAGE_TBL" >&6
29469
29470if test "$prefix" = "NONE" ; then
29471	cf_prefix="$ac_default_prefix"
29472else
29473	cf_prefix="$prefix"
29474fi
29475
29476test ! -d man && mkdir man
29477
29478cf_edit_man=./edit_man.sh
29479cf_man_alias=`pwd`/man_alias.sed
29480
29481cat >$cf_edit_man <<CF_EOF
29482#!$SHELL
29483# generated by "configure" from the CF_MAN_PAGES macro in "aclocal.m4"
29484
29485prefix="$cf_prefix"
29486datarootdir="$datarootdir"
29487datadir="$datadir"
29488
29489NCURSES_MAJOR="$NCURSES_MAJOR"
29490NCURSES_MINOR="$NCURSES_MINOR"
29491NCURSES_PATCH="$NCURSES_PATCH"
29492
29493NCURSES_OSPEED="$NCURSES_OSPEED"
29494TERMINFO="$TERMINFO"
29495TERMINFO_DIRS="$TERMINFO_DIRS"
29496
29497INSTALL="$INSTALL"
29498INSTALL_DATA="$INSTALL_DATA"
29499
29500transform="$program_transform_name"
29501
29502TMP=\${TMPDIR:=/tmp}/man\$\$
29503trap "rm -f \$TMP; exit 1" 1 2 3 15
29504trap "rm -f \$TMP" 0
29505
29506form=\$1
29507shift || exit 1
29508
29509verb=\$1
29510shift || exit 1
29511
29512mandir=\$1
29513shift || exit 1
29514
29515srcdir=\$1
29516top_srcdir=\$srcdir/..
29517shift || exit 1
29518
29519if test "\$form" = normal ; then
29520	if test "$cf_manpage_format" = yes ; then
29521	if test "$cf_manpage_inboth" = no ; then
29522		$SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
29523		exit $?
29524	fi
29525	fi
29526	cf_subdir=\$mandir/man
29527	cf_tables=$MANPAGE_TBL
29528else
29529	cf_subdir=\$mandir/cat
29530	cf_tables=yes
29531fi
29532
29533# process the list of source-files
29534for i in "\$@" ; do
29535case \$i in
29536(*.orig|*.rej) ;;
29537(*.[0-9]*)
29538	section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
29539	if test "\$verb" = installing ; then
29540	if test ! -d "\$cf_subdir\${section}" ; then
29541		mkdir -p "\$cf_subdir\$section"
29542	fi
29543	fi
29544
29545	# replace variables in man page
29546	if test ! -f "$cf_man_alias" ; then
29547cat >>$cf_man_alias <<-CF_EOF2
29548		s,@DATADIR@,\$datadir,g
29549		s,@TERMINFO@,\${TERMINFO:="no default value"},g
29550		s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
29551		s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
29552		s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
29553		s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
29554		s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
29555CF_EOF
29556
29557	for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
29558	do
29559		cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29560		cf_name=`echo "$cf_name" | sed "$program_transform_name"`
29561cat >>$cf_edit_man <<-CF_EOF
29562		s,@$cf_NAME@,$cf_name,g
29563CF_EOF
29564	done
29565
29566cat >>$cf_edit_man <<CF_EOF
29567CF_EOF2
29568		echo "...made $cf_man_alias"
29569	fi
29570
29571	aliases=
29572	cf_source=\`basename "\$i"\`
29573	cf_full_alias=\$cf_source
29574	test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias"
29575	if test ! -f "\$cf_full_alias" ; then
29576		echo ".. skipped \$cf_source"
29577		continue
29578	fi
29579CF_EOF
29580
29581if test "$MANPAGE_ALIASES" != no ; then
29582cat >>$cf_edit_man <<CF_EOF
29583	nCurses=ignore.3x
29584	cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\`
29585	test "$with_curses_h" = yes && nCurses=ncurses.3x
29586	aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$cf_full_alias" |sed -f "$cf_man_alias" | sort -u; test "\$cf_part_alias" = "\$nCurses" && echo curses\`
29587CF_EOF
29588fi
29589
29590if test "$MANPAGE_RENAMES" = no ; then
29591cat >>$cf_edit_man <<CF_EOF
29592	# perform program transformations for section 1 man pages
29593	if test \$section = 1 ; then
29594		cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
29595	else
29596		cf_target=\$cf_subdir\${section}/\$cf_source
29597	fi
29598CF_EOF
29599else
29600cat >>$cf_edit_man <<CF_EOF
29601	cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
29602	if test -z "\$cf_target" ; then
29603		echo "? missing rename for \$cf_source"
29604		cf_target="\$cf_source"
29605	fi
29606	cf_target="\$cf_subdir\${section}/\${cf_target}"
29607
29608CF_EOF
29609fi
29610
29611cat >>$cf_edit_man <<CF_EOF
29612	sed	-f "$cf_man_alias" \\
29613CF_EOF
29614
29615if test "$MANPAGE_RENAMES" != no ; then
29616cat >>$cf_edit_man <<CF_EOF
29617		< "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
29618CF_EOF
29619else
29620cat >>$cf_edit_man <<CF_EOF
29621		< "\$i" >\$TMP
29622CF_EOF
29623fi
29624
29625cat >>$cf_edit_man <<CF_EOF
29626if test $cf_cv_tbl_x_option_okay != yes ; then
29627	# Remove column modifier 'x' from table descriptions if the
29628	# system's tbl(1) doesn't support it.
29629	sed -e '/^\.TS/,/\.$/s@x[.]@.@' \$TMP >\$TMP.unx
29630	mv \$TMP.unx \$TMP
29631fi
29632CF_EOF
29633
29634cat >>$cf_edit_man <<CF_EOF
29635if test \$cf_tables = yes ; then
29636	tbl \$TMP >\$TMP.out
29637	mv \$TMP.out \$TMP
29638fi
29639CF_EOF
29640
29641if test "$with_overwrite" != yes ; then
29642cat >>$cf_edit_man <<CF_EOF
29643	sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$ABI_SUFFIX/curses.h," \
29644	    -e "/\\#[    ]*include/s,<term.h,<ncurses$ABI_SUFFIX/term.h," \
29645	    -e "/\\#[    ]*include/s,<form.h,<ncurses$ABI_SUFFIX/form.h," \
29646	    -e "/\\#[    ]*include/s,<menu.h,<ncurses$ABI_SUFFIX/menu.h," \
29647	    -e "/\\#[    ]*include/s,<panel.h,<ncurses$ABI_SUFFIX/panel.h," \
29648	    -e "/\\#[    ]*include/s,<unctrl.h,<ncurses$ABI_SUFFIX/unctrl.h," \
29649	  < \$TMP >\$TMP.out
29650	mv \$TMP.out \$TMP
29651CF_EOF
29652fi
29653
29654if test "$with_curses_h" != yes ; then
29655cat >>$cf_edit_man <<CF_EOF
29656	sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," \
29657	  < \$TMP >\$TMP.out
29658	mv \$TMP.out \$TMP
29659CF_EOF
29660fi
29661
29662cat >>$cf_edit_man <<CF_EOF
29663	if test "\$form" = format ; then
29664		nroff -man \$TMP >\$TMP.out
29665		mv \$TMP.out \$TMP
29666	fi
29667CF_EOF
29668
29669if test -n "$cf_manpage_compress" ; then
29670cat >>$cf_edit_man <<CF_EOF
29671	if test "\$verb" = installing ; then
29672	if ( "$cf_manpage_compress" $cf_manpage_coptions -f \$TMP )
29673	then
29674		mv \$TMP.$cf_manpage_so_strip \$TMP
29675	fi
29676	fi
29677	cf_target="\$cf_target.$cf_manpage_so_strip"
29678CF_EOF
29679fi
29680
29681case "$MANPAGE_FORMAT" in
29682(*BSDI*)
29683cat >>$cf_edit_man <<CF_EOF
29684	if test "\$form" = format ; then
29685		# BSDI installs only .0 suffixes in the cat directories
29686		cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
29687	fi
29688CF_EOF
29689  ;;
29690esac
29691
29692cat >>$cf_edit_man <<CF_EOF
29693	suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
29694	extra_suffix=
29695	if test -n "$EXTRA_SUFFIX" ; then
29696		case \$cf_target in
29697		(*${EXTRA_SUFFIX}\$suffix)
29698			extra_suffix="$EXTRA_SUFFIX"
29699			;;
29700		esac
29701	fi
29702	if test "\$verb" = installing ; then
29703		echo "\$verb \$cf_target"
29704		\$INSTALL_DATA \$TMP "\$cf_target"
29705		test -d "\$cf_subdir\${section}" &&
29706		test -n "\$aliases" && (
29707			cd "\$cf_subdir\${section}" && (
29708				cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
29709				test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_strip\$%%'\`
29710				cf_target=\`basename "\$cf_target"\`
29711				for cf_alias in \$aliases
29712				do
29713					if test "\$section" = 1 ; then
29714						cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
29715					fi
29716					cf_alias="\${cf_alias}\${extra_suffix}"
29717
29718					if test "$MANPAGE_SYMLINKS" = yes ; then
29719						if test -f "\$cf_alias\${suffix}" ; then
29720							if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
29721							then
29722								continue
29723							fi
29724						fi
29725						echo ".. \$verb alias \$cf_alias\${suffix}"
29726CF_EOF
29727case "x$LN_S" in
29728(*-f)
29729cat >>$cf_edit_man <<CF_EOF
29730						$LN_S "\$cf_target" "\$cf_alias\${suffix}"
29731CF_EOF
29732	;;
29733(*)
29734cat >>$cf_edit_man <<CF_EOF
29735						rm -f "\$cf_alias\${suffix}"
29736						$LN_S "\$cf_target" "\$cf_alias\${suffix}"
29737CF_EOF
29738	;;
29739esac
29740cat >>$cf_edit_man <<CF_EOF
29741					elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
29742						echo ".so \$cf_source" >\$TMP
29743CF_EOF
29744if test -n "$cf_manpage_compress" ; then
29745cat >>$cf_edit_man <<CF_EOF
29746						if test -n "$cf_manpage_so_strip" ; then
29747							"$cf_manpage_compress" $cf_manpage_coptions -f \$TMP
29748							mv \$TMP.$cf_manpage_so_strip \$TMP
29749						fi
29750CF_EOF
29751fi
29752cat >>$cf_edit_man <<CF_EOF
29753						echo ".. \$verb alias \$cf_alias\${suffix}"
29754						rm -f "\$cf_alias\${suffix}"
29755						\$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
29756					fi
29757				done
29758			)
29759		)
29760	elif test "\$verb" = removing ; then
29761		test -f "\$cf_target" && (
29762			echo "\$verb \$cf_target"
29763			rm -f "\$cf_target"
29764		)
29765		test -d "\$cf_subdir\${section}" &&
29766		test -n "\$aliases" && (
29767			cd "\$cf_subdir\${section}" && (
29768				for cf_alias in \$aliases
29769				do
29770					if test "\$section" = 1 ; then
29771						cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
29772					fi
29773					cf_alias="\${cf_alias}\${extra_suffix}"
29774
29775					echo ".. \$verb alias \$cf_alias\${suffix}"
29776					rm -f "\$cf_alias\${suffix}"
29777				done
29778			)
29779		)
29780	else
29781#		echo ".hy 0"
29782		cat \$TMP
29783	fi
29784	;;
29785esac
29786done
29787
29788if test "$cf_manpage_inboth" = yes ; then
29789if test "\$form" != format ; then
29790	$SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
29791fi
29792fi
29793
29794exit 0
29795CF_EOF
29796chmod 755 "$cf_edit_man"
29797
29798################################################################################
29799test "x$use_database" = xyes && \
29800SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
29801
29802SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
29803SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
29804
29805if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
29806SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29807fi
29808
29809if test "x$cf_with_tests" != xno ; then
29810	MAKE_TESTS=
29811else
29812	MAKE_TESTS="#"
29813fi
29814
29815ADAHTML_DIR=../../doc/html/ada
29816
29817# workaround for OS/2 (20151017)
29818case "$cf_cv_system_name" in
29819(os2*)
29820	LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29821	;;
29822(*)
29823	LIBTOOL_OPTS_CXX=
29824	;;
29825esac
29826
29827# workaround for g++ versus Solaris (20131116)
29828case "$cf_cv_system_name" in
29829(solaris2*)
29830	case "x$CPPFLAGS" in
29831	(*-D_XOPEN_SOURCE_EXTENDED*)
29832		test -n "$verbose" && echo "	moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29833
29834echo "${as_me:-configure}:29834: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29835
29836		CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29837		CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29838		;;
29839	esac
29840	;;
29841esac
29842
29843# Help to automatically enable the extended curses features when using either
29844# the *-config or the ".pc" files by adding defines.
29845echo "$as_me:29845: checking for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script" >&5
29846echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script... $ECHO_C" >&6
29847PKG_CFLAGS=
29848for cf_loop1 in $CPPFLAGS_after_XOPEN
29849do
29850	cf_found=no
29851	for cf_loop2 in $CPPFLAGS_before_XOPEN
29852	do
29853		if test "x$cf_loop1" = "x$cf_loop2"
29854		then
29855			cf_found=yes
29856			break
29857		fi
29858	done
29859	test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29860done
29861echo "$as_me:29861: result: $PKG_CFLAGS" >&5
29862echo "${ECHO_T}$PKG_CFLAGS" >&6
29863
29864case "$cf_cv_system_name" in
29865(cygwin*|msys*|mingw32*|mingw64|os2*)
29866	GLOB_FULLPATH_POSIX='/*'
29867	GLOB_FULLPATH_OTHER='[a-zA-Z]:[\\/]*'
29868	;;
29869(*)
29870	GLOB_FULLPATH_POSIX='/*'
29871	GLOB_FULLPATH_OTHER=$GLOB_FULLPATH_POSIX
29872	;;
29873esac
29874
29875# AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29876case "x$NCURSES_OSPEED" in
29877(*short*)
29878	cf_compatible=1
29879	;;
29880(*)
29881	cf_compatible=0
29882	;;
29883esac
29884
29885cat >>confdefs.h <<EOF
29886#define NCURSES_OSPEED_COMPAT $cf_compatible
29887EOF
29888
29889case "x$cf_cv_typeof_chtype" in
29890(xshort|xint|xlong)
29891	cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29892	;;
29893esac
29894
29895case "x$cf_cv_typeof_mmask_t" in
29896(xshort|xint|xlong)
29897	cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29898	;;
29899esac
29900
29901# substitute into misc/Makefile to suppress
29902# (un)install.data from the
29903# (un)install rules.
29904if test "x$cf_with_db_install" = "xno"; then
29905	MISC_INSTALL_DATA=
29906	MISC_UNINSTALL_DATA=
29907else
29908	MISC_INSTALL_DATA=install.data
29909	MISC_UNINSTALL_DATA=uninstall.data
29910fi
29911
29912if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29913	MAKE_DATABASE="#"
29914else
29915	MAKE_DATABASE="$MAKE_TERMINFO"
29916fi
29917
29918if test -n "$PACKAGE"
29919then
29920	PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29921	export PACKAGE
29922	echo "package: $PACKAGE"
29923fi
29924
29925UNALTERED_SYMS=
29926cf_filter_syms=no
29927
29928if test -n "$RESULTING_SYMS"
29929then
29930	cf_filter_syms=$cf_dft_filter_syms
29931	test -n "$verbose" && echo "	will map symbols to ABI=$cf_cv_abi_default" 1>&6
29932
29933echo "${as_me:-configure}:29933: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
29934
29935fi
29936
29937if test "x$WILDCARD_SYMS" = xno
29938then
29939	cf_filter_syms=yes
29940fi
29941
29942test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29943
29944UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29945if test "$cf_filter_syms" = yes
29946then
29947	RESULTING_SYMS=resulting.map
29948fi
29949
29950if test "x$cross_compiling" = xyes ; then
29951	ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29952	CHECK_BUILD="#"
29953else
29954	ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29955	CHECK_BUILD=
29956fi
29957
29958# This is used for the *-config script and *.pc data files.
29959
29960echo "$as_me:29960: checking for linker search path" >&5
29961echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29962if test "${cf_cv_ld_searchpath+set}" = set; then
29963  echo $ECHO_N "(cached) $ECHO_C" >&6
29964else
29965
29966if test "$cross_compiling" != yes ; then
29967
29968# GNU binutils' ld does not involve permissions which may stop ldconfig.
29969cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29970
29971# The -NX options tell newer versions of Linux ldconfig to not attempt to
29972# update the cache, which makes it run faster.
29973test -z "$cf_pathlist" && \
29974	cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[ 	]/d' -e 's/:$//' | sort -u`
29975
29976test -z "$cf_pathlist" &&
29977	cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[ 	]/d' -e 's/:$//p' | sort -u`
29978
29979# This works with OpenBSD 6.5, which lists only filenames
29980test -z "$cf_pathlist" &&
29981	cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29982
29983if test -z "$cf_pathlist"
29984then
29985	# dyld default path with MacOS
29986	if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29987	then
29988		# do this to bypass check
29989		cf_cv_ld_searchpath='$HOME/lib'
29990		cf_pathlist="/usr/local/lib /lib /usr/lib"
29991	fi
29992fi
29993
29994if test -z "$cf_pathlist"
29995then
29996	# Solaris is "SunOS"
29997	if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29998	then
29999		case x`(isainfo -b)` in
30000		(x64)
30001			cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
30002			;;
30003		(x32)
30004			test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
30005			cf_pathlist="$cf_pathlist /lib /usr/lib"
30006			;;
30007		(*)
30008			{ echo "$as_me:30008: WARNING: problem with Solaris architecture" >&5
30009echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
30010			;;
30011		esac
30012	fi
30013fi
30014
30015if test -z "$cf_pathlist"
30016then
30017	# HP-UX
30018	if test x"`uname -s`" = xHP-UX
30019	then
30020		case x`getconf LONG_BIT` in
30021		(x64)
30022			cf_pathlist="/usr/lib/hpux64"
30023			;;
30024		(x*)
30025			cf_pathlist="/usr/lib/hpux32"
30026			;;
30027		esac
30028	fi
30029fi
30030
30031fi
30032
30033# If nothing else, assume it is conventional
30034test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
30035
30036# Finally, check that this is only directories
30037for cf_path in $0 $cf_pathlist
30038do
30039	if test -d "$cf_path"; then
30040		test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
30041		cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
30042	fi
30043done
30044
30045# Ensure that it is nonempty
30046test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
30047
30048fi
30049echo "$as_me:30049: result: $cf_cv_ld_searchpath" >&5
30050echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
30051
30052LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
30053
30054ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/nc_win32.h include/termcap.h include/unctrl.h man/MKterminfo.tmp:man/MKterminfo.sh man/man_db.renames $SUB_MAKEFILES Makefile"
30055
30056ac_config_commands="$ac_config_commands default"
30057
30058DEFS=-DHAVE_CONFIG_H
30059
30060cat >confcache <<\_ACEOF
30061# This file is a shell script that caches the results of configure
30062# tests run on this system so they can be shared between configure
30063# scripts and configure runs, see configure's option --config-cache.
30064# It is not useful on other systems.  If it contains results you don't
30065# want to keep, you may remove or edit it.
30066#
30067# config.status only pays attention to the cache file if you give it
30068# the --recheck option to rerun configure.
30069#
30070# `ac_cv_env_foo' variables (set or unset) will be overridden when
30071# loading this file, other *unset* `ac_cv_foo' will be assigned the
30072# following values.
30073
30074_ACEOF
30075
30076# The following way of writing the cache mishandles newlines in values,
30077# but we know of no workaround that is simple, portable, and efficient.
30078# So, don't put newlines in cache variables' values.
30079# Ultrix sh set writes to stderr and can't be redirected directly,
30080# and sets the high bit in the cache file unless we assign to the vars.
30081{
30082  (set) 2>&1 |
30083    case `(ac_space=' '; set | grep ac_space) 2>&1` in
30084    *ac_space=\ *)
30085      # `set' does not quote correctly, so add quotes (double-quote
30086      # substitution turns \\\\ into \\, and sed turns \\ into \).
30087      sed -n \
30088        "s/'/'\\\\''/g;
30089    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
30090      ;;
30091    *)
30092      # `set' quotes correctly as required by POSIX, so do not add quotes.
30093      sed -n \
30094        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
30095      ;;
30096    esac;
30097} |
30098  sed '
30099     t clear
30100     : clear
30101     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
30102     t end
30103     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
30104     : end' >>confcache
30105if cmp -s $cache_file confcache; then :; else
30106  if test -w $cache_file; then
30107    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
30108    cat confcache >$cache_file
30109  else
30110    echo "not updating unwritable cache $cache_file"
30111  fi
30112fi
30113rm -f confcache
30114
30115test "x$prefix" = xNONE && prefix=$ac_default_prefix
30116# Let make expand exec_prefix.
30117test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
30118
30119# VPATH may cause trouble with some makes, so we remove $(srcdir),
30120# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
30121# trailing colons and then remove the whole line if VPATH becomes empty
30122# (actually we leave an empty line to preserve line numbers).
30123if test "x$srcdir" = x.; then
30124  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
30125s/:*\$(srcdir):*/:/;
30126s/:*\${srcdir}:*/:/;
30127s/:*@srcdir@:*/:/;
30128s/^\([^=]*=[ 	]*\):*/\1/;
30129s/:*$//;
30130s/^[^=]*=[ 	]*$//;
30131}'
30132fi
30133
30134DEFS=-DHAVE_CONFIG_H
30135
30136: "${CONFIG_STATUS=./config.status}"
30137ac_clean_files_save=$ac_clean_files
30138ac_clean_files="$ac_clean_files $CONFIG_STATUS"
30139{ echo "$as_me:30139: creating $CONFIG_STATUS" >&5
30140echo "$as_me: creating $CONFIG_STATUS" >&6;}
30141cat >"$CONFIG_STATUS" <<_ACEOF
30142#! $SHELL
30143# Generated automatically by configure.
30144# Run this file to recreate the current configuration.
30145# Compiler output produced by configure, useful for debugging
30146# configure, is in config.log if it exists.
30147
30148me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
30149
30150debug=false
30151SHELL=\${CONFIG_SHELL-$SHELL}
30152ac_cs_invocation="\$0 \$@"
30153
30154CLICOLOR_FORCE= GREP_OPTIONS=
30155unset CLICOLOR_FORCE GREP_OPTIONS
30156_ACEOF
30157
30158cat >>"$CONFIG_STATUS" <<\_ACEOF
30159# Be Bourne compatible
30160if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
30161  emulate sh
30162  NULLCMD=:
30163elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30164  set -o posix
30165fi
30166
30167# Name of the executable.
30168as_me=`echo "$0" |sed 's,.*[\\/],,'`
30169
30170if expr a : '\(a\)' >/dev/null 2>&1; then
30171  as_expr="expr"
30172else
30173  as_expr="false"
30174fi
30175
30176rm -f conf$$ conf$$.exe conf$$.file
30177echo >conf$$.file
30178if ln -s conf$$.file conf$$ 2>/dev/null; then
30179  # We could just check for DJGPP; but this test a) works b) is more generic
30180  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
30181  if test -f conf$$.exe; then
30182    # Don't use ln at all; we don't have any links
30183    as_ln_s='cp -p'
30184  else
30185    as_ln_s='ln -s'
30186  fi
30187elif ln conf$$.file conf$$ 2>/dev/null; then
30188  as_ln_s='ln'
30189else
30190  as_ln_s='cp -p'
30191fi
30192rm -f conf$$ conf$$.exe conf$$.file
30193
30194as_executable_p="test -f"
30195
30196# Support unset when possible.
30197if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
30198  as_unset="unset"
30199else
30200  as_unset="false"
30201fi
30202
30203# NLS nuisances.
30204$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
30205$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
30206$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
30207$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
30208$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
30209$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
30210$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
30211$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
30212
30213# IFS
30214# We need space, tab and new line, in precisely that order.
30215as_nl='
30216'
30217IFS=" 	$as_nl"
30218
30219# CDPATH.
30220$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
30221
30222exec 6>&1
30223
30224_ACEOF
30225
30226# Files that config.status was made for.
30227if test -n "$ac_config_files"; then
30228  echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
30229fi
30230
30231if test -n "$ac_config_headers"; then
30232  echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
30233fi
30234
30235if test -n "$ac_config_links"; then
30236  echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
30237fi
30238
30239if test -n "$ac_config_commands"; then
30240  echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
30241fi
30242
30243cat >>"$CONFIG_STATUS" <<\EOF
30244
30245ac_cs_usage="\
30246\`$as_me' instantiates files from templates according to the
30247current configuration.
30248
30249Usage: $0 [OPTIONS] [FILE]...
30250
30251  -h, --help       print this help, then exit
30252  -V, --version    print version number, then exit
30253  -d, --debug      don't remove temporary files
30254      --recheck    update $as_me by reconfiguring in the same conditions
30255  --file=FILE[:TEMPLATE]
30256                   instantiate the configuration file FILE
30257  --header=FILE[:TEMPLATE]
30258                   instantiate the configuration header FILE
30259
30260Configuration files:
30261$config_files
30262
30263Configuration headers:
30264$config_headers
30265
30266Configuration commands:
30267$config_commands
30268
30269Report bugs to <dickey@invisible-island.net>."
30270EOF
30271
30272cat >>"$CONFIG_STATUS" <<EOF
30273ac_cs_version="\\
30274config.status
30275configured by $0, generated by GNU Autoconf 2.52.20250126,
30276  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
30277
30278Copyright 2003-2022,2023	Thomas E. Dickey
30279Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
30280Free Software Foundation, Inc.
30281This config.status script is free software; the Free Software Foundation
30282gives unlimited permission to copy, distribute and modify it."
30283srcdir="$srcdir"
30284INSTALL="$INSTALL"
30285EOF
30286
30287cat >>"$CONFIG_STATUS" <<\EOF
30288# If no file are specified by the user, then we need to provide default
30289# value.  By we need to know if files were specified by the user.
30290ac_need_defaults=:
30291while test $# != 0
30292do
30293  case $1 in
30294  --*=*)
30295    ac_option=`expr "x$1" : 'x\([^=]*\)='`
30296    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
30297    shift
30298    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
30299    shift
30300    ;;
30301  -*);;
30302  *) # This is not an option, so the user has probably given explicit
30303     # arguments.
30304     ac_need_defaults=false;;
30305  esac
30306
30307  case $1 in
30308  # Handling of the options.
30309EOF
30310cat >>"$CONFIG_STATUS" <<EOF
30311  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
30312    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
30313    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
30314EOF
30315cat >>"$CONFIG_STATUS" <<\EOF
30316  --version | --vers* | -V )
30317    echo "$ac_cs_version"; exit 0 ;;
30318  --he | --h)
30319    # Conflict between --help and --header
30320    { { echo "$as_me:30320: error: ambiguous option: $1
30321Try \`$0 --help' for more information." >&5
30322echo "$as_me: error: ambiguous option: $1
30323Try \`$0 --help' for more information." >&2;}
30324   { (exit 1); exit 1; }; };;
30325  --help | --hel | -h )
30326    echo "$ac_cs_usage"; exit 0 ;;
30327  --debug | --d* | -d )
30328    debug=: ;;
30329  --file | --fil | --fi | --f )
30330    shift
30331    CONFIG_FILES="$CONFIG_FILES $1"
30332    ac_need_defaults=false;;
30333  --header | --heade | --head | --hea )
30334    shift
30335    CONFIG_HEADERS="$CONFIG_HEADERS $1"
30336    ac_need_defaults=false;;
30337
30338  # This is an error.
30339  -*) { { echo "$as_me:30339: error: unrecognized option: $1
30340Try \`$0 --help' for more information." >&5
30341echo "$as_me: error: unrecognized option: $1
30342Try \`$0 --help' for more information." >&2;}
30343   { (exit 1); exit 1; }; } ;;
30344
30345  *) ac_config_targets="$ac_config_targets $1" ;;
30346
30347  esac
30348  shift
30349done
30350
30351exec 5>>config.log
30352cat >&5 << _ACEOF
30353
30354## ----------------------- ##
30355## Running config.status.  ##
30356## ----------------------- ##
30357
30358This file was extended by $as_me 2.52.20250126, executed with
30359  CONFIG_FILES    = $CONFIG_FILES
30360  CONFIG_HEADERS  = $CONFIG_HEADERS
30361  CONFIG_LINKS    = $CONFIG_LINKS
30362  CONFIG_COMMANDS = $CONFIG_COMMANDS
30363  > "$ac_cs_invocation"
30364on `(hostname || uname -n) 2>/dev/null | sed 1q`
30365
30366_ACEOF
30367EOF
30368
30369cat >>"$CONFIG_STATUS" <<EOF
30370#
30371# INIT-COMMANDS section.
30372#
30373
30374### Special initialization commands, used to pass information from the
30375### configuration-run into config.status
30376
30377ALTERNATE_SYMS="$ALTERNATE_SYMS"
30378AWK="$AWK"
30379CXX_NAME="$CXX_NAME"
30380DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
30381DFT_LWR_MODEL="$DFT_LWR_MODEL"
30382ECHO_LD="$ECHO_LD"
30383EXTRA_SUFFIX="$EXTRA_SUFFIX"
30384FORM_NAME="$FORM_NAME"
30385GLOB_FULLPATH_OTHER="$GLOB_FULLPATH_OTHER"
30386GLOB_FULLPATH_POSIX="$GLOB_FULLPATH_POSIX"
30387LDCONFIG="$LDCONFIG"
30388LIBTOOL_VERSION="$LIBTOOL_VERSION"
30389LIB_NAME="$LIB_NAME"
30390LIB_PREFIX="$LIB_PREFIX"
30391LIB_SUBSETS="$LIB_SUBSETS"
30392LIB_SUFFIX="$LIB_SUFFIX"
30393LIB_TRACING="$LIB_TRACING"
30394LN_S="$LN_S"
30395MAKE_TERMINFO="$MAKE_TERMINFO"
30396MANPAGE_RENAMES="$MANPAGE_RENAMES"
30397MENU_NAME="$MENU_NAME"
30398NCURSES_MAJOR="$NCURSES_MAJOR"
30399NCURSES_MINOR="$NCURSES_MINOR"
30400NCURSES_OSPEED="$NCURSES_OSPEED"
30401NCURSES_PATCH="$NCURSES_PATCH"
30402PANEL_NAME="$PANEL_NAME"
30403SRC_SUBDIRS="$SRC_SUBDIRS"
30404TERMINFO="$TERMINFO"
30405TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
30406TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
30407TICS_NAME="$TICS_NAME"
30408TICS_SUFFIX="$TICS_SUFFIX"
30409TIC_PATH="$TIC_PATH"
30410TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
30411TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
30412TINFO_NAME="$TINFO_NAME"
30413TINFO_SUFFIX="$TINFO_SUFFIX"
30414UNALTERED_SYMS="$UNALTERED_SYMS"
30415USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
30416USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
30417ABI_SUFFIX="$ABI_SUFFIX"
30418USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
30419WILDCARD_SYMS="$WILDCARD_SYMS"
30420WITH_CURSES_H="$with_curses_h"
30421WITH_ECHO="${enable_echo:=yes}"
30422WITH_OVERWRITE="$with_overwrite"
30423cf_LIST_MODELS="$cf_list_models"
30424cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
30425cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
30426cf_cv_abi_default="$cf_cv_abi_default"
30427cf_cv_abi_version="$cf_cv_abi_version"
30428cf_cv_do_relink="$cf_cv_do_relink"
30429cf_cv_do_reranlib="$cf_cv_do_reranlib"
30430cf_cv_do_symlinks="$cf_cv_do_symlinks"
30431cf_cv_enable_lp64="$cf_cv_enable_lp64"
30432cf_cv_enable_opaque="$cf_cv_enable_opaque"
30433cf_cv_make_PHONY="$cf_cv_make_PHONY"
30434cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
30435cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
30436cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
30437cf_cv_rel_version="$cf_cv_rel_version"
30438cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
30439cf_cv_shared_soname='$cf_cv_shared_soname'
30440cf_cv_shlib_version="$cf_cv_shlib_version"
30441cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
30442cf_cv_system_name="$cf_cv_system_name"
30443cf_cv_term_driver="$with_term_driver"
30444cf_with_ada="$cf_with_ada"
30445cf_with_cxx_binding="$cf_with_cxx_binding"
30446cf_with_db_install="$cf_with_db_install"
30447cf_with_manpages="$cf_with_manpages"
30448cf_with_tests="$cf_with_tests"
30449host="$host"
30450target="$target"
30451verbose="$verbose"
30452with_shared_cxx="$with_shared_cxx"
30453
30454EOF
30455
30456cat >>"$CONFIG_STATUS" <<\EOF
30457for ac_config_target in $ac_config_targets
30458do
30459  case "$ac_config_target" in
30460  # Handling of arguments.
30461  "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
30462  "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
30463  "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
30464  "include/nc_win32.h" ) CONFIG_FILES="$CONFIG_FILES include/nc_win32.h" ;;
30465  "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
30466  "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
30467  "man/MKterminfo.tmp" ) CONFIG_FILES="$CONFIG_FILES man/MKterminfo.tmp:man/MKterminfo.sh" ;;
30468  "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
30469  "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
30470  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
30471  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
30472  "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
30473  *) { { echo "$as_me:30473: error: invalid argument: $ac_config_target" >&5
30474echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
30475   { (exit 1); exit 1; }; };;
30476  esac
30477done
30478
30479# If the user did not use the arguments to specify the items to instantiate,
30480# then the envvar interface is used.  Set only those that are not.
30481# We use the long form for the default assignment because of an extremely
30482# bizarre bug on SunOS 4.1.3.
30483if "$ac_need_defaults"; then
30484  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
30485  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
30486  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
30487fi
30488
30489# Create a temporary directory, and hook for its removal unless debugging.
30490$debug ||
30491{
30492  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
30493  trap '{ (exit 1); exit 1; }' 1 2 13 15
30494}
30495
30496# Create a (secure) tmp directory for tmp files.
30497: "${TMPDIR=/tmp}"
30498{
30499  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
30500  test -n "$tmp" && test -d "$tmp"
30501}  ||
30502{
30503  tmp=$TMPDIR/cs$$-$RANDOM
30504  (umask 077 && mkdir "$tmp")
30505} ||
30506{
30507   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
30508   { (exit 1); exit 1; }
30509}
30510
30511EOF
30512
30513cat >>"$CONFIG_STATUS" <<EOF
30514
30515#
30516# CONFIG_FILES section.
30517#
30518
30519# No need to generate the scripts if there are no CONFIG_FILES.
30520# This happens for instance when ./config.status config.h
30521if test -n "\$CONFIG_FILES"; then
30522  # Protect against being on the right side of a sed subst in config.status.
30523  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
30524   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
30525s,@SHELL@,$SHELL,;t t
30526s,@exec_prefix@,$exec_prefix,;t t
30527s,@prefix@,$prefix,;t t
30528s,@program_transform_name@,$program_transform_name,;t t
30529s,@bindir@,$bindir,;t t
30530s,@sbindir@,$sbindir,;t t
30531s,@libexecdir@,$libexecdir,;t t
30532s,@datarootdir@,$datarootdir,;t t
30533s,@datadir@,$datadir,;t t
30534s,@sysconfdir@,$sysconfdir,;t t
30535s,@sharedstatedir@,$sharedstatedir,;t t
30536s,@localstatedir@,$localstatedir,;t t
30537s,@runstatedir@,$runstatedir,;t t
30538s,@libdir@,$libdir,;t t
30539s,@includedir@,$includedir,;t t
30540s,@oldincludedir@,$oldincludedir,;t t
30541s,@infodir@,$infodir,;t t
30542s,@mandir@,$mandir,;t t
30543s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
30544s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
30545s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
30546s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
30547s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
30548s,@build_alias@,$build_alias,;t t
30549s,@host_alias@,$host_alias,;t t
30550s,@target_alias@,$target_alias,;t t
30551s,@ECHO_C@,$ECHO_C,;t t
30552s,@ECHO_N@,$ECHO_N,;t t
30553s,@ECHO_T@,$ECHO_T,;t t
30554s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
30555s,@DEFS@,$DEFS,;t t
30556s,@LIBS@,$LIBS,;t t
30557s,@top_builddir@,$top_builddir,;t t
30558s,@GREP@,$GREP,;t t
30559s,@EGREP@,$EGREP,;t t
30560s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
30561s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
30562s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
30563s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
30564s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
30565s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
30566s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
30567s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
30568s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
30569s,@VERSION@,$VERSION,;t t
30570s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
30571s,@VERSION_MINOR@,$VERSION_MINOR,;t t
30572s,@VERSION_PATCH@,$VERSION_PATCH,;t t
30573s,@PROGRAM@,$PROGRAM,;t t
30574s,@PACKAGE@,$PACKAGE,;t t
30575s,@build@,$build,;t t
30576s,@build_cpu@,$build_cpu,;t t
30577s,@build_vendor@,$build_vendor,;t t
30578s,@build_os@,$build_os,;t t
30579s,@host@,$host,;t t
30580s,@host_cpu@,$host_cpu,;t t
30581s,@host_vendor@,$host_vendor,;t t
30582s,@host_os@,$host_os,;t t
30583s,@target@,$target,;t t
30584s,@target_cpu@,$target_cpu,;t t
30585s,@target_vendor@,$target_vendor,;t t
30586s,@target_os@,$target_os,;t t
30587s,@FGREP@,$FGREP,;t t
30588s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
30589s,@M4_exists@,$M4_exists,;t t
30590s,@cf_ada_make@,$cf_ada_make,;t t
30591s,@cf_ada_config@,$cf_ada_config,;t t
30592s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
30593s,@cf_ada_config_C@,$cf_ada_config_C,;t t
30594s,@cf_cv_path_gnatgcc@,$cf_cv_path_gnatgcc,;t t
30595s,@CC@,$CC,;t t
30596s,@CFLAGS@,$CFLAGS,;t t
30597s,@LDFLAGS@,$LDFLAGS,;t t
30598s,@CPPFLAGS@,$CPPFLAGS,;t t
30599s,@ac_ct_CC@,$ac_ct_CC,;t t
30600s,@EXEEXT@,$EXEEXT,;t t
30601s,@OBJEXT@,$OBJEXT,;t t
30602s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
30603s,@CPP@,$CPP,;t t
30604s,@LDCONFIG@,$LDCONFIG,;t t
30605s,@CXX@,$CXX,;t t
30606s,@CXXFLAGS@,$CXXFLAGS,;t t
30607s,@ac_ct_CXX@,$ac_ct_CXX,;t t
30608s,@AWK@,$AWK,;t t
30609s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
30610s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
30611s,@INSTALL_DATA@,$INSTALL_DATA,;t t
30612s,@GLOB_FULLPATH_POSIX@,$GLOB_FULLPATH_POSIX,;t t
30613s,@GLOB_FULLPATH_OTHER@,$GLOB_FULLPATH_OTHER,;t t
30614s,@LINT@,$LINT,;t t
30615s,@LINT_OPTS@,$LINT_OPTS,;t t
30616s,@LINT_LIBS@,$LINT_LIBS,;t t
30617s,@LN_S@,$LN_S,;t t
30618s,@cf_config_suffix@,$cf_config_suffix,;t t
30619s,@PKG_CONFIG@,$PKG_CONFIG,;t t
30620s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
30621s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
30622s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
30623s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
30624s,@SET_MAKE@,$SET_MAKE,;t t
30625s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
30626s,@MAKE_PHONY@,$MAKE_PHONY,;t t
30627s,@CTAGS@,$CTAGS,;t t
30628s,@ETAGS@,$ETAGS,;t t
30629s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
30630s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
30631s,@RANLIB@,$RANLIB,;t t
30632s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
30633s,@LD@,$LD,;t t
30634s,@ac_ct_LD@,$ac_ct_LD,;t t
30635s,@AR@,$AR,;t t
30636s,@ac_ct_AR@,$ac_ct_AR,;t t
30637s,@NM@,$NM,;t t
30638s,@ac_ct_NM@,$ac_ct_NM,;t t
30639s,@ARFLAGS@,$ARFLAGS,;t t
30640s,@DESTDIR@,$DESTDIR,;t t
30641s,@SET_DESTDIR@,$SET_DESTDIR,;t t
30642s,@MERGE_PREFIX@,$MERGE_PREFIX,;t t
30643s,@BUILD_CC@,$BUILD_CC,;t t
30644s,@BUILD_CPP@,$BUILD_CPP,;t t
30645s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
30646s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
30647s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
30648s,@BUILD_LIBS@,$BUILD_LIBS,;t t
30649s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
30650s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
30651s,@cf_list_models@,$cf_list_models,;t t
30652s,@ABI_VERSION@,$ABI_VERSION,;t t
30653s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
30654s,@LIBTOOL@,$LIBTOOL,;t t
30655s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
30656s,@LT_UNDEF@,$LT_UNDEF,;t t
30657s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
30658s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
30659s,@LIB_CREATE@,$LIB_CREATE,;t t
30660s,@LIB_OBJECT@,$LIB_OBJECT,;t t
30661s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
30662s,@LIB_PREP@,$LIB_PREP,;t t
30663s,@LIB_CLEAN@,$LIB_CLEAN,;t t
30664s,@LIB_COMPILE@,$LIB_COMPILE,;t t
30665s,@LIB_LINK@,$LIB_LINK,;t t
30666s,@LIB_INSTALL@,$LIB_INSTALL,;t t
30667s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
30668s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
30669s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
30670s,@TICS_NAME@,$TICS_NAME,;t t
30671s,@TINFO_NAME@,$TINFO_NAME,;t t
30672s,@LIB_NAME@,$LIB_NAME,;t t
30673s,@LIB_PREFIX@,$LIB_PREFIX,;t t
30674s,@CC_G_OPT@,$CC_G_OPT,;t t
30675s,@CXX_G_OPT@,$CXX_G_OPT,;t t
30676s,@LD_MODEL@,$LD_MODEL,;t t
30677s,@shlibdir@,$shlibdir,;t t
30678s,@MAKE_DLLS@,$MAKE_DLLS,;t t
30679s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
30680s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
30681s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
30682s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
30683s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
30684s,@LINK_PROGS@,$LINK_PROGS,;t t
30685s,@LINK_TESTS@,$LINK_TESTS,;t t
30686s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
30687s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
30688s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
30689s,@INSTALL_LIB@,$INSTALL_LIB,;t t
30690s,@RPATH_LIST@,$RPATH_LIST,;t t
30691s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
30692s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
30693s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
30694s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
30695s,@REQUIRE_PKG@,$REQUIRE_PKG,;t t
30696s,@cf_ldd_prog@,$cf_ldd_prog,;t t
30697s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
30698s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
30699s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
30700s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
30701s,@TIC@,$TIC,;t t
30702s,@ac_ct_TIC@,$ac_ct_TIC,;t t
30703s,@INFOCMP@,$INFOCMP,;t t
30704s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
30705s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
30706s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
30707s,@WHICH_XTERM@,$WHICH_XTERM,;t t
30708s,@XTERM_KBS@,$XTERM_KBS,;t t
30709s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
30710s,@TERMINFO@,$TERMINFO,;t t
30711s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
30712s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
30713s,@TERMPATH@,$TERMPATH,;t t
30714s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
30715s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
30716s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
30717s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
30718s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
30719s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
30720s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
30721s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
30722s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
30723s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
30724s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
30725s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
30726s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
30727s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
30728s,@RGB_PATH@,$RGB_PATH,;t t
30729s,@no_x11_rgb@,$no_x11_rgb,;t t
30730s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
30731s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
30732s,@NCURSES_CHTYPE@,$NCURSES_CHTYPE,;t t
30733s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
30734s,@NCURSES_MMASK_T@,$NCURSES_MMASK_T,;t t
30735s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
30736s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
30737s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
30738s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
30739s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
30740s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
30741s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
30742s,@NCURSES_CONST@,$NCURSES_CONST,;t t
30743s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
30744s,@NCURSES_RGB_COLORS@,$NCURSES_RGB_COLORS,;t t
30745s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
30746s,@cf_cv_enable_sigwinch@,$cf_cv_enable_sigwinch,;t t
30747s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
30748s,@USE_NAMED_PIPES@,$USE_NAMED_PIPES,;t t
30749s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
30750s,@PTHREAD@,$PTHREAD,;t t
30751s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
30752s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
30753s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
30754s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
30755s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
30756s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
30757s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
30758s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
30759s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
30760s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
30761s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
30762s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
30763s,@ECHO_LT@,$ECHO_LT,;t t
30764s,@ECHO_LD@,$ECHO_LD,;t t
30765s,@RULE_CC@,$RULE_CC,;t t
30766s,@SHOW_CC@,$SHOW_CC,;t t
30767s,@ECHO_CC@,$ECHO_CC,;t t
30768s,@ECHO_LINK@,$ECHO_LINK,;t t
30769s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
30770s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
30771s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
30772s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
30773s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
30774s,@STDC_NORETURN@,$STDC_NORETURN,;t t
30775s,@ADAFLAGS@,$ADAFLAGS,;t t
30776s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
30777s,@ADA_TRACE@,$ADA_TRACE,;t t
30778s,@MATH_LIB@,$MATH_LIB,;t t
30779s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
30780s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
30781s,@cf_cv_1UL@,$cf_cv_1UL,;t t
30782s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
30783s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
30784s,@TEST_LIBS@,$TEST_LIBS,;t t
30785s,@TEST_LIBS2@,$TEST_LIBS2,;t t
30786s,@USE_STDBOOL_H@,$USE_STDBOOL_H,;t t
30787s,@USE_BUILTIN_BOOL@,$USE_BUILTIN_BOOL,;t t
30788s,@CXXCPP@,$CXXCPP,;t t
30789s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
30790s,@CXX_AR@,$CXX_AR,;t t
30791s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
30792s,@CXXLIBS@,$CXXLIBS,;t t
30793s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
30794s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
30795s,@cf_compile_generics@,$cf_compile_generics,;t t
30796s,@cf_generic_objects@,$cf_generic_objects,;t t
30797s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
30798s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
30799s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
30800s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
30801s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
30802s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
30803s,@cf_ada_compiler@,$cf_ada_compiler,;t t
30804s,@cf_ada_package@,$cf_ada_package,;t t
30805s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
30806s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
30807s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
30808s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
30809s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
30810s,@ACPPFLAGS@,$ACPPFLAGS,;t t
30811s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
30812s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
30813s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
30814s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
30815s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
30816s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
30817s,@ABI_SUFFIX@,$ABI_SUFFIX,;t t
30818s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
30819s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
30820s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
30821s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
30822s,@TICS_LIBS@,$TICS_LIBS,;t t
30823s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
30824s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
30825s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
30826s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
30827s,@TINFO_LIBS@,$TINFO_LIBS,;t t
30828s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
30829s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
30830s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
30831s,@includesubdir@,$includesubdir,;t t
30832s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
30833s,@TICS_LIST@,$TICS_LIST,;t t
30834s,@TINFO_LIST@,$TINFO_LIST,;t t
30835s,@SHLIB_LIST@,$SHLIB_LIST,;t t
30836s,@FORM_NAME@,$FORM_NAME,;t t
30837s,@MENU_NAME@,$MENU_NAME,;t t
30838s,@PANEL_NAME@,$PANEL_NAME,;t t
30839s,@CXX_NAME@,$CXX_NAME,;t t
30840s,@TEST_ARGS@,$TEST_ARGS,;t t
30841s,@TEST_DEPS@,$TEST_DEPS,;t t
30842s,@TEST_ARG2@,$TEST_ARG2,;t t
30843s,@TEST_DEP2@,$TEST_DEP2,;t t
30844s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30845s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30846s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30847s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30848s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30849s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30850s,@HAVE_SGTTY_H@,$HAVE_SGTTY_H,;t t
30851s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30852s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30853s,@NROFF_TBL@,$NROFF_TBL,;t t
30854s,@TBL_X_OPTION@,$TBL_X_OPTION,;t t
30855s,@cf_manpage_format@,$cf_manpage_format,;t t
30856s,@cf_manpage_inboth@,$cf_manpage_inboth,;t t
30857s,@cf_manpage_so_strip@,$cf_manpage_so_strip,;t t
30858s,@cf_manpage_compress@,$cf_manpage_compress,;t t
30859s,@cf_manpage_coptions@,$cf_manpage_coptions,;t t
30860s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
30861s,@cross_compiling@,$cross_compiling,;t t
30862s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30863s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30864s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30865s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30866s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30867s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30868s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30869s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30870s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30871s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30872s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30873s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30874CEOF
30875
30876EOF
30877
30878  cat >>"$CONFIG_STATUS" <<\EOF
30879  # Split the substitutions into bite-sized pieces for seds with
30880  # small command number limits, like on Digital OSF/1 and HP-UX.
30881  ac_max_sed_lines=48
30882  ac_sed_frag=1 # Number of current file.
30883  ac_beg=1 # First line for current file.
30884  ac_end=$ac_max_sed_lines # Line after last line for current file.
30885  ac_more_lines=:
30886  ac_sed_cmds=
30887  while "$ac_more_lines"; do
30888    if test "$ac_beg" -gt 1; then
30889      sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30890    else
30891      sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30892    fi
30893    if test ! -s "$tmp"/subs.frag; then
30894      ac_more_lines=false
30895    else
30896      # The purpose of the label and of the branching condition is to
30897      # speed up the sed processing (if there are no `@' at all, there
30898      # is no need to browse any of the substitutions).
30899      # These are the two extra sed commands mentioned above.
30900      (echo ':t
30901  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && sed -e 's/\\\\*$//g' -e 's/$/\\/' -e 's/;t t\\/;t t/' -e 't' -e '3,'$ac_max_sed_lines's/$/\\/' "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30902      # It is possible to make a multiline substitution using escaped newlines.
30903      # Ensure that we do not split the substitution between script fragments.
30904      ac_BEG=$ac_end
30905      ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30906      sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30907      if test -s "$tmp"/subs.next; then
30908        grep '^s,@[^@,][^@,]*@,.*$' "$tmp"/subs.next | grep -v '^s,@.*;t t$' >"$tmp"/subs.edit
30909        if test ! -s "$tmp"/subs.edit; then
30910          grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30911          if test ! -s "$tmp"/subs.edit; then
30912            if test "$ac_beg" -gt 1; then
30913              ac_end=`expr "$ac_end" - 1`
30914              continue
30915            fi
30916          fi
30917        fi
30918      fi
30919
30920      if test -z "$ac_sed_cmds"; then
30921        ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30922      else
30923        ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30924      fi
30925      ac_sed_frag=`expr "$ac_sed_frag" + 1`
30926      ac_beg=$ac_end
30927      ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30928    fi
30929  done
30930  if test -z "$ac_sed_cmds"; then
30931    ac_sed_cmds="cat"
30932  fi
30933fi # test -n "$CONFIG_FILES"
30934
30935EOF
30936cat >>"$CONFIG_STATUS" <<\EOF
30937for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30938  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30939  case "$ac_file" in
30940  - | *:- | *:-:* ) # input from stdin
30941        cat >"$tmp"/stdin
30942        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30943        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30944  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30945        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30946  * )   ac_file_in=$ac_file.in ;;
30947  esac
30948
30949  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30950  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30951         X"$ac_file" : 'X\(//\)[^/]' \| \
30952         X"$ac_file" : 'X\(//\)$' \| \
30953         X"$ac_file" : 'X\(/\)' \| \
30954         .     : '\(.\)' 2>/dev/null ||
30955echo X"$ac_file" |
30956    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30957  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30958  	  /^X\(\/\/\)$/{ s//\1/; q; }
30959  	  /^X\(\/\).*/{ s//\1/; q; }
30960  	  s/.*/./; q'`
30961  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30962    { case "$ac_dir" in
30963  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30964  *)                      as_incr_dir=.;;
30965esac
30966as_dummy="$ac_dir"
30967for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30968  case $as_mkdir_dir in
30969    # Skip DOS drivespec
30970    ?:) as_incr_dir=$as_mkdir_dir ;;
30971    *)
30972      as_incr_dir=$as_incr_dir/$as_mkdir_dir
30973      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30974    ;;
30975  esac
30976done; }
30977
30978    ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30979    # A "../" for each directory in $ac_dir_suffix.
30980    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30981  else
30982    ac_dir_suffix= ac_dots=
30983  fi
30984
30985  case "$srcdir" in
30986  .)  ac_srcdir=.
30987      if test -z "$ac_dots"; then
30988         ac_top_srcdir=.
30989      else
30990         ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30991      fi ;;
30992  [\\/]* | ?:[\\/]* )
30993      ac_srcdir="$srcdir$ac_dir_suffix";
30994      ac_top_srcdir="$srcdir" ;;
30995  *) # Relative path.
30996    ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30997    ac_top_srcdir="$ac_dots$srcdir" ;;
30998  esac
30999
31000  case $INSTALL in
31001  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
31002  *) ac_INSTALL=$ac_dots$INSTALL ;;
31003  esac
31004
31005  if test x"$ac_file" != x-; then
31006    { echo "$as_me:31006: creating $ac_file" >&5
31007echo "$as_me: creating $ac_file" >&6;}
31008    rm -f "$ac_file"
31009  fi
31010  # Let's still pretend it is `configure' which instantiates (i.e., don't
31011  # use $as_me), people would be surprised to read:
31012  #    /* config.h.  Generated automatically by config.status.  */
31013  configure_input="Generated automatically from `echo $ac_file_in |
31014                                                 sed 's,.*/,,'` by configure."
31015
31016  # First look for the input files in the build tree, otherwise in the
31017  # src tree.
31018  ac_file_inputs=`IFS=:
31019    for f in $ac_file_in; do
31020      case $f in
31021      -) echo "$tmp"/stdin ;;
31022      [\\/$]*)
31023         # Absolute (can't be DOS-style, as IFS=:)
31024         test -f "$f" || { { echo "$as_me:31024: error: cannot find input file: $f" >&5
31025echo "$as_me: error: cannot find input file: $f" >&2;}
31026   { (exit 1); exit 1; }; }
31027         echo "$f";;
31028      *) # Relative
31029         if test -f "$f"; then
31030           # Build tree
31031           echo "$f"
31032         elif test -f "$srcdir/$f"; then
31033           # Source tree
31034           echo "$srcdir/$f"
31035         else
31036           # /dev/null tree
31037           { { echo "$as_me:31037: error: cannot find input file: $f" >&5
31038echo "$as_me: error: cannot find input file: $f" >&2;}
31039   { (exit 1); exit 1; }; }
31040         fi;;
31041      esac
31042    done` || { (exit 1); exit 1; }
31043EOF
31044cat >>"$CONFIG_STATUS" <<\EOF
31045  ac_warn_datarootdir=no
31046  if test x"$ac_file" != x-; then
31047    for ac_item in $ac_file_inputs
31048    do
31049      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
31050      if test -n "$ac_seen"; then
31051        ac_used=`grep '@datarootdir@' "$ac_item"`
31052        if test -z "$ac_used"; then
31053          { echo "$as_me:31053: WARNING: datarootdir was used implicitly but not set:
31054$ac_seen" >&5
31055echo "$as_me: WARNING: datarootdir was used implicitly but not set:
31056$ac_seen" >&2;}
31057          ac_warn_datarootdir=yes
31058        fi
31059      fi
31060      ac_seen=`grep '${datarootdir}' "$ac_item"`
31061      if test -n "$ac_seen"; then
31062        { echo "$as_me:31062: WARNING: datarootdir was used explicitly but not set:
31063$ac_seen" >&5
31064echo "$as_me: WARNING: datarootdir was used explicitly but not set:
31065$ac_seen" >&2;}
31066        ac_warn_datarootdir=yes
31067      fi
31068    done
31069  fi
31070
31071if test "x$ac_warn_datarootdir" = xyes; then
31072  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
31073fi
31074
31075EOF
31076cat >>"$CONFIG_STATUS" <<EOF
31077  sed "$ac_vpsub
31078$extrasub
31079EOF
31080cat >>"$CONFIG_STATUS" <<\EOF
31081:t
31082/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
31083s,@configure_input@,$configure_input,;t t
31084s,@srcdir@,$ac_srcdir,;t t
31085s,@top_srcdir@,$ac_top_srcdir,;t t
31086s,@INSTALL@,$ac_INSTALL,;t t
31087" $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
31088  rm -f "$tmp"/stdin
31089EOF
31090test -n "${FGREP}" || FGREP="grep -F"
31091test -n "${EGREP}" || EGREP="grep -E"
31092cat >>"$CONFIG_STATUS" <<EOF
31093  test -n "\${FGREP}" || FGREP="$FGREP"
31094  test -n "\${EGREP}" || EGREP="$EGREP"
31095EOF
31096cat >>"$CONFIG_STATUS" <<\EOF
31097  if test x"$ac_file" != x-; then
31098    cp "$tmp/out" "$ac_file"
31099
31100    for ac_name in prefix exec_prefix datarootdir
31101    do
31102        ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
31103        if test -n "$ac_seen"; then
31104            ac_init=`$EGREP '[ 	]*'$ac_name'[ 	]*=' "$ac_file"`
31105            if test -z "$ac_init"; then
31106              ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
31107              { echo "$as_me:31107: WARNING: Variable $ac_name is used but was not set:
31108$ac_seen" >&5
31109echo "$as_me: WARNING: Variable $ac_name is used but was not set:
31110$ac_seen" >&2;}
31111            fi
31112        fi
31113    done
31114    $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
31115    $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
31116    if test -s "$tmp"/out; then
31117      ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
31118      { echo "$as_me:31118: WARNING: Some variables may not be substituted:
31119$ac_seen" >&5
31120echo "$as_me: WARNING: Some variables may not be substituted:
31121$ac_seen" >&2;}
31122    fi
31123  else
31124    cat "$tmp"/out
31125  fi
31126  rm -f "$tmp"/out
31127
31128done
31129EOF
31130cat >>"$CONFIG_STATUS" <<\EOF
31131
31132#
31133# CONFIG_HEADER section.
31134#
31135
31136# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
31137# NAME is the cpp macro being defined and VALUE is the value it is being given.
31138#
31139# ac_d sets the value in "#define NAME VALUE" lines.
31140ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
31141ac_dB='[ 	].*$,\1#\2'
31142ac_dC=' '
31143ac_dD=',;t'
31144# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
31145ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
31146ac_iB='\([ 	]\),\1#\2define\3'
31147ac_iC=' '
31148ac_iD='\4,;t'
31149# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
31150ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
31151ac_uB='$,\1#\2define\3'
31152ac_uC=' '
31153ac_uD=',;t'
31154
31155for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
31156  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
31157  case "$ac_file" in
31158  - | *:- | *:-:* ) # input from stdin
31159        cat >"$tmp"/stdin
31160        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
31161        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
31162  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
31163        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
31164  * )   ac_file_in=$ac_file.in ;;
31165  esac
31166
31167  test x"$ac_file" != x- && { echo "$as_me:31167: creating $ac_file" >&5
31168echo "$as_me: creating $ac_file" >&6;}
31169
31170  # First look for the input files in the build tree, otherwise in the
31171  # src tree.
31172  ac_file_inputs=`IFS=:
31173    for f in $ac_file_in; do
31174      case $f in
31175      -) echo "$tmp"/stdin ;;
31176      [\\/$]*)
31177         # Absolute (can't be DOS-style, as IFS=:)
31178         test -f "$f" || { { echo "$as_me:31178: error: cannot find input file: $f" >&5
31179echo "$as_me: error: cannot find input file: $f" >&2;}
31180   { (exit 1); exit 1; }; }
31181         echo $f;;
31182      *) # Relative
31183         if test -f "$f"; then
31184           # Build tree
31185           echo $f
31186         elif test -f "$srcdir/$f"; then
31187           # Source tree
31188           echo "$srcdir/$f"
31189         else
31190           # /dev/null tree
31191           { { echo "$as_me:31191: error: cannot find input file: $f" >&5
31192echo "$as_me: error: cannot find input file: $f" >&2;}
31193   { (exit 1); exit 1; }; }
31194         fi;;
31195      esac
31196    done` || { (exit 1); exit 1; }
31197  # Remove the trailing spaces.
31198  sed 's/[ 	]*$//' $ac_file_inputs >"$tmp"/in
31199
31200EOF
31201
31202# Transform confdefs.h into a list of #define's.  We won't use it as a sed
31203# script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
31204# be either 'cat' or 'sort'.
31205cat confdefs.h | uniq >conftest.vals
31206
31207# Break up conftest.vals because some shells have a limit on
31208# the size of here documents, and old seds have small limits too.
31209
31210rm -f conftest.tail
31211echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
31212while grep . conftest.vals >/dev/null
31213do
31214  # Write chunks of a limited-size here document to conftest.frag.
31215  echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
31216  sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
31217  echo 'CEOF' >> "$CONFIG_STATUS"
31218  sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
31219  rm -f conftest.vals
31220  mv conftest.tail conftest.vals
31221done
31222rm -f conftest.vals
31223
31224# Run sed to substitute the contents of conftest.frag into $tmp/in at the
31225# marker @DEFS@.
31226echo '  cat >> conftest.edit <<CEOF
31227/@DEFS@/r conftest.frag
31228/@DEFS@/d
31229CEOF
31230sed -f conftest.edit "$tmp"/in > "$tmp"/out
31231rm -f "$tmp"/in
31232mv "$tmp"/out "$tmp"/in
31233rm -f conftest.edit conftest.frag
31234' >> "$CONFIG_STATUS"
31235
31236cat >>"$CONFIG_STATUS" <<\EOF
31237  # Let's still pretend it is `configure' which instantiates (i.e., don't
31238  # use $as_me), people would be surprised to read:
31239  #    /* config.h.  Generated automatically by config.status.  */
31240  if test x"$ac_file" = x-; then
31241    echo "/* Generated automatically by configure.  */" >"$tmp"/config.h
31242  else
31243    echo "/* $ac_file.  Generated automatically by configure.  */" >"$tmp"/config.h
31244  fi
31245  cat "$tmp"/in >>"$tmp"/config.h
31246  rm -f "$tmp"/in
31247  if test x"$ac_file" != x-; then
31248    if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
31249      { echo "$as_me:31249: $ac_file is unchanged" >&5
31250echo "$as_me: $ac_file is unchanged" >&6;}
31251    else
31252      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31253         X"$ac_file" : 'X\(//\)[^/]' \| \
31254         X"$ac_file" : 'X\(//\)$' \| \
31255         X"$ac_file" : 'X\(/\)' \| \
31256         .     : '\(.\)' 2>/dev/null ||
31257echo X"$ac_file" |
31258    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
31259  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
31260  	  /^X\(\/\/\)$/{ s//\1/; q; }
31261  	  /^X\(\/\).*/{ s//\1/; q; }
31262  	  s/.*/./; q'`
31263      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
31264        { case "$ac_dir" in
31265  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
31266  *)                      as_incr_dir=.;;
31267esac
31268as_dummy="$ac_dir"
31269for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
31270  case $as_mkdir_dir in
31271    # Skip DOS drivespec
31272    ?:) as_incr_dir=$as_mkdir_dir ;;
31273    *)
31274      as_incr_dir=$as_incr_dir/$as_mkdir_dir
31275      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
31276    ;;
31277  esac
31278done; }
31279
31280      fi
31281      rm -f "$ac_file"
31282      mv "$tmp/config.h" "$ac_file"
31283    fi
31284  else
31285    cat "$tmp"/config.h
31286    rm -f "$tmp"/config.h
31287  fi
31288done
31289EOF
31290cat >>"$CONFIG_STATUS" <<\EOF
31291#
31292# CONFIG_COMMANDS section.
31293#
31294for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
31295  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
31296  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
31297
31298  case "$ac_dest" in
31299    default )
31300if test "x$cf_with_tests" != xno ; then
31301
31302for cf_dir in test
31303do
31304	if test ! -d "$srcdir/$cf_dir" ; then
31305		continue
31306	elif test -f "$srcdir/$cf_dir/programs" ; then
31307		$AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
31308	fi
31309done
31310
31311fi
31312
31313cf_prefix=$LIB_PREFIX
31314
31315case "$cf_cv_shlib_version" in
31316(cygdll|msysdll|mingw|msvcdll)
31317	TINFO_NAME=$TINFO_ARG_SUFFIX
31318	TINFO_SUFFIX=.dll
31319	;;
31320esac
31321
31322if test -n "$TINFO_SUFFIX" ; then
31323	case "$TINFO_SUFFIX" in
31324	(tw*)
31325		TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
31326		TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
31327		;;
31328	(t*)
31329		TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
31330		TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
31331		;;
31332	(w*)
31333		TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
31334		TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
31335		;;
31336	esac
31337fi
31338
31339for cf_dir in $SRC_SUBDIRS
31340do
31341	if test ! -d "$srcdir/$cf_dir" ; then
31342		continue
31343	elif test -f "$srcdir/$cf_dir/modules" ; then
31344
31345		SHARED_LIB=
31346		Libs_To_Make=
31347		cf_awk_program=
31348		if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
31349		then
31350			cf_awk_program="$cf_awk_program\
31351/deprecated in ABI${cf_cv_abi_default}/ { next; }\
31352{ sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
31353"
31354		fi
31355
31356		if test "x$WILDCARD_SYMS" = xno
31357		then
31358			cf_awk_program="$cf_awk_program\
31359/[ 	]_\\*;/ { skip=1; next; }\
31360"
31361		fi
31362
31363		if test "x$cf_awk_program" != "x"
31364		then
31365			cat >>$cf_dir/Makefile <<CF_EOF
31366
31367# Generated by CF_LIB_RULES
31368resulting.map: $UNALTERED_SYMS
31369	$AWK 'BEGIN { skip = 1; last=""; } \
31370$cf_awk_program \
31371{ if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
31372 skip = 0; last = \$\$0; } \
31373END { print last; }' < "$UNALTERED_SYMS" >\$@
31374
31375distclean::
31376	rm -f resulting.map
31377CF_EOF
31378		fi
31379
31380		for cf_item in $cf_LIST_MODELS
31381		do
31382
31383	case X$cf_item in
31384	(Xlibtool)
31385		cf_suffix='.la'
31386		cf_depsuf=$cf_suffix
31387		;;
31388	(Xdebug)
31389		case "$cf_cv_system_name" in
31390		(*-msvc*)
31391			cf_suffix='_g.lib'
31392			;;
31393		(*)
31394			cf_suffix='_g.a'
31395			;;
31396		esac
31397		cf_depsuf=$cf_suffix
31398		;;
31399	(Xprofile)
31400		case "$cf_cv_system_name" in
31401		(*-msvc*)
31402			cf_suffix='_p.lib'
31403			;;
31404		(*)
31405			cf_suffix='_p.a'
31406			;;
31407		esac
31408		cf_depsuf=$cf_suffix
31409		;;
31410	(Xshared)
31411		case "$cf_cv_system_name" in
31412		(aix[5-7]*)
31413			cf_suffix='.so'
31414			cf_depsuf=$cf_suffix
31415			;;
31416		(*-msvc*)
31417			cf_suffix='.dll'
31418			cf_depsuf='.dll.lib'
31419			;;
31420		(cygwin*|msys*|mingw*)
31421			cf_suffix='.dll'
31422			cf_depsuf='.dll.a'
31423			;;
31424		(darwin*)
31425			cf_suffix='.dylib'
31426			cf_depsuf=$cf_suffix
31427			;;
31428		(hpux*)
31429			case "$target" in
31430			(ia64*)
31431				cf_suffix='.so'
31432				cf_depsuf=$cf_suffix
31433				;;
31434			(*)
31435				cf_suffix='.sl'
31436				cf_depsuf=$cf_suffix
31437				;;
31438			esac
31439			;;
31440		(*)
31441			cf_suffix='.so'
31442			cf_depsuf=$cf_suffix
31443			;;
31444		esac
31445		;;
31446	(*)
31447		case "$target" in
31448		(*-msvc*)
31449			cf_suffix='.lib'
31450			;;
31451		(*)
31452			cf_suffix='.a'
31453			;;
31454		esac
31455		cf_depsuf=$cf_suffix
31456		;;
31457	esac
31458	if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
31459	then
31460		cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
31461		cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
31462	fi
31463
31464			if test "$cf_dir" = "c++"
31465			then
31466
31467cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31468
31469eval cf_libname="\$${cf_map_lib_basename}_NAME"
31470
31471			else
31472
31473cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31474
31475eval cf_libname="\$${cf_map_lib_basename}_NAME"
31476
31477			fi
31478			test -z "$cf_libname" && cf_libname="$cf_dir"
31479			if test "$cf_item" = shared ; then
31480				if test -n "${LIB_SUFFIX}"
31481				then
31482					cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${ABI_SUFFIX}"'//'`
31483				else
31484					cf_shared_suffix="$cf_suffix"
31485				fi
31486				if test "$cf_cv_do_symlinks" = yes ; then
31487					cf_version_name=
31488
31489					case "$cf_cv_shlib_version" in
31490					(rel)
31491						cf_version_name=REL_VERSION
31492						;;
31493					(abi)
31494						cf_version_name=ABI_VERSION
31495						;;
31496					esac
31497
31498					if test -n "$cf_version_name"
31499					then
31500						case "$cf_cv_system_name" in
31501						(darwin*)
31502							# "w", etc?
31503							cf_suffix="${ABI_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
31504							;;
31505						(*)
31506							cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
31507							;;
31508						esac
31509					fi
31510					if test -n "${ABI_SUFFIX}"
31511					then
31512						cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${ABI_SUFFIX}"'//'`
31513					else
31514						cf_shared_suffix="$cf_suffix"
31515					fi
31516				fi
31517				# cygwin needs import library, and has unique naming convention
31518				# use autodetected ${cf_prefix} for import lib and static lib, but
31519				# use 'cyg' prefix for shared lib.
31520				case "$cf_cv_shlib_version" in
31521				(cygdll)
31522					cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
31523					cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
31524					;;
31525				(msysdll)
31526					cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
31527					cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
31528					;;
31529				(mingw)
31530					cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
31531					cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
31532					;;
31533				(msvcdll)
31534					cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
31535					cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
31536					;;
31537				(*)
31538					cf_add_lib=
31539					;;
31540				esac
31541				if test -n "$cf_add_lib"
31542				then
31543					Libs_To_Make="$Libs_To_Make $cf_add_lib"
31544					continue
31545				fi
31546			fi
31547			cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
31548			Libs_To_Make="$Libs_To_Make $cf_add_lib"
31549		done
31550
31551		if test "$cf_dir" = ncurses ; then
31552			cf_subsets="$LIB_SUBSETS"
31553			cf_r_parts="$cf_subsets"
31554			cf_liblist="$Libs_To_Make"
31555
31556			while test -n "$cf_r_parts"
31557			do
31558				cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
31559				cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
31560				if test "$cf_l_parts" != "$cf_r_parts" ; then
31561					cf_add_lib=
31562					case "$cf_l_parts" in
31563					(*termlib*)
31564						cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${ABI_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
31565						;;
31566					(*ticlib*)
31567						cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${ABI_SUFFIX}%${TICS_LIB_SUFFIX}%g`
31568						;;
31569					(*)
31570						break
31571						;;
31572					esac
31573					if test -n "$cf_add_lib"; then
31574						Libs_To_Make="$cf_add_lib $Libs_To_Make"
31575					fi
31576				else
31577					break
31578				fi
31579			done
31580		else
31581			cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
31582		fi
31583
31584		if test "$cf_dir" = c++; then
31585			if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
31586				cf_list=
31587				for cf_item in $Libs_To_Make
31588				do
31589					case "$cf_item" in
31590					(*.a)
31591						;;
31592					(*)
31593						cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
31594						;;
31595					esac
31596					for cf_test in $cf_list
31597					do
31598						if test "$cf_test" = "$cf_item"
31599						then
31600							cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
31601							cf_item=
31602							break
31603						fi
31604					done
31605					test -n "$cf_item" && cf_list="$cf_list $cf_item"
31606				done
31607				Libs_To_Make="$cf_list"
31608			fi
31609		fi
31610
31611		sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
31612		    -e "s%@SHARED_LIB@%$SHARED_LIB%" \
31613			"$cf_dir/Makefile" >$cf_dir/Makefile.out
31614		mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
31615
31616		$AWK -f "$srcdir/mk-0th.awk" \
31617			libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
31618			"$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31619
31620		for cf_subset in $cf_subsets
31621		do
31622			cf_subdirs=
31623			for cf_item in $cf_LIST_MODELS
31624			do
31625
31626			echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
31627
31628cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31629
31630			CXX_MODEL=$cf_ITEM
31631			if test "$CXX_MODEL" = SHARED; then
31632				case "$cf_cv_shlib_version" in
31633				(cygdll|msysdll|mingw|msvcdll)
31634					test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "	overriding CXX_MODEL to SHARED" 1>&6
31635
31636echo "${as_me:-configure}:31636: testing overriding CXX_MODEL to SHARED ..." 1>&5
31637
31638					with_shared_cxx=yes
31639					;;
31640				(*)
31641					test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
31642					;;
31643				esac
31644			fi
31645
31646	case X$cf_item in
31647	(Xlibtool)
31648		cf_suffix='.la'
31649		cf_depsuf=$cf_suffix
31650		;;
31651	(Xdebug)
31652		case "$cf_cv_system_name" in
31653		(*-msvc*)
31654			cf_suffix='_g.lib'
31655			;;
31656		(*)
31657			cf_suffix='_g.a'
31658			;;
31659		esac
31660		cf_depsuf=$cf_suffix
31661		;;
31662	(Xprofile)
31663		case "$cf_cv_system_name" in
31664		(*-msvc*)
31665			cf_suffix='_p.lib'
31666			;;
31667		(*)
31668			cf_suffix='_p.a'
31669			;;
31670		esac
31671		cf_depsuf=$cf_suffix
31672		;;
31673	(Xshared)
31674		case "$cf_cv_system_name" in
31675		(aix[5-7]*)
31676			cf_suffix='.so'
31677			cf_depsuf=$cf_suffix
31678			;;
31679		(*-msvc*)
31680			cf_suffix='.dll'
31681			cf_depsuf='.dll.lib'
31682			;;
31683		(cygwin*|msys*|mingw*)
31684			cf_suffix='.dll'
31685			cf_depsuf='.dll.a'
31686			;;
31687		(darwin*)
31688			cf_suffix='.dylib'
31689			cf_depsuf=$cf_suffix
31690			;;
31691		(hpux*)
31692			case "$target" in
31693			(ia64*)
31694				cf_suffix='.so'
31695				cf_depsuf=$cf_suffix
31696				;;
31697			(*)
31698				cf_suffix='.sl'
31699				cf_depsuf=$cf_suffix
31700				;;
31701			esac
31702			;;
31703		(*)
31704			cf_suffix='.so'
31705			cf_depsuf=$cf_suffix
31706			;;
31707		esac
31708		;;
31709	(*)
31710		case "$target" in
31711		(*-msvc*)
31712			cf_suffix='.lib'
31713			;;
31714		(*)
31715			cf_suffix='.a'
31716			;;
31717		esac
31718		cf_depsuf=$cf_suffix
31719		;;
31720	esac
31721	if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
31722	then
31723		cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
31724		cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
31725	fi
31726
31727	case $cf_item in
31728	(libtool) cf_subdir='obj_lo'  ;;
31729	(normal)  cf_subdir='objects' ;;
31730	(debug)   cf_subdir='obj_g' ;;
31731	(profile) cf_subdir='obj_p' ;;
31732	(shared)
31733		case "$cf_cv_system_name" in
31734		(cygwin|msys)
31735			cf_subdir='objects' ;;
31736		(*)
31737			cf_subdir='obj_s' ;;
31738		esac
31739	esac
31740
31741			# Test for case where we build libtinfo with a different name.
31742			cf_libname=$cf_dir
31743			if test "$cf_dir" = ncurses ; then
31744				case "$cf_subset" in
31745				(*base*)
31746					cf_libname=${cf_libname}$ABI_SUFFIX
31747					;;
31748				(*termlib*)
31749					cf_libname=$TINFO_LIB_SUFFIX
31750					;;
31751				(ticlib*)
31752					cf_libname=$TICS_LIB_SUFFIX
31753					;;
31754				esac
31755			elif test "$cf_dir" = c++ ; then
31756
31757cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31758
31759eval cf_libname="\$${cf_map_lib_basename}_NAME"
31760
31761				cf_libname=${cf_libname}$ABI_SUFFIX
31762			else
31763
31764cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31765
31766eval cf_libname="\$${cf_map_lib_basename}_NAME"
31767
31768				cf_libname=${cf_libname}$ABI_SUFFIX
31769			fi
31770			if test -n "${USE_ARG_SUFFIX}" ; then
31771				# undo $ABI_SUFFIX add-on in CF_LIB_SUFFIX
31772				cf_suffix=`echo "$cf_suffix" |sed -e "s%^${ABI_SUFFIX}%%"`
31773			fi
31774
31775			# These dependencies really are for development, not
31776			# builds, but they are useful in porting, too.
31777			cf_depend="../include/ncurses_cfg.h"
31778			if test "$srcdir" = "."; then
31779				cf_reldir="."
31780			else
31781				cf_reldir="\${srcdir}"
31782			fi
31783
31784			if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
31785				cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
31786			elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
31787				cf_depend="$cf_depend $cf_reldir/curses.priv.h"
31788			fi
31789
31790 			cf_dir_suffix=
31791 			old_cf_suffix="$cf_suffix"
31792 			if test "$cf_cv_shlib_version_infix" = yes ; then
31793			if test -n "$ABI_SUFFIX" ; then
31794				case "$ABI_SUFFIX" in
31795				(tw*)
31796					cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
31797					cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
31798					cf_dir_suffix=tw$EXTRA_SUFFIX
31799					;;
31800				(t*)
31801					cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
31802					cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
31803					cf_dir_suffix=t$EXTRA_SUFFIX
31804					;;
31805				(w*)
31806					cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
31807					cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
31808					cf_dir_suffix=w$EXTRA_SUFFIX
31809					;;
31810				(*)
31811					cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
31812					cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
31813					cf_dir_suffix=$EXTRA_SUFFIX
31814					;;
31815				esac
31816			fi
31817 			fi
31818
31819			$AWK -f "$srcdir/mk-1st.awk" \
31820				name=${cf_libname}${cf_dir_suffix} \
31821				traces=$LIB_TRACING \
31822				MODEL=$cf_ITEM \
31823				CXX_MODEL=$CXX_MODEL \
31824				ABI_SUFFIX=$ABI_SUFFIX \
31825				LIB_SUFFIX=$LIB_SUFFIX \
31826				make_phony="${cf_cv_make_PHONY:-no}" \
31827				model=$cf_subdir \
31828				prefix=$cf_prefix \
31829				suffix=$cf_suffix \
31830				subset=$cf_subset \
31831				driver=$cf_cv_term_driver \
31832				SymLink="$LN_S" \
31833				TermlibRoot=$TINFO_NAME \
31834				TermlibSuffix=$TINFO_SUFFIX \
31835				ShlibVer=$cf_cv_shlib_version \
31836				ShlibVerInfix=$cf_cv_shlib_version_infix \
31837				ReLink=${cf_cv_do_relink:-no} \
31838				ReRanlib=${cf_cv_do_reranlib:-yes} \
31839				DoLinks=$cf_cv_do_symlinks \
31840				rmSoLocs=$cf_cv_rm_so_locs \
31841				ldconfig="$LDCONFIG" \
31842				overwrite=$WITH_OVERWRITE \
31843				depend="$cf_depend" \
31844				host="$host" \
31845				libtool_version="$LIBTOOL_VERSION" \
31846				"$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31847
31848			cf_suffix="$old_cf_suffix"
31849
31850			for cf_subdir2 in $cf_subdirs lib
31851			do
31852				test "$cf_subdir" = "$cf_subdir2" && break
31853			done
31854			test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31855			$AWK -f "$srcdir/mk-2nd.awk" \
31856				name=$cf_dir \
31857				traces=$LIB_TRACING \
31858				MODEL=$cf_ITEM \
31859				model=$cf_subdir \
31860				subset=$cf_subset \
31861				srcdir=$srcdir \
31862				echo=$WITH_ECHO \
31863				crenames=$cf_cv_prog_CC_c_o \
31864				cxxrenames=$cf_cv_prog_CXX_c_o \
31865				"$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31866			cf_subdirs="$cf_subdirs $cf_subdir"
31867			done
31868		done
31869	fi
31870
31871	echo '	( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31872done
31873
31874echo >> Makefile
31875echo '# generated by CF_LIB_RULES' >> Makefile
31876
31877if test "x$cf_cv_make_PHONY" = xyes ; then
31878	cat >> Makefile <<-CF_EOF
31879
31880	.PHONY :	libs
31881	.PHONY :	lintlib
31882	.PHONY :	install.includes
31883	.PHONY :	uninstall.includes
31884	.PHONY :	install.libs
31885	.PHONY :	uninstall.libs
31886CF_EOF
31887fi
31888
31889for cf_dir in $SRC_SUBDIRS
31890do
31891	if test ! -d "$srcdir/$cf_dir" ; then
31892		continue
31893	fi
31894
31895	if test -f "$cf_dir/Makefile" ; then
31896		case "$cf_dir" in
31897		(Ada95)
31898			echo 'libs \' >> Makefile
31899			echo 'install.libs \' >> Makefile
31900			echo 'uninstall.libs ::' >> Makefile
31901			echo '	( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31902			;;
31903		esac
31904	fi
31905
31906	if test -f "$srcdir/$cf_dir/modules" ; then
31907
31908		if test "x$cf_cv_make_PHONY" = xyes ; then
31909			cat >> Makefile <<-CF_EOF
31910
31911			.PHONY :	install.$cf_dir
31912			.PHONY :	uninstall.$cf_dir
31913CF_EOF
31914		fi
31915
31916		echo >> Makefile
31917		if test -f "$srcdir/$cf_dir/headers" ; then
31918cat >> Makefile <<CF_EOF
31919install.includes \\
31920uninstall.includes \\
31921CF_EOF
31922		fi
31923
31924cat >> Makefile <<CF_EOF
31925lint \\
31926libs \\
31927lintlib \\
31928install.libs \\
31929uninstall.libs \\
31930install.$cf_dir \\
31931uninstall.$cf_dir ::
31932	( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31933CF_EOF
31934	elif test -f "$srcdir/$cf_dir/headers" ; then
31935cat >> Makefile <<CF_EOF
31936
31937libs \\
31938install.libs \\
31939uninstall.libs \\
31940install.includes \\
31941uninstall.includes ::
31942	( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31943CF_EOF
31944fi
31945done
31946
31947if test "x$cf_cv_make_PHONY" = xyes ; then
31948	cat >> Makefile <<-CF_EOF
31949
31950	.PHONY :	install.data
31951	.PHONY :	uninstall.data
31952CF_EOF
31953fi
31954
31955if test "x$cf_with_db_install" = xyes; then
31956cat >> Makefile <<CF_EOF
31957
31958install.libs uninstall.libs \\
31959install.data uninstall.data ::
31960$MAKE_TERMINFO	( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31961CF_EOF
31962else
31963cat >> Makefile <<CF_EOF
31964
31965install.libs uninstall.libs ::
31966	( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31967CF_EOF
31968fi
31969
31970if test "x$cf_with_manpages" = xyes; then
31971
31972if test "x$cf_cv_make_PHONY" = xyes ; then
31973	cat >> Makefile <<-CF_EOF
31974
31975	.PHONY :	install.man
31976	.PHONY :	uninstall.man
31977CF_EOF
31978fi
31979
31980cat >> Makefile <<CF_EOF
31981
31982install.man \\
31983uninstall.man ::
31984	( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31985CF_EOF
31986fi
31987
31988cat >> Makefile <<CF_EOF
31989
31990distclean ::
31991	rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31992	rm -f headers.sh headers.sed mk_shared_lib.sh
31993	rm -f edit_man.* man_alias.* *.tmp
31994	rm -rf \${DIRS_TO_MAKE}
31995CF_EOF
31996
31997rm -f headers.sed headers.sh
31998
31999echo creating headers.sh
32000cat >headers.sh <<CF_EOF
32001#! $SHELL
32002# This shell script is generated by the 'configure' script.  It is invoked in a
32003# subdirectory of the build tree.  It generates a sed script in the parent
32004# directory that is used to adjust includes for header files that reside in a
32005# subdirectory of /usr/include, etc.
32006PRG=""
32007while test \$# != 3
32008do
32009PRG="\$PRG \$1"; shift
32010done
32011DST=\$1
32012REF=\$2
32013SRC=\$3
32014TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
32015TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
32016echo installing \$SRC in \$DST
32017CF_EOF
32018
32019if test "$WITH_CURSES_H" = yes; then
32020	cat >>headers.sh <<CF_EOF
32021case \$DST in
32022($GLOB_FULLPATH_POSIX/include/*)
32023	END=\`basename \$DST\`
32024	for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
32025	do
32026		NAME=\`basename \$i\`
32027		echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
32028	done
32029	;;
32030(*)
32031	echo "" >> \$TMPSED
32032	;;
32033esac
32034CF_EOF
32035
32036else
32037	cat >>headers.sh <<CF_EOF
32038case \$DST in
32039($GLOB_FULLPATH_POSIX/include/*)
32040	END=\`basename \$DST\`
32041	for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
32042	do
32043		NAME=\`basename \$i\`
32044		if test "\$NAME" = "curses.h"
32045		then
32046			echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
32047			NAME=ncurses.h
32048		fi
32049		echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
32050	done
32051	;;
32052(*)
32053	echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
32054	;;
32055esac
32056CF_EOF
32057fi
32058cat >>headers.sh <<CF_EOF
32059rm -f \$TMPSRC
32060sed -f \$TMPSED \$SRC > \$TMPSRC
32061NAME=\`basename \$SRC\`
32062CF_EOF
32063if test "$WITH_CURSES_H" != yes; then
32064	cat >>headers.sh <<CF_EOF
32065test "\$NAME" = "curses.h" && NAME=ncurses.h
32066CF_EOF
32067fi
32068cat >>headers.sh <<CF_EOF
32069# Just in case someone gzip'd man pages, remove the conflicting copy.
32070test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
32071
32072eval \$PRG \$TMPSRC \$DST/\$NAME
32073rm -f \$TMPSRC \$TMPSED
32074CF_EOF
32075
32076chmod 0755 headers.sh
32077
32078for cf_dir in $SRC_SUBDIRS
32079do
32080	if test ! -d "$srcdir/$cf_dir" ; then
32081		continue
32082	fi
32083
32084	if test -f "$srcdir/$cf_dir/headers" ; then
32085		$AWK -f "$srcdir/mk-hdr.awk" \
32086			subset="$LIB_SUBSETS" \
32087			compat="$WITH_CURSES_H" \
32088			"$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
32089	fi
32090
32091	if test -f "$srcdir/$cf_dir/modules" ; then
32092		if test "$cf_dir" != "c++" ; then
32093			if test "x$cf_cv_make_PHONY" = xyes ; then
32094				cat >> $cf_dir/Makefile <<-CF_EOF
32095
32096				.PHONY :	depend
32097CF_EOF
32098			fi
32099
32100			cat >>$cf_dir/Makefile <<"CF_EOF"
32101depend : ${AUTO_SRC}
32102	makedepend -- ${CPPFLAGS} -- ${C_SRC}
32103
32104# DO NOT DELETE THIS LINE -- make depend depends on it.
32105CF_EOF
32106		fi
32107	fi
32108done
32109
32110if test "$MANPAGE_RENAMES" != no ; then
32111	# Construct a sed script to perform renaming within man pages
32112	test -n "$verbose" && echo "creating edit_man.sed"
32113	test ! -d man && mkdir man
32114	FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
32115fi
32116
32117if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
32118if test -z "$USE_OLD_MAKERULES" ; then
32119	$AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
32120fi
32121fi
32122 ;;
32123  esac
32124done
32125EOF
32126
32127cat >>"$CONFIG_STATUS" <<\EOF
32128
32129{ (exit 0); exit 0; }
32130EOF
32131chmod +x "$CONFIG_STATUS"
32132ac_clean_files=$ac_clean_files_save
32133
32134# configure is writing to config.log, and then calls config.status.
32135# config.status does its own redirection, appending to config.log.
32136# Unfortunately, on DOS this fails, as config.log is still kept open
32137# by configure, so config.status won't be able to write to it; its
32138# output is simply discarded.  So we exec the FD to /dev/null,
32139# effectively closing config.log, so it can be properly (re)opened and
32140# appended to by config.status.  When coming back to configure, we
32141# need to make the FD available again.
32142if test "$no_create" != yes; then
32143  ac_cs_success=:
32144  exec 5>/dev/null
32145  $SHELL "$CONFIG_STATUS" || ac_cs_success=false
32146  exec 5>>config.log
32147  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
32148  # would make configure fail if this is the last instruction.
32149  "$ac_cs_success" || { (exit 1); exit 1; }
32150fi
32151
32152${MAKE:-make} preinstall
32153