]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.4 - patch 20240414
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.730 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210105.
5 #
6 # Copyright 2003-2020,2021      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.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27   emulate sh
28   NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36 if expr a : '\(a\)' >/dev/null 2>&1; then
37   as_expr=expr
38 else
39   as_expr=false
40 fi
41
42 rm -f conf$$ conf$$.exe conf$$.file
43 echo >conf$$.file
44 if 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
53 elif ln conf$$.file conf$$ 2>/dev/null; then
54   as_ln_s=ln
55 else
56   as_ln_s='cp -p'
57 fi
58 rm -f conf$$ conf$$.exe conf$$.file
59
60 as_executable_p="test -f"
61
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64   as_unset="unset"
65 else
66   as_unset="false"
67 fi
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.
81 as_nl='
82 '
83 IFS="   $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.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93 exec 6>&1
94
95 #
96 # Initializations.
97 #
98 ac_default_prefix=/usr/local
99 cross_compiling=no
100 subdirs=
101 MFLAGS=
102 MAKEFLAGS=
103 SHELL=${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
110 ac_unique_file="ncurses/base/lib_initscr.c"
111 # Factoring default headers for most tests.
112 ac_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.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_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.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
187
188 # Identity of this package.
189 PACKAGE_NAME=
190 PACKAGE_TARNAME=
191 PACKAGE_VERSION=
192 PACKAGE_STRING=
193 PACKAGE_BUGREPORT=
194
195 ac_prev=
196 for ac_option
197 do
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   -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486    { (exit 1); exit 1; }; }
487     ;;
488
489   *=*)
490     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491     # Reject names that are not valid shell variable names.
492     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494    { (exit 1); exit 1; }; }
495     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496     eval "$ac_envvar='$ac_optarg'"
497     export "$ac_envvar" ;;
498
499   *)
500     # FIXME: should be removed in autoconf 3.0.
501     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504     : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512   { echo "$as_me: error: missing argument to $ac_option" >&2
513    { (exit 1); exit 1; }; }
514 fi
515
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
518 do
519   eval ac_val=$`echo "$ac_var"`
520   case "$ac_val" in
521     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529               localstatedir libdir includedir oldincludedir infodir mandir
530 do
531   eval ac_val=$`echo "$ac_var"`
532   case "$ac_val" in
533     [\\/$]* | ?:[\\/]* ) ;;
534     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535    { (exit 1); exit 1; }; };;
536   esac
537 done
538
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
541 build=$build_alias
542 host=$host_alias
543 target=$target_alias
544
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547   if test "x$build_alias" = x; then
548     cross_compiling=maybe
549     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550     If a cross compiler is detected then cross compile mode will be used." >&2
551   elif test "x$build_alias" != "x$host_alias"; then
552     cross_compiling=yes
553   fi
554 fi
555
556 ac_tool_prefix=
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
558
559 test "$silent" = yes && exec 6>/dev/null
560
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563   ac_srcdir_defaulted=yes
564   # Try the directory containing this script, then its parent.
565   ac_prog=$0
566   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568   srcdir=$ac_confdir
569   if test ! -r "$srcdir/$ac_unique_file"; then
570     srcdir=..
571   fi
572 else
573   ac_srcdir_defaulted=no
574 fi
575 if test ! -r "$srcdir/$ac_unique_file"; then
576   if test "$ac_srcdir_defaulted" = yes; then
577     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578    { (exit 1); exit 1; }; }
579   else
580     { echo "$as_me: error: cannot find sources in $srcdir" >&2
581    { (exit 1); exit 1; }; }
582   fi
583 fi
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
598 ac_env_CC_value=$CC
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
617 ac_env_CXX_set=${CXX+set}
618 ac_env_CXX_value=$CXX
619 ac_cv_env_CXX_set=${CXX+set}
620 ac_cv_env_CXX_value=$CXX
621 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_env_CXXFLAGS_value=$CXXFLAGS
623 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
624 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
625 ac_env_CXXCPP_set=${CXXCPP+set}
626 ac_env_CXXCPP_value=$CXXCPP
627 ac_cv_env_CXXCPP_set=${CXXCPP+set}
628 ac_cv_env_CXXCPP_value=$CXXCPP
629
630 #
631 # Report the --help message.
632 #
633 if test "$ac_init_help" = "long"; then
634   # Omit some internal or obsolete options to make the list less imposing.
635   # This message is too long to be a string in the A/UX 3.1 sh.
636   cat <<EOF
637 \`configure' configures this package to adapt to many kinds of systems.
638
639 Usage: $0 [OPTION]... [VAR=VALUE]...
640
641 To assign environment variables (e.g., CC, CFLAGS...), specify them as
642 VAR=VALUE.  See below for descriptions of some of the useful variables.
643
644 Defaults for the options are specified in brackets.
645
646 Configuration:
647   -h, --help              display this help and exit
648       --help=short        display options specific to this package
649       --help=recursive    display the short help of all the included packages
650   -V, --version           display version information and exit
651   -q, --quiet, --silent   do not print \`checking...' messages
652       --cache-file=FILE   cache test results in FILE [disabled]
653   -C, --config-cache      alias for \`--cache-file=config.cache'
654   -n, --no-create         do not create output files
655       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
656
657 EOF
658
659   cat <<EOF
660 Installation directories:
661   --prefix=PREFIX         install architecture-independent files in PREFIX
662                           [$ac_default_prefix]
663   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
664                           [PREFIX]
665
666 By default, \`make install' will install all the files in
667 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
668 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
669 for instance \`--prefix=\$HOME'.
670
671 For better control, use the options below.
672
673 Fine tuning of the installation directories:
674   --bindir=DIR            user executables [EPREFIX/bin]
675   --sbindir=DIR           system admin executables [EPREFIX/sbin]
676   --libexecdir=DIR        program executables [EPREFIX/libexec]
677   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
678   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
682   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
683   --libdir=DIR            object code libraries [EPREFIX/lib]
684   --includedir=DIR        C header files [PREFIX/include]
685   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
686   --infodir=DIR           info documentation [DATAROOTDIR/info]
687   --mandir=DIR            man documentation [DATAROOTDIR/man]
688 EOF
689
690   cat <<\EOF
691
692 Program names:
693   --program-prefix=PREFIX            prepend PREFIX to installed program names
694   --program-suffix=SUFFIX            append SUFFIX to installed program names
695   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
696
697 System types:
698   --build=BUILD           configure for building on BUILD [guessed]
699   --host=HOST       build programs to run on HOST [BUILD]
700   --target=TARGET   configure for building compilers for TARGET [HOST]
701 EOF
702 fi
703
704 if test -n "$ac_init_help"; then
705
706   cat <<\EOF
707
708 Optional Packages:
709   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
710   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
711
712 Optional Features:
713   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
714   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
715
716   --with-rel-version=XXX  override derived release version
717   --with-abi-version=XXX  override derived ABI version
718   --with-system-type=XXX  test: override derived host system-type
719   --without-ada           suppress check for Ada compiler, don't build demo
720   --without-cxx           do not adjust ncurses bool to match C++
721   --without-cxx-binding   do not build C++ binding and demo
722   --disable-db-install    suppress install of terminal database
723   --without-manpages      suppress install of manpages
724   --without-progs         suppress build/install with programs (e.g., tic)
725   --without-tack          suppress build/install with tack program
726   --without-tests         suppress build/install with test-programs
727   --without-curses-h      install curses.h as ncurses.h only
728   --with-config-suffix=X  suffixes ncursesXX-config file
729   --with-pkg-config{=path} enable/disable use of pkg-config
730   --with-pkg-config-libdir=XXX use given directory for installing pc-files
731   --enable-pc-files       generate and install .pc files for pkg-config
732   --with-pc-suffix        suffixes pc-files
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix   prefixes actual install-location ($DESTDIR)
735 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
737   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
738   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
742 Options to Specify the Libraries Built/Used:
743   --disable-libtool-version  enable to use libtool's incompatible naming scheme
744   --with-libtool          generate libraries with libtool
745   --with-shared           generate shared-libraries
746   --with-normal           generate normal-libraries (default)
747   --with-debug            generate debug-libraries (default)
748   --with-profile          generate profile-libraries
749   --with-cxx-shared       generate C++ shared-libraries
750   --with-lib-prefix       override library-prefix
751   --with-termlib          generate separate terminfo library
752   --with-ticlib           generate separate tic library
753   --enable-rpath          use rpath option when generating shared libraries
754   --disable-relink        relink shared libraries during install
755   --with-shlib-version=X  Specify rel or abi version for shared libs
756   --with-libtool-opts=XXX specify additional libtool options
757   --with-export-syms=XXX  limit exported symbols using libtool
758   --with-versioned-syms=X markup versioned symbols using ld
759   --with-gpm              use Alessandro Rubini's GPM library
760   --without-dlsym         do not use dlsym() to load GPM dynamically
761   --with-pcre2            use PCRE2 for regular-expressions
762   --with-sysmouse         use sysmouse (FreeBSD console)
763   --disable-lib-suffixes  disable library suffixes
764   --disable-rpath-hack    don't add rpath options for additional libraries
765   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
766 Fine-Tuning Your Configuration:
767   --with-extra-suffix=X   append extra suffix to header/library paths
768   --disable-overwrite     put headers in subdir, omit link to -lcurses
769   --disable-database      do not use terminfo, only fallbacks/termcap
770   --with-database=XXX     specify terminfo source to install
771   --with-hashed-db        specify hashed-database library
772   --with-fallbacks=XXX    specify list of fallback terminal descriptions
773   --with-tic-path=XXX     specify path of tic for fallbacks
774   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
775   --without-xterm-new     specify if xterm terminfo should be old version
776   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
777   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779   --disable-big-core      assume machine has little memory
780   --disable-big-strings   assume compiler has only standard-size strings
781   --enable-termcap        compile in termcap fallback support
782   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783   --enable-getcap         fast termcap load, no xrefs to terminfo
784   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
785   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
786   --disable-root-environ  restrict environment when running as root
787   --enable-symlinks       make tic use symbolic links not hard links
788   --enable-broken_linker  compile with broken-linker support code
789   --enable-bsdpad         recognize BSD-style prefix padding
790   --enable-widec          compile with wide-char/UTF-8 code
791   --disable-lp64          allow chtype to be long (ignore _LP64)
792   --disable-largefile     omit support for large files
793   --disable-tparm-varargs compile tparm() without varargs interface
794   --disable-tic-depends   link tic library without explicit dependency on ncurses library
795   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
796   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
797   --with-bool=TYPE        override fallback type of bool variable
798   --with-caps=alt         compile with alternate Caps file
799   --with-chtype=TYPE      override type of chtype
800   --with-ospeed=TYPE      override type of ospeed variable
801   --with-mmask-t=TYPE     override type of mmask_t
802   --with-ccharw-max=XXX   override size CCHARW_MAX
803   --enable-signed-char    compile using signed Boolean's in term.h
804   --with-tparm-arg=TYPE   override parameter type of tparm
805   --with-rcs-ids          compile-in RCS identifiers
806 Options to Specify How Manpages are Installed:
807   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
808                           optionally formatted/catonly, e.g., gzip,formatted
809   --with-manpage-renames  specify manpage-renaming
810   --with-manpage-aliases  specify manpage-aliases using .so
811   --with-manpage-symlinks specify manpage-aliases using symlinks
812   --with-manpage-tbl      specify manpage processing with tbl
813 Extensions:
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-ext-mouse      compile for extended mouse-encoding
820   --enable-ext-putwin     compile with extended putwin/screendump
821   --enable-no-padding     compile with $NCURSES_NO_PADDING code
822   --enable-sigwinch       compile with SIGWINCH handler
823   --enable-tcap-names     compile with user-definable terminal capabilities
824 Reentrant Code:
825   --with-pthread          use POSIX thread library
826   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
827   --enable-weak-symbols   enable weak-symbols for pthreads
828   --enable-reentrant      compile with reentrant code
829   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
830   --enable-opaque-form    make form-library structures "opaque"
831   --enable-opaque-menu    make menu-library structures "opaque"
832   --enable-opaque-panel   make panel-library structures "opaque"
833   --with-wrap-prefix=XXX  override prefix used for public variables
834 Development Code:
835   --without-develop       disable development options
836   --enable-hard-tabs      compile with hard-tabs code
837   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
838 Experimental Code:
839   --disable-assumed-color do not assume anything about default-colors
840   --disable-hashmap       compile without hashmap scrolling-optimization
841   --enable-colorfgbg      compile-in experimental $COLORFGBG code
842   --enable-fvisibility    compile with -fvisibility=hidden
843   --enable-interop        compile-in interop bindings
844   --enable-safe-sprintf   compile with experimental safe-sprintf code
845   --disable-scroll-hints  compile without scroll-hints code
846   --enable-wgetch-events  compile with wgetch-events code
847   --enable-exp-win32      compile with experimental-Windows driver
848 Testing/development Options:
849   --disable-echo          do not display "compiling" commands
850   --disable-stripping     do not strip (debug info) installed executables
851   --enable-warnings       test: turn on gcc compiler warnings
852   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
853   --enable-string-hacks   work around bogus compiler/loader warnings
854   --enable-assertions     test: turn on generation of assertion code
855   --with-dmalloc          test: use Gray Watson's dmalloc library
856   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
857   --with-valgrind         test: use valgrind
858   --disable-leaks         test: free permanent memory, analyze leaks
859   --enable-expanded       test: generate functions for certain macros
860   --disable-macros        test: use functions rather than macros
861   --with-trace            test: add trace() function to all models of ncurses
862   --disable-gnat-projects test: disable GNAT projects even if usable
863 Ada Binding Options:
864   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
865   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
866   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
867   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
868   --with-ada-libname=XXX  override default Ada library-name
869   --with-form-libname=XXX override form basename of library
870   --with-menu-libname=XXX override menu basename of library
871   --with-panel-libname=XXX override panel basename of library
872   --with-cxx-libname=XXX override ncurses++ basename of library
873
874 Some influential environment variables:
875   CC          C compiler command
876   CFLAGS      C compiler flags
877   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
878               nonstandard directory <lib dir>
879   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
880               headers in a nonstandard directory <include dir>
881   CPP         C preprocessor
882   CXX         C++ compiler command
883   CXXFLAGS    C++ compiler flags
884   CXXCPP      C++ preprocessor
885
886 Use these variables to override the choices made by `configure' or to help
887 it to find libraries and programs with nonstandard names/locations.
888
889 EOF
890 fi
891
892 if test "$ac_init_help" = "recursive"; then
893   # If there are subdirs, report their specific --help.
894   ac_popdir=`pwd`
895   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
896     cd "$ac_subdir"
897     # A "../" for each directory in /$ac_subdir.
898     ac_dots=`echo "$ac_subdir" |
899              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
900
901     case "$srcdir" in
902     .) # No --srcdir option.  We are building in place.
903       ac_sub_srcdir="$srcdir" ;;
904     [\\/]* | ?:[\\/]* ) # Absolute path.
905       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
906     *) # Relative path.
907       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
908     esac
909
910     # Check for guested configure; otherwise get Cygnus style configure.
911     if test -f "$ac_sub_srcdir/configure.gnu"; then
912       echo
913       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
914     elif test -f "$ac_sub_srcdir/configure"; then
915       echo
916       $SHELL "$ac_sub_srcdir/configure" --help=recursive
917     elif test -f "$ac_sub_srcdir/configure.ac" ||
918            test -f "$ac_sub_srcdir/configure.in"; then
919       echo
920       "$ac_configure" --help
921     else
922       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
923     fi
924     cd "$ac_popdir"
925   done
926 fi
927
928 test -n "$ac_init_help" && exit 0
929 if "$ac_init_version"; then
930   cat <<\EOF
931
932 Copyright 2003-2020,2021        Thomas E. Dickey
933 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
934 Free Software Foundation, Inc.
935 This configure script is free software; the Free Software Foundation
936 gives unlimited permission to copy, distribute and modify it.
937 EOF
938   exit 0
939 fi
940 exec 5>config.log
941 cat >&5 <<EOF
942 This file contains any messages produced by compilers while
943 running configure, to aid debugging if configure makes a mistake.
944
945 It was created by $as_me, which was
946 generated by GNU Autoconf 2.52.20210105.  Invocation command line was
947
948   $ $0 $@
949
950 EOF
951 {
952 cat <<_ASUNAME
953 ## ---------- ##
954 ## Platform.  ##
955 ## ---------- ##
956
957 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
958 uname -m = `(uname -m) 2>/dev/null || echo unknown`
959 uname -r = `(uname -r) 2>/dev/null || echo unknown`
960 uname -s = `(uname -s) 2>/dev/null || echo unknown`
961 uname -v = `(uname -v) 2>/dev/null || echo unknown`
962
963 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
964 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
965
966 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
967 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
968 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
969 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
970 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
971 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
972 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
973
974 PATH = $PATH
975
976 _ASUNAME
977 } >&5
978
979 cat >&5 <<EOF
980 ## ------------ ##
981 ## Core tests.  ##
982 ## ------------ ##
983
984 EOF
985
986 # Keep a trace of the command line.
987 # Strip out --no-create and --no-recursion so they do not pile up.
988 # Also quote any args containing shell meta-characters.
989 ac_configure_args=
990 ac_sep=
991 for ac_arg
992 do
993   case "$ac_arg" in
994   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
995   | --no-cr | --no-c) ;;
996   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
997   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
998   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
999     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1000     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1001     ac_sep=" " ;;
1002   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1003      ac_sep=" " ;;
1004   esac
1005   # Get rid of the leading space.
1006 done
1007
1008 # When interrupted or exit'd, cleanup temporary files, and complete
1009 # config.log.  We remove comments because anyway the quotes in there
1010 # would cause problems or look ugly.
1011 trap 'exit_status=$?
1012   # Save into config.log some information that might help in debugging.
1013   echo >&5
1014   echo "## ----------------- ##" >&5
1015   echo "## Cache variables.  ##" >&5
1016   echo "## ----------------- ##" >&5
1017   echo >&5
1018   # The following way of writing the cache mishandles newlines in values,
1019 {
1020   (set) 2>&1 |
1021     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1022     *ac_space=\ *)
1023       sed -n \
1024         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1025           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1026       ;;
1027     *)
1028       sed -n \
1029         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1030       ;;
1031     esac;
1032 } >&5
1033   sed "/^$/d" confdefs.h >conftest.log
1034   if test -s conftest.log; then
1035     echo >&5
1036     echo "## ------------ ##" >&5
1037     echo "## confdefs.h.  ##" >&5
1038     echo "## ------------ ##" >&5
1039     echo >&5
1040     cat conftest.log >&5
1041   fi
1042   (echo; echo) >&5
1043   test "$ac_signal" != 0 &&
1044     echo "$as_me: caught signal $ac_signal" >&5
1045   echo "$as_me: exit $exit_status" >&5
1046   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1047     exit $exit_status
1048      ' 0
1049 for ac_signal in 1 2 13 15; do
1050   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1051 done
1052 ac_signal=0
1053
1054 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1055 rm -rf conftest* confdefs.h
1056 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1057 echo >confdefs.h
1058
1059 # Let the site file select an alternate cache file if it wants to.
1060 # Prefer explicitly selected file to automatically selected ones.
1061 if test -z "$CONFIG_SITE"; then
1062   if test "x$prefix" != xNONE; then
1063     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1064   else
1065     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1066   fi
1067 fi
1068 for ac_site_file in $CONFIG_SITE; do
1069   if test -r "$ac_site_file"; then
1070     { echo "$as_me:1070: loading site script $ac_site_file" >&5
1071 echo "$as_me: loading site script $ac_site_file" >&6;}
1072     cat "$ac_site_file" >&5
1073     . "$ac_site_file"
1074   fi
1075 done
1076
1077 if test -r "$cache_file"; then
1078   # Some versions of bash will fail to source /dev/null (special
1079   # files actually), so we avoid doing that.
1080   if test -f "$cache_file"; then
1081     { echo "$as_me:1081: loading cache $cache_file" >&5
1082 echo "$as_me: loading cache $cache_file" >&6;}
1083     case $cache_file in
1084       [\\/]* | ?:[\\/]* ) . $cache_file;;
1085       *)                      . ./$cache_file;;
1086     esac
1087   fi
1088 else
1089   { echo "$as_me:1089: creating cache $cache_file" >&5
1090 echo "$as_me: creating cache $cache_file" >&6;}
1091   >$cache_file
1092 fi
1093
1094 # Check that the precious variables saved in the cache have kept the same
1095 # value.
1096 ac_cache_corrupted=false
1097 for ac_var in `(set) 2>&1 |
1098                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1099   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1100   eval ac_new_set=\$ac_env_${ac_var}_set
1101   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1102   eval ac_new_val="\$ac_env_${ac_var}_value"
1103   case "$ac_old_set,$ac_new_set" in
1104     set,)
1105       { echo "$as_me:1105: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1106 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1107       ac_cache_corrupted=: ;;
1108     ,set)
1109       { echo "$as_me:1109: error: \`$ac_var' was not set in the previous run" >&5
1110 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1111       ac_cache_corrupted=: ;;
1112     ,);;
1113     *)
1114       if test "x$ac_old_val" != "x$ac_new_val"; then
1115         { echo "$as_me:1115: error: \`$ac_var' has changed since the previous run:" >&5
1116 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1117         { echo "$as_me:1117:   former value:  $ac_old_val" >&5
1118 echo "$as_me:   former value:  $ac_old_val" >&2;}
1119         { echo "$as_me:1119:   current value: $ac_new_val" >&5
1120 echo "$as_me:   current value: $ac_new_val" >&2;}
1121         ac_cache_corrupted=:
1122       fi;;
1123   esac
1124   # Pass precious variables to config.status.  It doesn't matter if
1125   # we pass some twice (in addition to the command line arguments).
1126   if test "$ac_new_set" = set; then
1127     case "$ac_new_val" in
1128     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1129       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1130       ac_configure_args="$ac_configure_args '$ac_arg'"
1131       ;;
1132     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1133        ;;
1134     esac
1135   fi
1136 done
1137 if "$ac_cache_corrupted"; then
1138   { echo "$as_me:1138: error: changes in the environment can compromise the build" >&5
1139 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1140   { { echo "$as_me:1140: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1141 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1142    { (exit 1); exit 1; }; }
1143 fi
1144
1145 ac_ext=c
1146 ac_cpp='$CPP $CPPFLAGS'
1147 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1148 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1149 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1150 ac_main_return="return"
1151
1152 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1153   *c*,-n*) ECHO_N=
1154            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1155            ECHO_T='     '
1156            ;;
1157   *c*,*  ) ECHO_N=-n
1158            ECHO_C=
1159            ECHO_T=
1160            ;;
1161   *)       ECHO_N=
1162            ECHO_C='\c'
1163            ECHO_T=
1164            ;;
1165 esac
1166 echo "#! $SHELL" >conftest.sh
1167 echo  "exit 0"   >>conftest.sh
1168 chmod +x conftest.sh
1169 if { (echo "$as_me:1169: PATH=\".;.\"; conftest.sh") >&5
1170   (PATH=".;."; conftest.sh) 2>&5
1171   ac_status=$?
1172   echo "$as_me:1172: \$? = $ac_status" >&5
1173   (exit "$ac_status"); }; then
1174   ac_path_separator=';'
1175 else
1176   ac_path_separator=:
1177 fi
1178 PATH_SEPARATOR="$ac_path_separator"
1179 rm -f conftest.sh
1180
1181 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1182
1183 top_builddir=`pwd`
1184
1185 for ac_prog in ggrep grep
1186 do
1187   # Extract the first word of "$ac_prog", so it can be a program name with args.
1188 set dummy $ac_prog; ac_word=$2
1189 echo "$as_me:1189: checking for $ac_word" >&5
1190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1191 if test "${ac_cv_prog_GREP+set}" = set; then
1192   echo $ECHO_N "(cached) $ECHO_C" >&6
1193 else
1194   if test -n "$GREP"; then
1195   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1196 else
1197   ac_save_IFS=$IFS; IFS=$ac_path_separator
1198 ac_dummy="$PATH"
1199 for ac_dir in $ac_dummy; do
1200   IFS=$ac_save_IFS
1201   test -z "$ac_dir" && ac_dir=.
1202   $as_executable_p "$ac_dir/$ac_word" || continue
1203 ac_cv_prog_GREP="$ac_prog"
1204 echo "$as_me:1204: found $ac_dir/$ac_word" >&5
1205 break
1206 done
1207
1208 fi
1209 fi
1210 GREP=$ac_cv_prog_GREP
1211 if test -n "$GREP"; then
1212   echo "$as_me:1212: result: $GREP" >&5
1213 echo "${ECHO_T}$GREP" >&6
1214 else
1215   echo "$as_me:1215: result: no" >&5
1216 echo "${ECHO_T}no" >&6
1217 fi
1218
1219   test -n "$GREP" && break
1220 done
1221 test -n "$GREP" || GREP=": "
1222
1223 echo "$as_me:1223: checking for egrep" >&5
1224 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1225 if test "${ac_cv_path_EGREP+set}" = set; then
1226   echo $ECHO_N "(cached) $ECHO_C" >&6
1227 else
1228   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1229    then ac_cv_path_EGREP="$GREP -E"
1230    else
1231      for ac_prog in gegrep egrep
1232 do
1233   # Extract the first word of "$ac_prog", so it can be a program name with args.
1234 set dummy $ac_prog; ac_word=$2
1235 echo "$as_me:1235: checking for $ac_word" >&5
1236 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1237 if test "${ac_cv_path_EGREP+set}" = set; then
1238   echo $ECHO_N "(cached) $ECHO_C" >&6
1239 else
1240   case $EGREP in
1241   [\\/]* | ?:[\\/]*)
1242   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1243   ;;
1244   *)
1245   ac_save_IFS=$IFS; IFS=$ac_path_separator
1246 ac_dummy="$PATH"
1247 for ac_dir in $ac_dummy; do
1248   IFS=$ac_save_IFS
1249   test -z "$ac_dir" && ac_dir=.
1250   if $as_executable_p "$ac_dir/$ac_word"; then
1251    ac_cv_path_EGREP="$ac_dir/$ac_word"
1252    echo "$as_me:1252: found $ac_dir/$ac_word" >&5
1253    break
1254 fi
1255 done
1256
1257   ;;
1258 esac
1259 fi
1260 EGREP=$ac_cv_path_EGREP
1261
1262 if test -n "$EGREP"; then
1263   echo "$as_me:1263: result: $EGREP" >&5
1264 echo "${ECHO_T}$EGREP" >&6
1265 else
1266   echo "$as_me:1266: result: no" >&5
1267 echo "${ECHO_T}no" >&6
1268 fi
1269
1270   test -n "$EGREP" && break
1271 done
1272 test -n "$EGREP" || EGREP=": "
1273
1274      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1274: error: cannot find workable egrep" >&5
1275 echo "$as_me: error: cannot find workable egrep" >&2;}
1276    { (exit 1); exit 1; }; }
1277    fi
1278 fi
1279 echo "$as_me:1279: result: $ac_cv_path_EGREP" >&5
1280 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1281  EGREP="$ac_cv_path_EGREP"
1282
1283 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1284 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1285 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1286 cf_cv_abi_version=${NCURSES_MAJOR}
1287 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1288 cf_cv_timestamp=`date`
1289 echo "$as_me:1289: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1290 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1291
1292 if test -f "$srcdir/VERSION" ; then
1293         echo "$as_me:1293: checking for package version" >&5
1294 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1295
1296         # if there are not enough fields, cut returns the last one...
1297         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1298         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1299         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1300
1301         # this is how CF_BUNDLED_INTL uses $VERSION:
1302         VERSION="$cf_field1"
1303
1304         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1305         test -z "$VERSION_MAJOR" && { { echo "$as_me:1305: error: missing major-version" >&5
1306 echo "$as_me: error: missing major-version" >&2;}
1307    { (exit 1); exit 1; }; }
1308
1309         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1310         test -z "$VERSION_MINOR" && { { echo "$as_me:1310: error: missing minor-version" >&5
1311 echo "$as_me: error: missing minor-version" >&2;}
1312    { (exit 1); exit 1; }; }
1313
1314         echo "$as_me:1314: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1315 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1316
1317         echo "$as_me:1317: checking for package patch date" >&5
1318 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1319         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1320         case .$VERSION_PATCH in
1321         (.)
1322                 { { echo "$as_me:1322: error: missing patch-date $VERSION_PATCH" >&5
1323 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1324    { (exit 1); exit 1; }; }
1325                 ;;
1326         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1327                 ;;
1328         (*)
1329                 { { echo "$as_me:1329: error: illegal patch-date $VERSION_PATCH" >&5
1330 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1331    { (exit 1); exit 1; }; }
1332                 ;;
1333         esac
1334         echo "$as_me:1334: result: $VERSION_PATCH" >&5
1335 echo "${ECHO_T}$VERSION_PATCH" >&6
1336 else
1337         { { echo "$as_me:1337: error: did not find $srcdir/VERSION" >&5
1338 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1339    { (exit 1); exit 1; }; }
1340 fi
1341
1342 # show the actual data that we have for versions:
1343 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1344
1345 echo "${as_me:-configure}:1345: testing ABI VERSION $VERSION ..." 1>&5
1346
1347 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1348
1349 echo "${as_me:-configure}:1349: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1350
1351 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1352
1353 echo "${as_me:-configure}:1353: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1354
1355 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1356
1357 echo "${as_me:-configure}:1357: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1358
1359         cf_PACKAGE=NCURSES
1360         PACKAGE=ncurses
1361
1362 cat >>confdefs.h <<EOF
1363 #define PACKAGE "$PACKAGE"
1364 EOF
1365
1366 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1367
1368         cat >>confdefs.h <<EOF
1369 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1370 EOF
1371
1372         cat >>confdefs.h <<EOF
1373 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1374 EOF
1375
1376 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1377
1378 # Check whether --with-rel-version or --without-rel-version was given.
1379 if test "${with_rel_version+set}" = set; then
1380   withval="$with_rel_version"
1381   { echo "$as_me:1381: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1382 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1383  cf_cv_rel_version=$withval
1384 fi;
1385
1386  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1387  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1388
1389 if test -n "$NCURSES_MAJOR" ; then
1390   case $NCURSES_MAJOR in
1391   ([0-9]*)
1392         ;;
1393   (*)
1394         { { echo "$as_me:1394: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1395 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1396    { (exit 1); exit 1; }; }
1397         ;;
1398   esac
1399 else
1400   { { echo "$as_me:1400: error: Release major-version value is empty" >&5
1401 echo "$as_me: error: Release major-version value is empty" >&2;}
1402    { (exit 1); exit 1; }; }
1403 fi
1404
1405 if test -n "$NCURSES_MINOR" ; then
1406   case $NCURSES_MINOR in
1407   ([0-9]*)
1408         ;;
1409   (*)
1410         { { echo "$as_me:1410: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1411 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1412    { (exit 1); exit 1; }; }
1413         ;;
1414   esac
1415 else
1416   { { echo "$as_me:1416: error: Release minor-version value is empty" >&5
1417 echo "$as_me: error: Release minor-version value is empty" >&2;}
1418    { (exit 1); exit 1; }; }
1419 fi
1420
1421 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1422
1423 # Check whether --with-abi-version or --without-abi-version was given.
1424 if test "${with_abi_version+set}" = set; then
1425   withval="$with_abi_version"
1426
1427         if test "x$cf_cv_abi_version" != "x$withval"
1428         then
1429                 { echo "$as_me:1429: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1430 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1431                 case "$cf_cv_rel_version" in
1432                 (5.*)
1433                         cf_cv_rel_version=$withval.0
1434                         ;;
1435                 (6.*)
1436                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1437                         ;;
1438                 esac
1439         fi
1440         cf_cv_abi_version=$withval
1441 fi;
1442
1443 if test -n "$cf_cv_abi_version" ; then
1444   case $cf_cv_abi_version in
1445   ([0-9]*)
1446         ;;
1447   (*)
1448         { { echo "$as_me:1448: error: ABI version is not a number: $cf_cv_abi_version" >&5
1449 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1450    { (exit 1); exit 1; }; }
1451         ;;
1452   esac
1453 else
1454   { { echo "$as_me:1454: error: ABI version value is empty" >&5
1455 echo "$as_me: error: ABI version value is empty" >&2;}
1456    { (exit 1); exit 1; }; }
1457 fi
1458
1459 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1460 then
1461         case "$cf_cv_rel_version" in
1462         (5.*)
1463                 cf_cv_rel_version=$with_abi_version.0
1464                 ;;
1465         esac
1466 fi
1467
1468 ac_aux_dir=
1469 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1470   if test -f "$ac_dir/install-sh"; then
1471     ac_aux_dir=$ac_dir
1472     ac_install_sh="$ac_aux_dir/install-sh -c"
1473     break
1474   elif test -f "$ac_dir/install.sh"; then
1475     ac_aux_dir=$ac_dir
1476     ac_install_sh="$ac_aux_dir/install.sh -c"
1477     break
1478   elif test -f "$ac_dir/shtool"; then
1479     ac_aux_dir=$ac_dir
1480     ac_install_sh="$ac_aux_dir/shtool install -c"
1481     break
1482   fi
1483 done
1484 if test -z "$ac_aux_dir"; then
1485   { { echo "$as_me:1485: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1486 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1487    { (exit 1); exit 1; }; }
1488 fi
1489 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1490 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1491 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1492
1493 # Make sure we can run config.sub.
1494 $ac_config_sub sun4 >/dev/null 2>&1 ||
1495   { { echo "$as_me:1495: error: cannot run $ac_config_sub" >&5
1496 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1497    { (exit 1); exit 1; }; }
1498
1499 echo "$as_me:1499: checking build system type" >&5
1500 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1501 if test "${ac_cv_build+set}" = set; then
1502   echo $ECHO_N "(cached) $ECHO_C" >&6
1503 else
1504   ac_cv_build_alias=$build_alias
1505 test -z "$ac_cv_build_alias" &&
1506   ac_cv_build_alias=`$ac_config_guess`
1507 test -z "$ac_cv_build_alias" &&
1508   { { echo "$as_me:1508: error: cannot guess build type; you must specify one" >&5
1509 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1510    { (exit 1); exit 1; }; }
1511 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1512   { { echo "$as_me:1512: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1513 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1514    { (exit 1); exit 1; }; }
1515
1516 fi
1517 echo "$as_me:1517: result: $ac_cv_build" >&5
1518 echo "${ECHO_T}$ac_cv_build" >&6
1519 build=$ac_cv_build
1520 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1521 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1522 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1523
1524 echo "$as_me:1524: checking host system type" >&5
1525 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1526 if test "${ac_cv_host+set}" = set; then
1527   echo $ECHO_N "(cached) $ECHO_C" >&6
1528 else
1529   ac_cv_host_alias=$host_alias
1530 test -z "$ac_cv_host_alias" &&
1531   ac_cv_host_alias=$ac_cv_build_alias
1532 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1533   { { echo "$as_me:1533: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1534 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1535    { (exit 1); exit 1; }; }
1536
1537 fi
1538 echo "$as_me:1538: result: $ac_cv_host" >&5
1539 echo "${ECHO_T}$ac_cv_host" >&6
1540 host=$ac_cv_host
1541 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1542 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1543 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1544
1545 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1546         echo "$as_me:1546: checking target system type" >&5
1547 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1548 if test "${ac_cv_target+set}" = set; then
1549   echo $ECHO_N "(cached) $ECHO_C" >&6
1550 else
1551   ac_cv_target_alias=$target_alias
1552 test "x$ac_cv_target_alias" = "x" &&
1553   ac_cv_target_alias=$ac_cv_host_alias
1554 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1555   { { echo "$as_me:1555: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1556 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1557    { (exit 1); exit 1; }; }
1558
1559 fi
1560 echo "$as_me:1560: result: $ac_cv_target" >&5
1561 echo "${ECHO_T}$ac_cv_target" >&6
1562 target=$ac_cv_target
1563 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1564 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1565 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1566
1567 # The aliases save the names the user supplied, while $host etc.
1568 # will get canonicalized.
1569 test -n "$target_alias" &&
1570   test "$program_prefix$program_suffix$program_transform_name" = \
1571     NONENONEs,x,x, &&
1572   program_prefix=${target_alias}-
1573         system_name="$host_os"
1574 else
1575         system_name="`(uname -s -r) 2>/dev/null`"
1576         if test -z "$system_name" ; then
1577                 system_name="`(hostname) 2>/dev/null`"
1578         fi
1579 fi
1580 test -n "$system_name" &&
1581 cat >>confdefs.h <<EOF
1582 #define SYSTEM_NAME "$system_name"
1583 EOF
1584
1585 if test "${cf_cv_system_name+set}" = set; then
1586   echo $ECHO_N "(cached) $ECHO_C" >&6
1587 else
1588   cf_cv_system_name="$system_name"
1589 fi
1590
1591 test -z "$system_name" && system_name="$cf_cv_system_name"
1592 test -n "$cf_cv_system_name" && echo "$as_me:1592: result: Configuring for $cf_cv_system_name" >&5
1593 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1594
1595 if test ".$system_name" != ".$cf_cv_system_name" ; then
1596         echo "$as_me:1596: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1597 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1598         { { echo "$as_me:1598: error: \"Please remove config.cache and try again.\"" >&5
1599 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1600    { (exit 1); exit 1; }; }
1601 fi
1602
1603 # Check whether --with-system-type or --without-system-type was given.
1604 if test "${with_system_type+set}" = set; then
1605   withval="$with_system_type"
1606   { echo "$as_me:1606: WARNING: overriding system type to $withval" >&5
1607 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1608         cf_cv_system_name=$withval
1609         host_os=$withval
1610
1611 fi;
1612
1613 ###     Save the given $CFLAGS to allow user-override.
1614 cf_user_CFLAGS="$CFLAGS"
1615
1616 ###     Default install-location
1617 echo "$as_me:1617: checking for fgrep" >&5
1618 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1619 if test "${ac_cv_path_FGREP+set}" = set; then
1620   echo $ECHO_N "(cached) $ECHO_C" >&6
1621 else
1622   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1623    then ac_cv_path_FGREP="$GREP -F"
1624    else
1625      for ac_prog in gfgrep fgrep
1626 do
1627   # Extract the first word of "$ac_prog", so it can be a program name with args.
1628 set dummy $ac_prog; ac_word=$2
1629 echo "$as_me:1629: checking for $ac_word" >&5
1630 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1631 if test "${ac_cv_path_FGREP+set}" = set; then
1632   echo $ECHO_N "(cached) $ECHO_C" >&6
1633 else
1634   case $FGREP in
1635   [\\/]* | ?:[\\/]*)
1636   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1637   ;;
1638   *)
1639   ac_save_IFS=$IFS; IFS=$ac_path_separator
1640 ac_dummy="$PATH"
1641 for ac_dir in $ac_dummy; do
1642   IFS=$ac_save_IFS
1643   test -z "$ac_dir" && ac_dir=.
1644   if $as_executable_p "$ac_dir/$ac_word"; then
1645    ac_cv_path_FGREP="$ac_dir/$ac_word"
1646    echo "$as_me:1646: found $ac_dir/$ac_word" >&5
1647    break
1648 fi
1649 done
1650
1651   ;;
1652 esac
1653 fi
1654 FGREP=$ac_cv_path_FGREP
1655
1656 if test -n "$FGREP"; then
1657   echo "$as_me:1657: result: $FGREP" >&5
1658 echo "${ECHO_T}$FGREP" >&6
1659 else
1660   echo "$as_me:1660: result: no" >&5
1661 echo "${ECHO_T}no" >&6
1662 fi
1663
1664   test -n "$FGREP" && break
1665 done
1666 test -n "$FGREP" || FGREP=": "
1667
1668      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1668: error: cannot find workable fgrep" >&5
1669 echo "$as_me: error: cannot find workable fgrep" >&2;}
1670    { (exit 1); exit 1; }; }
1671    fi
1672 fi
1673 echo "$as_me:1673: result: $ac_cv_path_FGREP" >&5
1674 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1675  FGREP="$ac_cv_path_FGREP"
1676
1677 echo "$as_me:1677: checking for prefix" >&5
1678 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1679 if test "x$prefix" = "xNONE" ; then
1680         case "$cf_cv_system_name" in
1681                 # non-vendor systems don't have a conflict
1682         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1683                 prefix=/usr
1684                 ;;
1685         (*)     prefix=$ac_default_prefix
1686                 ;;
1687         esac
1688 fi
1689 echo "$as_me:1689: result: $prefix" >&5
1690 echo "${ECHO_T}$prefix" >&6
1691
1692 if test "x$prefix" = "xNONE" ; then
1693 echo "$as_me:1693: checking for default include-directory" >&5
1694 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1695 test -n "$verbose" && echo 1>&6
1696 for cf_symbol in \
1697         "$includedir" \
1698         "$includedir/ncurses" \
1699         "$prefix/include" \
1700         "$prefix/include/ncurses" \
1701         /usr/local/include \
1702         /usr/local/include/ncurses \
1703         /usr/include \
1704         /usr/include/ncurses
1705 do
1706         cf_dir=`eval echo "$cf_symbol"`
1707         if test -f "$cf_dir/curses.h" ; then
1708         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1709                 includedir="$cf_symbol"
1710                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1711                 break
1712         fi
1713         fi
1714         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1715 done
1716 echo "$as_me:1716: result: $includedir" >&5
1717 echo "${ECHO_T}$includedir" >&6
1718 fi
1719
1720 ### Defaults for ncurses ABI
1721
1722 case x$cf_cv_abi_version in
1723 (x[6789])
1724         cf_dft_ext_colors=yes
1725         cf_dft_ext_const=yes
1726         cf_dft_ext_mouse=yes
1727         cf_dft_ext_putwin=yes
1728         cf_dft_ext_spfuncs=yes
1729         cf_dft_filter_syms=yes
1730         cf_dft_chtype=uint32_t
1731         cf_dft_mmask_t=uint32_t
1732         cf_dft_interop=yes
1733         cf_dft_tparm_arg=intptr_t
1734         cf_dft_with_lp64=yes
1735         ;;
1736 (*)
1737         cf_dft_ext_colors=no
1738         cf_dft_ext_const=no
1739         cf_dft_ext_mouse=no
1740         cf_dft_ext_putwin=no
1741         cf_dft_ext_spfuncs=no
1742         cf_dft_filter_syms=no
1743         cf_dft_chtype=auto
1744         cf_dft_mmask_t=auto
1745         cf_dft_interop=no
1746         cf_dft_tparm_arg=long
1747         cf_dft_with_lp64=no
1748         ;;
1749 esac
1750
1751 ###     Checks for programs.
1752
1753 # Check whether --with-ada or --without-ada was given.
1754 if test "${with_ada+set}" = set; then
1755   withval="$with_ada"
1756   cf_with_ada=$withval
1757 else
1758   cf_with_ada=yes
1759 fi;
1760
1761 if test "x$cf_with_ada" = xyes
1762 then
1763         cf_prog_cc="gnatgcc gcc cc"
1764 else
1765         cf_prog_cc="gcc cc"
1766 fi
1767
1768 ac_ext=c
1769 ac_cpp='$CPP $CPPFLAGS'
1770 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1771 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1772 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1773 ac_main_return="return"
1774 if test -n "$ac_tool_prefix"; then
1775   for ac_prog in $cf_prog_cc
1776   do
1777     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1778 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1779 echo "$as_me:1779: checking for $ac_word" >&5
1780 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1781 if test "${ac_cv_prog_CC+set}" = set; then
1782   echo $ECHO_N "(cached) $ECHO_C" >&6
1783 else
1784   if test -n "$CC"; then
1785   ac_cv_prog_CC="$CC" # Let the user override the test.
1786 else
1787   ac_save_IFS=$IFS; IFS=$ac_path_separator
1788 ac_dummy="$PATH"
1789 for ac_dir in $ac_dummy; do
1790   IFS=$ac_save_IFS
1791   test -z "$ac_dir" && ac_dir=.
1792   $as_executable_p "$ac_dir/$ac_word" || continue
1793 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1794 echo "$as_me:1794: found $ac_dir/$ac_word" >&5
1795 break
1796 done
1797
1798 fi
1799 fi
1800 CC=$ac_cv_prog_CC
1801 if test -n "$CC"; then
1802   echo "$as_me:1802: result: $CC" >&5
1803 echo "${ECHO_T}$CC" >&6
1804 else
1805   echo "$as_me:1805: result: no" >&5
1806 echo "${ECHO_T}no" >&6
1807 fi
1808
1809     test -n "$CC" && break
1810   done
1811 fi
1812 if test -z "$CC"; then
1813   ac_ct_CC=$CC
1814   for ac_prog in $cf_prog_cc
1815 do
1816   # Extract the first word of "$ac_prog", so it can be a program name with args.
1817 set dummy $ac_prog; ac_word=$2
1818 echo "$as_me:1818: checking for $ac_word" >&5
1819 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1820 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1821   echo $ECHO_N "(cached) $ECHO_C" >&6
1822 else
1823   if test -n "$ac_ct_CC"; then
1824   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1825 else
1826   ac_save_IFS=$IFS; IFS=$ac_path_separator
1827 ac_dummy="$PATH"
1828 for ac_dir in $ac_dummy; do
1829   IFS=$ac_save_IFS
1830   test -z "$ac_dir" && ac_dir=.
1831   $as_executable_p "$ac_dir/$ac_word" || continue
1832 ac_cv_prog_ac_ct_CC="$ac_prog"
1833 echo "$as_me:1833: found $ac_dir/$ac_word" >&5
1834 break
1835 done
1836
1837 fi
1838 fi
1839 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1840 if test -n "$ac_ct_CC"; then
1841   echo "$as_me:1841: result: $ac_ct_CC" >&5
1842 echo "${ECHO_T}$ac_ct_CC" >&6
1843 else
1844   echo "$as_me:1844: result: no" >&5
1845 echo "${ECHO_T}no" >&6
1846 fi
1847
1848   test -n "$ac_ct_CC" && break
1849 done
1850
1851   CC=$ac_ct_CC
1852 fi
1853
1854 test -z "$CC" && { { echo "$as_me:1854: error: no acceptable cc found in \$PATH" >&5
1855 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1856    { (exit 1); exit 1; }; }
1857
1858 # Provide some information about the compiler.
1859 echo "$as_me:1859:" \
1860      "checking for C compiler version" >&5
1861 ac_compiler=`set X $ac_compile; echo "$2"`
1862 { (eval echo "$as_me:1862: \"$ac_compiler --version </dev/null >&5\"") >&5
1863   (eval $ac_compiler --version </dev/null >&5) 2>&5
1864   ac_status=$?
1865   echo "$as_me:1865: \$? = $ac_status" >&5
1866   (exit "$ac_status"); }
1867 { (eval echo "$as_me:1867: \"$ac_compiler -v </dev/null >&5\"") >&5
1868   (eval $ac_compiler -v </dev/null >&5) 2>&5
1869   ac_status=$?
1870   echo "$as_me:1870: \$? = $ac_status" >&5
1871   (exit "$ac_status"); }
1872 { (eval echo "$as_me:1872: \"$ac_compiler -V </dev/null >&5\"") >&5
1873   (eval $ac_compiler -V </dev/null >&5) 2>&5
1874   ac_status=$?
1875   echo "$as_me:1875: \$? = $ac_status" >&5
1876   (exit "$ac_status"); }
1877
1878 cat >"conftest.$ac_ext" <<_ACEOF
1879 #line 1879 "configure"
1880 #include "confdefs.h"
1881
1882 int
1883 main (void)
1884 {
1885
1886   ;
1887   return 0;
1888 }
1889 _ACEOF
1890 ac_clean_files_save=$ac_clean_files
1891 ac_clean_files="$ac_clean_files a.out a.exe"
1892 # Try to create an executable without -o first, disregard a.out.
1893 # It will help us diagnose broken compilers, and finding out an intuition
1894 # of exeext.
1895 echo "$as_me:1895: checking for C compiler default output" >&5
1896 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1897 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1898 if { (eval echo "$as_me:1898: \"$ac_link_default\"") >&5
1899   (eval $ac_link_default) 2>&5
1900   ac_status=$?
1901   echo "$as_me:1901: \$? = $ac_status" >&5
1902   (exit "$ac_status"); }; then
1903   # Find the output, starting from the most likely.  This scheme is
1904 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1905 # resort.
1906 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1907                 ls a.out conftest 2>/dev/null;
1908                 ls a.* conftest.* 2>/dev/null`; do
1909   case $ac_file in
1910     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1911     a.out ) # We found the default executable, but exeext='' is most
1912             # certainly right.
1913             break;;
1914     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1915           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1916           export ac_cv_exeext
1917           break;;
1918     * ) break;;
1919   esac
1920 done
1921 else
1922   echo "$as_me: failed program was:" >&5
1923 cat "conftest.$ac_ext" >&5
1924 { { echo "$as_me:1924: error: C compiler cannot create executables" >&5
1925 echo "$as_me: error: C compiler cannot create executables" >&2;}
1926    { (exit 77); exit 77; }; }
1927 fi
1928
1929 ac_exeext=$ac_cv_exeext
1930 echo "$as_me:1930: result: $ac_file" >&5
1931 echo "${ECHO_T}$ac_file" >&6
1932
1933 # Check the compiler produces executables we can run.  If not, either
1934 # the compiler is broken, or we cross compile.
1935 echo "$as_me:1935: checking whether the C compiler works" >&5
1936 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1937 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1938 # If not cross compiling, check that we can run a simple program.
1939 if test "$cross_compiling" != yes; then
1940   if { ac_try='./$ac_file'
1941   { (eval echo "$as_me:1941: \"$ac_try\"") >&5
1942   (eval $ac_try) 2>&5
1943   ac_status=$?
1944   echo "$as_me:1944: \$? = $ac_status" >&5
1945   (exit "$ac_status"); }; }; then
1946     cross_compiling=no
1947   else
1948     if test "$cross_compiling" = maybe; then
1949         cross_compiling=yes
1950     else
1951         { { echo "$as_me:1951: error: cannot run C compiled programs.
1952 If you meant to cross compile, use \`--host'." >&5
1953 echo "$as_me: error: cannot run C compiled programs.
1954 If you meant to cross compile, use \`--host'." >&2;}
1955    { (exit 1); exit 1; }; }
1956     fi
1957   fi
1958 fi
1959 echo "$as_me:1959: result: yes" >&5
1960 echo "${ECHO_T}yes" >&6
1961
1962 rm -f a.out a.exe "conftest$ac_cv_exeext"
1963 ac_clean_files=$ac_clean_files_save
1964 # Check the compiler produces executables we can run.  If not, either
1965 # the compiler is broken, or we cross compile.
1966 echo "$as_me:1966: checking whether we are cross compiling" >&5
1967 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1968 echo "$as_me:1968: result: $cross_compiling" >&5
1969 echo "${ECHO_T}$cross_compiling" >&6
1970
1971 echo "$as_me:1971: checking for executable suffix" >&5
1972 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1973 if { (eval echo "$as_me:1973: \"$ac_link\"") >&5
1974   (eval $ac_link) 2>&5
1975   ac_status=$?
1976   echo "$as_me:1976: \$? = $ac_status" >&5
1977   (exit "$ac_status"); }; then
1978   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1979 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1980 # work properly (i.e., refer to `conftest.exe'), while it won't with
1981 # `rm'.
1982 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1983   case $ac_file in
1984     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1985     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1986           export ac_cv_exeext
1987           break;;
1988     * ) break;;
1989   esac
1990 done
1991 else
1992   { { echo "$as_me:1992: error: cannot compute EXEEXT: cannot compile and link" >&5
1993 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1994    { (exit 1); exit 1; }; }
1995 fi
1996
1997 rm -f "conftest$ac_cv_exeext"
1998 echo "$as_me:1998: result: $ac_cv_exeext" >&5
1999 echo "${ECHO_T}$ac_cv_exeext" >&6
2000
2001 rm -f "conftest.$ac_ext"
2002 EXEEXT=$ac_cv_exeext
2003 ac_exeext=$EXEEXT
2004 echo "$as_me:2004: checking for object suffix" >&5
2005 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2006 if test "${ac_cv_objext+set}" = set; then
2007   echo $ECHO_N "(cached) $ECHO_C" >&6
2008 else
2009   cat >"conftest.$ac_ext" <<_ACEOF
2010 #line 2010 "configure"
2011 #include "confdefs.h"
2012
2013 int
2014 main (void)
2015 {
2016
2017   ;
2018   return 0;
2019 }
2020 _ACEOF
2021 rm -f conftest.o conftest.obj
2022 if { (eval echo "$as_me:2022: \"$ac_compile\"") >&5
2023   (eval $ac_compile) 2>&5
2024   ac_status=$?
2025   echo "$as_me:2025: \$? = $ac_status" >&5
2026   (exit "$ac_status"); }; then
2027   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2028   case $ac_file in
2029     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2030     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2031        break;;
2032   esac
2033 done
2034 else
2035   echo "$as_me: failed program was:" >&5
2036 cat "conftest.$ac_ext" >&5
2037 { { echo "$as_me:2037: error: cannot compute OBJEXT: cannot compile" >&5
2038 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2039    { (exit 1); exit 1; }; }
2040 fi
2041
2042 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2043 fi
2044 echo "$as_me:2044: result: $ac_cv_objext" >&5
2045 echo "${ECHO_T}$ac_cv_objext" >&6
2046 OBJEXT=$ac_cv_objext
2047 ac_objext=$OBJEXT
2048 echo "$as_me:2048: checking whether we are using the GNU C compiler" >&5
2049 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2050 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2051   echo $ECHO_N "(cached) $ECHO_C" >&6
2052 else
2053   cat >"conftest.$ac_ext" <<_ACEOF
2054 #line 2054 "configure"
2055 #include "confdefs.h"
2056
2057 int
2058 main (void)
2059 {
2060 #ifndef __GNUC__
2061        choke me
2062 #endif
2063
2064   ;
2065   return 0;
2066 }
2067 _ACEOF
2068 rm -f "conftest.$ac_objext"
2069 if { (eval echo "$as_me:2069: \"$ac_compile\"") >&5
2070   (eval $ac_compile) 2>&5
2071   ac_status=$?
2072   echo "$as_me:2072: \$? = $ac_status" >&5
2073   (exit "$ac_status"); } &&
2074          { ac_try='test -s "conftest.$ac_objext"'
2075   { (eval echo "$as_me:2075: \"$ac_try\"") >&5
2076   (eval $ac_try) 2>&5
2077   ac_status=$?
2078   echo "$as_me:2078: \$? = $ac_status" >&5
2079   (exit "$ac_status"); }; }; then
2080   ac_compiler_gnu=yes
2081 else
2082   echo "$as_me: failed program was:" >&5
2083 cat "conftest.$ac_ext" >&5
2084 ac_compiler_gnu=no
2085 fi
2086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2087 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2088
2089 fi
2090 echo "$as_me:2090: result: $ac_cv_c_compiler_gnu" >&5
2091 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2092 GCC=`test $ac_compiler_gnu = yes && echo yes`
2093 ac_test_CFLAGS=${CFLAGS+set}
2094 ac_save_CFLAGS=$CFLAGS
2095 CFLAGS="-g"
2096 echo "$as_me:2096: checking whether $CC accepts -g" >&5
2097 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2098 if test "${ac_cv_prog_cc_g+set}" = set; then
2099   echo $ECHO_N "(cached) $ECHO_C" >&6
2100 else
2101   cat >"conftest.$ac_ext" <<_ACEOF
2102 #line 2102 "configure"
2103 #include "confdefs.h"
2104
2105 int
2106 main (void)
2107 {
2108
2109   ;
2110   return 0;
2111 }
2112 _ACEOF
2113 rm -f "conftest.$ac_objext"
2114 if { (eval echo "$as_me:2114: \"$ac_compile\"") >&5
2115   (eval $ac_compile) 2>&5
2116   ac_status=$?
2117   echo "$as_me:2117: \$? = $ac_status" >&5
2118   (exit "$ac_status"); } &&
2119          { ac_try='test -s "conftest.$ac_objext"'
2120   { (eval echo "$as_me:2120: \"$ac_try\"") >&5
2121   (eval $ac_try) 2>&5
2122   ac_status=$?
2123   echo "$as_me:2123: \$? = $ac_status" >&5
2124   (exit "$ac_status"); }; }; then
2125   ac_cv_prog_cc_g=yes
2126 else
2127   echo "$as_me: failed program was:" >&5
2128 cat "conftest.$ac_ext" >&5
2129 ac_cv_prog_cc_g=no
2130 fi
2131 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2132 fi
2133 echo "$as_me:2133: result: $ac_cv_prog_cc_g" >&5
2134 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2135 if test "$ac_test_CFLAGS" = set; then
2136   CFLAGS=$ac_save_CFLAGS
2137 elif test $ac_cv_prog_cc_g = yes; then
2138   if test "$GCC" = yes; then
2139     CFLAGS="-g -O2"
2140   else
2141     CFLAGS="-g"
2142   fi
2143 else
2144   if test "$GCC" = yes; then
2145     CFLAGS="-O2"
2146   else
2147     CFLAGS=
2148   fi
2149 fi
2150 # Some people use a C++ compiler to compile C.  Since we use `exit',
2151 # in C++ we need to declare it.  In case someone uses the same compiler
2152 # for both compiling C and C++ we need to have the C++ compiler decide
2153 # the declaration of exit, since it's the most demanding environment.
2154 cat >"conftest.$ac_ext" <<_ACEOF
2155 #ifndef __cplusplus
2156   choke me
2157 #endif
2158 _ACEOF
2159 rm -f "conftest.$ac_objext"
2160 if { (eval echo "$as_me:2160: \"$ac_compile\"") >&5
2161   (eval $ac_compile) 2>&5
2162   ac_status=$?
2163   echo "$as_me:2163: \$? = $ac_status" >&5
2164   (exit "$ac_status"); } &&
2165          { ac_try='test -s "conftest.$ac_objext"'
2166   { (eval echo "$as_me:2166: \"$ac_try\"") >&5
2167   (eval $ac_try) 2>&5
2168   ac_status=$?
2169   echo "$as_me:2169: \$? = $ac_status" >&5
2170   (exit "$ac_status"); }; }; then
2171   for ac_declaration in \
2172    ''\
2173    '#include <stdlib.h>' \
2174    'extern "C" void std::exit (int) throw (); using std::exit;' \
2175    'extern "C" void std::exit (int); using std::exit;' \
2176    'extern "C" void exit (int) throw ();' \
2177    'extern "C" void exit (int);' \
2178    'void exit (int);'
2179 do
2180   cat >"conftest.$ac_ext" <<_ACEOF
2181 #line 2181 "configure"
2182 #include "confdefs.h"
2183 #include <stdlib.h>
2184 $ac_declaration
2185 int
2186 main (void)
2187 {
2188 exit (42);
2189   ;
2190   return 0;
2191 }
2192 _ACEOF
2193 rm -f "conftest.$ac_objext"
2194 if { (eval echo "$as_me:2194: \"$ac_compile\"") >&5
2195   (eval $ac_compile) 2>&5
2196   ac_status=$?
2197   echo "$as_me:2197: \$? = $ac_status" >&5
2198   (exit "$ac_status"); } &&
2199          { ac_try='test -s "conftest.$ac_objext"'
2200   { (eval echo "$as_me:2200: \"$ac_try\"") >&5
2201   (eval $ac_try) 2>&5
2202   ac_status=$?
2203   echo "$as_me:2203: \$? = $ac_status" >&5
2204   (exit "$ac_status"); }; }; then
2205   :
2206 else
2207   echo "$as_me: failed program was:" >&5
2208 cat "conftest.$ac_ext" >&5
2209 continue
2210 fi
2211 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2212   cat >"conftest.$ac_ext" <<_ACEOF
2213 #line 2213 "configure"
2214 #include "confdefs.h"
2215 $ac_declaration
2216 int
2217 main (void)
2218 {
2219 exit (42);
2220   ;
2221   return 0;
2222 }
2223 _ACEOF
2224 rm -f "conftest.$ac_objext"
2225 if { (eval echo "$as_me:2225: \"$ac_compile\"") >&5
2226   (eval $ac_compile) 2>&5
2227   ac_status=$?
2228   echo "$as_me:2228: \$? = $ac_status" >&5
2229   (exit "$ac_status"); } &&
2230          { ac_try='test -s "conftest.$ac_objext"'
2231   { (eval echo "$as_me:2231: \"$ac_try\"") >&5
2232   (eval $ac_try) 2>&5
2233   ac_status=$?
2234   echo "$as_me:2234: \$? = $ac_status" >&5
2235   (exit "$ac_status"); }; }; then
2236   break
2237 else
2238   echo "$as_me: failed program was:" >&5
2239 cat "conftest.$ac_ext" >&5
2240 fi
2241 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2242 done
2243 rm -rf conftest*
2244 if test -n "$ac_declaration"; then
2245   echo '#ifdef __cplusplus' >>confdefs.h
2246   echo "$ac_declaration"    >>confdefs.h
2247   echo '#endif'             >>confdefs.h
2248 fi
2249
2250 else
2251   echo "$as_me: failed program was:" >&5
2252 cat "conftest.$ac_ext" >&5
2253 fi
2254 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2255 ac_ext=c
2256 ac_cpp='$CPP $CPPFLAGS'
2257 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2258 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2259 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2260 ac_main_return="return"
2261
2262 GCC_VERSION=none
2263 if test "$GCC" = yes ; then
2264         echo "$as_me:2264: checking version of $CC" >&5
2265 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2266         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2267         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2268         echo "$as_me:2268: result: $GCC_VERSION" >&5
2269 echo "${ECHO_T}$GCC_VERSION" >&6
2270 fi
2271
2272 INTEL_COMPILER=no
2273
2274 if test "$GCC" = yes ; then
2275         case "$host_os" in
2276         (linux*|gnu*)
2277                 echo "$as_me:2277: checking if this is really Intel C compiler" >&5
2278 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2279                 cf_save_CFLAGS="$CFLAGS"
2280                 CFLAGS="$CFLAGS -no-gcc"
2281                 cat >"conftest.$ac_ext" <<_ACEOF
2282 #line 2282 "configure"
2283 #include "confdefs.h"
2284
2285 int
2286 main (void)
2287 {
2288
2289 #ifdef __INTEL_COMPILER
2290 #else
2291 make an error
2292 #endif
2293
2294   ;
2295   return 0;
2296 }
2297 _ACEOF
2298 rm -f "conftest.$ac_objext"
2299 if { (eval echo "$as_me:2299: \"$ac_compile\"") >&5
2300   (eval $ac_compile) 2>&5
2301   ac_status=$?
2302   echo "$as_me:2302: \$? = $ac_status" >&5
2303   (exit "$ac_status"); } &&
2304          { ac_try='test -s "conftest.$ac_objext"'
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   INTEL_COMPILER=yes
2311 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2312
2313 else
2314   echo "$as_me: failed program was:" >&5
2315 cat "conftest.$ac_ext" >&5
2316 fi
2317 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2318                 CFLAGS="$cf_save_CFLAGS"
2319                 echo "$as_me:2319: result: $INTEL_COMPILER" >&5
2320 echo "${ECHO_T}$INTEL_COMPILER" >&6
2321                 ;;
2322         esac
2323 fi
2324
2325 CLANG_COMPILER=no
2326
2327 if test "$GCC" = yes ; then
2328         echo "$as_me:2328: checking if this is really Clang C compiler" >&5
2329 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2330         cf_save_CFLAGS="$CFLAGS"
2331         cat >"conftest.$ac_ext" <<_ACEOF
2332 #line 2332 "configure"
2333 #include "confdefs.h"
2334
2335 int
2336 main (void)
2337 {
2338
2339 #ifdef __clang__
2340 #else
2341 make an error
2342 #endif
2343
2344   ;
2345   return 0;
2346 }
2347 _ACEOF
2348 rm -f "conftest.$ac_objext"
2349 if { (eval echo "$as_me:2349: \"$ac_compile\"") >&5
2350   (eval $ac_compile) 2>&5
2351   ac_status=$?
2352   echo "$as_me:2352: \$? = $ac_status" >&5
2353   (exit "$ac_status"); } &&
2354          { ac_try='test -s "conftest.$ac_objext"'
2355   { (eval echo "$as_me:2355: \"$ac_try\"") >&5
2356   (eval $ac_try) 2>&5
2357   ac_status=$?
2358   echo "$as_me:2358: \$? = $ac_status" >&5
2359   (exit "$ac_status"); }; }; then
2360   CLANG_COMPILER=yes
2361
2362 else
2363   echo "$as_me: failed program was:" >&5
2364 cat "conftest.$ac_ext" >&5
2365 fi
2366 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2367         CFLAGS="$cf_save_CFLAGS"
2368         echo "$as_me:2368: result: $CLANG_COMPILER" >&5
2369 echo "${ECHO_T}$CLANG_COMPILER" >&6
2370 fi
2371
2372 CLANG_VERSION=none
2373
2374 if test "x$CLANG_COMPILER" = "xyes" ; then
2375         case "$CC" in
2376         (c[1-9][0-9]|*/c[1-9][0-9])
2377                 { echo "$as_me:2377: WARNING: replacing broken compiler alias $CC" >&5
2378 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2379                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2380                 CC=clang
2381                 ;;
2382         esac
2383
2384         echo "$as_me:2384: checking version of $CC" >&5
2385 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2386         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.].*//'`"
2387         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2388         echo "$as_me:2388: result: $CLANG_VERSION" >&5
2389 echo "${ECHO_T}$CLANG_VERSION" >&6
2390
2391         for cf_clang_opt in \
2392                 -Qunused-arguments \
2393                 -Wno-error=implicit-function-declaration
2394         do
2395                 echo "$as_me:2395: checking if option $cf_clang_opt works" >&5
2396 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2397                 cf_save_CFLAGS="$CFLAGS"
2398                 CFLAGS="$CFLAGS $cf_clang_opt"
2399                 cat >"conftest.$ac_ext" <<_ACEOF
2400 #line 2400 "configure"
2401 #include "confdefs.h"
2402
2403                         #include <stdio.h>
2404 int
2405 main (void)
2406 {
2407
2408                         printf("hello!\\n");
2409   ;
2410   return 0;
2411 }
2412 _ACEOF
2413 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2414 if { (eval echo "$as_me:2414: \"$ac_link\"") >&5
2415   (eval $ac_link) 2>&5
2416   ac_status=$?
2417   echo "$as_me:2417: \$? = $ac_status" >&5
2418   (exit "$ac_status"); } &&
2419          { ac_try='test -s "conftest$ac_exeext"'
2420   { (eval echo "$as_me:2420: \"$ac_try\"") >&5
2421   (eval $ac_try) 2>&5
2422   ac_status=$?
2423   echo "$as_me:2423: \$? = $ac_status" >&5
2424   (exit "$ac_status"); }; }; then
2425
2426                         cf_clang_optok=yes
2427 else
2428   echo "$as_me: failed program was:" >&5
2429 cat "conftest.$ac_ext" >&5
2430
2431                         cf_clang_optok=no
2432 fi
2433 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2434                 echo "$as_me:2434: result: $cf_clang_optok" >&5
2435 echo "${ECHO_T}$cf_clang_optok" >&6
2436                 CFLAGS="$cf_save_CFLAGS"
2437                 if test "$cf_clang_optok" = yes; then
2438                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2439
2440 echo "${as_me:-configure}:2440: testing adding option $cf_clang_opt ..." 1>&5
2441
2442         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2443         CFLAGS="${CFLAGS}$cf_clang_opt"
2444
2445                 fi
2446         done
2447 fi
2448
2449 echo "$as_me:2449: checking for $CC option to accept ANSI C" >&5
2450 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2451 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2452   echo $ECHO_N "(cached) $ECHO_C" >&6
2453 else
2454   ac_cv_prog_cc_stdc=no
2455 ac_save_CC=$CC
2456 cat >"conftest.$ac_ext" <<_ACEOF
2457 #line 2457 "configure"
2458 #include "confdefs.h"
2459 #include <stdarg.h>
2460 #include <stdio.h>
2461 #include <sys/types.h>
2462 #include <sys/stat.h>
2463 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2464 struct buf { int x; };
2465 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2466 static char *e (p, i)
2467      char **p;
2468      int i;
2469 {
2470   return p[i];
2471 }
2472 static char *f (char * (*g) (char **, int), char **p, ...)
2473 {
2474   char *s;
2475   va_list v;
2476   va_start (v,p);
2477   s = g (p, va_arg (v,int));
2478   va_end (v);
2479   return s;
2480 }
2481 int test (int i, double x);
2482 struct s1 {int (*f) (int a);};
2483 struct s2 {int (*f) (double a);};
2484 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2485 int argc;
2486 char **argv;
2487 int
2488 main (void)
2489 {
2490 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2491   ;
2492   return 0;
2493 }
2494 _ACEOF
2495 # Don't try gcc -ansi; that turns off useful extensions and
2496 # breaks some systems' header files.
2497 # AIX                   -qlanglvl=ansi
2498 # Ultrix and OSF/1      -std1
2499 # HP-UX 10.20 and later -Ae
2500 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2501 # SVR4                  -Xc -D__EXTENSIONS__
2502 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2503 do
2504   CC="$ac_save_CC $ac_arg"
2505   rm -f "conftest.$ac_objext"
2506 if { (eval echo "$as_me:2506: \"$ac_compile\"") >&5
2507   (eval $ac_compile) 2>&5
2508   ac_status=$?
2509   echo "$as_me:2509: \$? = $ac_status" >&5
2510   (exit "$ac_status"); } &&
2511          { ac_try='test -s "conftest.$ac_objext"'
2512   { (eval echo "$as_me:2512: \"$ac_try\"") >&5
2513   (eval $ac_try) 2>&5
2514   ac_status=$?
2515   echo "$as_me:2515: \$? = $ac_status" >&5
2516   (exit "$ac_status"); }; }; then
2517   ac_cv_prog_cc_stdc=$ac_arg
2518 break
2519 else
2520   echo "$as_me: failed program was:" >&5
2521 cat "conftest.$ac_ext" >&5
2522 fi
2523 rm -f "conftest.$ac_objext"
2524 done
2525 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2526 CC=$ac_save_CC
2527
2528 fi
2529
2530 case "x$ac_cv_prog_cc_stdc" in
2531   x|xno)
2532     echo "$as_me:2532: result: none needed" >&5
2533 echo "${ECHO_T}none needed" >&6 ;;
2534   *)
2535     echo "$as_me:2535: result: $ac_cv_prog_cc_stdc" >&5
2536 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2537     CC="$CC $ac_cv_prog_cc_stdc" ;;
2538 esac
2539
2540 # This should have been defined by AC_PROG_CC
2541 : "${CC:=cc}"
2542
2543 echo "$as_me:2543: checking \$CFLAGS variable" >&5
2544 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2545 case "x$CFLAGS" in
2546 (*-[IUD]*)
2547         echo "$as_me:2547: result: broken" >&5
2548 echo "${ECHO_T}broken" >&6
2549         { echo "$as_me:2549: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2550 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2551         cf_flags="$CFLAGS"
2552         CFLAGS=
2553         for cf_arg in $cf_flags
2554         do
2555
2556 cf_fix_cppflags=no
2557 cf_new_cflags=
2558 cf_new_cppflags=
2559 cf_new_extra_cppflags=
2560
2561 for cf_add_cflags in $cf_arg
2562 do
2563 case "$cf_fix_cppflags" in
2564 (no)
2565         case "$cf_add_cflags" in
2566         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2567                 case "$cf_add_cflags" in
2568                 (-D*)
2569                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2570
2571                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2572                                 && test -z "${cf_tst_cflags}" \
2573                                 && cf_fix_cppflags=yes
2574
2575                         if test "$cf_fix_cppflags" = yes ; then
2576
2577         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2578         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2579
2580                                 continue
2581                         elif test "${cf_tst_cflags}" = "\"'" ; then
2582
2583         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2584         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2585
2586                                 continue
2587                         fi
2588                         ;;
2589                 esac
2590                 case "$CPPFLAGS" in
2591                 (*$cf_add_cflags)
2592                         ;;
2593                 (*)
2594                         case "$cf_add_cflags" in
2595                         (-D*)
2596                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2597
2598 CPPFLAGS=`echo "$CPPFLAGS" | \
2599         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2600                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2601
2602                                 ;;
2603                         esac
2604
2605         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2606         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2607
2608                         ;;
2609                 esac
2610                 ;;
2611         (*)
2612
2613         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2614         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2615
2616                 ;;
2617         esac
2618         ;;
2619 (yes)
2620
2621         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2622         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2623
2624         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2625
2626         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2627                 && test -z "${cf_tst_cflags}" \
2628                 && cf_fix_cppflags=no
2629         ;;
2630 esac
2631 done
2632
2633 if test -n "$cf_new_cflags" ; then
2634
2635         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2636         CFLAGS="${CFLAGS}$cf_new_cflags"
2637
2638 fi
2639
2640 if test -n "$cf_new_cppflags" ; then
2641
2642         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2643         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2644
2645 fi
2646
2647 if test -n "$cf_new_extra_cppflags" ; then
2648
2649         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2650         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2651
2652 fi
2653
2654         done
2655         ;;
2656 (*)
2657         echo "$as_me:2657: result: ok" >&5
2658 echo "${ECHO_T}ok" >&6
2659         ;;
2660 esac
2661
2662 echo "$as_me:2662: checking \$CC variable" >&5
2663 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2664 case "$CC" in
2665 (*[\ \  ]-*)
2666         echo "$as_me:2666: result: broken" >&5
2667 echo "${ECHO_T}broken" >&6
2668         { echo "$as_me:2668: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2669 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2670         # humor him...
2671         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2672         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2673         CC="$cf_prog"
2674         for cf_arg in $cf_flags
2675         do
2676                 case "x$cf_arg" in
2677                 (x-[IUDfgOW]*)
2678
2679 cf_fix_cppflags=no
2680 cf_new_cflags=
2681 cf_new_cppflags=
2682 cf_new_extra_cppflags=
2683
2684 for cf_add_cflags in $cf_arg
2685 do
2686 case "$cf_fix_cppflags" in
2687 (no)
2688         case "$cf_add_cflags" in
2689         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2690                 case "$cf_add_cflags" in
2691                 (-D*)
2692                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2693
2694                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2695                                 && test -z "${cf_tst_cflags}" \
2696                                 && cf_fix_cppflags=yes
2697
2698                         if test "$cf_fix_cppflags" = yes ; then
2699
2700         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2701         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2702
2703                                 continue
2704                         elif test "${cf_tst_cflags}" = "\"'" ; then
2705
2706         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2707         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2708
2709                                 continue
2710                         fi
2711                         ;;
2712                 esac
2713                 case "$CPPFLAGS" in
2714                 (*$cf_add_cflags)
2715                         ;;
2716                 (*)
2717                         case "$cf_add_cflags" in
2718                         (-D*)
2719                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2720
2721 CPPFLAGS=`echo "$CPPFLAGS" | \
2722         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2723                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2724
2725                                 ;;
2726                         esac
2727
2728         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2729         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2730
2731                         ;;
2732                 esac
2733                 ;;
2734         (*)
2735
2736         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2737         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2738
2739                 ;;
2740         esac
2741         ;;
2742 (yes)
2743
2744         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2745         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2746
2747         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2748
2749         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2750                 && test -z "${cf_tst_cflags}" \
2751                 && cf_fix_cppflags=no
2752         ;;
2753 esac
2754 done
2755
2756 if test -n "$cf_new_cflags" ; then
2757
2758         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2759         CFLAGS="${CFLAGS}$cf_new_cflags"
2760
2761 fi
2762
2763 if test -n "$cf_new_cppflags" ; then
2764
2765         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2766         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2767
2768 fi
2769
2770 if test -n "$cf_new_extra_cppflags" ; then
2771
2772         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2773         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2774
2775 fi
2776
2777                         ;;
2778                 (*)
2779                         CC="$CC $cf_arg"
2780                         ;;
2781                 esac
2782         done
2783         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2784
2785 echo "${as_me:-configure}:2785: testing resulting CC: '$CC' ..." 1>&5
2786
2787         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2788
2789 echo "${as_me:-configure}:2789: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2790
2791         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2792
2793 echo "${as_me:-configure}:2793: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2794
2795         ;;
2796 (*)
2797         echo "$as_me:2797: result: ok" >&5
2798 echo "${ECHO_T}ok" >&6
2799         ;;
2800 esac
2801
2802 ac_ext=c
2803 ac_cpp='$CPP $CPPFLAGS'
2804 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2805 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2806 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2807 ac_main_return="return"
2808 echo "$as_me:2808: checking how to run the C preprocessor" >&5
2809 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2810 # On Suns, sometimes $CPP names a directory.
2811 if test -n "$CPP" && test -d "$CPP"; then
2812   CPP=
2813 fi
2814 if test -z "$CPP"; then
2815   if test "${ac_cv_prog_CPP+set}" = set; then
2816   echo $ECHO_N "(cached) $ECHO_C" >&6
2817 else
2818       # Double quotes because CPP needs to be expanded
2819     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2820     do
2821       ac_preproc_ok=false
2822 for ac_c_preproc_warn_flag in '' yes
2823 do
2824   # Use a header file that comes with gcc, so configuring glibc
2825   # with a fresh cross-compiler works.
2826   # On the NeXT, cc -E runs the code through the compiler's parser,
2827   # not just through cpp. "Syntax error" is here to catch this case.
2828   cat >"conftest.$ac_ext" <<_ACEOF
2829 #line 2829 "configure"
2830 #include "confdefs.h"
2831 #include <assert.h>
2832                      Syntax error
2833 _ACEOF
2834 if { (eval echo "$as_me:2834: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2835   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2836   ac_status=$?
2837   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2838   rm -f conftest.er1
2839   cat conftest.err >&5
2840   echo "$as_me:2840: \$? = $ac_status" >&5
2841   (exit "$ac_status"); } >/dev/null; then
2842   if test -s conftest.err; then
2843     ac_cpp_err=$ac_c_preproc_warn_flag
2844   else
2845     ac_cpp_err=
2846   fi
2847 else
2848   ac_cpp_err=yes
2849 fi
2850 if test -z "$ac_cpp_err"; then
2851   :
2852 else
2853   echo "$as_me: failed program was:" >&5
2854   cat "conftest.$ac_ext" >&5
2855   # Broken: fails on valid input.
2856 continue
2857 fi
2858 rm -f conftest.err "conftest.$ac_ext"
2859
2860   # OK, works on sane cases.  Now check whether non-existent headers
2861   # can be detected and how.
2862   cat >"conftest.$ac_ext" <<_ACEOF
2863 #line 2863 "configure"
2864 #include "confdefs.h"
2865 #include <ac_nonexistent.h>
2866 _ACEOF
2867 if { (eval echo "$as_me:2867: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2868   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2869   ac_status=$?
2870   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2871   rm -f conftest.er1
2872   cat conftest.err >&5
2873   echo "$as_me:2873: \$? = $ac_status" >&5
2874   (exit "$ac_status"); } >/dev/null; then
2875   if test -s conftest.err; then
2876     ac_cpp_err=$ac_c_preproc_warn_flag
2877   else
2878     ac_cpp_err=
2879   fi
2880 else
2881   ac_cpp_err=yes
2882 fi
2883 if test -z "$ac_cpp_err"; then
2884   # Broken: success on invalid input.
2885 continue
2886 else
2887   echo "$as_me: failed program was:" >&5
2888   cat "conftest.$ac_ext" >&5
2889   # Passes both tests.
2890 ac_preproc_ok=:
2891 break
2892 fi
2893 rm -f conftest.err "conftest.$ac_ext"
2894
2895 done
2896 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2897 rm -f conftest.err "conftest.$ac_ext"
2898 if $ac_preproc_ok; then
2899   break
2900 fi
2901
2902     done
2903     ac_cv_prog_CPP=$CPP
2904
2905 fi
2906   CPP=$ac_cv_prog_CPP
2907 else
2908   ac_cv_prog_CPP=$CPP
2909 fi
2910 echo "$as_me:2910: result: $CPP" >&5
2911 echo "${ECHO_T}$CPP" >&6
2912 ac_preproc_ok=false
2913 for ac_c_preproc_warn_flag in '' yes
2914 do
2915   # Use a header file that comes with gcc, so configuring glibc
2916   # with a fresh cross-compiler works.
2917   # On the NeXT, cc -E runs the code through the compiler's parser,
2918   # not just through cpp. "Syntax error" is here to catch this case.
2919   cat >"conftest.$ac_ext" <<_ACEOF
2920 #line 2920 "configure"
2921 #include "confdefs.h"
2922 #include <assert.h>
2923                      Syntax error
2924 _ACEOF
2925 if { (eval echo "$as_me:2925: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2926   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2927   ac_status=$?
2928   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2929   rm -f conftest.er1
2930   cat conftest.err >&5
2931   echo "$as_me:2931: \$? = $ac_status" >&5
2932   (exit "$ac_status"); } >/dev/null; then
2933   if test -s conftest.err; then
2934     ac_cpp_err=$ac_c_preproc_warn_flag
2935   else
2936     ac_cpp_err=
2937   fi
2938 else
2939   ac_cpp_err=yes
2940 fi
2941 if test -z "$ac_cpp_err"; then
2942   :
2943 else
2944   echo "$as_me: failed program was:" >&5
2945   cat "conftest.$ac_ext" >&5
2946   # Broken: fails on valid input.
2947 continue
2948 fi
2949 rm -f conftest.err "conftest.$ac_ext"
2950
2951   # OK, works on sane cases.  Now check whether non-existent headers
2952   # can be detected and how.
2953   cat >"conftest.$ac_ext" <<_ACEOF
2954 #line 2954 "configure"
2955 #include "confdefs.h"
2956 #include <ac_nonexistent.h>
2957 _ACEOF
2958 if { (eval echo "$as_me:2958: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2959   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2960   ac_status=$?
2961   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2962   rm -f conftest.er1
2963   cat conftest.err >&5
2964   echo "$as_me:2964: \$? = $ac_status" >&5
2965   (exit "$ac_status"); } >/dev/null; then
2966   if test -s conftest.err; then
2967     ac_cpp_err=$ac_c_preproc_warn_flag
2968   else
2969     ac_cpp_err=
2970   fi
2971 else
2972   ac_cpp_err=yes
2973 fi
2974 if test -z "$ac_cpp_err"; then
2975   # Broken: success on invalid input.
2976 continue
2977 else
2978   echo "$as_me: failed program was:" >&5
2979   cat "conftest.$ac_ext" >&5
2980   # Passes both tests.
2981 ac_preproc_ok=:
2982 break
2983 fi
2984 rm -f conftest.err "conftest.$ac_ext"
2985
2986 done
2987 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2988 rm -f conftest.err "conftest.$ac_ext"
2989 if $ac_preproc_ok; then
2990   :
2991 else
2992   { { echo "$as_me:2992: error: C preprocessor \"$CPP\" fails sanity check" >&5
2993 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2994    { (exit 1); exit 1; }; }
2995 fi
2996
2997 ac_ext=c
2998 ac_cpp='$CPP $CPPFLAGS'
2999 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3000 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3001 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3002 ac_main_return="return"
3003
3004 if test $ac_cv_c_compiler_gnu = yes; then
3005     echo "$as_me:3005: checking whether $CC needs -traditional" >&5
3006 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3007 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3008   echo $ECHO_N "(cached) $ECHO_C" >&6
3009 else
3010     ac_pattern="Autoconf.*'x'"
3011   cat >"conftest.$ac_ext" <<_ACEOF
3012 #line 3012 "configure"
3013 #include "confdefs.h"
3014 #include <sgtty.h>
3015 int Autoconf = TIOCGETP;
3016 _ACEOF
3017 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3018   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3019   ac_cv_prog_gcc_traditional=yes
3020 else
3021   ac_cv_prog_gcc_traditional=no
3022 fi
3023 rm -rf conftest*
3024
3025   if test $ac_cv_prog_gcc_traditional = no; then
3026     cat >"conftest.$ac_ext" <<_ACEOF
3027 #line 3027 "configure"
3028 #include "confdefs.h"
3029 #include <termio.h>
3030 int Autoconf = TCGETA;
3031 _ACEOF
3032 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3033   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3034   ac_cv_prog_gcc_traditional=yes
3035 fi
3036 rm -rf conftest*
3037
3038   fi
3039 fi
3040 echo "$as_me:3040: result: $ac_cv_prog_gcc_traditional" >&5
3041 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3042   if test $ac_cv_prog_gcc_traditional = yes; then
3043     CC="$CC -traditional"
3044   fi
3045 fi
3046
3047 echo "$as_me:3047: checking whether $CC understands -c and -o together" >&5
3048 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3049 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3050   echo $ECHO_N "(cached) $ECHO_C" >&6
3051 else
3052
3053 cat > conftest.$ac_ext <<CF_EOF
3054 int main(void)
3055 {
3056         ${cf_cv_main_return:-return}(0);
3057 }
3058 CF_EOF
3059 # We do the test twice because some compilers refuse to overwrite an
3060 # existing .o file with -o, though they will create one.
3061 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3062 if { (eval echo "$as_me:3062: \"$ac_try\"") >&5
3063   (eval $ac_try) 2>&5
3064   ac_status=$?
3065   echo "$as_me:3065: \$? = $ac_status" >&5
3066   (exit "$ac_status"); } &&
3067   test -f conftest2.$ac_objext && { (eval echo "$as_me:3067: \"$ac_try\"") >&5
3068   (eval $ac_try) 2>&5
3069   ac_status=$?
3070   echo "$as_me:3070: \$? = $ac_status" >&5
3071   (exit "$ac_status"); };
3072 then
3073   eval cf_cv_prog_CC_c_o=yes
3074 else
3075   eval cf_cv_prog_CC_c_o=no
3076 fi
3077 rm -rf ./conftest*
3078
3079 fi
3080 if test "$cf_cv_prog_CC_c_o" = yes; then
3081   echo "$as_me:3081: result: yes" >&5
3082 echo "${ECHO_T}yes" >&6
3083 else
3084   echo "$as_me:3084: result: no" >&5
3085 echo "${ECHO_T}no" >&6
3086 fi
3087
3088 if test "$cross_compiling" = yes ; then
3089         LDCONFIG=:
3090 else
3091         case "$cf_cv_system_name" in
3092         (dragonfly*|mirbsd*|freebsd*)
3093                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3094                 ;;
3095         (*) LDPATH=$PATH:/sbin:/usr/sbin
3096                 # Extract the first word of "ldconfig", so it can be a program name with args.
3097 set dummy ldconfig; ac_word=$2
3098 echo "$as_me:3098: checking for $ac_word" >&5
3099 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3100 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3101   echo $ECHO_N "(cached) $ECHO_C" >&6
3102 else
3103   case $LDCONFIG in
3104   [\\/]* | ?:[\\/]*)
3105   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3106   ;;
3107   *)
3108   ac_save_IFS=$IFS; IFS=$ac_path_separator
3109 ac_dummy="$LDPATH"
3110 for ac_dir in $ac_dummy; do
3111   IFS=$ac_save_IFS
3112   test -z "$ac_dir" && ac_dir=.
3113   if $as_executable_p "$ac_dir/$ac_word"; then
3114    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3115    echo "$as_me:3115: found $ac_dir/$ac_word" >&5
3116    break
3117 fi
3118 done
3119
3120   ;;
3121 esac
3122 fi
3123 LDCONFIG=$ac_cv_path_LDCONFIG
3124
3125 if test -n "$LDCONFIG"; then
3126   echo "$as_me:3126: result: $LDCONFIG" >&5
3127 echo "${ECHO_T}$LDCONFIG" >&6
3128 else
3129   echo "$as_me:3129: result: no" >&5
3130 echo "${ECHO_T}no" >&6
3131 fi
3132
3133                 ;;
3134         esac
3135 fi
3136
3137 echo "$as_me:3137: checking if you want to ensure bool is consistent with C++" >&5
3138 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3139
3140 # Check whether --with-cxx or --without-cxx was given.
3141 if test "${with_cxx+set}" = set; then
3142   withval="$with_cxx"
3143   cf_with_cxx=$withval
3144 else
3145   cf_with_cxx=yes
3146 fi;
3147 echo "$as_me:3147: result: $cf_with_cxx" >&5
3148 echo "${ECHO_T}$cf_with_cxx" >&6
3149 if test "X$cf_with_cxx" = Xno ; then
3150         CXX=""
3151         GXX=""
3152 else
3153         # with autoconf 2.13, we can change the error to a warning:
3154                 ac_ext=cc
3155 ac_cpp='$CXXCPP $CPPFLAGS'
3156 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3157 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3158 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3159 ac_main_return="return"
3160 if test -n "$ac_tool_prefix"; then
3161   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3162   do
3163     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3164 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3165 echo "$as_me:3165: checking for $ac_word" >&5
3166 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3167 if test "${ac_cv_prog_CXX+set}" = set; then
3168   echo $ECHO_N "(cached) $ECHO_C" >&6
3169 else
3170   if test -n "$CXX"; then
3171   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3172 else
3173   ac_save_IFS=$IFS; IFS=$ac_path_separator
3174 ac_dummy="$PATH"
3175 for ac_dir in $ac_dummy; do
3176   IFS=$ac_save_IFS
3177   test -z "$ac_dir" && ac_dir=.
3178   $as_executable_p "$ac_dir/$ac_word" || continue
3179 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3180 echo "$as_me:3180: found $ac_dir/$ac_word" >&5
3181 break
3182 done
3183
3184 fi
3185 fi
3186 CXX=$ac_cv_prog_CXX
3187 if test -n "$CXX"; then
3188   echo "$as_me:3188: result: $CXX" >&5
3189 echo "${ECHO_T}$CXX" >&6
3190 else
3191   echo "$as_me:3191: result: no" >&5
3192 echo "${ECHO_T}no" >&6
3193 fi
3194
3195     test -n "$CXX" && break
3196   done
3197 fi
3198 if test -z "$CXX"; then
3199   ac_ct_CXX=$CXX
3200   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3201 do
3202   # Extract the first word of "$ac_prog", so it can be a program name with args.
3203 set dummy $ac_prog; ac_word=$2
3204 echo "$as_me:3204: checking for $ac_word" >&5
3205 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3206 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3207   echo $ECHO_N "(cached) $ECHO_C" >&6
3208 else
3209   if test -n "$ac_ct_CXX"; then
3210   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3211 else
3212   ac_save_IFS=$IFS; IFS=$ac_path_separator
3213 ac_dummy="$PATH"
3214 for ac_dir in $ac_dummy; do
3215   IFS=$ac_save_IFS
3216   test -z "$ac_dir" && ac_dir=.
3217   $as_executable_p "$ac_dir/$ac_word" || continue
3218 ac_cv_prog_ac_ct_CXX="$ac_prog"
3219 echo "$as_me:3219: found $ac_dir/$ac_word" >&5
3220 break
3221 done
3222
3223 fi
3224 fi
3225 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3226 if test -n "$ac_ct_CXX"; then
3227   echo "$as_me:3227: result: $ac_ct_CXX" >&5
3228 echo "${ECHO_T}$ac_ct_CXX" >&6
3229 else
3230   echo "$as_me:3230: result: no" >&5
3231 echo "${ECHO_T}no" >&6
3232 fi
3233
3234   test -n "$ac_ct_CXX" && break
3235 done
3236 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3237
3238   CXX=$ac_ct_CXX
3239 fi
3240
3241 # Provide some information about the compiler.
3242 echo "$as_me:3242:" \
3243      "checking for C++ compiler version" >&5
3244 ac_compiler=`set X $ac_compile; echo $2`
3245 { (eval echo "$as_me:3245: \"$ac_compiler --version </dev/null >&5\"") >&5
3246   (eval $ac_compiler --version </dev/null >&5) 2>&5
3247   ac_status=$?
3248   echo "$as_me:3248: \$? = $ac_status" >&5
3249   (exit "$ac_status"); }
3250 { (eval echo "$as_me:3250: \"$ac_compiler -v </dev/null >&5\"") >&5
3251   (eval $ac_compiler -v </dev/null >&5) 2>&5
3252   ac_status=$?
3253   echo "$as_me:3253: \$? = $ac_status" >&5
3254   (exit "$ac_status"); }
3255 { (eval echo "$as_me:3255: \"$ac_compiler -V </dev/null >&5\"") >&5
3256   (eval $ac_compiler -V </dev/null >&5) 2>&5
3257   ac_status=$?
3258   echo "$as_me:3258: \$? = $ac_status" >&5
3259   (exit "$ac_status"); }
3260
3261 echo "$as_me:3261: checking whether we are using the GNU C++ compiler" >&5
3262 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3263 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3264   echo $ECHO_N "(cached) $ECHO_C" >&6
3265 else
3266   cat >"conftest.$ac_ext" <<_ACEOF
3267 #line 3267 "configure"
3268 #include "confdefs.h"
3269
3270 int
3271 main (void)
3272 {
3273 #ifndef __GNUC__
3274        choke me
3275 #endif
3276
3277   ;
3278   return 0;
3279 }
3280 _ACEOF
3281 rm -f "conftest.$ac_objext"
3282 if { (eval echo "$as_me:3282: \"$ac_compile\"") >&5
3283   (eval $ac_compile) 2>&5
3284   ac_status=$?
3285   echo "$as_me:3285: \$? = $ac_status" >&5
3286   (exit "$ac_status"); } &&
3287          { ac_try='test -s "conftest.$ac_objext"'
3288   { (eval echo "$as_me:3288: \"$ac_try\"") >&5
3289   (eval $ac_try) 2>&5
3290   ac_status=$?
3291   echo "$as_me:3291: \$? = $ac_status" >&5
3292   (exit "$ac_status"); }; }; then
3293   ac_compiler_gnu=yes
3294 else
3295   echo "$as_me: failed program was:" >&5
3296 cat "conftest.$ac_ext" >&5
3297 ac_compiler_gnu=no
3298 fi
3299 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3300 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3301
3302 fi
3303 echo "$as_me:3303: result: $ac_cv_cxx_compiler_gnu" >&5
3304 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3305 GXX=`test $ac_compiler_gnu = yes && echo yes`
3306 ac_test_CXXFLAGS=${CXXFLAGS+set}
3307 ac_save_CXXFLAGS=$CXXFLAGS
3308 CXXFLAGS="-g"
3309 echo "$as_me:3309: checking whether $CXX accepts -g" >&5
3310 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3311 if test "${ac_cv_prog_cxx_g+set}" = set; then
3312   echo $ECHO_N "(cached) $ECHO_C" >&6
3313 else
3314   cat >"conftest.$ac_ext" <<_ACEOF
3315 #line 3315 "configure"
3316 #include "confdefs.h"
3317
3318 int
3319 main (void)
3320 {
3321
3322   ;
3323   return 0;
3324 }
3325 _ACEOF
3326 rm -f "conftest.$ac_objext"
3327 if { (eval echo "$as_me:3327: \"$ac_compile\"") >&5
3328   (eval $ac_compile) 2>&5
3329   ac_status=$?
3330   echo "$as_me:3330: \$? = $ac_status" >&5
3331   (exit "$ac_status"); } &&
3332          { ac_try='test -s "conftest.$ac_objext"'
3333   { (eval echo "$as_me:3333: \"$ac_try\"") >&5
3334   (eval $ac_try) 2>&5
3335   ac_status=$?
3336   echo "$as_me:3336: \$? = $ac_status" >&5
3337   (exit "$ac_status"); }; }; then
3338   ac_cv_prog_cxx_g=yes
3339 else
3340   echo "$as_me: failed program was:" >&5
3341 cat "conftest.$ac_ext" >&5
3342 ac_cv_prog_cxx_g=no
3343 fi
3344 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3345 fi
3346 echo "$as_me:3346: result: $ac_cv_prog_cxx_g" >&5
3347 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3348 if test "$ac_test_CXXFLAGS" = set; then
3349   CXXFLAGS=$ac_save_CXXFLAGS
3350 elif test $ac_cv_prog_cxx_g = yes; then
3351   if test "$GXX" = yes; then
3352     CXXFLAGS="-g -O2"
3353   else
3354     CXXFLAGS="-g"
3355   fi
3356 else
3357   if test "$GXX" = yes; then
3358     CXXFLAGS="-O2"
3359   else
3360     CXXFLAGS=
3361   fi
3362 fi
3363 for ac_declaration in \
3364    ''\
3365    '#include <stdlib.h>' \
3366    'extern "C" void std::exit (int) throw (); using std::exit;' \
3367    'extern "C" void std::exit (int); using std::exit;' \
3368    'extern "C" void exit (int) throw ();' \
3369    'extern "C" void exit (int);' \
3370    'void exit (int);'
3371 do
3372   cat >"conftest.$ac_ext" <<_ACEOF
3373 #line 3373 "configure"
3374 #include "confdefs.h"
3375 #include <stdlib.h>
3376 $ac_declaration
3377 int
3378 main (void)
3379 {
3380 exit (42);
3381   ;
3382   return 0;
3383 }
3384 _ACEOF
3385 rm -f "conftest.$ac_objext"
3386 if { (eval echo "$as_me:3386: \"$ac_compile\"") >&5
3387   (eval $ac_compile) 2>&5
3388   ac_status=$?
3389   echo "$as_me:3389: \$? = $ac_status" >&5
3390   (exit "$ac_status"); } &&
3391          { ac_try='test -s "conftest.$ac_objext"'
3392   { (eval echo "$as_me:3392: \"$ac_try\"") >&5
3393   (eval $ac_try) 2>&5
3394   ac_status=$?
3395   echo "$as_me:3395: \$? = $ac_status" >&5
3396   (exit "$ac_status"); }; }; then
3397   :
3398 else
3399   echo "$as_me: failed program was:" >&5
3400 cat "conftest.$ac_ext" >&5
3401 continue
3402 fi
3403 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3404   cat >"conftest.$ac_ext" <<_ACEOF
3405 #line 3405 "configure"
3406 #include "confdefs.h"
3407 $ac_declaration
3408 int
3409 main (void)
3410 {
3411 exit (42);
3412   ;
3413   return 0;
3414 }
3415 _ACEOF
3416 rm -f "conftest.$ac_objext"
3417 if { (eval echo "$as_me:3417: \"$ac_compile\"") >&5
3418   (eval $ac_compile) 2>&5
3419   ac_status=$?
3420   echo "$as_me:3420: \$? = $ac_status" >&5
3421   (exit "$ac_status"); } &&
3422          { ac_try='test -s "conftest.$ac_objext"'
3423   { (eval echo "$as_me:3423: \"$ac_try\"") >&5
3424   (eval $ac_try) 2>&5
3425   ac_status=$?
3426   echo "$as_me:3426: \$? = $ac_status" >&5
3427   (exit "$ac_status"); }; }; then
3428   break
3429 else
3430   echo "$as_me: failed program was:" >&5
3431 cat "conftest.$ac_ext" >&5
3432 fi
3433 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3434 done
3435 rm -rf conftest*
3436 if test -n "$ac_declaration"; then
3437   echo '#ifdef __cplusplus' >>confdefs.h
3438   echo "$ac_declaration"    >>confdefs.h
3439   echo '#endif'             >>confdefs.h
3440 fi
3441
3442 ac_ext=c
3443 ac_cpp='$CPP $CPPFLAGS'
3444 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3445 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3446 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3447 ac_main_return="return"
3448
3449         ac_ext=cc
3450 ac_cpp='$CXXCPP $CPPFLAGS'
3451 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3452 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3453 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3454 ac_main_return="return"
3455
3456         if test "x$cf_with_cxx" != xno
3457         then
3458                 # Several of the C++ configurations do not work, particularly when
3459                 # cross-compiling (20140913 -TD)
3460                 echo "$as_me:3460: checking if $CXX works" >&5
3461 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3462
3463                 save_CPPFLAGS="$CPPFLAGS"
3464                 eval cf_includedir=${includedir}
3465                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3466
3467 cat >"conftest.$ac_ext" <<_ACEOF
3468 #line 3468 "configure"
3469 #include "confdefs.h"
3470
3471 #include <stdlib.h>
3472 #include <stdio.h>
3473
3474 int
3475 main (void)
3476 {
3477
3478                 printf("Hello world!\n")
3479
3480   ;
3481   return 0;
3482 }
3483 _ACEOF
3484 rm -f "conftest.$ac_objext"
3485 if { (eval echo "$as_me:3485: \"$ac_compile\"") >&5
3486   (eval $ac_compile) 2>&5
3487   ac_status=$?
3488   echo "$as_me:3488: \$? = $ac_status" >&5
3489   (exit "$ac_status"); } &&
3490          { ac_try='test -s "conftest.$ac_objext"'
3491   { (eval echo "$as_me:3491: \"$ac_try\"") >&5
3492   (eval $ac_try) 2>&5
3493   ac_status=$?
3494   echo "$as_me:3494: \$? = $ac_status" >&5
3495   (exit "$ac_status"); }; }; then
3496   cf_cxx_works=yes
3497 else
3498   echo "$as_me: failed program was:" >&5
3499 cat "conftest.$ac_ext" >&5
3500 cf_cxx_works=no
3501 fi
3502 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3503                 CPPFLAGS="$save_CPPFLAGS"
3504
3505                 echo "$as_me:3505: result: $cf_cxx_works" >&5
3506 echo "${ECHO_T}$cf_cxx_works" >&6
3507                 if test "x$cf_cxx_works" = xno
3508                 then
3509                         { echo "$as_me:3509: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3510 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3511                         cf_with_cxx=no; CXX=""; GXX="";
3512                 fi
3513         fi
3514         ac_ext=c
3515 ac_cpp='$CPP $CPPFLAGS'
3516 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3517 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3518 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3519 ac_main_return="return"
3520
3521         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3522         if test "$CXX" = "g++" ; then
3523                 # Extract the first word of "g++", so it can be a program name with args.
3524 set dummy g++; ac_word=$2
3525 echo "$as_me:3525: checking for $ac_word" >&5
3526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3527 if test "${ac_cv_path_CXX+set}" = set; then
3528   echo $ECHO_N "(cached) $ECHO_C" >&6
3529 else
3530   case $CXX in
3531   [\\/]* | ?:[\\/]*)
3532   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3533   ;;
3534   *)
3535   ac_save_IFS=$IFS; IFS=$ac_path_separator
3536 ac_dummy="$PATH"
3537 for ac_dir in $ac_dummy; do
3538   IFS=$ac_save_IFS
3539   test -z "$ac_dir" && ac_dir=.
3540   if $as_executable_p "$ac_dir/$ac_word"; then
3541    ac_cv_path_CXX="$ac_dir/$ac_word"
3542    echo "$as_me:3542: found $ac_dir/$ac_word" >&5
3543    break
3544 fi
3545 done
3546
3547   ;;
3548 esac
3549 fi
3550 CXX=$ac_cv_path_CXX
3551
3552 if test -n "$CXX"; then
3553   echo "$as_me:3553: result: $CXX" >&5
3554 echo "${ECHO_T}$CXX" >&6
3555 else
3556   echo "$as_me:3556: result: no" >&5
3557 echo "${ECHO_T}no" >&6
3558 fi
3559
3560         fi
3561         case "x$CXX" in
3562         (x|xg++)
3563                 { echo "$as_me:3563: WARNING: You don't have any C++ compiler, too bad" >&5
3564 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3565                 cf_with_cxx=no; CXX=""; GXX="";
3566                 ;;
3567         esac
3568 fi
3569
3570 GXX_VERSION=none
3571 if test "$GXX" = yes; then
3572         echo "$as_me:3572: checking version of ${CXX:-g++}" >&5
3573 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3574         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3575         if test -z "$GXX_VERSION"
3576         then
3577                 GXX_VERSION=unknown
3578                 GXX=no
3579         fi
3580         echo "$as_me:3580: result: $GXX_VERSION" >&5
3581 echo "${ECHO_T}$GXX_VERSION" >&6
3582 fi
3583
3584 case "$GXX_VERSION" in
3585 ([1-9][0-9].*)
3586         ;;
3587 (1.*|2.[0-6]*)
3588         { echo "$as_me:3588: WARNING: templates do not work" >&5
3589 echo "$as_me: WARNING: templates do not work" >&2;}
3590         ;;
3591 esac
3592
3593 echo "$as_me:3593: checking if you want to build C++ binding and demo" >&5
3594 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3595
3596 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3597 if test "${with_cxx_binding+set}" = set; then
3598   withval="$with_cxx_binding"
3599   cf_with_cxx_binding=$withval
3600 else
3601   cf_with_cxx_binding=$cf_with_cxx
3602 fi;
3603 echo "$as_me:3603: result: $cf_with_cxx_binding" >&5
3604 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3605
3606 echo "$as_me:3606: checking if you want to build with Ada" >&5
3607 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3608 echo "$as_me:3608: result: $cf_with_ada" >&5
3609 echo "${ECHO_T}$cf_with_ada" >&6
3610
3611 echo "$as_me:3611: checking if you want to install terminal database" >&5
3612 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3613
3614 # Check whether --enable-db-install or --disable-db-install was given.
3615 if test "${enable_db_install+set}" = set; then
3616   enableval="$enable_db_install"
3617   cf_with_db_install=$enableval
3618 else
3619   cf_with_db_install=yes
3620 fi;
3621 echo "$as_me:3621: result: $cf_with_db_install" >&5
3622 echo "${ECHO_T}$cf_with_db_install" >&6
3623
3624 echo "$as_me:3624: checking if you want to install manpages" >&5
3625 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3626
3627 # Check whether --with-manpages or --without-manpages was given.
3628 if test "${with_manpages+set}" = set; then
3629   withval="$with_manpages"
3630   cf_with_manpages=$withval
3631 else
3632   cf_with_manpages=yes
3633 fi;
3634 echo "$as_me:3634: result: $cf_with_manpages" >&5
3635 echo "${ECHO_T}$cf_with_manpages" >&6
3636
3637 echo "$as_me:3637: checking if you want to build programs such as tic" >&5
3638 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3639
3640 # Check whether --with-progs or --without-progs was given.
3641 if test "${with_progs+set}" = set; then
3642   withval="$with_progs"
3643   cf_with_progs=$withval
3644 else
3645   cf_with_progs=yes
3646 fi;
3647 echo "$as_me:3647: result: $cf_with_progs" >&5
3648 echo "${ECHO_T}$cf_with_progs" >&6
3649
3650 if test -f "$srcdir/tack/tack.h" ; then
3651         if test "x$cross_compiling" = xyes ; then
3652                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3653
3654 echo "${as_me:-configure}:3654: testing ignoring tack because we are cross-compiling ..." 1>&5
3655
3656                 cf_with_tack=no
3657         else
3658                 echo "$as_me:3658: checking if you want to build the tack program" >&5
3659 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3660
3661 # Check whether --with-tack or --without-tack was given.
3662 if test "${with_tack+set}" = set; then
3663   withval="$with_tack"
3664   cf_with_tack=$withval
3665 else
3666   cf_with_tack=$cf_with_progs
3667 fi;
3668                 echo "$as_me:3668: result: $cf_with_tack" >&5
3669 echo "${ECHO_T}$cf_with_tack" >&6
3670         fi
3671 else
3672         cf_with_tack=no
3673 fi
3674
3675 echo "$as_me:3675: checking if you want to build test-programs" >&5
3676 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3677
3678 # Check whether --with-tests or --without-tests was given.
3679 if test "${with_tests+set}" = set; then
3680   withval="$with_tests"
3681   cf_with_tests=$withval
3682 else
3683   cf_with_tests=yes
3684 fi;
3685 echo "$as_me:3685: result: $cf_with_tests" >&5
3686 echo "${ECHO_T}$cf_with_tests" >&6
3687
3688 echo "$as_me:3688: checking if you wish to install curses.h" >&5
3689 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3690
3691 # Check whether --with-curses-h or --without-curses-h was given.
3692 if test "${with_curses_h+set}" = set; then
3693   withval="$with_curses_h"
3694   with_curses_h=$withval
3695 else
3696   with_curses_h=yes
3697 fi;
3698 echo "$as_me:3698: result: $with_curses_h" >&5
3699 echo "${ECHO_T}$with_curses_h" >&6
3700
3701 modules_to_build="ncurses"
3702 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3703 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3704 modules_to_build="$modules_to_build panel menu form"
3705
3706 test "$program_prefix" != NONE &&
3707   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3708 # Use a double $ so make ignores it.
3709 test "$program_suffix" != NONE &&
3710   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3711 # Double any \ or $.  echo might interpret backslashes.
3712 # By default was `s,x,x', remove it if useless.
3713 cat <<\_ACEOF >conftest.sed
3714 s/[\\$]/&&/g;s/;s,x,x,$//
3715 _ACEOF
3716 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3717 rm conftest.sed
3718
3719 for ac_prog in mawk gawk nawk awk
3720 do
3721   # Extract the first word of "$ac_prog", so it can be a program name with args.
3722 set dummy $ac_prog; ac_word=$2
3723 echo "$as_me:3723: checking for $ac_word" >&5
3724 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3725 if test "${ac_cv_prog_AWK+set}" = set; then
3726   echo $ECHO_N "(cached) $ECHO_C" >&6
3727 else
3728   if test -n "$AWK"; then
3729   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3730 else
3731   ac_save_IFS=$IFS; IFS=$ac_path_separator
3732 ac_dummy="$PATH"
3733 for ac_dir in $ac_dummy; do
3734   IFS=$ac_save_IFS
3735   test -z "$ac_dir" && ac_dir=.
3736   $as_executable_p "$ac_dir/$ac_word" || continue
3737 ac_cv_prog_AWK="$ac_prog"
3738 echo "$as_me:3738: found $ac_dir/$ac_word" >&5
3739 break
3740 done
3741
3742 fi
3743 fi
3744 AWK=$ac_cv_prog_AWK
3745 if test -n "$AWK"; then
3746   echo "$as_me:3746: result: $AWK" >&5
3747 echo "${ECHO_T}$AWK" >&6
3748 else
3749   echo "$as_me:3749: result: no" >&5
3750 echo "${ECHO_T}no" >&6
3751 fi
3752
3753   test -n "$AWK" && break
3754 done
3755
3756 test -z "$AWK" && { { echo "$as_me:3756: error: No awk program found" >&5
3757 echo "$as_me: error: No awk program found" >&2;}
3758    { (exit 1); exit 1; }; }
3759
3760 # Find a good install program.  We prefer a C program (faster),
3761 # so one script is as good as another.  But avoid the broken or
3762 # incompatible versions:
3763 # SysV /etc/install, /usr/sbin/install
3764 # SunOS /usr/etc/install
3765 # IRIX /sbin/install
3766 # AIX /bin/install
3767 # AmigaOS /C/install, which installs bootblocks on floppy discs
3768 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3769 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3770 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3771 # ./install, which can be erroneously created by make from ./install.sh.
3772 echo "$as_me:3772: checking for a BSD compatible install" >&5
3773 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3774 if test -z "$INSTALL"; then
3775 if test "${ac_cv_path_install+set}" = set; then
3776   echo $ECHO_N "(cached) $ECHO_C" >&6
3777 else
3778     ac_save_IFS=$IFS; IFS=$ac_path_separator
3779   for ac_dir in $PATH; do
3780     IFS=$ac_save_IFS
3781     # Account for people who put trailing slashes in PATH elements.
3782     case $ac_dir/ in
3783     / | ./ | .// | /cC/* \
3784     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3785     | /usr/ucb/* ) ;;
3786     *)
3787       # OSF1 and SCO ODT 3.0 have their own names for install.
3788       # Don't use installbsd from OSF since it installs stuff as root
3789       # by default.
3790       for ac_prog in ginstall scoinst install; do
3791         if $as_executable_p "$ac_dir/$ac_prog"; then
3792           if test $ac_prog = install &&
3793             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3794             # AIX install.  It has an incompatible calling convention.
3795             :
3796           elif test $ac_prog = install &&
3797             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3798             # program-specific install script used by HP pwplus--don't use.
3799             :
3800           else
3801             ac_cv_path_install="$ac_dir/$ac_prog -c"
3802             break 2
3803           fi
3804         fi
3805       done
3806       ;;
3807     esac
3808   done
3809
3810 fi
3811   if test "${ac_cv_path_install+set}" = set; then
3812     INSTALL=$ac_cv_path_install
3813   else
3814     # As a last resort, use the slow shell script.  We don't cache a
3815     # path for INSTALL within a source directory, because that will
3816     # break other packages using the cache if that directory is
3817     # removed, or if the path is relative.
3818     INSTALL=$ac_install_sh
3819   fi
3820 fi
3821 echo "$as_me:3821: result: $INSTALL" >&5
3822 echo "${ECHO_T}$INSTALL" >&6
3823
3824 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3825 # It thinks the first close brace ends the variable substitution.
3826 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3827
3828 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3829
3830 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3831
3832 case $INSTALL in
3833 (/*)
3834         ;;
3835 (*)
3836         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3837         test -z "$cf_dir" && cf_dir=.
3838         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3839         ;;
3840 esac
3841
3842 for ac_prog in lint cppcheck splint
3843 do
3844   # Extract the first word of "$ac_prog", so it can be a program name with args.
3845 set dummy $ac_prog; ac_word=$2
3846 echo "$as_me:3846: checking for $ac_word" >&5
3847 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3848 if test "${ac_cv_prog_LINT+set}" = set; then
3849   echo $ECHO_N "(cached) $ECHO_C" >&6
3850 else
3851   if test -n "$LINT"; then
3852   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3853 else
3854   ac_save_IFS=$IFS; IFS=$ac_path_separator
3855 ac_dummy="$PATH"
3856 for ac_dir in $ac_dummy; do
3857   IFS=$ac_save_IFS
3858   test -z "$ac_dir" && ac_dir=.
3859   $as_executable_p "$ac_dir/$ac_word" || continue
3860 ac_cv_prog_LINT="$ac_prog"
3861 echo "$as_me:3861: found $ac_dir/$ac_word" >&5
3862 break
3863 done
3864
3865 fi
3866 fi
3867 LINT=$ac_cv_prog_LINT
3868 if test -n "$LINT"; then
3869   echo "$as_me:3869: result: $LINT" >&5
3870 echo "${ECHO_T}$LINT" >&6
3871 else
3872   echo "$as_me:3872: result: no" >&5
3873 echo "${ECHO_T}no" >&6
3874 fi
3875
3876   test -n "$LINT" && break
3877 done
3878
3879 case "x$LINT" in
3880 (xcppcheck|x*/cppcheck)
3881         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3882         ;;
3883 esac
3884
3885 echo "$as_me:3885: checking whether ln -s works" >&5
3886 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3887 LN_S=$as_ln_s
3888 if test "$LN_S" = "ln -s"; then
3889   echo "$as_me:3889: result: yes" >&5
3890 echo "${ECHO_T}yes" >&6
3891 else
3892   echo "$as_me:3892: result: no, using $LN_S" >&5
3893 echo "${ECHO_T}no, using $LN_S" >&6
3894 fi
3895
3896 echo "$as_me:3896: checking if $LN_S -f options work" >&5
3897 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3898
3899 rm -f conf$$.src conf$$dst
3900 echo >conf$$.dst
3901 echo first >conf$$.src
3902 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3903         cf_prog_ln_sf=yes
3904 else
3905         cf_prog_ln_sf=no
3906 fi
3907 rm -f conf$$.dst conf$$src
3908 echo "$as_me:3908: result: $cf_prog_ln_sf" >&5
3909 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3910
3911 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3912
3913 echo "$as_me:3913: checking for long file names" >&5
3914 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3915 if test "${ac_cv_sys_long_file_names+set}" = set; then
3916   echo $ECHO_N "(cached) $ECHO_C" >&6
3917 else
3918   ac_cv_sys_long_file_names=yes
3919 # Test for long file names in all the places we know might matter:
3920 #      .                the current directory, where building will happen
3921 #      $prefix/lib      where we will be installing things
3922 #      $exec_prefix/lib likewise
3923 # eval it to expand exec_prefix.
3924 #      $TMPDIR          if set, where it might want to write temporary files
3925 # if $TMPDIR is not set:
3926 #      /tmp             where it might want to write temporary files
3927 #      /var/tmp         likewise
3928 #      /usr/tmp         likewise
3929 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3930   ac_tmpdirs=$TMPDIR
3931 else
3932   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3933 fi
3934 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3935   test -d "$ac_dir" || continue
3936   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3937   ac_xdir=$ac_dir/cf$$
3938   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3939   ac_tf1=$ac_xdir/conftest9012345
3940   ac_tf2=$ac_xdir/conftest9012346
3941   (echo 1 >"$ac_tf1") 2>/dev/null
3942   (echo 2 >"$ac_tf2") 2>/dev/null
3943   ac_val=`cat "$ac_tf1" 2>/dev/null`
3944   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3945     ac_cv_sys_long_file_names=no
3946     rm -rf "$ac_xdir" 2>/dev/null
3947     break
3948   fi
3949   rm -rf "$ac_xdir" 2>/dev/null
3950 done
3951 fi
3952 echo "$as_me:3952: result: $ac_cv_sys_long_file_names" >&5
3953 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3954 if test "$ac_cv_sys_long_file_names" = yes; then
3955
3956 cat >>confdefs.h <<\EOF
3957 #define HAVE_LONG_FILE_NAMES 1
3958 EOF
3959
3960 fi
3961
3962 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3963 # of package conflict.
3964 cf_config_suffix=
3965
3966 # Check whether --with-config-suffix or --without-config-suffix was given.
3967 if test "${with_config_suffix+set}" = set; then
3968   withval="$with_config_suffix"
3969   case "x$withval" in
3970         (xyes|xno)
3971                 { echo "$as_me:3971: WARNING: expected a value for config-suffix option" >&5
3972 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3973                 ;;
3974         (*)     cf_config_suffix="$withval"
3975                 ;;
3976         esac
3977 fi;
3978
3979 # If we find pkg-config, check if we should install the ".pc" files.
3980
3981 echo "$as_me:3981: checking if you want to use pkg-config" >&5
3982 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3983
3984 # Check whether --with-pkg-config or --without-pkg-config was given.
3985 if test "${with_pkg_config+set}" = set; then
3986   withval="$with_pkg_config"
3987   cf_pkg_config=$withval
3988 else
3989   cf_pkg_config=yes
3990 fi;
3991 echo "$as_me:3991: result: $cf_pkg_config" >&5
3992 echo "${ECHO_T}$cf_pkg_config" >&6
3993
3994 case "$cf_pkg_config" in
3995 (no)
3996         PKG_CONFIG=none
3997         ;;
3998 (yes)
3999
4000 if test -n "$ac_tool_prefix"; then
4001   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4002 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4003 echo "$as_me:4003: checking for $ac_word" >&5
4004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4005 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4006   echo $ECHO_N "(cached) $ECHO_C" >&6
4007 else
4008   case $PKG_CONFIG in
4009   [\\/]* | ?:[\\/]*)
4010   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4011   ;;
4012   *)
4013   ac_save_IFS=$IFS; IFS=$ac_path_separator
4014 ac_dummy="$PATH"
4015 for ac_dir in $ac_dummy; do
4016   IFS=$ac_save_IFS
4017   test -z "$ac_dir" && ac_dir=.
4018   if $as_executable_p "$ac_dir/$ac_word"; then
4019    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4020    echo "$as_me:4020: found $ac_dir/$ac_word" >&5
4021    break
4022 fi
4023 done
4024
4025   ;;
4026 esac
4027 fi
4028 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4029
4030 if test -n "$PKG_CONFIG"; then
4031   echo "$as_me:4031: result: $PKG_CONFIG" >&5
4032 echo "${ECHO_T}$PKG_CONFIG" >&6
4033 else
4034   echo "$as_me:4034: result: no" >&5
4035 echo "${ECHO_T}no" >&6
4036 fi
4037
4038 fi
4039 if test -z "$ac_cv_path_PKG_CONFIG"; then
4040   ac_pt_PKG_CONFIG=$PKG_CONFIG
4041   # Extract the first word of "pkg-config", so it can be a program name with args.
4042 set dummy pkg-config; ac_word=$2
4043 echo "$as_me:4043: checking for $ac_word" >&5
4044 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4045 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4046   echo $ECHO_N "(cached) $ECHO_C" >&6
4047 else
4048   case $ac_pt_PKG_CONFIG in
4049   [\\/]* | ?:[\\/]*)
4050   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4051   ;;
4052   *)
4053   ac_save_IFS=$IFS; IFS=$ac_path_separator
4054 ac_dummy="$PATH"
4055 for ac_dir in $ac_dummy; do
4056   IFS=$ac_save_IFS
4057   test -z "$ac_dir" && ac_dir=.
4058   if $as_executable_p "$ac_dir/$ac_word"; then
4059    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4060    echo "$as_me:4060: found $ac_dir/$ac_word" >&5
4061    break
4062 fi
4063 done
4064
4065   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4066   ;;
4067 esac
4068 fi
4069 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4070
4071 if test -n "$ac_pt_PKG_CONFIG"; then
4072   echo "$as_me:4072: result: $ac_pt_PKG_CONFIG" >&5
4073 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4074 else
4075   echo "$as_me:4075: result: no" >&5
4076 echo "${ECHO_T}no" >&6
4077 fi
4078
4079   PKG_CONFIG=$ac_pt_PKG_CONFIG
4080 else
4081   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4082 fi
4083
4084         ;;
4085 (*)
4086         PKG_CONFIG=$withval
4087         ;;
4088 esac
4089
4090 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4091 if test "$PKG_CONFIG" != none ; then
4092
4093 if test "x$prefix" != xNONE; then
4094         cf_path_syntax="$prefix"
4095 else
4096         cf_path_syntax="$ac_default_prefix"
4097 fi
4098
4099 case ".$PKG_CONFIG" in
4100 (.\$\(*\)*|.\'*\'*)
4101         ;;
4102 (..|./*|.\\*)
4103         ;;
4104 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4105         ;;
4106 (.\$\{*prefix\}*|.\$\{*dir\}*)
4107         eval PKG_CONFIG="$PKG_CONFIG"
4108         case ".$PKG_CONFIG" in
4109         (.NONE/*)
4110                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4111                 ;;
4112         esac
4113         ;;
4114 (.no|.NONE/*)
4115         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4116         ;;
4117 (*)
4118         { { echo "$as_me:4118: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4119 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4120    { (exit 1); exit 1; }; }
4121         ;;
4122 esac
4123
4124 elif test "x$cf_pkg_config" != xno ; then
4125         { echo "$as_me:4125: WARNING: pkg-config is not installed" >&5
4126 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4127 fi
4128
4129 case "$PKG_CONFIG" in
4130 (no|none|yes)
4131         echo "$as_me:4131: checking for pkg-config library directory" >&5
4132 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4133         ;;
4134 (*)
4135         echo "$as_me:4135: checking for $PKG_CONFIG library directory" >&5
4136 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4137         ;;
4138 esac
4139
4140 PKG_CONFIG_LIBDIR=no
4141
4142 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4143 if test "${with_pkg_config_libdir+set}" = set; then
4144   withval="$with_pkg_config_libdir"
4145   PKG_CONFIG_LIBDIR=$withval
4146 else
4147   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
4148 fi;
4149
4150 case x$PKG_CONFIG_LIBDIR in
4151 (x/*)
4152         ;;
4153 (xyes)
4154         # Look for the library directory using the same prefix as the executable
4155         if test "x$PKG_CONFIG" = xnone
4156         then
4157                 cf_path=$prefix
4158         else
4159                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
4160         fi
4161
4162         # If you don't like using the default architecture, you have to specify the
4163         # intended library directory and corresponding compiler/linker options.
4164         #
4165         # This case allows for Debian's 2014-flavor of multiarch, along with the
4166         # most common variations before that point.  Some other variants spell the
4167         # directory differently, e.g., "pkg-config", and put it in unusual places.
4168         # pkg-config has always been poorly standardized, which is ironic...
4169         case x`(arch) 2>/dev/null` in
4170         (*64)
4171                 cf_search_path="\
4172                         $cf_path/lib/*64-linux-gnu \
4173                         $cf_path/share \
4174                         $cf_path/lib64 \
4175                         $cf_path/lib32 \
4176                         $cf_path/lib"
4177                 ;;
4178         (*)
4179                 cf_search_path="\
4180                         $cf_path/lib/*-linux-gnu \
4181                         $cf_path/share \
4182                         $cf_path/lib32 \
4183                         $cf_path/lib \
4184                         $cf_path/libdata"
4185                 ;;
4186         esac
4187
4188         test -n "$verbose" && echo "    list..." 1>&6
4189
4190 echo "${as_me:-configure}:4190: testing list... ..." 1>&5
4191
4192         for cf_config in $cf_search_path
4193         do
4194                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
4195
4196 echo "${as_me:-configure}:4196: testing checking $cf_config/pkgconfig ..." 1>&5
4197
4198                 if test -d "$cf_config/pkgconfig"
4199                 then
4200                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
4201                         echo "$as_me:4201: checking done" >&5
4202 echo $ECHO_N "checking done... $ECHO_C" >&6
4203                         break
4204                 fi
4205         done
4206         ;;
4207 (*)
4208         ;;
4209 esac
4210
4211 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4212         echo "$as_me:4212: result: $PKG_CONFIG_LIBDIR" >&5
4213 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4214 fi
4215
4216 if test "x$PKG_CONFIG" != xnone
4217 then
4218         echo "$as_me:4218: checking if we should install .pc files for $PKG_CONFIG" >&5
4219 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4220 else
4221         echo "$as_me:4221: checking if we should install .pc files" >&5
4222 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4223 fi
4224
4225 # Check whether --enable-pc-files or --disable-pc-files was given.
4226 if test "${enable_pc_files+set}" = set; then
4227   enableval="$enable_pc_files"
4228   enable_pc_files=$enableval
4229 else
4230   enable_pc_files=no
4231 fi;
4232 echo "$as_me:4232: result: $enable_pc_files" >&5
4233 echo "${ECHO_T}$enable_pc_files" >&6
4234
4235 if test "x$enable_pc_files" != xno
4236 then
4237         MAKE_PC_FILES=
4238         case "x$PKG_CONFIG_LIBDIR" in
4239         (xno|xyes)
4240                 { echo "$as_me:4240: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4241 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4242                 ;;
4243         (*)
4244
4245 if test "x$prefix" != xNONE; then
4246         cf_path_syntax="$prefix"
4247 else
4248         cf_path_syntax="$ac_default_prefix"
4249 fi
4250
4251 case ".$PKG_CONFIG_LIBDIR" in
4252 (.\$\(*\)*|.\'*\'*)
4253         ;;
4254 (..|./*|.\\*)
4255         ;;
4256 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4257         ;;
4258 (.\$\{*prefix\}*|.\$\{*dir\}*)
4259         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4260         case ".$PKG_CONFIG_LIBDIR" in
4261         (.NONE/*)
4262                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4263                 ;;
4264         esac
4265         ;;
4266 (.no|.NONE/*)
4267         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4268         ;;
4269 (*)
4270         { { echo "$as_me:4270: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4271 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4272    { (exit 1); exit 1; }; }
4273         ;;
4274 esac
4275
4276                 ;;
4277         esac
4278 else
4279         MAKE_PC_FILES="#"
4280 fi
4281
4282 if test -z "$MAKE_PC_FILES"
4283 then
4284         echo "$as_me:4284: checking for suffix to add to pc-files" >&5
4285 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4286
4287 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4288 if test "${with_pc_suffix+set}" = set; then
4289   withval="$with_pc_suffix"
4290   case "x$withval" in
4291         (xyes|xno)
4292                 PC_MODULE_SUFFIX=
4293                 ;;
4294         (*)     PC_MODULE_SUFFIX="$withval"
4295                 ;;
4296         esac
4297 fi;
4298         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4299         echo "$as_me:4299: result: $PC_MODULE_SUFFIX" >&5
4300 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4301         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4302
4303 fi
4304
4305 echo "$as_me:4305: checking if we should assume mixed-case filenames" >&5
4306 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4307
4308 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4309 if test "${enable_mixed_case+set}" = set; then
4310   enableval="$enable_mixed_case"
4311   enable_mixedcase=$enableval
4312 else
4313   enable_mixedcase=auto
4314 fi;
4315 echo "$as_me:4315: result: $enable_mixedcase" >&5
4316 echo "${ECHO_T}$enable_mixedcase" >&6
4317 if test "$enable_mixedcase" = "auto" ; then
4318
4319 echo "$as_me:4319: checking if filesystem supports mixed-case filenames" >&5
4320 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4321 if test "${cf_cv_mixedcase+set}" = set; then
4322   echo $ECHO_N "(cached) $ECHO_C" >&6
4323 else
4324
4325 if test "$cross_compiling" = yes ; then
4326         case "$target_alias" in
4327         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4328                 cf_cv_mixedcase=no
4329                 ;;
4330         (*)
4331                 cf_cv_mixedcase=yes
4332                 ;;
4333         esac
4334 else
4335         rm -f conftest CONFTEST
4336         echo test >conftest
4337         if test -f CONFTEST ; then
4338                 cf_cv_mixedcase=no
4339         else
4340                 cf_cv_mixedcase=yes
4341         fi
4342         rm -f conftest CONFTEST
4343 fi
4344
4345 fi
4346 echo "$as_me:4346: result: $cf_cv_mixedcase" >&5
4347 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4348 test "$cf_cv_mixedcase" = yes &&
4349 cat >>confdefs.h <<\EOF
4350 #define MIXEDCASE_FILENAMES 1
4351 EOF
4352
4353 else
4354         cf_cv_mixedcase=$enable_mixedcase
4355         if test "x$enable_mixedcase" = "xyes" ; then
4356
4357 cat >>confdefs.h <<\EOF
4358 #define MIXEDCASE_FILENAMES 1
4359 EOF
4360
4361         fi
4362 fi
4363
4364 # do this after mixed-case option (tags/TAGS is not as important as tic).
4365 echo "$as_me:4365: checking whether ${MAKE-make} sets \${MAKE}" >&5
4366 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4367 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4368 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4369   echo $ECHO_N "(cached) $ECHO_C" >&6
4370 else
4371   cat >conftest.make <<\EOF
4372 all:
4373         @echo 'ac_maketemp="${MAKE}"'
4374 EOF
4375 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4376 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4377 if test -n "$ac_maketemp"; then
4378   eval ac_cv_prog_make_${ac_make}_set=yes
4379 else
4380   eval ac_cv_prog_make_${ac_make}_set=no
4381 fi
4382 rm -f conftest.make
4383 fi
4384 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4385   echo "$as_me:4385: result: yes" >&5
4386 echo "${ECHO_T}yes" >&6
4387   SET_MAKE=
4388 else
4389   echo "$as_me:4389: result: no" >&5
4390 echo "${ECHO_T}no" >&6
4391   SET_MAKE="MAKE=${MAKE-make}"
4392 fi
4393
4394 for ac_prog in exctags ctags
4395 do
4396   # Extract the first word of "$ac_prog", so it can be a program name with args.
4397 set dummy $ac_prog; ac_word=$2
4398 echo "$as_me:4398: checking for $ac_word" >&5
4399 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4400 if test "${ac_cv_prog_CTAGS+set}" = set; then
4401   echo $ECHO_N "(cached) $ECHO_C" >&6
4402 else
4403   if test -n "$CTAGS"; then
4404   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4405 else
4406   ac_save_IFS=$IFS; IFS=$ac_path_separator
4407 ac_dummy="$PATH"
4408 for ac_dir in $ac_dummy; do
4409   IFS=$ac_save_IFS
4410   test -z "$ac_dir" && ac_dir=.
4411   $as_executable_p "$ac_dir/$ac_word" || continue
4412 ac_cv_prog_CTAGS="$ac_prog"
4413 echo "$as_me:4413: found $ac_dir/$ac_word" >&5
4414 break
4415 done
4416
4417 fi
4418 fi
4419 CTAGS=$ac_cv_prog_CTAGS
4420 if test -n "$CTAGS"; then
4421   echo "$as_me:4421: result: $CTAGS" >&5
4422 echo "${ECHO_T}$CTAGS" >&6
4423 else
4424   echo "$as_me:4424: result: no" >&5
4425 echo "${ECHO_T}no" >&6
4426 fi
4427
4428   test -n "$CTAGS" && break
4429 done
4430
4431 for ac_prog in exetags etags
4432 do
4433   # Extract the first word of "$ac_prog", so it can be a program name with args.
4434 set dummy $ac_prog; ac_word=$2
4435 echo "$as_me:4435: checking for $ac_word" >&5
4436 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4437 if test "${ac_cv_prog_ETAGS+set}" = set; then
4438   echo $ECHO_N "(cached) $ECHO_C" >&6
4439 else
4440   if test -n "$ETAGS"; then
4441   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4442 else
4443   ac_save_IFS=$IFS; IFS=$ac_path_separator
4444 ac_dummy="$PATH"
4445 for ac_dir in $ac_dummy; do
4446   IFS=$ac_save_IFS
4447   test -z "$ac_dir" && ac_dir=.
4448   $as_executable_p "$ac_dir/$ac_word" || continue
4449 ac_cv_prog_ETAGS="$ac_prog"
4450 echo "$as_me:4450: found $ac_dir/$ac_word" >&5
4451 break
4452 done
4453
4454 fi
4455 fi
4456 ETAGS=$ac_cv_prog_ETAGS
4457 if test -n "$ETAGS"; then
4458   echo "$as_me:4458: result: $ETAGS" >&5
4459 echo "${ECHO_T}$ETAGS" >&6
4460 else
4461   echo "$as_me:4461: result: no" >&5
4462 echo "${ECHO_T}no" >&6
4463 fi
4464
4465   test -n "$ETAGS" && break
4466 done
4467
4468 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4469 set dummy ${CTAGS:-ctags}; ac_word=$2
4470 echo "$as_me:4470: checking for $ac_word" >&5
4471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4472 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4473   echo $ECHO_N "(cached) $ECHO_C" >&6
4474 else
4475   if test -n "$MAKE_LOWER_TAGS"; then
4476   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4477 else
4478   ac_save_IFS=$IFS; IFS=$ac_path_separator
4479 ac_dummy="$PATH"
4480 for ac_dir in $ac_dummy; do
4481   IFS=$ac_save_IFS
4482   test -z "$ac_dir" && ac_dir=.
4483   $as_executable_p "$ac_dir/$ac_word" || continue
4484 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4485 echo "$as_me:4485: found $ac_dir/$ac_word" >&5
4486 break
4487 done
4488
4489   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4490 fi
4491 fi
4492 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4493 if test -n "$MAKE_LOWER_TAGS"; then
4494   echo "$as_me:4494: result: $MAKE_LOWER_TAGS" >&5
4495 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4496 else
4497   echo "$as_me:4497: result: no" >&5
4498 echo "${ECHO_T}no" >&6
4499 fi
4500
4501 if test "$cf_cv_mixedcase" = yes ; then
4502         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4503 set dummy ${ETAGS:-etags}; ac_word=$2
4504 echo "$as_me:4504: checking for $ac_word" >&5
4505 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4506 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4507   echo $ECHO_N "(cached) $ECHO_C" >&6
4508 else
4509   if test -n "$MAKE_UPPER_TAGS"; then
4510   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4511 else
4512   ac_save_IFS=$IFS; IFS=$ac_path_separator
4513 ac_dummy="$PATH"
4514 for ac_dir in $ac_dummy; do
4515   IFS=$ac_save_IFS
4516   test -z "$ac_dir" && ac_dir=.
4517   $as_executable_p "$ac_dir/$ac_word" || continue
4518 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4519 echo "$as_me:4519: found $ac_dir/$ac_word" >&5
4520 break
4521 done
4522
4523   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4524 fi
4525 fi
4526 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4527 if test -n "$MAKE_UPPER_TAGS"; then
4528   echo "$as_me:4528: result: $MAKE_UPPER_TAGS" >&5
4529 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4530 else
4531   echo "$as_me:4531: result: no" >&5
4532 echo "${ECHO_T}no" >&6
4533 fi
4534
4535 else
4536         MAKE_UPPER_TAGS=no
4537 fi
4538
4539 if test "$MAKE_UPPER_TAGS" = yes ; then
4540         MAKE_UPPER_TAGS=
4541 else
4542         MAKE_UPPER_TAGS="#"
4543 fi
4544
4545 if test "$MAKE_LOWER_TAGS" = yes ; then
4546         MAKE_LOWER_TAGS=
4547 else
4548         MAKE_LOWER_TAGS="#"
4549 fi
4550
4551 echo "$as_me:4551: checking for makeflags variable" >&5
4552 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4553 if test "${cf_cv_makeflags+set}" = set; then
4554   echo $ECHO_N "(cached) $ECHO_C" >&6
4555 else
4556
4557         cf_cv_makeflags=''
4558         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4559         do
4560                 cat >cf_makeflags.tmp <<CF_EOF
4561 SHELL = $SHELL
4562 all :
4563         @ echo '.$cf_option'
4564 CF_EOF
4565                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4566                 case "$cf_result" in
4567                 (.*k|.*kw)
4568                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4569                         case "$cf_result" in
4570                         (.*CC=*)        cf_cv_makeflags=
4571                                 ;;
4572                         (*)     cf_cv_makeflags=$cf_option
4573                                 ;;
4574                         esac
4575                         break
4576                         ;;
4577                 (.-)
4578                         ;;
4579                 (*)
4580
4581 echo "${as_me:-configure}:4581: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4582
4583                         ;;
4584                 esac
4585         done
4586         rm -f cf_makeflags.tmp
4587
4588 fi
4589 echo "$as_me:4589: result: $cf_cv_makeflags" >&5
4590 echo "${ECHO_T}$cf_cv_makeflags" >&6
4591
4592 if test -n "$ac_tool_prefix"; then
4593   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4594 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4595 echo "$as_me:4595: checking for $ac_word" >&5
4596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4597 if test "${ac_cv_prog_RANLIB+set}" = set; then
4598   echo $ECHO_N "(cached) $ECHO_C" >&6
4599 else
4600   if test -n "$RANLIB"; then
4601   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4602 else
4603   ac_save_IFS=$IFS; IFS=$ac_path_separator
4604 ac_dummy="$PATH"
4605 for ac_dir in $ac_dummy; do
4606   IFS=$ac_save_IFS
4607   test -z "$ac_dir" && ac_dir=.
4608   $as_executable_p "$ac_dir/$ac_word" || continue
4609 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4610 echo "$as_me:4610: found $ac_dir/$ac_word" >&5
4611 break
4612 done
4613
4614 fi
4615 fi
4616 RANLIB=$ac_cv_prog_RANLIB
4617 if test -n "$RANLIB"; then
4618   echo "$as_me:4618: result: $RANLIB" >&5
4619 echo "${ECHO_T}$RANLIB" >&6
4620 else
4621   echo "$as_me:4621: result: no" >&5
4622 echo "${ECHO_T}no" >&6
4623 fi
4624
4625 fi
4626 if test -z "$ac_cv_prog_RANLIB"; then
4627   ac_ct_RANLIB=$RANLIB
4628   # Extract the first word of "ranlib", so it can be a program name with args.
4629 set dummy ranlib; ac_word=$2
4630 echo "$as_me:4630: checking for $ac_word" >&5
4631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4632 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4633   echo $ECHO_N "(cached) $ECHO_C" >&6
4634 else
4635   if test -n "$ac_ct_RANLIB"; then
4636   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4637 else
4638   ac_save_IFS=$IFS; IFS=$ac_path_separator
4639 ac_dummy="$PATH"
4640 for ac_dir in $ac_dummy; do
4641   IFS=$ac_save_IFS
4642   test -z "$ac_dir" && ac_dir=.
4643   $as_executable_p "$ac_dir/$ac_word" || continue
4644 ac_cv_prog_ac_ct_RANLIB="ranlib"
4645 echo "$as_me:4645: found $ac_dir/$ac_word" >&5
4646 break
4647 done
4648
4649   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4650 fi
4651 fi
4652 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4653 if test -n "$ac_ct_RANLIB"; then
4654   echo "$as_me:4654: result: $ac_ct_RANLIB" >&5
4655 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4656 else
4657   echo "$as_me:4657: result: no" >&5
4658 echo "${ECHO_T}no" >&6
4659 fi
4660
4661   RANLIB=$ac_ct_RANLIB
4662 else
4663   RANLIB="$ac_cv_prog_RANLIB"
4664 fi
4665
4666 if test -n "$ac_tool_prefix"; then
4667   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4668 set dummy ${ac_tool_prefix}ld; ac_word=$2
4669 echo "$as_me:4669: checking for $ac_word" >&5
4670 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4671 if test "${ac_cv_prog_LD+set}" = set; then
4672   echo $ECHO_N "(cached) $ECHO_C" >&6
4673 else
4674   if test -n "$LD"; then
4675   ac_cv_prog_LD="$LD" # Let the user override the test.
4676 else
4677   ac_save_IFS=$IFS; IFS=$ac_path_separator
4678 ac_dummy="$PATH"
4679 for ac_dir in $ac_dummy; do
4680   IFS=$ac_save_IFS
4681   test -z "$ac_dir" && ac_dir=.
4682   $as_executable_p "$ac_dir/$ac_word" || continue
4683 ac_cv_prog_LD="${ac_tool_prefix}ld"
4684 echo "$as_me:4684: found $ac_dir/$ac_word" >&5
4685 break
4686 done
4687
4688 fi
4689 fi
4690 LD=$ac_cv_prog_LD
4691 if test -n "$LD"; then
4692   echo "$as_me:4692: result: $LD" >&5
4693 echo "${ECHO_T}$LD" >&6
4694 else
4695   echo "$as_me:4695: result: no" >&5
4696 echo "${ECHO_T}no" >&6
4697 fi
4698
4699 fi
4700 if test -z "$ac_cv_prog_LD"; then
4701   ac_ct_LD=$LD
4702   # Extract the first word of "ld", so it can be a program name with args.
4703 set dummy ld; ac_word=$2
4704 echo "$as_me:4704: checking for $ac_word" >&5
4705 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4706 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4707   echo $ECHO_N "(cached) $ECHO_C" >&6
4708 else
4709   if test -n "$ac_ct_LD"; then
4710   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4711 else
4712   ac_save_IFS=$IFS; IFS=$ac_path_separator
4713 ac_dummy="$PATH"
4714 for ac_dir in $ac_dummy; do
4715   IFS=$ac_save_IFS
4716   test -z "$ac_dir" && ac_dir=.
4717   $as_executable_p "$ac_dir/$ac_word" || continue
4718 ac_cv_prog_ac_ct_LD="ld"
4719 echo "$as_me:4719: found $ac_dir/$ac_word" >&5
4720 break
4721 done
4722
4723   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4724 fi
4725 fi
4726 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4727 if test -n "$ac_ct_LD"; then
4728   echo "$as_me:4728: result: $ac_ct_LD" >&5
4729 echo "${ECHO_T}$ac_ct_LD" >&6
4730 else
4731   echo "$as_me:4731: result: no" >&5
4732 echo "${ECHO_T}no" >&6
4733 fi
4734
4735   LD=$ac_ct_LD
4736 else
4737   LD="$ac_cv_prog_LD"
4738 fi
4739
4740 if test -n "$ac_tool_prefix"; then
4741   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4742 set dummy ${ac_tool_prefix}ar; ac_word=$2
4743 echo "$as_me:4743: checking for $ac_word" >&5
4744 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4745 if test "${ac_cv_prog_AR+set}" = set; then
4746   echo $ECHO_N "(cached) $ECHO_C" >&6
4747 else
4748   if test -n "$AR"; then
4749   ac_cv_prog_AR="$AR" # Let the user override the test.
4750 else
4751   ac_save_IFS=$IFS; IFS=$ac_path_separator
4752 ac_dummy="$PATH"
4753 for ac_dir in $ac_dummy; do
4754   IFS=$ac_save_IFS
4755   test -z "$ac_dir" && ac_dir=.
4756   $as_executable_p "$ac_dir/$ac_word" || continue
4757 ac_cv_prog_AR="${ac_tool_prefix}ar"
4758 echo "$as_me:4758: found $ac_dir/$ac_word" >&5
4759 break
4760 done
4761
4762 fi
4763 fi
4764 AR=$ac_cv_prog_AR
4765 if test -n "$AR"; then
4766   echo "$as_me:4766: result: $AR" >&5
4767 echo "${ECHO_T}$AR" >&6
4768 else
4769   echo "$as_me:4769: result: no" >&5
4770 echo "${ECHO_T}no" >&6
4771 fi
4772
4773 fi
4774 if test -z "$ac_cv_prog_AR"; then
4775   ac_ct_AR=$AR
4776   # Extract the first word of "ar", so it can be a program name with args.
4777 set dummy ar; ac_word=$2
4778 echo "$as_me:4778: checking for $ac_word" >&5
4779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4780 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4781   echo $ECHO_N "(cached) $ECHO_C" >&6
4782 else
4783   if test -n "$ac_ct_AR"; then
4784   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4785 else
4786   ac_save_IFS=$IFS; IFS=$ac_path_separator
4787 ac_dummy="$PATH"
4788 for ac_dir in $ac_dummy; do
4789   IFS=$ac_save_IFS
4790   test -z "$ac_dir" && ac_dir=.
4791   $as_executable_p "$ac_dir/$ac_word" || continue
4792 ac_cv_prog_ac_ct_AR="ar"
4793 echo "$as_me:4793: found $ac_dir/$ac_word" >&5
4794 break
4795 done
4796
4797   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4798 fi
4799 fi
4800 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4801 if test -n "$ac_ct_AR"; then
4802   echo "$as_me:4802: result: $ac_ct_AR" >&5
4803 echo "${ECHO_T}$ac_ct_AR" >&6
4804 else
4805   echo "$as_me:4805: result: no" >&5
4806 echo "${ECHO_T}no" >&6
4807 fi
4808
4809   AR=$ac_ct_AR
4810 else
4811   AR="$ac_cv_prog_AR"
4812 fi
4813
4814 if test -n "$ac_tool_prefix"; then
4815   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4816 set dummy ${ac_tool_prefix}nm; ac_word=$2
4817 echo "$as_me:4817: checking for $ac_word" >&5
4818 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4819 if test "${ac_cv_prog_NM+set}" = set; then
4820   echo $ECHO_N "(cached) $ECHO_C" >&6
4821 else
4822   if test -n "$NM"; then
4823   ac_cv_prog_NM="$NM" # Let the user override the test.
4824 else
4825   ac_save_IFS=$IFS; IFS=$ac_path_separator
4826 ac_dummy="$PATH"
4827 for ac_dir in $ac_dummy; do
4828   IFS=$ac_save_IFS
4829   test -z "$ac_dir" && ac_dir=.
4830   $as_executable_p "$ac_dir/$ac_word" || continue
4831 ac_cv_prog_NM="${ac_tool_prefix}nm"
4832 echo "$as_me:4832: found $ac_dir/$ac_word" >&5
4833 break
4834 done
4835
4836 fi
4837 fi
4838 NM=$ac_cv_prog_NM
4839 if test -n "$NM"; then
4840   echo "$as_me:4840: result: $NM" >&5
4841 echo "${ECHO_T}$NM" >&6
4842 else
4843   echo "$as_me:4843: result: no" >&5
4844 echo "${ECHO_T}no" >&6
4845 fi
4846
4847 fi
4848 if test -z "$ac_cv_prog_NM"; then
4849   ac_ct_NM=$NM
4850   # Extract the first word of "nm", so it can be a program name with args.
4851 set dummy nm; ac_word=$2
4852 echo "$as_me:4852: checking for $ac_word" >&5
4853 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4854 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4855   echo $ECHO_N "(cached) $ECHO_C" >&6
4856 else
4857   if test -n "$ac_ct_NM"; then
4858   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4859 else
4860   ac_save_IFS=$IFS; IFS=$ac_path_separator
4861 ac_dummy="$PATH"
4862 for ac_dir in $ac_dummy; do
4863   IFS=$ac_save_IFS
4864   test -z "$ac_dir" && ac_dir=.
4865   $as_executable_p "$ac_dir/$ac_word" || continue
4866 ac_cv_prog_ac_ct_NM="nm"
4867 echo "$as_me:4867: found $ac_dir/$ac_word" >&5
4868 break
4869 done
4870
4871   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4872 fi
4873 fi
4874 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4875 if test -n "$ac_ct_NM"; then
4876   echo "$as_me:4876: result: $ac_ct_NM" >&5
4877 echo "${ECHO_T}$ac_ct_NM" >&6
4878 else
4879   echo "$as_me:4879: result: no" >&5
4880 echo "${ECHO_T}no" >&6
4881 fi
4882
4883   NM=$ac_ct_NM
4884 else
4885   NM="$ac_cv_prog_NM"
4886 fi
4887
4888 if test -n "$ac_tool_prefix"; then
4889   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4890 set dummy ${ac_tool_prefix}ar; ac_word=$2
4891 echo "$as_me:4891: checking for $ac_word" >&5
4892 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4893 if test "${ac_cv_prog_AR+set}" = set; then
4894   echo $ECHO_N "(cached) $ECHO_C" >&6
4895 else
4896   if test -n "$AR"; then
4897   ac_cv_prog_AR="$AR" # Let the user override the test.
4898 else
4899   ac_save_IFS=$IFS; IFS=$ac_path_separator
4900 ac_dummy="$PATH"
4901 for ac_dir in $ac_dummy; do
4902   IFS=$ac_save_IFS
4903   test -z "$ac_dir" && ac_dir=.
4904   $as_executable_p "$ac_dir/$ac_word" || continue
4905 ac_cv_prog_AR="${ac_tool_prefix}ar"
4906 echo "$as_me:4906: found $ac_dir/$ac_word" >&5
4907 break
4908 done
4909
4910 fi
4911 fi
4912 AR=$ac_cv_prog_AR
4913 if test -n "$AR"; then
4914   echo "$as_me:4914: result: $AR" >&5
4915 echo "${ECHO_T}$AR" >&6
4916 else
4917   echo "$as_me:4917: result: no" >&5
4918 echo "${ECHO_T}no" >&6
4919 fi
4920
4921 fi
4922 if test -z "$ac_cv_prog_AR"; then
4923   ac_ct_AR=$AR
4924   # Extract the first word of "ar", so it can be a program name with args.
4925 set dummy ar; ac_word=$2
4926 echo "$as_me:4926: checking for $ac_word" >&5
4927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4928 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4929   echo $ECHO_N "(cached) $ECHO_C" >&6
4930 else
4931   if test -n "$ac_ct_AR"; then
4932   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4933 else
4934   ac_save_IFS=$IFS; IFS=$ac_path_separator
4935 ac_dummy="$PATH"
4936 for ac_dir in $ac_dummy; do
4937   IFS=$ac_save_IFS
4938   test -z "$ac_dir" && ac_dir=.
4939   $as_executable_p "$ac_dir/$ac_word" || continue
4940 ac_cv_prog_ac_ct_AR="ar"
4941 echo "$as_me:4941: found $ac_dir/$ac_word" >&5
4942 break
4943 done
4944
4945   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4946 fi
4947 fi
4948 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4949 if test -n "$ac_ct_AR"; then
4950   echo "$as_me:4950: result: $ac_ct_AR" >&5
4951 echo "${ECHO_T}$ac_ct_AR" >&6
4952 else
4953   echo "$as_me:4953: result: no" >&5
4954 echo "${ECHO_T}no" >&6
4955 fi
4956
4957   AR=$ac_ct_AR
4958 else
4959   AR="$ac_cv_prog_AR"
4960 fi
4961
4962 echo "$as_me:4962: checking for options to update archives" >&5
4963 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4964 if test "${cf_cv_ar_flags+set}" = set; then
4965   echo $ECHO_N "(cached) $ECHO_C" >&6
4966 else
4967
4968         case "$cf_cv_system_name" in
4969         (*-msvc*)
4970                 cf_cv_ar_flags=''
4971                 cat >mk_static_lib.sh <<-EOF
4972                 #!$SHELL
4973                 MSVC_BIN="$AR"
4974                 out="\$1"
4975                 shift
4976                 exec \$MSVC_BIN -out:"\$out" \$@
4977                 EOF
4978                 chmod +x mk_static_lib.sh
4979                 AR=`pwd`/mk_static_lib.sh
4980                 ;;
4981         (*)
4982                 cf_cv_ar_flags=unknown
4983                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4984                 do
4985
4986                         # check if $ARFLAGS already contains this choice
4987                         if test "x$ARFLAGS" != "x" ; then
4988                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4989                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4990                                         cf_cv_ar_flags=
4991                                         break
4992                                 fi
4993                         fi
4994
4995                         rm -f "conftest.$ac_cv_objext"
4996                         rm -f conftest.a
4997
4998                         cat >"conftest.$ac_ext" <<EOF
4999 #line 4999 "configure"
5000 int     testdata[3] = { 123, 456, 789 };
5001 EOF
5002                         if { (eval echo "$as_me:5002: \"$ac_compile\"") >&5
5003   (eval $ac_compile) 2>&5
5004   ac_status=$?
5005   echo "$as_me:5005: \$? = $ac_status" >&5
5006   (exit "$ac_status"); } ; then
5007                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5008                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5009                                 if test -f conftest.a ; then
5010                                         cf_cv_ar_flags="$cf_ar_flags"
5011                                         break
5012                                 fi
5013                         else
5014                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5015
5016 echo "${as_me:-configure}:5016: testing cannot compile test-program ..." 1>&5
5017
5018                                 break
5019                         fi
5020                 done
5021                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5022                 ;;
5023         esac
5024
5025 fi
5026 echo "$as_me:5026: result: $cf_cv_ar_flags" >&5
5027 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5028
5029 if test -n "$ARFLAGS" ; then
5030         if test -n "$cf_cv_ar_flags" ; then
5031                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5032         fi
5033 else
5034         ARFLAGS=$cf_cv_ar_flags
5035 fi
5036
5037 echo "$as_me:5037: checking if you have specified an install-prefix" >&5
5038 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5039
5040 # Check whether --with-install-prefix or --without-install-prefix was given.
5041 if test "${with_install_prefix+set}" = set; then
5042   withval="$with_install_prefix"
5043   case "x$withval" in
5044         (xyes|xno)
5045                 ;;
5046         (*)     DESTDIR="$withval"
5047                 ;;
5048         esac
5049 fi;
5050 echo "$as_me:5050: result: $DESTDIR" >&5
5051 echo "${ECHO_T}$DESTDIR" >&6
5052
5053 ###############################################################################
5054
5055 # If we're cross-compiling, allow the user to override the tools and their
5056 # options.  The configure script is oriented toward identifying the host
5057 # compiler, etc., but we need a build compiler to generate parts of the source.
5058
5059 case "$cf_cv_system_name" in
5060 (*-msvc*)
5061         LDFLAGS="$LDFLAGS user32.lib"
5062         export LDFLAGS
5063         ;;
5064 esac
5065
5066 if test "$cross_compiling" = yes ; then
5067
5068         # defaults that we might want to override
5069         : ${BUILD_CFLAGS:=''}
5070         : ${BUILD_CPPFLAGS:=''}
5071         : ${BUILD_LDFLAGS:=''}
5072         : ${BUILD_LIBS:=''}
5073         : ${BUILD_EXEEXT:='$x'}
5074         : ${BUILD_OBJEXT:='o'}
5075
5076 # Check whether --with-build-cc or --without-build-cc was given.
5077 if test "${with_build_cc+set}" = set; then
5078   withval="$with_build_cc"
5079   BUILD_CC="$withval"
5080 else
5081   for ac_prog in gcc clang c99 c89 cc cl
5082 do
5083   # Extract the first word of "$ac_prog", so it can be a program name with args.
5084 set dummy $ac_prog; ac_word=$2
5085 echo "$as_me:5085: checking for $ac_word" >&5
5086 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5087 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5088   echo $ECHO_N "(cached) $ECHO_C" >&6
5089 else
5090   if test -n "$BUILD_CC"; then
5091   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5092 else
5093   ac_save_IFS=$IFS; IFS=$ac_path_separator
5094 ac_dummy="$PATH"
5095 for ac_dir in $ac_dummy; do
5096   IFS=$ac_save_IFS
5097   test -z "$ac_dir" && ac_dir=.
5098   $as_executable_p "$ac_dir/$ac_word" || continue
5099 ac_cv_prog_BUILD_CC="$ac_prog"
5100 echo "$as_me:5100: found $ac_dir/$ac_word" >&5
5101 break
5102 done
5103
5104 fi
5105 fi
5106 BUILD_CC=$ac_cv_prog_BUILD_CC
5107 if test -n "$BUILD_CC"; then
5108   echo "$as_me:5108: result: $BUILD_CC" >&5
5109 echo "${ECHO_T}$BUILD_CC" >&6
5110 else
5111   echo "$as_me:5111: result: no" >&5
5112 echo "${ECHO_T}no" >&6
5113 fi
5114
5115   test -n "$BUILD_CC" && break
5116 done
5117 test -n "$BUILD_CC" || BUILD_CC="none"
5118
5119 fi;
5120         echo "$as_me:5120: checking for native build C compiler" >&5
5121 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5122         echo "$as_me:5122: result: $BUILD_CC" >&5
5123 echo "${ECHO_T}$BUILD_CC" >&6
5124
5125         echo "$as_me:5125: checking for native build C preprocessor" >&5
5126 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5127
5128 # Check whether --with-build-cpp or --without-build-cpp was given.
5129 if test "${with_build_cpp+set}" = set; then
5130   withval="$with_build_cpp"
5131   BUILD_CPP="$withval"
5132 else
5133   BUILD_CPP='${BUILD_CC} -E'
5134 fi;
5135         echo "$as_me:5135: result: $BUILD_CPP" >&5
5136 echo "${ECHO_T}$BUILD_CPP" >&6
5137
5138         echo "$as_me:5138: checking for native build C flags" >&5
5139 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5140
5141 # Check whether --with-build-cflags or --without-build-cflags was given.
5142 if test "${with_build_cflags+set}" = set; then
5143   withval="$with_build_cflags"
5144   BUILD_CFLAGS="$withval"
5145 fi;
5146         echo "$as_me:5146: result: $BUILD_CFLAGS" >&5
5147 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5148
5149         echo "$as_me:5149: checking for native build C preprocessor-flags" >&5
5150 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5151
5152 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5153 if test "${with_build_cppflags+set}" = set; then
5154   withval="$with_build_cppflags"
5155   BUILD_CPPFLAGS="$withval"
5156 fi;
5157         echo "$as_me:5157: result: $BUILD_CPPFLAGS" >&5
5158 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5159
5160         echo "$as_me:5160: checking for native build linker-flags" >&5
5161 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5162
5163 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5164 if test "${with_build_ldflags+set}" = set; then
5165   withval="$with_build_ldflags"
5166   BUILD_LDFLAGS="$withval"
5167 fi;
5168         echo "$as_me:5168: result: $BUILD_LDFLAGS" >&5
5169 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5170
5171         echo "$as_me:5171: checking for native build linker-libraries" >&5
5172 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5173
5174 # Check whether --with-build-libs or --without-build-libs was given.
5175 if test "${with_build_libs+set}" = set; then
5176   withval="$with_build_libs"
5177   BUILD_LIBS="$withval"
5178 fi;
5179         echo "$as_me:5179: result: $BUILD_LIBS" >&5
5180 echo "${ECHO_T}$BUILD_LIBS" >&6
5181
5182         # this assumes we're on Unix.
5183         BUILD_EXEEXT=
5184         BUILD_OBJEXT=o
5185
5186         : ${BUILD_CC:='${CC}'}
5187
5188         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5189                 { { echo "$as_me:5189: error: Cross-build requires two compilers.
5190 Use --with-build-cc to specify the native compiler." >&5
5191 echo "$as_me: error: Cross-build requires two compilers.
5192 Use --with-build-cc to specify the native compiler." >&2;}
5193    { (exit 1); exit 1; }; }
5194         fi
5195
5196 else
5197         : ${BUILD_CC:='${CC}'}
5198         : ${BUILD_CPP:='${CPP}'}
5199         : ${BUILD_CFLAGS:='${CFLAGS}'}
5200         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5201         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5202         : ${BUILD_LIBS:='${LIBS}'}
5203         : ${BUILD_EXEEXT:='$x'}
5204         : ${BUILD_OBJEXT:='o'}
5205 fi
5206
5207 ###############################################################################
5208
5209 ### Options to allow the user to specify the set of libraries which are used.
5210 ### Use "--without-normal --with-shared" to allow the default model to be
5211 ### shared, for example.
5212 cf_list_models=""
5213
5214 echo "$as_me:5214: checking if libtool -version-number should be used" >&5
5215 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5216
5217 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5218 if test "${enable_libtool_version+set}" = set; then
5219   enableval="$enable_libtool_version"
5220   test "$enableval" != no && enableval=yes
5221         if test "$enableval" != "yes" ; then
5222     cf_libtool_version=no
5223         else
5224                 cf_libtool_version=yes
5225         fi
5226 else
5227   enableval=yes
5228         cf_libtool_version=yes
5229
5230 fi;
5231 echo "$as_me:5231: result: $cf_libtool_version" >&5
5232 echo "${ECHO_T}$cf_libtool_version" >&6
5233
5234 if test "$cf_libtool_version" = yes ; then
5235         LIBTOOL_VERSION="-version-number"
5236 else
5237         LIBTOOL_VERSION="-version-info"
5238         case "x$VERSION" in
5239         (x)
5240                 { echo "$as_me:5240: WARNING: VERSION was not set" >&5
5241 echo "$as_me: WARNING: VERSION was not set" >&2;}
5242                 ;;
5243         (x*.*.*)
5244                 ABI_VERSION="$VERSION"
5245                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5246
5247 echo "${as_me:-configure}:5247: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5248
5249                 ;;
5250         (x*:*:*)
5251                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5252                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5253
5254 echo "${as_me:-configure}:5254: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5255
5256                 ;;
5257         (*)
5258                 { echo "$as_me:5258: WARNING: unexpected VERSION value: $VERSION" >&5
5259 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5260                 ;;
5261         esac
5262 fi
5263
5264 LIBTOOL=
5265
5266 # common library maintenance symbols that are convenient for libtool scripts:
5267 LIB_CREATE='${AR} -cr'
5268 LIB_OBJECT='${OBJECTS}'
5269 LIB_SUFFIX=.a
5270 LIB_PREP="$RANLIB"
5271
5272 # symbols used to prop libtool up to enable it to determine what it should be
5273 # doing:
5274 LIB_CLEAN=
5275 LIB_COMPILE=
5276 LIB_LINK='${CC}'
5277 LIB_INSTALL=
5278 LIB_UNINSTALL=
5279
5280 echo "$as_me:5280: checking if you want to build libraries with libtool" >&5
5281 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5282
5283 # Check whether --with-libtool or --without-libtool was given.
5284 if test "${with_libtool+set}" = set; then
5285   withval="$with_libtool"
5286   with_libtool=$withval
5287 else
5288   with_libtool=no
5289 fi;
5290 echo "$as_me:5290: result: $with_libtool" >&5
5291 echo "${ECHO_T}$with_libtool" >&6
5292 if test "$with_libtool" != "no"; then
5293
5294         if test "$with_libtool" != "yes" ; then
5295
5296 if test "x$prefix" != xNONE; then
5297         cf_path_syntax="$prefix"
5298 else
5299         cf_path_syntax="$ac_default_prefix"
5300 fi
5301
5302 case ".$with_libtool" in
5303 (.\$\(*\)*|.\'*\'*)
5304         ;;
5305 (..|./*|.\\*)
5306         ;;
5307 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5308         ;;
5309 (.\$\{*prefix\}*|.\$\{*dir\}*)
5310         eval with_libtool="$with_libtool"
5311         case ".$with_libtool" in
5312         (.NONE/*)
5313                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5314                 ;;
5315         esac
5316         ;;
5317 (.no|.NONE/*)
5318         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5319         ;;
5320 (*)
5321         { { echo "$as_me:5321: error: expected a pathname, not \"$with_libtool\"" >&5
5322 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5323    { (exit 1); exit 1; }; }
5324         ;;
5325 esac
5326
5327                 LIBTOOL=$with_libtool
5328         else
5329                 if test -n "$ac_tool_prefix"; then
5330   for ac_prog in libtool glibtool
5331   do
5332     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5333 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5334 echo "$as_me:5334: checking for $ac_word" >&5
5335 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5336 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5337   echo $ECHO_N "(cached) $ECHO_C" >&6
5338 else
5339   if test -n "$LIBTOOL"; then
5340   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5341 else
5342   ac_save_IFS=$IFS; IFS=$ac_path_separator
5343 ac_dummy="$PATH"
5344 for ac_dir in $ac_dummy; do
5345   IFS=$ac_save_IFS
5346   test -z "$ac_dir" && ac_dir=.
5347   $as_executable_p "$ac_dir/$ac_word" || continue
5348 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5349 echo "$as_me:5349: found $ac_dir/$ac_word" >&5
5350 break
5351 done
5352
5353 fi
5354 fi
5355 LIBTOOL=$ac_cv_prog_LIBTOOL
5356 if test -n "$LIBTOOL"; then
5357   echo "$as_me:5357: result: $LIBTOOL" >&5
5358 echo "${ECHO_T}$LIBTOOL" >&6
5359 else
5360   echo "$as_me:5360: result: no" >&5
5361 echo "${ECHO_T}no" >&6
5362 fi
5363
5364     test -n "$LIBTOOL" && break
5365   done
5366 fi
5367 if test -z "$LIBTOOL"; then
5368   ac_ct_LIBTOOL=$LIBTOOL
5369   for ac_prog in libtool glibtool
5370 do
5371   # Extract the first word of "$ac_prog", so it can be a program name with args.
5372 set dummy $ac_prog; ac_word=$2
5373 echo "$as_me:5373: checking for $ac_word" >&5
5374 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5375 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5376   echo $ECHO_N "(cached) $ECHO_C" >&6
5377 else
5378   if test -n "$ac_ct_LIBTOOL"; then
5379   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5380 else
5381   ac_save_IFS=$IFS; IFS=$ac_path_separator
5382 ac_dummy="$PATH"
5383 for ac_dir in $ac_dummy; do
5384   IFS=$ac_save_IFS
5385   test -z "$ac_dir" && ac_dir=.
5386   $as_executable_p "$ac_dir/$ac_word" || continue
5387 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5388 echo "$as_me:5388: found $ac_dir/$ac_word" >&5
5389 break
5390 done
5391
5392 fi
5393 fi
5394 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5395 if test -n "$ac_ct_LIBTOOL"; then
5396   echo "$as_me:5396: result: $ac_ct_LIBTOOL" >&5
5397 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5398 else
5399   echo "$as_me:5399: result: no" >&5
5400 echo "${ECHO_T}no" >&6
5401 fi
5402
5403   test -n "$ac_ct_LIBTOOL" && break
5404 done
5405 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5406
5407   LIBTOOL=$ac_ct_LIBTOOL
5408 fi
5409
5410 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5411 then
5412         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.].*//'`
5413 else
5414         cf_cv_libtool_version=
5415 fi
5416 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5417
5418                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5419                 then
5420
5421 unset ac_cv_prog_ac_ct_LIBTOOL
5422 unset ac_ct_LIBTOOL
5423 unset LIBTOOL
5424
5425                         if test -n "$ac_tool_prefix"; then
5426   for ac_prog in glibtool
5427   do
5428     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5429 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5430 echo "$as_me:5430: checking for $ac_word" >&5
5431 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5432 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5433   echo $ECHO_N "(cached) $ECHO_C" >&6
5434 else
5435   if test -n "$LIBTOOL"; then
5436   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5437 else
5438   ac_save_IFS=$IFS; IFS=$ac_path_separator
5439 ac_dummy="$PATH"
5440 for ac_dir in $ac_dummy; do
5441   IFS=$ac_save_IFS
5442   test -z "$ac_dir" && ac_dir=.
5443   $as_executable_p "$ac_dir/$ac_word" || continue
5444 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5445 echo "$as_me:5445: found $ac_dir/$ac_word" >&5
5446 break
5447 done
5448
5449 fi
5450 fi
5451 LIBTOOL=$ac_cv_prog_LIBTOOL
5452 if test -n "$LIBTOOL"; then
5453   echo "$as_me:5453: result: $LIBTOOL" >&5
5454 echo "${ECHO_T}$LIBTOOL" >&6
5455 else
5456   echo "$as_me:5456: result: no" >&5
5457 echo "${ECHO_T}no" >&6
5458 fi
5459
5460     test -n "$LIBTOOL" && break
5461   done
5462 fi
5463 if test -z "$LIBTOOL"; then
5464   ac_ct_LIBTOOL=$LIBTOOL
5465   for ac_prog in glibtool
5466 do
5467   # Extract the first word of "$ac_prog", so it can be a program name with args.
5468 set dummy $ac_prog; ac_word=$2
5469 echo "$as_me:5469: checking for $ac_word" >&5
5470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5471 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5472   echo $ECHO_N "(cached) $ECHO_C" >&6
5473 else
5474   if test -n "$ac_ct_LIBTOOL"; then
5475   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5476 else
5477   ac_save_IFS=$IFS; IFS=$ac_path_separator
5478 ac_dummy="$PATH"
5479 for ac_dir in $ac_dummy; do
5480   IFS=$ac_save_IFS
5481   test -z "$ac_dir" && ac_dir=.
5482   $as_executable_p "$ac_dir/$ac_word" || continue
5483 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5484 echo "$as_me:5484: found $ac_dir/$ac_word" >&5
5485 break
5486 done
5487
5488 fi
5489 fi
5490 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5491 if test -n "$ac_ct_LIBTOOL"; then
5492   echo "$as_me:5492: result: $ac_ct_LIBTOOL" >&5
5493 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5494 else
5495   echo "$as_me:5495: result: no" >&5
5496 echo "${ECHO_T}no" >&6
5497 fi
5498
5499   test -n "$ac_ct_LIBTOOL" && break
5500 done
5501 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5502
5503   LIBTOOL=$ac_ct_LIBTOOL
5504 fi
5505
5506 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5507 then
5508         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.].*//'`
5509 else
5510         cf_cv_libtool_version=
5511 fi
5512 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5513
5514                 fi
5515         fi
5516         if test -z "$LIBTOOL" ; then
5517                 { { echo "$as_me:5517: error: Cannot find libtool" >&5
5518 echo "$as_me: error: Cannot find libtool" >&2;}
5519    { (exit 1); exit 1; }; }
5520         fi
5521         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5522         LIB_OBJECT='${OBJECTS:.o=.lo}'
5523         LIB_SUFFIX=.la
5524         LIB_CLEAN='${LIBTOOL} --mode=clean'
5525         LIB_COMPILE='${LIBTOOL} --mode=compile'
5526         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5527         LIB_INSTALL='${LIBTOOL} --mode=install'
5528         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5529         LIB_PREP=:
5530
5531 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5532 then
5533         echo "$as_me:5533: checking version of $LIBTOOL" >&5
5534 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5535
5536 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5537 then
5538         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.].*//'`
5539 else
5540         cf_cv_libtool_version=
5541 fi
5542 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5543
5544         echo "$as_me:5544: result: $cf_cv_libtool_version" >&5
5545 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5546         if test -n "$cf_cv_libtool_version"
5547         then
5548                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5549                 case "x$cf_check_libtool_version" in
5550                 (*...GNU-libtool...*)
5551                         ;;
5552                 (*)
5553                         { { echo "$as_me:5553: error: This is not GNU libtool" >&5
5554 echo "$as_me: error: This is not GNU libtool" >&2;}
5555    { (exit 1); exit 1; }; }
5556                         ;;
5557                 esac
5558         else
5559                 { { echo "$as_me:5559: error: No version found for $LIBTOOL" >&5
5560 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5561    { (exit 1); exit 1; }; }
5562         fi
5563 else
5564         { { echo "$as_me:5564: error: GNU libtool has not been found" >&5
5565 echo "$as_me: error: GNU libtool has not been found" >&2;}
5566    { (exit 1); exit 1; }; }
5567 fi
5568
5569         # special hack to add -no-undefined (which libtool should do for itself)
5570         LT_UNDEF=
5571         case "$cf_cv_system_name" in
5572         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5573                 LT_UNDEF=-no-undefined
5574                 ;;
5575         esac
5576
5577         # special hack to add --tag option for C++ compiler
5578         case "$cf_cv_libtool_version" in
5579         (1.[5-9]*|[2-9].[0-9.a-z]*)
5580                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5581                 LIBTOOL="$LIBTOOL --tag=CC"
5582                 ;;
5583         (*)
5584                 LIBTOOL_CXX="$LIBTOOL"
5585                 ;;
5586         esac
5587 else
5588         LIBTOOL=""
5589         LIBTOOL_CXX=""
5590 fi
5591
5592 test -z "$LIBTOOL" && ECHO_LT=
5593
5594 if test "$with_libtool" != "no" ; then
5595
5596 cf_list_models="$cf_list_models libtool"
5597
5598 else
5599
5600 echo "$as_me:5600: checking if you want to build shared libraries" >&5
5601 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5602
5603 # Check whether --with-shared or --without-shared was given.
5604 if test "${with_shared+set}" = set; then
5605   withval="$with_shared"
5606   with_shared=$withval
5607 else
5608   with_shared=no
5609 fi;
5610 echo "$as_me:5610: result: $with_shared" >&5
5611 echo "${ECHO_T}$with_shared" >&6
5612 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5613
5614 echo "$as_me:5614: checking if you want to build static libraries" >&5
5615 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5616
5617 # Check whether --with-normal or --without-normal was given.
5618 if test "${with_normal+set}" = set; then
5619   withval="$with_normal"
5620   with_normal=$withval
5621 else
5622   with_normal=yes
5623 fi;
5624 echo "$as_me:5624: result: $with_normal" >&5
5625 echo "${ECHO_T}$with_normal" >&6
5626 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5627
5628 echo "$as_me:5628: checking if you want to build debug libraries" >&5
5629 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5630
5631 # Check whether --with-debug or --without-debug was given.
5632 if test "${with_debug+set}" = set; then
5633   withval="$with_debug"
5634   with_debug=$withval
5635 else
5636   with_debug=yes
5637 fi;
5638 echo "$as_me:5638: result: $with_debug" >&5
5639 echo "${ECHO_T}$with_debug" >&6
5640 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5641
5642 echo "$as_me:5642: checking if you want to build profiling libraries" >&5
5643 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5644
5645 # Check whether --with-profile or --without-profile was given.
5646 if test "${with_profile+set}" = set; then
5647   withval="$with_profile"
5648   with_profile=$withval
5649 else
5650   with_profile=no
5651 fi;
5652 echo "$as_me:5652: result: $with_profile" >&5
5653 echo "${ECHO_T}$with_profile" >&6
5654 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5655
5656 fi
5657
5658 if test "X$cf_with_cxx_binding" != Xno; then
5659 if test "x$with_shared" = "xyes"; then
5660 echo "$as_me:5660: checking if you want to build C++ shared libraries" >&5
5661 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5662
5663 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5664 if test "${with_cxx_shared+set}" = set; then
5665   withval="$with_cxx_shared"
5666   with_shared_cxx=$withval
5667 else
5668   with_shared_cxx=no
5669 fi;
5670 echo "$as_me:5670: result: $with_shared_cxx" >&5
5671 echo "${ECHO_T}$with_shared_cxx" >&6
5672 fi
5673 fi
5674
5675 ###############################################################################
5676
5677 echo "$as_me:5677: checking for specified models" >&5
5678 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5679 test -z "$cf_list_models" && cf_list_models=normal
5680 test "$with_libtool" != "no" && cf_list_models=libtool
5681 echo "$as_me:5681: result: $cf_list_models" >&5
5682 echo "${ECHO_T}$cf_list_models" >&6
5683
5684 ### Use the first model as the default, and save its suffix for use in building
5685 ### up test-applications.
5686 echo "$as_me:5686: checking for default model" >&5
5687 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5688 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5689 echo "$as_me:5689: result: $DFT_LWR_MODEL" >&5
5690 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5691
5692 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5693
5694 TICS_NAME=tic
5695
5696 TINFO_NAME=tinfo
5697
5698 LIB_NAME=ncurses
5699
5700 LIB_DIR=../lib
5701 LIB_2ND=../../lib
5702
5703 echo "$as_me:5703: checking if you want to have a library-prefix" >&5
5704 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5705
5706 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5707 if test "${with_lib_prefix+set}" = set; then
5708   withval="$with_lib_prefix"
5709   with_lib_prefix=$withval
5710 else
5711   with_lib_prefix=auto
5712 fi;
5713 echo "$as_me:5713: result: $with_lib_prefix" >&5
5714 echo "${ECHO_T}$with_lib_prefix" >&6
5715
5716 if test "$with_lib_prefix" = auto
5717 then
5718
5719         case "$cf_cv_system_name" in
5720         (OS/2*|os2*)
5721                 if test "$DFT_LWR_MODEL" = libtool; then
5722                         LIB_PREFIX='lib'
5723                 else
5724                         LIB_PREFIX=''
5725                 fi
5726                 ;;
5727         (*-msvc*)
5728                 LIB_PREFIX=''
5729                 ;;
5730         (*)     LIB_PREFIX='lib'
5731                 ;;
5732         esac
5733 cf_prefix=$LIB_PREFIX
5734
5735 elif test "$with_lib_prefix" = no
5736 then
5737         LIB_PREFIX=
5738 else
5739         LIB_PREFIX=$with_lib_prefix
5740 fi
5741
5742 LIB_SUFFIX=
5743
5744         echo "$as_me:5744: checking for PATH separator" >&5
5745 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5746         case "$cf_cv_system_name" in
5747         (os2*)  PATH_SEPARATOR=';'  ;;
5748         (*)     ${PATH_SEPARATOR:=':'}  ;;
5749         esac
5750
5751         echo "$as_me:5751: result: $PATH_SEPARATOR" >&5
5752 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5753
5754 ###############################################################################
5755
5756 echo "$as_me:5756: checking if you want to build a separate terminfo library" >&5
5757 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5758
5759 # Check whether --with-termlib or --without-termlib was given.
5760 if test "${with_termlib+set}" = set; then
5761   withval="$with_termlib"
5762   with_termlib=$withval
5763 else
5764   with_termlib=no
5765 fi;
5766 echo "$as_me:5766: result: $with_termlib" >&5
5767 echo "${ECHO_T}$with_termlib" >&6
5768
5769 echo "$as_me:5769: checking if you want to build a separate tic library" >&5
5770 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5771
5772 # Check whether --with-ticlib or --without-ticlib was given.
5773 if test "${with_ticlib+set}" = set; then
5774   withval="$with_ticlib"
5775   with_ticlib=$withval
5776 else
5777   with_ticlib=no
5778 fi;
5779 echo "$as_me:5779: result: $with_ticlib" >&5
5780 echo "${ECHO_T}$with_ticlib" >&6
5781
5782 if test X"$CC_G_OPT" = X"" ; then
5783         CC_G_OPT='-g'
5784         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5785 fi
5786
5787 if test X"$CXX_G_OPT" = X"" ; then
5788         CXX_G_OPT='-g'
5789         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5790 fi
5791
5792 echo "$as_me:5792: checking for default loader flags" >&5
5793 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5794 case "$DFT_LWR_MODEL" in
5795 (libtool) LD_MODEL=''   ;;
5796 (normal)  LD_MODEL=''   ;;
5797 (debug)   LD_MODEL=$CC_G_OPT ;;
5798 (profile) LD_MODEL='-pg';;
5799 (shared)  LD_MODEL=''   ;;
5800 esac
5801 echo "$as_me:5801: result: $LD_MODEL" >&5
5802 echo "${ECHO_T}$LD_MODEL" >&6
5803
5804 case "$DFT_LWR_MODEL" in
5805 (shared)
5806
5807 echo "$as_me:5807: checking if rpath option should be used" >&5
5808 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5809
5810 # Check whether --enable-rpath or --disable-rpath was given.
5811 if test "${enable_rpath+set}" = set; then
5812   enableval="$enable_rpath"
5813   cf_cv_enable_rpath=$enableval
5814 else
5815   cf_cv_enable_rpath=no
5816 fi;
5817 echo "$as_me:5817: result: $cf_cv_enable_rpath" >&5
5818 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5819
5820 echo "$as_me:5820: checking if shared libraries should be relinked during install" >&5
5821 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5822
5823 # Check whether --enable-relink or --disable-relink was given.
5824 if test "${enable_relink+set}" = set; then
5825   enableval="$enable_relink"
5826   cf_cv_do_relink=$enableval
5827 else
5828   cf_cv_do_relink=yes
5829 fi;
5830 echo "$as_me:5830: result: $cf_cv_do_relink" >&5
5831 echo "${ECHO_T}$cf_cv_do_relink" >&6
5832         ;;
5833 esac
5834
5835 # we will build libraries one-level down.
5836 rel_builddir=..
5837
5838 LD_RPATH_OPT=
5839 if test "x$cf_cv_enable_rpath" != xno
5840 then
5841         echo "$as_me:5841: checking for an rpath option" >&5
5842 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5843         case "$cf_cv_system_name" in
5844         (irix*)
5845                 if test "$GCC" = yes; then
5846                         LD_RPATH_OPT="-Wl,-rpath,"
5847                 else
5848                         LD_RPATH_OPT="-rpath "
5849                 fi
5850                 ;;
5851         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5852                 LD_RPATH_OPT="-Wl,-rpath,"
5853                 ;;
5854         (openbsd[2-9].*|mirbsd*)
5855                 LD_RPATH_OPT="-Wl,-rpath,"
5856                 ;;
5857         (dragonfly*)
5858                 LD_RPATH_OPT="-rpath "
5859                 ;;
5860         (netbsd*)
5861                 LD_RPATH_OPT="-Wl,-rpath,"
5862                 ;;
5863         (osf*|mls+*)
5864                 LD_RPATH_OPT="-rpath "
5865                 ;;
5866         (solaris2*)
5867                 LD_RPATH_OPT="-R"
5868                 ;;
5869         (*)
5870                 ;;
5871         esac
5872         echo "$as_me:5872: result: $LD_RPATH_OPT" >&5
5873 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5874
5875         case "x$LD_RPATH_OPT" in
5876         (x-R*)
5877                 echo "$as_me:5877: checking if we need a space after rpath option" >&5
5878 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5879                 cf_save_LIBS="$LIBS"
5880
5881 cf_add_libs="$LIBS"
5882 # reverse order
5883 cf_add_0lib=
5884 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5885 # filter duplicates
5886 for cf_add_1lib in $cf_add_0lib; do
5887         for cf_add_2lib in $cf_add_libs; do
5888                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5889                         cf_add_1lib=
5890                         break
5891                 fi
5892         done
5893         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5894 done
5895 LIBS="$cf_add_libs"
5896
5897                 cat >"conftest.$ac_ext" <<_ACEOF
5898 #line 5898 "configure"
5899 #include "confdefs.h"
5900
5901 int
5902 main (void)
5903 {
5904
5905   ;
5906   return 0;
5907 }
5908 _ACEOF
5909 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5910 if { (eval echo "$as_me:5910: \"$ac_link\"") >&5
5911   (eval $ac_link) 2>&5
5912   ac_status=$?
5913   echo "$as_me:5913: \$? = $ac_status" >&5
5914   (exit "$ac_status"); } &&
5915          { ac_try='test -s "conftest$ac_exeext"'
5916   { (eval echo "$as_me:5916: \"$ac_try\"") >&5
5917   (eval $ac_try) 2>&5
5918   ac_status=$?
5919   echo "$as_me:5919: \$? = $ac_status" >&5
5920   (exit "$ac_status"); }; }; then
5921   cf_rpath_space=no
5922 else
5923   echo "$as_me: failed program was:" >&5
5924 cat "conftest.$ac_ext" >&5
5925 cf_rpath_space=yes
5926 fi
5927 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5928                 LIBS="$cf_save_LIBS"
5929                 echo "$as_me:5929: result: $cf_rpath_space" >&5
5930 echo "${ECHO_T}$cf_rpath_space" >&6
5931                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5932                 ;;
5933         esac
5934 fi
5935
5936         RM_SHARED_OPTS=
5937         LOCAL_LDFLAGS=
5938         LOCAL_LDFLAGS2=
5939         LD_SHARED_OPTS=
5940         INSTALL_LIB="-m 644"
5941         : ${rel_builddir:=.}
5942
5943         shlibdir=$libdir
5944
5945         MAKE_DLLS="#"
5946
5947         cf_cv_do_symlinks=no
5948         cf_ld_rpath_opt=
5949         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5950
5951         echo "$as_me:5951: checking if release/abi version should be used for shared libs" >&5
5952 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5953
5954 # Check whether --with-shlib-version or --without-shlib-version was given.
5955 if test "${with_shlib_version+set}" = set; then
5956   withval="$with_shlib_version"
5957   test -z "$withval" && withval=auto
5958         case "$withval" in
5959         (yes)
5960                 cf_cv_shlib_version=auto
5961                 ;;
5962         (rel|abi|auto)
5963                 cf_cv_shlib_version=$withval
5964                 ;;
5965         (*)
5966                 echo "$as_me:5966: result: $withval" >&5
5967 echo "${ECHO_T}$withval" >&6
5968                 { { echo "$as_me:5968: error: option value must be one of: rel, abi, or auto" >&5
5969 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5970    { (exit 1); exit 1; }; }
5971                 ;;
5972         esac
5973
5974 else
5975   cf_cv_shlib_version=auto
5976 fi;
5977         echo "$as_me:5977: result: $cf_cv_shlib_version" >&5
5978 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5979
5980         cf_cv_rm_so_locs=no
5981         cf_try_cflags=
5982
5983         # Some less-capable ports of gcc support only -fpic
5984         CC_SHARED_OPTS=
5985
5986         cf_try_fPIC=no
5987         if test "$GCC" = yes
5988         then
5989                 cf_try_fPIC=yes
5990         else
5991                 case "$cf_cv_system_name" in
5992                 (*linux*)       # e.g., PGI compiler
5993                         cf_try_fPIC=yes
5994                         ;;
5995                 esac
5996         fi
5997
5998         if test "$cf_try_fPIC" = yes
5999         then
6000                 echo "$as_me:6000: checking which $CC option to use" >&5
6001 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6002                 cf_save_CFLAGS="$CFLAGS"
6003                 for CC_SHARED_OPTS in -fPIC -fpic ''
6004                 do
6005                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6006                         cat >"conftest.$ac_ext" <<_ACEOF
6007 #line 6007 "configure"
6008 #include "confdefs.h"
6009 #include <stdio.h>
6010 int
6011 main (void)
6012 {
6013 int x = 1
6014   ;
6015   return 0;
6016 }
6017 _ACEOF
6018 rm -f "conftest.$ac_objext"
6019 if { (eval echo "$as_me:6019: \"$ac_compile\"") >&5
6020   (eval $ac_compile) 2>&5
6021   ac_status=$?
6022   echo "$as_me:6022: \$? = $ac_status" >&5
6023   (exit "$ac_status"); } &&
6024          { ac_try='test -s "conftest.$ac_objext"'
6025   { (eval echo "$as_me:6025: \"$ac_try\"") >&5
6026   (eval $ac_try) 2>&5
6027   ac_status=$?
6028   echo "$as_me:6028: \$? = $ac_status" >&5
6029   (exit "$ac_status"); }; }; then
6030   break
6031 else
6032   echo "$as_me: failed program was:" >&5
6033 cat "conftest.$ac_ext" >&5
6034 fi
6035 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6036                 done
6037                 echo "$as_me:6037: result: $CC_SHARED_OPTS" >&5
6038 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6039                 CFLAGS="$cf_save_CFLAGS"
6040         fi
6041
6042         cf_cv_shlib_version_infix=no
6043
6044         case "$cf_cv_system_name" in
6045         (aix4.3-9*|aix[5-7]*)
6046                 if test "$GCC" = yes; then
6047                         CC_SHARED_OPTS='-Wl,-brtl'
6048                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6049                 else
6050                         CC_SHARED_OPTS='-brtl'
6051                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6052                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6053                 fi
6054                 ;;
6055         (beos*)
6056                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6057                 ;;
6058         (cygwin*)
6059                 CC_SHARED_OPTS=
6060                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6061                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6062                 cf_cv_shlib_version=cygdll
6063                 cf_cv_shlib_version_infix=cygdll
6064                 shlibdir=$bindir
6065                 MAKE_DLLS=
6066                 cat >mk_shared_lib.sh <<-CF_EOF
6067                 #!$SHELL
6068                 SHARED_LIB=\$1
6069                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6070                 shift
6071                 cat <<-EOF
6072                 Linking shared library
6073                 ** SHARED_LIB \$SHARED_LIB
6074                 ** IMPORT_LIB \$IMPORT_LIB
6075 EOF
6076                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6077 CF_EOF
6078                 chmod +x mk_shared_lib.sh
6079                 ;;
6080         (msys*)
6081                 CC_SHARED_OPTS=
6082                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6083                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6084                 cf_cv_shlib_version=msysdll
6085                 cf_cv_shlib_version_infix=msysdll
6086                 shlibdir=$bindir
6087                 MAKE_DLLS=
6088                 cat >mk_shared_lib.sh <<-CF_EOF
6089                 #!$SHELL
6090                 SHARED_LIB=\$1
6091                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6092                 shift
6093                 cat <<-EOF
6094                 Linking shared library
6095                 ** SHARED_LIB \$SHARED_LIB
6096                 ** IMPORT_LIB \$IMPORT_LIB
6097 EOF
6098                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6099 CF_EOF
6100                 chmod +x mk_shared_lib.sh
6101                 ;;
6102         (darwin*)
6103                 cf_try_cflags="no-cpp-precomp"
6104                 CC_SHARED_OPTS="-dynamic"
6105                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6106                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6107                 cf_cv_shlib_version_infix=yes
6108                 echo "$as_me:6108: checking if ld -search_paths_first works" >&5
6109 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6110 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6111   echo $ECHO_N "(cached) $ECHO_C" >&6
6112 else
6113
6114                         cf_save_LDFLAGS=$LDFLAGS
6115                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6116                         cat >"conftest.$ac_ext" <<_ACEOF
6117 #line 6117 "configure"
6118 #include "confdefs.h"
6119
6120 int
6121 main (void)
6122 {
6123 int i;
6124   ;
6125   return 0;
6126 }
6127 _ACEOF
6128 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6129 if { (eval echo "$as_me:6129: \"$ac_link\"") >&5
6130   (eval $ac_link) 2>&5
6131   ac_status=$?
6132   echo "$as_me:6132: \$? = $ac_status" >&5
6133   (exit "$ac_status"); } &&
6134          { ac_try='test -s "conftest$ac_exeext"'
6135   { (eval echo "$as_me:6135: \"$ac_try\"") >&5
6136   (eval $ac_try) 2>&5
6137   ac_status=$?
6138   echo "$as_me:6138: \$? = $ac_status" >&5
6139   (exit "$ac_status"); }; }; then
6140   cf_cv_ldflags_search_paths_first=yes
6141 else
6142   echo "$as_me: failed program was:" >&5
6143 cat "conftest.$ac_ext" >&5
6144 cf_cv_ldflags_search_paths_first=no
6145 fi
6146 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6147                                 LDFLAGS=$cf_save_LDFLAGS
6148 fi
6149 echo "$as_me:6149: result: $cf_cv_ldflags_search_paths_first" >&5
6150 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6151                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6152                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6153                 fi
6154                 ;;
6155         (hpux[7-8]*)
6156                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6157                 if test "$GCC" != yes; then
6158                         CC_SHARED_OPTS='+Z'
6159                 fi
6160                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6161                 INSTALL_LIB="-m 555"
6162                 ;;
6163         (hpux*)
6164                 # (tested with gcc 2.7.2 -- I don't have c89)
6165                 if test "$GCC" = yes; then
6166                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6167                 else
6168                         CC_SHARED_OPTS='+Z'
6169                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6170                 fi
6171                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6172                 # HP-UX shared libraries must be executable, and should be
6173                 # readonly to exploit a quirk in the memory manager.
6174                 INSTALL_LIB="-m 555"
6175                 ;;
6176         (interix*)
6177                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6178                 if test "$cf_cv_shlib_version" = rel; then
6179                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6180                 else
6181                         cf_shared_soname='`basename $@`'
6182                 fi
6183                 CC_SHARED_OPTS=
6184                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6185                 ;;
6186         (irix*)
6187                 if test "$cf_cv_enable_rpath" = yes ; then
6188                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6189                 fi
6190                 # tested with IRIX 5.2 and 'cc'.
6191                 if test "$GCC" != yes; then
6192                         CC_SHARED_OPTS='-KPIC'
6193                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6194                 else
6195                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6196                 fi
6197                 cf_cv_rm_so_locs=yes
6198                 ;;
6199         (linux*|gnu*|k*bsd*-gnu)
6200                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6201                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6202                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6203                 fi
6204                 if test "$cf_cv_enable_rpath" = yes ; then
6205                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6206                 fi
6207
6208         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6209         if test "$cf_cv_shlib_version" = rel; then
6210                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6211         else
6212                 cf_cv_shared_soname='`basename $@`'
6213         fi
6214
6215                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6216                 ;;
6217         (mingw*msvc*)
6218                 cf_cv_shlib_version=msvcdll
6219                 cf_cv_shlib_version_infix=msvcdll
6220                 shlibdir=$bindir
6221                 MAKE_DLLS=
6222                 if test "$DFT_LWR_MODEL" = "shared" ; then
6223                         LOCAL_LDFLAGS="-link -dll"
6224                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6225                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6226                 fi
6227                 CC_SHARED_OPTS=
6228                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6229                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6230                 cat >mk_shared_lib.sh <<-CF_EOF
6231                 #!$SHELL
6232                 SHARED_LIB=\$1
6233                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6234                 shift
6235                 my_ld=\$1
6236                 shift
6237                 cat <<-EOF
6238                 Linking shared library
6239                 ** SHARED LIB \$SHARED_LIB
6240                 ** IMPORT_LIB \$IMPORT_LIB
6241 EOF
6242                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6243                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6244                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6245 CF_EOF
6246                 chmod +x mk_shared_lib.sh
6247                 cat >mk_prog.sh <<-CF_EOF
6248                 #!$SHELL
6249                 shift
6250                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6251                 LD="$LD"
6252                 clopts=()
6253                 ldopts=("/subsystem:console")
6254                 libs=()
6255                 isdll=0
6256                 while test \$# -gt 0; do
6257                         case "\$1" in
6258                                 -link)
6259                                         # ignore -link argument
6260                                         ;;
6261                                 -M[TD] | -M[TD]d)
6262                                         # ignore runtime-library option
6263                                         ;;
6264                                 -dll)
6265                                         isdll=1
6266                                         ;;
6267                                 -W* | -w*)
6268                                         # ignore warnings
6269                                         ;;
6270                                 -D*)
6271                                         clopts+=("\$1")
6272                                         ;;
6273                                 -I*)
6274                                         clopts+=("\$1")
6275                                         ;;
6276                                 -l*)
6277                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6278                                         ;;
6279                                 -L*)
6280                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6281                                         ;;
6282                                 *.obj | *.o)
6283                                         ldopts+=("\$1")
6284                                         ;;
6285                                 -Wl,*)
6286                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6287                                                 ldopts+=("\${linkarg}")
6288                                         done
6289                                         ;;
6290                                 *.lib)
6291                                         ldopts+=("\$1")
6292                                         ;;
6293                                 -o)
6294                                         shift
6295                                         ldopts+=("-out:\$1")
6296                                         ;;
6297                                 *)
6298                                         clopts+=("\$1")
6299                                         ldopts+=("\$1")
6300                                         ;;
6301                         esac
6302                         shift
6303                 done
6304                 if [ "\$isdll" -ne 0 ]; then
6305                         for lib in \${libs[*]}; do
6306                                 ldopts+=("\$lib.dll.lib")
6307                         done
6308                 else
6309                         for lib in \${libs[*]}; do
6310                                 ldopts+=("\$lib.lib")
6311                         done
6312                 fi
6313                 cat <<-EOF
6314                 Creating program
6315                 ** ld options:   "\${ldopts[@]}"
6316 EOF
6317                 exec \$LD \${ldopts[@]}
6318 CF_EOF
6319                 chmod +x mk_prog.sh
6320                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6321                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6322                 ;;
6323         (mingw*)
6324                 cf_cv_shlib_version=mingw
6325                 cf_cv_shlib_version_infix=mingw
6326                 shlibdir=$bindir
6327                 MAKE_DLLS=
6328                 if test "$DFT_LWR_MODEL" = "shared" ; then
6329                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6330                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6331                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6332                 fi
6333                 CC_SHARED_OPTS=
6334                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6335                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6336                 cat >mk_shared_lib.sh <<-CF_EOF
6337                 #!$SHELL
6338                 SHARED_LIB=\$1
6339                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6340                 shift
6341                 cat <<-EOF
6342                 Linking shared library
6343                 ** SHARED_LIB \$SHARED_LIB
6344                 ** IMPORT_LIB \$IMPORT_LIB
6345 EOF
6346                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6347 CF_EOF
6348                 chmod +x mk_shared_lib.sh
6349                 ;;
6350         (openbsd[2-9].*|mirbsd*)
6351                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6352                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6353                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6354                 fi
6355                 if test "$cf_cv_enable_rpath" = yes ; then
6356                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6357                 fi
6358                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6359
6360         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6361         if test "$cf_cv_shlib_version" = rel; then
6362                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6363         else
6364                 cf_cv_shared_soname='`basename $@`'
6365         fi
6366
6367                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6368                 ;;
6369         (nskJ*)
6370                 CC_SHARED_OPTS=
6371                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6372                 ;;
6373         (nskL*)
6374                 CC_SHARED_OPTS=
6375                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6376                 ;;
6377         (nto-qnx*|openbsd*|freebsd[12].*)
6378                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6379                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6380                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6381                 ;;
6382         (dragonfly*|freebsd*)
6383                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6384                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6385                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6386                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6387                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6388                 fi
6389
6390         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6391         if test "$cf_cv_shlib_version" = rel; then
6392                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6393         else
6394                 cf_cv_shared_soname='`basename $@`'
6395         fi
6396
6397                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6398                 ;;
6399         (netbsd*)
6400                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6401                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6402                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6403                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6404                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6405                         if test "$cf_cv_shlib_version" = auto; then
6406                         if test -f /usr/libexec/ld.elf_so; then
6407                                 cf_cv_shlib_version=abi
6408                         else
6409                                 cf_cv_shlib_version=rel
6410                         fi
6411                         fi
6412
6413         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6414         if test "$cf_cv_shlib_version" = rel; then
6415                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6416         else
6417                 cf_cv_shared_soname='`basename $@`'
6418         fi
6419
6420                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6421                 else
6422                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6423                 fi
6424                 ;;
6425         (osf*|mls+*)
6426                 # tested with OSF/1 V3.2 and 'cc'
6427                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6428                 # link with shared libs).
6429                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6430                 case "$host_os" in
6431                 (osf4*)
6432                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6433                         ;;
6434                 esac
6435                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6436                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6437                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6438                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6439                 fi
6440                 cf_cv_rm_so_locs=yes
6441                 ;;
6442         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6443                 # tested with osr5.0.5
6444                 if test "$GCC" != yes; then
6445                         CC_SHARED_OPTS='-belf -KPIC'
6446                 fi
6447                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6448                 if test "$cf_cv_enable_rpath" = yes ; then
6449                         # only way is to set LD_RUN_PATH but no switch for it
6450                         RUN_PATH=$libdir
6451                 fi
6452                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6453                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6454                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6455                 ;;
6456         (sunos4*)
6457                 # tested with SunOS 4.1.1 and gcc 2.7.0
6458                 if test "$GCC" != yes; then
6459                         CC_SHARED_OPTS='-KPIC'
6460                 fi
6461                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6462                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6463                 ;;
6464         (solaris2*)
6465                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6466                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6467                 if test "$DFT_LWR_MODEL" = "shared" ; then
6468                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6469                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6470                 fi
6471                 if test "$cf_cv_enable_rpath" = yes ; then
6472                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6473                 fi
6474
6475         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6476         if test "$cf_cv_shlib_version" = rel; then
6477                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6478         else
6479                 cf_cv_shared_soname='`basename $@`'
6480         fi
6481
6482                 if test "$GCC" != yes; then
6483                         cf_save_CFLAGS="$CFLAGS"
6484                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6485                         do
6486                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6487                                 cat >"conftest.$ac_ext" <<_ACEOF
6488 #line 6488 "configure"
6489 #include "confdefs.h"
6490 #include <stdio.h>
6491 int
6492 main (void)
6493 {
6494 printf("Hello\\n");
6495   ;
6496   return 0;
6497 }
6498 _ACEOF
6499 rm -f "conftest.$ac_objext"
6500 if { (eval echo "$as_me:6500: \"$ac_compile\"") >&5
6501   (eval $ac_compile) 2>&5
6502   ac_status=$?
6503   echo "$as_me:6503: \$? = $ac_status" >&5
6504   (exit "$ac_status"); } &&
6505          { ac_try='test -s "conftest.$ac_objext"'
6506   { (eval echo "$as_me:6506: \"$ac_try\"") >&5
6507   (eval $ac_try) 2>&5
6508   ac_status=$?
6509   echo "$as_me:6509: \$? = $ac_status" >&5
6510   (exit "$ac_status"); }; }; then
6511   break
6512 else
6513   echo "$as_me: failed program was:" >&5
6514 cat "conftest.$ac_ext" >&5
6515 fi
6516 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6517                         done
6518                         CFLAGS="$cf_save_CFLAGS"
6519                         CC_SHARED_OPTS=$cf_shared_opts
6520                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6521                 else
6522                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6523                 fi
6524                 ;;
6525         (sysv5uw7*|unix_sv*)
6526                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6527                 if test "$GCC" != yes; then
6528                         CC_SHARED_OPTS='-KPIC'
6529                 fi
6530                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6531                 ;;
6532         (*)
6533                 CC_SHARED_OPTS='unknown'
6534                 MK_SHARED_LIB='echo unknown'
6535                 ;;
6536         esac
6537
6538         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6539         case "$cf_cv_shlib_version" in
6540         (rel|abi)
6541                 case "$MK_SHARED_LIB" in
6542                 (*'-o $@')
6543                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6544                         ;;
6545                 (*)
6546                         { echo "$as_me:6546: WARNING: ignored --with-shlib-version" >&5
6547 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6548                         ;;
6549                 esac
6550                 ;;
6551         esac
6552
6553         if test -n "$cf_try_cflags"
6554         then
6555 cat > conftest.$ac_ext <<EOF
6556 #line 6556 "${as_me:-configure}"
6557 #include <stdio.h>
6558 int main(int argc, char *argv[])
6559 {
6560         printf("hello\\n");
6561         return (argv[argc-1] == 0) ;
6562 }
6563 EOF
6564                 cf_save_CFLAGS="$CFLAGS"
6565                 for cf_opt in $cf_try_cflags
6566                 do
6567                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6568                         echo "$as_me:6568: checking if CFLAGS option -$cf_opt works" >&5
6569 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6570                         if { (eval echo "$as_me:6570: \"$ac_compile\"") >&5
6571   (eval $ac_compile) 2>&5
6572   ac_status=$?
6573   echo "$as_me:6573: \$? = $ac_status" >&5
6574   (exit "$ac_status"); }; then
6575                                 echo "$as_me:6575: result: yes" >&5
6576 echo "${ECHO_T}yes" >&6
6577                                 cf_save_CFLAGS="$CFLAGS"
6578                         else
6579                                 echo "$as_me:6579: result: no" >&5
6580 echo "${ECHO_T}no" >&6
6581                         fi
6582                 done
6583                 CFLAGS="$cf_save_CFLAGS"
6584         fi
6585
6586         # RPATH_LIST is a colon-separated list of directories
6587         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6588         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6589
6590         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6591
6592         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6593
6594 echo "${as_me:-configure}:6594: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6595
6596         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6597
6598 echo "${as_me:-configure}:6598: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6599
6600 for model in $cf_list_models ; do
6601         case "$model" in
6602         (libtool)
6603
6604 echo "$as_me:6604: checking for additional libtool options" >&5
6605 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6606
6607 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6608 if test "${with_libtool_opts+set}" = set; then
6609   withval="$with_libtool_opts"
6610   with_libtool_opts=$withval
6611 else
6612   with_libtool_opts=no
6613 fi;
6614 echo "$as_me:6614: result: $with_libtool_opts" >&5
6615 echo "${ECHO_T}$with_libtool_opts" >&6
6616
6617 case .$with_libtool_opts in
6618 (.yes|.no|.)
6619         ;;
6620 (*)
6621         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6622         ;;
6623 esac
6624
6625 echo "$as_me:6625: checking if exported-symbols file should be used" >&5
6626 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6627
6628 # Check whether --with-export-syms or --without-export-syms was given.
6629 if test "${with_export_syms+set}" = set; then
6630   withval="$with_export_syms"
6631   with_export_syms=$withval
6632 else
6633   with_export_syms=no
6634 fi;
6635 if test "x$with_export_syms" = xyes
6636 then
6637         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6638
6639 fi
6640 echo "$as_me:6640: result: $with_export_syms" >&5
6641 echo "${ECHO_T}$with_export_syms" >&6
6642 if test "x$with_export_syms" != xno
6643 then
6644         EXPORT_SYMS="-export-symbols $with_export_syms"
6645
6646 fi
6647
6648                 ;;
6649         (shared)
6650                 if test "$CC_SHARED_OPTS" = "unknown"; then
6651                         { { echo "$as_me:6651: error: Shared libraries are not supported in this version" >&5
6652 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6653    { (exit 1); exit 1; }; }
6654                 fi
6655                 # workaround for inept transition to PIE vs PIC...
6656                 echo "$as_me:6656: checking if current CFLAGS link properly" >&5
6657 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6658                 cat >"conftest.$ac_ext" <<_ACEOF
6659 #line 6659 "configure"
6660 #include "confdefs.h"
6661 #include <stdio.h>
6662 int
6663 main (void)
6664 {
6665 printf("Hello work\\n");
6666   ;
6667   return 0;
6668 }
6669 _ACEOF
6670 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6671 if { (eval echo "$as_me:6671: \"$ac_link\"") >&5
6672   (eval $ac_link) 2>&5
6673   ac_status=$?
6674   echo "$as_me:6674: \$? = $ac_status" >&5
6675   (exit "$ac_status"); } &&
6676          { ac_try='test -s "conftest$ac_exeext"'
6677   { (eval echo "$as_me:6677: \"$ac_try\"") >&5
6678   (eval $ac_try) 2>&5
6679   ac_status=$?
6680   echo "$as_me:6680: \$? = $ac_status" >&5
6681   (exit "$ac_status"); }; }; then
6682   cf_cflags_work=yes
6683 else
6684   echo "$as_me: failed program was:" >&5
6685 cat "conftest.$ac_ext" >&5
6686 cf_cflags_work=no
6687 fi
6688 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6689                 echo "$as_me:6689: result: $cf_cflags_work" >&5
6690 echo "${ECHO_T}$cf_cflags_work" >&6
6691                 if test "$cf_cflags_work" = no
6692                 then
6693                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6694
6695 echo "${as_me:-configure}:6695: testing try to work around by appending shared-options ..." 1>&5
6696
6697                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6698                 fi
6699
6700 echo "$as_me:6700: checking if versioned-symbols file should be used" >&5
6701 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6702
6703 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6704 if test "${with_versioned_syms+set}" = set; then
6705   withval="$with_versioned_syms"
6706   with_versioned_syms=$withval
6707 else
6708   with_versioned_syms=no
6709 fi;
6710 case "x$with_versioned_syms" in
6711 (xyes)
6712         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6713
6714         ;;
6715 (xno)
6716         ;;
6717 (x/*)
6718         test -f "$with_versioned_syms" || { { echo "$as_me:6718: error: expected a filename: $with_versioned_syms" >&5
6719 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6720    { (exit 1); exit 1; }; }
6721         ;;
6722 (*)
6723         test -f "$with_versioned_syms" || { { echo "$as_me:6723: error: expected a filename: $with_versioned_syms" >&5
6724 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6725    { (exit 1); exit 1; }; }
6726         with_versioned_syms=`pwd`/"$with_versioned_syms"
6727         ;;
6728 esac
6729 echo "$as_me:6729: result: $with_versioned_syms" >&5
6730 echo "${ECHO_T}$with_versioned_syms" >&6
6731
6732 RESULTING_SYMS=
6733 VERSIONED_SYMS=
6734 WILDCARD_SYMS=
6735
6736 if test "x$with_versioned_syms" != xno
6737 then
6738         RESULTING_SYMS=$with_versioned_syms
6739         case "x$MK_SHARED_LIB" in
6740         (*-Wl,*)
6741                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6742                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6743                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6744
6745 echo "${as_me:-configure}:6745: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6746
6747                 ;;
6748         (*-dy\ *)
6749                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6750                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6751                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6752
6753 echo "${as_me:-configure}:6753: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6754
6755                 ;;
6756         (*)
6757                 { echo "$as_me:6757: WARNING: this system does not support versioned-symbols" >&5
6758 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6759                 ;;
6760         esac
6761
6762         # Linux ld can selectively override scope, e.g., of symbols beginning with
6763         # "_" by first declaring some as global, and then using a wildcard to
6764         # declare the others as local.  Some other loaders cannot do this.  Check
6765         # by constructing a (very) simple shared library and inspecting its
6766         # symbols.
6767         if test "x$VERSIONED_SYMS" != "x"
6768         then
6769                 echo "$as_me:6769: checking if wildcards can be used to selectively omit symbols" >&5
6770 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6771                 WILDCARD_SYMS=no
6772
6773                 # make sources
6774                 rm -f conftest.*
6775
6776                 cat >conftest.ver <<EOF
6777 module_1.0 {
6778 global:
6779         globalf1;
6780 local:
6781         localf1;
6782 };
6783 module_2.0 {
6784 global:
6785         globalf2;
6786 local:
6787         localf2;
6788         _*;
6789 } module_1.0;
6790 submodule_1.0 {
6791 global:
6792         subglobalf1;
6793         _ismissing;
6794 local:
6795         sublocalf1;
6796 };
6797 submodule_2.0 {
6798 global:
6799         subglobalf2;
6800 local:
6801         sublocalf2;
6802         _*;
6803 } submodule_1.0;
6804 EOF
6805                 cat >conftest.$ac_ext <<EOF
6806 #line 6806 "configure"
6807 int     _ismissing(void) { return 1; }
6808 int     _localf1(void) { return 1; }
6809 int     _localf2(void) { return 2; }
6810 int     globalf1(void) { return 1; }
6811 int     globalf2(void) { return 2; }
6812 int     _sublocalf1(void) { return 1; }
6813 int     _sublocalf2(void) { return 2; }
6814 int     subglobalf1(void) { return 1; }
6815 int     subglobalf2(void) { return 2; }
6816 EOF
6817                 cat >conftest.mk <<EOF
6818 CC=${CC}
6819 CFLAGS=${CFLAGS}
6820 CPPFLAGS=${CPPFLAGS}
6821 LDFLAGS=${LDFLAGS}
6822 LIBS=${LIBS}
6823 VERSIONED_SYMS=${VERSIONED_SYMS}
6824 RESULTING_SYMS=conftest.ver
6825 MK_SHARED_LIB=${MK_SHARED_LIB}
6826 conftest.so: conftest.$ac_cv_objext
6827                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6828 EOF
6829
6830                 # compile source, make library
6831                 if make -f conftest.mk 2>&5 >/dev/null
6832                 then
6833                         # test for missing symbol in either Data or Text section
6834                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6835                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6836                 fi
6837                 echo "$as_me:6837: result: $WILDCARD_SYMS" >&5
6838 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6839                 rm -f conftest.*
6840         fi
6841 fi
6842
6843                 ;;
6844         esac
6845 done
6846
6847 ### Checks for special libraries, must be done up-front.
6848 SHLIB_LIST=""
6849
6850 echo "$as_me:6850: checking if you want to link with the GPM mouse library" >&5
6851 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6852
6853 # Check whether --with-gpm or --without-gpm was given.
6854 if test "${with_gpm+set}" = set; then
6855   withval="$with_gpm"
6856   with_gpm=$withval
6857 else
6858   with_gpm=maybe
6859 fi;
6860 echo "$as_me:6860: result: $with_gpm" >&5
6861 echo "${ECHO_T}$with_gpm" >&6
6862
6863 if test "$with_gpm" != no ; then
6864         echo "$as_me:6864: checking for gpm.h" >&5
6865 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6866 if test "${ac_cv_header_gpm_h+set}" = set; then
6867   echo $ECHO_N "(cached) $ECHO_C" >&6
6868 else
6869   cat >"conftest.$ac_ext" <<_ACEOF
6870 #line 6870 "configure"
6871 #include "confdefs.h"
6872 #include <gpm.h>
6873 _ACEOF
6874 if { (eval echo "$as_me:6874: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6875   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6876   ac_status=$?
6877   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6878   rm -f conftest.er1
6879   cat conftest.err >&5
6880   echo "$as_me:6880: \$? = $ac_status" >&5
6881   (exit "$ac_status"); } >/dev/null; then
6882   if test -s conftest.err; then
6883     ac_cpp_err=$ac_c_preproc_warn_flag
6884   else
6885     ac_cpp_err=
6886   fi
6887 else
6888   ac_cpp_err=yes
6889 fi
6890 if test -z "$ac_cpp_err"; then
6891   ac_cv_header_gpm_h=yes
6892 else
6893   echo "$as_me: failed program was:" >&5
6894   cat "conftest.$ac_ext" >&5
6895   ac_cv_header_gpm_h=no
6896 fi
6897 rm -f conftest.err "conftest.$ac_ext"
6898 fi
6899 echo "$as_me:6899: result: $ac_cv_header_gpm_h" >&5
6900 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6901 if test "$ac_cv_header_gpm_h" = yes; then
6902
6903 cat >>confdefs.h <<\EOF
6904 #define HAVE_GPM_H 1
6905 EOF
6906
6907                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6908                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6909
6910 echo "${as_me:-configure}:6910: testing assuming we really have GPM library ..." 1>&5
6911
6912 cat >>confdefs.h <<\EOF
6913 #define HAVE_LIBGPM 1
6914 EOF
6915
6916                         with_gpm=yes
6917                 else
6918                         echo "$as_me:6918: checking for Gpm_Open in -lgpm" >&5
6919 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6920 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6921   echo $ECHO_N "(cached) $ECHO_C" >&6
6922 else
6923   ac_check_lib_save_LIBS=$LIBS
6924 LIBS="-lgpm  $LIBS"
6925 cat >"conftest.$ac_ext" <<_ACEOF
6926 #line 6926 "configure"
6927 #include "confdefs.h"
6928
6929 /* Override any gcc2 internal prototype to avoid an error.  */
6930 #ifdef __cplusplus
6931 extern "C"
6932 #endif
6933 /* We use char because int might match the return type of a gcc2
6934    builtin and then its argument prototype would still apply.  */
6935 char Gpm_Open ();
6936 int
6937 main (void)
6938 {
6939 Gpm_Open ();
6940   ;
6941   return 0;
6942 }
6943 _ACEOF
6944 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6945 if { (eval echo "$as_me:6945: \"$ac_link\"") >&5
6946   (eval $ac_link) 2>&5
6947   ac_status=$?
6948   echo "$as_me:6948: \$? = $ac_status" >&5
6949   (exit "$ac_status"); } &&
6950          { ac_try='test -s "conftest$ac_exeext"'
6951   { (eval echo "$as_me:6951: \"$ac_try\"") >&5
6952   (eval $ac_try) 2>&5
6953   ac_status=$?
6954   echo "$as_me:6954: \$? = $ac_status" >&5
6955   (exit "$ac_status"); }; }; then
6956   ac_cv_lib_gpm_Gpm_Open=yes
6957 else
6958   echo "$as_me: failed program was:" >&5
6959 cat "conftest.$ac_ext" >&5
6960 ac_cv_lib_gpm_Gpm_Open=no
6961 fi
6962 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6963 LIBS=$ac_check_lib_save_LIBS
6964 fi
6965 echo "$as_me:6965: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6966 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6967 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6968   with_gpm=yes
6969 else
6970
6971                                 if test "$with_gpm" = maybe; then
6972                                         { echo "$as_me:6972: WARNING: Cannot link with GPM library" >&5
6973 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6974                                         with_gpm=no
6975                                 else
6976                                         { { echo "$as_me:6976: error: Cannot link with GPM library" >&5
6977 echo "$as_me: error: Cannot link with GPM library" >&2;}
6978    { (exit 1); exit 1; }; }
6979                                 fi
6980
6981 fi
6982
6983                 fi
6984
6985 else
6986
6987                 test "$with_gpm" != maybe && { echo "$as_me:6987: WARNING: Cannot find GPM header" >&5
6988 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6989                 with_gpm=no
6990
6991 fi
6992
6993 fi
6994
6995 if test "$with_gpm" != no ; then
6996         echo "$as_me:6996: checking if you want to load GPM dynamically" >&5
6997 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6998
6999 # Check whether --with-dlsym or --without-dlsym was given.
7000 if test "${with_dlsym+set}" = set; then
7001   withval="$with_dlsym"
7002   with_dlsym=$withval
7003 else
7004   with_dlsym=yes
7005 fi;
7006         echo "$as_me:7006: result: $with_dlsym" >&5
7007 echo "${ECHO_T}$with_dlsym" >&6
7008         if test "x$with_dlsym" = xyes ; then
7009
7010 cf_have_dlsym=no
7011 echo "$as_me:7011: checking for dlsym" >&5
7012 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7013 if test "${ac_cv_func_dlsym+set}" = set; then
7014   echo $ECHO_N "(cached) $ECHO_C" >&6
7015 else
7016   cat >"conftest.$ac_ext" <<_ACEOF
7017 #line 7017 "configure"
7018 #include "confdefs.h"
7019 #define dlsym autoconf_temporary
7020 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7021 #undef dlsym
7022
7023 #ifdef __cplusplus
7024 extern "C"
7025 #endif
7026
7027 /* We use char because int might match the return type of a gcc2
7028    builtin and then its argument prototype would still apply.  */
7029 char dlsym (void);
7030
7031 int
7032 main (void)
7033 {
7034
7035 /* The GNU C library defines stubs for functions which it implements
7036     to always fail with ENOSYS.  Some functions are actually named
7037     something starting with __ and the normal name is an alias.  */
7038 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7039 #error found stub for dlsym
7040 #endif
7041
7042         return dlsym ();
7043   ;
7044   return 0;
7045 }
7046 _ACEOF
7047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7048 if { (eval echo "$as_me:7048: \"$ac_link\"") >&5
7049   (eval $ac_link) 2>&5
7050   ac_status=$?
7051   echo "$as_me:7051: \$? = $ac_status" >&5
7052   (exit "$ac_status"); } &&
7053          { ac_try='test -s "conftest$ac_exeext"'
7054   { (eval echo "$as_me:7054: \"$ac_try\"") >&5
7055   (eval $ac_try) 2>&5
7056   ac_status=$?
7057   echo "$as_me:7057: \$? = $ac_status" >&5
7058   (exit "$ac_status"); }; }; then
7059   ac_cv_func_dlsym=yes
7060 else
7061   echo "$as_me: failed program was:" >&5
7062 cat "conftest.$ac_ext" >&5
7063 ac_cv_func_dlsym=no
7064 fi
7065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7066 fi
7067 echo "$as_me:7067: result: $ac_cv_func_dlsym" >&5
7068 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7069 if test "$ac_cv_func_dlsym" = yes; then
7070   cf_have_dlsym=yes
7071 else
7072
7073 cf_have_libdl=no
7074 echo "$as_me:7074: checking for dlsym in -ldl" >&5
7075 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7076 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7077   echo $ECHO_N "(cached) $ECHO_C" >&6
7078 else
7079   ac_check_lib_save_LIBS=$LIBS
7080 LIBS="-ldl  $LIBS"
7081 cat >"conftest.$ac_ext" <<_ACEOF
7082 #line 7082 "configure"
7083 #include "confdefs.h"
7084
7085 /* Override any gcc2 internal prototype to avoid an error.  */
7086 #ifdef __cplusplus
7087 extern "C"
7088 #endif
7089 /* We use char because int might match the return type of a gcc2
7090    builtin and then its argument prototype would still apply.  */
7091 char dlsym ();
7092 int
7093 main (void)
7094 {
7095 dlsym ();
7096   ;
7097   return 0;
7098 }
7099 _ACEOF
7100 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7101 if { (eval echo "$as_me:7101: \"$ac_link\"") >&5
7102   (eval $ac_link) 2>&5
7103   ac_status=$?
7104   echo "$as_me:7104: \$? = $ac_status" >&5
7105   (exit "$ac_status"); } &&
7106          { ac_try='test -s "conftest$ac_exeext"'
7107   { (eval echo "$as_me:7107: \"$ac_try\"") >&5
7108   (eval $ac_try) 2>&5
7109   ac_status=$?
7110   echo "$as_me:7110: \$? = $ac_status" >&5
7111   (exit "$ac_status"); }; }; then
7112   ac_cv_lib_dl_dlsym=yes
7113 else
7114   echo "$as_me: failed program was:" >&5
7115 cat "conftest.$ac_ext" >&5
7116 ac_cv_lib_dl_dlsym=no
7117 fi
7118 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7119 LIBS=$ac_check_lib_save_LIBS
7120 fi
7121 echo "$as_me:7121: result: $ac_cv_lib_dl_dlsym" >&5
7122 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7123 if test "$ac_cv_lib_dl_dlsym" = yes; then
7124
7125         cf_have_dlsym=yes
7126         cf_have_libdl=yes
7127 fi
7128
7129 fi
7130
7131 if test "$cf_have_dlsym" = yes ; then
7132         test "$cf_have_libdl" = yes && {
7133 cf_add_libs="$LIBS"
7134 # reverse order
7135 cf_add_0lib=
7136 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7137 # filter duplicates
7138 for cf_add_1lib in $cf_add_0lib; do
7139         for cf_add_2lib in $cf_add_libs; do
7140                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7141                         cf_add_1lib=
7142                         break
7143                 fi
7144         done
7145         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7146 done
7147 LIBS="$cf_add_libs"
7148  }
7149
7150         echo "$as_me:7150: checking whether able to link to dl*() functions" >&5
7151 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7152         cat >"conftest.$ac_ext" <<_ACEOF
7153 #line 7153 "configure"
7154 #include "confdefs.h"
7155 #include <dlfcn.h>
7156 int
7157 main (void)
7158 {
7159
7160                 void *obj;
7161                 if ((obj = dlopen("filename", 0)) != 0) {
7162                         if (dlsym(obj, "symbolname") == 0) {
7163                         dlclose(obj);
7164                         }
7165                 }
7166   ;
7167   return 0;
7168 }
7169 _ACEOF
7170 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7171 if { (eval echo "$as_me:7171: \"$ac_link\"") >&5
7172   (eval $ac_link) 2>&5
7173   ac_status=$?
7174   echo "$as_me:7174: \$? = $ac_status" >&5
7175   (exit "$ac_status"); } &&
7176          { ac_try='test -s "conftest$ac_exeext"'
7177   { (eval echo "$as_me:7177: \"$ac_try\"") >&5
7178   (eval $ac_try) 2>&5
7179   ac_status=$?
7180   echo "$as_me:7180: \$? = $ac_status" >&5
7181   (exit "$ac_status"); }; }; then
7182
7183 cat >>confdefs.h <<\EOF
7184 #define HAVE_LIBDL 1
7185 EOF
7186
7187 else
7188   echo "$as_me: failed program was:" >&5
7189 cat "conftest.$ac_ext" >&5
7190
7191                 { { echo "$as_me:7191: error: Cannot link test program for libdl" >&5
7192 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7193    { (exit 1); exit 1; }; }
7194 fi
7195 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7196         echo "$as_me:7196: result: ok" >&5
7197 echo "${ECHO_T}ok" >&6
7198 else
7199         { { echo "$as_me:7199: error: Cannot find dlsym function" >&5
7200 echo "$as_me: error: Cannot find dlsym function" >&2;}
7201    { (exit 1); exit 1; }; }
7202 fi
7203
7204                 if test "x$with_gpm" != xyes ; then
7205                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7206
7207 echo "${as_me:-configure}:7207: testing assuming soname for gpm is $with_gpm ..." 1>&5
7208
7209                         cf_cv_gpm_soname="$with_gpm"
7210                 else
7211
7212 echo "$as_me:7212: checking for soname of gpm library" >&5
7213 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7214 if test "${cf_cv_gpm_soname+set}" = set; then
7215   echo $ECHO_N "(cached) $ECHO_C" >&6
7216 else
7217
7218 cf_cv_gpm_soname=unknown
7219 if test "$cross_compiling" != yes ; then
7220 cat >conftest.$ac_ext <<CF_EOF
7221 #include <gpm.h>
7222 int main(void)
7223 {
7224 if (Gpm_Open(0,0)) Gpm_Close();
7225         ${cf_cv_main_return:-return}(0);
7226 }
7227 CF_EOF
7228 cf_save_LIBS="$LIBS"
7229
7230 cf_add_libs="$LIBS"
7231 # reverse order
7232 cf_add_0lib=
7233 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7234 # filter duplicates
7235 for cf_add_1lib in $cf_add_0lib; do
7236         for cf_add_2lib in $cf_add_libs; do
7237                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7238                         cf_add_1lib=
7239                         break
7240                 fi
7241         done
7242         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7243 done
7244 LIBS="$cf_add_libs"
7245
7246         if { (eval echo "$as_me:7246: \"$ac_compile\"") >&5
7247   (eval $ac_compile) 2>&5
7248   ac_status=$?
7249   echo "$as_me:7249: \$? = $ac_status" >&5
7250   (exit "$ac_status"); } ; then
7251                 if { (eval echo "$as_me:7251: \"$ac_link\"") >&5
7252   (eval $ac_link) 2>&5
7253   ac_status=$?
7254   echo "$as_me:7254: \$? = $ac_status" >&5
7255   (exit "$ac_status"); } ; then
7256                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7257                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7258                 fi
7259         fi
7260 rm -rf ./conftest*
7261 LIBS="$cf_save_LIBS"
7262 fi
7263
7264 fi
7265 echo "$as_me:7265: result: $cf_cv_gpm_soname" >&5
7266 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7267
7268                 fi
7269                 test "$cf_cv_gpm_soname" != "unknown" &&
7270 cat >>confdefs.h <<EOF
7271 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7272 EOF
7273
7274                 SHLIB_LIST="-ldl $SHLIB_LIST"
7275
7276 cf_add_libs="$PRIVATE_LIBS"
7277 # reverse order
7278 cf_add_0lib=
7279 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7280 # filter duplicates
7281 for cf_add_1lib in $cf_add_0lib; do
7282         for cf_add_2lib in $cf_add_libs; do
7283                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7284                         cf_add_1lib=
7285                         break
7286                 fi
7287         done
7288         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7289 done
7290 PRIVATE_LIBS="$cf_add_libs"
7291
7292         else
7293                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7294
7295 cf_add_libs="$TEST_LIBS"
7296 # reverse order
7297 cf_add_0lib=
7298 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7299 # filter duplicates
7300 for cf_add_1lib in $cf_add_0lib; do
7301         for cf_add_2lib in $cf_add_libs; do
7302                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7303                         cf_add_1lib=
7304                         break
7305                 fi
7306         done
7307         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7308 done
7309 TEST_LIBS="$cf_add_libs"
7310
7311 cf_add_libs="$PRIVATE_LIBS"
7312 # reverse order
7313 cf_add_0lib=
7314 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7315 # filter duplicates
7316 for cf_add_1lib in $cf_add_0lib; do
7317         for cf_add_2lib in $cf_add_libs; do
7318                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7319                         cf_add_1lib=
7320                         break
7321                 fi
7322         done
7323         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7324 done
7325 PRIVATE_LIBS="$cf_add_libs"
7326
7327         fi
7328
7329 cat >>confdefs.h <<\EOF
7330 #define HAVE_LIBGPM 1
7331 EOF
7332
7333 echo "$as_me:7333: checking for Gpm_Wgetch in -lgpm" >&5
7334 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7335 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7336   echo $ECHO_N "(cached) $ECHO_C" >&6
7337 else
7338   ac_check_lib_save_LIBS=$LIBS
7339 LIBS="-lgpm  $LIBS"
7340 cat >"conftest.$ac_ext" <<_ACEOF
7341 #line 7341 "configure"
7342 #include "confdefs.h"
7343
7344 /* Override any gcc2 internal prototype to avoid an error.  */
7345 #ifdef __cplusplus
7346 extern "C"
7347 #endif
7348 /* We use char because int might match the return type of a gcc2
7349    builtin and then its argument prototype would still apply.  */
7350 char Gpm_Wgetch ();
7351 int
7352 main (void)
7353 {
7354 Gpm_Wgetch ();
7355   ;
7356   return 0;
7357 }
7358 _ACEOF
7359 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7360 if { (eval echo "$as_me:7360: \"$ac_link\"") >&5
7361   (eval $ac_link) 2>&5
7362   ac_status=$?
7363   echo "$as_me:7363: \$? = $ac_status" >&5
7364   (exit "$ac_status"); } &&
7365          { ac_try='test -s "conftest$ac_exeext"'
7366   { (eval echo "$as_me:7366: \"$ac_try\"") >&5
7367   (eval $ac_try) 2>&5
7368   ac_status=$?
7369   echo "$as_me:7369: \$? = $ac_status" >&5
7370   (exit "$ac_status"); }; }; then
7371   ac_cv_lib_gpm_Gpm_Wgetch=yes
7372 else
7373   echo "$as_me: failed program was:" >&5
7374 cat "conftest.$ac_ext" >&5
7375 ac_cv_lib_gpm_Gpm_Wgetch=no
7376 fi
7377 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7378 LIBS=$ac_check_lib_save_LIBS
7379 fi
7380 echo "$as_me:7380: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7381 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7382 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7383
7384 echo "$as_me:7384: checking if GPM is weakly bound to curses library" >&5
7385 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7386 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7387   echo $ECHO_N "(cached) $ECHO_C" >&6
7388 else
7389
7390 cf_cv_check_gpm_wgetch=unknown
7391 if test "$cross_compiling" != yes ; then
7392
7393 cat >conftest.$ac_ext <<CF_EOF
7394 #include <gpm.h>
7395 int main(void)
7396 {
7397         Gpm_Wgetch();
7398         ${cf_cv_main_return:-return}(0);
7399 }
7400 CF_EOF
7401
7402         cf_save_LIBS="$LIBS"
7403         # This only works if we can look at the symbol table.  If a shared
7404         # library is stripped for install, we cannot use that.  So we're forced
7405         # to rely on the static library, noting that some packagers may not
7406         # include it.
7407         LIBS="-static -lgpm -dynamic $LIBS"
7408         if { (eval echo "$as_me:7408: \"$ac_compile\"") >&5
7409   (eval $ac_compile) 2>&5
7410   ac_status=$?
7411   echo "$as_me:7411: \$? = $ac_status" >&5
7412   (exit "$ac_status"); } ; then
7413                 if { (eval echo "$as_me:7413: \"$ac_link\"") >&5
7414   (eval $ac_link) 2>&5
7415   ac_status=$?
7416   echo "$as_me:7416: \$? = $ac_status" >&5
7417   (exit "$ac_status"); } ; then
7418                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7419                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7420                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7421                 fi
7422         fi
7423         rm -rf ./conftest*
7424         LIBS="$cf_save_LIBS"
7425 fi
7426
7427 fi
7428 echo "$as_me:7428: result: $cf_cv_check_gpm_wgetch" >&5
7429 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7430
7431 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7432         { echo "$as_me:7432: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7433 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7434 fi
7435
7436 fi
7437
7438 fi
7439
7440 echo "$as_me:7440: checking if you want to use PCRE2 for regular-expressions" >&5
7441 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7442
7443 # Check whether --with-pcre2 or --without-pcre2 was given.
7444 if test "${with_pcre2+set}" = set; then
7445   withval="$with_pcre2"
7446
7447 fi;
7448 test -z "$with_pcre2" && with_pcre2=no
7449 echo "$as_me:7449: result: $with_pcre2" >&5
7450 echo "${ECHO_T}$with_pcre2" >&6
7451
7452 if test "x$with_pcre2" != xno ; then
7453         cf_with_pcre2_ok=no
7454         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7455         do
7456
7457 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7458         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7459
7460 echo "${as_me:-configure}:7460: testing found package $cf_with_pcre2 ..." 1>&5
7461
7462         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7463         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7464         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7465
7466 echo "${as_me:-configure}:7466: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7467
7468         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7469
7470 echo "${as_me:-configure}:7470: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7471
7472 cf_fix_cppflags=no
7473 cf_new_cflags=
7474 cf_new_cppflags=
7475 cf_new_extra_cppflags=
7476
7477 for cf_add_cflags in $cf_pkgconfig_incs
7478 do
7479 case "$cf_fix_cppflags" in
7480 (no)
7481         case "$cf_add_cflags" in
7482         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7483                 case "$cf_add_cflags" in
7484                 (-D*)
7485                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7486
7487                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7488                                 && test -z "${cf_tst_cflags}" \
7489                                 && cf_fix_cppflags=yes
7490
7491                         if test "$cf_fix_cppflags" = yes ; then
7492
7493         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7494         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7495
7496                                 continue
7497                         elif test "${cf_tst_cflags}" = "\"'" ; then
7498
7499         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7500         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7501
7502                                 continue
7503                         fi
7504                         ;;
7505                 esac
7506                 case "$CPPFLAGS" in
7507                 (*$cf_add_cflags)
7508                         ;;
7509                 (*)
7510                         case "$cf_add_cflags" in
7511                         (-D*)
7512                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7513
7514 CPPFLAGS=`echo "$CPPFLAGS" | \
7515         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7516                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7517
7518                                 ;;
7519                         esac
7520
7521         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7522         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7523
7524                         ;;
7525                 esac
7526                 ;;
7527         (*)
7528
7529         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7530         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7531
7532                 ;;
7533         esac
7534         ;;
7535 (yes)
7536
7537         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7538         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7539
7540         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7541
7542         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7543                 && test -z "${cf_tst_cflags}" \
7544                 && cf_fix_cppflags=no
7545         ;;
7546 esac
7547 done
7548
7549 if test -n "$cf_new_cflags" ; then
7550
7551         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7552         CFLAGS="${CFLAGS}$cf_new_cflags"
7553
7554 fi
7555
7556 if test -n "$cf_new_cppflags" ; then
7557
7558         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7559         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7560
7561 fi
7562
7563 if test -n "$cf_new_extra_cppflags" ; then
7564
7565         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7566         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7567
7568 fi
7569
7570 cf_add_libs="$LIBS"
7571 # reverse order
7572 cf_add_0lib=
7573 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7574 # filter duplicates
7575 for cf_add_1lib in $cf_add_0lib; do
7576         for cf_add_2lib in $cf_add_libs; do
7577                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7578                         cf_add_1lib=
7579                         break
7580                 fi
7581         done
7582         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7583 done
7584 LIBS="$cf_add_libs"
7585
7586         cf_with_pcre2_ok=yes; break
7587 else
7588         cf_pkgconfig_incs=
7589         cf_pkgconfig_libs=
7590         :
7591 fi
7592
7593         done
7594         cf_with_pcre2_ok=yes || { { echo "$as_me:7594: error: Cannot find PCRE2 library" >&5
7595 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7596    { (exit 1); exit 1; }; }
7597
7598 cat >>confdefs.h <<\EOF
7599 #define HAVE_LIB_PCRE2 1
7600 EOF
7601
7602         # if pkgconfig gave no results, look for the libraries directly
7603         case "$LIBS" in
7604         (*pcre2-posix*|*pcreposix*)
7605                 ;;
7606         (*)
7607                 echo "$as_me:7607: checking for regcomp in -lpcre2-posix" >&5
7608 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7609 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7610   echo $ECHO_N "(cached) $ECHO_C" >&6
7611 else
7612   ac_check_lib_save_LIBS=$LIBS
7613 LIBS="-lpcre2-posix  $LIBS"
7614 cat >"conftest.$ac_ext" <<_ACEOF
7615 #line 7615 "configure"
7616 #include "confdefs.h"
7617
7618 /* Override any gcc2 internal prototype to avoid an error.  */
7619 #ifdef __cplusplus
7620 extern "C"
7621 #endif
7622 /* We use char because int might match the return type of a gcc2
7623    builtin and then its argument prototype would still apply.  */
7624 char regcomp ();
7625 int
7626 main (void)
7627 {
7628 regcomp ();
7629   ;
7630   return 0;
7631 }
7632 _ACEOF
7633 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7634 if { (eval echo "$as_me:7634: \"$ac_link\"") >&5
7635   (eval $ac_link) 2>&5
7636   ac_status=$?
7637   echo "$as_me:7637: \$? = $ac_status" >&5
7638   (exit "$ac_status"); } &&
7639          { ac_try='test -s "conftest$ac_exeext"'
7640   { (eval echo "$as_me:7640: \"$ac_try\"") >&5
7641   (eval $ac_try) 2>&5
7642   ac_status=$?
7643   echo "$as_me:7643: \$? = $ac_status" >&5
7644   (exit "$ac_status"); }; }; then
7645   ac_cv_lib_pcre2_posix_regcomp=yes
7646 else
7647   echo "$as_me: failed program was:" >&5
7648 cat "conftest.$ac_ext" >&5
7649 ac_cv_lib_pcre2_posix_regcomp=no
7650 fi
7651 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7652 LIBS=$ac_check_lib_save_LIBS
7653 fi
7654 echo "$as_me:7654: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7655 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7656 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7657
7658 cf_add_libs="$LIBS"
7659 # reverse order
7660 cf_add_0lib=
7661 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7662 # filter duplicates
7663 for cf_add_1lib in $cf_add_0lib; do
7664         for cf_add_2lib in $cf_add_libs; do
7665                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7666                         cf_add_1lib=
7667                         break
7668                 fi
7669         done
7670         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7671 done
7672 LIBS="$cf_add_libs"
7673
7674 else
7675   echo "$as_me:7675: checking for regcomp in -lpcreposix" >&5
7676 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7677 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7678   echo $ECHO_N "(cached) $ECHO_C" >&6
7679 else
7680   ac_check_lib_save_LIBS=$LIBS
7681 LIBS="-lpcreposix  $LIBS"
7682 cat >"conftest.$ac_ext" <<_ACEOF
7683 #line 7683 "configure"
7684 #include "confdefs.h"
7685
7686 /* Override any gcc2 internal prototype to avoid an error.  */
7687 #ifdef __cplusplus
7688 extern "C"
7689 #endif
7690 /* We use char because int might match the return type of a gcc2
7691    builtin and then its argument prototype would still apply.  */
7692 char regcomp ();
7693 int
7694 main (void)
7695 {
7696 regcomp ();
7697   ;
7698   return 0;
7699 }
7700 _ACEOF
7701 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7702 if { (eval echo "$as_me:7702: \"$ac_link\"") >&5
7703   (eval $ac_link) 2>&5
7704   ac_status=$?
7705   echo "$as_me:7705: \$? = $ac_status" >&5
7706   (exit "$ac_status"); } &&
7707          { ac_try='test -s "conftest$ac_exeext"'
7708   { (eval echo "$as_me:7708: \"$ac_try\"") >&5
7709   (eval $ac_try) 2>&5
7710   ac_status=$?
7711   echo "$as_me:7711: \$? = $ac_status" >&5
7712   (exit "$ac_status"); }; }; then
7713   ac_cv_lib_pcreposix_regcomp=yes
7714 else
7715   echo "$as_me: failed program was:" >&5
7716 cat "conftest.$ac_ext" >&5
7717 ac_cv_lib_pcreposix_regcomp=no
7718 fi
7719 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7720 LIBS=$ac_check_lib_save_LIBS
7721 fi
7722 echo "$as_me:7722: result: $ac_cv_lib_pcreposix_regcomp" >&5
7723 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7724 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7725
7726 cf_add_libs="$LIBS"
7727 # reverse order
7728 cf_add_0lib=
7729 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7730 # filter duplicates
7731 for cf_add_1lib in $cf_add_0lib; do
7732         for cf_add_2lib in $cf_add_libs; do
7733                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7734                         cf_add_1lib=
7735                         break
7736                 fi
7737         done
7738         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7739 done
7740 LIBS="$cf_add_libs"
7741
7742 else
7743   { { echo "$as_me:7743: error: Cannot find PCRE2 POSIX library" >&5
7744 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7745    { (exit 1); exit 1; }; }
7746 fi
7747
7748 fi
7749
7750                 ;;
7751         esac
7752
7753         # either way, check for the library header files
7754
7755 for ac_header in pcre2posix.h pcreposix.h
7756 do
7757 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7758 echo "$as_me:7758: checking for $ac_header" >&5
7759 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7760 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7761   echo $ECHO_N "(cached) $ECHO_C" >&6
7762 else
7763   cat >"conftest.$ac_ext" <<_ACEOF
7764 #line 7764 "configure"
7765 #include "confdefs.h"
7766 #include <$ac_header>
7767 _ACEOF
7768 if { (eval echo "$as_me:7768: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7769   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7770   ac_status=$?
7771   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7772   rm -f conftest.er1
7773   cat conftest.err >&5
7774   echo "$as_me:7774: \$? = $ac_status" >&5
7775   (exit "$ac_status"); } >/dev/null; then
7776   if test -s conftest.err; then
7777     ac_cpp_err=$ac_c_preproc_warn_flag
7778   else
7779     ac_cpp_err=
7780   fi
7781 else
7782   ac_cpp_err=yes
7783 fi
7784 if test -z "$ac_cpp_err"; then
7785   eval "$as_ac_Header=yes"
7786 else
7787   echo "$as_me: failed program was:" >&5
7788   cat "conftest.$ac_ext" >&5
7789   eval "$as_ac_Header=no"
7790 fi
7791 rm -f conftest.err "conftest.$ac_ext"
7792 fi
7793 echo "$as_me:7793: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7794 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7795 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7796   cat >>confdefs.h <<EOF
7797 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7798 EOF
7799
7800 fi
7801 done
7802
7803 fi
7804
7805 # not everyone has "test -c"
7806 if test -c /dev/sysmouse 2>/dev/null ; then
7807 echo "$as_me:7807: checking if you want to use sysmouse" >&5
7808 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7809
7810 # Check whether --with-sysmouse or --without-sysmouse was given.
7811 if test "${with_sysmouse+set}" = set; then
7812   withval="$with_sysmouse"
7813   cf_with_sysmouse=$withval
7814 else
7815   cf_with_sysmouse=maybe
7816 fi;
7817         if test "$cf_with_sysmouse" != no ; then
7818         cat >"conftest.$ac_ext" <<_ACEOF
7819 #line 7819 "configure"
7820 #include "confdefs.h"
7821
7822 #include <osreldate.h>
7823 #if (__FreeBSD_version >= 400017)
7824 #include <sys/consio.h>
7825 #include <sys/fbio.h>
7826 #else
7827 #include <machine/console.h>
7828 #endif
7829
7830 int
7831 main (void)
7832 {
7833
7834         struct mouse_info the_mouse;
7835         ioctl(0, CONS_MOUSECTL, &the_mouse);
7836
7837   ;
7838   return 0;
7839 }
7840 _ACEOF
7841 rm -f "conftest.$ac_objext"
7842 if { (eval echo "$as_me:7842: \"$ac_compile\"") >&5
7843   (eval $ac_compile) 2>&5
7844   ac_status=$?
7845   echo "$as_me:7845: \$? = $ac_status" >&5
7846   (exit "$ac_status"); } &&
7847          { ac_try='test -s "conftest.$ac_objext"'
7848   { (eval echo "$as_me:7848: \"$ac_try\"") >&5
7849   (eval $ac_try) 2>&5
7850   ac_status=$?
7851   echo "$as_me:7851: \$? = $ac_status" >&5
7852   (exit "$ac_status"); }; }; then
7853   cf_with_sysmouse=yes
7854 else
7855   echo "$as_me: failed program was:" >&5
7856 cat "conftest.$ac_ext" >&5
7857 cf_with_sysmouse=no
7858 fi
7859 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7860         fi
7861 echo "$as_me:7861: result: $cf_with_sysmouse" >&5
7862 echo "${ECHO_T}$cf_with_sysmouse" >&6
7863 test "$cf_with_sysmouse" = yes &&
7864 cat >>confdefs.h <<\EOF
7865 #define USE_SYSMOUSE 1
7866 EOF
7867
7868 fi
7869
7870 # pretend that ncurses==ncursesw==ncursest
7871 echo "$as_me:7871: checking if you want to disable library suffixes" >&5
7872 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7873
7874 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7875 if test "${enable_lib_suffixes+set}" = set; then
7876   enableval="$enable_lib_suffixes"
7877   test "$enableval" != no && enableval=yes
7878         if test "$enableval" != "yes" ; then
7879     disable_lib_suffixes=yes
7880         else
7881                 disable_lib_suffixes=no
7882         fi
7883 else
7884   enableval=yes
7885         disable_lib_suffixes=no
7886
7887 fi;
7888 echo "$as_me:7888: result: $disable_lib_suffixes" >&5
7889 echo "${ECHO_T}$disable_lib_suffixes" >&6
7890
7891 ### If we're building with rpath, try to link non-standard libs that way too.
7892 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7893
7894 echo "$as_me:7894: checking if rpath-hack should be disabled" >&5
7895 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7896
7897 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7898 if test "${enable_rpath_hack+set}" = set; then
7899   enableval="$enable_rpath_hack"
7900   test "$enableval" != no && enableval=yes
7901         if test "$enableval" != "yes" ; then
7902     enable_rpath_hack=no
7903         else
7904                 enable_rpath_hack=yes
7905         fi
7906 else
7907   enableval=yes
7908         enable_rpath_hack=yes
7909
7910 fi;
7911 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
7912 echo "$as_me:7912: result: $cf_disable_rpath_hack" >&5
7913 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7914
7915 if test "$enable_rpath_hack" = yes ; then
7916
7917 echo "$as_me:7917: checking for updated LDFLAGS" >&5
7918 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7919 if test -n "$LD_RPATH_OPT" ; then
7920         echo "$as_me:7920: result: maybe" >&5
7921 echo "${ECHO_T}maybe" >&6
7922
7923         for ac_prog in ldd
7924 do
7925   # Extract the first word of "$ac_prog", so it can be a program name with args.
7926 set dummy $ac_prog; ac_word=$2
7927 echo "$as_me:7927: checking for $ac_word" >&5
7928 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7929 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7930   echo $ECHO_N "(cached) $ECHO_C" >&6
7931 else
7932   if test -n "$cf_ldd_prog"; then
7933   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7934 else
7935   ac_save_IFS=$IFS; IFS=$ac_path_separator
7936 ac_dummy="$PATH"
7937 for ac_dir in $ac_dummy; do
7938   IFS=$ac_save_IFS
7939   test -z "$ac_dir" && ac_dir=.
7940   $as_executable_p "$ac_dir/$ac_word" || continue
7941 ac_cv_prog_cf_ldd_prog="$ac_prog"
7942 echo "$as_me:7942: found $ac_dir/$ac_word" >&5
7943 break
7944 done
7945
7946 fi
7947 fi
7948 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7949 if test -n "$cf_ldd_prog"; then
7950   echo "$as_me:7950: result: $cf_ldd_prog" >&5
7951 echo "${ECHO_T}$cf_ldd_prog" >&6
7952 else
7953   echo "$as_me:7953: result: no" >&5
7954 echo "${ECHO_T}no" >&6
7955 fi
7956
7957   test -n "$cf_ldd_prog" && break
7958 done
7959 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7960
7961         cf_rpath_list="/usr/lib /lib"
7962         if test "$cf_ldd_prog" != no
7963         then
7964                 cf_rpath_oops=
7965
7966 cat >"conftest.$ac_ext" <<_ACEOF
7967 #line 7967 "configure"
7968 #include "confdefs.h"
7969 #include <stdio.h>
7970 int
7971 main (void)
7972 {
7973 printf("Hello");
7974   ;
7975   return 0;
7976 }
7977 _ACEOF
7978 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7979 if { (eval echo "$as_me:7979: \"$ac_link\"") >&5
7980   (eval $ac_link) 2>&5
7981   ac_status=$?
7982   echo "$as_me:7982: \$? = $ac_status" >&5
7983   (exit "$ac_status"); } &&
7984          { ac_try='test -s "conftest$ac_exeext"'
7985   { (eval echo "$as_me:7985: \"$ac_try\"") >&5
7986   (eval $ac_try) 2>&5
7987   ac_status=$?
7988   echo "$as_me:7988: \$? = $ac_status" >&5
7989   (exit "$ac_status"); }; }; then
7990   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7991                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7992 else
7993   echo "$as_me: failed program was:" >&5
7994 cat "conftest.$ac_ext" >&5
7995 fi
7996 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7997
7998                 # If we passed the link-test, but get a "not found" on a given library,
7999                 # this could be due to inept reconfiguration of gcc to make it only
8000                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8001                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8002                 # /usr/local libraries.
8003                 if test -n "$cf_rpath_oops"
8004                 then
8005                         for cf_rpath_src in $cf_rpath_oops
8006                         do
8007                                 for cf_rpath_dir in \
8008                                         /usr/local \
8009                                         /usr/pkg \
8010                                         /opt/sfw
8011                                 do
8012                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8013                                         then
8014                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8015
8016 echo "${as_me:-configure}:8016: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8017
8018                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8019                                                 break
8020                                         fi
8021                                 done
8022                         done
8023                 fi
8024         fi
8025
8026         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8027
8028 echo "${as_me:-configure}:8028: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8029
8030 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8031
8032 echo "${as_me:-configure}:8032: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8033
8034 cf_rpath_dst=
8035 for cf_rpath_src in $LDFLAGS
8036 do
8037         case "$cf_rpath_src" in
8038         (-L*)
8039
8040                 # check if this refers to a directory which we will ignore
8041                 cf_rpath_skip=no
8042                 if test -n "$cf_rpath_list"
8043                 then
8044                         for cf_rpath_item in $cf_rpath_list
8045                         do
8046                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8047                                 then
8048                                         cf_rpath_skip=yes
8049                                         break
8050                                 fi
8051                         done
8052                 fi
8053
8054                 if test "$cf_rpath_skip" = no
8055                 then
8056                         # transform the option
8057                         if test "$LD_RPATH_OPT" = "-R " ; then
8058                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8059                         else
8060                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8061                         fi
8062
8063                         # if we have not already added this, add it now
8064                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8065                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8066                         then
8067                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8068
8069 echo "${as_me:-configure}:8069: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8070
8071                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8072                         fi
8073                 fi
8074                 ;;
8075         esac
8076         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8077 done
8078 LDFLAGS=$cf_rpath_dst
8079
8080 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8081
8082 echo "${as_me:-configure}:8082: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8083
8084 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8085
8086 echo "${as_me:-configure}:8086: testing ...checking LIBS $LIBS ..." 1>&5
8087
8088 cf_rpath_dst=
8089 for cf_rpath_src in $LIBS
8090 do
8091         case "$cf_rpath_src" in
8092         (-L*)
8093
8094                 # check if this refers to a directory which we will ignore
8095                 cf_rpath_skip=no
8096                 if test -n "$cf_rpath_list"
8097                 then
8098                         for cf_rpath_item in $cf_rpath_list
8099                         do
8100                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8101                                 then
8102                                         cf_rpath_skip=yes
8103                                         break
8104                                 fi
8105                         done
8106                 fi
8107
8108                 if test "$cf_rpath_skip" = no
8109                 then
8110                         # transform the option
8111                         if test "$LD_RPATH_OPT" = "-R " ; then
8112                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8113                         else
8114                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8115                         fi
8116
8117                         # if we have not already added this, add it now
8118                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8119                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8120                         then
8121                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8122
8123 echo "${as_me:-configure}:8123: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8124
8125                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8126                         fi
8127                 fi
8128                 ;;
8129         esac
8130         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8131 done
8132 LIBS=$cf_rpath_dst
8133
8134 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8135
8136 echo "${as_me:-configure}:8136: testing ...checked LIBS $LIBS ..." 1>&5
8137
8138         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8139
8140 echo "${as_me:-configure}:8140: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8141
8142 else
8143         echo "$as_me:8143: result: no" >&5
8144 echo "${ECHO_T}no" >&6
8145 fi
8146
8147 fi
8148
8149 fi
8150
8151 ### Depending on the system, someone may use rpath to build ncurses but not
8152 # want users of the package to rely upon that feature.  Give those people an
8153 # option to suppress that detail from EXTRA_LDFLAGS.
8154 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8155 if test -n "$EXTRA_PKG_LDFLAGS"
8156 then
8157         echo "$as_me:8157: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8158 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8159
8160 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8161 if test "${enable_pkg_ldflags+set}" = set; then
8162   enableval="$enable_pkg_ldflags"
8163   test "$enableval" != no && enableval=yes
8164         if test "$enableval" != "yes" ; then
8165     disable_pkg_ldflags=yes
8166         else
8167                 disable_pkg_ldflags=no
8168         fi
8169 else
8170   enableval=yes
8171         disable_pkg_ldflags=no
8172
8173 fi;
8174         echo "$as_me:8174: result: $disable_pkg_ldflags" >&5
8175 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8176         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8177 fi
8178
8179 ###############################################################################
8180
8181 ###     use option --with-extra-suffix to append suffix to headers and libraries
8182 echo "$as_me:8182: checking if you wish to append extra suffix to header/library paths" >&5
8183 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8184 EXTRA_SUFFIX=
8185
8186 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8187 if test "${with_extra_suffix+set}" = set; then
8188   withval="$with_extra_suffix"
8189   case x$withval in
8190         (xno)
8191                 ;;
8192         (xyes|x)
8193                 EXTRA_SUFFIX=$cf_cv_abi_version
8194                 ;;
8195         (*)
8196                 EXTRA_SUFFIX=$withval
8197                 ;;
8198         esac
8199
8200 fi;
8201 echo "$as_me:8201: result: $EXTRA_SUFFIX" >&5
8202 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8203
8204 ###     use option --disable-overwrite to leave out the link to -lcurses
8205 echo "$as_me:8205: checking if you wish to install ncurses overwriting curses" >&5
8206 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8207
8208 # Check whether --enable-overwrite or --disable-overwrite was given.
8209 if test "${enable_overwrite+set}" = set; then
8210   enableval="$enable_overwrite"
8211   with_overwrite=$enableval
8212 else
8213   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8214 fi;
8215 echo "$as_me:8215: result: $with_overwrite" >&5
8216 echo "${ECHO_T}$with_overwrite" >&6
8217
8218 echo "$as_me:8218: checking if external terminfo-database is used" >&5
8219 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8220
8221 # Check whether --enable-database or --disable-database was given.
8222 if test "${enable_database+set}" = set; then
8223   enableval="$enable_database"
8224   use_database=$enableval
8225 else
8226   use_database=yes
8227 fi;
8228 echo "$as_me:8228: result: $use_database" >&5
8229 echo "${ECHO_T}$use_database" >&6
8230
8231 case "$host_os" in
8232 (os2*)
8233         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8234         ;;
8235 (*)
8236         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8237         ;;
8238 esac
8239
8240 NCURSES_USE_DATABASE=0
8241 if test "$use_database" != no ; then
8242         NCURSES_USE_DATABASE=1
8243
8244         echo "$as_me:8244: checking which terminfo source-file will be installed" >&5
8245 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8246
8247 # Check whether --with-database or --without-database was given.
8248 if test "${with_database+set}" = set; then
8249   withval="$with_database"
8250   TERMINFO_SRC=$withval
8251 fi;
8252         echo "$as_me:8252: result: $TERMINFO_SRC" >&5
8253 echo "${ECHO_T}$TERMINFO_SRC" >&6
8254
8255         echo "$as_me:8255: checking whether to use hashed database instead of directory/tree" >&5
8256 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8257
8258 # Check whether --with-hashed-db or --without-hashed-db was given.
8259 if test "${with_hashed_db+set}" = set; then
8260   withval="$with_hashed_db"
8261
8262 else
8263   with_hashed_db=no
8264 fi;
8265         echo "$as_me:8265: result: $with_hashed_db" >&5
8266 echo "${ECHO_T}$with_hashed_db" >&6
8267 else
8268         with_hashed_db=no
8269 fi
8270
8271 echo "$as_me:8271: checking for list of fallback descriptions" >&5
8272 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8273
8274 # Check whether --with-fallbacks or --without-fallbacks was given.
8275 if test "${with_fallbacks+set}" = set; then
8276   withval="$with_fallbacks"
8277   with_fallback=$withval
8278 else
8279   with_fallback=
8280 fi;
8281 echo "$as_me:8281: result: $with_fallback" >&5
8282 echo "${ECHO_T}$with_fallback" >&6
8283
8284 case ".$with_fallback" in
8285 (.|.no)
8286         FALLBACK_LIST=
8287         ;;
8288 (.yes)
8289         { echo "$as_me:8289: WARNING: expected a list of terminal descriptions" >&5
8290 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8291         ;;
8292 (*)
8293         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8294         ;;
8295 esac
8296
8297 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8298 # tree for generating the terminal descriptions that will be compiled into the
8299 # library.  If your toolchain is old, it may not handle current terminal
8300 # databases.  Use configure-options to point to the tools which will be used,
8301 # rather than the first ones found on the $PATH.
8302 if test -n "$ac_tool_prefix"; then
8303   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8304 set dummy ${ac_tool_prefix}tic; ac_word=$2
8305 echo "$as_me:8305: checking for $ac_word" >&5
8306 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8307 if test "${ac_cv_prog_TIC+set}" = set; then
8308   echo $ECHO_N "(cached) $ECHO_C" >&6
8309 else
8310   if test -n "$TIC"; then
8311   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8312 else
8313   ac_save_IFS=$IFS; IFS=$ac_path_separator
8314 ac_dummy="$PATH"
8315 for ac_dir in $ac_dummy; do
8316   IFS=$ac_save_IFS
8317   test -z "$ac_dir" && ac_dir=.
8318   $as_executable_p "$ac_dir/$ac_word" || continue
8319 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8320 echo "$as_me:8320: found $ac_dir/$ac_word" >&5
8321 break
8322 done
8323
8324 fi
8325 fi
8326 TIC=$ac_cv_prog_TIC
8327 if test -n "$TIC"; then
8328   echo "$as_me:8328: result: $TIC" >&5
8329 echo "${ECHO_T}$TIC" >&6
8330 else
8331   echo "$as_me:8331: result: no" >&5
8332 echo "${ECHO_T}no" >&6
8333 fi
8334
8335 fi
8336 if test -z "$ac_cv_prog_TIC"; then
8337   ac_ct_TIC=$TIC
8338   # Extract the first word of "tic", so it can be a program name with args.
8339 set dummy tic; ac_word=$2
8340 echo "$as_me:8340: checking for $ac_word" >&5
8341 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8342 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8343   echo $ECHO_N "(cached) $ECHO_C" >&6
8344 else
8345   if test -n "$ac_ct_TIC"; then
8346   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8347 else
8348   ac_save_IFS=$IFS; IFS=$ac_path_separator
8349 ac_dummy="$PATH"
8350 for ac_dir in $ac_dummy; do
8351   IFS=$ac_save_IFS
8352   test -z "$ac_dir" && ac_dir=.
8353   $as_executable_p "$ac_dir/$ac_word" || continue
8354 ac_cv_prog_ac_ct_TIC="tic"
8355 echo "$as_me:8355: found $ac_dir/$ac_word" >&5
8356 break
8357 done
8358
8359 fi
8360 fi
8361 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8362 if test -n "$ac_ct_TIC"; then
8363   echo "$as_me:8363: result: $ac_ct_TIC" >&5
8364 echo "${ECHO_T}$ac_ct_TIC" >&6
8365 else
8366   echo "$as_me:8366: result: no" >&5
8367 echo "${ECHO_T}no" >&6
8368 fi
8369
8370   TIC=$ac_ct_TIC
8371 else
8372   TIC="$ac_cv_prog_TIC"
8373 fi
8374
8375 if test -n "$ac_tool_prefix"; then
8376   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8377 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8378 echo "$as_me:8378: checking for $ac_word" >&5
8379 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8380 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8381   echo $ECHO_N "(cached) $ECHO_C" >&6
8382 else
8383   if test -n "$INFOCMP"; then
8384   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8385 else
8386   ac_save_IFS=$IFS; IFS=$ac_path_separator
8387 ac_dummy="$PATH"
8388 for ac_dir in $ac_dummy; do
8389   IFS=$ac_save_IFS
8390   test -z "$ac_dir" && ac_dir=.
8391   $as_executable_p "$ac_dir/$ac_word" || continue
8392 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8393 echo "$as_me:8393: found $ac_dir/$ac_word" >&5
8394 break
8395 done
8396
8397 fi
8398 fi
8399 INFOCMP=$ac_cv_prog_INFOCMP
8400 if test -n "$INFOCMP"; then
8401   echo "$as_me:8401: result: $INFOCMP" >&5
8402 echo "${ECHO_T}$INFOCMP" >&6
8403 else
8404   echo "$as_me:8404: result: no" >&5
8405 echo "${ECHO_T}no" >&6
8406 fi
8407
8408 fi
8409 if test -z "$ac_cv_prog_INFOCMP"; then
8410   ac_ct_INFOCMP=$INFOCMP
8411   # Extract the first word of "infocmp", so it can be a program name with args.
8412 set dummy infocmp; ac_word=$2
8413 echo "$as_me:8413: checking for $ac_word" >&5
8414 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8415 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8416   echo $ECHO_N "(cached) $ECHO_C" >&6
8417 else
8418   if test -n "$ac_ct_INFOCMP"; then
8419   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8420 else
8421   ac_save_IFS=$IFS; IFS=$ac_path_separator
8422 ac_dummy="$PATH"
8423 for ac_dir in $ac_dummy; do
8424   IFS=$ac_save_IFS
8425   test -z "$ac_dir" && ac_dir=.
8426   $as_executable_p "$ac_dir/$ac_word" || continue
8427 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8428 echo "$as_me:8428: found $ac_dir/$ac_word" >&5
8429 break
8430 done
8431
8432 fi
8433 fi
8434 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8435 if test -n "$ac_ct_INFOCMP"; then
8436   echo "$as_me:8436: result: $ac_ct_INFOCMP" >&5
8437 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8438 else
8439   echo "$as_me:8439: result: no" >&5
8440 echo "${ECHO_T}no" >&6
8441 fi
8442
8443   INFOCMP=$ac_ct_INFOCMP
8444 else
8445   INFOCMP="$ac_cv_prog_INFOCMP"
8446 fi
8447
8448 if test -n "$FALLBACK_LIST"
8449 then
8450
8451 # Check whether --with-tic-path or --without-tic-path was given.
8452 if test "${with_tic_path+set}" = set; then
8453   withval="$with_tic_path"
8454   echo "$as_me:8454: checking for tic program for fallbacks" >&5
8455 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8456                 TIC=$withval
8457                 echo "$as_me:8457: result: $TIC" >&5
8458 echo "${ECHO_T}$TIC" >&6
8459
8460 if test "x$prefix" != xNONE; then
8461         cf_path_syntax="$prefix"
8462 else
8463         cf_path_syntax="$ac_default_prefix"
8464 fi
8465
8466 case ".$TIC" in
8467 (.\$\(*\)*|.\'*\'*)
8468         ;;
8469 (..|./*|.\\*)
8470         ;;
8471 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8472         ;;
8473 (.\$\{*prefix\}*|.\$\{*dir\}*)
8474         eval TIC="$TIC"
8475         case ".$TIC" in
8476         (.NONE/*)
8477                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8478                 ;;
8479         esac
8480         ;;
8481 (.no|.NONE/*)
8482         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8483         ;;
8484 (*)
8485         { { echo "$as_me:8485: error: expected a pathname, not \"$TIC\"" >&5
8486 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8487    { (exit 1); exit 1; }; }
8488         ;;
8489 esac
8490
8491 else
8492
8493 test -z "$TIC" && TIC="tic"
8494 for ac_prog in $TIC tic
8495 do
8496   # Extract the first word of "$ac_prog", so it can be a program name with args.
8497 set dummy $ac_prog; ac_word=$2
8498 echo "$as_me:8498: checking for $ac_word" >&5
8499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8500 if test "${ac_cv_path_TIC+set}" = set; then
8501   echo $ECHO_N "(cached) $ECHO_C" >&6
8502 else
8503   case $TIC in
8504   [\\/]* | ?:[\\/]*)
8505   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8506   ;;
8507   *)
8508   ac_save_IFS=$IFS; IFS=$ac_path_separator
8509 ac_dummy="$PATH:/usr/local/ncurses/bin"
8510 for ac_dir in $ac_dummy; do
8511   IFS=$ac_save_IFS
8512   test -z "$ac_dir" && ac_dir=.
8513   if $as_executable_p "$ac_dir/$ac_word"; then
8514    ac_cv_path_TIC="$ac_dir/$ac_word"
8515    echo "$as_me:8515: found $ac_dir/$ac_word" >&5
8516    break
8517 fi
8518 done
8519
8520   ;;
8521 esac
8522 fi
8523 TIC=$ac_cv_path_TIC
8524
8525 if test -n "$TIC"; then
8526   echo "$as_me:8526: result: $TIC" >&5
8527 echo "${ECHO_T}$TIC" >&6
8528 else
8529   echo "$as_me:8529: result: no" >&5
8530 echo "${ECHO_T}no" >&6
8531 fi
8532
8533   test -n "$TIC" && break
8534 done
8535 test -n "$TIC" || TIC="$TIC"
8536
8537 cf_path_prog=""
8538 cf_path_args=""
8539 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8540 for cf_temp in $ac_cv_path_TIC
8541 do
8542         if test -z "$cf_path_prog" ; then
8543                 if test "$with_full_paths" = yes ; then
8544
8545 if test "x$prefix" != xNONE; then
8546         cf_path_syntax="$prefix"
8547 else
8548         cf_path_syntax="$ac_default_prefix"
8549 fi
8550
8551 case ".$cf_temp" in
8552 (.\$\(*\)*|.\'*\'*)
8553         ;;
8554 (..|./*|.\\*)
8555         ;;
8556 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8557         ;;
8558 (.\$\{*prefix\}*|.\$\{*dir\}*)
8559         eval cf_temp="$cf_temp"
8560         case ".$cf_temp" in
8561         (.NONE/*)
8562                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8563                 ;;
8564         esac
8565         ;;
8566 (.no|.NONE/*)
8567         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8568         ;;
8569 (*)
8570         break
8571         ;;
8572 esac
8573
8574                         cf_path_prog="$cf_temp"
8575                 else
8576                         cf_path_prog="`basename "$cf_temp"`"
8577                 fi
8578         elif test -z "$cf_path_args" ; then
8579                 cf_path_args="$cf_temp"
8580         else
8581                 cf_path_args="$cf_path_args $cf_temp"
8582         fi
8583 done
8584 IFS="$cf_save_ifs"
8585
8586 if test -n "$cf_path_prog" ; then
8587
8588 echo "${as_me:-configure}:8588: testing defining path for ${cf_path_prog} ..." 1>&5
8589
8590 cat >>confdefs.h <<EOF
8591 #define TIC_PATH "$cf_path_prog"
8592 EOF
8593
8594         test -n "$cf_path_args" &&
8595 cat >>confdefs.h <<EOF
8596 #define TIC_ARGS "$cf_path_args"
8597 EOF
8598
8599 fi
8600
8601                 if test -z "$TIC"
8602                 then
8603                         { echo "$as_me:8603: WARNING: no tic program found for fallbacks" >&5
8604 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8605                 fi
8606
8607 fi;
8608
8609 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8610 if test "${with_infocmp_path+set}" = set; then
8611   withval="$with_infocmp_path"
8612   echo "$as_me:8612: checking for infocmp program for fallbacks" >&5
8613 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8614                 INFOCMP=$withval
8615                 echo "$as_me:8615: result: $INFOCMP" >&5
8616 echo "${ECHO_T}$INFOCMP" >&6
8617
8618 if test "x$prefix" != xNONE; then
8619         cf_path_syntax="$prefix"
8620 else
8621         cf_path_syntax="$ac_default_prefix"
8622 fi
8623
8624 case ".$INFOCMP" in
8625 (.\$\(*\)*|.\'*\'*)
8626         ;;
8627 (..|./*|.\\*)
8628         ;;
8629 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8630         ;;
8631 (.\$\{*prefix\}*|.\$\{*dir\}*)
8632         eval INFOCMP="$INFOCMP"
8633         case ".$INFOCMP" in
8634         (.NONE/*)
8635                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8636                 ;;
8637         esac
8638         ;;
8639 (.no|.NONE/*)
8640         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8641         ;;
8642 (*)
8643         { { echo "$as_me:8643: error: expected a pathname, not \"$INFOCMP\"" >&5
8644 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8645    { (exit 1); exit 1; }; }
8646         ;;
8647 esac
8648
8649 else
8650
8651 test -z "$INFOCMP" && INFOCMP="infocmp"
8652 for ac_prog in $INFOCMP infocmp
8653 do
8654   # Extract the first word of "$ac_prog", so it can be a program name with args.
8655 set dummy $ac_prog; ac_word=$2
8656 echo "$as_me:8656: checking for $ac_word" >&5
8657 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8658 if test "${ac_cv_path_INFOCMP+set}" = set; then
8659   echo $ECHO_N "(cached) $ECHO_C" >&6
8660 else
8661   case $INFOCMP in
8662   [\\/]* | ?:[\\/]*)
8663   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8664   ;;
8665   *)
8666   ac_save_IFS=$IFS; IFS=$ac_path_separator
8667 ac_dummy="$PATH:/usr/local/ncurses/bin"
8668 for ac_dir in $ac_dummy; do
8669   IFS=$ac_save_IFS
8670   test -z "$ac_dir" && ac_dir=.
8671   if $as_executable_p "$ac_dir/$ac_word"; then
8672    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8673    echo "$as_me:8673: found $ac_dir/$ac_word" >&5
8674    break
8675 fi
8676 done
8677
8678   ;;
8679 esac
8680 fi
8681 INFOCMP=$ac_cv_path_INFOCMP
8682
8683 if test -n "$INFOCMP"; then
8684   echo "$as_me:8684: result: $INFOCMP" >&5
8685 echo "${ECHO_T}$INFOCMP" >&6
8686 else
8687   echo "$as_me:8687: result: no" >&5
8688 echo "${ECHO_T}no" >&6
8689 fi
8690
8691   test -n "$INFOCMP" && break
8692 done
8693 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8694
8695 cf_path_prog=""
8696 cf_path_args=""
8697 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8698 for cf_temp in $ac_cv_path_INFOCMP
8699 do
8700         if test -z "$cf_path_prog" ; then
8701                 if test "$with_full_paths" = yes ; then
8702
8703 if test "x$prefix" != xNONE; then
8704         cf_path_syntax="$prefix"
8705 else
8706         cf_path_syntax="$ac_default_prefix"
8707 fi
8708
8709 case ".$cf_temp" in
8710 (.\$\(*\)*|.\'*\'*)
8711         ;;
8712 (..|./*|.\\*)
8713         ;;
8714 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8715         ;;
8716 (.\$\{*prefix\}*|.\$\{*dir\}*)
8717         eval cf_temp="$cf_temp"
8718         case ".$cf_temp" in
8719         (.NONE/*)
8720                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8721                 ;;
8722         esac
8723         ;;
8724 (.no|.NONE/*)
8725         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8726         ;;
8727 (*)
8728         break
8729         ;;
8730 esac
8731
8732                         cf_path_prog="$cf_temp"
8733                 else
8734                         cf_path_prog="`basename "$cf_temp"`"
8735                 fi
8736         elif test -z "$cf_path_args" ; then
8737                 cf_path_args="$cf_temp"
8738         else
8739                 cf_path_args="$cf_path_args $cf_temp"
8740         fi
8741 done
8742 IFS="$cf_save_ifs"
8743
8744 if test -n "$cf_path_prog" ; then
8745
8746 echo "${as_me:-configure}:8746: testing defining path for ${cf_path_prog} ..." 1>&5
8747
8748 cat >>confdefs.h <<EOF
8749 #define INFOCMP_PATH "$cf_path_prog"
8750 EOF
8751
8752         test -n "$cf_path_args" &&
8753 cat >>confdefs.h <<EOF
8754 #define INFOCMP_ARGS "$cf_path_args"
8755 EOF
8756
8757 fi
8758
8759                 if test -z "$INFOCMP"
8760                 then
8761                         { echo "$as_me:8761: WARNING: no infocmp program found for fallbacks" >&5
8762 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8763                 fi
8764
8765 fi;
8766
8767         test -z "$TIC" && FALLBACK_LIST=
8768         test -z "$INFOCMP" && FALLBACK_LIST=
8769         if test -z "$FALLBACK_LIST"
8770         then
8771                 { echo "$as_me:8771: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8772 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8773         fi
8774 fi
8775
8776 USE_FALLBACKS=
8777 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8778
8779 echo "$as_me:8779: checking if you want modern xterm or antique" >&5
8780 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8781
8782 # Check whether --with-xterm-new or --without-xterm-new was given.
8783 if test "${with_xterm_new+set}" = set; then
8784   withval="$with_xterm_new"
8785   with_xterm_new=$withval
8786 else
8787   with_xterm_new=yes
8788 fi;
8789 case "$with_xterm_new" in
8790 (no) with_xterm_new=xterm-old;;
8791 (*)      with_xterm_new=xterm-new;;
8792 esac
8793 echo "$as_me:8793: result: $with_xterm_new" >&5
8794 echo "${ECHO_T}$with_xterm_new" >&6
8795 WHICH_XTERM=$with_xterm_new
8796
8797 echo "$as_me:8797: checking if xterm backspace sends BS or DEL" >&5
8798 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8799
8800 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8801 if test "${with_xterm_kbs+set}" = set; then
8802   withval="$with_xterm_kbs"
8803   with_xterm_kbs=$withval
8804 else
8805   with_xterm_kbs=BS
8806 fi;
8807 case x$with_xterm_kbs in
8808 (xyes|xno|xBS|xbs|x8)
8809         with_xterm_kbs=BS
8810         ;;
8811 (xDEL|xdel|x127)
8812         with_xterm_kbs=DEL
8813         ;;
8814 (*)
8815         with_xterm_kbs=$withval
8816         ;;
8817 esac
8818 echo "$as_me:8818: result: $with_xterm_kbs" >&5
8819 echo "${ECHO_T}$with_xterm_kbs" >&6
8820 XTERM_KBS=$with_xterm_kbs
8821
8822 MAKE_TERMINFO=
8823 if test "$use_database" = no ; then
8824         TERMINFO="${datadir}/terminfo"
8825         MAKE_TERMINFO="#"
8826 else
8827
8828 echo "$as_me:8828: checking for list of terminfo directories" >&5
8829 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8830
8831 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8832 if test "${with_terminfo_dirs+set}" = set; then
8833   withval="$with_terminfo_dirs"
8834
8835 else
8836   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8837 fi;
8838 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8839 cf_dst_path=
8840 for cf_src_path in $withval
8841 do
8842
8843 if test "x$prefix" != xNONE; then
8844         cf_path_syntax="$prefix"
8845 else
8846         cf_path_syntax="$ac_default_prefix"
8847 fi
8848
8849 case ".$cf_src_path" in
8850 (.\$\(*\)*|.\'*\'*)
8851         ;;
8852 (..|./*|.\\*)
8853         ;;
8854 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8855         ;;
8856 (.\$\{*prefix\}*|.\$\{*dir\}*)
8857         eval cf_src_path="$cf_src_path"
8858         case ".$cf_src_path" in
8859         (.NONE/*)
8860                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8861                 ;;
8862         esac
8863         ;;
8864 (.no|.NONE/*)
8865         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8866         ;;
8867 (*)
8868         { { echo "$as_me:8868: error: expected a pathname, not \"$cf_src_path\"" >&5
8869 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8870    { (exit 1); exit 1; }; }
8871         ;;
8872 esac
8873
8874   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8875   cf_dst_path="${cf_dst_path}${cf_src_path}"
8876 done
8877 IFS="$ac_save_ifs"
8878
8879 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8880 # so we have to check/work around.  We do prefer the result of "eval"...
8881 eval cf_dst_eval="$cf_dst_path"
8882 case "x$cf_dst_eval" in
8883 (xNONE*)
8884         TERMINFO_DIRS=$cf_dst_path
8885         ;;
8886 (*)
8887         TERMINFO_DIRS="$cf_dst_eval"
8888         ;;
8889 esac
8890
8891 echo "$as_me:8891: result: $TERMINFO_DIRS" >&5
8892 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8893 test -n "$TERMINFO_DIRS" &&
8894 cat >>confdefs.h <<EOF
8895 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8896 EOF
8897
8898 case "x$TERMINFO" in
8899 x???:*)
8900         { echo "$as_me:8900: WARNING: ignoring non-directory/file TERMINFO value" >&5
8901 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8902         unset TERMINFO
8903         ;;
8904 esac
8905
8906 echo "$as_me:8906: checking for default terminfo directory" >&5
8907 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8908
8909 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8910 if test "${with_default_terminfo_dir+set}" = set; then
8911   withval="$with_default_terminfo_dir"
8912
8913 else
8914   withval="${TERMINFO:-${datadir}/terminfo}"
8915 fi; if test -n "${datadir}/terminfo" ; then
8916
8917 if test "x$prefix" != xNONE; then
8918         cf_path_syntax="$prefix"
8919 else
8920         cf_path_syntax="$ac_default_prefix"
8921 fi
8922
8923 case ".$withval" in
8924 (.\$\(*\)*|.\'*\'*)
8925         ;;
8926 (..|./*|.\\*)
8927         ;;
8928 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8929         ;;
8930 (.\$\{*prefix\}*|.\$\{*dir\}*)
8931         eval withval="$withval"
8932         case ".$withval" in
8933         (.NONE/*)
8934                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
8935                 ;;
8936         esac
8937         ;;
8938 (.no|.NONE/*)
8939         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
8940         ;;
8941 (*)
8942         { { echo "$as_me:8942: error: expected a pathname, not \"$withval\"" >&5
8943 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8944    { (exit 1); exit 1; }; }
8945         ;;
8946 esac
8947
8948 fi
8949 eval TERMINFO="$withval"
8950
8951 echo "$as_me:8951: result: $TERMINFO" >&5
8952 echo "${ECHO_T}$TERMINFO" >&6
8953
8954 cat >>confdefs.h <<EOF
8955 #define TERMINFO "$TERMINFO"
8956 EOF
8957
8958 fi
8959
8960 ###     use option --disable-big-core to make tic run on small machines
8961 ###     We need 4Mb, check if we can allocate 50% more than that.
8962 echo "$as_me:8962: checking if big-core option selected" >&5
8963 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8964
8965 # Check whether --enable-big-core or --disable-big-core was given.
8966 if test "${enable_big_core+set}" = set; then
8967   enableval="$enable_big_core"
8968   with_big_core=$enableval
8969 else
8970   if test "$cross_compiling" = yes; then
8971   with_big_core=no
8972 else
8973   cat >"conftest.$ac_ext" <<_ACEOF
8974 #line 8974 "configure"
8975 #include "confdefs.h"
8976
8977 #include <stdlib.h>
8978 #include <string.h>
8979 int main() {
8980         unsigned long n = 6000000L;
8981         char *s = malloc(n);
8982         if (s != 0)
8983                 s[0] = s[n-1] = 0;
8984         ${cf_cv_main_return:-return}(s == 0);
8985 }
8986 _ACEOF
8987 rm -f "conftest$ac_exeext"
8988 if { (eval echo "$as_me:8988: \"$ac_link\"") >&5
8989   (eval $ac_link) 2>&5
8990   ac_status=$?
8991   echo "$as_me:8991: \$? = $ac_status" >&5
8992   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8993   { (eval echo "$as_me:8993: \"$ac_try\"") >&5
8994   (eval $ac_try) 2>&5
8995   ac_status=$?
8996   echo "$as_me:8996: \$? = $ac_status" >&5
8997   (exit "$ac_status"); }; }; then
8998   with_big_core=yes
8999 else
9000   echo "$as_me: program exited with status $ac_status" >&5
9001 echo "$as_me: failed program was:" >&5
9002 cat "conftest.$ac_ext" >&5
9003 with_big_core=no
9004 fi
9005 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9006 fi
9007 fi;
9008 echo "$as_me:9008: result: $with_big_core" >&5
9009 echo "${ECHO_T}$with_big_core" >&6
9010 test "x$with_big_core" = "xyes" &&
9011 cat >>confdefs.h <<\EOF
9012 #define HAVE_BIG_CORE 1
9013 EOF
9014
9015 ### ISO C only guarantees 512-char strings, we have tables which load faster
9016 ### when constructed using "big" strings.  More than the C compiler, the awk
9017 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9018 echo "$as_me:9018: checking if big-strings option selected" >&5
9019 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9020
9021 # Check whether --enable-big-strings or --disable-big-strings was given.
9022 if test "${enable_big_strings+set}" = set; then
9023   enableval="$enable_big_strings"
9024   with_big_strings=$enableval
9025 else
9026
9027         case x$AWK in
9028         (x)
9029                 eval with_big_strings=no
9030                 ;;
9031         (*)
9032                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9033                         | $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
9034                         eval with_big_strings=yes
9035                 else
9036                         eval with_big_strings=no
9037                 fi
9038                 ;;
9039         esac
9040
9041 fi;
9042 echo "$as_me:9042: result: $with_big_strings" >&5
9043 echo "${ECHO_T}$with_big_strings" >&6
9044
9045 USE_BIG_STRINGS=0
9046 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9047
9048 ###     use option --enable-termcap to compile in the termcap fallback support
9049 echo "$as_me:9049: checking if you want termcap-fallback support" >&5
9050 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9051
9052 # Check whether --enable-termcap or --disable-termcap was given.
9053 if test "${enable_termcap+set}" = set; then
9054   enableval="$enable_termcap"
9055   with_termcap=$enableval
9056 else
9057   with_termcap=no
9058 fi;
9059 echo "$as_me:9059: result: $with_termcap" >&5
9060 echo "${ECHO_T}$with_termcap" >&6
9061
9062 NCURSES_USE_TERMCAP=0
9063 if test "x$with_termcap" != "xyes" ; then
9064         if test "$use_database" = no ; then
9065                 if test -z "$with_fallback" ; then
9066                         { { echo "$as_me:9066: error: You have disabled the database w/o specifying fallbacks" >&5
9067 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9068    { (exit 1); exit 1; }; }
9069                 fi
9070         fi
9071
9072 cat >>confdefs.h <<\EOF
9073 #define PURE_TERMINFO 1
9074 EOF
9075
9076 else
9077
9078         if test "$with_ticlib" != no ; then
9079                 { { echo "$as_me:9079: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9080 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9081    { (exit 1); exit 1; }; }
9082         fi
9083
9084         NCURSES_USE_TERMCAP=1
9085         echo "$as_me:9085: checking for list of termcap files" >&5
9086 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9087
9088 # Check whether --with-termpath or --without-termpath was given.
9089 if test "${with_termpath+set}" = set; then
9090   withval="$with_termpath"
9091
9092 else
9093   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9094 fi;
9095 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9096 cf_dst_path=
9097 for cf_src_path in $withval
9098 do
9099
9100 if test "x$prefix" != xNONE; then
9101         cf_path_syntax="$prefix"
9102 else
9103         cf_path_syntax="$ac_default_prefix"
9104 fi
9105
9106 case ".$cf_src_path" in
9107 (.\$\(*\)*|.\'*\'*)
9108         ;;
9109 (..|./*|.\\*)
9110         ;;
9111 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9112         ;;
9113 (.\$\{*prefix\}*|.\$\{*dir\}*)
9114         eval cf_src_path="$cf_src_path"
9115         case ".$cf_src_path" in
9116         (.NONE/*)
9117                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9118                 ;;
9119         esac
9120         ;;
9121 (.no|.NONE/*)
9122         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9123         ;;
9124 (*)
9125         { { echo "$as_me:9125: error: expected a pathname, not \"$cf_src_path\"" >&5
9126 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9127    { (exit 1); exit 1; }; }
9128         ;;
9129 esac
9130
9131   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9132   cf_dst_path="${cf_dst_path}${cf_src_path}"
9133 done
9134 IFS="$ac_save_ifs"
9135
9136 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9137 # so we have to check/work around.  We do prefer the result of "eval"...
9138 eval cf_dst_eval="$cf_dst_path"
9139 case "x$cf_dst_eval" in
9140 (xNONE*)
9141         TERMPATH=$cf_dst_path
9142         ;;
9143 (*)
9144         TERMPATH="$cf_dst_eval"
9145         ;;
9146 esac
9147
9148         echo "$as_me:9148: result: $TERMPATH" >&5
9149 echo "${ECHO_T}$TERMPATH" >&6
9150         test -n "$TERMPATH" &&
9151 cat >>confdefs.h <<EOF
9152 #define TERMPATH "$TERMPATH"
9153 EOF
9154
9155         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9156         echo "$as_me:9156: checking if fast termcap-loader is needed" >&5
9157 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9158
9159 # Check whether --enable-getcap or --disable-getcap was given.
9160 if test "${enable_getcap+set}" = set; then
9161   enableval="$enable_getcap"
9162   with_getcap=$enableval
9163 else
9164   with_getcap=no
9165 fi;
9166         echo "$as_me:9166: result: $with_getcap" >&5
9167 echo "${ECHO_T}$with_getcap" >&6
9168         test "x$with_getcap" = "xyes" &&
9169 cat >>confdefs.h <<\EOF
9170 #define USE_GETCAP 1
9171 EOF
9172
9173         echo "$as_me:9173: checking if translated termcaps will be cached in ~/.terminfo" >&5
9174 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9175
9176 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9177 if test "${enable_getcap_cache+set}" = set; then
9178   enableval="$enable_getcap_cache"
9179   with_getcap_cache=$enableval
9180 else
9181   with_getcap_cache=no
9182 fi;
9183         echo "$as_me:9183: result: $with_getcap_cache" >&5
9184 echo "${ECHO_T}$with_getcap_cache" >&6
9185         test "x$with_getcap_cache" = "xyes" &&
9186 cat >>confdefs.h <<\EOF
9187 #define USE_GETCAP_CACHE 1
9188 EOF
9189
9190 fi
9191
9192 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9193 echo "$as_me:9193: checking if ~/.terminfo is wanted" >&5
9194 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9195
9196 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9197 if test "${enable_home_terminfo+set}" = set; then
9198   enableval="$enable_home_terminfo"
9199   with_home_terminfo=$enableval
9200 else
9201   with_home_terminfo=yes
9202 fi;
9203 echo "$as_me:9203: result: $with_home_terminfo" >&5
9204 echo "${ECHO_T}$with_home_terminfo" >&6
9205 test "x$with_home_terminfo" = "xyes" &&
9206 cat >>confdefs.h <<\EOF
9207 #define USE_HOME_TERMINFO 1
9208 EOF
9209
9210 echo "$as_me:9210: checking if you want to use restricted environment when running as root" >&5
9211 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
9212
9213 # Check whether --enable-root-environ or --disable-root-environ was given.
9214 if test "${enable_root_environ+set}" = set; then
9215   enableval="$enable_root_environ"
9216   with_root_environ=$enableval
9217 else
9218   with_root_environ=yes
9219 fi;
9220 echo "$as_me:9220: result: $with_root_environ" >&5
9221 echo "${ECHO_T}$with_root_environ" >&6
9222 test "x$with_root_environ" = xyes &&
9223 cat >>confdefs.h <<\EOF
9224 #define USE_ROOT_ENVIRON 1
9225 EOF
9226
9227 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9228 ###   to reduce storage requirements for the terminfo database.
9229
9230 for ac_header in \
9231 unistd.h \
9232
9233 do
9234 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9235 echo "$as_me:9235: checking for $ac_header" >&5
9236 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9237 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9238   echo $ECHO_N "(cached) $ECHO_C" >&6
9239 else
9240   cat >"conftest.$ac_ext" <<_ACEOF
9241 #line 9241 "configure"
9242 #include "confdefs.h"
9243 #include <$ac_header>
9244 _ACEOF
9245 if { (eval echo "$as_me:9245: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9246   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9247   ac_status=$?
9248   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9249   rm -f conftest.er1
9250   cat conftest.err >&5
9251   echo "$as_me:9251: \$? = $ac_status" >&5
9252   (exit "$ac_status"); } >/dev/null; then
9253   if test -s conftest.err; then
9254     ac_cpp_err=$ac_c_preproc_warn_flag
9255   else
9256     ac_cpp_err=
9257   fi
9258 else
9259   ac_cpp_err=yes
9260 fi
9261 if test -z "$ac_cpp_err"; then
9262   eval "$as_ac_Header=yes"
9263 else
9264   echo "$as_me: failed program was:" >&5
9265   cat "conftest.$ac_ext" >&5
9266   eval "$as_ac_Header=no"
9267 fi
9268 rm -f conftest.err "conftest.$ac_ext"
9269 fi
9270 echo "$as_me:9270: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9271 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9272 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9273   cat >>confdefs.h <<EOF
9274 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9275 EOF
9276
9277 fi
9278 done
9279
9280 for ac_func in \
9281         remove \
9282         unlink
9283 do
9284 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9285 echo "$as_me:9285: checking for $ac_func" >&5
9286 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9287 if eval "test \"\${$as_ac_var+set}\" = set"; then
9288   echo $ECHO_N "(cached) $ECHO_C" >&6
9289 else
9290   cat >"conftest.$ac_ext" <<_ACEOF
9291 #line 9291 "configure"
9292 #include "confdefs.h"
9293 #define $ac_func autoconf_temporary
9294 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9295 #undef $ac_func
9296
9297 #ifdef __cplusplus
9298 extern "C"
9299 #endif
9300
9301 /* We use char because int might match the return type of a gcc2
9302    builtin and then its argument prototype would still apply.  */
9303 char $ac_func (void);
9304
9305 int
9306 main (void)
9307 {
9308
9309 /* The GNU C library defines stubs for functions which it implements
9310     to always fail with ENOSYS.  Some functions are actually named
9311     something starting with __ and the normal name is an alias.  */
9312 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9313 #error found stub for $ac_func
9314 #endif
9315
9316         return $ac_func ();
9317   ;
9318   return 0;
9319 }
9320 _ACEOF
9321 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9322 if { (eval echo "$as_me:9322: \"$ac_link\"") >&5
9323   (eval $ac_link) 2>&5
9324   ac_status=$?
9325   echo "$as_me:9325: \$? = $ac_status" >&5
9326   (exit "$ac_status"); } &&
9327          { ac_try='test -s "conftest$ac_exeext"'
9328   { (eval echo "$as_me:9328: \"$ac_try\"") >&5
9329   (eval $ac_try) 2>&5
9330   ac_status=$?
9331   echo "$as_me:9331: \$? = $ac_status" >&5
9332   (exit "$ac_status"); }; }; then
9333   eval "$as_ac_var=yes"
9334 else
9335   echo "$as_me: failed program was:" >&5
9336 cat "conftest.$ac_ext" >&5
9337 eval "$as_ac_var=no"
9338 fi
9339 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9340 fi
9341 echo "$as_me:9341: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9342 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9343 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9344   cat >>confdefs.h <<EOF
9345 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9346 EOF
9347
9348 fi
9349 done
9350
9351 if test "$cross_compiling" = yes ; then
9352
9353 for ac_func in \
9354                 link \
9355                 symlink
9356 do
9357 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9358 echo "$as_me:9358: checking for $ac_func" >&5
9359 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9360 if eval "test \"\${$as_ac_var+set}\" = set"; then
9361   echo $ECHO_N "(cached) $ECHO_C" >&6
9362 else
9363   cat >"conftest.$ac_ext" <<_ACEOF
9364 #line 9364 "configure"
9365 #include "confdefs.h"
9366 #define $ac_func autoconf_temporary
9367 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9368 #undef $ac_func
9369
9370 #ifdef __cplusplus
9371 extern "C"
9372 #endif
9373
9374 /* We use char because int might match the return type of a gcc2
9375    builtin and then its argument prototype would still apply.  */
9376 char $ac_func (void);
9377
9378 int
9379 main (void)
9380 {
9381
9382 /* The GNU C library defines stubs for functions which it implements
9383     to always fail with ENOSYS.  Some functions are actually named
9384     something starting with __ and the normal name is an alias.  */
9385 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9386 #error found stub for $ac_func
9387 #endif
9388
9389         return $ac_func ();
9390   ;
9391   return 0;
9392 }
9393 _ACEOF
9394 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9395 if { (eval echo "$as_me:9395: \"$ac_link\"") >&5
9396   (eval $ac_link) 2>&5
9397   ac_status=$?
9398   echo "$as_me:9398: \$? = $ac_status" >&5
9399   (exit "$ac_status"); } &&
9400          { ac_try='test -s "conftest$ac_exeext"'
9401   { (eval echo "$as_me:9401: \"$ac_try\"") >&5
9402   (eval $ac_try) 2>&5
9403   ac_status=$?
9404   echo "$as_me:9404: \$? = $ac_status" >&5
9405   (exit "$ac_status"); }; }; then
9406   eval "$as_ac_var=yes"
9407 else
9408   echo "$as_me: failed program was:" >&5
9409 cat "conftest.$ac_ext" >&5
9410 eval "$as_ac_var=no"
9411 fi
9412 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9413 fi
9414 echo "$as_me:9414: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9415 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9416 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9417   cat >>confdefs.h <<EOF
9418 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9419 EOF
9420
9421 fi
9422 done
9423
9424 else
9425         echo "$as_me:9425: checking if link/symlink functions work" >&5
9426 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9427 if test "${cf_cv_link_funcs+set}" = set; then
9428   echo $ECHO_N "(cached) $ECHO_C" >&6
9429 else
9430
9431                 cf_cv_link_funcs=
9432                 for cf_func in link symlink ; do
9433                         if test "$cross_compiling" = yes; then
9434
9435                         eval 'ac_cv_func_'$cf_func'=error'
9436 else
9437   cat >"conftest.$ac_ext" <<_ACEOF
9438 #line 9438 "configure"
9439 #include "confdefs.h"
9440
9441 #include <stdio.h>
9442 #include <sys/types.h>
9443 #include <sys/stat.h>
9444 #ifdef HAVE_UNISTD_H
9445 #include <unistd.h>
9446 #endif
9447 int main(void)
9448 {
9449         int fail = 0;
9450         char *src = "conftest.tmp";
9451         char *dst = "conftest.chk";
9452         struct stat src_sb, dst_sb;
9453         FILE *fp = fopen(src, "w");
9454         if (fp == 0) { fail = 3; } else {
9455                 fclose(fp); stat(src, &src_sb);
9456                 if ($cf_func(src, dst) < 0) {
9457                         fail = 1;
9458                 } else if (stat(dst, &dst_sb) < 0) {
9459                         fail = 2;
9460                 } else {
9461                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9462                         if (diff < 0) diff = -diff;
9463                         if (diff > 2) fail = 3;
9464                 }
9465         }
9466 #ifdef HAVE_UNLINK
9467         unlink(dst); unlink(src);
9468 #else
9469         remove(dst); remove(src);
9470 #endif
9471         ${cf_cv_main_return:-return} (fail);
9472 }
9473
9474 _ACEOF
9475 rm -f "conftest$ac_exeext"
9476 if { (eval echo "$as_me:9476: \"$ac_link\"") >&5
9477   (eval $ac_link) 2>&5
9478   ac_status=$?
9479   echo "$as_me:9479: \$? = $ac_status" >&5
9480   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9481   { (eval echo "$as_me:9481: \"$ac_try\"") >&5
9482   (eval $ac_try) 2>&5
9483   ac_status=$?
9484   echo "$as_me:9484: \$? = $ac_status" >&5
9485   (exit "$ac_status"); }; }; then
9486
9487                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9488                         eval 'ac_cv_func_'$cf_func'=yes'
9489 else
9490   echo "$as_me: program exited with status $ac_status" >&5
9491 echo "$as_me: failed program was:" >&5
9492 cat "conftest.$ac_ext" >&5
9493
9494                         eval 'ac_cv_func_'$cf_func'=no'
9495 fi
9496 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9497 fi
9498                 done
9499                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9500
9501 fi
9502 echo "$as_me:9502: result: $cf_cv_link_funcs" >&5
9503 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9504         test "$ac_cv_func_link"    = yes &&
9505 cat >>confdefs.h <<\EOF
9506 #define HAVE_LINK 1
9507 EOF
9508
9509         test "$ac_cv_func_symlink" = yes &&
9510 cat >>confdefs.h <<\EOF
9511 #define HAVE_SYMLINK 1
9512 EOF
9513
9514 fi
9515
9516 with_links=no
9517 with_symlinks=no
9518
9519 # soft links (symbolic links) are useful for some systems where hard links do
9520 # not work, or to make it simpler to copy terminfo trees around.
9521 if test "x$ac_cv_func_symlink" = xyes ; then
9522         echo "$as_me:9522: checking if tic should use symbolic links" >&5
9523 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9524
9525 # Check whether --enable-symlinks or --disable-symlinks was given.
9526 if test "${enable_symlinks+set}" = set; then
9527   enableval="$enable_symlinks"
9528   with_symlinks=$enableval
9529 else
9530   with_symlinks=no
9531 fi;
9532         echo "$as_me:9532: result: $with_symlinks" >&5
9533 echo "${ECHO_T}$with_symlinks" >&6
9534 fi
9535
9536 # If we have hard links and did not choose to use soft links instead, there is
9537 # no reason to make this choice optional - use the hard links.
9538 if test "$with_symlinks" = no ; then
9539         echo "$as_me:9539: checking if tic should use hard links" >&5
9540 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9541         if test "x$ac_cv_func_link" = xyes ; then
9542                 with_links=yes
9543         else
9544                 with_links=no
9545         fi
9546         echo "$as_me:9546: result: $with_links" >&5
9547 echo "${ECHO_T}$with_links" >&6
9548 fi
9549
9550 test "x$with_links" = xyes &&
9551 cat >>confdefs.h <<\EOF
9552 #define USE_LINKS 1
9553 EOF
9554
9555 test "x$with_symlinks" = xyes &&
9556 cat >>confdefs.h <<\EOF
9557 #define USE_SYMLINKS 1
9558 EOF
9559
9560 ###   use option --enable-broken-linker to force on use of broken-linker support
9561
9562 echo "$as_me:9562: checking if you want broken-linker support code" >&5
9563 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9564
9565 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9566 if test "${enable_broken_linker+set}" = set; then
9567   enableval="$enable_broken_linker"
9568   with_broken_linker=$enableval
9569 else
9570   with_broken_linker=no
9571 fi;
9572 echo "$as_me:9572: result: $with_broken_linker" >&5
9573 echo "${ECHO_T}$with_broken_linker" >&6
9574
9575 : "${BROKEN_LINKER:=0}"
9576 if test "x$with_broken_linker" = xyes ; then
9577
9578 cat >>confdefs.h <<\EOF
9579 #define BROKEN_LINKER 1
9580 EOF
9581
9582         BROKEN_LINKER=1
9583 fi
9584
9585 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9586 echo "$as_me:9586: checking if tputs should process BSD-style prefix padding" >&5
9587 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9588
9589 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9590 if test "${enable_bsdpad+set}" = set; then
9591   enableval="$enable_bsdpad"
9592   with_bsdpad=$enableval
9593 else
9594   with_bsdpad=no
9595 fi;
9596 echo "$as_me:9596: result: $with_bsdpad" >&5
9597 echo "${ECHO_T}$with_bsdpad" >&6
9598 test "x$with_bsdpad" = xyes &&
9599 cat >>confdefs.h <<\EOF
9600 #define BSD_TPUTS 1
9601 EOF
9602
9603 ###   use option --enable-widec to turn on use of wide-character support
9604 NCURSES_CH_T=chtype
9605 NCURSES_LIBUTF8=0
9606
9607 NEED_WCHAR_H=0
9608 NCURSES_MBSTATE_T=0
9609 NCURSES_WCHAR_T=0
9610 NCURSES_WINT_T=0
9611
9612 # Check to define _XOPEN_SOURCE "automatically"
9613 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9614
9615 echo "$as_me:9615: checking if the POSIX test-macros are already defined" >&5
9616 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9617 if test "${cf_cv_posix_visible+set}" = set; then
9618   echo $ECHO_N "(cached) $ECHO_C" >&6
9619 else
9620
9621 cat >"conftest.$ac_ext" <<_ACEOF
9622 #line 9622 "configure"
9623 #include "confdefs.h"
9624 #include <stdio.h>
9625 int
9626 main (void)
9627 {
9628
9629 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9630         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9631         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9632         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9633 #error conflicting symbols found
9634 #endif
9635
9636   ;
9637   return 0;
9638 }
9639 _ACEOF
9640 rm -f "conftest.$ac_objext"
9641 if { (eval echo "$as_me:9641: \"$ac_compile\"") >&5
9642   (eval $ac_compile) 2>&5
9643   ac_status=$?
9644   echo "$as_me:9644: \$? = $ac_status" >&5
9645   (exit "$ac_status"); } &&
9646          { ac_try='test -s "conftest.$ac_objext"'
9647   { (eval echo "$as_me:9647: \"$ac_try\"") >&5
9648   (eval $ac_try) 2>&5
9649   ac_status=$?
9650   echo "$as_me:9650: \$? = $ac_status" >&5
9651   (exit "$ac_status"); }; }; then
9652   cf_cv_posix_visible=no
9653 else
9654   echo "$as_me: failed program was:" >&5
9655 cat "conftest.$ac_ext" >&5
9656 cf_cv_posix_visible=yes
9657 fi
9658 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9659
9660 fi
9661 echo "$as_me:9661: result: $cf_cv_posix_visible" >&5
9662 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9663
9664 if test "$cf_cv_posix_visible" = no; then
9665
9666 cf_XOPEN_SOURCE=600
9667 cf_POSIX_C_SOURCE=199506L
9668 cf_xopen_source=
9669
9670 case "$host_os" in
9671 (aix[4-7]*)
9672         cf_xopen_source="-D_ALL_SOURCE"
9673         ;;
9674 (msys)
9675         cf_XOPEN_SOURCE=600
9676         ;;
9677 (darwin[0-8].*)
9678         cf_xopen_source="-D_APPLE_C_SOURCE"
9679         ;;
9680 (darwin*)
9681         cf_xopen_source="-D_DARWIN_C_SOURCE"
9682         cf_XOPEN_SOURCE=
9683         ;;
9684 (freebsd*|dragonfly*|midnightbsd*)
9685         # 5.x headers associate
9686         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9687         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9688         cf_POSIX_C_SOURCE=200112L
9689         cf_XOPEN_SOURCE=600
9690         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9691         ;;
9692 (hpux11*)
9693         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9694         ;;
9695 (hpux*)
9696         cf_xopen_source="-D_HPUX_SOURCE"
9697         ;;
9698 (irix[56].*)
9699         cf_xopen_source="-D_SGI_SOURCE"
9700         cf_XOPEN_SOURCE=
9701         ;;
9702 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9703
9704 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9705
9706 echo "$as_me:9706: checking if this is the GNU C library" >&5
9707 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9708 if test "${cf_cv_gnu_library+set}" = set; then
9709   echo $ECHO_N "(cached) $ECHO_C" >&6
9710 else
9711
9712 cat >"conftest.$ac_ext" <<_ACEOF
9713 #line 9713 "configure"
9714 #include "confdefs.h"
9715 #include <sys/types.h>
9716 int
9717 main (void)
9718 {
9719
9720         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9721                 return 0;
9722         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9723                 return 0;
9724         #else
9725         #       error not GNU C library
9726         #endif
9727   ;
9728   return 0;
9729 }
9730 _ACEOF
9731 rm -f "conftest.$ac_objext"
9732 if { (eval echo "$as_me:9732: \"$ac_compile\"") >&5
9733   (eval $ac_compile) 2>&5
9734   ac_status=$?
9735   echo "$as_me:9735: \$? = $ac_status" >&5
9736   (exit "$ac_status"); } &&
9737          { ac_try='test -s "conftest.$ac_objext"'
9738   { (eval echo "$as_me:9738: \"$ac_try\"") >&5
9739   (eval $ac_try) 2>&5
9740   ac_status=$?
9741   echo "$as_me:9741: \$? = $ac_status" >&5
9742   (exit "$ac_status"); }; }; then
9743   cf_cv_gnu_library=yes
9744 else
9745   echo "$as_me: failed program was:" >&5
9746 cat "conftest.$ac_ext" >&5
9747 cf_cv_gnu_library=no
9748 fi
9749 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9750
9751 fi
9752 echo "$as_me:9752: result: $cf_cv_gnu_library" >&5
9753 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9754
9755 if test x$cf_cv_gnu_library = xyes; then
9756
9757         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9758         # was changed to help a little.  newlib incorporated the change about 4
9759         # years later.
9760         echo "$as_me:9760: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9761 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9762 if test "${cf_cv_gnu_library_219+set}" = set; then
9763   echo $ECHO_N "(cached) $ECHO_C" >&6
9764 else
9765
9766                 cf_save="$CPPFLAGS"
9767
9768         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9769         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9770
9771                 cat >"conftest.$ac_ext" <<_ACEOF
9772 #line 9772 "configure"
9773 #include "confdefs.h"
9774 #include <sys/types.h>
9775 int
9776 main (void)
9777 {
9778
9779                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9780                                 return 0;
9781                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9782                                 return 0;
9783                         #else
9784                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9785                         #endif
9786   ;
9787   return 0;
9788 }
9789 _ACEOF
9790 rm -f "conftest.$ac_objext"
9791 if { (eval echo "$as_me:9791: \"$ac_compile\"") >&5
9792   (eval $ac_compile) 2>&5
9793   ac_status=$?
9794   echo "$as_me:9794: \$? = $ac_status" >&5
9795   (exit "$ac_status"); } &&
9796          { ac_try='test -s "conftest.$ac_objext"'
9797   { (eval echo "$as_me:9797: \"$ac_try\"") >&5
9798   (eval $ac_try) 2>&5
9799   ac_status=$?
9800   echo "$as_me:9800: \$? = $ac_status" >&5
9801   (exit "$ac_status"); }; }; then
9802   cf_cv_gnu_library_219=yes
9803 else
9804   echo "$as_me: failed program was:" >&5
9805 cat "conftest.$ac_ext" >&5
9806 cf_cv_gnu_library_219=no
9807 fi
9808 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9809                 CPPFLAGS="$cf_save"
9810
9811 fi
9812 echo "$as_me:9812: result: $cf_cv_gnu_library_219" >&5
9813 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9814
9815         if test "x$cf_cv_gnu_library_219" = xyes; then
9816                 cf_save="$CPPFLAGS"
9817                 echo "$as_me:9817: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9818 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9819 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9820   echo $ECHO_N "(cached) $ECHO_C" >&6
9821 else
9822
9823 cf_fix_cppflags=no
9824 cf_new_cflags=
9825 cf_new_cppflags=
9826 cf_new_extra_cppflags=
9827
9828 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9829 do
9830 case "$cf_fix_cppflags" in
9831 (no)
9832         case "$cf_add_cflags" in
9833         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9834                 case "$cf_add_cflags" in
9835                 (-D*)
9836                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9837
9838                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9839                                 && test -z "${cf_tst_cflags}" \
9840                                 && cf_fix_cppflags=yes
9841
9842                         if test "$cf_fix_cppflags" = yes ; then
9843
9844         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9845         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9846
9847                                 continue
9848                         elif test "${cf_tst_cflags}" = "\"'" ; then
9849
9850         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9851         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9852
9853                                 continue
9854                         fi
9855                         ;;
9856                 esac
9857                 case "$CPPFLAGS" in
9858                 (*$cf_add_cflags)
9859                         ;;
9860                 (*)
9861                         case "$cf_add_cflags" in
9862                         (-D*)
9863                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9864
9865 CPPFLAGS=`echo "$CPPFLAGS" | \
9866         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9867                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9868
9869                                 ;;
9870                         esac
9871
9872         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9873         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9874
9875                         ;;
9876                 esac
9877                 ;;
9878         (*)
9879
9880         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9881         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9882
9883                 ;;
9884         esac
9885         ;;
9886 (yes)
9887
9888         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9889         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9890
9891         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9892
9893         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9894                 && test -z "${cf_tst_cflags}" \
9895                 && cf_fix_cppflags=no
9896         ;;
9897 esac
9898 done
9899
9900 if test -n "$cf_new_cflags" ; then
9901
9902         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9903         CFLAGS="${CFLAGS}$cf_new_cflags"
9904
9905 fi
9906
9907 if test -n "$cf_new_cppflags" ; then
9908
9909         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9910         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9911
9912 fi
9913
9914 if test -n "$cf_new_extra_cppflags" ; then
9915
9916         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9917         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9918
9919 fi
9920
9921                         cat >"conftest.$ac_ext" <<_ACEOF
9922 #line 9922 "configure"
9923 #include "confdefs.h"
9924
9925                                 #include <limits.h>
9926                                 #include <sys/types.h>
9927
9928 int
9929 main (void)
9930 {
9931
9932                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9933                                         return 0;
9934                                 #else
9935                                 #       error GNU C library is too old
9936                                 #endif
9937   ;
9938   return 0;
9939 }
9940 _ACEOF
9941 rm -f "conftest.$ac_objext"
9942 if { (eval echo "$as_me:9942: \"$ac_compile\"") >&5
9943   (eval $ac_compile) 2>&5
9944   ac_status=$?
9945   echo "$as_me:9945: \$? = $ac_status" >&5
9946   (exit "$ac_status"); } &&
9947          { ac_try='test -s "conftest.$ac_objext"'
9948   { (eval echo "$as_me:9948: \"$ac_try\"") >&5
9949   (eval $ac_try) 2>&5
9950   ac_status=$?
9951   echo "$as_me:9951: \$? = $ac_status" >&5
9952   (exit "$ac_status"); }; }; then
9953   cf_cv_gnu_dftsrc_219=yes
9954 else
9955   echo "$as_me: failed program was:" >&5
9956 cat "conftest.$ac_ext" >&5
9957 cf_cv_gnu_dftsrc_219=no
9958 fi
9959 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9960
9961 fi
9962 echo "$as_me:9962: result: $cf_cv_gnu_dftsrc_219" >&5
9963 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9964                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9965         else
9966                 cf_cv_gnu_dftsrc_219=maybe
9967         fi
9968
9969         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9970
9971                 echo "$as_me:9971: checking if we must define _GNU_SOURCE" >&5
9972 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9973 if test "${cf_cv_gnu_source+set}" = set; then
9974   echo $ECHO_N "(cached) $ECHO_C" >&6
9975 else
9976
9977                 cat >"conftest.$ac_ext" <<_ACEOF
9978 #line 9978 "configure"
9979 #include "confdefs.h"
9980 #include <sys/types.h>
9981 int
9982 main (void)
9983 {
9984
9985                         #ifndef _XOPEN_SOURCE
9986                         #error  expected _XOPEN_SOURCE to be defined
9987                         #endif
9988   ;
9989   return 0;
9990 }
9991 _ACEOF
9992 rm -f "conftest.$ac_objext"
9993 if { (eval echo "$as_me:9993: \"$ac_compile\"") >&5
9994   (eval $ac_compile) 2>&5
9995   ac_status=$?
9996   echo "$as_me:9996: \$? = $ac_status" >&5
9997   (exit "$ac_status"); } &&
9998          { ac_try='test -s "conftest.$ac_objext"'
9999   { (eval echo "$as_me:9999: \"$ac_try\"") >&5
10000   (eval $ac_try) 2>&5
10001   ac_status=$?
10002   echo "$as_me:10002: \$? = $ac_status" >&5
10003   (exit "$ac_status"); }; }; then
10004   cf_cv_gnu_source=no
10005 else
10006   echo "$as_me: failed program was:" >&5
10007 cat "conftest.$ac_ext" >&5
10008 cf_save="$CPPFLAGS"
10009
10010 cf_fix_cppflags=no
10011 cf_new_cflags=
10012 cf_new_cppflags=
10013 cf_new_extra_cppflags=
10014
10015 for cf_add_cflags in -D_GNU_SOURCE
10016 do
10017 case "$cf_fix_cppflags" in
10018 (no)
10019         case "$cf_add_cflags" in
10020         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10021                 case "$cf_add_cflags" in
10022                 (-D*)
10023                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10024
10025                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10026                                 && test -z "${cf_tst_cflags}" \
10027                                 && cf_fix_cppflags=yes
10028
10029                         if test "$cf_fix_cppflags" = yes ; then
10030
10031         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10032         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10033
10034                                 continue
10035                         elif test "${cf_tst_cflags}" = "\"'" ; then
10036
10037         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10038         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10039
10040                                 continue
10041                         fi
10042                         ;;
10043                 esac
10044                 case "$CPPFLAGS" in
10045                 (*$cf_add_cflags)
10046                         ;;
10047                 (*)
10048                         case "$cf_add_cflags" in
10049                         (-D*)
10050                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10051
10052 CPPFLAGS=`echo "$CPPFLAGS" | \
10053         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10054                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10055
10056                                 ;;
10057                         esac
10058
10059         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10060         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10061
10062                         ;;
10063                 esac
10064                 ;;
10065         (*)
10066
10067         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10068         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10069
10070                 ;;
10071         esac
10072         ;;
10073 (yes)
10074
10075         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10076         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10077
10078         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10079
10080         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10081                 && test -z "${cf_tst_cflags}" \
10082                 && cf_fix_cppflags=no
10083         ;;
10084 esac
10085 done
10086
10087 if test -n "$cf_new_cflags" ; then
10088
10089         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10090         CFLAGS="${CFLAGS}$cf_new_cflags"
10091
10092 fi
10093
10094 if test -n "$cf_new_cppflags" ; then
10095
10096         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10097         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10098
10099 fi
10100
10101 if test -n "$cf_new_extra_cppflags" ; then
10102
10103         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10104         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10105
10106 fi
10107
10108                          cat >"conftest.$ac_ext" <<_ACEOF
10109 #line 10109 "configure"
10110 #include "confdefs.h"
10111 #include <sys/types.h>
10112 int
10113 main (void)
10114 {
10115
10116                                 #ifdef _XOPEN_SOURCE
10117                                 #error  expected _XOPEN_SOURCE to be undefined
10118                                 #endif
10119   ;
10120   return 0;
10121 }
10122 _ACEOF
10123 rm -f "conftest.$ac_objext"
10124 if { (eval echo "$as_me:10124: \"$ac_compile\"") >&5
10125   (eval $ac_compile) 2>&5
10126   ac_status=$?
10127   echo "$as_me:10127: \$? = $ac_status" >&5
10128   (exit "$ac_status"); } &&
10129          { ac_try='test -s "conftest.$ac_objext"'
10130   { (eval echo "$as_me:10130: \"$ac_try\"") >&5
10131   (eval $ac_try) 2>&5
10132   ac_status=$?
10133   echo "$as_me:10133: \$? = $ac_status" >&5
10134   (exit "$ac_status"); }; }; then
10135   cf_cv_gnu_source=no
10136 else
10137   echo "$as_me: failed program was:" >&5
10138 cat "conftest.$ac_ext" >&5
10139 cf_cv_gnu_source=yes
10140 fi
10141 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10142                         CPPFLAGS="$cf_save"
10143
10144 fi
10145 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10146
10147 fi
10148 echo "$as_me:10148: result: $cf_cv_gnu_source" >&5
10149 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10150
10151                 if test "$cf_cv_gnu_source" = yes
10152                 then
10153                 echo "$as_me:10153: checking if we should also define _DEFAULT_SOURCE" >&5
10154 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10155 if test "${cf_cv_default_source+set}" = set; then
10156   echo $ECHO_N "(cached) $ECHO_C" >&6
10157 else
10158
10159         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10160         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10161
10162                         cat >"conftest.$ac_ext" <<_ACEOF
10163 #line 10163 "configure"
10164 #include "confdefs.h"
10165 #include <sys/types.h>
10166 int
10167 main (void)
10168 {
10169
10170                                 #ifdef _DEFAULT_SOURCE
10171                                 #error  expected _DEFAULT_SOURCE to be undefined
10172                                 #endif
10173   ;
10174   return 0;
10175 }
10176 _ACEOF
10177 rm -f "conftest.$ac_objext"
10178 if { (eval echo "$as_me:10178: \"$ac_compile\"") >&5
10179   (eval $ac_compile) 2>&5
10180   ac_status=$?
10181   echo "$as_me:10181: \$? = $ac_status" >&5
10182   (exit "$ac_status"); } &&
10183          { ac_try='test -s "conftest.$ac_objext"'
10184   { (eval echo "$as_me:10184: \"$ac_try\"") >&5
10185   (eval $ac_try) 2>&5
10186   ac_status=$?
10187   echo "$as_me:10187: \$? = $ac_status" >&5
10188   (exit "$ac_status"); }; }; then
10189   cf_cv_default_source=no
10190 else
10191   echo "$as_me: failed program was:" >&5
10192 cat "conftest.$ac_ext" >&5
10193 cf_cv_default_source=yes
10194 fi
10195 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10196
10197 fi
10198 echo "$as_me:10198: result: $cf_cv_default_source" >&5
10199 echo "${ECHO_T}$cf_cv_default_source" >&6
10200                         if test "$cf_cv_default_source" = yes
10201                         then
10202
10203         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10204         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10205
10206                         fi
10207                 fi
10208         fi
10209
10210 fi
10211
10212         ;;
10213 (minix*)
10214         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10215         ;;
10216 (mirbsd*)
10217         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10218         cf_XOPEN_SOURCE=
10219
10220 if test "$cf_cv_posix_visible" = no; then
10221
10222 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10223
10224 cf_save_CFLAGS="$CFLAGS"
10225 cf_save_CPPFLAGS="$CPPFLAGS"
10226
10227 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10228         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10229                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10230
10231 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10232         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10233                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10234
10235 echo "$as_me:10235: checking if we should define _POSIX_C_SOURCE" >&5
10236 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10237 if test "${cf_cv_posix_c_source+set}" = set; then
10238   echo $ECHO_N "(cached) $ECHO_C" >&6
10239 else
10240
10241 echo "${as_me:-configure}:10241: testing if the symbol is already defined go no further ..." 1>&5
10242
10243         cat >"conftest.$ac_ext" <<_ACEOF
10244 #line 10244 "configure"
10245 #include "confdefs.h"
10246 #include <sys/types.h>
10247 int
10248 main (void)
10249 {
10250
10251 #ifndef _POSIX_C_SOURCE
10252 make an error
10253 #endif
10254   ;
10255   return 0;
10256 }
10257 _ACEOF
10258 rm -f "conftest.$ac_objext"
10259 if { (eval echo "$as_me:10259: \"$ac_compile\"") >&5
10260   (eval $ac_compile) 2>&5
10261   ac_status=$?
10262   echo "$as_me:10262: \$? = $ac_status" >&5
10263   (exit "$ac_status"); } &&
10264          { ac_try='test -s "conftest.$ac_objext"'
10265   { (eval echo "$as_me:10265: \"$ac_try\"") >&5
10266   (eval $ac_try) 2>&5
10267   ac_status=$?
10268   echo "$as_me:10268: \$? = $ac_status" >&5
10269   (exit "$ac_status"); }; }; then
10270   cf_cv_posix_c_source=no
10271 else
10272   echo "$as_me: failed program was:" >&5
10273 cat "conftest.$ac_ext" >&5
10274 cf_want_posix_source=no
10275          case .$cf_POSIX_C_SOURCE in
10276          (.[12]??*)
10277                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10278                 ;;
10279          (.2)
10280                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10281                 cf_want_posix_source=yes
10282                 ;;
10283          (.*)
10284                 cf_want_posix_source=yes
10285                 ;;
10286          esac
10287          if test "$cf_want_posix_source" = yes ; then
10288                 cat >"conftest.$ac_ext" <<_ACEOF
10289 #line 10289 "configure"
10290 #include "confdefs.h"
10291 #include <sys/types.h>
10292 int
10293 main (void)
10294 {
10295
10296 #ifdef _POSIX_SOURCE
10297 make an error
10298 #endif
10299   ;
10300   return 0;
10301 }
10302 _ACEOF
10303 rm -f "conftest.$ac_objext"
10304 if { (eval echo "$as_me:10304: \"$ac_compile\"") >&5
10305   (eval $ac_compile) 2>&5
10306   ac_status=$?
10307   echo "$as_me:10307: \$? = $ac_status" >&5
10308   (exit "$ac_status"); } &&
10309          { ac_try='test -s "conftest.$ac_objext"'
10310   { (eval echo "$as_me:10310: \"$ac_try\"") >&5
10311   (eval $ac_try) 2>&5
10312   ac_status=$?
10313   echo "$as_me:10313: \$? = $ac_status" >&5
10314   (exit "$ac_status"); }; }; then
10315   :
10316 else
10317   echo "$as_me: failed program was:" >&5
10318 cat "conftest.$ac_ext" >&5
10319 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10320 fi
10321 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10322          fi
10323
10324 echo "${as_me:-configure}:10324: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10325
10326          CFLAGS="$cf_trim_CFLAGS"
10327          CPPFLAGS="$cf_trim_CPPFLAGS"
10328
10329         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10330         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10331
10332 echo "${as_me:-configure}:10332: testing if the second compile does not leave our definition intact error ..." 1>&5
10333
10334          cat >"conftest.$ac_ext" <<_ACEOF
10335 #line 10335 "configure"
10336 #include "confdefs.h"
10337 #include <sys/types.h>
10338 int
10339 main (void)
10340 {
10341
10342 #ifndef _POSIX_C_SOURCE
10343 make an error
10344 #endif
10345   ;
10346   return 0;
10347 }
10348 _ACEOF
10349 rm -f "conftest.$ac_objext"
10350 if { (eval echo "$as_me:10350: \"$ac_compile\"") >&5
10351   (eval $ac_compile) 2>&5
10352   ac_status=$?
10353   echo "$as_me:10353: \$? = $ac_status" >&5
10354   (exit "$ac_status"); } &&
10355          { ac_try='test -s "conftest.$ac_objext"'
10356   { (eval echo "$as_me:10356: \"$ac_try\"") >&5
10357   (eval $ac_try) 2>&5
10358   ac_status=$?
10359   echo "$as_me:10359: \$? = $ac_status" >&5
10360   (exit "$ac_status"); }; }; then
10361   :
10362 else
10363   echo "$as_me: failed program was:" >&5
10364 cat "conftest.$ac_ext" >&5
10365 cf_cv_posix_c_source=no
10366 fi
10367 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10368          CFLAGS="$cf_save_CFLAGS"
10369          CPPFLAGS="$cf_save_CPPFLAGS"
10370
10371 fi
10372 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10373
10374 fi
10375 echo "$as_me:10375: result: $cf_cv_posix_c_source" >&5
10376 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10377
10378 if test "$cf_cv_posix_c_source" != no ; then
10379         CFLAGS="$cf_trim_CFLAGS"
10380         CPPFLAGS="$cf_trim_CPPFLAGS"
10381
10382 cf_fix_cppflags=no
10383 cf_new_cflags=
10384 cf_new_cppflags=
10385 cf_new_extra_cppflags=
10386
10387 for cf_add_cflags in $cf_cv_posix_c_source
10388 do
10389 case "$cf_fix_cppflags" in
10390 (no)
10391         case "$cf_add_cflags" in
10392         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10393                 case "$cf_add_cflags" in
10394                 (-D*)
10395                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10396
10397                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10398                                 && test -z "${cf_tst_cflags}" \
10399                                 && cf_fix_cppflags=yes
10400
10401                         if test "$cf_fix_cppflags" = yes ; then
10402
10403         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10404         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10405
10406                                 continue
10407                         elif test "${cf_tst_cflags}" = "\"'" ; then
10408
10409         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10410         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10411
10412                                 continue
10413                         fi
10414                         ;;
10415                 esac
10416                 case "$CPPFLAGS" in
10417                 (*$cf_add_cflags)
10418                         ;;
10419                 (*)
10420                         case "$cf_add_cflags" in
10421                         (-D*)
10422                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10423
10424 CPPFLAGS=`echo "$CPPFLAGS" | \
10425         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10426                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10427
10428                                 ;;
10429                         esac
10430
10431         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10432         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10433
10434                         ;;
10435                 esac
10436                 ;;
10437         (*)
10438
10439         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10440         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10441
10442                 ;;
10443         esac
10444         ;;
10445 (yes)
10446
10447         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10448         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10449
10450         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10451
10452         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10453                 && test -z "${cf_tst_cflags}" \
10454                 && cf_fix_cppflags=no
10455         ;;
10456 esac
10457 done
10458
10459 if test -n "$cf_new_cflags" ; then
10460
10461         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10462         CFLAGS="${CFLAGS}$cf_new_cflags"
10463
10464 fi
10465
10466 if test -n "$cf_new_cppflags" ; then
10467
10468         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10469         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10470
10471 fi
10472
10473 if test -n "$cf_new_extra_cppflags" ; then
10474
10475         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10476         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10477
10478 fi
10479
10480 fi
10481
10482 fi # cf_cv_posix_visible
10483
10484         ;;
10485 (netbsd*)
10486         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10487         ;;
10488 (openbsd[6-9]*)
10489         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10490         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10491         # Abusing the conformance level is a workaround.
10492         { echo "$as_me:10492: WARNING: this system does not provide usable locale support" >&5
10493 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10494         cf_xopen_source="-D_BSD_SOURCE"
10495         cf_XOPEN_SOURCE=700
10496         ;;
10497 (openbsd[4-5]*)
10498         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10499         cf_xopen_source="-D_BSD_SOURCE"
10500         cf_XOPEN_SOURCE=600
10501         ;;
10502 (openbsd*)
10503         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10504         ;;
10505 (osf[45]*)
10506         cf_xopen_source="-D_OSF_SOURCE"
10507         ;;
10508 (nto-qnx*)
10509         cf_xopen_source="-D_QNX_SOURCE"
10510         ;;
10511 (sco*)
10512         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10513         ;;
10514 (solaris2.*)
10515         cf_xopen_source="-D__EXTENSIONS__"
10516         cf_cv_xopen_source=broken
10517         ;;
10518 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10519         cf_XOPEN_SOURCE=
10520         cf_POSIX_C_SOURCE=
10521         ;;
10522 (*)
10523
10524 echo "$as_me:10524: checking if we should define _XOPEN_SOURCE" >&5
10525 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10526 if test "${cf_cv_xopen_source+set}" = set; then
10527   echo $ECHO_N "(cached) $ECHO_C" >&6
10528 else
10529
10530         cat >"conftest.$ac_ext" <<_ACEOF
10531 #line 10531 "configure"
10532 #include "confdefs.h"
10533
10534 #include <stdlib.h>
10535 #include <string.h>
10536 #include <sys/types.h>
10537
10538 int
10539 main (void)
10540 {
10541
10542 #ifndef _XOPEN_SOURCE
10543 make an error
10544 #endif
10545   ;
10546   return 0;
10547 }
10548 _ACEOF
10549 rm -f "conftest.$ac_objext"
10550 if { (eval echo "$as_me:10550: \"$ac_compile\"") >&5
10551   (eval $ac_compile) 2>&5
10552   ac_status=$?
10553   echo "$as_me:10553: \$? = $ac_status" >&5
10554   (exit "$ac_status"); } &&
10555          { ac_try='test -s "conftest.$ac_objext"'
10556   { (eval echo "$as_me:10556: \"$ac_try\"") >&5
10557   (eval $ac_try) 2>&5
10558   ac_status=$?
10559   echo "$as_me:10559: \$? = $ac_status" >&5
10560   (exit "$ac_status"); }; }; then
10561   cf_cv_xopen_source=no
10562 else
10563   echo "$as_me: failed program was:" >&5
10564 cat "conftest.$ac_ext" >&5
10565 cf_save="$CPPFLAGS"
10566
10567         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10568         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10569
10570          cat >"conftest.$ac_ext" <<_ACEOF
10571 #line 10571 "configure"
10572 #include "confdefs.h"
10573
10574 #include <stdlib.h>
10575 #include <string.h>
10576 #include <sys/types.h>
10577
10578 int
10579 main (void)
10580 {
10581
10582 #ifdef _XOPEN_SOURCE
10583 make an error
10584 #endif
10585   ;
10586   return 0;
10587 }
10588 _ACEOF
10589 rm -f "conftest.$ac_objext"
10590 if { (eval echo "$as_me:10590: \"$ac_compile\"") >&5
10591   (eval $ac_compile) 2>&5
10592   ac_status=$?
10593   echo "$as_me:10593: \$? = $ac_status" >&5
10594   (exit "$ac_status"); } &&
10595          { ac_try='test -s "conftest.$ac_objext"'
10596   { (eval echo "$as_me:10596: \"$ac_try\"") >&5
10597   (eval $ac_try) 2>&5
10598   ac_status=$?
10599   echo "$as_me:10599: \$? = $ac_status" >&5
10600   (exit "$ac_status"); }; }; then
10601   cf_cv_xopen_source=no
10602 else
10603   echo "$as_me: failed program was:" >&5
10604 cat "conftest.$ac_ext" >&5
10605 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10606 fi
10607 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10608         CPPFLAGS="$cf_save"
10609
10610 fi
10611 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10612
10613 fi
10614 echo "$as_me:10614: result: $cf_cv_xopen_source" >&5
10615 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10616
10617 if test "$cf_cv_xopen_source" != no ; then
10618
10619 CFLAGS=`echo "$CFLAGS" | \
10620         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10621                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10622
10623 CPPFLAGS=`echo "$CPPFLAGS" | \
10624         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10625                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10626
10627         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10628
10629 cf_fix_cppflags=no
10630 cf_new_cflags=
10631 cf_new_cppflags=
10632 cf_new_extra_cppflags=
10633
10634 for cf_add_cflags in $cf_temp_xopen_source
10635 do
10636 case "$cf_fix_cppflags" in
10637 (no)
10638         case "$cf_add_cflags" in
10639         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10640                 case "$cf_add_cflags" in
10641                 (-D*)
10642                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10643
10644                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10645                                 && test -z "${cf_tst_cflags}" \
10646                                 && cf_fix_cppflags=yes
10647
10648                         if test "$cf_fix_cppflags" = yes ; then
10649
10650         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10651         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10652
10653                                 continue
10654                         elif test "${cf_tst_cflags}" = "\"'" ; then
10655
10656         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10657         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10658
10659                                 continue
10660                         fi
10661                         ;;
10662                 esac
10663                 case "$CPPFLAGS" in
10664                 (*$cf_add_cflags)
10665                         ;;
10666                 (*)
10667                         case "$cf_add_cflags" in
10668                         (-D*)
10669                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10670
10671 CPPFLAGS=`echo "$CPPFLAGS" | \
10672         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10673                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10674
10675                                 ;;
10676                         esac
10677
10678         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10679         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10680
10681                         ;;
10682                 esac
10683                 ;;
10684         (*)
10685
10686         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10687         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10688
10689                 ;;
10690         esac
10691         ;;
10692 (yes)
10693
10694         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10695         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10696
10697         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10698
10699         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10700                 && test -z "${cf_tst_cflags}" \
10701                 && cf_fix_cppflags=no
10702         ;;
10703 esac
10704 done
10705
10706 if test -n "$cf_new_cflags" ; then
10707
10708         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10709         CFLAGS="${CFLAGS}$cf_new_cflags"
10710
10711 fi
10712
10713 if test -n "$cf_new_cppflags" ; then
10714
10715         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10716         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10717
10718 fi
10719
10720 if test -n "$cf_new_extra_cppflags" ; then
10721
10722         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10723         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10724
10725 fi
10726
10727 fi
10728
10729 if test "$cf_cv_posix_visible" = no; then
10730
10731 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10732
10733 cf_save_CFLAGS="$CFLAGS"
10734 cf_save_CPPFLAGS="$CPPFLAGS"
10735
10736 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10737         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10738                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10739
10740 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10741         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10742                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10743
10744 echo "$as_me:10744: checking if we should define _POSIX_C_SOURCE" >&5
10745 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10746 if test "${cf_cv_posix_c_source+set}" = set; then
10747   echo $ECHO_N "(cached) $ECHO_C" >&6
10748 else
10749
10750 echo "${as_me:-configure}:10750: testing if the symbol is already defined go no further ..." 1>&5
10751
10752         cat >"conftest.$ac_ext" <<_ACEOF
10753 #line 10753 "configure"
10754 #include "confdefs.h"
10755 #include <sys/types.h>
10756 int
10757 main (void)
10758 {
10759
10760 #ifndef _POSIX_C_SOURCE
10761 make an error
10762 #endif
10763   ;
10764   return 0;
10765 }
10766 _ACEOF
10767 rm -f "conftest.$ac_objext"
10768 if { (eval echo "$as_me:10768: \"$ac_compile\"") >&5
10769   (eval $ac_compile) 2>&5
10770   ac_status=$?
10771   echo "$as_me:10771: \$? = $ac_status" >&5
10772   (exit "$ac_status"); } &&
10773          { ac_try='test -s "conftest.$ac_objext"'
10774   { (eval echo "$as_me:10774: \"$ac_try\"") >&5
10775   (eval $ac_try) 2>&5
10776   ac_status=$?
10777   echo "$as_me:10777: \$? = $ac_status" >&5
10778   (exit "$ac_status"); }; }; then
10779   cf_cv_posix_c_source=no
10780 else
10781   echo "$as_me: failed program was:" >&5
10782 cat "conftest.$ac_ext" >&5
10783 cf_want_posix_source=no
10784          case .$cf_POSIX_C_SOURCE in
10785          (.[12]??*)
10786                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10787                 ;;
10788          (.2)
10789                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10790                 cf_want_posix_source=yes
10791                 ;;
10792          (.*)
10793                 cf_want_posix_source=yes
10794                 ;;
10795          esac
10796          if test "$cf_want_posix_source" = yes ; then
10797                 cat >"conftest.$ac_ext" <<_ACEOF
10798 #line 10798 "configure"
10799 #include "confdefs.h"
10800 #include <sys/types.h>
10801 int
10802 main (void)
10803 {
10804
10805 #ifdef _POSIX_SOURCE
10806 make an error
10807 #endif
10808   ;
10809   return 0;
10810 }
10811 _ACEOF
10812 rm -f "conftest.$ac_objext"
10813 if { (eval echo "$as_me:10813: \"$ac_compile\"") >&5
10814   (eval $ac_compile) 2>&5
10815   ac_status=$?
10816   echo "$as_me:10816: \$? = $ac_status" >&5
10817   (exit "$ac_status"); } &&
10818          { ac_try='test -s "conftest.$ac_objext"'
10819   { (eval echo "$as_me:10819: \"$ac_try\"") >&5
10820   (eval $ac_try) 2>&5
10821   ac_status=$?
10822   echo "$as_me:10822: \$? = $ac_status" >&5
10823   (exit "$ac_status"); }; }; then
10824   :
10825 else
10826   echo "$as_me: failed program was:" >&5
10827 cat "conftest.$ac_ext" >&5
10828 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10829 fi
10830 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10831          fi
10832
10833 echo "${as_me:-configure}:10833: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10834
10835          CFLAGS="$cf_trim_CFLAGS"
10836          CPPFLAGS="$cf_trim_CPPFLAGS"
10837
10838         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10839         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10840
10841 echo "${as_me:-configure}:10841: testing if the second compile does not leave our definition intact error ..." 1>&5
10842
10843          cat >"conftest.$ac_ext" <<_ACEOF
10844 #line 10844 "configure"
10845 #include "confdefs.h"
10846 #include <sys/types.h>
10847 int
10848 main (void)
10849 {
10850
10851 #ifndef _POSIX_C_SOURCE
10852 make an error
10853 #endif
10854   ;
10855   return 0;
10856 }
10857 _ACEOF
10858 rm -f "conftest.$ac_objext"
10859 if { (eval echo "$as_me:10859: \"$ac_compile\"") >&5
10860   (eval $ac_compile) 2>&5
10861   ac_status=$?
10862   echo "$as_me:10862: \$? = $ac_status" >&5
10863   (exit "$ac_status"); } &&
10864          { ac_try='test -s "conftest.$ac_objext"'
10865   { (eval echo "$as_me:10865: \"$ac_try\"") >&5
10866   (eval $ac_try) 2>&5
10867   ac_status=$?
10868   echo "$as_me:10868: \$? = $ac_status" >&5
10869   (exit "$ac_status"); }; }; then
10870   :
10871 else
10872   echo "$as_me: failed program was:" >&5
10873 cat "conftest.$ac_ext" >&5
10874 cf_cv_posix_c_source=no
10875 fi
10876 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10877          CFLAGS="$cf_save_CFLAGS"
10878          CPPFLAGS="$cf_save_CPPFLAGS"
10879
10880 fi
10881 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10882
10883 fi
10884 echo "$as_me:10884: result: $cf_cv_posix_c_source" >&5
10885 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10886
10887 if test "$cf_cv_posix_c_source" != no ; then
10888         CFLAGS="$cf_trim_CFLAGS"
10889         CPPFLAGS="$cf_trim_CPPFLAGS"
10890
10891 cf_fix_cppflags=no
10892 cf_new_cflags=
10893 cf_new_cppflags=
10894 cf_new_extra_cppflags=
10895
10896 for cf_add_cflags in $cf_cv_posix_c_source
10897 do
10898 case "$cf_fix_cppflags" in
10899 (no)
10900         case "$cf_add_cflags" in
10901         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10902                 case "$cf_add_cflags" in
10903                 (-D*)
10904                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10905
10906                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10907                                 && test -z "${cf_tst_cflags}" \
10908                                 && cf_fix_cppflags=yes
10909
10910                         if test "$cf_fix_cppflags" = yes ; then
10911
10912         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10913         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10914
10915                                 continue
10916                         elif test "${cf_tst_cflags}" = "\"'" ; then
10917
10918         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10919         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10920
10921                                 continue
10922                         fi
10923                         ;;
10924                 esac
10925                 case "$CPPFLAGS" in
10926                 (*$cf_add_cflags)
10927                         ;;
10928                 (*)
10929                         case "$cf_add_cflags" in
10930                         (-D*)
10931                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10932
10933 CPPFLAGS=`echo "$CPPFLAGS" | \
10934         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10935                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10936
10937                                 ;;
10938                         esac
10939
10940         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10941         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10942
10943                         ;;
10944                 esac
10945                 ;;
10946         (*)
10947
10948         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10949         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10950
10951                 ;;
10952         esac
10953         ;;
10954 (yes)
10955
10956         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10957         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10958
10959         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10960
10961         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10962                 && test -z "${cf_tst_cflags}" \
10963                 && cf_fix_cppflags=no
10964         ;;
10965 esac
10966 done
10967
10968 if test -n "$cf_new_cflags" ; then
10969
10970         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10971         CFLAGS="${CFLAGS}$cf_new_cflags"
10972
10973 fi
10974
10975 if test -n "$cf_new_cppflags" ; then
10976
10977         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10978         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10979
10980 fi
10981
10982 if test -n "$cf_new_extra_cppflags" ; then
10983
10984         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10985         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10986
10987 fi
10988
10989 fi
10990
10991 fi # cf_cv_posix_visible
10992
10993         ;;
10994 esac
10995
10996 if test -n "$cf_xopen_source" ; then
10997
10998 cf_fix_cppflags=no
10999 cf_new_cflags=
11000 cf_new_cppflags=
11001 cf_new_extra_cppflags=
11002
11003 for cf_add_cflags in $cf_xopen_source
11004 do
11005 case "$cf_fix_cppflags" in
11006 (no)
11007         case "$cf_add_cflags" in
11008         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11009                 case "$cf_add_cflags" in
11010                 (-D*)
11011                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11012
11013                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11014                                 && test -z "${cf_tst_cflags}" \
11015                                 && cf_fix_cppflags=yes
11016
11017                         if test "$cf_fix_cppflags" = yes ; then
11018
11019         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11020         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11021
11022                                 continue
11023                         elif test "${cf_tst_cflags}" = "\"'" ; then
11024
11025         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11026         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11027
11028                                 continue
11029                         fi
11030                         ;;
11031                 esac
11032                 case "$CPPFLAGS" in
11033                 (*$cf_add_cflags)
11034                         ;;
11035                 (*)
11036                         case "$cf_add_cflags" in
11037                         (-D*)
11038                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11039
11040 CPPFLAGS=`echo "$CPPFLAGS" | \
11041         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11042                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11043
11044                                 ;;
11045                         esac
11046
11047         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11048         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11049
11050                         ;;
11051                 esac
11052                 ;;
11053         (*)
11054
11055         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11056         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11057
11058                 ;;
11059         esac
11060         ;;
11061 (yes)
11062
11063         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11064         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11065
11066         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11067
11068         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11069                 && test -z "${cf_tst_cflags}" \
11070                 && cf_fix_cppflags=no
11071         ;;
11072 esac
11073 done
11074
11075 if test -n "$cf_new_cflags" ; then
11076         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11077
11078 echo "${as_me:-configure}:11078: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11079
11080         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11081         CFLAGS="${CFLAGS}$cf_new_cflags"
11082
11083 fi
11084
11085 if test -n "$cf_new_cppflags" ; then
11086         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11087
11088 echo "${as_me:-configure}:11088: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11089
11090         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11091         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11092
11093 fi
11094
11095 if test -n "$cf_new_extra_cppflags" ; then
11096         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11097
11098 echo "${as_me:-configure}:11098: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11099
11100         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11101         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11102
11103 fi
11104
11105 fi
11106
11107 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11108         echo "$as_me:11108: checking if _XOPEN_SOURCE really is set" >&5
11109 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11110         cat >"conftest.$ac_ext" <<_ACEOF
11111 #line 11111 "configure"
11112 #include "confdefs.h"
11113 #include <stdlib.h>
11114 int
11115 main (void)
11116 {
11117
11118 #ifndef _XOPEN_SOURCE
11119 make an error
11120 #endif
11121   ;
11122   return 0;
11123 }
11124 _ACEOF
11125 rm -f "conftest.$ac_objext"
11126 if { (eval echo "$as_me:11126: \"$ac_compile\"") >&5
11127   (eval $ac_compile) 2>&5
11128   ac_status=$?
11129   echo "$as_me:11129: \$? = $ac_status" >&5
11130   (exit "$ac_status"); } &&
11131          { ac_try='test -s "conftest.$ac_objext"'
11132   { (eval echo "$as_me:11132: \"$ac_try\"") >&5
11133   (eval $ac_try) 2>&5
11134   ac_status=$?
11135   echo "$as_me:11135: \$? = $ac_status" >&5
11136   (exit "$ac_status"); }; }; then
11137   cf_XOPEN_SOURCE_set=yes
11138 else
11139   echo "$as_me: failed program was:" >&5
11140 cat "conftest.$ac_ext" >&5
11141 cf_XOPEN_SOURCE_set=no
11142 fi
11143 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11144         echo "$as_me:11144: result: $cf_XOPEN_SOURCE_set" >&5
11145 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11146         if test "$cf_XOPEN_SOURCE_set" = yes
11147         then
11148                 cat >"conftest.$ac_ext" <<_ACEOF
11149 #line 11149 "configure"
11150 #include "confdefs.h"
11151 #include <stdlib.h>
11152 int
11153 main (void)
11154 {
11155
11156 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11157 make an error
11158 #endif
11159   ;
11160   return 0;
11161 }
11162 _ACEOF
11163 rm -f "conftest.$ac_objext"
11164 if { (eval echo "$as_me:11164: \"$ac_compile\"") >&5
11165   (eval $ac_compile) 2>&5
11166   ac_status=$?
11167   echo "$as_me:11167: \$? = $ac_status" >&5
11168   (exit "$ac_status"); } &&
11169          { ac_try='test -s "conftest.$ac_objext"'
11170   { (eval echo "$as_me:11170: \"$ac_try\"") >&5
11171   (eval $ac_try) 2>&5
11172   ac_status=$?
11173   echo "$as_me:11173: \$? = $ac_status" >&5
11174   (exit "$ac_status"); }; }; then
11175   cf_XOPEN_SOURCE_set_ok=yes
11176 else
11177   echo "$as_me: failed program was:" >&5
11178 cat "conftest.$ac_ext" >&5
11179 cf_XOPEN_SOURCE_set_ok=no
11180 fi
11181 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11182                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11183                 then
11184                         { echo "$as_me:11184: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11185 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11186                 fi
11187         else
11188
11189 echo "$as_me:11189: checking if we should define _XOPEN_SOURCE" >&5
11190 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11191 if test "${cf_cv_xopen_source+set}" = set; then
11192   echo $ECHO_N "(cached) $ECHO_C" >&6
11193 else
11194
11195         cat >"conftest.$ac_ext" <<_ACEOF
11196 #line 11196 "configure"
11197 #include "confdefs.h"
11198
11199 #include <stdlib.h>
11200 #include <string.h>
11201 #include <sys/types.h>
11202
11203 int
11204 main (void)
11205 {
11206
11207 #ifndef _XOPEN_SOURCE
11208 make an error
11209 #endif
11210   ;
11211   return 0;
11212 }
11213 _ACEOF
11214 rm -f "conftest.$ac_objext"
11215 if { (eval echo "$as_me:11215: \"$ac_compile\"") >&5
11216   (eval $ac_compile) 2>&5
11217   ac_status=$?
11218   echo "$as_me:11218: \$? = $ac_status" >&5
11219   (exit "$ac_status"); } &&
11220          { ac_try='test -s "conftest.$ac_objext"'
11221   { (eval echo "$as_me:11221: \"$ac_try\"") >&5
11222   (eval $ac_try) 2>&5
11223   ac_status=$?
11224   echo "$as_me:11224: \$? = $ac_status" >&5
11225   (exit "$ac_status"); }; }; then
11226   cf_cv_xopen_source=no
11227 else
11228   echo "$as_me: failed program was:" >&5
11229 cat "conftest.$ac_ext" >&5
11230 cf_save="$CPPFLAGS"
11231
11232         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11233         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11234
11235          cat >"conftest.$ac_ext" <<_ACEOF
11236 #line 11236 "configure"
11237 #include "confdefs.h"
11238
11239 #include <stdlib.h>
11240 #include <string.h>
11241 #include <sys/types.h>
11242
11243 int
11244 main (void)
11245 {
11246
11247 #ifdef _XOPEN_SOURCE
11248 make an error
11249 #endif
11250   ;
11251   return 0;
11252 }
11253 _ACEOF
11254 rm -f "conftest.$ac_objext"
11255 if { (eval echo "$as_me:11255: \"$ac_compile\"") >&5
11256   (eval $ac_compile) 2>&5
11257   ac_status=$?
11258   echo "$as_me:11258: \$? = $ac_status" >&5
11259   (exit "$ac_status"); } &&
11260          { ac_try='test -s "conftest.$ac_objext"'
11261   { (eval echo "$as_me:11261: \"$ac_try\"") >&5
11262   (eval $ac_try) 2>&5
11263   ac_status=$?
11264   echo "$as_me:11264: \$? = $ac_status" >&5
11265   (exit "$ac_status"); }; }; then
11266   cf_cv_xopen_source=no
11267 else
11268   echo "$as_me: failed program was:" >&5
11269 cat "conftest.$ac_ext" >&5
11270 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11271 fi
11272 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11273         CPPFLAGS="$cf_save"
11274
11275 fi
11276 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11277
11278 fi
11279 echo "$as_me:11279: result: $cf_cv_xopen_source" >&5
11280 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11281
11282 if test "$cf_cv_xopen_source" != no ; then
11283
11284 CFLAGS=`echo "$CFLAGS" | \
11285         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11286                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11287
11288 CPPFLAGS=`echo "$CPPFLAGS" | \
11289         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11290                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11291
11292         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11293
11294 cf_fix_cppflags=no
11295 cf_new_cflags=
11296 cf_new_cppflags=
11297 cf_new_extra_cppflags=
11298
11299 for cf_add_cflags in $cf_temp_xopen_source
11300 do
11301 case "$cf_fix_cppflags" in
11302 (no)
11303         case "$cf_add_cflags" in
11304         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11305                 case "$cf_add_cflags" in
11306                 (-D*)
11307                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11308
11309                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11310                                 && test -z "${cf_tst_cflags}" \
11311                                 && cf_fix_cppflags=yes
11312
11313                         if test "$cf_fix_cppflags" = yes ; then
11314
11315         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11316         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11317
11318                                 continue
11319                         elif test "${cf_tst_cflags}" = "\"'" ; then
11320
11321         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11322         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11323
11324                                 continue
11325                         fi
11326                         ;;
11327                 esac
11328                 case "$CPPFLAGS" in
11329                 (*$cf_add_cflags)
11330                         ;;
11331                 (*)
11332                         case "$cf_add_cflags" in
11333                         (-D*)
11334                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11335
11336 CPPFLAGS=`echo "$CPPFLAGS" | \
11337         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11338                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11339
11340                                 ;;
11341                         esac
11342
11343         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11344         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11345
11346                         ;;
11347                 esac
11348                 ;;
11349         (*)
11350
11351         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11352         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11353
11354                 ;;
11355         esac
11356         ;;
11357 (yes)
11358
11359         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11360         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11361
11362         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11363
11364         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11365                 && test -z "${cf_tst_cflags}" \
11366                 && cf_fix_cppflags=no
11367         ;;
11368 esac
11369 done
11370
11371 if test -n "$cf_new_cflags" ; then
11372
11373         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11374         CFLAGS="${CFLAGS}$cf_new_cflags"
11375
11376 fi
11377
11378 if test -n "$cf_new_cppflags" ; then
11379
11380         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11381         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11382
11383 fi
11384
11385 if test -n "$cf_new_extra_cppflags" ; then
11386
11387         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11388         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11389
11390 fi
11391
11392 fi
11393
11394         fi
11395 fi
11396 fi # cf_cv_posix_visible
11397
11398 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11399
11400 # Work around breakage on OS X
11401
11402 echo "$as_me:11402: checking if SIGWINCH is defined" >&5
11403 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11404 if test "${cf_cv_define_sigwinch+set}" = set; then
11405   echo $ECHO_N "(cached) $ECHO_C" >&6
11406 else
11407
11408         cat >"conftest.$ac_ext" <<_ACEOF
11409 #line 11409 "configure"
11410 #include "confdefs.h"
11411
11412 #include <sys/types.h>
11413 #include <sys/signal.h>
11414
11415 int
11416 main (void)
11417 {
11418 int x = SIGWINCH; (void)x
11419   ;
11420   return 0;
11421 }
11422 _ACEOF
11423 rm -f "conftest.$ac_objext"
11424 if { (eval echo "$as_me:11424: \"$ac_compile\"") >&5
11425   (eval $ac_compile) 2>&5
11426   ac_status=$?
11427   echo "$as_me:11427: \$? = $ac_status" >&5
11428   (exit "$ac_status"); } &&
11429          { ac_try='test -s "conftest.$ac_objext"'
11430   { (eval echo "$as_me:11430: \"$ac_try\"") >&5
11431   (eval $ac_try) 2>&5
11432   ac_status=$?
11433   echo "$as_me:11433: \$? = $ac_status" >&5
11434   (exit "$ac_status"); }; }; then
11435   cf_cv_define_sigwinch=yes
11436 else
11437   echo "$as_me: failed program was:" >&5
11438 cat "conftest.$ac_ext" >&5
11439 cat >"conftest.$ac_ext" <<_ACEOF
11440 #line 11440 "configure"
11441 #include "confdefs.h"
11442
11443 #undef _XOPEN_SOURCE
11444 #undef _POSIX_SOURCE
11445 #undef _POSIX_C_SOURCE
11446 #include <sys/types.h>
11447 #include <sys/signal.h>
11448
11449 int
11450 main (void)
11451 {
11452 int x = SIGWINCH; (void)x
11453   ;
11454   return 0;
11455 }
11456 _ACEOF
11457 rm -f "conftest.$ac_objext"
11458 if { (eval echo "$as_me:11458: \"$ac_compile\"") >&5
11459   (eval $ac_compile) 2>&5
11460   ac_status=$?
11461   echo "$as_me:11461: \$? = $ac_status" >&5
11462   (exit "$ac_status"); } &&
11463          { ac_try='test -s "conftest.$ac_objext"'
11464   { (eval echo "$as_me:11464: \"$ac_try\"") >&5
11465   (eval $ac_try) 2>&5
11466   ac_status=$?
11467   echo "$as_me:11467: \$? = $ac_status" >&5
11468   (exit "$ac_status"); }; }; then
11469   cf_cv_define_sigwinch=maybe
11470 else
11471   echo "$as_me: failed program was:" >&5
11472 cat "conftest.$ac_ext" >&5
11473 cf_cv_define_sigwinch=no
11474 fi
11475 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11476
11477 fi
11478 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11479
11480 fi
11481 echo "$as_me:11481: result: $cf_cv_define_sigwinch" >&5
11482 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11483
11484 if test "$cf_cv_define_sigwinch" = maybe ; then
11485 echo "$as_me:11485: checking for actual SIGWINCH definition" >&5
11486 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11487 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11488   echo $ECHO_N "(cached) $ECHO_C" >&6
11489 else
11490
11491 cf_cv_fixup_sigwinch=unknown
11492 cf_sigwinch=32
11493 while test "$cf_sigwinch" != 1
11494 do
11495         cat >"conftest.$ac_ext" <<_ACEOF
11496 #line 11496 "configure"
11497 #include "confdefs.h"
11498
11499 #undef _XOPEN_SOURCE
11500 #undef _POSIX_SOURCE
11501 #undef _POSIX_C_SOURCE
11502 #include <sys/types.h>
11503 #include <sys/signal.h>
11504
11505 int
11506 main (void)
11507 {
11508
11509 #if SIGWINCH != $cf_sigwinch
11510 make an error
11511 #endif
11512 int x = SIGWINCH; (void)x
11513   ;
11514   return 0;
11515 }
11516 _ACEOF
11517 rm -f "conftest.$ac_objext"
11518 if { (eval echo "$as_me:11518: \"$ac_compile\"") >&5
11519   (eval $ac_compile) 2>&5
11520   ac_status=$?
11521   echo "$as_me:11521: \$? = $ac_status" >&5
11522   (exit "$ac_status"); } &&
11523          { ac_try='test -s "conftest.$ac_objext"'
11524   { (eval echo "$as_me:11524: \"$ac_try\"") >&5
11525   (eval $ac_try) 2>&5
11526   ac_status=$?
11527   echo "$as_me:11527: \$? = $ac_status" >&5
11528   (exit "$ac_status"); }; }; then
11529   cf_cv_fixup_sigwinch=$cf_sigwinch
11530          break
11531 else
11532   echo "$as_me: failed program was:" >&5
11533 cat "conftest.$ac_ext" >&5
11534 fi
11535 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11536
11537 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11538 done
11539
11540 fi
11541 echo "$as_me:11541: result: $cf_cv_fixup_sigwinch" >&5
11542 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11543
11544         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11545                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11546         fi
11547 fi
11548
11549 # Checks for CODESET support.
11550
11551 echo "$as_me:11551: checking for nl_langinfo and CODESET" >&5
11552 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11553 if test "${am_cv_langinfo_codeset+set}" = set; then
11554   echo $ECHO_N "(cached) $ECHO_C" >&6
11555 else
11556   cat >"conftest.$ac_ext" <<_ACEOF
11557 #line 11557 "configure"
11558 #include "confdefs.h"
11559 #include <langinfo.h>
11560 int
11561 main (void)
11562 {
11563 char* cs = nl_langinfo(CODESET); (void)cs
11564   ;
11565   return 0;
11566 }
11567 _ACEOF
11568 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11569 if { (eval echo "$as_me:11569: \"$ac_link\"") >&5
11570   (eval $ac_link) 2>&5
11571   ac_status=$?
11572   echo "$as_me:11572: \$? = $ac_status" >&5
11573   (exit "$ac_status"); } &&
11574          { ac_try='test -s "conftest$ac_exeext"'
11575   { (eval echo "$as_me:11575: \"$ac_try\"") >&5
11576   (eval $ac_try) 2>&5
11577   ac_status=$?
11578   echo "$as_me:11578: \$? = $ac_status" >&5
11579   (exit "$ac_status"); }; }; then
11580   am_cv_langinfo_codeset=yes
11581 else
11582   echo "$as_me: failed program was:" >&5
11583 cat "conftest.$ac_ext" >&5
11584 am_cv_langinfo_codeset=no
11585 fi
11586 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11587
11588 fi
11589 echo "$as_me:11589: result: $am_cv_langinfo_codeset" >&5
11590 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11591         if test "$am_cv_langinfo_codeset" = yes; then
11592
11593 cat >>confdefs.h <<\EOF
11594 #define HAVE_LANGINFO_CODESET 1
11595 EOF
11596
11597         fi
11598
11599 # use these variables to work around a defect in gcc's fixincludes.
11600 NCURSES_OK_WCHAR_T=
11601 NCURSES_OK_WINT_T=
11602
11603 echo "$as_me:11603: checking if you want wide-character code" >&5
11604 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11605
11606 # Check whether --enable-widec or --disable-widec was given.
11607 if test "${enable_widec+set}" = set; then
11608   enableval="$enable_widec"
11609   with_widec=$enableval
11610 else
11611   with_widec=no
11612 fi;
11613 echo "$as_me:11613: result: $with_widec" >&5
11614 echo "${ECHO_T}$with_widec" >&6
11615
11616 NCURSES_WCWIDTH_GRAPHICS=1
11617
11618 if test "x$with_widec" = xyes ; then
11619         if test "x$disable_lib_suffixes" = xno ; then
11620                 LIB_SUFFIX="w${LIB_SUFFIX}"
11621         fi
11622
11623 cat >>confdefs.h <<\EOF
11624 #define USE_WIDEC_SUPPORT 1
11625 EOF
11626
11627 cat >>confdefs.h <<\EOF
11628 #define NCURSES_WIDECHAR 1
11629 EOF
11630
11631 for ac_header in \
11632 wchar.h \
11633 wctype.h \
11634
11635 do
11636 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11637 echo "$as_me:11637: checking for $ac_header" >&5
11638 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11639 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11640   echo $ECHO_N "(cached) $ECHO_C" >&6
11641 else
11642   cat >"conftest.$ac_ext" <<_ACEOF
11643 #line 11643 "configure"
11644 #include "confdefs.h"
11645 #include <$ac_header>
11646 _ACEOF
11647 if { (eval echo "$as_me:11647: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11648   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11649   ac_status=$?
11650   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11651   rm -f conftest.er1
11652   cat conftest.err >&5
11653   echo "$as_me:11653: \$? = $ac_status" >&5
11654   (exit "$ac_status"); } >/dev/null; then
11655   if test -s conftest.err; then
11656     ac_cpp_err=$ac_c_preproc_warn_flag
11657   else
11658     ac_cpp_err=
11659   fi
11660 else
11661   ac_cpp_err=yes
11662 fi
11663 if test -z "$ac_cpp_err"; then
11664   eval "$as_ac_Header=yes"
11665 else
11666   echo "$as_me: failed program was:" >&5
11667   cat "conftest.$ac_ext" >&5
11668   eval "$as_ac_Header=no"
11669 fi
11670 rm -f conftest.err "conftest.$ac_ext"
11671 fi
11672 echo "$as_me:11672: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11673 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11674 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11675   cat >>confdefs.h <<EOF
11676 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11677 EOF
11678
11679 fi
11680 done
11681
11682 echo "$as_me:11682: checking if wchar.h can be used as is" >&5
11683 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11684 if test "${cf_cv_wchar_h_okay+set}" = set; then
11685   echo $ECHO_N "(cached) $ECHO_C" >&6
11686 else
11687
11688 cat >"conftest.$ac_ext" <<_ACEOF
11689 #line 11689 "configure"
11690 #include "confdefs.h"
11691
11692 #include <stdlib.h>
11693 #ifdef HAVE_WCHAR_H
11694 #include <wchar.h>
11695 #endif
11696 #ifdef HAVE_WCTYPE_H
11697 #include <wctype.h>
11698 #endif
11699
11700 int
11701 main (void)
11702 {
11703
11704         wint_t foo = 0;
11705         int bar = iswpunct(foo)
11706   ;
11707   return 0;
11708 }
11709 _ACEOF
11710 rm -f "conftest.$ac_objext"
11711 if { (eval echo "$as_me:11711: \"$ac_compile\"") >&5
11712   (eval $ac_compile) 2>&5
11713   ac_status=$?
11714   echo "$as_me:11714: \$? = $ac_status" >&5
11715   (exit "$ac_status"); } &&
11716          { ac_try='test -s "conftest.$ac_objext"'
11717   { (eval echo "$as_me:11717: \"$ac_try\"") >&5
11718   (eval $ac_try) 2>&5
11719   ac_status=$?
11720   echo "$as_me:11720: \$? = $ac_status" >&5
11721   (exit "$ac_status"); }; }; then
11722   cf_cv_wchar_h_okay=yes
11723 else
11724   echo "$as_me: failed program was:" >&5
11725 cat "conftest.$ac_ext" >&5
11726 cf_cv_wchar_h_okay=no
11727 fi
11728 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11729 fi
11730 echo "$as_me:11730: result: $cf_cv_wchar_h_okay" >&5
11731 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11732
11733 if test "$cf_cv_wchar_h_okay" = no
11734 then
11735
11736 echo "$as_me:11736: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11737 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11738 cat >"conftest.$ac_ext" <<_ACEOF
11739 #line 11739 "configure"
11740 #include "confdefs.h"
11741 #include <sys/types.h>
11742
11743 int
11744 main (void)
11745 {
11746
11747 #ifndef _XOPEN_SOURCE_EXTENDED
11748 make an error
11749 #endif
11750   ;
11751   return 0;
11752 }
11753 _ACEOF
11754 rm -f "conftest.$ac_objext"
11755 if { (eval echo "$as_me:11755: \"$ac_compile\"") >&5
11756   (eval $ac_compile) 2>&5
11757   ac_status=$?
11758   echo "$as_me:11758: \$? = $ac_status" >&5
11759   (exit "$ac_status"); } &&
11760          { ac_try='test -s "conftest.$ac_objext"'
11761   { (eval echo "$as_me:11761: \"$ac_try\"") >&5
11762   (eval $ac_try) 2>&5
11763   ac_status=$?
11764   echo "$as_me:11764: \$? = $ac_status" >&5
11765   (exit "$ac_status"); }; }; then
11766   cf_result=no
11767 else
11768   echo "$as_me: failed program was:" >&5
11769 cat "conftest.$ac_ext" >&5
11770 cf_result=yes
11771 fi
11772 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11773 echo "$as_me:11773: result: $cf_result" >&5
11774 echo "${ECHO_T}$cf_result" >&6
11775
11776 if test "$cf_result" = yes ; then
11777         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11778 elif test "x" != "x" ; then
11779         echo "$as_me:11779: checking checking for compatible value versus " >&5
11780 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11781         cat >"conftest.$ac_ext" <<_ACEOF
11782 #line 11782 "configure"
11783 #include "confdefs.h"
11784 #include <sys/types.h>
11785
11786 int
11787 main (void)
11788 {
11789
11790 #if _XOPEN_SOURCE_EXTENDED- < 0
11791 make an error
11792 #endif
11793   ;
11794   return 0;
11795 }
11796 _ACEOF
11797 rm -f "conftest.$ac_objext"
11798 if { (eval echo "$as_me:11798: \"$ac_compile\"") >&5
11799   (eval $ac_compile) 2>&5
11800   ac_status=$?
11801   echo "$as_me:11801: \$? = $ac_status" >&5
11802   (exit "$ac_status"); } &&
11803          { ac_try='test -s "conftest.$ac_objext"'
11804   { (eval echo "$as_me:11804: \"$ac_try\"") >&5
11805   (eval $ac_try) 2>&5
11806   ac_status=$?
11807   echo "$as_me:11807: \$? = $ac_status" >&5
11808   (exit "$ac_status"); }; }; then
11809   cf_result=yes
11810 else
11811   echo "$as_me: failed program was:" >&5
11812 cat "conftest.$ac_ext" >&5
11813 cf_result=no
11814 fi
11815 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11816         echo "$as_me:11816: result: $cf_result" >&5
11817 echo "${ECHO_T}$cf_result" >&6
11818         if test "$cf_result" = no ; then
11819                 # perhaps we can override it - try...
11820                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11821         fi
11822 fi
11823
11824 fi
11825
11826 echo "$as_me:11826: checking if wcwidth agrees graphics are single-width" >&5
11827 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11828 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11829   echo $ECHO_N "(cached) $ECHO_C" >&6
11830 else
11831
11832 cat >conftest.in <<CF_EOF
11833 -       VT100 symbols
11834 0x250c  upper left corner
11835 0x2514  lower left corner
11836 0x2510  upper right corner
11837 0x2518  lower right corner
11838 0x251c  tee pointing left
11839 0x2524  tee pointing right
11840 0x2534  tee pointing up
11841 0x252c  tee pointing down
11842 0x2500  horizontal line
11843 0x2502  vertical line
11844 0x253c  large plus or crossover
11845 0x23ba  scan line 1
11846 0x23bd  scan line 9
11847 0x25c6  diamond
11848 0x2592  checker board (stipple)
11849 0x00b0  degree symbol
11850 0x00b1  plus/minus
11851 0x00b7  bullet
11852 -       Teletype 5410v1 symbols
11853 0x2190  arrow pointing left
11854 0x2192  arrow pointing right
11855 0x2193  arrow pointing down
11856 0x2191  arrow pointing up
11857 0x2592  board of squares
11858 0x2603  lantern symbol
11859 0x25ae  solid square block
11860 -       these defaults were invented for ncurses
11861 0x23bb  scan line 3
11862 0x23bc  scan line 7
11863 0x2264  less-than-or-equal-to
11864 0x2265  greater-than-or-equal-to
11865 0x03c0  greek pi
11866 0x2260  not-equal
11867 0x00a3  pound-sterling symbol
11868 -       thick-line-drawing
11869 0x250f  upper left corner
11870 0x2517  lower left corner
11871 0x2513  upper right corner
11872 0x251b  lower right corner
11873 0x2523  tee pointing left
11874 0x252b  tee pointing right
11875 0x253b  tee pointing up
11876 0x2533  tee pointing down
11877 0x2501  horizontal line
11878 0x2503  vertical line
11879 0x254b  large plus or crossover
11880 -       double-line-drawing
11881 0x2554  upper left corner
11882 0x255a  lower left corner
11883 0x2557  upper right corner
11884 0x255d  lower right corner
11885 0x2563  tee pointing left
11886 0x2560  tee pointing right
11887 0x2569  tee pointing up
11888 0x2566  tee pointing down
11889 0x2550  horizontal line
11890 0x2551  vertical line
11891 0x256c  large plus or crossover
11892 CF_EOF
11893 if test "$cross_compiling" = yes; then
11894   cf_cv_wcwidth_graphics=unknown
11895 else
11896   cat >"conftest.$ac_ext" <<_ACEOF
11897 #line 11897 "configure"
11898 #include "confdefs.h"
11899
11900 #include <locale.h>
11901 #include <stdio.h>
11902 #include <wchar.h>
11903
11904 #define MY_LEN 80
11905
11906 int
11907 main(void)
11908 {
11909         FILE *fp;
11910         int value;
11911         char buffer[MY_LEN + 1];
11912         char notes[MY_LEN + 1];
11913         int totals = 0;
11914         int passed = 0;
11915
11916         if (setlocale(LC_ALL, "en_US.UTF8") ||
11917                 setlocale(LC_ALL, "en_US.UTF-8") ||
11918                 setlocale(LC_ALL, "en_US.utf8") ||
11919                 setlocale(LC_ALL, "en_US.utf-8")) {
11920                 if ((fp = fopen("conftest.in", "r")) != 0) {
11921                         while (fgets(buffer, MY_LEN, fp) != 0) {
11922                                 if (*buffer == '-') {
11923                                         fprintf(stderr, "\\t%s", buffer);
11924                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11925                                         ++totals;
11926                                         if (wcwidth(value) == 1)
11927                                                 ++passed;
11928                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
11929                                 } else {
11930                                         fprintf(stderr, "?\\t%s", buffer);
11931                                 }
11932                         }
11933                 }
11934         }
11935         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
11936         return (totals == passed) ? 0 : 1;
11937 }
11938
11939 _ACEOF
11940 rm -f "conftest$ac_exeext"
11941 if { (eval echo "$as_me:11941: \"$ac_link\"") >&5
11942   (eval $ac_link) 2>&5
11943   ac_status=$?
11944   echo "$as_me:11944: \$? = $ac_status" >&5
11945   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11946   { (eval echo "$as_me:11946: \"$ac_try\"") >&5
11947   (eval $ac_try) 2>&5
11948   ac_status=$?
11949   echo "$as_me:11949: \$? = $ac_status" >&5
11950   (exit "$ac_status"); }; }; then
11951   cf_cv_wcwidth_graphics=yes
11952 else
11953   echo "$as_me: program exited with status $ac_status" >&5
11954 echo "$as_me: failed program was:" >&5
11955 cat "conftest.$ac_ext" >&5
11956 cf_cv_wcwidth_graphics=no
11957 fi
11958 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11959 fi
11960
11961 fi
11962 echo "$as_me:11962: result: $cf_cv_wcwidth_graphics" >&5
11963 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11964
11965         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11966
11967         # with_overwrite=no
11968         NCURSES_CH_T=cchar_t
11969
11970 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11971 do
11972 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11973 echo "$as_me:11973: checking for $ac_func" >&5
11974 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11975 if eval "test \"\${$as_ac_var+set}\" = set"; then
11976   echo $ECHO_N "(cached) $ECHO_C" >&6
11977 else
11978   cat >"conftest.$ac_ext" <<_ACEOF
11979 #line 11979 "configure"
11980 #include "confdefs.h"
11981 #define $ac_func autoconf_temporary
11982 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11983 #undef $ac_func
11984
11985 #ifdef __cplusplus
11986 extern "C"
11987 #endif
11988
11989 /* We use char because int might match the return type of a gcc2
11990    builtin and then its argument prototype would still apply.  */
11991 char $ac_func (void);
11992
11993 int
11994 main (void)
11995 {
11996
11997 /* The GNU C library defines stubs for functions which it implements
11998     to always fail with ENOSYS.  Some functions are actually named
11999     something starting with __ and the normal name is an alias.  */
12000 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12001 #error found stub for $ac_func
12002 #endif
12003
12004         return $ac_func ();
12005   ;
12006   return 0;
12007 }
12008 _ACEOF
12009 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12010 if { (eval echo "$as_me:12010: \"$ac_link\"") >&5
12011   (eval $ac_link) 2>&5
12012   ac_status=$?
12013   echo "$as_me:12013: \$? = $ac_status" >&5
12014   (exit "$ac_status"); } &&
12015          { ac_try='test -s "conftest$ac_exeext"'
12016   { (eval echo "$as_me:12016: \"$ac_try\"") >&5
12017   (eval $ac_try) 2>&5
12018   ac_status=$?
12019   echo "$as_me:12019: \$? = $ac_status" >&5
12020   (exit "$ac_status"); }; }; then
12021   eval "$as_ac_var=yes"
12022 else
12023   echo "$as_me: failed program was:" >&5
12024 cat "conftest.$ac_ext" >&5
12025 eval "$as_ac_var=no"
12026 fi
12027 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12028 fi
12029 echo "$as_me:12029: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12030 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12031 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12032   cat >>confdefs.h <<EOF
12033 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12034 EOF
12035
12036 fi
12037 done
12038
12039         if test "x$ac_cv_func_putwc" != xyes ; then
12040
12041 echo "$as_me:12041: checking for multibyte character support" >&5
12042 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12043 if test "${cf_cv_utf8_lib+set}" = set; then
12044   echo $ECHO_N "(cached) $ECHO_C" >&6
12045 else
12046
12047         cf_save_LIBS="$LIBS"
12048         cat >"conftest.$ac_ext" <<_ACEOF
12049 #line 12049 "configure"
12050 #include "confdefs.h"
12051
12052 #include <stdlib.h>
12053 int
12054 main (void)
12055 {
12056 putwc(0,0);
12057   ;
12058   return 0;
12059 }
12060 _ACEOF
12061 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12062 if { (eval echo "$as_me:12062: \"$ac_link\"") >&5
12063   (eval $ac_link) 2>&5
12064   ac_status=$?
12065   echo "$as_me:12065: \$? = $ac_status" >&5
12066   (exit "$ac_status"); } &&
12067          { ac_try='test -s "conftest$ac_exeext"'
12068   { (eval echo "$as_me:12068: \"$ac_try\"") >&5
12069   (eval $ac_try) 2>&5
12070   ac_status=$?
12071   echo "$as_me:12071: \$? = $ac_status" >&5
12072   (exit "$ac_status"); }; }; then
12073   cf_cv_utf8_lib=yes
12074 else
12075   echo "$as_me: failed program was:" >&5
12076 cat "conftest.$ac_ext" >&5
12077
12078 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12079 # will be set on completion of the AC_TRY_LINK below.
12080 cf_cv_header_path_utf8=
12081 cf_cv_library_path_utf8=
12082
12083 echo "${as_me:-configure}:12083: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12084
12085 cf_save_LIBS="$LIBS"
12086
12087 cat >"conftest.$ac_ext" <<_ACEOF
12088 #line 12088 "configure"
12089 #include "confdefs.h"
12090
12091 #include <libutf8.h>
12092 int
12093 main (void)
12094 {
12095 putwc(0,0);
12096   ;
12097   return 0;
12098 }
12099 _ACEOF
12100 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12101 if { (eval echo "$as_me:12101: \"$ac_link\"") >&5
12102   (eval $ac_link) 2>&5
12103   ac_status=$?
12104   echo "$as_me:12104: \$? = $ac_status" >&5
12105   (exit "$ac_status"); } &&
12106          { ac_try='test -s "conftest$ac_exeext"'
12107   { (eval echo "$as_me:12107: \"$ac_try\"") >&5
12108   (eval $ac_try) 2>&5
12109   ac_status=$?
12110   echo "$as_me:12110: \$? = $ac_status" >&5
12111   (exit "$ac_status"); }; }; then
12112
12113         cf_cv_find_linkage_utf8=yes
12114         cf_cv_header_path_utf8=/usr/include
12115         cf_cv_library_path_utf8=/usr/lib
12116
12117 else
12118   echo "$as_me: failed program was:" >&5
12119 cat "conftest.$ac_ext" >&5
12120
12121 LIBS="-lutf8  $cf_save_LIBS"
12122
12123 cat >"conftest.$ac_ext" <<_ACEOF
12124 #line 12124 "configure"
12125 #include "confdefs.h"
12126
12127 #include <libutf8.h>
12128 int
12129 main (void)
12130 {
12131 putwc(0,0);
12132   ;
12133   return 0;
12134 }
12135 _ACEOF
12136 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12137 if { (eval echo "$as_me:12137: \"$ac_link\"") >&5
12138   (eval $ac_link) 2>&5
12139   ac_status=$?
12140   echo "$as_me:12140: \$? = $ac_status" >&5
12141   (exit "$ac_status"); } &&
12142          { ac_try='test -s "conftest$ac_exeext"'
12143   { (eval echo "$as_me:12143: \"$ac_try\"") >&5
12144   (eval $ac_try) 2>&5
12145   ac_status=$?
12146   echo "$as_me:12146: \$? = $ac_status" >&5
12147   (exit "$ac_status"); }; }; then
12148
12149         cf_cv_find_linkage_utf8=yes
12150         cf_cv_header_path_utf8=/usr/include
12151         cf_cv_library_path_utf8=/usr/lib
12152         cf_cv_library_file_utf8="-lutf8"
12153
12154 else
12155   echo "$as_me: failed program was:" >&5
12156 cat "conftest.$ac_ext" >&5
12157
12158         cf_cv_find_linkage_utf8=no
12159         LIBS="$cf_save_LIBS"
12160
12161         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12162
12163 echo "${as_me:-configure}:12163: testing find linkage for utf8 library ..." 1>&5
12164
12165 echo "${as_me:-configure}:12165: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12166
12167         cf_save_CPPFLAGS="$CPPFLAGS"
12168         cf_test_CPPFLAGS="$CPPFLAGS"
12169
12170 cf_search=
12171
12172 # collect the current set of include-directories from compiler flags
12173 cf_header_path_list=""
12174 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12175         for cf_header_path in $CPPFLAGS $CFLAGS
12176         do
12177                 case "$cf_header_path" in
12178                 (-I*)
12179                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12180
12181 test "x$cf_header_path" != "xNONE" && \
12182 test -d "$cf_header_path" && \
12183  {
12184         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12185         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12186         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12187         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12188         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12189         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12190 }
12191
12192                         cf_header_path_list="$cf_header_path_list $cf_search"
12193                         ;;
12194                 esac
12195         done
12196 fi
12197
12198 # add the variations for the package we are looking for
12199
12200 cf_search=
12201
12202 test "x$prefix" != "xNONE" && \
12203 test -d "$prefix" && \
12204  {
12205         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12206         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12207         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12208         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12209         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12210         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12211 }
12212
12213 for cf_subdir_prefix in \
12214         /usr \
12215         /usr/local \
12216         /usr/pkg \
12217         /opt \
12218         /opt/local \
12219         $HOME
12220 do
12221
12222 test "x$cf_subdir_prefix" != "x$prefix" && \
12223 test -d "$cf_subdir_prefix" && \
12224 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12225         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12226         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12227         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12228         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12229         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12230         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12231 }
12232
12233 done
12234
12235 test "$includedir" != NONE && \
12236 test "$includedir" != "/usr/include" && \
12237 test -d "$includedir" && {
12238         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12239         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12240 }
12241
12242 test "$oldincludedir" != NONE && \
12243 test "$oldincludedir" != "/usr/include" && \
12244 test -d "$oldincludedir" && {
12245         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12246         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12247 }
12248
12249 cf_search="$cf_search $cf_header_path_list"
12250
12251         for cf_cv_header_path_utf8 in $cf_search
12252         do
12253                 if test -d "$cf_cv_header_path_utf8" ; then
12254                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12255
12256 echo "${as_me:-configure}:12256: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12257
12258                         CPPFLAGS="$cf_save_CPPFLAGS"
12259
12260         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12261         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12262
12263                         cat >"conftest.$ac_ext" <<_ACEOF
12264 #line 12264 "configure"
12265 #include "confdefs.h"
12266
12267 #include <libutf8.h>
12268 int
12269 main (void)
12270 {
12271 putwc(0,0);
12272   ;
12273   return 0;
12274 }
12275 _ACEOF
12276 rm -f "conftest.$ac_objext"
12277 if { (eval echo "$as_me:12277: \"$ac_compile\"") >&5
12278   (eval $ac_compile) 2>&5
12279   ac_status=$?
12280   echo "$as_me:12280: \$? = $ac_status" >&5
12281   (exit "$ac_status"); } &&
12282          { ac_try='test -s "conftest.$ac_objext"'
12283   { (eval echo "$as_me:12283: \"$ac_try\"") >&5
12284   (eval $ac_try) 2>&5
12285   ac_status=$?
12286   echo "$as_me:12286: \$? = $ac_status" >&5
12287   (exit "$ac_status"); }; }; then
12288
12289                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12290
12291 echo "${as_me:-configure}:12291: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12292
12293                                 cf_cv_find_linkage_utf8=maybe
12294                                 cf_test_CPPFLAGS="$CPPFLAGS"
12295                                 break
12296 else
12297   echo "$as_me: failed program was:" >&5
12298 cat "conftest.$ac_ext" >&5
12299
12300                                 CPPFLAGS="$cf_save_CPPFLAGS"
12301
12302 fi
12303 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12304                 fi
12305         done
12306
12307         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12308
12309 echo "${as_me:-configure}:12309: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12310
12311                 cf_save_LIBS="$LIBS"
12312                 cf_save_LDFLAGS="$LDFLAGS"
12313
12314                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12315
12316 cf_search=
12317 cf_library_path_list=""
12318 if test -n "${LDFLAGS}${LIBS}" ; then
12319         for cf_library_path in $LDFLAGS $LIBS
12320         do
12321                 case "$cf_library_path" in
12322                 (-L*)
12323                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12324
12325 test "x$cf_library_path" != "xNONE" && \
12326 test -d "$cf_library_path" && \
12327  {
12328         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12329         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12330         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12331         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12332         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12333         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12334 }
12335
12336                         cf_library_path_list="$cf_library_path_list $cf_search"
12337                         ;;
12338                 esac
12339         done
12340 fi
12341
12342 cf_search=
12343
12344 test "x$prefix" != "xNONE" && \
12345 test -d "$prefix" && \
12346  {
12347         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12348         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12349         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12350         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12351         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12352         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12353 }
12354
12355 for cf_subdir_prefix in \
12356         /usr \
12357         /usr/local \
12358         /usr/pkg \
12359         /opt \
12360         /opt/local \
12361         $HOME
12362 do
12363
12364 test "x$cf_subdir_prefix" != "x$prefix" && \
12365 test -d "$cf_subdir_prefix" && \
12366 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12367         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12368         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12369         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12370         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12371         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12372         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12373 }
12374
12375 done
12376
12377 cf_search="$cf_library_path_list $cf_search"
12378
12379                         for cf_cv_library_path_utf8 in $cf_search
12380                         do
12381                                 if test -d "$cf_cv_library_path_utf8" ; then
12382                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12383
12384 echo "${as_me:-configure}:12384: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12385
12386                                         CPPFLAGS="$cf_test_CPPFLAGS"
12387                                         LIBS="-lutf8  $cf_save_LIBS"
12388                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12389                                         cat >"conftest.$ac_ext" <<_ACEOF
12390 #line 12390 "configure"
12391 #include "confdefs.h"
12392
12393 #include <libutf8.h>
12394 int
12395 main (void)
12396 {
12397 putwc(0,0);
12398   ;
12399   return 0;
12400 }
12401 _ACEOF
12402 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12403 if { (eval echo "$as_me:12403: \"$ac_link\"") >&5
12404   (eval $ac_link) 2>&5
12405   ac_status=$?
12406   echo "$as_me:12406: \$? = $ac_status" >&5
12407   (exit "$ac_status"); } &&
12408          { ac_try='test -s "conftest$ac_exeext"'
12409   { (eval echo "$as_me:12409: \"$ac_try\"") >&5
12410   (eval $ac_try) 2>&5
12411   ac_status=$?
12412   echo "$as_me:12412: \$? = $ac_status" >&5
12413   (exit "$ac_status"); }; }; then
12414
12415                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12416
12417 echo "${as_me:-configure}:12417: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12418
12419                                         cf_cv_find_linkage_utf8=yes
12420                                         cf_cv_library_file_utf8="-lutf8"
12421                                         break
12422 else
12423   echo "$as_me: failed program was:" >&5
12424 cat "conftest.$ac_ext" >&5
12425
12426                                         CPPFLAGS="$cf_save_CPPFLAGS"
12427                                         LIBS="$cf_save_LIBS"
12428                                         LDFLAGS="$cf_save_LDFLAGS"
12429
12430 fi
12431 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12432                                 fi
12433                         done
12434                         CPPFLAGS="$cf_save_CPPFLAGS"
12435                         LDFLAGS="$cf_save_LDFLAGS"
12436                 fi
12437
12438         else
12439                 cf_cv_find_linkage_utf8=no
12440         fi
12441
12442 fi
12443 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12444
12445 fi
12446 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12447
12448 LIBS="$cf_save_LIBS"
12449
12450 if test "$cf_cv_find_linkage_utf8" = yes ; then
12451 cf_cv_utf8_lib=add-on
12452 else
12453 cf_cv_utf8_lib=no
12454 fi
12455
12456 fi
12457 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12458 fi
12459 echo "$as_me:12459: result: $cf_cv_utf8_lib" >&5
12460 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12461
12462 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12463 # ncurses/ncursesw:
12464 if test "$cf_cv_utf8_lib" = "add-on" ; then
12465
12466 cat >>confdefs.h <<\EOF
12467 #define HAVE_LIBUTF8_H 1
12468 EOF
12469
12470 if test -n "$cf_cv_header_path_utf8" ; then
12471   for cf_add_incdir in $cf_cv_header_path_utf8
12472   do
12473         while test "$cf_add_incdir" != /usr/include
12474         do
12475           if test -d "$cf_add_incdir"
12476           then
12477                 cf_have_incdir=no
12478                 if test -n "$CFLAGS$CPPFLAGS" ; then
12479                   # a loop is needed to ensure we can add subdirs of existing dirs
12480                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12481                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12482                           cf_have_incdir=yes; break
12483                         fi
12484                   done
12485                 fi
12486
12487                 if test "$cf_have_incdir" = no ; then
12488                   if test "$cf_add_incdir" = /usr/local/include ; then
12489                         if test "$GCC" = yes
12490                         then
12491                           cf_save_CPPFLAGS=$CPPFLAGS
12492
12493         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12494         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12495
12496                           cat >"conftest.$ac_ext" <<_ACEOF
12497 #line 12497 "configure"
12498 #include "confdefs.h"
12499 #include <stdio.h>
12500 int
12501 main (void)
12502 {
12503 printf("Hello")
12504   ;
12505   return 0;
12506 }
12507 _ACEOF
12508 rm -f "conftest.$ac_objext"
12509 if { (eval echo "$as_me:12509: \"$ac_compile\"") >&5
12510   (eval $ac_compile) 2>&5
12511   ac_status=$?
12512   echo "$as_me:12512: \$? = $ac_status" >&5
12513   (exit "$ac_status"); } &&
12514          { ac_try='test -s "conftest.$ac_objext"'
12515   { (eval echo "$as_me:12515: \"$ac_try\"") >&5
12516   (eval $ac_try) 2>&5
12517   ac_status=$?
12518   echo "$as_me:12518: \$? = $ac_status" >&5
12519   (exit "$ac_status"); }; }; then
12520   :
12521 else
12522   echo "$as_me: failed program was:" >&5
12523 cat "conftest.$ac_ext" >&5
12524 cf_have_incdir=yes
12525 fi
12526 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12527                           CPPFLAGS=$cf_save_CPPFLAGS
12528                         fi
12529                   fi
12530                 fi
12531
12532                 if test "$cf_have_incdir" = no ; then
12533                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12534
12535 echo "${as_me:-configure}:12535: testing adding $cf_add_incdir to include-path ..." 1>&5
12536
12537                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12538
12539                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12540                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12541                   cf_add_incdir="$cf_top_incdir"
12542                 else
12543                   break
12544                 fi
12545           else
12546                 break
12547           fi
12548         done
12549   done
12550 fi
12551
12552 if test -n "$cf_cv_library_path_utf8" ; then
12553         for cf_add_libdir in $cf_cv_library_path_utf8
12554         do
12555                 if test "$cf_add_libdir" = /usr/lib ; then
12556                         :
12557                 elif test -d "$cf_add_libdir"
12558                 then
12559                         cf_have_libdir=no
12560                         if test -n "$LDFLAGS$LIBS" ; then
12561                                 # a loop is needed to ensure we can add subdirs of existing dirs
12562                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12563                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12564                                                 cf_have_libdir=yes; break
12565                                         fi
12566                                 done
12567                         fi
12568                         if test "$cf_have_libdir" = no ; then
12569                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12570
12571 echo "${as_me:-configure}:12571: testing adding $cf_add_libdir to library-path ..." 1>&5
12572
12573                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12574                         fi
12575                 fi
12576         done
12577 fi
12578
12579 cf_add_libs="$LIBS"
12580 # reverse order
12581 cf_add_0lib=
12582 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12583 # filter duplicates
12584 for cf_add_1lib in $cf_add_0lib; do
12585         for cf_add_2lib in $cf_add_libs; do
12586                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12587                         cf_add_1lib=
12588                         break
12589                 fi
12590         done
12591         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12592 done
12593 LIBS="$cf_add_libs"
12594
12595 fi
12596
12597                 if test "$cf_cv_utf8_lib" != no ; then
12598                         NCURSES_LIBUTF8=1
12599                 fi
12600         fi
12601
12602 # This is needed on Tru64 5.0 to declare mbstate_t
12603 echo "$as_me:12603: checking if we must include wchar.h to declare mbstate_t" >&5
12604 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12605 if test "${cf_cv_mbstate_t+set}" = set; then
12606   echo $ECHO_N "(cached) $ECHO_C" >&6
12607 else
12608
12609 cat >"conftest.$ac_ext" <<_ACEOF
12610 #line 12610 "configure"
12611 #include "confdefs.h"
12612
12613 #include <stdlib.h>
12614 #include <stdarg.h>
12615 #include <stdio.h>
12616 #ifdef HAVE_LIBUTF8_H
12617 #include <libutf8.h>
12618 #endif
12619 int
12620 main (void)
12621 {
12622 mbstate_t state
12623   ;
12624   return 0;
12625 }
12626 _ACEOF
12627 rm -f "conftest.$ac_objext"
12628 if { (eval echo "$as_me:12628: \"$ac_compile\"") >&5
12629   (eval $ac_compile) 2>&5
12630   ac_status=$?
12631   echo "$as_me:12631: \$? = $ac_status" >&5
12632   (exit "$ac_status"); } &&
12633          { ac_try='test -s "conftest.$ac_objext"'
12634   { (eval echo "$as_me:12634: \"$ac_try\"") >&5
12635   (eval $ac_try) 2>&5
12636   ac_status=$?
12637   echo "$as_me:12637: \$? = $ac_status" >&5
12638   (exit "$ac_status"); }; }; then
12639   cf_cv_mbstate_t=no
12640 else
12641   echo "$as_me: failed program was:" >&5
12642 cat "conftest.$ac_ext" >&5
12643 cat >"conftest.$ac_ext" <<_ACEOF
12644 #line 12644 "configure"
12645 #include "confdefs.h"
12646
12647 #include <stdlib.h>
12648 #include <stdarg.h>
12649 #include <stdio.h>
12650 #include <wchar.h>
12651 #ifdef HAVE_LIBUTF8_H
12652 #include <libutf8.h>
12653 #endif
12654 int
12655 main (void)
12656 {
12657 mbstate_t value
12658   ;
12659   return 0;
12660 }
12661 _ACEOF
12662 rm -f "conftest.$ac_objext"
12663 if { (eval echo "$as_me:12663: \"$ac_compile\"") >&5
12664   (eval $ac_compile) 2>&5
12665   ac_status=$?
12666   echo "$as_me:12666: \$? = $ac_status" >&5
12667   (exit "$ac_status"); } &&
12668          { ac_try='test -s "conftest.$ac_objext"'
12669   { (eval echo "$as_me:12669: \"$ac_try\"") >&5
12670   (eval $ac_try) 2>&5
12671   ac_status=$?
12672   echo "$as_me:12672: \$? = $ac_status" >&5
12673   (exit "$ac_status"); }; }; then
12674   cf_cv_mbstate_t=yes
12675 else
12676   echo "$as_me: failed program was:" >&5
12677 cat "conftest.$ac_ext" >&5
12678 cf_cv_mbstate_t=unknown
12679 fi
12680 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12681 fi
12682 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12683 fi
12684 echo "$as_me:12684: result: $cf_cv_mbstate_t" >&5
12685 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12686
12687 if test "$cf_cv_mbstate_t" = yes ; then
12688
12689 cat >>confdefs.h <<\EOF
12690 #define NEED_WCHAR_H 1
12691 EOF
12692
12693         NEED_WCHAR_H=1
12694 fi
12695
12696 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12697 if test "$cf_cv_mbstate_t" = unknown ; then
12698         NCURSES_MBSTATE_T=1
12699 fi
12700
12701 # This is needed on Tru64 5.0 to declare wchar_t
12702 echo "$as_me:12702: checking if we must include wchar.h to declare wchar_t" >&5
12703 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12704 if test "${cf_cv_wchar_t+set}" = set; then
12705   echo $ECHO_N "(cached) $ECHO_C" >&6
12706 else
12707
12708 cat >"conftest.$ac_ext" <<_ACEOF
12709 #line 12709 "configure"
12710 #include "confdefs.h"
12711
12712 #include <stdlib.h>
12713 #include <stdarg.h>
12714 #include <stdio.h>
12715 #ifdef HAVE_LIBUTF8_H
12716 #include <libutf8.h>
12717 #endif
12718 int
12719 main (void)
12720 {
12721 wchar_t state
12722   ;
12723   return 0;
12724 }
12725 _ACEOF
12726 rm -f "conftest.$ac_objext"
12727 if { (eval echo "$as_me:12727: \"$ac_compile\"") >&5
12728   (eval $ac_compile) 2>&5
12729   ac_status=$?
12730   echo "$as_me:12730: \$? = $ac_status" >&5
12731   (exit "$ac_status"); } &&
12732          { ac_try='test -s "conftest.$ac_objext"'
12733   { (eval echo "$as_me:12733: \"$ac_try\"") >&5
12734   (eval $ac_try) 2>&5
12735   ac_status=$?
12736   echo "$as_me:12736: \$? = $ac_status" >&5
12737   (exit "$ac_status"); }; }; then
12738   cf_cv_wchar_t=no
12739 else
12740   echo "$as_me: failed program was:" >&5
12741 cat "conftest.$ac_ext" >&5
12742 cat >"conftest.$ac_ext" <<_ACEOF
12743 #line 12743 "configure"
12744 #include "confdefs.h"
12745
12746 #include <stdlib.h>
12747 #include <stdarg.h>
12748 #include <stdio.h>
12749 #include <wchar.h>
12750 #ifdef HAVE_LIBUTF8_H
12751 #include <libutf8.h>
12752 #endif
12753 int
12754 main (void)
12755 {
12756 wchar_t value
12757   ;
12758   return 0;
12759 }
12760 _ACEOF
12761 rm -f "conftest.$ac_objext"
12762 if { (eval echo "$as_me:12762: \"$ac_compile\"") >&5
12763   (eval $ac_compile) 2>&5
12764   ac_status=$?
12765   echo "$as_me:12765: \$? = $ac_status" >&5
12766   (exit "$ac_status"); } &&
12767          { ac_try='test -s "conftest.$ac_objext"'
12768   { (eval echo "$as_me:12768: \"$ac_try\"") >&5
12769   (eval $ac_try) 2>&5
12770   ac_status=$?
12771   echo "$as_me:12771: \$? = $ac_status" >&5
12772   (exit "$ac_status"); }; }; then
12773   cf_cv_wchar_t=yes
12774 else
12775   echo "$as_me: failed program was:" >&5
12776 cat "conftest.$ac_ext" >&5
12777 cf_cv_wchar_t=unknown
12778 fi
12779 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12780 fi
12781 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12782 fi
12783 echo "$as_me:12783: result: $cf_cv_wchar_t" >&5
12784 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12785
12786 if test "$cf_cv_wchar_t" = yes ; then
12787
12788 cat >>confdefs.h <<\EOF
12789 #define NEED_WCHAR_H 1
12790 EOF
12791
12792         NEED_WCHAR_H=1
12793 fi
12794
12795 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12796 if test "$cf_cv_wchar_t" = unknown ; then
12797         NCURSES_WCHAR_T=1
12798 fi
12799
12800 # if we find wchar_t in either place, use substitution to provide a fallback.
12801 if test "$cf_cv_wchar_t" != unknown ; then
12802         NCURSES_OK_WCHAR_T=1
12803 fi
12804
12805 # This is needed on Tru64 5.0 to declare wint_t
12806 echo "$as_me:12806: checking if we must include wchar.h to declare wint_t" >&5
12807 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12808 if test "${cf_cv_wint_t+set}" = set; then
12809   echo $ECHO_N "(cached) $ECHO_C" >&6
12810 else
12811
12812 cat >"conftest.$ac_ext" <<_ACEOF
12813 #line 12813 "configure"
12814 #include "confdefs.h"
12815
12816 #include <stdlib.h>
12817 #include <stdarg.h>
12818 #include <stdio.h>
12819 #ifdef HAVE_LIBUTF8_H
12820 #include <libutf8.h>
12821 #endif
12822 int
12823 main (void)
12824 {
12825 wint_t state
12826   ;
12827   return 0;
12828 }
12829 _ACEOF
12830 rm -f "conftest.$ac_objext"
12831 if { (eval echo "$as_me:12831: \"$ac_compile\"") >&5
12832   (eval $ac_compile) 2>&5
12833   ac_status=$?
12834   echo "$as_me:12834: \$? = $ac_status" >&5
12835   (exit "$ac_status"); } &&
12836          { ac_try='test -s "conftest.$ac_objext"'
12837   { (eval echo "$as_me:12837: \"$ac_try\"") >&5
12838   (eval $ac_try) 2>&5
12839   ac_status=$?
12840   echo "$as_me:12840: \$? = $ac_status" >&5
12841   (exit "$ac_status"); }; }; then
12842   cf_cv_wint_t=no
12843 else
12844   echo "$as_me: failed program was:" >&5
12845 cat "conftest.$ac_ext" >&5
12846 cat >"conftest.$ac_ext" <<_ACEOF
12847 #line 12847 "configure"
12848 #include "confdefs.h"
12849
12850 #include <stdlib.h>
12851 #include <stdarg.h>
12852 #include <stdio.h>
12853 #include <wchar.h>
12854 #ifdef HAVE_LIBUTF8_H
12855 #include <libutf8.h>
12856 #endif
12857 int
12858 main (void)
12859 {
12860 wint_t value
12861   ;
12862   return 0;
12863 }
12864 _ACEOF
12865 rm -f "conftest.$ac_objext"
12866 if { (eval echo "$as_me:12866: \"$ac_compile\"") >&5
12867   (eval $ac_compile) 2>&5
12868   ac_status=$?
12869   echo "$as_me:12869: \$? = $ac_status" >&5
12870   (exit "$ac_status"); } &&
12871          { ac_try='test -s "conftest.$ac_objext"'
12872   { (eval echo "$as_me:12872: \"$ac_try\"") >&5
12873   (eval $ac_try) 2>&5
12874   ac_status=$?
12875   echo "$as_me:12875: \$? = $ac_status" >&5
12876   (exit "$ac_status"); }; }; then
12877   cf_cv_wint_t=yes
12878 else
12879   echo "$as_me: failed program was:" >&5
12880 cat "conftest.$ac_ext" >&5
12881 cf_cv_wint_t=unknown
12882 fi
12883 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12884 fi
12885 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12886 fi
12887 echo "$as_me:12887: result: $cf_cv_wint_t" >&5
12888 echo "${ECHO_T}$cf_cv_wint_t" >&6
12889
12890 if test "$cf_cv_wint_t" = yes ; then
12891
12892 cat >>confdefs.h <<\EOF
12893 #define NEED_WCHAR_H 1
12894 EOF
12895
12896         NEED_WCHAR_H=1
12897 fi
12898
12899 # if we do not find wint_t in either place, use substitution to provide a fallback.
12900 if test "$cf_cv_wint_t" = unknown ; then
12901         NCURSES_WINT_T=1
12902 fi
12903
12904 # if we find wint_t in either place, use substitution to provide a fallback.
12905 if test "$cf_cv_wint_t" != unknown ; then
12906         NCURSES_OK_WINT_T=1
12907 fi
12908
12909         if test "$NCURSES_MBSTATE_T" != 0; then
12910
12911 cat >>confdefs.h <<\EOF
12912 #define NEED_MBSTATE_T_DEF 1
12913 EOF
12914
12915         fi
12916 fi
12917
12918 ###   use option --disable-lp64 to allow long chtype
12919 echo "$as_me:12919: checking whether to enable _LP64 definition in curses.h" >&5
12920 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12921
12922 # Check whether --enable-lp64 or --disable-lp64 was given.
12923 if test "${enable_lp64+set}" = set; then
12924   enableval="$enable_lp64"
12925   with_lp64=$enableval
12926 else
12927   with_lp64=$cf_dft_with_lp64
12928 fi;
12929 echo "$as_me:12929: result: $with_lp64" >&5
12930 echo "${ECHO_T}$with_lp64" >&6
12931
12932 if test "x$with_lp64" = xyes ; then
12933         cf_cv_enable_lp64=1
12934 else
12935         cf_cv_enable_lp64=0
12936 fi
12937
12938 # Check whether --enable-largefile or --disable-largefile was given.
12939 if test "${enable_largefile+set}" = set; then
12940   enableval="$enable_largefile"
12941
12942 fi;
12943 if test "$enable_largefile" != no; then
12944
12945   echo "$as_me:12945: checking for special C compiler options needed for large files" >&5
12946 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12947 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12948   echo $ECHO_N "(cached) $ECHO_C" >&6
12949 else
12950   ac_cv_sys_largefile_CC=no
12951      if test "$GCC" != yes; then
12952        ac_save_CC=$CC
12953        while :; do
12954          # IRIX 6.2 and later do not support large files by default,
12955          # so use the C compiler's -n32 option if that helps.
12956          cat >"conftest.$ac_ext" <<_ACEOF
12957 #line 12957 "configure"
12958 #include "confdefs.h"
12959 #include <sys/types.h>
12960  /* Check that off_t can represent 2**63 - 1 correctly.
12961     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12962     since some C++ compilers masquerading as C compilers
12963     incorrectly reject 9223372036854775807.  */
12964 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12965   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12966                        && LARGE_OFF_T % 2147483647 == 1)
12967                       ? 1 : -1];
12968 int
12969 main (void)
12970 {
12971
12972   ;
12973   return 0;
12974 }
12975 _ACEOF
12976          rm -f "conftest.$ac_objext"
12977 if { (eval echo "$as_me:12977: \"$ac_compile\"") >&5
12978   (eval $ac_compile) 2>&5
12979   ac_status=$?
12980   echo "$as_me:12980: \$? = $ac_status" >&5
12981   (exit "$ac_status"); } &&
12982          { ac_try='test -s "conftest.$ac_objext"'
12983   { (eval echo "$as_me:12983: \"$ac_try\"") >&5
12984   (eval $ac_try) 2>&5
12985   ac_status=$?
12986   echo "$as_me:12986: \$? = $ac_status" >&5
12987   (exit "$ac_status"); }; }; then
12988   break
12989 else
12990   echo "$as_me: failed program was:" >&5
12991 cat "conftest.$ac_ext" >&5
12992 fi
12993 rm -f "conftest.$ac_objext"
12994          CC="$CC -n32"
12995          rm -f "conftest.$ac_objext"
12996 if { (eval echo "$as_me:12996: \"$ac_compile\"") >&5
12997   (eval $ac_compile) 2>&5
12998   ac_status=$?
12999   echo "$as_me:12999: \$? = $ac_status" >&5
13000   (exit "$ac_status"); } &&
13001          { ac_try='test -s "conftest.$ac_objext"'
13002   { (eval echo "$as_me:13002: \"$ac_try\"") >&5
13003   (eval $ac_try) 2>&5
13004   ac_status=$?
13005   echo "$as_me:13005: \$? = $ac_status" >&5
13006   (exit "$ac_status"); }; }; then
13007   ac_cv_sys_largefile_CC=' -n32'; break
13008 else
13009   echo "$as_me: failed program was:" >&5
13010 cat "conftest.$ac_ext" >&5
13011 fi
13012 rm -f "conftest.$ac_objext"
13013          break
13014        done
13015        CC=$ac_save_CC
13016        rm -f "conftest.$ac_ext"
13017     fi
13018 fi
13019 echo "$as_me:13019: result: $ac_cv_sys_largefile_CC" >&5
13020 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13021   if test "$ac_cv_sys_largefile_CC" != no; then
13022     CC=$CC$ac_cv_sys_largefile_CC
13023   fi
13024
13025   echo "$as_me:13025: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13026 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13027 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13028   echo $ECHO_N "(cached) $ECHO_C" >&6
13029 else
13030   while :; do
13031   ac_cv_sys_file_offset_bits=no
13032   cat >"conftest.$ac_ext" <<_ACEOF
13033 #line 13033 "configure"
13034 #include "confdefs.h"
13035 #include <sys/types.h>
13036  /* Check that off_t can represent 2**63 - 1 correctly.
13037     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13038     since some C++ compilers masquerading as C compilers
13039     incorrectly reject 9223372036854775807.  */
13040 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13041   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13042                        && LARGE_OFF_T % 2147483647 == 1)
13043                       ? 1 : -1];
13044 int
13045 main (void)
13046 {
13047
13048   ;
13049   return 0;
13050 }
13051 _ACEOF
13052 rm -f "conftest.$ac_objext"
13053 if { (eval echo "$as_me:13053: \"$ac_compile\"") >&5
13054   (eval $ac_compile) 2>&5
13055   ac_status=$?
13056   echo "$as_me:13056: \$? = $ac_status" >&5
13057   (exit "$ac_status"); } &&
13058          { ac_try='test -s "conftest.$ac_objext"'
13059   { (eval echo "$as_me:13059: \"$ac_try\"") >&5
13060   (eval $ac_try) 2>&5
13061   ac_status=$?
13062   echo "$as_me:13062: \$? = $ac_status" >&5
13063   (exit "$ac_status"); }; }; then
13064   break
13065 else
13066   echo "$as_me: failed program was:" >&5
13067 cat "conftest.$ac_ext" >&5
13068 fi
13069 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13070   cat >"conftest.$ac_ext" <<_ACEOF
13071 #line 13071 "configure"
13072 #include "confdefs.h"
13073 #define _FILE_OFFSET_BITS 64
13074 #include <sys/types.h>
13075  /* Check that off_t can represent 2**63 - 1 correctly.
13076     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13077     since some C++ compilers masquerading as C compilers
13078     incorrectly reject 9223372036854775807.  */
13079 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13080   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13081                        && LARGE_OFF_T % 2147483647 == 1)
13082                       ? 1 : -1];
13083 int
13084 main (void)
13085 {
13086
13087   ;
13088   return 0;
13089 }
13090 _ACEOF
13091 rm -f "conftest.$ac_objext"
13092 if { (eval echo "$as_me:13092: \"$ac_compile\"") >&5
13093   (eval $ac_compile) 2>&5
13094   ac_status=$?
13095   echo "$as_me:13095: \$? = $ac_status" >&5
13096   (exit "$ac_status"); } &&
13097          { ac_try='test -s "conftest.$ac_objext"'
13098   { (eval echo "$as_me:13098: \"$ac_try\"") >&5
13099   (eval $ac_try) 2>&5
13100   ac_status=$?
13101   echo "$as_me:13101: \$? = $ac_status" >&5
13102   (exit "$ac_status"); }; }; then
13103   ac_cv_sys_file_offset_bits=64; break
13104 else
13105   echo "$as_me: failed program was:" >&5
13106 cat "conftest.$ac_ext" >&5
13107 fi
13108 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13109   break
13110 done
13111 fi
13112 echo "$as_me:13112: result: $ac_cv_sys_file_offset_bits" >&5
13113 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13114 if test "$ac_cv_sys_file_offset_bits" != no; then
13115
13116 cat >>confdefs.h <<EOF
13117 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13118 EOF
13119
13120 fi
13121 rm -rf conftest*
13122   echo "$as_me:13122: checking for _LARGE_FILES value needed for large files" >&5
13123 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13124 if test "${ac_cv_sys_large_files+set}" = set; then
13125   echo $ECHO_N "(cached) $ECHO_C" >&6
13126 else
13127   while :; do
13128   ac_cv_sys_large_files=no
13129   cat >"conftest.$ac_ext" <<_ACEOF
13130 #line 13130 "configure"
13131 #include "confdefs.h"
13132 #include <sys/types.h>
13133  /* Check that off_t can represent 2**63 - 1 correctly.
13134     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13135     since some C++ compilers masquerading as C compilers
13136     incorrectly reject 9223372036854775807.  */
13137 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13138   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13139                        && LARGE_OFF_T % 2147483647 == 1)
13140                       ? 1 : -1];
13141 int
13142 main (void)
13143 {
13144
13145   ;
13146   return 0;
13147 }
13148 _ACEOF
13149 rm -f "conftest.$ac_objext"
13150 if { (eval echo "$as_me:13150: \"$ac_compile\"") >&5
13151   (eval $ac_compile) 2>&5
13152   ac_status=$?
13153   echo "$as_me:13153: \$? = $ac_status" >&5
13154   (exit "$ac_status"); } &&
13155          { ac_try='test -s "conftest.$ac_objext"'
13156   { (eval echo "$as_me:13156: \"$ac_try\"") >&5
13157   (eval $ac_try) 2>&5
13158   ac_status=$?
13159   echo "$as_me:13159: \$? = $ac_status" >&5
13160   (exit "$ac_status"); }; }; then
13161   break
13162 else
13163   echo "$as_me: failed program was:" >&5
13164 cat "conftest.$ac_ext" >&5
13165 fi
13166 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13167   cat >"conftest.$ac_ext" <<_ACEOF
13168 #line 13168 "configure"
13169 #include "confdefs.h"
13170 #define _LARGE_FILES 1
13171 #include <sys/types.h>
13172  /* Check that off_t can represent 2**63 - 1 correctly.
13173     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13174     since some C++ compilers masquerading as C compilers
13175     incorrectly reject 9223372036854775807.  */
13176 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13177   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13178                        && LARGE_OFF_T % 2147483647 == 1)
13179                       ? 1 : -1];
13180 int
13181 main (void)
13182 {
13183
13184   ;
13185   return 0;
13186 }
13187 _ACEOF
13188 rm -f "conftest.$ac_objext"
13189 if { (eval echo "$as_me:13189: \"$ac_compile\"") >&5
13190   (eval $ac_compile) 2>&5
13191   ac_status=$?
13192   echo "$as_me:13192: \$? = $ac_status" >&5
13193   (exit "$ac_status"); } &&
13194          { ac_try='test -s "conftest.$ac_objext"'
13195   { (eval echo "$as_me:13195: \"$ac_try\"") >&5
13196   (eval $ac_try) 2>&5
13197   ac_status=$?
13198   echo "$as_me:13198: \$? = $ac_status" >&5
13199   (exit "$ac_status"); }; }; then
13200   ac_cv_sys_large_files=1; break
13201 else
13202   echo "$as_me: failed program was:" >&5
13203 cat "conftest.$ac_ext" >&5
13204 fi
13205 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13206   break
13207 done
13208 fi
13209 echo "$as_me:13209: result: $ac_cv_sys_large_files" >&5
13210 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13211 if test "$ac_cv_sys_large_files" != no; then
13212
13213 cat >>confdefs.h <<EOF
13214 #define _LARGE_FILES $ac_cv_sys_large_files
13215 EOF
13216
13217 fi
13218 rm -rf conftest*
13219 fi
13220
13221         if test "$enable_largefile" != no ; then
13222         echo "$as_me:13222: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13223 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13224 if test "${ac_cv_sys_largefile_source+set}" = set; then
13225   echo $ECHO_N "(cached) $ECHO_C" >&6
13226 else
13227   while :; do
13228   ac_cv_sys_largefile_source=no
13229   cat >"conftest.$ac_ext" <<_ACEOF
13230 #line 13230 "configure"
13231 #include "confdefs.h"
13232 #include <stdio.h>
13233 int
13234 main (void)
13235 {
13236 return !fseeko;
13237   ;
13238   return 0;
13239 }
13240 _ACEOF
13241 rm -f "conftest.$ac_objext"
13242 if { (eval echo "$as_me:13242: \"$ac_compile\"") >&5
13243   (eval $ac_compile) 2>&5
13244   ac_status=$?
13245   echo "$as_me:13245: \$? = $ac_status" >&5
13246   (exit "$ac_status"); } &&
13247          { ac_try='test -s "conftest.$ac_objext"'
13248   { (eval echo "$as_me:13248: \"$ac_try\"") >&5
13249   (eval $ac_try) 2>&5
13250   ac_status=$?
13251   echo "$as_me:13251: \$? = $ac_status" >&5
13252   (exit "$ac_status"); }; }; then
13253   break
13254 else
13255   echo "$as_me: failed program was:" >&5
13256 cat "conftest.$ac_ext" >&5
13257 fi
13258 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13259   cat >"conftest.$ac_ext" <<_ACEOF
13260 #line 13260 "configure"
13261 #include "confdefs.h"
13262 #define _LARGEFILE_SOURCE 1
13263 #include <stdio.h>
13264 int
13265 main (void)
13266 {
13267 return !fseeko;
13268   ;
13269   return 0;
13270 }
13271 _ACEOF
13272 rm -f "conftest.$ac_objext"
13273 if { (eval echo "$as_me:13273: \"$ac_compile\"") >&5
13274   (eval $ac_compile) 2>&5
13275   ac_status=$?
13276   echo "$as_me:13276: \$? = $ac_status" >&5
13277   (exit "$ac_status"); } &&
13278          { ac_try='test -s "conftest.$ac_objext"'
13279   { (eval echo "$as_me:13279: \"$ac_try\"") >&5
13280   (eval $ac_try) 2>&5
13281   ac_status=$?
13282   echo "$as_me:13282: \$? = $ac_status" >&5
13283   (exit "$ac_status"); }; }; then
13284   ac_cv_sys_largefile_source=1; break
13285 else
13286   echo "$as_me: failed program was:" >&5
13287 cat "conftest.$ac_ext" >&5
13288 fi
13289 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13290   break
13291 done
13292 fi
13293 echo "$as_me:13293: result: $ac_cv_sys_largefile_source" >&5
13294 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13295 if test "$ac_cv_sys_largefile_source" != no; then
13296
13297 cat >>confdefs.h <<EOF
13298 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13299 EOF
13300
13301 fi
13302 rm -rf conftest*
13303
13304 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13305 # in glibc 2.1.3, but that breaks too many other things.
13306 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13307 echo "$as_me:13307: checking for fseeko" >&5
13308 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13309 if test "${ac_cv_func_fseeko+set}" = set; then
13310   echo $ECHO_N "(cached) $ECHO_C" >&6
13311 else
13312   cat >"conftest.$ac_ext" <<_ACEOF
13313 #line 13313 "configure"
13314 #include "confdefs.h"
13315 #include <stdio.h>
13316 int
13317 main (void)
13318 {
13319 return fseeko && fseeko (stdin, 0, 0);
13320   ;
13321   return 0;
13322 }
13323 _ACEOF
13324 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13325 if { (eval echo "$as_me:13325: \"$ac_link\"") >&5
13326   (eval $ac_link) 2>&5
13327   ac_status=$?
13328   echo "$as_me:13328: \$? = $ac_status" >&5
13329   (exit "$ac_status"); } &&
13330          { ac_try='test -s "conftest$ac_exeext"'
13331   { (eval echo "$as_me:13331: \"$ac_try\"") >&5
13332   (eval $ac_try) 2>&5
13333   ac_status=$?
13334   echo "$as_me:13334: \$? = $ac_status" >&5
13335   (exit "$ac_status"); }; }; then
13336   ac_cv_func_fseeko=yes
13337 else
13338   echo "$as_me: failed program was:" >&5
13339 cat "conftest.$ac_ext" >&5
13340 ac_cv_func_fseeko=no
13341 fi
13342 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13343 fi
13344 echo "$as_me:13344: result: $ac_cv_func_fseeko" >&5
13345 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13346 if test $ac_cv_func_fseeko = yes; then
13347
13348 cat >>confdefs.h <<\EOF
13349 #define HAVE_FSEEKO 1
13350 EOF
13351
13352 fi
13353
13354         # Normally we would collect these definitions in the config.h,
13355         # but (like _XOPEN_SOURCE), some environments rely on having these
13356         # defined before any of the system headers are included.  Another
13357         # case comes up with C++, e.g., on AIX the compiler compiles the
13358         # header files by themselves before looking at the body files it is
13359         # told to compile.  For ncurses, those header files do not include
13360         # the config.h
13361         if test "$ac_cv_sys_large_files" != no
13362         then
13363
13364         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13365         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13366
13367         fi
13368         if test "$ac_cv_sys_largefile_source" != no
13369         then
13370
13371         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13372         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13373
13374         fi
13375         if test "$ac_cv_sys_file_offset_bits" != no
13376         then
13377
13378         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13379         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13380
13381         fi
13382
13383         echo "$as_me:13383: checking whether to use struct dirent64" >&5
13384 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13385 if test "${cf_cv_struct_dirent64+set}" = set; then
13386   echo $ECHO_N "(cached) $ECHO_C" >&6
13387 else
13388
13389                 cat >"conftest.$ac_ext" <<_ACEOF
13390 #line 13390 "configure"
13391 #include "confdefs.h"
13392
13393 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13394 #include <sys/types.h>
13395 #include <dirent.h>
13396
13397 int
13398 main (void)
13399 {
13400
13401                 /* if transitional largefile support is setup, this is true */
13402                 extern struct dirent64 * readdir(DIR *);
13403                 struct dirent64 *x = readdir((DIR *)0);
13404                 struct dirent *y = readdir((DIR *)0);
13405                 int z = x - y;
13406                 (void)z;
13407
13408   ;
13409   return 0;
13410 }
13411 _ACEOF
13412 rm -f "conftest.$ac_objext"
13413 if { (eval echo "$as_me:13413: \"$ac_compile\"") >&5
13414   (eval $ac_compile) 2>&5
13415   ac_status=$?
13416   echo "$as_me:13416: \$? = $ac_status" >&5
13417   (exit "$ac_status"); } &&
13418          { ac_try='test -s "conftest.$ac_objext"'
13419   { (eval echo "$as_me:13419: \"$ac_try\"") >&5
13420   (eval $ac_try) 2>&5
13421   ac_status=$?
13422   echo "$as_me:13422: \$? = $ac_status" >&5
13423   (exit "$ac_status"); }; }; then
13424   cf_cv_struct_dirent64=yes
13425 else
13426   echo "$as_me: failed program was:" >&5
13427 cat "conftest.$ac_ext" >&5
13428 cf_cv_struct_dirent64=no
13429 fi
13430 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13431
13432 fi
13433 echo "$as_me:13433: result: $cf_cv_struct_dirent64" >&5
13434 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13435         test "$cf_cv_struct_dirent64" = yes &&
13436 cat >>confdefs.h <<\EOF
13437 #define HAVE_STRUCT_DIRENT64 1
13438 EOF
13439
13440         fi
13441
13442 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13443 echo "$as_me:13443: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13444 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13445
13446 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13447 if test "${enable_tparm_varargs+set}" = set; then
13448   enableval="$enable_tparm_varargs"
13449   with_tparm_varargs=$enableval
13450 else
13451   with_tparm_varargs=yes
13452 fi;
13453 echo "$as_me:13453: result: $with_tparm_varargs" >&5
13454 echo "${ECHO_T}$with_tparm_varargs" >&6
13455 NCURSES_TPARM_VARARGS=0
13456 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13457
13458 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13459 if test "$with_ticlib" != no ; then
13460 echo "$as_me:13460: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13461 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13462
13463 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13464 if test "${enable_tic_depends+set}" = set; then
13465   enableval="$enable_tic_depends"
13466   with_tic_depends=$enableval
13467 else
13468   with_tic_depends=yes
13469 fi;
13470 echo "$as_me:13470: result: $with_tic_depends" >&5
13471 echo "${ECHO_T}$with_tic_depends" >&6
13472 else
13473         with_tic_depends=no
13474 fi
13475
13476 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13477 echo "$as_me:13477: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13478 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13479
13480 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13481 if test "${enable_wattr_macros+set}" = set; then
13482   enableval="$enable_wattr_macros"
13483   with_wattr_macros=$enableval
13484 else
13485   with_wattr_macros=yes
13486 fi;
13487 if [ "x$with_wattr_macros" != xyes ]; then
13488         NCURSES_WATTR_MACROS=0
13489         echo "$as_me:13489: result: yes" >&5
13490 echo "${ECHO_T}yes" >&6
13491 else
13492         NCURSES_WATTR_MACROS=1
13493         echo "$as_me:13493: result: no" >&5
13494 echo "${ECHO_T}no" >&6
13495 fi
13496
13497 echo "$as_me:13497: checking for X11 rgb file" >&5
13498 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13499
13500 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13501 if test "${with_x11_rgb+set}" = set; then
13502   withval="$with_x11_rgb"
13503   RGB_PATH=$withval
13504 else
13505   RGB_PATH=auto
13506 fi;
13507
13508 if test "x$RGB_PATH" = xauto
13509 then
13510         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13511         for cf_path in \
13512                 /opt/local/share/X11/rgb.txt \
13513                 /opt/X11/share/X11/rgb.txt \
13514                 /usr/share/X11/rgb.txt \
13515                 /usr/X11/share/X11/rgb.txt \
13516                 /usr/X11/lib/X11/rgb.txt \
13517                 /usr/lib/X11/rgb.txt \
13518                 /etc/X11/rgb.txt \
13519                 /usr/pkg/lib/X11/rgb.txt \
13520                 /usr/X11R7/lib/X11/rgb.txt \
13521                 /usr/X11R6/lib/X11/rgb.txt \
13522                 /usr/X11R5/lib/X11/rgb.txt \
13523                 /usr/X11R4/lib/X11/rgb.txt \
13524                 /usr/local/lib/X11/rgb.txt \
13525                 /usr/local/share/X11/rgb.txt \
13526                 /usr/lib64/X11/rgb.txt
13527         do
13528                 if test -f "$cf_path" ; then
13529                         RGB_PATH="$cf_path"
13530                         break
13531                 fi
13532         done
13533 else
13534         cf_path=$RGB_PATH
13535
13536 if test "x$prefix" != xNONE; then
13537         cf_path_syntax="$prefix"
13538 else
13539         cf_path_syntax="$ac_default_prefix"
13540 fi
13541
13542 case ".$cf_path" in
13543 (.\$\(*\)*|.\'*\'*)
13544         ;;
13545 (..|./*|.\\*)
13546         ;;
13547 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13548         ;;
13549 (.\$\{*prefix\}*|.\$\{*dir\}*)
13550         eval cf_path="$cf_path"
13551         case ".$cf_path" in
13552         (.NONE/*)
13553                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13554                 ;;
13555         esac
13556         ;;
13557 (.no|.NONE/*)
13558         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13559         ;;
13560 (*)
13561         { { echo "$as_me:13561: error: expected a pathname, not \"$cf_path\"" >&5
13562 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13563    { (exit 1); exit 1; }; }
13564         ;;
13565 esac
13566
13567 fi
13568
13569 echo "$as_me:13569: result: $RGB_PATH" >&5
13570 echo "${ECHO_T}$RGB_PATH" >&6
13571
13572 cat >>confdefs.h <<EOF
13573 #define RGB_PATH "$cf_path"
13574 EOF
13575
13576 no_x11_rgb=
13577 if test "$RGB_PATH" = no
13578 then
13579         no_x11_rgb="#"
13580 fi
13581
13582 ###   use option --with-bool to override bool's type
13583 echo "$as_me:13583: checking for type of bool" >&5
13584 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13585
13586 # Check whether --with-bool or --without-bool was given.
13587 if test "${with_bool+set}" = set; then
13588   withval="$with_bool"
13589   NCURSES_BOOL="$withval"
13590 else
13591   NCURSES_BOOL=auto
13592 fi;
13593 echo "$as_me:13593: result: $NCURSES_BOOL" >&5
13594 echo "${ECHO_T}$NCURSES_BOOL" >&6
13595
13596 echo "$as_me:13596: checking for alternate terminal capabilities file" >&5
13597 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13598
13599 # Check whether --with-caps or --without-caps was given.
13600 if test "${with_caps+set}" = set; then
13601   withval="$with_caps"
13602   TERMINFO_CAPS=Caps.$withval
13603 else
13604   TERMINFO_CAPS=Caps
13605 fi;
13606 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13607 echo "$as_me:13607: result: $TERMINFO_CAPS" >&5
13608 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13609
13610 ###   use option --with-chtype to override chtype's type
13611 echo "$as_me:13611: checking for type of chtype" >&5
13612 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13613
13614 # Check whether --with-chtype or --without-chtype was given.
13615 if test "${with_chtype+set}" = set; then
13616   withval="$with_chtype"
13617   NCURSES_CHTYPE="$withval"
13618 else
13619   NCURSES_CHTYPE=$cf_dft_chtype
13620 fi;
13621 echo "$as_me:13621: result: $NCURSES_CHTYPE" >&5
13622 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13623
13624 ###   use option --with-ospeed to override ospeed's type
13625 echo "$as_me:13625: checking for type of ospeed" >&5
13626 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13627
13628 # Check whether --with-ospeed or --without-ospeed was given.
13629 if test "${with_ospeed+set}" = set; then
13630   withval="$with_ospeed"
13631   NCURSES_OSPEED="$withval"
13632 else
13633   NCURSES_OSPEED=short
13634 fi;
13635 echo "$as_me:13635: result: $NCURSES_OSPEED" >&5
13636 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13637
13638 ###   use option --with-mmask-t to override mmask_t's type
13639 echo "$as_me:13639: checking for type of mmask_t" >&5
13640 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13641
13642 # Check whether --with-mmask-t or --without-mmask-t was given.
13643 if test "${with_mmask_t+set}" = set; then
13644   withval="$with_mmask_t"
13645   NCURSES_MMASK_T="$withval"
13646 else
13647   NCURSES_MMASK_T=$cf_dft_mmask_t
13648 fi;
13649 echo "$as_me:13649: result: $NCURSES_MMASK_T" >&5
13650 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13651
13652 ###   use option --with-ccharw-max to override CCHARW_MAX size
13653 echo "$as_me:13653: checking for size CCHARW_MAX" >&5
13654 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13655
13656 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13657 if test "${with_ccharw_max+set}" = set; then
13658   withval="$with_ccharw_max"
13659   NCURSES_CCHARW_MAX="$withval"
13660 else
13661   NCURSES_CCHARW_MAX=5
13662 fi;
13663 echo "$as_me:13663: result: $NCURSES_CCHARW_MAX" >&5
13664 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13665
13666 echo "$as_me:13666: checking for ANSI C header files" >&5
13667 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13668 if test "${ac_cv_header_stdc+set}" = set; then
13669   echo $ECHO_N "(cached) $ECHO_C" >&6
13670 else
13671   cat >"conftest.$ac_ext" <<_ACEOF
13672 #line 13672 "configure"
13673 #include "confdefs.h"
13674 #include <stdlib.h>
13675 #include <stdarg.h>
13676 #include <string.h>
13677 #include <float.h>
13678
13679 _ACEOF
13680 if { (eval echo "$as_me:13680: \"$ac_cpp "conftest.$ac_ext"\"") >&5
13681   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
13682   ac_status=$?
13683   $EGREP -v '^ *\+' conftest.er1 >conftest.err
13684   rm -f conftest.er1
13685   cat conftest.err >&5
13686   echo "$as_me:13686: \$? = $ac_status" >&5
13687   (exit "$ac_status"); } >/dev/null; then
13688   if test -s conftest.err; then
13689     ac_cpp_err=$ac_c_preproc_warn_flag
13690   else
13691     ac_cpp_err=
13692   fi
13693 else
13694   ac_cpp_err=yes
13695 fi
13696 if test -z "$ac_cpp_err"; then
13697   ac_cv_header_stdc=yes
13698 else
13699   echo "$as_me: failed program was:" >&5
13700   cat "conftest.$ac_ext" >&5
13701   ac_cv_header_stdc=no
13702 fi
13703 rm -f conftest.err "conftest.$ac_ext"
13704
13705 if test $ac_cv_header_stdc = yes; then
13706   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13707   cat >"conftest.$ac_ext" <<_ACEOF
13708 #line 13708 "configure"
13709 #include "confdefs.h"
13710 #include <string.h>
13711
13712 _ACEOF
13713 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13714   $EGREP "memchr" >/dev/null 2>&1; then
13715   :
13716 else
13717   ac_cv_header_stdc=no
13718 fi
13719 rm -rf conftest*
13720
13721 fi
13722
13723 if test $ac_cv_header_stdc = yes; then
13724   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13725   cat >"conftest.$ac_ext" <<_ACEOF
13726 #line 13726 "configure"
13727 #include "confdefs.h"
13728 #include <stdlib.h>
13729
13730 _ACEOF
13731 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13732   $EGREP "free" >/dev/null 2>&1; then
13733   :
13734 else
13735   ac_cv_header_stdc=no
13736 fi
13737 rm -rf conftest*
13738
13739 fi
13740
13741 if test $ac_cv_header_stdc = yes; then
13742   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13743   if test "$cross_compiling" = yes; then
13744   :
13745 else
13746   cat >"conftest.$ac_ext" <<_ACEOF
13747 #line 13747 "configure"
13748 #include "confdefs.h"
13749 #include <ctype.h>
13750 #if ((' ' & 0x0FF) == 0x020)
13751 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13752 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13753 #else
13754 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13755                      || ('j' <= (c) && (c) <= 'r') \
13756                      || ('s' <= (c) && (c) <= 'z'))
13757 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13758 #endif
13759
13760 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13761 int
13762 main (void)
13763 {
13764   int i;
13765   for (i = 0; i < 256; i++)
13766     if (XOR (islower (i), ISLOWER (i))
13767         || toupper (i) != TOUPPER (i))
13768       $ac_main_return(2);
13769   $ac_main_return (0);
13770 }
13771 _ACEOF
13772 rm -f "conftest$ac_exeext"
13773 if { (eval echo "$as_me:13773: \"$ac_link\"") >&5
13774   (eval $ac_link) 2>&5
13775   ac_status=$?
13776   echo "$as_me:13776: \$? = $ac_status" >&5
13777   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
13778   { (eval echo "$as_me:13778: \"$ac_try\"") >&5
13779   (eval $ac_try) 2>&5
13780   ac_status=$?
13781   echo "$as_me:13781: \$? = $ac_status" >&5
13782   (exit "$ac_status"); }; }; then
13783   :
13784 else
13785   echo "$as_me: program exited with status $ac_status" >&5
13786 echo "$as_me: failed program was:" >&5
13787 cat "conftest.$ac_ext" >&5
13788 ac_cv_header_stdc=no
13789 fi
13790 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
13791 fi
13792 fi
13793 fi
13794 echo "$as_me:13794: result: $ac_cv_header_stdc" >&5
13795 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13796 if test $ac_cv_header_stdc = yes; then
13797
13798 cat >>confdefs.h <<\EOF
13799 #define STDC_HEADERS 1
13800 EOF
13801
13802 fi
13803
13804 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13805
13806 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13807                   inttypes.h stdint.h unistd.h
13808 do
13809 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13810 echo "$as_me:13810: checking for $ac_header" >&5
13811 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13812 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13813   echo $ECHO_N "(cached) $ECHO_C" >&6
13814 else
13815   cat >"conftest.$ac_ext" <<_ACEOF
13816 #line 13816 "configure"
13817 #include "confdefs.h"
13818 $ac_includes_default
13819 #include <$ac_header>
13820 _ACEOF
13821 rm -f "conftest.$ac_objext"
13822 if { (eval echo "$as_me:13822: \"$ac_compile\"") >&5
13823   (eval $ac_compile) 2>&5
13824   ac_status=$?
13825   echo "$as_me:13825: \$? = $ac_status" >&5
13826   (exit "$ac_status"); } &&
13827          { ac_try='test -s "conftest.$ac_objext"'
13828   { (eval echo "$as_me:13828: \"$ac_try\"") >&5
13829   (eval $ac_try) 2>&5
13830   ac_status=$?
13831   echo "$as_me:13831: \$? = $ac_status" >&5
13832   (exit "$ac_status"); }; }; then
13833   eval "$as_ac_Header=yes"
13834 else
13835   echo "$as_me: failed program was:" >&5
13836 cat "conftest.$ac_ext" >&5
13837 eval "$as_ac_Header=no"
13838 fi
13839 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13840 fi
13841 echo "$as_me:13841: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
13842 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
13843 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
13844   cat >>confdefs.h <<EOF
13845 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13846 EOF
13847
13848 fi
13849 done
13850
13851 echo "$as_me:13851: checking for signed char" >&5
13852 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13853 if test "${ac_cv_type_signed_char+set}" = set; then
13854   echo $ECHO_N "(cached) $ECHO_C" >&6
13855 else
13856   cat >"conftest.$ac_ext" <<_ACEOF
13857 #line 13857 "configure"
13858 #include "confdefs.h"
13859 $ac_includes_default
13860 int
13861 main (void)
13862 {
13863 if ((signed char *) 0)
13864   return 0;
13865 if (sizeof (signed char))
13866   return 0;
13867   ;
13868   return 0;
13869 }
13870 _ACEOF
13871 rm -f "conftest.$ac_objext"
13872 if { (eval echo "$as_me:13872: \"$ac_compile\"") >&5
13873   (eval $ac_compile) 2>&5
13874   ac_status=$?
13875   echo "$as_me:13875: \$? = $ac_status" >&5
13876   (exit "$ac_status"); } &&
13877          { ac_try='test -s "conftest.$ac_objext"'
13878   { (eval echo "$as_me:13878: \"$ac_try\"") >&5
13879   (eval $ac_try) 2>&5
13880   ac_status=$?
13881   echo "$as_me:13881: \$? = $ac_status" >&5
13882   (exit "$ac_status"); }; }; then
13883   ac_cv_type_signed_char=yes
13884 else
13885   echo "$as_me: failed program was:" >&5
13886 cat "conftest.$ac_ext" >&5
13887 ac_cv_type_signed_char=no
13888 fi
13889 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13890 fi
13891 echo "$as_me:13891: result: $ac_cv_type_signed_char" >&5
13892 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13893
13894 echo "$as_me:13894: checking size of signed char" >&5
13895 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13896 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13897   echo $ECHO_N "(cached) $ECHO_C" >&6
13898 else
13899   if test "$ac_cv_type_signed_char" = yes; then
13900   if test "$cross_compiling" = yes; then
13901   # Depending upon the size, compute the lo and hi bounds.
13902 cat >"conftest.$ac_ext" <<_ACEOF
13903 #line 13903 "configure"
13904 #include "confdefs.h"
13905 $ac_includes_default
13906 int
13907 main (void)
13908 {
13909 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13910   ;
13911   return 0;
13912 }
13913 _ACEOF
13914 rm -f "conftest.$ac_objext"
13915 if { (eval echo "$as_me:13915: \"$ac_compile\"") >&5
13916   (eval $ac_compile) 2>&5
13917   ac_status=$?
13918   echo "$as_me:13918: \$? = $ac_status" >&5
13919   (exit "$ac_status"); } &&
13920          { ac_try='test -s "conftest.$ac_objext"'
13921   { (eval echo "$as_me:13921: \"$ac_try\"") >&5
13922   (eval $ac_try) 2>&5
13923   ac_status=$?
13924   echo "$as_me:13924: \$? = $ac_status" >&5
13925   (exit "$ac_status"); }; }; then
13926   ac_lo=0 ac_mid=0
13927   while :; do
13928     cat >"conftest.$ac_ext" <<_ACEOF
13929 #line 13929 "configure"
13930 #include "confdefs.h"
13931 $ac_includes_default
13932 int
13933 main (void)
13934 {
13935 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13936   ;
13937   return 0;
13938 }
13939 _ACEOF
13940 rm -f "conftest.$ac_objext"
13941 if { (eval echo "$as_me:13941: \"$ac_compile\"") >&5
13942   (eval $ac_compile) 2>&5
13943   ac_status=$?
13944   echo "$as_me:13944: \$? = $ac_status" >&5
13945   (exit "$ac_status"); } &&
13946          { ac_try='test -s "conftest.$ac_objext"'
13947   { (eval echo "$as_me:13947: \"$ac_try\"") >&5
13948   (eval $ac_try) 2>&5
13949   ac_status=$?
13950   echo "$as_me:13950: \$? = $ac_status" >&5
13951   (exit "$ac_status"); }; }; then
13952   ac_hi=$ac_mid; break
13953 else
13954   echo "$as_me: failed program was:" >&5
13955 cat "conftest.$ac_ext" >&5
13956 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
13957 fi
13958 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13959   done
13960 else
13961   echo "$as_me: failed program was:" >&5
13962 cat "conftest.$ac_ext" >&5
13963 ac_hi=-1 ac_mid=-1
13964   while :; do
13965     cat >"conftest.$ac_ext" <<_ACEOF
13966 #line 13966 "configure"
13967 #include "confdefs.h"
13968 $ac_includes_default
13969 int
13970 main (void)
13971 {
13972 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13973   ;
13974   return 0;
13975 }
13976 _ACEOF
13977 rm -f "conftest.$ac_objext"
13978 if { (eval echo "$as_me:13978: \"$ac_compile\"") >&5
13979   (eval $ac_compile) 2>&5
13980   ac_status=$?
13981   echo "$as_me:13981: \$? = $ac_status" >&5
13982   (exit "$ac_status"); } &&
13983          { ac_try='test -s "conftest.$ac_objext"'
13984   { (eval echo "$as_me:13984: \"$ac_try\"") >&5
13985   (eval $ac_try) 2>&5
13986   ac_status=$?
13987   echo "$as_me:13987: \$? = $ac_status" >&5
13988   (exit "$ac_status"); }; }; then
13989   ac_lo=$ac_mid; break
13990 else
13991   echo "$as_me: failed program was:" >&5
13992 cat "conftest.$ac_ext" >&5
13993 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
13994 fi
13995 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13996   done
13997 fi
13998 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13999 # Binary search between lo and hi bounds.
14000 while test "x$ac_lo" != "x$ac_hi"; do
14001   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14002   cat >"conftest.$ac_ext" <<_ACEOF
14003 #line 14003 "configure"
14004 #include "confdefs.h"
14005 $ac_includes_default
14006 int
14007 main (void)
14008 {
14009 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14010   ;
14011   return 0;
14012 }
14013 _ACEOF
14014 rm -f "conftest.$ac_objext"
14015 if { (eval echo "$as_me:14015: \"$ac_compile\"") >&5
14016   (eval $ac_compile) 2>&5
14017   ac_status=$?
14018   echo "$as_me:14018: \$? = $ac_status" >&5
14019   (exit "$ac_status"); } &&
14020          { ac_try='test -s "conftest.$ac_objext"'
14021   { (eval echo "$as_me:14021: \"$ac_try\"") >&5
14022   (eval $ac_try) 2>&5
14023   ac_status=$?
14024   echo "$as_me:14024: \$? = $ac_status" >&5
14025   (exit "$ac_status"); }; }; then
14026   ac_hi=$ac_mid
14027 else
14028   echo "$as_me: failed program was:" >&5
14029 cat "conftest.$ac_ext" >&5
14030 ac_lo=`expr "$ac_mid" + 1`
14031 fi
14032 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14033 done
14034 ac_cv_sizeof_signed_char=$ac_lo
14035 else
14036   if test "$cross_compiling" = yes; then
14037   { { echo "$as_me:14037: error: cannot run test program while cross compiling" >&5
14038 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14039    { (exit 1); exit 1; }; }
14040 else
14041   cat >"conftest.$ac_ext" <<_ACEOF
14042 #line 14042 "configure"
14043 #include "confdefs.h"
14044 $ac_includes_default
14045 int
14046 main (void)
14047 {
14048 FILE *f = fopen ("conftest.val", "w");
14049 if (!f)
14050   $ac_main_return (1);
14051 fprintf (f, "%d", (sizeof (signed char)));
14052 fclose (f);
14053   ;
14054   return 0;
14055 }
14056 _ACEOF
14057 rm -f "conftest$ac_exeext"
14058 if { (eval echo "$as_me:14058: \"$ac_link\"") >&5
14059   (eval $ac_link) 2>&5
14060   ac_status=$?
14061   echo "$as_me:14061: \$? = $ac_status" >&5
14062   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14063   { (eval echo "$as_me:14063: \"$ac_try\"") >&5
14064   (eval $ac_try) 2>&5
14065   ac_status=$?
14066   echo "$as_me:14066: \$? = $ac_status" >&5
14067   (exit "$ac_status"); }; }; then
14068   ac_cv_sizeof_signed_char=`cat conftest.val`
14069 else
14070   echo "$as_me: program exited with status $ac_status" >&5
14071 echo "$as_me: failed program was:" >&5
14072 cat "conftest.$ac_ext" >&5
14073 fi
14074 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14075 fi
14076 fi
14077 rm -f conftest.val
14078 else
14079   ac_cv_sizeof_signed_char=0
14080 fi
14081 fi
14082 echo "$as_me:14082: result: $ac_cv_sizeof_signed_char" >&5
14083 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14084 cat >>confdefs.h <<EOF
14085 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14086 EOF
14087
14088 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14089         NCURSES_SBOOL="signed char"
14090 else
14091         NCURSES_SBOOL="char"
14092 fi
14093 echo "$as_me:14093: checking if you want to use signed Boolean array in term.h" >&5
14094 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14095
14096 # Check whether --enable-signed-char or --disable-signed-char was given.
14097 if test "${enable_signed_char+set}" = set; then
14098   enableval="$enable_signed_char"
14099   with_signed_char=$enableval
14100 else
14101   with_signed_char=no
14102 fi;
14103 echo "$as_me:14103: result: $with_signed_char" >&5
14104 echo "${ECHO_T}$with_signed_char" >&6
14105 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14106
14107 ###   use option --with-tparm-arg to override tparm's argument type
14108 echo "$as_me:14108: checking for type of tparm args" >&5
14109 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14110
14111 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14112 if test "${with_tparm_arg+set}" = set; then
14113   withval="$with_tparm_arg"
14114   NCURSES_TPARM_ARG="$withval"
14115 else
14116   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14117 fi;
14118 echo "$as_me:14118: result: $NCURSES_TPARM_ARG" >&5
14119 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14120
14121 ### Enable compiling-in rcs id's
14122 echo "$as_me:14122: checking if RCS identifiers should be compiled-in" >&5
14123 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14124
14125 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14126 if test "${with_rcs_ids+set}" = set; then
14127   withval="$with_rcs_ids"
14128   with_rcs_ids=$withval
14129 else
14130   with_rcs_ids=no
14131 fi;
14132 echo "$as_me:14132: result: $with_rcs_ids" >&5
14133 echo "${ECHO_T}$with_rcs_ids" >&6
14134 test "x$with_rcs_ids" = xyes &&
14135 cat >>confdefs.h <<\EOF
14136 #define USE_RCS_IDS 1
14137 EOF
14138
14139 ###############################################################################
14140
14141 echo "$as_me:14141: checking format of man-pages" >&5
14142 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14143
14144 # Check whether --with-manpage-format or --without-manpage-format was given.
14145 if test "${with_manpage_format+set}" = set; then
14146   withval="$with_manpage_format"
14147   MANPAGE_FORMAT=$withval
14148 else
14149   MANPAGE_FORMAT=unknown
14150 fi;
14151
14152 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14153 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14154
14155 cf_unknown=
14156
14157 case "$MANPAGE_FORMAT" in
14158 (unknown)
14159         if test -z "$MANPATH" ; then
14160                 MANPATH="/usr/man:/usr/share/man"
14161         fi
14162
14163         # look for the 'date' man-page (it's most likely to be installed!)
14164         MANPAGE_FORMAT=
14165         cf_preform="no"
14166         cf_catonly="yes"
14167         cf_example="date"
14168
14169         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14170         for cf_dir in $MANPATH; do
14171                 test -z "$cf_dir" && cf_dir=/usr/man
14172                 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
14173                 do
14174                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14175                         if test "x$cf_test" = "x$cf_name" ; then
14176
14177                                 case "$cf_name" in
14178                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14179                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14180                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14181                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14182                                 esac
14183
14184                                 case "$cf_name" in
14185                                 ($cf_dir/man*)
14186                                         cf_catonly=no
14187                                         ;;
14188                                 ($cf_dir/cat*)
14189                                         cf_preform=yes
14190                                         ;;
14191                                 esac
14192                                 break
14193                         fi
14194
14195                         # if we found a match in either man* or cat*, stop looking
14196                         if test -n "$MANPAGE_FORMAT" ; then
14197                                 cf_found=no
14198                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14199                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14200                                 case "$cf_name" in
14201                                 ($cf_dir/cat*)
14202                                         cf_found=yes
14203                                         ;;
14204                                 esac
14205                                 test "$cf_found" = yes && break
14206                         fi
14207                 done
14208                 # only check the first directory in $MANPATH where we find manpages
14209                 if test -n "$MANPAGE_FORMAT" ; then
14210                         break
14211                 fi
14212         done
14213         # if we did not find the example, just assume it is normal
14214         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14215         IFS="$ac_save_ifs"
14216         ;;
14217 (*)
14218         for cf_option in $MANPAGE_FORMAT; do
14219         case "$cf_option" in
14220         (gzip|compress|BSDI|normal|formatted|catonly)
14221                 ;;
14222         (*)
14223                 cf_unknown="$cf_unknown $cf_option"
14224                 ;;
14225         esac
14226         done
14227         ;;
14228 esac
14229
14230 echo "$as_me:14230: result: $MANPAGE_FORMAT" >&5
14231 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14232 if test -n "$cf_unknown" ; then
14233         { echo "$as_me:14233: WARNING: Unexpected manpage-format $cf_unknown" >&5
14234 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14235 fi
14236
14237 echo "$as_me:14237: checking for manpage renaming" >&5
14238 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14239
14240 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14241 if test "${with_manpage_renames+set}" = set; then
14242   withval="$with_manpage_renames"
14243   MANPAGE_RENAMES=$withval
14244 else
14245   MANPAGE_RENAMES=yes
14246 fi;
14247
14248 case ".$MANPAGE_RENAMES" in
14249 (.no)
14250         ;;
14251 (.|.yes)
14252         # Debian 'man' program?
14253         if test -f /etc/debian_version ; then
14254                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14255         else
14256                 MANPAGE_RENAMES=no
14257         fi
14258         ;;
14259 esac
14260
14261 if test "$MANPAGE_RENAMES" != no ; then
14262         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14263                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14264         elif test ! -f "$MANPAGE_RENAMES" ; then
14265                 { { echo "$as_me:14265: error: not a filename: $MANPAGE_RENAMES" >&5
14266 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14267    { (exit 1); exit 1; }; }
14268         fi
14269
14270         test ! -d man && mkdir man
14271
14272         # Construct a sed-script to perform renaming within man-pages
14273         if test -n "$MANPAGE_RENAMES" ; then
14274                 test ! -d man && mkdir man
14275                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14276         fi
14277 fi
14278
14279 echo "$as_me:14279: result: $MANPAGE_RENAMES" >&5
14280 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14281
14282 echo "$as_me:14282: checking if manpage aliases will be installed" >&5
14283 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14284
14285 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14286 if test "${with_manpage_aliases+set}" = set; then
14287   withval="$with_manpage_aliases"
14288   MANPAGE_ALIASES=$withval
14289 else
14290   MANPAGE_ALIASES=yes
14291 fi;
14292
14293 echo "$as_me:14293: result: $MANPAGE_ALIASES" >&5
14294 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14295
14296 case "x$LN_S" in
14297 (xln*)
14298         cf_use_symlinks=yes
14299         ;;
14300 (*)
14301         cf_use_symlinks=no
14302         ;;
14303 esac
14304
14305 MANPAGE_SYMLINKS=no
14306 if test "$MANPAGE_ALIASES" = yes ; then
14307 echo "$as_me:14307: checking if manpage symlinks should be used" >&5
14308 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14309
14310 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14311 if test "${with_manpage_symlinks+set}" = set; then
14312   withval="$with_manpage_symlinks"
14313   MANPAGE_SYMLINKS=$withval
14314 else
14315   MANPAGE_SYMLINKS=$cf_use_symlinks
14316 fi;
14317
14318 if test "$$cf_use_symlinks" = no; then
14319 if test "$MANPAGE_SYMLINKS" = yes ; then
14320         { echo "$as_me:14320: WARNING: cannot make symlinks" >&5
14321 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14322         MANPAGE_SYMLINKS=no
14323 fi
14324 fi
14325
14326 echo "$as_me:14326: result: $MANPAGE_SYMLINKS" >&5
14327 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14328 fi
14329
14330 echo "$as_me:14330: checking for manpage tbl" >&5
14331 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14332
14333 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14334 if test "${with_manpage_tbl+set}" = set; then
14335   withval="$with_manpage_tbl"
14336   MANPAGE_TBL=$withval
14337 else
14338   MANPAGE_TBL=no
14339 fi;
14340
14341 echo "$as_me:14341: result: $MANPAGE_TBL" >&5
14342 echo "${ECHO_T}$MANPAGE_TBL" >&6
14343
14344 if test "$prefix" = "NONE" ; then
14345         cf_prefix="$ac_default_prefix"
14346 else
14347         cf_prefix="$prefix"
14348 fi
14349
14350 case "$MANPAGE_FORMAT" in
14351 (*catonly*)
14352         cf_format=yes
14353         cf_inboth=no
14354         ;;
14355 (*formatted*)
14356         cf_format=yes
14357         cf_inboth=yes
14358         ;;
14359 (*)
14360         cf_format=no
14361         cf_inboth=no
14362         ;;
14363 esac
14364
14365 test ! -d man && mkdir man
14366
14367 cf_so_strip=
14368 cf_compress=
14369 case "$MANPAGE_FORMAT" in
14370 (*compress*)
14371         cf_so_strip="Z"
14372         cf_compress=compress
14373         ;;
14374 (*gzip*)
14375         cf_so_strip="gz"
14376         cf_compress=gzip
14377         ;;
14378 esac
14379
14380 cf_edit_man=./edit_man.sh
14381 cf_man_alias=`pwd`/man_alias.sed
14382
14383 cat >$cf_edit_man <<CF_EOF
14384 #! $SHELL
14385 # this script is generated by the configure-script CF_MAN_PAGES macro.
14386
14387 prefix="$cf_prefix"
14388 datarootdir="$datarootdir"
14389 datadir="$datadir"
14390
14391 NCURSES_MAJOR="$NCURSES_MAJOR"
14392 NCURSES_MINOR="$NCURSES_MINOR"
14393 NCURSES_PATCH="$NCURSES_PATCH"
14394
14395 NCURSES_OSPEED="$NCURSES_OSPEED"
14396 TERMINFO="$TERMINFO"
14397
14398 INSTALL="$INSTALL"
14399 INSTALL_DATA="$INSTALL_DATA"
14400
14401 transform="$program_transform_name"
14402
14403 TMP=\${TMPDIR:=/tmp}/man\$\$
14404 trap "rm -f \$TMP" 0 1 2 3 15
14405
14406 form=\$1
14407 shift || exit 1
14408
14409 verb=\$1
14410 shift || exit 1
14411
14412 mandir=\$1
14413 shift || exit 1
14414
14415 srcdir=\$1
14416 top_srcdir=\$srcdir/..
14417 shift || exit 1
14418
14419 if test "\$form" = normal ; then
14420         if test "$cf_format" = yes ; then
14421         if test "$cf_inboth" = no ; then
14422                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14423                 exit $?
14424         fi
14425         fi
14426         cf_subdir=\$mandir/man
14427         cf_tables=$MANPAGE_TBL
14428 else
14429         cf_subdir=\$mandir/cat
14430         cf_tables=yes
14431 fi
14432
14433 # process the list of source-files
14434 for i in "\$@" ; do
14435 case \$i in
14436 (*.orig|*.rej) ;;
14437 (*.[0-9]*)
14438         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14439         if test "\$verb" = installing ; then
14440         if test ! -d "\$cf_subdir\${section}" ; then
14441                 mkdir -p "\$cf_subdir\$section"
14442         fi
14443         fi
14444
14445         # replace variables in man page
14446         if test ! -f "$cf_man_alias" ; then
14447 cat >>$cf_man_alias <<-CF_EOF2
14448                 s,@DATADIR@,\$datadir,g
14449                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14450                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14451                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14452                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14453                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14454                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14455 CF_EOF
14456
14457         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14458         do
14459                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14460                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14461 cat >>$cf_edit_man <<-CF_EOF
14462                 s,@$cf_NAME@,$cf_name,g
14463 CF_EOF
14464         done
14465
14466 cat >>$cf_edit_man <<CF_EOF
14467 CF_EOF2
14468                 echo "...made $cf_man_alias"
14469         fi
14470
14471         aliases=
14472         cf_source=\`basename "\$i"\`
14473         inalias=\$cf_source
14474         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14475         if test ! -f "\$inalias" ; then
14476                 echo ".. skipped \$cf_source"
14477                 continue
14478         fi
14479 CF_EOF
14480
14481 if test "$MANPAGE_ALIASES" != no ; then
14482 cat >>$cf_edit_man <<CF_EOF
14483         nCurses=ignore.3x
14484         test "$with_curses_h" = yes && nCurses=ncurses.3x
14485         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14486 CF_EOF
14487 fi
14488
14489 if test "$MANPAGE_RENAMES" = no ; then
14490 cat >>$cf_edit_man <<CF_EOF
14491         # perform program transformations for section 1 man pages
14492         if test \$section = 1 ; then
14493                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14494         else
14495                 cf_target=\$cf_subdir\${section}/\$cf_source
14496         fi
14497 CF_EOF
14498 else
14499 cat >>$cf_edit_man <<CF_EOF
14500         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14501         if test -z "\$cf_target" ; then
14502                 echo "? missing rename for \$cf_source"
14503                 cf_target="\$cf_source"
14504         fi
14505         cf_target="\$cf_subdir\${section}/\${cf_target}"
14506
14507 CF_EOF
14508 fi
14509
14510 cat >>$cf_edit_man <<CF_EOF
14511         sed     -f "$cf_man_alias" \\
14512 CF_EOF
14513
14514 if test -f "$MANPAGE_RENAMES" ; then
14515 cat >>$cf_edit_man <<CF_EOF
14516                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14517 CF_EOF
14518 else
14519 cat >>$cf_edit_man <<CF_EOF
14520                 < "\$i" >\$TMP
14521 CF_EOF
14522 fi
14523
14524 cat >>$cf_edit_man <<CF_EOF
14525 if test \$cf_tables = yes ; then
14526         tbl \$TMP >\$TMP.out
14527         mv \$TMP.out \$TMP
14528 fi
14529 CF_EOF
14530
14531 if test "$with_overwrite" != yes ; then
14532 cat >>$cf_edit_man <<CF_EOF
14533         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14534         mv \$TMP.out \$TMP
14535 CF_EOF
14536 fi
14537
14538 if test "$with_curses_h" != yes ; then
14539 cat >>$cf_edit_man <<CF_EOF
14540         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14541         mv \$TMP.out \$TMP
14542 CF_EOF
14543 fi
14544
14545 cat >>$cf_edit_man <<CF_EOF
14546         if test "\$form" = format ; then
14547                 nroff -man \$TMP >\$TMP.out
14548                 mv \$TMP.out \$TMP
14549         fi
14550 CF_EOF
14551
14552 if test -n "$cf_compress" ; then
14553 cat >>$cf_edit_man <<CF_EOF
14554         if test "\$verb" = installing ; then
14555         if ( "$cf_compress" -f \$TMP )
14556         then
14557                 mv \$TMP.$cf_so_strip \$TMP
14558         fi
14559         fi
14560         cf_target="\$cf_target.$cf_so_strip"
14561 CF_EOF
14562 fi
14563
14564 case "$MANPAGE_FORMAT" in
14565 (*BSDI*)
14566 cat >>$cf_edit_man <<CF_EOF
14567         if test "\$form" = format ; then
14568                 # BSDI installs only .0 suffixes in the cat directories
14569                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14570         fi
14571 CF_EOF
14572   ;;
14573 esac
14574
14575 cat >>$cf_edit_man <<CF_EOF
14576         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14577         if test "\$verb" = installing ; then
14578                 echo "\$verb \$cf_target"
14579                 \$INSTALL_DATA \$TMP "\$cf_target"
14580                 test -d "\$cf_subdir\${section}" &&
14581                 test -n "\$aliases" && (
14582                         cd "\$cf_subdir\${section}" && (
14583                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14584                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14585                                 cf_target=\`basename "\$cf_target"\`
14586                                 for cf_alias in \$aliases
14587                                 do
14588                                         if test "\$section" = 1 ; then
14589                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14590                                         fi
14591
14592                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14593                                                 if test -f "\$cf_alias\${suffix}" ; then
14594                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14595                                                         then
14596                                                                 continue
14597                                                         fi
14598                                                 fi
14599                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14600 CF_EOF
14601 case "x$LN_S" in
14602 (*-f)
14603 cat >>$cf_edit_man <<CF_EOF
14604                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14605 CF_EOF
14606         ;;
14607 (*)
14608 cat >>$cf_edit_man <<CF_EOF
14609                                                 rm -f "\$cf_alias\${suffix}"
14610                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14611 CF_EOF
14612         ;;
14613 esac
14614 cat >>$cf_edit_man <<CF_EOF
14615                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14616                                                 echo ".so \$cf_source" >\$TMP
14617 CF_EOF
14618 if test -n "$cf_compress" ; then
14619 cat >>$cf_edit_man <<CF_EOF
14620                                                 if test -n "$cf_so_strip" ; then
14621                                                         "$cf_compress" -f \$TMP
14622                                                         mv \$TMP.$cf_so_strip \$TMP
14623                                                 fi
14624 CF_EOF
14625 fi
14626 cat >>$cf_edit_man <<CF_EOF
14627                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14628                                                 rm -f "\$cf_alias\${suffix}"
14629                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
14630                                         fi
14631                                 done
14632                         )
14633                 )
14634         elif test "\$verb" = removing ; then
14635                 test -f "\$cf_target" && (
14636                         echo "\$verb \$cf_target"
14637                         rm -f "\$cf_target"
14638                 )
14639                 test -d "\$cf_subdir\${section}" &&
14640                 test -n "\$aliases" && (
14641                         cd "\$cf_subdir\${section}" && (
14642                                 for cf_alias in \$aliases
14643                                 do
14644                                         if test "\$section" = 1 ; then
14645                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14646                                         fi
14647
14648                                         echo ".. \$verb alias \$cf_alias\${suffix}"
14649                                         rm -f "\$cf_alias\${suffix}"
14650                                 done
14651                         )
14652                 )
14653         else
14654 #               echo ".hy 0"
14655                 cat \$TMP
14656         fi
14657         ;;
14658 esac
14659 done
14660
14661 if test "$cf_inboth" = yes ; then
14662 if test "\$form" != format ; then
14663         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14664 fi
14665 fi
14666
14667 exit 0
14668 CF_EOF
14669 chmod 755 "$cf_edit_man"
14670
14671 ###############################################################################
14672
14673 ### Note that some functions (such as const) are normally disabled anyway.
14674 echo "$as_me:14674: checking if you want to build with function extensions" >&5
14675 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14676
14677 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14678 if test "${enable_ext_funcs+set}" = set; then
14679   enableval="$enable_ext_funcs"
14680   with_ext_funcs=$enableval
14681 else
14682   with_ext_funcs=yes
14683 fi;
14684 echo "$as_me:14684: result: $with_ext_funcs" >&5
14685 echo "${ECHO_T}$with_ext_funcs" >&6
14686 if test "x$with_ext_funcs" = xyes ; then
14687         NCURSES_EXT_FUNCS=1
14688
14689 cat >>confdefs.h <<\EOF
14690 #define NCURSES_EXT_FUNCS 1
14691 EOF
14692
14693 cat >>confdefs.h <<\EOF
14694 #define HAVE_ASSUME_DEFAULT_COLORS 1
14695 EOF
14696
14697 cat >>confdefs.h <<\EOF
14698 #define HAVE_CURSES_VERSION 1
14699 EOF
14700
14701 cat >>confdefs.h <<\EOF
14702 #define HAVE_HAS_KEY 1
14703 EOF
14704
14705 cat >>confdefs.h <<\EOF
14706 #define HAVE_RESIZETERM 1
14707 EOF
14708
14709 cat >>confdefs.h <<\EOF
14710 #define HAVE_RESIZE_TERM 1
14711 EOF
14712
14713 cat >>confdefs.h <<\EOF
14714 #define HAVE_TERM_ENTRY_H 1
14715 EOF
14716
14717 cat >>confdefs.h <<\EOF
14718 #define HAVE_USE_DEFAULT_COLORS 1
14719 EOF
14720
14721 cat >>confdefs.h <<\EOF
14722 #define HAVE_USE_EXTENDED_NAMES 1
14723 EOF
14724
14725 cat >>confdefs.h <<\EOF
14726 #define HAVE_USE_SCREEN 1
14727 EOF
14728
14729 cat >>confdefs.h <<\EOF
14730 #define HAVE_USE_WINDOW 1
14731 EOF
14732
14733 cat >>confdefs.h <<\EOF
14734 #define HAVE_WRESIZE 1
14735 EOF
14736
14737         GENERATED_EXT_FUNCS=generated
14738         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14739 else
14740         NCURSES_EXT_FUNCS=0
14741         GENERATED_EXT_FUNCS=
14742 fi
14743
14744 echo "$as_me:14744: checking if you want to build with SCREEN extensions" >&5
14745 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14746
14747 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14748 if test "${enable_sp_funcs+set}" = set; then
14749   enableval="$enable_sp_funcs"
14750   with_sp_funcs=$enableval
14751 else
14752   with_sp_funcs=$cf_dft_ext_spfuncs
14753 fi;
14754 echo "$as_me:14754: result: $with_sp_funcs" >&5
14755 echo "${ECHO_T}$with_sp_funcs" >&6
14756 if test "x$with_sp_funcs" = xyes ; then
14757         NCURSES_SP_FUNCS=1
14758
14759 cat >>confdefs.h <<\EOF
14760 #define NCURSES_SP_FUNCS 1
14761 EOF
14762
14763 cat >>confdefs.h <<\EOF
14764 #define HAVE_TPUTS_SP 1
14765 EOF
14766
14767         GENERATED_SP_FUNCS=generated
14768 else
14769         NCURSES_SP_FUNCS=0
14770         GENERATED_SP_FUNCS=
14771 fi
14772
14773 echo "$as_me:14773: checking if you want to build with terminal-driver" >&5
14774 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14775
14776 # Check whether --enable-term-driver or --disable-term-driver was given.
14777 if test "${enable_term_driver+set}" = set; then
14778   enableval="$enable_term_driver"
14779   with_term_driver=$enableval
14780 else
14781   with_term_driver=no
14782 fi;
14783 echo "$as_me:14783: result: $with_term_driver" >&5
14784 echo "${ECHO_T}$with_term_driver" >&6
14785 if test "x$with_term_driver" = xyes ; then
14786
14787 cat >>confdefs.h <<\EOF
14788 #define USE_TERM_DRIVER 1
14789 EOF
14790
14791         if test "x$with_termlib" != xno ; then
14792                 { { echo "$as_me:14792: error: The term-driver option conflicts with the termlib option" >&5
14793 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14794    { (exit 1); exit 1; }; }
14795         fi
14796         if test "x$with_sp_funcs" != xyes ; then
14797                 { { echo "$as_me:14797: error: The term-driver option relies upon sp-funcs" >&5
14798 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14799    { (exit 1); exit 1; }; }
14800         fi
14801 fi
14802
14803 ###   use option --enable-const to turn on use of const beyond that in XSI.
14804 echo "$as_me:14804: checking for extended use of const keyword" >&5
14805 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14806
14807 # Check whether --enable-const or --disable-const was given.
14808 if test "${enable_const+set}" = set; then
14809   enableval="$enable_const"
14810   with_ext_const=$enableval
14811 else
14812   with_ext_const=$cf_dft_ext_const
14813 fi;
14814 echo "$as_me:14814: result: $with_ext_const" >&5
14815 echo "${ECHO_T}$with_ext_const" >&6
14816 NCURSES_CONST='/*nothing*/'
14817 if test "x$with_ext_const" = xyes ; then
14818         NCURSES_CONST=const
14819 fi
14820
14821 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14822 echo "$as_me:14822: checking if you want to use extended colors" >&5
14823 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14824
14825 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14826 if test "${enable_ext_colors+set}" = set; then
14827   enableval="$enable_ext_colors"
14828   with_ext_colors=$enableval
14829 else
14830   with_ext_colors=$cf_dft_ext_colors
14831 fi;
14832 echo "$as_me:14832: result: $with_ext_colors" >&5
14833 echo "${ECHO_T}$with_ext_colors" >&6
14834 NCURSES_EXT_COLORS=0
14835 if test "x$with_ext_colors" = xyes ; then
14836         if test "x$with_widec" != xyes ; then
14837                 { echo "$as_me:14837: WARNING: This option applies only to wide-character library" >&5
14838 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14839         else
14840                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14841
14842 if test "${with_abi_version+set}" != set; then
14843         case "$cf_cv_rel_version" in
14844         (5.*)
14845                 cf_cv_rel_version=6.0
14846                 cf_cv_abi_version=6
14847                 { echo "$as_me:14847: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14848 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14849                 ;;
14850         esac
14851 fi
14852
14853                 NCURSES_EXT_COLORS=1
14854
14855 cat >>confdefs.h <<\EOF
14856 #define NCURSES_EXT_COLORS 1
14857 EOF
14858
14859 cat >>confdefs.h <<\EOF
14860 #define HAVE_ALLOC_PAIR 1
14861 EOF
14862
14863 cat >>confdefs.h <<\EOF
14864 #define HAVE_INIT_EXTENDED_COLOR 1
14865 EOF
14866
14867 cat >>confdefs.h <<\EOF
14868 #define HAVE_RESET_COLOR_PAIRS 1
14869 EOF
14870
14871         fi
14872 fi
14873
14874 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14875 echo "$as_me:14875: checking if you want to use extended mouse encoding" >&5
14876 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14877
14878 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14879 if test "${enable_ext_mouse+set}" = set; then
14880   enableval="$enable_ext_mouse"
14881   with_ext_mouse=$enableval
14882 else
14883   with_ext_mouse=$cf_dft_ext_mouse
14884 fi;
14885 echo "$as_me:14885: result: $with_ext_mouse" >&5
14886 echo "${ECHO_T}$with_ext_mouse" >&6
14887 NCURSES_MOUSE_VERSION=1
14888 if test "x$with_ext_mouse" = xyes ; then
14889         NCURSES_MOUSE_VERSION=2
14890
14891 if test "${with_abi_version+set}" != set; then
14892         case "$cf_cv_rel_version" in
14893         (5.*)
14894                 cf_cv_rel_version=6.0
14895                 cf_cv_abi_version=6
14896                 { echo "$as_me:14896: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14897 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14898                 ;;
14899         esac
14900 fi
14901
14902 fi
14903
14904 ###   use option --enable-ext-putwin to turn on extended screendumps
14905 echo "$as_me:14905: checking if you want to use extended putwin/screendump" >&5
14906 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14907
14908 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14909 if test "${enable_ext_putwin+set}" = set; then
14910   enableval="$enable_ext_putwin"
14911   with_ext_putwin=$enableval
14912 else
14913   with_ext_putwin=$cf_dft_ext_putwin
14914 fi;
14915 echo "$as_me:14915: result: $with_ext_putwin" >&5
14916 echo "${ECHO_T}$with_ext_putwin" >&6
14917 if test "x$with_ext_putwin" = xyes ; then
14918
14919 cat >>confdefs.h <<\EOF
14920 #define NCURSES_EXT_PUTWIN 1
14921 EOF
14922
14923 fi
14924
14925 echo "$as_me:14925: checking if you want \$NCURSES_NO_PADDING code" >&5
14926 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14927
14928 # Check whether --enable-no-padding or --disable-no-padding was given.
14929 if test "${enable_no_padding+set}" = set; then
14930   enableval="$enable_no_padding"
14931   with_no_padding=$enableval
14932 else
14933   with_no_padding=$with_ext_funcs
14934 fi;
14935 echo "$as_me:14935: result: $with_no_padding" >&5
14936 echo "${ECHO_T}$with_no_padding" >&6
14937 test "x$with_no_padding" = xyes &&
14938 cat >>confdefs.h <<\EOF
14939 #define NCURSES_NO_PADDING 1
14940 EOF
14941
14942 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14943 echo "$as_me:14943: checking if you want SIGWINCH handler" >&5
14944 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14945
14946 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14947 if test "${enable_sigwinch+set}" = set; then
14948   enableval="$enable_sigwinch"
14949   with_sigwinch=$enableval
14950 else
14951   with_sigwinch=$with_ext_funcs
14952 fi;
14953 echo "$as_me:14953: result: $with_sigwinch" >&5
14954 echo "${ECHO_T}$with_sigwinch" >&6
14955 test "x$with_sigwinch" = xyes &&
14956 cat >>confdefs.h <<\EOF
14957 #define USE_SIGWINCH 1
14958 EOF
14959
14960 ###   use option --enable-tcap-names to allow user to define new capabilities
14961 echo "$as_me:14961: checking if you want user-definable terminal capabilities like termcap" >&5
14962 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14963
14964 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14965 if test "${enable_tcap_names+set}" = set; then
14966   enableval="$enable_tcap_names"
14967   with_tcap_names=$enableval
14968 else
14969   with_tcap_names=$with_ext_funcs
14970 fi;
14971 echo "$as_me:14971: result: $with_tcap_names" >&5
14972 echo "${ECHO_T}$with_tcap_names" >&6
14973 NCURSES_XNAMES=0
14974 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14975
14976 ##############################################################################
14977
14978 echo "$as_me:14978: checking if you want to link with the pthread library" >&5
14979 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14980
14981 # Check whether --with-pthread or --without-pthread was given.
14982 if test "${with_pthread+set}" = set; then
14983   withval="$with_pthread"
14984   with_pthread=$withval
14985 else
14986   with_pthread=no
14987 fi;
14988 echo "$as_me:14988: result: $with_pthread" >&5
14989 echo "${ECHO_T}$with_pthread" >&6
14990
14991 if test "$with_pthread" != no ; then
14992         echo "$as_me:14992: checking for pthread.h" >&5
14993 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14994 if test "${ac_cv_header_pthread_h+set}" = set; then
14995   echo $ECHO_N "(cached) $ECHO_C" >&6
14996 else
14997   cat >"conftest.$ac_ext" <<_ACEOF
14998 #line 14998 "configure"
14999 #include "confdefs.h"
15000 #include <pthread.h>
15001 _ACEOF
15002 if { (eval echo "$as_me:15002: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15003   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15004   ac_status=$?
15005   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15006   rm -f conftest.er1
15007   cat conftest.err >&5
15008   echo "$as_me:15008: \$? = $ac_status" >&5
15009   (exit "$ac_status"); } >/dev/null; then
15010   if test -s conftest.err; then
15011     ac_cpp_err=$ac_c_preproc_warn_flag
15012   else
15013     ac_cpp_err=
15014   fi
15015 else
15016   ac_cpp_err=yes
15017 fi
15018 if test -z "$ac_cpp_err"; then
15019   ac_cv_header_pthread_h=yes
15020 else
15021   echo "$as_me: failed program was:" >&5
15022   cat "conftest.$ac_ext" >&5
15023   ac_cv_header_pthread_h=no
15024 fi
15025 rm -f conftest.err "conftest.$ac_ext"
15026 fi
15027 echo "$as_me:15027: result: $ac_cv_header_pthread_h" >&5
15028 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15029 if test "$ac_cv_header_pthread_h" = yes; then
15030
15031 cat >>confdefs.h <<\EOF
15032 #define HAVE_PTHREADS_H 1
15033 EOF
15034
15035         for cf_lib_pthread in pthread c_r
15036         do
15037             echo "$as_me:15037: checking if we can link with the $cf_lib_pthread library" >&5
15038 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15039             cf_save_LIBS="$LIBS"
15040
15041 cf_add_libs="$LIBS"
15042 # reverse order
15043 cf_add_0lib=
15044 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15045 # filter duplicates
15046 for cf_add_1lib in $cf_add_0lib; do
15047         for cf_add_2lib in $cf_add_libs; do
15048                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15049                         cf_add_1lib=
15050                         break
15051                 fi
15052         done
15053         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15054 done
15055 LIBS="$cf_add_libs"
15056
15057             cat >"conftest.$ac_ext" <<_ACEOF
15058 #line 15058 "configure"
15059 #include "confdefs.h"
15060
15061 #include <pthread.h>
15062
15063 int
15064 main (void)
15065 {
15066
15067                 int rc = pthread_create(0,0,0,0);
15068                 int r2 = pthread_mutexattr_settype(0, 0);
15069
15070   ;
15071   return 0;
15072 }
15073 _ACEOF
15074 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15075 if { (eval echo "$as_me:15075: \"$ac_link\"") >&5
15076   (eval $ac_link) 2>&5
15077   ac_status=$?
15078   echo "$as_me:15078: \$? = $ac_status" >&5
15079   (exit "$ac_status"); } &&
15080          { ac_try='test -s "conftest$ac_exeext"'
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   with_pthread=yes
15087 else
15088   echo "$as_me: failed program was:" >&5
15089 cat "conftest.$ac_ext" >&5
15090 with_pthread=no
15091 fi
15092 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15093             LIBS="$cf_save_LIBS"
15094             echo "$as_me:15094: result: $with_pthread" >&5
15095 echo "${ECHO_T}$with_pthread" >&6
15096             test "$with_pthread" = yes && break
15097         done
15098
15099         if test "$with_pthread" = yes ; then
15100
15101 cf_add_libs="$LIBS"
15102 # reverse order
15103 cf_add_0lib=
15104 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15105 # filter duplicates
15106 for cf_add_1lib in $cf_add_0lib; do
15107         for cf_add_2lib in $cf_add_libs; do
15108                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15109                         cf_add_1lib=
15110                         break
15111                 fi
15112         done
15113         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15114 done
15115 LIBS="$cf_add_libs"
15116
15117 cat >>confdefs.h <<\EOF
15118 #define HAVE_LIBPTHREADS 1
15119 EOF
15120
15121         else
15122             { { echo "$as_me:15122: error: Cannot link with pthread library" >&5
15123 echo "$as_me: error: Cannot link with pthread library" >&2;}
15124    { (exit 1); exit 1; }; }
15125         fi
15126
15127 fi
15128
15129 fi
15130
15131 if test "x$with_pthread" != xno; then
15132         echo "$as_me:15132: checking for pthread_kill" >&5
15133 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15134 if test "${ac_cv_func_pthread_kill+set}" = set; then
15135   echo $ECHO_N "(cached) $ECHO_C" >&6
15136 else
15137   cat >"conftest.$ac_ext" <<_ACEOF
15138 #line 15138 "configure"
15139 #include "confdefs.h"
15140 #define pthread_kill autoconf_temporary
15141 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15142 #undef pthread_kill
15143
15144 #ifdef __cplusplus
15145 extern "C"
15146 #endif
15147
15148 /* We use char because int might match the return type of a gcc2
15149    builtin and then its argument prototype would still apply.  */
15150 char pthread_kill (void);
15151
15152 int
15153 main (void)
15154 {
15155
15156 /* The GNU C library defines stubs for functions which it implements
15157     to always fail with ENOSYS.  Some functions are actually named
15158     something starting with __ and the normal name is an alias.  */
15159 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15160 #error found stub for pthread_kill
15161 #endif
15162
15163         return pthread_kill ();
15164   ;
15165   return 0;
15166 }
15167 _ACEOF
15168 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15169 if { (eval echo "$as_me:15169: \"$ac_link\"") >&5
15170   (eval $ac_link) 2>&5
15171   ac_status=$?
15172   echo "$as_me:15172: \$? = $ac_status" >&5
15173   (exit "$ac_status"); } &&
15174          { ac_try='test -s "conftest$ac_exeext"'
15175   { (eval echo "$as_me:15175: \"$ac_try\"") >&5
15176   (eval $ac_try) 2>&5
15177   ac_status=$?
15178   echo "$as_me:15178: \$? = $ac_status" >&5
15179   (exit "$ac_status"); }; }; then
15180   ac_cv_func_pthread_kill=yes
15181 else
15182   echo "$as_me: failed program was:" >&5
15183 cat "conftest.$ac_ext" >&5
15184 ac_cv_func_pthread_kill=no
15185 fi
15186 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15187 fi
15188 echo "$as_me:15188: result: $ac_cv_func_pthread_kill" >&5
15189 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15190 if test "$ac_cv_func_pthread_kill" = yes; then
15191
15192                 echo "$as_me:15192: checking if you want to allow EINTR in wgetch with pthreads" >&5
15193 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15194
15195 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15196 if test "${enable_pthreads_eintr+set}" = set; then
15197   enableval="$enable_pthreads_eintr"
15198   use_pthreads_eintr=$enableval
15199 else
15200   use_pthreads_eintr=no
15201 fi;
15202                 echo "$as_me:15202: result: $use_pthreads_eintr" >&5
15203 echo "${ECHO_T}$use_pthreads_eintr" >&6
15204                 if test "x$use_pthreads_eintr" = xyes ; then
15205
15206 cat >>confdefs.h <<\EOF
15207 #define USE_PTHREADS_EINTR 1
15208 EOF
15209
15210                 fi
15211 fi
15212
15213         echo "$as_me:15213: checking if you want to use weak-symbols for pthreads" >&5
15214 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15215
15216 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15217 if test "${enable_weak_symbols+set}" = set; then
15218   enableval="$enable_weak_symbols"
15219   use_weak_symbols=$enableval
15220 else
15221   use_weak_symbols=no
15222 fi;
15223         echo "$as_me:15223: result: $use_weak_symbols" >&5
15224 echo "${ECHO_T}$use_weak_symbols" >&6
15225         if test "x$use_weak_symbols" = xyes ; then
15226
15227 echo "$as_me:15227: checking if $CC supports weak symbols" >&5
15228 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15229 if test "${cf_cv_weak_symbols+set}" = set; then
15230   echo $ECHO_N "(cached) $ECHO_C" >&6
15231 else
15232
15233 cat >"conftest.$ac_ext" <<_ACEOF
15234 #line 15234 "configure"
15235 #include "confdefs.h"
15236
15237 #include <stdio.h>
15238 int
15239 main (void)
15240 {
15241
15242 #if defined(__GNUC__)
15243 #  if defined __USE_ISOC99
15244 #    define _cat_pragma(exp)    _Pragma(#exp)
15245 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15246 #  else
15247 #    define _weak_pragma(exp)
15248 #  endif
15249 #  define _declare(name)        __extension__ extern __typeof__(name) name
15250 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15251 #endif
15252
15253 weak_symbol(fopen);
15254
15255   ;
15256   return 0;
15257 }
15258 _ACEOF
15259 rm -f "conftest.$ac_objext"
15260 if { (eval echo "$as_me:15260: \"$ac_compile\"") >&5
15261   (eval $ac_compile) 2>&5
15262   ac_status=$?
15263   echo "$as_me:15263: \$? = $ac_status" >&5
15264   (exit "$ac_status"); } &&
15265          { ac_try='test -s "conftest.$ac_objext"'
15266   { (eval echo "$as_me:15266: \"$ac_try\"") >&5
15267   (eval $ac_try) 2>&5
15268   ac_status=$?
15269   echo "$as_me:15269: \$? = $ac_status" >&5
15270   (exit "$ac_status"); }; }; then
15271   cf_cv_weak_symbols=yes
15272 else
15273   echo "$as_me: failed program was:" >&5
15274 cat "conftest.$ac_ext" >&5
15275 cf_cv_weak_symbols=no
15276 fi
15277 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15278
15279 fi
15280 echo "$as_me:15280: result: $cf_cv_weak_symbols" >&5
15281 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15282
15283         else
15284                 cf_cv_weak_symbols=no
15285         fi
15286
15287         if test "x$cf_cv_weak_symbols" = xyes ; then
15288
15289 cat >>confdefs.h <<\EOF
15290 #define USE_WEAK_SYMBOLS 1
15291 EOF
15292
15293         fi
15294 fi
15295
15296 PTHREAD=
15297 if test "x$with_pthread" = "xyes" ; then
15298
15299 cat >>confdefs.h <<\EOF
15300 #define USE_PTHREADS 1
15301 EOF
15302
15303         enable_reentrant=yes
15304         if test "x$cf_cv_weak_symbols" = xyes ; then
15305                 PTHREAD=-lpthread
15306
15307 cf_add_libs="$PRIVATE_LIBS"
15308 # reverse order
15309 cf_add_0lib=
15310 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15311 # filter duplicates
15312 for cf_add_1lib in $cf_add_0lib; do
15313         for cf_add_2lib in $cf_add_libs; do
15314                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15315                         cf_add_1lib=
15316                         break
15317                 fi
15318         done
15319         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15320 done
15321 PRIVATE_LIBS="$cf_add_libs"
15322
15323         fi
15324 fi
15325
15326 # Reentrant code has to be opaque; there's little advantage to making ncurses
15327 # opaque outside of that, so there is no --enable-opaque option.  We can use
15328 # this option without --with-pthreads, but this will be always set for
15329 # pthreads.
15330 echo "$as_me:15330: checking if you want reentrant code" >&5
15331 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15332
15333 # Check whether --enable-reentrant or --disable-reentrant was given.
15334 if test "${enable_reentrant+set}" = set; then
15335   enableval="$enable_reentrant"
15336   with_reentrant=$enableval
15337 else
15338   with_reentrant=no
15339 fi;
15340 echo "$as_me:15340: result: $with_reentrant" >&5
15341 echo "${ECHO_T}$with_reentrant" >&6
15342 if test "x$with_reentrant" = xyes ; then
15343         cf_cv_enable_reentrant=1
15344         cf_cv_enable_opaque="NCURSES_INTERNALS"
15345         NCURSES_SIZE_T=int
15346         if test "x$cf_cv_weak_symbols" = xyes ; then
15347
15348 # remove pthread library from $LIBS
15349 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15350
15351 cf_add_libs="$TEST_LIBS"
15352 # reverse order
15353 cf_add_0lib=
15354 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15355 # filter duplicates
15356 for cf_add_1lib in $cf_add_0lib; do
15357         for cf_add_2lib in $cf_add_libs; do
15358                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15359                         cf_add_1lib=
15360                         break
15361                 fi
15362         done
15363         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15364 done
15365 TEST_LIBS="$cf_add_libs"
15366
15367 cf_add_libs="$TEST_LIBS2"
15368 # reverse order
15369 cf_add_0lib=
15370 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15371 # filter duplicates
15372 for cf_add_1lib in $cf_add_0lib; do
15373         for cf_add_2lib in $cf_add_libs; do
15374                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15375                         cf_add_1lib=
15376                         break
15377                 fi
15378         done
15379         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15380 done
15381 TEST_LIBS2="$cf_add_libs"
15382
15383 cf_add_libs="$PRIVATE_LIBS"
15384 # reverse order
15385 cf_add_0lib=
15386 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15387 # filter duplicates
15388 for cf_add_1lib in $cf_add_0lib; do
15389         for cf_add_2lib in $cf_add_libs; do
15390                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15391                         cf_add_1lib=
15392                         break
15393                 fi
15394         done
15395         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15396 done
15397 PRIVATE_LIBS="$cf_add_libs"
15398
15399         else
15400                 # when not using weak symbols but with_reentrant,
15401                 # add 't' to the library suffix on all platforms
15402                 # except cygwin, where we only do that if ALSO
15403                 # compiling with full thread support.
15404                 case "$host" in
15405                 (*cygwin* | *msys*)
15406                         if test "$with_pthread" = "yes" ; then
15407                                 if test "x$disable_lib_suffixes" = "xno" ; then
15408                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15409                                 fi
15410                         fi ;;
15411                 (*)
15412                         if test "x$disable_lib_suffixes" = "xno" ; then
15413                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15414                         fi
15415                         ;;
15416                 esac
15417         fi
15418
15419 cat >>confdefs.h <<\EOF
15420 #define USE_REENTRANT 1
15421 EOF
15422
15423 if test "${with_abi_version+set}" != set; then
15424         case "$cf_cv_rel_version" in
15425         (5.*)
15426                 cf_cv_rel_version=6.0
15427                 cf_cv_abi_version=6
15428                 { echo "$as_me:15428: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15429 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15430                 ;;
15431         esac
15432 fi
15433
15434 else
15435         cf_cv_enable_reentrant=0
15436         cf_cv_enable_opaque="NCURSES_OPAQUE"
15437         NCURSES_SIZE_T=short
15438 fi
15439
15440 echo "$as_me:15440: checking if you want opaque curses-library structures" >&5
15441 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15442
15443 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15444 if test "${enable_opaque_curses+set}" = set; then
15445   enableval="$enable_opaque_curses"
15446   test "$enableval" != yes && enableval=no
15447         if test "$enableval" != "no" ; then
15448     enable_opaque_curses=yes
15449         else
15450
15451          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15452          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15453
15454         fi
15455 else
15456   enableval=no
15457
15458          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15459          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15460
15461 fi;
15462 echo "$as_me:15462: result: $enable_opaque_curses" >&5
15463 echo "${ECHO_T}$enable_opaque_curses" >&6
15464
15465 test "$cf_cv_enable_reentrant" = 1 && \
15466 test "$enable_opaque_curses" = no && \
15467 { { echo "$as_me:15467: error: reentrant configuration requires opaque library" >&5
15468 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15469    { (exit 1); exit 1; }; }
15470
15471 echo "$as_me:15471: checking if you want opaque form-library structures" >&5
15472 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15473
15474 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15475 if test "${enable_opaque_form+set}" = set; then
15476   enableval="$enable_opaque_form"
15477   enable_opaque_form=yes
15478 else
15479   enable_opaque_form=no
15480 fi;
15481 echo "$as_me:15481: result: $enable_opaque_form" >&5
15482 echo "${ECHO_T}$enable_opaque_form" >&6
15483
15484 echo "$as_me:15484: checking if you want opaque menu-library structures" >&5
15485 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15486
15487 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15488 if test "${enable_opaque_menu+set}" = set; then
15489   enableval="$enable_opaque_menu"
15490   enable_opaque_menu=yes
15491 else
15492   enable_opaque_menu=no
15493 fi;
15494 echo "$as_me:15494: result: $enable_opaque_menu" >&5
15495 echo "${ECHO_T}$enable_opaque_menu" >&6
15496
15497 echo "$as_me:15497: checking if you want opaque panel-library structures" >&5
15498 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15499
15500 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15501 if test "${enable_opaque_panel+set}" = set; then
15502   enableval="$enable_opaque_panel"
15503   enable_opaque_panel=yes
15504 else
15505   enable_opaque_panel=no
15506 fi;
15507 echo "$as_me:15507: result: $enable_opaque_panel" >&5
15508 echo "${ECHO_T}$enable_opaque_panel" >&6
15509
15510 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15511 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15512 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15513 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15514
15515 ### Allow using a different wrap-prefix
15516 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15517         echo "$as_me:15517: checking for prefix used to wrap public variables" >&5
15518 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15519
15520 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15521 if test "${with_wrap_prefix+set}" = set; then
15522   withval="$with_wrap_prefix"
15523   NCURSES_WRAP_PREFIX=$withval
15524 else
15525   NCURSES_WRAP_PREFIX=_nc_
15526 fi;
15527         echo "$as_me:15527: result: $NCURSES_WRAP_PREFIX" >&5
15528 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15529 else
15530         NCURSES_WRAP_PREFIX=_nc_
15531 fi
15532
15533 cat >>confdefs.h <<EOF
15534 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15535 EOF
15536
15537 ###############################################################################
15538 # These options are relatively safe to experiment with.
15539
15540 echo "$as_me:15540: checking if you want all development code" >&5
15541 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15542
15543 # Check whether --with-develop or --without-develop was given.
15544 if test "${with_develop+set}" = set; then
15545   withval="$with_develop"
15546   with_develop=$withval
15547 else
15548   with_develop=no
15549 fi;
15550 echo "$as_me:15550: result: $with_develop" >&5
15551 echo "${ECHO_T}$with_develop" >&6
15552
15553 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15554 echo "$as_me:15554: checking if you want hard-tabs code" >&5
15555 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15556
15557 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15558 if test "${enable_hard_tabs+set}" = set; then
15559   enableval="$enable_hard_tabs"
15560
15561 else
15562   enable_hard_tabs=$with_develop
15563 fi;
15564 echo "$as_me:15564: result: $enable_hard_tabs" >&5
15565 echo "${ECHO_T}$enable_hard_tabs" >&6
15566 test "x$enable_hard_tabs" = xyes &&
15567 cat >>confdefs.h <<\EOF
15568 #define USE_HARD_TABS 1
15569 EOF
15570
15571 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15572 echo "$as_me:15572: checking if you want limited support for xmc" >&5
15573 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15574
15575 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15576 if test "${enable_xmc_glitch+set}" = set; then
15577   enableval="$enable_xmc_glitch"
15578
15579 else
15580   enable_xmc_glitch=$with_develop
15581 fi;
15582 echo "$as_me:15582: result: $enable_xmc_glitch" >&5
15583 echo "${ECHO_T}$enable_xmc_glitch" >&6
15584 test "x$enable_xmc_glitch" = xyes &&
15585 cat >>confdefs.h <<\EOF
15586 #define USE_XMC_SUPPORT 1
15587 EOF
15588
15589 ###############################################################################
15590 # These are just experimental, probably should not be in a package:
15591
15592 echo "$as_me:15592: checking if you do not want to assume colors are white-on-black" >&5
15593 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15594
15595 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15596 if test "${enable_assumed_color+set}" = set; then
15597   enableval="$enable_assumed_color"
15598   with_assumed_color=$enableval
15599 else
15600   with_assumed_color=yes
15601 fi;
15602 echo "$as_me:15602: result: $with_assumed_color" >&5
15603 echo "${ECHO_T}$with_assumed_color" >&6
15604 test "x$with_assumed_color" = xyes &&
15605 cat >>confdefs.h <<\EOF
15606 #define USE_ASSUMED_COLOR 1
15607 EOF
15608
15609 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15610 echo "$as_me:15610: checking if you want hashmap scrolling-optimization code" >&5
15611 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15612
15613 # Check whether --enable-hashmap or --disable-hashmap was given.
15614 if test "${enable_hashmap+set}" = set; then
15615   enableval="$enable_hashmap"
15616   with_hashmap=$enableval
15617 else
15618   with_hashmap=yes
15619 fi;
15620 echo "$as_me:15620: result: $with_hashmap" >&5
15621 echo "${ECHO_T}$with_hashmap" >&6
15622 test "x$with_hashmap" = xyes &&
15623 cat >>confdefs.h <<\EOF
15624 #define USE_HASHMAP 1
15625 EOF
15626
15627 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15628 echo "$as_me:15628: checking if you want colorfgbg code" >&5
15629 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15630
15631 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15632 if test "${enable_colorfgbg+set}" = set; then
15633   enableval="$enable_colorfgbg"
15634   with_colorfgbg=$enableval
15635 else
15636   with_colorfgbg=no
15637 fi;
15638 echo "$as_me:15638: result: $with_colorfgbg" >&5
15639 echo "${ECHO_T}$with_colorfgbg" >&6
15640 test "x$with_colorfgbg" = xyes &&
15641 cat >>confdefs.h <<\EOF
15642 #define USE_COLORFGBG 1
15643 EOF
15644
15645 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15646 echo "$as_me:15646: checking if you want to use gcc -fvisibility option" >&5
15647 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15648
15649 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15650 if test "${enable_fvisibility+set}" = set; then
15651   enableval="$enable_fvisibility"
15652   cf_with_fvisibility=$enableval
15653 else
15654   cf_with_fvisibility=no
15655 fi;
15656 echo "$as_me:15656: result: $cf_with_fvisibility" >&5
15657 echo "${ECHO_T}$cf_with_fvisibility" >&6
15658
15659 NCURSES_IMPEXP=
15660 NCURSES_CXX_IMPEXP=
15661 if test "x$cf_with_fvisibility" = xyes; then
15662
15663 echo "$as_me:15663: checking if $CC -fvisibility=hidden option works" >&5
15664 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15665 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15666   echo $ECHO_N "(cached) $ECHO_C" >&6
15667 else
15668
15669     cf_save_cflags="$CFLAGS"
15670     CFLAGS="$CFLAGS -fvisibility=hidden"
15671     cat >"conftest.$ac_ext" <<_ACEOF
15672 #line 15672 "configure"
15673 #include "confdefs.h"
15674
15675 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15676
15677 int
15678 main (void)
15679 {
15680
15681         if (somefunc()) return 1;
15682
15683   ;
15684   return 0;
15685 }
15686 _ACEOF
15687 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15688 if { (eval echo "$as_me:15688: \"$ac_link\"") >&5
15689   (eval $ac_link) 2>&5
15690   ac_status=$?
15691   echo "$as_me:15691: \$? = $ac_status" >&5
15692   (exit "$ac_status"); } &&
15693          { ac_try='test -s "conftest$ac_exeext"'
15694   { (eval echo "$as_me:15694: \"$ac_try\"") >&5
15695   (eval $ac_try) 2>&5
15696   ac_status=$?
15697   echo "$as_me:15697: \$? = $ac_status" >&5
15698   (exit "$ac_status"); }; }; then
15699   cf_cv_fvisibility_hidden=yes
15700 else
15701   echo "$as_me: failed program was:" >&5
15702 cat "conftest.$ac_ext" >&5
15703 cf_cv_fvisibility_hidden=no
15704 fi
15705 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15706     CFLAGS=$cf_save_cflags
15707
15708 fi
15709 echo "$as_me:15709: result: $cf_cv_fvisibility_hidden" >&5
15710 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15711
15712         if test "x$cf_cv_fvisibility_hidden" = xyes
15713         then
15714
15715 cf_fix_cppflags=no
15716 cf_new_cflags=
15717 cf_new_cppflags=
15718 cf_new_extra_cppflags=
15719
15720 for cf_add_cflags in -fvisibility=hidden
15721 do
15722 case "$cf_fix_cppflags" in
15723 (no)
15724         case "$cf_add_cflags" in
15725         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15726                 case "$cf_add_cflags" in
15727                 (-D*)
15728                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15729
15730                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15731                                 && test -z "${cf_tst_cflags}" \
15732                                 && cf_fix_cppflags=yes
15733
15734                         if test "$cf_fix_cppflags" = yes ; then
15735
15736         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15737         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15738
15739                                 continue
15740                         elif test "${cf_tst_cflags}" = "\"'" ; then
15741
15742         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15743         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15744
15745                                 continue
15746                         fi
15747                         ;;
15748                 esac
15749                 case "$CPPFLAGS" in
15750                 (*$cf_add_cflags)
15751                         ;;
15752                 (*)
15753                         case "$cf_add_cflags" in
15754                         (-D*)
15755                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15756
15757 CPPFLAGS=`echo "$CPPFLAGS" | \
15758         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15759                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15760
15761                                 ;;
15762                         esac
15763
15764         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15765         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15766
15767                         ;;
15768                 esac
15769                 ;;
15770         (*)
15771
15772         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15773         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15774
15775                 ;;
15776         esac
15777         ;;
15778 (yes)
15779
15780         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15781         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15782
15783         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15784
15785         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15786                 && test -z "${cf_tst_cflags}" \
15787                 && cf_fix_cppflags=no
15788         ;;
15789 esac
15790 done
15791
15792 if test -n "$cf_new_cflags" ; then
15793
15794         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15795         CFLAGS="${CFLAGS}$cf_new_cflags"
15796
15797 fi
15798
15799 if test -n "$cf_new_cppflags" ; then
15800
15801         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15802         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15803
15804 fi
15805
15806 if test -n "$cf_new_extra_cppflags" ; then
15807
15808         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15809         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15810
15811 fi
15812
15813                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15814         fi
15815         if test -n "$CXX"
15816         then
15817                 ac_ext=cc
15818 ac_cpp='$CXXCPP $CPPFLAGS'
15819 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
15820 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
15821 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15822 ac_main_return="return"
15823
15824 echo "$as_me:15824: checking if $CXX -fvisibility=hidden option works" >&5
15825 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15826 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15827   echo $ECHO_N "(cached) $ECHO_C" >&6
15828 else
15829
15830     cf_save_cflags="$CXXFLAGS"
15831     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15832     cat >"conftest.$ac_ext" <<_ACEOF
15833 #line 15833 "configure"
15834 #include "confdefs.h"
15835
15836 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15837
15838 int
15839 main (void)
15840 {
15841
15842         if (somefunc()) return 1;
15843
15844   ;
15845   return 0;
15846 }
15847 _ACEOF
15848 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15849 if { (eval echo "$as_me:15849: \"$ac_link\"") >&5
15850   (eval $ac_link) 2>&5
15851   ac_status=$?
15852   echo "$as_me:15852: \$? = $ac_status" >&5
15853   (exit "$ac_status"); } &&
15854          { ac_try='test -s "conftest$ac_exeext"'
15855   { (eval echo "$as_me:15855: \"$ac_try\"") >&5
15856   (eval $ac_try) 2>&5
15857   ac_status=$?
15858   echo "$as_me:15858: \$? = $ac_status" >&5
15859   (exit "$ac_status"); }; }; then
15860   cf_cv_fvisibility_hidden2=yes
15861 else
15862   echo "$as_me: failed program was:" >&5
15863 cat "conftest.$ac_ext" >&5
15864 cf_cv_fvisibility_hidden2=no
15865 fi
15866 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15867     CXXFLAGS=$cf_save_cflags
15868
15869 fi
15870 echo "$as_me:15870: result: $cf_cv_fvisibility_hidden2" >&5
15871 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15872
15873                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15874                 then
15875
15876 cf_save_CXXFLAGS="$CFLAGS"
15877 CFLAGS="$CXXFLAGS"
15878
15879 cf_fix_cppflags=no
15880 cf_new_cflags=
15881 cf_new_cppflags=
15882 cf_new_extra_cppflags=
15883
15884 for cf_add_cflags in -fvisibility=hidden
15885 do
15886 case "$cf_fix_cppflags" in
15887 (no)
15888         case "$cf_add_cflags" in
15889         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15890                 case "$cf_add_cflags" in
15891                 (-D*)
15892                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15893
15894                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15895                                 && test -z "${cf_tst_cflags}" \
15896                                 && cf_fix_cppflags=yes
15897
15898                         if test "$cf_fix_cppflags" = yes ; then
15899
15900         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15901         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15902
15903                                 continue
15904                         elif test "${cf_tst_cflags}" = "\"'" ; then
15905
15906         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15907         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15908
15909                                 continue
15910                         fi
15911                         ;;
15912                 esac
15913                 case "$CPPFLAGS" in
15914                 (*$cf_add_cflags)
15915                         ;;
15916                 (*)
15917                         case "$cf_add_cflags" in
15918                         (-D*)
15919                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15920
15921 CPPFLAGS=`echo "$CPPFLAGS" | \
15922         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15923                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15924
15925                                 ;;
15926                         esac
15927
15928         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15929         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15930
15931                         ;;
15932                 esac
15933                 ;;
15934         (*)
15935
15936         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15937         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15938
15939                 ;;
15940         esac
15941         ;;
15942 (yes)
15943
15944         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15945         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15946
15947         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15948
15949         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15950                 && test -z "${cf_tst_cflags}" \
15951                 && cf_fix_cppflags=no
15952         ;;
15953 esac
15954 done
15955
15956 if test -n "$cf_new_cflags" ; then
15957
15958         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15959         CFLAGS="${CFLAGS}$cf_new_cflags"
15960
15961 fi
15962
15963 if test -n "$cf_new_cppflags" ; then
15964
15965         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15966         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15967
15968 fi
15969
15970 if test -n "$cf_new_extra_cppflags" ; then
15971
15972         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15973         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15974
15975 fi
15976
15977 CXXFLAGS="$CFLAGS"
15978 CFLAGS="$cf_save_CXXFLAGS"
15979
15980                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
15981                 fi
15982                 ac_ext=c
15983 ac_cpp='$CPP $CPPFLAGS'
15984 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
15985 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
15986 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15987 ac_main_return="return"
15988
15989         fi
15990 fi
15991
15992 ###   use option --enable-interop to turn on use of bindings used for interop
15993 echo "$as_me:15993: checking if you want interop bindings" >&5
15994 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15995
15996 # Check whether --enable-interop or --disable-interop was given.
15997 if test "${enable_interop+set}" = set; then
15998   enableval="$enable_interop"
15999   with_exp_interop=$enableval
16000 else
16001   with_exp_interop=$cf_dft_interop
16002 fi;
16003 echo "$as_me:16003: result: $with_exp_interop" >&5
16004 echo "${ECHO_T}$with_exp_interop" >&6
16005
16006 NCURSES_INTEROP_FUNCS=0
16007 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16008
16009 echo "$as_me:16009: checking if you want experimental safe-sprintf code" >&5
16010 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16011
16012 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16013 if test "${enable_safe_sprintf+set}" = set; then
16014   enableval="$enable_safe_sprintf"
16015   with_safe_sprintf=$enableval
16016 else
16017   with_safe_sprintf=no
16018 fi;
16019 echo "$as_me:16019: result: $with_safe_sprintf" >&5
16020 echo "${ECHO_T}$with_safe_sprintf" >&6
16021
16022 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16023 # when hashmap is used scroll hints are useless
16024 if test "$with_hashmap" = no ; then
16025 echo "$as_me:16025: checking if you want to experiment without scrolling-hints code" >&5
16026 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16027
16028 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16029 if test "${enable_scroll_hints+set}" = set; then
16030   enableval="$enable_scroll_hints"
16031   with_scroll_hints=$enableval
16032 else
16033   with_scroll_hints=yes
16034 fi;
16035 echo "$as_me:16035: result: $with_scroll_hints" >&5
16036 echo "${ECHO_T}$with_scroll_hints" >&6
16037 test "x$with_scroll_hints" = xyes &&
16038 cat >>confdefs.h <<\EOF
16039 #define USE_SCROLL_HINTS 1
16040 EOF
16041
16042 fi
16043
16044 echo "$as_me:16044: checking if you want wgetch-events code" >&5
16045 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16046
16047 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16048 if test "${enable_wgetch_events+set}" = set; then
16049   enableval="$enable_wgetch_events"
16050   with_wgetch_events=$enableval
16051 else
16052   with_wgetch_events=no
16053 fi;
16054 echo "$as_me:16054: result: $with_wgetch_events" >&5
16055 echo "${ECHO_T}$with_wgetch_events" >&6
16056 if test "x$with_wgetch_events" = xyes ; then
16057
16058 cat >>confdefs.h <<\EOF
16059 #define NCURSES_WGETCH_EVENTS 1
16060 EOF
16061
16062         NCURSES_WGETCH_EVENTS=1
16063 else
16064         NCURSES_WGETCH_EVENTS=0
16065 fi
16066
16067 case "$cf_cv_system_name" in
16068 (*mingw32*|*mingw64*|*-msvc*)
16069         echo "$as_me:16069: checking if you want experimental-Windows driver" >&5
16070 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16071
16072 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16073 if test "${enable_exp_win32+set}" = set; then
16074   enableval="$enable_exp_win32"
16075   with_exp_win32=$enableval
16076 else
16077   with_exp_win32=no
16078 fi;
16079         echo "$as_me:16079: result: $with_exp_win32" >&5
16080 echo "${ECHO_T}$with_exp_win32" >&6
16081         if test "x$with_exp_win32" = xyes
16082         then
16083
16084 cat >>confdefs.h <<\EOF
16085 #define EXP_WIN32_DRIVER 1
16086 EOF
16087
16088                 EXP_WIN32_DRIVER=1
16089                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16090         else
16091                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16092                 EXP_WIN32_DRIVER=0
16093         fi
16094         ;;
16095 (*)
16096         EXP_WIN32_DRIVER=0
16097         INTERNALS_HDR=
16098         ;;
16099 esac
16100
16101 ###############################################################################
16102
16103 ###     use option --disable-echo to suppress full display compiling commands
16104
16105 echo "$as_me:16105: checking if you want to see long compiling messages" >&5
16106 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16107
16108 # Check whether --enable-echo or --disable-echo was given.
16109 if test "${enable_echo+set}" = set; then
16110   enableval="$enable_echo"
16111   test "$enableval" != no && enableval=yes
16112         if test "$enableval" != "yes" ; then
16113
16114         ECHO_LT='--silent'
16115         ECHO_LD='@echo linking $@;'
16116         RULE_CC='@echo compiling $<'
16117         SHOW_CC='@echo compiling $@'
16118         ECHO_CC='@'
16119
16120         else
16121
16122         ECHO_LT=''
16123         ECHO_LD=''
16124         RULE_CC=''
16125         SHOW_CC=''
16126         ECHO_CC=''
16127
16128         fi
16129 else
16130   enableval=yes
16131
16132         ECHO_LT=''
16133         ECHO_LD=''
16134         RULE_CC=''
16135         SHOW_CC=''
16136         ECHO_CC=''
16137
16138 fi;
16139 echo "$as_me:16139: result: $enableval" >&5
16140 echo "${ECHO_T}$enableval" >&6
16141
16142 if test "x$enable_echo" = xyes; then
16143         ECHO_LINK=
16144 else
16145         ECHO_LINK='@ echo linking $@ ... ;'
16146         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16147         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16148 fi
16149
16150 # --disable-stripping is used for debugging
16151
16152 echo "$as_me:16152: checking if you want to install stripped executables" >&5
16153 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16154
16155 # Check whether --enable-stripping or --disable-stripping was given.
16156 if test "${enable_stripping+set}" = set; then
16157   enableval="$enable_stripping"
16158   test "$enableval" != no && enableval=yes
16159         if test "$enableval" != "yes" ; then
16160     enable_stripping=no
16161         else
16162                 enable_stripping=yes
16163         fi
16164 else
16165   enableval=yes
16166         enable_stripping=yes
16167
16168 fi;
16169 echo "$as_me:16169: result: $enable_stripping" >&5
16170 echo "${ECHO_T}$enable_stripping" >&6
16171
16172 if test "$enable_stripping" = yes
16173 then
16174         INSTALL_OPT_S="-s"
16175 else
16176         INSTALL_OPT_S=
16177 fi
16178
16179 : "${INSTALL:=install}"
16180 echo "$as_me:16180: checking if install accepts -p option" >&5
16181 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16182 if test "${cf_cv_install_p+set}" = set; then
16183   echo $ECHO_N "(cached) $ECHO_C" >&6
16184 else
16185
16186         rm -rf ./conftest*
16187         date >conftest.in
16188         mkdir conftest.out
16189         sleep 3
16190         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16191         then
16192                 if test -f conftest.out/conftest.in
16193                 then
16194                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16195                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16196                         if test -s conftest.err
16197                         then
16198                                 cf_cv_install_p=no
16199                         else
16200                                 cf_cv_install_p=yes
16201                         fi
16202                 else
16203                         cf_cv_install_p=no
16204                 fi
16205         else
16206                 cf_cv_install_p=no
16207         fi
16208         rm -rf ./conftest*
16209
16210 fi
16211 echo "$as_me:16211: result: $cf_cv_install_p" >&5
16212 echo "${ECHO_T}$cf_cv_install_p" >&6
16213
16214 echo "$as_me:16214: checking if install needs to be told about ownership" >&5
16215 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16216 case `$ac_config_guess` in
16217 (*minix)
16218         with_install_o=yes
16219         ;;
16220 (*)
16221         with_install_o=no
16222         ;;
16223 esac
16224
16225 echo "$as_me:16225: result: $with_install_o" >&5
16226 echo "${ECHO_T}$with_install_o" >&6
16227 if test "x$with_install_o" = xyes
16228 then
16229         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'`"
16230 else
16231         INSTALL_OPT_O=
16232 fi
16233
16234 # If we're avoiding relinking of shared libraries during install, that is to
16235 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16236 # the install program has "-p" (for preserving timestamps).
16237 cf_cv_do_reranlib=yes
16238 if test "x$cf_cv_install_p" = xyes
16239 then
16240         if test "x$cf_cv_do_relink" != xyes
16241         then
16242                 cf_cv_do_reranlib=no
16243                 INSTALL_OPT_P="-p"
16244                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16245         fi
16246 fi
16247
16248 ###     use option --enable-warnings to turn on all gcc warnings
16249
16250 echo "$as_me:16250: checking if you want to use C11 _Noreturn feature" >&5
16251 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16252
16253 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16254 if test "${enable_stdnoreturn+set}" = set; then
16255   enableval="$enable_stdnoreturn"
16256   test "$enableval" != yes && enableval=no
16257         if test "$enableval" != "no" ; then
16258     enable_stdnoreturn=yes
16259         else
16260                 enable_stdnoreturn=no
16261         fi
16262 else
16263   enableval=no
16264         enable_stdnoreturn=no
16265
16266 fi;
16267 echo "$as_me:16267: result: $enable_stdnoreturn" >&5
16268 echo "${ECHO_T}$enable_stdnoreturn" >&6
16269
16270 if test $enable_stdnoreturn = yes; then
16271 echo "$as_me:16271: checking for C11 _Noreturn feature" >&5
16272 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16273 if test "${cf_cv_c11_noreturn+set}" = set; then
16274   echo $ECHO_N "(cached) $ECHO_C" >&6
16275 else
16276   cat >"conftest.$ac_ext" <<_ACEOF
16277 #line 16277 "configure"
16278 #include "confdefs.h"
16279
16280 #include <stdio.h>
16281 #include <stdlib.h>
16282 #include <stdnoreturn.h>
16283 static _Noreturn void giveup(void) { exit(0); }
16284
16285 int
16286 main (void)
16287 {
16288 if (feof(stdin)) giveup()
16289   ;
16290   return 0;
16291 }
16292 _ACEOF
16293 rm -f "conftest.$ac_objext"
16294 if { (eval echo "$as_me:16294: \"$ac_compile\"") >&5
16295   (eval $ac_compile) 2>&5
16296   ac_status=$?
16297   echo "$as_me:16297: \$? = $ac_status" >&5
16298   (exit "$ac_status"); } &&
16299          { ac_try='test -s "conftest.$ac_objext"'
16300   { (eval echo "$as_me:16300: \"$ac_try\"") >&5
16301   (eval $ac_try) 2>&5
16302   ac_status=$?
16303   echo "$as_me:16303: \$? = $ac_status" >&5
16304   (exit "$ac_status"); }; }; then
16305   cf_cv_c11_noreturn=yes
16306 else
16307   echo "$as_me: failed program was:" >&5
16308 cat "conftest.$ac_ext" >&5
16309 cf_cv_c11_noreturn=no
16310 fi
16311 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16312
16313 fi
16314 echo "$as_me:16314: result: $cf_cv_c11_noreturn" >&5
16315 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16316 else
16317         cf_cv_c11_noreturn=no,
16318 fi
16319
16320 if test "$cf_cv_c11_noreturn" = yes; then
16321
16322 cat >>confdefs.h <<\EOF
16323 #define HAVE_STDNORETURN_H 1
16324 EOF
16325
16326 cat >>confdefs.h <<EOF
16327 #define STDC_NORETURN _Noreturn
16328 EOF
16329
16330         HAVE_STDNORETURN_H=1
16331 else
16332         HAVE_STDNORETURN_H=0
16333 fi
16334
16335 if test "$GCC" = yes || test "$GXX" = yes
16336 then
16337
16338 if test "$GCC" = yes || test "$GXX" = yes
16339 then
16340         case $CFLAGS in
16341         (*-Werror=*)
16342                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16343
16344 echo "${as_me:-configure}:16344: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16345
16346                 cf_temp_flags=
16347                 for cf_temp_scan in $CFLAGS
16348                 do
16349                         case "x$cf_temp_scan" in
16350                         (x-Werror=*)
16351
16352         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16353         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16354
16355                                 ;;
16356                         (*)
16357
16358         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16359         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16360
16361                                 ;;
16362                         esac
16363                 done
16364                 CFLAGS="$cf_temp_flags"
16365                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16366
16367 echo "${as_me:-configure}:16367: testing ... fixed $CFLAGS ..." 1>&5
16368
16369                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16370
16371 echo "${as_me:-configure}:16371: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16372
16373                 ;;
16374         esac
16375 fi
16376
16377 if test "$GCC" = yes || test "$GXX" = yes
16378 then
16379         case $CPPFLAGS in
16380         (*-Werror=*)
16381                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16382
16383 echo "${as_me:-configure}:16383: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16384
16385                 cf_temp_flags=
16386                 for cf_temp_scan in $CPPFLAGS
16387                 do
16388                         case "x$cf_temp_scan" in
16389                         (x-Werror=*)
16390
16391         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16392         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16393
16394                                 ;;
16395                         (*)
16396
16397         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16398         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16399
16400                                 ;;
16401                         esac
16402                 done
16403                 CPPFLAGS="$cf_temp_flags"
16404                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16405
16406 echo "${as_me:-configure}:16406: testing ... fixed $CPPFLAGS ..." 1>&5
16407
16408                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16409
16410 echo "${as_me:-configure}:16410: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16411
16412                 ;;
16413         esac
16414 fi
16415
16416 if test "$GCC" = yes || test "$GXX" = yes
16417 then
16418         case $LDFLAGS in
16419         (*-Werror=*)
16420                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16421
16422 echo "${as_me:-configure}:16422: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16423
16424                 cf_temp_flags=
16425                 for cf_temp_scan in $LDFLAGS
16426                 do
16427                         case "x$cf_temp_scan" in
16428                         (x-Werror=*)
16429
16430         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16431         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16432
16433                                 ;;
16434                         (*)
16435
16436         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16437         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16438
16439                                 ;;
16440                         esac
16441                 done
16442                 LDFLAGS="$cf_temp_flags"
16443                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16444
16445 echo "${as_me:-configure}:16445: testing ... fixed $LDFLAGS ..." 1>&5
16446
16447                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16448
16449 echo "${as_me:-configure}:16449: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16450
16451                 ;;
16452         esac
16453 fi
16454
16455 echo "$as_me:16455: checking if you want to turn on gcc warnings" >&5
16456 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16457
16458 # Check whether --enable-warnings or --disable-warnings was given.
16459 if test "${enable_warnings+set}" = set; then
16460   enableval="$enable_warnings"
16461   test "$enableval" != yes && enableval=no
16462         if test "$enableval" != "no" ; then
16463     enable_warnings=yes
16464         else
16465                 enable_warnings=no
16466         fi
16467 else
16468   enableval=no
16469         enable_warnings=no
16470
16471 fi;
16472 echo "$as_me:16472: result: $enable_warnings" >&5
16473 echo "${ECHO_T}$enable_warnings" >&6
16474 if test "$enable_warnings" = "yes"
16475 then
16476
16477 if test "x$have_x" = xyes; then
16478
16479 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16480 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16481 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16482 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16483 for cf_X_CFLAGS in $X_CFLAGS
16484 do
16485         case "x$cf_X_CFLAGS" in
16486         x-[IUD]*)
16487                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16488                 ;;
16489         *)
16490                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16491                 ;;
16492         esac
16493 done
16494
16495 cat >"conftest.$ac_ext" <<_ACEOF
16496 #line 16496 "configure"
16497 #include "confdefs.h"
16498
16499 #include <stdlib.h>
16500 #include <X11/Intrinsic.h>
16501
16502 int
16503 main (void)
16504 {
16505 String foo = malloc(1); (void)foo
16506   ;
16507   return 0;
16508 }
16509 _ACEOF
16510 rm -f "conftest.$ac_objext"
16511 if { (eval echo "$as_me:16511: \"$ac_compile\"") >&5
16512   (eval $ac_compile) 2>&5
16513   ac_status=$?
16514   echo "$as_me:16514: \$? = $ac_status" >&5
16515   (exit "$ac_status"); } &&
16516          { ac_try='test -s "conftest.$ac_objext"'
16517   { (eval echo "$as_me:16517: \"$ac_try\"") >&5
16518   (eval $ac_try) 2>&5
16519   ac_status=$?
16520   echo "$as_me:16520: \$? = $ac_status" >&5
16521   (exit "$ac_status"); }; }; then
16522
16523 echo "$as_me:16523: checking for X11/Xt const-feature" >&5
16524 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16525 if test "${cf_cv_const_x_string+set}" = set; then
16526   echo $ECHO_N "(cached) $ECHO_C" >&6
16527 else
16528
16529         cat >"conftest.$ac_ext" <<_ACEOF
16530 #line 16530 "configure"
16531 #include "confdefs.h"
16532
16533 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16534 #undef  XTSTRINGDEFINES /* X11R5 and later */
16535 #include <stdlib.h>
16536 #include <X11/Intrinsic.h>
16537
16538 int
16539 main (void)
16540 {
16541 String foo = malloc(1); *foo = 0
16542   ;
16543   return 0;
16544 }
16545 _ACEOF
16546 rm -f "conftest.$ac_objext"
16547 if { (eval echo "$as_me:16547: \"$ac_compile\"") >&5
16548   (eval $ac_compile) 2>&5
16549   ac_status=$?
16550   echo "$as_me:16550: \$? = $ac_status" >&5
16551   (exit "$ac_status"); } &&
16552          { ac_try='test -s "conftest.$ac_objext"'
16553   { (eval echo "$as_me:16553: \"$ac_try\"") >&5
16554   (eval $ac_try) 2>&5
16555   ac_status=$?
16556   echo "$as_me:16556: \$? = $ac_status" >&5
16557   (exit "$ac_status"); }; }; then
16558
16559                         cf_cv_const_x_string=no
16560
16561 else
16562   echo "$as_me: failed program was:" >&5
16563 cat "conftest.$ac_ext" >&5
16564
16565                         cf_cv_const_x_string=yes
16566
16567 fi
16568 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16569
16570 fi
16571 echo "$as_me:16571: result: $cf_cv_const_x_string" >&5
16572 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16573
16574 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16575 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16576 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16577
16578 case "$cf_cv_const_x_string" in
16579 (no)
16580
16581         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16582         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16583
16584         ;;
16585 (*)
16586
16587         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16588         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16589
16590         ;;
16591 esac
16592
16593 else
16594   echo "$as_me: failed program was:" >&5
16595 cat "conftest.$ac_ext" >&5
16596 fi
16597 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16598  fi
16599 cat > "conftest.$ac_ext" <<EOF
16600 #line 16600 "${as_me:-configure}"
16601 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16602 EOF
16603 if test "$INTEL_COMPILER" = yes
16604 then
16605 # The "-wdXXX" options suppress warnings:
16606 # remark #1419: external declaration in primary source file
16607 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16608 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16609 # remark #193: zero used for undefined preprocessing identifier
16610 # remark #593: variable "curs_sb_left_arrow" was set but never used
16611 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16612 # remark #869: parameter "tw" was never referenced
16613 # remark #981: operands are evaluated in unspecified order
16614 # warning #279: controlling expression is constant
16615
16616         { echo "$as_me:16616: checking for $CC warning options..." >&5
16617 echo "$as_me: checking for $CC warning options..." >&6;}
16618         cf_save_CFLAGS="$CFLAGS"
16619         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16620         for cf_opt in \
16621                 wd1419 \
16622                 wd1683 \
16623                 wd1684 \
16624                 wd193 \
16625                 wd593 \
16626                 wd279 \
16627                 wd810 \
16628                 wd869 \
16629                 wd981
16630         do
16631                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16632                 if { (eval echo "$as_me:16632: \"$ac_compile\"") >&5
16633   (eval $ac_compile) 2>&5
16634   ac_status=$?
16635   echo "$as_me:16635: \$? = $ac_status" >&5
16636   (exit "$ac_status"); }; then
16637                         test -n "$verbose" && echo "$as_me:16637: result: ... -$cf_opt" >&5
16638 echo "${ECHO_T}... -$cf_opt" >&6
16639                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16640                 fi
16641         done
16642         CFLAGS="$cf_save_CFLAGS"
16643 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16644 then
16645         { echo "$as_me:16645: checking for $CC warning options..." >&5
16646 echo "$as_me: checking for $CC warning options..." >&6;}
16647         cf_save_CFLAGS="$CFLAGS"
16648         cf_warn_CONST=""
16649         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16650         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16651         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16652         for cf_opt in W Wall \
16653                 Wbad-function-cast \
16654                 Wcast-align \
16655                 Wcast-qual \
16656                 Wdeclaration-after-statement \
16657                 Wextra \
16658                 Winline \
16659                 Wmissing-declarations \
16660                 Wmissing-prototypes \
16661                 Wnested-externs \
16662                 Wpointer-arith \
16663                 Wshadow \
16664                 Wstrict-prototypes \
16665                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16666         do
16667                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16668                 if { (eval echo "$as_me:16668: \"$ac_compile\"") >&5
16669   (eval $ac_compile) 2>&5
16670   ac_status=$?
16671   echo "$as_me:16671: \$? = $ac_status" >&5
16672   (exit "$ac_status"); }; then
16673                         test -n "$verbose" && echo "$as_me:16673: result: ... -$cf_opt" >&5
16674 echo "${ECHO_T}... -$cf_opt" >&6
16675                         case "$cf_opt" in
16676                         (Winline)
16677                                 case "$GCC_VERSION" in
16678                                 ([34].*)
16679                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16680
16681 echo "${as_me:-configure}:16681: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16682
16683                                         continue;;
16684                                 esac
16685                                 ;;
16686                         (Wpointer-arith)
16687                                 case "$GCC_VERSION" in
16688                                 ([12].*)
16689                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16690
16691 echo "${as_me:-configure}:16691: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16692
16693                                         continue;;
16694                                 esac
16695                                 ;;
16696                         esac
16697                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16698                 fi
16699         done
16700         CFLAGS="$cf_save_CFLAGS"
16701 fi
16702 rm -rf ./conftest*
16703
16704 fi
16705
16706 if test "$GCC" = yes || test "$GXX" = yes
16707 then
16708 cat > conftest.i <<EOF
16709 #ifndef GCC_PRINTF
16710 #define GCC_PRINTF 0
16711 #endif
16712 #ifndef GCC_SCANF
16713 #define GCC_SCANF 0
16714 #endif
16715 #ifndef GCC_NORETURN
16716 #define GCC_NORETURN /* nothing */
16717 #endif
16718 #ifndef GCC_UNUSED
16719 #define GCC_UNUSED /* nothing */
16720 #endif
16721 EOF
16722 if test "$GCC" = yes
16723 then
16724         { echo "$as_me:16724: checking for $CC __attribute__ directives..." >&5
16725 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16726 cat > "conftest.$ac_ext" <<EOF
16727 #line 16727 "${as_me:-configure}"
16728 #include "confdefs.h"
16729 #include "conftest.h"
16730 #include "conftest.i"
16731 #if     GCC_PRINTF
16732 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16733 #else
16734 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16735 #endif
16736 #if     GCC_SCANF
16737 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16738 #else
16739 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16740 #endif
16741 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16742 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
16743 extern GCC_NORETURN void foo(void);
16744 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16745 EOF
16746         cf_printf_attribute=no
16747         cf_scanf_attribute=no
16748         for cf_attribute in scanf printf unused noreturn
16749         do
16750
16751 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16752
16753                 cf_directive="__attribute__(($cf_attribute))"
16754                 echo "checking for $CC $cf_directive" 1>&5
16755
16756                 case "$cf_attribute" in
16757                 (printf)
16758                         cf_printf_attribute=yes
16759                         cat >conftest.h <<EOF
16760 #define GCC_$cf_ATTRIBUTE 1
16761 EOF
16762                         ;;
16763                 (scanf)
16764                         cf_scanf_attribute=yes
16765                         cat >conftest.h <<EOF
16766 #define GCC_$cf_ATTRIBUTE 1
16767 EOF
16768                         ;;
16769                 (*)
16770                         cat >conftest.h <<EOF
16771 #define GCC_$cf_ATTRIBUTE $cf_directive
16772 EOF
16773                         ;;
16774                 esac
16775
16776                 if { (eval echo "$as_me:16776: \"$ac_compile\"") >&5
16777   (eval $ac_compile) 2>&5
16778   ac_status=$?
16779   echo "$as_me:16779: \$? = $ac_status" >&5
16780   (exit "$ac_status"); }; then
16781                         test -n "$verbose" && echo "$as_me:16781: result: ... $cf_attribute" >&5
16782 echo "${ECHO_T}... $cf_attribute" >&6
16783                         cat conftest.h >>confdefs.h
16784                         case "$cf_attribute" in
16785                         (noreturn)
16786
16787 cat >>confdefs.h <<EOF
16788 #define GCC_NORETURN $cf_directive
16789 EOF
16790
16791                                 ;;
16792                         (printf)
16793                                 cf_value='/* nothing */'
16794                                 if test "$cf_printf_attribute" != no ; then
16795                                         cf_value='__attribute__((format(printf,fmt,var)))'
16796
16797 cat >>confdefs.h <<\EOF
16798 #define GCC_PRINTF 1
16799 EOF
16800
16801                                 fi
16802
16803 cat >>confdefs.h <<EOF
16804 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16805 EOF
16806
16807                                 ;;
16808                         (scanf)
16809                                 cf_value='/* nothing */'
16810                                 if test "$cf_scanf_attribute" != no ; then
16811                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16812
16813 cat >>confdefs.h <<\EOF
16814 #define GCC_SCANF 1
16815 EOF
16816
16817                                 fi
16818
16819 cat >>confdefs.h <<EOF
16820 #define GCC_SCANFLIKE(fmt,var) $cf_value
16821 EOF
16822
16823                                 ;;
16824                         (unused)
16825
16826 cat >>confdefs.h <<EOF
16827 #define GCC_UNUSED $cf_directive
16828 EOF
16829
16830                                 ;;
16831                         esac
16832                 fi
16833         done
16834 else
16835         ${FGREP-fgrep} define conftest.i >>confdefs.h
16836 fi
16837 rm -rf ./conftest*
16838 fi
16839
16840 fi
16841
16842 if test "x$enable_warnings" = "xyes"; then
16843
16844         ADAFLAGS="$ADAFLAGS -gnatg"
16845
16846         if test "x$cf_with_cxx" = xyes ; then
16847
16848 INTEL_CPLUSPLUS=no
16849
16850 if test "$GCC" = yes ; then
16851         case "$host_os" in
16852         (linux*|gnu*)
16853                 echo "$as_me:16853: checking if this is really Intel C++ compiler" >&5
16854 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16855                 cf_save_CFLAGS="$CXXFLAGS"
16856                 CXXFLAGS="$CXXFLAGS -no-gcc"
16857                 cat >"conftest.$ac_ext" <<_ACEOF
16858 #line 16858 "configure"
16859 #include "confdefs.h"
16860
16861 int
16862 main (void)
16863 {
16864
16865 #ifdef __INTEL_COMPILER
16866 #else
16867 make an error
16868 #endif
16869
16870   ;
16871   return 0;
16872 }
16873 _ACEOF
16874 rm -f "conftest.$ac_objext"
16875 if { (eval echo "$as_me:16875: \"$ac_compile\"") >&5
16876   (eval $ac_compile) 2>&5
16877   ac_status=$?
16878   echo "$as_me:16878: \$? = $ac_status" >&5
16879   (exit "$ac_status"); } &&
16880          { ac_try='test -s "conftest.$ac_objext"'
16881   { (eval echo "$as_me:16881: \"$ac_try\"") >&5
16882   (eval $ac_try) 2>&5
16883   ac_status=$?
16884   echo "$as_me:16884: \$? = $ac_status" >&5
16885   (exit "$ac_status"); }; }; then
16886   INTEL_CPLUSPLUS=yes
16887 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16888
16889 else
16890   echo "$as_me: failed program was:" >&5
16891 cat "conftest.$ac_ext" >&5
16892 fi
16893 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16894                 CXXFLAGS="$cf_save_CFLAGS"
16895                 echo "$as_me:16895: result: $INTEL_CPLUSPLUS" >&5
16896 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16897                 ;;
16898         esac
16899 fi
16900
16901 CLANG_CPLUSPLUS=no
16902
16903 if test "$GCC" = yes ; then
16904         echo "$as_me:16904: checking if this is really Clang C++ compiler" >&5
16905 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16906         cf_save_CFLAGS="$CXXFLAGS"
16907         cat >"conftest.$ac_ext" <<_ACEOF
16908 #line 16908 "configure"
16909 #include "confdefs.h"
16910
16911 int
16912 main (void)
16913 {
16914
16915 #ifdef __clang__
16916 #else
16917 make an error
16918 #endif
16919
16920   ;
16921   return 0;
16922 }
16923 _ACEOF
16924 rm -f "conftest.$ac_objext"
16925 if { (eval echo "$as_me:16925: \"$ac_compile\"") >&5
16926   (eval $ac_compile) 2>&5
16927   ac_status=$?
16928   echo "$as_me:16928: \$? = $ac_status" >&5
16929   (exit "$ac_status"); } &&
16930          { ac_try='test -s "conftest.$ac_objext"'
16931   { (eval echo "$as_me:16931: \"$ac_try\"") >&5
16932   (eval $ac_try) 2>&5
16933   ac_status=$?
16934   echo "$as_me:16934: \$? = $ac_status" >&5
16935   (exit "$ac_status"); }; }; then
16936   CLANG_CPLUSPLUS=yes
16937
16938 else
16939   echo "$as_me: failed program was:" >&5
16940 cat "conftest.$ac_ext" >&5
16941 fi
16942 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16943         CXXFLAGS="$cf_save_CFLAGS"
16944         echo "$as_me:16944: result: $CLANG_CPLUSPLUS" >&5
16945 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16946 fi
16947
16948 CLANG_VERSION=none
16949
16950 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
16951         case "$CC" in
16952         (c[1-9][0-9]|*/c[1-9][0-9])
16953                 { echo "$as_me:16953: WARNING: replacing broken compiler alias $CC" >&5
16954 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
16955                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
16956                 CC=clang
16957                 ;;
16958         esac
16959
16960         echo "$as_me:16960: checking version of $CC" >&5
16961 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
16962         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.].*//'`"
16963         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
16964         echo "$as_me:16964: result: $CLANG_VERSION" >&5
16965 echo "${ECHO_T}$CLANG_VERSION" >&6
16966
16967         for cf_clang_opt in \
16968                 -Qunused-arguments \
16969                 -Wno-error=implicit-function-declaration
16970         do
16971                 echo "$as_me:16971: checking if option $cf_clang_opt works" >&5
16972 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
16973                 cf_save_CFLAGS="$CFLAGS"
16974                 CFLAGS="$CFLAGS $cf_clang_opt"
16975                 cat >"conftest.$ac_ext" <<_ACEOF
16976 #line 16976 "configure"
16977 #include "confdefs.h"
16978
16979                         #include <stdio.h>
16980 int
16981 main (void)
16982 {
16983
16984                         printf("hello!\\n");
16985   ;
16986   return 0;
16987 }
16988 _ACEOF
16989 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16990 if { (eval echo "$as_me:16990: \"$ac_link\"") >&5
16991   (eval $ac_link) 2>&5
16992   ac_status=$?
16993   echo "$as_me:16993: \$? = $ac_status" >&5
16994   (exit "$ac_status"); } &&
16995          { ac_try='test -s "conftest$ac_exeext"'
16996   { (eval echo "$as_me:16996: \"$ac_try\"") >&5
16997   (eval $ac_try) 2>&5
16998   ac_status=$?
16999   echo "$as_me:16999: \$? = $ac_status" >&5
17000   (exit "$ac_status"); }; }; then
17001
17002                         cf_clang_optok=yes
17003 else
17004   echo "$as_me: failed program was:" >&5
17005 cat "conftest.$ac_ext" >&5
17006
17007                         cf_clang_optok=no
17008 fi
17009 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17010                 echo "$as_me:17010: result: $cf_clang_optok" >&5
17011 echo "${ECHO_T}$cf_clang_optok" >&6
17012                 CFLAGS="$cf_save_CFLAGS"
17013                 if test "$cf_clang_optok" = yes; then
17014                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17015
17016 echo "${as_me:-configure}:17016: testing adding option $cf_clang_opt ..." 1>&5
17017
17018         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17019         CFLAGS="${CFLAGS}$cf_clang_opt"
17020
17021                 fi
17022         done
17023 fi
17024
17025 ac_ext=cc
17026 ac_cpp='$CXXCPP $CPPFLAGS'
17027 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17028 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17029 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17030 ac_main_return="return"
17031
17032 cat > conftest.$ac_ext <<EOF
17033 #line 17033 "configure"
17034 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17035 EOF
17036
17037 if test "$INTEL_CPLUSPLUS" = yes
17038 then
17039 # The "-wdXXX" options suppress warnings:
17040 # remark #1419: external declaration in primary source file
17041 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17042 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17043 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17044 # remark #193: zero used for undefined preprocessing identifier
17045 # remark #593: variable "curs_sb_left_arrow" was set but never used
17046 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17047 # remark #869: parameter "tw" was never referenced
17048 # remark #981: operands are evaluated in unspecified order
17049 # warning #269: invalid format string conversion
17050
17051         { echo "$as_me:17051: checking for $CC warning options..." >&5
17052 echo "$as_me: checking for $CC warning options..." >&6;}
17053         cf_save_CXXFLAGS="$CXXFLAGS"
17054         EXTRA_CXXFLAGS="-Wall"
17055         for cf_opt in \
17056                 wd1419 \
17057                 wd1682 \
17058                 wd1683 \
17059                 wd1684 \
17060                 wd193 \
17061                 wd279 \
17062                 wd593 \
17063                 wd810 \
17064                 wd869 \
17065                 wd981
17066         do
17067                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17068                 if { (eval echo "$as_me:17068: \"$ac_compile\"") >&5
17069   (eval $ac_compile) 2>&5
17070   ac_status=$?
17071   echo "$as_me:17071: \$? = $ac_status" >&5
17072   (exit "$ac_status"); }; then
17073                         test -n "$verbose" && echo "$as_me:17073: result: ... -$cf_opt" >&5
17074 echo "${ECHO_T}... -$cf_opt" >&6
17075                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17076                 fi
17077         done
17078         CXXFLAGS="$cf_save_CXXFLAGS"
17079
17080 elif test "$GXX" = yes
17081 then
17082         { echo "$as_me:17082: checking for $CXX warning options..." >&5
17083 echo "$as_me: checking for $CXX warning options..." >&6;}
17084         cf_save_CXXFLAGS="$CXXFLAGS"
17085         EXTRA_CXXFLAGS="-W -Wall"
17086         cf_gxx_extra_warnings=""
17087         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17088         case "$GXX_VERSION" in
17089         ([1-2].*)
17090                 ;;
17091         (*)
17092                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17093                 ;;
17094         esac
17095         for cf_opt in \
17096                 Wabi \
17097                 fabi-version=0 \
17098                 Wextra \
17099                 Wignored-qualifiers \
17100                 Wlogical-op \
17101                 Woverloaded-virtual \
17102                 Wsign-promo \
17103                 Wsynth \
17104                 Wold-style-cast \
17105                 Wcast-align \
17106                 Wcast-qual \
17107                 Wpointer-arith \
17108                 Wshadow \
17109                 Wundef $cf_gxx_extra_warnings Wno-unused
17110         do
17111                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17112                 if { (eval echo "$as_me:17112: \"$ac_compile\"") >&5
17113   (eval $ac_compile) 2>&5
17114   ac_status=$?
17115   echo "$as_me:17115: \$? = $ac_status" >&5
17116   (exit "$ac_status"); }; then
17117                         test -n "$verbose" && echo "$as_me:17117: result: ... -$cf_opt" >&5
17118 echo "${ECHO_T}... -$cf_opt" >&6
17119                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17120                 else
17121                         test -n "$verbose" && echo "$as_me:17121: result: ... no -$cf_opt" >&5
17122 echo "${ECHO_T}... no -$cf_opt" >&6
17123                 fi
17124         done
17125         CXXFLAGS="$cf_save_CXXFLAGS"
17126 fi
17127
17128 rm -rf ./conftest*
17129 ac_ext=c
17130 ac_cpp='$CPP $CPPFLAGS'
17131 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17132 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17133 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17134 ac_main_return="return"
17135
17136         fi
17137 fi
17138
17139 echo "$as_me:17139: checking if you want to work around bogus compiler/loader warnings" >&5
17140 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17141
17142 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17143 if test "${enable_string_hacks+set}" = set; then
17144   enableval="$enable_string_hacks"
17145   enable_string_hacks=$enableval
17146 else
17147   enable_string_hacks=no
17148 fi;
17149 echo "$as_me:17149: result: $enable_string_hacks" >&5
17150 echo "${ECHO_T}$enable_string_hacks" >&6
17151
17152 if test "x$enable_string_hacks" = "xyes"; then
17153
17154 cat >>confdefs.h <<\EOF
17155 #define USE_STRING_HACKS 1
17156 EOF
17157
17158         { echo "$as_me:17158: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17159 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17160         echo "$as_me:17160: checking for strlcat" >&5
17161 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17162 if test "${ac_cv_func_strlcat+set}" = set; then
17163   echo $ECHO_N "(cached) $ECHO_C" >&6
17164 else
17165   cat >"conftest.$ac_ext" <<_ACEOF
17166 #line 17166 "configure"
17167 #include "confdefs.h"
17168 #define strlcat autoconf_temporary
17169 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17170 #undef strlcat
17171
17172 #ifdef __cplusplus
17173 extern "C"
17174 #endif
17175
17176 /* We use char because int might match the return type of a gcc2
17177    builtin and then its argument prototype would still apply.  */
17178 char strlcat (void);
17179
17180 int
17181 main (void)
17182 {
17183
17184 /* The GNU C library defines stubs for functions which it implements
17185     to always fail with ENOSYS.  Some functions are actually named
17186     something starting with __ and the normal name is an alias.  */
17187 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17188 #error found stub for strlcat
17189 #endif
17190
17191         return strlcat ();
17192   ;
17193   return 0;
17194 }
17195 _ACEOF
17196 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17197 if { (eval echo "$as_me:17197: \"$ac_link\"") >&5
17198   (eval $ac_link) 2>&5
17199   ac_status=$?
17200   echo "$as_me:17200: \$? = $ac_status" >&5
17201   (exit "$ac_status"); } &&
17202          { ac_try='test -s "conftest$ac_exeext"'
17203   { (eval echo "$as_me:17203: \"$ac_try\"") >&5
17204   (eval $ac_try) 2>&5
17205   ac_status=$?
17206   echo "$as_me:17206: \$? = $ac_status" >&5
17207   (exit "$ac_status"); }; }; then
17208   ac_cv_func_strlcat=yes
17209 else
17210   echo "$as_me: failed program was:" >&5
17211 cat "conftest.$ac_ext" >&5
17212 ac_cv_func_strlcat=no
17213 fi
17214 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17215 fi
17216 echo "$as_me:17216: result: $ac_cv_func_strlcat" >&5
17217 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17218 if test "$ac_cv_func_strlcat" = yes; then
17219
17220 cat >>confdefs.h <<\EOF
17221 #define HAVE_STRLCAT 1
17222 EOF
17223
17224 else
17225
17226                 echo "$as_me:17226: checking for strlcat in -lbsd" >&5
17227 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17228 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17229   echo $ECHO_N "(cached) $ECHO_C" >&6
17230 else
17231   ac_check_lib_save_LIBS=$LIBS
17232 LIBS="-lbsd  $LIBS"
17233 cat >"conftest.$ac_ext" <<_ACEOF
17234 #line 17234 "configure"
17235 #include "confdefs.h"
17236
17237 /* Override any gcc2 internal prototype to avoid an error.  */
17238 #ifdef __cplusplus
17239 extern "C"
17240 #endif
17241 /* We use char because int might match the return type of a gcc2
17242    builtin and then its argument prototype would still apply.  */
17243 char strlcat ();
17244 int
17245 main (void)
17246 {
17247 strlcat ();
17248   ;
17249   return 0;
17250 }
17251 _ACEOF
17252 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17253 if { (eval echo "$as_me:17253: \"$ac_link\"") >&5
17254   (eval $ac_link) 2>&5
17255   ac_status=$?
17256   echo "$as_me:17256: \$? = $ac_status" >&5
17257   (exit "$ac_status"); } &&
17258          { ac_try='test -s "conftest$ac_exeext"'
17259   { (eval echo "$as_me:17259: \"$ac_try\"") >&5
17260   (eval $ac_try) 2>&5
17261   ac_status=$?
17262   echo "$as_me:17262: \$? = $ac_status" >&5
17263   (exit "$ac_status"); }; }; then
17264   ac_cv_lib_bsd_strlcat=yes
17265 else
17266   echo "$as_me: failed program was:" >&5
17267 cat "conftest.$ac_ext" >&5
17268 ac_cv_lib_bsd_strlcat=no
17269 fi
17270 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17271 LIBS=$ac_check_lib_save_LIBS
17272 fi
17273 echo "$as_me:17273: result: $ac_cv_lib_bsd_strlcat" >&5
17274 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17275 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17276
17277 cf_add_libs="$LIBS"
17278 # reverse order
17279 cf_add_0lib=
17280 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17281 # filter duplicates
17282 for cf_add_1lib in $cf_add_0lib; do
17283         for cf_add_2lib in $cf_add_libs; do
17284                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17285                         cf_add_1lib=
17286                         break
17287                 fi
17288         done
17289         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17290 done
17291 LIBS="$cf_add_libs"
17292
17293 for ac_header in bsd/string.h
17294 do
17295 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17296 echo "$as_me:17296: checking for $ac_header" >&5
17297 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17298 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17299   echo $ECHO_N "(cached) $ECHO_C" >&6
17300 else
17301   cat >"conftest.$ac_ext" <<_ACEOF
17302 #line 17302 "configure"
17303 #include "confdefs.h"
17304 #include <$ac_header>
17305 _ACEOF
17306 if { (eval echo "$as_me:17306: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17307   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17308   ac_status=$?
17309   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17310   rm -f conftest.er1
17311   cat conftest.err >&5
17312   echo "$as_me:17312: \$? = $ac_status" >&5
17313   (exit "$ac_status"); } >/dev/null; then
17314   if test -s conftest.err; then
17315     ac_cpp_err=$ac_c_preproc_warn_flag
17316   else
17317     ac_cpp_err=
17318   fi
17319 else
17320   ac_cpp_err=yes
17321 fi
17322 if test -z "$ac_cpp_err"; then
17323   eval "$as_ac_Header=yes"
17324 else
17325   echo "$as_me: failed program was:" >&5
17326   cat "conftest.$ac_ext" >&5
17327   eval "$as_ac_Header=no"
17328 fi
17329 rm -f conftest.err "conftest.$ac_ext"
17330 fi
17331 echo "$as_me:17331: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17332 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17333 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17334   cat >>confdefs.h <<EOF
17335 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17336 EOF
17337
17338 fi
17339 done
17340
17341 cat >>confdefs.h <<\EOF
17342 #define HAVE_STRLCAT 1
17343 EOF
17344
17345 fi
17346
17347 fi
17348
17349 for ac_func in strlcpy snprintf
17350 do
17351 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17352 echo "$as_me:17352: checking for $ac_func" >&5
17353 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17354 if eval "test \"\${$as_ac_var+set}\" = set"; then
17355   echo $ECHO_N "(cached) $ECHO_C" >&6
17356 else
17357   cat >"conftest.$ac_ext" <<_ACEOF
17358 #line 17358 "configure"
17359 #include "confdefs.h"
17360 #define $ac_func autoconf_temporary
17361 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17362 #undef $ac_func
17363
17364 #ifdef __cplusplus
17365 extern "C"
17366 #endif
17367
17368 /* We use char because int might match the return type of a gcc2
17369    builtin and then its argument prototype would still apply.  */
17370 char $ac_func (void);
17371
17372 int
17373 main (void)
17374 {
17375
17376 /* The GNU C library defines stubs for functions which it implements
17377     to always fail with ENOSYS.  Some functions are actually named
17378     something starting with __ and the normal name is an alias.  */
17379 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17380 #error found stub for $ac_func
17381 #endif
17382
17383         return $ac_func ();
17384   ;
17385   return 0;
17386 }
17387 _ACEOF
17388 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17389 if { (eval echo "$as_me:17389: \"$ac_link\"") >&5
17390   (eval $ac_link) 2>&5
17391   ac_status=$?
17392   echo "$as_me:17392: \$? = $ac_status" >&5
17393   (exit "$ac_status"); } &&
17394          { ac_try='test -s "conftest$ac_exeext"'
17395   { (eval echo "$as_me:17395: \"$ac_try\"") >&5
17396   (eval $ac_try) 2>&5
17397   ac_status=$?
17398   echo "$as_me:17398: \$? = $ac_status" >&5
17399   (exit "$ac_status"); }; }; then
17400   eval "$as_ac_var=yes"
17401 else
17402   echo "$as_me: failed program was:" >&5
17403 cat "conftest.$ac_ext" >&5
17404 eval "$as_ac_var=no"
17405 fi
17406 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17407 fi
17408 echo "$as_me:17408: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17409 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17410 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17411   cat >>confdefs.h <<EOF
17412 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17413 EOF
17414
17415 fi
17416 done
17417
17418 fi
17419
17420 ###     use option --enable-assertions to turn on generation of assertion code
17421 echo "$as_me:17421: checking if you want to enable runtime assertions" >&5
17422 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17423
17424 # Check whether --enable-assertions or --disable-assertions was given.
17425 if test "${enable_assertions+set}" = set; then
17426   enableval="$enable_assertions"
17427   with_assertions=$enableval
17428 else
17429   with_assertions=no
17430 fi;
17431 echo "$as_me:17431: result: $with_assertions" >&5
17432 echo "${ECHO_T}$with_assertions" >&6
17433 if test -n "$GCC"
17434 then
17435         if test "$with_assertions" = no
17436         then
17437                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17438         else
17439
17440         ADAFLAGS="$ADAFLAGS -gnata"
17441
17442         fi
17443 fi
17444
17445 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17446
17447 echo "$as_me:17447: checking if you want to use dmalloc for testing" >&5
17448 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17449
17450 # Check whether --with-dmalloc or --without-dmalloc was given.
17451 if test "${with_dmalloc+set}" = set; then
17452   withval="$with_dmalloc"
17453
17454 cat >>confdefs.h <<EOF
17455 #define USE_DMALLOC 1
17456 EOF
17457
17458         : "${with_cflags:=-g}"
17459         : "${enable_leaks:=no}"
17460          with_dmalloc=yes
17461 else
17462   with_dmalloc=
17463 fi;
17464 echo "$as_me:17464: result: ${with_dmalloc:-no}" >&5
17465 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17466
17467 case ".$with_cflags" in
17468 (.*-g*)
17469         case .$CFLAGS in
17470         (.*-g*)
17471                 ;;
17472         (*)
17473
17474 cf_fix_cppflags=no
17475 cf_new_cflags=
17476 cf_new_cppflags=
17477 cf_new_extra_cppflags=
17478
17479 for cf_add_cflags in -g
17480 do
17481 case "$cf_fix_cppflags" in
17482 (no)
17483         case "$cf_add_cflags" in
17484         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17485                 case "$cf_add_cflags" in
17486                 (-D*)
17487                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17488
17489                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17490                                 && test -z "${cf_tst_cflags}" \
17491                                 && cf_fix_cppflags=yes
17492
17493                         if test "$cf_fix_cppflags" = yes ; then
17494
17495         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17496         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17497
17498                                 continue
17499                         elif test "${cf_tst_cflags}" = "\"'" ; then
17500
17501         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17502         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17503
17504                                 continue
17505                         fi
17506                         ;;
17507                 esac
17508                 case "$CPPFLAGS" in
17509                 (*$cf_add_cflags)
17510                         ;;
17511                 (*)
17512                         case "$cf_add_cflags" in
17513                         (-D*)
17514                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17515
17516 CPPFLAGS=`echo "$CPPFLAGS" | \
17517         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17518                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17519
17520                                 ;;
17521                         esac
17522
17523         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17524         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17525
17526                         ;;
17527                 esac
17528                 ;;
17529         (*)
17530
17531         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17532         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17533
17534                 ;;
17535         esac
17536         ;;
17537 (yes)
17538
17539         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17540         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17541
17542         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17543
17544         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17545                 && test -z "${cf_tst_cflags}" \
17546                 && cf_fix_cppflags=no
17547         ;;
17548 esac
17549 done
17550
17551 if test -n "$cf_new_cflags" ; then
17552
17553         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17554         CFLAGS="${CFLAGS}$cf_new_cflags"
17555
17556 fi
17557
17558 if test -n "$cf_new_cppflags" ; then
17559
17560         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17561         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17562
17563 fi
17564
17565 if test -n "$cf_new_extra_cppflags" ; then
17566
17567         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17568         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17569
17570 fi
17571
17572                 ;;
17573         esac
17574         ;;
17575 esac
17576
17577 if test "$with_dmalloc" = yes ; then
17578         echo "$as_me:17578: checking for dmalloc.h" >&5
17579 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17580 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17581   echo $ECHO_N "(cached) $ECHO_C" >&6
17582 else
17583   cat >"conftest.$ac_ext" <<_ACEOF
17584 #line 17584 "configure"
17585 #include "confdefs.h"
17586 #include <dmalloc.h>
17587 _ACEOF
17588 if { (eval echo "$as_me:17588: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17589   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17590   ac_status=$?
17591   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17592   rm -f conftest.er1
17593   cat conftest.err >&5
17594   echo "$as_me:17594: \$? = $ac_status" >&5
17595   (exit "$ac_status"); } >/dev/null; then
17596   if test -s conftest.err; then
17597     ac_cpp_err=$ac_c_preproc_warn_flag
17598   else
17599     ac_cpp_err=
17600   fi
17601 else
17602   ac_cpp_err=yes
17603 fi
17604 if test -z "$ac_cpp_err"; then
17605   ac_cv_header_dmalloc_h=yes
17606 else
17607   echo "$as_me: failed program was:" >&5
17608   cat "conftest.$ac_ext" >&5
17609   ac_cv_header_dmalloc_h=no
17610 fi
17611 rm -f conftest.err "conftest.$ac_ext"
17612 fi
17613 echo "$as_me:17613: result: $ac_cv_header_dmalloc_h" >&5
17614 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17615 if test "$ac_cv_header_dmalloc_h" = yes; then
17616
17617 echo "$as_me:17617: checking for dmalloc_debug in -ldmalloc" >&5
17618 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17619 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17620   echo $ECHO_N "(cached) $ECHO_C" >&6
17621 else
17622   ac_check_lib_save_LIBS=$LIBS
17623 LIBS="-ldmalloc  $LIBS"
17624 cat >"conftest.$ac_ext" <<_ACEOF
17625 #line 17625 "configure"
17626 #include "confdefs.h"
17627
17628 /* Override any gcc2 internal prototype to avoid an error.  */
17629 #ifdef __cplusplus
17630 extern "C"
17631 #endif
17632 /* We use char because int might match the return type of a gcc2
17633    builtin and then its argument prototype would still apply.  */
17634 char dmalloc_debug ();
17635 int
17636 main (void)
17637 {
17638 dmalloc_debug ();
17639   ;
17640   return 0;
17641 }
17642 _ACEOF
17643 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17644 if { (eval echo "$as_me:17644: \"$ac_link\"") >&5
17645   (eval $ac_link) 2>&5
17646   ac_status=$?
17647   echo "$as_me:17647: \$? = $ac_status" >&5
17648   (exit "$ac_status"); } &&
17649          { ac_try='test -s "conftest$ac_exeext"'
17650   { (eval echo "$as_me:17650: \"$ac_try\"") >&5
17651   (eval $ac_try) 2>&5
17652   ac_status=$?
17653   echo "$as_me:17653: \$? = $ac_status" >&5
17654   (exit "$ac_status"); }; }; then
17655   ac_cv_lib_dmalloc_dmalloc_debug=yes
17656 else
17657   echo "$as_me: failed program was:" >&5
17658 cat "conftest.$ac_ext" >&5
17659 ac_cv_lib_dmalloc_dmalloc_debug=no
17660 fi
17661 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17662 LIBS=$ac_check_lib_save_LIBS
17663 fi
17664 echo "$as_me:17664: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17665 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17666 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
17667   cat >>confdefs.h <<EOF
17668 #define HAVE_LIBDMALLOC 1
17669 EOF
17670
17671   LIBS="-ldmalloc $LIBS"
17672
17673 fi
17674
17675 fi
17676
17677 fi
17678
17679 echo "$as_me:17679: checking if you want to use dbmalloc for testing" >&5
17680 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17681
17682 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17683 if test "${with_dbmalloc+set}" = set; then
17684   withval="$with_dbmalloc"
17685
17686 cat >>confdefs.h <<EOF
17687 #define USE_DBMALLOC 1
17688 EOF
17689
17690         : "${with_cflags:=-g}"
17691         : "${enable_leaks:=no}"
17692          with_dbmalloc=yes
17693 else
17694   with_dbmalloc=
17695 fi;
17696 echo "$as_me:17696: result: ${with_dbmalloc:-no}" >&5
17697 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17698
17699 case ".$with_cflags" in
17700 (.*-g*)
17701         case .$CFLAGS in
17702         (.*-g*)
17703                 ;;
17704         (*)
17705
17706 cf_fix_cppflags=no
17707 cf_new_cflags=
17708 cf_new_cppflags=
17709 cf_new_extra_cppflags=
17710
17711 for cf_add_cflags in -g
17712 do
17713 case "$cf_fix_cppflags" in
17714 (no)
17715         case "$cf_add_cflags" in
17716         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17717                 case "$cf_add_cflags" in
17718                 (-D*)
17719                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17720
17721                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17722                                 && test -z "${cf_tst_cflags}" \
17723                                 && cf_fix_cppflags=yes
17724
17725                         if test "$cf_fix_cppflags" = yes ; then
17726
17727         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17728         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17729
17730                                 continue
17731                         elif test "${cf_tst_cflags}" = "\"'" ; then
17732
17733         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17734         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17735
17736                                 continue
17737                         fi
17738                         ;;
17739                 esac
17740                 case "$CPPFLAGS" in
17741                 (*$cf_add_cflags)
17742                         ;;
17743                 (*)
17744                         case "$cf_add_cflags" in
17745                         (-D*)
17746                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17747
17748 CPPFLAGS=`echo "$CPPFLAGS" | \
17749         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17750                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17751
17752                                 ;;
17753                         esac
17754
17755         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17756         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17757
17758                         ;;
17759                 esac
17760                 ;;
17761         (*)
17762
17763         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17764         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17765
17766                 ;;
17767         esac
17768         ;;
17769 (yes)
17770
17771         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17772         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17773
17774         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17775
17776         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17777                 && test -z "${cf_tst_cflags}" \
17778                 && cf_fix_cppflags=no
17779         ;;
17780 esac
17781 done
17782
17783 if test -n "$cf_new_cflags" ; then
17784
17785         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17786         CFLAGS="${CFLAGS}$cf_new_cflags"
17787
17788 fi
17789
17790 if test -n "$cf_new_cppflags" ; then
17791
17792         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17793         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17794
17795 fi
17796
17797 if test -n "$cf_new_extra_cppflags" ; then
17798
17799         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17800         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17801
17802 fi
17803
17804                 ;;
17805         esac
17806         ;;
17807 esac
17808
17809 if test "$with_dbmalloc" = yes ; then
17810         echo "$as_me:17810: checking for dbmalloc.h" >&5
17811 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17812 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17813   echo $ECHO_N "(cached) $ECHO_C" >&6
17814 else
17815   cat >"conftest.$ac_ext" <<_ACEOF
17816 #line 17816 "configure"
17817 #include "confdefs.h"
17818 #include <dbmalloc.h>
17819 _ACEOF
17820 if { (eval echo "$as_me:17820: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17821   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17822   ac_status=$?
17823   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17824   rm -f conftest.er1
17825   cat conftest.err >&5
17826   echo "$as_me:17826: \$? = $ac_status" >&5
17827   (exit "$ac_status"); } >/dev/null; then
17828   if test -s conftest.err; then
17829     ac_cpp_err=$ac_c_preproc_warn_flag
17830   else
17831     ac_cpp_err=
17832   fi
17833 else
17834   ac_cpp_err=yes
17835 fi
17836 if test -z "$ac_cpp_err"; then
17837   ac_cv_header_dbmalloc_h=yes
17838 else
17839   echo "$as_me: failed program was:" >&5
17840   cat "conftest.$ac_ext" >&5
17841   ac_cv_header_dbmalloc_h=no
17842 fi
17843 rm -f conftest.err "conftest.$ac_ext"
17844 fi
17845 echo "$as_me:17845: result: $ac_cv_header_dbmalloc_h" >&5
17846 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17847 if test "$ac_cv_header_dbmalloc_h" = yes; then
17848
17849 echo "$as_me:17849: checking for debug_malloc in -ldbmalloc" >&5
17850 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17851 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17852   echo $ECHO_N "(cached) $ECHO_C" >&6
17853 else
17854   ac_check_lib_save_LIBS=$LIBS
17855 LIBS="-ldbmalloc  $LIBS"
17856 cat >"conftest.$ac_ext" <<_ACEOF
17857 #line 17857 "configure"
17858 #include "confdefs.h"
17859
17860 /* Override any gcc2 internal prototype to avoid an error.  */
17861 #ifdef __cplusplus
17862 extern "C"
17863 #endif
17864 /* We use char because int might match the return type of a gcc2
17865    builtin and then its argument prototype would still apply.  */
17866 char debug_malloc ();
17867 int
17868 main (void)
17869 {
17870 debug_malloc ();
17871   ;
17872   return 0;
17873 }
17874 _ACEOF
17875 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17876 if { (eval echo "$as_me:17876: \"$ac_link\"") >&5
17877   (eval $ac_link) 2>&5
17878   ac_status=$?
17879   echo "$as_me:17879: \$? = $ac_status" >&5
17880   (exit "$ac_status"); } &&
17881          { ac_try='test -s "conftest$ac_exeext"'
17882   { (eval echo "$as_me:17882: \"$ac_try\"") >&5
17883   (eval $ac_try) 2>&5
17884   ac_status=$?
17885   echo "$as_me:17885: \$? = $ac_status" >&5
17886   (exit "$ac_status"); }; }; then
17887   ac_cv_lib_dbmalloc_debug_malloc=yes
17888 else
17889   echo "$as_me: failed program was:" >&5
17890 cat "conftest.$ac_ext" >&5
17891 ac_cv_lib_dbmalloc_debug_malloc=no
17892 fi
17893 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17894 LIBS=$ac_check_lib_save_LIBS
17895 fi
17896 echo "$as_me:17896: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17897 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17898 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
17899   cat >>confdefs.h <<EOF
17900 #define HAVE_LIBDBMALLOC 1
17901 EOF
17902
17903   LIBS="-ldbmalloc $LIBS"
17904
17905 fi
17906
17907 fi
17908
17909 fi
17910
17911 echo "$as_me:17911: checking if you want to use valgrind for testing" >&5
17912 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17913
17914 # Check whether --with-valgrind or --without-valgrind was given.
17915 if test "${with_valgrind+set}" = set; then
17916   withval="$with_valgrind"
17917
17918 cat >>confdefs.h <<EOF
17919 #define USE_VALGRIND 1
17920 EOF
17921
17922         : "${with_cflags:=-g}"
17923         : "${enable_leaks:=no}"
17924          with_valgrind=yes
17925 else
17926   with_valgrind=
17927 fi;
17928 echo "$as_me:17928: result: ${with_valgrind:-no}" >&5
17929 echo "${ECHO_T}${with_valgrind:-no}" >&6
17930
17931 case ".$with_cflags" in
17932 (.*-g*)
17933         case .$CFLAGS in
17934         (.*-g*)
17935                 ;;
17936         (*)
17937
17938 cf_fix_cppflags=no
17939 cf_new_cflags=
17940 cf_new_cppflags=
17941 cf_new_extra_cppflags=
17942
17943 for cf_add_cflags in -g
17944 do
17945 case "$cf_fix_cppflags" in
17946 (no)
17947         case "$cf_add_cflags" in
17948         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17949                 case "$cf_add_cflags" in
17950                 (-D*)
17951                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17952
17953                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17954                                 && test -z "${cf_tst_cflags}" \
17955                                 && cf_fix_cppflags=yes
17956
17957                         if test "$cf_fix_cppflags" = yes ; then
17958
17959         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17960         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17961
17962                                 continue
17963                         elif test "${cf_tst_cflags}" = "\"'" ; then
17964
17965         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17966         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17967
17968                                 continue
17969                         fi
17970                         ;;
17971                 esac
17972                 case "$CPPFLAGS" in
17973                 (*$cf_add_cflags)
17974                         ;;
17975                 (*)
17976                         case "$cf_add_cflags" in
17977                         (-D*)
17978                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17979
17980 CPPFLAGS=`echo "$CPPFLAGS" | \
17981         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17982                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17983
17984                                 ;;
17985                         esac
17986
17987         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17988         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17989
17990                         ;;
17991                 esac
17992                 ;;
17993         (*)
17994
17995         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17996         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17997
17998                 ;;
17999         esac
18000         ;;
18001 (yes)
18002
18003         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18004         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18005
18006         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18007
18008         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18009                 && test -z "${cf_tst_cflags}" \
18010                 && cf_fix_cppflags=no
18011         ;;
18012 esac
18013 done
18014
18015 if test -n "$cf_new_cflags" ; then
18016
18017         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18018         CFLAGS="${CFLAGS}$cf_new_cflags"
18019
18020 fi
18021
18022 if test -n "$cf_new_cppflags" ; then
18023
18024         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18025         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18026
18027 fi
18028
18029 if test -n "$cf_new_extra_cppflags" ; then
18030
18031         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18032         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18033
18034 fi
18035
18036                 ;;
18037         esac
18038         ;;
18039 esac
18040
18041 echo "$as_me:18041: checking if you want to perform memory-leak testing" >&5
18042 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18043
18044 # Check whether --enable-leaks or --disable-leaks was given.
18045 if test "${enable_leaks+set}" = set; then
18046   enableval="$enable_leaks"
18047   enable_leaks=$enableval
18048 else
18049   enable_leaks=yes
18050 fi;
18051 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18052 echo "$as_me:18052: result: $with_no_leaks" >&5
18053 echo "${ECHO_T}$with_no_leaks" >&6
18054
18055 if test "$enable_leaks" = no ; then
18056
18057 cat >>confdefs.h <<\EOF
18058 #define NO_LEAKS 1
18059 EOF
18060
18061 cat >>confdefs.h <<\EOF
18062 #define YY_NO_LEAKS 1
18063 EOF
18064
18065 fi
18066
18067 cat >>confdefs.h <<\EOF
18068 #define HAVE_NC_ALLOC_H 1
18069 EOF
18070
18071 ###     use option --enable-expanded to generate certain macros as functions
18072
18073 # Check whether --enable-expanded or --disable-expanded was given.
18074 if test "${enable_expanded+set}" = set; then
18075   enableval="$enable_expanded"
18076   test "x$enableval" = xyes &&
18077 cat >>confdefs.h <<\EOF
18078 #define NCURSES_EXPANDED 1
18079 EOF
18080
18081 fi;
18082
18083 ###     use option --disable-macros to suppress macros in favor of functions
18084
18085 # Check whether --enable-macros or --disable-macros was given.
18086 if test "${enable_macros+set}" = set; then
18087   enableval="$enable_macros"
18088   test "$enableval" = no &&
18089 cat >>confdefs.h <<\EOF
18090 #define NCURSES_NOMACROS 1
18091 EOF
18092
18093 fi;
18094
18095 # Normally we only add trace() to the debug-library.  Allow this to be
18096 # extended to all models of the ncurses library:
18097 cf_all_traces=no
18098 case "$CFLAGS $CPPFLAGS" in
18099 (*-DTRACE*)
18100         cf_all_traces=yes
18101         ;;
18102 esac
18103
18104 echo "$as_me:18104: checking whether to add trace feature to all models" >&5
18105 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18106
18107 # Check whether --with-trace or --without-trace was given.
18108 if test "${with_trace+set}" = set; then
18109   withval="$with_trace"
18110   cf_with_trace=$withval
18111 else
18112   cf_with_trace=$cf_all_traces
18113 fi;
18114 echo "$as_me:18114: result: $cf_with_trace" >&5
18115 echo "${ECHO_T}$cf_with_trace" >&6
18116
18117 if test "x$cf_with_trace" = xyes ; then
18118         LIB_TRACING=all
18119         ADA_TRACE=TRUE
18120
18121 cf_fix_cppflags=no
18122 cf_new_cflags=
18123 cf_new_cppflags=
18124 cf_new_extra_cppflags=
18125
18126 for cf_add_cflags in -DTRACE
18127 do
18128 case "$cf_fix_cppflags" in
18129 (no)
18130         case "$cf_add_cflags" in
18131         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18132                 case "$cf_add_cflags" in
18133                 (-D*)
18134                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18135
18136                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18137                                 && test -z "${cf_tst_cflags}" \
18138                                 && cf_fix_cppflags=yes
18139
18140                         if test "$cf_fix_cppflags" = yes ; then
18141
18142         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18143         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18144
18145                                 continue
18146                         elif test "${cf_tst_cflags}" = "\"'" ; then
18147
18148         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18149         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18150
18151                                 continue
18152                         fi
18153                         ;;
18154                 esac
18155                 case "$CPPFLAGS" in
18156                 (*$cf_add_cflags)
18157                         ;;
18158                 (*)
18159                         case "$cf_add_cflags" in
18160                         (-D*)
18161                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18162
18163 CPPFLAGS=`echo "$CPPFLAGS" | \
18164         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18165                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18166
18167                                 ;;
18168                         esac
18169
18170         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18171         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18172
18173                         ;;
18174                 esac
18175                 ;;
18176         (*)
18177
18178         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18179         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18180
18181                 ;;
18182         esac
18183         ;;
18184 (yes)
18185
18186         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18187         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18188
18189         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18190
18191         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18192                 && test -z "${cf_tst_cflags}" \
18193                 && cf_fix_cppflags=no
18194         ;;
18195 esac
18196 done
18197
18198 if test -n "$cf_new_cflags" ; then
18199
18200         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18201         CFLAGS="${CFLAGS}$cf_new_cflags"
18202
18203 fi
18204
18205 if test -n "$cf_new_cppflags" ; then
18206
18207         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18208         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18209
18210 fi
18211
18212 if test -n "$cf_new_extra_cppflags" ; then
18213
18214         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18215         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18216
18217 fi
18218
18219 cat >>confdefs.h <<\EOF
18220 #define HAVE__TRACEF 1
18221 EOF
18222
18223 else
18224         LIB_TRACING=DEBUG
18225         ADA_TRACE=FALSE
18226 fi
18227
18228 echo "$as_me:18228: checking if we want to use GNAT projects" >&5
18229 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18230
18231 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18232 if test "${enable_gnat_projects+set}" = set; then
18233   enableval="$enable_gnat_projects"
18234   test "$enableval" != no && enableval=yes
18235         if test "$enableval" != "yes" ; then
18236     enable_gnat_projects=no
18237         else
18238                 enable_gnat_projects=yes
18239         fi
18240 else
18241   enableval=yes
18242         enable_gnat_projects=yes
18243
18244 fi;
18245 echo "$as_me:18245: result: $enable_gnat_projects" >&5
18246 echo "${ECHO_T}$enable_gnat_projects" >&6
18247
18248 ###     Checks for libraries.
18249 case "$cf_cv_system_name" in
18250 (*mingw32*|*mingw64*)
18251         if test "x$with_exp_win32" = xyes ; then
18252         CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18253         else
18254         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18255         fi
18256         # Note: WINVER may be a problem with Windows 10
18257         ;;
18258 (*)
18259 echo "$as_me:18259: checking for gettimeofday" >&5
18260 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18261 if test "${ac_cv_func_gettimeofday+set}" = set; then
18262   echo $ECHO_N "(cached) $ECHO_C" >&6
18263 else
18264   cat >"conftest.$ac_ext" <<_ACEOF
18265 #line 18265 "configure"
18266 #include "confdefs.h"
18267 #define gettimeofday autoconf_temporary
18268 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18269 #undef gettimeofday
18270
18271 #ifdef __cplusplus
18272 extern "C"
18273 #endif
18274
18275 /* We use char because int might match the return type of a gcc2
18276    builtin and then its argument prototype would still apply.  */
18277 char gettimeofday (void);
18278
18279 int
18280 main (void)
18281 {
18282
18283 /* The GNU C library defines stubs for functions which it implements
18284     to always fail with ENOSYS.  Some functions are actually named
18285     something starting with __ and the normal name is an alias.  */
18286 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18287 #error found stub for gettimeofday
18288 #endif
18289
18290         return gettimeofday ();
18291   ;
18292   return 0;
18293 }
18294 _ACEOF
18295 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18296 if { (eval echo "$as_me:18296: \"$ac_link\"") >&5
18297   (eval $ac_link) 2>&5
18298   ac_status=$?
18299   echo "$as_me:18299: \$? = $ac_status" >&5
18300   (exit "$ac_status"); } &&
18301          { ac_try='test -s "conftest$ac_exeext"'
18302   { (eval echo "$as_me:18302: \"$ac_try\"") >&5
18303   (eval $ac_try) 2>&5
18304   ac_status=$?
18305   echo "$as_me:18305: \$? = $ac_status" >&5
18306   (exit "$ac_status"); }; }; then
18307   ac_cv_func_gettimeofday=yes
18308 else
18309   echo "$as_me: failed program was:" >&5
18310 cat "conftest.$ac_ext" >&5
18311 ac_cv_func_gettimeofday=no
18312 fi
18313 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18314 fi
18315 echo "$as_me:18315: result: $ac_cv_func_gettimeofday" >&5
18316 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18317 if test "$ac_cv_func_gettimeofday" = yes; then
18318
18319 cat >>confdefs.h <<\EOF
18320 #define HAVE_GETTIMEOFDAY 1
18321 EOF
18322
18323 else
18324
18325 echo "$as_me:18325: checking for gettimeofday in -lbsd" >&5
18326 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18327 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18328   echo $ECHO_N "(cached) $ECHO_C" >&6
18329 else
18330   ac_check_lib_save_LIBS=$LIBS
18331 LIBS="-lbsd  $LIBS"
18332 cat >"conftest.$ac_ext" <<_ACEOF
18333 #line 18333 "configure"
18334 #include "confdefs.h"
18335
18336 /* Override any gcc2 internal prototype to avoid an error.  */
18337 #ifdef __cplusplus
18338 extern "C"
18339 #endif
18340 /* We use char because int might match the return type of a gcc2
18341    builtin and then its argument prototype would still apply.  */
18342 char gettimeofday ();
18343 int
18344 main (void)
18345 {
18346 gettimeofday ();
18347   ;
18348   return 0;
18349 }
18350 _ACEOF
18351 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18352 if { (eval echo "$as_me:18352: \"$ac_link\"") >&5
18353   (eval $ac_link) 2>&5
18354   ac_status=$?
18355   echo "$as_me:18355: \$? = $ac_status" >&5
18356   (exit "$ac_status"); } &&
18357          { ac_try='test -s "conftest$ac_exeext"'
18358   { (eval echo "$as_me:18358: \"$ac_try\"") >&5
18359   (eval $ac_try) 2>&5
18360   ac_status=$?
18361   echo "$as_me:18361: \$? = $ac_status" >&5
18362   (exit "$ac_status"); }; }; then
18363   ac_cv_lib_bsd_gettimeofday=yes
18364 else
18365   echo "$as_me: failed program was:" >&5
18366 cat "conftest.$ac_ext" >&5
18367 ac_cv_lib_bsd_gettimeofday=no
18368 fi
18369 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18370 LIBS=$ac_check_lib_save_LIBS
18371 fi
18372 echo "$as_me:18372: result: $ac_cv_lib_bsd_gettimeofday" >&5
18373 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18374 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18375
18376 cat >>confdefs.h <<\EOF
18377 #define HAVE_GETTIMEOFDAY 1
18378 EOF
18379
18380 cf_add_libs="$LIBS"
18381 # reverse order
18382 cf_add_0lib=
18383 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18384 # filter duplicates
18385 for cf_add_1lib in $cf_add_0lib; do
18386         for cf_add_2lib in $cf_add_libs; do
18387                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18388                         cf_add_1lib=
18389                         break
18390                 fi
18391         done
18392         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18393 done
18394 LIBS="$cf_add_libs"
18395
18396 fi
18397
18398 fi
18399         ;;
18400 esac
18401
18402 echo "$as_me:18402: checking if -lm needed for math functions" >&5
18403 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18404 if test "${cf_cv_need_libm+set}" = set; then
18405   echo $ECHO_N "(cached) $ECHO_C" >&6
18406 else
18407
18408         cat >"conftest.$ac_ext" <<_ACEOF
18409 #line 18409 "configure"
18410 #include "confdefs.h"
18411
18412         #include <stdio.h>
18413         #include <stdlib.h>
18414         #include <math.h>
18415
18416 int
18417 main (void)
18418 {
18419 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18420   ;
18421   return 0;
18422 }
18423 _ACEOF
18424 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18425 if { (eval echo "$as_me:18425: \"$ac_link\"") >&5
18426   (eval $ac_link) 2>&5
18427   ac_status=$?
18428   echo "$as_me:18428: \$? = $ac_status" >&5
18429   (exit "$ac_status"); } &&
18430          { ac_try='test -s "conftest$ac_exeext"'
18431   { (eval echo "$as_me:18431: \"$ac_try\"") >&5
18432   (eval $ac_try) 2>&5
18433   ac_status=$?
18434   echo "$as_me:18434: \$? = $ac_status" >&5
18435   (exit "$ac_status"); }; }; then
18436   cf_cv_need_libm=no
18437 else
18438   echo "$as_me: failed program was:" >&5
18439 cat "conftest.$ac_ext" >&5
18440 cf_cv_need_libm=yes
18441 fi
18442 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18443 fi
18444 echo "$as_me:18444: result: $cf_cv_need_libm" >&5
18445 echo "${ECHO_T}$cf_cv_need_libm" >&6
18446 if test "$cf_cv_need_libm" = yes
18447 then
18448 MATH_LIB=-lm
18449 fi
18450
18451 ###     Checks for header files.
18452 echo "$as_me:18452: checking for ANSI C header files" >&5
18453 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18454 if test "${ac_cv_header_stdc+set}" = set; then
18455   echo $ECHO_N "(cached) $ECHO_C" >&6
18456 else
18457   cat >"conftest.$ac_ext" <<_ACEOF
18458 #line 18458 "configure"
18459 #include "confdefs.h"
18460 #include <stdlib.h>
18461 #include <stdarg.h>
18462 #include <string.h>
18463 #include <float.h>
18464
18465 _ACEOF
18466 if { (eval echo "$as_me:18466: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18467   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18468   ac_status=$?
18469   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18470   rm -f conftest.er1
18471   cat conftest.err >&5
18472   echo "$as_me:18472: \$? = $ac_status" >&5
18473   (exit "$ac_status"); } >/dev/null; then
18474   if test -s conftest.err; then
18475     ac_cpp_err=$ac_c_preproc_warn_flag
18476   else
18477     ac_cpp_err=
18478   fi
18479 else
18480   ac_cpp_err=yes
18481 fi
18482 if test -z "$ac_cpp_err"; then
18483   ac_cv_header_stdc=yes
18484 else
18485   echo "$as_me: failed program was:" >&5
18486   cat "conftest.$ac_ext" >&5
18487   ac_cv_header_stdc=no
18488 fi
18489 rm -f conftest.err "conftest.$ac_ext"
18490
18491 if test $ac_cv_header_stdc = yes; then
18492   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18493   cat >"conftest.$ac_ext" <<_ACEOF
18494 #line 18494 "configure"
18495 #include "confdefs.h"
18496 #include <string.h>
18497
18498 _ACEOF
18499 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18500   $EGREP "memchr" >/dev/null 2>&1; then
18501   :
18502 else
18503   ac_cv_header_stdc=no
18504 fi
18505 rm -rf conftest*
18506
18507 fi
18508
18509 if test $ac_cv_header_stdc = yes; then
18510   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18511   cat >"conftest.$ac_ext" <<_ACEOF
18512 #line 18512 "configure"
18513 #include "confdefs.h"
18514 #include <stdlib.h>
18515
18516 _ACEOF
18517 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18518   $EGREP "free" >/dev/null 2>&1; then
18519   :
18520 else
18521   ac_cv_header_stdc=no
18522 fi
18523 rm -rf conftest*
18524
18525 fi
18526
18527 if test $ac_cv_header_stdc = yes; then
18528   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18529   if test "$cross_compiling" = yes; then
18530   :
18531 else
18532   cat >"conftest.$ac_ext" <<_ACEOF
18533 #line 18533 "configure"
18534 #include "confdefs.h"
18535 #include <ctype.h>
18536 #if ((' ' & 0x0FF) == 0x020)
18537 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18538 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18539 #else
18540 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18541                      || ('j' <= (c) && (c) <= 'r') \
18542                      || ('s' <= (c) && (c) <= 'z'))
18543 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18544 #endif
18545
18546 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18547 int
18548 main (void)
18549 {
18550   int i;
18551   for (i = 0; i < 256; i++)
18552     if (XOR (islower (i), ISLOWER (i))
18553         || toupper (i) != TOUPPER (i))
18554       $ac_main_return(2);
18555   $ac_main_return (0);
18556 }
18557 _ACEOF
18558 rm -f "conftest$ac_exeext"
18559 if { (eval echo "$as_me:18559: \"$ac_link\"") >&5
18560   (eval $ac_link) 2>&5
18561   ac_status=$?
18562   echo "$as_me:18562: \$? = $ac_status" >&5
18563   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18564   { (eval echo "$as_me:18564: \"$ac_try\"") >&5
18565   (eval $ac_try) 2>&5
18566   ac_status=$?
18567   echo "$as_me:18567: \$? = $ac_status" >&5
18568   (exit "$ac_status"); }; }; then
18569   :
18570 else
18571   echo "$as_me: program exited with status $ac_status" >&5
18572 echo "$as_me: failed program was:" >&5
18573 cat "conftest.$ac_ext" >&5
18574 ac_cv_header_stdc=no
18575 fi
18576 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18577 fi
18578 fi
18579 fi
18580 echo "$as_me:18580: result: $ac_cv_header_stdc" >&5
18581 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18582 if test $ac_cv_header_stdc = yes; then
18583
18584 cat >>confdefs.h <<\EOF
18585 #define STDC_HEADERS 1
18586 EOF
18587
18588 fi
18589
18590 ac_header_dirent=no
18591 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18592   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18593 echo "$as_me:18593: checking for $ac_hdr that defines DIR" >&5
18594 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18595 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18596   echo $ECHO_N "(cached) $ECHO_C" >&6
18597 else
18598   cat >"conftest.$ac_ext" <<_ACEOF
18599 #line 18599 "configure"
18600 #include "confdefs.h"
18601 #include <sys/types.h>
18602 #include <$ac_hdr>
18603
18604 int
18605 main (void)
18606 {
18607 if ((DIR *) 0)
18608 return 0;
18609   ;
18610   return 0;
18611 }
18612 _ACEOF
18613 rm -f "conftest.$ac_objext"
18614 if { (eval echo "$as_me:18614: \"$ac_compile\"") >&5
18615   (eval $ac_compile) 2>&5
18616   ac_status=$?
18617   echo "$as_me:18617: \$? = $ac_status" >&5
18618   (exit "$ac_status"); } &&
18619          { ac_try='test -s "conftest.$ac_objext"'
18620   { (eval echo "$as_me:18620: \"$ac_try\"") >&5
18621   (eval $ac_try) 2>&5
18622   ac_status=$?
18623   echo "$as_me:18623: \$? = $ac_status" >&5
18624   (exit "$ac_status"); }; }; then
18625   eval "$as_ac_Header=yes"
18626 else
18627   echo "$as_me: failed program was:" >&5
18628 cat "conftest.$ac_ext" >&5
18629 eval "$as_ac_Header=no"
18630 fi
18631 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18632 fi
18633 echo "$as_me:18633: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18634 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18635 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18636   cat >>confdefs.h <<EOF
18637 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18638 EOF
18639
18640 ac_header_dirent=$ac_hdr; break
18641 fi
18642
18643 done
18644 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18645 if test $ac_header_dirent = dirent.h; then
18646   echo "$as_me:18646: checking for opendir in -ldir" >&5
18647 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18648 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18649   echo $ECHO_N "(cached) $ECHO_C" >&6
18650 else
18651   ac_check_lib_save_LIBS=$LIBS
18652 LIBS="-ldir  $LIBS"
18653 cat >"conftest.$ac_ext" <<_ACEOF
18654 #line 18654 "configure"
18655 #include "confdefs.h"
18656
18657 /* Override any gcc2 internal prototype to avoid an error.  */
18658 #ifdef __cplusplus
18659 extern "C"
18660 #endif
18661 /* We use char because int might match the return type of a gcc2
18662    builtin and then its argument prototype would still apply.  */
18663 char opendir ();
18664 int
18665 main (void)
18666 {
18667 opendir ();
18668   ;
18669   return 0;
18670 }
18671 _ACEOF
18672 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18673 if { (eval echo "$as_me:18673: \"$ac_link\"") >&5
18674   (eval $ac_link) 2>&5
18675   ac_status=$?
18676   echo "$as_me:18676: \$? = $ac_status" >&5
18677   (exit "$ac_status"); } &&
18678          { ac_try='test -s "conftest$ac_exeext"'
18679   { (eval echo "$as_me:18679: \"$ac_try\"") >&5
18680   (eval $ac_try) 2>&5
18681   ac_status=$?
18682   echo "$as_me:18682: \$? = $ac_status" >&5
18683   (exit "$ac_status"); }; }; then
18684   ac_cv_lib_dir_opendir=yes
18685 else
18686   echo "$as_me: failed program was:" >&5
18687 cat "conftest.$ac_ext" >&5
18688 ac_cv_lib_dir_opendir=no
18689 fi
18690 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18691 LIBS=$ac_check_lib_save_LIBS
18692 fi
18693 echo "$as_me:18693: result: $ac_cv_lib_dir_opendir" >&5
18694 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18695 if test "$ac_cv_lib_dir_opendir" = yes; then
18696   LIBS="$LIBS -ldir"
18697 fi
18698
18699 else
18700   echo "$as_me:18700: checking for opendir in -lx" >&5
18701 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18702 if test "${ac_cv_lib_x_opendir+set}" = set; then
18703   echo $ECHO_N "(cached) $ECHO_C" >&6
18704 else
18705   ac_check_lib_save_LIBS=$LIBS
18706 LIBS="-lx  $LIBS"
18707 cat >"conftest.$ac_ext" <<_ACEOF
18708 #line 18708 "configure"
18709 #include "confdefs.h"
18710
18711 /* Override any gcc2 internal prototype to avoid an error.  */
18712 #ifdef __cplusplus
18713 extern "C"
18714 #endif
18715 /* We use char because int might match the return type of a gcc2
18716    builtin and then its argument prototype would still apply.  */
18717 char opendir ();
18718 int
18719 main (void)
18720 {
18721 opendir ();
18722   ;
18723   return 0;
18724 }
18725 _ACEOF
18726 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18727 if { (eval echo "$as_me:18727: \"$ac_link\"") >&5
18728   (eval $ac_link) 2>&5
18729   ac_status=$?
18730   echo "$as_me:18730: \$? = $ac_status" >&5
18731   (exit "$ac_status"); } &&
18732          { ac_try='test -s "conftest$ac_exeext"'
18733   { (eval echo "$as_me:18733: \"$ac_try\"") >&5
18734   (eval $ac_try) 2>&5
18735   ac_status=$?
18736   echo "$as_me:18736: \$? = $ac_status" >&5
18737   (exit "$ac_status"); }; }; then
18738   ac_cv_lib_x_opendir=yes
18739 else
18740   echo "$as_me: failed program was:" >&5
18741 cat "conftest.$ac_ext" >&5
18742 ac_cv_lib_x_opendir=no
18743 fi
18744 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18745 LIBS=$ac_check_lib_save_LIBS
18746 fi
18747 echo "$as_me:18747: result: $ac_cv_lib_x_opendir" >&5
18748 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18749 if test "$ac_cv_lib_x_opendir" = yes; then
18750   LIBS="$LIBS -lx"
18751 fi
18752
18753 fi
18754
18755 echo "$as_me:18755: checking whether time.h and sys/time.h may both be included" >&5
18756 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18757 if test "${ac_cv_header_time+set}" = set; then
18758   echo $ECHO_N "(cached) $ECHO_C" >&6
18759 else
18760   cat >"conftest.$ac_ext" <<_ACEOF
18761 #line 18761 "configure"
18762 #include "confdefs.h"
18763 #include <sys/types.h>
18764 #include <sys/time.h>
18765 #include <time.h>
18766
18767 int
18768 main (void)
18769 {
18770 if ((struct tm *) 0)
18771 return 0;
18772   ;
18773   return 0;
18774 }
18775 _ACEOF
18776 rm -f "conftest.$ac_objext"
18777 if { (eval echo "$as_me:18777: \"$ac_compile\"") >&5
18778   (eval $ac_compile) 2>&5
18779   ac_status=$?
18780   echo "$as_me:18780: \$? = $ac_status" >&5
18781   (exit "$ac_status"); } &&
18782          { ac_try='test -s "conftest.$ac_objext"'
18783   { (eval echo "$as_me:18783: \"$ac_try\"") >&5
18784   (eval $ac_try) 2>&5
18785   ac_status=$?
18786   echo "$as_me:18786: \$? = $ac_status" >&5
18787   (exit "$ac_status"); }; }; then
18788   ac_cv_header_time=yes
18789 else
18790   echo "$as_me: failed program was:" >&5
18791 cat "conftest.$ac_ext" >&5
18792 ac_cv_header_time=no
18793 fi
18794 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18795 fi
18796 echo "$as_me:18796: result: $ac_cv_header_time" >&5
18797 echo "${ECHO_T}$ac_cv_header_time" >&6
18798 if test $ac_cv_header_time = yes; then
18799
18800 cat >>confdefs.h <<\EOF
18801 #define TIME_WITH_SYS_TIME 1
18802 EOF
18803
18804 fi
18805
18806 cf_regex_func=no
18807 cf_regex_libs=
18808 case "$host_os" in
18809 (mingw*)
18810         # -lsystre -ltre -lintl -liconv
18811         echo "$as_me:18811: checking for regcomp in -lsystre" >&5
18812 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
18813 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
18814   echo $ECHO_N "(cached) $ECHO_C" >&6
18815 else
18816   ac_check_lib_save_LIBS=$LIBS
18817 LIBS="-lsystre  $LIBS"
18818 cat >"conftest.$ac_ext" <<_ACEOF
18819 #line 18819 "configure"
18820 #include "confdefs.h"
18821
18822 /* Override any gcc2 internal prototype to avoid an error.  */
18823 #ifdef __cplusplus
18824 extern "C"
18825 #endif
18826 /* We use char because int might match the return type of a gcc2
18827    builtin and then its argument prototype would still apply.  */
18828 char regcomp ();
18829 int
18830 main (void)
18831 {
18832 regcomp ();
18833   ;
18834   return 0;
18835 }
18836 _ACEOF
18837 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18838 if { (eval echo "$as_me:18838: \"$ac_link\"") >&5
18839   (eval $ac_link) 2>&5
18840   ac_status=$?
18841   echo "$as_me:18841: \$? = $ac_status" >&5
18842   (exit "$ac_status"); } &&
18843          { ac_try='test -s "conftest$ac_exeext"'
18844   { (eval echo "$as_me:18844: \"$ac_try\"") >&5
18845   (eval $ac_try) 2>&5
18846   ac_status=$?
18847   echo "$as_me:18847: \$? = $ac_status" >&5
18848   (exit "$ac_status"); }; }; then
18849   ac_cv_lib_systre_regcomp=yes
18850 else
18851   echo "$as_me: failed program was:" >&5
18852 cat "conftest.$ac_ext" >&5
18853 ac_cv_lib_systre_regcomp=no
18854 fi
18855 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18856 LIBS=$ac_check_lib_save_LIBS
18857 fi
18858 echo "$as_me:18858: result: $ac_cv_lib_systre_regcomp" >&5
18859 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
18860 if test "$ac_cv_lib_systre_regcomp" = yes; then
18861
18862                 echo "$as_me:18862: checking for libiconv_open in -liconv" >&5
18863 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
18864 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
18865   echo $ECHO_N "(cached) $ECHO_C" >&6
18866 else
18867   ac_check_lib_save_LIBS=$LIBS
18868 LIBS="-liconv  $LIBS"
18869 cat >"conftest.$ac_ext" <<_ACEOF
18870 #line 18870 "configure"
18871 #include "confdefs.h"
18872
18873 /* Override any gcc2 internal prototype to avoid an error.  */
18874 #ifdef __cplusplus
18875 extern "C"
18876 #endif
18877 /* We use char because int might match the return type of a gcc2
18878    builtin and then its argument prototype would still apply.  */
18879 char libiconv_open ();
18880 int
18881 main (void)
18882 {
18883 libiconv_open ();
18884   ;
18885   return 0;
18886 }
18887 _ACEOF
18888 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18889 if { (eval echo "$as_me:18889: \"$ac_link\"") >&5
18890   (eval $ac_link) 2>&5
18891   ac_status=$?
18892   echo "$as_me:18892: \$? = $ac_status" >&5
18893   (exit "$ac_status"); } &&
18894          { ac_try='test -s "conftest$ac_exeext"'
18895   { (eval echo "$as_me:18895: \"$ac_try\"") >&5
18896   (eval $ac_try) 2>&5
18897   ac_status=$?
18898   echo "$as_me:18898: \$? = $ac_status" >&5
18899   (exit "$ac_status"); }; }; then
18900   ac_cv_lib_iconv_libiconv_open=yes
18901 else
18902   echo "$as_me: failed program was:" >&5
18903 cat "conftest.$ac_ext" >&5
18904 ac_cv_lib_iconv_libiconv_open=no
18905 fi
18906 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18907 LIBS=$ac_check_lib_save_LIBS
18908 fi
18909 echo "$as_me:18909: result: $ac_cv_lib_iconv_libiconv_open" >&5
18910 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
18911 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
18912
18913 cf_add_libs="$LIBS"
18914 # reverse order
18915 cf_add_0lib=
18916 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18917 # filter duplicates
18918 for cf_add_1lib in $cf_add_0lib; do
18919         for cf_add_2lib in $cf_add_libs; do
18920                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18921                         cf_add_1lib=
18922                         break
18923                 fi
18924         done
18925         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18926 done
18927 LIBS="$cf_add_libs"
18928
18929 fi
18930
18931                 echo "$as_me:18931: checking for libintl_gettext in -lintl" >&5
18932 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
18933 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
18934   echo $ECHO_N "(cached) $ECHO_C" >&6
18935 else
18936   ac_check_lib_save_LIBS=$LIBS
18937 LIBS="-lintl  $LIBS"
18938 cat >"conftest.$ac_ext" <<_ACEOF
18939 #line 18939 "configure"
18940 #include "confdefs.h"
18941
18942 /* Override any gcc2 internal prototype to avoid an error.  */
18943 #ifdef __cplusplus
18944 extern "C"
18945 #endif
18946 /* We use char because int might match the return type of a gcc2
18947    builtin and then its argument prototype would still apply.  */
18948 char libintl_gettext ();
18949 int
18950 main (void)
18951 {
18952 libintl_gettext ();
18953   ;
18954   return 0;
18955 }
18956 _ACEOF
18957 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18958 if { (eval echo "$as_me:18958: \"$ac_link\"") >&5
18959   (eval $ac_link) 2>&5
18960   ac_status=$?
18961   echo "$as_me:18961: \$? = $ac_status" >&5
18962   (exit "$ac_status"); } &&
18963          { ac_try='test -s "conftest$ac_exeext"'
18964   { (eval echo "$as_me:18964: \"$ac_try\"") >&5
18965   (eval $ac_try) 2>&5
18966   ac_status=$?
18967   echo "$as_me:18967: \$? = $ac_status" >&5
18968   (exit "$ac_status"); }; }; then
18969   ac_cv_lib_intl_libintl_gettext=yes
18970 else
18971   echo "$as_me: failed program was:" >&5
18972 cat "conftest.$ac_ext" >&5
18973 ac_cv_lib_intl_libintl_gettext=no
18974 fi
18975 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18976 LIBS=$ac_check_lib_save_LIBS
18977 fi
18978 echo "$as_me:18978: result: $ac_cv_lib_intl_libintl_gettext" >&5
18979 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
18980 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
18981
18982 cf_add_libs="$LIBS"
18983 # reverse order
18984 cf_add_0lib=
18985 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18986 # filter duplicates
18987 for cf_add_1lib in $cf_add_0lib; do
18988         for cf_add_2lib in $cf_add_libs; do
18989                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18990                         cf_add_1lib=
18991                         break
18992                 fi
18993         done
18994         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18995 done
18996 LIBS="$cf_add_libs"
18997
18998 fi
18999
19000                 echo "$as_me:19000: checking for tre_regcomp in -ltre" >&5
19001 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19002 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19003   echo $ECHO_N "(cached) $ECHO_C" >&6
19004 else
19005   ac_check_lib_save_LIBS=$LIBS
19006 LIBS="-ltre  $LIBS"
19007 cat >"conftest.$ac_ext" <<_ACEOF
19008 #line 19008 "configure"
19009 #include "confdefs.h"
19010
19011 /* Override any gcc2 internal prototype to avoid an error.  */
19012 #ifdef __cplusplus
19013 extern "C"
19014 #endif
19015 /* We use char because int might match the return type of a gcc2
19016    builtin and then its argument prototype would still apply.  */
19017 char tre_regcomp ();
19018 int
19019 main (void)
19020 {
19021 tre_regcomp ();
19022   ;
19023   return 0;
19024 }
19025 _ACEOF
19026 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19027 if { (eval echo "$as_me:19027: \"$ac_link\"") >&5
19028   (eval $ac_link) 2>&5
19029   ac_status=$?
19030   echo "$as_me:19030: \$? = $ac_status" >&5
19031   (exit "$ac_status"); } &&
19032          { ac_try='test -s "conftest$ac_exeext"'
19033   { (eval echo "$as_me:19033: \"$ac_try\"") >&5
19034   (eval $ac_try) 2>&5
19035   ac_status=$?
19036   echo "$as_me:19036: \$? = $ac_status" >&5
19037   (exit "$ac_status"); }; }; then
19038   ac_cv_lib_tre_tre_regcomp=yes
19039 else
19040   echo "$as_me: failed program was:" >&5
19041 cat "conftest.$ac_ext" >&5
19042 ac_cv_lib_tre_tre_regcomp=no
19043 fi
19044 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19045 LIBS=$ac_check_lib_save_LIBS
19046 fi
19047 echo "$as_me:19047: result: $ac_cv_lib_tre_tre_regcomp" >&5
19048 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19049 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19050
19051 cf_add_libs="$LIBS"
19052 # reverse order
19053 cf_add_0lib=
19054 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19055 # filter duplicates
19056 for cf_add_1lib in $cf_add_0lib; do
19057         for cf_add_2lib in $cf_add_libs; do
19058                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19059                         cf_add_1lib=
19060                         break
19061                 fi
19062         done
19063         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19064 done
19065 LIBS="$cf_add_libs"
19066
19067 fi
19068
19069 cf_add_libs="$LIBS"
19070 # reverse order
19071 cf_add_0lib=
19072 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19073 # filter duplicates
19074 for cf_add_1lib in $cf_add_0lib; do
19075         for cf_add_2lib in $cf_add_libs; do
19076                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19077                         cf_add_1lib=
19078                         break
19079                 fi
19080         done
19081         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19082 done
19083 LIBS="$cf_add_libs"
19084
19085                 cf_regex_func=regcomp
19086
19087 else
19088
19089                 echo "$as_me:19089: checking for regcomp in -lgnurx" >&5
19090 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19091 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19092   echo $ECHO_N "(cached) $ECHO_C" >&6
19093 else
19094   ac_check_lib_save_LIBS=$LIBS
19095 LIBS="-lgnurx  $LIBS"
19096 cat >"conftest.$ac_ext" <<_ACEOF
19097 #line 19097 "configure"
19098 #include "confdefs.h"
19099
19100 /* Override any gcc2 internal prototype to avoid an error.  */
19101 #ifdef __cplusplus
19102 extern "C"
19103 #endif
19104 /* We use char because int might match the return type of a gcc2
19105    builtin and then its argument prototype would still apply.  */
19106 char regcomp ();
19107 int
19108 main (void)
19109 {
19110 regcomp ();
19111   ;
19112   return 0;
19113 }
19114 _ACEOF
19115 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19116 if { (eval echo "$as_me:19116: \"$ac_link\"") >&5
19117   (eval $ac_link) 2>&5
19118   ac_status=$?
19119   echo "$as_me:19119: \$? = $ac_status" >&5
19120   (exit "$ac_status"); } &&
19121          { ac_try='test -s "conftest$ac_exeext"'
19122   { (eval echo "$as_me:19122: \"$ac_try\"") >&5
19123   (eval $ac_try) 2>&5
19124   ac_status=$?
19125   echo "$as_me:19125: \$? = $ac_status" >&5
19126   (exit "$ac_status"); }; }; then
19127   ac_cv_lib_gnurx_regcomp=yes
19128 else
19129   echo "$as_me: failed program was:" >&5
19130 cat "conftest.$ac_ext" >&5
19131 ac_cv_lib_gnurx_regcomp=no
19132 fi
19133 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19134 LIBS=$ac_check_lib_save_LIBS
19135 fi
19136 echo "$as_me:19136: result: $ac_cv_lib_gnurx_regcomp" >&5
19137 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19138 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19139
19140 cf_add_libs="$LIBS"
19141 # reverse order
19142 cf_add_0lib=
19143 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19144 # filter duplicates
19145 for cf_add_1lib in $cf_add_0lib; do
19146         for cf_add_2lib in $cf_add_libs; do
19147                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19148                         cf_add_1lib=
19149                         break
19150                 fi
19151         done
19152         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19153 done
19154 LIBS="$cf_add_libs"
19155
19156                         cf_regex_func=regcomp
19157 fi
19158
19159 fi
19160
19161         ;;
19162 (*)
19163         cf_regex_libs="regex re"
19164         echo "$as_me:19164: checking for regcomp" >&5
19165 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19166 if test "${ac_cv_func_regcomp+set}" = set; then
19167   echo $ECHO_N "(cached) $ECHO_C" >&6
19168 else
19169   cat >"conftest.$ac_ext" <<_ACEOF
19170 #line 19170 "configure"
19171 #include "confdefs.h"
19172 #define regcomp autoconf_temporary
19173 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19174 #undef regcomp
19175
19176 #ifdef __cplusplus
19177 extern "C"
19178 #endif
19179
19180 /* We use char because int might match the return type of a gcc2
19181    builtin and then its argument prototype would still apply.  */
19182 char regcomp (void);
19183
19184 int
19185 main (void)
19186 {
19187
19188 /* The GNU C library defines stubs for functions which it implements
19189     to always fail with ENOSYS.  Some functions are actually named
19190     something starting with __ and the normal name is an alias.  */
19191 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19192 #error found stub for regcomp
19193 #endif
19194
19195         return regcomp ();
19196   ;
19197   return 0;
19198 }
19199 _ACEOF
19200 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19201 if { (eval echo "$as_me:19201: \"$ac_link\"") >&5
19202   (eval $ac_link) 2>&5
19203   ac_status=$?
19204   echo "$as_me:19204: \$? = $ac_status" >&5
19205   (exit "$ac_status"); } &&
19206          { ac_try='test -s "conftest$ac_exeext"'
19207   { (eval echo "$as_me:19207: \"$ac_try\"") >&5
19208   (eval $ac_try) 2>&5
19209   ac_status=$?
19210   echo "$as_me:19210: \$? = $ac_status" >&5
19211   (exit "$ac_status"); }; }; then
19212   ac_cv_func_regcomp=yes
19213 else
19214   echo "$as_me: failed program was:" >&5
19215 cat "conftest.$ac_ext" >&5
19216 ac_cv_func_regcomp=no
19217 fi
19218 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19219 fi
19220 echo "$as_me:19220: result: $ac_cv_func_regcomp" >&5
19221 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19222 if test "$ac_cv_func_regcomp" = yes; then
19223   cf_regex_func=regcomp
19224 else
19225
19226                 for cf_regex_lib in $cf_regex_libs
19227                 do
19228                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19229 echo "$as_me:19229: checking for regcomp in -l$cf_regex_lib" >&5
19230 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19231 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19232   echo $ECHO_N "(cached) $ECHO_C" >&6
19233 else
19234   ac_check_lib_save_LIBS=$LIBS
19235 LIBS="-l$cf_regex_lib  $LIBS"
19236 cat >"conftest.$ac_ext" <<_ACEOF
19237 #line 19237 "configure"
19238 #include "confdefs.h"
19239
19240 /* Override any gcc2 internal prototype to avoid an error.  */
19241 #ifdef __cplusplus
19242 extern "C"
19243 #endif
19244 /* We use char because int might match the return type of a gcc2
19245    builtin and then its argument prototype would still apply.  */
19246 char regcomp ();
19247 int
19248 main (void)
19249 {
19250 regcomp ();
19251   ;
19252   return 0;
19253 }
19254 _ACEOF
19255 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19256 if { (eval echo "$as_me:19256: \"$ac_link\"") >&5
19257   (eval $ac_link) 2>&5
19258   ac_status=$?
19259   echo "$as_me:19259: \$? = $ac_status" >&5
19260   (exit "$ac_status"); } &&
19261          { ac_try='test -s "conftest$ac_exeext"'
19262   { (eval echo "$as_me:19262: \"$ac_try\"") >&5
19263   (eval $ac_try) 2>&5
19264   ac_status=$?
19265   echo "$as_me:19265: \$? = $ac_status" >&5
19266   (exit "$ac_status"); }; }; then
19267   eval "$as_ac_Lib=yes"
19268 else
19269   echo "$as_me: failed program was:" >&5
19270 cat "conftest.$ac_ext" >&5
19271 eval "$as_ac_Lib=no"
19272 fi
19273 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19274 LIBS=$ac_check_lib_save_LIBS
19275 fi
19276 echo "$as_me:19276: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19277 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19278 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19279
19280 cf_add_libs="$LIBS"
19281 # reverse order
19282 cf_add_0lib=
19283 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19284 # filter duplicates
19285 for cf_add_1lib in $cf_add_0lib; do
19286         for cf_add_2lib in $cf_add_libs; do
19287                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19288                         cf_add_1lib=
19289                         break
19290                 fi
19291         done
19292         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19293 done
19294 LIBS="$cf_add_libs"
19295
19296                                         cf_regex_func=regcomp
19297                                         break
19298 fi
19299
19300                 done
19301
19302 fi
19303
19304         ;;
19305 esac
19306
19307 if test "$cf_regex_func" = no ; then
19308         echo "$as_me:19308: checking for compile" >&5
19309 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19310 if test "${ac_cv_func_compile+set}" = set; then
19311   echo $ECHO_N "(cached) $ECHO_C" >&6
19312 else
19313   cat >"conftest.$ac_ext" <<_ACEOF
19314 #line 19314 "configure"
19315 #include "confdefs.h"
19316 #define compile autoconf_temporary
19317 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19318 #undef compile
19319
19320 #ifdef __cplusplus
19321 extern "C"
19322 #endif
19323
19324 /* We use char because int might match the return type of a gcc2
19325    builtin and then its argument prototype would still apply.  */
19326 char compile (void);
19327
19328 int
19329 main (void)
19330 {
19331
19332 /* The GNU C library defines stubs for functions which it implements
19333     to always fail with ENOSYS.  Some functions are actually named
19334     something starting with __ and the normal name is an alias.  */
19335 #if defined (__stub_compile) || defined (__stub___compile)
19336 #error found stub for compile
19337 #endif
19338
19339         return compile ();
19340   ;
19341   return 0;
19342 }
19343 _ACEOF
19344 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19345 if { (eval echo "$as_me:19345: \"$ac_link\"") >&5
19346   (eval $ac_link) 2>&5
19347   ac_status=$?
19348   echo "$as_me:19348: \$? = $ac_status" >&5
19349   (exit "$ac_status"); } &&
19350          { ac_try='test -s "conftest$ac_exeext"'
19351   { (eval echo "$as_me:19351: \"$ac_try\"") >&5
19352   (eval $ac_try) 2>&5
19353   ac_status=$?
19354   echo "$as_me:19354: \$? = $ac_status" >&5
19355   (exit "$ac_status"); }; }; then
19356   ac_cv_func_compile=yes
19357 else
19358   echo "$as_me: failed program was:" >&5
19359 cat "conftest.$ac_ext" >&5
19360 ac_cv_func_compile=no
19361 fi
19362 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19363 fi
19364 echo "$as_me:19364: result: $ac_cv_func_compile" >&5
19365 echo "${ECHO_T}$ac_cv_func_compile" >&6
19366 if test "$ac_cv_func_compile" = yes; then
19367   cf_regex_func=compile
19368 else
19369
19370                 echo "$as_me:19370: checking for compile in -lgen" >&5
19371 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19372 if test "${ac_cv_lib_gen_compile+set}" = set; then
19373   echo $ECHO_N "(cached) $ECHO_C" >&6
19374 else
19375   ac_check_lib_save_LIBS=$LIBS
19376 LIBS="-lgen  $LIBS"
19377 cat >"conftest.$ac_ext" <<_ACEOF
19378 #line 19378 "configure"
19379 #include "confdefs.h"
19380
19381 /* Override any gcc2 internal prototype to avoid an error.  */
19382 #ifdef __cplusplus
19383 extern "C"
19384 #endif
19385 /* We use char because int might match the return type of a gcc2
19386    builtin and then its argument prototype would still apply.  */
19387 char compile ();
19388 int
19389 main (void)
19390 {
19391 compile ();
19392   ;
19393   return 0;
19394 }
19395 _ACEOF
19396 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19397 if { (eval echo "$as_me:19397: \"$ac_link\"") >&5
19398   (eval $ac_link) 2>&5
19399   ac_status=$?
19400   echo "$as_me:19400: \$? = $ac_status" >&5
19401   (exit "$ac_status"); } &&
19402          { ac_try='test -s "conftest$ac_exeext"'
19403   { (eval echo "$as_me:19403: \"$ac_try\"") >&5
19404   (eval $ac_try) 2>&5
19405   ac_status=$?
19406   echo "$as_me:19406: \$? = $ac_status" >&5
19407   (exit "$ac_status"); }; }; then
19408   ac_cv_lib_gen_compile=yes
19409 else
19410   echo "$as_me: failed program was:" >&5
19411 cat "conftest.$ac_ext" >&5
19412 ac_cv_lib_gen_compile=no
19413 fi
19414 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19415 LIBS=$ac_check_lib_save_LIBS
19416 fi
19417 echo "$as_me:19417: result: $ac_cv_lib_gen_compile" >&5
19418 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19419 if test "$ac_cv_lib_gen_compile" = yes; then
19420
19421 cf_add_libs="$LIBS"
19422 # reverse order
19423 cf_add_0lib=
19424 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19425 # filter duplicates
19426 for cf_add_1lib in $cf_add_0lib; do
19427         for cf_add_2lib in $cf_add_libs; do
19428                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19429                         cf_add_1lib=
19430                         break
19431                 fi
19432         done
19433         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19434 done
19435 LIBS="$cf_add_libs"
19436
19437                                 cf_regex_func=compile
19438 fi
19439
19440 fi
19441
19442 fi
19443
19444 if test "$cf_regex_func" = no ; then
19445         { echo "$as_me:19445: WARNING: cannot find regular expression library" >&5
19446 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19447 fi
19448
19449 echo "$as_me:19449: checking for regular-expression headers" >&5
19450 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19451 if test "${cf_cv_regex_hdrs+set}" = set; then
19452   echo $ECHO_N "(cached) $ECHO_C" >&6
19453 else
19454
19455 cf_cv_regex_hdrs=no
19456 case "$cf_regex_func" in
19457 (compile)
19458         for cf_regex_hdr in regexp.h regexpr.h
19459         do
19460                 cat >"conftest.$ac_ext" <<_ACEOF
19461 #line 19461 "configure"
19462 #include "confdefs.h"
19463 #include <$cf_regex_hdr>
19464 int
19465 main (void)
19466 {
19467
19468                         char *p = compile("", "", "", 0);
19469                         int x = step("", "");
19470                         (void)p;
19471                         (void)x;
19472
19473   ;
19474   return 0;
19475 }
19476 _ACEOF
19477 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19478 if { (eval echo "$as_me:19478: \"$ac_link\"") >&5
19479   (eval $ac_link) 2>&5
19480   ac_status=$?
19481   echo "$as_me:19481: \$? = $ac_status" >&5
19482   (exit "$ac_status"); } &&
19483          { ac_try='test -s "conftest$ac_exeext"'
19484   { (eval echo "$as_me:19484: \"$ac_try\"") >&5
19485   (eval $ac_try) 2>&5
19486   ac_status=$?
19487   echo "$as_me:19487: \$? = $ac_status" >&5
19488   (exit "$ac_status"); }; }; then
19489
19490                         cf_cv_regex_hdrs=$cf_regex_hdr
19491                         break
19492
19493 else
19494   echo "$as_me: failed program was:" >&5
19495 cat "conftest.$ac_ext" >&5
19496 fi
19497 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19498         done
19499         ;;
19500 (*)
19501         for cf_regex_hdr in regex.h
19502         do
19503                 cat >"conftest.$ac_ext" <<_ACEOF
19504 #line 19504 "configure"
19505 #include "confdefs.h"
19506 #include <sys/types.h>
19507 #include <$cf_regex_hdr>
19508 int
19509 main (void)
19510 {
19511
19512                         regex_t *p = 0;
19513                         int x = regcomp(p, "", 0);
19514                         int y = regexec(p, "", 0, 0, 0);
19515                         (void)x;
19516                         (void)y;
19517                         regfree(p);
19518
19519   ;
19520   return 0;
19521 }
19522 _ACEOF
19523 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19524 if { (eval echo "$as_me:19524: \"$ac_link\"") >&5
19525   (eval $ac_link) 2>&5
19526   ac_status=$?
19527   echo "$as_me:19527: \$? = $ac_status" >&5
19528   (exit "$ac_status"); } &&
19529          { ac_try='test -s "conftest$ac_exeext"'
19530   { (eval echo "$as_me:19530: \"$ac_try\"") >&5
19531   (eval $ac_try) 2>&5
19532   ac_status=$?
19533   echo "$as_me:19533: \$? = $ac_status" >&5
19534   (exit "$ac_status"); }; }; then
19535
19536                         cf_cv_regex_hdrs=$cf_regex_hdr
19537                         break
19538
19539 else
19540   echo "$as_me: failed program was:" >&5
19541 cat "conftest.$ac_ext" >&5
19542 fi
19543 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19544         done
19545         ;;
19546 esac
19547
19548 fi
19549 echo "$as_me:19549: result: $cf_cv_regex_hdrs" >&5
19550 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
19551
19552 case "$cf_cv_regex_hdrs" in
19553         (no)            { echo "$as_me:19553: WARNING: no regular expression header found" >&5
19554 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
19555         (regex.h)
19556 cat >>confdefs.h <<\EOF
19557 #define HAVE_REGEX_H_FUNCS 1
19558 EOF
19559  ;;
19560         (regexp.h)
19561 cat >>confdefs.h <<\EOF
19562 #define HAVE_REGEXP_H_FUNCS 1
19563 EOF
19564  ;;
19565         (regexpr.h)
19566 cat >>confdefs.h <<\EOF
19567 #define HAVE_REGEXPR_H_FUNCS 1
19568 EOF
19569  ;;
19570 esac
19571
19572 for ac_header in \
19573 fcntl.h \
19574 getopt.h \
19575 limits.h \
19576 locale.h \
19577 math.h \
19578 poll.h \
19579 sys/ioctl.h \
19580 sys/param.h \
19581 sys/poll.h \
19582 sys/select.h \
19583 sys/time.h \
19584 sys/times.h \
19585 ttyent.h \
19586 unistd.h \
19587 wctype.h \
19588
19589 do
19590 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19591 echo "$as_me:19591: checking for $ac_header" >&5
19592 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19593 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19594   echo $ECHO_N "(cached) $ECHO_C" >&6
19595 else
19596   cat >"conftest.$ac_ext" <<_ACEOF
19597 #line 19597 "configure"
19598 #include "confdefs.h"
19599 #include <$ac_header>
19600 _ACEOF
19601 if { (eval echo "$as_me:19601: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19602   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19603   ac_status=$?
19604   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19605   rm -f conftest.er1
19606   cat conftest.err >&5
19607   echo "$as_me:19607: \$? = $ac_status" >&5
19608   (exit "$ac_status"); } >/dev/null; then
19609   if test -s conftest.err; then
19610     ac_cpp_err=$ac_c_preproc_warn_flag
19611   else
19612     ac_cpp_err=
19613   fi
19614 else
19615   ac_cpp_err=yes
19616 fi
19617 if test -z "$ac_cpp_err"; then
19618   eval "$as_ac_Header=yes"
19619 else
19620   echo "$as_me: failed program was:" >&5
19621   cat "conftest.$ac_ext" >&5
19622   eval "$as_ac_Header=no"
19623 fi
19624 rm -f conftest.err "conftest.$ac_ext"
19625 fi
19626 echo "$as_me:19626: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19627 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19628 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19629   cat >>confdefs.h <<EOF
19630 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19631 EOF
19632
19633 fi
19634 done
19635
19636 for ac_header in unistd.h getopt.h
19637 do
19638 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19639 echo "$as_me:19639: checking for $ac_header" >&5
19640 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19641 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19642   echo $ECHO_N "(cached) $ECHO_C" >&6
19643 else
19644   cat >"conftest.$ac_ext" <<_ACEOF
19645 #line 19645 "configure"
19646 #include "confdefs.h"
19647 #include <$ac_header>
19648 _ACEOF
19649 if { (eval echo "$as_me:19649: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19650   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19651   ac_status=$?
19652   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19653   rm -f conftest.er1
19654   cat conftest.err >&5
19655   echo "$as_me:19655: \$? = $ac_status" >&5
19656   (exit "$ac_status"); } >/dev/null; then
19657   if test -s conftest.err; then
19658     ac_cpp_err=$ac_c_preproc_warn_flag
19659   else
19660     ac_cpp_err=
19661   fi
19662 else
19663   ac_cpp_err=yes
19664 fi
19665 if test -z "$ac_cpp_err"; then
19666   eval "$as_ac_Header=yes"
19667 else
19668   echo "$as_me: failed program was:" >&5
19669   cat "conftest.$ac_ext" >&5
19670   eval "$as_ac_Header=no"
19671 fi
19672 rm -f conftest.err "conftest.$ac_ext"
19673 fi
19674 echo "$as_me:19674: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19675 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19676 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19677   cat >>confdefs.h <<EOF
19678 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19679 EOF
19680
19681 fi
19682 done
19683
19684 echo "$as_me:19684: checking for header declaring getopt variables" >&5
19685 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
19686 if test "${cf_cv_getopt_header+set}" = set; then
19687   echo $ECHO_N "(cached) $ECHO_C" >&6
19688 else
19689
19690 cf_cv_getopt_header=none
19691 for cf_header in stdio.h stdlib.h unistd.h getopt.h
19692 do
19693 cat >"conftest.$ac_ext" <<_ACEOF
19694 #line 19694 "configure"
19695 #include "confdefs.h"
19696
19697 #include <$cf_header>
19698 int
19699 main (void)
19700 {
19701 int x = optind; char *y = optarg
19702   ;
19703   return 0;
19704 }
19705 _ACEOF
19706 rm -f "conftest.$ac_objext"
19707 if { (eval echo "$as_me:19707: \"$ac_compile\"") >&5
19708   (eval $ac_compile) 2>&5
19709   ac_status=$?
19710   echo "$as_me:19710: \$? = $ac_status" >&5
19711   (exit "$ac_status"); } &&
19712          { ac_try='test -s "conftest.$ac_objext"'
19713   { (eval echo "$as_me:19713: \"$ac_try\"") >&5
19714   (eval $ac_try) 2>&5
19715   ac_status=$?
19716   echo "$as_me:19716: \$? = $ac_status" >&5
19717   (exit "$ac_status"); }; }; then
19718   cf_cv_getopt_header=$cf_header
19719  break
19720 else
19721   echo "$as_me: failed program was:" >&5
19722 cat "conftest.$ac_ext" >&5
19723 fi
19724 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19725 done
19726
19727 fi
19728 echo "$as_me:19728: result: $cf_cv_getopt_header" >&5
19729 echo "${ECHO_T}$cf_cv_getopt_header" >&6
19730 if test "$cf_cv_getopt_header" != none ; then
19731
19732 cat >>confdefs.h <<\EOF
19733 #define HAVE_GETOPT_HEADER 1
19734 EOF
19735
19736 fi
19737 if test "$cf_cv_getopt_header" = getopt.h ; then
19738
19739 cat >>confdefs.h <<\EOF
19740 #define NEED_GETOPT_H 1
19741 EOF
19742
19743 fi
19744
19745 echo "$as_me:19745: checking if external environ is declared" >&5
19746 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
19747 if test "${cf_cv_dcl_environ+set}" = set; then
19748   echo $ECHO_N "(cached) $ECHO_C" >&6
19749 else
19750
19751     cat >"conftest.$ac_ext" <<_ACEOF
19752 #line 19752 "configure"
19753 #include "confdefs.h"
19754
19755 #ifdef HAVE_STDLIB_H
19756 #include <stdlib.h>
19757 #endif
19758 #include <unistd.h>
19759 int
19760 main (void)
19761 {
19762 int x = (int) environ
19763   ;
19764   return 0;
19765 }
19766 _ACEOF
19767 rm -f "conftest.$ac_objext"
19768 if { (eval echo "$as_me:19768: \"$ac_compile\"") >&5
19769   (eval $ac_compile) 2>&5
19770   ac_status=$?
19771   echo "$as_me:19771: \$? = $ac_status" >&5
19772   (exit "$ac_status"); } &&
19773          { ac_try='test -s "conftest.$ac_objext"'
19774   { (eval echo "$as_me:19774: \"$ac_try\"") >&5
19775   (eval $ac_try) 2>&5
19776   ac_status=$?
19777   echo "$as_me:19777: \$? = $ac_status" >&5
19778   (exit "$ac_status"); }; }; then
19779   cf_cv_dcl_environ=yes
19780 else
19781   echo "$as_me: failed program was:" >&5
19782 cat "conftest.$ac_ext" >&5
19783 cf_cv_dcl_environ=no
19784 fi
19785 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19786
19787 fi
19788 echo "$as_me:19788: result: $cf_cv_dcl_environ" >&5
19789 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
19790
19791 if test "$cf_cv_dcl_environ" = no ; then
19792
19793 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19794
19795     cat >>confdefs.h <<EOF
19796 #define $cf_result 1
19797 EOF
19798
19799 fi
19800
19801 # It's possible (for near-UNIX clones) that the data doesn't exist
19802
19803 echo "$as_me:19803: checking if external environ exists" >&5
19804 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
19805 if test "${cf_cv_have_environ+set}" = set; then
19806   echo $ECHO_N "(cached) $ECHO_C" >&6
19807 else
19808
19809         cat >"conftest.$ac_ext" <<_ACEOF
19810 #line 19810 "configure"
19811 #include "confdefs.h"
19812
19813 #undef environ
19814 extern int environ;
19815
19816 int
19817 main (void)
19818 {
19819 environ = 2
19820   ;
19821   return 0;
19822 }
19823 _ACEOF
19824 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19825 if { (eval echo "$as_me:19825: \"$ac_link\"") >&5
19826   (eval $ac_link) 2>&5
19827   ac_status=$?
19828   echo "$as_me:19828: \$? = $ac_status" >&5
19829   (exit "$ac_status"); } &&
19830          { ac_try='test -s "conftest$ac_exeext"'
19831   { (eval echo "$as_me:19831: \"$ac_try\"") >&5
19832   (eval $ac_try) 2>&5
19833   ac_status=$?
19834   echo "$as_me:19834: \$? = $ac_status" >&5
19835   (exit "$ac_status"); }; }; then
19836   cf_cv_have_environ=yes
19837 else
19838   echo "$as_me: failed program was:" >&5
19839 cat "conftest.$ac_ext" >&5
19840 cf_cv_have_environ=no
19841 fi
19842 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19843
19844 fi
19845 echo "$as_me:19845: result: $cf_cv_have_environ" >&5
19846 echo "${ECHO_T}$cf_cv_have_environ" >&6
19847
19848 if test "$cf_cv_have_environ" = yes ; then
19849
19850 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19851
19852         cat >>confdefs.h <<EOF
19853 #define $cf_result 1
19854 EOF
19855
19856 fi
19857
19858 echo "$as_me:19858: checking for getenv" >&5
19859 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
19860 if test "${ac_cv_func_getenv+set}" = set; then
19861   echo $ECHO_N "(cached) $ECHO_C" >&6
19862 else
19863   cat >"conftest.$ac_ext" <<_ACEOF
19864 #line 19864 "configure"
19865 #include "confdefs.h"
19866 #define getenv autoconf_temporary
19867 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19868 #undef getenv
19869
19870 #ifdef __cplusplus
19871 extern "C"
19872 #endif
19873
19874 /* We use char because int might match the return type of a gcc2
19875    builtin and then its argument prototype would still apply.  */
19876 char getenv (void);
19877
19878 int
19879 main (void)
19880 {
19881
19882 /* The GNU C library defines stubs for functions which it implements
19883     to always fail with ENOSYS.  Some functions are actually named
19884     something starting with __ and the normal name is an alias.  */
19885 #if defined (__stub_getenv) || defined (__stub___getenv)
19886 #error found stub for getenv
19887 #endif
19888
19889         return getenv ();
19890   ;
19891   return 0;
19892 }
19893 _ACEOF
19894 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19895 if { (eval echo "$as_me:19895: \"$ac_link\"") >&5
19896   (eval $ac_link) 2>&5
19897   ac_status=$?
19898   echo "$as_me:19898: \$? = $ac_status" >&5
19899   (exit "$ac_status"); } &&
19900          { ac_try='test -s "conftest$ac_exeext"'
19901   { (eval echo "$as_me:19901: \"$ac_try\"") >&5
19902   (eval $ac_try) 2>&5
19903   ac_status=$?
19904   echo "$as_me:19904: \$? = $ac_status" >&5
19905   (exit "$ac_status"); }; }; then
19906   ac_cv_func_getenv=yes
19907 else
19908   echo "$as_me: failed program was:" >&5
19909 cat "conftest.$ac_ext" >&5
19910 ac_cv_func_getenv=no
19911 fi
19912 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19913 fi
19914 echo "$as_me:19914: result: $ac_cv_func_getenv" >&5
19915 echo "${ECHO_T}$ac_cv_func_getenv" >&6
19916
19917 for ac_func in putenv setenv strdup
19918 do
19919 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19920 echo "$as_me:19920: checking for $ac_func" >&5
19921 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19922 if eval "test \"\${$as_ac_var+set}\" = set"; then
19923   echo $ECHO_N "(cached) $ECHO_C" >&6
19924 else
19925   cat >"conftest.$ac_ext" <<_ACEOF
19926 #line 19926 "configure"
19927 #include "confdefs.h"
19928 #define $ac_func autoconf_temporary
19929 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19930 #undef $ac_func
19931
19932 #ifdef __cplusplus
19933 extern "C"
19934 #endif
19935
19936 /* We use char because int might match the return type of a gcc2
19937    builtin and then its argument prototype would still apply.  */
19938 char $ac_func (void);
19939
19940 int
19941 main (void)
19942 {
19943
19944 /* The GNU C library defines stubs for functions which it implements
19945     to always fail with ENOSYS.  Some functions are actually named
19946     something starting with __ and the normal name is an alias.  */
19947 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19948 #error found stub for $ac_func
19949 #endif
19950
19951         return $ac_func ();
19952   ;
19953   return 0;
19954 }
19955 _ACEOF
19956 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19957 if { (eval echo "$as_me:19957: \"$ac_link\"") >&5
19958   (eval $ac_link) 2>&5
19959   ac_status=$?
19960   echo "$as_me:19960: \$? = $ac_status" >&5
19961   (exit "$ac_status"); } &&
19962          { ac_try='test -s "conftest$ac_exeext"'
19963   { (eval echo "$as_me:19963: \"$ac_try\"") >&5
19964   (eval $ac_try) 2>&5
19965   ac_status=$?
19966   echo "$as_me:19966: \$? = $ac_status" >&5
19967   (exit "$ac_status"); }; }; then
19968   eval "$as_ac_var=yes"
19969 else
19970   echo "$as_me: failed program was:" >&5
19971 cat "conftest.$ac_ext" >&5
19972 eval "$as_ac_var=no"
19973 fi
19974 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19975 fi
19976 echo "$as_me:19976: result: `eval echo '${'"$as_ac_var"'}'`" >&5
19977 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
19978 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
19979   cat >>confdefs.h <<EOF
19980 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19981 EOF
19982
19983 fi
19984 done
19985
19986 echo "$as_me:19986: checking if getenv returns consistent values" >&5
19987 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
19988 if test "${cf_cv_consistent_getenv+set}" = set; then
19989   echo $ECHO_N "(cached) $ECHO_C" >&6
19990 else
19991
19992 if test "$cross_compiling" = yes; then
19993   cf_cv_consistent_getenv=unknown
19994 else
19995   cat >"conftest.$ac_ext" <<_ACEOF
19996 #line 19996 "configure"
19997 #include "confdefs.h"
19998
19999 #include <stdlib.h>
20000 #include <unistd.h>
20001 #include <stdio.h>
20002 #include <string.h>
20003 #include <sys/types.h>
20004
20005 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20006 extern char **environ;  /* POSIX, but some systems are not... */
20007 #endif
20008
20009 #if defined(HAVE_STRDUP)
20010 #define str_alloc(s) strdup(s)
20011 #else
20012 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20013 #endif
20014
20015 static void set_value(const char *name, const char *value)
20016 {
20017 #if defined(HAVE_SETENV)
20018         setenv(name, value, 1);
20019 #elif defined(HAVE_PUTENV)
20020         char buffer[1024];
20021         sprintf(buffer, "%s=%s", name, value);
20022         putenv(str_alloc(buffer));
20023 #else
20024 #error neither putenv/setenv found
20025 #endif
20026 }
20027 int main(void)
20028 {
20029         int pass;
20030         size_t numenv, limit, j;
20031         char **mynames;
20032         char **myvalues;
20033         char **mypointer;
20034         char *equals;
20035         for (numenv = 0; environ[numenv]; ++numenv) ;
20036         limit = numenv + 10;
20037         mynames = (char **) calloc(limit + 1, sizeof(char *));
20038         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20039         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20040 #if defined(HAVE_ENVIRON)
20041         for (j = 0; environ[j]; ++j) {
20042                 mynames[j] = str_alloc(environ[j]);
20043                 equals = strchr(mynames[j], '=');
20044                 if (equals != 0) {
20045                         *equals++ = '\\0';
20046                         myvalues[j] = str_alloc(equals);
20047                 } else {
20048                         myvalues[j] = str_alloc("");
20049                 }
20050         }
20051 #endif
20052         for (j = numenv; j < limit; ++j) {
20053                 char name[80];
20054                 char value[80];
20055                 size_t found;
20056                 size_t k = 0;
20057                 do {
20058                         size_t jk;
20059                         found = 0;
20060                         sprintf(name, "TERM%lu", (unsigned long) k);
20061                         for (jk = 0; jk < j; ++jk) {
20062                                 if (!strcmp(name, mynames[jk])) {
20063                                         found = 1;
20064                                         ++k;
20065                                         break;
20066                                 }
20067                         }
20068                 } while (found);
20069                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20070                 set_value(name, value);
20071                 mynames[j] = str_alloc(name);
20072                 myvalues[j] = str_alloc(value);
20073         }
20074         for (pass = 0; pass < 3; ++pass) {
20075                 for (j = 0; j < limit; ++j) {
20076                         char *value = getenv(mynames[j]);
20077                         if (pass) {
20078                                 if (value == 0) {
20079                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20080                                         ${cf_cv_main_return:-return}(1);
20081                                 } else if (value != mypointer[j]) {
20082                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20083                                         ${cf_cv_main_return:-return}(1);
20084                                 } else if (strcmp(value, myvalues[j])) {
20085                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20086                                         ${cf_cv_main_return:-return}(1);
20087                                 }
20088                         } else {
20089                                 size_t k;
20090                                 mypointer[j] = value;
20091                                 for (k = 0; k < j; ++k) {
20092                                         if (mypointer[j] == mypointer[k]) {
20093                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20094                                                 ${cf_cv_main_return:-return}(1);
20095                                         }
20096                                 }
20097                         }
20098                 }
20099         }
20100         ${cf_cv_main_return:-return}(0);
20101 }
20102
20103 _ACEOF
20104 rm -f "conftest$ac_exeext"
20105 if { (eval echo "$as_me:20105: \"$ac_link\"") >&5
20106   (eval $ac_link) 2>&5
20107   ac_status=$?
20108   echo "$as_me:20108: \$? = $ac_status" >&5
20109   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20110   { (eval echo "$as_me:20110: \"$ac_try\"") >&5
20111   (eval $ac_try) 2>&5
20112   ac_status=$?
20113   echo "$as_me:20113: \$? = $ac_status" >&5
20114   (exit "$ac_status"); }; }; then
20115   cf_cv_consistent_getenv=yes
20116 else
20117   echo "$as_me: program exited with status $ac_status" >&5
20118 echo "$as_me: failed program was:" >&5
20119 cat "conftest.$ac_ext" >&5
20120 cf_cv_consistent_getenv=no
20121 fi
20122 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20123 fi
20124
20125 fi
20126 echo "$as_me:20126: result: $cf_cv_consistent_getenv" >&5
20127 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20128
20129 if test "x$cf_cv_consistent_getenv" = xno
20130 then
20131
20132 cat >>confdefs.h <<\EOF
20133 #define HAVE_CONSISTENT_GETENV 1
20134 EOF
20135
20136 fi
20137
20138 if test "x$cf_cv_consistent_getenv" = xno && \
20139         test "x$cf_with_trace" = xyes
20140 then
20141         { echo "$as_me:20141: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20142 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20143 fi
20144
20145 echo "$as_me:20145: checking if sys/time.h works with sys/select.h" >&5
20146 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20147 if test "${cf_cv_sys_time_select+set}" = set; then
20148   echo $ECHO_N "(cached) $ECHO_C" >&6
20149 else
20150
20151 cat >"conftest.$ac_ext" <<_ACEOF
20152 #line 20152 "configure"
20153 #include "confdefs.h"
20154
20155 #include <sys/types.h>
20156 #ifdef HAVE_SYS_TIME_H
20157 #include <sys/time.h>
20158 #endif
20159 #ifdef HAVE_SYS_SELECT_H
20160 #include <sys/select.h>
20161 #endif
20162
20163 int
20164 main (void)
20165 {
20166
20167   ;
20168   return 0;
20169 }
20170 _ACEOF
20171 rm -f "conftest.$ac_objext"
20172 if { (eval echo "$as_me:20172: \"$ac_compile\"") >&5
20173   (eval $ac_compile) 2>&5
20174   ac_status=$?
20175   echo "$as_me:20175: \$? = $ac_status" >&5
20176   (exit "$ac_status"); } &&
20177          { ac_try='test -s "conftest.$ac_objext"'
20178   { (eval echo "$as_me:20178: \"$ac_try\"") >&5
20179   (eval $ac_try) 2>&5
20180   ac_status=$?
20181   echo "$as_me:20181: \$? = $ac_status" >&5
20182   (exit "$ac_status"); }; }; then
20183   cf_cv_sys_time_select=yes
20184 else
20185   echo "$as_me: failed program was:" >&5
20186 cat "conftest.$ac_ext" >&5
20187 cf_cv_sys_time_select=no
20188 fi
20189 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20190
20191 fi
20192
20193 echo "$as_me:20193: result: $cf_cv_sys_time_select" >&5
20194 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20195 test "$cf_cv_sys_time_select" = yes &&
20196 cat >>confdefs.h <<\EOF
20197 #define HAVE_SYS_TIME_SELECT 1
20198 EOF
20199
20200 ###     checks for compiler characteristics
20201 ac_ext=c
20202 ac_cpp='$CPP $CPPFLAGS'
20203 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20204 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20205 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20206 ac_main_return="return"
20207
20208 echo "$as_me:20208: checking for an ANSI C-conforming const" >&5
20209 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20210 if test "${ac_cv_c_const+set}" = set; then
20211   echo $ECHO_N "(cached) $ECHO_C" >&6
20212 else
20213   cat >"conftest.$ac_ext" <<_ACEOF
20214 #line 20214 "configure"
20215 #include "confdefs.h"
20216
20217 int
20218 main (void)
20219 {
20220 /* FIXME: Include the comments suggested by Paul. */
20221 #ifndef __cplusplus
20222   /* Ultrix mips cc rejects this.  */
20223   typedef int charset[2];
20224   const charset x;
20225   /* SunOS 4.1.1 cc rejects this.  */
20226   char const *const *ccp;
20227   char **p;
20228   /* NEC SVR4.0.2 mips cc rejects this.  */
20229   struct point {int x, y;};
20230   static struct point const zero = {0,0};
20231   /* AIX XL C 1.02.0.0 rejects this.
20232      It does not let you subtract one const X* pointer from another in
20233      an arm of an if-expression whose if-part is not a constant
20234      expression */
20235   const char *g = "string";
20236   ccp = &g + (g ? g-g : 0);
20237   /* HPUX 7.0 cc rejects these. */
20238   ++ccp;
20239   p = (char**) ccp;
20240   ccp = (char const *const *) p;
20241   { /* SCO 3.2v4 cc rejects this.  */
20242     char *t;
20243     char const *s = 0 ? (char *) 0 : (char const *) 0;
20244
20245     *t++ = 0;
20246   }
20247   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20248     int x[] = {25, 17};
20249     const int *foo = &x[0];
20250     ++foo;
20251   }
20252   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20253     typedef const int *iptr;
20254     iptr p = 0;
20255     ++p;
20256   }
20257   { /* AIX XL C 1.02.0.0 rejects this saying
20258        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20259     struct s { int j; const int *ap[3]; };
20260     struct s *b; b->j = 5;
20261   }
20262   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20263     const int foo = 10;
20264   }
20265 #endif
20266
20267   ;
20268   return 0;
20269 }
20270 _ACEOF
20271 rm -f "conftest.$ac_objext"
20272 if { (eval echo "$as_me:20272: \"$ac_compile\"") >&5
20273   (eval $ac_compile) 2>&5
20274   ac_status=$?
20275   echo "$as_me:20275: \$? = $ac_status" >&5
20276   (exit "$ac_status"); } &&
20277          { ac_try='test -s "conftest.$ac_objext"'
20278   { (eval echo "$as_me:20278: \"$ac_try\"") >&5
20279   (eval $ac_try) 2>&5
20280   ac_status=$?
20281   echo "$as_me:20281: \$? = $ac_status" >&5
20282   (exit "$ac_status"); }; }; then
20283   ac_cv_c_const=yes
20284 else
20285   echo "$as_me: failed program was:" >&5
20286 cat "conftest.$ac_ext" >&5
20287 ac_cv_c_const=no
20288 fi
20289 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20290 fi
20291 echo "$as_me:20291: result: $ac_cv_c_const" >&5
20292 echo "${ECHO_T}$ac_cv_c_const" >&6
20293 if test $ac_cv_c_const = no; then
20294
20295 cat >>confdefs.h <<\EOF
20296 #define const
20297 EOF
20298
20299 fi
20300
20301 echo "$as_me:20301: checking for inline" >&5
20302 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20303 if test "${ac_cv_c_inline+set}" = set; then
20304   echo $ECHO_N "(cached) $ECHO_C" >&6
20305 else
20306   ac_cv_c_inline=no
20307 for ac_kw in inline __inline__ __inline; do
20308   cat >"conftest.$ac_ext" <<_ACEOF
20309 #line 20309 "configure"
20310 #include "confdefs.h"
20311 #ifndef __cplusplus
20312 static $ac_kw int static_foo () {return 0; }
20313 $ac_kw int foo () {return 0; }
20314 #endif
20315
20316 _ACEOF
20317 rm -f "conftest.$ac_objext"
20318 if { (eval echo "$as_me:20318: \"$ac_compile\"") >&5
20319   (eval $ac_compile) 2>&5
20320   ac_status=$?
20321   echo "$as_me:20321: \$? = $ac_status" >&5
20322   (exit "$ac_status"); } &&
20323          { ac_try='test -s "conftest.$ac_objext"'
20324   { (eval echo "$as_me:20324: \"$ac_try\"") >&5
20325   (eval $ac_try) 2>&5
20326   ac_status=$?
20327   echo "$as_me:20327: \$? = $ac_status" >&5
20328   (exit "$ac_status"); }; }; then
20329   ac_cv_c_inline=$ac_kw; break
20330 else
20331   echo "$as_me: failed program was:" >&5
20332 cat "conftest.$ac_ext" >&5
20333 fi
20334 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20335 done
20336
20337 fi
20338 echo "$as_me:20338: result: $ac_cv_c_inline" >&5
20339 echo "${ECHO_T}$ac_cv_c_inline" >&6
20340 case $ac_cv_c_inline in
20341   inline | yes) ;;
20342   no)
20343 cat >>confdefs.h <<\EOF
20344 #define inline
20345 EOF
20346  ;;
20347   *)  cat >>confdefs.h <<EOF
20348 #define inline $ac_cv_c_inline
20349 EOF
20350  ;;
20351 esac
20352
20353 NCURSES_INLINE=
20354 if test "$ac_cv_c_inline" != no ; then
20355         NCURSES_INLINE=inline
20356         if test "$INTEL_COMPILER" = yes
20357         then
20358                 :
20359         elif test "$CLANG_COMPILER" = yes
20360         then
20361                 :
20362         elif test "$GCC" = yes
20363         then
20364                 echo "$as_me:20364: checking if $CC supports options to tune inlining" >&5
20365 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20366 if test "${cf_cv_gcc_inline+set}" = set; then
20367   echo $ECHO_N "(cached) $ECHO_C" >&6
20368 else
20369
20370                 cf_save_CFLAGS=$CFLAGS
20371                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20372                 cat >"conftest.$ac_ext" <<_ACEOF
20373 #line 20373 "configure"
20374 #include "confdefs.h"
20375 inline int foo(void) { return 1; }
20376 int
20377 main (void)
20378 {
20379 ${cf_cv_main_return:-return} foo()
20380   ;
20381   return 0;
20382 }
20383 _ACEOF
20384 rm -f "conftest.$ac_objext"
20385 if { (eval echo "$as_me:20385: \"$ac_compile\"") >&5
20386   (eval $ac_compile) 2>&5
20387   ac_status=$?
20388   echo "$as_me:20388: \$? = $ac_status" >&5
20389   (exit "$ac_status"); } &&
20390          { ac_try='test -s "conftest.$ac_objext"'
20391   { (eval echo "$as_me:20391: \"$ac_try\"") >&5
20392   (eval $ac_try) 2>&5
20393   ac_status=$?
20394   echo "$as_me:20394: \$? = $ac_status" >&5
20395   (exit "$ac_status"); }; }; then
20396   cf_cv_gcc_inline=yes
20397 else
20398   echo "$as_me: failed program was:" >&5
20399 cat "conftest.$ac_ext" >&5
20400 cf_cv_gcc_inline=no
20401 fi
20402 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20403                 CFLAGS=$cf_save_CFLAGS
20404
20405 fi
20406 echo "$as_me:20406: result: $cf_cv_gcc_inline" >&5
20407 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20408                 if test "$cf_cv_gcc_inline" = yes ; then
20409
20410 cf_fix_cppflags=no
20411 cf_new_cflags=
20412 cf_new_cppflags=
20413 cf_new_extra_cppflags=
20414
20415 for cf_add_cflags in --param max-inline-insns-single=1200
20416 do
20417 case "$cf_fix_cppflags" in
20418 (no)
20419         case "$cf_add_cflags" in
20420         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20421                 case "$cf_add_cflags" in
20422                 (-D*)
20423                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20424
20425                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20426                                 && test -z "${cf_tst_cflags}" \
20427                                 && cf_fix_cppflags=yes
20428
20429                         if test "$cf_fix_cppflags" = yes ; then
20430
20431         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20432         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20433
20434                                 continue
20435                         elif test "${cf_tst_cflags}" = "\"'" ; then
20436
20437         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20438         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20439
20440                                 continue
20441                         fi
20442                         ;;
20443                 esac
20444                 case "$CPPFLAGS" in
20445                 (*$cf_add_cflags)
20446                         ;;
20447                 (*)
20448                         case "$cf_add_cflags" in
20449                         (-D*)
20450                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20451
20452 CPPFLAGS=`echo "$CPPFLAGS" | \
20453         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20454                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20455
20456                                 ;;
20457                         esac
20458
20459         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20460         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20461
20462                         ;;
20463                 esac
20464                 ;;
20465         (*)
20466
20467         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20468         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20469
20470                 ;;
20471         esac
20472         ;;
20473 (yes)
20474
20475         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20476         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20477
20478         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20479
20480         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20481                 && test -z "${cf_tst_cflags}" \
20482                 && cf_fix_cppflags=no
20483         ;;
20484 esac
20485 done
20486
20487 if test -n "$cf_new_cflags" ; then
20488
20489         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20490         CFLAGS="${CFLAGS}$cf_new_cflags"
20491
20492 fi
20493
20494 if test -n "$cf_new_cppflags" ; then
20495
20496         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20497         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20498
20499 fi
20500
20501 if test -n "$cf_new_extra_cppflags" ; then
20502
20503         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20504         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20505
20506 fi
20507
20508                 fi
20509         fi
20510 fi
20511
20512 echo "$as_me:20512: checking for signal global datatype" >&5
20513 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20514 if test "${cf_cv_sig_atomic_t+set}" = set; then
20515   echo $ECHO_N "(cached) $ECHO_C" >&6
20516 else
20517
20518         for cf_type in \
20519                 "volatile sig_atomic_t" \
20520                 "sig_atomic_t" \
20521                 "int"
20522         do
20523         cat >"conftest.$ac_ext" <<_ACEOF
20524 #line 20524 "configure"
20525 #include "confdefs.h"
20526
20527 #include <sys/types.h>
20528 #include <signal.h>
20529 #include <stdio.h>
20530
20531 extern $cf_type x;
20532 $cf_type x;
20533 static void handler(int sig)
20534 {
20535         (void)sig;
20536         x = 5;
20537 }
20538 int
20539 main (void)
20540 {
20541 signal(SIGINT, handler);
20542                  x = 1
20543   ;
20544   return 0;
20545 }
20546 _ACEOF
20547 rm -f "conftest.$ac_objext"
20548 if { (eval echo "$as_me:20548: \"$ac_compile\"") >&5
20549   (eval $ac_compile) 2>&5
20550   ac_status=$?
20551   echo "$as_me:20551: \$? = $ac_status" >&5
20552   (exit "$ac_status"); } &&
20553          { ac_try='test -s "conftest.$ac_objext"'
20554   { (eval echo "$as_me:20554: \"$ac_try\"") >&5
20555   (eval $ac_try) 2>&5
20556   ac_status=$?
20557   echo "$as_me:20557: \$? = $ac_status" >&5
20558   (exit "$ac_status"); }; }; then
20559   cf_cv_sig_atomic_t=$cf_type
20560 else
20561   echo "$as_me: failed program was:" >&5
20562 cat "conftest.$ac_ext" >&5
20563 cf_cv_sig_atomic_t=no
20564 fi
20565 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20566                 test "$cf_cv_sig_atomic_t" != no && break
20567         done
20568
20569 fi
20570
20571 echo "$as_me:20571: result: $cf_cv_sig_atomic_t" >&5
20572 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
20573 test "$cf_cv_sig_atomic_t" != no &&
20574 cat >>confdefs.h <<EOF
20575 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
20576 EOF
20577
20578 if test "$NCURSES_CHTYPE" = auto ; then
20579
20580 echo "$as_me:20580: checking for type of chtype" >&5
20581 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
20582 if test "${cf_cv_typeof_chtype+set}" = set; then
20583   echo $ECHO_N "(cached) $ECHO_C" >&6
20584 else
20585
20586                 if test "$cross_compiling" = yes; then
20587   cf_cv_typeof_chtype=long
20588 else
20589   cat >"conftest.$ac_ext" <<_ACEOF
20590 #line 20590 "configure"
20591 #include "confdefs.h"
20592
20593 #define WANT_BITS 31
20594 #include <stdio.h>
20595 int main(void)
20596 {
20597         FILE *fp = fopen("cf_test.out", "w");
20598         if (fp != 0) {
20599                 char *result = "long";
20600                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
20601                         int n;
20602                         unsigned int x, y;
20603                         for (n = 0; n < WANT_BITS; n++) {
20604                                 x = (1 << n);
20605                                 y = (x >> n);
20606                                 if (y != 1 || x == 0) {
20607                                         x = 0;
20608                                         break;
20609                                 }
20610                         }
20611                         /*
20612                          * If x is nonzero, an int is big enough for the bits
20613                          * that we want.
20614                          */
20615                         result = (x != 0) ? "int" : "long";
20616                 }
20617                 fputs(result, fp);
20618                 fclose(fp);
20619         }
20620         ${cf_cv_main_return:-return}(0);
20621 }
20622
20623 _ACEOF
20624 rm -f "conftest$ac_exeext"
20625 if { (eval echo "$as_me:20625: \"$ac_link\"") >&5
20626   (eval $ac_link) 2>&5
20627   ac_status=$?
20628   echo "$as_me:20628: \$? = $ac_status" >&5
20629   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20630   { (eval echo "$as_me:20630: \"$ac_try\"") >&5
20631   (eval $ac_try) 2>&5
20632   ac_status=$?
20633   echo "$as_me:20633: \$? = $ac_status" >&5
20634   (exit "$ac_status"); }; }; then
20635   cf_cv_typeof_chtype=`cat cf_test.out`
20636 else
20637   echo "$as_me: program exited with status $ac_status" >&5
20638 echo "$as_me: failed program was:" >&5
20639 cat "conftest.$ac_ext" >&5
20640 cf_cv_typeof_chtype=long
20641 fi
20642 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20643 fi
20644                 rm -f cf_test.out
20645
20646 fi
20647
20648 echo "$as_me:20648: result: $cf_cv_typeof_chtype" >&5
20649 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
20650
20651 cat >>confdefs.h <<EOF
20652 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
20653 EOF
20654
20655 else
20656         cf_cv_typeof_chtype=$NCURSES_CHTYPE
20657 fi
20658 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
20659
20660 echo "$as_me:20660: checking if unsigned literals are legal" >&5
20661 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
20662 if test "${cf_cv_unsigned_literals+set}" = set; then
20663   echo $ECHO_N "(cached) $ECHO_C" >&6
20664 else
20665
20666         cat >"conftest.$ac_ext" <<_ACEOF
20667 #line 20667 "configure"
20668 #include "confdefs.h"
20669
20670 int
20671 main (void)
20672 {
20673 long x = 1L + 1UL + 1U + 1
20674   ;
20675   return 0;
20676 }
20677 _ACEOF
20678 rm -f "conftest.$ac_objext"
20679 if { (eval echo "$as_me:20679: \"$ac_compile\"") >&5
20680   (eval $ac_compile) 2>&5
20681   ac_status=$?
20682   echo "$as_me:20682: \$? = $ac_status" >&5
20683   (exit "$ac_status"); } &&
20684          { ac_try='test -s "conftest.$ac_objext"'
20685   { (eval echo "$as_me:20685: \"$ac_try\"") >&5
20686   (eval $ac_try) 2>&5
20687   ac_status=$?
20688   echo "$as_me:20688: \$? = $ac_status" >&5
20689   (exit "$ac_status"); }; }; then
20690   cf_cv_unsigned_literals=yes
20691 else
20692   echo "$as_me: failed program was:" >&5
20693 cat "conftest.$ac_ext" >&5
20694 cf_cv_unsigned_literals=no
20695 fi
20696 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20697
20698 fi
20699
20700 echo "$as_me:20700: result: $cf_cv_unsigned_literals" >&5
20701 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
20702
20703 cf_cv_1UL="1"
20704 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
20705 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
20706
20707 if test "$NCURSES_MMASK_T" = auto ; then
20708         cf_cv_typeof_mmask_t=long
20709 else
20710         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
20711 fi
20712 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
20713
20714 ###     Checks for external-data
20715
20716 echo "$as_me:20716: checking if external errno is declared" >&5
20717 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
20718 if test "${cf_cv_dcl_errno+set}" = set; then
20719   echo $ECHO_N "(cached) $ECHO_C" >&6
20720 else
20721
20722         cat >"conftest.$ac_ext" <<_ACEOF
20723 #line 20723 "configure"
20724 #include "confdefs.h"
20725
20726 #ifdef HAVE_STDLIB_H
20727 #include <stdlib.h>
20728 #endif
20729 #include <stdio.h>
20730 #include <sys/types.h>
20731 #include <errno.h>
20732 int
20733 main (void)
20734 {
20735 int x = (int) errno; (void)x
20736   ;
20737   return 0;
20738 }
20739 _ACEOF
20740 rm -f "conftest.$ac_objext"
20741 if { (eval echo "$as_me:20741: \"$ac_compile\"") >&5
20742   (eval $ac_compile) 2>&5
20743   ac_status=$?
20744   echo "$as_me:20744: \$? = $ac_status" >&5
20745   (exit "$ac_status"); } &&
20746          { ac_try='test -s "conftest.$ac_objext"'
20747   { (eval echo "$as_me:20747: \"$ac_try\"") >&5
20748   (eval $ac_try) 2>&5
20749   ac_status=$?
20750   echo "$as_me:20750: \$? = $ac_status" >&5
20751   (exit "$ac_status"); }; }; then
20752   cf_cv_dcl_errno=yes
20753 else
20754   echo "$as_me: failed program was:" >&5
20755 cat "conftest.$ac_ext" >&5
20756 cf_cv_dcl_errno=no
20757 fi
20758 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20759
20760 fi
20761 echo "$as_me:20761: result: $cf_cv_dcl_errno" >&5
20762 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
20763
20764 if test "$cf_cv_dcl_errno" = no ; then
20765
20766 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20767
20768         cat >>confdefs.h <<EOF
20769 #define $cf_result 1
20770 EOF
20771
20772 fi
20773
20774 # It's possible (for near-UNIX clones) that the data doesn't exist
20775
20776 echo "$as_me:20776: checking if external errno exists" >&5
20777 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
20778 if test "${cf_cv_have_errno+set}" = set; then
20779   echo $ECHO_N "(cached) $ECHO_C" >&6
20780 else
20781
20782         cat >"conftest.$ac_ext" <<_ACEOF
20783 #line 20783 "configure"
20784 #include "confdefs.h"
20785
20786 #undef errno
20787 extern int errno;
20788
20789 int
20790 main (void)
20791 {
20792 errno = 2
20793   ;
20794   return 0;
20795 }
20796 _ACEOF
20797 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20798 if { (eval echo "$as_me:20798: \"$ac_link\"") >&5
20799   (eval $ac_link) 2>&5
20800   ac_status=$?
20801   echo "$as_me:20801: \$? = $ac_status" >&5
20802   (exit "$ac_status"); } &&
20803          { ac_try='test -s "conftest$ac_exeext"'
20804   { (eval echo "$as_me:20804: \"$ac_try\"") >&5
20805   (eval $ac_try) 2>&5
20806   ac_status=$?
20807   echo "$as_me:20807: \$? = $ac_status" >&5
20808   (exit "$ac_status"); }; }; then
20809   cf_cv_have_errno=yes
20810 else
20811   echo "$as_me: failed program was:" >&5
20812 cat "conftest.$ac_ext" >&5
20813 cf_cv_have_errno=no
20814 fi
20815 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20816
20817 fi
20818 echo "$as_me:20818: result: $cf_cv_have_errno" >&5
20819 echo "${ECHO_T}$cf_cv_have_errno" >&6
20820
20821 if test "$cf_cv_have_errno" = yes ; then
20822
20823 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20824
20825         cat >>confdefs.h <<EOF
20826 #define $cf_result 1
20827 EOF
20828
20829 fi
20830
20831 echo "$as_me:20831: checking if data-only library module links" >&5
20832 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
20833 if test "${cf_cv_link_dataonly+set}" = set; then
20834   echo $ECHO_N "(cached) $ECHO_C" >&6
20835 else
20836
20837         rm -f conftest.a
20838         cat >conftest.$ac_ext <<EOF
20839 #line 20839 "configure"
20840 int     testdata[3] = { 123, 456, 789 };
20841 EOF
20842         if { (eval echo "$as_me:20842: \"$ac_compile\"") >&5
20843   (eval $ac_compile) 2>&5
20844   ac_status=$?
20845   echo "$as_me:20845: \$? = $ac_status" >&5
20846   (exit "$ac_status"); } ; then
20847                 mv conftest.o data.o && \
20848                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20849         fi
20850         rm -f conftest.$ac_ext data.o
20851         cat >conftest.$ac_ext <<EOF
20852 #line 20852 "configure"
20853 int     testfunc(void)
20854 {
20855 #if defined(NeXT)
20856         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
20857 #else
20858         extern int testdata[3];
20859         return testdata[0] == 123
20860            &&  testdata[1] == 456
20861            &&  testdata[2] == 789;
20862 #endif
20863 }
20864 EOF
20865         if { (eval echo "$as_me:20865: \"$ac_compile\"") >&5
20866   (eval $ac_compile) 2>&5
20867   ac_status=$?
20868   echo "$as_me:20868: \$? = $ac_status" >&5
20869   (exit "$ac_status"); }; then
20870                 mv conftest.o func.o && \
20871                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
20872         fi
20873         rm -f conftest.$ac_ext func.o
20874         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
20875         cf_saveLIBS="$LIBS"
20876         LIBS="conftest.a $LIBS"
20877         if test "$cross_compiling" = yes; then
20878   cf_cv_link_dataonly=unknown
20879 else
20880   cat >"conftest.$ac_ext" <<_ACEOF
20881 #line 20881 "configure"
20882 #include "confdefs.h"
20883
20884         int main(void)
20885         {
20886                 extern int testfunc();
20887                 ${cf_cv_main_return:-return} (!testfunc());
20888         }
20889
20890 _ACEOF
20891 rm -f "conftest$ac_exeext"
20892 if { (eval echo "$as_me:20892: \"$ac_link\"") >&5
20893   (eval $ac_link) 2>&5
20894   ac_status=$?
20895   echo "$as_me:20895: \$? = $ac_status" >&5
20896   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20897   { (eval echo "$as_me:20897: \"$ac_try\"") >&5
20898   (eval $ac_try) 2>&5
20899   ac_status=$?
20900   echo "$as_me:20900: \$? = $ac_status" >&5
20901   (exit "$ac_status"); }; }; then
20902   cf_cv_link_dataonly=yes
20903 else
20904   echo "$as_me: program exited with status $ac_status" >&5
20905 echo "$as_me: failed program was:" >&5
20906 cat "conftest.$ac_ext" >&5
20907 cf_cv_link_dataonly=no
20908 fi
20909 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20910 fi
20911         LIBS="$cf_saveLIBS"
20912
20913 fi
20914
20915 echo "$as_me:20915: result: $cf_cv_link_dataonly" >&5
20916 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
20917
20918 if test "$cf_cv_link_dataonly" = no ; then
20919
20920 cat >>confdefs.h <<\EOF
20921 #define BROKEN_LINKER 1
20922 EOF
20923
20924         BROKEN_LINKER=1
20925 fi
20926
20927 ###     Checks for library functions.
20928
20929 for ac_func in \
20930 getcwd \
20931 getegid \
20932 geteuid \
20933 getopt \
20934 getttynam \
20935 issetugid \
20936 localeconv \
20937 poll \
20938 putenv \
20939 remove \
20940 select \
20941 setbuf \
20942 setbuffer \
20943 setenv \
20944 setvbuf \
20945 sigaction \
20946 sigvec \
20947 snprintf \
20948 strdup \
20949 strstr \
20950 sysconf \
20951 tcgetpgrp \
20952 times \
20953 tsearch \
20954 vsnprintf \
20955
20956 do
20957 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20958 echo "$as_me:20958: checking for $ac_func" >&5
20959 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20960 if eval "test \"\${$as_ac_var+set}\" = set"; then
20961   echo $ECHO_N "(cached) $ECHO_C" >&6
20962 else
20963   cat >"conftest.$ac_ext" <<_ACEOF
20964 #line 20964 "configure"
20965 #include "confdefs.h"
20966 #define $ac_func autoconf_temporary
20967 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20968 #undef $ac_func
20969
20970 #ifdef __cplusplus
20971 extern "C"
20972 #endif
20973
20974 /* We use char because int might match the return type of a gcc2
20975    builtin and then its argument prototype would still apply.  */
20976 char $ac_func (void);
20977
20978 int
20979 main (void)
20980 {
20981
20982 /* The GNU C library defines stubs for functions which it implements
20983     to always fail with ENOSYS.  Some functions are actually named
20984     something starting with __ and the normal name is an alias.  */
20985 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20986 #error found stub for $ac_func
20987 #endif
20988
20989         return $ac_func ();
20990   ;
20991   return 0;
20992 }
20993 _ACEOF
20994 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20995 if { (eval echo "$as_me:20995: \"$ac_link\"") >&5
20996   (eval $ac_link) 2>&5
20997   ac_status=$?
20998   echo "$as_me:20998: \$? = $ac_status" >&5
20999   (exit "$ac_status"); } &&
21000          { ac_try='test -s "conftest$ac_exeext"'
21001   { (eval echo "$as_me:21001: \"$ac_try\"") >&5
21002   (eval $ac_try) 2>&5
21003   ac_status=$?
21004   echo "$as_me:21004: \$? = $ac_status" >&5
21005   (exit "$ac_status"); }; }; then
21006   eval "$as_ac_var=yes"
21007 else
21008   echo "$as_me: failed program was:" >&5
21009 cat "conftest.$ac_ext" >&5
21010 eval "$as_ac_var=no"
21011 fi
21012 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21013 fi
21014 echo "$as_me:21014: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21015 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21016 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21017   cat >>confdefs.h <<EOF
21018 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21019 EOF
21020
21021 fi
21022 done
21023
21024 if test "x$ac_cv_func_getopt" = xno && \
21025    test "x$cf_with_progs$cf_with_tests" != xnono; then
21026         { { echo "$as_me:21026: error: getopt is required for building programs" >&5
21027 echo "$as_me: error: getopt is required for building programs" >&2;}
21028    { (exit 1); exit 1; }; }
21029 fi
21030
21031 if test "x$with_safe_sprintf" = xyes
21032 then
21033         if test "x$ac_cv_func_vsnprintf" = xyes
21034         then
21035                 { echo "$as_me:21035: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21036 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21037         else
21038
21039 cat >>confdefs.h <<\EOF
21040 #define USE_SAFE_SPRINTF 1
21041 EOF
21042
21043         fi
21044 fi
21045
21046 if test "x$with_getcap" = "xyes" ; then
21047
21048 echo "$as_me:21048: checking for terminal-capability database functions" >&5
21049 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21050 if test "${cf_cv_cgetent+set}" = set; then
21051   echo $ECHO_N "(cached) $ECHO_C" >&6
21052 else
21053
21054 cat >"conftest.$ac_ext" <<_ACEOF
21055 #line 21055 "configure"
21056 #include "confdefs.h"
21057
21058 #include <stdlib.h>
21059 int
21060 main (void)
21061 {
21062
21063         char temp[128];
21064         char *buf = temp;
21065         char *db_array = temp;
21066         cgetent(&buf, &db_array, "vt100");
21067         cgetcap(buf, "tc", '=');
21068         cgetmatch(buf, "tc");
21069
21070   ;
21071   return 0;
21072 }
21073 _ACEOF
21074 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21075 if { (eval echo "$as_me:21075: \"$ac_link\"") >&5
21076   (eval $ac_link) 2>&5
21077   ac_status=$?
21078   echo "$as_me:21078: \$? = $ac_status" >&5
21079   (exit "$ac_status"); } &&
21080          { ac_try='test -s "conftest$ac_exeext"'
21081   { (eval echo "$as_me:21081: \"$ac_try\"") >&5
21082   (eval $ac_try) 2>&5
21083   ac_status=$?
21084   echo "$as_me:21084: \$? = $ac_status" >&5
21085   (exit "$ac_status"); }; }; then
21086   cf_cv_cgetent=yes
21087 else
21088   echo "$as_me: failed program was:" >&5
21089 cat "conftest.$ac_ext" >&5
21090 cf_cv_cgetent=no
21091 fi
21092 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21093
21094 fi
21095 echo "$as_me:21095: result: $cf_cv_cgetent" >&5
21096 echo "${ECHO_T}$cf_cv_cgetent" >&6
21097
21098 if test "$cf_cv_cgetent" = yes
21099 then
21100
21101 cat >>confdefs.h <<\EOF
21102 #define HAVE_BSD_CGETENT 1
21103 EOF
21104
21105 echo "$as_me:21105: checking if cgetent uses const parameter" >&5
21106 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21107 if test "${cf_cv_cgetent_const+set}" = set; then
21108   echo $ECHO_N "(cached) $ECHO_C" >&6
21109 else
21110
21111 cat >"conftest.$ac_ext" <<_ACEOF
21112 #line 21112 "configure"
21113 #include "confdefs.h"
21114
21115 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21116 #include <stdlib.h>
21117 int
21118 main (void)
21119 {
21120
21121         char temp[128];
21122         char *buf = temp;
21123 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21124         const char *db_array = temp;
21125         cgetent(&buf, &db_array, "vt100");
21126 #endif
21127         cgetcap(buf, "tc", '=');
21128         cgetmatch(buf, "tc");
21129
21130   ;
21131   return 0;
21132 }
21133 _ACEOF
21134 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21135 if { (eval echo "$as_me:21135: \"$ac_link\"") >&5
21136   (eval $ac_link) 2>&5
21137   ac_status=$?
21138   echo "$as_me:21138: \$? = $ac_status" >&5
21139   (exit "$ac_status"); } &&
21140          { ac_try='test -s "conftest$ac_exeext"'
21141   { (eval echo "$as_me:21141: \"$ac_try\"") >&5
21142   (eval $ac_try) 2>&5
21143   ac_status=$?
21144   echo "$as_me:21144: \$? = $ac_status" >&5
21145   (exit "$ac_status"); }; }; then
21146   cf_cv_cgetent_const=yes
21147 else
21148   echo "$as_me: failed program was:" >&5
21149 cat "conftest.$ac_ext" >&5
21150 cf_cv_cgetent_const=no
21151 fi
21152 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21153
21154 fi
21155 echo "$as_me:21155: result: $cf_cv_cgetent_const" >&5
21156 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21157         if test "$cf_cv_cgetent_const" = yes
21158         then
21159
21160 cat >>confdefs.h <<EOF
21161 #define CGETENT_CONST const
21162 EOF
21163
21164         fi
21165 fi
21166
21167 fi
21168
21169 echo "$as_me:21169: checking for isascii" >&5
21170 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21171 if test "${cf_cv_have_isascii+set}" = set; then
21172   echo $ECHO_N "(cached) $ECHO_C" >&6
21173 else
21174
21175         cat >"conftest.$ac_ext" <<_ACEOF
21176 #line 21176 "configure"
21177 #include "confdefs.h"
21178 #include <ctype.h>
21179 int
21180 main (void)
21181 {
21182 int x = isascii(' ')
21183   ;
21184   return 0;
21185 }
21186 _ACEOF
21187 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21188 if { (eval echo "$as_me:21188: \"$ac_link\"") >&5
21189   (eval $ac_link) 2>&5
21190   ac_status=$?
21191   echo "$as_me:21191: \$? = $ac_status" >&5
21192   (exit "$ac_status"); } &&
21193          { ac_try='test -s "conftest$ac_exeext"'
21194   { (eval echo "$as_me:21194: \"$ac_try\"") >&5
21195   (eval $ac_try) 2>&5
21196   ac_status=$?
21197   echo "$as_me:21197: \$? = $ac_status" >&5
21198   (exit "$ac_status"); }; }; then
21199   cf_cv_have_isascii=yes
21200 else
21201   echo "$as_me: failed program was:" >&5
21202 cat "conftest.$ac_ext" >&5
21203 cf_cv_have_isascii=no
21204 fi
21205 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21206
21207 fi
21208 echo "$as_me:21208: result: $cf_cv_have_isascii" >&5
21209 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21210 test "$cf_cv_have_isascii" = yes &&
21211 cat >>confdefs.h <<\EOF
21212 #define HAVE_ISASCII 1
21213 EOF
21214
21215 if test "$ac_cv_func_sigaction" = yes; then
21216 echo "$as_me:21216: checking whether sigaction needs _POSIX_SOURCE" >&5
21217 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21218 cat >"conftest.$ac_ext" <<_ACEOF
21219 #line 21219 "configure"
21220 #include "confdefs.h"
21221
21222 #include <sys/types.h>
21223 #include <signal.h>
21224 int
21225 main (void)
21226 {
21227 struct sigaction act
21228   ;
21229   return 0;
21230 }
21231 _ACEOF
21232 rm -f "conftest.$ac_objext"
21233 if { (eval echo "$as_me:21233: \"$ac_compile\"") >&5
21234   (eval $ac_compile) 2>&5
21235   ac_status=$?
21236   echo "$as_me:21236: \$? = $ac_status" >&5
21237   (exit "$ac_status"); } &&
21238          { ac_try='test -s "conftest.$ac_objext"'
21239   { (eval echo "$as_me:21239: \"$ac_try\"") >&5
21240   (eval $ac_try) 2>&5
21241   ac_status=$?
21242   echo "$as_me:21242: \$? = $ac_status" >&5
21243   (exit "$ac_status"); }; }; then
21244   sigact_bad=no
21245 else
21246   echo "$as_me: failed program was:" >&5
21247 cat "conftest.$ac_ext" >&5
21248
21249 cat >"conftest.$ac_ext" <<_ACEOF
21250 #line 21250 "configure"
21251 #include "confdefs.h"
21252
21253 #define _POSIX_SOURCE
21254 #include <sys/types.h>
21255 #include <signal.h>
21256 int
21257 main (void)
21258 {
21259 struct sigaction act
21260   ;
21261   return 0;
21262 }
21263 _ACEOF
21264 rm -f "conftest.$ac_objext"
21265 if { (eval echo "$as_me:21265: \"$ac_compile\"") >&5
21266   (eval $ac_compile) 2>&5
21267   ac_status=$?
21268   echo "$as_me:21268: \$? = $ac_status" >&5
21269   (exit "$ac_status"); } &&
21270          { ac_try='test -s "conftest.$ac_objext"'
21271   { (eval echo "$as_me:21271: \"$ac_try\"") >&5
21272   (eval $ac_try) 2>&5
21273   ac_status=$?
21274   echo "$as_me:21274: \$? = $ac_status" >&5
21275   (exit "$ac_status"); }; }; then
21276   sigact_bad=yes
21277
21278 cat >>confdefs.h <<\EOF
21279 #define _POSIX_SOURCE 1
21280 EOF
21281
21282 else
21283   echo "$as_me: failed program was:" >&5
21284 cat "conftest.$ac_ext" >&5
21285 sigact_bad=unknown
21286 fi
21287 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21288 fi
21289 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21290 echo "$as_me:21290: result: $sigact_bad" >&5
21291 echo "${ECHO_T}$sigact_bad" >&6
21292 fi
21293
21294 echo "$as_me:21294: checking if nanosleep really works" >&5
21295 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21296 if test "${cf_cv_func_nanosleep+set}" = set; then
21297   echo $ECHO_N "(cached) $ECHO_C" >&6
21298 else
21299
21300 if test "$cross_compiling" = yes; then
21301   cf_cv_func_nanosleep=unknown
21302 else
21303   cat >"conftest.$ac_ext" <<_ACEOF
21304 #line 21304 "configure"
21305 #include "confdefs.h"
21306
21307 #include <stdio.h>
21308 #include <errno.h>
21309 #include <time.h>
21310
21311 #ifdef HAVE_SYS_TIME_H
21312 #include <sys/time.h>
21313 #endif
21314
21315 int main(void) {
21316         struct timespec ts1, ts2;
21317         int code;
21318         ts1.tv_sec  = 0;
21319         ts1.tv_nsec = 750000000;
21320         ts2.tv_sec  = 0;
21321         ts2.tv_nsec = 0;
21322         errno = 0;
21323         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21324         ${cf_cv_main_return:-return}(code != 0);
21325 }
21326
21327 _ACEOF
21328 rm -f "conftest$ac_exeext"
21329 if { (eval echo "$as_me:21329: \"$ac_link\"") >&5
21330   (eval $ac_link) 2>&5
21331   ac_status=$?
21332   echo "$as_me:21332: \$? = $ac_status" >&5
21333   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21334   { (eval echo "$as_me:21334: \"$ac_try\"") >&5
21335   (eval $ac_try) 2>&5
21336   ac_status=$?
21337   echo "$as_me:21337: \$? = $ac_status" >&5
21338   (exit "$ac_status"); }; }; then
21339   cf_cv_func_nanosleep=yes
21340 else
21341   echo "$as_me: program exited with status $ac_status" >&5
21342 echo "$as_me: failed program was:" >&5
21343 cat "conftest.$ac_ext" >&5
21344 cf_cv_func_nanosleep=no
21345 fi
21346 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21347 fi
21348 fi
21349 echo "$as_me:21349: result: $cf_cv_func_nanosleep" >&5
21350 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21351
21352 test "$cf_cv_func_nanosleep" = "yes" &&
21353 cat >>confdefs.h <<\EOF
21354 #define HAVE_NANOSLEEP 1
21355 EOF
21356
21357 for ac_header in \
21358 termio.h \
21359 termios.h \
21360 unistd.h \
21361 sys/ioctl.h \
21362 sys/termio.h \
21363
21364 do
21365 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21366 echo "$as_me:21366: checking for $ac_header" >&5
21367 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21368 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21369   echo $ECHO_N "(cached) $ECHO_C" >&6
21370 else
21371   cat >"conftest.$ac_ext" <<_ACEOF
21372 #line 21372 "configure"
21373 #include "confdefs.h"
21374 #include <$ac_header>
21375 _ACEOF
21376 if { (eval echo "$as_me:21376: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21377   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21378   ac_status=$?
21379   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21380   rm -f conftest.er1
21381   cat conftest.err >&5
21382   echo "$as_me:21382: \$? = $ac_status" >&5
21383   (exit "$ac_status"); } >/dev/null; then
21384   if test -s conftest.err; then
21385     ac_cpp_err=$ac_c_preproc_warn_flag
21386   else
21387     ac_cpp_err=
21388   fi
21389 else
21390   ac_cpp_err=yes
21391 fi
21392 if test -z "$ac_cpp_err"; then
21393   eval "$as_ac_Header=yes"
21394 else
21395   echo "$as_me: failed program was:" >&5
21396   cat "conftest.$ac_ext" >&5
21397   eval "$as_ac_Header=no"
21398 fi
21399 rm -f conftest.err "conftest.$ac_ext"
21400 fi
21401 echo "$as_me:21401: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21402 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21403 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21404   cat >>confdefs.h <<EOF
21405 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21406 EOF
21407
21408 fi
21409 done
21410
21411 if test "$ac_cv_header_termios_h" = yes ; then
21412         case "$CFLAGS $CPPFLAGS" in
21413         (*-D_POSIX_SOURCE*)
21414                 termios_bad=dunno ;;
21415         (*)     termios_bad=maybe ;;
21416         esac
21417         if test "$termios_bad" = maybe ; then
21418         echo "$as_me:21418: checking whether termios.h needs _POSIX_SOURCE" >&5
21419 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21420         cat >"conftest.$ac_ext" <<_ACEOF
21421 #line 21421 "configure"
21422 #include "confdefs.h"
21423 #include <termios.h>
21424 int
21425 main (void)
21426 {
21427 struct termios foo; int x = foo.c_iflag = 1; (void)x
21428   ;
21429   return 0;
21430 }
21431 _ACEOF
21432 rm -f "conftest.$ac_objext"
21433 if { (eval echo "$as_me:21433: \"$ac_compile\"") >&5
21434   (eval $ac_compile) 2>&5
21435   ac_status=$?
21436   echo "$as_me:21436: \$? = $ac_status" >&5
21437   (exit "$ac_status"); } &&
21438          { ac_try='test -s "conftest.$ac_objext"'
21439   { (eval echo "$as_me:21439: \"$ac_try\"") >&5
21440   (eval $ac_try) 2>&5
21441   ac_status=$?
21442   echo "$as_me:21442: \$? = $ac_status" >&5
21443   (exit "$ac_status"); }; }; then
21444   termios_bad=no
21445 else
21446   echo "$as_me: failed program was:" >&5
21447 cat "conftest.$ac_ext" >&5
21448
21449                 cat >"conftest.$ac_ext" <<_ACEOF
21450 #line 21450 "configure"
21451 #include "confdefs.h"
21452
21453 #define _POSIX_SOURCE
21454 #include <termios.h>
21455 int
21456 main (void)
21457 {
21458 struct termios foo; int x = foo.c_iflag = 2; (void)x
21459   ;
21460   return 0;
21461 }
21462 _ACEOF
21463 rm -f "conftest.$ac_objext"
21464 if { (eval echo "$as_me:21464: \"$ac_compile\"") >&5
21465   (eval $ac_compile) 2>&5
21466   ac_status=$?
21467   echo "$as_me:21467: \$? = $ac_status" >&5
21468   (exit "$ac_status"); } &&
21469          { ac_try='test -s "conftest.$ac_objext"'
21470   { (eval echo "$as_me:21470: \"$ac_try\"") >&5
21471   (eval $ac_try) 2>&5
21472   ac_status=$?
21473   echo "$as_me:21473: \$? = $ac_status" >&5
21474   (exit "$ac_status"); }; }; then
21475   termios_bad=unknown
21476 else
21477   echo "$as_me: failed program was:" >&5
21478 cat "conftest.$ac_ext" >&5
21479 termios_bad=yes
21480 cat >>confdefs.h <<\EOF
21481 #define _POSIX_SOURCE 1
21482 EOF
21483
21484 fi
21485 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21486
21487 fi
21488 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21489         echo "$as_me:21489: result: $termios_bad" >&5
21490 echo "${ECHO_T}$termios_bad" >&6
21491         fi
21492 fi
21493
21494 echo "$as_me:21494: checking for tcgetattr" >&5
21495 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21496 if test "${cf_cv_have_tcgetattr+set}" = set; then
21497   echo $ECHO_N "(cached) $ECHO_C" >&6
21498 else
21499
21500 cat >"conftest.$ac_ext" <<_ACEOF
21501 #line 21501 "configure"
21502 #include "confdefs.h"
21503
21504 #include <sys/types.h>
21505 #ifdef HAVE_UNISTD_H
21506 #include <unistd.h>
21507 #endif
21508 #ifdef HAVE_TERMIOS_H
21509 #include <termios.h>
21510 #define TTY struct termios
21511 #else
21512 #ifdef HAVE_TERMIO_H
21513 #include <termio.h>
21514 #define TTY struct termio
21515 #endif
21516 #endif
21517
21518 int
21519 main (void)
21520 {
21521
21522 TTY foo;
21523 tcgetattr(1, &foo);
21524   ;
21525   return 0;
21526 }
21527 _ACEOF
21528 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21529 if { (eval echo "$as_me:21529: \"$ac_link\"") >&5
21530   (eval $ac_link) 2>&5
21531   ac_status=$?
21532   echo "$as_me:21532: \$? = $ac_status" >&5
21533   (exit "$ac_status"); } &&
21534          { ac_try='test -s "conftest$ac_exeext"'
21535   { (eval echo "$as_me:21535: \"$ac_try\"") >&5
21536   (eval $ac_try) 2>&5
21537   ac_status=$?
21538   echo "$as_me:21538: \$? = $ac_status" >&5
21539   (exit "$ac_status"); }; }; then
21540   cf_cv_have_tcgetattr=yes
21541 else
21542   echo "$as_me: failed program was:" >&5
21543 cat "conftest.$ac_ext" >&5
21544 cf_cv_have_tcgetattr=no
21545 fi
21546 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21547 fi
21548 echo "$as_me:21548: result: $cf_cv_have_tcgetattr" >&5
21549 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
21550 test "$cf_cv_have_tcgetattr" = yes &&
21551 cat >>confdefs.h <<\EOF
21552 #define HAVE_TCGETATTR 1
21553 EOF
21554
21555 echo "$as_me:21555: checking for vsscanf function or workaround" >&5
21556 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
21557 if test "${cf_cv_func_vsscanf+set}" = set; then
21558   echo $ECHO_N "(cached) $ECHO_C" >&6
21559 else
21560
21561 cat >"conftest.$ac_ext" <<_ACEOF
21562 #line 21562 "configure"
21563 #include "confdefs.h"
21564
21565 #include <stdarg.h>
21566 #include <stdio.h>
21567 int
21568 main (void)
21569 {
21570
21571         va_list ap;
21572         vsscanf("from", "%d", ap)
21573   ;
21574   return 0;
21575 }
21576 _ACEOF
21577 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21578 if { (eval echo "$as_me:21578: \"$ac_link\"") >&5
21579   (eval $ac_link) 2>&5
21580   ac_status=$?
21581   echo "$as_me:21581: \$? = $ac_status" >&5
21582   (exit "$ac_status"); } &&
21583          { ac_try='test -s "conftest$ac_exeext"'
21584   { (eval echo "$as_me:21584: \"$ac_try\"") >&5
21585   (eval $ac_try) 2>&5
21586   ac_status=$?
21587   echo "$as_me:21587: \$? = $ac_status" >&5
21588   (exit "$ac_status"); }; }; then
21589   cf_cv_func_vsscanf=vsscanf
21590 else
21591   echo "$as_me: failed program was:" >&5
21592 cat "conftest.$ac_ext" >&5
21593
21594 cat >"conftest.$ac_ext" <<_ACEOF
21595 #line 21595 "configure"
21596 #include "confdefs.h"
21597
21598 #include <stdarg.h>
21599 #include <stdio.h>
21600 int
21601 main (void)
21602 {
21603
21604         FILE strbuf;
21605         char *str = "from";
21606
21607         strbuf._flag = _IOREAD;
21608         strbuf._ptr = strbuf._base = (unsigned char *) str;
21609         strbuf._cnt = strlen(str);
21610         strbuf._file = _NFILE;
21611         return (vfscanf(&strbuf, "%d", ap))
21612   ;
21613   return 0;
21614 }
21615 _ACEOF
21616 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21617 if { (eval echo "$as_me:21617: \"$ac_link\"") >&5
21618   (eval $ac_link) 2>&5
21619   ac_status=$?
21620   echo "$as_me:21620: \$? = $ac_status" >&5
21621   (exit "$ac_status"); } &&
21622          { ac_try='test -s "conftest$ac_exeext"'
21623   { (eval echo "$as_me:21623: \"$ac_try\"") >&5
21624   (eval $ac_try) 2>&5
21625   ac_status=$?
21626   echo "$as_me:21626: \$? = $ac_status" >&5
21627   (exit "$ac_status"); }; }; then
21628   cf_cv_func_vsscanf=vfscanf
21629 else
21630   echo "$as_me: failed program was:" >&5
21631 cat "conftest.$ac_ext" >&5
21632
21633 cat >"conftest.$ac_ext" <<_ACEOF
21634 #line 21634 "configure"
21635 #include "confdefs.h"
21636
21637 #include <stdarg.h>
21638 #include <stdio.h>
21639 int
21640 main (void)
21641 {
21642
21643         FILE strbuf;
21644         char *str = "from";
21645
21646         strbuf._flag = _IOREAD;
21647         strbuf._ptr = strbuf._base = (unsigned char *) str;
21648         strbuf._cnt = strlen(str);
21649         strbuf._file = _NFILE;
21650         return (_doscan(&strbuf, "%d", ap))
21651   ;
21652   return 0;
21653 }
21654 _ACEOF
21655 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21656 if { (eval echo "$as_me:21656: \"$ac_link\"") >&5
21657   (eval $ac_link) 2>&5
21658   ac_status=$?
21659   echo "$as_me:21659: \$? = $ac_status" >&5
21660   (exit "$ac_status"); } &&
21661          { ac_try='test -s "conftest$ac_exeext"'
21662   { (eval echo "$as_me:21662: \"$ac_try\"") >&5
21663   (eval $ac_try) 2>&5
21664   ac_status=$?
21665   echo "$as_me:21665: \$? = $ac_status" >&5
21666   (exit "$ac_status"); }; }; then
21667   cf_cv_func_vsscanf=_doscan
21668 else
21669   echo "$as_me: failed program was:" >&5
21670 cat "conftest.$ac_ext" >&5
21671
21672 cf_cv_func_vsscanf=no
21673 fi
21674 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21675 fi
21676 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21677 fi
21678 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21679 fi
21680 echo "$as_me:21680: result: $cf_cv_func_vsscanf" >&5
21681 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
21682
21683 case "$cf_cv_func_vsscanf" in
21684 (vsscanf)
21685 cat >>confdefs.h <<\EOF
21686 #define HAVE_VSSCANF 1
21687 EOF
21688 ;;
21689 (vfscanf)
21690 cat >>confdefs.h <<\EOF
21691 #define HAVE_VFSCANF 1
21692 EOF
21693 ;;
21694 (_doscan)
21695 cat >>confdefs.h <<\EOF
21696 #define HAVE__DOSCAN 1
21697 EOF
21698 ;;
21699 esac
21700
21701 for ac_header in \
21702 unistd.h \
21703
21704 do
21705 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21706 echo "$as_me:21706: checking for $ac_header" >&5
21707 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21708 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21709   echo $ECHO_N "(cached) $ECHO_C" >&6
21710 else
21711   cat >"conftest.$ac_ext" <<_ACEOF
21712 #line 21712 "configure"
21713 #include "confdefs.h"
21714 #include <$ac_header>
21715 _ACEOF
21716 if { (eval echo "$as_me:21716: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21717   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21718   ac_status=$?
21719   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21720   rm -f conftest.er1
21721   cat conftest.err >&5
21722   echo "$as_me:21722: \$? = $ac_status" >&5
21723   (exit "$ac_status"); } >/dev/null; then
21724   if test -s conftest.err; then
21725     ac_cpp_err=$ac_c_preproc_warn_flag
21726   else
21727     ac_cpp_err=
21728   fi
21729 else
21730   ac_cpp_err=yes
21731 fi
21732 if test -z "$ac_cpp_err"; then
21733   eval "$as_ac_Header=yes"
21734 else
21735   echo "$as_me: failed program was:" >&5
21736   cat "conftest.$ac_ext" >&5
21737   eval "$as_ac_Header=no"
21738 fi
21739 rm -f conftest.err "conftest.$ac_ext"
21740 fi
21741 echo "$as_me:21741: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21742 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21743 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21744   cat >>confdefs.h <<EOF
21745 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21746 EOF
21747
21748 fi
21749 done
21750
21751 echo "$as_me:21751: checking for working mkstemp" >&5
21752 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
21753 if test "${cf_cv_func_mkstemp+set}" = set; then
21754   echo $ECHO_N "(cached) $ECHO_C" >&6
21755 else
21756
21757 rm -rf ./conftest*
21758 if test "$cross_compiling" = yes; then
21759   cf_cv_func_mkstemp=maybe
21760 else
21761   cat >"conftest.$ac_ext" <<_ACEOF
21762 #line 21762 "configure"
21763 #include "confdefs.h"
21764
21765 #include <sys/types.h>
21766 #ifdef HAVE_UNISTD_H
21767 #include <unistd.h>
21768 #endif
21769 #include <stdlib.h>
21770 #include <stdio.h>
21771 #include <string.h>
21772 #include <sys/stat.h>
21773 int main(void)
21774 {
21775         char *tmpl = "conftestXXXXXX";
21776         char name[2][80];
21777         int n;
21778         int result = 0;
21779         int fd;
21780         struct stat sb;
21781
21782         umask(077);
21783         for (n = 0; n < 2; ++n) {
21784                 strcpy(name[n], tmpl);
21785                 if ((fd = mkstemp(name[n])) >= 0) {
21786                         if (!strcmp(name[n], tmpl)
21787                          || stat(name[n], &sb) != 0
21788                          || (sb.st_mode & S_IFMT) != S_IFREG
21789                          || (sb.st_mode & 077) != 0) {
21790                                 result = 1;
21791                         }
21792                         close(fd);
21793                 }
21794         }
21795         if (result == 0
21796          && !strcmp(name[0], name[1]))
21797                 result = 1;
21798         ${cf_cv_main_return:-return}(result);
21799 }
21800
21801 _ACEOF
21802 rm -f "conftest$ac_exeext"
21803 if { (eval echo "$as_me:21803: \"$ac_link\"") >&5
21804   (eval $ac_link) 2>&5
21805   ac_status=$?
21806   echo "$as_me:21806: \$? = $ac_status" >&5
21807   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21808   { (eval echo "$as_me:21808: \"$ac_try\"") >&5
21809   (eval $ac_try) 2>&5
21810   ac_status=$?
21811   echo "$as_me:21811: \$? = $ac_status" >&5
21812   (exit "$ac_status"); }; }; then
21813   cf_cv_func_mkstemp=yes
21814
21815 else
21816   echo "$as_me: program exited with status $ac_status" >&5
21817 echo "$as_me: failed program was:" >&5
21818 cat "conftest.$ac_ext" >&5
21819 cf_cv_func_mkstemp=no
21820
21821 fi
21822 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21823 fi
21824
21825 fi
21826 echo "$as_me:21826: result: $cf_cv_func_mkstemp" >&5
21827 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
21828 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
21829         echo "$as_me:21829: checking for mkstemp" >&5
21830 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
21831 if test "${ac_cv_func_mkstemp+set}" = set; then
21832   echo $ECHO_N "(cached) $ECHO_C" >&6
21833 else
21834   cat >"conftest.$ac_ext" <<_ACEOF
21835 #line 21835 "configure"
21836 #include "confdefs.h"
21837 #define mkstemp autoconf_temporary
21838 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21839 #undef mkstemp
21840
21841 #ifdef __cplusplus
21842 extern "C"
21843 #endif
21844
21845 /* We use char because int might match the return type of a gcc2
21846    builtin and then its argument prototype would still apply.  */
21847 char mkstemp (void);
21848
21849 int
21850 main (void)
21851 {
21852
21853 /* The GNU C library defines stubs for functions which it implements
21854     to always fail with ENOSYS.  Some functions are actually named
21855     something starting with __ and the normal name is an alias.  */
21856 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
21857 #error found stub for mkstemp
21858 #endif
21859
21860         return mkstemp ();
21861   ;
21862   return 0;
21863 }
21864 _ACEOF
21865 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21866 if { (eval echo "$as_me:21866: \"$ac_link\"") >&5
21867   (eval $ac_link) 2>&5
21868   ac_status=$?
21869   echo "$as_me:21869: \$? = $ac_status" >&5
21870   (exit "$ac_status"); } &&
21871          { ac_try='test -s "conftest$ac_exeext"'
21872   { (eval echo "$as_me:21872: \"$ac_try\"") >&5
21873   (eval $ac_try) 2>&5
21874   ac_status=$?
21875   echo "$as_me:21875: \$? = $ac_status" >&5
21876   (exit "$ac_status"); }; }; then
21877   ac_cv_func_mkstemp=yes
21878 else
21879   echo "$as_me: failed program was:" >&5
21880 cat "conftest.$ac_ext" >&5
21881 ac_cv_func_mkstemp=no
21882 fi
21883 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21884 fi
21885 echo "$as_me:21885: result: $ac_cv_func_mkstemp" >&5
21886 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
21887
21888 fi
21889 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
21890
21891 cat >>confdefs.h <<\EOF
21892 #define HAVE_MKSTEMP 1
21893 EOF
21894
21895 fi
21896
21897 # setup for prototype of fallback for vsscanf()
21898
21899 if test "$cf_cv_func_vsscanf" = vsscanf ; then
21900         HAVE_VSSCANF=1
21901 else
21902         HAVE_VSSCANF=0
21903 fi
21904
21905 if test "x$cross_compiling" = xyes ; then
21906         { echo "$as_me:21906: WARNING: cross compiling: assume setvbuf params not reversed" >&5
21907 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
21908 else
21909         echo "$as_me:21909: checking whether setvbuf arguments are reversed" >&5
21910 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
21911 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
21912   echo $ECHO_N "(cached) $ECHO_C" >&6
21913 else
21914   if test "$cross_compiling" = yes; then
21915   { { echo "$as_me:21915: error: cannot run test program while cross compiling" >&5
21916 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21917    { (exit 1); exit 1; }; }
21918 else
21919   cat >"conftest.$ac_ext" <<_ACEOF
21920 #line 21920 "configure"
21921 #include "confdefs.h"
21922 #include <stdio.h>
21923 /* If setvbuf has the reversed format, exit 0. */
21924 int
21925 main (void)
21926 {
21927   /* This call has the arguments reversed.
21928      A reversed system may check and see that the address of main
21929      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
21930   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
21931     $ac_main_return(1);
21932   putc('\r', stdout);
21933   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
21934 }
21935 _ACEOF
21936 rm -f "conftest$ac_exeext"
21937 if { (eval echo "$as_me:21937: \"$ac_link\"") >&5
21938   (eval $ac_link) 2>&5
21939   ac_status=$?
21940   echo "$as_me:21940: \$? = $ac_status" >&5
21941   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21942   { (eval echo "$as_me:21942: \"$ac_try\"") >&5
21943   (eval $ac_try) 2>&5
21944   ac_status=$?
21945   echo "$as_me:21945: \$? = $ac_status" >&5
21946   (exit "$ac_status"); }; }; then
21947   ac_cv_func_setvbuf_reversed=yes
21948 else
21949   echo "$as_me: program exited with status $ac_status" >&5
21950 echo "$as_me: failed program was:" >&5
21951 cat "conftest.$ac_ext" >&5
21952 ac_cv_func_setvbuf_reversed=no
21953 fi
21954 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21955 fi
21956 rm -f core ./core.* ./*.core
21957 fi
21958 echo "$as_me:21958: result: $ac_cv_func_setvbuf_reversed" >&5
21959 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
21960 if test $ac_cv_func_setvbuf_reversed = yes; then
21961
21962 cat >>confdefs.h <<\EOF
21963 #define SETVBUF_REVERSED 1
21964 EOF
21965
21966 fi
21967
21968 fi
21969 echo "$as_me:21969: checking for intptr_t" >&5
21970 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
21971 if test "${ac_cv_type_intptr_t+set}" = set; then
21972   echo $ECHO_N "(cached) $ECHO_C" >&6
21973 else
21974   cat >"conftest.$ac_ext" <<_ACEOF
21975 #line 21975 "configure"
21976 #include "confdefs.h"
21977 $ac_includes_default
21978 int
21979 main (void)
21980 {
21981 if ((intptr_t *) 0)
21982   return 0;
21983 if (sizeof (intptr_t))
21984   return 0;
21985   ;
21986   return 0;
21987 }
21988 _ACEOF
21989 rm -f "conftest.$ac_objext"
21990 if { (eval echo "$as_me:21990: \"$ac_compile\"") >&5
21991   (eval $ac_compile) 2>&5
21992   ac_status=$?
21993   echo "$as_me:21993: \$? = $ac_status" >&5
21994   (exit "$ac_status"); } &&
21995          { ac_try='test -s "conftest.$ac_objext"'
21996   { (eval echo "$as_me:21996: \"$ac_try\"") >&5
21997   (eval $ac_try) 2>&5
21998   ac_status=$?
21999   echo "$as_me:21999: \$? = $ac_status" >&5
22000   (exit "$ac_status"); }; }; then
22001   ac_cv_type_intptr_t=yes
22002 else
22003   echo "$as_me: failed program was:" >&5
22004 cat "conftest.$ac_ext" >&5
22005 ac_cv_type_intptr_t=no
22006 fi
22007 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22008 fi
22009 echo "$as_me:22009: result: $ac_cv_type_intptr_t" >&5
22010 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22011 if test "$ac_cv_type_intptr_t" = yes; then
22012   :
22013 else
22014
22015 cat >>confdefs.h <<EOF
22016 #define intptr_t long
22017 EOF
22018
22019 fi
22020
22021 echo "$as_me:22021: checking for ssize_t" >&5
22022 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22023 if test "${ac_cv_type_ssize_t+set}" = set; then
22024   echo $ECHO_N "(cached) $ECHO_C" >&6
22025 else
22026   cat >"conftest.$ac_ext" <<_ACEOF
22027 #line 22027 "configure"
22028 #include "confdefs.h"
22029 $ac_includes_default
22030 int
22031 main (void)
22032 {
22033 if ((ssize_t *) 0)
22034   return 0;
22035 if (sizeof (ssize_t))
22036   return 0;
22037   ;
22038   return 0;
22039 }
22040 _ACEOF
22041 rm -f "conftest.$ac_objext"
22042 if { (eval echo "$as_me:22042: \"$ac_compile\"") >&5
22043   (eval $ac_compile) 2>&5
22044   ac_status=$?
22045   echo "$as_me:22045: \$? = $ac_status" >&5
22046   (exit "$ac_status"); } &&
22047          { ac_try='test -s "conftest.$ac_objext"'
22048   { (eval echo "$as_me:22048: \"$ac_try\"") >&5
22049   (eval $ac_try) 2>&5
22050   ac_status=$?
22051   echo "$as_me:22051: \$? = $ac_status" >&5
22052   (exit "$ac_status"); }; }; then
22053   ac_cv_type_ssize_t=yes
22054 else
22055   echo "$as_me: failed program was:" >&5
22056 cat "conftest.$ac_ext" >&5
22057 ac_cv_type_ssize_t=no
22058 fi
22059 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22060 fi
22061 echo "$as_me:22061: result: $ac_cv_type_ssize_t" >&5
22062 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22063 if test "$ac_cv_type_ssize_t" = yes; then
22064   :
22065 else
22066
22067 cat >>confdefs.h <<EOF
22068 #define ssize_t int
22069 EOF
22070
22071 fi
22072
22073 echo "$as_me:22073: checking for type sigaction_t" >&5
22074 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22075 if test "${cf_cv_type_sigaction+set}" = set; then
22076   echo $ECHO_N "(cached) $ECHO_C" >&6
22077 else
22078
22079         cat >"conftest.$ac_ext" <<_ACEOF
22080 #line 22080 "configure"
22081 #include "confdefs.h"
22082
22083 #include <signal.h>
22084 int
22085 main (void)
22086 {
22087 sigaction_t x
22088   ;
22089   return 0;
22090 }
22091 _ACEOF
22092 rm -f "conftest.$ac_objext"
22093 if { (eval echo "$as_me:22093: \"$ac_compile\"") >&5
22094   (eval $ac_compile) 2>&5
22095   ac_status=$?
22096   echo "$as_me:22096: \$? = $ac_status" >&5
22097   (exit "$ac_status"); } &&
22098          { ac_try='test -s "conftest.$ac_objext"'
22099   { (eval echo "$as_me:22099: \"$ac_try\"") >&5
22100   (eval $ac_try) 2>&5
22101   ac_status=$?
22102   echo "$as_me:22102: \$? = $ac_status" >&5
22103   (exit "$ac_status"); }; }; then
22104   cf_cv_type_sigaction=yes
22105 else
22106   echo "$as_me: failed program was:" >&5
22107 cat "conftest.$ac_ext" >&5
22108 cf_cv_type_sigaction=no
22109 fi
22110 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22111 fi
22112
22113 echo "$as_me:22113: result: $cf_cv_type_sigaction" >&5
22114 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22115 test "$cf_cv_type_sigaction" = yes &&
22116 cat >>confdefs.h <<\EOF
22117 #define HAVE_TYPE_SIGACTION 1
22118 EOF
22119
22120 echo "$as_me:22120: checking declaration of size-change" >&5
22121 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22122 if test "${cf_cv_sizechange+set}" = set; then
22123   echo $ECHO_N "(cached) $ECHO_C" >&6
22124 else
22125
22126         cf_cv_sizechange=unknown
22127         cf_save_CPPFLAGS="$CPPFLAGS"
22128
22129 for cf_opts in "" "NEED_PTEM_H"
22130 do
22131
22132         CPPFLAGS="$cf_save_CPPFLAGS"
22133         if test -n "$cf_opts"
22134         then
22135
22136         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22137         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22138
22139         fi
22140         cat >"conftest.$ac_ext" <<_ACEOF
22141 #line 22141 "configure"
22142 #include "confdefs.h"
22143 #include <sys/types.h>
22144 #ifdef HAVE_TERMIOS_H
22145 #include <termios.h>
22146 #else
22147 #ifdef HAVE_TERMIO_H
22148 #include <termio.h>
22149 #endif
22150 #endif
22151
22152 #ifdef NEED_PTEM_H
22153 /* This is a workaround for SCO:  they neglected to define struct winsize in
22154  * termios.h -- it's only in termio.h and ptem.h
22155  */
22156 #include <sys/stream.h>
22157 #include <sys/ptem.h>
22158 #endif
22159
22160 #ifdef HAVE_SYS_IOCTL_H
22161 #include <sys/ioctl.h>
22162 #endif
22163
22164 int
22165 main (void)
22166 {
22167
22168 #ifdef TIOCGSIZE
22169         struct ttysize win;     /* SunOS 3.0... */
22170         int y = win.ts_lines = 2;
22171         int x = win.ts_cols = 1;
22172         (void)y;
22173         (void)x;
22174 #else
22175 #ifdef TIOCGWINSZ
22176         struct winsize win;     /* everything else */
22177         int y = win.ws_row = 2;
22178         int x = win.ws_col = 1;
22179         (void)y;
22180         (void)x;
22181 #else
22182         no TIOCGSIZE or TIOCGWINSZ
22183 #endif /* TIOCGWINSZ */
22184 #endif /* TIOCGSIZE */
22185
22186   ;
22187   return 0;
22188 }
22189 _ACEOF
22190 rm -f "conftest.$ac_objext"
22191 if { (eval echo "$as_me:22191: \"$ac_compile\"") >&5
22192   (eval $ac_compile) 2>&5
22193   ac_status=$?
22194   echo "$as_me:22194: \$? = $ac_status" >&5
22195   (exit "$ac_status"); } &&
22196          { ac_try='test -s "conftest.$ac_objext"'
22197   { (eval echo "$as_me:22197: \"$ac_try\"") >&5
22198   (eval $ac_try) 2>&5
22199   ac_status=$?
22200   echo "$as_me:22200: \$? = $ac_status" >&5
22201   (exit "$ac_status"); }; }; then
22202   cf_cv_sizechange=yes
22203 else
22204   echo "$as_me: failed program was:" >&5
22205 cat "conftest.$ac_ext" >&5
22206 cf_cv_sizechange=no
22207 fi
22208 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22209
22210         CPPFLAGS="$cf_save_CPPFLAGS"
22211         if test "$cf_cv_sizechange" = yes ; then
22212                 echo "size-change succeeded ($cf_opts)" >&5
22213                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22214                 break
22215         fi
22216 done
22217
22218 fi
22219 echo "$as_me:22219: result: $cf_cv_sizechange" >&5
22220 echo "${ECHO_T}$cf_cv_sizechange" >&6
22221 if test "$cf_cv_sizechange" != no ; then
22222
22223 cat >>confdefs.h <<\EOF
22224 #define HAVE_SIZECHANGE 1
22225 EOF
22226
22227         case "$cf_cv_sizechange" in
22228         (NEED*)
22229                 cat >>confdefs.h <<EOF
22230 #define $cf_cv_sizechange  1
22231 EOF
22232
22233                 ;;
22234         esac
22235 fi
22236
22237 echo "$as_me:22237: checking for memmove" >&5
22238 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22239 if test "${ac_cv_func_memmove+set}" = set; then
22240   echo $ECHO_N "(cached) $ECHO_C" >&6
22241 else
22242   cat >"conftest.$ac_ext" <<_ACEOF
22243 #line 22243 "configure"
22244 #include "confdefs.h"
22245 #define memmove autoconf_temporary
22246 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22247 #undef memmove
22248
22249 #ifdef __cplusplus
22250 extern "C"
22251 #endif
22252
22253 /* We use char because int might match the return type of a gcc2
22254    builtin and then its argument prototype would still apply.  */
22255 char memmove (void);
22256
22257 int
22258 main (void)
22259 {
22260
22261 /* The GNU C library defines stubs for functions which it implements
22262     to always fail with ENOSYS.  Some functions are actually named
22263     something starting with __ and the normal name is an alias.  */
22264 #if defined (__stub_memmove) || defined (__stub___memmove)
22265 #error found stub for memmove
22266 #endif
22267
22268         return memmove ();
22269   ;
22270   return 0;
22271 }
22272 _ACEOF
22273 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22274 if { (eval echo "$as_me:22274: \"$ac_link\"") >&5
22275   (eval $ac_link) 2>&5
22276   ac_status=$?
22277   echo "$as_me:22277: \$? = $ac_status" >&5
22278   (exit "$ac_status"); } &&
22279          { ac_try='test -s "conftest$ac_exeext"'
22280   { (eval echo "$as_me:22280: \"$ac_try\"") >&5
22281   (eval $ac_try) 2>&5
22282   ac_status=$?
22283   echo "$as_me:22283: \$? = $ac_status" >&5
22284   (exit "$ac_status"); }; }; then
22285   ac_cv_func_memmove=yes
22286 else
22287   echo "$as_me: failed program was:" >&5
22288 cat "conftest.$ac_ext" >&5
22289 ac_cv_func_memmove=no
22290 fi
22291 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22292 fi
22293 echo "$as_me:22293: result: $ac_cv_func_memmove" >&5
22294 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22295 if test "$ac_cv_func_memmove" = yes; then
22296   :
22297 else
22298
22299 echo "$as_me:22299: checking for bcopy" >&5
22300 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22301 if test "${ac_cv_func_bcopy+set}" = set; then
22302   echo $ECHO_N "(cached) $ECHO_C" >&6
22303 else
22304   cat >"conftest.$ac_ext" <<_ACEOF
22305 #line 22305 "configure"
22306 #include "confdefs.h"
22307 #define bcopy autoconf_temporary
22308 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22309 #undef bcopy
22310
22311 #ifdef __cplusplus
22312 extern "C"
22313 #endif
22314
22315 /* We use char because int might match the return type of a gcc2
22316    builtin and then its argument prototype would still apply.  */
22317 char bcopy (void);
22318
22319 int
22320 main (void)
22321 {
22322
22323 /* The GNU C library defines stubs for functions which it implements
22324     to always fail with ENOSYS.  Some functions are actually named
22325     something starting with __ and the normal name is an alias.  */
22326 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22327 #error found stub for bcopy
22328 #endif
22329
22330         return bcopy ();
22331   ;
22332   return 0;
22333 }
22334 _ACEOF
22335 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22336 if { (eval echo "$as_me:22336: \"$ac_link\"") >&5
22337   (eval $ac_link) 2>&5
22338   ac_status=$?
22339   echo "$as_me:22339: \$? = $ac_status" >&5
22340   (exit "$ac_status"); } &&
22341          { ac_try='test -s "conftest$ac_exeext"'
22342   { (eval echo "$as_me:22342: \"$ac_try\"") >&5
22343   (eval $ac_try) 2>&5
22344   ac_status=$?
22345   echo "$as_me:22345: \$? = $ac_status" >&5
22346   (exit "$ac_status"); }; }; then
22347   ac_cv_func_bcopy=yes
22348 else
22349   echo "$as_me: failed program was:" >&5
22350 cat "conftest.$ac_ext" >&5
22351 ac_cv_func_bcopy=no
22352 fi
22353 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22354 fi
22355 echo "$as_me:22355: result: $ac_cv_func_bcopy" >&5
22356 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22357 if test "$ac_cv_func_bcopy" = yes; then
22358
22359         echo "$as_me:22359: checking if bcopy does overlapping moves" >&5
22360 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22361 if test "${cf_cv_good_bcopy+set}" = set; then
22362   echo $ECHO_N "(cached) $ECHO_C" >&6
22363 else
22364
22365                 if test "$cross_compiling" = yes; then
22366   cf_cv_good_bcopy=unknown
22367 else
22368   cat >"conftest.$ac_ext" <<_ACEOF
22369 #line 22369 "configure"
22370 #include "confdefs.h"
22371
22372 int main(void) {
22373         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22374         char temp[40];
22375         bcopy(data, temp, sizeof(data));
22376         bcopy(temp+10, temp, 15);
22377         bcopy(temp+5, temp+15, 10);
22378         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22379 }
22380
22381 _ACEOF
22382 rm -f "conftest$ac_exeext"
22383 if { (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_good_bcopy=yes
22394 else
22395   echo "$as_me: program exited with status $ac_status" >&5
22396 echo "$as_me: failed program was:" >&5
22397 cat "conftest.$ac_ext" >&5
22398 cf_cv_good_bcopy=no
22399 fi
22400 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22401 fi
22402
22403 fi
22404 echo "$as_me:22404: result: $cf_cv_good_bcopy" >&5
22405 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22406
22407 else
22408   cf_cv_good_bcopy=no
22409 fi
22410
22411         if test "$cf_cv_good_bcopy" = yes ; then
22412
22413 cat >>confdefs.h <<\EOF
22414 #define USE_OK_BCOPY 1
22415 EOF
22416
22417         else
22418
22419 cat >>confdefs.h <<\EOF
22420 #define USE_MY_MEMMOVE 1
22421 EOF
22422
22423         fi
22424
22425 fi
22426
22427 tty >/dev/null 2>&1 || {
22428 for ac_func in posix_openpt
22429 do
22430 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22431 echo "$as_me:22431: checking for $ac_func" >&5
22432 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22433 if eval "test \"\${$as_ac_var+set}\" = set"; then
22434   echo $ECHO_N "(cached) $ECHO_C" >&6
22435 else
22436   cat >"conftest.$ac_ext" <<_ACEOF
22437 #line 22437 "configure"
22438 #include "confdefs.h"
22439 #define $ac_func autoconf_temporary
22440 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22441 #undef $ac_func
22442
22443 #ifdef __cplusplus
22444 extern "C"
22445 #endif
22446
22447 /* We use char because int might match the return type of a gcc2
22448    builtin and then its argument prototype would still apply.  */
22449 char $ac_func (void);
22450
22451 int
22452 main (void)
22453 {
22454
22455 /* The GNU C library defines stubs for functions which it implements
22456     to always fail with ENOSYS.  Some functions are actually named
22457     something starting with __ and the normal name is an alias.  */
22458 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22459 #error found stub for $ac_func
22460 #endif
22461
22462         return $ac_func ();
22463   ;
22464   return 0;
22465 }
22466 _ACEOF
22467 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22468 if { (eval echo "$as_me:22468: \"$ac_link\"") >&5
22469   (eval $ac_link) 2>&5
22470   ac_status=$?
22471   echo "$as_me:22471: \$? = $ac_status" >&5
22472   (exit "$ac_status"); } &&
22473          { ac_try='test -s "conftest$ac_exeext"'
22474   { (eval echo "$as_me:22474: \"$ac_try\"") >&5
22475   (eval $ac_try) 2>&5
22476   ac_status=$?
22477   echo "$as_me:22477: \$? = $ac_status" >&5
22478   (exit "$ac_status"); }; }; then
22479   eval "$as_ac_var=yes"
22480 else
22481   echo "$as_me: failed program was:" >&5
22482 cat "conftest.$ac_ext" >&5
22483 eval "$as_ac_var=no"
22484 fi
22485 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22486 fi
22487 echo "$as_me:22487: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22488 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22489 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22490   cat >>confdefs.h <<EOF
22491 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22492 EOF
22493
22494 fi
22495 done
22496  }
22497 echo "$as_me:22497: checking if poll really works" >&5
22498 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22499 if test "${cf_cv_working_poll+set}" = set; then
22500   echo $ECHO_N "(cached) $ECHO_C" >&6
22501 else
22502
22503 if test "$cross_compiling" = yes; then
22504   cf_cv_working_poll=unknown
22505 else
22506   cat >"conftest.$ac_ext" <<_ACEOF
22507 #line 22507 "configure"
22508 #include "confdefs.h"
22509
22510 #include <stdlib.h>
22511 #include <stdio.h>
22512 #include <unistd.h>
22513 #include <fcntl.h>
22514 #ifdef HAVE_POLL_H
22515 #include <poll.h>
22516 #else
22517 #include <sys/poll.h>
22518 #endif
22519 int main(void) {
22520         struct pollfd myfds;
22521         int ret;
22522
22523         /* check for Darwin bug with respect to "devices" */
22524         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22525         if (myfds.fd < 0)
22526                 myfds.fd = 0;
22527         myfds.events = POLLIN;
22528         myfds.revents = 0;
22529
22530         ret = poll(&myfds, 1, 100);
22531
22532         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22533                 ret = -1;
22534         } else {
22535                 int fd = 0;
22536                 if (!isatty(fd)) {
22537                         fd = open("/dev/tty", 2);       /* O_RDWR */
22538                 }
22539 #ifdef HAVE_POSIX_OPENPT
22540                 if (fd < 0) {
22541                         fd = posix_openpt(O_RDWR);
22542                 }
22543 #endif
22544
22545                 if (fd >= 0) {
22546                         /* also check with standard input */
22547                         myfds.fd = fd;
22548                         myfds.events = POLLIN;
22549                         myfds.revents = 0;
22550                         ret = poll(&myfds, 1, 100);
22551                 } else {
22552                         ret = -1;
22553                 }
22554         }
22555         ${cf_cv_main_return:-return}(ret < 0);
22556 }
22557 _ACEOF
22558 rm -f "conftest$ac_exeext"
22559 if { (eval echo "$as_me:22559: \"$ac_link\"") >&5
22560   (eval $ac_link) 2>&5
22561   ac_status=$?
22562   echo "$as_me:22562: \$? = $ac_status" >&5
22563   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22564   { (eval echo "$as_me:22564: \"$ac_try\"") >&5
22565   (eval $ac_try) 2>&5
22566   ac_status=$?
22567   echo "$as_me:22567: \$? = $ac_status" >&5
22568   (exit "$ac_status"); }; }; then
22569   cf_cv_working_poll=yes
22570 else
22571   echo "$as_me: program exited with status $ac_status" >&5
22572 echo "$as_me: failed program was:" >&5
22573 cat "conftest.$ac_ext" >&5
22574 cf_cv_working_poll=no
22575 fi
22576 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22577 fi
22578 fi
22579 echo "$as_me:22579: result: $cf_cv_working_poll" >&5
22580 echo "${ECHO_T}$cf_cv_working_poll" >&6
22581 test "$cf_cv_working_poll" = "yes" &&
22582 cat >>confdefs.h <<\EOF
22583 #define HAVE_WORKING_POLL 1
22584 EOF
22585
22586 echo "$as_me:22586: checking for va_copy" >&5
22587 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
22588 if test "${cf_cv_have_va_copy+set}" = set; then
22589   echo $ECHO_N "(cached) $ECHO_C" >&6
22590 else
22591
22592 cat >"conftest.$ac_ext" <<_ACEOF
22593 #line 22593 "configure"
22594 #include "confdefs.h"
22595
22596 #include <stdarg.h>
22597
22598 int
22599 main (void)
22600 {
22601
22602         static va_list dst;
22603         static va_list src;
22604         va_copy(dst, src)
22605   ;
22606   return 0;
22607 }
22608 _ACEOF
22609 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22610 if { (eval echo "$as_me:22610: \"$ac_link\"") >&5
22611   (eval $ac_link) 2>&5
22612   ac_status=$?
22613   echo "$as_me:22613: \$? = $ac_status" >&5
22614   (exit "$ac_status"); } &&
22615          { ac_try='test -s "conftest$ac_exeext"'
22616   { (eval echo "$as_me:22616: \"$ac_try\"") >&5
22617   (eval $ac_try) 2>&5
22618   ac_status=$?
22619   echo "$as_me:22619: \$? = $ac_status" >&5
22620   (exit "$ac_status"); }; }; then
22621   cf_cv_have_va_copy=yes
22622 else
22623   echo "$as_me: failed program was:" >&5
22624 cat "conftest.$ac_ext" >&5
22625 cf_cv_have_va_copy=no
22626 fi
22627 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22628 fi
22629 echo "$as_me:22629: result: $cf_cv_have_va_copy" >&5
22630 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
22631
22632 if test "$cf_cv_have_va_copy" = yes;
22633 then
22634
22635 cat >>confdefs.h <<\EOF
22636 #define HAVE_VA_COPY 1
22637 EOF
22638
22639 else # !cf_cv_have_va_copy
22640
22641 echo "$as_me:22641: checking for __va_copy" >&5
22642 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
22643 if test "${cf_cv_have___va_copy+set}" = set; then
22644   echo $ECHO_N "(cached) $ECHO_C" >&6
22645 else
22646
22647 cat >"conftest.$ac_ext" <<_ACEOF
22648 #line 22648 "configure"
22649 #include "confdefs.h"
22650
22651 #include <stdarg.h>
22652
22653 int
22654 main (void)
22655 {
22656
22657         static va_list dst;
22658         static va_list src;
22659         __va_copy(dst, src)
22660   ;
22661   return 0;
22662 }
22663 _ACEOF
22664 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22665 if { (eval echo "$as_me:22665: \"$ac_link\"") >&5
22666   (eval $ac_link) 2>&5
22667   ac_status=$?
22668   echo "$as_me:22668: \$? = $ac_status" >&5
22669   (exit "$ac_status"); } &&
22670          { ac_try='test -s "conftest$ac_exeext"'
22671   { (eval echo "$as_me:22671: \"$ac_try\"") >&5
22672   (eval $ac_try) 2>&5
22673   ac_status=$?
22674   echo "$as_me:22674: \$? = $ac_status" >&5
22675   (exit "$ac_status"); }; }; then
22676   cf_cv_have___va_copy=yes
22677 else
22678   echo "$as_me: failed program was:" >&5
22679 cat "conftest.$ac_ext" >&5
22680 cf_cv_have___va_copy=no
22681 fi
22682 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22683 fi
22684 echo "$as_me:22684: result: $cf_cv_have___va_copy" >&5
22685 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
22686
22687 if test "$cf_cv_have___va_copy" = yes
22688 then
22689
22690 cat >>confdefs.h <<\EOF
22691 #define HAVE___VA_COPY 1
22692 EOF
22693
22694 else # !cf_cv_have___va_copy
22695
22696 echo "$as_me:22696: checking for __builtin_va_copy" >&5
22697 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
22698 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
22699   echo $ECHO_N "(cached) $ECHO_C" >&6
22700 else
22701
22702 cat >"conftest.$ac_ext" <<_ACEOF
22703 #line 22703 "configure"
22704 #include "confdefs.h"
22705
22706 #include <stdarg.h>
22707
22708 int
22709 main (void)
22710 {
22711
22712         static va_list dst;
22713         static va_list src;
22714         __builtin_va_copy(dst, src)
22715   ;
22716   return 0;
22717 }
22718 _ACEOF
22719 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22720 if { (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_have___builtin_va_copy=yes
22732 else
22733   echo "$as_me: failed program was:" >&5
22734 cat "conftest.$ac_ext" >&5
22735 cf_cv_have___builtin_va_copy=no
22736 fi
22737 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22738 fi
22739 echo "$as_me:22739: result: $cf_cv_have___builtin_va_copy" >&5
22740 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
22741
22742 test "$cf_cv_have___builtin_va_copy" = yes &&
22743
22744 cat >>confdefs.h <<\EOF
22745 #define HAVE___BUILTIN_VA_COPY 1
22746 EOF
22747
22748 fi # cf_cv_have___va_copy
22749
22750 fi # cf_cv_have_va_copy
22751
22752 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
22753 (*yes*)
22754         ;;
22755
22756 (*)
22757         echo "$as_me:22757: checking if we can simply copy va_list" >&5
22758 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
22759 if test "${cf_cv_pointer_va_list+set}" = set; then
22760   echo $ECHO_N "(cached) $ECHO_C" >&6
22761 else
22762
22763 cat >"conftest.$ac_ext" <<_ACEOF
22764 #line 22764 "configure"
22765 #include "confdefs.h"
22766
22767 #include <stdarg.h>
22768
22769 int
22770 main (void)
22771 {
22772
22773         va_list dst;
22774         va_list src;
22775         dst = src
22776   ;
22777   return 0;
22778 }
22779 _ACEOF
22780 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22781 if { (eval echo "$as_me:22781: \"$ac_link\"") >&5
22782   (eval $ac_link) 2>&5
22783   ac_status=$?
22784   echo "$as_me:22784: \$? = $ac_status" >&5
22785   (exit "$ac_status"); } &&
22786          { ac_try='test -s "conftest$ac_exeext"'
22787   { (eval echo "$as_me:22787: \"$ac_try\"") >&5
22788   (eval $ac_try) 2>&5
22789   ac_status=$?
22790   echo "$as_me:22790: \$? = $ac_status" >&5
22791   (exit "$ac_status"); }; }; then
22792   cf_cv_pointer_va_list=yes
22793 else
22794   echo "$as_me: failed program was:" >&5
22795 cat "conftest.$ac_ext" >&5
22796 cf_cv_pointer_va_list=no
22797 fi
22798 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22799 fi
22800 echo "$as_me:22800: result: $cf_cv_pointer_va_list" >&5
22801 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
22802
22803         if test "$cf_cv_pointer_va_list" = no
22804         then
22805                 echo "$as_me:22805: checking if we can copy va_list indirectly" >&5
22806 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
22807 if test "${cf_cv_array_va_list+set}" = set; then
22808   echo $ECHO_N "(cached) $ECHO_C" >&6
22809 else
22810
22811 cat >"conftest.$ac_ext" <<_ACEOF
22812 #line 22812 "configure"
22813 #include "confdefs.h"
22814
22815 #include <stdarg.h>
22816
22817 int
22818 main (void)
22819 {
22820
22821         va_list dst;
22822         va_list src;
22823         *dst = *src
22824   ;
22825   return 0;
22826 }
22827 _ACEOF
22828 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22829 if { (eval echo "$as_me:22829: \"$ac_link\"") >&5
22830   (eval $ac_link) 2>&5
22831   ac_status=$?
22832   echo "$as_me:22832: \$? = $ac_status" >&5
22833   (exit "$ac_status"); } &&
22834          { ac_try='test -s "conftest$ac_exeext"'
22835   { (eval echo "$as_me:22835: \"$ac_try\"") >&5
22836   (eval $ac_try) 2>&5
22837   ac_status=$?
22838   echo "$as_me:22838: \$? = $ac_status" >&5
22839   (exit "$ac_status"); }; }; then
22840   cf_cv_array_va_list=yes
22841 else
22842   echo "$as_me: failed program was:" >&5
22843 cat "conftest.$ac_ext" >&5
22844 cf_cv_array_va_list=no
22845 fi
22846 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22847 fi
22848 echo "$as_me:22848: result: $cf_cv_array_va_list" >&5
22849 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22850                 test "$cf_cv_array_va_list" = yes &&
22851 cat >>confdefs.h <<\EOF
22852 #define ARRAY_VA_LIST 1
22853 EOF
22854
22855         fi
22856         ;;
22857 esac
22858
22859 echo "$as_me:22859: checking for pid_t" >&5
22860 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22861 if test "${ac_cv_type_pid_t+set}" = set; then
22862   echo $ECHO_N "(cached) $ECHO_C" >&6
22863 else
22864   cat >"conftest.$ac_ext" <<_ACEOF
22865 #line 22865 "configure"
22866 #include "confdefs.h"
22867 $ac_includes_default
22868 int
22869 main (void)
22870 {
22871 if ((pid_t *) 0)
22872   return 0;
22873 if (sizeof (pid_t))
22874   return 0;
22875   ;
22876   return 0;
22877 }
22878 _ACEOF
22879 rm -f "conftest.$ac_objext"
22880 if { (eval echo "$as_me:22880: \"$ac_compile\"") >&5
22881   (eval $ac_compile) 2>&5
22882   ac_status=$?
22883   echo "$as_me:22883: \$? = $ac_status" >&5
22884   (exit "$ac_status"); } &&
22885          { ac_try='test -s "conftest.$ac_objext"'
22886   { (eval echo "$as_me:22886: \"$ac_try\"") >&5
22887   (eval $ac_try) 2>&5
22888   ac_status=$?
22889   echo "$as_me:22889: \$? = $ac_status" >&5
22890   (exit "$ac_status"); }; }; then
22891   ac_cv_type_pid_t=yes
22892 else
22893   echo "$as_me: failed program was:" >&5
22894 cat "conftest.$ac_ext" >&5
22895 ac_cv_type_pid_t=no
22896 fi
22897 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22898 fi
22899 echo "$as_me:22899: result: $ac_cv_type_pid_t" >&5
22900 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22901 if test "$ac_cv_type_pid_t" = yes; then
22902   :
22903 else
22904
22905 cat >>confdefs.h <<EOF
22906 #define pid_t int
22907 EOF
22908
22909 fi
22910
22911 for ac_header in unistd.h vfork.h
22912 do
22913 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22914 echo "$as_me:22914: checking for $ac_header" >&5
22915 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22916 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22917   echo $ECHO_N "(cached) $ECHO_C" >&6
22918 else
22919   cat >"conftest.$ac_ext" <<_ACEOF
22920 #line 22920 "configure"
22921 #include "confdefs.h"
22922 #include <$ac_header>
22923 _ACEOF
22924 if { (eval echo "$as_me:22924: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22925   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22926   ac_status=$?
22927   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22928   rm -f conftest.er1
22929   cat conftest.err >&5
22930   echo "$as_me:22930: \$? = $ac_status" >&5
22931   (exit "$ac_status"); } >/dev/null; then
22932   if test -s conftest.err; then
22933     ac_cpp_err=$ac_c_preproc_warn_flag
22934   else
22935     ac_cpp_err=
22936   fi
22937 else
22938   ac_cpp_err=yes
22939 fi
22940 if test -z "$ac_cpp_err"; then
22941   eval "$as_ac_Header=yes"
22942 else
22943   echo "$as_me: failed program was:" >&5
22944   cat "conftest.$ac_ext" >&5
22945   eval "$as_ac_Header=no"
22946 fi
22947 rm -f conftest.err "conftest.$ac_ext"
22948 fi
22949 echo "$as_me:22949: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22950 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22951 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22952   cat >>confdefs.h <<EOF
22953 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22954 EOF
22955
22956 fi
22957 done
22958
22959 for ac_func in fork vfork
22960 do
22961 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22962 echo "$as_me:22962: checking for $ac_func" >&5
22963 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22964 if eval "test \"\${$as_ac_var+set}\" = set"; then
22965   echo $ECHO_N "(cached) $ECHO_C" >&6
22966 else
22967   cat >"conftest.$ac_ext" <<_ACEOF
22968 #line 22968 "configure"
22969 #include "confdefs.h"
22970 #define $ac_func autoconf_temporary
22971 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22972 #undef $ac_func
22973
22974 #ifdef __cplusplus
22975 extern "C"
22976 #endif
22977
22978 /* We use char because int might match the return type of a gcc2
22979    builtin and then its argument prototype would still apply.  */
22980 char $ac_func (void);
22981
22982 int
22983 main (void)
22984 {
22985
22986 /* The GNU C library defines stubs for functions which it implements
22987     to always fail with ENOSYS.  Some functions are actually named
22988     something starting with __ and the normal name is an alias.  */
22989 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22990 #error found stub for $ac_func
22991 #endif
22992
22993         return $ac_func ();
22994   ;
22995   return 0;
22996 }
22997 _ACEOF
22998 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22999 if { (eval echo "$as_me:22999: \"$ac_link\"") >&5
23000   (eval $ac_link) 2>&5
23001   ac_status=$?
23002   echo "$as_me:23002: \$? = $ac_status" >&5
23003   (exit "$ac_status"); } &&
23004          { ac_try='test -s "conftest$ac_exeext"'
23005   { (eval echo "$as_me:23005: \"$ac_try\"") >&5
23006   (eval $ac_try) 2>&5
23007   ac_status=$?
23008   echo "$as_me:23008: \$? = $ac_status" >&5
23009   (exit "$ac_status"); }; }; then
23010   eval "$as_ac_var=yes"
23011 else
23012   echo "$as_me: failed program was:" >&5
23013 cat "conftest.$ac_ext" >&5
23014 eval "$as_ac_var=no"
23015 fi
23016 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23017 fi
23018 echo "$as_me:23018: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23019 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23020 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23021   cat >>confdefs.h <<EOF
23022 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23023 EOF
23024
23025 fi
23026 done
23027
23028 ac_cv_func_fork_works=$ac_cv_func_fork
23029 if test "x$ac_cv_func_fork" = xyes; then
23030   echo "$as_me:23030: checking for working fork" >&5
23031 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23032 if test "${ac_cv_func_fork_works+set}" = set; then
23033   echo $ECHO_N "(cached) $ECHO_C" >&6
23034 else
23035   if test "$cross_compiling" = yes; then
23036   ac_cv_func_fork_works=cross
23037 else
23038   cat >"conftest.$ac_ext" <<_ACEOF
23039 /* By Rüdiger Kuhlmann. */
23040       #include <sys/types.h>
23041       #if HAVE_UNISTD_H
23042       # include <unistd.h>
23043       #endif
23044       /* Some systems only have a dummy stub for fork() */
23045       int main (void)
23046       {
23047         if (fork() < 0)
23048           $ac_main_return (1);
23049         $ac_main_return (0);
23050       }
23051 _ACEOF
23052 rm -f "conftest$ac_exeext"
23053 if { (eval echo "$as_me:23053: \"$ac_link\"") >&5
23054   (eval $ac_link) 2>&5
23055   ac_status=$?
23056   echo "$as_me:23056: \$? = $ac_status" >&5
23057   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23058   { (eval echo "$as_me:23058: \"$ac_try\"") >&5
23059   (eval $ac_try) 2>&5
23060   ac_status=$?
23061   echo "$as_me:23061: \$? = $ac_status" >&5
23062   (exit "$ac_status"); }; }; then
23063   ac_cv_func_fork_works=yes
23064 else
23065   echo "$as_me: program exited with status $ac_status" >&5
23066 echo "$as_me: failed program was:" >&5
23067 cat "conftest.$ac_ext" >&5
23068 ac_cv_func_fork_works=no
23069 fi
23070 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23071 fi
23072 fi
23073 echo "$as_me:23073: result: $ac_cv_func_fork_works" >&5
23074 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23075
23076 fi
23077 if test "x$ac_cv_func_fork_works" = xcross; then
23078   case $host in
23079     *-*-amigaos* | *-*-msdosdjgpp*)
23080       # Override, as these systems have only a dummy fork() stub
23081       ac_cv_func_fork_works=no
23082       ;;
23083     *)
23084       ac_cv_func_fork_works=yes
23085       ;;
23086   esac
23087   { echo "$as_me:23087: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23088 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23089 fi
23090 ac_cv_func_vfork_works=$ac_cv_func_vfork
23091 if test "x$ac_cv_func_vfork" = xyes; then
23092   echo "$as_me:23092: checking for working vfork" >&5
23093 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23094 if test "${ac_cv_func_vfork_works+set}" = set; then
23095   echo $ECHO_N "(cached) $ECHO_C" >&6
23096 else
23097   if test "$cross_compiling" = yes; then
23098   ac_cv_func_vfork_works=cross
23099 else
23100   cat >"conftest.$ac_ext" <<_ACEOF
23101 #line 23101 "configure"
23102 #include "confdefs.h"
23103 /* Thanks to Paul Eggert for this test.  */
23104 #include <stdio.h>
23105 #include <sys/types.h>
23106 #include <sys/stat.h>
23107 #if HAVE_UNISTD_H
23108 # include <unistd.h>
23109 #endif
23110 #if HAVE_VFORK_H
23111 # include <vfork.h>
23112 #endif
23113 /* On some sparc systems, changes by the child to local and incoming
23114    argument registers are propagated back to the parent.  The compiler
23115    is told about this with #include <vfork.h>, but some compilers
23116    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23117    static variable whose address is put into a register that is
23118    clobbered by the vfork.  */
23119 static
23120 #ifdef __cplusplus
23121 sparc_address_test (int arg)
23122 # else
23123 sparc_address_test (arg) int arg;
23124 #endif
23125 {
23126   static pid_t child;
23127   if (!child) {
23128     child = vfork ();
23129     if (child < 0) {
23130       perror ("vfork");
23131       _exit(2);
23132     }
23133     if (!child) {
23134       arg = getpid();
23135       write(-1, "", 0);
23136       _exit (arg);
23137     }
23138   }
23139 }
23140
23141 int
23142 main (void)
23143 {
23144   pid_t parent = getpid ();
23145   pid_t child;
23146
23147   sparc_address_test ();
23148
23149   child = vfork ();
23150
23151   if (child == 0) {
23152     /* Here is another test for sparc vfork register problems.  This
23153        test uses lots of local variables, at least as many local
23154        variables as main has allocated so far including compiler
23155        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23156        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23157        reuse the register of parent for one of the local variables,
23158        since it will think that parent can't possibly be used any more
23159        in this routine.  Assigning to the local variable will thus
23160        munge parent in the parent process.  */
23161     pid_t
23162       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23163       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23164     /* Convince the compiler that p..p7 are live; otherwise, it might
23165        use the same hardware register for all 8 local variables.  */
23166     if (p != p1 || p != p2 || p != p3 || p != p4
23167         || p != p5 || p != p6 || p != p7)
23168       _exit(1);
23169
23170     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23171        from child file descriptors.  If the child closes a descriptor
23172        before it execs or exits, this munges the parent's descriptor
23173        as well.  Test for this by closing stdout in the child.  */
23174     _exit(close(fileno(stdout)) != 0);
23175   } else {
23176     int status;
23177     struct stat st;
23178
23179     while (wait(&status) != child)
23180       ;
23181     $ac_main_return(
23182          /* Was there some problem with vforking?  */
23183          child < 0
23184
23185          /* Did the child fail?  (This shouldn't happen.)  */
23186          || status
23187
23188          /* Did the vfork/compiler bug occur?  */
23189          || parent != getpid()
23190
23191          /* Did the file descriptor bug occur?  */
23192          || fstat(fileno(stdout), &st) != 0
23193          );
23194   }
23195 }
23196 _ACEOF
23197 rm -f "conftest$ac_exeext"
23198 if { (eval echo "$as_me:23198: \"$ac_link\"") >&5
23199   (eval $ac_link) 2>&5
23200   ac_status=$?
23201   echo "$as_me:23201: \$? = $ac_status" >&5
23202   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23203   { (eval echo "$as_me:23203: \"$ac_try\"") >&5
23204   (eval $ac_try) 2>&5
23205   ac_status=$?
23206   echo "$as_me:23206: \$? = $ac_status" >&5
23207   (exit "$ac_status"); }; }; then
23208   ac_cv_func_vfork_works=yes
23209 else
23210   echo "$as_me: program exited with status $ac_status" >&5
23211 echo "$as_me: failed program was:" >&5
23212 cat "conftest.$ac_ext" >&5
23213 ac_cv_func_vfork_works=no
23214 fi
23215 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23216 fi
23217 fi
23218 echo "$as_me:23218: result: $ac_cv_func_vfork_works" >&5
23219 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23220
23221 fi;
23222 if test "x$ac_cv_func_fork_works" = xcross; then
23223   ac_cv_func_vfork_works=ac_cv_func_vfork
23224   { echo "$as_me:23224: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23225 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23226 fi
23227
23228 if test "x$ac_cv_func_vfork_works" = xyes; then
23229
23230 cat >>confdefs.h <<\EOF
23231 #define HAVE_WORKING_VFORK 1
23232 EOF
23233
23234 else
23235
23236 cat >>confdefs.h <<\EOF
23237 #define vfork fork
23238 EOF
23239
23240 fi
23241 if test "x$ac_cv_func_fork_works" = xyes; then
23242
23243 cat >>confdefs.h <<\EOF
23244 #define HAVE_WORKING_FORK 1
23245 EOF
23246
23247 fi
23248
23249 echo "$as_me:23249: checking if fopen accepts explicit binary mode" >&5
23250 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23251 if test "${cf_cv_fopen_bin_r+set}" = set; then
23252   echo $ECHO_N "(cached) $ECHO_C" >&6
23253 else
23254
23255         if test "$cross_compiling" = yes; then
23256   cf_cv_fopen_bin_r=unknown
23257 else
23258   cat >"conftest.$ac_ext" <<_ACEOF
23259 #line 23259 "configure"
23260 #include "confdefs.h"
23261
23262 #include <stdio.h>
23263 int main(void) {
23264         FILE *fp = fopen("conftest.tmp", "wb");
23265         int rc = 0;
23266         if (fp != 0) {
23267                 int p, q;
23268                 for (p = 0; p < 256; ++p) {
23269                         fputc(p, fp);
23270                 }
23271                 fclose(fp);
23272                 fp = fopen("conftest.tmp", "rb");
23273                 if (fp != 0) {
23274                         for (p = 0; p < 256; ++p) {
23275                                 q = fgetc(fp);
23276                                 if (q != p) {
23277                                         rc = 1;
23278                                         break;
23279                                 }
23280                         }
23281                 } else {
23282                         rc = 1;
23283                 }
23284         } else {
23285                 rc = 1;
23286         }
23287         ${cf_cv_main_return:-return} (rc);
23288 }
23289
23290 _ACEOF
23291 rm -f "conftest$ac_exeext"
23292 if { (eval echo "$as_me:23292: \"$ac_link\"") >&5
23293   (eval $ac_link) 2>&5
23294   ac_status=$?
23295   echo "$as_me:23295: \$? = $ac_status" >&5
23296   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23297   { (eval echo "$as_me:23297: \"$ac_try\"") >&5
23298   (eval $ac_try) 2>&5
23299   ac_status=$?
23300   echo "$as_me:23300: \$? = $ac_status" >&5
23301   (exit "$ac_status"); }; }; then
23302   cf_cv_fopen_bin_r=yes
23303 else
23304   echo "$as_me: program exited with status $ac_status" >&5
23305 echo "$as_me: failed program was:" >&5
23306 cat "conftest.$ac_ext" >&5
23307 cf_cv_fopen_bin_r=no
23308 fi
23309 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23310 fi
23311
23312 fi
23313 echo "$as_me:23313: result: $cf_cv_fopen_bin_r" >&5
23314 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23315 test "x$cf_cv_fopen_bin_r" != xno &&
23316 cat >>confdefs.h <<\EOF
23317 #define USE_FOPEN_BIN_R 1
23318 EOF
23319
23320 # special check for test/ditto.c
23321
23322 echo "$as_me:23322: checking for openpty in -lutil" >&5
23323 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23324 if test "${ac_cv_lib_util_openpty+set}" = set; then
23325   echo $ECHO_N "(cached) $ECHO_C" >&6
23326 else
23327   ac_check_lib_save_LIBS=$LIBS
23328 LIBS="-lutil  $LIBS"
23329 cat >"conftest.$ac_ext" <<_ACEOF
23330 #line 23330 "configure"
23331 #include "confdefs.h"
23332
23333 /* Override any gcc2 internal prototype to avoid an error.  */
23334 #ifdef __cplusplus
23335 extern "C"
23336 #endif
23337 /* We use char because int might match the return type of a gcc2
23338    builtin and then its argument prototype would still apply.  */
23339 char openpty ();
23340 int
23341 main (void)
23342 {
23343 openpty ();
23344   ;
23345   return 0;
23346 }
23347 _ACEOF
23348 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23349 if { (eval echo "$as_me:23349: \"$ac_link\"") >&5
23350   (eval $ac_link) 2>&5
23351   ac_status=$?
23352   echo "$as_me:23352: \$? = $ac_status" >&5
23353   (exit "$ac_status"); } &&
23354          { ac_try='test -s "conftest$ac_exeext"'
23355   { (eval echo "$as_me:23355: \"$ac_try\"") >&5
23356   (eval $ac_try) 2>&5
23357   ac_status=$?
23358   echo "$as_me:23358: \$? = $ac_status" >&5
23359   (exit "$ac_status"); }; }; then
23360   ac_cv_lib_util_openpty=yes
23361 else
23362   echo "$as_me: failed program was:" >&5
23363 cat "conftest.$ac_ext" >&5
23364 ac_cv_lib_util_openpty=no
23365 fi
23366 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23367 LIBS=$ac_check_lib_save_LIBS
23368 fi
23369 echo "$as_me:23369: result: $ac_cv_lib_util_openpty" >&5
23370 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23371 if test "$ac_cv_lib_util_openpty" = yes; then
23372   cf_cv_lib_util=yes
23373 else
23374   cf_cv_lib_util=no
23375 fi
23376
23377 echo "$as_me:23377: checking for openpty header" >&5
23378 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23379 if test "${cf_cv_func_openpty+set}" = set; then
23380   echo $ECHO_N "(cached) $ECHO_C" >&6
23381 else
23382
23383         cf_save_LIBS="$LIBS"
23384         test "$cf_cv_lib_util" = yes && {
23385 cf_add_libs="$LIBS"
23386 # reverse order
23387 cf_add_0lib=
23388 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23389 # filter duplicates
23390 for cf_add_1lib in $cf_add_0lib; do
23391         for cf_add_2lib in $cf_add_libs; do
23392                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23393                         cf_add_1lib=
23394                         break
23395                 fi
23396         done
23397         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23398 done
23399 LIBS="$cf_add_libs"
23400  }
23401         for cf_header in pty.h libutil.h util.h
23402         do
23403         cat >"conftest.$ac_ext" <<_ACEOF
23404 #line 23404 "configure"
23405 #include "confdefs.h"
23406
23407 #include <$cf_header>
23408
23409 int
23410 main (void)
23411 {
23412
23413         int x = openpty((int *)0, (int *)0, (char *)0,
23414                                    (struct termios *)0, (struct winsize *)0);
23415
23416   ;
23417   return 0;
23418 }
23419 _ACEOF
23420 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23421 if { (eval echo "$as_me:23421: \"$ac_link\"") >&5
23422   (eval $ac_link) 2>&5
23423   ac_status=$?
23424   echo "$as_me:23424: \$? = $ac_status" >&5
23425   (exit "$ac_status"); } &&
23426          { ac_try='test -s "conftest$ac_exeext"'
23427   { (eval echo "$as_me:23427: \"$ac_try\"") >&5
23428   (eval $ac_try) 2>&5
23429   ac_status=$?
23430   echo "$as_me:23430: \$? = $ac_status" >&5
23431   (exit "$ac_status"); }; }; then
23432
23433                 cf_cv_func_openpty=$cf_header
23434                 break
23435
23436 else
23437   echo "$as_me: failed program was:" >&5
23438 cat "conftest.$ac_ext" >&5
23439
23440                 cf_cv_func_openpty=no
23441
23442 fi
23443 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23444         done
23445         LIBS="$cf_save_LIBS"
23446
23447 fi
23448 echo "$as_me:23448: result: $cf_cv_func_openpty" >&5
23449 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23450
23451 if test "$cf_cv_func_openpty" != no ; then
23452
23453 cat >>confdefs.h <<EOF
23454 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23455 EOF
23456
23457 cat >>confdefs.h <<\EOF
23458 #define USE_XTERM_PTY 1
23459 EOF
23460
23461         if test "x$cf_cv_lib_util" = xyes ; then
23462
23463 cf_add_libs="$TEST_LIBS"
23464 # reverse order
23465 cf_add_0lib=
23466 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23467 # filter duplicates
23468 for cf_add_1lib in $cf_add_0lib; do
23469         for cf_add_2lib in $cf_add_libs; do
23470                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23471                         cf_add_1lib=
23472                         break
23473                 fi
23474         done
23475         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23476 done
23477 TEST_LIBS="$cf_add_libs"
23478
23479         fi
23480 fi
23481
23482 if test "$with_hashed_db" != no ; then
23483
23484 cat >>confdefs.h <<\EOF
23485 #define USE_HASHED_DB 1
23486 EOF
23487
23488 case $with_hashed_db in
23489 (yes|*able*)
23490         ;;
23491 (*)
23492         if test -d "$with_hashed_db" ; then
23493
23494 if test -n "$with_hashed_db/include" ; then
23495   for cf_add_incdir in $with_hashed_db/include
23496   do
23497         while test "$cf_add_incdir" != /usr/include
23498         do
23499           if test -d "$cf_add_incdir"
23500           then
23501                 cf_have_incdir=no
23502                 if test -n "$CFLAGS$CPPFLAGS" ; then
23503                   # a loop is needed to ensure we can add subdirs of existing dirs
23504                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23505                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23506                           cf_have_incdir=yes; break
23507                         fi
23508                   done
23509                 fi
23510
23511                 if test "$cf_have_incdir" = no ; then
23512                   if test "$cf_add_incdir" = /usr/local/include ; then
23513                         if test "$GCC" = yes
23514                         then
23515                           cf_save_CPPFLAGS=$CPPFLAGS
23516
23517         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23518         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23519
23520                           cat >"conftest.$ac_ext" <<_ACEOF
23521 #line 23521 "configure"
23522 #include "confdefs.h"
23523 #include <stdio.h>
23524 int
23525 main (void)
23526 {
23527 printf("Hello")
23528   ;
23529   return 0;
23530 }
23531 _ACEOF
23532 rm -f "conftest.$ac_objext"
23533 if { (eval echo "$as_me:23533: \"$ac_compile\"") >&5
23534   (eval $ac_compile) 2>&5
23535   ac_status=$?
23536   echo "$as_me:23536: \$? = $ac_status" >&5
23537   (exit "$ac_status"); } &&
23538          { ac_try='test -s "conftest.$ac_objext"'
23539   { (eval echo "$as_me:23539: \"$ac_try\"") >&5
23540   (eval $ac_try) 2>&5
23541   ac_status=$?
23542   echo "$as_me:23542: \$? = $ac_status" >&5
23543   (exit "$ac_status"); }; }; then
23544   :
23545 else
23546   echo "$as_me: failed program was:" >&5
23547 cat "conftest.$ac_ext" >&5
23548 cf_have_incdir=yes
23549 fi
23550 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23551                           CPPFLAGS=$cf_save_CPPFLAGS
23552                         fi
23553                   fi
23554                 fi
23555
23556                 if test "$cf_have_incdir" = no ; then
23557                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23558
23559 echo "${as_me:-configure}:23559: testing adding $cf_add_incdir to include-path ..." 1>&5
23560
23561                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23562
23563                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23564                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23565                   cf_add_incdir="$cf_top_incdir"
23566                 else
23567                   break
23568                 fi
23569           else
23570                 break
23571           fi
23572         done
23573   done
23574 fi
23575
23576 if test -n "$with_hashed_db/lib" ; then
23577         for cf_add_libdir in $with_hashed_db/lib
23578         do
23579                 if test "$cf_add_libdir" = /usr/lib ; then
23580                         :
23581                 elif test -d "$cf_add_libdir"
23582                 then
23583                         cf_have_libdir=no
23584                         if test -n "$LDFLAGS$LIBS" ; then
23585                                 # a loop is needed to ensure we can add subdirs of existing dirs
23586                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23587                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23588                                                 cf_have_libdir=yes; break
23589                                         fi
23590                                 done
23591                         fi
23592                         if test "$cf_have_libdir" = no ; then
23593                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23594
23595 echo "${as_me:-configure}:23595: testing adding $cf_add_libdir to library-path ..." 1>&5
23596
23597                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23598                         fi
23599                 fi
23600         done
23601 fi
23602
23603         else
23604                 case "$with_hashed_db" in
23605                 (./*|../*|/*)
23606                         { echo "$as_me:23606: WARNING: no such directory $with_hashed_db" >&5
23607 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
23608                         ;;
23609                 (*)
23610
23611 cf_search=
23612
23613 test "x$prefix" != "xNONE" && \
23614 test -d "$prefix" && \
23615  {
23616         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
23617         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
23618         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
23619         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
23620         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
23621         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
23622 }
23623
23624 for cf_subdir_prefix in \
23625         /usr \
23626         /usr/local \
23627         /usr/pkg \
23628         /opt \
23629         /opt/local \
23630         $HOME
23631 do
23632
23633 test "x$cf_subdir_prefix" != "x$prefix" && \
23634 test -d "$cf_subdir_prefix" && \
23635 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23636         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
23637         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
23638         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
23639         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
23640         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
23641         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"
23642 }
23643
23644 done
23645
23646         for cf_item in $cf_search
23647         do
23648                 case "$cf_item" in
23649                 (*/$with_hashed_db)
23650
23651 if test -n "$cf_item" ; then
23652   for cf_add_incdir in $cf_item
23653   do
23654         while test "$cf_add_incdir" != /usr/include
23655         do
23656           if test -d "$cf_add_incdir"
23657           then
23658                 cf_have_incdir=no
23659                 if test -n "$CFLAGS$CPPFLAGS" ; then
23660                   # a loop is needed to ensure we can add subdirs of existing dirs
23661                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23662                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23663                           cf_have_incdir=yes; break
23664                         fi
23665                   done
23666                 fi
23667
23668                 if test "$cf_have_incdir" = no ; then
23669                   if test "$cf_add_incdir" = /usr/local/include ; then
23670                         if test "$GCC" = yes
23671                         then
23672                           cf_save_CPPFLAGS=$CPPFLAGS
23673
23674         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23675         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23676
23677                           cat >"conftest.$ac_ext" <<_ACEOF
23678 #line 23678 "configure"
23679 #include "confdefs.h"
23680 #include <stdio.h>
23681 int
23682 main (void)
23683 {
23684 printf("Hello")
23685   ;
23686   return 0;
23687 }
23688 _ACEOF
23689 rm -f "conftest.$ac_objext"
23690 if { (eval echo "$as_me:23690: \"$ac_compile\"") >&5
23691   (eval $ac_compile) 2>&5
23692   ac_status=$?
23693   echo "$as_me:23693: \$? = $ac_status" >&5
23694   (exit "$ac_status"); } &&
23695          { ac_try='test -s "conftest.$ac_objext"'
23696   { (eval echo "$as_me:23696: \"$ac_try\"") >&5
23697   (eval $ac_try) 2>&5
23698   ac_status=$?
23699   echo "$as_me:23699: \$? = $ac_status" >&5
23700   (exit "$ac_status"); }; }; then
23701   :
23702 else
23703   echo "$as_me: failed program was:" >&5
23704 cat "conftest.$ac_ext" >&5
23705 cf_have_incdir=yes
23706 fi
23707 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23708                           CPPFLAGS=$cf_save_CPPFLAGS
23709                         fi
23710                   fi
23711                 fi
23712
23713                 if test "$cf_have_incdir" = no ; then
23714                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23715
23716 echo "${as_me:-configure}:23716: testing adding $cf_add_incdir to include-path ..." 1>&5
23717
23718                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23719
23720                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23721                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23722                   cf_add_incdir="$cf_top_incdir"
23723                 else
23724                   break
23725                 fi
23726           else
23727                 break
23728           fi
23729         done
23730   done
23731 fi
23732
23733                         ;;
23734                 esac
23735         done
23736
23737 cf_search=
23738
23739 test "x$prefix" != "xNONE" && \
23740 test -d "$prefix" && \
23741  {
23742         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
23743         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
23744         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
23745         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
23746         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
23747         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
23748 }
23749
23750 for cf_subdir_prefix in \
23751         /usr \
23752         /usr/local \
23753         /usr/pkg \
23754         /opt \
23755         /opt/local \
23756         $HOME
23757 do
23758
23759 test "x$cf_subdir_prefix" != "x$prefix" && \
23760 test -d "$cf_subdir_prefix" && \
23761 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23762         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
23763         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
23764         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
23765         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
23766         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
23767         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"
23768 }
23769
23770 done
23771
23772         for cf_item in $cf_search
23773         do
23774                 case "$cf_item" in
23775                 (*/$with_hashed_db)
23776
23777 if test -n "$cf_item" ; then
23778         for cf_add_libdir in $cf_item
23779         do
23780                 if test "$cf_add_libdir" = /usr/lib ; then
23781                         :
23782                 elif test -d "$cf_add_libdir"
23783                 then
23784                         cf_have_libdir=no
23785                         if test -n "$LDFLAGS$LIBS" ; then
23786                                 # a loop is needed to ensure we can add subdirs of existing dirs
23787                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23788                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23789                                                 cf_have_libdir=yes; break
23790                                         fi
23791                                 done
23792                         fi
23793                         if test "$cf_have_libdir" = no ; then
23794                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23795
23796 echo "${as_me:-configure}:23796: testing adding $cf_add_libdir to library-path ..." 1>&5
23797
23798                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23799                         fi
23800                 fi
23801         done
23802 fi
23803
23804                         ;;
23805                 esac
23806         done
23807
23808                         ;;
23809                 esac
23810         fi
23811 esac
23812
23813 echo "$as_me:23813: checking for db.h" >&5
23814 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
23815 if test "${ac_cv_header_db_h+set}" = set; then
23816   echo $ECHO_N "(cached) $ECHO_C" >&6
23817 else
23818   cat >"conftest.$ac_ext" <<_ACEOF
23819 #line 23819 "configure"
23820 #include "confdefs.h"
23821 #include <db.h>
23822 _ACEOF
23823 if { (eval echo "$as_me:23823: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23824   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23825   ac_status=$?
23826   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23827   rm -f conftest.er1
23828   cat conftest.err >&5
23829   echo "$as_me:23829: \$? = $ac_status" >&5
23830   (exit "$ac_status"); } >/dev/null; then
23831   if test -s conftest.err; then
23832     ac_cpp_err=$ac_c_preproc_warn_flag
23833   else
23834     ac_cpp_err=
23835   fi
23836 else
23837   ac_cpp_err=yes
23838 fi
23839 if test -z "$ac_cpp_err"; then
23840   ac_cv_header_db_h=yes
23841 else
23842   echo "$as_me: failed program was:" >&5
23843   cat "conftest.$ac_ext" >&5
23844   ac_cv_header_db_h=no
23845 fi
23846 rm -f conftest.err "conftest.$ac_ext"
23847 fi
23848 echo "$as_me:23848: result: $ac_cv_header_db_h" >&5
23849 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23850 if test "$ac_cv_header_db_h" = yes; then
23851
23852 echo "$as_me:23852: checking for version of db" >&5
23853 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
23854 if test "${cf_cv_hashed_db_version+set}" = set; then
23855   echo $ECHO_N "(cached) $ECHO_C" >&6
23856 else
23857
23858 cf_cv_hashed_db_version=unknown
23859
23860 for cf_db_version in 1 2 3 4 5 6
23861 do
23862
23863 echo "${as_me:-configure}:23863: testing checking for db version $cf_db_version ..." 1>&5
23864
23865         cat >"conftest.$ac_ext" <<_ACEOF
23866 #line 23866 "configure"
23867 #include "confdefs.h"
23868
23869 $ac_includes_default
23870 #include <db.h>
23871
23872 #ifdef DB_VERSION_MAJOR
23873         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
23874 #if $cf_db_version == DB_VERSION_MAJOR
23875         /* ok */
23876 #else
23877         make an error
23878 #endif
23879 #else
23880 #if $cf_db_version == 1
23881         /* ok: assuming this is DB 1.8.5 */
23882 #else
23883         make an error
23884 #endif
23885 #endif
23886
23887 int
23888 main (void)
23889 {
23890 DBT *foo = 0
23891   ;
23892   return 0;
23893 }
23894 _ACEOF
23895 rm -f "conftest.$ac_objext"
23896 if { (eval echo "$as_me:23896: \"$ac_compile\"") >&5
23897   (eval $ac_compile) 2>&5
23898   ac_status=$?
23899   echo "$as_me:23899: \$? = $ac_status" >&5
23900   (exit "$ac_status"); } &&
23901          { ac_try='test -s "conftest.$ac_objext"'
23902   { (eval echo "$as_me:23902: \"$ac_try\"") >&5
23903   (eval $ac_try) 2>&5
23904   ac_status=$?
23905   echo "$as_me:23905: \$? = $ac_status" >&5
23906   (exit "$ac_status"); }; }; then
23907
23908         cf_cv_hashed_db_version=$cf_db_version
23909         break
23910
23911 else
23912   echo "$as_me: failed program was:" >&5
23913 cat "conftest.$ac_ext" >&5
23914 fi
23915 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23916 done
23917
23918 fi
23919 echo "$as_me:23919: result: $cf_cv_hashed_db_version" >&5
23920 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
23921
23922 if test "$cf_cv_hashed_db_version" = unknown ; then
23923         { { echo "$as_me:23923: error: Cannot determine version of db" >&5
23924 echo "$as_me: error: Cannot determine version of db" >&2;}
23925    { (exit 1); exit 1; }; }
23926 else
23927
23928 echo "$as_me:23928: checking for db libraries" >&5
23929 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
23930 if test "${cf_cv_hashed_db_libs+set}" = set; then
23931   echo $ECHO_N "(cached) $ECHO_C" >&6
23932 else
23933
23934 cf_cv_hashed_db_libs=unknown
23935 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
23936 do
23937         cf_save_libs="$LIBS"
23938         if test -n "$cf_db_libs"; then
23939
23940 cf_add_libs="$LIBS"
23941 # reverse order
23942 cf_add_0lib=
23943 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23944 # filter duplicates
23945 for cf_add_1lib in $cf_add_0lib; do
23946         for cf_add_2lib in $cf_add_libs; do
23947                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23948                         cf_add_1lib=
23949                         break
23950                 fi
23951         done
23952         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23953 done
23954 LIBS="$cf_add_libs"
23955
23956         fi
23957
23958 echo "${as_me:-configure}:23958: testing checking for library $cf_db_libs ..." 1>&5
23959
23960         cat >"conftest.$ac_ext" <<_ACEOF
23961 #line 23961 "configure"
23962 #include "confdefs.h"
23963
23964 $ac_includes_default
23965 #include <db.h>
23966
23967 int
23968 main (void)
23969 {
23970
23971         char *path = "/tmp/foo";
23972 #ifdef DB_VERSION_MAJOR
23973 #if DB_VERSION_MAJOR >= 4
23974         DB *result = 0;
23975         db_create(&result, NULL, 0);
23976         result->open(result,
23977                 NULL,
23978                 path,
23979                 path,
23980                 DB_HASH,
23981                 DB_CREATE,
23982                 0644);
23983 #elif DB_VERSION_MAJOR >= 3
23984         DB *result = 0;
23985         db_create(&result, NULL, 0);
23986         result->open(result,
23987                 path,
23988                 path,
23989                 DB_HASH,
23990                 DB_CREATE,
23991                 0644);
23992 #elif DB_VERSION_MAJOR >= 2
23993         DB *result = 0;
23994         db_open(path,
23995                 DB_HASH,
23996                 DB_CREATE,
23997                 0644,
23998                 (DB_ENV *) 0,
23999                 (DB_INFO *) 0,
24000                 &result);
24001 #endif /* DB_VERSION_MAJOR */
24002 #else
24003         DB *result = dbopen(path,
24004                      2,
24005                      0644,
24006                      DB_HASH,
24007                      0);
24008 #endif
24009         ${cf_cv_main_return:-return}(result != 0)
24010
24011   ;
24012   return 0;
24013 }
24014 _ACEOF
24015 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24016 if { (eval echo "$as_me:24016: \"$ac_link\"") >&5
24017   (eval $ac_link) 2>&5
24018   ac_status=$?
24019   echo "$as_me:24019: \$? = $ac_status" >&5
24020   (exit "$ac_status"); } &&
24021          { ac_try='test -s "conftest$ac_exeext"'
24022   { (eval echo "$as_me:24022: \"$ac_try\"") >&5
24023   (eval $ac_try) 2>&5
24024   ac_status=$?
24025   echo "$as_me:24025: \$? = $ac_status" >&5
24026   (exit "$ac_status"); }; }; then
24027
24028         if test -n "$cf_db_libs" ; then
24029                 cf_cv_hashed_db_libs=$cf_db_libs
24030         else
24031                 cf_cv_hashed_db_libs=default
24032         fi
24033         LIBS="$cf_save_libs"
24034         break
24035
24036 else
24037   echo "$as_me: failed program was:" >&5
24038 cat "conftest.$ac_ext" >&5
24039 fi
24040 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24041         LIBS="$cf_save_libs"
24042 done
24043
24044 fi
24045 echo "$as_me:24045: result: $cf_cv_hashed_db_libs" >&5
24046 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24047
24048         if test "$cf_cv_hashed_db_libs" = unknown ; then
24049                 { { echo "$as_me:24049: error: Cannot determine library for db" >&5
24050 echo "$as_me: error: Cannot determine library for db" >&2;}
24051    { (exit 1); exit 1; }; }
24052         elif test "$cf_cv_hashed_db_libs" != default ; then
24053
24054 cf_add_libs="$LIBS"
24055 # reverse order
24056 cf_add_0lib=
24057 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24058 # filter duplicates
24059 for cf_add_1lib in $cf_add_0lib; do
24060         for cf_add_2lib in $cf_add_libs; do
24061                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24062                         cf_add_1lib=
24063                         break
24064                 fi
24065         done
24066         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24067 done
24068 LIBS="$cf_add_libs"
24069
24070         fi
24071 fi
24072
24073 else
24074
24075         { { echo "$as_me:24075: error: Cannot find db.h" >&5
24076 echo "$as_me: error: Cannot find db.h" >&2;}
24077    { (exit 1); exit 1; }; }
24078
24079 fi
24080
24081 fi
24082
24083 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24084         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24085         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24086 fi
24087
24088 # Just in case, check if the C compiler has a bool type.
24089
24090 echo "$as_me:24090: checking if we should include stdbool.h" >&5
24091 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24092
24093 if test "${cf_cv_header_stdbool_h+set}" = set; then
24094   echo $ECHO_N "(cached) $ECHO_C" >&6
24095 else
24096
24097         cat >"conftest.$ac_ext" <<_ACEOF
24098 #line 24098 "configure"
24099 #include "confdefs.h"
24100
24101 int
24102 main (void)
24103 {
24104 bool foo = false
24105   ;
24106   return 0;
24107 }
24108 _ACEOF
24109 rm -f "conftest.$ac_objext"
24110 if { (eval echo "$as_me:24110: \"$ac_compile\"") >&5
24111   (eval $ac_compile) 2>&5
24112   ac_status=$?
24113   echo "$as_me:24113: \$? = $ac_status" >&5
24114   (exit "$ac_status"); } &&
24115          { ac_try='test -s "conftest.$ac_objext"'
24116   { (eval echo "$as_me:24116: \"$ac_try\"") >&5
24117   (eval $ac_try) 2>&5
24118   ac_status=$?
24119   echo "$as_me:24119: \$? = $ac_status" >&5
24120   (exit "$ac_status"); }; }; then
24121   cf_cv_header_stdbool_h=0
24122 else
24123   echo "$as_me: failed program was:" >&5
24124 cat "conftest.$ac_ext" >&5
24125 cat >"conftest.$ac_ext" <<_ACEOF
24126 #line 24126 "configure"
24127 #include "confdefs.h"
24128
24129 #ifndef __BEOS__
24130 #include <stdbool.h>
24131 #endif
24132
24133 int
24134 main (void)
24135 {
24136 bool foo = false
24137   ;
24138   return 0;
24139 }
24140 _ACEOF
24141 rm -f "conftest.$ac_objext"
24142 if { (eval echo "$as_me:24142: \"$ac_compile\"") >&5
24143   (eval $ac_compile) 2>&5
24144   ac_status=$?
24145   echo "$as_me:24145: \$? = $ac_status" >&5
24146   (exit "$ac_status"); } &&
24147          { ac_try='test -s "conftest.$ac_objext"'
24148   { (eval echo "$as_me:24148: \"$ac_try\"") >&5
24149   (eval $ac_try) 2>&5
24150   ac_status=$?
24151   echo "$as_me:24151: \$? = $ac_status" >&5
24152   (exit "$ac_status"); }; }; then
24153   cf_cv_header_stdbool_h=1
24154 else
24155   echo "$as_me: failed program was:" >&5
24156 cat "conftest.$ac_ext" >&5
24157 cf_cv_header_stdbool_h=0
24158 fi
24159 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24160 fi
24161 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24162 fi
24163
24164 if test "$cf_cv_header_stdbool_h" = 1
24165 then    echo "$as_me:24165: result: yes" >&5
24166 echo "${ECHO_T}yes" >&6
24167 else    echo "$as_me:24167: result: no" >&5
24168 echo "${ECHO_T}no" >&6
24169 fi
24170
24171 echo "$as_me:24171: checking for builtin bool type" >&5
24172 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24173
24174 if test "${cf_cv_cc_bool_type+set}" = set; then
24175   echo $ECHO_N "(cached) $ECHO_C" >&6
24176 else
24177
24178         cat >"conftest.$ac_ext" <<_ACEOF
24179 #line 24179 "configure"
24180 #include "confdefs.h"
24181
24182 #include <stdio.h>
24183 #include <sys/types.h>
24184
24185 int
24186 main (void)
24187 {
24188 bool x = false
24189   ;
24190   return 0;
24191 }
24192 _ACEOF
24193 rm -f "conftest.$ac_objext"
24194 if { (eval echo "$as_me:24194: \"$ac_compile\"") >&5
24195   (eval $ac_compile) 2>&5
24196   ac_status=$?
24197   echo "$as_me:24197: \$? = $ac_status" >&5
24198   (exit "$ac_status"); } &&
24199          { ac_try='test -s "conftest.$ac_objext"'
24200   { (eval echo "$as_me:24200: \"$ac_try\"") >&5
24201   (eval $ac_try) 2>&5
24202   ac_status=$?
24203   echo "$as_me:24203: \$? = $ac_status" >&5
24204   (exit "$ac_status"); }; }; then
24205   cf_cv_cc_bool_type=1
24206 else
24207   echo "$as_me: failed program was:" >&5
24208 cat "conftest.$ac_ext" >&5
24209 cf_cv_cc_bool_type=0
24210 fi
24211 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24212
24213 fi
24214
24215 if test "$cf_cv_cc_bool_type" = 1
24216 then    echo "$as_me:24216: result: yes" >&5
24217 echo "${ECHO_T}yes" >&6
24218 else    echo "$as_me:24218: result: no" >&5
24219 echo "${ECHO_T}no" >&6
24220 fi
24221
24222 # Check for C++ compiler characteristics (and ensure that it's there!)
24223 if test -n "$CXX" ; then
24224         ac_ext=cc
24225 ac_cpp='$CXXCPP $CPPFLAGS'
24226 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24227 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24228 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24229 ac_main_return="return"
24230
24231 if test -n "$GXX" ; then
24232
24233         cf_save="$LIBS"
24234         LIBS="$LIBS $CXXLIBS"
24235         echo "$as_me:24235: checking if we already have C++ library" >&5
24236 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24237         cat >"conftest.$ac_ext" <<_ACEOF
24238 #line 24238 "configure"
24239 #include "confdefs.h"
24240
24241                         #include <iostream>
24242 int
24243 main (void)
24244 {
24245
24246                         std::cout << "Hello World!" << std::endl;
24247   ;
24248   return 0;
24249 }
24250 _ACEOF
24251 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24252 if { (eval echo "$as_me:24252: \"$ac_link\"") >&5
24253   (eval $ac_link) 2>&5
24254   ac_status=$?
24255   echo "$as_me:24255: \$? = $ac_status" >&5
24256   (exit "$ac_status"); } &&
24257          { ac_try='test -s "conftest$ac_exeext"'
24258   { (eval echo "$as_me:24258: \"$ac_try\"") >&5
24259   (eval $ac_try) 2>&5
24260   ac_status=$?
24261   echo "$as_me:24261: \$? = $ac_status" >&5
24262   (exit "$ac_status"); }; }; then
24263   cf_have_libstdcpp=yes
24264 else
24265   echo "$as_me: failed program was:" >&5
24266 cat "conftest.$ac_ext" >&5
24267 cf_have_libstdcpp=no
24268 fi
24269 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24270         echo "$as_me:24270: result: $cf_have_libstdcpp" >&5
24271 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24272         LIBS="$cf_save"
24273
24274         if test "$cf_have_libstdcpp" != yes
24275         then
24276                 case "$cf_cv_system_name" in
24277                 (os2*)
24278                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24279                                 cf_stdcpp_libname=stdcpp
24280                         else
24281                                 cf_stdcpp_libname=stdc++
24282                         fi
24283                         ;;
24284                 (*)
24285                         cf_stdcpp_libname=stdc++
24286                         ;;
24287                 esac
24288
24289                 echo "$as_me:24289: checking for library $cf_stdcpp_libname" >&5
24290 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24291 if test "${cf_cv_libstdcpp+set}" = set; then
24292   echo $ECHO_N "(cached) $ECHO_C" >&6
24293 else
24294
24295                         cf_save="$LIBS"
24296                         LIBS="$LIBS $CXXLIBS"
24297
24298 cf_add_libs="$LIBS"
24299 # reverse order
24300 cf_add_0lib=
24301 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24302 # filter duplicates
24303 for cf_add_1lib in $cf_add_0lib; do
24304         for cf_add_2lib in $cf_add_libs; do
24305                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24306                         cf_add_1lib=
24307                         break
24308                 fi
24309         done
24310         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24311 done
24312 LIBS="$cf_add_libs"
24313
24314                 cat >"conftest.$ac_ext" <<_ACEOF
24315 #line 24315 "configure"
24316 #include "confdefs.h"
24317
24318                                 #include <iostream>
24319 int
24320 main (void)
24321 {
24322
24323                                 std::cout << "Hello World!" << std::endl;
24324   ;
24325   return 0;
24326 }
24327 _ACEOF
24328 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24329 if { (eval echo "$as_me:24329: \"$ac_link\"") >&5
24330   (eval $ac_link) 2>&5
24331   ac_status=$?
24332   echo "$as_me:24332: \$? = $ac_status" >&5
24333   (exit "$ac_status"); } &&
24334          { ac_try='test -s "conftest$ac_exeext"'
24335   { (eval echo "$as_me:24335: \"$ac_try\"") >&5
24336   (eval $ac_try) 2>&5
24337   ac_status=$?
24338   echo "$as_me:24338: \$? = $ac_status" >&5
24339   (exit "$ac_status"); }; }; then
24340   cf_cv_libstdcpp=yes
24341 else
24342   echo "$as_me: failed program was:" >&5
24343 cat "conftest.$ac_ext" >&5
24344 cf_cv_libstdcpp=no
24345 fi
24346 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24347                         LIBS="$cf_save"
24348
24349 fi
24350 echo "$as_me:24350: result: $cf_cv_libstdcpp" >&5
24351 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24352                 test "$cf_cv_libstdcpp" = yes && {
24353 cf_add_libs="$CXXLIBS"
24354 # reverse order
24355 cf_add_0lib=
24356 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24357 # filter duplicates
24358 for cf_add_1lib in $cf_add_0lib; do
24359         for cf_add_2lib in $cf_add_libs; do
24360                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24361                         cf_add_1lib=
24362                         break
24363                 fi
24364         done
24365         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24366 done
24367 CXXLIBS="$cf_add_libs"
24368  }
24369         fi
24370 fi
24371
24372         echo "$as_me:24372: checking whether $CXX understands -c and -o together" >&5
24373 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24374 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24375   echo $ECHO_N "(cached) $ECHO_C" >&6
24376 else
24377
24378 cat > conftest.$ac_ext <<CF_EOF
24379 int main(void)
24380 {
24381         ${cf_cv_main_return:-return}(0);
24382 }
24383 CF_EOF
24384 # We do the test twice because some compilers refuse to overwrite an
24385 # existing .o file with -o, though they will create one.
24386 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24387 if { (eval echo "$as_me:24387: \"$ac_try\"") >&5
24388   (eval $ac_try) 2>&5
24389   ac_status=$?
24390   echo "$as_me:24390: \$? = $ac_status" >&5
24391   (exit "$ac_status"); } &&
24392   test -f conftest2.$ac_objext && { (eval echo "$as_me:24392: \"$ac_try\"") >&5
24393   (eval $ac_try) 2>&5
24394   ac_status=$?
24395   echo "$as_me:24395: \$? = $ac_status" >&5
24396   (exit "$ac_status"); };
24397 then
24398   eval cf_cv_prog_CXX_c_o=yes
24399 else
24400   eval cf_cv_prog_CXX_c_o=no
24401 fi
24402 rm -rf ./conftest*
24403
24404 fi
24405 if test "$cf_cv_prog_CXX_c_o" = yes; then
24406   echo "$as_me:24406: result: yes" >&5
24407 echo "${ECHO_T}yes" >&6
24408 else
24409   echo "$as_me:24409: result: no" >&5
24410 echo "${ECHO_T}no" >&6
24411 fi
24412
24413         case "$GXX_VERSION" in
24414         (1.*|2.[0-6]*|[1-9][0-9].*)
24415                 cf_cxx_library=yes
24416                 ;;
24417         (*-2.7*|2.7*)
24418
24419 cf_cxx_library=unknown
24420 case "$cf_cv_system_name" in
24421 (os2*)
24422         cf_gpp_libname=gpp
24423         ;;
24424 (*)
24425         cf_gpp_libname=g++
24426         ;;
24427 esac
24428 if test "$GXX" = yes; then
24429         echo "$as_me:24429: checking for lib$cf_gpp_libname" >&5
24430 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24431         cf_save="$LIBS"
24432
24433 cf_add_libs="$LIBS"
24434 # reverse order
24435 cf_add_0lib=
24436 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24437 # filter duplicates
24438 for cf_add_1lib in $cf_add_0lib; do
24439         for cf_add_2lib in $cf_add_libs; do
24440                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24441                         cf_add_1lib=
24442                         break
24443                 fi
24444         done
24445         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24446 done
24447 LIBS="$cf_add_libs"
24448
24449         cat >"conftest.$ac_ext" <<_ACEOF
24450 #line 24450 "configure"
24451 #include "confdefs.h"
24452
24453 #include <$cf_gpp_libname/builtin.h>
24454
24455 int
24456 main (void)
24457 {
24458 two_arg_error_handler_t foo2 = lib_error_handler
24459   ;
24460   return 0;
24461 }
24462 _ACEOF
24463 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24464 if { (eval echo "$as_me:24464: \"$ac_link\"") >&5
24465   (eval $ac_link) 2>&5
24466   ac_status=$?
24467   echo "$as_me:24467: \$? = $ac_status" >&5
24468   (exit "$ac_status"); } &&
24469          { ac_try='test -s "conftest$ac_exeext"'
24470   { (eval echo "$as_me:24470: \"$ac_try\"") >&5
24471   (eval $ac_try) 2>&5
24472   ac_status=$?
24473   echo "$as_me:24473: \$? = $ac_status" >&5
24474   (exit "$ac_status"); }; }; then
24475   cf_cxx_library=yes
24476
24477 cf_add_libs="$CXXLIBS"
24478 # reverse order
24479 cf_add_0lib=
24480 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24481 # filter duplicates
24482 for cf_add_1lib in $cf_add_0lib; do
24483         for cf_add_2lib in $cf_add_libs; do
24484                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24485                         cf_add_1lib=
24486                         break
24487                 fi
24488         done
24489         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24490 done
24491 CXXLIBS="$cf_add_libs"
24492
24493          if test "$cf_gpp_libname" = cpp ; then
24494
24495 cat >>confdefs.h <<\EOF
24496 #define HAVE_GPP_BUILTIN_H 1
24497 EOF
24498
24499          else
24500
24501 cat >>confdefs.h <<\EOF
24502 #define HAVE_GXX_BUILTIN_H 1
24503 EOF
24504
24505          fi
24506 else
24507   echo "$as_me: failed program was:" >&5
24508 cat "conftest.$ac_ext" >&5
24509 cat >"conftest.$ac_ext" <<_ACEOF
24510 #line 24510 "configure"
24511 #include "confdefs.h"
24512
24513 #include <builtin.h>
24514
24515 int
24516 main (void)
24517 {
24518 two_arg_error_handler_t foo2 = lib_error_handler
24519   ;
24520   return 0;
24521 }
24522 _ACEOF
24523 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24524 if { (eval echo "$as_me:24524: \"$ac_link\"") >&5
24525   (eval $ac_link) 2>&5
24526   ac_status=$?
24527   echo "$as_me:24527: \$? = $ac_status" >&5
24528   (exit "$ac_status"); } &&
24529          { ac_try='test -s "conftest$ac_exeext"'
24530   { (eval echo "$as_me:24530: \"$ac_try\"") >&5
24531   (eval $ac_try) 2>&5
24532   ac_status=$?
24533   echo "$as_me:24533: \$? = $ac_status" >&5
24534   (exit "$ac_status"); }; }; then
24535   cf_cxx_library=yes
24536
24537 cf_add_libs="$CXXLIBS"
24538 # reverse order
24539 cf_add_0lib=
24540 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24541 # filter duplicates
24542 for cf_add_1lib in $cf_add_0lib; do
24543         for cf_add_2lib in $cf_add_libs; do
24544                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24545                         cf_add_1lib=
24546                         break
24547                 fi
24548         done
24549         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24550 done
24551 CXXLIBS="$cf_add_libs"
24552
24553 cat >>confdefs.h <<\EOF
24554 #define HAVE_BUILTIN_H 1
24555 EOF
24556
24557 else
24558   echo "$as_me: failed program was:" >&5
24559 cat "conftest.$ac_ext" >&5
24560 cf_cxx_library=no
24561 fi
24562 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24563 fi
24564 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24565         LIBS="$cf_save"
24566         echo "$as_me:24566: result: $cf_cxx_library" >&5
24567 echo "${ECHO_T}$cf_cxx_library" >&6
24568 fi
24569
24570                 ;;
24571         (*)
24572                 cf_cxx_library=no
24573                 ;;
24574         esac
24575
24576         ac_ext=cc
24577 ac_cpp='$CXXCPP $CPPFLAGS'
24578 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24579 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24580 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24581 ac_main_return="return"
24582 echo "$as_me:24582: checking how to run the C++ preprocessor" >&5
24583 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
24584 if test -z "$CXXCPP"; then
24585   if test "${ac_cv_prog_CXXCPP+set}" = set; then
24586   echo $ECHO_N "(cached) $ECHO_C" >&6
24587 else
24588       # Double quotes because CXXCPP needs to be expanded
24589     for CXXCPP in "$CXX -E" "/lib/cpp"
24590     do
24591       ac_preproc_ok=false
24592 for ac_cxx_preproc_warn_flag in '' yes
24593 do
24594   # Use a header file that comes with gcc, so configuring glibc
24595   # with a fresh cross-compiler works.
24596   # On the NeXT, cc -E runs the code through the compiler's parser,
24597   # not just through cpp. "Syntax error" is here to catch this case.
24598   cat >"conftest.$ac_ext" <<_ACEOF
24599 #line 24599 "configure"
24600 #include "confdefs.h"
24601 #include <assert.h>
24602                      Syntax error
24603 _ACEOF
24604 if { (eval echo "$as_me:24604: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24605   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24606   ac_status=$?
24607   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24608   rm -f conftest.er1
24609   cat conftest.err >&5
24610   echo "$as_me:24610: \$? = $ac_status" >&5
24611   (exit "$ac_status"); } >/dev/null; then
24612   if test -s conftest.err; then
24613     ac_cpp_err=$ac_cxx_preproc_warn_flag
24614   else
24615     ac_cpp_err=
24616   fi
24617 else
24618   ac_cpp_err=yes
24619 fi
24620 if test -z "$ac_cpp_err"; then
24621   :
24622 else
24623   echo "$as_me: failed program was:" >&5
24624   cat "conftest.$ac_ext" >&5
24625   # Broken: fails on valid input.
24626 continue
24627 fi
24628 rm -f conftest.err "conftest.$ac_ext"
24629
24630   # OK, works on sane cases.  Now check whether non-existent headers
24631   # can be detected and how.
24632   cat >"conftest.$ac_ext" <<_ACEOF
24633 #line 24633 "configure"
24634 #include "confdefs.h"
24635 #include <ac_nonexistent.h>
24636 _ACEOF
24637 if { (eval echo "$as_me:24637: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24638   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24639   ac_status=$?
24640   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24641   rm -f conftest.er1
24642   cat conftest.err >&5
24643   echo "$as_me:24643: \$? = $ac_status" >&5
24644   (exit "$ac_status"); } >/dev/null; then
24645   if test -s conftest.err; then
24646     ac_cpp_err=$ac_cxx_preproc_warn_flag
24647   else
24648     ac_cpp_err=
24649   fi
24650 else
24651   ac_cpp_err=yes
24652 fi
24653 if test -z "$ac_cpp_err"; then
24654   # Broken: success on invalid input.
24655 continue
24656 else
24657   echo "$as_me: failed program was:" >&5
24658   cat "conftest.$ac_ext" >&5
24659   # Passes both tests.
24660 ac_preproc_ok=:
24661 break
24662 fi
24663 rm -f conftest.err "conftest.$ac_ext"
24664
24665 done
24666 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24667 rm -f conftest.err "conftest.$ac_ext"
24668 if $ac_preproc_ok; then
24669   break
24670 fi
24671
24672     done
24673     ac_cv_prog_CXXCPP=$CXXCPP
24674
24675 fi
24676   CXXCPP=$ac_cv_prog_CXXCPP
24677 else
24678   ac_cv_prog_CXXCPP=$CXXCPP
24679 fi
24680 echo "$as_me:24680: result: $CXXCPP" >&5
24681 echo "${ECHO_T}$CXXCPP" >&6
24682 ac_preproc_ok=false
24683 for ac_cxx_preproc_warn_flag in '' yes
24684 do
24685   # Use a header file that comes with gcc, so configuring glibc
24686   # with a fresh cross-compiler works.
24687   # On the NeXT, cc -E runs the code through the compiler's parser,
24688   # not just through cpp. "Syntax error" is here to catch this case.
24689   cat >"conftest.$ac_ext" <<_ACEOF
24690 #line 24690 "configure"
24691 #include "confdefs.h"
24692 #include <assert.h>
24693                      Syntax error
24694 _ACEOF
24695 if { (eval echo "$as_me:24695: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24696   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24697   ac_status=$?
24698   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24699   rm -f conftest.er1
24700   cat conftest.err >&5
24701   echo "$as_me:24701: \$? = $ac_status" >&5
24702   (exit "$ac_status"); } >/dev/null; then
24703   if test -s conftest.err; then
24704     ac_cpp_err=$ac_cxx_preproc_warn_flag
24705   else
24706     ac_cpp_err=
24707   fi
24708 else
24709   ac_cpp_err=yes
24710 fi
24711 if test -z "$ac_cpp_err"; then
24712   :
24713 else
24714   echo "$as_me: failed program was:" >&5
24715   cat "conftest.$ac_ext" >&5
24716   # Broken: fails on valid input.
24717 continue
24718 fi
24719 rm -f conftest.err "conftest.$ac_ext"
24720
24721   # OK, works on sane cases.  Now check whether non-existent headers
24722   # can be detected and how.
24723   cat >"conftest.$ac_ext" <<_ACEOF
24724 #line 24724 "configure"
24725 #include "confdefs.h"
24726 #include <ac_nonexistent.h>
24727 _ACEOF
24728 if { (eval echo "$as_me:24728: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24729   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24730   ac_status=$?
24731   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24732   rm -f conftest.er1
24733   cat conftest.err >&5
24734   echo "$as_me:24734: \$? = $ac_status" >&5
24735   (exit "$ac_status"); } >/dev/null; then
24736   if test -s conftest.err; then
24737     ac_cpp_err=$ac_cxx_preproc_warn_flag
24738   else
24739     ac_cpp_err=
24740   fi
24741 else
24742   ac_cpp_err=yes
24743 fi
24744 if test -z "$ac_cpp_err"; then
24745   # Broken: success on invalid input.
24746 continue
24747 else
24748   echo "$as_me: failed program was:" >&5
24749   cat "conftest.$ac_ext" >&5
24750   # Passes both tests.
24751 ac_preproc_ok=:
24752 break
24753 fi
24754 rm -f conftest.err "conftest.$ac_ext"
24755
24756 done
24757 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24758 rm -f conftest.err "conftest.$ac_ext"
24759 if $ac_preproc_ok; then
24760   :
24761 else
24762   { { echo "$as_me:24762: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
24763 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
24764    { (exit 1); exit 1; }; }
24765 fi
24766
24767 ac_ext=cc
24768 ac_cpp='$CXXCPP $CPPFLAGS'
24769 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24770 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24771 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24772 ac_main_return="return"
24773
24774 for ac_header in typeinfo
24775 do
24776 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24777 echo "$as_me:24777: checking for $ac_header" >&5
24778 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24779 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24780   echo $ECHO_N "(cached) $ECHO_C" >&6
24781 else
24782   cat >"conftest.$ac_ext" <<_ACEOF
24783 #line 24783 "configure"
24784 #include "confdefs.h"
24785 #include <$ac_header>
24786 _ACEOF
24787 if { (eval echo "$as_me:24787: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24788   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24789   ac_status=$?
24790   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24791   rm -f conftest.er1
24792   cat conftest.err >&5
24793   echo "$as_me:24793: \$? = $ac_status" >&5
24794   (exit "$ac_status"); } >/dev/null; then
24795   if test -s conftest.err; then
24796     ac_cpp_err=$ac_cxx_preproc_warn_flag
24797   else
24798     ac_cpp_err=
24799   fi
24800 else
24801   ac_cpp_err=yes
24802 fi
24803 if test -z "$ac_cpp_err"; then
24804   eval "$as_ac_Header=yes"
24805 else
24806   echo "$as_me: failed program was:" >&5
24807   cat "conftest.$ac_ext" >&5
24808   eval "$as_ac_Header=no"
24809 fi
24810 rm -f conftest.err "conftest.$ac_ext"
24811 fi
24812 echo "$as_me:24812: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24813 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24814 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24815   cat >>confdefs.h <<EOF
24816 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24817 EOF
24818
24819 fi
24820 done
24821
24822 for ac_header in iostream
24823 do
24824 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24825 echo "$as_me:24825: checking for $ac_header" >&5
24826 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24827 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24828   echo $ECHO_N "(cached) $ECHO_C" >&6
24829 else
24830   cat >"conftest.$ac_ext" <<_ACEOF
24831 #line 24831 "configure"
24832 #include "confdefs.h"
24833 #include <$ac_header>
24834 _ACEOF
24835 if { (eval echo "$as_me:24835: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24836   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24837   ac_status=$?
24838   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24839   rm -f conftest.er1
24840   cat conftest.err >&5
24841   echo "$as_me:24841: \$? = $ac_status" >&5
24842   (exit "$ac_status"); } >/dev/null; then
24843   if test -s conftest.err; then
24844     ac_cpp_err=$ac_cxx_preproc_warn_flag
24845   else
24846     ac_cpp_err=
24847   fi
24848 else
24849   ac_cpp_err=yes
24850 fi
24851 if test -z "$ac_cpp_err"; then
24852   eval "$as_ac_Header=yes"
24853 else
24854   echo "$as_me: failed program was:" >&5
24855   cat "conftest.$ac_ext" >&5
24856   eval "$as_ac_Header=no"
24857 fi
24858 rm -f conftest.err "conftest.$ac_ext"
24859 fi
24860 echo "$as_me:24860: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24861 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24862 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24863   cat >>confdefs.h <<EOF
24864 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24865 EOF
24866
24867 fi
24868 done
24869
24870 if test x"$ac_cv_header_iostream" = xyes ; then
24871         echo "$as_me:24871: checking if iostream uses std-namespace" >&5
24872 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
24873         cat >"conftest.$ac_ext" <<_ACEOF
24874 #line 24874 "configure"
24875 #include "confdefs.h"
24876
24877 #include <iostream>
24878 using std::endl;
24879 using std::cerr;
24880 int
24881 main (void)
24882 {
24883
24884 cerr << "testing" << endl;
24885
24886   ;
24887   return 0;
24888 }
24889 _ACEOF
24890 rm -f "conftest.$ac_objext"
24891 if { (eval echo "$as_me:24891: \"$ac_compile\"") >&5
24892   (eval $ac_compile) 2>&5
24893   ac_status=$?
24894   echo "$as_me:24894: \$? = $ac_status" >&5
24895   (exit "$ac_status"); } &&
24896          { ac_try='test -s "conftest.$ac_objext"'
24897   { (eval echo "$as_me:24897: \"$ac_try\"") >&5
24898   (eval $ac_try) 2>&5
24899   ac_status=$?
24900   echo "$as_me:24900: \$? = $ac_status" >&5
24901   (exit "$ac_status"); }; }; then
24902   cf_iostream_namespace=yes
24903 else
24904   echo "$as_me: failed program was:" >&5
24905 cat "conftest.$ac_ext" >&5
24906 cf_iostream_namespace=no
24907 fi
24908 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24909         echo "$as_me:24909: result: $cf_iostream_namespace" >&5
24910 echo "${ECHO_T}$cf_iostream_namespace" >&6
24911         if test "$cf_iostream_namespace" = yes ; then
24912
24913 cat >>confdefs.h <<\EOF
24914 #define IOSTREAM_NAMESPACE 1
24915 EOF
24916
24917         fi
24918 fi
24919
24920 echo "$as_me:24920: checking if we should include stdbool.h" >&5
24921 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24922
24923 if test "${cf_cv_header_stdbool_h+set}" = set; then
24924   echo $ECHO_N "(cached) $ECHO_C" >&6
24925 else
24926
24927         cat >"conftest.$ac_ext" <<_ACEOF
24928 #line 24928 "configure"
24929 #include "confdefs.h"
24930
24931 int
24932 main (void)
24933 {
24934 bool foo = false
24935   ;
24936   return 0;
24937 }
24938 _ACEOF
24939 rm -f "conftest.$ac_objext"
24940 if { (eval echo "$as_me:24940: \"$ac_compile\"") >&5
24941   (eval $ac_compile) 2>&5
24942   ac_status=$?
24943   echo "$as_me:24943: \$? = $ac_status" >&5
24944   (exit "$ac_status"); } &&
24945          { ac_try='test -s "conftest.$ac_objext"'
24946   { (eval echo "$as_me:24946: \"$ac_try\"") >&5
24947   (eval $ac_try) 2>&5
24948   ac_status=$?
24949   echo "$as_me:24949: \$? = $ac_status" >&5
24950   (exit "$ac_status"); }; }; then
24951   cf_cv_header_stdbool_h=0
24952 else
24953   echo "$as_me: failed program was:" >&5
24954 cat "conftest.$ac_ext" >&5
24955 cat >"conftest.$ac_ext" <<_ACEOF
24956 #line 24956 "configure"
24957 #include "confdefs.h"
24958
24959 #ifndef __BEOS__
24960 #include <stdbool.h>
24961 #endif
24962
24963 int
24964 main (void)
24965 {
24966 bool foo = false
24967   ;
24968   return 0;
24969 }
24970 _ACEOF
24971 rm -f "conftest.$ac_objext"
24972 if { (eval echo "$as_me:24972: \"$ac_compile\"") >&5
24973   (eval $ac_compile) 2>&5
24974   ac_status=$?
24975   echo "$as_me:24975: \$? = $ac_status" >&5
24976   (exit "$ac_status"); } &&
24977          { ac_try='test -s "conftest.$ac_objext"'
24978   { (eval echo "$as_me:24978: \"$ac_try\"") >&5
24979   (eval $ac_try) 2>&5
24980   ac_status=$?
24981   echo "$as_me:24981: \$? = $ac_status" >&5
24982   (exit "$ac_status"); }; }; then
24983   cf_cv_header_stdbool_h=1
24984 else
24985   echo "$as_me: failed program was:" >&5
24986 cat "conftest.$ac_ext" >&5
24987 cf_cv_header_stdbool_h=0
24988 fi
24989 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24990 fi
24991 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24992 fi
24993
24994 if test "$cf_cv_header_stdbool_h" = 1
24995 then    echo "$as_me:24995: result: yes" >&5
24996 echo "${ECHO_T}yes" >&6
24997 else    echo "$as_me:24997: result: no" >&5
24998 echo "${ECHO_T}no" >&6
24999 fi
25000
25001 echo "$as_me:25001: checking for builtin bool type" >&5
25002 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25003
25004 if test "${cf_cv_builtin_bool+set}" = set; then
25005   echo $ECHO_N "(cached) $ECHO_C" >&6
25006 else
25007
25008         cat >"conftest.$ac_ext" <<_ACEOF
25009 #line 25009 "configure"
25010 #include "confdefs.h"
25011
25012 #include <stdio.h>
25013 #include <sys/types.h>
25014
25015 int
25016 main (void)
25017 {
25018 bool x = false
25019   ;
25020   return 0;
25021 }
25022 _ACEOF
25023 rm -f "conftest.$ac_objext"
25024 if { (eval echo "$as_me:25024: \"$ac_compile\"") >&5
25025   (eval $ac_compile) 2>&5
25026   ac_status=$?
25027   echo "$as_me:25027: \$? = $ac_status" >&5
25028   (exit "$ac_status"); } &&
25029          { ac_try='test -s "conftest.$ac_objext"'
25030   { (eval echo "$as_me:25030: \"$ac_try\"") >&5
25031   (eval $ac_try) 2>&5
25032   ac_status=$?
25033   echo "$as_me:25033: \$? = $ac_status" >&5
25034   (exit "$ac_status"); }; }; then
25035   cf_cv_builtin_bool=1
25036 else
25037   echo "$as_me: failed program was:" >&5
25038 cat "conftest.$ac_ext" >&5
25039 cf_cv_builtin_bool=0
25040 fi
25041 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25042
25043 fi
25044
25045 if test "$cf_cv_builtin_bool" = 1
25046 then    echo "$as_me:25046: result: yes" >&5
25047 echo "${ECHO_T}yes" >&6
25048 else    echo "$as_me:25048: result: no" >&5
25049 echo "${ECHO_T}no" >&6
25050 fi
25051
25052 echo "$as_me:25052: checking for bool" >&5
25053 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25054 if test "${ac_cv_type_bool+set}" = set; then
25055   echo $ECHO_N "(cached) $ECHO_C" >&6
25056 else
25057   cat >"conftest.$ac_ext" <<_ACEOF
25058 #line 25058 "configure"
25059 #include "confdefs.h"
25060
25061 #include <stdlib.h>
25062 #include <stdio.h>
25063
25064 #if defined(__cplusplus)
25065
25066 #ifdef HAVE_GXX_BUILTIN_H
25067 #include <g++/builtin.h>
25068 #elif HAVE_GPP_BUILTIN_H
25069 #include <gpp/builtin.h>
25070 #elif HAVE_BUILTIN_H
25071 #include <builtin.h>
25072 #endif
25073
25074 #else
25075
25076 #if $cf_cv_header_stdbool_h
25077 #include <stdbool.h>
25078 #endif
25079
25080 #endif
25081
25082 int
25083 main (void)
25084 {
25085 if ((bool *) 0)
25086   return 0;
25087 if (sizeof (bool))
25088   return 0;
25089   ;
25090   return 0;
25091 }
25092 _ACEOF
25093 rm -f "conftest.$ac_objext"
25094 if { (eval echo "$as_me:25094: \"$ac_compile\"") >&5
25095   (eval $ac_compile) 2>&5
25096   ac_status=$?
25097   echo "$as_me:25097: \$? = $ac_status" >&5
25098   (exit "$ac_status"); } &&
25099          { ac_try='test -s "conftest.$ac_objext"'
25100   { (eval echo "$as_me:25100: \"$ac_try\"") >&5
25101   (eval $ac_try) 2>&5
25102   ac_status=$?
25103   echo "$as_me:25103: \$? = $ac_status" >&5
25104   (exit "$ac_status"); }; }; then
25105   ac_cv_type_bool=yes
25106 else
25107   echo "$as_me: failed program was:" >&5
25108 cat "conftest.$ac_ext" >&5
25109 ac_cv_type_bool=no
25110 fi
25111 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25112 fi
25113 echo "$as_me:25113: result: $ac_cv_type_bool" >&5
25114 echo "${ECHO_T}$ac_cv_type_bool" >&6
25115
25116 echo "$as_me:25116: checking size of bool" >&5
25117 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25118 if test "${ac_cv_sizeof_bool+set}" = set; then
25119   echo $ECHO_N "(cached) $ECHO_C" >&6
25120 else
25121   if test "$ac_cv_type_bool" = yes; then
25122   if test "$cross_compiling" = yes; then
25123   # Depending upon the size, compute the lo and hi bounds.
25124 cat >"conftest.$ac_ext" <<_ACEOF
25125 #line 25125 "configure"
25126 #include "confdefs.h"
25127
25128 #include <stdlib.h>
25129 #include <stdio.h>
25130
25131 #if defined(__cplusplus)
25132
25133 #ifdef HAVE_GXX_BUILTIN_H
25134 #include <g++/builtin.h>
25135 #elif HAVE_GPP_BUILTIN_H
25136 #include <gpp/builtin.h>
25137 #elif HAVE_BUILTIN_H
25138 #include <builtin.h>
25139 #endif
25140
25141 #else
25142
25143 #if $cf_cv_header_stdbool_h
25144 #include <stdbool.h>
25145 #endif
25146
25147 #endif
25148
25149 int
25150 main (void)
25151 {
25152 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25153   ;
25154   return 0;
25155 }
25156 _ACEOF
25157 rm -f "conftest.$ac_objext"
25158 if { (eval echo "$as_me:25158: \"$ac_compile\"") >&5
25159   (eval $ac_compile) 2>&5
25160   ac_status=$?
25161   echo "$as_me:25161: \$? = $ac_status" >&5
25162   (exit "$ac_status"); } &&
25163          { ac_try='test -s "conftest.$ac_objext"'
25164   { (eval echo "$as_me:25164: \"$ac_try\"") >&5
25165   (eval $ac_try) 2>&5
25166   ac_status=$?
25167   echo "$as_me:25167: \$? = $ac_status" >&5
25168   (exit "$ac_status"); }; }; then
25169   ac_lo=0 ac_mid=0
25170   while :; do
25171     cat >"conftest.$ac_ext" <<_ACEOF
25172 #line 25172 "configure"
25173 #include "confdefs.h"
25174
25175 #include <stdlib.h>
25176 #include <stdio.h>
25177
25178 #if defined(__cplusplus)
25179
25180 #ifdef HAVE_GXX_BUILTIN_H
25181 #include <g++/builtin.h>
25182 #elif HAVE_GPP_BUILTIN_H
25183 #include <gpp/builtin.h>
25184 #elif HAVE_BUILTIN_H
25185 #include <builtin.h>
25186 #endif
25187
25188 #else
25189
25190 #if $cf_cv_header_stdbool_h
25191 #include <stdbool.h>
25192 #endif
25193
25194 #endif
25195
25196 int
25197 main (void)
25198 {
25199 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25200   ;
25201   return 0;
25202 }
25203 _ACEOF
25204 rm -f "conftest.$ac_objext"
25205 if { (eval echo "$as_me:25205: \"$ac_compile\"") >&5
25206   (eval $ac_compile) 2>&5
25207   ac_status=$?
25208   echo "$as_me:25208: \$? = $ac_status" >&5
25209   (exit "$ac_status"); } &&
25210          { ac_try='test -s "conftest.$ac_objext"'
25211   { (eval echo "$as_me:25211: \"$ac_try\"") >&5
25212   (eval $ac_try) 2>&5
25213   ac_status=$?
25214   echo "$as_me:25214: \$? = $ac_status" >&5
25215   (exit "$ac_status"); }; }; then
25216   ac_hi=$ac_mid; break
25217 else
25218   echo "$as_me: failed program was:" >&5
25219 cat "conftest.$ac_ext" >&5
25220 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25221 fi
25222 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25223   done
25224 else
25225   echo "$as_me: failed program was:" >&5
25226 cat "conftest.$ac_ext" >&5
25227 ac_hi=-1 ac_mid=-1
25228   while :; do
25229     cat >"conftest.$ac_ext" <<_ACEOF
25230 #line 25230 "configure"
25231 #include "confdefs.h"
25232
25233 #include <stdlib.h>
25234 #include <stdio.h>
25235
25236 #if defined(__cplusplus)
25237
25238 #ifdef HAVE_GXX_BUILTIN_H
25239 #include <g++/builtin.h>
25240 #elif HAVE_GPP_BUILTIN_H
25241 #include <gpp/builtin.h>
25242 #elif HAVE_BUILTIN_H
25243 #include <builtin.h>
25244 #endif
25245
25246 #else
25247
25248 #if $cf_cv_header_stdbool_h
25249 #include <stdbool.h>
25250 #endif
25251
25252 #endif
25253
25254 int
25255 main (void)
25256 {
25257 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25258   ;
25259   return 0;
25260 }
25261 _ACEOF
25262 rm -f "conftest.$ac_objext"
25263 if { (eval echo "$as_me:25263: \"$ac_compile\"") >&5
25264   (eval $ac_compile) 2>&5
25265   ac_status=$?
25266   echo "$as_me:25266: \$? = $ac_status" >&5
25267   (exit "$ac_status"); } &&
25268          { ac_try='test -s "conftest.$ac_objext"'
25269   { (eval echo "$as_me:25269: \"$ac_try\"") >&5
25270   (eval $ac_try) 2>&5
25271   ac_status=$?
25272   echo "$as_me:25272: \$? = $ac_status" >&5
25273   (exit "$ac_status"); }; }; then
25274   ac_lo=$ac_mid; break
25275 else
25276   echo "$as_me: failed program was:" >&5
25277 cat "conftest.$ac_ext" >&5
25278 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25279 fi
25280 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25281   done
25282 fi
25283 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25284 # Binary search between lo and hi bounds.
25285 while test "x$ac_lo" != "x$ac_hi"; do
25286   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25287   cat >"conftest.$ac_ext" <<_ACEOF
25288 #line 25288 "configure"
25289 #include "confdefs.h"
25290
25291 #include <stdlib.h>
25292 #include <stdio.h>
25293
25294 #if defined(__cplusplus)
25295
25296 #ifdef HAVE_GXX_BUILTIN_H
25297 #include <g++/builtin.h>
25298 #elif HAVE_GPP_BUILTIN_H
25299 #include <gpp/builtin.h>
25300 #elif HAVE_BUILTIN_H
25301 #include <builtin.h>
25302 #endif
25303
25304 #else
25305
25306 #if $cf_cv_header_stdbool_h
25307 #include <stdbool.h>
25308 #endif
25309
25310 #endif
25311
25312 int
25313 main (void)
25314 {
25315 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25316   ;
25317   return 0;
25318 }
25319 _ACEOF
25320 rm -f "conftest.$ac_objext"
25321 if { (eval echo "$as_me:25321: \"$ac_compile\"") >&5
25322   (eval $ac_compile) 2>&5
25323   ac_status=$?
25324   echo "$as_me:25324: \$? = $ac_status" >&5
25325   (exit "$ac_status"); } &&
25326          { ac_try='test -s "conftest.$ac_objext"'
25327   { (eval echo "$as_me:25327: \"$ac_try\"") >&5
25328   (eval $ac_try) 2>&5
25329   ac_status=$?
25330   echo "$as_me:25330: \$? = $ac_status" >&5
25331   (exit "$ac_status"); }; }; then
25332   ac_hi=$ac_mid
25333 else
25334   echo "$as_me: failed program was:" >&5
25335 cat "conftest.$ac_ext" >&5
25336 ac_lo=`expr "$ac_mid" + 1`
25337 fi
25338 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25339 done
25340 ac_cv_sizeof_bool=$ac_lo
25341 else
25342   if test "$cross_compiling" = yes; then
25343   { { echo "$as_me:25343: error: cannot run test program while cross compiling" >&5
25344 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25345    { (exit 1); exit 1; }; }
25346 else
25347   cat >"conftest.$ac_ext" <<_ACEOF
25348 #line 25348 "configure"
25349 #include "confdefs.h"
25350
25351 #include <stdlib.h>
25352 #include <stdio.h>
25353
25354 #if defined(__cplusplus)
25355
25356 #ifdef HAVE_GXX_BUILTIN_H
25357 #include <g++/builtin.h>
25358 #elif HAVE_GPP_BUILTIN_H
25359 #include <gpp/builtin.h>
25360 #elif HAVE_BUILTIN_H
25361 #include <builtin.h>
25362 #endif
25363
25364 #else
25365
25366 #if $cf_cv_header_stdbool_h
25367 #include <stdbool.h>
25368 #endif
25369
25370 #endif
25371
25372 int
25373 main (void)
25374 {
25375 FILE *f = fopen ("conftest.val", "w");
25376 if (!f)
25377   $ac_main_return (1);
25378 fprintf (f, "%d", (sizeof (bool)));
25379 fclose (f);
25380   ;
25381   return 0;
25382 }
25383 _ACEOF
25384 rm -f "conftest$ac_exeext"
25385 if { (eval echo "$as_me:25385: \"$ac_link\"") >&5
25386   (eval $ac_link) 2>&5
25387   ac_status=$?
25388   echo "$as_me:25388: \$? = $ac_status" >&5
25389   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25390   { (eval echo "$as_me:25390: \"$ac_try\"") >&5
25391   (eval $ac_try) 2>&5
25392   ac_status=$?
25393   echo "$as_me:25393: \$? = $ac_status" >&5
25394   (exit "$ac_status"); }; }; then
25395   ac_cv_sizeof_bool=`cat conftest.val`
25396 else
25397   echo "$as_me: program exited with status $ac_status" >&5
25398 echo "$as_me: failed program was:" >&5
25399 cat "conftest.$ac_ext" >&5
25400 fi
25401 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25402 fi
25403 fi
25404 rm -f conftest.val
25405 else
25406   ac_cv_sizeof_bool=0
25407 fi
25408 fi
25409 echo "$as_me:25409: result: $ac_cv_sizeof_bool" >&5
25410 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25411 cat >>confdefs.h <<EOF
25412 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25413 EOF
25414
25415 echo "$as_me:25415: checking for type of bool" >&5
25416 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25417 if test "${cf_cv_type_of_bool+set}" = set; then
25418   echo $ECHO_N "(cached) $ECHO_C" >&6
25419 else
25420
25421         rm -f cf_test.out
25422         if test "$cross_compiling" = yes; then
25423
25424                 case x$ac_cv_sizeof_bool in
25425                 (x1) cf_cv_type_of_bool="unsigned char";;
25426                 (x2) cf_cv_type_of_bool="unsigned short";;
25427                 (x4) cf_cv_type_of_bool="unsigned int";;
25428                 (x8) cf_cv_type_of_bool="unsigned long";;
25429                 (*)  cf_cv_type_of_bool=unknown;;
25430                 esac
25431
25432 else
25433   cat >"conftest.$ac_ext" <<_ACEOF
25434 #line 25434 "configure"
25435 #include "confdefs.h"
25436
25437 #include <stdlib.h>
25438 #include <stdio.h>
25439
25440 #if defined(__cplusplus)
25441
25442 #ifdef HAVE_GXX_BUILTIN_H
25443 #include <g++/builtin.h>
25444 #elif HAVE_GPP_BUILTIN_H
25445 #include <gpp/builtin.h>
25446 #elif HAVE_BUILTIN_H
25447 #include <builtin.h>
25448 #endif
25449
25450 #else
25451
25452 #if $cf_cv_header_stdbool_h
25453 #include <stdbool.h>
25454 #endif
25455
25456 #endif
25457
25458 int main(void)
25459 {
25460         FILE *fp = fopen("cf_test.out", "w");
25461         if (fp != 0) {
25462                 bool x = true;
25463                 if ((bool)(-x) >= 0)
25464                         fputs("unsigned ", fp);
25465                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25466                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25467                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25468                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25469                 fclose(fp);
25470         }
25471         ${cf_cv_main_return:-return}(0);
25472 }
25473
25474 _ACEOF
25475 rm -f "conftest$ac_exeext"
25476 if { (eval echo "$as_me:25476: \"$ac_link\"") >&5
25477   (eval $ac_link) 2>&5
25478   ac_status=$?
25479   echo "$as_me:25479: \$? = $ac_status" >&5
25480   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25481   { (eval echo "$as_me:25481: \"$ac_try\"") >&5
25482   (eval $ac_try) 2>&5
25483   ac_status=$?
25484   echo "$as_me:25484: \$? = $ac_status" >&5
25485   (exit "$ac_status"); }; }; then
25486   cf_cv_type_of_bool=`cat cf_test.out`
25487                  if test -z "$cf_cv_type_of_bool"; then
25488                    cf_cv_type_of_bool=unknown
25489                  fi
25490 else
25491   echo "$as_me: program exited with status $ac_status" >&5
25492 echo "$as_me: failed program was:" >&5
25493 cat "conftest.$ac_ext" >&5
25494 cf_cv_type_of_bool=unknown
25495 fi
25496 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25497 fi
25498         rm -f cf_test.out
25499
25500 fi
25501 echo "$as_me:25501: result: $cf_cv_type_of_bool" >&5
25502 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25503
25504 if test "$cf_cv_type_of_bool" = unknown ; then
25505         case .$NCURSES_BOOL in
25506         (.auto|.) NCURSES_BOOL=unsigned;;
25507         esac
25508         { echo "$as_me:25508: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25509 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25510         cf_cv_type_of_bool=$NCURSES_BOOL
25511 fi
25512
25513 echo "$as_me:25513: checking for special defines needed for etip.h" >&5
25514 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25515 cf_save_CXXFLAGS="$CXXFLAGS"
25516 cf_result="none"
25517
25518 # etip.h includes ncurses.h which includes ncurses_dll.h
25519 # But ncurses_dll.h is generated - fix here.
25520 test -d include || mkdir include
25521 test -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
25522
25523 for cf_math in "" MATH_H
25524 do
25525 for cf_excp in "" MATH_EXCEPTION
25526 do
25527         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25528         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25529         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25530 cat >"conftest.$ac_ext" <<_ACEOF
25531 #line 25531 "configure"
25532 #include "confdefs.h"
25533
25534 #include <etip.h.in>
25535
25536 int
25537 main (void)
25538 {
25539
25540   ;
25541   return 0;
25542 }
25543 _ACEOF
25544 rm -f "conftest.$ac_objext"
25545 if { (eval echo "$as_me:25545: \"$ac_compile\"") >&5
25546   (eval $ac_compile) 2>&5
25547   ac_status=$?
25548   echo "$as_me:25548: \$? = $ac_status" >&5
25549   (exit "$ac_status"); } &&
25550          { ac_try='test -s "conftest.$ac_objext"'
25551   { (eval echo "$as_me:25551: \"$ac_try\"") >&5
25552   (eval $ac_try) 2>&5
25553   ac_status=$?
25554   echo "$as_me:25554: \$? = $ac_status" >&5
25555   (exit "$ac_status"); }; }; then
25556
25557         test -n "$cf_math" && cat >>confdefs.h <<EOF
25558 #define ETIP_NEEDS_${cf_math} 1
25559 EOF
25560
25561         test -n "$cf_excp" && cat >>confdefs.h <<EOF
25562 #define ETIP_NEEDS_${cf_excp} 1
25563 EOF
25564
25565         cf_result="$cf_math $cf_excp"
25566         break 2
25567
25568 else
25569   echo "$as_me: failed program was:" >&5
25570 cat "conftest.$ac_ext" >&5
25571 fi
25572 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25573 done
25574 done
25575 echo "$as_me:25575: result: $cf_result" >&5
25576 echo "${ECHO_T}$cf_result" >&6
25577 CXXFLAGS="$cf_save_CXXFLAGS"
25578
25579 if test -n "$CXX"; then
25580 echo "$as_me:25580: checking if $CXX accepts parameter initialization" >&5
25581 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
25582 if test "${cf_cv_cpp_param_init+set}" = set; then
25583   echo $ECHO_N "(cached) $ECHO_C" >&6
25584 else
25585
25586         ac_ext=cc
25587 ac_cpp='$CXXCPP $CPPFLAGS'
25588 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25589 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25590 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25591 ac_main_return="return"
25592
25593         if test "$cross_compiling" = yes; then
25594   cf_cv_cpp_param_init=unknown
25595 else
25596   cat >"conftest.$ac_ext" <<_ACEOF
25597 #line 25597 "configure"
25598 #include "confdefs.h"
25599
25600 class TEST {
25601 private:
25602         int value;
25603 public:
25604         TEST(int x = 1);
25605         ~TEST();
25606 };
25607
25608 TEST::TEST(int x = 1)   // some compilers do not like second initializer
25609 {
25610         value = x;
25611 }
25612 int main(void) { }
25613
25614 _ACEOF
25615 rm -f "conftest$ac_exeext"
25616 if { (eval echo "$as_me:25616: \"$ac_link\"") >&5
25617   (eval $ac_link) 2>&5
25618   ac_status=$?
25619   echo "$as_me:25619: \$? = $ac_status" >&5
25620   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25621   { (eval echo "$as_me:25621: \"$ac_try\"") >&5
25622   (eval $ac_try) 2>&5
25623   ac_status=$?
25624   echo "$as_me:25624: \$? = $ac_status" >&5
25625   (exit "$ac_status"); }; }; then
25626   cf_cv_cpp_param_init=yes
25627 else
25628   echo "$as_me: program exited with status $ac_status" >&5
25629 echo "$as_me: failed program was:" >&5
25630 cat "conftest.$ac_ext" >&5
25631 cf_cv_cpp_param_init=no
25632 fi
25633 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25634 fi
25635         ac_ext=cc
25636 ac_cpp='$CXXCPP $CPPFLAGS'
25637 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25638 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25639 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25640 ac_main_return="return"
25641
25642 fi
25643 echo "$as_me:25643: result: $cf_cv_cpp_param_init" >&5
25644 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
25645 fi
25646 test "$cf_cv_cpp_param_init" = yes &&
25647 cat >>confdefs.h <<\EOF
25648 #define CPP_HAS_PARAM_INIT 1
25649 EOF
25650
25651 if test -n "$CXX"; then
25652
25653 echo "$as_me:25653: checking if $CXX accepts static_cast" >&5
25654 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
25655 if test "${cf_cv_cpp_static_cast+set}" = set; then
25656   echo $ECHO_N "(cached) $ECHO_C" >&6
25657 else
25658
25659         ac_ext=cc
25660 ac_cpp='$CXXCPP $CPPFLAGS'
25661 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25662 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25663 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25664 ac_main_return="return"
25665
25666         cat >"conftest.$ac_ext" <<_ACEOF
25667 #line 25667 "configure"
25668 #include "confdefs.h"
25669
25670 class NCursesPanel
25671 {
25672 public:
25673   NCursesPanel(int nlines,
25674                int ncols,
25675                int begin_y = 0,
25676                int begin_x = 0)
25677   {
25678   }
25679   NCursesPanel();
25680   ~NCursesPanel();
25681 };
25682
25683 template<class T> class NCursesUserPanel : public NCursesPanel
25684 {
25685 public:
25686   NCursesUserPanel (int nlines,
25687                     int ncols,
25688                     int begin_y = 0,
25689                     int begin_x = 0,
25690                     const T* p_UserData = static_cast<T*>(0))
25691     : NCursesPanel (nlines, ncols, begin_y, begin_x)
25692   {
25693   };
25694   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
25695   {
25696   };
25697
25698   virtual ~NCursesUserPanel() {};
25699 };
25700
25701 int
25702 main (void)
25703 {
25704
25705         const char* p_UserData = static_cast<char*>(0)
25706   ;
25707   return 0;
25708 }
25709 _ACEOF
25710 rm -f "conftest.$ac_objext"
25711 if { (eval echo "$as_me:25711: \"$ac_compile\"") >&5
25712   (eval $ac_compile) 2>&5
25713   ac_status=$?
25714   echo "$as_me:25714: \$? = $ac_status" >&5
25715   (exit "$ac_status"); } &&
25716          { ac_try='test -s "conftest.$ac_objext"'
25717   { (eval echo "$as_me:25717: \"$ac_try\"") >&5
25718   (eval $ac_try) 2>&5
25719   ac_status=$?
25720   echo "$as_me:25720: \$? = $ac_status" >&5
25721   (exit "$ac_status"); }; }; then
25722   cf_cv_cpp_static_cast=yes
25723 else
25724   echo "$as_me: failed program was:" >&5
25725 cat "conftest.$ac_ext" >&5
25726 cf_cv_cpp_static_cast=no
25727 fi
25728 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25729
25730         ac_ext=cc
25731 ac_cpp='$CXXCPP $CPPFLAGS'
25732 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25733 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25734 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25735 ac_main_return="return"
25736
25737 fi
25738 echo "$as_me:25738: result: $cf_cv_cpp_static_cast" >&5
25739 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
25740
25741 fi
25742
25743 test "$cf_cv_cpp_static_cast" = yes &&
25744 cat >>confdefs.h <<\EOF
25745 #define CPP_HAS_STATIC_CAST 1
25746 EOF
25747
25748         CXX_AR='$(AR)'
25749         CXX_ARFLAGS='$(ARFLAGS)'
25750         case "$cf_cv_system_name" in
25751         (irix*)
25752             if test "$GXX" != yes ; then
25753                 CXX_AR='$(CXX)'
25754                 CXX_ARFLAGS='-ar -o'
25755             fi
25756             ;;
25757         (sco3.2v5*)
25758             CXXLDFLAGS="-u main"
25759             ;;
25760         (solaris2*)
25761             if test "$GXX" != yes ; then
25762                 CXX_AR='$(CXX)'
25763                 CXX_ARFLAGS='-xar -o'
25764             fi
25765             ;;
25766         esac
25767
25768 else
25769         cf_cxx_library=no
25770         cf_cv_builtin_bool=1
25771
25772         # Just because we are not configuring against C++ right now does not
25773         # mean that a user will not want to use C++.  Some distributors disable
25774         # the C++ portion of this configuration as a shortcut (or just to avoid
25775         # compiling the demo in the c++ directory).  So we need a reasonable
25776         # default for the 'bool' type.
25777         #
25778         # Caveat: since the storage of the bool type is not standardized, it
25779         # may change.
25780
25781         if test "$NCURSES_BOOL" != auto ; then
25782                 cf_cv_type_of_bool=$NCURSES_BOOL
25783                 cf_cv_header_stdbool_h=0
25784         else
25785                 if test "$cf_cv_header_stdbool_h" = 1 ; then
25786
25787 echo "$as_me:25787: checking for bool" >&5
25788 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25789 if test "${ac_cv_type_bool+set}" = set; then
25790   echo $ECHO_N "(cached) $ECHO_C" >&6
25791 else
25792   cat >"conftest.$ac_ext" <<_ACEOF
25793 #line 25793 "configure"
25794 #include "confdefs.h"
25795
25796 #include <stdlib.h>
25797 #include <stdio.h>
25798
25799 #if defined(__cplusplus)
25800
25801 #ifdef HAVE_GXX_BUILTIN_H
25802 #include <g++/builtin.h>
25803 #elif HAVE_GPP_BUILTIN_H
25804 #include <gpp/builtin.h>
25805 #elif HAVE_BUILTIN_H
25806 #include <builtin.h>
25807 #endif
25808
25809 #else
25810
25811 #if $cf_cv_header_stdbool_h
25812 #include <stdbool.h>
25813 #endif
25814
25815 #endif
25816
25817 int
25818 main (void)
25819 {
25820 if ((bool *) 0)
25821   return 0;
25822 if (sizeof (bool))
25823   return 0;
25824   ;
25825   return 0;
25826 }
25827 _ACEOF
25828 rm -f "conftest.$ac_objext"
25829 if { (eval echo "$as_me:25829: \"$ac_compile\"") >&5
25830   (eval $ac_compile) 2>&5
25831   ac_status=$?
25832   echo "$as_me:25832: \$? = $ac_status" >&5
25833   (exit "$ac_status"); } &&
25834          { ac_try='test -s "conftest.$ac_objext"'
25835   { (eval echo "$as_me:25835: \"$ac_try\"") >&5
25836   (eval $ac_try) 2>&5
25837   ac_status=$?
25838   echo "$as_me:25838: \$? = $ac_status" >&5
25839   (exit "$ac_status"); }; }; then
25840   ac_cv_type_bool=yes
25841 else
25842   echo "$as_me: failed program was:" >&5
25843 cat "conftest.$ac_ext" >&5
25844 ac_cv_type_bool=no
25845 fi
25846 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25847 fi
25848 echo "$as_me:25848: result: $ac_cv_type_bool" >&5
25849 echo "${ECHO_T}$ac_cv_type_bool" >&6
25850
25851 echo "$as_me:25851: checking size of bool" >&5
25852 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25853 if test "${ac_cv_sizeof_bool+set}" = set; then
25854   echo $ECHO_N "(cached) $ECHO_C" >&6
25855 else
25856   if test "$ac_cv_type_bool" = yes; then
25857   if test "$cross_compiling" = yes; then
25858   # Depending upon the size, compute the lo and hi bounds.
25859 cat >"conftest.$ac_ext" <<_ACEOF
25860 #line 25860 "configure"
25861 #include "confdefs.h"
25862
25863 #include <stdlib.h>
25864 #include <stdio.h>
25865
25866 #if defined(__cplusplus)
25867
25868 #ifdef HAVE_GXX_BUILTIN_H
25869 #include <g++/builtin.h>
25870 #elif HAVE_GPP_BUILTIN_H
25871 #include <gpp/builtin.h>
25872 #elif HAVE_BUILTIN_H
25873 #include <builtin.h>
25874 #endif
25875
25876 #else
25877
25878 #if $cf_cv_header_stdbool_h
25879 #include <stdbool.h>
25880 #endif
25881
25882 #endif
25883
25884 int
25885 main (void)
25886 {
25887 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25888   ;
25889   return 0;
25890 }
25891 _ACEOF
25892 rm -f "conftest.$ac_objext"
25893 if { (eval echo "$as_me:25893: \"$ac_compile\"") >&5
25894   (eval $ac_compile) 2>&5
25895   ac_status=$?
25896   echo "$as_me:25896: \$? = $ac_status" >&5
25897   (exit "$ac_status"); } &&
25898          { ac_try='test -s "conftest.$ac_objext"'
25899   { (eval echo "$as_me:25899: \"$ac_try\"") >&5
25900   (eval $ac_try) 2>&5
25901   ac_status=$?
25902   echo "$as_me:25902: \$? = $ac_status" >&5
25903   (exit "$ac_status"); }; }; then
25904   ac_lo=0 ac_mid=0
25905   while :; do
25906     cat >"conftest.$ac_ext" <<_ACEOF
25907 #line 25907 "configure"
25908 #include "confdefs.h"
25909
25910 #include <stdlib.h>
25911 #include <stdio.h>
25912
25913 #if defined(__cplusplus)
25914
25915 #ifdef HAVE_GXX_BUILTIN_H
25916 #include <g++/builtin.h>
25917 #elif HAVE_GPP_BUILTIN_H
25918 #include <gpp/builtin.h>
25919 #elif HAVE_BUILTIN_H
25920 #include <builtin.h>
25921 #endif
25922
25923 #else
25924
25925 #if $cf_cv_header_stdbool_h
25926 #include <stdbool.h>
25927 #endif
25928
25929 #endif
25930
25931 int
25932 main (void)
25933 {
25934 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25935   ;
25936   return 0;
25937 }
25938 _ACEOF
25939 rm -f "conftest.$ac_objext"
25940 if { (eval echo "$as_me:25940: \"$ac_compile\"") >&5
25941   (eval $ac_compile) 2>&5
25942   ac_status=$?
25943   echo "$as_me:25943: \$? = $ac_status" >&5
25944   (exit "$ac_status"); } &&
25945          { ac_try='test -s "conftest.$ac_objext"'
25946   { (eval echo "$as_me:25946: \"$ac_try\"") >&5
25947   (eval $ac_try) 2>&5
25948   ac_status=$?
25949   echo "$as_me:25949: \$? = $ac_status" >&5
25950   (exit "$ac_status"); }; }; then
25951   ac_hi=$ac_mid; break
25952 else
25953   echo "$as_me: failed program was:" >&5
25954 cat "conftest.$ac_ext" >&5
25955 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25956 fi
25957 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25958   done
25959 else
25960   echo "$as_me: failed program was:" >&5
25961 cat "conftest.$ac_ext" >&5
25962 ac_hi=-1 ac_mid=-1
25963   while :; do
25964     cat >"conftest.$ac_ext" <<_ACEOF
25965 #line 25965 "configure"
25966 #include "confdefs.h"
25967
25968 #include <stdlib.h>
25969 #include <stdio.h>
25970
25971 #if defined(__cplusplus)
25972
25973 #ifdef HAVE_GXX_BUILTIN_H
25974 #include <g++/builtin.h>
25975 #elif HAVE_GPP_BUILTIN_H
25976 #include <gpp/builtin.h>
25977 #elif HAVE_BUILTIN_H
25978 #include <builtin.h>
25979 #endif
25980
25981 #else
25982
25983 #if $cf_cv_header_stdbool_h
25984 #include <stdbool.h>
25985 #endif
25986
25987 #endif
25988
25989 int
25990 main (void)
25991 {
25992 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25993   ;
25994   return 0;
25995 }
25996 _ACEOF
25997 rm -f "conftest.$ac_objext"
25998 if { (eval echo "$as_me:25998: \"$ac_compile\"") >&5
25999   (eval $ac_compile) 2>&5
26000   ac_status=$?
26001   echo "$as_me:26001: \$? = $ac_status" >&5
26002   (exit "$ac_status"); } &&
26003          { ac_try='test -s "conftest.$ac_objext"'
26004   { (eval echo "$as_me:26004: \"$ac_try\"") >&5
26005   (eval $ac_try) 2>&5
26006   ac_status=$?
26007   echo "$as_me:26007: \$? = $ac_status" >&5
26008   (exit "$ac_status"); }; }; then
26009   ac_lo=$ac_mid; break
26010 else
26011   echo "$as_me: failed program was:" >&5
26012 cat "conftest.$ac_ext" >&5
26013 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26014 fi
26015 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26016   done
26017 fi
26018 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26019 # Binary search between lo and hi bounds.
26020 while test "x$ac_lo" != "x$ac_hi"; do
26021   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26022   cat >"conftest.$ac_ext" <<_ACEOF
26023 #line 26023 "configure"
26024 #include "confdefs.h"
26025
26026 #include <stdlib.h>
26027 #include <stdio.h>
26028
26029 #if defined(__cplusplus)
26030
26031 #ifdef HAVE_GXX_BUILTIN_H
26032 #include <g++/builtin.h>
26033 #elif HAVE_GPP_BUILTIN_H
26034 #include <gpp/builtin.h>
26035 #elif HAVE_BUILTIN_H
26036 #include <builtin.h>
26037 #endif
26038
26039 #else
26040
26041 #if $cf_cv_header_stdbool_h
26042 #include <stdbool.h>
26043 #endif
26044
26045 #endif
26046
26047 int
26048 main (void)
26049 {
26050 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26051   ;
26052   return 0;
26053 }
26054 _ACEOF
26055 rm -f "conftest.$ac_objext"
26056 if { (eval echo "$as_me:26056: \"$ac_compile\"") >&5
26057   (eval $ac_compile) 2>&5
26058   ac_status=$?
26059   echo "$as_me:26059: \$? = $ac_status" >&5
26060   (exit "$ac_status"); } &&
26061          { ac_try='test -s "conftest.$ac_objext"'
26062   { (eval echo "$as_me:26062: \"$ac_try\"") >&5
26063   (eval $ac_try) 2>&5
26064   ac_status=$?
26065   echo "$as_me:26065: \$? = $ac_status" >&5
26066   (exit "$ac_status"); }; }; then
26067   ac_hi=$ac_mid
26068 else
26069   echo "$as_me: failed program was:" >&5
26070 cat "conftest.$ac_ext" >&5
26071 ac_lo=`expr "$ac_mid" + 1`
26072 fi
26073 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26074 done
26075 ac_cv_sizeof_bool=$ac_lo
26076 else
26077   if test "$cross_compiling" = yes; then
26078   { { echo "$as_me:26078: error: cannot run test program while cross compiling" >&5
26079 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26080    { (exit 1); exit 1; }; }
26081 else
26082   cat >"conftest.$ac_ext" <<_ACEOF
26083 #line 26083 "configure"
26084 #include "confdefs.h"
26085
26086 #include <stdlib.h>
26087 #include <stdio.h>
26088
26089 #if defined(__cplusplus)
26090
26091 #ifdef HAVE_GXX_BUILTIN_H
26092 #include <g++/builtin.h>
26093 #elif HAVE_GPP_BUILTIN_H
26094 #include <gpp/builtin.h>
26095 #elif HAVE_BUILTIN_H
26096 #include <builtin.h>
26097 #endif
26098
26099 #else
26100
26101 #if $cf_cv_header_stdbool_h
26102 #include <stdbool.h>
26103 #endif
26104
26105 #endif
26106
26107 int
26108 main (void)
26109 {
26110 FILE *f = fopen ("conftest.val", "w");
26111 if (!f)
26112   $ac_main_return (1);
26113 fprintf (f, "%d", (sizeof (bool)));
26114 fclose (f);
26115   ;
26116   return 0;
26117 }
26118 _ACEOF
26119 rm -f "conftest$ac_exeext"
26120 if { (eval echo "$as_me:26120: \"$ac_link\"") >&5
26121   (eval $ac_link) 2>&5
26122   ac_status=$?
26123   echo "$as_me:26123: \$? = $ac_status" >&5
26124   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26125   { (eval echo "$as_me:26125: \"$ac_try\"") >&5
26126   (eval $ac_try) 2>&5
26127   ac_status=$?
26128   echo "$as_me:26128: \$? = $ac_status" >&5
26129   (exit "$ac_status"); }; }; then
26130   ac_cv_sizeof_bool=`cat conftest.val`
26131 else
26132   echo "$as_me: program exited with status $ac_status" >&5
26133 echo "$as_me: failed program was:" >&5
26134 cat "conftest.$ac_ext" >&5
26135 fi
26136 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26137 fi
26138 fi
26139 rm -f conftest.val
26140 else
26141   ac_cv_sizeof_bool=0
26142 fi
26143 fi
26144 echo "$as_me:26144: result: $ac_cv_sizeof_bool" >&5
26145 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26146 cat >>confdefs.h <<EOF
26147 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26148 EOF
26149
26150 echo "$as_me:26150: checking for type of bool" >&5
26151 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26152 if test "${cf_cv_type_of_bool+set}" = set; then
26153   echo $ECHO_N "(cached) $ECHO_C" >&6
26154 else
26155
26156         rm -f cf_test.out
26157         if test "$cross_compiling" = yes; then
26158
26159                 case x$ac_cv_sizeof_bool in
26160                 (x1) cf_cv_type_of_bool="unsigned char";;
26161                 (x2) cf_cv_type_of_bool="unsigned short";;
26162                 (x4) cf_cv_type_of_bool="unsigned int";;
26163                 (x8) cf_cv_type_of_bool="unsigned long";;
26164                 (*)  cf_cv_type_of_bool=unknown;;
26165                 esac
26166
26167 else
26168   cat >"conftest.$ac_ext" <<_ACEOF
26169 #line 26169 "configure"
26170 #include "confdefs.h"
26171
26172 #include <stdlib.h>
26173 #include <stdio.h>
26174
26175 #if defined(__cplusplus)
26176
26177 #ifdef HAVE_GXX_BUILTIN_H
26178 #include <g++/builtin.h>
26179 #elif HAVE_GPP_BUILTIN_H
26180 #include <gpp/builtin.h>
26181 #elif HAVE_BUILTIN_H
26182 #include <builtin.h>
26183 #endif
26184
26185 #else
26186
26187 #if $cf_cv_header_stdbool_h
26188 #include <stdbool.h>
26189 #endif
26190
26191 #endif
26192
26193 int main(void)
26194 {
26195         FILE *fp = fopen("cf_test.out", "w");
26196         if (fp != 0) {
26197                 bool x = true;
26198                 if ((bool)(-x) >= 0)
26199                         fputs("unsigned ", fp);
26200                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26201                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26202                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26203                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26204                 fclose(fp);
26205         }
26206         ${cf_cv_main_return:-return}(0);
26207 }
26208
26209 _ACEOF
26210 rm -f "conftest$ac_exeext"
26211 if { (eval echo "$as_me:26211: \"$ac_link\"") >&5
26212   (eval $ac_link) 2>&5
26213   ac_status=$?
26214   echo "$as_me:26214: \$? = $ac_status" >&5
26215   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26216   { (eval echo "$as_me:26216: \"$ac_try\"") >&5
26217   (eval $ac_try) 2>&5
26218   ac_status=$?
26219   echo "$as_me:26219: \$? = $ac_status" >&5
26220   (exit "$ac_status"); }; }; then
26221   cf_cv_type_of_bool=`cat cf_test.out`
26222                  if test -z "$cf_cv_type_of_bool"; then
26223                    cf_cv_type_of_bool=unknown
26224                  fi
26225 else
26226   echo "$as_me: program exited with status $ac_status" >&5
26227 echo "$as_me: failed program was:" >&5
26228 cat "conftest.$ac_ext" >&5
26229 cf_cv_type_of_bool=unknown
26230 fi
26231 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26232 fi
26233         rm -f cf_test.out
26234
26235 fi
26236 echo "$as_me:26236: result: $cf_cv_type_of_bool" >&5
26237 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26238
26239 if test "$cf_cv_type_of_bool" = unknown ; then
26240         case .$NCURSES_BOOL in
26241         (.auto|.) NCURSES_BOOL=unsigned;;
26242         esac
26243         { echo "$as_me:26243: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26244 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26245         cf_cv_type_of_bool=$NCURSES_BOOL
26246 fi
26247
26248                 else
26249                         echo "$as_me:26249: checking for fallback type of bool" >&5
26250 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26251                         case "$host_cpu" in
26252                         (i?86)  cf_cv_type_of_bool=char ;;
26253                         (*)     cf_cv_type_of_bool=int  ;;
26254                         esac
26255                         echo "$as_me:26255: result: $cf_cv_type_of_bool" >&5
26256 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26257                 fi
26258         fi
26259 fi
26260
26261 # If the C compiler did not declare bool, and we did not determine that the C++
26262 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26263 # ncurses library use the same type as C++ bool.  Note that this allows one to
26264 # specify the type of bool in a configure-script option and postpone
26265 # integration with the C++ compiler provided that the types are compatible.
26266 USE_CXX_BOOL=1
26267 if test "$cf_cv_cc_bool_type" = 1
26268 then
26269         # oops: C has a bool.  Unlikely, but C++ could differ.
26270         USE_CXX_BOOL=0
26271 elif test "$cf_cv_builtin_bool" = 0
26272 then
26273         # C++ has no bool
26274         USE_CXX_BOOL=0
26275 else
26276         # this is the normal case
26277         USE_CXX_BOOL='defined(__cplusplus)'
26278 fi
26279
26280 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26281
26282         if test "$cf_with_ada" != "no" ; then
26283                 if test "$with_libtool" != "no"; then
26284                         { echo "$as_me:26284: WARNING: libtool does not support Ada - disabling feature" >&5
26285 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26286                         cf_with_ada=no
26287                 fi
26288         fi
26289
26290         if test "$cf_with_ada" != "no" ; then
26291
26292 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26293 do
26294
26295 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26296
26297         unset ac_cv_path_cf_TEMP_gnat
26298         unset cf_TEMP_gnat
26299         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26300 set dummy $cf_prog_gnat; ac_word=$2
26301 echo "$as_me:26301: checking for $ac_word" >&5
26302 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26303 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26304   echo $ECHO_N "(cached) $ECHO_C" >&6
26305 else
26306   case $cf_TEMP_gnat in
26307   [\\/]* | ?:[\\/]*)
26308   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26309   ;;
26310   *)
26311   ac_save_IFS=$IFS; IFS=$ac_path_separator
26312 ac_dummy="$PATH"
26313 for ac_dir in $ac_dummy; do
26314   IFS=$ac_save_IFS
26315   test -z "$ac_dir" && ac_dir=.
26316   if $as_executable_p "$ac_dir/$ac_word"; then
26317    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26318    echo "$as_me:26318: found $ac_dir/$ac_word" >&5
26319    break
26320 fi
26321 done
26322
26323   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26324   ;;
26325 esac
26326 fi
26327 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26328
26329 if test -n "$cf_TEMP_gnat"; then
26330   echo "$as_me:26330: result: $cf_TEMP_gnat" >&5
26331 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26332 else
26333   echo "$as_me:26333: result: no" >&5
26334 echo "${ECHO_T}no" >&6
26335 fi
26336
26337         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
26338
26339         if test "x$cf_TEMP_gnat" != xno; then
26340                 unset cf_cv_gnat_version
26341                 unset cf_TEMP_gnat
26342
26343 echo "$as_me:26343: checking for $cf_prog_gnat version" >&5
26344 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26345 if test "${cf_cv_gnat_version+set}" = set; then
26346   echo $ECHO_N "(cached) $ECHO_C" >&6
26347 else
26348
26349 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26350         grep '[0-9].[0-9][0-9]*' |\
26351         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26352
26353 fi
26354 echo "$as_me:26354: result: $cf_cv_gnat_version" >&5
26355 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26356 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26357 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26358
26359         fi
26360         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
26361
26362         unset cf_TEMP_gnat
26363         unset cf_cv_gnat_version
26364         unset ac_cv_path_cf_TEMP_gnat
26365 done
26366
26367 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26368         cf_ada_make=
26369         cf_cv_prog_gnat_correct=no
26370 else
26371         cf_ada_make=gnatmake
26372         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26373                 # gprconfig is newer than gnatmake; we can continue...
26374                 cf_ada_config="##"
26375         else
26376                 rm -rf ./conftest* ./*~conftest*
26377                 if mkdir conftest.src
26378                 then
26379                         cf_ada_config=""
26380                         cd conftest.src
26381                         for cf_gprconfig in Ada C
26382                         do
26383                                 echo "$as_me:26383: checking for gprconfig name for $cf_gprconfig" >&5
26384 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26385                                 if test "$cf_gprconfig" = C
26386                                 then
26387                                         for cf_gprconfig_param in \
26388                                                 "$cf_gprconfig,,,,GNATGCC" \
26389                                                 "$cf_gprconfig,,,,GCC" \
26390                                                 "$cf_gprconfig"
26391                                         do
26392                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26393                                                 test -n "$cf_gprconfig_value" && break
26394                                         done
26395                                 else
26396                                         cf_gprconfig_param=$cf_gprconfig
26397                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26398                                 fi
26399                                 if test -n "$cf_gprconfig_value"
26400                                 then
26401                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
26402                                         echo "$as_me:26402: result: $cf_gprconfig_value" >&5
26403 echo "${ECHO_T}$cf_gprconfig_value" >&6
26404                                 else
26405                                         echo "$as_me:26405: result: missing" >&5
26406 echo "${ECHO_T}missing" >&6
26407                                         cf_ada_config="#"
26408                                         break
26409                                 fi
26410                         done
26411                         cd ..
26412                         rm -rf ./conftest* ./*~conftest*
26413                 fi
26414         fi
26415         if test "x$cf_ada_config" != "x#"
26416         then
26417
26418 echo "$as_me:26418: checking for gnat version" >&5
26419 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26420 if test "${cf_cv_gnat_version+set}" = set; then
26421   echo $ECHO_N "(cached) $ECHO_C" >&6
26422 else
26423
26424 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26425         grep '[0-9].[0-9][0-9]*' |\
26426         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26427
26428 fi
26429 echo "$as_me:26429: result: $cf_cv_gnat_version" >&5
26430 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26431 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26432
26433 case "$cf_cv_gnat_version" in
26434 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26435         cf_cv_prog_gnat_correct=yes
26436         ;;
26437 (*)
26438         { echo "$as_me:26438: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26439 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26440         cf_cv_prog_gnat_correct=no
26441         ;;
26442 esac
26443
26444                 # Extract the first word of "m4", so it can be a program name with args.
26445 set dummy m4; ac_word=$2
26446 echo "$as_me:26446: checking for $ac_word" >&5
26447 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26448 if test "${ac_cv_prog_M4_exists+set}" = set; then
26449   echo $ECHO_N "(cached) $ECHO_C" >&6
26450 else
26451   if test -n "$M4_exists"; then
26452   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26453 else
26454   ac_save_IFS=$IFS; IFS=$ac_path_separator
26455 ac_dummy="$PATH"
26456 for ac_dir in $ac_dummy; do
26457   IFS=$ac_save_IFS
26458   test -z "$ac_dir" && ac_dir=.
26459   $as_executable_p "$ac_dir/$ac_word" || continue
26460 ac_cv_prog_M4_exists="yes"
26461 echo "$as_me:26461: found $ac_dir/$ac_word" >&5
26462 break
26463 done
26464
26465   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26466 fi
26467 fi
26468 M4_exists=$ac_cv_prog_M4_exists
26469 if test -n "$M4_exists"; then
26470   echo "$as_me:26470: result: $M4_exists" >&5
26471 echo "${ECHO_T}$M4_exists" >&6
26472 else
26473   echo "$as_me:26473: result: no" >&5
26474 echo "${ECHO_T}no" >&6
26475 fi
26476
26477                 if test "$ac_cv_prog_M4_exists" = no; then
26478                         cf_cv_prog_gnat_correct=no
26479                         { echo "$as_me:26479: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26480 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26481                 fi
26482                 if test "$cf_cv_prog_gnat_correct" = yes; then
26483                         echo "$as_me:26483: checking if GNAT works" >&5
26484 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26485
26486 rm -rf ./conftest* ./*~conftest*
26487 cat >>conftest.ads <<CF_EOF
26488 procedure conftest;
26489 CF_EOF
26490 cat >>conftest.adb <<CF_EOF
26491 with Text_IO;
26492 with GNAT.OS_Lib;
26493 procedure conftest is
26494 begin
26495    Text_IO.Put ("Hello World");
26496    Text_IO.New_Line;
26497    GNAT.OS_Lib.OS_Exit (0);
26498 end conftest;
26499 CF_EOF
26500 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26501    if ( ./conftest 1>&5 2>&1 ) ; then
26502       cf_cv_prog_gnat_correct=yes
26503    else
26504       cf_cv_prog_gnat_correct=no
26505    fi
26506 else
26507    cf_cv_prog_gnat_correct=no
26508 fi
26509 rm -rf ./conftest* ./*~conftest*
26510
26511                         echo "$as_me:26511: result: $cf_cv_prog_gnat_correct" >&5
26512 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26513                 fi
26514         else
26515                 cf_cv_prog_gnat_correct=no
26516         fi
26517 fi
26518
26519                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26520
26521         ADAFLAGS="$ADAFLAGS -gnatpn"
26522
26523         echo "$as_me:26523: checking optimization options for ADAFLAGS" >&5
26524 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26525         case "$CFLAGS" in
26526         (*-g*)
26527
26528         ADAFLAGS="$ADAFLAGS -g"
26529
26530                 ;;
26531         esac
26532         case "$CFLAGS" in
26533         (*-O*)
26534                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26535
26536         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26537
26538                 ;;
26539         esac
26540         echo "$as_me:26540: result: $ADAFLAGS" >&5
26541 echo "${ECHO_T}$ADAFLAGS" >&6
26542
26543 echo "$as_me:26543: checking if GNATPREP supports -T option" >&5
26544 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26545 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
26546   echo $ECHO_N "(cached) $ECHO_C" >&6
26547 else
26548
26549 cf_cv_gnatprep_opt_t=no
26550 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
26551
26552 fi
26553 echo "$as_me:26553: result: $cf_cv_gnatprep_opt_t" >&5
26554 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
26555 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
26556
26557 echo "$as_me:26557: checking if GNAT supports generics" >&5
26558 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
26559 case "$cf_cv_gnat_version" in
26560 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26561         cf_gnat_generics=yes
26562         ;;
26563 (*)
26564         cf_gnat_generics=no
26565         ;;
26566 esac
26567 echo "$as_me:26567: result: $cf_gnat_generics" >&5
26568 echo "${ECHO_T}$cf_gnat_generics" >&6
26569
26570 if test "$cf_gnat_generics" = yes
26571 then
26572         cf_compile_generics=generics
26573         cf_generic_objects="\${GENOBJS}"
26574 else
26575         cf_compile_generics=
26576         cf_generic_objects=
26577 fi
26578
26579 echo "$as_me:26579: checking if GNAT supports SIGINT" >&5
26580 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
26581 if test "${cf_cv_gnat_sigint+set}" = set; then
26582   echo $ECHO_N "(cached) $ECHO_C" >&6
26583 else
26584
26585 rm -rf ./conftest* ./*~conftest*
26586 cat >>conftest.ads <<CF_EOF
26587 with Ada.Interrupts.Names;
26588
26589 package ConfTest is
26590
26591    pragma Warnings (Off);  --  the next pragma exists since 3.11p
26592    pragma Unreserve_All_Interrupts;
26593    pragma Warnings (On);
26594
26595    protected Process is
26596       procedure Stop;
26597       function Continue return Boolean;
26598       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
26599    private
26600       Done : Boolean := False;
26601    end Process;
26602
26603 end ConfTest;
26604 CF_EOF
26605 cat >>conftest.adb <<CF_EOF
26606 package body ConfTest is
26607    protected body Process is
26608       procedure Stop is
26609       begin
26610          Done := True;
26611       end Stop;
26612       function Continue return Boolean is
26613       begin
26614          return not Done;
26615       end Continue;
26616    end Process;
26617 end ConfTest;
26618 CF_EOF
26619 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26620       cf_cv_gnat_sigint=yes
26621 else
26622    cf_cv_gnat_sigint=no
26623 fi
26624 rm -rf ./conftest* ./*~conftest*
26625
26626 fi
26627 echo "$as_me:26627: result: $cf_cv_gnat_sigint" >&5
26628 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
26629
26630 if test "$cf_cv_gnat_sigint" = yes ; then
26631         USE_GNAT_SIGINT=""
26632 else
26633         USE_GNAT_SIGINT="#"
26634 fi
26635
26636 cf_gnat_libraries=no
26637 cf_gnat_projects=no
26638
26639 if test "$enable_gnat_projects" != no ; then
26640 echo "$as_me:26640: checking if GNAT supports project files" >&5
26641 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
26642 case "$cf_cv_gnat_version" in
26643 (3.[0-9]*)
26644         ;;
26645 (*)
26646         case "$cf_cv_system_name" in
26647         (cygwin*|msys*)
26648                 ;;
26649         (*)
26650                 rm -rf ./conftest* ./*~conftest*
26651                 if mkdir conftest.src conftest.bin conftest.lib
26652                 then
26653                         cd conftest.src
26654                         rm -rf ./conftest* ./*~conftest*
26655                         cat >>library.gpr <<CF_EOF
26656 project Library is
26657   Kind := External ("LIB_KIND");
26658   for Library_Name use "ConfTest";
26659   for Object_Dir use ".";
26660   for Library_ALI_Dir use External("LIBRARY_DIR");
26661   for Library_Version use External ("SONAME");
26662   for Library_Kind use Kind;
26663   for Library_Dir use External("BUILD_DIR");
26664   Source_Dir := External ("SOURCE_DIR");
26665   for Source_Dirs use (Source_Dir);
26666 end Library;
26667 CF_EOF
26668                         cat >>confpackage.ads <<CF_EOF
26669 package ConfPackage is
26670    procedure conftest;
26671 end ConfPackage;
26672 CF_EOF
26673                         cat >>confpackage.adb <<CF_EOF
26674 with Text_IO;
26675 package body ConfPackage is
26676    procedure conftest is
26677    begin
26678       Text_IO.Put ("Hello World");
26679       Text_IO.New_Line;
26680    end conftest;
26681 end ConfPackage;
26682 CF_EOF
26683                         if ( "$cf_ada_make" $ADAFLAGS \
26684                                         -Plibrary.gpr \
26685                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
26686                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
26687                                         -XSOURCE_DIR="`pwd`" \
26688                                         -XSONAME=libConfTest.so.1 \
26689                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
26690                                 cf_gnat_projects=yes
26691                         fi
26692                         cd ..
26693                 fi
26694                 if test -f conftest.lib/confpackage.ali
26695                 then
26696                         cf_gnat_libraries=yes
26697                 fi
26698                 rm -rf ./conftest* ./*~conftest*
26699                 ;;
26700         esac
26701         ;;
26702 esac
26703 echo "$as_me:26703: result: $cf_gnat_projects" >&5
26704 echo "${ECHO_T}$cf_gnat_projects" >&6
26705 fi # enable_gnat_projects
26706
26707 if test "$cf_gnat_projects" = yes
26708 then
26709         echo "$as_me:26709: checking if GNAT supports libraries" >&5
26710 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
26711         echo "$as_me:26711: result: $cf_gnat_libraries" >&5
26712 echo "${ECHO_T}$cf_gnat_libraries" >&6
26713 fi
26714
26715 USE_OLD_MAKERULES=""
26716 USE_GNAT_PROJECTS="#"
26717 USE_GNAT_MAKE_GPR="#"
26718 USE_GNAT_GPRBUILD="#"
26719
26720 if test "$cf_gnat_projects" = yes
26721 then
26722         USE_OLD_MAKERULES="#"
26723         USE_GNAT_PROJECTS=""
26724         if test "$cf_cv_VERSION_GPRBUILD" != no
26725         then
26726                 USE_GNAT_GPRBUILD=""
26727         elif test "$cf_cv_VERSION_GNATMAKE" != no
26728         then
26729                 USE_GNAT_MAKE_GPR=""
26730         else
26731                 { echo "$as_me:26731: WARNING: use old makefile rules since tools are missing" >&5
26732 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
26733         fi
26734 fi
26735
26736 if test "$cf_gnat_libraries" = yes
26737 then
26738         USE_GNAT_LIBRARIES=""
26739 else
26740         USE_GNAT_LIBRARIES="#"
26741 fi
26742
26743 echo "$as_me:26743: checking for ada-compiler" >&5
26744 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
26745
26746 # Check whether --with-ada-compiler or --without-ada-compiler was given.
26747 if test "${with_ada_compiler+set}" = set; then
26748   withval="$with_ada_compiler"
26749   cf_ada_compiler=$withval
26750 else
26751   cf_ada_compiler=gnatmake
26752 fi;
26753
26754 echo "$as_me:26754: result: $cf_ada_compiler" >&5
26755 echo "${ECHO_T}$cf_ada_compiler" >&6
26756
26757                         cf_ada_package=terminal_interface
26758
26759 echo "$as_me:26759: checking for ada-include" >&5
26760 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
26761
26762 # Check whether --with-ada-include or --without-ada-include was given.
26763 if test "${with_ada_include+set}" = set; then
26764   withval="$with_ada_include"
26765
26766 else
26767   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
26768 fi; if test -n "$prefix/share/ada/adainclude" ; then
26769
26770 if test "x$prefix" != xNONE; then
26771         cf_path_syntax="$prefix"
26772 else
26773         cf_path_syntax="$ac_default_prefix"
26774 fi
26775
26776 case ".$withval" in
26777 (.\$\(*\)*|.\'*\'*)
26778         ;;
26779 (..|./*|.\\*)
26780         ;;
26781 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26782         ;;
26783 (.\$\{*prefix\}*|.\$\{*dir\}*)
26784         eval withval="$withval"
26785         case ".$withval" in
26786         (.NONE/*)
26787                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26788                 ;;
26789         esac
26790         ;;
26791 (.no|.NONE/*)
26792         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26793         ;;
26794 (*)
26795         { { echo "$as_me:26795: error: expected a pathname, not \"$withval\"" >&5
26796 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26797    { (exit 1); exit 1; }; }
26798         ;;
26799 esac
26800
26801 fi
26802 eval ADA_INCLUDE="$withval"
26803
26804 echo "$as_me:26804: result: $ADA_INCLUDE" >&5
26805 echo "${ECHO_T}$ADA_INCLUDE" >&6
26806
26807 echo "$as_me:26807: checking for ada-objects" >&5
26808 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
26809
26810 # Check whether --with-ada-objects or --without-ada-objects was given.
26811 if test "${with_ada_objects+set}" = set; then
26812   withval="$with_ada_objects"
26813
26814 else
26815   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
26816 fi; if test -n "$prefix/lib/ada/adalib" ; then
26817
26818 if test "x$prefix" != xNONE; then
26819         cf_path_syntax="$prefix"
26820 else
26821         cf_path_syntax="$ac_default_prefix"
26822 fi
26823
26824 case ".$withval" in
26825 (.\$\(*\)*|.\'*\'*)
26826         ;;
26827 (..|./*|.\\*)
26828         ;;
26829 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26830         ;;
26831 (.\$\{*prefix\}*|.\$\{*dir\}*)
26832         eval withval="$withval"
26833         case ".$withval" in
26834         (.NONE/*)
26835                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26836                 ;;
26837         esac
26838         ;;
26839 (.no|.NONE/*)
26840         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26841         ;;
26842 (*)
26843         { { echo "$as_me:26843: error: expected a pathname, not \"$withval\"" >&5
26844 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26845    { (exit 1); exit 1; }; }
26846         ;;
26847 esac
26848
26849 fi
26850 eval ADA_OBJECTS="$withval"
26851
26852 echo "$as_me:26852: result: $ADA_OBJECTS" >&5
26853 echo "${ECHO_T}$ADA_OBJECTS" >&6
26854
26855 echo "$as_me:26855: checking if an Ada95 shared-library should be built" >&5
26856 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
26857
26858 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
26859 if test "${with_ada_sharedlib+set}" = set; then
26860   withval="$with_ada_sharedlib"
26861   with_ada_sharedlib=$withval
26862 else
26863   with_ada_sharedlib=no
26864 fi;
26865 echo "$as_me:26865: result: $with_ada_sharedlib" >&5
26866 echo "${ECHO_T}$with_ada_sharedlib" >&6
26867
26868 if test "x$with_ada_sharedlib" != xno
26869 then
26870         if test "x$cf_gnat_projects" != xyes
26871         then
26872                 { echo "$as_me:26872: WARNING: disabling shared-library since GNAT projects are not supported" >&5
26873 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
26874                 with_ada_sharedlib=no
26875         fi
26876 fi
26877
26878 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
26879 MAKE_ADA_SHAREDLIB="#"
26880
26881 if test "x$with_ada_sharedlib" != xno
26882 then
26883         MAKE_ADA_SHAREDLIB=
26884         if test "x$with_ada_sharedlib" != xyes
26885         then
26886                 ADA_SHAREDLIB="$with_ada_sharedlib"
26887         fi
26888 fi
26889
26890                         # allow the Ada binding to be renamed
26891
26892 echo "$as_me:26892: checking for ada-libname" >&5
26893 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
26894
26895 # Check whether --with-ada-libname or --without-ada-libname was given.
26896 if test "${with_ada_libname+set}" = set; then
26897   withval="$with_ada_libname"
26898   ADA_LIBNAME=$withval
26899 else
26900   ADA_LIBNAME=AdaCurses
26901 fi;
26902 case "x$ADA_LIBNAME" in
26903 (x|xyes|xno)
26904         ADA_LIBNAME=AdaCurses
26905         ;;
26906 esac
26907
26908 echo "$as_me:26908: result: $ADA_LIBNAME" >&5
26909 echo "${ECHO_T}$ADA_LIBNAME" >&6
26910
26911                 fi
26912         fi
26913 else
26914         cf_with_ada=no
26915 fi
26916
26917 # do this "late" to avoid conflict with header-checks
26918 if test "x$with_widec" = xyes ; then
26919         echo "$as_me:26919: checking for wchar_t" >&5
26920 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
26921 if test "${ac_cv_type_wchar_t+set}" = set; then
26922   echo $ECHO_N "(cached) $ECHO_C" >&6
26923 else
26924   cat >"conftest.$ac_ext" <<_ACEOF
26925 #line 26925 "configure"
26926 #include "confdefs.h"
26927 $ac_includes_default
26928 int
26929 main (void)
26930 {
26931 if ((wchar_t *) 0)
26932   return 0;
26933 if (sizeof (wchar_t))
26934   return 0;
26935   ;
26936   return 0;
26937 }
26938 _ACEOF
26939 rm -f "conftest.$ac_objext"
26940 if { (eval echo "$as_me:26940: \"$ac_compile\"") >&5
26941   (eval $ac_compile) 2>&5
26942   ac_status=$?
26943   echo "$as_me:26943: \$? = $ac_status" >&5
26944   (exit "$ac_status"); } &&
26945          { ac_try='test -s "conftest.$ac_objext"'
26946   { (eval echo "$as_me:26946: \"$ac_try\"") >&5
26947   (eval $ac_try) 2>&5
26948   ac_status=$?
26949   echo "$as_me:26949: \$? = $ac_status" >&5
26950   (exit "$ac_status"); }; }; then
26951   ac_cv_type_wchar_t=yes
26952 else
26953   echo "$as_me: failed program was:" >&5
26954 cat "conftest.$ac_ext" >&5
26955 ac_cv_type_wchar_t=no
26956 fi
26957 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26958 fi
26959 echo "$as_me:26959: result: $ac_cv_type_wchar_t" >&5
26960 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
26961
26962 echo "$as_me:26962: checking size of wchar_t" >&5
26963 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
26964 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
26965   echo $ECHO_N "(cached) $ECHO_C" >&6
26966 else
26967   if test "$ac_cv_type_wchar_t" = yes; then
26968   if test "$cross_compiling" = yes; then
26969   # Depending upon the size, compute the lo and hi bounds.
26970 cat >"conftest.$ac_ext" <<_ACEOF
26971 #line 26971 "configure"
26972 #include "confdefs.h"
26973 $ac_includes_default
26974 int
26975 main (void)
26976 {
26977 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
26978   ;
26979   return 0;
26980 }
26981 _ACEOF
26982 rm -f "conftest.$ac_objext"
26983 if { (eval echo "$as_me:26983: \"$ac_compile\"") >&5
26984   (eval $ac_compile) 2>&5
26985   ac_status=$?
26986   echo "$as_me:26986: \$? = $ac_status" >&5
26987   (exit "$ac_status"); } &&
26988          { ac_try='test -s "conftest.$ac_objext"'
26989   { (eval echo "$as_me:26989: \"$ac_try\"") >&5
26990   (eval $ac_try) 2>&5
26991   ac_status=$?
26992   echo "$as_me:26992: \$? = $ac_status" >&5
26993   (exit "$ac_status"); }; }; then
26994   ac_lo=0 ac_mid=0
26995   while :; do
26996     cat >"conftest.$ac_ext" <<_ACEOF
26997 #line 26997 "configure"
26998 #include "confdefs.h"
26999 $ac_includes_default
27000 int
27001 main (void)
27002 {
27003 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27004   ;
27005   return 0;
27006 }
27007 _ACEOF
27008 rm -f "conftest.$ac_objext"
27009 if { (eval echo "$as_me:27009: \"$ac_compile\"") >&5
27010   (eval $ac_compile) 2>&5
27011   ac_status=$?
27012   echo "$as_me:27012: \$? = $ac_status" >&5
27013   (exit "$ac_status"); } &&
27014          { ac_try='test -s "conftest.$ac_objext"'
27015   { (eval echo "$as_me:27015: \"$ac_try\"") >&5
27016   (eval $ac_try) 2>&5
27017   ac_status=$?
27018   echo "$as_me:27018: \$? = $ac_status" >&5
27019   (exit "$ac_status"); }; }; then
27020   ac_hi=$ac_mid; break
27021 else
27022   echo "$as_me: failed program was:" >&5
27023 cat "conftest.$ac_ext" >&5
27024 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27025 fi
27026 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27027   done
27028 else
27029   echo "$as_me: failed program was:" >&5
27030 cat "conftest.$ac_ext" >&5
27031 ac_hi=-1 ac_mid=-1
27032   while :; do
27033     cat >"conftest.$ac_ext" <<_ACEOF
27034 #line 27034 "configure"
27035 #include "confdefs.h"
27036 $ac_includes_default
27037 int
27038 main (void)
27039 {
27040 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27041   ;
27042   return 0;
27043 }
27044 _ACEOF
27045 rm -f "conftest.$ac_objext"
27046 if { (eval echo "$as_me:27046: \"$ac_compile\"") >&5
27047   (eval $ac_compile) 2>&5
27048   ac_status=$?
27049   echo "$as_me:27049: \$? = $ac_status" >&5
27050   (exit "$ac_status"); } &&
27051          { ac_try='test -s "conftest.$ac_objext"'
27052   { (eval echo "$as_me:27052: \"$ac_try\"") >&5
27053   (eval $ac_try) 2>&5
27054   ac_status=$?
27055   echo "$as_me:27055: \$? = $ac_status" >&5
27056   (exit "$ac_status"); }; }; then
27057   ac_lo=$ac_mid; break
27058 else
27059   echo "$as_me: failed program was:" >&5
27060 cat "conftest.$ac_ext" >&5
27061 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27062 fi
27063 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27064   done
27065 fi
27066 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27067 # Binary search between lo and hi bounds.
27068 while test "x$ac_lo" != "x$ac_hi"; do
27069   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27070   cat >"conftest.$ac_ext" <<_ACEOF
27071 #line 27071 "configure"
27072 #include "confdefs.h"
27073 $ac_includes_default
27074 int
27075 main (void)
27076 {
27077 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27078   ;
27079   return 0;
27080 }
27081 _ACEOF
27082 rm -f "conftest.$ac_objext"
27083 if { (eval echo "$as_me:27083: \"$ac_compile\"") >&5
27084   (eval $ac_compile) 2>&5
27085   ac_status=$?
27086   echo "$as_me:27086: \$? = $ac_status" >&5
27087   (exit "$ac_status"); } &&
27088          { ac_try='test -s "conftest.$ac_objext"'
27089   { (eval echo "$as_me:27089: \"$ac_try\"") >&5
27090   (eval $ac_try) 2>&5
27091   ac_status=$?
27092   echo "$as_me:27092: \$? = $ac_status" >&5
27093   (exit "$ac_status"); }; }; then
27094   ac_hi=$ac_mid
27095 else
27096   echo "$as_me: failed program was:" >&5
27097 cat "conftest.$ac_ext" >&5
27098 ac_lo=`expr "$ac_mid" + 1`
27099 fi
27100 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27101 done
27102 ac_cv_sizeof_wchar_t=$ac_lo
27103 else
27104   if test "$cross_compiling" = yes; then
27105   { { echo "$as_me:27105: error: cannot run test program while cross compiling" >&5
27106 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27107    { (exit 1); exit 1; }; }
27108 else
27109   cat >"conftest.$ac_ext" <<_ACEOF
27110 #line 27110 "configure"
27111 #include "confdefs.h"
27112 $ac_includes_default
27113 int
27114 main (void)
27115 {
27116 FILE *f = fopen ("conftest.val", "w");
27117 if (!f)
27118   $ac_main_return (1);
27119 fprintf (f, "%d", (sizeof (wchar_t)));
27120 fclose (f);
27121   ;
27122   return 0;
27123 }
27124 _ACEOF
27125 rm -f "conftest$ac_exeext"
27126 if { (eval echo "$as_me:27126: \"$ac_link\"") >&5
27127   (eval $ac_link) 2>&5
27128   ac_status=$?
27129   echo "$as_me:27129: \$? = $ac_status" >&5
27130   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27131   { (eval echo "$as_me:27131: \"$ac_try\"") >&5
27132   (eval $ac_try) 2>&5
27133   ac_status=$?
27134   echo "$as_me:27134: \$? = $ac_status" >&5
27135   (exit "$ac_status"); }; }; then
27136   ac_cv_sizeof_wchar_t=`cat conftest.val`
27137 else
27138   echo "$as_me: program exited with status $ac_status" >&5
27139 echo "$as_me: failed program was:" >&5
27140 cat "conftest.$ac_ext" >&5
27141 fi
27142 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27143 fi
27144 fi
27145 rm -f conftest.val
27146 else
27147   ac_cv_sizeof_wchar_t=0
27148 fi
27149 fi
27150 echo "$as_me:27150: result: $ac_cv_sizeof_wchar_t" >&5
27151 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27152 cat >>confdefs.h <<EOF
27153 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27154 EOF
27155
27156         # cross-compiling to mingw can run into the problem that attempting to
27157         # link with the regex library fails, causing the test to not set this to
27158         # a number.  "recent" autoconf does not address this problem either -TD
27159         if test -z "$ac_cv_sizeof_wchar_t"
27160         then
27161                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27162
27163 echo "${as_me:-configure}:27163: testing test failed (assume 2) ..." 1>&5
27164
27165                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27166                 mv confdefs.tmp confdefs.h
27167                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27168         fi
27169 fi
27170
27171 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27172 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27173 ###
27174 ### ticlib modules may be a separate library, otherwise contained in termlib.
27175 ### termlib modules may be a separate library, otherwise contained in ncurses.
27176 ###
27177 ### The of "+" or " " between the tokens controls the way the script
27178 ### chooses to split module lists into libraries.
27179 ###
27180 ### (see CF_LIB_RULES).
27181 echo "$as_me:27181: checking for library subsets" >&5
27182 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27183 LIB_SUBSETS=
27184
27185 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27186         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27187         if test "$with_ticlib" != no ; then
27188                 LIB_SUBSETS="${LIB_SUBSETS} "
27189         else
27190                 LIB_SUBSETS="${LIB_SUBSETS}+"
27191         fi
27192 fi
27193
27194 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27195 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27196
27197 if test "$with_termlib" != no ; then
27198         LIB_SUBSETS="${LIB_SUBSETS} "
27199 else
27200         LIB_SUBSETS="${LIB_SUBSETS}+"
27201 fi
27202
27203 LIB_SUBSETS="${LIB_SUBSETS}base"
27204
27205 # Most term-driver calls are to tinfo, but some like init_pair are to the
27206 # base library (so it resides in base).
27207 if test "$with_term_driver" != no ; then
27208         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27209         case "$cf_cv_system_name" in
27210         (*mingw32*|*mingw64*)
27211                 if test "x$with_exp_win32" = xyes ; then
27212                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27213                 else
27214                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27215                 fi
27216                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27217                 ;;
27218         (*)
27219                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27220                 ;;
27221         esac
27222 elif test "x$with_exp_win32" = xyes ; then
27223         case "$cf_cv_system_name" in
27224         (*mingw32*|*mingw64*)
27225                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27226                 ;;
27227         (*)
27228                 ;;
27229         esac
27230 fi
27231
27232 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27233 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27234
27235 echo "$as_me:27235: result: $LIB_SUBSETS" >&5
27236 echo "${ECHO_T}$LIB_SUBSETS" >&6
27237
27238 ### Construct the list of include-directories to be generated
27239
27240 if test "$srcdir" != "."; then
27241         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27242 fi
27243 CPPFLAGS="-I../include $CPPFLAGS"
27244 if test "$srcdir" != "."; then
27245         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27246 fi
27247 CPPFLAGS="-I. $CPPFLAGS"
27248
27249 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27250 if test "$srcdir" != "."; then
27251         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27252 fi
27253 if test "$GCC" != yes; then
27254         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27255 elif test "$includedir" != "/usr/include"; then
27256         if test "$includedir" = '${prefix}/include' ; then
27257                 if test x$prefix != x/usr ; then
27258                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27259                 fi
27260         else
27261                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27262         fi
27263 fi
27264
27265 ### Build up pieces for makefile rules
27266 echo "$as_me:27266: checking default library suffix" >&5
27267 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27268
27269         case $DFT_LWR_MODEL in
27270         (libtool) DFT_ARG_SUFFIX=''   ;;
27271         (normal)  DFT_ARG_SUFFIX=''   ;;
27272         (debug)   DFT_ARG_SUFFIX='_g' ;;
27273         (profile) DFT_ARG_SUFFIX='_p' ;;
27274         (shared)  DFT_ARG_SUFFIX=''   ;;
27275         esac
27276         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27277 echo "$as_me:27277: result: $DFT_ARG_SUFFIX" >&5
27278 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27279
27280 echo "$as_me:27280: checking default library-dependency suffix" >&5
27281 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27282
27283         case X$DFT_LWR_MODEL in
27284         (Xlibtool)
27285                 DFT_LIB_SUFFIX='.la'
27286                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27287                 ;;
27288         (Xdebug)
27289                 case "$cf_cv_system_name" in
27290                 (*-msvc*)
27291                         DFT_LIB_SUFFIX='_g.lib'
27292                         ;;
27293                 (*)
27294                         DFT_LIB_SUFFIX='_g.a'
27295                         ;;
27296                 esac
27297                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27298                 ;;
27299         (Xprofile)
27300                 case "$cf_cv_system_name" in
27301                 (*-msvc*)
27302                         DFT_LIB_SUFFIX='_p.lib'
27303                         ;;
27304                 (*)
27305                         DFT_LIB_SUFFIX='_p.a'
27306                         ;;
27307                 esac
27308                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27309                 ;;
27310         (Xshared)
27311                 case "$cf_cv_system_name" in
27312                 (aix[5-7]*)
27313                         DFT_LIB_SUFFIX='.so'
27314                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27315                         ;;
27316                 (*-msvc*)
27317                         DFT_LIB_SUFFIX='.dll'
27318                         DFT_DEP_SUFFIX='.dll.lib'
27319                         ;;
27320                 (cygwin*|msys*|mingw*)
27321                         DFT_LIB_SUFFIX='.dll'
27322                         DFT_DEP_SUFFIX='.dll.a'
27323                         ;;
27324                 (darwin*)
27325                         DFT_LIB_SUFFIX='.dylib'
27326                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27327                         ;;
27328                 (hpux*)
27329                         case "$target" in
27330                         (ia64*)
27331                                 DFT_LIB_SUFFIX='.so'
27332                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27333                                 ;;
27334                         (*)
27335                                 DFT_LIB_SUFFIX='.sl'
27336                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27337                                 ;;
27338                         esac
27339                         ;;
27340                 (*)
27341                         DFT_LIB_SUFFIX='.so'
27342                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27343                         ;;
27344                 esac
27345                 ;;
27346         (*)
27347                 case "$target" in
27348                 (*-msvc*)
27349                         DFT_LIB_SUFFIX='.lib'
27350                         ;;
27351                 (*)
27352                         DFT_LIB_SUFFIX='.a'
27353                         ;;
27354                 esac
27355                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27356                 ;;
27357         esac
27358         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27359         then
27360                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27361                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27362         fi
27363 echo "$as_me:27363: result: $DFT_DEP_SUFFIX" >&5
27364 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27365
27366 echo "$as_me:27366: checking default object directory" >&5
27367 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27368
27369         case $DFT_LWR_MODEL in
27370         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27371         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27372         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27373         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27374         (shared)
27375                 case "$cf_cv_system_name" in
27376                 (cygwin|msys)
27377                         DFT_OBJ_SUBDIR='objects' ;;
27378                 (*)
27379                         DFT_OBJ_SUBDIR='obj_s' ;;
27380                 esac
27381         esac
27382 echo "$as_me:27382: result: $DFT_OBJ_SUBDIR" >&5
27383 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27384
27385 if test "x$cf_with_cxx" = xyes ; then
27386 echo "$as_me:27386: checking c++ library-dependency suffix" >&5
27387 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27388 if test "$with_libtool" != "no"; then
27389         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27390         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27391 elif test "$with_shared_cxx" != "no"; then
27392         # also for g++ users...
27393         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27394 else
27395         # we normally make a static library because C/C++ library rules differ
27396
27397         case Xnormal in
27398         (Xlibtool)
27399                 CXX_LIB_SUFFIX='.la'
27400                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27401                 ;;
27402         (Xdebug)
27403                 case "$cf_cv_system_name" in
27404                 (*-msvc*)
27405                         CXX_LIB_SUFFIX='_g.lib'
27406                         ;;
27407                 (*)
27408                         CXX_LIB_SUFFIX='_g.a'
27409                         ;;
27410                 esac
27411                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27412                 ;;
27413         (Xprofile)
27414                 case "$cf_cv_system_name" in
27415                 (*-msvc*)
27416                         CXX_LIB_SUFFIX='_p.lib'
27417                         ;;
27418                 (*)
27419                         CXX_LIB_SUFFIX='_p.a'
27420                         ;;
27421                 esac
27422                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27423                 ;;
27424         (Xshared)
27425                 case "$cf_cv_system_name" in
27426                 (aix[5-7]*)
27427                         CXX_LIB_SUFFIX='.so'
27428                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27429                         ;;
27430                 (*-msvc*)
27431                         CXX_LIB_SUFFIX='.dll'
27432                         CXX_DEP_SUFFIX='.dll.lib'
27433                         ;;
27434                 (cygwin*|msys*|mingw*)
27435                         CXX_LIB_SUFFIX='.dll'
27436                         CXX_DEP_SUFFIX='.dll.a'
27437                         ;;
27438                 (darwin*)
27439                         CXX_LIB_SUFFIX='.dylib'
27440                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27441                         ;;
27442                 (hpux*)
27443                         case "$target" in
27444                         (ia64*)
27445                                 CXX_LIB_SUFFIX='.so'
27446                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27447                                 ;;
27448                         (*)
27449                                 CXX_LIB_SUFFIX='.sl'
27450                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27451                                 ;;
27452                         esac
27453                         ;;
27454                 (*)
27455                         CXX_LIB_SUFFIX='.so'
27456                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27457                         ;;
27458                 esac
27459                 ;;
27460         (*)
27461                 case "$target" in
27462                 (*-msvc*)
27463                         CXX_LIB_SUFFIX='.lib'
27464                         ;;
27465                 (*)
27466                         CXX_LIB_SUFFIX='.a'
27467                         ;;
27468                 esac
27469                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27470                 ;;
27471         esac
27472         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27473         then
27474                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27475                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27476         fi
27477
27478 fi
27479 echo "$as_me:27479: result: $CXX_LIB_SUFFIX" >&5
27480 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27481
27482 fi
27483
27484 # do not want -ldl in build except as needed for -lncurses dependency
27485 if test "x$with_dlsym" = xyes ; then
27486 if test "$DFT_LWR_MODEL" = shared || \
27487    test "$DFT_LWR_MODEL" = libtool ; then
27488
27489 # remove dl library from $LIBS
27490 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27491
27492 fi
27493 fi
27494 ### Set up low-level terminfo dependencies for makefiles.
27495
27496 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27497 # do not need libdl
27498 TICS_LIST=
27499 if test "x$with_dlsym" = xyes ; then
27500
27501 # remove dl library from $SHLIB_LIST
27502 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27503
27504 fi
27505
27506 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27507 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27508 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27509 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27510 then
27511         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27512 fi
27513
27514 if test "$with_ticlib" != no ; then
27515
27516         if test "x$with_ticlib" != xyes ; then
27517                 TICS_NAME=$with_ticlib
27518                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27519                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27520                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27521                 TICS_LIB_SUFFIX="${with_ticlib}"
27522         else
27523                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27524                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27525                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27526                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27527         fi
27528         TICS_LDFLAGS="-L${LIB_DIR}"
27529         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27530 else
27531         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27532         TICS_LDFLAGS="-L${LIB_DIR}"
27533         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27534 fi
27535
27536 if test "$with_termlib" != no ; then
27537
27538         if test "x$with_termlib" != xyes ; then
27539                 TINFO_NAME=$with_termlib
27540                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27541                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27542                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27543                 TINFO_LIB_SUFFIX="${with_termlib}"
27544         else
27545                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27546                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
27547                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
27548                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
27549         fi
27550
27551         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27552         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27553         if test "$DFT_LWR_MODEL" = "libtool"; then
27554                 TEST_ARGS="${TEST_DEPS}"
27555                 TEST_ARG2="${TEST_DEP2}"
27556                 TINFO_LDFLAGS="-L${LIB_DIR}"
27557                 TINFO_LIBS="$TEST_ARGS"
27558                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
27559                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
27560         else
27561                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
27562                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
27563                 if test "x$with_term_driver" != xno ; then
27564                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27565                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
27566                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27567                 else
27568                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27569                         TINFO_LIBS="$TEST_ARGS"
27570                 fi
27571                 TINFO_LDFLAGS="-L${LIB_DIR}"
27572                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27573         fi
27574 else
27575         # the next lines are needed for linking libtic over libncurses
27576         TINFO_NAME=${LIB_NAME}
27577         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27578         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
27579         if test "x$with_tic_depends" = xyes ; then
27580                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27581         else
27582                 TICS_LIST="$SHLIB_LIST"
27583         fi
27584
27585         TINFO_LDFLAGS="-L${LIB_DIR}"
27586         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27587 fi
27588
27589 if test "$DFT_LWR_MODEL" = shared ; then
27590         case "$cf_cv_system_name" in
27591         (cygwin*|msys*)
27592                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
27593                 TINFO_SUFFIX=.dll
27594                 ;;
27595         esac
27596 fi
27597
27598 if test "x$with_dlsym" = xyes ; then
27599
27600 # remove dl library from $TICS_LIST
27601 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
27602
27603 fi
27604
27605 if test "$DFT_LWR_MODEL" = "libtool"; then
27606         OBJEXT=lo
27607 fi
27608
27609 # needed for Ada95
27610 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
27611
27612 case "$DFT_LWR_MODEL" in
27613 (normal|debug|profile)
27614
27615 if test "$GCC" = yes ; then
27616         case "$cf_cv_system_name" in
27617         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
27618                 LDFLAGS_STATIC=
27619                 LDFLAGS_SHARED=
27620                 ;;
27621         (*)     # normally, except when broken
27622                 LDFLAGS_STATIC=-static
27623                 LDFLAGS_SHARED=-dynamic
27624                 ;;
27625         esac
27626 else
27627         case "$cf_cv_system_name" in
27628         (aix[4-7]*)     # from ld manpage
27629                 LDFLAGS_STATIC=-bstatic
27630                 LDFLAGS_SHARED=-bdynamic
27631                 ;;
27632         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
27633                 # We could also use just "archive" and "shared".
27634                 LDFLAGS_STATIC=-Wl,-a,archive_shared
27635                 LDFLAGS_SHARED=-Wl,-a,shared_archive
27636                 ;;
27637         (irix*)         # from ld manpage IRIX64
27638                 LDFLAGS_STATIC=-Bstatic
27639                 LDFLAGS_SHARED=-Bdynamic
27640                 ;;
27641         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
27642                 # alternative "-oldstyle_liblookup" (not in cc manpage)
27643                 LDFLAGS_STATIC=-noso
27644                 LDFLAGS_SHARED=-so_archive
27645                 ;;
27646         (solaris2*)
27647                 LDFLAGS_STATIC=-Bstatic
27648                 LDFLAGS_SHARED=-Bdynamic
27649                 ;;
27650         esac
27651 fi
27652
27653 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
27654 then
27655         echo "$as_me:27655: checking if linker supports switching between static/dynamic" >&5
27656 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
27657
27658         rm -f libconftest.a
27659         cat >conftest.$ac_ext <<EOF
27660 #line 27660 "configure"
27661 #include <stdio.h>
27662 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
27663 EOF
27664         if { (eval echo "$as_me:27664: \"$ac_compile\"") >&5
27665   (eval $ac_compile) 2>&5
27666   ac_status=$?
27667   echo "$as_me:27667: \$? = $ac_status" >&5
27668   (exit "$ac_status"); } ; then
27669                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
27670                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
27671         fi
27672         rm -f conftest.*
27673
27674         cf_save_LIBS="$LIBS"
27675
27676         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
27677         cat >"conftest.$ac_ext" <<_ACEOF
27678 #line 27678 "configure"
27679 #include "confdefs.h"
27680
27681 #line 27681 "configure"
27682 #include <stdio.h>
27683 int cf_ldflags_static(FILE *fp);
27684
27685 int
27686 main (void)
27687 {
27688
27689         return cf_ldflags_static(stdin);
27690
27691   ;
27692   return 0;
27693 }
27694 _ACEOF
27695 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27696 if { (eval echo "$as_me:27696: \"$ac_link\"") >&5
27697   (eval $ac_link) 2>&5
27698   ac_status=$?
27699   echo "$as_me:27699: \$? = $ac_status" >&5
27700   (exit "$ac_status"); } &&
27701          { ac_try='test -s "conftest$ac_exeext"'
27702   { (eval echo "$as_me:27702: \"$ac_try\"") >&5
27703   (eval $ac_try) 2>&5
27704   ac_status=$?
27705   echo "$as_me:27705: \$? = $ac_status" >&5
27706   (exit "$ac_status"); }; }; then
27707
27708         # some linkers simply ignore the -dynamic
27709         case x`file "conftest$ac_exeext" 2>/dev/null` in
27710         (*static*)
27711                 cf_ldflags_static=no
27712                 ;;
27713         (*)
27714                 cf_ldflags_static=yes
27715                 ;;
27716         esac
27717
27718 else
27719   echo "$as_me: failed program was:" >&5
27720 cat "conftest.$ac_ext" >&5
27721 cf_ldflags_static=no
27722 fi
27723 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27724
27725         rm -f libconftest.*
27726         LIBS="$cf_save_LIBS"
27727
27728         echo "$as_me:27728: result: $cf_ldflags_static" >&5
27729 echo "${ECHO_T}$cf_ldflags_static" >&6
27730
27731         if test "$cf_ldflags_static" != yes
27732         then
27733                 LDFLAGS_STATIC=
27734                 LDFLAGS_SHARED=
27735         fi
27736 else
27737         LDFLAGS_STATIC=
27738         LDFLAGS_SHARED=
27739 fi
27740
27741         ;;
27742 esac
27743
27744 echo "$as_me:27744: checking where we will install curses.h" >&5
27745 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
27746
27747 includesubdir=
27748 if test "$with_overwrite" = no && \
27749  { test "x$includedir" = 'x${prefix}/include' || \
27750    test "x$includedir" = "x${prefix}/include"; }
27751 then
27752         includesubdir="/ncurses${USE_LIB_SUFFIX}"
27753 fi
27754 echo "$as_me:27754: result: ${includedir}${includesubdir}" >&5
27755 echo "${ECHO_T}${includedir}${includesubdir}" >&6
27756
27757 ### Resolve a conflict between normal and wide-curses by forcing applications
27758 ### that will need libutf8 to add it to their configure script.
27759 if test "$with_overwrite" != no ; then
27760 if test "$NCURSES_LIBUTF8" = 1 ; then
27761         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
27762         { echo "$as_me:27762: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
27763 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
27764 fi
27765 fi
27766 WITH_OVERWRITE=$with_overwrite
27767
27768 ### At least on MinGW a shared library build without libtool
27769 ### requires adding the additional libs to the link list.
27770 case "$cf_cv_system_name" in
27771 (*mingw32*|*mingw64*)
27772         if test "$DFT_LWR_MODEL" != "libtool"; then
27773            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
27774         fi
27775         ;;
27776 *)      ;;
27777 esac
27778
27779 # used to separate tack out of the tree
27780 NCURSES_TREE=
27781
27782 ### predefined stuff for the test programs
27783
27784 cat >>confdefs.h <<\EOF
27785 #define HAVE_SLK_COLOR 1
27786 EOF
27787
27788 # pkgsrc uses these
27789
27790 echo "$as_me:27790: checking for desired basename for form library" >&5
27791 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
27792
27793 # Check whether --with-form-libname or --without-form-libname was given.
27794 if test "${with_form_libname+set}" = set; then
27795   withval="$with_form_libname"
27796   with_lib_basename=$withval
27797 else
27798   with_lib_basename=form
27799 fi;
27800 FORM_NAME="$with_lib_basename"
27801
27802 case "x$FORM_NAME" in
27803 (x|xno|xnone|xyes)
27804         FORM_NAME=form
27805         ;;
27806 (*)
27807         ;;
27808 esac
27809
27810 echo "$as_me:27810: result: $FORM_NAME" >&5
27811 echo "${ECHO_T}$FORM_NAME" >&6
27812
27813 echo "$as_me:27813: checking for desired basename for menu library" >&5
27814 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
27815
27816 # Check whether --with-menu-libname or --without-menu-libname was given.
27817 if test "${with_menu_libname+set}" = set; then
27818   withval="$with_menu_libname"
27819   with_lib_basename=$withval
27820 else
27821   with_lib_basename=menu
27822 fi;
27823 MENU_NAME="$with_lib_basename"
27824
27825 case "x$MENU_NAME" in
27826 (x|xno|xnone|xyes)
27827         MENU_NAME=menu
27828         ;;
27829 (*)
27830         ;;
27831 esac
27832
27833 echo "$as_me:27833: result: $MENU_NAME" >&5
27834 echo "${ECHO_T}$MENU_NAME" >&6
27835
27836 echo "$as_me:27836: checking for desired basename for panel library" >&5
27837 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
27838
27839 # Check whether --with-panel-libname or --without-panel-libname was given.
27840 if test "${with_panel_libname+set}" = set; then
27841   withval="$with_panel_libname"
27842   with_lib_basename=$withval
27843 else
27844   with_lib_basename=panel
27845 fi;
27846 PANEL_NAME="$with_lib_basename"
27847
27848 case "x$PANEL_NAME" in
27849 (x|xno|xnone|xyes)
27850         PANEL_NAME=panel
27851         ;;
27852 (*)
27853         ;;
27854 esac
27855
27856 echo "$as_me:27856: result: $PANEL_NAME" >&5
27857 echo "${ECHO_T}$PANEL_NAME" >&6
27858
27859 echo "$as_me:27859: checking for desired basename for cxx library" >&5
27860 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
27861
27862 # Check whether --with-cxx-libname or --without-cxx-libname was given.
27863 if test "${with_cxx_libname+set}" = set; then
27864   withval="$with_cxx_libname"
27865   with_lib_basename=$withval
27866 else
27867   with_lib_basename=ncurses++
27868 fi;
27869 CXX_NAME="$with_lib_basename"
27870
27871 case "x$CXX_NAME" in
27872 (x|xno|xnone|xyes)
27873         CXX_NAME=ncurses++
27874         ;;
27875 (*)
27876         ;;
27877 esac
27878
27879 echo "$as_me:27879: result: $CXX_NAME" >&5
27880 echo "${ECHO_T}$CXX_NAME" >&6
27881
27882 ### Construct the list of subdirectories for which we'll customize makefiles
27883 ### with the appropriate compile-rules.
27884
27885 echo "$as_me:27885: checking for src modules" >&5
27886 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
27887
27888 # dependencies and linker-arguments for test-programs
27889 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
27890 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
27891 if test "$DFT_LWR_MODEL" = "libtool"; then
27892         TEST_ARGS="${TEST_DEPS}"
27893         TEST_ARG2="${TEST_DEP2}"
27894 else
27895         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27896         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
27897 fi
27898
27899 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
27900 cf_cv_src_modules=
27901 for cf_dir in $modules_to_build
27902 do
27903         if test -f "$srcdir/$cf_dir/modules" ; then
27904
27905                 # We may/may not have tack in the distribution, though the
27906                 # makefile is.
27907                 if test "$cf_dir" = tack ; then
27908                         if test "x$cf_with_tack" != "xyes"; then
27909                                 continue
27910                         fi
27911                 fi
27912
27913                 if test -z "$cf_cv_src_modules"; then
27914                         cf_cv_src_modules=$cf_dir
27915                 else
27916                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
27917                 fi
27918
27919                 # Make the ncurses_cfg.h file record the library interface files as
27920                 # well.  These are header files that are the same name as their
27921                 # directory.  Ncurses is the only library that does not follow
27922                 # that pattern.
27923                 if test "$cf_dir" = tack ; then
27924                         continue
27925                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
27926
27927 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27928
27929                         cat >>confdefs.h <<EOF
27930 #define HAVE_${cf_have_include}_H 1
27931 EOF
27932
27933                         cat >>confdefs.h <<EOF
27934 #define HAVE_LIB${cf_have_include} 1
27935 EOF
27936
27937 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27938
27939 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
27940
27941                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
27942                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
27943                         if test "$DFT_LWR_MODEL" = "libtool"; then
27944                                 TEST_ARGS="${TEST_DEPS}"
27945                                 TEST_ARG2="${TEST_DEP2}"
27946                         else
27947                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
27948                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
27949                         fi
27950                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
27951                 fi
27952         fi
27953 done
27954 echo "$as_me:27954: result: $cf_cv_src_modules" >&5
27955 echo "${ECHO_T}$cf_cv_src_modules" >&6
27956
27957 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
27958 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
27959
27960 SRC_SUBDIRS=
27961 if test "x$cf_with_manpages" != xno ; then
27962         SRC_SUBDIRS="$SRC_SUBDIRS man"
27963 fi
27964 SRC_SUBDIRS="$SRC_SUBDIRS include"
27965 for cf_dir in $cf_cv_src_modules
27966 do
27967         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
27968 done
27969 if test "x$cf_with_tests" != "xno" ; then
27970         SRC_SUBDIRS="$SRC_SUBDIRS test"
27971 fi
27972 # always make this, to install the ncurses-config script
27973 SRC_SUBDIRS="$SRC_SUBDIRS misc"
27974 if test "$cf_with_cxx_binding" != no; then
27975         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
27976         SRC_SUBDIRS="$SRC_SUBDIRS c++"
27977 fi
27978
27979 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
27980 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
27981
27982 ADA_SUBDIRS=
27983 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
27984         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
27985         ADA_SUBDIRS="gen src"
27986         if test "x$cf_with_tests" != "xno" ; then
27987                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
27988         fi
27989 fi
27990
27991 SUB_MAKEFILES=
27992 for cf_dir in $SRC_SUBDIRS
27993 do
27994         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
27995 done
27996
27997 if test -n "$ADA_SUBDIRS"; then
27998         for cf_dir in $ADA_SUBDIRS
27999         do
28000                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28001         done
28002
28003 fi
28004
28005 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28006    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28007    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28008    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28009 fi
28010
28011 DIRS_TO_MAKE="lib"
28012 for cf_item in $cf_list_models
28013 do
28014
28015         case $cf_item in
28016         (libtool) cf_subdir='obj_lo'  ;;
28017         (normal)  cf_subdir='objects' ;;
28018         (debug)   cf_subdir='obj_g' ;;
28019         (profile) cf_subdir='obj_p' ;;
28020         (shared)
28021                 case "$cf_cv_system_name" in
28022                 (cygwin|msys)
28023                         cf_subdir='objects' ;;
28024                 (*)
28025                         cf_subdir='obj_s' ;;
28026                 esac
28027         esac
28028
28029         for cf_item2 in $DIRS_TO_MAKE
28030         do
28031                 test "$cf_item2" = "$cf_subdir" && break
28032         done
28033         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28034 done
28035 for cf_dir in $DIRS_TO_MAKE
28036 do
28037         test ! -d "$cf_dir" && mkdir "$cf_dir"
28038 done
28039
28040 # symbols that differ when compiling Ada95 by itself.
28041 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28042
28043 # values to use as strings
28044
28045 cat >>confdefs.h <<EOF
28046 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28047 EOF
28048
28049 cat >>confdefs.h <<EOF
28050 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28051 EOF
28052
28053 ### Define substitutions for header files to avoid name-pollution
28054
28055 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28056         HAVE_TCGETATTR=1
28057 else
28058         HAVE_TCGETATTR=0
28059 fi
28060
28061 if test "x$ac_cv_header_stdint_h" = xyes ; then
28062         HAVE_STDINT_H=1
28063 else
28064         HAVE_STDINT_H=0
28065 fi
28066
28067 if test "x$ac_cv_header_termio_h" = xyes ; then
28068         HAVE_TERMIO_H=1
28069 else
28070         HAVE_TERMIO_H=0
28071 fi
28072
28073 if test "x$ac_cv_header_termios_h" = xyes ; then
28074         HAVE_TERMIOS_H=1
28075 else
28076         HAVE_TERMIOS_H=0
28077 fi
28078
28079 ################################################################################
28080 test "x$use_database" = xyes && \
28081 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28082
28083 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28084 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28085
28086 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28087 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28088 fi
28089
28090 if test "x$cf_with_tests" != xno ; then
28091         MAKE_TESTS=
28092 else
28093         MAKE_TESTS="#"
28094 fi
28095
28096 ADAHTML_DIR=../../doc/html/ada
28097
28098 # workaround for OS/2 (20151017)
28099 case "$cf_cv_system_name" in
28100 (os2*)
28101         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28102         ;;
28103 (*)
28104         LIBTOOL_OPTS_CXX=
28105         ;;
28106 esac
28107
28108 # workaround for g++ versus Solaris (20131116)
28109 case "$cf_cv_system_name" in
28110 (solaris2*)
28111         case "x$CPPFLAGS" in
28112         (*-D_XOPEN_SOURCE_EXTENDED*)
28113                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28114
28115 echo "${as_me:-configure}:28115: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28116
28117                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28118                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28119                 ;;
28120         esac
28121         ;;
28122 esac
28123
28124 # Help to automatically enable the extended curses features when using either
28125 # the *-config or the ".pc" files by adding defines.
28126 echo "$as_me:28126: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28127 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28128 PKG_CFLAGS=
28129 for cf_loop1 in $CPPFLAGS_after_XOPEN
28130 do
28131         cf_found=no
28132         for cf_loop2 in $CPPFLAGS_before_XOPEN
28133         do
28134                 if test "x$cf_loop1" = "x$cf_loop2"
28135                 then
28136                         cf_found=yes
28137                         break
28138                 fi
28139         done
28140         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28141 done
28142 echo "$as_me:28142: result: $PKG_CFLAGS" >&5
28143 echo "${ECHO_T}$PKG_CFLAGS" >&6
28144
28145 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28146 case "x$NCURSES_OSPEED" in
28147 (*short*)
28148         cf_compatible=1
28149         ;;
28150 (*)
28151         cf_compatible=0
28152         ;;
28153 esac
28154
28155 cat >>confdefs.h <<EOF
28156 #define NCURSES_OSPEED_COMPAT $cf_compatible
28157 EOF
28158
28159 case "x$cf_cv_typeof_chtype" in
28160 (xshort|xint|xlong)
28161         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28162         ;;
28163 esac
28164
28165 case "x$cf_cv_typeof_mmask_t" in
28166 (xshort|xint|xlong)
28167         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28168         ;;
28169 esac
28170
28171 # substitute into misc/Makefile to suppress
28172 # (un)install.data from the
28173 # (un)install rules.
28174 if test "x$cf_with_db_install" = "xno"; then
28175         MISC_INSTALL_DATA=
28176         MISC_UNINSTALL_DATA=
28177 else
28178         MISC_INSTALL_DATA=install.data
28179         MISC_UNINSTALL_DATA=uninstall.data
28180 fi
28181
28182 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28183         MAKE_DATABASE="#"
28184 else
28185         MAKE_DATABASE="$MAKE_TERMINFO"
28186 fi
28187
28188 if test -n "$PACKAGE"
28189 then
28190         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28191         export PACKAGE
28192         echo "package: $PACKAGE"
28193 fi
28194
28195 UNALTERED_SYMS=
28196 cf_filter_syms=no
28197
28198 if test -n "$RESULTING_SYMS"
28199 then
28200         cf_filter_syms=$cf_dft_filter_syms
28201         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28202
28203 echo "${as_me:-configure}:28203: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28204
28205 fi
28206
28207 if test "x$WILDCARD_SYMS" = xno
28208 then
28209         cf_filter_syms=yes
28210 fi
28211
28212 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28213
28214 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28215 if test "$cf_filter_syms" = yes
28216 then
28217         RESULTING_SYMS=resulting.map
28218 fi
28219
28220 if test "x$cross_compiling" = xyes ; then
28221         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28222         CHECK_BUILD="#"
28223 else
28224         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28225         CHECK_BUILD=
28226 fi
28227
28228 # This is used for the *-config script and *.pc data files.
28229
28230 echo "$as_me:28230: checking for linker search path" >&5
28231 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28232 if test "${cf_cv_ld_searchpath+set}" = set; then
28233   echo $ECHO_N "(cached) $ECHO_C" >&6
28234 else
28235
28236 if test "$cross_compiling" != yes ; then
28237
28238 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28239 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28240
28241 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28242 # update the cache, which makes it run faster.
28243 test -z "$cf_pathlist" && \
28244         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28245
28246 test -z "$cf_pathlist" &&
28247         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28248
28249 # This works with OpenBSD 6.5, which lists only filenames
28250 test -z "$cf_pathlist" &&
28251         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28252
28253 if test -z "$cf_pathlist"
28254 then
28255         # dyld default path with MacOS
28256         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28257         then
28258                 # do this to bypass check
28259                 cf_cv_ld_searchpath='$HOME/lib'
28260                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28261         fi
28262 fi
28263
28264 if test -z "$cf_pathlist"
28265 then
28266         # Solaris is "SunOS"
28267         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28268         then
28269                 case x`(isainfo -b)` in
28270                 (x64)
28271                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28272                         ;;
28273                 (x32)
28274                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28275                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28276                         ;;
28277                 (*)
28278                         { echo "$as_me:28278: WARNING: problem with Solaris architecture" >&5
28279 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28280                         ;;
28281                 esac
28282         fi
28283 fi
28284
28285 if test -z "$cf_pathlist"
28286 then
28287         # HP-UX
28288         if test x"`uname -s`" = xHP-UX
28289         then
28290                 case x`getconf LONG_BIT` in
28291                 (x64)
28292                         cf_pathlist="/usr/lib/hpux64"
28293                         ;;
28294                 (x*)
28295                         cf_pathlist="/usr/lib/hpux32"
28296                         ;;
28297                 esac
28298         fi
28299 fi
28300
28301 fi
28302
28303 # If nothing else, assume it is conventional
28304 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28305
28306 # Finally, check that this is only directories
28307 for cf_path in $0 $cf_pathlist
28308 do
28309         if test -d "$cf_path"; then
28310                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28311                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28312         fi
28313 done
28314
28315 # Ensure that it is nonempty
28316 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28317
28318 fi
28319 echo "$as_me:28319: result: $cf_cv_ld_searchpath" >&5
28320 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28321
28322 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28323
28324 cat >>confdefs.h <<\EOF
28325 #define HAVE_CURSES_DATA_BOOLNAMES 1
28326 EOF
28327
28328 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
28329 ac_config_commands="$ac_config_commands default"
28330 cat >confcache <<\_ACEOF
28331 # This file is a shell script that caches the results of configure
28332 # tests run on this system so they can be shared between configure
28333 # scripts and configure runs, see configure's option --config-cache.
28334 # It is not useful on other systems.  If it contains results you don't
28335 # want to keep, you may remove or edit it.
28336 #
28337 # config.status only pays attention to the cache file if you give it
28338 # the --recheck option to rerun configure.
28339 #
28340 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28341 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28342 # following values.
28343
28344 _ACEOF
28345
28346 # The following way of writing the cache mishandles newlines in values,
28347 # but we know of no workaround that is simple, portable, and efficient.
28348 # So, don't put newlines in cache variables' values.
28349 # Ultrix sh set writes to stderr and can't be redirected directly,
28350 # and sets the high bit in the cache file unless we assign to the vars.
28351 {
28352   (set) 2>&1 |
28353     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28354     *ac_space=\ *)
28355       # `set' does not quote correctly, so add quotes (double-quote
28356       # substitution turns \\\\ into \\, and sed turns \\ into \).
28357       sed -n \
28358         "s/'/'\\\\''/g;
28359           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28360       ;;
28361     *)
28362       # `set' quotes correctly as required by POSIX, so do not add quotes.
28363       sed -n \
28364         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28365       ;;
28366     esac;
28367 } |
28368   sed '
28369      t clear
28370      : clear
28371      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28372      t end
28373      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28374      : end' >>confcache
28375 if cmp -s $cache_file confcache; then :; else
28376   if test -w $cache_file; then
28377     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28378     cat confcache >$cache_file
28379   else
28380     echo "not updating unwritable cache $cache_file"
28381   fi
28382 fi
28383 rm -f confcache
28384
28385 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28386 # Let make expand exec_prefix.
28387 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28388
28389 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28390 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28391 # trailing colons and then remove the whole line if VPATH becomes empty
28392 # (actually we leave an empty line to preserve line numbers).
28393 if test "x$srcdir" = x.; then
28394   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28395 s/:*\$(srcdir):*/:/;
28396 s/:*\${srcdir}:*/:/;
28397 s/:*@srcdir@:*/:/;
28398 s/^\([^=]*=[    ]*\):*/\1/;
28399 s/:*$//;
28400 s/^[^=]*=[      ]*$//;
28401 }'
28402 fi
28403
28404 DEFS=-DHAVE_CONFIG_H
28405
28406 : "${CONFIG_STATUS=./config.status}"
28407 ac_clean_files_save=$ac_clean_files
28408 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28409 { echo "$as_me:28409: creating $CONFIG_STATUS" >&5
28410 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28411 cat >"$CONFIG_STATUS" <<_ACEOF
28412 #! $SHELL
28413 # Generated automatically by configure.
28414 # Run this file to recreate the current configuration.
28415 # Compiler output produced by configure, useful for debugging
28416 # configure, is in config.log if it exists.
28417
28418 debug=false
28419 SHELL=\${CONFIG_SHELL-$SHELL}
28420 ac_cs_invocation="\$0 \$@"
28421
28422 CLICOLOR_FORCE= GREP_OPTIONS=
28423 unset CLICOLOR_FORCE GREP_OPTIONS
28424 _ACEOF
28425
28426 cat >>"$CONFIG_STATUS" <<\_ACEOF
28427 # Be Bourne compatible
28428 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28429   emulate sh
28430   NULLCMD=:
28431 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28432   set -o posix
28433 fi
28434
28435 # Name of the executable.
28436 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28437
28438 if expr a : '\(a\)' >/dev/null 2>&1; then
28439   as_expr=expr
28440 else
28441   as_expr=false
28442 fi
28443
28444 rm -f conf$$ conf$$.exe conf$$.file
28445 echo >conf$$.file
28446 if ln -s conf$$.file conf$$ 2>/dev/null; then
28447   # We could just check for DJGPP; but this test a) works b) is more generic
28448   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28449   if test -f conf$$.exe; then
28450     # Don't use ln at all; we don't have any links
28451     as_ln_s='cp -p'
28452   else
28453     as_ln_s='ln -s'
28454   fi
28455 elif ln conf$$.file conf$$ 2>/dev/null; then
28456   as_ln_s=ln
28457 else
28458   as_ln_s='cp -p'
28459 fi
28460 rm -f conf$$ conf$$.exe conf$$.file
28461
28462 as_executable_p="test -f"
28463
28464 # Support unset when possible.
28465 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28466   as_unset="unset"
28467 else
28468   as_unset="false"
28469 fi
28470
28471 # NLS nuisances.
28472 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28473 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28474 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28475 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28476 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28477 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28478 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28479 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28480
28481 # IFS
28482 # We need space, tab and new line, in precisely that order.
28483 as_nl='
28484 '
28485 IFS="   $as_nl"
28486
28487 # CDPATH.
28488 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28489
28490 exec 6>&1
28491
28492 _ACEOF
28493
28494 # Files that config.status was made for.
28495 if test -n "$ac_config_files"; then
28496   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
28497 fi
28498
28499 if test -n "$ac_config_headers"; then
28500   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
28501 fi
28502
28503 if test -n "$ac_config_links"; then
28504   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
28505 fi
28506
28507 if test -n "$ac_config_commands"; then
28508   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
28509 fi
28510
28511 cat >>"$CONFIG_STATUS" <<\EOF
28512
28513 ac_cs_usage="\
28514 \`$as_me' instantiates files from templates according to the
28515 current configuration.
28516
28517 Usage: $0 [OPTIONS] [FILE]...
28518
28519   -h, --help       print this help, then exit
28520   -V, --version    print version number, then exit
28521   -d, --debug      don't remove temporary files
28522       --recheck    update $as_me by reconfiguring in the same conditions
28523   --file=FILE[:TEMPLATE]
28524                    instantiate the configuration file FILE
28525   --header=FILE[:TEMPLATE]
28526                    instantiate the configuration header FILE
28527
28528 Configuration files:
28529 $config_files
28530
28531 Configuration headers:
28532 $config_headers
28533
28534 Configuration commands:
28535 $config_commands
28536
28537 Report bugs to <dickey@invisible-island.net>."
28538 EOF
28539
28540 cat >>"$CONFIG_STATUS" <<EOF
28541 ac_cs_version="\\
28542 config.status
28543 configured by $0, generated by GNU Autoconf 2.52.20210105,
28544   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28545
28546 Copyright 2003-2020,2021        Thomas E. Dickey
28547 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
28548 Free Software Foundation, Inc.
28549 This config.status script is free software; the Free Software Foundation
28550 gives unlimited permission to copy, distribute and modify it."
28551 srcdir="$srcdir"
28552 INSTALL="$INSTALL"
28553 EOF
28554
28555 cat >>"$CONFIG_STATUS" <<\EOF
28556 # If no file are specified by the user, then we need to provide default
28557 # value.  By we need to know if files were specified by the user.
28558 ac_need_defaults=:
28559 while test $# != 0
28560 do
28561   case $1 in
28562   --*=*)
28563     ac_option=`expr "x$1" : 'x\([^=]*\)='`
28564     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
28565     shift
28566     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
28567     shift
28568     ;;
28569   -*);;
28570   *) # This is not an option, so the user has probably given explicit
28571      # arguments.
28572      ac_need_defaults=false;;
28573   esac
28574
28575   case $1 in
28576   # Handling of the options.
28577 EOF
28578 cat >>"$CONFIG_STATUS" <<EOF
28579   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28580     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
28581     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
28582 EOF
28583 cat >>"$CONFIG_STATUS" <<\EOF
28584   --version | --vers* | -V )
28585     echo "$ac_cs_version"; exit 0 ;;
28586   --he | --h)
28587     # Conflict between --help and --header
28588     { { echo "$as_me:28588: error: ambiguous option: $1
28589 Try \`$0 --help' for more information." >&5
28590 echo "$as_me: error: ambiguous option: $1
28591 Try \`$0 --help' for more information." >&2;}
28592    { (exit 1); exit 1; }; };;
28593   --help | --hel | -h )
28594     echo "$ac_cs_usage"; exit 0 ;;
28595   --debug | --d* | -d )
28596     debug=: ;;
28597   --file | --fil | --fi | --f )
28598     shift
28599     CONFIG_FILES="$CONFIG_FILES $1"
28600     ac_need_defaults=false;;
28601   --header | --heade | --head | --hea )
28602     shift
28603     CONFIG_HEADERS="$CONFIG_HEADERS $1"
28604     ac_need_defaults=false;;
28605
28606   # This is an error.
28607   -*) { { echo "$as_me:28607: error: unrecognized option: $1
28608 Try \`$0 --help' for more information." >&5
28609 echo "$as_me: error: unrecognized option: $1
28610 Try \`$0 --help' for more information." >&2;}
28611    { (exit 1); exit 1; }; } ;;
28612
28613   *) ac_config_targets="$ac_config_targets $1" ;;
28614
28615   esac
28616   shift
28617 done
28618
28619 exec 5>>config.log
28620 cat >&5 << _ACEOF
28621
28622 ## ----------------------- ##
28623 ## Running config.status.  ##
28624 ## ----------------------- ##
28625
28626 This file was extended by $as_me 2.52.20210105, executed with
28627   CONFIG_FILES    = $CONFIG_FILES
28628   CONFIG_HEADERS  = $CONFIG_HEADERS
28629   CONFIG_LINKS    = $CONFIG_LINKS
28630   CONFIG_COMMANDS = $CONFIG_COMMANDS
28631   > "$ac_cs_invocation"
28632 on `(hostname || uname -n) 2>/dev/null | sed 1q`
28633
28634 _ACEOF
28635 EOF
28636
28637 cat >>"$CONFIG_STATUS" <<EOF
28638 #
28639 # INIT-COMMANDS section.
28640 #
28641
28642 ### Special initialization commands, used to pass information from the
28643 ### configuration-run into config.status
28644
28645 ALTERNATE_SYMS="$ALTERNATE_SYMS"
28646 AWK="$AWK"
28647 CXX_NAME="$CXX_NAME"
28648 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
28649 DFT_LWR_MODEL="$DFT_LWR_MODEL"
28650 ECHO_LD="$ECHO_LD"
28651 EXTRA_SUFFIX="$EXTRA_SUFFIX"
28652 FORM_NAME="$FORM_NAME"
28653 LDCONFIG="$LDCONFIG"
28654 LIBTOOL_VERSION="$LIBTOOL_VERSION"
28655 LIB_NAME="$LIB_NAME"
28656 LIB_PREFIX="$LIB_PREFIX"
28657 LIB_SUBSETS="$LIB_SUBSETS"
28658 LIB_SUFFIX="$LIB_SUFFIX"
28659 LIB_TRACING="$LIB_TRACING"
28660 LN_S="$LN_S"
28661 MAKE_TERMINFO="$MAKE_TERMINFO"
28662 MENU_NAME="$MENU_NAME"
28663 NCURSES_MAJOR="$NCURSES_MAJOR"
28664 NCURSES_MINOR="$NCURSES_MINOR"
28665 NCURSES_OSPEED="$NCURSES_OSPEED"
28666 NCURSES_PATCH="$NCURSES_PATCH"
28667 PANEL_NAME="$PANEL_NAME"
28668 SRC_SUBDIRS="$SRC_SUBDIRS"
28669 TERMINFO="$TERMINFO"
28670 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
28671 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
28672 TICS_NAME="$TICS_NAME"
28673 TICS_SUFFIX="$TICS_SUFFIX"
28674 TIC_PATH="$TIC_PATH"
28675 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
28676 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
28677 TINFO_NAME="$TINFO_NAME"
28678 TINFO_SUFFIX="$TINFO_SUFFIX"
28679 UNALTERED_SYMS="$UNALTERED_SYMS"
28680 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
28681 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
28682 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
28683 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
28684 WILDCARD_SYMS="$WILDCARD_SYMS"
28685 WITH_CURSES_H="$with_curses_h"
28686 WITH_ECHO="${enable_echo:=yes}"
28687 WITH_OVERWRITE="$with_overwrite"
28688 cf_LIST_MODELS="$cf_list_models"
28689 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
28690 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
28691 cf_cv_abi_version="$cf_cv_abi_version"
28692 cf_cv_do_relink="$cf_cv_do_relink"
28693 cf_cv_do_reranlib="$cf_cv_do_reranlib"
28694 cf_cv_do_symlinks="$cf_cv_do_symlinks"
28695 cf_cv_enable_lp64="$cf_cv_enable_lp64"
28696 cf_cv_enable_opaque="$cf_cv_enable_opaque"
28697 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
28698 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
28699 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
28700 cf_cv_rel_version="$cf_cv_rel_version"
28701 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
28702 cf_cv_shared_soname='$cf_cv_shared_soname'
28703 cf_cv_shlib_version="$cf_cv_shlib_version"
28704 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
28705 cf_cv_system_name="$cf_cv_system_name"
28706 cf_cv_term_driver="$with_term_driver"
28707 cf_with_ada="$cf_with_ada"
28708 cf_with_cxx_binding="$cf_with_cxx_binding"
28709 cf_with_db_install="$cf_with_db_install"
28710 cf_with_manpages="$cf_with_manpages"
28711 cf_with_tests="$cf_with_tests"
28712 host="$host"
28713 target="$target"
28714 with_shared_cxx="$with_shared_cxx"
28715
28716 EOF
28717
28718 cat >>"$CONFIG_STATUS" <<\EOF
28719 for ac_config_target in $ac_config_targets
28720 do
28721   case "$ac_config_target" in
28722   # Handling of arguments.
28723   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
28724   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
28725   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
28726   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
28727   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
28728   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
28729   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
28730   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
28731   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
28732   *) { { echo "$as_me:28732: error: invalid argument: $ac_config_target" >&5
28733 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
28734    { (exit 1); exit 1; }; };;
28735   esac
28736 done
28737
28738 # If the user did not use the arguments to specify the items to instantiate,
28739 # then the envvar interface is used.  Set only those that are not.
28740 # We use the long form for the default assignment because of an extremely
28741 # bizarre bug on SunOS 4.1.3.
28742 if "$ac_need_defaults"; then
28743   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28744   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28745   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
28746 fi
28747
28748 # Create a temporary directory, and hook for its removal unless debugging.
28749 $debug ||
28750 {
28751   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
28752   trap '{ (exit 1); exit 1; }' 1 2 13 15
28753 }
28754
28755 # Create a (secure) tmp directory for tmp files.
28756 : ${TMPDIR=/tmp}
28757 {
28758   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
28759   test -n "$tmp" && test -d "$tmp"
28760 }  ||
28761 {
28762   tmp=$TMPDIR/cs$$-$RANDOM
28763   (umask 077 && mkdir $tmp)
28764 } ||
28765 {
28766    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
28767    { (exit 1); exit 1; }
28768 }
28769
28770 EOF
28771
28772 cat >>"$CONFIG_STATUS" <<EOF
28773
28774 #
28775 # CONFIG_FILES section.
28776 #
28777
28778 # No need to generate the scripts if there are no CONFIG_FILES.
28779 # This happens for instance when ./config.status config.h
28780 if test -n "\$CONFIG_FILES"; then
28781   # Protect against being on the right side of a sed subst in config.status.
28782   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
28783    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
28784 s,@SHELL@,$SHELL,;t t
28785 s,@exec_prefix@,$exec_prefix,;t t
28786 s,@prefix@,$prefix,;t t
28787 s,@program_transform_name@,$program_transform_name,;t t
28788 s,@bindir@,$bindir,;t t
28789 s,@sbindir@,$sbindir,;t t
28790 s,@libexecdir@,$libexecdir,;t t
28791 s,@datarootdir@,$datarootdir,;t t
28792 s,@datadir@,$datadir,;t t
28793 s,@sysconfdir@,$sysconfdir,;t t
28794 s,@sharedstatedir@,$sharedstatedir,;t t
28795 s,@localstatedir@,$localstatedir,;t t
28796 s,@runstatedir@,$runstatedir,;t t
28797 s,@libdir@,$libdir,;t t
28798 s,@includedir@,$includedir,;t t
28799 s,@oldincludedir@,$oldincludedir,;t t
28800 s,@infodir@,$infodir,;t t
28801 s,@mandir@,$mandir,;t t
28802 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
28803 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
28804 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
28805 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
28806 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
28807 s,@build_alias@,$build_alias,;t t
28808 s,@host_alias@,$host_alias,;t t
28809 s,@target_alias@,$target_alias,;t t
28810 s,@ECHO_C@,$ECHO_C,;t t
28811 s,@ECHO_N@,$ECHO_N,;t t
28812 s,@ECHO_T@,$ECHO_T,;t t
28813 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
28814 s,@DEFS@,$DEFS,;t t
28815 s,@LIBS@,$LIBS,;t t
28816 s,@top_builddir@,$top_builddir,;t t
28817 s,@GREP@,$GREP,;t t
28818 s,@EGREP@,$EGREP,;t t
28819 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
28820 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
28821 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
28822 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
28823 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
28824 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
28825 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
28826 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
28827 s,@VERSION@,$VERSION,;t t
28828 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
28829 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
28830 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
28831 s,@PACKAGE@,$PACKAGE,;t t
28832 s,@build@,$build,;t t
28833 s,@build_cpu@,$build_cpu,;t t
28834 s,@build_vendor@,$build_vendor,;t t
28835 s,@build_os@,$build_os,;t t
28836 s,@host@,$host,;t t
28837 s,@host_cpu@,$host_cpu,;t t
28838 s,@host_vendor@,$host_vendor,;t t
28839 s,@host_os@,$host_os,;t t
28840 s,@target@,$target,;t t
28841 s,@target_cpu@,$target_cpu,;t t
28842 s,@target_vendor@,$target_vendor,;t t
28843 s,@target_os@,$target_os,;t t
28844 s,@FGREP@,$FGREP,;t t
28845 s,@CC@,$CC,;t t
28846 s,@CFLAGS@,$CFLAGS,;t t
28847 s,@LDFLAGS@,$LDFLAGS,;t t
28848 s,@CPPFLAGS@,$CPPFLAGS,;t t
28849 s,@ac_ct_CC@,$ac_ct_CC,;t t
28850 s,@EXEEXT@,$EXEEXT,;t t
28851 s,@OBJEXT@,$OBJEXT,;t t
28852 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
28853 s,@CPP@,$CPP,;t t
28854 s,@LDCONFIG@,$LDCONFIG,;t t
28855 s,@CXX@,$CXX,;t t
28856 s,@CXXFLAGS@,$CXXFLAGS,;t t
28857 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
28858 s,@AWK@,$AWK,;t t
28859 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
28860 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
28861 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
28862 s,@LINT@,$LINT,;t t
28863 s,@LINT_OPTS@,$LINT_OPTS,;t t
28864 s,@LN_S@,$LN_S,;t t
28865 s,@cf_config_suffix@,$cf_config_suffix,;t t
28866 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
28867 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
28868 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
28869 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
28870 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
28871 s,@SET_MAKE@,$SET_MAKE,;t t
28872 s,@CTAGS@,$CTAGS,;t t
28873 s,@ETAGS@,$ETAGS,;t t
28874 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
28875 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
28876 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
28877 s,@RANLIB@,$RANLIB,;t t
28878 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
28879 s,@LD@,$LD,;t t
28880 s,@ac_ct_LD@,$ac_ct_LD,;t t
28881 s,@AR@,$AR,;t t
28882 s,@ac_ct_AR@,$ac_ct_AR,;t t
28883 s,@NM@,$NM,;t t
28884 s,@ac_ct_NM@,$ac_ct_NM,;t t
28885 s,@ARFLAGS@,$ARFLAGS,;t t
28886 s,@DESTDIR@,$DESTDIR,;t t
28887 s,@BUILD_CC@,$BUILD_CC,;t t
28888 s,@BUILD_CPP@,$BUILD_CPP,;t t
28889 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
28890 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
28891 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
28892 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
28893 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
28894 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
28895 s,@cf_list_models@,$cf_list_models,;t t
28896 s,@ABI_VERSION@,$ABI_VERSION,;t t
28897 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
28898 s,@LIBTOOL@,$LIBTOOL,;t t
28899 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
28900 s,@LT_UNDEF@,$LT_UNDEF,;t t
28901 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
28902 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
28903 s,@LIB_CREATE@,$LIB_CREATE,;t t
28904 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
28905 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
28906 s,@LIB_PREP@,$LIB_PREP,;t t
28907 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
28908 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
28909 s,@LIB_LINK@,$LIB_LINK,;t t
28910 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
28911 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
28912 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
28913 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
28914 s,@TICS_NAME@,$TICS_NAME,;t t
28915 s,@TINFO_NAME@,$TINFO_NAME,;t t
28916 s,@LIB_NAME@,$LIB_NAME,;t t
28917 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
28918 s,@CC_G_OPT@,$CC_G_OPT,;t t
28919 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
28920 s,@LD_MODEL@,$LD_MODEL,;t t
28921 s,@shlibdir@,$shlibdir,;t t
28922 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
28923 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
28924 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
28925 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
28926 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
28927 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
28928 s,@LINK_PROGS@,$LINK_PROGS,;t t
28929 s,@LINK_TESTS@,$LINK_TESTS,;t t
28930 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
28931 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
28932 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
28933 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
28934 s,@RPATH_LIST@,$RPATH_LIST,;t t
28935 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
28936 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
28937 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
28938 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
28939 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
28940 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
28941 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
28942 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
28943 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
28944 s,@TIC@,$TIC,;t t
28945 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
28946 s,@INFOCMP@,$INFOCMP,;t t
28947 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
28948 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
28949 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
28950 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
28951 s,@XTERM_KBS@,$XTERM_KBS,;t t
28952 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
28953 s,@TERMINFO@,$TERMINFO,;t t
28954 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
28955 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
28956 s,@TERMPATH@,$TERMPATH,;t t
28957 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
28958 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
28959 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
28960 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
28961 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
28962 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
28963 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
28964 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
28965 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
28966 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
28967 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
28968 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
28969 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
28970 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
28971 s,@RGB_PATH@,$RGB_PATH,;t t
28972 s,@no_x11_rgb@,$no_x11_rgb,;t t
28973 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
28974 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
28975 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
28976 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
28977 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
28978 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
28979 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
28980 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
28981 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
28982 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
28983 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
28984 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
28985 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
28986 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
28987 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
28988 s,@PTHREAD@,$PTHREAD,;t t
28989 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
28990 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
28991 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
28992 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
28993 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
28994 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
28995 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
28996 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
28997 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
28998 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
28999 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29000 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29001 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29002 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29003 s,@ECHO_LT@,$ECHO_LT,;t t
29004 s,@ECHO_LD@,$ECHO_LD,;t t
29005 s,@RULE_CC@,$RULE_CC,;t t
29006 s,@SHOW_CC@,$SHOW_CC,;t t
29007 s,@ECHO_CC@,$ECHO_CC,;t t
29008 s,@ECHO_LINK@,$ECHO_LINK,;t t
29009 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29010 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29011 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29012 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29013 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29014 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29015 s,@ADAFLAGS@,$ADAFLAGS,;t t
29016 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29017 s,@ADA_TRACE@,$ADA_TRACE,;t t
29018 s,@MATH_LIB@,$MATH_LIB,;t t
29019 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29020 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29021 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29022 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29023 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29024 s,@TEST_LIBS@,$TEST_LIBS,;t t
29025 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29026 s,@CXXCPP@,$CXXCPP,;t t
29027 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29028 s,@CXX_AR@,$CXX_AR,;t t
29029 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29030 s,@CXXLIBS@,$CXXLIBS,;t t
29031 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29032 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29033 s,@M4_exists@,$M4_exists,;t t
29034 s,@cf_ada_make@,$cf_ada_make,;t t
29035 s,@cf_ada_config@,$cf_ada_config,;t t
29036 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29037 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29038 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29039 s,@cf_compile_generics@,$cf_compile_generics,;t t
29040 s,@cf_generic_objects@,$cf_generic_objects,;t t
29041 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29042 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29043 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29044 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29045 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29046 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29047 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29048 s,@cf_ada_package@,$cf_ada_package,;t t
29049 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29050 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29051 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29052 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29053 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29054 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29055 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29056 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29057 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29058 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29059 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29060 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29061 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29062 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29063 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29064 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29065 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29066 s,@TICS_LIBS@,$TICS_LIBS,;t t
29067 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29068 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29069 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29070 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29071 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29072 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29073 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29074 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29075 s,@includesubdir@,$includesubdir,;t t
29076 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29077 s,@TICS_LIST@,$TICS_LIST,;t t
29078 s,@TINFO_LIST@,$TINFO_LIST,;t t
29079 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29080 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29081 s,@FORM_NAME@,$FORM_NAME,;t t
29082 s,@MENU_NAME@,$MENU_NAME,;t t
29083 s,@PANEL_NAME@,$PANEL_NAME,;t t
29084 s,@CXX_NAME@,$CXX_NAME,;t t
29085 s,@TEST_ARGS@,$TEST_ARGS,;t t
29086 s,@TEST_DEPS@,$TEST_DEPS,;t t
29087 s,@TEST_ARG2@,$TEST_ARG2,;t t
29088 s,@TEST_DEP2@,$TEST_DEP2,;t t
29089 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29090 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29091 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29092 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29093 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29094 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29095 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29096 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29097 s,@cross_compiling@,$cross_compiling,;t t
29098 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29099 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29100 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29101 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29102 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29103 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29104 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29105 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29106 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29107 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29108 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29109 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29110 CEOF
29111
29112 EOF
29113
29114   cat >>"$CONFIG_STATUS" <<\EOF
29115   # Split the substitutions into bite-sized pieces for seds with
29116   # small command number limits, like on Digital OSF/1 and HP-UX.
29117   ac_max_sed_lines=48
29118   ac_sed_frag=1 # Number of current file.
29119   ac_beg=1 # First line for current file.
29120   ac_end=$ac_max_sed_lines # Line after last line for current file.
29121   ac_more_lines=:
29122   ac_sed_cmds=
29123   while "$ac_more_lines"; do
29124     if test "$ac_beg" -gt 1; then
29125       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29126     else
29127       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29128     fi
29129     if test ! -s $tmp/subs.frag; then
29130       ac_more_lines=false
29131     else
29132       # The purpose of the label and of the branching condition is to
29133       # speed up the sed processing (if there are no `@' at all, there
29134       # is no need to browse any of the substitutions).
29135       # These are the two extra sed commands mentioned above.
29136       (echo ':t
29137   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29138       # It is possible to make a multiline substitution using escaped newlines.
29139       # Ensure that we do not split the substitution between script fragments.
29140       ac_BEG=$ac_end
29141       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29142       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29143       if test -s $tmp/subs.next; then
29144         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29145         if test ! -s $tmp/subs.edit; then
29146           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29147           if test ! -s $tmp/subs.edit; then
29148             if test "$ac_beg" -gt 1; then
29149               ac_end=`expr "$ac_end" - 1`
29150               continue
29151             fi
29152           fi
29153         fi
29154       fi
29155
29156       if test -z "$ac_sed_cmds"; then
29157         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29158       else
29159         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29160       fi
29161       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29162       ac_beg=$ac_end
29163       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29164     fi
29165   done
29166   if test -z "$ac_sed_cmds"; then
29167     ac_sed_cmds=cat
29168   fi
29169 fi # test -n "$CONFIG_FILES"
29170
29171 EOF
29172 cat >>"$CONFIG_STATUS" <<\EOF
29173 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29174   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29175   case "$ac_file" in
29176   - | *:- | *:-:* ) # input from stdin
29177         cat >$tmp/stdin
29178         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29179         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29180   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29181         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29182   * )   ac_file_in=$ac_file.in ;;
29183   esac
29184
29185   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29186   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29187          X"$ac_file" : 'X\(//\)[^/]' \| \
29188          X"$ac_file" : 'X\(//\)$' \| \
29189          X"$ac_file" : 'X\(/\)' \| \
29190          .     : '\(.\)' 2>/dev/null ||
29191 echo X"$ac_file" |
29192     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29193           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29194           /^X\(\/\/\)$/{ s//\1/; q; }
29195           /^X\(\/\).*/{ s//\1/; q; }
29196           s/.*/./; q'`
29197   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29198     { case "$ac_dir" in
29199   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29200   *)                      as_incr_dir=.;;
29201 esac
29202 as_dummy="$ac_dir"
29203 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29204   case $as_mkdir_dir in
29205     # Skip DOS drivespec
29206     ?:) as_incr_dir=$as_mkdir_dir ;;
29207     *)
29208       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29209       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29210     ;;
29211   esac
29212 done; }
29213
29214     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29215     # A "../" for each directory in $ac_dir_suffix.
29216     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29217   else
29218     ac_dir_suffix= ac_dots=
29219   fi
29220
29221   case "$srcdir" in
29222   .)  ac_srcdir=.
29223       if test -z "$ac_dots"; then
29224          ac_top_srcdir=.
29225       else
29226          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29227       fi ;;
29228   [\\/]* | ?:[\\/]* )
29229       ac_srcdir="$srcdir$ac_dir_suffix";
29230       ac_top_srcdir="$srcdir" ;;
29231   *) # Relative path.
29232     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29233     ac_top_srcdir="$ac_dots$srcdir" ;;
29234   esac
29235
29236   case $INSTALL in
29237   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29238   *) ac_INSTALL=$ac_dots$INSTALL ;;
29239   esac
29240
29241   if test x"$ac_file" != x-; then
29242     { echo "$as_me:29242: creating $ac_file" >&5
29243 echo "$as_me: creating $ac_file" >&6;}
29244     rm -f "$ac_file"
29245   fi
29246   # Let's still pretend it is `configure' which instantiates (i.e., don't
29247   # use $as_me), people would be surprised to read:
29248   #    /* config.h.  Generated automatically by config.status.  */
29249   configure_input="Generated automatically from `echo $ac_file_in |
29250                                                  sed 's,.*/,,'` by configure."
29251
29252   # First look for the input files in the build tree, otherwise in the
29253   # src tree.
29254   ac_file_inputs=`IFS=:
29255     for f in $ac_file_in; do
29256       case $f in
29257       -) echo $tmp/stdin ;;
29258       [\\/$]*)
29259          # Absolute (can't be DOS-style, as IFS=:)
29260          test -f "$f" || { { echo "$as_me:29260: error: cannot find input file: $f" >&5
29261 echo "$as_me: error: cannot find input file: $f" >&2;}
29262    { (exit 1); exit 1; }; }
29263          echo $f;;
29264       *) # Relative
29265          if test -f "$f"; then
29266            # Build tree
29267            echo $f
29268          elif test -f "$srcdir/$f"; then
29269            # Source tree
29270            echo "$srcdir/$f"
29271          else
29272            # /dev/null tree
29273            { { echo "$as_me:29273: error: cannot find input file: $f" >&5
29274 echo "$as_me: error: cannot find input file: $f" >&2;}
29275    { (exit 1); exit 1; }; }
29276          fi;;
29277       esac
29278     done` || { (exit 1); exit 1; }
29279 EOF
29280 cat >>"$CONFIG_STATUS" <<\EOF
29281   ac_warn_datarootdir=no
29282   if test x"$ac_file" != x-; then
29283     for ac_item in $ac_file_inputs
29284     do
29285       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29286       if test -n "$ac_seen"; then
29287         ac_used=`grep '@datarootdir@' "$ac_item"`
29288         if test -z "$ac_used"; then
29289           { echo "$as_me:29289: WARNING: datarootdir was used implicitly but not set:
29290 $ac_seen" >&5
29291 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29292 $ac_seen" >&2;}
29293           ac_warn_datarootdir=yes
29294         fi
29295       fi
29296       ac_seen=`grep '${datarootdir}' "$ac_item"`
29297       if test -n "$ac_seen"; then
29298         { echo "$as_me:29298: WARNING: datarootdir was used explicitly but not set:
29299 $ac_seen" >&5
29300 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29301 $ac_seen" >&2;}
29302         ac_warn_datarootdir=yes
29303       fi
29304     done
29305   fi
29306
29307 if test "x$ac_warn_datarootdir" = xyes; then
29308   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29309 fi
29310
29311 EOF
29312 cat >>"$CONFIG_STATUS" <<EOF
29313   sed "$ac_vpsub
29314 $extrasub
29315 EOF
29316 cat >>"$CONFIG_STATUS" <<\EOF
29317 :t
29318 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29319 s,@configure_input@,$configure_input,;t t
29320 s,@srcdir@,$ac_srcdir,;t t
29321 s,@top_srcdir@,$ac_top_srcdir,;t t
29322 s,@INSTALL@,$ac_INSTALL,;t t
29323 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29324   rm -f $tmp/stdin
29325   if test x"$ac_file" != x-; then
29326     cp "$tmp/out" "$ac_file"
29327
29328     for ac_name in prefix exec_prefix datarootdir
29329     do
29330         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
29331         if test -n "$ac_seen"; then
29332             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
29333             if test -z "$ac_init"; then
29334               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29335               { echo "$as_me:29335: WARNING: Variable $ac_name is used but was not set:
29336 $ac_seen" >&5
29337 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29338 $ac_seen" >&2;}
29339             fi
29340         fi
29341     done
29342     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
29343     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
29344     if test -s $tmp/out; then
29345       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29346       { echo "$as_me:29346: WARNING: Some variables may not be substituted:
29347 $ac_seen" >&5
29348 echo "$as_me: WARNING: Some variables may not be substituted:
29349 $ac_seen" >&2;}
29350     fi
29351   else
29352     cat $tmp/out
29353   fi
29354   rm -f $tmp/out
29355
29356 done
29357 EOF
29358 cat >>"$CONFIG_STATUS" <<\EOF
29359
29360 #
29361 # CONFIG_HEADER section.
29362 #
29363
29364 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29365 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29366 #
29367 # ac_d sets the value in "#define NAME VALUE" lines.
29368 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29369 ac_dB='[        ].*$,\1#\2'
29370 ac_dC=' '
29371 ac_dD=',;t'
29372 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29373 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29374 ac_iB='\([      ]\),\1#\2define\3'
29375 ac_iC=' '
29376 ac_iD='\4,;t'
29377 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29378 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29379 ac_uB='$,\1#\2define\3'
29380 ac_uC=' '
29381 ac_uD=',;t'
29382
29383 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29384   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29385   case "$ac_file" in
29386   - | *:- | *:-:* ) # input from stdin
29387         cat >$tmp/stdin
29388         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29389         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29390   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29391         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29392   * )   ac_file_in=$ac_file.in ;;
29393   esac
29394
29395   test x"$ac_file" != x- && { echo "$as_me:29395: creating $ac_file" >&5
29396 echo "$as_me: creating $ac_file" >&6;}
29397
29398   # First look for the input files in the build tree, otherwise in the
29399   # src tree.
29400   ac_file_inputs=`IFS=:
29401     for f in $ac_file_in; do
29402       case $f in
29403       -) echo $tmp/stdin ;;
29404       [\\/$]*)
29405          # Absolute (can't be DOS-style, as IFS=:)
29406          test -f "$f" || { { echo "$as_me:29406: error: cannot find input file: $f" >&5
29407 echo "$as_me: error: cannot find input file: $f" >&2;}
29408    { (exit 1); exit 1; }; }
29409          echo $f;;
29410       *) # Relative
29411          if test -f "$f"; then
29412            # Build tree
29413            echo $f
29414          elif test -f "$srcdir/$f"; then
29415            # Source tree
29416            echo "$srcdir/$f"
29417          else
29418            # /dev/null tree
29419            { { echo "$as_me:29419: error: cannot find input file: $f" >&5
29420 echo "$as_me: error: cannot find input file: $f" >&2;}
29421    { (exit 1); exit 1; }; }
29422          fi;;
29423       esac
29424     done` || { (exit 1); exit 1; }
29425   # Remove the trailing spaces.
29426   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29427
29428 EOF
29429
29430 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29431 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29432 # be either 'cat' or 'sort'.
29433 cat confdefs.h | uniq >conftest.vals
29434
29435 # Break up conftest.vals because some shells have a limit on
29436 # the size of here documents, and old seds have small limits too.
29437
29438 rm -f conftest.tail
29439 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
29440 while grep . conftest.vals >/dev/null
29441 do
29442   # Write chunks of a limited-size here document to conftest.frag.
29443   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
29444   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
29445   echo 'CEOF' >> "$CONFIG_STATUS"
29446   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
29447   rm -f conftest.vals
29448   mv conftest.tail conftest.vals
29449 done
29450 rm -f conftest.vals
29451
29452 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29453 # marker @DEFS@.
29454 echo '  cat >> conftest.edit <<CEOF
29455 /@DEFS@/r conftest.frag
29456 /@DEFS@/d
29457 CEOF
29458 sed -f conftest.edit $tmp/in > $tmp/out
29459 rm -f $tmp/in
29460 mv $tmp/out $tmp/in
29461 rm -f conftest.edit conftest.frag
29462 ' >> "$CONFIG_STATUS"
29463
29464 cat >>"$CONFIG_STATUS" <<\EOF
29465   # Let's still pretend it is `configure' which instantiates (i.e., don't
29466   # use $as_me), people would be surprised to read:
29467   #    /* config.h.  Generated automatically by config.status.  */
29468   if test x"$ac_file" = x-; then
29469     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29470   else
29471     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29472   fi
29473   cat $tmp/in >>$tmp/config.h
29474   rm -f $tmp/in
29475   if test x"$ac_file" != x-; then
29476     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
29477       { echo "$as_me:29477: $ac_file is unchanged" >&5
29478 echo "$as_me: $ac_file is unchanged" >&6;}
29479     else
29480       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29481          X"$ac_file" : 'X\(//\)[^/]' \| \
29482          X"$ac_file" : 'X\(//\)$' \| \
29483          X"$ac_file" : 'X\(/\)' \| \
29484          .     : '\(.\)' 2>/dev/null ||
29485 echo X"$ac_file" |
29486     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29487           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29488           /^X\(\/\/\)$/{ s//\1/; q; }
29489           /^X\(\/\).*/{ s//\1/; q; }
29490           s/.*/./; q'`
29491       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29492         { case "$ac_dir" in
29493   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29494   *)                      as_incr_dir=.;;
29495 esac
29496 as_dummy="$ac_dir"
29497 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29498   case $as_mkdir_dir in
29499     # Skip DOS drivespec
29500     ?:) as_incr_dir=$as_mkdir_dir ;;
29501     *)
29502       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29503       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29504     ;;
29505   esac
29506 done; }
29507
29508       fi
29509       rm -f "$ac_file"
29510       mv "$tmp/config.h" "$ac_file"
29511     fi
29512   else
29513     cat $tmp/config.h
29514     rm -f $tmp/config.h
29515   fi
29516 done
29517 EOF
29518 cat >>"$CONFIG_STATUS" <<\EOF
29519 #
29520 # CONFIG_COMMANDS section.
29521 #
29522 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29523   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29524   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29525
29526   case "$ac_dest" in
29527     default )
29528 if test "x$cf_with_tests" != xno ; then
29529
29530 for cf_dir in test
29531 do
29532         if test ! -d "$srcdir/$cf_dir" ; then
29533                 continue
29534         elif test -f "$srcdir/$cf_dir/programs" ; then
29535                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
29536         fi
29537 done
29538
29539 fi
29540
29541 cf_prefix=$LIB_PREFIX
29542
29543 case "$cf_cv_shlib_version" in
29544 (cygdll|msysdll|mingw|msvcdll)
29545         TINFO_NAME=$TINFO_ARG_SUFFIX
29546         TINFO_SUFFIX=.dll
29547         ;;
29548 esac
29549
29550 if test -n "$TINFO_SUFFIX" ; then
29551         case "$TINFO_SUFFIX" in
29552         (tw*)
29553                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
29554                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
29555                 ;;
29556         (t*)
29557                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
29558                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
29559                 ;;
29560         (w*)
29561                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
29562                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
29563                 ;;
29564         esac
29565 fi
29566
29567 for cf_dir in $SRC_SUBDIRS
29568 do
29569         if test ! -d "$srcdir/$cf_dir" ; then
29570                 continue
29571         elif test -f "$srcdir/$cf_dir/modules" ; then
29572
29573                 SHARED_LIB=
29574                 Libs_To_Make=
29575                 cf_awk_program=
29576                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
29577                 then
29578                         cf_awk_program="$cf_awk_program\
29579 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
29580 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
29581 "
29582                 fi
29583
29584                 if test "x$WILDCARD_SYMS" = xno
29585                 then
29586                         cf_awk_program="$cf_awk_program\
29587 /[      ]_\\*;/ { skip=1; next; }\
29588 "
29589                 fi
29590
29591                 if test "x$cf_awk_program" != "x"
29592                 then
29593                         cat >>$cf_dir/Makefile <<CF_EOF
29594
29595 # Generated by CF_LIB_RULES
29596 resulting.map: $UNALTERED_SYMS
29597         $AWK 'BEGIN { skip = 1; last=""; } \
29598 $cf_awk_program \
29599 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
29600  skip = 0; last = \$\$0; } \
29601 END { print last; }' < "$UNALTERED_SYMS" >\$@
29602
29603 distclean::
29604         rm -f resulting.map
29605 CF_EOF
29606                 fi
29607
29608                 for cf_item in $cf_LIST_MODELS
29609                 do
29610
29611         case X$cf_item in
29612         (Xlibtool)
29613                 cf_suffix='.la'
29614                 cf_depsuf=$cf_suffix
29615                 ;;
29616         (Xdebug)
29617                 case "$cf_cv_system_name" in
29618                 (*-msvc*)
29619                         cf_suffix='_g.lib'
29620                         ;;
29621                 (*)
29622                         cf_suffix='_g.a'
29623                         ;;
29624                 esac
29625                 cf_depsuf=$cf_suffix
29626                 ;;
29627         (Xprofile)
29628                 case "$cf_cv_system_name" in
29629                 (*-msvc*)
29630                         cf_suffix='_p.lib'
29631                         ;;
29632                 (*)
29633                         cf_suffix='_p.a'
29634                         ;;
29635                 esac
29636                 cf_depsuf=$cf_suffix
29637                 ;;
29638         (Xshared)
29639                 case "$cf_cv_system_name" in
29640                 (aix[5-7]*)
29641                         cf_suffix='.so'
29642                         cf_depsuf=$cf_suffix
29643                         ;;
29644                 (*-msvc*)
29645                         cf_suffix='.dll'
29646                         cf_depsuf='.dll.lib'
29647                         ;;
29648                 (cygwin*|msys*|mingw*)
29649                         cf_suffix='.dll'
29650                         cf_depsuf='.dll.a'
29651                         ;;
29652                 (darwin*)
29653                         cf_suffix='.dylib'
29654                         cf_depsuf=$cf_suffix
29655                         ;;
29656                 (hpux*)
29657                         case "$target" in
29658                         (ia64*)
29659                                 cf_suffix='.so'
29660                                 cf_depsuf=$cf_suffix
29661                                 ;;
29662                         (*)
29663                                 cf_suffix='.sl'
29664                                 cf_depsuf=$cf_suffix
29665                                 ;;
29666                         esac
29667                         ;;
29668                 (*)
29669                         cf_suffix='.so'
29670                         cf_depsuf=$cf_suffix
29671                         ;;
29672                 esac
29673                 ;;
29674         (*)
29675                 case "$target" in
29676                 (*-msvc*)
29677                         cf_suffix='.lib'
29678                         ;;
29679                 (*)
29680                         cf_suffix='.a'
29681                         ;;
29682                 esac
29683                 cf_depsuf=$cf_suffix
29684                 ;;
29685         esac
29686         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29687         then
29688                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29689                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29690         fi
29691
29692                         if test "$cf_dir" = "c++"
29693                         then
29694
29695 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29696
29697 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29698
29699                         else
29700
29701 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29702
29703 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29704
29705                         fi
29706                         test -z "$cf_libname" && cf_libname="$cf_dir"
29707                         if test "$cf_item" = shared ; then
29708                                 if test -n "${LIB_SUFFIX}"
29709                                 then
29710                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29711                                 else
29712                                         cf_shared_suffix="$cf_suffix"
29713                                 fi
29714                                 if test "$cf_cv_do_symlinks" = yes ; then
29715                                         cf_version_name=
29716
29717                                         case "$cf_cv_shlib_version" in
29718                                         (rel)
29719                                                 cf_version_name=REL_VERSION
29720                                                 ;;
29721                                         (abi)
29722                                                 cf_version_name=ABI_VERSION
29723                                                 ;;
29724                                         esac
29725
29726                                         if test -n "$cf_version_name"
29727                                         then
29728                                                 case "$cf_cv_system_name" in
29729                                                 (darwin*)
29730                                                         # "w", etc?
29731                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
29732                                                         ;;
29733                                                 (*)
29734                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
29735                                                         ;;
29736                                                 esac
29737                                         fi
29738                                         if test -n "${USE_LIB_SUFFIX}"
29739                                         then
29740                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29741                                         else
29742                                                 cf_shared_suffix="$cf_suffix"
29743                                         fi
29744                                 fi
29745                                 # cygwin needs import library, and has unique naming convention
29746                                 # use autodetected ${cf_prefix} for import lib and static lib, but
29747                                 # use 'cyg' prefix for shared lib.
29748                                 case "$cf_cv_shlib_version" in
29749                                 (cygdll)
29750                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29751                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
29752                                         ;;
29753                                 (msysdll)
29754                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29755                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
29756                                         ;;
29757                                 (mingw)
29758                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29759                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
29760                                         ;;
29761                                 (msvcdll)
29762                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29763                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
29764                                         ;;
29765                                 (*)
29766                                         cf_add_lib=
29767                                         ;;
29768                                 esac
29769                                 if test -n "$cf_add_lib"
29770                                 then
29771                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29772                                         continue
29773                                 fi
29774                         fi
29775                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
29776                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29777                 done
29778
29779                 if test "$cf_dir" = ncurses ; then
29780                         cf_subsets="$LIB_SUBSETS"
29781                         cf_r_parts="$cf_subsets"
29782                         cf_liblist="$Libs_To_Make"
29783
29784                         while test -n "$cf_r_parts"
29785                         do
29786                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
29787                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
29788                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
29789                                         cf_add_lib=
29790                                         case "$cf_l_parts" in
29791                                         (*termlib*)
29792                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
29793                                                 ;;
29794                                         (*ticlib*)
29795                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
29796                                                 ;;
29797                                         (*)
29798                                                 break
29799                                                 ;;
29800                                         esac
29801                                         if test -n "$cf_add_lib"; then
29802                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
29803                                         fi
29804                                 else
29805                                         break
29806                                 fi
29807                         done
29808                 else
29809                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
29810                 fi
29811
29812                 if test "$cf_dir" = c++; then
29813                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
29814                                 cf_list=
29815                                 for cf_item in $Libs_To_Make
29816                                 do
29817                                         case "$cf_item" in
29818                                         (*.a)
29819                                                 ;;
29820                                         (*)
29821                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
29822                                                 ;;
29823                                         esac
29824                                         for cf_test in $cf_list
29825                                         do
29826                                                 if test "$cf_test" = "$cf_item"
29827                                                 then
29828                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
29829                                                         cf_item=
29830                                                         break
29831                                                 fi
29832                                         done
29833                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
29834                                 done
29835                                 Libs_To_Make="$cf_list"
29836                         fi
29837                 fi
29838
29839                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
29840                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
29841                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
29842                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
29843
29844                 $AWK -f "$srcdir/mk-0th.awk" \
29845                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
29846                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
29847
29848                 for cf_subset in $cf_subsets
29849                 do
29850                         cf_subdirs=
29851                         for cf_item in $cf_LIST_MODELS
29852                         do
29853
29854                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
29855
29856 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29857
29858                         CXX_MODEL=$cf_ITEM
29859                         if test "$CXX_MODEL" = SHARED; then
29860                                 case "$cf_cv_shlib_version" in
29861                                 (cygdll|msysdll|mingw|msvcdll)
29862                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
29863
29864 echo "${as_me:-configure}:29864: testing overriding CXX_MODEL to SHARED ..." 1>&5
29865
29866                                         with_shared_cxx=yes
29867                                         ;;
29868                                 (*)
29869                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
29870                                         ;;
29871                                 esac
29872                         fi
29873
29874         case X$cf_item in
29875         (Xlibtool)
29876                 cf_suffix='.la'
29877                 cf_depsuf=$cf_suffix
29878                 ;;
29879         (Xdebug)
29880                 case "$cf_cv_system_name" in
29881                 (*-msvc*)
29882                         cf_suffix='_g.lib'
29883                         ;;
29884                 (*)
29885                         cf_suffix='_g.a'
29886                         ;;
29887                 esac
29888                 cf_depsuf=$cf_suffix
29889                 ;;
29890         (Xprofile)
29891                 case "$cf_cv_system_name" in
29892                 (*-msvc*)
29893                         cf_suffix='_p.lib'
29894                         ;;
29895                 (*)
29896                         cf_suffix='_p.a'
29897                         ;;
29898                 esac
29899                 cf_depsuf=$cf_suffix
29900                 ;;
29901         (Xshared)
29902                 case "$cf_cv_system_name" in
29903                 (aix[5-7]*)
29904                         cf_suffix='.so'
29905                         cf_depsuf=$cf_suffix
29906                         ;;
29907                 (*-msvc*)
29908                         cf_suffix='.dll'
29909                         cf_depsuf='.dll.lib'
29910                         ;;
29911                 (cygwin*|msys*|mingw*)
29912                         cf_suffix='.dll'
29913                         cf_depsuf='.dll.a'
29914                         ;;
29915                 (darwin*)
29916                         cf_suffix='.dylib'
29917                         cf_depsuf=$cf_suffix
29918                         ;;
29919                 (hpux*)
29920                         case "$target" in
29921                         (ia64*)
29922                                 cf_suffix='.so'
29923                                 cf_depsuf=$cf_suffix
29924                                 ;;
29925                         (*)
29926                                 cf_suffix='.sl'
29927                                 cf_depsuf=$cf_suffix
29928                                 ;;
29929                         esac
29930                         ;;
29931                 (*)
29932                         cf_suffix='.so'
29933                         cf_depsuf=$cf_suffix
29934                         ;;
29935                 esac
29936                 ;;
29937         (*)
29938                 case "$target" in
29939                 (*-msvc*)
29940                         cf_suffix='.lib'
29941                         ;;
29942                 (*)
29943                         cf_suffix='.a'
29944                         ;;
29945                 esac
29946                 cf_depsuf=$cf_suffix
29947                 ;;
29948         esac
29949         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29950         then
29951                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29952                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29953         fi
29954
29955         case $cf_item in
29956         (libtool) cf_subdir='obj_lo'  ;;
29957         (normal)  cf_subdir='objects' ;;
29958         (debug)   cf_subdir='obj_g' ;;
29959         (profile) cf_subdir='obj_p' ;;
29960         (shared)
29961                 case "$cf_cv_system_name" in
29962                 (cygwin|msys)
29963                         cf_subdir='objects' ;;
29964                 (*)
29965                         cf_subdir='obj_s' ;;
29966                 esac
29967         esac
29968
29969                         # Test for case where we build libtinfo with a different name.
29970                         cf_libname=$cf_dir
29971                         if test "$cf_dir" = ncurses ; then
29972                                 case "$cf_subset" in
29973                                 (*base*)
29974                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
29975                                         ;;
29976                                 (*termlib*)
29977                                         cf_libname=$TINFO_LIB_SUFFIX
29978                                         ;;
29979                                 (ticlib*)
29980                                         cf_libname=$TICS_LIB_SUFFIX
29981                                         ;;
29982                                 esac
29983                         elif test "$cf_dir" = c++ ; then
29984
29985 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29986
29987 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29988
29989                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
29990                         else
29991
29992 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29993
29994 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29995
29996                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
29997                         fi
29998                         if test -n "${USE_ARG_SUFFIX}" ; then
29999                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30000                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30001                         fi
30002
30003                         # These dependencies really are for development, not
30004                         # builds, but they are useful in porting, too.
30005                         cf_depend="../include/ncurses_cfg.h"
30006                         if test "$srcdir" = "."; then
30007                                 cf_reldir="."
30008                         else
30009                                 cf_reldir="\${srcdir}"
30010                         fi
30011
30012                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30013                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30014                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30015                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30016                         fi
30017
30018                         cf_dir_suffix=
30019                         old_cf_suffix="$cf_suffix"
30020                         if test "$cf_cv_shlib_version_infix" = yes ; then
30021                         if test -n "$USE_LIB_SUFFIX" ; then
30022                                 case "$USE_LIB_SUFFIX" in
30023                                 (tw*)
30024                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30025                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30026                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30027                                         ;;
30028                                 (t*)
30029                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30030                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30031                                         cf_dir_suffix=t$EXTRA_SUFFIX
30032                                         ;;
30033                                 (w*)
30034                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30035                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30036                                         cf_dir_suffix=w$EXTRA_SUFFIX
30037                                         ;;
30038                                 (*)
30039                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30040                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30041                                         cf_dir_suffix=$EXTRA_SUFFIX
30042                                         ;;
30043                                 esac
30044                         fi
30045                         fi
30046
30047                         $AWK -f "$srcdir/mk-1st.awk" \
30048                                 name=${cf_libname}${cf_dir_suffix} \
30049                                 traces=$LIB_TRACING \
30050                                 MODEL=$cf_ITEM \
30051                                 CXX_MODEL=$CXX_MODEL \
30052                                 model=$cf_subdir \
30053                                 prefix=$cf_prefix \
30054                                 suffix=$cf_suffix \
30055                                 subset=$cf_subset \
30056                                 driver=$cf_cv_term_driver \
30057                                 SymLink="$LN_S" \
30058                                 TermlibRoot=$TINFO_NAME \
30059                                 TermlibSuffix=$TINFO_SUFFIX \
30060                                 ShlibVer=$cf_cv_shlib_version \
30061                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30062                                 ReLink=${cf_cv_do_relink:-no} \
30063                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30064                                 DoLinks=$cf_cv_do_symlinks \
30065                                 rmSoLocs=$cf_cv_rm_so_locs \
30066                                 ldconfig="$LDCONFIG" \
30067                                 overwrite=$WITH_OVERWRITE \
30068                                 depend="$cf_depend" \
30069                                 host="$host" \
30070                                 libtool_version="$LIBTOOL_VERSION" \
30071                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30072
30073                         cf_suffix="$old_cf_suffix"
30074
30075                         for cf_subdir2 in $cf_subdirs lib
30076                         do
30077                                 test "$cf_subdir" = "$cf_subdir2" && break
30078                         done
30079                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30080                         $AWK -f "$srcdir/mk-2nd.awk" \
30081                                 name=$cf_dir \
30082                                 traces=$LIB_TRACING \
30083                                 MODEL=$cf_ITEM \
30084                                 model=$cf_subdir \
30085                                 subset=$cf_subset \
30086                                 srcdir=$srcdir \
30087                                 echo=$WITH_ECHO \
30088                                 crenames=$cf_cv_prog_CC_c_o \
30089                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30090                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30091                         cf_subdirs="$cf_subdirs $cf_subdir"
30092                         done
30093                 done
30094         fi
30095
30096         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30097 done
30098
30099 for cf_dir in $SRC_SUBDIRS
30100 do
30101         if test ! -d "$srcdir/$cf_dir" ; then
30102                 continue
30103         fi
30104
30105         if test -f "$cf_dir/Makefile" ; then
30106                 case "$cf_dir" in
30107                 (Ada95)
30108                         echo 'libs \' >> Makefile
30109                         echo 'install.libs \' >> Makefile
30110                         echo 'uninstall.libs ::' >> Makefile
30111                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30112                         ;;
30113                 esac
30114         fi
30115
30116         if test -f "$srcdir/$cf_dir/modules" ; then
30117                 echo >> Makefile
30118                 if test -f "$srcdir/$cf_dir/headers" ; then
30119 cat >> Makefile <<CF_EOF
30120 install.includes \\
30121 uninstall.includes \\
30122 CF_EOF
30123                 fi
30124
30125 echo 'lint \' >> Makefile
30126
30127 cat >> Makefile <<CF_EOF
30128 libs \\
30129 lintlib \\
30130 install.libs \\
30131 uninstall.libs \\
30132 install.$cf_dir \\
30133 uninstall.$cf_dir ::
30134         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30135 CF_EOF
30136         elif test -f "$srcdir/$cf_dir/headers" ; then
30137 cat >> Makefile <<CF_EOF
30138
30139 libs \\
30140 install.libs \\
30141 uninstall.libs \\
30142 install.includes \\
30143 uninstall.includes ::
30144         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30145 CF_EOF
30146 fi
30147 done
30148
30149 if test "x$cf_with_db_install" = xyes; then
30150 cat >> Makefile <<CF_EOF
30151
30152 install.libs uninstall.libs \\
30153 install.data uninstall.data ::
30154 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30155 CF_EOF
30156 else
30157 cat >> Makefile <<CF_EOF
30158
30159 install.libs uninstall.libs ::
30160         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30161 CF_EOF
30162 fi
30163
30164 if test "x$cf_with_manpages" = xyes; then
30165 cat >> Makefile <<CF_EOF
30166
30167 install.man \\
30168 uninstall.man ::
30169         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30170 CF_EOF
30171 fi
30172
30173 cat >> Makefile <<CF_EOF
30174
30175 distclean ::
30176         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30177         rm -f headers.sh headers.sed mk_shared_lib.sh
30178         rm -f edit_man.* man_alias.*
30179         rm -rf \${DIRS_TO_MAKE}
30180 CF_EOF
30181
30182 # Special case: tack's manpage lives in its own directory.
30183 if test "x$cf_with_manpages" = xyes; then
30184 if test "x$cf_with_tack" = "xyes"; then
30185 cat >> Makefile <<CF_EOF
30186
30187 install.man \\
30188 uninstall.man ::
30189         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30190 CF_EOF
30191 fi
30192 fi
30193
30194 rm -f headers.sed headers.sh
30195
30196 echo creating headers.sh
30197 cat >headers.sh <<CF_EOF
30198 #! $SHELL
30199 # This shell script is generated by the 'configure' script.  It is invoked in a
30200 # subdirectory of the build tree.  It generates a sed-script in the parent
30201 # directory that is used to adjust includes for header files that reside in a
30202 # subdirectory of /usr/include, etc.
30203 PRG=""
30204 while test \$# != 3
30205 do
30206 PRG="\$PRG \$1"; shift
30207 done
30208 DST=\$1
30209 REF=\$2
30210 SRC=\$3
30211 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30212 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30213 echo installing \$SRC in \$DST
30214 CF_EOF
30215
30216 if test "$WITH_CURSES_H" = yes; then
30217         cat >>headers.sh <<CF_EOF
30218 case \$DST in
30219 (/*/include/*)
30220         END=\`basename \$DST\`
30221         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30222         do
30223                 NAME=\`basename \$i\`
30224                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30225         done
30226         ;;
30227 (*)
30228         echo "" >> \$TMPSED
30229         ;;
30230 esac
30231 CF_EOF
30232
30233 else
30234         cat >>headers.sh <<CF_EOF
30235 case \$DST in
30236 (/*/include/*)
30237         END=\`basename \$DST\`
30238         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30239         do
30240                 NAME=\`basename \$i\`
30241                 if test "\$NAME" = "curses.h"
30242                 then
30243                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30244                         NAME=ncurses.h
30245                 fi
30246                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30247         done
30248         ;;
30249 (*)
30250         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30251         ;;
30252 esac
30253 CF_EOF
30254 fi
30255 cat >>headers.sh <<CF_EOF
30256 rm -f \$TMPSRC
30257 sed -f \$TMPSED \$SRC > \$TMPSRC
30258 NAME=\`basename \$SRC\`
30259 CF_EOF
30260 if test "$WITH_CURSES_H" != yes; then
30261         cat >>headers.sh <<CF_EOF
30262 test "\$NAME" = "curses.h" && NAME=ncurses.h
30263 CF_EOF
30264 fi
30265 cat >>headers.sh <<CF_EOF
30266 # Just in case someone gzip'd manpages, remove the conflicting copy.
30267 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30268
30269 eval \$PRG \$TMPSRC \$DST/\$NAME
30270 rm -f \$TMPSRC \$TMPSED
30271 CF_EOF
30272
30273 chmod 0755 headers.sh
30274
30275 for cf_dir in $SRC_SUBDIRS
30276 do
30277         if test ! -d "$srcdir/$cf_dir" ; then
30278                 continue
30279         fi
30280
30281         if test -f "$srcdir/$cf_dir/headers" ; then
30282                 $AWK -f "$srcdir/mk-hdr.awk" \
30283                         subset="$LIB_SUBSETS" \
30284                         compat="$WITH_CURSES_H" \
30285                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
30286         fi
30287
30288         if test -f "$srcdir/$cf_dir/modules" ; then
30289                 if test "$cf_dir" != "c++" ; then
30290                         cat >>$cf_dir/Makefile <<"CF_EOF"
30291 depend : ${AUTO_SRC}
30292         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30293
30294 # DO NOT DELETE THIS LINE -- make depend depends on it.
30295 CF_EOF
30296                 fi
30297         fi
30298 done
30299
30300 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30301 if test -z "$USE_OLD_MAKERULES" ; then
30302         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
30303 fi
30304 fi
30305  ;;
30306   esac
30307 done
30308 EOF
30309
30310 cat >>"$CONFIG_STATUS" <<\EOF
30311
30312 { (exit 0); exit 0; }
30313 EOF
30314 chmod +x "$CONFIG_STATUS"
30315 ac_clean_files=$ac_clean_files_save
30316
30317 # configure is writing to config.log, and then calls config.status.
30318 # config.status does its own redirection, appending to config.log.
30319 # Unfortunately, on DOS this fails, as config.log is still kept open
30320 # by configure, so config.status won't be able to write to it; its
30321 # output is simply discarded.  So we exec the FD to /dev/null,
30322 # effectively closing config.log, so it can be properly (re)opened and
30323 # appended to by config.status.  When coming back to configure, we
30324 # need to make the FD available again.
30325 if test "$no_create" != yes; then
30326   ac_cs_success=:
30327   exec 5>/dev/null
30328   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
30329   exec 5>>config.log
30330   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30331   # would make configure fail if this is the last instruction.
30332   "$ac_cs_success" || { (exit 1); exit 1; }
30333 fi
30334 ${MAKE:-make} preinstall