]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ea465536f4d68308de82d0e15c89e8f2a7090489
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.736 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210509.
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 root use of ncurses environment variables
787   --disable-root-access   restrict file-access when running setuid
788   --enable-symlinks       make tic use symbolic links not hard links
789   --enable-broken_linker  compile with broken-linker support code
790   --enable-bsdpad         recognize BSD-style prefix padding
791   --enable-widec          compile with wide-char/UTF-8 code
792   --disable-lp64          allow chtype to be long (ignore _LP64)
793   --disable-largefile     omit support for large files
794   --disable-tparm-varargs compile tparm() without varargs interface
795   --disable-tic-depends   link tic library without explicit dependency on ncurses library
796   --enable-wattr-macros   enable wattr* macros
797   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
798   --with-bool=TYPE        override fallback type of bool variable
799   --with-caps=alt         compile with alternate Caps file
800   --with-chtype=TYPE      override type of chtype
801   --with-ospeed=TYPE      override type of ospeed variable
802   --with-mmask-t=TYPE     override type of mmask_t
803   --with-ccharw-max=XXX   override size CCHARW_MAX
804   --enable-signed-char    compile using signed Boolean's in term.h
805   --with-tparm-arg=TYPE   override parameter type of tparm
806   --with-rcs-ids          compile-in RCS identifiers
807 Options to Specify How Manpages are Installed:
808   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
809                           optionally formatted/catonly, e.g., gzip,formatted
810   --with-manpage-renames  specify manpage-renaming
811   --with-manpage-aliases  specify manpage-aliases using .so
812   --with-manpage-symlinks specify manpage-aliases using symlinks
813   --with-manpage-tbl      specify manpage processing with tbl
814 Extensions:
815   --disable-ext-funcs     disable function-extensions
816   --enable-sp-funcs       enable SCREEN-extensions
817   --enable-term-driver    enable terminal-driver
818   --enable-const          compile with extra/non-standard const
819   --enable-ext-colors     compile for 256-color support
820   --enable-ext-mouse      compile for extended mouse-encoding
821   --enable-ext-putwin     compile with extended putwin/screendump
822   --enable-no-padding     compile with $NCURSES_NO_PADDING code
823   --enable-sigwinch       compile with SIGWINCH handler
824   --enable-tcap-names     compile with user-definable terminal capabilities
825 Reentrant Code:
826   --with-pthread          use POSIX thread library
827   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
828   --enable-weak-symbols   enable weak-symbols for pthreads
829   --enable-reentrant      compile with reentrant code
830   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
831   --enable-opaque-form    make form-library structures "opaque"
832   --enable-opaque-menu    make menu-library structures "opaque"
833   --enable-opaque-panel   make panel-library structures "opaque"
834   --with-wrap-prefix=XXX  override prefix used for public variables
835 Development Code:
836   --without-develop       disable development options
837   --enable-hard-tabs      compile with hard-tabs code
838   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
839 Experimental Code:
840   --disable-assumed-color do not assume anything about default-colors
841   --disable-hashmap       compile without hashmap scrolling-optimization
842   --enable-colorfgbg      compile-in experimental $COLORFGBG code
843   --enable-fvisibility    compile with -fvisibility=hidden
844   --enable-interop        compile-in interop bindings
845   --enable-safe-sprintf   compile with experimental safe-sprintf code
846   --disable-scroll-hints  compile without scroll-hints code
847   --enable-wgetch-events  compile with wgetch-events code
848   --enable-exp-win32      compile with experimental-Windows driver
849 Testing/development Options:
850   --disable-echo          do not display "compiling" commands
851   --disable-stripping     do not strip (debug info) installed executables
852   --enable-warnings       test: turn on gcc compiler warnings
853   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
854   --enable-string-hacks   work around bogus compiler/loader warnings
855   --enable-assertions     test: turn on generation of assertion code
856   --with-dmalloc          test: use Gray Watson's dmalloc library
857   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
858   --with-valgrind         test: use valgrind
859   --disable-leaks         test: free permanent memory, analyze leaks
860   --enable-expanded       test: generate functions for certain macros
861   --disable-macros        test: use functions rather than macros
862   --with-trace            test: add trace() function to all models of ncurses
863   --disable-gnat-projects test: disable GNAT projects even if usable
864 Ada Binding Options:
865   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
866   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
867   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
868   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
869   --with-ada-libname=XXX  override default Ada library-name
870   --with-form-libname=XXX override form basename of library
871   --with-menu-libname=XXX override menu basename of library
872   --with-panel-libname=XXX override panel basename of library
873   --with-cxx-libname=XXX override ncurses++ basename of library
874
875 Some influential environment variables:
876   CC          C compiler command
877   CFLAGS      C compiler flags
878   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
879               nonstandard directory <lib dir>
880   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
881               headers in a nonstandard directory <include dir>
882   CPP         C preprocessor
883   CXX         C++ compiler command
884   CXXFLAGS    C++ compiler flags
885   CXXCPP      C++ preprocessor
886
887 Use these variables to override the choices made by `configure' or to help
888 it to find libraries and programs with nonstandard names/locations.
889
890 EOF
891 fi
892
893 if test "$ac_init_help" = "recursive"; then
894   # If there are subdirs, report their specific --help.
895   ac_popdir=`pwd`
896   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
897     cd "$ac_subdir"
898     # A "../" for each directory in /$ac_subdir.
899     ac_dots=`echo "$ac_subdir" |
900              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
901
902     case "$srcdir" in
903     .) # No --srcdir option.  We are building in place.
904       ac_sub_srcdir="$srcdir" ;;
905     [\\/]* | ?:[\\/]* ) # Absolute path.
906       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
907     *) # Relative path.
908       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
909     esac
910
911     # Check for guested configure; otherwise get Cygnus style configure.
912     if test -f "$ac_sub_srcdir/configure.gnu"; then
913       echo
914       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
915     elif test -f "$ac_sub_srcdir/configure"; then
916       echo
917       $SHELL "$ac_sub_srcdir/configure" --help=recursive
918     elif test -f "$ac_sub_srcdir/configure.ac" ||
919            test -f "$ac_sub_srcdir/configure.in"; then
920       echo
921       "$ac_configure" --help
922     else
923       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
924     fi
925     cd "$ac_popdir"
926   done
927 fi
928
929 test -n "$ac_init_help" && exit 0
930 if "$ac_init_version"; then
931   cat <<\EOF
932
933 Copyright 2003-2020,2021        Thomas E. Dickey
934 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
935 Free Software Foundation, Inc.
936 This configure script is free software; the Free Software Foundation
937 gives unlimited permission to copy, distribute and modify it.
938 EOF
939   exit 0
940 fi
941 exec 5>config.log
942 cat >&5 <<EOF
943 This file contains any messages produced by compilers while
944 running configure, to aid debugging if configure makes a mistake.
945
946 It was created by $as_me, which was
947 generated by GNU Autoconf 2.52.20210509.  Invocation command line was
948
949   $ $0 $@
950
951 EOF
952 {
953 cat <<_ASUNAME
954 ## ---------- ##
955 ## Platform.  ##
956 ## ---------- ##
957
958 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
959 uname -m = `(uname -m) 2>/dev/null || echo unknown`
960 uname -r = `(uname -r) 2>/dev/null || echo unknown`
961 uname -s = `(uname -s) 2>/dev/null || echo unknown`
962 uname -v = `(uname -v) 2>/dev/null || echo unknown`
963
964 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
965 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
966
967 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
968 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
969 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
970 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
971 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
972 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
973 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
974
975 PATH = $PATH
976
977 _ASUNAME
978 } >&5
979
980 cat >&5 <<EOF
981 ## ------------ ##
982 ## Core tests.  ##
983 ## ------------ ##
984
985 EOF
986
987 # Keep a trace of the command line.
988 # Strip out --no-create and --no-recursion so they do not pile up.
989 # Also quote any args containing shell meta-characters.
990 ac_configure_args=
991 ac_sep=
992 for ac_arg
993 do
994   case "$ac_arg" in
995   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
996   | --no-cr | --no-c) ;;
997   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
998   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
999   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1000     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1001     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1002     ac_sep=" " ;;
1003   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1004      ac_sep=" " ;;
1005   esac
1006   # Get rid of the leading space.
1007 done
1008
1009 # When interrupted or exit'd, cleanup temporary files, and complete
1010 # config.log.  We remove comments because anyway the quotes in there
1011 # would cause problems or look ugly.
1012 trap 'exit_status=$?
1013   # Save into config.log some information that might help in debugging.
1014   echo >&5
1015   echo "## ----------------- ##" >&5
1016   echo "## Cache variables.  ##" >&5
1017   echo "## ----------------- ##" >&5
1018   echo >&5
1019   # The following way of writing the cache mishandles newlines in values,
1020 {
1021   (set) 2>&1 |
1022     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1023     *ac_space=\ *)
1024       sed -n \
1025         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1026           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1027       ;;
1028     *)
1029       sed -n \
1030         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1031       ;;
1032     esac;
1033 } >&5
1034   sed "/^$/d" confdefs.h >conftest.log
1035   if test -s conftest.log; then
1036     echo >&5
1037     echo "## ------------ ##" >&5
1038     echo "## confdefs.h.  ##" >&5
1039     echo "## ------------ ##" >&5
1040     echo >&5
1041     cat conftest.log >&5
1042   fi
1043   (echo; echo) >&5
1044   test "$ac_signal" != 0 &&
1045     echo "$as_me: caught signal $ac_signal" >&5
1046   echo "$as_me: exit $exit_status" >&5
1047   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1048     exit $exit_status
1049      ' 0
1050 for ac_signal in 1 2 13 15; do
1051   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1052 done
1053 ac_signal=0
1054
1055 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1056 rm -rf conftest* confdefs.h
1057 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1058 echo >confdefs.h
1059
1060 # Let the site file select an alternate cache file if it wants to.
1061 # Prefer explicitly selected file to automatically selected ones.
1062 if test -z "$CONFIG_SITE"; then
1063   if test "x$prefix" != xNONE; then
1064     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1065   else
1066     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1067   fi
1068 fi
1069 for ac_site_file in $CONFIG_SITE; do
1070   if test -r "$ac_site_file"; then
1071     { echo "$as_me:1071: loading site script $ac_site_file" >&5
1072 echo "$as_me: loading site script $ac_site_file" >&6;}
1073     cat "$ac_site_file" >&5
1074     . "$ac_site_file"
1075   fi
1076 done
1077
1078 if test -r "$cache_file"; then
1079   # Some versions of bash will fail to source /dev/null (special
1080   # files actually), so we avoid doing that.
1081   if test -f "$cache_file"; then
1082     { echo "$as_me:1082: loading cache $cache_file" >&5
1083 echo "$as_me: loading cache $cache_file" >&6;}
1084     case $cache_file in
1085       [\\/]* | ?:[\\/]* ) . $cache_file;;
1086       *)                      . ./$cache_file;;
1087     esac
1088   fi
1089 else
1090   { echo "$as_me:1090: creating cache $cache_file" >&5
1091 echo "$as_me: creating cache $cache_file" >&6;}
1092   >$cache_file
1093 fi
1094
1095 # Check that the precious variables saved in the cache have kept the same
1096 # value.
1097 ac_cache_corrupted=false
1098 for ac_var in `(set) 2>&1 |
1099                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1100   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1101   eval ac_new_set=\$ac_env_${ac_var}_set
1102   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1103   eval ac_new_val="\$ac_env_${ac_var}_value"
1104   case "$ac_old_set,$ac_new_set" in
1105     set,)
1106       { echo "$as_me:1106: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1107 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1108       ac_cache_corrupted=: ;;
1109     ,set)
1110       { echo "$as_me:1110: error: \`$ac_var' was not set in the previous run" >&5
1111 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1112       ac_cache_corrupted=: ;;
1113     ,);;
1114     *)
1115       if test "x$ac_old_val" != "x$ac_new_val"; then
1116         { echo "$as_me:1116: error: \`$ac_var' has changed since the previous run:" >&5
1117 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1118         { echo "$as_me:1118:   former value:  $ac_old_val" >&5
1119 echo "$as_me:   former value:  $ac_old_val" >&2;}
1120         { echo "$as_me:1120:   current value: $ac_new_val" >&5
1121 echo "$as_me:   current value: $ac_new_val" >&2;}
1122         ac_cache_corrupted=:
1123       fi;;
1124   esac
1125   # Pass precious variables to config.status.  It doesn't matter if
1126   # we pass some twice (in addition to the command line arguments).
1127   if test "$ac_new_set" = set; then
1128     case "$ac_new_val" in
1129     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1130       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1131       ac_configure_args="$ac_configure_args '$ac_arg'"
1132       ;;
1133     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1134        ;;
1135     esac
1136   fi
1137 done
1138 if "$ac_cache_corrupted"; then
1139   { echo "$as_me:1139: error: changes in the environment can compromise the build" >&5
1140 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1141   { { echo "$as_me:1141: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1142 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1143    { (exit 1); exit 1; }; }
1144 fi
1145
1146 ac_ext=c
1147 ac_cpp='$CPP $CPPFLAGS'
1148 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1149 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1150 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1151 ac_main_return="return"
1152
1153 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1154   *c*,-n*) ECHO_N=
1155            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1156            ECHO_T='     '
1157            ;;
1158   *c*,*  ) ECHO_N=-n
1159            ECHO_C=
1160            ECHO_T=
1161            ;;
1162   *)       ECHO_N=
1163            ECHO_C='\c'
1164            ECHO_T=
1165            ;;
1166 esac
1167 echo "#! $SHELL" >conftest.sh
1168 echo  "exit 0"   >>conftest.sh
1169 chmod +x conftest.sh
1170 if { (echo "$as_me:1170: PATH=\".;.\"; conftest.sh") >&5
1171   (PATH=".;."; conftest.sh) 2>&5
1172   ac_status=$?
1173   echo "$as_me:1173: \$? = $ac_status" >&5
1174   (exit "$ac_status"); }; then
1175   ac_path_separator=';'
1176 else
1177   ac_path_separator=:
1178 fi
1179 PATH_SEPARATOR="$ac_path_separator"
1180 rm -f conftest.sh
1181
1182 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1183
1184 top_builddir=`pwd`
1185
1186 for ac_prog in ggrep grep
1187 do
1188   # Extract the first word of "$ac_prog", so it can be a program name with args.
1189 set dummy $ac_prog; ac_word=$2
1190 echo "$as_me:1190: checking for $ac_word" >&5
1191 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1192 if test "${ac_cv_prog_GREP+set}" = set; then
1193   echo $ECHO_N "(cached) $ECHO_C" >&6
1194 else
1195   if test -n "$GREP"; then
1196   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1197 else
1198   ac_save_IFS=$IFS; IFS=$ac_path_separator
1199 ac_dummy="$PATH"
1200 for ac_dir in $ac_dummy; do
1201   IFS=$ac_save_IFS
1202   test -z "$ac_dir" && ac_dir=.
1203   $as_executable_p "$ac_dir/$ac_word" || continue
1204 ac_cv_prog_GREP="$ac_prog"
1205 echo "$as_me:1205: found $ac_dir/$ac_word" >&5
1206 break
1207 done
1208
1209 fi
1210 fi
1211 GREP=$ac_cv_prog_GREP
1212 if test -n "$GREP"; then
1213   echo "$as_me:1213: result: $GREP" >&5
1214 echo "${ECHO_T}$GREP" >&6
1215 else
1216   echo "$as_me:1216: result: no" >&5
1217 echo "${ECHO_T}no" >&6
1218 fi
1219
1220   test -n "$GREP" && break
1221 done
1222 test -n "$GREP" || GREP=": "
1223
1224 echo "$as_me:1224: checking for egrep" >&5
1225 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1226 if test "${ac_cv_path_EGREP+set}" = set; then
1227   echo $ECHO_N "(cached) $ECHO_C" >&6
1228 else
1229   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1230    then ac_cv_path_EGREP="$GREP -E"
1231    else
1232      for ac_prog in gegrep egrep
1233 do
1234   # Extract the first word of "$ac_prog", so it can be a program name with args.
1235 set dummy $ac_prog; ac_word=$2
1236 echo "$as_me:1236: checking for $ac_word" >&5
1237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1238 if test "${ac_cv_path_EGREP+set}" = set; then
1239   echo $ECHO_N "(cached) $ECHO_C" >&6
1240 else
1241   case $EGREP in
1242   [\\/]* | ?:[\\/]*)
1243   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1244   ;;
1245   *)
1246   ac_save_IFS=$IFS; IFS=$ac_path_separator
1247 ac_dummy="$PATH"
1248 for ac_dir in $ac_dummy; do
1249   IFS=$ac_save_IFS
1250   test -z "$ac_dir" && ac_dir=.
1251   if $as_executable_p "$ac_dir/$ac_word"; then
1252    ac_cv_path_EGREP="$ac_dir/$ac_word"
1253    echo "$as_me:1253: found $ac_dir/$ac_word" >&5
1254    break
1255 fi
1256 done
1257
1258   ;;
1259 esac
1260 fi
1261 EGREP=$ac_cv_path_EGREP
1262
1263 if test -n "$EGREP"; then
1264   echo "$as_me:1264: result: $EGREP" >&5
1265 echo "${ECHO_T}$EGREP" >&6
1266 else
1267   echo "$as_me:1267: result: no" >&5
1268 echo "${ECHO_T}no" >&6
1269 fi
1270
1271   test -n "$EGREP" && break
1272 done
1273 test -n "$EGREP" || EGREP=": "
1274
1275      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1275: error: cannot find workable egrep" >&5
1276 echo "$as_me: error: cannot find workable egrep" >&2;}
1277    { (exit 1); exit 1; }; }
1278    fi
1279 fi
1280 echo "$as_me:1280: result: $ac_cv_path_EGREP" >&5
1281 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1282  EGREP="$ac_cv_path_EGREP"
1283
1284 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1285 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1286 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1287 cf_cv_abi_version=${NCURSES_MAJOR}
1288 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1289 cf_cv_timestamp=`date`
1290 echo "$as_me:1290: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1291 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1292
1293 if test -f "$srcdir/VERSION" ; then
1294         echo "$as_me:1294: checking for package version" >&5
1295 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1296
1297         # if there are not enough fields, cut returns the last one...
1298         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1299         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1300         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1301
1302         # this is how CF_BUNDLED_INTL uses $VERSION:
1303         VERSION="$cf_field1"
1304
1305         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1306         test -z "$VERSION_MAJOR" && { { echo "$as_me:1306: error: missing major-version" >&5
1307 echo "$as_me: error: missing major-version" >&2;}
1308    { (exit 1); exit 1; }; }
1309
1310         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1311         test -z "$VERSION_MINOR" && { { echo "$as_me:1311: error: missing minor-version" >&5
1312 echo "$as_me: error: missing minor-version" >&2;}
1313    { (exit 1); exit 1; }; }
1314
1315         echo "$as_me:1315: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1316 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1317
1318         echo "$as_me:1318: checking for package patch date" >&5
1319 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1320         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1321         case .$VERSION_PATCH in
1322         (.)
1323                 { { echo "$as_me:1323: error: missing patch-date $VERSION_PATCH" >&5
1324 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1325    { (exit 1); exit 1; }; }
1326                 ;;
1327         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1328                 ;;
1329         (*)
1330                 { { echo "$as_me:1330: error: illegal patch-date $VERSION_PATCH" >&5
1331 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1332    { (exit 1); exit 1; }; }
1333                 ;;
1334         esac
1335         echo "$as_me:1335: result: $VERSION_PATCH" >&5
1336 echo "${ECHO_T}$VERSION_PATCH" >&6
1337 else
1338         { { echo "$as_me:1338: error: did not find $srcdir/VERSION" >&5
1339 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1340    { (exit 1); exit 1; }; }
1341 fi
1342
1343 # show the actual data that we have for versions:
1344 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1345
1346 echo "${as_me:-configure}:1346: testing ABI VERSION $VERSION ..." 1>&5
1347
1348 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1349
1350 echo "${as_me:-configure}:1350: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1351
1352 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1353
1354 echo "${as_me:-configure}:1354: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1355
1356 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1357
1358 echo "${as_me:-configure}:1358: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1359
1360         cf_PACKAGE=NCURSES
1361         PACKAGE=ncurses
1362
1363 cat >>confdefs.h <<EOF
1364 #define PACKAGE "$PACKAGE"
1365 EOF
1366
1367 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1368
1369         cat >>confdefs.h <<EOF
1370 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1371 EOF
1372
1373         cat >>confdefs.h <<EOF
1374 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1375 EOF
1376
1377 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1378
1379 # Check whether --with-rel-version or --without-rel-version was given.
1380 if test "${with_rel_version+set}" = set; then
1381   withval="$with_rel_version"
1382   { echo "$as_me:1382: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1383 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1384  cf_cv_rel_version=$withval
1385 fi;
1386
1387  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1388  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1389
1390 if test -n "$NCURSES_MAJOR" ; then
1391   case $NCURSES_MAJOR in
1392   ([0-9]*)
1393         ;;
1394   (*)
1395         { { echo "$as_me:1395: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1396 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1397    { (exit 1); exit 1; }; }
1398         ;;
1399   esac
1400 else
1401   { { echo "$as_me:1401: error: Release major-version value is empty" >&5
1402 echo "$as_me: error: Release major-version value is empty" >&2;}
1403    { (exit 1); exit 1; }; }
1404 fi
1405
1406 if test -n "$NCURSES_MINOR" ; then
1407   case $NCURSES_MINOR in
1408   ([0-9]*)
1409         ;;
1410   (*)
1411         { { echo "$as_me:1411: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1412 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1413    { (exit 1); exit 1; }; }
1414         ;;
1415   esac
1416 else
1417   { { echo "$as_me:1417: error: Release minor-version value is empty" >&5
1418 echo "$as_me: error: Release minor-version value is empty" >&2;}
1419    { (exit 1); exit 1; }; }
1420 fi
1421
1422 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1423
1424 # Check whether --with-abi-version or --without-abi-version was given.
1425 if test "${with_abi_version+set}" = set; then
1426   withval="$with_abi_version"
1427
1428         if test "x$cf_cv_abi_version" != "x$withval"
1429         then
1430                 { echo "$as_me:1430: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1431 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1432                 case "$cf_cv_rel_version" in
1433                 (5.*)
1434                         cf_cv_rel_version=$withval.0
1435                         ;;
1436                 (6.*)
1437                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1438                         ;;
1439                 esac
1440         fi
1441         cf_cv_abi_version=$withval
1442 fi;
1443
1444 if test -n "$cf_cv_abi_version" ; then
1445   case $cf_cv_abi_version in
1446   ([0-9]*)
1447         ;;
1448   (*)
1449         { { echo "$as_me:1449: error: ABI version is not a number: $cf_cv_abi_version" >&5
1450 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1451    { (exit 1); exit 1; }; }
1452         ;;
1453   esac
1454 else
1455   { { echo "$as_me:1455: error: ABI version value is empty" >&5
1456 echo "$as_me: error: ABI version value is empty" >&2;}
1457    { (exit 1); exit 1; }; }
1458 fi
1459
1460 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1461 then
1462         case "$cf_cv_rel_version" in
1463         (5.*)
1464                 cf_cv_rel_version=$with_abi_version.0
1465                 ;;
1466         esac
1467 fi
1468
1469 ac_aux_dir=
1470 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1471   if test -f "$ac_dir/install-sh"; then
1472     ac_aux_dir=$ac_dir
1473     ac_install_sh="$ac_aux_dir/install-sh -c"
1474     break
1475   elif test -f "$ac_dir/install.sh"; then
1476     ac_aux_dir=$ac_dir
1477     ac_install_sh="$ac_aux_dir/install.sh -c"
1478     break
1479   elif test -f "$ac_dir/shtool"; then
1480     ac_aux_dir=$ac_dir
1481     ac_install_sh="$ac_aux_dir/shtool install -c"
1482     break
1483   fi
1484 done
1485 if test -z "$ac_aux_dir"; then
1486   { { echo "$as_me:1486: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1487 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1488    { (exit 1); exit 1; }; }
1489 fi
1490 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1491 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1492 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1493
1494 # Make sure we can run config.sub.
1495 $ac_config_sub sun4 >/dev/null 2>&1 ||
1496   { { echo "$as_me:1496: error: cannot run $ac_config_sub" >&5
1497 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1498    { (exit 1); exit 1; }; }
1499
1500 echo "$as_me:1500: checking build system type" >&5
1501 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1502 if test "${ac_cv_build+set}" = set; then
1503   echo $ECHO_N "(cached) $ECHO_C" >&6
1504 else
1505   ac_cv_build_alias=$build_alias
1506 test -z "$ac_cv_build_alias" &&
1507   ac_cv_build_alias=`$ac_config_guess`
1508 test -z "$ac_cv_build_alias" &&
1509   { { echo "$as_me:1509: error: cannot guess build type; you must specify one" >&5
1510 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1511    { (exit 1); exit 1; }; }
1512 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1513   { { echo "$as_me:1513: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1514 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1515    { (exit 1); exit 1; }; }
1516
1517 fi
1518 echo "$as_me:1518: result: $ac_cv_build" >&5
1519 echo "${ECHO_T}$ac_cv_build" >&6
1520 build=$ac_cv_build
1521 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1522 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1523 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1524
1525 echo "$as_me:1525: checking host system type" >&5
1526 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1527 if test "${ac_cv_host+set}" = set; then
1528   echo $ECHO_N "(cached) $ECHO_C" >&6
1529 else
1530   ac_cv_host_alias=$host_alias
1531 test -z "$ac_cv_host_alias" &&
1532   ac_cv_host_alias=$ac_cv_build_alias
1533 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1534   { { echo "$as_me:1534: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1535 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1536    { (exit 1); exit 1; }; }
1537
1538 fi
1539 echo "$as_me:1539: result: $ac_cv_host" >&5
1540 echo "${ECHO_T}$ac_cv_host" >&6
1541 host=$ac_cv_host
1542 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1543 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1544 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1545
1546 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1547         echo "$as_me:1547: checking target system type" >&5
1548 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1549 if test "${ac_cv_target+set}" = set; then
1550   echo $ECHO_N "(cached) $ECHO_C" >&6
1551 else
1552   ac_cv_target_alias=$target_alias
1553 test "x$ac_cv_target_alias" = "x" &&
1554   ac_cv_target_alias=$ac_cv_host_alias
1555 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1556   { { echo "$as_me:1556: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1557 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1558    { (exit 1); exit 1; }; }
1559
1560 fi
1561 echo "$as_me:1561: result: $ac_cv_target" >&5
1562 echo "${ECHO_T}$ac_cv_target" >&6
1563 target=$ac_cv_target
1564 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1565 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1566 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1567
1568 # The aliases save the names the user supplied, while $host etc.
1569 # will get canonicalized.
1570 test -n "$target_alias" &&
1571   test "$program_prefix$program_suffix$program_transform_name" = \
1572     NONENONEs,x,x, &&
1573   program_prefix=${target_alias}-
1574         system_name="$host_os"
1575 else
1576         system_name="`(uname -s -r) 2>/dev/null`"
1577         if test -z "$system_name" ; then
1578                 system_name="`(hostname) 2>/dev/null`"
1579         fi
1580 fi
1581 test -n "$system_name" &&
1582 cat >>confdefs.h <<EOF
1583 #define SYSTEM_NAME "$system_name"
1584 EOF
1585
1586 if test "${cf_cv_system_name+set}" = set; then
1587   echo $ECHO_N "(cached) $ECHO_C" >&6
1588 else
1589   cf_cv_system_name="$system_name"
1590 fi
1591
1592 test -z "$system_name" && system_name="$cf_cv_system_name"
1593 test -n "$cf_cv_system_name" && echo "$as_me:1593: result: Configuring for $cf_cv_system_name" >&5
1594 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1595
1596 if test ".$system_name" != ".$cf_cv_system_name" ; then
1597         echo "$as_me:1597: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1598 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1599         { { echo "$as_me:1599: error: \"Please remove config.cache and try again.\"" >&5
1600 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1601    { (exit 1); exit 1; }; }
1602 fi
1603
1604 # Check whether --with-system-type or --without-system-type was given.
1605 if test "${with_system_type+set}" = set; then
1606   withval="$with_system_type"
1607   { echo "$as_me:1607: WARNING: overriding system type to $withval" >&5
1608 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1609         cf_cv_system_name=$withval
1610         host_os=$withval
1611
1612 fi;
1613
1614 ###     Save the given $CFLAGS to allow user-override.
1615 cf_user_CFLAGS="$CFLAGS"
1616
1617 ###     Default install-location
1618 echo "$as_me:1618: checking for fgrep" >&5
1619 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1620 if test "${ac_cv_path_FGREP+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1624    then ac_cv_path_FGREP="$GREP -F"
1625    else
1626      for ac_prog in gfgrep fgrep
1627 do
1628   # Extract the first word of "$ac_prog", so it can be a program name with args.
1629 set dummy $ac_prog; ac_word=$2
1630 echo "$as_me:1630: checking for $ac_word" >&5
1631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1632 if test "${ac_cv_path_FGREP+set}" = set; then
1633   echo $ECHO_N "(cached) $ECHO_C" >&6
1634 else
1635   case $FGREP in
1636   [\\/]* | ?:[\\/]*)
1637   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1638   ;;
1639   *)
1640   ac_save_IFS=$IFS; IFS=$ac_path_separator
1641 ac_dummy="$PATH"
1642 for ac_dir in $ac_dummy; do
1643   IFS=$ac_save_IFS
1644   test -z "$ac_dir" && ac_dir=.
1645   if $as_executable_p "$ac_dir/$ac_word"; then
1646    ac_cv_path_FGREP="$ac_dir/$ac_word"
1647    echo "$as_me:1647: found $ac_dir/$ac_word" >&5
1648    break
1649 fi
1650 done
1651
1652   ;;
1653 esac
1654 fi
1655 FGREP=$ac_cv_path_FGREP
1656
1657 if test -n "$FGREP"; then
1658   echo "$as_me:1658: result: $FGREP" >&5
1659 echo "${ECHO_T}$FGREP" >&6
1660 else
1661   echo "$as_me:1661: result: no" >&5
1662 echo "${ECHO_T}no" >&6
1663 fi
1664
1665   test -n "$FGREP" && break
1666 done
1667 test -n "$FGREP" || FGREP=": "
1668
1669      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1669: error: cannot find workable fgrep" >&5
1670 echo "$as_me: error: cannot find workable fgrep" >&2;}
1671    { (exit 1); exit 1; }; }
1672    fi
1673 fi
1674 echo "$as_me:1674: result: $ac_cv_path_FGREP" >&5
1675 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1676  FGREP="$ac_cv_path_FGREP"
1677
1678 echo "$as_me:1678: checking for prefix" >&5
1679 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1680 if test "x$prefix" = "xNONE" ; then
1681         case "$cf_cv_system_name" in
1682                 # non-vendor systems don't have a conflict
1683         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1684                 prefix=/usr
1685                 ;;
1686         (*)     prefix=$ac_default_prefix
1687                 ;;
1688         esac
1689 fi
1690 echo "$as_me:1690: result: $prefix" >&5
1691 echo "${ECHO_T}$prefix" >&6
1692
1693 if test "x$prefix" = "xNONE" ; then
1694 echo "$as_me:1694: checking for default include-directory" >&5
1695 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1696 test -n "$verbose" && echo 1>&6
1697 for cf_symbol in \
1698         "$includedir" \
1699         "$includedir/ncurses" \
1700         "$prefix/include" \
1701         "$prefix/include/ncurses" \
1702         /usr/local/include \
1703         /usr/local/include/ncurses \
1704         /usr/include \
1705         /usr/include/ncurses
1706 do
1707         cf_dir=`eval echo "$cf_symbol"`
1708         if test -f "$cf_dir/curses.h" ; then
1709         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1710                 includedir="$cf_symbol"
1711                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1712                 break
1713         fi
1714         fi
1715         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1716 done
1717 echo "$as_me:1717: result: $includedir" >&5
1718 echo "${ECHO_T}$includedir" >&6
1719 fi
1720
1721 ### Defaults for ncurses ABI
1722
1723 case x$cf_cv_abi_version in
1724 (x[6789])
1725         cf_dft_ext_colors=yes
1726         cf_dft_ext_const=yes
1727         cf_dft_ext_mouse=yes
1728         cf_dft_ext_putwin=yes
1729         cf_dft_ext_spfuncs=yes
1730         cf_dft_filter_syms=yes
1731         cf_dft_chtype=uint32_t
1732         cf_dft_mmask_t=uint32_t
1733         cf_dft_interop=yes
1734         cf_dft_tparm_arg=intptr_t
1735         cf_dft_with_lp64=yes
1736         ;;
1737 (*)
1738         cf_dft_ext_colors=no
1739         cf_dft_ext_const=no
1740         cf_dft_ext_mouse=no
1741         cf_dft_ext_putwin=no
1742         cf_dft_ext_spfuncs=no
1743         cf_dft_filter_syms=no
1744         cf_dft_chtype=auto
1745         cf_dft_mmask_t=auto
1746         cf_dft_interop=no
1747         cf_dft_tparm_arg=long
1748         cf_dft_with_lp64=no
1749         ;;
1750 esac
1751
1752 ###     Checks for programs.
1753
1754 # Check whether --with-ada or --without-ada was given.
1755 if test "${with_ada+set}" = set; then
1756   withval="$with_ada"
1757   cf_with_ada=$withval
1758 else
1759   cf_with_ada=yes
1760 fi;
1761
1762 if test "x$cf_with_ada" = xyes
1763 then
1764         cf_prog_cc="gnatgcc gcc cc"
1765 else
1766         cf_prog_cc="gcc cc"
1767 fi
1768
1769 ac_ext=c
1770 ac_cpp='$CPP $CPPFLAGS'
1771 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1772 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1773 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1774 ac_main_return="return"
1775 if test -n "$ac_tool_prefix"; then
1776   for ac_prog in $cf_prog_cc
1777   do
1778     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1779 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1780 echo "$as_me:1780: checking for $ac_word" >&5
1781 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1782 if test "${ac_cv_prog_CC+set}" = set; then
1783   echo $ECHO_N "(cached) $ECHO_C" >&6
1784 else
1785   if test -n "$CC"; then
1786   ac_cv_prog_CC="$CC" # Let the user override the test.
1787 else
1788   ac_save_IFS=$IFS; IFS=$ac_path_separator
1789 ac_dummy="$PATH"
1790 for ac_dir in $ac_dummy; do
1791   IFS=$ac_save_IFS
1792   test -z "$ac_dir" && ac_dir=.
1793   $as_executable_p "$ac_dir/$ac_word" || continue
1794 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1795 echo "$as_me:1795: found $ac_dir/$ac_word" >&5
1796 break
1797 done
1798
1799 fi
1800 fi
1801 CC=$ac_cv_prog_CC
1802 if test -n "$CC"; then
1803   echo "$as_me:1803: result: $CC" >&5
1804 echo "${ECHO_T}$CC" >&6
1805 else
1806   echo "$as_me:1806: result: no" >&5
1807 echo "${ECHO_T}no" >&6
1808 fi
1809
1810     test -n "$CC" && break
1811   done
1812 fi
1813 if test -z "$CC"; then
1814   ac_ct_CC=$CC
1815   for ac_prog in $cf_prog_cc
1816 do
1817   # Extract the first word of "$ac_prog", so it can be a program name with args.
1818 set dummy $ac_prog; ac_word=$2
1819 echo "$as_me:1819: checking for $ac_word" >&5
1820 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1821 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1822   echo $ECHO_N "(cached) $ECHO_C" >&6
1823 else
1824   if test -n "$ac_ct_CC"; then
1825   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1826 else
1827   ac_save_IFS=$IFS; IFS=$ac_path_separator
1828 ac_dummy="$PATH"
1829 for ac_dir in $ac_dummy; do
1830   IFS=$ac_save_IFS
1831   test -z "$ac_dir" && ac_dir=.
1832   $as_executable_p "$ac_dir/$ac_word" || continue
1833 ac_cv_prog_ac_ct_CC="$ac_prog"
1834 echo "$as_me:1834: found $ac_dir/$ac_word" >&5
1835 break
1836 done
1837
1838 fi
1839 fi
1840 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1841 if test -n "$ac_ct_CC"; then
1842   echo "$as_me:1842: result: $ac_ct_CC" >&5
1843 echo "${ECHO_T}$ac_ct_CC" >&6
1844 else
1845   echo "$as_me:1845: result: no" >&5
1846 echo "${ECHO_T}no" >&6
1847 fi
1848
1849   test -n "$ac_ct_CC" && break
1850 done
1851
1852   CC=$ac_ct_CC
1853 fi
1854
1855 test -z "$CC" && { { echo "$as_me:1855: error: no acceptable cc found in \$PATH" >&5
1856 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1857    { (exit 1); exit 1; }; }
1858
1859 # Provide some information about the compiler.
1860 echo "$as_me:1860:" \
1861      "checking for C compiler version" >&5
1862 ac_compiler=`set X $ac_compile; echo "$2"`
1863 { (eval echo "$as_me:1863: \"$ac_compiler --version </dev/null >&5\"") >&5
1864   (eval $ac_compiler --version </dev/null >&5) 2>&5
1865   ac_status=$?
1866   echo "$as_me:1866: \$? = $ac_status" >&5
1867   (exit "$ac_status"); }
1868 { (eval echo "$as_me:1868: \"$ac_compiler -v </dev/null >&5\"") >&5
1869   (eval $ac_compiler -v </dev/null >&5) 2>&5
1870   ac_status=$?
1871   echo "$as_me:1871: \$? = $ac_status" >&5
1872   (exit "$ac_status"); }
1873 { (eval echo "$as_me:1873: \"$ac_compiler -V </dev/null >&5\"") >&5
1874   (eval $ac_compiler -V </dev/null >&5) 2>&5
1875   ac_status=$?
1876   echo "$as_me:1876: \$? = $ac_status" >&5
1877   (exit "$ac_status"); }
1878
1879 cat >"conftest.$ac_ext" <<_ACEOF
1880 #line 1880 "configure"
1881 #include "confdefs.h"
1882
1883 int
1884 main (void)
1885 {
1886
1887   ;
1888   return 0;
1889 }
1890 _ACEOF
1891 ac_clean_files_save=$ac_clean_files
1892 ac_clean_files="$ac_clean_files a.out a.exe"
1893 # Try to create an executable without -o first, disregard a.out.
1894 # It will help us diagnose broken compilers, and finding out an intuition
1895 # of exeext.
1896 echo "$as_me:1896: checking for C compiler default output" >&5
1897 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1898 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1899 if { (eval echo "$as_me:1899: \"$ac_link_default\"") >&5
1900   (eval $ac_link_default) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit "$ac_status"); }; then
1904   # Find the output, starting from the most likely.  This scheme is
1905 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1906 # resort.
1907 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1908                 ls a.out conftest 2>/dev/null;
1909                 ls a.* conftest.* 2>/dev/null`; do
1910   case $ac_file in
1911     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1912     a.out ) # We found the default executable, but exeext='' is most
1913             # certainly right.
1914             break;;
1915     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1916           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1917           export ac_cv_exeext
1918           break;;
1919     * ) break;;
1920   esac
1921 done
1922 else
1923   echo "$as_me: failed program was:" >&5
1924 cat "conftest.$ac_ext" >&5
1925 { { echo "$as_me:1925: error: C compiler cannot create executables" >&5
1926 echo "$as_me: error: C compiler cannot create executables" >&2;}
1927    { (exit 77); exit 77; }; }
1928 fi
1929
1930 ac_exeext=$ac_cv_exeext
1931 echo "$as_me:1931: result: $ac_file" >&5
1932 echo "${ECHO_T}$ac_file" >&6
1933
1934 # Check the compiler produces executables we can run.  If not, either
1935 # the compiler is broken, or we cross compile.
1936 echo "$as_me:1936: checking whether the C compiler works" >&5
1937 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1938 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1939 # If not cross compiling, check that we can run a simple program.
1940 if test "$cross_compiling" != yes; then
1941   if { ac_try='./$ac_file'
1942   { (eval echo "$as_me:1942: \"$ac_try\"") >&5
1943   (eval $ac_try) 2>&5
1944   ac_status=$?
1945   echo "$as_me:1945: \$? = $ac_status" >&5
1946   (exit "$ac_status"); }; }; then
1947     cross_compiling=no
1948   else
1949     if test "$cross_compiling" = maybe; then
1950         cross_compiling=yes
1951     else
1952         { { echo "$as_me:1952: error: cannot run C compiled programs.
1953 If you meant to cross compile, use \`--host'." >&5
1954 echo "$as_me: error: cannot run C compiled programs.
1955 If you meant to cross compile, use \`--host'." >&2;}
1956    { (exit 1); exit 1; }; }
1957     fi
1958   fi
1959 fi
1960 echo "$as_me:1960: result: yes" >&5
1961 echo "${ECHO_T}yes" >&6
1962
1963 rm -f a.out a.exe "conftest$ac_cv_exeext"
1964 ac_clean_files=$ac_clean_files_save
1965 # Check the compiler produces executables we can run.  If not, either
1966 # the compiler is broken, or we cross compile.
1967 echo "$as_me:1967: checking whether we are cross compiling" >&5
1968 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1969 echo "$as_me:1969: result: $cross_compiling" >&5
1970 echo "${ECHO_T}$cross_compiling" >&6
1971
1972 echo "$as_me:1972: checking for executable suffix" >&5
1973 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1974 if { (eval echo "$as_me:1974: \"$ac_link\"") >&5
1975   (eval $ac_link) 2>&5
1976   ac_status=$?
1977   echo "$as_me:1977: \$? = $ac_status" >&5
1978   (exit "$ac_status"); }; then
1979   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1980 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1981 # work properly (i.e., refer to `conftest.exe'), while it won't with
1982 # `rm'.
1983 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1984   case $ac_file in
1985     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1986     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1987           export ac_cv_exeext
1988           break;;
1989     * ) break;;
1990   esac
1991 done
1992 else
1993   { { echo "$as_me:1993: error: cannot compute EXEEXT: cannot compile and link" >&5
1994 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1995    { (exit 1); exit 1; }; }
1996 fi
1997
1998 rm -f "conftest$ac_cv_exeext"
1999 echo "$as_me:1999: result: $ac_cv_exeext" >&5
2000 echo "${ECHO_T}$ac_cv_exeext" >&6
2001
2002 rm -f "conftest.$ac_ext"
2003 EXEEXT=$ac_cv_exeext
2004 ac_exeext=$EXEEXT
2005 echo "$as_me:2005: checking for object suffix" >&5
2006 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2007 if test "${ac_cv_objext+set}" = set; then
2008   echo $ECHO_N "(cached) $ECHO_C" >&6
2009 else
2010   cat >"conftest.$ac_ext" <<_ACEOF
2011 #line 2011 "configure"
2012 #include "confdefs.h"
2013
2014 int
2015 main (void)
2016 {
2017
2018   ;
2019   return 0;
2020 }
2021 _ACEOF
2022 rm -f conftest.o conftest.obj
2023 if { (eval echo "$as_me:2023: \"$ac_compile\"") >&5
2024   (eval $ac_compile) 2>&5
2025   ac_status=$?
2026   echo "$as_me:2026: \$? = $ac_status" >&5
2027   (exit "$ac_status"); }; then
2028   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2029   case $ac_file in
2030     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2031     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2032        break;;
2033   esac
2034 done
2035 else
2036   echo "$as_me: failed program was:" >&5
2037 cat "conftest.$ac_ext" >&5
2038 { { echo "$as_me:2038: error: cannot compute OBJEXT: cannot compile" >&5
2039 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2040    { (exit 1); exit 1; }; }
2041 fi
2042
2043 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2044 fi
2045 echo "$as_me:2045: result: $ac_cv_objext" >&5
2046 echo "${ECHO_T}$ac_cv_objext" >&6
2047 OBJEXT=$ac_cv_objext
2048 ac_objext=$OBJEXT
2049 echo "$as_me:2049: checking whether we are using the GNU C compiler" >&5
2050 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2051 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2052   echo $ECHO_N "(cached) $ECHO_C" >&6
2053 else
2054   cat >"conftest.$ac_ext" <<_ACEOF
2055 #line 2055 "configure"
2056 #include "confdefs.h"
2057
2058 int
2059 main (void)
2060 {
2061 #ifndef __GNUC__
2062        choke me
2063 #endif
2064
2065   ;
2066   return 0;
2067 }
2068 _ACEOF
2069 rm -f "conftest.$ac_objext"
2070 if { (eval echo "$as_me:2070: \"$ac_compile\"") >&5
2071   (eval $ac_compile) 2>&5
2072   ac_status=$?
2073   echo "$as_me:2073: \$? = $ac_status" >&5
2074   (exit "$ac_status"); } &&
2075          { ac_try='test -s "conftest.$ac_objext"'
2076   { (eval echo "$as_me:2076: \"$ac_try\"") >&5
2077   (eval $ac_try) 2>&5
2078   ac_status=$?
2079   echo "$as_me:2079: \$? = $ac_status" >&5
2080   (exit "$ac_status"); }; }; then
2081   ac_compiler_gnu=yes
2082 else
2083   echo "$as_me: failed program was:" >&5
2084 cat "conftest.$ac_ext" >&5
2085 ac_compiler_gnu=no
2086 fi
2087 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2088 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2089
2090 fi
2091 echo "$as_me:2091: result: $ac_cv_c_compiler_gnu" >&5
2092 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2093 GCC=`test $ac_compiler_gnu = yes && echo yes`
2094 ac_test_CFLAGS=${CFLAGS+set}
2095 ac_save_CFLAGS=$CFLAGS
2096 CFLAGS="-g"
2097 echo "$as_me:2097: checking whether $CC accepts -g" >&5
2098 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2099 if test "${ac_cv_prog_cc_g+set}" = set; then
2100   echo $ECHO_N "(cached) $ECHO_C" >&6
2101 else
2102   cat >"conftest.$ac_ext" <<_ACEOF
2103 #line 2103 "configure"
2104 #include "confdefs.h"
2105
2106 int
2107 main (void)
2108 {
2109
2110   ;
2111   return 0;
2112 }
2113 _ACEOF
2114 rm -f "conftest.$ac_objext"
2115 if { (eval echo "$as_me:2115: \"$ac_compile\"") >&5
2116   (eval $ac_compile) 2>&5
2117   ac_status=$?
2118   echo "$as_me:2118: \$? = $ac_status" >&5
2119   (exit "$ac_status"); } &&
2120          { ac_try='test -s "conftest.$ac_objext"'
2121   { (eval echo "$as_me:2121: \"$ac_try\"") >&5
2122   (eval $ac_try) 2>&5
2123   ac_status=$?
2124   echo "$as_me:2124: \$? = $ac_status" >&5
2125   (exit "$ac_status"); }; }; then
2126   ac_cv_prog_cc_g=yes
2127 else
2128   echo "$as_me: failed program was:" >&5
2129 cat "conftest.$ac_ext" >&5
2130 ac_cv_prog_cc_g=no
2131 fi
2132 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2133 fi
2134 echo "$as_me:2134: result: $ac_cv_prog_cc_g" >&5
2135 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2136 if test "$ac_test_CFLAGS" = set; then
2137   CFLAGS=$ac_save_CFLAGS
2138 elif test $ac_cv_prog_cc_g = yes; then
2139   if test "$GCC" = yes; then
2140     CFLAGS="-g -O2"
2141   else
2142     CFLAGS="-g"
2143   fi
2144 else
2145   if test "$GCC" = yes; then
2146     CFLAGS="-O2"
2147   else
2148     CFLAGS=
2149   fi
2150 fi
2151 # Some people use a C++ compiler to compile C.  Since we use `exit',
2152 # in C++ we need to declare it.  In case someone uses the same compiler
2153 # for both compiling C and C++ we need to have the C++ compiler decide
2154 # the declaration of exit, since it's the most demanding environment.
2155 cat >"conftest.$ac_ext" <<_ACEOF
2156 #ifndef __cplusplus
2157   choke me
2158 #endif
2159 _ACEOF
2160 rm -f "conftest.$ac_objext"
2161 if { (eval echo "$as_me:2161: \"$ac_compile\"") >&5
2162   (eval $ac_compile) 2>&5
2163   ac_status=$?
2164   echo "$as_me:2164: \$? = $ac_status" >&5
2165   (exit "$ac_status"); } &&
2166          { ac_try='test -s "conftest.$ac_objext"'
2167   { (eval echo "$as_me:2167: \"$ac_try\"") >&5
2168   (eval $ac_try) 2>&5
2169   ac_status=$?
2170   echo "$as_me:2170: \$? = $ac_status" >&5
2171   (exit "$ac_status"); }; }; then
2172   for ac_declaration in \
2173    ''\
2174    '#include <stdlib.h>' \
2175    'extern "C" void std::exit (int) throw (); using std::exit;' \
2176    'extern "C" void std::exit (int); using std::exit;' \
2177    'extern "C" void exit (int) throw ();' \
2178    'extern "C" void exit (int);' \
2179    'void exit (int);'
2180 do
2181   cat >"conftest.$ac_ext" <<_ACEOF
2182 #line 2182 "configure"
2183 #include "confdefs.h"
2184 #include <stdlib.h>
2185 $ac_declaration
2186 int
2187 main (void)
2188 {
2189 exit (42);
2190   ;
2191   return 0;
2192 }
2193 _ACEOF
2194 rm -f "conftest.$ac_objext"
2195 if { (eval echo "$as_me:2195: \"$ac_compile\"") >&5
2196   (eval $ac_compile) 2>&5
2197   ac_status=$?
2198   echo "$as_me:2198: \$? = $ac_status" >&5
2199   (exit "$ac_status"); } &&
2200          { ac_try='test -s "conftest.$ac_objext"'
2201   { (eval echo "$as_me:2201: \"$ac_try\"") >&5
2202   (eval $ac_try) 2>&5
2203   ac_status=$?
2204   echo "$as_me:2204: \$? = $ac_status" >&5
2205   (exit "$ac_status"); }; }; then
2206   :
2207 else
2208   echo "$as_me: failed program was:" >&5
2209 cat "conftest.$ac_ext" >&5
2210 continue
2211 fi
2212 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2213   cat >"conftest.$ac_ext" <<_ACEOF
2214 #line 2214 "configure"
2215 #include "confdefs.h"
2216 $ac_declaration
2217 int
2218 main (void)
2219 {
2220 exit (42);
2221   ;
2222   return 0;
2223 }
2224 _ACEOF
2225 rm -f "conftest.$ac_objext"
2226 if { (eval echo "$as_me:2226: \"$ac_compile\"") >&5
2227   (eval $ac_compile) 2>&5
2228   ac_status=$?
2229   echo "$as_me:2229: \$? = $ac_status" >&5
2230   (exit "$ac_status"); } &&
2231          { ac_try='test -s "conftest.$ac_objext"'
2232   { (eval echo "$as_me:2232: \"$ac_try\"") >&5
2233   (eval $ac_try) 2>&5
2234   ac_status=$?
2235   echo "$as_me:2235: \$? = $ac_status" >&5
2236   (exit "$ac_status"); }; }; then
2237   break
2238 else
2239   echo "$as_me: failed program was:" >&5
2240 cat "conftest.$ac_ext" >&5
2241 fi
2242 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2243 done
2244 rm -rf conftest*
2245 if test -n "$ac_declaration"; then
2246   echo '#ifdef __cplusplus' >>confdefs.h
2247   echo "$ac_declaration"    >>confdefs.h
2248   echo '#endif'             >>confdefs.h
2249 fi
2250
2251 else
2252   echo "$as_me: failed program was:" >&5
2253 cat "conftest.$ac_ext" >&5
2254 fi
2255 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2256 ac_ext=c
2257 ac_cpp='$CPP $CPPFLAGS'
2258 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2259 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2260 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2261 ac_main_return="return"
2262
2263 GCC_VERSION=none
2264 if test "$GCC" = yes ; then
2265         echo "$as_me:2265: checking version of $CC" >&5
2266 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2267         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.].*//'`"
2268         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2269         echo "$as_me:2269: result: $GCC_VERSION" >&5
2270 echo "${ECHO_T}$GCC_VERSION" >&6
2271 fi
2272
2273 INTEL_COMPILER=no
2274
2275 if test "$GCC" = yes ; then
2276         case "$host_os" in
2277         (linux*|gnu*)
2278                 echo "$as_me:2278: checking if this is really Intel C compiler" >&5
2279 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2280                 cf_save_CFLAGS="$CFLAGS"
2281                 CFLAGS="$CFLAGS -no-gcc"
2282                 cat >"conftest.$ac_ext" <<_ACEOF
2283 #line 2283 "configure"
2284 #include "confdefs.h"
2285
2286 int
2287 main (void)
2288 {
2289
2290 #ifdef __INTEL_COMPILER
2291 #else
2292 make an error
2293 #endif
2294
2295   ;
2296   return 0;
2297 }
2298 _ACEOF
2299 rm -f "conftest.$ac_objext"
2300 if { (eval echo "$as_me:2300: \"$ac_compile\"") >&5
2301   (eval $ac_compile) 2>&5
2302   ac_status=$?
2303   echo "$as_me:2303: \$? = $ac_status" >&5
2304   (exit "$ac_status"); } &&
2305          { ac_try='test -s "conftest.$ac_objext"'
2306   { (eval echo "$as_me:2306: \"$ac_try\"") >&5
2307   (eval $ac_try) 2>&5
2308   ac_status=$?
2309   echo "$as_me:2309: \$? = $ac_status" >&5
2310   (exit "$ac_status"); }; }; then
2311   INTEL_COMPILER=yes
2312 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2313
2314 else
2315   echo "$as_me: failed program was:" >&5
2316 cat "conftest.$ac_ext" >&5
2317 fi
2318 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2319                 CFLAGS="$cf_save_CFLAGS"
2320                 echo "$as_me:2320: result: $INTEL_COMPILER" >&5
2321 echo "${ECHO_T}$INTEL_COMPILER" >&6
2322                 ;;
2323         esac
2324 fi
2325
2326 CLANG_COMPILER=no
2327
2328 if test "$GCC" = yes ; then
2329         echo "$as_me:2329: checking if this is really Clang C compiler" >&5
2330 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2331         cf_save_CFLAGS="$CFLAGS"
2332         cat >"conftest.$ac_ext" <<_ACEOF
2333 #line 2333 "configure"
2334 #include "confdefs.h"
2335
2336 int
2337 main (void)
2338 {
2339
2340 #ifdef __clang__
2341 #else
2342 make an error
2343 #endif
2344
2345   ;
2346   return 0;
2347 }
2348 _ACEOF
2349 rm -f "conftest.$ac_objext"
2350 if { (eval echo "$as_me:2350: \"$ac_compile\"") >&5
2351   (eval $ac_compile) 2>&5
2352   ac_status=$?
2353   echo "$as_me:2353: \$? = $ac_status" >&5
2354   (exit "$ac_status"); } &&
2355          { ac_try='test -s "conftest.$ac_objext"'
2356   { (eval echo "$as_me:2356: \"$ac_try\"") >&5
2357   (eval $ac_try) 2>&5
2358   ac_status=$?
2359   echo "$as_me:2359: \$? = $ac_status" >&5
2360   (exit "$ac_status"); }; }; then
2361   CLANG_COMPILER=yes
2362
2363 else
2364   echo "$as_me: failed program was:" >&5
2365 cat "conftest.$ac_ext" >&5
2366 fi
2367 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2368         CFLAGS="$cf_save_CFLAGS"
2369         echo "$as_me:2369: result: $CLANG_COMPILER" >&5
2370 echo "${ECHO_T}$CLANG_COMPILER" >&6
2371 fi
2372
2373 CLANG_VERSION=none
2374
2375 if test "x$CLANG_COMPILER" = "xyes" ; then
2376         case "$CC" in
2377         (c[1-9][0-9]|*/c[1-9][0-9])
2378                 { echo "$as_me:2378: WARNING: replacing broken compiler alias $CC" >&5
2379 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2380                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2381                 CC=clang
2382                 ;;
2383         esac
2384
2385         echo "$as_me:2385: checking version of $CC" >&5
2386 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2387         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.].*//'`"
2388         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2389         echo "$as_me:2389: result: $CLANG_VERSION" >&5
2390 echo "${ECHO_T}$CLANG_VERSION" >&6
2391
2392         for cf_clang_opt in \
2393                 -Qunused-arguments \
2394                 -Wno-error=implicit-function-declaration
2395         do
2396                 echo "$as_me:2396: checking if option $cf_clang_opt works" >&5
2397 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2398                 cf_save_CFLAGS="$CFLAGS"
2399                 CFLAGS="$CFLAGS $cf_clang_opt"
2400                 cat >"conftest.$ac_ext" <<_ACEOF
2401 #line 2401 "configure"
2402 #include "confdefs.h"
2403
2404                         #include <stdio.h>
2405 int
2406 main (void)
2407 {
2408
2409                         printf("hello!\\n");
2410   ;
2411   return 0;
2412 }
2413 _ACEOF
2414 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2415 if { (eval echo "$as_me:2415: \"$ac_link\"") >&5
2416   (eval $ac_link) 2>&5
2417   ac_status=$?
2418   echo "$as_me:2418: \$? = $ac_status" >&5
2419   (exit "$ac_status"); } &&
2420          { ac_try='test -s "conftest$ac_exeext"'
2421   { (eval echo "$as_me:2421: \"$ac_try\"") >&5
2422   (eval $ac_try) 2>&5
2423   ac_status=$?
2424   echo "$as_me:2424: \$? = $ac_status" >&5
2425   (exit "$ac_status"); }; }; then
2426
2427                         cf_clang_optok=yes
2428 else
2429   echo "$as_me: failed program was:" >&5
2430 cat "conftest.$ac_ext" >&5
2431
2432                         cf_clang_optok=no
2433 fi
2434 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2435                 echo "$as_me:2435: result: $cf_clang_optok" >&5
2436 echo "${ECHO_T}$cf_clang_optok" >&6
2437                 CFLAGS="$cf_save_CFLAGS"
2438                 if test "$cf_clang_optok" = yes; then
2439                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2440
2441 echo "${as_me:-configure}:2441: testing adding option $cf_clang_opt ..." 1>&5
2442
2443         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2444         CFLAGS="${CFLAGS}$cf_clang_opt"
2445
2446                 fi
2447         done
2448 fi
2449
2450 echo "$as_me:2450: checking for $CC option to accept ANSI C" >&5
2451 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2452 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2453   echo $ECHO_N "(cached) $ECHO_C" >&6
2454 else
2455   ac_cv_prog_cc_stdc=no
2456 ac_save_CC=$CC
2457 cat >"conftest.$ac_ext" <<_ACEOF
2458 #line 2458 "configure"
2459 #include "confdefs.h"
2460 #include <stdarg.h>
2461 #include <stdio.h>
2462 #include <sys/types.h>
2463 #include <sys/stat.h>
2464 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2465 struct buf { int x; };
2466 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2467 static char *e (p, i)
2468      char **p;
2469      int i;
2470 {
2471   return p[i];
2472 }
2473 static char *f (char * (*g) (char **, int), char **p, ...)
2474 {
2475   char *s;
2476   va_list v;
2477   va_start (v,p);
2478   s = g (p, va_arg (v,int));
2479   va_end (v);
2480   return s;
2481 }
2482 int test (int i, double x);
2483 struct s1 {int (*f) (int a);};
2484 struct s2 {int (*f) (double a);};
2485 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2486 int argc;
2487 char **argv;
2488 int
2489 main (void)
2490 {
2491 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2492   ;
2493   return 0;
2494 }
2495 _ACEOF
2496 # Don't try gcc -ansi; that turns off useful extensions and
2497 # breaks some systems' header files.
2498 # AIX                   -qlanglvl=ansi
2499 # Ultrix and OSF/1      -std1
2500 # HP-UX 10.20 and later -Ae
2501 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2502 # SVR4                  -Xc -D__EXTENSIONS__
2503 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2504 do
2505   CC="$ac_save_CC $ac_arg"
2506   rm -f "conftest.$ac_objext"
2507 if { (eval echo "$as_me:2507: \"$ac_compile\"") >&5
2508   (eval $ac_compile) 2>&5
2509   ac_status=$?
2510   echo "$as_me:2510: \$? = $ac_status" >&5
2511   (exit "$ac_status"); } &&
2512          { ac_try='test -s "conftest.$ac_objext"'
2513   { (eval echo "$as_me:2513: \"$ac_try\"") >&5
2514   (eval $ac_try) 2>&5
2515   ac_status=$?
2516   echo "$as_me:2516: \$? = $ac_status" >&5
2517   (exit "$ac_status"); }; }; then
2518   ac_cv_prog_cc_stdc=$ac_arg
2519 break
2520 else
2521   echo "$as_me: failed program was:" >&5
2522 cat "conftest.$ac_ext" >&5
2523 fi
2524 rm -f "conftest.$ac_objext"
2525 done
2526 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2527 CC=$ac_save_CC
2528
2529 fi
2530
2531 case "x$ac_cv_prog_cc_stdc" in
2532   x|xno)
2533     echo "$as_me:2533: result: none needed" >&5
2534 echo "${ECHO_T}none needed" >&6 ;;
2535   *)
2536     echo "$as_me:2536: result: $ac_cv_prog_cc_stdc" >&5
2537 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2538     CC="$CC $ac_cv_prog_cc_stdc" ;;
2539 esac
2540
2541 # This should have been defined by AC_PROG_CC
2542 : "${CC:=cc}"
2543
2544 echo "$as_me:2544: checking \$CFLAGS variable" >&5
2545 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2546 case "x$CFLAGS" in
2547 (*-[IUD]*)
2548         echo "$as_me:2548: result: broken" >&5
2549 echo "${ECHO_T}broken" >&6
2550         { echo "$as_me:2550: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2551 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2552         cf_flags="$CFLAGS"
2553         CFLAGS=
2554         for cf_arg in $cf_flags
2555         do
2556
2557 cf_fix_cppflags=no
2558 cf_new_cflags=
2559 cf_new_cppflags=
2560 cf_new_extra_cppflags=
2561
2562 for cf_add_cflags in $cf_arg
2563 do
2564 case "$cf_fix_cppflags" in
2565 (no)
2566         case "$cf_add_cflags" in
2567         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2568                 case "$cf_add_cflags" in
2569                 (-D*)
2570                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2571
2572                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2573                                 && test -z "${cf_tst_cflags}" \
2574                                 && cf_fix_cppflags=yes
2575
2576                         if test "$cf_fix_cppflags" = yes ; then
2577
2578         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2579         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2580
2581                                 continue
2582                         elif test "${cf_tst_cflags}" = "\"'" ; then
2583
2584         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2585         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2586
2587                                 continue
2588                         fi
2589                         ;;
2590                 esac
2591                 case "$CPPFLAGS" in
2592                 (*$cf_add_cflags)
2593                         ;;
2594                 (*)
2595                         case "$cf_add_cflags" in
2596                         (-D*)
2597                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2598
2599 CPPFLAGS=`echo "$CPPFLAGS" | \
2600         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2601                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2602
2603                                 ;;
2604                         esac
2605
2606         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2607         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2608
2609                         ;;
2610                 esac
2611                 ;;
2612         (*)
2613
2614         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2615         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2616
2617                 ;;
2618         esac
2619         ;;
2620 (yes)
2621
2622         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2623         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2624
2625         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2626
2627         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2628                 && test -z "${cf_tst_cflags}" \
2629                 && cf_fix_cppflags=no
2630         ;;
2631 esac
2632 done
2633
2634 if test -n "$cf_new_cflags" ; then
2635
2636         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2637         CFLAGS="${CFLAGS}$cf_new_cflags"
2638
2639 fi
2640
2641 if test -n "$cf_new_cppflags" ; then
2642
2643         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2644         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2645
2646 fi
2647
2648 if test -n "$cf_new_extra_cppflags" ; then
2649
2650         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2651         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2652
2653 fi
2654
2655         done
2656         ;;
2657 (*)
2658         echo "$as_me:2658: result: ok" >&5
2659 echo "${ECHO_T}ok" >&6
2660         ;;
2661 esac
2662
2663 echo "$as_me:2663: checking \$CC variable" >&5
2664 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2665 case "$CC" in
2666 (*[\ \  ]-*)
2667         echo "$as_me:2667: result: broken" >&5
2668 echo "${ECHO_T}broken" >&6
2669         { echo "$as_me:2669: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2670 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2671         # humor him...
2672         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2673         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2674         CC="$cf_prog"
2675         for cf_arg in $cf_flags
2676         do
2677                 case "x$cf_arg" in
2678                 (x-[IUDfgOW]*)
2679
2680 cf_fix_cppflags=no
2681 cf_new_cflags=
2682 cf_new_cppflags=
2683 cf_new_extra_cppflags=
2684
2685 for cf_add_cflags in $cf_arg
2686 do
2687 case "$cf_fix_cppflags" in
2688 (no)
2689         case "$cf_add_cflags" in
2690         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2691                 case "$cf_add_cflags" in
2692                 (-D*)
2693                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2694
2695                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2696                                 && test -z "${cf_tst_cflags}" \
2697                                 && cf_fix_cppflags=yes
2698
2699                         if test "$cf_fix_cppflags" = yes ; then
2700
2701         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2702         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2703
2704                                 continue
2705                         elif test "${cf_tst_cflags}" = "\"'" ; then
2706
2707         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2708         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2709
2710                                 continue
2711                         fi
2712                         ;;
2713                 esac
2714                 case "$CPPFLAGS" in
2715                 (*$cf_add_cflags)
2716                         ;;
2717                 (*)
2718                         case "$cf_add_cflags" in
2719                         (-D*)
2720                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2721
2722 CPPFLAGS=`echo "$CPPFLAGS" | \
2723         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2724                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2725
2726                                 ;;
2727                         esac
2728
2729         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2730         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2731
2732                         ;;
2733                 esac
2734                 ;;
2735         (*)
2736
2737         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2738         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2739
2740                 ;;
2741         esac
2742         ;;
2743 (yes)
2744
2745         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2746         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2747
2748         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2749
2750         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2751                 && test -z "${cf_tst_cflags}" \
2752                 && cf_fix_cppflags=no
2753         ;;
2754 esac
2755 done
2756
2757 if test -n "$cf_new_cflags" ; then
2758
2759         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2760         CFLAGS="${CFLAGS}$cf_new_cflags"
2761
2762 fi
2763
2764 if test -n "$cf_new_cppflags" ; then
2765
2766         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2767         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2768
2769 fi
2770
2771 if test -n "$cf_new_extra_cppflags" ; then
2772
2773         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2774         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2775
2776 fi
2777
2778                         ;;
2779                 (*)
2780                         CC="$CC $cf_arg"
2781                         ;;
2782                 esac
2783         done
2784         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2785
2786 echo "${as_me:-configure}:2786: testing resulting CC: '$CC' ..." 1>&5
2787
2788         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2789
2790 echo "${as_me:-configure}:2790: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2791
2792         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2793
2794 echo "${as_me:-configure}:2794: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2795
2796         ;;
2797 (*)
2798         echo "$as_me:2798: result: ok" >&5
2799 echo "${ECHO_T}ok" >&6
2800         ;;
2801 esac
2802
2803 ac_ext=c
2804 ac_cpp='$CPP $CPPFLAGS'
2805 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2806 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2807 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2808 ac_main_return="return"
2809 echo "$as_me:2809: checking how to run the C preprocessor" >&5
2810 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2811 # On Suns, sometimes $CPP names a directory.
2812 if test -n "$CPP" && test -d "$CPP"; then
2813   CPP=
2814 fi
2815 if test -z "$CPP"; then
2816   if test "${ac_cv_prog_CPP+set}" = set; then
2817   echo $ECHO_N "(cached) $ECHO_C" >&6
2818 else
2819       # Double quotes because CPP needs to be expanded
2820     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2821     do
2822       ac_preproc_ok=false
2823 for ac_c_preproc_warn_flag in '' yes
2824 do
2825   # Use a header file that comes with gcc, so configuring glibc
2826   # with a fresh cross-compiler works.
2827   # On the NeXT, cc -E runs the code through the compiler's parser,
2828   # not just through cpp. "Syntax error" is here to catch this case.
2829   cat >"conftest.$ac_ext" <<_ACEOF
2830 #line 2830 "configure"
2831 #include "confdefs.h"
2832 #include <assert.h>
2833                      Syntax error
2834 _ACEOF
2835 if { (eval echo "$as_me:2835: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2836   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2837   ac_status=$?
2838   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2839   rm -f conftest.er1
2840   cat conftest.err >&5
2841   echo "$as_me:2841: \$? = $ac_status" >&5
2842   (exit "$ac_status"); } >/dev/null; then
2843   if test -s conftest.err; then
2844     ac_cpp_err=$ac_c_preproc_warn_flag
2845   else
2846     ac_cpp_err=
2847   fi
2848 else
2849   ac_cpp_err=yes
2850 fi
2851 if test -z "$ac_cpp_err"; then
2852   :
2853 else
2854   echo "$as_me: failed program was:" >&5
2855   cat "conftest.$ac_ext" >&5
2856   # Broken: fails on valid input.
2857 continue
2858 fi
2859 rm -f conftest.err "conftest.$ac_ext"
2860
2861   # OK, works on sane cases.  Now check whether non-existent headers
2862   # can be detected and how.
2863   cat >"conftest.$ac_ext" <<_ACEOF
2864 #line 2864 "configure"
2865 #include "confdefs.h"
2866 #include <ac_nonexistent.h>
2867 _ACEOF
2868 if { (eval echo "$as_me:2868: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2869   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2870   ac_status=$?
2871   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2872   rm -f conftest.er1
2873   cat conftest.err >&5
2874   echo "$as_me:2874: \$? = $ac_status" >&5
2875   (exit "$ac_status"); } >/dev/null; then
2876   if test -s conftest.err; then
2877     ac_cpp_err=$ac_c_preproc_warn_flag
2878   else
2879     ac_cpp_err=
2880   fi
2881 else
2882   ac_cpp_err=yes
2883 fi
2884 if test -z "$ac_cpp_err"; then
2885   # Broken: success on invalid input.
2886 continue
2887 else
2888   echo "$as_me: failed program was:" >&5
2889   cat "conftest.$ac_ext" >&5
2890   # Passes both tests.
2891 ac_preproc_ok=:
2892 break
2893 fi
2894 rm -f conftest.err "conftest.$ac_ext"
2895
2896 done
2897 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2898 rm -f conftest.err "conftest.$ac_ext"
2899 if $ac_preproc_ok; then
2900   break
2901 fi
2902
2903     done
2904     ac_cv_prog_CPP=$CPP
2905
2906 fi
2907   CPP=$ac_cv_prog_CPP
2908 else
2909   ac_cv_prog_CPP=$CPP
2910 fi
2911 echo "$as_me:2911: result: $CPP" >&5
2912 echo "${ECHO_T}$CPP" >&6
2913 ac_preproc_ok=false
2914 for ac_c_preproc_warn_flag in '' yes
2915 do
2916   # Use a header file that comes with gcc, so configuring glibc
2917   # with a fresh cross-compiler works.
2918   # On the NeXT, cc -E runs the code through the compiler's parser,
2919   # not just through cpp. "Syntax error" is here to catch this case.
2920   cat >"conftest.$ac_ext" <<_ACEOF
2921 #line 2921 "configure"
2922 #include "confdefs.h"
2923 #include <assert.h>
2924                      Syntax error
2925 _ACEOF
2926 if { (eval echo "$as_me:2926: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2927   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2928   ac_status=$?
2929   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2930   rm -f conftest.er1
2931   cat conftest.err >&5
2932   echo "$as_me:2932: \$? = $ac_status" >&5
2933   (exit "$ac_status"); } >/dev/null; then
2934   if test -s conftest.err; then
2935     ac_cpp_err=$ac_c_preproc_warn_flag
2936   else
2937     ac_cpp_err=
2938   fi
2939 else
2940   ac_cpp_err=yes
2941 fi
2942 if test -z "$ac_cpp_err"; then
2943   :
2944 else
2945   echo "$as_me: failed program was:" >&5
2946   cat "conftest.$ac_ext" >&5
2947   # Broken: fails on valid input.
2948 continue
2949 fi
2950 rm -f conftest.err "conftest.$ac_ext"
2951
2952   # OK, works on sane cases.  Now check whether non-existent headers
2953   # can be detected and how.
2954   cat >"conftest.$ac_ext" <<_ACEOF
2955 #line 2955 "configure"
2956 #include "confdefs.h"
2957 #include <ac_nonexistent.h>
2958 _ACEOF
2959 if { (eval echo "$as_me:2959: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2960   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2961   ac_status=$?
2962   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2963   rm -f conftest.er1
2964   cat conftest.err >&5
2965   echo "$as_me:2965: \$? = $ac_status" >&5
2966   (exit "$ac_status"); } >/dev/null; then
2967   if test -s conftest.err; then
2968     ac_cpp_err=$ac_c_preproc_warn_flag
2969   else
2970     ac_cpp_err=
2971   fi
2972 else
2973   ac_cpp_err=yes
2974 fi
2975 if test -z "$ac_cpp_err"; then
2976   # Broken: success on invalid input.
2977 continue
2978 else
2979   echo "$as_me: failed program was:" >&5
2980   cat "conftest.$ac_ext" >&5
2981   # Passes both tests.
2982 ac_preproc_ok=:
2983 break
2984 fi
2985 rm -f conftest.err "conftest.$ac_ext"
2986
2987 done
2988 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2989 rm -f conftest.err "conftest.$ac_ext"
2990 if $ac_preproc_ok; then
2991   :
2992 else
2993   { { echo "$as_me:2993: error: C preprocessor \"$CPP\" fails sanity check" >&5
2994 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2995    { (exit 1); exit 1; }; }
2996 fi
2997
2998 ac_ext=c
2999 ac_cpp='$CPP $CPPFLAGS'
3000 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3001 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3002 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3003 ac_main_return="return"
3004
3005 if test $ac_cv_c_compiler_gnu = yes; then
3006     echo "$as_me:3006: checking whether $CC needs -traditional" >&5
3007 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3008 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3009   echo $ECHO_N "(cached) $ECHO_C" >&6
3010 else
3011     ac_pattern="Autoconf.*'x'"
3012   cat >"conftest.$ac_ext" <<_ACEOF
3013 #line 3013 "configure"
3014 #include "confdefs.h"
3015 #include <sgtty.h>
3016 int Autoconf = TIOCGETP;
3017 _ACEOF
3018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3019   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3020   ac_cv_prog_gcc_traditional=yes
3021 else
3022   ac_cv_prog_gcc_traditional=no
3023 fi
3024 rm -rf conftest*
3025
3026   if test $ac_cv_prog_gcc_traditional = no; then
3027     cat >"conftest.$ac_ext" <<_ACEOF
3028 #line 3028 "configure"
3029 #include "confdefs.h"
3030 #include <termio.h>
3031 int Autoconf = TCGETA;
3032 _ACEOF
3033 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3034   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3035   ac_cv_prog_gcc_traditional=yes
3036 fi
3037 rm -rf conftest*
3038
3039   fi
3040 fi
3041 echo "$as_me:3041: result: $ac_cv_prog_gcc_traditional" >&5
3042 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3043   if test $ac_cv_prog_gcc_traditional = yes; then
3044     CC="$CC -traditional"
3045   fi
3046 fi
3047
3048 echo "$as_me:3048: checking whether $CC understands -c and -o together" >&5
3049 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3050 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3051   echo $ECHO_N "(cached) $ECHO_C" >&6
3052 else
3053
3054 cat > conftest.$ac_ext <<CF_EOF
3055 int main(void)
3056 {
3057         ${cf_cv_main_return:-return}(0);
3058 }
3059 CF_EOF
3060 # We do the test twice because some compilers refuse to overwrite an
3061 # existing .o file with -o, though they will create one.
3062 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3063 if { (eval echo "$as_me:3063: \"$ac_try\"") >&5
3064   (eval $ac_try) 2>&5
3065   ac_status=$?
3066   echo "$as_me:3066: \$? = $ac_status" >&5
3067   (exit "$ac_status"); } &&
3068   test -f conftest2.$ac_objext && { (eval echo "$as_me:3068: \"$ac_try\"") >&5
3069   (eval $ac_try) 2>&5
3070   ac_status=$?
3071   echo "$as_me:3071: \$? = $ac_status" >&5
3072   (exit "$ac_status"); };
3073 then
3074   eval cf_cv_prog_CC_c_o=yes
3075 else
3076   eval cf_cv_prog_CC_c_o=no
3077 fi
3078 rm -rf ./conftest*
3079
3080 fi
3081 if test "$cf_cv_prog_CC_c_o" = yes; then
3082   echo "$as_me:3082: result: yes" >&5
3083 echo "${ECHO_T}yes" >&6
3084 else
3085   echo "$as_me:3085: result: no" >&5
3086 echo "${ECHO_T}no" >&6
3087 fi
3088
3089 if test "$cross_compiling" = yes ; then
3090         LDCONFIG=:
3091 else
3092         case "$cf_cv_system_name" in
3093         (dragonfly*|mirbsd*|freebsd*)
3094                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3095                 ;;
3096         (*) LDPATH=$PATH:/sbin:/usr/sbin
3097                 # Extract the first word of "ldconfig", so it can be a program name with args.
3098 set dummy ldconfig; ac_word=$2
3099 echo "$as_me:3099: checking for $ac_word" >&5
3100 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3101 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3102   echo $ECHO_N "(cached) $ECHO_C" >&6
3103 else
3104   case $LDCONFIG in
3105   [\\/]* | ?:[\\/]*)
3106   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3107   ;;
3108   *)
3109   ac_save_IFS=$IFS; IFS=$ac_path_separator
3110 ac_dummy="$LDPATH"
3111 for ac_dir in $ac_dummy; do
3112   IFS=$ac_save_IFS
3113   test -z "$ac_dir" && ac_dir=.
3114   if $as_executable_p "$ac_dir/$ac_word"; then
3115    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3116    echo "$as_me:3116: found $ac_dir/$ac_word" >&5
3117    break
3118 fi
3119 done
3120
3121   ;;
3122 esac
3123 fi
3124 LDCONFIG=$ac_cv_path_LDCONFIG
3125
3126 if test -n "$LDCONFIG"; then
3127   echo "$as_me:3127: result: $LDCONFIG" >&5
3128 echo "${ECHO_T}$LDCONFIG" >&6
3129 else
3130   echo "$as_me:3130: result: no" >&5
3131 echo "${ECHO_T}no" >&6
3132 fi
3133
3134                 ;;
3135         esac
3136 fi
3137
3138 echo "$as_me:3138: checking if you want to ensure bool is consistent with C++" >&5
3139 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3140
3141 # Check whether --with-cxx or --without-cxx was given.
3142 if test "${with_cxx+set}" = set; then
3143   withval="$with_cxx"
3144   cf_with_cxx=$withval
3145 else
3146   cf_with_cxx=yes
3147 fi;
3148 echo "$as_me:3148: result: $cf_with_cxx" >&5
3149 echo "${ECHO_T}$cf_with_cxx" >&6
3150 if test "X$cf_with_cxx" = Xno ; then
3151         CXX=""
3152         GXX=""
3153 else
3154         # with autoconf 2.13, we can change the error to a warning:
3155                 ac_ext=cc
3156 ac_cpp='$CXXCPP $CPPFLAGS'
3157 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3158 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3159 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3160 ac_main_return="return"
3161 if test -n "$ac_tool_prefix"; then
3162   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3163   do
3164     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3165 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3166 echo "$as_me:3166: checking for $ac_word" >&5
3167 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3168 if test "${ac_cv_prog_CXX+set}" = set; then
3169   echo $ECHO_N "(cached) $ECHO_C" >&6
3170 else
3171   if test -n "$CXX"; then
3172   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3173 else
3174   ac_save_IFS=$IFS; IFS=$ac_path_separator
3175 ac_dummy="$PATH"
3176 for ac_dir in $ac_dummy; do
3177   IFS=$ac_save_IFS
3178   test -z "$ac_dir" && ac_dir=.
3179   $as_executable_p "$ac_dir/$ac_word" || continue
3180 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3181 echo "$as_me:3181: found $ac_dir/$ac_word" >&5
3182 break
3183 done
3184
3185 fi
3186 fi
3187 CXX=$ac_cv_prog_CXX
3188 if test -n "$CXX"; then
3189   echo "$as_me:3189: result: $CXX" >&5
3190 echo "${ECHO_T}$CXX" >&6
3191 else
3192   echo "$as_me:3192: result: no" >&5
3193 echo "${ECHO_T}no" >&6
3194 fi
3195
3196     test -n "$CXX" && break
3197   done
3198 fi
3199 if test -z "$CXX"; then
3200   ac_ct_CXX=$CXX
3201   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3202 do
3203   # Extract the first word of "$ac_prog", so it can be a program name with args.
3204 set dummy $ac_prog; ac_word=$2
3205 echo "$as_me:3205: checking for $ac_word" >&5
3206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3207 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3208   echo $ECHO_N "(cached) $ECHO_C" >&6
3209 else
3210   if test -n "$ac_ct_CXX"; then
3211   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3212 else
3213   ac_save_IFS=$IFS; IFS=$ac_path_separator
3214 ac_dummy="$PATH"
3215 for ac_dir in $ac_dummy; do
3216   IFS=$ac_save_IFS
3217   test -z "$ac_dir" && ac_dir=.
3218   $as_executable_p "$ac_dir/$ac_word" || continue
3219 ac_cv_prog_ac_ct_CXX="$ac_prog"
3220 echo "$as_me:3220: found $ac_dir/$ac_word" >&5
3221 break
3222 done
3223
3224 fi
3225 fi
3226 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3227 if test -n "$ac_ct_CXX"; then
3228   echo "$as_me:3228: result: $ac_ct_CXX" >&5
3229 echo "${ECHO_T}$ac_ct_CXX" >&6
3230 else
3231   echo "$as_me:3231: result: no" >&5
3232 echo "${ECHO_T}no" >&6
3233 fi
3234
3235   test -n "$ac_ct_CXX" && break
3236 done
3237 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3238
3239   CXX=$ac_ct_CXX
3240 fi
3241
3242 # Provide some information about the compiler.
3243 echo "$as_me:3243:" \
3244      "checking for C++ compiler version" >&5
3245 ac_compiler=`set X $ac_compile; echo $2`
3246 { (eval echo "$as_me:3246: \"$ac_compiler --version </dev/null >&5\"") >&5
3247   (eval $ac_compiler --version </dev/null >&5) 2>&5
3248   ac_status=$?
3249   echo "$as_me:3249: \$? = $ac_status" >&5
3250   (exit "$ac_status"); }
3251 { (eval echo "$as_me:3251: \"$ac_compiler -v </dev/null >&5\"") >&5
3252   (eval $ac_compiler -v </dev/null >&5) 2>&5
3253   ac_status=$?
3254   echo "$as_me:3254: \$? = $ac_status" >&5
3255   (exit "$ac_status"); }
3256 { (eval echo "$as_me:3256: \"$ac_compiler -V </dev/null >&5\"") >&5
3257   (eval $ac_compiler -V </dev/null >&5) 2>&5
3258   ac_status=$?
3259   echo "$as_me:3259: \$? = $ac_status" >&5
3260   (exit "$ac_status"); }
3261
3262 echo "$as_me:3262: checking whether we are using the GNU C++ compiler" >&5
3263 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3264 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3265   echo $ECHO_N "(cached) $ECHO_C" >&6
3266 else
3267   cat >"conftest.$ac_ext" <<_ACEOF
3268 #line 3268 "configure"
3269 #include "confdefs.h"
3270
3271 int
3272 main (void)
3273 {
3274 #ifndef __GNUC__
3275        choke me
3276 #endif
3277
3278   ;
3279   return 0;
3280 }
3281 _ACEOF
3282 rm -f "conftest.$ac_objext"
3283 if { (eval echo "$as_me:3283: \"$ac_compile\"") >&5
3284   (eval $ac_compile) 2>&5
3285   ac_status=$?
3286   echo "$as_me:3286: \$? = $ac_status" >&5
3287   (exit "$ac_status"); } &&
3288          { ac_try='test -s "conftest.$ac_objext"'
3289   { (eval echo "$as_me:3289: \"$ac_try\"") >&5
3290   (eval $ac_try) 2>&5
3291   ac_status=$?
3292   echo "$as_me:3292: \$? = $ac_status" >&5
3293   (exit "$ac_status"); }; }; then
3294   ac_compiler_gnu=yes
3295 else
3296   echo "$as_me: failed program was:" >&5
3297 cat "conftest.$ac_ext" >&5
3298 ac_compiler_gnu=no
3299 fi
3300 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3301 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3302
3303 fi
3304 echo "$as_me:3304: result: $ac_cv_cxx_compiler_gnu" >&5
3305 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3306 GXX=`test $ac_compiler_gnu = yes && echo yes`
3307 ac_test_CXXFLAGS=${CXXFLAGS+set}
3308 ac_save_CXXFLAGS=$CXXFLAGS
3309 CXXFLAGS="-g"
3310 echo "$as_me:3310: checking whether $CXX accepts -g" >&5
3311 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3312 if test "${ac_cv_prog_cxx_g+set}" = set; then
3313   echo $ECHO_N "(cached) $ECHO_C" >&6
3314 else
3315   cat >"conftest.$ac_ext" <<_ACEOF
3316 #line 3316 "configure"
3317 #include "confdefs.h"
3318
3319 int
3320 main (void)
3321 {
3322
3323   ;
3324   return 0;
3325 }
3326 _ACEOF
3327 rm -f "conftest.$ac_objext"
3328 if { (eval echo "$as_me:3328: \"$ac_compile\"") >&5
3329   (eval $ac_compile) 2>&5
3330   ac_status=$?
3331   echo "$as_me:3331: \$? = $ac_status" >&5
3332   (exit "$ac_status"); } &&
3333          { ac_try='test -s "conftest.$ac_objext"'
3334   { (eval echo "$as_me:3334: \"$ac_try\"") >&5
3335   (eval $ac_try) 2>&5
3336   ac_status=$?
3337   echo "$as_me:3337: \$? = $ac_status" >&5
3338   (exit "$ac_status"); }; }; then
3339   ac_cv_prog_cxx_g=yes
3340 else
3341   echo "$as_me: failed program was:" >&5
3342 cat "conftest.$ac_ext" >&5
3343 ac_cv_prog_cxx_g=no
3344 fi
3345 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3346 fi
3347 echo "$as_me:3347: result: $ac_cv_prog_cxx_g" >&5
3348 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3349 if test "$ac_test_CXXFLAGS" = set; then
3350   CXXFLAGS=$ac_save_CXXFLAGS
3351 elif test $ac_cv_prog_cxx_g = yes; then
3352   if test "$GXX" = yes; then
3353     CXXFLAGS="-g -O2"
3354   else
3355     CXXFLAGS="-g"
3356   fi
3357 else
3358   if test "$GXX" = yes; then
3359     CXXFLAGS="-O2"
3360   else
3361     CXXFLAGS=
3362   fi
3363 fi
3364 for ac_declaration in \
3365    ''\
3366    '#include <stdlib.h>' \
3367    'extern "C" void std::exit (int) throw (); using std::exit;' \
3368    'extern "C" void std::exit (int); using std::exit;' \
3369    'extern "C" void exit (int) throw ();' \
3370    'extern "C" void exit (int);' \
3371    'void exit (int);'
3372 do
3373   cat >"conftest.$ac_ext" <<_ACEOF
3374 #line 3374 "configure"
3375 #include "confdefs.h"
3376 #include <stdlib.h>
3377 $ac_declaration
3378 int
3379 main (void)
3380 {
3381 exit (42);
3382   ;
3383   return 0;
3384 }
3385 _ACEOF
3386 rm -f "conftest.$ac_objext"
3387 if { (eval echo "$as_me:3387: \"$ac_compile\"") >&5
3388   (eval $ac_compile) 2>&5
3389   ac_status=$?
3390   echo "$as_me:3390: \$? = $ac_status" >&5
3391   (exit "$ac_status"); } &&
3392          { ac_try='test -s "conftest.$ac_objext"'
3393   { (eval echo "$as_me:3393: \"$ac_try\"") >&5
3394   (eval $ac_try) 2>&5
3395   ac_status=$?
3396   echo "$as_me:3396: \$? = $ac_status" >&5
3397   (exit "$ac_status"); }; }; then
3398   :
3399 else
3400   echo "$as_me: failed program was:" >&5
3401 cat "conftest.$ac_ext" >&5
3402 continue
3403 fi
3404 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3405   cat >"conftest.$ac_ext" <<_ACEOF
3406 #line 3406 "configure"
3407 #include "confdefs.h"
3408 $ac_declaration
3409 int
3410 main (void)
3411 {
3412 exit (42);
3413   ;
3414   return 0;
3415 }
3416 _ACEOF
3417 rm -f "conftest.$ac_objext"
3418 if { (eval echo "$as_me:3418: \"$ac_compile\"") >&5
3419   (eval $ac_compile) 2>&5
3420   ac_status=$?
3421   echo "$as_me:3421: \$? = $ac_status" >&5
3422   (exit "$ac_status"); } &&
3423          { ac_try='test -s "conftest.$ac_objext"'
3424   { (eval echo "$as_me:3424: \"$ac_try\"") >&5
3425   (eval $ac_try) 2>&5
3426   ac_status=$?
3427   echo "$as_me:3427: \$? = $ac_status" >&5
3428   (exit "$ac_status"); }; }; then
3429   break
3430 else
3431   echo "$as_me: failed program was:" >&5
3432 cat "conftest.$ac_ext" >&5
3433 fi
3434 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3435 done
3436 rm -rf conftest*
3437 if test -n "$ac_declaration"; then
3438   echo '#ifdef __cplusplus' >>confdefs.h
3439   echo "$ac_declaration"    >>confdefs.h
3440   echo '#endif'             >>confdefs.h
3441 fi
3442
3443 ac_ext=c
3444 ac_cpp='$CPP $CPPFLAGS'
3445 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3446 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3447 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3448 ac_main_return="return"
3449
3450         ac_ext=cc
3451 ac_cpp='$CXXCPP $CPPFLAGS'
3452 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3453 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3454 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3455 ac_main_return="return"
3456
3457         if test "x$cf_with_cxx" != xno
3458         then
3459                 # Several of the C++ configurations do not work, particularly when
3460                 # cross-compiling (20140913 -TD)
3461                 echo "$as_me:3461: checking if $CXX works" >&5
3462 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3463
3464                 save_CPPFLAGS="$CPPFLAGS"
3465                 eval cf_includedir=${includedir}
3466                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3467
3468 cat >"conftest.$ac_ext" <<_ACEOF
3469 #line 3469 "configure"
3470 #include "confdefs.h"
3471
3472 #include <stdlib.h>
3473 #include <stdio.h>
3474
3475 int
3476 main (void)
3477 {
3478
3479                 printf("Hello world!\n")
3480
3481   ;
3482   return 0;
3483 }
3484 _ACEOF
3485 rm -f "conftest.$ac_objext"
3486 if { (eval echo "$as_me:3486: \"$ac_compile\"") >&5
3487   (eval $ac_compile) 2>&5
3488   ac_status=$?
3489   echo "$as_me:3489: \$? = $ac_status" >&5
3490   (exit "$ac_status"); } &&
3491          { ac_try='test -s "conftest.$ac_objext"'
3492   { (eval echo "$as_me:3492: \"$ac_try\"") >&5
3493   (eval $ac_try) 2>&5
3494   ac_status=$?
3495   echo "$as_me:3495: \$? = $ac_status" >&5
3496   (exit "$ac_status"); }; }; then
3497   cf_cxx_works=yes
3498 else
3499   echo "$as_me: failed program was:" >&5
3500 cat "conftest.$ac_ext" >&5
3501 cf_cxx_works=no
3502 fi
3503 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3504                 CPPFLAGS="$save_CPPFLAGS"
3505
3506                 echo "$as_me:3506: result: $cf_cxx_works" >&5
3507 echo "${ECHO_T}$cf_cxx_works" >&6
3508                 if test "x$cf_cxx_works" = xno
3509                 then
3510                         { echo "$as_me:3510: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3511 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3512                         cf_with_cxx=no; CXX=""; GXX="";
3513                 fi
3514         fi
3515         ac_ext=c
3516 ac_cpp='$CPP $CPPFLAGS'
3517 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3518 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3519 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3520 ac_main_return="return"
3521
3522         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3523         if test "$CXX" = "g++" ; then
3524                 # Extract the first word of "g++", so it can be a program name with args.
3525 set dummy g++; ac_word=$2
3526 echo "$as_me:3526: checking for $ac_word" >&5
3527 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3528 if test "${ac_cv_path_CXX+set}" = set; then
3529   echo $ECHO_N "(cached) $ECHO_C" >&6
3530 else
3531   case $CXX in
3532   [\\/]* | ?:[\\/]*)
3533   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3534   ;;
3535   *)
3536   ac_save_IFS=$IFS; IFS=$ac_path_separator
3537 ac_dummy="$PATH"
3538 for ac_dir in $ac_dummy; do
3539   IFS=$ac_save_IFS
3540   test -z "$ac_dir" && ac_dir=.
3541   if $as_executable_p "$ac_dir/$ac_word"; then
3542    ac_cv_path_CXX="$ac_dir/$ac_word"
3543    echo "$as_me:3543: found $ac_dir/$ac_word" >&5
3544    break
3545 fi
3546 done
3547
3548   ;;
3549 esac
3550 fi
3551 CXX=$ac_cv_path_CXX
3552
3553 if test -n "$CXX"; then
3554   echo "$as_me:3554: result: $CXX" >&5
3555 echo "${ECHO_T}$CXX" >&6
3556 else
3557   echo "$as_me:3557: result: no" >&5
3558 echo "${ECHO_T}no" >&6
3559 fi
3560
3561         fi
3562         case "x$CXX" in
3563         (x|xg++)
3564                 { echo "$as_me:3564: WARNING: You don't have any C++ compiler, too bad" >&5
3565 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3566                 cf_with_cxx=no; CXX=""; GXX="";
3567                 ;;
3568         esac
3569 fi
3570
3571 GXX_VERSION=none
3572 if test "$GXX" = yes; then
3573         echo "$as_me:3573: checking version of ${CXX:-g++}" >&5
3574 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3575         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3576         if test -z "$GXX_VERSION"
3577         then
3578                 GXX_VERSION=unknown
3579                 GXX=no
3580         fi
3581         echo "$as_me:3581: result: $GXX_VERSION" >&5
3582 echo "${ECHO_T}$GXX_VERSION" >&6
3583 fi
3584
3585 case "$GXX_VERSION" in
3586 ([1-9][0-9].*)
3587         ;;
3588 (1.*|2.[0-6]*)
3589         { echo "$as_me:3589: WARNING: templates do not work" >&5
3590 echo "$as_me: WARNING: templates do not work" >&2;}
3591         ;;
3592 esac
3593
3594 echo "$as_me:3594: checking if you want to build C++ binding and demo" >&5
3595 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3596
3597 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3598 if test "${with_cxx_binding+set}" = set; then
3599   withval="$with_cxx_binding"
3600   cf_with_cxx_binding=$withval
3601 else
3602   cf_with_cxx_binding=$cf_with_cxx
3603 fi;
3604 echo "$as_me:3604: result: $cf_with_cxx_binding" >&5
3605 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3606
3607 echo "$as_me:3607: checking if you want to build with Ada" >&5
3608 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3609 echo "$as_me:3609: result: $cf_with_ada" >&5
3610 echo "${ECHO_T}$cf_with_ada" >&6
3611
3612 echo "$as_me:3612: checking if you want to install terminal database" >&5
3613 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3614
3615 # Check whether --enable-db-install or --disable-db-install was given.
3616 if test "${enable_db_install+set}" = set; then
3617   enableval="$enable_db_install"
3618   cf_with_db_install=$enableval
3619 else
3620   cf_with_db_install=yes
3621 fi;
3622 echo "$as_me:3622: result: $cf_with_db_install" >&5
3623 echo "${ECHO_T}$cf_with_db_install" >&6
3624
3625 echo "$as_me:3625: checking if you want to install manpages" >&5
3626 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3627
3628 # Check whether --with-manpages or --without-manpages was given.
3629 if test "${with_manpages+set}" = set; then
3630   withval="$with_manpages"
3631   cf_with_manpages=$withval
3632 else
3633   cf_with_manpages=yes
3634 fi;
3635 echo "$as_me:3635: result: $cf_with_manpages" >&5
3636 echo "${ECHO_T}$cf_with_manpages" >&6
3637
3638 echo "$as_me:3638: checking if you want to build programs such as tic" >&5
3639 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3640
3641 # Check whether --with-progs or --without-progs was given.
3642 if test "${with_progs+set}" = set; then
3643   withval="$with_progs"
3644   cf_with_progs=$withval
3645 else
3646   cf_with_progs=yes
3647 fi;
3648 echo "$as_me:3648: result: $cf_with_progs" >&5
3649 echo "${ECHO_T}$cf_with_progs" >&6
3650
3651 if test -f "$srcdir/tack/tack.h" ; then
3652         if test "x$cross_compiling" = xyes ; then
3653                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3654
3655 echo "${as_me:-configure}:3655: testing ignoring tack because we are cross-compiling ..." 1>&5
3656
3657                 cf_with_tack=no
3658         else
3659                 echo "$as_me:3659: checking if you want to build the tack program" >&5
3660 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3661
3662 # Check whether --with-tack or --without-tack was given.
3663 if test "${with_tack+set}" = set; then
3664   withval="$with_tack"
3665   cf_with_tack=$withval
3666 else
3667   cf_with_tack=$cf_with_progs
3668 fi;
3669                 echo "$as_me:3669: result: $cf_with_tack" >&5
3670 echo "${ECHO_T}$cf_with_tack" >&6
3671         fi
3672 else
3673         cf_with_tack=no
3674 fi
3675
3676 echo "$as_me:3676: checking if you want to build test-programs" >&5
3677 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3678
3679 # Check whether --with-tests or --without-tests was given.
3680 if test "${with_tests+set}" = set; then
3681   withval="$with_tests"
3682   cf_with_tests=$withval
3683 else
3684   cf_with_tests=yes
3685 fi;
3686 echo "$as_me:3686: result: $cf_with_tests" >&5
3687 echo "${ECHO_T}$cf_with_tests" >&6
3688
3689 echo "$as_me:3689: checking if you wish to install curses.h" >&5
3690 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3691
3692 # Check whether --with-curses-h or --without-curses-h was given.
3693 if test "${with_curses_h+set}" = set; then
3694   withval="$with_curses_h"
3695   with_curses_h=$withval
3696 else
3697   with_curses_h=yes
3698 fi;
3699 echo "$as_me:3699: result: $with_curses_h" >&5
3700 echo "${ECHO_T}$with_curses_h" >&6
3701
3702 modules_to_build="ncurses"
3703 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3704 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3705 modules_to_build="$modules_to_build panel menu form"
3706
3707 test "$program_prefix" != NONE &&
3708   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3709 # Use a double $ so make ignores it.
3710 test "$program_suffix" != NONE &&
3711   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3712 # Double any \ or $.  echo might interpret backslashes.
3713 # By default was `s,x,x', remove it if useless.
3714 cat <<\_ACEOF >conftest.sed
3715 s/[\\$]/&&/g;s/;s,x,x,$//
3716 _ACEOF
3717 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3718 rm conftest.sed
3719
3720 for ac_prog in mawk gawk nawk awk
3721 do
3722   # Extract the first word of "$ac_prog", so it can be a program name with args.
3723 set dummy $ac_prog; ac_word=$2
3724 echo "$as_me:3724: checking for $ac_word" >&5
3725 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3726 if test "${ac_cv_prog_AWK+set}" = set; then
3727   echo $ECHO_N "(cached) $ECHO_C" >&6
3728 else
3729   if test -n "$AWK"; then
3730   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3731 else
3732   ac_save_IFS=$IFS; IFS=$ac_path_separator
3733 ac_dummy="$PATH"
3734 for ac_dir in $ac_dummy; do
3735   IFS=$ac_save_IFS
3736   test -z "$ac_dir" && ac_dir=.
3737   $as_executable_p "$ac_dir/$ac_word" || continue
3738 ac_cv_prog_AWK="$ac_prog"
3739 echo "$as_me:3739: found $ac_dir/$ac_word" >&5
3740 break
3741 done
3742
3743 fi
3744 fi
3745 AWK=$ac_cv_prog_AWK
3746 if test -n "$AWK"; then
3747   echo "$as_me:3747: result: $AWK" >&5
3748 echo "${ECHO_T}$AWK" >&6
3749 else
3750   echo "$as_me:3750: result: no" >&5
3751 echo "${ECHO_T}no" >&6
3752 fi
3753
3754   test -n "$AWK" && break
3755 done
3756
3757 test -z "$AWK" && { { echo "$as_me:3757: error: No awk program found" >&5
3758 echo "$as_me: error: No awk program found" >&2;}
3759    { (exit 1); exit 1; }; }
3760
3761 # Find a good install program.  We prefer a C program (faster),
3762 # so one script is as good as another.  But avoid the broken or
3763 # incompatible versions:
3764 # SysV /etc/install, /usr/sbin/install
3765 # SunOS /usr/etc/install
3766 # IRIX /sbin/install
3767 # AIX /bin/install
3768 # AmigaOS /C/install, which installs bootblocks on floppy discs
3769 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3770 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3771 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3772 # ./install, which can be erroneously created by make from ./install.sh.
3773 echo "$as_me:3773: checking for a BSD compatible install" >&5
3774 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3775 if test -z "$INSTALL"; then
3776 if test "${ac_cv_path_install+set}" = set; then
3777   echo $ECHO_N "(cached) $ECHO_C" >&6
3778 else
3779     ac_save_IFS=$IFS; IFS=$ac_path_separator
3780   for ac_dir in $PATH; do
3781     IFS=$ac_save_IFS
3782     # Account for people who put trailing slashes in PATH elements.
3783     case $ac_dir/ in
3784     / | ./ | .// | /cC/* \
3785     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3786     | /usr/ucb/* ) ;;
3787     *)
3788       # OSF1 and SCO ODT 3.0 have their own names for install.
3789       # Don't use installbsd from OSF since it installs stuff as root
3790       # by default.
3791       for ac_prog in ginstall scoinst install; do
3792         if $as_executable_p "$ac_dir/$ac_prog"; then
3793           if test $ac_prog = install &&
3794             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3795             # AIX install.  It has an incompatible calling convention.
3796             :
3797           elif test $ac_prog = install &&
3798             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3799             # program-specific install script used by HP pwplus--don't use.
3800             :
3801           else
3802             ac_cv_path_install="$ac_dir/$ac_prog -c"
3803             break 2
3804           fi
3805         fi
3806       done
3807       ;;
3808     esac
3809   done
3810
3811 fi
3812   if test "${ac_cv_path_install+set}" = set; then
3813     INSTALL=$ac_cv_path_install
3814   else
3815     # As a last resort, use the slow shell script.  We don't cache a
3816     # path for INSTALL within a source directory, because that will
3817     # break other packages using the cache if that directory is
3818     # removed, or if the path is relative.
3819     INSTALL=$ac_install_sh
3820   fi
3821 fi
3822 echo "$as_me:3822: result: $INSTALL" >&5
3823 echo "${ECHO_T}$INSTALL" >&6
3824
3825 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3826 # It thinks the first close brace ends the variable substitution.
3827 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3828
3829 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3830
3831 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3832
3833 case $INSTALL in
3834 (/*)
3835         ;;
3836 (*)
3837         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3838         test -z "$cf_dir" && cf_dir=.
3839         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3840         ;;
3841 esac
3842
3843 for ac_prog in lint cppcheck splint
3844 do
3845   # Extract the first word of "$ac_prog", so it can be a program name with args.
3846 set dummy $ac_prog; ac_word=$2
3847 echo "$as_me:3847: checking for $ac_word" >&5
3848 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3849 if test "${ac_cv_prog_LINT+set}" = set; then
3850   echo $ECHO_N "(cached) $ECHO_C" >&6
3851 else
3852   if test -n "$LINT"; then
3853   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3854 else
3855   ac_save_IFS=$IFS; IFS=$ac_path_separator
3856 ac_dummy="$PATH"
3857 for ac_dir in $ac_dummy; do
3858   IFS=$ac_save_IFS
3859   test -z "$ac_dir" && ac_dir=.
3860   $as_executable_p "$ac_dir/$ac_word" || continue
3861 ac_cv_prog_LINT="$ac_prog"
3862 echo "$as_me:3862: found $ac_dir/$ac_word" >&5
3863 break
3864 done
3865
3866 fi
3867 fi
3868 LINT=$ac_cv_prog_LINT
3869 if test -n "$LINT"; then
3870   echo "$as_me:3870: result: $LINT" >&5
3871 echo "${ECHO_T}$LINT" >&6
3872 else
3873   echo "$as_me:3873: result: no" >&5
3874 echo "${ECHO_T}no" >&6
3875 fi
3876
3877   test -n "$LINT" && break
3878 done
3879
3880 case "x$LINT" in
3881 (xcppcheck|x*/cppcheck)
3882         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3883         ;;
3884 esac
3885
3886 echo "$as_me:3886: checking whether ln -s works" >&5
3887 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3888 LN_S=$as_ln_s
3889 if test "$LN_S" = "ln -s"; then
3890   echo "$as_me:3890: result: yes" >&5
3891 echo "${ECHO_T}yes" >&6
3892 else
3893   echo "$as_me:3893: result: no, using $LN_S" >&5
3894 echo "${ECHO_T}no, using $LN_S" >&6
3895 fi
3896
3897 echo "$as_me:3897: checking if $LN_S -f options work" >&5
3898 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3899
3900 rm -f conf$$.src conf$$dst
3901 echo >conf$$.dst
3902 echo first >conf$$.src
3903 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3904         cf_prog_ln_sf=yes
3905 else
3906         cf_prog_ln_sf=no
3907 fi
3908 rm -f conf$$.dst conf$$src
3909 echo "$as_me:3909: result: $cf_prog_ln_sf" >&5
3910 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3911
3912 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3913
3914 echo "$as_me:3914: checking for long file names" >&5
3915 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3916 if test "${ac_cv_sys_long_file_names+set}" = set; then
3917   echo $ECHO_N "(cached) $ECHO_C" >&6
3918 else
3919   ac_cv_sys_long_file_names=yes
3920 # Test for long file names in all the places we know might matter:
3921 #      .                the current directory, where building will happen
3922 #      $prefix/lib      where we will be installing things
3923 #      $exec_prefix/lib likewise
3924 # eval it to expand exec_prefix.
3925 #      $TMPDIR          if set, where it might want to write temporary files
3926 # if $TMPDIR is not set:
3927 #      /tmp             where it might want to write temporary files
3928 #      /var/tmp         likewise
3929 #      /usr/tmp         likewise
3930 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3931   ac_tmpdirs=$TMPDIR
3932 else
3933   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3934 fi
3935 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3936   test -d "$ac_dir" || continue
3937   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3938   ac_xdir=$ac_dir/cf$$
3939   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3940   ac_tf1=$ac_xdir/conftest9012345
3941   ac_tf2=$ac_xdir/conftest9012346
3942   (echo 1 >"$ac_tf1") 2>/dev/null
3943   (echo 2 >"$ac_tf2") 2>/dev/null
3944   ac_val=`cat "$ac_tf1" 2>/dev/null`
3945   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3946     ac_cv_sys_long_file_names=no
3947     rm -rf "$ac_xdir" 2>/dev/null
3948     break
3949   fi
3950   rm -rf "$ac_xdir" 2>/dev/null
3951 done
3952 fi
3953 echo "$as_me:3953: result: $ac_cv_sys_long_file_names" >&5
3954 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3955 if test "$ac_cv_sys_long_file_names" = yes; then
3956
3957 cat >>confdefs.h <<\EOF
3958 #define HAVE_LONG_FILE_NAMES 1
3959 EOF
3960
3961 fi
3962
3963 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3964 # of package conflict.
3965 cf_config_suffix=
3966
3967 # Check whether --with-config-suffix or --without-config-suffix was given.
3968 if test "${with_config_suffix+set}" = set; then
3969   withval="$with_config_suffix"
3970   case "x$withval" in
3971         (xyes|xno)
3972                 { echo "$as_me:3972: WARNING: expected a value for config-suffix option" >&5
3973 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3974                 ;;
3975         (*)     cf_config_suffix="$withval"
3976                 ;;
3977         esac
3978 fi;
3979
3980 # If we find pkg-config, check if we should install the ".pc" files.
3981
3982 echo "$as_me:3982: checking if you want to use pkg-config" >&5
3983 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3984
3985 # Check whether --with-pkg-config or --without-pkg-config was given.
3986 if test "${with_pkg_config+set}" = set; then
3987   withval="$with_pkg_config"
3988   cf_pkg_config=$withval
3989 else
3990   cf_pkg_config=yes
3991 fi;
3992 echo "$as_me:3992: result: $cf_pkg_config" >&5
3993 echo "${ECHO_T}$cf_pkg_config" >&6
3994
3995 case "$cf_pkg_config" in
3996 (no)
3997         PKG_CONFIG=none
3998         ;;
3999 (yes)
4000
4001 if test -n "$ac_tool_prefix"; then
4002   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4003 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4004 echo "$as_me:4004: checking for $ac_word" >&5
4005 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4006 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4007   echo $ECHO_N "(cached) $ECHO_C" >&6
4008 else
4009   case $PKG_CONFIG in
4010   [\\/]* | ?:[\\/]*)
4011   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4012   ;;
4013   *)
4014   ac_save_IFS=$IFS; IFS=$ac_path_separator
4015 ac_dummy="$PATH"
4016 for ac_dir in $ac_dummy; do
4017   IFS=$ac_save_IFS
4018   test -z "$ac_dir" && ac_dir=.
4019   if $as_executable_p "$ac_dir/$ac_word"; then
4020    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4021    echo "$as_me:4021: found $ac_dir/$ac_word" >&5
4022    break
4023 fi
4024 done
4025
4026   ;;
4027 esac
4028 fi
4029 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4030
4031 if test -n "$PKG_CONFIG"; then
4032   echo "$as_me:4032: result: $PKG_CONFIG" >&5
4033 echo "${ECHO_T}$PKG_CONFIG" >&6
4034 else
4035   echo "$as_me:4035: result: no" >&5
4036 echo "${ECHO_T}no" >&6
4037 fi
4038
4039 fi
4040 if test -z "$ac_cv_path_PKG_CONFIG"; then
4041   ac_pt_PKG_CONFIG=$PKG_CONFIG
4042   # Extract the first word of "pkg-config", so it can be a program name with args.
4043 set dummy pkg-config; ac_word=$2
4044 echo "$as_me:4044: checking for $ac_word" >&5
4045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4046 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4047   echo $ECHO_N "(cached) $ECHO_C" >&6
4048 else
4049   case $ac_pt_PKG_CONFIG in
4050   [\\/]* | ?:[\\/]*)
4051   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4052   ;;
4053   *)
4054   ac_save_IFS=$IFS; IFS=$ac_path_separator
4055 ac_dummy="$PATH"
4056 for ac_dir in $ac_dummy; do
4057   IFS=$ac_save_IFS
4058   test -z "$ac_dir" && ac_dir=.
4059   if $as_executable_p "$ac_dir/$ac_word"; then
4060    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4061    echo "$as_me:4061: found $ac_dir/$ac_word" >&5
4062    break
4063 fi
4064 done
4065
4066   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4067   ;;
4068 esac
4069 fi
4070 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4071
4072 if test -n "$ac_pt_PKG_CONFIG"; then
4073   echo "$as_me:4073: result: $ac_pt_PKG_CONFIG" >&5
4074 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4075 else
4076   echo "$as_me:4076: result: no" >&5
4077 echo "${ECHO_T}no" >&6
4078 fi
4079
4080   PKG_CONFIG=$ac_pt_PKG_CONFIG
4081 else
4082   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4083 fi
4084
4085         ;;
4086 (*)
4087         PKG_CONFIG=$withval
4088         ;;
4089 esac
4090
4091 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4092 if test "$PKG_CONFIG" != none ; then
4093
4094 if test "x$prefix" != xNONE; then
4095         cf_path_syntax="$prefix"
4096 else
4097         cf_path_syntax="$ac_default_prefix"
4098 fi
4099
4100 case ".$PKG_CONFIG" in
4101 (.\$\(*\)*|.\'*\'*)
4102         ;;
4103 (..|./*|.\\*)
4104         ;;
4105 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4106         ;;
4107 (.\$\{*prefix\}*|.\$\{*dir\}*)
4108         eval PKG_CONFIG="$PKG_CONFIG"
4109         case ".$PKG_CONFIG" in
4110         (.NONE/*)
4111                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4112                 ;;
4113         esac
4114         ;;
4115 (.no|.NONE/*)
4116         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4117         ;;
4118 (*)
4119         { { echo "$as_me:4119: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4120 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4121    { (exit 1); exit 1; }; }
4122         ;;
4123 esac
4124
4125 elif test "x$cf_pkg_config" != xno ; then
4126         { echo "$as_me:4126: WARNING: pkg-config is not installed" >&5
4127 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4128 fi
4129
4130 case "$PKG_CONFIG" in
4131 (no|none|yes)
4132         echo "$as_me:4132: checking for pkg-config library directory" >&5
4133 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4134         ;;
4135 (*)
4136         echo "$as_me:4136: checking for $PKG_CONFIG library directory" >&5
4137 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4138         ;;
4139 esac
4140
4141 PKG_CONFIG_LIBDIR=no
4142
4143 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4144 if test "${with_pkg_config_libdir+set}" = set; then
4145   withval="$with_pkg_config_libdir"
4146   PKG_CONFIG_LIBDIR=$withval
4147 else
4148   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
4149 fi;
4150
4151 case x$PKG_CONFIG_LIBDIR in
4152 (x/*)
4153         ;;
4154 (xyes)
4155         # Look for the library directory using the same prefix as the executable
4156         if test "x$PKG_CONFIG" = xnone
4157         then
4158                 cf_path=$prefix
4159         else
4160                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
4161         fi
4162
4163         # If you don't like using the default architecture, you have to specify the
4164         # intended library directory and corresponding compiler/linker options.
4165         #
4166         # This case allows for Debian's 2014-flavor of multiarch, along with the
4167         # most common variations before that point.  Some other variants spell the
4168         # directory differently, e.g., "pkg-config", and put it in unusual places.
4169         # pkg-config has always been poorly standardized, which is ironic...
4170         case x`(arch) 2>/dev/null` in
4171         (*64)
4172                 cf_search_path="\
4173                         $cf_path/lib/*64-linux-gnu \
4174                         $cf_path/share \
4175                         $cf_path/lib64 \
4176                         $cf_path/lib32 \
4177                         $cf_path/lib"
4178                 ;;
4179         (*)
4180                 cf_search_path="\
4181                         $cf_path/lib/*-linux-gnu \
4182                         $cf_path/share \
4183                         $cf_path/lib32 \
4184                         $cf_path/lib \
4185                         $cf_path/libdata"
4186                 ;;
4187         esac
4188
4189         test -n "$verbose" && echo "    list..." 1>&6
4190
4191 echo "${as_me:-configure}:4191: testing list... ..." 1>&5
4192
4193         for cf_config in $cf_search_path
4194         do
4195                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
4196
4197 echo "${as_me:-configure}:4197: testing checking $cf_config/pkgconfig ..." 1>&5
4198
4199                 if test -d "$cf_config/pkgconfig"
4200                 then
4201                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
4202                         echo "$as_me:4202: checking done" >&5
4203 echo $ECHO_N "checking done... $ECHO_C" >&6
4204                         break
4205                 fi
4206         done
4207         ;;
4208 (*)
4209         ;;
4210 esac
4211
4212 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4213         echo "$as_me:4213: result: $PKG_CONFIG_LIBDIR" >&5
4214 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4215 fi
4216
4217 if test "x$PKG_CONFIG" != xnone
4218 then
4219         echo "$as_me:4219: checking if we should install .pc files for $PKG_CONFIG" >&5
4220 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4221 else
4222         echo "$as_me:4222: checking if we should install .pc files" >&5
4223 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4224 fi
4225
4226 # Check whether --enable-pc-files or --disable-pc-files was given.
4227 if test "${enable_pc_files+set}" = set; then
4228   enableval="$enable_pc_files"
4229   enable_pc_files=$enableval
4230 else
4231   enable_pc_files=no
4232 fi;
4233 echo "$as_me:4233: result: $enable_pc_files" >&5
4234 echo "${ECHO_T}$enable_pc_files" >&6
4235
4236 if test "x$enable_pc_files" != xno
4237 then
4238         MAKE_PC_FILES=
4239         case "x$PKG_CONFIG_LIBDIR" in
4240         (xno|xyes)
4241                 { echo "$as_me:4241: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4242 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4243                 ;;
4244         (*)
4245
4246 if test "x$prefix" != xNONE; then
4247         cf_path_syntax="$prefix"
4248 else
4249         cf_path_syntax="$ac_default_prefix"
4250 fi
4251
4252 case ".$PKG_CONFIG_LIBDIR" in
4253 (.\$\(*\)*|.\'*\'*)
4254         ;;
4255 (..|./*|.\\*)
4256         ;;
4257 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4258         ;;
4259 (.\$\{*prefix\}*|.\$\{*dir\}*)
4260         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4261         case ".$PKG_CONFIG_LIBDIR" in
4262         (.NONE/*)
4263                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4264                 ;;
4265         esac
4266         ;;
4267 (.no|.NONE/*)
4268         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4269         ;;
4270 (*)
4271         { { echo "$as_me:4271: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4272 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4273    { (exit 1); exit 1; }; }
4274         ;;
4275 esac
4276
4277                 ;;
4278         esac
4279 else
4280         MAKE_PC_FILES="#"
4281 fi
4282
4283 if test -z "$MAKE_PC_FILES"
4284 then
4285         echo "$as_me:4285: checking for suffix to add to pc-files" >&5
4286 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4287
4288 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4289 if test "${with_pc_suffix+set}" = set; then
4290   withval="$with_pc_suffix"
4291   case "x$withval" in
4292         (xyes|xno)
4293                 PC_MODULE_SUFFIX=
4294                 ;;
4295         (*)     PC_MODULE_SUFFIX="$withval"
4296                 ;;
4297         esac
4298 fi;
4299         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4300         echo "$as_me:4300: result: $PC_MODULE_SUFFIX" >&5
4301 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4302         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4303
4304 fi
4305
4306 echo "$as_me:4306: checking if we should assume mixed-case filenames" >&5
4307 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4308
4309 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4310 if test "${enable_mixed_case+set}" = set; then
4311   enableval="$enable_mixed_case"
4312   enable_mixedcase=$enableval
4313 else
4314   enable_mixedcase=auto
4315 fi;
4316 echo "$as_me:4316: result: $enable_mixedcase" >&5
4317 echo "${ECHO_T}$enable_mixedcase" >&6
4318 if test "$enable_mixedcase" = "auto" ; then
4319
4320 echo "$as_me:4320: checking if filesystem supports mixed-case filenames" >&5
4321 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4322 if test "${cf_cv_mixedcase+set}" = set; then
4323   echo $ECHO_N "(cached) $ECHO_C" >&6
4324 else
4325
4326 if test "$cross_compiling" = yes ; then
4327         case "$target_alias" in
4328         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4329                 cf_cv_mixedcase=no
4330                 ;;
4331         (*)
4332                 cf_cv_mixedcase=yes
4333                 ;;
4334         esac
4335 else
4336         rm -f conftest CONFTEST
4337         echo test >conftest
4338         if test -f CONFTEST ; then
4339                 cf_cv_mixedcase=no
4340         else
4341                 cf_cv_mixedcase=yes
4342         fi
4343         rm -f conftest CONFTEST
4344 fi
4345
4346 fi
4347 echo "$as_me:4347: result: $cf_cv_mixedcase" >&5
4348 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4349 test "$cf_cv_mixedcase" = yes &&
4350 cat >>confdefs.h <<\EOF
4351 #define MIXEDCASE_FILENAMES 1
4352 EOF
4353
4354 else
4355         cf_cv_mixedcase=$enable_mixedcase
4356         if test "x$enable_mixedcase" = "xyes" ; then
4357
4358 cat >>confdefs.h <<\EOF
4359 #define MIXEDCASE_FILENAMES 1
4360 EOF
4361
4362         fi
4363 fi
4364
4365 # do this after mixed-case option (tags/TAGS is not as important as tic).
4366 echo "$as_me:4366: checking whether ${MAKE-make} sets \${MAKE}" >&5
4367 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4368 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4369 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4370   echo $ECHO_N "(cached) $ECHO_C" >&6
4371 else
4372   cat >conftest.make <<\EOF
4373 all:
4374         @echo 'ac_maketemp="${MAKE}"'
4375 EOF
4376 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4377 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4378 if test -n "$ac_maketemp"; then
4379   eval ac_cv_prog_make_${ac_make}_set=yes
4380 else
4381   eval ac_cv_prog_make_${ac_make}_set=no
4382 fi
4383 rm -f conftest.make
4384 fi
4385 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4386   echo "$as_me:4386: result: yes" >&5
4387 echo "${ECHO_T}yes" >&6
4388   SET_MAKE=
4389 else
4390   echo "$as_me:4390: result: no" >&5
4391 echo "${ECHO_T}no" >&6
4392   SET_MAKE="MAKE=${MAKE-make}"
4393 fi
4394
4395 echo "$as_me:4395: checking for \".PHONY\" make-support" >&5
4396 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4397 if test "${cf_cv_make_PHONY+set}" = set; then
4398   echo $ECHO_N "(cached) $ECHO_C" >&6
4399 else
4400
4401         rm -rf conftest*
4402         (
4403                 mkdir conftest || exit 1
4404                 cd conftest
4405                 cat >makefile <<'CF_EOF'
4406 .PHONY: always
4407 DATA=0
4408 always: always.out
4409         @echo "** making $@ $(DATA)"
4410 once: once.out
4411         @echo "** making $@ $(DATA)"
4412 always.out:
4413         @echo "** making $@ $(DATA)"
4414         echo $(DATA) > $@
4415 once.out:
4416         @echo "** making $@ $(DATA)"
4417         echo $(DATA) > $@
4418 CF_EOF
4419                 for cf_data in 1 2 3
4420                 do
4421                         ${MAKE:-make} always DATA=$cf_data
4422                         ${MAKE:-make} once   DATA=$cf_data
4423                         ${MAKE:-make} -t always once
4424                         if test -f always ; then
4425                                 echo "no (case 1)" > ../conftest.tmp
4426                         elif test ! -f always.out ; then
4427                                 echo "no (case 2)" > ../conftest.tmp
4428                         elif test ! -f once.out ; then
4429                                 echo "no (case 3)" > ../conftest.tmp
4430                         elif ! cmp -s always.out once.out ; then
4431                                 echo "no (case 4)" > ../conftest.tmp
4432                                 diff always.out once.out
4433                         else
4434                                 cf_check="`cat always.out`"
4435                                 if test "x$cf_check" != "x$cf_data" ; then
4436                                         echo "no (case 5)" > ../conftest.tmp
4437                                 else
4438                                         echo yes > ../conftest.tmp
4439                                         rm -f ./*.out
4440                                         continue
4441                                 fi
4442                         fi
4443                         break
4444                 done
4445         ) >&5 2>&1
4446         cf_cv_make_PHONY="`cat conftest.tmp`"
4447         rm -rf conftest*
4448
4449 fi
4450 echo "$as_me:4450: result: $cf_cv_make_PHONY" >&5
4451 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4452 MAKE_NO_PHONY="#"
4453 MAKE_PHONY="#"
4454 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4455 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4456
4457 for ac_prog in exctags ctags
4458 do
4459   # Extract the first word of "$ac_prog", so it can be a program name with args.
4460 set dummy $ac_prog; ac_word=$2
4461 echo "$as_me:4461: checking for $ac_word" >&5
4462 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4463 if test "${ac_cv_prog_CTAGS+set}" = set; then
4464   echo $ECHO_N "(cached) $ECHO_C" >&6
4465 else
4466   if test -n "$CTAGS"; then
4467   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4468 else
4469   ac_save_IFS=$IFS; IFS=$ac_path_separator
4470 ac_dummy="$PATH"
4471 for ac_dir in $ac_dummy; do
4472   IFS=$ac_save_IFS
4473   test -z "$ac_dir" && ac_dir=.
4474   $as_executable_p "$ac_dir/$ac_word" || continue
4475 ac_cv_prog_CTAGS="$ac_prog"
4476 echo "$as_me:4476: found $ac_dir/$ac_word" >&5
4477 break
4478 done
4479
4480 fi
4481 fi
4482 CTAGS=$ac_cv_prog_CTAGS
4483 if test -n "$CTAGS"; then
4484   echo "$as_me:4484: result: $CTAGS" >&5
4485 echo "${ECHO_T}$CTAGS" >&6
4486 else
4487   echo "$as_me:4487: result: no" >&5
4488 echo "${ECHO_T}no" >&6
4489 fi
4490
4491   test -n "$CTAGS" && break
4492 done
4493
4494 for ac_prog in exetags etags
4495 do
4496   # Extract the first word of "$ac_prog", so it can be a program name with args.
4497 set dummy $ac_prog; ac_word=$2
4498 echo "$as_me:4498: checking for $ac_word" >&5
4499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4500 if test "${ac_cv_prog_ETAGS+set}" = set; then
4501   echo $ECHO_N "(cached) $ECHO_C" >&6
4502 else
4503   if test -n "$ETAGS"; then
4504   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4505 else
4506   ac_save_IFS=$IFS; IFS=$ac_path_separator
4507 ac_dummy="$PATH"
4508 for ac_dir in $ac_dummy; do
4509   IFS=$ac_save_IFS
4510   test -z "$ac_dir" && ac_dir=.
4511   $as_executable_p "$ac_dir/$ac_word" || continue
4512 ac_cv_prog_ETAGS="$ac_prog"
4513 echo "$as_me:4513: found $ac_dir/$ac_word" >&5
4514 break
4515 done
4516
4517 fi
4518 fi
4519 ETAGS=$ac_cv_prog_ETAGS
4520 if test -n "$ETAGS"; then
4521   echo "$as_me:4521: result: $ETAGS" >&5
4522 echo "${ECHO_T}$ETAGS" >&6
4523 else
4524   echo "$as_me:4524: result: no" >&5
4525 echo "${ECHO_T}no" >&6
4526 fi
4527
4528   test -n "$ETAGS" && break
4529 done
4530
4531 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4532 set dummy ${CTAGS:-ctags}; ac_word=$2
4533 echo "$as_me:4533: checking for $ac_word" >&5
4534 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4535 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4536   echo $ECHO_N "(cached) $ECHO_C" >&6
4537 else
4538   if test -n "$MAKE_LOWER_TAGS"; then
4539   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4540 else
4541   ac_save_IFS=$IFS; IFS=$ac_path_separator
4542 ac_dummy="$PATH"
4543 for ac_dir in $ac_dummy; do
4544   IFS=$ac_save_IFS
4545   test -z "$ac_dir" && ac_dir=.
4546   $as_executable_p "$ac_dir/$ac_word" || continue
4547 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4548 echo "$as_me:4548: found $ac_dir/$ac_word" >&5
4549 break
4550 done
4551
4552   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4553 fi
4554 fi
4555 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4556 if test -n "$MAKE_LOWER_TAGS"; then
4557   echo "$as_me:4557: result: $MAKE_LOWER_TAGS" >&5
4558 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4559 else
4560   echo "$as_me:4560: result: no" >&5
4561 echo "${ECHO_T}no" >&6
4562 fi
4563
4564 if test "$cf_cv_mixedcase" = yes ; then
4565         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4566 set dummy ${ETAGS:-etags}; ac_word=$2
4567 echo "$as_me:4567: checking for $ac_word" >&5
4568 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4569 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4570   echo $ECHO_N "(cached) $ECHO_C" >&6
4571 else
4572   if test -n "$MAKE_UPPER_TAGS"; then
4573   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4574 else
4575   ac_save_IFS=$IFS; IFS=$ac_path_separator
4576 ac_dummy="$PATH"
4577 for ac_dir in $ac_dummy; do
4578   IFS=$ac_save_IFS
4579   test -z "$ac_dir" && ac_dir=.
4580   $as_executable_p "$ac_dir/$ac_word" || continue
4581 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4582 echo "$as_me:4582: found $ac_dir/$ac_word" >&5
4583 break
4584 done
4585
4586   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4587 fi
4588 fi
4589 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4590 if test -n "$MAKE_UPPER_TAGS"; then
4591   echo "$as_me:4591: result: $MAKE_UPPER_TAGS" >&5
4592 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4593 else
4594   echo "$as_me:4594: result: no" >&5
4595 echo "${ECHO_T}no" >&6
4596 fi
4597
4598 else
4599         MAKE_UPPER_TAGS=no
4600 fi
4601
4602 if test "$MAKE_UPPER_TAGS" = yes ; then
4603         MAKE_UPPER_TAGS=
4604 else
4605         MAKE_UPPER_TAGS="#"
4606 fi
4607
4608 if test "$MAKE_LOWER_TAGS" = yes ; then
4609         MAKE_LOWER_TAGS=
4610 else
4611         MAKE_LOWER_TAGS="#"
4612 fi
4613
4614 echo "$as_me:4614: checking for makeflags variable" >&5
4615 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4616 if test "${cf_cv_makeflags+set}" = set; then
4617   echo $ECHO_N "(cached) $ECHO_C" >&6
4618 else
4619
4620         cf_cv_makeflags=''
4621         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4622         do
4623                 cat >cf_makeflags.tmp <<CF_EOF
4624 SHELL = $SHELL
4625 all :
4626         @ echo '.$cf_option'
4627 CF_EOF
4628                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4629                 case "$cf_result" in
4630                 (.*k|.*kw)
4631                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4632                         case "$cf_result" in
4633                         (.*CC=*)        cf_cv_makeflags=
4634                                 ;;
4635                         (*)     cf_cv_makeflags=$cf_option
4636                                 ;;
4637                         esac
4638                         break
4639                         ;;
4640                 (.-)
4641                         ;;
4642                 (*)
4643
4644 echo "${as_me:-configure}:4644: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4645
4646                         ;;
4647                 esac
4648         done
4649         rm -f cf_makeflags.tmp
4650
4651 fi
4652 echo "$as_me:4652: result: $cf_cv_makeflags" >&5
4653 echo "${ECHO_T}$cf_cv_makeflags" >&6
4654
4655 if test -n "$ac_tool_prefix"; then
4656   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4657 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4658 echo "$as_me:4658: checking for $ac_word" >&5
4659 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4660 if test "${ac_cv_prog_RANLIB+set}" = set; then
4661   echo $ECHO_N "(cached) $ECHO_C" >&6
4662 else
4663   if test -n "$RANLIB"; then
4664   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4665 else
4666   ac_save_IFS=$IFS; IFS=$ac_path_separator
4667 ac_dummy="$PATH"
4668 for ac_dir in $ac_dummy; do
4669   IFS=$ac_save_IFS
4670   test -z "$ac_dir" && ac_dir=.
4671   $as_executable_p "$ac_dir/$ac_word" || continue
4672 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4673 echo "$as_me:4673: found $ac_dir/$ac_word" >&5
4674 break
4675 done
4676
4677 fi
4678 fi
4679 RANLIB=$ac_cv_prog_RANLIB
4680 if test -n "$RANLIB"; then
4681   echo "$as_me:4681: result: $RANLIB" >&5
4682 echo "${ECHO_T}$RANLIB" >&6
4683 else
4684   echo "$as_me:4684: result: no" >&5
4685 echo "${ECHO_T}no" >&6
4686 fi
4687
4688 fi
4689 if test -z "$ac_cv_prog_RANLIB"; then
4690   ac_ct_RANLIB=$RANLIB
4691   # Extract the first word of "ranlib", so it can be a program name with args.
4692 set dummy ranlib; ac_word=$2
4693 echo "$as_me:4693: checking for $ac_word" >&5
4694 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4695 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4696   echo $ECHO_N "(cached) $ECHO_C" >&6
4697 else
4698   if test -n "$ac_ct_RANLIB"; then
4699   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4700 else
4701   ac_save_IFS=$IFS; IFS=$ac_path_separator
4702 ac_dummy="$PATH"
4703 for ac_dir in $ac_dummy; do
4704   IFS=$ac_save_IFS
4705   test -z "$ac_dir" && ac_dir=.
4706   $as_executable_p "$ac_dir/$ac_word" || continue
4707 ac_cv_prog_ac_ct_RANLIB="ranlib"
4708 echo "$as_me:4708: found $ac_dir/$ac_word" >&5
4709 break
4710 done
4711
4712   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4713 fi
4714 fi
4715 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4716 if test -n "$ac_ct_RANLIB"; then
4717   echo "$as_me:4717: result: $ac_ct_RANLIB" >&5
4718 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4719 else
4720   echo "$as_me:4720: result: no" >&5
4721 echo "${ECHO_T}no" >&6
4722 fi
4723
4724   RANLIB=$ac_ct_RANLIB
4725 else
4726   RANLIB="$ac_cv_prog_RANLIB"
4727 fi
4728
4729 if test -n "$ac_tool_prefix"; then
4730   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4731 set dummy ${ac_tool_prefix}ld; ac_word=$2
4732 echo "$as_me:4732: checking for $ac_word" >&5
4733 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4734 if test "${ac_cv_prog_LD+set}" = set; then
4735   echo $ECHO_N "(cached) $ECHO_C" >&6
4736 else
4737   if test -n "$LD"; then
4738   ac_cv_prog_LD="$LD" # Let the user override the test.
4739 else
4740   ac_save_IFS=$IFS; IFS=$ac_path_separator
4741 ac_dummy="$PATH"
4742 for ac_dir in $ac_dummy; do
4743   IFS=$ac_save_IFS
4744   test -z "$ac_dir" && ac_dir=.
4745   $as_executable_p "$ac_dir/$ac_word" || continue
4746 ac_cv_prog_LD="${ac_tool_prefix}ld"
4747 echo "$as_me:4747: found $ac_dir/$ac_word" >&5
4748 break
4749 done
4750
4751 fi
4752 fi
4753 LD=$ac_cv_prog_LD
4754 if test -n "$LD"; then
4755   echo "$as_me:4755: result: $LD" >&5
4756 echo "${ECHO_T}$LD" >&6
4757 else
4758   echo "$as_me:4758: result: no" >&5
4759 echo "${ECHO_T}no" >&6
4760 fi
4761
4762 fi
4763 if test -z "$ac_cv_prog_LD"; then
4764   ac_ct_LD=$LD
4765   # Extract the first word of "ld", so it can be a program name with args.
4766 set dummy ld; ac_word=$2
4767 echo "$as_me:4767: checking for $ac_word" >&5
4768 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4769 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4770   echo $ECHO_N "(cached) $ECHO_C" >&6
4771 else
4772   if test -n "$ac_ct_LD"; then
4773   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4774 else
4775   ac_save_IFS=$IFS; IFS=$ac_path_separator
4776 ac_dummy="$PATH"
4777 for ac_dir in $ac_dummy; do
4778   IFS=$ac_save_IFS
4779   test -z "$ac_dir" && ac_dir=.
4780   $as_executable_p "$ac_dir/$ac_word" || continue
4781 ac_cv_prog_ac_ct_LD="ld"
4782 echo "$as_me:4782: found $ac_dir/$ac_word" >&5
4783 break
4784 done
4785
4786   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4787 fi
4788 fi
4789 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4790 if test -n "$ac_ct_LD"; then
4791   echo "$as_me:4791: result: $ac_ct_LD" >&5
4792 echo "${ECHO_T}$ac_ct_LD" >&6
4793 else
4794   echo "$as_me:4794: result: no" >&5
4795 echo "${ECHO_T}no" >&6
4796 fi
4797
4798   LD=$ac_ct_LD
4799 else
4800   LD="$ac_cv_prog_LD"
4801 fi
4802
4803 if test -n "$ac_tool_prefix"; then
4804   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4805 set dummy ${ac_tool_prefix}ar; ac_word=$2
4806 echo "$as_me:4806: checking for $ac_word" >&5
4807 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4808 if test "${ac_cv_prog_AR+set}" = set; then
4809   echo $ECHO_N "(cached) $ECHO_C" >&6
4810 else
4811   if test -n "$AR"; then
4812   ac_cv_prog_AR="$AR" # Let the user override the test.
4813 else
4814   ac_save_IFS=$IFS; IFS=$ac_path_separator
4815 ac_dummy="$PATH"
4816 for ac_dir in $ac_dummy; do
4817   IFS=$ac_save_IFS
4818   test -z "$ac_dir" && ac_dir=.
4819   $as_executable_p "$ac_dir/$ac_word" || continue
4820 ac_cv_prog_AR="${ac_tool_prefix}ar"
4821 echo "$as_me:4821: found $ac_dir/$ac_word" >&5
4822 break
4823 done
4824
4825 fi
4826 fi
4827 AR=$ac_cv_prog_AR
4828 if test -n "$AR"; then
4829   echo "$as_me:4829: result: $AR" >&5
4830 echo "${ECHO_T}$AR" >&6
4831 else
4832   echo "$as_me:4832: result: no" >&5
4833 echo "${ECHO_T}no" >&6
4834 fi
4835
4836 fi
4837 if test -z "$ac_cv_prog_AR"; then
4838   ac_ct_AR=$AR
4839   # Extract the first word of "ar", so it can be a program name with args.
4840 set dummy ar; ac_word=$2
4841 echo "$as_me:4841: checking for $ac_word" >&5
4842 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4843 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4844   echo $ECHO_N "(cached) $ECHO_C" >&6
4845 else
4846   if test -n "$ac_ct_AR"; then
4847   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4848 else
4849   ac_save_IFS=$IFS; IFS=$ac_path_separator
4850 ac_dummy="$PATH"
4851 for ac_dir in $ac_dummy; do
4852   IFS=$ac_save_IFS
4853   test -z "$ac_dir" && ac_dir=.
4854   $as_executable_p "$ac_dir/$ac_word" || continue
4855 ac_cv_prog_ac_ct_AR="ar"
4856 echo "$as_me:4856: found $ac_dir/$ac_word" >&5
4857 break
4858 done
4859
4860   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4861 fi
4862 fi
4863 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4864 if test -n "$ac_ct_AR"; then
4865   echo "$as_me:4865: result: $ac_ct_AR" >&5
4866 echo "${ECHO_T}$ac_ct_AR" >&6
4867 else
4868   echo "$as_me:4868: result: no" >&5
4869 echo "${ECHO_T}no" >&6
4870 fi
4871
4872   AR=$ac_ct_AR
4873 else
4874   AR="$ac_cv_prog_AR"
4875 fi
4876
4877 if test -n "$ac_tool_prefix"; then
4878   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4879 set dummy ${ac_tool_prefix}nm; ac_word=$2
4880 echo "$as_me:4880: checking for $ac_word" >&5
4881 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4882 if test "${ac_cv_prog_NM+set}" = set; then
4883   echo $ECHO_N "(cached) $ECHO_C" >&6
4884 else
4885   if test -n "$NM"; then
4886   ac_cv_prog_NM="$NM" # Let the user override the test.
4887 else
4888   ac_save_IFS=$IFS; IFS=$ac_path_separator
4889 ac_dummy="$PATH"
4890 for ac_dir in $ac_dummy; do
4891   IFS=$ac_save_IFS
4892   test -z "$ac_dir" && ac_dir=.
4893   $as_executable_p "$ac_dir/$ac_word" || continue
4894 ac_cv_prog_NM="${ac_tool_prefix}nm"
4895 echo "$as_me:4895: found $ac_dir/$ac_word" >&5
4896 break
4897 done
4898
4899 fi
4900 fi
4901 NM=$ac_cv_prog_NM
4902 if test -n "$NM"; then
4903   echo "$as_me:4903: result: $NM" >&5
4904 echo "${ECHO_T}$NM" >&6
4905 else
4906   echo "$as_me:4906: result: no" >&5
4907 echo "${ECHO_T}no" >&6
4908 fi
4909
4910 fi
4911 if test -z "$ac_cv_prog_NM"; then
4912   ac_ct_NM=$NM
4913   # Extract the first word of "nm", so it can be a program name with args.
4914 set dummy nm; ac_word=$2
4915 echo "$as_me:4915: checking for $ac_word" >&5
4916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4917 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4918   echo $ECHO_N "(cached) $ECHO_C" >&6
4919 else
4920   if test -n "$ac_ct_NM"; then
4921   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4922 else
4923   ac_save_IFS=$IFS; IFS=$ac_path_separator
4924 ac_dummy="$PATH"
4925 for ac_dir in $ac_dummy; do
4926   IFS=$ac_save_IFS
4927   test -z "$ac_dir" && ac_dir=.
4928   $as_executable_p "$ac_dir/$ac_word" || continue
4929 ac_cv_prog_ac_ct_NM="nm"
4930 echo "$as_me:4930: found $ac_dir/$ac_word" >&5
4931 break
4932 done
4933
4934   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4935 fi
4936 fi
4937 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4938 if test -n "$ac_ct_NM"; then
4939   echo "$as_me:4939: result: $ac_ct_NM" >&5
4940 echo "${ECHO_T}$ac_ct_NM" >&6
4941 else
4942   echo "$as_me:4942: result: no" >&5
4943 echo "${ECHO_T}no" >&6
4944 fi
4945
4946   NM=$ac_ct_NM
4947 else
4948   NM="$ac_cv_prog_NM"
4949 fi
4950
4951 if test -n "$ac_tool_prefix"; then
4952   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4953 set dummy ${ac_tool_prefix}ar; ac_word=$2
4954 echo "$as_me:4954: checking for $ac_word" >&5
4955 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4956 if test "${ac_cv_prog_AR+set}" = set; then
4957   echo $ECHO_N "(cached) $ECHO_C" >&6
4958 else
4959   if test -n "$AR"; then
4960   ac_cv_prog_AR="$AR" # Let the user override the test.
4961 else
4962   ac_save_IFS=$IFS; IFS=$ac_path_separator
4963 ac_dummy="$PATH"
4964 for ac_dir in $ac_dummy; do
4965   IFS=$ac_save_IFS
4966   test -z "$ac_dir" && ac_dir=.
4967   $as_executable_p "$ac_dir/$ac_word" || continue
4968 ac_cv_prog_AR="${ac_tool_prefix}ar"
4969 echo "$as_me:4969: found $ac_dir/$ac_word" >&5
4970 break
4971 done
4972
4973 fi
4974 fi
4975 AR=$ac_cv_prog_AR
4976 if test -n "$AR"; then
4977   echo "$as_me:4977: result: $AR" >&5
4978 echo "${ECHO_T}$AR" >&6
4979 else
4980   echo "$as_me:4980: result: no" >&5
4981 echo "${ECHO_T}no" >&6
4982 fi
4983
4984 fi
4985 if test -z "$ac_cv_prog_AR"; then
4986   ac_ct_AR=$AR
4987   # Extract the first word of "ar", so it can be a program name with args.
4988 set dummy ar; ac_word=$2
4989 echo "$as_me:4989: checking for $ac_word" >&5
4990 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4991 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4992   echo $ECHO_N "(cached) $ECHO_C" >&6
4993 else
4994   if test -n "$ac_ct_AR"; then
4995   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4996 else
4997   ac_save_IFS=$IFS; IFS=$ac_path_separator
4998 ac_dummy="$PATH"
4999 for ac_dir in $ac_dummy; do
5000   IFS=$ac_save_IFS
5001   test -z "$ac_dir" && ac_dir=.
5002   $as_executable_p "$ac_dir/$ac_word" || continue
5003 ac_cv_prog_ac_ct_AR="ar"
5004 echo "$as_me:5004: found $ac_dir/$ac_word" >&5
5005 break
5006 done
5007
5008   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5009 fi
5010 fi
5011 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5012 if test -n "$ac_ct_AR"; then
5013   echo "$as_me:5013: result: $ac_ct_AR" >&5
5014 echo "${ECHO_T}$ac_ct_AR" >&6
5015 else
5016   echo "$as_me:5016: result: no" >&5
5017 echo "${ECHO_T}no" >&6
5018 fi
5019
5020   AR=$ac_ct_AR
5021 else
5022   AR="$ac_cv_prog_AR"
5023 fi
5024
5025 echo "$as_me:5025: checking for options to update archives" >&5
5026 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5027 if test "${cf_cv_ar_flags+set}" = set; then
5028   echo $ECHO_N "(cached) $ECHO_C" >&6
5029 else
5030
5031         case "$cf_cv_system_name" in
5032         (*-msvc*)
5033                 cf_cv_ar_flags=''
5034                 cat >mk_static_lib.sh <<-EOF
5035                 #!$SHELL
5036                 MSVC_BIN="$AR"
5037                 out="\$1"
5038                 shift
5039                 exec \$MSVC_BIN -out:"\$out" \$@
5040                 EOF
5041                 chmod +x mk_static_lib.sh
5042                 AR=`pwd`/mk_static_lib.sh
5043                 ;;
5044         (*)
5045                 cf_cv_ar_flags=unknown
5046                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5047                 do
5048
5049                         # check if $ARFLAGS already contains this choice
5050                         if test "x$ARFLAGS" != "x" ; then
5051                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5052                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5053                                         cf_cv_ar_flags=
5054                                         break
5055                                 fi
5056                         fi
5057
5058                         rm -f "conftest.$ac_cv_objext"
5059                         rm -f conftest.a
5060
5061                         cat >"conftest.$ac_ext" <<EOF
5062 #line 5062 "configure"
5063 int     testdata[3] = { 123, 456, 789 };
5064 EOF
5065                         if { (eval echo "$as_me:5065: \"$ac_compile\"") >&5
5066   (eval $ac_compile) 2>&5
5067   ac_status=$?
5068   echo "$as_me:5068: \$? = $ac_status" >&5
5069   (exit "$ac_status"); } ; then
5070                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5071                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5072                                 if test -f conftest.a ; then
5073                                         cf_cv_ar_flags="$cf_ar_flags"
5074                                         break
5075                                 fi
5076                         else
5077                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5078
5079 echo "${as_me:-configure}:5079: testing cannot compile test-program ..." 1>&5
5080
5081                                 break
5082                         fi
5083                 done
5084                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5085                 ;;
5086         esac
5087
5088 fi
5089 echo "$as_me:5089: result: $cf_cv_ar_flags" >&5
5090 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5091
5092 if test -n "$ARFLAGS" ; then
5093         if test -n "$cf_cv_ar_flags" ; then
5094                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5095         fi
5096 else
5097         ARFLAGS=$cf_cv_ar_flags
5098 fi
5099
5100 echo "$as_me:5100: checking if you have specified an install-prefix" >&5
5101 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5102
5103 # Check whether --with-install-prefix or --without-install-prefix was given.
5104 if test "${with_install_prefix+set}" = set; then
5105   withval="$with_install_prefix"
5106   case "x$withval" in
5107         (xyes|xno)
5108                 ;;
5109         (*)     DESTDIR="$withval"
5110                 ;;
5111         esac
5112 fi;
5113 echo "$as_me:5113: result: $DESTDIR" >&5
5114 echo "${ECHO_T}$DESTDIR" >&6
5115
5116 ###############################################################################
5117
5118 # If we're cross-compiling, allow the user to override the tools and their
5119 # options.  The configure script is oriented toward identifying the host
5120 # compiler, etc., but we need a build compiler to generate parts of the source.
5121
5122 case "$cf_cv_system_name" in
5123 (*-msvc*)
5124         LDFLAGS="$LDFLAGS user32.lib"
5125         export LDFLAGS
5126         ;;
5127 esac
5128
5129 if test "$cross_compiling" = yes ; then
5130
5131         # defaults that we might want to override
5132         : ${BUILD_CFLAGS:=''}
5133         : ${BUILD_CPPFLAGS:=''}
5134         : ${BUILD_LDFLAGS:=''}
5135         : ${BUILD_LIBS:=''}
5136         : ${BUILD_EXEEXT:='$x'}
5137         : ${BUILD_OBJEXT:='o'}
5138
5139 # Check whether --with-build-cc or --without-build-cc was given.
5140 if test "${with_build_cc+set}" = set; then
5141   withval="$with_build_cc"
5142   BUILD_CC="$withval"
5143 else
5144   for ac_prog in gcc clang c99 c89 cc cl
5145 do
5146   # Extract the first word of "$ac_prog", so it can be a program name with args.
5147 set dummy $ac_prog; ac_word=$2
5148 echo "$as_me:5148: checking for $ac_word" >&5
5149 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5150 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5151   echo $ECHO_N "(cached) $ECHO_C" >&6
5152 else
5153   if test -n "$BUILD_CC"; then
5154   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5155 else
5156   ac_save_IFS=$IFS; IFS=$ac_path_separator
5157 ac_dummy="$PATH"
5158 for ac_dir in $ac_dummy; do
5159   IFS=$ac_save_IFS
5160   test -z "$ac_dir" && ac_dir=.
5161   $as_executable_p "$ac_dir/$ac_word" || continue
5162 ac_cv_prog_BUILD_CC="$ac_prog"
5163 echo "$as_me:5163: found $ac_dir/$ac_word" >&5
5164 break
5165 done
5166
5167 fi
5168 fi
5169 BUILD_CC=$ac_cv_prog_BUILD_CC
5170 if test -n "$BUILD_CC"; then
5171   echo "$as_me:5171: result: $BUILD_CC" >&5
5172 echo "${ECHO_T}$BUILD_CC" >&6
5173 else
5174   echo "$as_me:5174: result: no" >&5
5175 echo "${ECHO_T}no" >&6
5176 fi
5177
5178   test -n "$BUILD_CC" && break
5179 done
5180 test -n "$BUILD_CC" || BUILD_CC="none"
5181
5182 fi;
5183         echo "$as_me:5183: checking for native build C compiler" >&5
5184 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5185         echo "$as_me:5185: result: $BUILD_CC" >&5
5186 echo "${ECHO_T}$BUILD_CC" >&6
5187
5188         echo "$as_me:5188: checking for native build C preprocessor" >&5
5189 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5190
5191 # Check whether --with-build-cpp or --without-build-cpp was given.
5192 if test "${with_build_cpp+set}" = set; then
5193   withval="$with_build_cpp"
5194   BUILD_CPP="$withval"
5195 else
5196   BUILD_CPP='${BUILD_CC} -E'
5197 fi;
5198         echo "$as_me:5198: result: $BUILD_CPP" >&5
5199 echo "${ECHO_T}$BUILD_CPP" >&6
5200
5201         echo "$as_me:5201: checking for native build C flags" >&5
5202 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5203
5204 # Check whether --with-build-cflags or --without-build-cflags was given.
5205 if test "${with_build_cflags+set}" = set; then
5206   withval="$with_build_cflags"
5207   BUILD_CFLAGS="$withval"
5208 fi;
5209         echo "$as_me:5209: result: $BUILD_CFLAGS" >&5
5210 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5211
5212         echo "$as_me:5212: checking for native build C preprocessor-flags" >&5
5213 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5214
5215 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5216 if test "${with_build_cppflags+set}" = set; then
5217   withval="$with_build_cppflags"
5218   BUILD_CPPFLAGS="$withval"
5219 fi;
5220         echo "$as_me:5220: result: $BUILD_CPPFLAGS" >&5
5221 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5222
5223         echo "$as_me:5223: checking for native build linker-flags" >&5
5224 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5225
5226 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5227 if test "${with_build_ldflags+set}" = set; then
5228   withval="$with_build_ldflags"
5229   BUILD_LDFLAGS="$withval"
5230 fi;
5231         echo "$as_me:5231: result: $BUILD_LDFLAGS" >&5
5232 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5233
5234         echo "$as_me:5234: checking for native build linker-libraries" >&5
5235 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5236
5237 # Check whether --with-build-libs or --without-build-libs was given.
5238 if test "${with_build_libs+set}" = set; then
5239   withval="$with_build_libs"
5240   BUILD_LIBS="$withval"
5241 fi;
5242         echo "$as_me:5242: result: $BUILD_LIBS" >&5
5243 echo "${ECHO_T}$BUILD_LIBS" >&6
5244
5245         # this assumes we're on Unix.
5246         BUILD_EXEEXT=
5247         BUILD_OBJEXT=o
5248
5249         : ${BUILD_CC:='${CC}'}
5250
5251         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5252                 { { echo "$as_me:5252: error: Cross-build requires two compilers.
5253 Use --with-build-cc to specify the native compiler." >&5
5254 echo "$as_me: error: Cross-build requires two compilers.
5255 Use --with-build-cc to specify the native compiler." >&2;}
5256    { (exit 1); exit 1; }; }
5257         fi
5258
5259 else
5260         : ${BUILD_CC:='${CC}'}
5261         : ${BUILD_CPP:='${CPP}'}
5262         : ${BUILD_CFLAGS:='${CFLAGS}'}
5263         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5264         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5265         : ${BUILD_LIBS:='${LIBS}'}
5266         : ${BUILD_EXEEXT:='$x'}
5267         : ${BUILD_OBJEXT:='o'}
5268 fi
5269
5270 ###############################################################################
5271
5272 ### Options to allow the user to specify the set of libraries which are used.
5273 ### Use "--without-normal --with-shared" to allow the default model to be
5274 ### shared, for example.
5275 cf_list_models=""
5276
5277 echo "$as_me:5277: checking if libtool -version-number should be used" >&5
5278 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5279
5280 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5281 if test "${enable_libtool_version+set}" = set; then
5282   enableval="$enable_libtool_version"
5283   test "$enableval" != no && enableval=yes
5284         if test "$enableval" != "yes" ; then
5285     cf_libtool_version=no
5286         else
5287                 cf_libtool_version=yes
5288         fi
5289 else
5290   enableval=yes
5291         cf_libtool_version=yes
5292
5293 fi;
5294 echo "$as_me:5294: result: $cf_libtool_version" >&5
5295 echo "${ECHO_T}$cf_libtool_version" >&6
5296
5297 if test "$cf_libtool_version" = yes ; then
5298         LIBTOOL_VERSION="-version-number"
5299 else
5300         LIBTOOL_VERSION="-version-info"
5301         case "x$VERSION" in
5302         (x)
5303                 { echo "$as_me:5303: WARNING: VERSION was not set" >&5
5304 echo "$as_me: WARNING: VERSION was not set" >&2;}
5305                 ;;
5306         (x*.*.*)
5307                 ABI_VERSION="$VERSION"
5308                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5309
5310 echo "${as_me:-configure}:5310: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5311
5312                 ;;
5313         (x*:*:*)
5314                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5315                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5316
5317 echo "${as_me:-configure}:5317: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5318
5319                 ;;
5320         (*)
5321                 { echo "$as_me:5321: WARNING: unexpected VERSION value: $VERSION" >&5
5322 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5323                 ;;
5324         esac
5325 fi
5326
5327 LIBTOOL=
5328
5329 # common library maintenance symbols that are convenient for libtool scripts:
5330 LIB_CREATE='${AR} -cr'
5331 LIB_OBJECT='${OBJECTS}'
5332 LIB_SUFFIX=.a
5333 LIB_PREP="$RANLIB"
5334
5335 # symbols used to prop libtool up to enable it to determine what it should be
5336 # doing:
5337 LIB_CLEAN=
5338 LIB_COMPILE=
5339 LIB_LINK='${CC}'
5340 LIB_INSTALL=
5341 LIB_UNINSTALL=
5342
5343 echo "$as_me:5343: checking if you want to build libraries with libtool" >&5
5344 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5345
5346 # Check whether --with-libtool or --without-libtool was given.
5347 if test "${with_libtool+set}" = set; then
5348   withval="$with_libtool"
5349   with_libtool=$withval
5350 else
5351   with_libtool=no
5352 fi;
5353 echo "$as_me:5353: result: $with_libtool" >&5
5354 echo "${ECHO_T}$with_libtool" >&6
5355 if test "$with_libtool" != "no"; then
5356
5357         if test "$with_libtool" != "yes" ; then
5358
5359 if test "x$prefix" != xNONE; then
5360         cf_path_syntax="$prefix"
5361 else
5362         cf_path_syntax="$ac_default_prefix"
5363 fi
5364
5365 case ".$with_libtool" in
5366 (.\$\(*\)*|.\'*\'*)
5367         ;;
5368 (..|./*|.\\*)
5369         ;;
5370 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5371         ;;
5372 (.\$\{*prefix\}*|.\$\{*dir\}*)
5373         eval with_libtool="$with_libtool"
5374         case ".$with_libtool" in
5375         (.NONE/*)
5376                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5377                 ;;
5378         esac
5379         ;;
5380 (.no|.NONE/*)
5381         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5382         ;;
5383 (*)
5384         { { echo "$as_me:5384: error: expected a pathname, not \"$with_libtool\"" >&5
5385 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5386    { (exit 1); exit 1; }; }
5387         ;;
5388 esac
5389
5390                 LIBTOOL=$with_libtool
5391         else
5392                 if test -n "$ac_tool_prefix"; then
5393   for ac_prog in libtool glibtool
5394   do
5395     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5396 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5397 echo "$as_me:5397: checking for $ac_word" >&5
5398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5399 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5400   echo $ECHO_N "(cached) $ECHO_C" >&6
5401 else
5402   if test -n "$LIBTOOL"; then
5403   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5404 else
5405   ac_save_IFS=$IFS; IFS=$ac_path_separator
5406 ac_dummy="$PATH"
5407 for ac_dir in $ac_dummy; do
5408   IFS=$ac_save_IFS
5409   test -z "$ac_dir" && ac_dir=.
5410   $as_executable_p "$ac_dir/$ac_word" || continue
5411 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5412 echo "$as_me:5412: found $ac_dir/$ac_word" >&5
5413 break
5414 done
5415
5416 fi
5417 fi
5418 LIBTOOL=$ac_cv_prog_LIBTOOL
5419 if test -n "$LIBTOOL"; then
5420   echo "$as_me:5420: result: $LIBTOOL" >&5
5421 echo "${ECHO_T}$LIBTOOL" >&6
5422 else
5423   echo "$as_me:5423: result: no" >&5
5424 echo "${ECHO_T}no" >&6
5425 fi
5426
5427     test -n "$LIBTOOL" && break
5428   done
5429 fi
5430 if test -z "$LIBTOOL"; then
5431   ac_ct_LIBTOOL=$LIBTOOL
5432   for ac_prog in libtool glibtool
5433 do
5434   # Extract the first word of "$ac_prog", so it can be a program name with args.
5435 set dummy $ac_prog; ac_word=$2
5436 echo "$as_me:5436: checking for $ac_word" >&5
5437 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5438 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5439   echo $ECHO_N "(cached) $ECHO_C" >&6
5440 else
5441   if test -n "$ac_ct_LIBTOOL"; then
5442   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5443 else
5444   ac_save_IFS=$IFS; IFS=$ac_path_separator
5445 ac_dummy="$PATH"
5446 for ac_dir in $ac_dummy; do
5447   IFS=$ac_save_IFS
5448   test -z "$ac_dir" && ac_dir=.
5449   $as_executable_p "$ac_dir/$ac_word" || continue
5450 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5451 echo "$as_me:5451: found $ac_dir/$ac_word" >&5
5452 break
5453 done
5454
5455 fi
5456 fi
5457 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5458 if test -n "$ac_ct_LIBTOOL"; then
5459   echo "$as_me:5459: result: $ac_ct_LIBTOOL" >&5
5460 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5461 else
5462   echo "$as_me:5462: result: no" >&5
5463 echo "${ECHO_T}no" >&6
5464 fi
5465
5466   test -n "$ac_ct_LIBTOOL" && break
5467 done
5468 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5469
5470   LIBTOOL=$ac_ct_LIBTOOL
5471 fi
5472
5473 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5474 then
5475         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.].*//'`
5476 else
5477         cf_cv_libtool_version=
5478 fi
5479 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5480
5481                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5482                 then
5483
5484 unset ac_cv_prog_ac_ct_LIBTOOL
5485 unset ac_ct_LIBTOOL
5486 unset LIBTOOL
5487
5488                         if test -n "$ac_tool_prefix"; then
5489   for ac_prog in glibtool
5490   do
5491     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5492 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5493 echo "$as_me:5493: checking for $ac_word" >&5
5494 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5495 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5496   echo $ECHO_N "(cached) $ECHO_C" >&6
5497 else
5498   if test -n "$LIBTOOL"; then
5499   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5500 else
5501   ac_save_IFS=$IFS; IFS=$ac_path_separator
5502 ac_dummy="$PATH"
5503 for ac_dir in $ac_dummy; do
5504   IFS=$ac_save_IFS
5505   test -z "$ac_dir" && ac_dir=.
5506   $as_executable_p "$ac_dir/$ac_word" || continue
5507 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5508 echo "$as_me:5508: found $ac_dir/$ac_word" >&5
5509 break
5510 done
5511
5512 fi
5513 fi
5514 LIBTOOL=$ac_cv_prog_LIBTOOL
5515 if test -n "$LIBTOOL"; then
5516   echo "$as_me:5516: result: $LIBTOOL" >&5
5517 echo "${ECHO_T}$LIBTOOL" >&6
5518 else
5519   echo "$as_me:5519: result: no" >&5
5520 echo "${ECHO_T}no" >&6
5521 fi
5522
5523     test -n "$LIBTOOL" && break
5524   done
5525 fi
5526 if test -z "$LIBTOOL"; then
5527   ac_ct_LIBTOOL=$LIBTOOL
5528   for ac_prog in glibtool
5529 do
5530   # Extract the first word of "$ac_prog", so it can be a program name with args.
5531 set dummy $ac_prog; ac_word=$2
5532 echo "$as_me:5532: checking for $ac_word" >&5
5533 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5534 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5535   echo $ECHO_N "(cached) $ECHO_C" >&6
5536 else
5537   if test -n "$ac_ct_LIBTOOL"; then
5538   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5539 else
5540   ac_save_IFS=$IFS; IFS=$ac_path_separator
5541 ac_dummy="$PATH"
5542 for ac_dir in $ac_dummy; do
5543   IFS=$ac_save_IFS
5544   test -z "$ac_dir" && ac_dir=.
5545   $as_executable_p "$ac_dir/$ac_word" || continue
5546 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5547 echo "$as_me:5547: found $ac_dir/$ac_word" >&5
5548 break
5549 done
5550
5551 fi
5552 fi
5553 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5554 if test -n "$ac_ct_LIBTOOL"; then
5555   echo "$as_me:5555: result: $ac_ct_LIBTOOL" >&5
5556 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5557 else
5558   echo "$as_me:5558: result: no" >&5
5559 echo "${ECHO_T}no" >&6
5560 fi
5561
5562   test -n "$ac_ct_LIBTOOL" && break
5563 done
5564 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5565
5566   LIBTOOL=$ac_ct_LIBTOOL
5567 fi
5568
5569 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5570 then
5571         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.].*//'`
5572 else
5573         cf_cv_libtool_version=
5574 fi
5575 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5576
5577                 fi
5578         fi
5579         if test -z "$LIBTOOL" ; then
5580                 { { echo "$as_me:5580: error: Cannot find libtool" >&5
5581 echo "$as_me: error: Cannot find libtool" >&2;}
5582    { (exit 1); exit 1; }; }
5583         fi
5584         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5585         LIB_OBJECT='${OBJECTS:.o=.lo}'
5586         LIB_SUFFIX=.la
5587         LIB_CLEAN='${LIBTOOL} --mode=clean'
5588         LIB_COMPILE='${LIBTOOL} --mode=compile'
5589         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5590         LIB_INSTALL='${LIBTOOL} --mode=install'
5591         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5592         LIB_PREP=:
5593
5594 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5595 then
5596         echo "$as_me:5596: checking version of $LIBTOOL" >&5
5597 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5598
5599 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5600 then
5601         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.].*//'`
5602 else
5603         cf_cv_libtool_version=
5604 fi
5605 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5606
5607         echo "$as_me:5607: result: $cf_cv_libtool_version" >&5
5608 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5609         if test -n "$cf_cv_libtool_version"
5610         then
5611                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5612                 case "x$cf_check_libtool_version" in
5613                 (*...GNU-libtool...*)
5614                         ;;
5615                 (*)
5616                         { { echo "$as_me:5616: error: This is not GNU libtool" >&5
5617 echo "$as_me: error: This is not GNU libtool" >&2;}
5618    { (exit 1); exit 1; }; }
5619                         ;;
5620                 esac
5621         else
5622                 { { echo "$as_me:5622: error: No version found for $LIBTOOL" >&5
5623 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5624    { (exit 1); exit 1; }; }
5625         fi
5626 else
5627         { { echo "$as_me:5627: error: GNU libtool has not been found" >&5
5628 echo "$as_me: error: GNU libtool has not been found" >&2;}
5629    { (exit 1); exit 1; }; }
5630 fi
5631
5632         # special hack to add -no-undefined (which libtool should do for itself)
5633         LT_UNDEF=
5634         case "$cf_cv_system_name" in
5635         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5636                 LT_UNDEF=-no-undefined
5637                 ;;
5638         esac
5639
5640         # special hack to add --tag option for C++ compiler
5641         case "$cf_cv_libtool_version" in
5642         (1.[5-9]*|[2-9].[0-9.a-z]*)
5643                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5644                 LIBTOOL="$LIBTOOL --tag=CC"
5645                 ;;
5646         (*)
5647                 LIBTOOL_CXX="$LIBTOOL"
5648                 ;;
5649         esac
5650 else
5651         LIBTOOL=""
5652         LIBTOOL_CXX=""
5653 fi
5654
5655 test -z "$LIBTOOL" && ECHO_LT=
5656
5657 if test "$with_libtool" != "no" ; then
5658
5659 cf_list_models="$cf_list_models libtool"
5660
5661 else
5662
5663 echo "$as_me:5663: checking if you want to build shared libraries" >&5
5664 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5665
5666 # Check whether --with-shared or --without-shared was given.
5667 if test "${with_shared+set}" = set; then
5668   withval="$with_shared"
5669   with_shared=$withval
5670 else
5671   with_shared=no
5672 fi;
5673 echo "$as_me:5673: result: $with_shared" >&5
5674 echo "${ECHO_T}$with_shared" >&6
5675 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5676
5677 echo "$as_me:5677: checking if you want to build static libraries" >&5
5678 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5679
5680 # Check whether --with-normal or --without-normal was given.
5681 if test "${with_normal+set}" = set; then
5682   withval="$with_normal"
5683   with_normal=$withval
5684 else
5685   with_normal=yes
5686 fi;
5687 echo "$as_me:5687: result: $with_normal" >&5
5688 echo "${ECHO_T}$with_normal" >&6
5689 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5690
5691 echo "$as_me:5691: checking if you want to build debug libraries" >&5
5692 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5693
5694 # Check whether --with-debug or --without-debug was given.
5695 if test "${with_debug+set}" = set; then
5696   withval="$with_debug"
5697   with_debug=$withval
5698 else
5699   with_debug=yes
5700 fi;
5701 echo "$as_me:5701: result: $with_debug" >&5
5702 echo "${ECHO_T}$with_debug" >&6
5703 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5704
5705 echo "$as_me:5705: checking if you want to build profiling libraries" >&5
5706 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5707
5708 # Check whether --with-profile or --without-profile was given.
5709 if test "${with_profile+set}" = set; then
5710   withval="$with_profile"
5711   with_profile=$withval
5712 else
5713   with_profile=no
5714 fi;
5715 echo "$as_me:5715: result: $with_profile" >&5
5716 echo "${ECHO_T}$with_profile" >&6
5717 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5718
5719 fi
5720
5721 if test "X$cf_with_cxx_binding" != Xno; then
5722 if test "x$with_shared" = "xyes"; then
5723 echo "$as_me:5723: checking if you want to build C++ shared libraries" >&5
5724 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5725
5726 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5727 if test "${with_cxx_shared+set}" = set; then
5728   withval="$with_cxx_shared"
5729   with_shared_cxx=$withval
5730 else
5731   with_shared_cxx=no
5732 fi;
5733 echo "$as_me:5733: result: $with_shared_cxx" >&5
5734 echo "${ECHO_T}$with_shared_cxx" >&6
5735 fi
5736 fi
5737
5738 ###############################################################################
5739
5740 echo "$as_me:5740: checking for specified models" >&5
5741 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5742 test -z "$cf_list_models" && cf_list_models=normal
5743 test "$with_libtool" != "no" && cf_list_models=libtool
5744 echo "$as_me:5744: result: $cf_list_models" >&5
5745 echo "${ECHO_T}$cf_list_models" >&6
5746
5747 ### Use the first model as the default, and save its suffix for use in building
5748 ### up test-applications.
5749 echo "$as_me:5749: checking for default model" >&5
5750 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5751 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5752 echo "$as_me:5752: result: $DFT_LWR_MODEL" >&5
5753 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5754
5755 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5756
5757 TICS_NAME=tic
5758
5759 TINFO_NAME=tinfo
5760
5761 LIB_NAME=ncurses
5762
5763 LIB_DIR=../lib
5764 LIB_2ND=../../lib
5765
5766 echo "$as_me:5766: checking if you want to have a library-prefix" >&5
5767 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5768
5769 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5770 if test "${with_lib_prefix+set}" = set; then
5771   withval="$with_lib_prefix"
5772   with_lib_prefix=$withval
5773 else
5774   with_lib_prefix=auto
5775 fi;
5776 echo "$as_me:5776: result: $with_lib_prefix" >&5
5777 echo "${ECHO_T}$with_lib_prefix" >&6
5778
5779 if test "$with_lib_prefix" = auto
5780 then
5781
5782         case "$cf_cv_system_name" in
5783         (OS/2*|os2*)
5784                 if test "$DFT_LWR_MODEL" = libtool; then
5785                         LIB_PREFIX='lib'
5786                 else
5787                         LIB_PREFIX=''
5788                 fi
5789                 ;;
5790         (*-msvc*)
5791                 LIB_PREFIX=''
5792                 ;;
5793         (*)     LIB_PREFIX='lib'
5794                 ;;
5795         esac
5796 cf_prefix=$LIB_PREFIX
5797
5798 elif test "$with_lib_prefix" = no
5799 then
5800         LIB_PREFIX=
5801 else
5802         LIB_PREFIX=$with_lib_prefix
5803 fi
5804
5805 LIB_SUFFIX=
5806
5807         echo "$as_me:5807: checking for PATH separator" >&5
5808 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5809         case "$cf_cv_system_name" in
5810         (os2*)  PATH_SEPARATOR=';'  ;;
5811         (*)     ${PATH_SEPARATOR:=':'}  ;;
5812         esac
5813
5814         echo "$as_me:5814: result: $PATH_SEPARATOR" >&5
5815 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5816
5817 ###############################################################################
5818
5819 echo "$as_me:5819: checking if you want to build a separate terminfo library" >&5
5820 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5821
5822 # Check whether --with-termlib or --without-termlib was given.
5823 if test "${with_termlib+set}" = set; then
5824   withval="$with_termlib"
5825   with_termlib=$withval
5826 else
5827   with_termlib=no
5828 fi;
5829 echo "$as_me:5829: result: $with_termlib" >&5
5830 echo "${ECHO_T}$with_termlib" >&6
5831
5832 echo "$as_me:5832: checking if you want to build a separate tic library" >&5
5833 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5834
5835 # Check whether --with-ticlib or --without-ticlib was given.
5836 if test "${with_ticlib+set}" = set; then
5837   withval="$with_ticlib"
5838   with_ticlib=$withval
5839 else
5840   with_ticlib=no
5841 fi;
5842 echo "$as_me:5842: result: $with_ticlib" >&5
5843 echo "${ECHO_T}$with_ticlib" >&6
5844
5845 if test X"$CC_G_OPT" = X"" ; then
5846         CC_G_OPT='-g'
5847         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5848 fi
5849
5850 if test X"$CXX_G_OPT" = X"" ; then
5851         CXX_G_OPT='-g'
5852         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5853 fi
5854
5855 echo "$as_me:5855: checking for default loader flags" >&5
5856 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5857 case "$DFT_LWR_MODEL" in
5858 (libtool) LD_MODEL=''   ;;
5859 (normal)  LD_MODEL=''   ;;
5860 (debug)   LD_MODEL=$CC_G_OPT ;;
5861 (profile) LD_MODEL='-pg';;
5862 (shared)  LD_MODEL=''   ;;
5863 esac
5864 echo "$as_me:5864: result: $LD_MODEL" >&5
5865 echo "${ECHO_T}$LD_MODEL" >&6
5866
5867 case "$DFT_LWR_MODEL" in
5868 (shared)
5869
5870 echo "$as_me:5870: checking if rpath option should be used" >&5
5871 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5872
5873 # Check whether --enable-rpath or --disable-rpath was given.
5874 if test "${enable_rpath+set}" = set; then
5875   enableval="$enable_rpath"
5876   cf_cv_enable_rpath=$enableval
5877 else
5878   cf_cv_enable_rpath=no
5879 fi;
5880 echo "$as_me:5880: result: $cf_cv_enable_rpath" >&5
5881 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5882
5883 echo "$as_me:5883: checking if shared libraries should be relinked during install" >&5
5884 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5885
5886 # Check whether --enable-relink or --disable-relink was given.
5887 if test "${enable_relink+set}" = set; then
5888   enableval="$enable_relink"
5889   cf_cv_do_relink=$enableval
5890 else
5891   cf_cv_do_relink=yes
5892 fi;
5893 echo "$as_me:5893: result: $cf_cv_do_relink" >&5
5894 echo "${ECHO_T}$cf_cv_do_relink" >&6
5895         ;;
5896 esac
5897
5898 # we will build libraries one-level down.
5899 rel_builddir=..
5900
5901 LD_RPATH_OPT=
5902 if test "x$cf_cv_enable_rpath" != xno
5903 then
5904         echo "$as_me:5904: checking for an rpath option" >&5
5905 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5906         case "$cf_cv_system_name" in
5907         (irix*)
5908                 if test "$GCC" = yes; then
5909                         LD_RPATH_OPT="-Wl,-rpath,"
5910                 else
5911                         LD_RPATH_OPT="-rpath "
5912                 fi
5913                 ;;
5914         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5915                 LD_RPATH_OPT="-Wl,-rpath,"
5916                 ;;
5917         (openbsd[2-9].*|mirbsd*)
5918                 LD_RPATH_OPT="-Wl,-rpath,"
5919                 ;;
5920         (dragonfly*)
5921                 LD_RPATH_OPT="-rpath "
5922                 ;;
5923         (netbsd*)
5924                 LD_RPATH_OPT="-Wl,-rpath,"
5925                 ;;
5926         (osf*|mls+*)
5927                 LD_RPATH_OPT="-rpath "
5928                 ;;
5929         (solaris2*)
5930                 LD_RPATH_OPT="-R"
5931                 ;;
5932         (*)
5933                 ;;
5934         esac
5935         echo "$as_me:5935: result: $LD_RPATH_OPT" >&5
5936 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5937
5938         case "x$LD_RPATH_OPT" in
5939         (x-R*)
5940                 echo "$as_me:5940: checking if we need a space after rpath option" >&5
5941 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5942                 cf_save_LIBS="$LIBS"
5943
5944 cf_add_libs="$LIBS"
5945 # reverse order
5946 cf_add_0lib=
5947 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5948 # filter duplicates
5949 for cf_add_1lib in $cf_add_0lib; do
5950         for cf_add_2lib in $cf_add_libs; do
5951                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5952                         cf_add_1lib=
5953                         break
5954                 fi
5955         done
5956         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5957 done
5958 LIBS="$cf_add_libs"
5959
5960                 cat >"conftest.$ac_ext" <<_ACEOF
5961 #line 5961 "configure"
5962 #include "confdefs.h"
5963
5964 int
5965 main (void)
5966 {
5967
5968   ;
5969   return 0;
5970 }
5971 _ACEOF
5972 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5973 if { (eval echo "$as_me:5973: \"$ac_link\"") >&5
5974   (eval $ac_link) 2>&5
5975   ac_status=$?
5976   echo "$as_me:5976: \$? = $ac_status" >&5
5977   (exit "$ac_status"); } &&
5978          { ac_try='test -s "conftest$ac_exeext"'
5979   { (eval echo "$as_me:5979: \"$ac_try\"") >&5
5980   (eval $ac_try) 2>&5
5981   ac_status=$?
5982   echo "$as_me:5982: \$? = $ac_status" >&5
5983   (exit "$ac_status"); }; }; then
5984   cf_rpath_space=no
5985 else
5986   echo "$as_me: failed program was:" >&5
5987 cat "conftest.$ac_ext" >&5
5988 cf_rpath_space=yes
5989 fi
5990 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5991                 LIBS="$cf_save_LIBS"
5992                 echo "$as_me:5992: result: $cf_rpath_space" >&5
5993 echo "${ECHO_T}$cf_rpath_space" >&6
5994                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5995                 ;;
5996         esac
5997 fi
5998
5999         RM_SHARED_OPTS=
6000         LOCAL_LDFLAGS=
6001         LOCAL_LDFLAGS2=
6002         LD_SHARED_OPTS=
6003         INSTALL_LIB="-m 644"
6004         : ${rel_builddir:=.}
6005
6006         shlibdir=$libdir
6007
6008         MAKE_DLLS="#"
6009
6010         cf_cv_do_symlinks=no
6011         cf_ld_rpath_opt=
6012         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6013
6014         echo "$as_me:6014: checking if release/abi version should be used for shared libs" >&5
6015 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6016
6017 # Check whether --with-shlib-version or --without-shlib-version was given.
6018 if test "${with_shlib_version+set}" = set; then
6019   withval="$with_shlib_version"
6020   test -z "$withval" && withval=auto
6021         case "$withval" in
6022         (yes)
6023                 cf_cv_shlib_version=auto
6024                 ;;
6025         (rel|abi|auto)
6026                 cf_cv_shlib_version=$withval
6027                 ;;
6028         (*)
6029                 echo "$as_me:6029: result: $withval" >&5
6030 echo "${ECHO_T}$withval" >&6
6031                 { { echo "$as_me:6031: error: option value must be one of: rel, abi, or auto" >&5
6032 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6033    { (exit 1); exit 1; }; }
6034                 ;;
6035         esac
6036
6037 else
6038   cf_cv_shlib_version=auto
6039 fi;
6040         echo "$as_me:6040: result: $cf_cv_shlib_version" >&5
6041 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6042
6043         cf_cv_rm_so_locs=no
6044         cf_try_cflags=
6045
6046         # Some less-capable ports of gcc support only -fpic
6047         CC_SHARED_OPTS=
6048
6049         cf_try_fPIC=no
6050         if test "$GCC" = yes
6051         then
6052                 cf_try_fPIC=yes
6053         else
6054                 case "$cf_cv_system_name" in
6055                 (*linux*)       # e.g., PGI compiler
6056                         cf_try_fPIC=yes
6057                         ;;
6058                 esac
6059         fi
6060
6061         if test "$cf_try_fPIC" = yes
6062         then
6063                 echo "$as_me:6063: checking which $CC option to use" >&5
6064 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6065                 cf_save_CFLAGS="$CFLAGS"
6066                 for CC_SHARED_OPTS in -fPIC -fpic ''
6067                 do
6068                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6069                         cat >"conftest.$ac_ext" <<_ACEOF
6070 #line 6070 "configure"
6071 #include "confdefs.h"
6072 #include <stdio.h>
6073 int
6074 main (void)
6075 {
6076 int x = 1
6077   ;
6078   return 0;
6079 }
6080 _ACEOF
6081 rm -f "conftest.$ac_objext"
6082 if { (eval echo "$as_me:6082: \"$ac_compile\"") >&5
6083   (eval $ac_compile) 2>&5
6084   ac_status=$?
6085   echo "$as_me:6085: \$? = $ac_status" >&5
6086   (exit "$ac_status"); } &&
6087          { ac_try='test -s "conftest.$ac_objext"'
6088   { (eval echo "$as_me:6088: \"$ac_try\"") >&5
6089   (eval $ac_try) 2>&5
6090   ac_status=$?
6091   echo "$as_me:6091: \$? = $ac_status" >&5
6092   (exit "$ac_status"); }; }; then
6093   break
6094 else
6095   echo "$as_me: failed program was:" >&5
6096 cat "conftest.$ac_ext" >&5
6097 fi
6098 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6099                 done
6100                 echo "$as_me:6100: result: $CC_SHARED_OPTS" >&5
6101 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6102                 CFLAGS="$cf_save_CFLAGS"
6103         fi
6104
6105         cf_cv_shlib_version_infix=no
6106
6107         case "$cf_cv_system_name" in
6108         (aix4.3-9*|aix[5-7]*)
6109                 if test "$GCC" = yes; then
6110                         CC_SHARED_OPTS='-Wl,-brtl'
6111                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6112                 else
6113                         CC_SHARED_OPTS='-brtl'
6114                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6115                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6116                 fi
6117                 ;;
6118         (beos*)
6119                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6120                 ;;
6121         (cygwin*)
6122                 CC_SHARED_OPTS=
6123                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6124                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6125                 cf_cv_shlib_version=cygdll
6126                 cf_cv_shlib_version_infix=cygdll
6127                 shlibdir=$bindir
6128                 MAKE_DLLS=
6129                 cat >mk_shared_lib.sh <<-CF_EOF
6130                 #!$SHELL
6131                 SHARED_LIB=\$1
6132                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6133                 shift
6134                 cat <<-EOF
6135                 Linking shared library
6136                 ** SHARED_LIB \$SHARED_LIB
6137                 ** IMPORT_LIB \$IMPORT_LIB
6138 EOF
6139                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6140 CF_EOF
6141                 chmod +x mk_shared_lib.sh
6142                 ;;
6143         (msys*)
6144                 CC_SHARED_OPTS=
6145                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6146                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6147                 cf_cv_shlib_version=msysdll
6148                 cf_cv_shlib_version_infix=msysdll
6149                 shlibdir=$bindir
6150                 MAKE_DLLS=
6151                 cat >mk_shared_lib.sh <<-CF_EOF
6152                 #!$SHELL
6153                 SHARED_LIB=\$1
6154                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6155                 shift
6156                 cat <<-EOF
6157                 Linking shared library
6158                 ** SHARED_LIB \$SHARED_LIB
6159                 ** IMPORT_LIB \$IMPORT_LIB
6160 EOF
6161                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6162 CF_EOF
6163                 chmod +x mk_shared_lib.sh
6164                 ;;
6165         (darwin*)
6166                 cf_try_cflags="no-cpp-precomp"
6167                 CC_SHARED_OPTS="-dynamic"
6168                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6169                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6170                 cf_cv_shlib_version_infix=yes
6171                 echo "$as_me:6171: checking if ld -search_paths_first works" >&5
6172 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6173 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6174   echo $ECHO_N "(cached) $ECHO_C" >&6
6175 else
6176
6177                         cf_save_LDFLAGS=$LDFLAGS
6178                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6179                         cat >"conftest.$ac_ext" <<_ACEOF
6180 #line 6180 "configure"
6181 #include "confdefs.h"
6182
6183 int
6184 main (void)
6185 {
6186 int i;
6187   ;
6188   return 0;
6189 }
6190 _ACEOF
6191 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6192 if { (eval echo "$as_me:6192: \"$ac_link\"") >&5
6193   (eval $ac_link) 2>&5
6194   ac_status=$?
6195   echo "$as_me:6195: \$? = $ac_status" >&5
6196   (exit "$ac_status"); } &&
6197          { ac_try='test -s "conftest$ac_exeext"'
6198   { (eval echo "$as_me:6198: \"$ac_try\"") >&5
6199   (eval $ac_try) 2>&5
6200   ac_status=$?
6201   echo "$as_me:6201: \$? = $ac_status" >&5
6202   (exit "$ac_status"); }; }; then
6203   cf_cv_ldflags_search_paths_first=yes
6204 else
6205   echo "$as_me: failed program was:" >&5
6206 cat "conftest.$ac_ext" >&5
6207 cf_cv_ldflags_search_paths_first=no
6208 fi
6209 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6210                                 LDFLAGS=$cf_save_LDFLAGS
6211 fi
6212 echo "$as_me:6212: result: $cf_cv_ldflags_search_paths_first" >&5
6213 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6214                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6215                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6216                 fi
6217                 ;;
6218         (haiku*)
6219
6220         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6221         if test "$cf_cv_shlib_version" = rel; then
6222                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6223         else
6224                 cf_cv_shared_soname='`basename $@`'
6225         fi
6226
6227                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6228                 ;;
6229         (hpux[7-8]*)
6230                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6231                 if test "$GCC" != yes; then
6232                         CC_SHARED_OPTS='+Z'
6233                 fi
6234                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6235                 INSTALL_LIB="-m 555"
6236                 ;;
6237         (hpux*)
6238                 # (tested with gcc 2.7.2 -- I don't have c89)
6239                 if test "$GCC" = yes; then
6240                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6241                 else
6242                         CC_SHARED_OPTS='+Z'
6243                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6244                 fi
6245                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6246                 # HP-UX shared libraries must be executable, and should be
6247                 # readonly to exploit a quirk in the memory manager.
6248                 INSTALL_LIB="-m 555"
6249                 ;;
6250         (interix*)
6251                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6252                 if test "$cf_cv_shlib_version" = rel; then
6253                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6254                 else
6255                         cf_shared_soname='`basename $@`'
6256                 fi
6257                 CC_SHARED_OPTS=
6258                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6259                 ;;
6260         (irix*)
6261                 if test "$cf_cv_enable_rpath" = yes ; then
6262                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6263                 fi
6264                 # tested with IRIX 5.2 and 'cc'.
6265                 if test "$GCC" != yes; then
6266                         CC_SHARED_OPTS='-KPIC'
6267                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6268                 else
6269                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6270                 fi
6271                 cf_cv_rm_so_locs=yes
6272                 ;;
6273         (linux*|gnu*|k*bsd*-gnu)
6274                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6275                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6276                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6277                 fi
6278                 if test "$cf_cv_enable_rpath" = yes ; then
6279                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6280                 fi
6281
6282         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6283         if test "$cf_cv_shlib_version" = rel; then
6284                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6285         else
6286                 cf_cv_shared_soname='`basename $@`'
6287         fi
6288
6289                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6290                 ;;
6291         (mingw*msvc*)
6292                 cf_cv_shlib_version=msvcdll
6293                 cf_cv_shlib_version_infix=msvcdll
6294                 shlibdir=$bindir
6295                 MAKE_DLLS=
6296                 if test "$DFT_LWR_MODEL" = "shared" ; then
6297                         LOCAL_LDFLAGS="-link -dll"
6298                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6299                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6300                 fi
6301                 CC_SHARED_OPTS=
6302                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6303                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6304                 cat >mk_shared_lib.sh <<-CF_EOF
6305                 #!$SHELL
6306                 SHARED_LIB=\$1
6307                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6308                 shift
6309                 my_ld=\$1
6310                 shift
6311                 cat <<-EOF
6312                 Linking shared library
6313                 ** SHARED LIB \$SHARED_LIB
6314                 ** IMPORT_LIB \$IMPORT_LIB
6315 EOF
6316                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6317                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6318                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6319 CF_EOF
6320                 chmod +x mk_shared_lib.sh
6321                 cat >mk_prog.sh <<-CF_EOF
6322                 #!$SHELL
6323                 shift
6324                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6325                 LD="$LD"
6326                 clopts=()
6327                 ldopts=("/subsystem:console")
6328                 libs=()
6329                 isdll=0
6330                 while test \$# -gt 0; do
6331                         case "\$1" in
6332                                 -link)
6333                                         # ignore -link argument
6334                                         ;;
6335                                 -M[TD] | -M[TD]d)
6336                                         # ignore runtime-library option
6337                                         ;;
6338                                 -dll)
6339                                         isdll=1
6340                                         ;;
6341                                 -W* | -w*)
6342                                         # ignore warnings
6343                                         ;;
6344                                 -D*)
6345                                         clopts+=("\$1")
6346                                         ;;
6347                                 -I*)
6348                                         clopts+=("\$1")
6349                                         ;;
6350                                 -l*)
6351                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6352                                         ;;
6353                                 -L*)
6354                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6355                                         ;;
6356                                 *.obj | *.o)
6357                                         ldopts+=("\$1")
6358                                         ;;
6359                                 -Wl,*)
6360                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6361                                                 ldopts+=("\${linkarg}")
6362                                         done
6363                                         ;;
6364                                 *.lib)
6365                                         ldopts+=("\$1")
6366                                         ;;
6367                                 -o)
6368                                         shift
6369                                         ldopts+=("-out:\$1")
6370                                         ;;
6371                                 *)
6372                                         clopts+=("\$1")
6373                                         ldopts+=("\$1")
6374                                         ;;
6375                         esac
6376                         shift
6377                 done
6378                 if [ "\$isdll" -ne 0 ]; then
6379                         for lib in \${libs[*]}; do
6380                                 ldopts+=("\$lib.dll.lib")
6381                         done
6382                 else
6383                         for lib in \${libs[*]}; do
6384                                 ldopts+=("\$lib.lib")
6385                         done
6386                 fi
6387                 cat <<-EOF
6388                 Creating program
6389                 ** ld options:   "\${ldopts[@]}"
6390 EOF
6391                 exec \$LD \${ldopts[@]}
6392 CF_EOF
6393                 chmod +x mk_prog.sh
6394                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6395                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6396                 ;;
6397         (mingw*)
6398                 cf_cv_shlib_version=mingw
6399                 cf_cv_shlib_version_infix=mingw
6400                 shlibdir=$bindir
6401                 MAKE_DLLS=
6402                 if test "$DFT_LWR_MODEL" = "shared" ; then
6403                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6404                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6405                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6406                 fi
6407                 CC_SHARED_OPTS=
6408                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6409                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6410                 cat >mk_shared_lib.sh <<-CF_EOF
6411                 #!$SHELL
6412                 SHARED_LIB=\$1
6413                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6414                 shift
6415                 cat <<-EOF
6416                 Linking shared library
6417                 ** SHARED_LIB \$SHARED_LIB
6418                 ** IMPORT_LIB \$IMPORT_LIB
6419 EOF
6420                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6421 CF_EOF
6422                 chmod +x mk_shared_lib.sh
6423                 ;;
6424         (openbsd[2-9].*|mirbsd*)
6425                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6426                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6427                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6428                 fi
6429                 if test "$cf_cv_enable_rpath" = yes ; then
6430                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6431                 fi
6432                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6433
6434         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6435         if test "$cf_cv_shlib_version" = rel; then
6436                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6437         else
6438                 cf_cv_shared_soname='`basename $@`'
6439         fi
6440
6441                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6442                 ;;
6443         (nskJ*)
6444                 CC_SHARED_OPTS=
6445                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6446                 ;;
6447         (nskL*)
6448                 CC_SHARED_OPTS=
6449                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6450                 ;;
6451         (nto-qnx*|openbsd*|freebsd[12].*)
6452                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6453                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6454                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6455                 ;;
6456         (dragonfly*|freebsd*)
6457                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6458                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6459                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6460                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6461                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6462                 fi
6463
6464         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6465         if test "$cf_cv_shlib_version" = rel; then
6466                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6467         else
6468                 cf_cv_shared_soname='`basename $@`'
6469         fi
6470
6471                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6472                 ;;
6473         (netbsd*)
6474                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6475                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6476                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6477                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6478                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6479                         if test "$cf_cv_shlib_version" = auto; then
6480                         if test -f /usr/libexec/ld.elf_so; then
6481                                 cf_cv_shlib_version=abi
6482                         else
6483                                 cf_cv_shlib_version=rel
6484                         fi
6485                         fi
6486
6487         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6488         if test "$cf_cv_shlib_version" = rel; then
6489                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6490         else
6491                 cf_cv_shared_soname='`basename $@`'
6492         fi
6493
6494                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6495                 else
6496                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6497                 fi
6498                 ;;
6499         (osf*|mls+*)
6500                 # tested with OSF/1 V3.2 and 'cc'
6501                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6502                 # link with shared libs).
6503                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6504                 case "$host_os" in
6505                 (osf4*)
6506                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6507                         ;;
6508                 esac
6509                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6510                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6511                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6512                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6513                 fi
6514                 cf_cv_rm_so_locs=yes
6515                 ;;
6516         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6517                 # tested with osr5.0.5
6518                 if test "$GCC" != yes; then
6519                         CC_SHARED_OPTS='-belf -KPIC'
6520                 fi
6521                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6522                 if test "$cf_cv_enable_rpath" = yes ; then
6523                         # only way is to set LD_RUN_PATH but no switch for it
6524                         RUN_PATH=$libdir
6525                 fi
6526                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6527                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6528                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6529                 ;;
6530         (sunos4*)
6531                 # tested with SunOS 4.1.1 and gcc 2.7.0
6532                 if test "$GCC" != yes; then
6533                         CC_SHARED_OPTS='-KPIC'
6534                 fi
6535                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6536                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6537                 ;;
6538         (solaris2*)
6539                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6540                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6541                 if test "$DFT_LWR_MODEL" = "shared" ; then
6542                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6543                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6544                 fi
6545                 if test "$cf_cv_enable_rpath" = yes ; then
6546                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6547                 fi
6548
6549         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6550         if test "$cf_cv_shlib_version" = rel; then
6551                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6552         else
6553                 cf_cv_shared_soname='`basename $@`'
6554         fi
6555
6556                 if test "$GCC" != yes; then
6557                         cf_save_CFLAGS="$CFLAGS"
6558                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6559                         do
6560                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6561                                 cat >"conftest.$ac_ext" <<_ACEOF
6562 #line 6562 "configure"
6563 #include "confdefs.h"
6564 #include <stdio.h>
6565 int
6566 main (void)
6567 {
6568 printf("Hello\\n");
6569   ;
6570   return 0;
6571 }
6572 _ACEOF
6573 rm -f "conftest.$ac_objext"
6574 if { (eval echo "$as_me:6574: \"$ac_compile\"") >&5
6575   (eval $ac_compile) 2>&5
6576   ac_status=$?
6577   echo "$as_me:6577: \$? = $ac_status" >&5
6578   (exit "$ac_status"); } &&
6579          { ac_try='test -s "conftest.$ac_objext"'
6580   { (eval echo "$as_me:6580: \"$ac_try\"") >&5
6581   (eval $ac_try) 2>&5
6582   ac_status=$?
6583   echo "$as_me:6583: \$? = $ac_status" >&5
6584   (exit "$ac_status"); }; }; then
6585   break
6586 else
6587   echo "$as_me: failed program was:" >&5
6588 cat "conftest.$ac_ext" >&5
6589 fi
6590 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6591                         done
6592                         CFLAGS="$cf_save_CFLAGS"
6593                         CC_SHARED_OPTS=$cf_shared_opts
6594                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6595                 else
6596                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6597                 fi
6598                 ;;
6599         (sysv5uw7*|unix_sv*)
6600                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6601                 if test "$GCC" != yes; then
6602                         CC_SHARED_OPTS='-KPIC'
6603                 fi
6604                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6605                 ;;
6606         (*)
6607                 CC_SHARED_OPTS='unknown'
6608                 MK_SHARED_LIB='echo unknown'
6609                 ;;
6610         esac
6611
6612         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6613         case "$cf_cv_shlib_version" in
6614         (rel|abi)
6615                 case "$MK_SHARED_LIB" in
6616                 (*'-o $@')
6617                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6618                         ;;
6619                 (*)
6620                         { echo "$as_me:6620: WARNING: ignored --with-shlib-version" >&5
6621 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6622                         ;;
6623                 esac
6624                 ;;
6625         esac
6626
6627         if test -n "$cf_try_cflags"
6628         then
6629 cat > conftest.$ac_ext <<EOF
6630 #line 6630 "${as_me:-configure}"
6631 #include <stdio.h>
6632 int main(int argc, char *argv[])
6633 {
6634         printf("hello\\n");
6635         return (argv[argc-1] == 0) ;
6636 }
6637 EOF
6638                 cf_save_CFLAGS="$CFLAGS"
6639                 for cf_opt in $cf_try_cflags
6640                 do
6641                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6642                         echo "$as_me:6642: checking if CFLAGS option -$cf_opt works" >&5
6643 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6644                         if { (eval echo "$as_me:6644: \"$ac_compile\"") >&5
6645   (eval $ac_compile) 2>&5
6646   ac_status=$?
6647   echo "$as_me:6647: \$? = $ac_status" >&5
6648   (exit "$ac_status"); }; then
6649                                 echo "$as_me:6649: result: yes" >&5
6650 echo "${ECHO_T}yes" >&6
6651                                 cf_save_CFLAGS="$CFLAGS"
6652                         else
6653                                 echo "$as_me:6653: result: no" >&5
6654 echo "${ECHO_T}no" >&6
6655                         fi
6656                 done
6657                 CFLAGS="$cf_save_CFLAGS"
6658         fi
6659
6660         # RPATH_LIST is a colon-separated list of directories
6661         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6662         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6663
6664         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6665
6666         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6667
6668 echo "${as_me:-configure}:6668: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6669
6670         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6671
6672 echo "${as_me:-configure}:6672: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6673
6674 for model in $cf_list_models ; do
6675         case "$model" in
6676         (libtool)
6677
6678 echo "$as_me:6678: checking for additional libtool options" >&5
6679 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6680
6681 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6682 if test "${with_libtool_opts+set}" = set; then
6683   withval="$with_libtool_opts"
6684   with_libtool_opts=$withval
6685 else
6686   with_libtool_opts=no
6687 fi;
6688 echo "$as_me:6688: result: $with_libtool_opts" >&5
6689 echo "${ECHO_T}$with_libtool_opts" >&6
6690
6691 case .$with_libtool_opts in
6692 (.yes|.no|.)
6693         ;;
6694 (*)
6695         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6696         ;;
6697 esac
6698
6699 echo "$as_me:6699: checking if exported-symbols file should be used" >&5
6700 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6701
6702 # Check whether --with-export-syms or --without-export-syms was given.
6703 if test "${with_export_syms+set}" = set; then
6704   withval="$with_export_syms"
6705   with_export_syms=$withval
6706 else
6707   with_export_syms=no
6708 fi;
6709 if test "x$with_export_syms" = xyes
6710 then
6711         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6712
6713 fi
6714 echo "$as_me:6714: result: $with_export_syms" >&5
6715 echo "${ECHO_T}$with_export_syms" >&6
6716 if test "x$with_export_syms" != xno
6717 then
6718         EXPORT_SYMS="-export-symbols $with_export_syms"
6719
6720 fi
6721
6722                 ;;
6723         (shared)
6724                 if test "$CC_SHARED_OPTS" = "unknown"; then
6725                         { { echo "$as_me:6725: error: Shared libraries are not supported in this version" >&5
6726 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6727    { (exit 1); exit 1; }; }
6728                 fi
6729                 # workaround for inept transition to PIE vs PIC...
6730                 echo "$as_me:6730: checking if current CFLAGS link properly" >&5
6731 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6732                 cat >"conftest.$ac_ext" <<_ACEOF
6733 #line 6733 "configure"
6734 #include "confdefs.h"
6735 #include <stdio.h>
6736 int
6737 main (void)
6738 {
6739 printf("Hello work\\n");
6740   ;
6741   return 0;
6742 }
6743 _ACEOF
6744 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6745 if { (eval echo "$as_me:6745: \"$ac_link\"") >&5
6746   (eval $ac_link) 2>&5
6747   ac_status=$?
6748   echo "$as_me:6748: \$? = $ac_status" >&5
6749   (exit "$ac_status"); } &&
6750          { ac_try='test -s "conftest$ac_exeext"'
6751   { (eval echo "$as_me:6751: \"$ac_try\"") >&5
6752   (eval $ac_try) 2>&5
6753   ac_status=$?
6754   echo "$as_me:6754: \$? = $ac_status" >&5
6755   (exit "$ac_status"); }; }; then
6756   cf_cflags_work=yes
6757 else
6758   echo "$as_me: failed program was:" >&5
6759 cat "conftest.$ac_ext" >&5
6760 cf_cflags_work=no
6761 fi
6762 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6763                 echo "$as_me:6763: result: $cf_cflags_work" >&5
6764 echo "${ECHO_T}$cf_cflags_work" >&6
6765                 if test "$cf_cflags_work" = no
6766                 then
6767                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6768
6769 echo "${as_me:-configure}:6769: testing try to work around by appending shared-options ..." 1>&5
6770
6771                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6772                 fi
6773
6774 echo "$as_me:6774: checking if versioned-symbols file should be used" >&5
6775 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6776
6777 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6778 if test "${with_versioned_syms+set}" = set; then
6779   withval="$with_versioned_syms"
6780   with_versioned_syms=$withval
6781 else
6782   with_versioned_syms=no
6783 fi;
6784 case "x$with_versioned_syms" in
6785 (xyes)
6786         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6787
6788         ;;
6789 (xno)
6790         ;;
6791 (x/*)
6792         test -f "$with_versioned_syms" || { { echo "$as_me:6792: error: expected a filename: $with_versioned_syms" >&5
6793 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6794    { (exit 1); exit 1; }; }
6795         ;;
6796 (*)
6797         test -f "$with_versioned_syms" || { { echo "$as_me:6797: error: expected a filename: $with_versioned_syms" >&5
6798 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6799    { (exit 1); exit 1; }; }
6800         with_versioned_syms=`pwd`/"$with_versioned_syms"
6801         ;;
6802 esac
6803 echo "$as_me:6803: result: $with_versioned_syms" >&5
6804 echo "${ECHO_T}$with_versioned_syms" >&6
6805
6806 RESULTING_SYMS=
6807 VERSIONED_SYMS=
6808 WILDCARD_SYMS=
6809
6810 if test "x$with_versioned_syms" != xno
6811 then
6812         RESULTING_SYMS=$with_versioned_syms
6813         case "x$MK_SHARED_LIB" in
6814         (*-Wl,*)
6815                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6816                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6817                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6818
6819 echo "${as_me:-configure}:6819: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6820
6821                 ;;
6822         (*-dy\ *)
6823                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6824                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6825                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6826
6827 echo "${as_me:-configure}:6827: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6828
6829                 ;;
6830         (*)
6831                 { echo "$as_me:6831: WARNING: this system does not support versioned-symbols" >&5
6832 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6833                 ;;
6834         esac
6835
6836         # Linux ld can selectively override scope, e.g., of symbols beginning with
6837         # "_" by first declaring some as global, and then using a wildcard to
6838         # declare the others as local.  Some other loaders cannot do this.  Check
6839         # by constructing a (very) simple shared library and inspecting its
6840         # symbols.
6841         if test "x$VERSIONED_SYMS" != "x"
6842         then
6843                 echo "$as_me:6843: checking if wildcards can be used to selectively omit symbols" >&5
6844 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6845                 WILDCARD_SYMS=no
6846
6847                 # make sources
6848                 rm -f conftest.*
6849
6850                 cat >conftest.ver <<EOF
6851 module_1.0 {
6852 global:
6853         globalf1;
6854 local:
6855         localf1;
6856 };
6857 module_2.0 {
6858 global:
6859         globalf2;
6860 local:
6861         localf2;
6862         _*;
6863 } module_1.0;
6864 submodule_1.0 {
6865 global:
6866         subglobalf1;
6867         _ismissing;
6868 local:
6869         sublocalf1;
6870 };
6871 submodule_2.0 {
6872 global:
6873         subglobalf2;
6874 local:
6875         sublocalf2;
6876         _*;
6877 } submodule_1.0;
6878 EOF
6879                 cat >conftest.$ac_ext <<EOF
6880 #line 6880 "configure"
6881 int     _ismissing(void) { return 1; }
6882 int     _localf1(void) { return 1; }
6883 int     _localf2(void) { return 2; }
6884 int     globalf1(void) { return 1; }
6885 int     globalf2(void) { return 2; }
6886 int     _sublocalf1(void) { return 1; }
6887 int     _sublocalf2(void) { return 2; }
6888 int     subglobalf1(void) { return 1; }
6889 int     subglobalf2(void) { return 2; }
6890 EOF
6891                 cat >conftest.mk <<EOF
6892 CC=${CC}
6893 CFLAGS=${CFLAGS}
6894 CPPFLAGS=${CPPFLAGS}
6895 LDFLAGS=${LDFLAGS}
6896 LIBS=${LIBS}
6897 VERSIONED_SYMS=${VERSIONED_SYMS}
6898 RESULTING_SYMS=conftest.ver
6899 MK_SHARED_LIB=${MK_SHARED_LIB}
6900 conftest.so: conftest.$ac_cv_objext
6901                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6902 EOF
6903
6904                 # compile source, make library
6905                 if make -f conftest.mk 2>&5 >/dev/null
6906                 then
6907                         # test for missing symbol in either Data or Text section
6908                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6909                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6910                 fi
6911                 echo "$as_me:6911: result: $WILDCARD_SYMS" >&5
6912 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6913                 rm -f conftest.*
6914         fi
6915 fi
6916
6917                 ;;
6918         esac
6919 done
6920
6921 ### Checks for special libraries, must be done up-front.
6922 SHLIB_LIST=""
6923
6924 echo "$as_me:6924: checking if you want to link with the GPM mouse library" >&5
6925 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6926
6927 # Check whether --with-gpm or --without-gpm was given.
6928 if test "${with_gpm+set}" = set; then
6929   withval="$with_gpm"
6930   with_gpm=$withval
6931 else
6932   with_gpm=maybe
6933 fi;
6934 echo "$as_me:6934: result: $with_gpm" >&5
6935 echo "${ECHO_T}$with_gpm" >&6
6936
6937 if test "$with_gpm" != no ; then
6938         echo "$as_me:6938: checking for gpm.h" >&5
6939 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6940 if test "${ac_cv_header_gpm_h+set}" = set; then
6941   echo $ECHO_N "(cached) $ECHO_C" >&6
6942 else
6943   cat >"conftest.$ac_ext" <<_ACEOF
6944 #line 6944 "configure"
6945 #include "confdefs.h"
6946 #include <gpm.h>
6947 _ACEOF
6948 if { (eval echo "$as_me:6948: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6949   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6950   ac_status=$?
6951   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6952   rm -f conftest.er1
6953   cat conftest.err >&5
6954   echo "$as_me:6954: \$? = $ac_status" >&5
6955   (exit "$ac_status"); } >/dev/null; then
6956   if test -s conftest.err; then
6957     ac_cpp_err=$ac_c_preproc_warn_flag
6958   else
6959     ac_cpp_err=
6960   fi
6961 else
6962   ac_cpp_err=yes
6963 fi
6964 if test -z "$ac_cpp_err"; then
6965   ac_cv_header_gpm_h=yes
6966 else
6967   echo "$as_me: failed program was:" >&5
6968   cat "conftest.$ac_ext" >&5
6969   ac_cv_header_gpm_h=no
6970 fi
6971 rm -f conftest.err "conftest.$ac_ext"
6972 fi
6973 echo "$as_me:6973: result: $ac_cv_header_gpm_h" >&5
6974 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6975 if test "$ac_cv_header_gpm_h" = yes; then
6976
6977 cat >>confdefs.h <<\EOF
6978 #define HAVE_GPM_H 1
6979 EOF
6980
6981                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6982                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6983
6984 echo "${as_me:-configure}:6984: testing assuming we really have GPM library ..." 1>&5
6985
6986 cat >>confdefs.h <<\EOF
6987 #define HAVE_LIBGPM 1
6988 EOF
6989
6990                         with_gpm=yes
6991                 else
6992                         echo "$as_me:6992: checking for Gpm_Open in -lgpm" >&5
6993 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6994 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6995   echo $ECHO_N "(cached) $ECHO_C" >&6
6996 else
6997   ac_check_lib_save_LIBS=$LIBS
6998 LIBS="-lgpm  $LIBS"
6999 cat >"conftest.$ac_ext" <<_ACEOF
7000 #line 7000 "configure"
7001 #include "confdefs.h"
7002
7003 /* Override any gcc2 internal prototype to avoid an error.  */
7004 #ifdef __cplusplus
7005 extern "C"
7006 #endif
7007 /* We use char because int might match the return type of a gcc2
7008    builtin and then its argument prototype would still apply.  */
7009 char Gpm_Open ();
7010 int
7011 main (void)
7012 {
7013 Gpm_Open ();
7014   ;
7015   return 0;
7016 }
7017 _ACEOF
7018 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7019 if { (eval echo "$as_me:7019: \"$ac_link\"") >&5
7020   (eval $ac_link) 2>&5
7021   ac_status=$?
7022   echo "$as_me:7022: \$? = $ac_status" >&5
7023   (exit "$ac_status"); } &&
7024          { ac_try='test -s "conftest$ac_exeext"'
7025   { (eval echo "$as_me:7025: \"$ac_try\"") >&5
7026   (eval $ac_try) 2>&5
7027   ac_status=$?
7028   echo "$as_me:7028: \$? = $ac_status" >&5
7029   (exit "$ac_status"); }; }; then
7030   ac_cv_lib_gpm_Gpm_Open=yes
7031 else
7032   echo "$as_me: failed program was:" >&5
7033 cat "conftest.$ac_ext" >&5
7034 ac_cv_lib_gpm_Gpm_Open=no
7035 fi
7036 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7037 LIBS=$ac_check_lib_save_LIBS
7038 fi
7039 echo "$as_me:7039: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7040 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7041 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7042   with_gpm=yes
7043 else
7044
7045                                 if test "$with_gpm" = maybe; then
7046                                         { echo "$as_me:7046: WARNING: Cannot link with GPM library" >&5
7047 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7048                                         with_gpm=no
7049                                 else
7050                                         { { echo "$as_me:7050: error: Cannot link with GPM library" >&5
7051 echo "$as_me: error: Cannot link with GPM library" >&2;}
7052    { (exit 1); exit 1; }; }
7053                                 fi
7054
7055 fi
7056
7057                 fi
7058
7059 else
7060
7061                 test "$with_gpm" != maybe && { echo "$as_me:7061: WARNING: Cannot find GPM header" >&5
7062 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7063                 with_gpm=no
7064
7065 fi
7066
7067 fi
7068
7069 if test "$with_gpm" != no ; then
7070         echo "$as_me:7070: checking if you want to load GPM dynamically" >&5
7071 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7072
7073 # Check whether --with-dlsym or --without-dlsym was given.
7074 if test "${with_dlsym+set}" = set; then
7075   withval="$with_dlsym"
7076   with_dlsym=$withval
7077 else
7078   with_dlsym=yes
7079 fi;
7080         echo "$as_me:7080: result: $with_dlsym" >&5
7081 echo "${ECHO_T}$with_dlsym" >&6
7082         if test "x$with_dlsym" = xyes ; then
7083
7084 cf_have_dlsym=no
7085 echo "$as_me:7085: checking for dlsym" >&5
7086 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7087 if test "${ac_cv_func_dlsym+set}" = set; then
7088   echo $ECHO_N "(cached) $ECHO_C" >&6
7089 else
7090   cat >"conftest.$ac_ext" <<_ACEOF
7091 #line 7091 "configure"
7092 #include "confdefs.h"
7093 #define dlsym autoconf_temporary
7094 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7095 #undef dlsym
7096
7097 #ifdef __cplusplus
7098 extern "C"
7099 #endif
7100
7101 /* We use char because int might match the return type of a gcc2
7102    builtin and then its argument prototype would still apply.  */
7103 char dlsym (void);
7104
7105 int
7106 main (void)
7107 {
7108
7109 /* The GNU C library defines stubs for functions which it implements
7110     to always fail with ENOSYS.  Some functions are actually named
7111     something starting with __ and the normal name is an alias.  */
7112 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7113 #error found stub for dlsym
7114 #endif
7115
7116         return dlsym ();
7117   ;
7118   return 0;
7119 }
7120 _ACEOF
7121 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7122 if { (eval echo "$as_me:7122: \"$ac_link\"") >&5
7123   (eval $ac_link) 2>&5
7124   ac_status=$?
7125   echo "$as_me:7125: \$? = $ac_status" >&5
7126   (exit "$ac_status"); } &&
7127          { ac_try='test -s "conftest$ac_exeext"'
7128   { (eval echo "$as_me:7128: \"$ac_try\"") >&5
7129   (eval $ac_try) 2>&5
7130   ac_status=$?
7131   echo "$as_me:7131: \$? = $ac_status" >&5
7132   (exit "$ac_status"); }; }; then
7133   ac_cv_func_dlsym=yes
7134 else
7135   echo "$as_me: failed program was:" >&5
7136 cat "conftest.$ac_ext" >&5
7137 ac_cv_func_dlsym=no
7138 fi
7139 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7140 fi
7141 echo "$as_me:7141: result: $ac_cv_func_dlsym" >&5
7142 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7143 if test "$ac_cv_func_dlsym" = yes; then
7144   cf_have_dlsym=yes
7145 else
7146
7147 cf_have_libdl=no
7148 echo "$as_me:7148: checking for dlsym in -ldl" >&5
7149 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7150 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7151   echo $ECHO_N "(cached) $ECHO_C" >&6
7152 else
7153   ac_check_lib_save_LIBS=$LIBS
7154 LIBS="-ldl  $LIBS"
7155 cat >"conftest.$ac_ext" <<_ACEOF
7156 #line 7156 "configure"
7157 #include "confdefs.h"
7158
7159 /* Override any gcc2 internal prototype to avoid an error.  */
7160 #ifdef __cplusplus
7161 extern "C"
7162 #endif
7163 /* We use char because int might match the return type of a gcc2
7164    builtin and then its argument prototype would still apply.  */
7165 char dlsym ();
7166 int
7167 main (void)
7168 {
7169 dlsym ();
7170   ;
7171   return 0;
7172 }
7173 _ACEOF
7174 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7175 if { (eval echo "$as_me:7175: \"$ac_link\"") >&5
7176   (eval $ac_link) 2>&5
7177   ac_status=$?
7178   echo "$as_me:7178: \$? = $ac_status" >&5
7179   (exit "$ac_status"); } &&
7180          { ac_try='test -s "conftest$ac_exeext"'
7181   { (eval echo "$as_me:7181: \"$ac_try\"") >&5
7182   (eval $ac_try) 2>&5
7183   ac_status=$?
7184   echo "$as_me:7184: \$? = $ac_status" >&5
7185   (exit "$ac_status"); }; }; then
7186   ac_cv_lib_dl_dlsym=yes
7187 else
7188   echo "$as_me: failed program was:" >&5
7189 cat "conftest.$ac_ext" >&5
7190 ac_cv_lib_dl_dlsym=no
7191 fi
7192 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7193 LIBS=$ac_check_lib_save_LIBS
7194 fi
7195 echo "$as_me:7195: result: $ac_cv_lib_dl_dlsym" >&5
7196 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7197 if test "$ac_cv_lib_dl_dlsym" = yes; then
7198
7199         cf_have_dlsym=yes
7200         cf_have_libdl=yes
7201 fi
7202
7203 fi
7204
7205 if test "$cf_have_dlsym" = yes ; then
7206         test "$cf_have_libdl" = yes && {
7207 cf_add_libs="$LIBS"
7208 # reverse order
7209 cf_add_0lib=
7210 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7211 # filter duplicates
7212 for cf_add_1lib in $cf_add_0lib; do
7213         for cf_add_2lib in $cf_add_libs; do
7214                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7215                         cf_add_1lib=
7216                         break
7217                 fi
7218         done
7219         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7220 done
7221 LIBS="$cf_add_libs"
7222  }
7223
7224         echo "$as_me:7224: checking whether able to link to dl*() functions" >&5
7225 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7226         cat >"conftest.$ac_ext" <<_ACEOF
7227 #line 7227 "configure"
7228 #include "confdefs.h"
7229 #include <dlfcn.h>
7230 int
7231 main (void)
7232 {
7233
7234                 void *obj;
7235                 if ((obj = dlopen("filename", 0)) != 0) {
7236                         if (dlsym(obj, "symbolname") == 0) {
7237                         dlclose(obj);
7238                         }
7239                 }
7240   ;
7241   return 0;
7242 }
7243 _ACEOF
7244 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7245 if { (eval echo "$as_me:7245: \"$ac_link\"") >&5
7246   (eval $ac_link) 2>&5
7247   ac_status=$?
7248   echo "$as_me:7248: \$? = $ac_status" >&5
7249   (exit "$ac_status"); } &&
7250          { ac_try='test -s "conftest$ac_exeext"'
7251   { (eval echo "$as_me:7251: \"$ac_try\"") >&5
7252   (eval $ac_try) 2>&5
7253   ac_status=$?
7254   echo "$as_me:7254: \$? = $ac_status" >&5
7255   (exit "$ac_status"); }; }; then
7256
7257 cat >>confdefs.h <<\EOF
7258 #define HAVE_LIBDL 1
7259 EOF
7260
7261 else
7262   echo "$as_me: failed program was:" >&5
7263 cat "conftest.$ac_ext" >&5
7264
7265                 { { echo "$as_me:7265: error: Cannot link test program for libdl" >&5
7266 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7267    { (exit 1); exit 1; }; }
7268 fi
7269 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7270         echo "$as_me:7270: result: ok" >&5
7271 echo "${ECHO_T}ok" >&6
7272 else
7273         { { echo "$as_me:7273: error: Cannot find dlsym function" >&5
7274 echo "$as_me: error: Cannot find dlsym function" >&2;}
7275    { (exit 1); exit 1; }; }
7276 fi
7277
7278                 if test "x$with_gpm" != xyes ; then
7279                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7280
7281 echo "${as_me:-configure}:7281: testing assuming soname for gpm is $with_gpm ..." 1>&5
7282
7283                         cf_cv_gpm_soname="$with_gpm"
7284                 else
7285
7286 echo "$as_me:7286: checking for soname of gpm library" >&5
7287 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7288 if test "${cf_cv_gpm_soname+set}" = set; then
7289   echo $ECHO_N "(cached) $ECHO_C" >&6
7290 else
7291
7292 cf_cv_gpm_soname=unknown
7293 if test "$cross_compiling" != yes ; then
7294 cat >conftest.$ac_ext <<CF_EOF
7295 #include <gpm.h>
7296 int main(void)
7297 {
7298 if (Gpm_Open(0,0)) Gpm_Close();
7299         ${cf_cv_main_return:-return}(0);
7300 }
7301 CF_EOF
7302 cf_save_LIBS="$LIBS"
7303
7304 cf_add_libs="$LIBS"
7305 # reverse order
7306 cf_add_0lib=
7307 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7308 # filter duplicates
7309 for cf_add_1lib in $cf_add_0lib; do
7310         for cf_add_2lib in $cf_add_libs; do
7311                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7312                         cf_add_1lib=
7313                         break
7314                 fi
7315         done
7316         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7317 done
7318 LIBS="$cf_add_libs"
7319
7320         if { (eval echo "$as_me:7320: \"$ac_compile\"") >&5
7321   (eval $ac_compile) 2>&5
7322   ac_status=$?
7323   echo "$as_me:7323: \$? = $ac_status" >&5
7324   (exit "$ac_status"); } ; then
7325                 if { (eval echo "$as_me:7325: \"$ac_link\"") >&5
7326   (eval $ac_link) 2>&5
7327   ac_status=$?
7328   echo "$as_me:7328: \$? = $ac_status" >&5
7329   (exit "$ac_status"); } ; then
7330                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7331                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7332                 fi
7333         fi
7334 rm -rf ./conftest*
7335 LIBS="$cf_save_LIBS"
7336 fi
7337
7338 fi
7339 echo "$as_me:7339: result: $cf_cv_gpm_soname" >&5
7340 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7341
7342                 fi
7343                 test "$cf_cv_gpm_soname" != "unknown" &&
7344 cat >>confdefs.h <<EOF
7345 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7346 EOF
7347
7348                 SHLIB_LIST="-ldl $SHLIB_LIST"
7349
7350 cf_add_libs="$PRIVATE_LIBS"
7351 # reverse order
7352 cf_add_0lib=
7353 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7354 # filter duplicates
7355 for cf_add_1lib in $cf_add_0lib; do
7356         for cf_add_2lib in $cf_add_libs; do
7357                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7358                         cf_add_1lib=
7359                         break
7360                 fi
7361         done
7362         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7363 done
7364 PRIVATE_LIBS="$cf_add_libs"
7365
7366         else
7367                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7368
7369 cf_add_libs="$TEST_LIBS"
7370 # reverse order
7371 cf_add_0lib=
7372 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7373 # filter duplicates
7374 for cf_add_1lib in $cf_add_0lib; do
7375         for cf_add_2lib in $cf_add_libs; do
7376                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7377                         cf_add_1lib=
7378                         break
7379                 fi
7380         done
7381         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7382 done
7383 TEST_LIBS="$cf_add_libs"
7384
7385 cf_add_libs="$PRIVATE_LIBS"
7386 # reverse order
7387 cf_add_0lib=
7388 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7389 # filter duplicates
7390 for cf_add_1lib in $cf_add_0lib; do
7391         for cf_add_2lib in $cf_add_libs; do
7392                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7393                         cf_add_1lib=
7394                         break
7395                 fi
7396         done
7397         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7398 done
7399 PRIVATE_LIBS="$cf_add_libs"
7400
7401         fi
7402
7403 cat >>confdefs.h <<\EOF
7404 #define HAVE_LIBGPM 1
7405 EOF
7406
7407 echo "$as_me:7407: checking for Gpm_Wgetch in -lgpm" >&5
7408 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7409 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7410   echo $ECHO_N "(cached) $ECHO_C" >&6
7411 else
7412   ac_check_lib_save_LIBS=$LIBS
7413 LIBS="-lgpm  $LIBS"
7414 cat >"conftest.$ac_ext" <<_ACEOF
7415 #line 7415 "configure"
7416 #include "confdefs.h"
7417
7418 /* Override any gcc2 internal prototype to avoid an error.  */
7419 #ifdef __cplusplus
7420 extern "C"
7421 #endif
7422 /* We use char because int might match the return type of a gcc2
7423    builtin and then its argument prototype would still apply.  */
7424 char Gpm_Wgetch ();
7425 int
7426 main (void)
7427 {
7428 Gpm_Wgetch ();
7429   ;
7430   return 0;
7431 }
7432 _ACEOF
7433 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7434 if { (eval echo "$as_me:7434: \"$ac_link\"") >&5
7435   (eval $ac_link) 2>&5
7436   ac_status=$?
7437   echo "$as_me:7437: \$? = $ac_status" >&5
7438   (exit "$ac_status"); } &&
7439          { ac_try='test -s "conftest$ac_exeext"'
7440   { (eval echo "$as_me:7440: \"$ac_try\"") >&5
7441   (eval $ac_try) 2>&5
7442   ac_status=$?
7443   echo "$as_me:7443: \$? = $ac_status" >&5
7444   (exit "$ac_status"); }; }; then
7445   ac_cv_lib_gpm_Gpm_Wgetch=yes
7446 else
7447   echo "$as_me: failed program was:" >&5
7448 cat "conftest.$ac_ext" >&5
7449 ac_cv_lib_gpm_Gpm_Wgetch=no
7450 fi
7451 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7452 LIBS=$ac_check_lib_save_LIBS
7453 fi
7454 echo "$as_me:7454: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7455 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7456 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7457
7458 echo "$as_me:7458: checking if GPM is weakly bound to curses library" >&5
7459 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7460 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7461   echo $ECHO_N "(cached) $ECHO_C" >&6
7462 else
7463
7464 cf_cv_check_gpm_wgetch=unknown
7465 if test "$cross_compiling" != yes ; then
7466
7467 cat >conftest.$ac_ext <<CF_EOF
7468 #include <gpm.h>
7469 int main(void)
7470 {
7471         Gpm_Wgetch();
7472         ${cf_cv_main_return:-return}(0);
7473 }
7474 CF_EOF
7475
7476         cf_save_LIBS="$LIBS"
7477         # This only works if we can look at the symbol table.  If a shared
7478         # library is stripped for install, we cannot use that.  So we're forced
7479         # to rely on the static library, noting that some packagers may not
7480         # include it.
7481         LIBS="-static -lgpm -dynamic $LIBS"
7482         if { (eval echo "$as_me:7482: \"$ac_compile\"") >&5
7483   (eval $ac_compile) 2>&5
7484   ac_status=$?
7485   echo "$as_me:7485: \$? = $ac_status" >&5
7486   (exit "$ac_status"); } ; then
7487                 if { (eval echo "$as_me:7487: \"$ac_link\"") >&5
7488   (eval $ac_link) 2>&5
7489   ac_status=$?
7490   echo "$as_me:7490: \$? = $ac_status" >&5
7491   (exit "$ac_status"); } ; then
7492                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7493                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7494                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7495                 fi
7496         fi
7497         rm -rf ./conftest*
7498         LIBS="$cf_save_LIBS"
7499 fi
7500
7501 fi
7502 echo "$as_me:7502: result: $cf_cv_check_gpm_wgetch" >&5
7503 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7504
7505 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7506         { echo "$as_me:7506: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7507 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7508 fi
7509
7510 fi
7511
7512 fi
7513
7514 echo "$as_me:7514: checking if you want to use PCRE2 for regular-expressions" >&5
7515 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7516
7517 # Check whether --with-pcre2 or --without-pcre2 was given.
7518 if test "${with_pcre2+set}" = set; then
7519   withval="$with_pcre2"
7520
7521 fi;
7522 test -z "$with_pcre2" && with_pcre2=no
7523 echo "$as_me:7523: result: $with_pcre2" >&5
7524 echo "${ECHO_T}$with_pcre2" >&6
7525
7526 if test "x$with_pcre2" != xno ; then
7527         cf_with_pcre2_ok=no
7528         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7529         do
7530
7531 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7532         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7533
7534 echo "${as_me:-configure}:7534: testing found package $cf_with_pcre2 ..." 1>&5
7535
7536         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7537         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7538         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7539
7540 echo "${as_me:-configure}:7540: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7541
7542         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7543
7544 echo "${as_me:-configure}:7544: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7545
7546 cf_fix_cppflags=no
7547 cf_new_cflags=
7548 cf_new_cppflags=
7549 cf_new_extra_cppflags=
7550
7551 for cf_add_cflags in $cf_pkgconfig_incs
7552 do
7553 case "$cf_fix_cppflags" in
7554 (no)
7555         case "$cf_add_cflags" in
7556         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7557                 case "$cf_add_cflags" in
7558                 (-D*)
7559                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7560
7561                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7562                                 && test -z "${cf_tst_cflags}" \
7563                                 && cf_fix_cppflags=yes
7564
7565                         if test "$cf_fix_cppflags" = yes ; then
7566
7567         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7568         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7569
7570                                 continue
7571                         elif test "${cf_tst_cflags}" = "\"'" ; then
7572
7573         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7574         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7575
7576                                 continue
7577                         fi
7578                         ;;
7579                 esac
7580                 case "$CPPFLAGS" in
7581                 (*$cf_add_cflags)
7582                         ;;
7583                 (*)
7584                         case "$cf_add_cflags" in
7585                         (-D*)
7586                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7587
7588 CPPFLAGS=`echo "$CPPFLAGS" | \
7589         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7590                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7591
7592                                 ;;
7593                         esac
7594
7595         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7596         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7597
7598                         ;;
7599                 esac
7600                 ;;
7601         (*)
7602
7603         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7604         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7605
7606                 ;;
7607         esac
7608         ;;
7609 (yes)
7610
7611         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7612         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7613
7614         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7615
7616         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7617                 && test -z "${cf_tst_cflags}" \
7618                 && cf_fix_cppflags=no
7619         ;;
7620 esac
7621 done
7622
7623 if test -n "$cf_new_cflags" ; then
7624
7625         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7626         CFLAGS="${CFLAGS}$cf_new_cflags"
7627
7628 fi
7629
7630 if test -n "$cf_new_cppflags" ; then
7631
7632         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7633         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7634
7635 fi
7636
7637 if test -n "$cf_new_extra_cppflags" ; then
7638
7639         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7640         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7641
7642 fi
7643
7644 cf_add_libs="$LIBS"
7645 # reverse order
7646 cf_add_0lib=
7647 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7648 # filter duplicates
7649 for cf_add_1lib in $cf_add_0lib; do
7650         for cf_add_2lib in $cf_add_libs; do
7651                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7652                         cf_add_1lib=
7653                         break
7654                 fi
7655         done
7656         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7657 done
7658 LIBS="$cf_add_libs"
7659
7660         cf_with_pcre2_ok=yes; break
7661 else
7662         cf_pkgconfig_incs=
7663         cf_pkgconfig_libs=
7664         :
7665 fi
7666
7667         done
7668         cf_with_pcre2_ok=yes || { { echo "$as_me:7668: error: Cannot find PCRE2 library" >&5
7669 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7670    { (exit 1); exit 1; }; }
7671
7672 cat >>confdefs.h <<\EOF
7673 #define HAVE_LIB_PCRE2 1
7674 EOF
7675
7676         # if pkgconfig gave no results, look for the libraries directly
7677         case "$LIBS" in
7678         (*pcre2-posix*|*pcreposix*)
7679                 ;;
7680         (*)
7681                 echo "$as_me:7681: checking for regcomp in -lpcre2-posix" >&5
7682 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7683 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7684   echo $ECHO_N "(cached) $ECHO_C" >&6
7685 else
7686   ac_check_lib_save_LIBS=$LIBS
7687 LIBS="-lpcre2-posix  $LIBS"
7688 cat >"conftest.$ac_ext" <<_ACEOF
7689 #line 7689 "configure"
7690 #include "confdefs.h"
7691
7692 /* Override any gcc2 internal prototype to avoid an error.  */
7693 #ifdef __cplusplus
7694 extern "C"
7695 #endif
7696 /* We use char because int might match the return type of a gcc2
7697    builtin and then its argument prototype would still apply.  */
7698 char regcomp ();
7699 int
7700 main (void)
7701 {
7702 regcomp ();
7703   ;
7704   return 0;
7705 }
7706 _ACEOF
7707 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7708 if { (eval echo "$as_me:7708: \"$ac_link\"") >&5
7709   (eval $ac_link) 2>&5
7710   ac_status=$?
7711   echo "$as_me:7711: \$? = $ac_status" >&5
7712   (exit "$ac_status"); } &&
7713          { ac_try='test -s "conftest$ac_exeext"'
7714   { (eval echo "$as_me:7714: \"$ac_try\"") >&5
7715   (eval $ac_try) 2>&5
7716   ac_status=$?
7717   echo "$as_me:7717: \$? = $ac_status" >&5
7718   (exit "$ac_status"); }; }; then
7719   ac_cv_lib_pcre2_posix_regcomp=yes
7720 else
7721   echo "$as_me: failed program was:" >&5
7722 cat "conftest.$ac_ext" >&5
7723 ac_cv_lib_pcre2_posix_regcomp=no
7724 fi
7725 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7726 LIBS=$ac_check_lib_save_LIBS
7727 fi
7728 echo "$as_me:7728: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7729 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7730 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7731
7732 cf_add_libs="$LIBS"
7733 # reverse order
7734 cf_add_0lib=
7735 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7736 # filter duplicates
7737 for cf_add_1lib in $cf_add_0lib; do
7738         for cf_add_2lib in $cf_add_libs; do
7739                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7740                         cf_add_1lib=
7741                         break
7742                 fi
7743         done
7744         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7745 done
7746 LIBS="$cf_add_libs"
7747
7748 else
7749   echo "$as_me:7749: checking for regcomp in -lpcreposix" >&5
7750 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7751 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7752   echo $ECHO_N "(cached) $ECHO_C" >&6
7753 else
7754   ac_check_lib_save_LIBS=$LIBS
7755 LIBS="-lpcreposix  $LIBS"
7756 cat >"conftest.$ac_ext" <<_ACEOF
7757 #line 7757 "configure"
7758 #include "confdefs.h"
7759
7760 /* Override any gcc2 internal prototype to avoid an error.  */
7761 #ifdef __cplusplus
7762 extern "C"
7763 #endif
7764 /* We use char because int might match the return type of a gcc2
7765    builtin and then its argument prototype would still apply.  */
7766 char regcomp ();
7767 int
7768 main (void)
7769 {
7770 regcomp ();
7771   ;
7772   return 0;
7773 }
7774 _ACEOF
7775 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7776 if { (eval echo "$as_me:7776: \"$ac_link\"") >&5
7777   (eval $ac_link) 2>&5
7778   ac_status=$?
7779   echo "$as_me:7779: \$? = $ac_status" >&5
7780   (exit "$ac_status"); } &&
7781          { ac_try='test -s "conftest$ac_exeext"'
7782   { (eval echo "$as_me:7782: \"$ac_try\"") >&5
7783   (eval $ac_try) 2>&5
7784   ac_status=$?
7785   echo "$as_me:7785: \$? = $ac_status" >&5
7786   (exit "$ac_status"); }; }; then
7787   ac_cv_lib_pcreposix_regcomp=yes
7788 else
7789   echo "$as_me: failed program was:" >&5
7790 cat "conftest.$ac_ext" >&5
7791 ac_cv_lib_pcreposix_regcomp=no
7792 fi
7793 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7794 LIBS=$ac_check_lib_save_LIBS
7795 fi
7796 echo "$as_me:7796: result: $ac_cv_lib_pcreposix_regcomp" >&5
7797 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7798 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7799
7800 cf_add_libs="$LIBS"
7801 # reverse order
7802 cf_add_0lib=
7803 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7804 # filter duplicates
7805 for cf_add_1lib in $cf_add_0lib; do
7806         for cf_add_2lib in $cf_add_libs; do
7807                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7808                         cf_add_1lib=
7809                         break
7810                 fi
7811         done
7812         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7813 done
7814 LIBS="$cf_add_libs"
7815
7816 else
7817   { { echo "$as_me:7817: error: Cannot find PCRE2 POSIX library" >&5
7818 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7819    { (exit 1); exit 1; }; }
7820 fi
7821
7822 fi
7823
7824                 ;;
7825         esac
7826
7827         # either way, check for the library header files
7828
7829 for ac_header in pcre2posix.h pcreposix.h
7830 do
7831 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7832 echo "$as_me:7832: checking for $ac_header" >&5
7833 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7834 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7835   echo $ECHO_N "(cached) $ECHO_C" >&6
7836 else
7837   cat >"conftest.$ac_ext" <<_ACEOF
7838 #line 7838 "configure"
7839 #include "confdefs.h"
7840 #include <$ac_header>
7841 _ACEOF
7842 if { (eval echo "$as_me:7842: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7843   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7844   ac_status=$?
7845   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7846   rm -f conftest.er1
7847   cat conftest.err >&5
7848   echo "$as_me:7848: \$? = $ac_status" >&5
7849   (exit "$ac_status"); } >/dev/null; then
7850   if test -s conftest.err; then
7851     ac_cpp_err=$ac_c_preproc_warn_flag
7852   else
7853     ac_cpp_err=
7854   fi
7855 else
7856   ac_cpp_err=yes
7857 fi
7858 if test -z "$ac_cpp_err"; then
7859   eval "$as_ac_Header=yes"
7860 else
7861   echo "$as_me: failed program was:" >&5
7862   cat "conftest.$ac_ext" >&5
7863   eval "$as_ac_Header=no"
7864 fi
7865 rm -f conftest.err "conftest.$ac_ext"
7866 fi
7867 echo "$as_me:7867: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7868 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7869 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7870   cat >>confdefs.h <<EOF
7871 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7872 EOF
7873
7874 fi
7875 done
7876
7877 fi
7878
7879 # not everyone has "test -c"
7880 if test -c /dev/sysmouse 2>/dev/null ; then
7881 echo "$as_me:7881: checking if you want to use sysmouse" >&5
7882 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7883
7884 # Check whether --with-sysmouse or --without-sysmouse was given.
7885 if test "${with_sysmouse+set}" = set; then
7886   withval="$with_sysmouse"
7887   cf_with_sysmouse=$withval
7888 else
7889   cf_with_sysmouse=maybe
7890 fi;
7891         if test "$cf_with_sysmouse" != no ; then
7892         cat >"conftest.$ac_ext" <<_ACEOF
7893 #line 7893 "configure"
7894 #include "confdefs.h"
7895
7896 #include <osreldate.h>
7897 #if (__FreeBSD_version >= 400017)
7898 #include <sys/consio.h>
7899 #include <sys/fbio.h>
7900 #else
7901 #include <machine/console.h>
7902 #endif
7903
7904 int
7905 main (void)
7906 {
7907
7908         struct mouse_info the_mouse;
7909         ioctl(0, CONS_MOUSECTL, &the_mouse);
7910
7911   ;
7912   return 0;
7913 }
7914 _ACEOF
7915 rm -f "conftest.$ac_objext"
7916 if { (eval echo "$as_me:7916: \"$ac_compile\"") >&5
7917   (eval $ac_compile) 2>&5
7918   ac_status=$?
7919   echo "$as_me:7919: \$? = $ac_status" >&5
7920   (exit "$ac_status"); } &&
7921          { ac_try='test -s "conftest.$ac_objext"'
7922   { (eval echo "$as_me:7922: \"$ac_try\"") >&5
7923   (eval $ac_try) 2>&5
7924   ac_status=$?
7925   echo "$as_me:7925: \$? = $ac_status" >&5
7926   (exit "$ac_status"); }; }; then
7927   cf_with_sysmouse=yes
7928 else
7929   echo "$as_me: failed program was:" >&5
7930 cat "conftest.$ac_ext" >&5
7931 cf_with_sysmouse=no
7932 fi
7933 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7934         fi
7935 echo "$as_me:7935: result: $cf_with_sysmouse" >&5
7936 echo "${ECHO_T}$cf_with_sysmouse" >&6
7937 test "$cf_with_sysmouse" = yes &&
7938 cat >>confdefs.h <<\EOF
7939 #define USE_SYSMOUSE 1
7940 EOF
7941
7942 fi
7943
7944 # pretend that ncurses==ncursesw==ncursest
7945 echo "$as_me:7945: checking if you want to disable library suffixes" >&5
7946 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7947
7948 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7949 if test "${enable_lib_suffixes+set}" = set; then
7950   enableval="$enable_lib_suffixes"
7951   test "$enableval" != no && enableval=yes
7952         if test "$enableval" != "yes" ; then
7953     disable_lib_suffixes=yes
7954         else
7955                 disable_lib_suffixes=no
7956         fi
7957 else
7958   enableval=yes
7959         disable_lib_suffixes=no
7960
7961 fi;
7962 echo "$as_me:7962: result: $disable_lib_suffixes" >&5
7963 echo "${ECHO_T}$disable_lib_suffixes" >&6
7964
7965 ### If we're building with rpath, try to link non-standard libs that way too.
7966 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7967
7968 echo "$as_me:7968: checking if rpath-hack should be disabled" >&5
7969 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7970
7971 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7972 if test "${enable_rpath_hack+set}" = set; then
7973   enableval="$enable_rpath_hack"
7974   test "$enableval" != no && enableval=yes
7975         if test "$enableval" != "yes" ; then
7976     enable_rpath_hack=no
7977         else
7978                 enable_rpath_hack=yes
7979         fi
7980 else
7981   enableval=yes
7982         enable_rpath_hack=yes
7983
7984 fi;
7985 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
7986 echo "$as_me:7986: result: $cf_disable_rpath_hack" >&5
7987 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7988
7989 if test "$enable_rpath_hack" = yes ; then
7990
7991 echo "$as_me:7991: checking for updated LDFLAGS" >&5
7992 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7993 if test -n "$LD_RPATH_OPT" ; then
7994         echo "$as_me:7994: result: maybe" >&5
7995 echo "${ECHO_T}maybe" >&6
7996
7997         for ac_prog in ldd
7998 do
7999   # Extract the first word of "$ac_prog", so it can be a program name with args.
8000 set dummy $ac_prog; ac_word=$2
8001 echo "$as_me:8001: checking for $ac_word" >&5
8002 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8003 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8004   echo $ECHO_N "(cached) $ECHO_C" >&6
8005 else
8006   if test -n "$cf_ldd_prog"; then
8007   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8008 else
8009   ac_save_IFS=$IFS; IFS=$ac_path_separator
8010 ac_dummy="$PATH"
8011 for ac_dir in $ac_dummy; do
8012   IFS=$ac_save_IFS
8013   test -z "$ac_dir" && ac_dir=.
8014   $as_executable_p "$ac_dir/$ac_word" || continue
8015 ac_cv_prog_cf_ldd_prog="$ac_prog"
8016 echo "$as_me:8016: found $ac_dir/$ac_word" >&5
8017 break
8018 done
8019
8020 fi
8021 fi
8022 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8023 if test -n "$cf_ldd_prog"; then
8024   echo "$as_me:8024: result: $cf_ldd_prog" >&5
8025 echo "${ECHO_T}$cf_ldd_prog" >&6
8026 else
8027   echo "$as_me:8027: result: no" >&5
8028 echo "${ECHO_T}no" >&6
8029 fi
8030
8031   test -n "$cf_ldd_prog" && break
8032 done
8033 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8034
8035         cf_rpath_list="/usr/lib /lib"
8036         if test "$cf_ldd_prog" != no
8037         then
8038                 cf_rpath_oops=
8039
8040 cat >"conftest.$ac_ext" <<_ACEOF
8041 #line 8041 "configure"
8042 #include "confdefs.h"
8043 #include <stdio.h>
8044 int
8045 main (void)
8046 {
8047 printf("Hello");
8048   ;
8049   return 0;
8050 }
8051 _ACEOF
8052 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8053 if { (eval echo "$as_me:8053: \"$ac_link\"") >&5
8054   (eval $ac_link) 2>&5
8055   ac_status=$?
8056   echo "$as_me:8056: \$? = $ac_status" >&5
8057   (exit "$ac_status"); } &&
8058          { ac_try='test -s "conftest$ac_exeext"'
8059   { (eval echo "$as_me:8059: \"$ac_try\"") >&5
8060   (eval $ac_try) 2>&5
8061   ac_status=$?
8062   echo "$as_me:8062: \$? = $ac_status" >&5
8063   (exit "$ac_status"); }; }; then
8064   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8065                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8066 else
8067   echo "$as_me: failed program was:" >&5
8068 cat "conftest.$ac_ext" >&5
8069 fi
8070 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8071
8072                 # If we passed the link-test, but get a "not found" on a given library,
8073                 # this could be due to inept reconfiguration of gcc to make it only
8074                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8075                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8076                 # /usr/local libraries.
8077                 if test -n "$cf_rpath_oops"
8078                 then
8079                         for cf_rpath_src in $cf_rpath_oops
8080                         do
8081                                 for cf_rpath_dir in \
8082                                         /usr/local \
8083                                         /usr/pkg \
8084                                         /opt/sfw
8085                                 do
8086                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8087                                         then
8088                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8089
8090 echo "${as_me:-configure}:8090: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8091
8092                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8093                                                 break
8094                                         fi
8095                                 done
8096                         done
8097                 fi
8098         fi
8099
8100         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8101
8102 echo "${as_me:-configure}:8102: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8103
8104 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8105
8106 echo "${as_me:-configure}:8106: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8107
8108 cf_rpath_dst=
8109 for cf_rpath_src in $LDFLAGS
8110 do
8111         case "$cf_rpath_src" in
8112         (-L*)
8113
8114                 # check if this refers to a directory which we will ignore
8115                 cf_rpath_skip=no
8116                 if test -n "$cf_rpath_list"
8117                 then
8118                         for cf_rpath_item in $cf_rpath_list
8119                         do
8120                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8121                                 then
8122                                         cf_rpath_skip=yes
8123                                         break
8124                                 fi
8125                         done
8126                 fi
8127
8128                 if test "$cf_rpath_skip" = no
8129                 then
8130                         # transform the option
8131                         if test "$LD_RPATH_OPT" = "-R " ; then
8132                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8133                         else
8134                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8135                         fi
8136
8137                         # if we have not already added this, add it now
8138                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8139                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8140                         then
8141                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8142
8143 echo "${as_me:-configure}:8143: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8144
8145                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8146                         fi
8147                 fi
8148                 ;;
8149         esac
8150         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8151 done
8152 LDFLAGS=$cf_rpath_dst
8153
8154 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8155
8156 echo "${as_me:-configure}:8156: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8157
8158 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8159
8160 echo "${as_me:-configure}:8160: testing ...checking LIBS $LIBS ..." 1>&5
8161
8162 cf_rpath_dst=
8163 for cf_rpath_src in $LIBS
8164 do
8165         case "$cf_rpath_src" in
8166         (-L*)
8167
8168                 # check if this refers to a directory which we will ignore
8169                 cf_rpath_skip=no
8170                 if test -n "$cf_rpath_list"
8171                 then
8172                         for cf_rpath_item in $cf_rpath_list
8173                         do
8174                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8175                                 then
8176                                         cf_rpath_skip=yes
8177                                         break
8178                                 fi
8179                         done
8180                 fi
8181
8182                 if test "$cf_rpath_skip" = no
8183                 then
8184                         # transform the option
8185                         if test "$LD_RPATH_OPT" = "-R " ; then
8186                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8187                         else
8188                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8189                         fi
8190
8191                         # if we have not already added this, add it now
8192                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8193                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8194                         then
8195                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8196
8197 echo "${as_me:-configure}:8197: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8198
8199                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8200                         fi
8201                 fi
8202                 ;;
8203         esac
8204         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8205 done
8206 LIBS=$cf_rpath_dst
8207
8208 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8209
8210 echo "${as_me:-configure}:8210: testing ...checked LIBS $LIBS ..." 1>&5
8211
8212         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8213
8214 echo "${as_me:-configure}:8214: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8215
8216 else
8217         echo "$as_me:8217: result: no" >&5
8218 echo "${ECHO_T}no" >&6
8219 fi
8220
8221 fi
8222
8223 fi
8224
8225 ### Depending on the system, someone may use rpath to build ncurses but not
8226 # want users of the package to rely upon that feature.  Give those people an
8227 # option to suppress that detail from EXTRA_LDFLAGS.
8228 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8229 if test -n "$EXTRA_PKG_LDFLAGS"
8230 then
8231         echo "$as_me:8231: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8232 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8233
8234 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8235 if test "${enable_pkg_ldflags+set}" = set; then
8236   enableval="$enable_pkg_ldflags"
8237   test "$enableval" != no && enableval=yes
8238         if test "$enableval" != "yes" ; then
8239     disable_pkg_ldflags=yes
8240         else
8241                 disable_pkg_ldflags=no
8242         fi
8243 else
8244   enableval=yes
8245         disable_pkg_ldflags=no
8246
8247 fi;
8248         echo "$as_me:8248: result: $disable_pkg_ldflags" >&5
8249 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8250         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8251 fi
8252
8253 ###############################################################################
8254
8255 ###     use option --with-extra-suffix to append suffix to headers and libraries
8256 echo "$as_me:8256: checking if you wish to append extra suffix to header/library paths" >&5
8257 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8258 EXTRA_SUFFIX=
8259
8260 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8261 if test "${with_extra_suffix+set}" = set; then
8262   withval="$with_extra_suffix"
8263   case x$withval in
8264         (xno)
8265                 ;;
8266         (xyes|x)
8267                 EXTRA_SUFFIX=$cf_cv_abi_version
8268                 ;;
8269         (*)
8270                 EXTRA_SUFFIX=$withval
8271                 ;;
8272         esac
8273
8274 fi;
8275 echo "$as_me:8275: result: $EXTRA_SUFFIX" >&5
8276 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8277
8278 ###     use option --disable-overwrite to leave out the link to -lcurses
8279 echo "$as_me:8279: checking if you wish to install ncurses overwriting curses" >&5
8280 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8281
8282 # Check whether --enable-overwrite or --disable-overwrite was given.
8283 if test "${enable_overwrite+set}" = set; then
8284   enableval="$enable_overwrite"
8285   with_overwrite=$enableval
8286 else
8287   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8288 fi;
8289 echo "$as_me:8289: result: $with_overwrite" >&5
8290 echo "${ECHO_T}$with_overwrite" >&6
8291
8292 echo "$as_me:8292: checking if external terminfo-database is used" >&5
8293 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8294
8295 # Check whether --enable-database or --disable-database was given.
8296 if test "${enable_database+set}" = set; then
8297   enableval="$enable_database"
8298   use_database=$enableval
8299 else
8300   use_database=yes
8301 fi;
8302 echo "$as_me:8302: result: $use_database" >&5
8303 echo "${ECHO_T}$use_database" >&6
8304
8305 case "$host_os" in
8306 (os2*)
8307         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8308         ;;
8309 (*)
8310         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8311         ;;
8312 esac
8313
8314 NCURSES_USE_DATABASE=0
8315 if test "$use_database" != no ; then
8316         NCURSES_USE_DATABASE=1
8317
8318         echo "$as_me:8318: checking which terminfo source-file will be installed" >&5
8319 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8320
8321 # Check whether --with-database or --without-database was given.
8322 if test "${with_database+set}" = set; then
8323   withval="$with_database"
8324   TERMINFO_SRC=$withval
8325 fi;
8326         echo "$as_me:8326: result: $TERMINFO_SRC" >&5
8327 echo "${ECHO_T}$TERMINFO_SRC" >&6
8328
8329         echo "$as_me:8329: checking whether to use hashed database instead of directory/tree" >&5
8330 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8331
8332 # Check whether --with-hashed-db or --without-hashed-db was given.
8333 if test "${with_hashed_db+set}" = set; then
8334   withval="$with_hashed_db"
8335
8336 else
8337   with_hashed_db=no
8338 fi;
8339         echo "$as_me:8339: result: $with_hashed_db" >&5
8340 echo "${ECHO_T}$with_hashed_db" >&6
8341 else
8342         with_hashed_db=no
8343 fi
8344
8345 echo "$as_me:8345: checking for list of fallback descriptions" >&5
8346 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8347
8348 # Check whether --with-fallbacks or --without-fallbacks was given.
8349 if test "${with_fallbacks+set}" = set; then
8350   withval="$with_fallbacks"
8351   with_fallback=$withval
8352 else
8353   with_fallback=
8354 fi;
8355 echo "$as_me:8355: result: $with_fallback" >&5
8356 echo "${ECHO_T}$with_fallback" >&6
8357
8358 case ".$with_fallback" in
8359 (.|.no)
8360         FALLBACK_LIST=
8361         ;;
8362 (.yes)
8363         { echo "$as_me:8363: WARNING: expected a list of terminal descriptions" >&5
8364 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8365         ;;
8366 (*)
8367         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8368         ;;
8369 esac
8370
8371 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8372 # tree for generating the terminal descriptions that will be compiled into the
8373 # library.  If your toolchain is old, it may not handle current terminal
8374 # databases.  Use configure-options to point to the tools which will be used,
8375 # rather than the first ones found on the $PATH.
8376 if test -n "$ac_tool_prefix"; then
8377   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8378 set dummy ${ac_tool_prefix}tic; ac_word=$2
8379 echo "$as_me:8379: checking for $ac_word" >&5
8380 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8381 if test "${ac_cv_prog_TIC+set}" = set; then
8382   echo $ECHO_N "(cached) $ECHO_C" >&6
8383 else
8384   if test -n "$TIC"; then
8385   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8386 else
8387   ac_save_IFS=$IFS; IFS=$ac_path_separator
8388 ac_dummy="$PATH"
8389 for ac_dir in $ac_dummy; do
8390   IFS=$ac_save_IFS
8391   test -z "$ac_dir" && ac_dir=.
8392   $as_executable_p "$ac_dir/$ac_word" || continue
8393 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8394 echo "$as_me:8394: found $ac_dir/$ac_word" >&5
8395 break
8396 done
8397
8398 fi
8399 fi
8400 TIC=$ac_cv_prog_TIC
8401 if test -n "$TIC"; then
8402   echo "$as_me:8402: result: $TIC" >&5
8403 echo "${ECHO_T}$TIC" >&6
8404 else
8405   echo "$as_me:8405: result: no" >&5
8406 echo "${ECHO_T}no" >&6
8407 fi
8408
8409 fi
8410 if test -z "$ac_cv_prog_TIC"; then
8411   ac_ct_TIC=$TIC
8412   # Extract the first word of "tic", so it can be a program name with args.
8413 set dummy tic; ac_word=$2
8414 echo "$as_me:8414: checking for $ac_word" >&5
8415 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8416 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8417   echo $ECHO_N "(cached) $ECHO_C" >&6
8418 else
8419   if test -n "$ac_ct_TIC"; then
8420   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8421 else
8422   ac_save_IFS=$IFS; IFS=$ac_path_separator
8423 ac_dummy="$PATH"
8424 for ac_dir in $ac_dummy; do
8425   IFS=$ac_save_IFS
8426   test -z "$ac_dir" && ac_dir=.
8427   $as_executable_p "$ac_dir/$ac_word" || continue
8428 ac_cv_prog_ac_ct_TIC="tic"
8429 echo "$as_me:8429: found $ac_dir/$ac_word" >&5
8430 break
8431 done
8432
8433 fi
8434 fi
8435 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8436 if test -n "$ac_ct_TIC"; then
8437   echo "$as_me:8437: result: $ac_ct_TIC" >&5
8438 echo "${ECHO_T}$ac_ct_TIC" >&6
8439 else
8440   echo "$as_me:8440: result: no" >&5
8441 echo "${ECHO_T}no" >&6
8442 fi
8443
8444   TIC=$ac_ct_TIC
8445 else
8446   TIC="$ac_cv_prog_TIC"
8447 fi
8448
8449 if test -n "$ac_tool_prefix"; then
8450   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8451 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8452 echo "$as_me:8452: checking for $ac_word" >&5
8453 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8454 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8455   echo $ECHO_N "(cached) $ECHO_C" >&6
8456 else
8457   if test -n "$INFOCMP"; then
8458   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8459 else
8460   ac_save_IFS=$IFS; IFS=$ac_path_separator
8461 ac_dummy="$PATH"
8462 for ac_dir in $ac_dummy; do
8463   IFS=$ac_save_IFS
8464   test -z "$ac_dir" && ac_dir=.
8465   $as_executable_p "$ac_dir/$ac_word" || continue
8466 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8467 echo "$as_me:8467: found $ac_dir/$ac_word" >&5
8468 break
8469 done
8470
8471 fi
8472 fi
8473 INFOCMP=$ac_cv_prog_INFOCMP
8474 if test -n "$INFOCMP"; then
8475   echo "$as_me:8475: result: $INFOCMP" >&5
8476 echo "${ECHO_T}$INFOCMP" >&6
8477 else
8478   echo "$as_me:8478: result: no" >&5
8479 echo "${ECHO_T}no" >&6
8480 fi
8481
8482 fi
8483 if test -z "$ac_cv_prog_INFOCMP"; then
8484   ac_ct_INFOCMP=$INFOCMP
8485   # Extract the first word of "infocmp", so it can be a program name with args.
8486 set dummy infocmp; ac_word=$2
8487 echo "$as_me:8487: checking for $ac_word" >&5
8488 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8489 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8490   echo $ECHO_N "(cached) $ECHO_C" >&6
8491 else
8492   if test -n "$ac_ct_INFOCMP"; then
8493   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8494 else
8495   ac_save_IFS=$IFS; IFS=$ac_path_separator
8496 ac_dummy="$PATH"
8497 for ac_dir in $ac_dummy; do
8498   IFS=$ac_save_IFS
8499   test -z "$ac_dir" && ac_dir=.
8500   $as_executable_p "$ac_dir/$ac_word" || continue
8501 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8502 echo "$as_me:8502: found $ac_dir/$ac_word" >&5
8503 break
8504 done
8505
8506 fi
8507 fi
8508 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8509 if test -n "$ac_ct_INFOCMP"; then
8510   echo "$as_me:8510: result: $ac_ct_INFOCMP" >&5
8511 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8512 else
8513   echo "$as_me:8513: result: no" >&5
8514 echo "${ECHO_T}no" >&6
8515 fi
8516
8517   INFOCMP=$ac_ct_INFOCMP
8518 else
8519   INFOCMP="$ac_cv_prog_INFOCMP"
8520 fi
8521
8522 if test -n "$FALLBACK_LIST"
8523 then
8524
8525 # Check whether --with-tic-path or --without-tic-path was given.
8526 if test "${with_tic_path+set}" = set; then
8527   withval="$with_tic_path"
8528   echo "$as_me:8528: checking for tic program for fallbacks" >&5
8529 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8530                 TIC=$withval
8531                 echo "$as_me:8531: result: $TIC" >&5
8532 echo "${ECHO_T}$TIC" >&6
8533
8534 if test "x$prefix" != xNONE; then
8535         cf_path_syntax="$prefix"
8536 else
8537         cf_path_syntax="$ac_default_prefix"
8538 fi
8539
8540 case ".$TIC" in
8541 (.\$\(*\)*|.\'*\'*)
8542         ;;
8543 (..|./*|.\\*)
8544         ;;
8545 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8546         ;;
8547 (.\$\{*prefix\}*|.\$\{*dir\}*)
8548         eval TIC="$TIC"
8549         case ".$TIC" in
8550         (.NONE/*)
8551                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8552                 ;;
8553         esac
8554         ;;
8555 (.no|.NONE/*)
8556         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8557         ;;
8558 (*)
8559         { { echo "$as_me:8559: error: expected a pathname, not \"$TIC\"" >&5
8560 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8561    { (exit 1); exit 1; }; }
8562         ;;
8563 esac
8564
8565 else
8566
8567 test -z "$TIC" && TIC="tic"
8568 for ac_prog in $TIC tic
8569 do
8570   # Extract the first word of "$ac_prog", so it can be a program name with args.
8571 set dummy $ac_prog; ac_word=$2
8572 echo "$as_me:8572: checking for $ac_word" >&5
8573 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8574 if test "${ac_cv_path_TIC+set}" = set; then
8575   echo $ECHO_N "(cached) $ECHO_C" >&6
8576 else
8577   case $TIC in
8578   [\\/]* | ?:[\\/]*)
8579   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8580   ;;
8581   *)
8582   ac_save_IFS=$IFS; IFS=$ac_path_separator
8583 ac_dummy="$PATH:/usr/local/ncurses/bin"
8584 for ac_dir in $ac_dummy; do
8585   IFS=$ac_save_IFS
8586   test -z "$ac_dir" && ac_dir=.
8587   if $as_executable_p "$ac_dir/$ac_word"; then
8588    ac_cv_path_TIC="$ac_dir/$ac_word"
8589    echo "$as_me:8589: found $ac_dir/$ac_word" >&5
8590    break
8591 fi
8592 done
8593
8594   ;;
8595 esac
8596 fi
8597 TIC=$ac_cv_path_TIC
8598
8599 if test -n "$TIC"; then
8600   echo "$as_me:8600: result: $TIC" >&5
8601 echo "${ECHO_T}$TIC" >&6
8602 else
8603   echo "$as_me:8603: result: no" >&5
8604 echo "${ECHO_T}no" >&6
8605 fi
8606
8607   test -n "$TIC" && break
8608 done
8609 test -n "$TIC" || TIC="$TIC"
8610
8611 cf_path_prog=""
8612 cf_path_args=""
8613 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8614 for cf_temp in $ac_cv_path_TIC
8615 do
8616         if test -z "$cf_path_prog" ; then
8617                 if test "$with_full_paths" = yes ; then
8618
8619 if test "x$prefix" != xNONE; then
8620         cf_path_syntax="$prefix"
8621 else
8622         cf_path_syntax="$ac_default_prefix"
8623 fi
8624
8625 case ".$cf_temp" in
8626 (.\$\(*\)*|.\'*\'*)
8627         ;;
8628 (..|./*|.\\*)
8629         ;;
8630 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8631         ;;
8632 (.\$\{*prefix\}*|.\$\{*dir\}*)
8633         eval cf_temp="$cf_temp"
8634         case ".$cf_temp" in
8635         (.NONE/*)
8636                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8637                 ;;
8638         esac
8639         ;;
8640 (.no|.NONE/*)
8641         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8642         ;;
8643 (*)
8644         break
8645         ;;
8646 esac
8647
8648                         cf_path_prog="$cf_temp"
8649                 else
8650                         cf_path_prog="`basename "$cf_temp"`"
8651                 fi
8652         elif test -z "$cf_path_args" ; then
8653                 cf_path_args="$cf_temp"
8654         else
8655                 cf_path_args="$cf_path_args $cf_temp"
8656         fi
8657 done
8658 IFS="$cf_save_ifs"
8659
8660 if test -n "$cf_path_prog" ; then
8661
8662 echo "${as_me:-configure}:8662: testing defining path for ${cf_path_prog} ..." 1>&5
8663
8664 cat >>confdefs.h <<EOF
8665 #define TIC_PATH "$cf_path_prog"
8666 EOF
8667
8668         test -n "$cf_path_args" &&
8669 cat >>confdefs.h <<EOF
8670 #define TIC_ARGS "$cf_path_args"
8671 EOF
8672
8673 fi
8674
8675                 if test -z "$TIC"
8676                 then
8677                         { echo "$as_me:8677: WARNING: no tic program found for fallbacks" >&5
8678 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8679                 fi
8680
8681 fi;
8682
8683 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8684 if test "${with_infocmp_path+set}" = set; then
8685   withval="$with_infocmp_path"
8686   echo "$as_me:8686: checking for infocmp program for fallbacks" >&5
8687 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8688                 INFOCMP=$withval
8689                 echo "$as_me:8689: result: $INFOCMP" >&5
8690 echo "${ECHO_T}$INFOCMP" >&6
8691
8692 if test "x$prefix" != xNONE; then
8693         cf_path_syntax="$prefix"
8694 else
8695         cf_path_syntax="$ac_default_prefix"
8696 fi
8697
8698 case ".$INFOCMP" in
8699 (.\$\(*\)*|.\'*\'*)
8700         ;;
8701 (..|./*|.\\*)
8702         ;;
8703 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8704         ;;
8705 (.\$\{*prefix\}*|.\$\{*dir\}*)
8706         eval INFOCMP="$INFOCMP"
8707         case ".$INFOCMP" in
8708         (.NONE/*)
8709                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8710                 ;;
8711         esac
8712         ;;
8713 (.no|.NONE/*)
8714         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8715         ;;
8716 (*)
8717         { { echo "$as_me:8717: error: expected a pathname, not \"$INFOCMP\"" >&5
8718 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8719    { (exit 1); exit 1; }; }
8720         ;;
8721 esac
8722
8723 else
8724
8725 test -z "$INFOCMP" && INFOCMP="infocmp"
8726 for ac_prog in $INFOCMP infocmp
8727 do
8728   # Extract the first word of "$ac_prog", so it can be a program name with args.
8729 set dummy $ac_prog; ac_word=$2
8730 echo "$as_me:8730: checking for $ac_word" >&5
8731 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8732 if test "${ac_cv_path_INFOCMP+set}" = set; then
8733   echo $ECHO_N "(cached) $ECHO_C" >&6
8734 else
8735   case $INFOCMP in
8736   [\\/]* | ?:[\\/]*)
8737   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8738   ;;
8739   *)
8740   ac_save_IFS=$IFS; IFS=$ac_path_separator
8741 ac_dummy="$PATH:/usr/local/ncurses/bin"
8742 for ac_dir in $ac_dummy; do
8743   IFS=$ac_save_IFS
8744   test -z "$ac_dir" && ac_dir=.
8745   if $as_executable_p "$ac_dir/$ac_word"; then
8746    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8747    echo "$as_me:8747: found $ac_dir/$ac_word" >&5
8748    break
8749 fi
8750 done
8751
8752   ;;
8753 esac
8754 fi
8755 INFOCMP=$ac_cv_path_INFOCMP
8756
8757 if test -n "$INFOCMP"; then
8758   echo "$as_me:8758: result: $INFOCMP" >&5
8759 echo "${ECHO_T}$INFOCMP" >&6
8760 else
8761   echo "$as_me:8761: result: no" >&5
8762 echo "${ECHO_T}no" >&6
8763 fi
8764
8765   test -n "$INFOCMP" && break
8766 done
8767 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8768
8769 cf_path_prog=""
8770 cf_path_args=""
8771 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8772 for cf_temp in $ac_cv_path_INFOCMP
8773 do
8774         if test -z "$cf_path_prog" ; then
8775                 if test "$with_full_paths" = yes ; then
8776
8777 if test "x$prefix" != xNONE; then
8778         cf_path_syntax="$prefix"
8779 else
8780         cf_path_syntax="$ac_default_prefix"
8781 fi
8782
8783 case ".$cf_temp" in
8784 (.\$\(*\)*|.\'*\'*)
8785         ;;
8786 (..|./*|.\\*)
8787         ;;
8788 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8789         ;;
8790 (.\$\{*prefix\}*|.\$\{*dir\}*)
8791         eval cf_temp="$cf_temp"
8792         case ".$cf_temp" in
8793         (.NONE/*)
8794                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8795                 ;;
8796         esac
8797         ;;
8798 (.no|.NONE/*)
8799         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8800         ;;
8801 (*)
8802         break
8803         ;;
8804 esac
8805
8806                         cf_path_prog="$cf_temp"
8807                 else
8808                         cf_path_prog="`basename "$cf_temp"`"
8809                 fi
8810         elif test -z "$cf_path_args" ; then
8811                 cf_path_args="$cf_temp"
8812         else
8813                 cf_path_args="$cf_path_args $cf_temp"
8814         fi
8815 done
8816 IFS="$cf_save_ifs"
8817
8818 if test -n "$cf_path_prog" ; then
8819
8820 echo "${as_me:-configure}:8820: testing defining path for ${cf_path_prog} ..." 1>&5
8821
8822 cat >>confdefs.h <<EOF
8823 #define INFOCMP_PATH "$cf_path_prog"
8824 EOF
8825
8826         test -n "$cf_path_args" &&
8827 cat >>confdefs.h <<EOF
8828 #define INFOCMP_ARGS "$cf_path_args"
8829 EOF
8830
8831 fi
8832
8833                 if test -z "$INFOCMP"
8834                 then
8835                         { echo "$as_me:8835: WARNING: no infocmp program found for fallbacks" >&5
8836 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8837                 fi
8838
8839 fi;
8840
8841         test -z "$TIC" && FALLBACK_LIST=
8842         test -z "$INFOCMP" && FALLBACK_LIST=
8843         if test -z "$FALLBACK_LIST"
8844         then
8845                 { echo "$as_me:8845: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8846 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8847         fi
8848 fi
8849
8850 USE_FALLBACKS=
8851 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8852
8853 echo "$as_me:8853: checking if you want modern xterm or antique" >&5
8854 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8855
8856 # Check whether --with-xterm-new or --without-xterm-new was given.
8857 if test "${with_xterm_new+set}" = set; then
8858   withval="$with_xterm_new"
8859   with_xterm_new=$withval
8860 else
8861   with_xterm_new=yes
8862 fi;
8863 case "$with_xterm_new" in
8864 (no) with_xterm_new=xterm-old;;
8865 (*)      with_xterm_new=xterm-new;;
8866 esac
8867 echo "$as_me:8867: result: $with_xterm_new" >&5
8868 echo "${ECHO_T}$with_xterm_new" >&6
8869 WHICH_XTERM=$with_xterm_new
8870
8871 echo "$as_me:8871: checking if xterm backspace sends BS or DEL" >&5
8872 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8873
8874 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8875 if test "${with_xterm_kbs+set}" = set; then
8876   withval="$with_xterm_kbs"
8877   with_xterm_kbs=$withval
8878 else
8879   with_xterm_kbs=BS
8880 fi;
8881 case x$with_xterm_kbs in
8882 (xyes|xno|xBS|xbs|x8)
8883         with_xterm_kbs=BS
8884         ;;
8885 (xDEL|xdel|x127)
8886         with_xterm_kbs=DEL
8887         ;;
8888 (*)
8889         with_xterm_kbs=$withval
8890         ;;
8891 esac
8892 echo "$as_me:8892: result: $with_xterm_kbs" >&5
8893 echo "${ECHO_T}$with_xterm_kbs" >&6
8894 XTERM_KBS=$with_xterm_kbs
8895
8896 MAKE_TERMINFO=
8897 if test "$use_database" = no ; then
8898         TERMINFO="${datadir}/terminfo"
8899         MAKE_TERMINFO="#"
8900 else
8901
8902 echo "$as_me:8902: checking for list of terminfo directories" >&5
8903 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8904
8905 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8906 if test "${with_terminfo_dirs+set}" = set; then
8907   withval="$with_terminfo_dirs"
8908
8909 else
8910   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8911 fi;
8912 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8913 cf_dst_path=
8914 for cf_src_path in $withval
8915 do
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 ".$cf_src_path" in
8924 (.\$\(*\)*|.\'*\'*)
8925         ;;
8926 (..|./*|.\\*)
8927         ;;
8928 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8929         ;;
8930 (.\$\{*prefix\}*|.\$\{*dir\}*)
8931         eval cf_src_path="$cf_src_path"
8932         case ".$cf_src_path" in
8933         (.NONE/*)
8934                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8935                 ;;
8936         esac
8937         ;;
8938 (.no|.NONE/*)
8939         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8940         ;;
8941 (*)
8942         { { echo "$as_me:8942: error: expected a pathname, not \"$cf_src_path\"" >&5
8943 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8944    { (exit 1); exit 1; }; }
8945         ;;
8946 esac
8947
8948   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8949   cf_dst_path="${cf_dst_path}${cf_src_path}"
8950 done
8951 IFS="$ac_save_ifs"
8952
8953 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8954 # so we have to check/work around.  We do prefer the result of "eval"...
8955 eval cf_dst_eval="$cf_dst_path"
8956 case "x$cf_dst_eval" in
8957 (xNONE*)
8958         TERMINFO_DIRS=$cf_dst_path
8959         ;;
8960 (*)
8961         TERMINFO_DIRS="$cf_dst_eval"
8962         ;;
8963 esac
8964
8965 echo "$as_me:8965: result: $TERMINFO_DIRS" >&5
8966 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8967 test -n "$TERMINFO_DIRS" &&
8968 cat >>confdefs.h <<EOF
8969 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8970 EOF
8971
8972 case "x$TERMINFO" in
8973 x???:*)
8974         { echo "$as_me:8974: WARNING: ignoring non-directory/file TERMINFO value" >&5
8975 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8976         unset TERMINFO
8977         ;;
8978 esac
8979
8980 echo "$as_me:8980: checking for default terminfo directory" >&5
8981 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8982
8983 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8984 if test "${with_default_terminfo_dir+set}" = set; then
8985   withval="$with_default_terminfo_dir"
8986
8987 else
8988   withval="${TERMINFO:-${datadir}/terminfo}"
8989 fi; if test -n "${datadir}/terminfo" ; then
8990
8991 if test "x$prefix" != xNONE; then
8992         cf_path_syntax="$prefix"
8993 else
8994         cf_path_syntax="$ac_default_prefix"
8995 fi
8996
8997 case ".$withval" in
8998 (.\$\(*\)*|.\'*\'*)
8999         ;;
9000 (..|./*|.\\*)
9001         ;;
9002 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9003         ;;
9004 (.\$\{*prefix\}*|.\$\{*dir\}*)
9005         eval withval="$withval"
9006         case ".$withval" in
9007         (.NONE/*)
9008                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9009                 ;;
9010         esac
9011         ;;
9012 (.no|.NONE/*)
9013         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9014         ;;
9015 (*)
9016         { { echo "$as_me:9016: error: expected a pathname, not \"$withval\"" >&5
9017 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9018    { (exit 1); exit 1; }; }
9019         ;;
9020 esac
9021
9022 fi
9023 eval TERMINFO="$withval"
9024
9025 echo "$as_me:9025: result: $TERMINFO" >&5
9026 echo "${ECHO_T}$TERMINFO" >&6
9027
9028 cat >>confdefs.h <<EOF
9029 #define TERMINFO "$TERMINFO"
9030 EOF
9031
9032 fi
9033
9034 ###     use option --disable-big-core to make tic run on small machines
9035 ###     We need 4Mb, check if we can allocate 50% more than that.
9036 echo "$as_me:9036: checking if big-core option selected" >&5
9037 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9038
9039 # Check whether --enable-big-core or --disable-big-core was given.
9040 if test "${enable_big_core+set}" = set; then
9041   enableval="$enable_big_core"
9042   with_big_core=$enableval
9043 else
9044   if test "$cross_compiling" = yes; then
9045   with_big_core=no
9046 else
9047   cat >"conftest.$ac_ext" <<_ACEOF
9048 #line 9048 "configure"
9049 #include "confdefs.h"
9050
9051 #include <stdlib.h>
9052 #include <string.h>
9053 int main() {
9054         unsigned long n = 6000000L;
9055         char *s = malloc(n);
9056         if (s != 0)
9057                 s[0] = s[n-1] = 0;
9058         ${cf_cv_main_return:-return}(s == 0);
9059 }
9060 _ACEOF
9061 rm -f "conftest$ac_exeext"
9062 if { (eval echo "$as_me:9062: \"$ac_link\"") >&5
9063   (eval $ac_link) 2>&5
9064   ac_status=$?
9065   echo "$as_me:9065: \$? = $ac_status" >&5
9066   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9067   { (eval echo "$as_me:9067: \"$ac_try\"") >&5
9068   (eval $ac_try) 2>&5
9069   ac_status=$?
9070   echo "$as_me:9070: \$? = $ac_status" >&5
9071   (exit "$ac_status"); }; }; then
9072   with_big_core=yes
9073 else
9074   echo "$as_me: program exited with status $ac_status" >&5
9075 echo "$as_me: failed program was:" >&5
9076 cat "conftest.$ac_ext" >&5
9077 with_big_core=no
9078 fi
9079 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9080 fi
9081 fi;
9082 echo "$as_me:9082: result: $with_big_core" >&5
9083 echo "${ECHO_T}$with_big_core" >&6
9084 test "x$with_big_core" = "xyes" &&
9085 cat >>confdefs.h <<\EOF
9086 #define HAVE_BIG_CORE 1
9087 EOF
9088
9089 ### ISO C only guarantees 512-char strings, we have tables which load faster
9090 ### when constructed using "big" strings.  More than the C compiler, the awk
9091 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9092 echo "$as_me:9092: checking if big-strings option selected" >&5
9093 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9094
9095 # Check whether --enable-big-strings or --disable-big-strings was given.
9096 if test "${enable_big_strings+set}" = set; then
9097   enableval="$enable_big_strings"
9098   with_big_strings=$enableval
9099 else
9100
9101         case x$AWK in
9102         (x)
9103                 eval with_big_strings=no
9104                 ;;
9105         (*)
9106                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9107                         | $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
9108                         eval with_big_strings=yes
9109                 else
9110                         eval with_big_strings=no
9111                 fi
9112                 ;;
9113         esac
9114
9115 fi;
9116 echo "$as_me:9116: result: $with_big_strings" >&5
9117 echo "${ECHO_T}$with_big_strings" >&6
9118
9119 USE_BIG_STRINGS=0
9120 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9121
9122 ###     use option --enable-termcap to compile in the termcap fallback support
9123 echo "$as_me:9123: checking if you want termcap-fallback support" >&5
9124 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9125
9126 # Check whether --enable-termcap or --disable-termcap was given.
9127 if test "${enable_termcap+set}" = set; then
9128   enableval="$enable_termcap"
9129   with_termcap=$enableval
9130 else
9131   with_termcap=no
9132 fi;
9133 echo "$as_me:9133: result: $with_termcap" >&5
9134 echo "${ECHO_T}$with_termcap" >&6
9135
9136 NCURSES_USE_TERMCAP=0
9137 if test "x$with_termcap" != "xyes" ; then
9138         if test "$use_database" = no ; then
9139                 if test -z "$with_fallback" ; then
9140                         { { echo "$as_me:9140: error: You have disabled the database w/o specifying fallbacks" >&5
9141 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9142    { (exit 1); exit 1; }; }
9143                 fi
9144         fi
9145
9146 cat >>confdefs.h <<\EOF
9147 #define PURE_TERMINFO 1
9148 EOF
9149
9150 else
9151
9152         if test "$with_ticlib" != no ; then
9153                 { { echo "$as_me:9153: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9154 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9155    { (exit 1); exit 1; }; }
9156         fi
9157
9158         NCURSES_USE_TERMCAP=1
9159         echo "$as_me:9159: checking for list of termcap files" >&5
9160 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9161
9162 # Check whether --with-termpath or --without-termpath was given.
9163 if test "${with_termpath+set}" = set; then
9164   withval="$with_termpath"
9165
9166 else
9167   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9168 fi;
9169 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9170 cf_dst_path=
9171 for cf_src_path in $withval
9172 do
9173
9174 if test "x$prefix" != xNONE; then
9175         cf_path_syntax="$prefix"
9176 else
9177         cf_path_syntax="$ac_default_prefix"
9178 fi
9179
9180 case ".$cf_src_path" in
9181 (.\$\(*\)*|.\'*\'*)
9182         ;;
9183 (..|./*|.\\*)
9184         ;;
9185 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9186         ;;
9187 (.\$\{*prefix\}*|.\$\{*dir\}*)
9188         eval cf_src_path="$cf_src_path"
9189         case ".$cf_src_path" in
9190         (.NONE/*)
9191                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9192                 ;;
9193         esac
9194         ;;
9195 (.no|.NONE/*)
9196         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9197         ;;
9198 (*)
9199         { { echo "$as_me:9199: error: expected a pathname, not \"$cf_src_path\"" >&5
9200 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9201    { (exit 1); exit 1; }; }
9202         ;;
9203 esac
9204
9205   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9206   cf_dst_path="${cf_dst_path}${cf_src_path}"
9207 done
9208 IFS="$ac_save_ifs"
9209
9210 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9211 # so we have to check/work around.  We do prefer the result of "eval"...
9212 eval cf_dst_eval="$cf_dst_path"
9213 case "x$cf_dst_eval" in
9214 (xNONE*)
9215         TERMPATH=$cf_dst_path
9216         ;;
9217 (*)
9218         TERMPATH="$cf_dst_eval"
9219         ;;
9220 esac
9221
9222         echo "$as_me:9222: result: $TERMPATH" >&5
9223 echo "${ECHO_T}$TERMPATH" >&6
9224         test -n "$TERMPATH" &&
9225 cat >>confdefs.h <<EOF
9226 #define TERMPATH "$TERMPATH"
9227 EOF
9228
9229         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9230         echo "$as_me:9230: checking if fast termcap-loader is needed" >&5
9231 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9232
9233 # Check whether --enable-getcap or --disable-getcap was given.
9234 if test "${enable_getcap+set}" = set; then
9235   enableval="$enable_getcap"
9236   with_getcap=$enableval
9237 else
9238   with_getcap=no
9239 fi;
9240         echo "$as_me:9240: result: $with_getcap" >&5
9241 echo "${ECHO_T}$with_getcap" >&6
9242         test "x$with_getcap" = "xyes" &&
9243 cat >>confdefs.h <<\EOF
9244 #define USE_GETCAP 1
9245 EOF
9246
9247         echo "$as_me:9247: checking if translated termcaps will be cached in ~/.terminfo" >&5
9248 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9249
9250 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9251 if test "${enable_getcap_cache+set}" = set; then
9252   enableval="$enable_getcap_cache"
9253   with_getcap_cache=$enableval
9254 else
9255   with_getcap_cache=no
9256 fi;
9257         echo "$as_me:9257: result: $with_getcap_cache" >&5
9258 echo "${ECHO_T}$with_getcap_cache" >&6
9259         test "x$with_getcap_cache" = "xyes" &&
9260 cat >>confdefs.h <<\EOF
9261 #define USE_GETCAP_CACHE 1
9262 EOF
9263
9264 fi
9265
9266 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9267 echo "$as_me:9267: checking if ~/.terminfo is wanted" >&5
9268 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9269
9270 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9271 if test "${enable_home_terminfo+set}" = set; then
9272   enableval="$enable_home_terminfo"
9273   with_home_terminfo=$enableval
9274 else
9275   with_home_terminfo=yes
9276 fi;
9277 echo "$as_me:9277: result: $with_home_terminfo" >&5
9278 echo "${ECHO_T}$with_home_terminfo" >&6
9279 test "x$with_home_terminfo" = "xyes" &&
9280 cat >>confdefs.h <<\EOF
9281 #define USE_HOME_TERMINFO 1
9282 EOF
9283
9284 echo "$as_me:9284: checking if you want to permit root to use ncurses environment variables" >&5
9285 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9286
9287 # Check whether --enable-root-environ or --disable-root-environ was given.
9288 if test "${enable_root_environ+set}" = set; then
9289   enableval="$enable_root_environ"
9290   with_root_environ=$enableval
9291 else
9292   with_root_environ=yes
9293 fi;
9294 echo "$as_me:9294: result: $with_root_environ" >&5
9295 echo "${ECHO_T}$with_root_environ" >&6
9296 test "x$with_root_environ" = xyes &&
9297 cat >>confdefs.h <<\EOF
9298 #define USE_ROOT_ENVIRON 1
9299 EOF
9300
9301 echo "$as_me:9301: checking if you want to permit setuid programs to access all files" >&5
9302 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9303
9304 # Check whether --enable-root-environ or --disable-root-environ was given.
9305 if test "${enable_root_environ+set}" = set; then
9306   enableval="$enable_root_environ"
9307   with_root_access=$enableval
9308 else
9309   with_root_access=yes
9310 fi;
9311 echo "$as_me:9311: result: $with_root_access" >&5
9312 echo "${ECHO_T}$with_root_access" >&6
9313 test "x$with_root_access" = xyes &&
9314 cat >>confdefs.h <<\EOF
9315 #define USE_ROOT_ACCESS 1
9316 EOF
9317
9318 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9319 ###   to reduce storage requirements for the terminfo database.
9320
9321 for ac_header in \
9322 unistd.h \
9323
9324 do
9325 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9326 echo "$as_me:9326: checking for $ac_header" >&5
9327 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9328 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9329   echo $ECHO_N "(cached) $ECHO_C" >&6
9330 else
9331   cat >"conftest.$ac_ext" <<_ACEOF
9332 #line 9332 "configure"
9333 #include "confdefs.h"
9334 #include <$ac_header>
9335 _ACEOF
9336 if { (eval echo "$as_me:9336: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9337   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9338   ac_status=$?
9339   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9340   rm -f conftest.er1
9341   cat conftest.err >&5
9342   echo "$as_me:9342: \$? = $ac_status" >&5
9343   (exit "$ac_status"); } >/dev/null; then
9344   if test -s conftest.err; then
9345     ac_cpp_err=$ac_c_preproc_warn_flag
9346   else
9347     ac_cpp_err=
9348   fi
9349 else
9350   ac_cpp_err=yes
9351 fi
9352 if test -z "$ac_cpp_err"; then
9353   eval "$as_ac_Header=yes"
9354 else
9355   echo "$as_me: failed program was:" >&5
9356   cat "conftest.$ac_ext" >&5
9357   eval "$as_ac_Header=no"
9358 fi
9359 rm -f conftest.err "conftest.$ac_ext"
9360 fi
9361 echo "$as_me:9361: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9362 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9363 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9364   cat >>confdefs.h <<EOF
9365 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9366 EOF
9367
9368 fi
9369 done
9370
9371 for ac_func in \
9372         remove \
9373         unlink
9374 do
9375 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9376 echo "$as_me:9376: checking for $ac_func" >&5
9377 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9378 if eval "test \"\${$as_ac_var+set}\" = set"; then
9379   echo $ECHO_N "(cached) $ECHO_C" >&6
9380 else
9381   cat >"conftest.$ac_ext" <<_ACEOF
9382 #line 9382 "configure"
9383 #include "confdefs.h"
9384 #define $ac_func autoconf_temporary
9385 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9386 #undef $ac_func
9387
9388 #ifdef __cplusplus
9389 extern "C"
9390 #endif
9391
9392 /* We use char because int might match the return type of a gcc2
9393    builtin and then its argument prototype would still apply.  */
9394 char $ac_func (void);
9395
9396 int
9397 main (void)
9398 {
9399
9400 /* The GNU C library defines stubs for functions which it implements
9401     to always fail with ENOSYS.  Some functions are actually named
9402     something starting with __ and the normal name is an alias.  */
9403 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9404 #error found stub for $ac_func
9405 #endif
9406
9407         return $ac_func ();
9408   ;
9409   return 0;
9410 }
9411 _ACEOF
9412 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9413 if { (eval echo "$as_me:9413: \"$ac_link\"") >&5
9414   (eval $ac_link) 2>&5
9415   ac_status=$?
9416   echo "$as_me:9416: \$? = $ac_status" >&5
9417   (exit "$ac_status"); } &&
9418          { ac_try='test -s "conftest$ac_exeext"'
9419   { (eval echo "$as_me:9419: \"$ac_try\"") >&5
9420   (eval $ac_try) 2>&5
9421   ac_status=$?
9422   echo "$as_me:9422: \$? = $ac_status" >&5
9423   (exit "$ac_status"); }; }; then
9424   eval "$as_ac_var=yes"
9425 else
9426   echo "$as_me: failed program was:" >&5
9427 cat "conftest.$ac_ext" >&5
9428 eval "$as_ac_var=no"
9429 fi
9430 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9431 fi
9432 echo "$as_me:9432: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9433 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9434 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9435   cat >>confdefs.h <<EOF
9436 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9437 EOF
9438
9439 fi
9440 done
9441
9442 if test "$cross_compiling" = yes ; then
9443
9444 for ac_func in \
9445                 link \
9446                 symlink
9447 do
9448 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9449 echo "$as_me:9449: checking for $ac_func" >&5
9450 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9451 if eval "test \"\${$as_ac_var+set}\" = set"; then
9452   echo $ECHO_N "(cached) $ECHO_C" >&6
9453 else
9454   cat >"conftest.$ac_ext" <<_ACEOF
9455 #line 9455 "configure"
9456 #include "confdefs.h"
9457 #define $ac_func autoconf_temporary
9458 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9459 #undef $ac_func
9460
9461 #ifdef __cplusplus
9462 extern "C"
9463 #endif
9464
9465 /* We use char because int might match the return type of a gcc2
9466    builtin and then its argument prototype would still apply.  */
9467 char $ac_func (void);
9468
9469 int
9470 main (void)
9471 {
9472
9473 /* The GNU C library defines stubs for functions which it implements
9474     to always fail with ENOSYS.  Some functions are actually named
9475     something starting with __ and the normal name is an alias.  */
9476 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9477 #error found stub for $ac_func
9478 #endif
9479
9480         return $ac_func ();
9481   ;
9482   return 0;
9483 }
9484 _ACEOF
9485 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9486 if { (eval echo "$as_me:9486: \"$ac_link\"") >&5
9487   (eval $ac_link) 2>&5
9488   ac_status=$?
9489   echo "$as_me:9489: \$? = $ac_status" >&5
9490   (exit "$ac_status"); } &&
9491          { ac_try='test -s "conftest$ac_exeext"'
9492   { (eval echo "$as_me:9492: \"$ac_try\"") >&5
9493   (eval $ac_try) 2>&5
9494   ac_status=$?
9495   echo "$as_me:9495: \$? = $ac_status" >&5
9496   (exit "$ac_status"); }; }; then
9497   eval "$as_ac_var=yes"
9498 else
9499   echo "$as_me: failed program was:" >&5
9500 cat "conftest.$ac_ext" >&5
9501 eval "$as_ac_var=no"
9502 fi
9503 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9504 fi
9505 echo "$as_me:9505: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9506 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9507 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9508   cat >>confdefs.h <<EOF
9509 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9510 EOF
9511
9512 fi
9513 done
9514
9515 else
9516         echo "$as_me:9516: checking if link/symlink functions work" >&5
9517 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9518 if test "${cf_cv_link_funcs+set}" = set; then
9519   echo $ECHO_N "(cached) $ECHO_C" >&6
9520 else
9521
9522                 cf_cv_link_funcs=
9523                 for cf_func in link symlink ; do
9524                         if test "$cross_compiling" = yes; then
9525
9526                         eval 'ac_cv_func_'$cf_func'=error'
9527 else
9528   cat >"conftest.$ac_ext" <<_ACEOF
9529 #line 9529 "configure"
9530 #include "confdefs.h"
9531
9532 #include <stdio.h>
9533 #include <sys/types.h>
9534 #include <sys/stat.h>
9535 #ifdef HAVE_UNISTD_H
9536 #include <unistd.h>
9537 #endif
9538 int main(void)
9539 {
9540         int fail = 0;
9541         char *src = "conftest.tmp";
9542         char *dst = "conftest.chk";
9543         struct stat src_sb, dst_sb;
9544         FILE *fp = fopen(src, "w");
9545         if (fp == 0) { fail = 3; } else {
9546                 fclose(fp); stat(src, &src_sb);
9547                 if ($cf_func(src, dst) < 0) {
9548                         fail = 1;
9549                 } else if (stat(dst, &dst_sb) < 0) {
9550                         fail = 2;
9551                 } else {
9552                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9553                         if (diff < 0) diff = -diff;
9554                         if (diff > 2) fail = 3;
9555                 }
9556         }
9557 #ifdef HAVE_UNLINK
9558         unlink(dst); unlink(src);
9559 #else
9560         remove(dst); remove(src);
9561 #endif
9562         ${cf_cv_main_return:-return} (fail);
9563 }
9564
9565 _ACEOF
9566 rm -f "conftest$ac_exeext"
9567 if { (eval echo "$as_me:9567: \"$ac_link\"") >&5
9568   (eval $ac_link) 2>&5
9569   ac_status=$?
9570   echo "$as_me:9570: \$? = $ac_status" >&5
9571   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9572   { (eval echo "$as_me:9572: \"$ac_try\"") >&5
9573   (eval $ac_try) 2>&5
9574   ac_status=$?
9575   echo "$as_me:9575: \$? = $ac_status" >&5
9576   (exit "$ac_status"); }; }; then
9577
9578                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9579                         eval 'ac_cv_func_'$cf_func'=yes'
9580 else
9581   echo "$as_me: program exited with status $ac_status" >&5
9582 echo "$as_me: failed program was:" >&5
9583 cat "conftest.$ac_ext" >&5
9584
9585                         eval 'ac_cv_func_'$cf_func'=no'
9586 fi
9587 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9588 fi
9589                 done
9590                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9591
9592 fi
9593 echo "$as_me:9593: result: $cf_cv_link_funcs" >&5
9594 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9595         test "$ac_cv_func_link"    = yes &&
9596 cat >>confdefs.h <<\EOF
9597 #define HAVE_LINK 1
9598 EOF
9599
9600         test "$ac_cv_func_symlink" = yes &&
9601 cat >>confdefs.h <<\EOF
9602 #define HAVE_SYMLINK 1
9603 EOF
9604
9605 fi
9606
9607 with_links=no
9608 with_symlinks=no
9609
9610 # soft links (symbolic links) are useful for some systems where hard links do
9611 # not work, or to make it simpler to copy terminfo trees around.
9612 if test "x$ac_cv_func_symlink" = xyes ; then
9613         echo "$as_me:9613: checking if tic should use symbolic links" >&5
9614 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9615
9616 # Check whether --enable-symlinks or --disable-symlinks was given.
9617 if test "${enable_symlinks+set}" = set; then
9618   enableval="$enable_symlinks"
9619   with_symlinks=$enableval
9620 else
9621   with_symlinks=no
9622 fi;
9623         echo "$as_me:9623: result: $with_symlinks" >&5
9624 echo "${ECHO_T}$with_symlinks" >&6
9625 fi
9626
9627 # If we have hard links and did not choose to use soft links instead, there is
9628 # no reason to make this choice optional - use the hard links.
9629 if test "$with_symlinks" = no ; then
9630         echo "$as_me:9630: checking if tic should use hard links" >&5
9631 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9632         if test "x$ac_cv_func_link" = xyes ; then
9633                 with_links=yes
9634         else
9635                 with_links=no
9636         fi
9637         echo "$as_me:9637: result: $with_links" >&5
9638 echo "${ECHO_T}$with_links" >&6
9639 fi
9640
9641 test "x$with_links" = xyes &&
9642 cat >>confdefs.h <<\EOF
9643 #define USE_LINKS 1
9644 EOF
9645
9646 test "x$with_symlinks" = xyes &&
9647 cat >>confdefs.h <<\EOF
9648 #define USE_SYMLINKS 1
9649 EOF
9650
9651 ###   use option --enable-broken-linker to force on use of broken-linker support
9652
9653 echo "$as_me:9653: checking if you want broken-linker support code" >&5
9654 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9655
9656 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9657 if test "${enable_broken_linker+set}" = set; then
9658   enableval="$enable_broken_linker"
9659   with_broken_linker=$enableval
9660 else
9661   with_broken_linker=no
9662 fi;
9663 echo "$as_me:9663: result: $with_broken_linker" >&5
9664 echo "${ECHO_T}$with_broken_linker" >&6
9665
9666 : "${BROKEN_LINKER:=0}"
9667 if test "x$with_broken_linker" = xyes ; then
9668
9669 cat >>confdefs.h <<\EOF
9670 #define BROKEN_LINKER 1
9671 EOF
9672
9673         BROKEN_LINKER=1
9674 fi
9675
9676 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9677 echo "$as_me:9677: checking if tputs should process BSD-style prefix padding" >&5
9678 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9679
9680 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9681 if test "${enable_bsdpad+set}" = set; then
9682   enableval="$enable_bsdpad"
9683   with_bsdpad=$enableval
9684 else
9685   with_bsdpad=no
9686 fi;
9687 echo "$as_me:9687: result: $with_bsdpad" >&5
9688 echo "${ECHO_T}$with_bsdpad" >&6
9689 test "x$with_bsdpad" = xyes &&
9690 cat >>confdefs.h <<\EOF
9691 #define BSD_TPUTS 1
9692 EOF
9693
9694 ###   use option --enable-widec to turn on use of wide-character support
9695 NCURSES_CH_T=chtype
9696 NCURSES_LIBUTF8=0
9697
9698 NEED_WCHAR_H=0
9699 NCURSES_MBSTATE_T=0
9700 NCURSES_WCHAR_T=0
9701 NCURSES_WINT_T=0
9702
9703 # Check to define _XOPEN_SOURCE "automatically"
9704 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9705
9706 echo "$as_me:9706: checking if the POSIX test-macros are already defined" >&5
9707 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9708 if test "${cf_cv_posix_visible+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 <stdio.h>
9716 int
9717 main (void)
9718 {
9719
9720 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9721         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9722         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9723         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9724 #error conflicting symbols found
9725 #endif
9726
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_posix_visible=no
9744 else
9745   echo "$as_me: failed program was:" >&5
9746 cat "conftest.$ac_ext" >&5
9747 cf_cv_posix_visible=yes
9748 fi
9749 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9750
9751 fi
9752 echo "$as_me:9752: result: $cf_cv_posix_visible" >&5
9753 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9754
9755 if test "$cf_cv_posix_visible" = no; then
9756
9757 cf_XOPEN_SOURCE=600
9758 cf_POSIX_C_SOURCE=199506L
9759 cf_xopen_source=
9760
9761 case "$host_os" in
9762 (aix[4-7]*)
9763         cf_xopen_source="-D_ALL_SOURCE"
9764         ;;
9765 (msys)
9766         cf_XOPEN_SOURCE=600
9767         ;;
9768 (darwin[0-8].*)
9769         cf_xopen_source="-D_APPLE_C_SOURCE"
9770         ;;
9771 (darwin*)
9772         cf_xopen_source="-D_DARWIN_C_SOURCE"
9773         cf_XOPEN_SOURCE=
9774         ;;
9775 (freebsd*|dragonfly*|midnightbsd*)
9776         # 5.x headers associate
9777         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9778         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9779         cf_POSIX_C_SOURCE=200112L
9780         cf_XOPEN_SOURCE=600
9781         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9782         ;;
9783 (hpux11*)
9784         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9785         ;;
9786 (hpux*)
9787         cf_xopen_source="-D_HPUX_SOURCE"
9788         ;;
9789 (irix[56].*)
9790         cf_xopen_source="-D_SGI_SOURCE"
9791         cf_XOPEN_SOURCE=
9792         ;;
9793 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9794
9795 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9796
9797 echo "$as_me:9797: checking if this is the GNU C library" >&5
9798 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9799 if test "${cf_cv_gnu_library+set}" = set; then
9800   echo $ECHO_N "(cached) $ECHO_C" >&6
9801 else
9802
9803 cat >"conftest.$ac_ext" <<_ACEOF
9804 #line 9804 "configure"
9805 #include "confdefs.h"
9806 #include <sys/types.h>
9807 int
9808 main (void)
9809 {
9810
9811         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9812                 return 0;
9813         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9814                 return 0;
9815         #else
9816         #       error not GNU C library
9817         #endif
9818   ;
9819   return 0;
9820 }
9821 _ACEOF
9822 rm -f "conftest.$ac_objext"
9823 if { (eval echo "$as_me:9823: \"$ac_compile\"") >&5
9824   (eval $ac_compile) 2>&5
9825   ac_status=$?
9826   echo "$as_me:9826: \$? = $ac_status" >&5
9827   (exit "$ac_status"); } &&
9828          { ac_try='test -s "conftest.$ac_objext"'
9829   { (eval echo "$as_me:9829: \"$ac_try\"") >&5
9830   (eval $ac_try) 2>&5
9831   ac_status=$?
9832   echo "$as_me:9832: \$? = $ac_status" >&5
9833   (exit "$ac_status"); }; }; then
9834   cf_cv_gnu_library=yes
9835 else
9836   echo "$as_me: failed program was:" >&5
9837 cat "conftest.$ac_ext" >&5
9838 cf_cv_gnu_library=no
9839 fi
9840 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9841
9842 fi
9843 echo "$as_me:9843: result: $cf_cv_gnu_library" >&5
9844 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9845
9846 if test x$cf_cv_gnu_library = xyes; then
9847
9848         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9849         # was changed to help a little.  newlib incorporated the change about 4
9850         # years later.
9851         echo "$as_me:9851: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9852 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9853 if test "${cf_cv_gnu_library_219+set}" = set; then
9854   echo $ECHO_N "(cached) $ECHO_C" >&6
9855 else
9856
9857                 cf_save="$CPPFLAGS"
9858
9859         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9860         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9861
9862                 cat >"conftest.$ac_ext" <<_ACEOF
9863 #line 9863 "configure"
9864 #include "confdefs.h"
9865 #include <sys/types.h>
9866 int
9867 main (void)
9868 {
9869
9870                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9871                                 return 0;
9872                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9873                                 return 0;
9874                         #else
9875                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9876                         #endif
9877   ;
9878   return 0;
9879 }
9880 _ACEOF
9881 rm -f "conftest.$ac_objext"
9882 if { (eval echo "$as_me:9882: \"$ac_compile\"") >&5
9883   (eval $ac_compile) 2>&5
9884   ac_status=$?
9885   echo "$as_me:9885: \$? = $ac_status" >&5
9886   (exit "$ac_status"); } &&
9887          { ac_try='test -s "conftest.$ac_objext"'
9888   { (eval echo "$as_me:9888: \"$ac_try\"") >&5
9889   (eval $ac_try) 2>&5
9890   ac_status=$?
9891   echo "$as_me:9891: \$? = $ac_status" >&5
9892   (exit "$ac_status"); }; }; then
9893   cf_cv_gnu_library_219=yes
9894 else
9895   echo "$as_me: failed program was:" >&5
9896 cat "conftest.$ac_ext" >&5
9897 cf_cv_gnu_library_219=no
9898 fi
9899 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9900                 CPPFLAGS="$cf_save"
9901
9902 fi
9903 echo "$as_me:9903: result: $cf_cv_gnu_library_219" >&5
9904 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9905
9906         if test "x$cf_cv_gnu_library_219" = xyes; then
9907                 cf_save="$CPPFLAGS"
9908                 echo "$as_me:9908: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9909 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9910 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9911   echo $ECHO_N "(cached) $ECHO_C" >&6
9912 else
9913
9914 cf_fix_cppflags=no
9915 cf_new_cflags=
9916 cf_new_cppflags=
9917 cf_new_extra_cppflags=
9918
9919 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9920 do
9921 case "$cf_fix_cppflags" in
9922 (no)
9923         case "$cf_add_cflags" in
9924         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9925                 case "$cf_add_cflags" in
9926                 (-D*)
9927                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9928
9929                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9930                                 && test -z "${cf_tst_cflags}" \
9931                                 && cf_fix_cppflags=yes
9932
9933                         if test "$cf_fix_cppflags" = yes ; then
9934
9935         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9936         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9937
9938                                 continue
9939                         elif test "${cf_tst_cflags}" = "\"'" ; then
9940
9941         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9942         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9943
9944                                 continue
9945                         fi
9946                         ;;
9947                 esac
9948                 case "$CPPFLAGS" in
9949                 (*$cf_add_cflags)
9950                         ;;
9951                 (*)
9952                         case "$cf_add_cflags" in
9953                         (-D*)
9954                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9955
9956 CPPFLAGS=`echo "$CPPFLAGS" | \
9957         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9958                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9959
9960                                 ;;
9961                         esac
9962
9963         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9964         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9965
9966                         ;;
9967                 esac
9968                 ;;
9969         (*)
9970
9971         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9972         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9973
9974                 ;;
9975         esac
9976         ;;
9977 (yes)
9978
9979         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9980         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9981
9982         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9983
9984         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9985                 && test -z "${cf_tst_cflags}" \
9986                 && cf_fix_cppflags=no
9987         ;;
9988 esac
9989 done
9990
9991 if test -n "$cf_new_cflags" ; then
9992
9993         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9994         CFLAGS="${CFLAGS}$cf_new_cflags"
9995
9996 fi
9997
9998 if test -n "$cf_new_cppflags" ; then
9999
10000         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10001         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10002
10003 fi
10004
10005 if test -n "$cf_new_extra_cppflags" ; then
10006
10007         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10008         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10009
10010 fi
10011
10012                         cat >"conftest.$ac_ext" <<_ACEOF
10013 #line 10013 "configure"
10014 #include "confdefs.h"
10015
10016                                 #include <limits.h>
10017                                 #include <sys/types.h>
10018
10019 int
10020 main (void)
10021 {
10022
10023                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10024                                         return 0;
10025                                 #else
10026                                 #       error GNU C library is too old
10027                                 #endif
10028   ;
10029   return 0;
10030 }
10031 _ACEOF
10032 rm -f "conftest.$ac_objext"
10033 if { (eval echo "$as_me:10033: \"$ac_compile\"") >&5
10034   (eval $ac_compile) 2>&5
10035   ac_status=$?
10036   echo "$as_me:10036: \$? = $ac_status" >&5
10037   (exit "$ac_status"); } &&
10038          { ac_try='test -s "conftest.$ac_objext"'
10039   { (eval echo "$as_me:10039: \"$ac_try\"") >&5
10040   (eval $ac_try) 2>&5
10041   ac_status=$?
10042   echo "$as_me:10042: \$? = $ac_status" >&5
10043   (exit "$ac_status"); }; }; then
10044   cf_cv_gnu_dftsrc_219=yes
10045 else
10046   echo "$as_me: failed program was:" >&5
10047 cat "conftest.$ac_ext" >&5
10048 cf_cv_gnu_dftsrc_219=no
10049 fi
10050 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10051
10052 fi
10053 echo "$as_me:10053: result: $cf_cv_gnu_dftsrc_219" >&5
10054 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10055                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10056         else
10057                 cf_cv_gnu_dftsrc_219=maybe
10058         fi
10059
10060         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10061
10062                 echo "$as_me:10062: checking if we must define _GNU_SOURCE" >&5
10063 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10064 if test "${cf_cv_gnu_source+set}" = set; then
10065   echo $ECHO_N "(cached) $ECHO_C" >&6
10066 else
10067
10068                 cat >"conftest.$ac_ext" <<_ACEOF
10069 #line 10069 "configure"
10070 #include "confdefs.h"
10071 #include <sys/types.h>
10072 int
10073 main (void)
10074 {
10075
10076                         #ifndef _XOPEN_SOURCE
10077                         #error  expected _XOPEN_SOURCE to be defined
10078                         #endif
10079   ;
10080   return 0;
10081 }
10082 _ACEOF
10083 rm -f "conftest.$ac_objext"
10084 if { (eval echo "$as_me:10084: \"$ac_compile\"") >&5
10085   (eval $ac_compile) 2>&5
10086   ac_status=$?
10087   echo "$as_me:10087: \$? = $ac_status" >&5
10088   (exit "$ac_status"); } &&
10089          { ac_try='test -s "conftest.$ac_objext"'
10090   { (eval echo "$as_me:10090: \"$ac_try\"") >&5
10091   (eval $ac_try) 2>&5
10092   ac_status=$?
10093   echo "$as_me:10093: \$? = $ac_status" >&5
10094   (exit "$ac_status"); }; }; then
10095   cf_cv_gnu_source=no
10096 else
10097   echo "$as_me: failed program was:" >&5
10098 cat "conftest.$ac_ext" >&5
10099 cf_save="$CPPFLAGS"
10100
10101 cf_fix_cppflags=no
10102 cf_new_cflags=
10103 cf_new_cppflags=
10104 cf_new_extra_cppflags=
10105
10106 for cf_add_cflags in -D_GNU_SOURCE
10107 do
10108 case "$cf_fix_cppflags" in
10109 (no)
10110         case "$cf_add_cflags" in
10111         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10112                 case "$cf_add_cflags" in
10113                 (-D*)
10114                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10115
10116                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10117                                 && test -z "${cf_tst_cflags}" \
10118                                 && cf_fix_cppflags=yes
10119
10120                         if test "$cf_fix_cppflags" = yes ; then
10121
10122         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10123         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10124
10125                                 continue
10126                         elif test "${cf_tst_cflags}" = "\"'" ; then
10127
10128         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10129         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10130
10131                                 continue
10132                         fi
10133                         ;;
10134                 esac
10135                 case "$CPPFLAGS" in
10136                 (*$cf_add_cflags)
10137                         ;;
10138                 (*)
10139                         case "$cf_add_cflags" in
10140                         (-D*)
10141                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10142
10143 CPPFLAGS=`echo "$CPPFLAGS" | \
10144         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10145                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10146
10147                                 ;;
10148                         esac
10149
10150         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10151         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10152
10153                         ;;
10154                 esac
10155                 ;;
10156         (*)
10157
10158         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10159         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10160
10161                 ;;
10162         esac
10163         ;;
10164 (yes)
10165
10166         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10167         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10168
10169         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10170
10171         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10172                 && test -z "${cf_tst_cflags}" \
10173                 && cf_fix_cppflags=no
10174         ;;
10175 esac
10176 done
10177
10178 if test -n "$cf_new_cflags" ; then
10179
10180         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10181         CFLAGS="${CFLAGS}$cf_new_cflags"
10182
10183 fi
10184
10185 if test -n "$cf_new_cppflags" ; then
10186
10187         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10188         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10189
10190 fi
10191
10192 if test -n "$cf_new_extra_cppflags" ; then
10193
10194         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10195         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10196
10197 fi
10198
10199                          cat >"conftest.$ac_ext" <<_ACEOF
10200 #line 10200 "configure"
10201 #include "confdefs.h"
10202 #include <sys/types.h>
10203 int
10204 main (void)
10205 {
10206
10207                                 #ifdef _XOPEN_SOURCE
10208                                 #error  expected _XOPEN_SOURCE to be undefined
10209                                 #endif
10210   ;
10211   return 0;
10212 }
10213 _ACEOF
10214 rm -f "conftest.$ac_objext"
10215 if { (eval echo "$as_me:10215: \"$ac_compile\"") >&5
10216   (eval $ac_compile) 2>&5
10217   ac_status=$?
10218   echo "$as_me:10218: \$? = $ac_status" >&5
10219   (exit "$ac_status"); } &&
10220          { ac_try='test -s "conftest.$ac_objext"'
10221   { (eval echo "$as_me:10221: \"$ac_try\"") >&5
10222   (eval $ac_try) 2>&5
10223   ac_status=$?
10224   echo "$as_me:10224: \$? = $ac_status" >&5
10225   (exit "$ac_status"); }; }; then
10226   cf_cv_gnu_source=no
10227 else
10228   echo "$as_me: failed program was:" >&5
10229 cat "conftest.$ac_ext" >&5
10230 cf_cv_gnu_source=yes
10231 fi
10232 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10233                         CPPFLAGS="$cf_save"
10234
10235 fi
10236 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10237
10238 fi
10239 echo "$as_me:10239: result: $cf_cv_gnu_source" >&5
10240 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10241
10242                 if test "$cf_cv_gnu_source" = yes
10243                 then
10244                 echo "$as_me:10244: checking if we should also define _DEFAULT_SOURCE" >&5
10245 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10246 if test "${cf_cv_default_source+set}" = set; then
10247   echo $ECHO_N "(cached) $ECHO_C" >&6
10248 else
10249
10250         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10251         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10252
10253                         cat >"conftest.$ac_ext" <<_ACEOF
10254 #line 10254 "configure"
10255 #include "confdefs.h"
10256 #include <sys/types.h>
10257 int
10258 main (void)
10259 {
10260
10261                                 #ifdef _DEFAULT_SOURCE
10262                                 #error  expected _DEFAULT_SOURCE to be undefined
10263                                 #endif
10264   ;
10265   return 0;
10266 }
10267 _ACEOF
10268 rm -f "conftest.$ac_objext"
10269 if { (eval echo "$as_me:10269: \"$ac_compile\"") >&5
10270   (eval $ac_compile) 2>&5
10271   ac_status=$?
10272   echo "$as_me:10272: \$? = $ac_status" >&5
10273   (exit "$ac_status"); } &&
10274          { ac_try='test -s "conftest.$ac_objext"'
10275   { (eval echo "$as_me:10275: \"$ac_try\"") >&5
10276   (eval $ac_try) 2>&5
10277   ac_status=$?
10278   echo "$as_me:10278: \$? = $ac_status" >&5
10279   (exit "$ac_status"); }; }; then
10280   cf_cv_default_source=no
10281 else
10282   echo "$as_me: failed program was:" >&5
10283 cat "conftest.$ac_ext" >&5
10284 cf_cv_default_source=yes
10285 fi
10286 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10287
10288 fi
10289 echo "$as_me:10289: result: $cf_cv_default_source" >&5
10290 echo "${ECHO_T}$cf_cv_default_source" >&6
10291                         if test "$cf_cv_default_source" = yes
10292                         then
10293
10294         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10295         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10296
10297                         fi
10298                 fi
10299         fi
10300
10301 fi
10302
10303         ;;
10304 (minix*)
10305         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10306         ;;
10307 (mirbsd*)
10308         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10309         cf_XOPEN_SOURCE=
10310
10311 if test "$cf_cv_posix_visible" = no; then
10312
10313 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10314
10315 cf_save_CFLAGS="$CFLAGS"
10316 cf_save_CPPFLAGS="$CPPFLAGS"
10317
10318 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10319         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10320                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10321
10322 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10323         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10324                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10325
10326 echo "$as_me:10326: checking if we should define _POSIX_C_SOURCE" >&5
10327 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10328 if test "${cf_cv_posix_c_source+set}" = set; then
10329   echo $ECHO_N "(cached) $ECHO_C" >&6
10330 else
10331
10332 echo "${as_me:-configure}:10332: testing if the symbol is already defined go no further ..." 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   cf_cv_posix_c_source=no
10362 else
10363   echo "$as_me: failed program was:" >&5
10364 cat "conftest.$ac_ext" >&5
10365 cf_want_posix_source=no
10366          case .$cf_POSIX_C_SOURCE in
10367          (.[12]??*)
10368                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10369                 ;;
10370          (.2)
10371                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10372                 cf_want_posix_source=yes
10373                 ;;
10374          (.*)
10375                 cf_want_posix_source=yes
10376                 ;;
10377          esac
10378          if test "$cf_want_posix_source" = yes ; then
10379                 cat >"conftest.$ac_ext" <<_ACEOF
10380 #line 10380 "configure"
10381 #include "confdefs.h"
10382 #include <sys/types.h>
10383 int
10384 main (void)
10385 {
10386
10387 #ifdef _POSIX_SOURCE
10388 make an error
10389 #endif
10390   ;
10391   return 0;
10392 }
10393 _ACEOF
10394 rm -f "conftest.$ac_objext"
10395 if { (eval echo "$as_me:10395: \"$ac_compile\"") >&5
10396   (eval $ac_compile) 2>&5
10397   ac_status=$?
10398   echo "$as_me:10398: \$? = $ac_status" >&5
10399   (exit "$ac_status"); } &&
10400          { ac_try='test -s "conftest.$ac_objext"'
10401   { (eval echo "$as_me:10401: \"$ac_try\"") >&5
10402   (eval $ac_try) 2>&5
10403   ac_status=$?
10404   echo "$as_me:10404: \$? = $ac_status" >&5
10405   (exit "$ac_status"); }; }; then
10406   :
10407 else
10408   echo "$as_me: failed program was:" >&5
10409 cat "conftest.$ac_ext" >&5
10410 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10411 fi
10412 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10413          fi
10414
10415 echo "${as_me:-configure}:10415: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10416
10417          CFLAGS="$cf_trim_CFLAGS"
10418          CPPFLAGS="$cf_trim_CPPFLAGS"
10419
10420         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10421         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10422
10423 echo "${as_me:-configure}:10423: testing if the second compile does not leave our definition intact error ..." 1>&5
10424
10425          cat >"conftest.$ac_ext" <<_ACEOF
10426 #line 10426 "configure"
10427 #include "confdefs.h"
10428 #include <sys/types.h>
10429 int
10430 main (void)
10431 {
10432
10433 #ifndef _POSIX_C_SOURCE
10434 make an error
10435 #endif
10436   ;
10437   return 0;
10438 }
10439 _ACEOF
10440 rm -f "conftest.$ac_objext"
10441 if { (eval echo "$as_me:10441: \"$ac_compile\"") >&5
10442   (eval $ac_compile) 2>&5
10443   ac_status=$?
10444   echo "$as_me:10444: \$? = $ac_status" >&5
10445   (exit "$ac_status"); } &&
10446          { ac_try='test -s "conftest.$ac_objext"'
10447   { (eval echo "$as_me:10447: \"$ac_try\"") >&5
10448   (eval $ac_try) 2>&5
10449   ac_status=$?
10450   echo "$as_me:10450: \$? = $ac_status" >&5
10451   (exit "$ac_status"); }; }; then
10452   :
10453 else
10454   echo "$as_me: failed program was:" >&5
10455 cat "conftest.$ac_ext" >&5
10456 cf_cv_posix_c_source=no
10457 fi
10458 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10459          CFLAGS="$cf_save_CFLAGS"
10460          CPPFLAGS="$cf_save_CPPFLAGS"
10461
10462 fi
10463 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10464
10465 fi
10466 echo "$as_me:10466: result: $cf_cv_posix_c_source" >&5
10467 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10468
10469 if test "$cf_cv_posix_c_source" != no ; then
10470         CFLAGS="$cf_trim_CFLAGS"
10471         CPPFLAGS="$cf_trim_CPPFLAGS"
10472
10473 cf_fix_cppflags=no
10474 cf_new_cflags=
10475 cf_new_cppflags=
10476 cf_new_extra_cppflags=
10477
10478 for cf_add_cflags in $cf_cv_posix_c_source
10479 do
10480 case "$cf_fix_cppflags" in
10481 (no)
10482         case "$cf_add_cflags" in
10483         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10484                 case "$cf_add_cflags" in
10485                 (-D*)
10486                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10487
10488                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10489                                 && test -z "${cf_tst_cflags}" \
10490                                 && cf_fix_cppflags=yes
10491
10492                         if test "$cf_fix_cppflags" = yes ; then
10493
10494         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10495         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10496
10497                                 continue
10498                         elif test "${cf_tst_cflags}" = "\"'" ; then
10499
10500         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10501         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10502
10503                                 continue
10504                         fi
10505                         ;;
10506                 esac
10507                 case "$CPPFLAGS" in
10508                 (*$cf_add_cflags)
10509                         ;;
10510                 (*)
10511                         case "$cf_add_cflags" in
10512                         (-D*)
10513                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10514
10515 CPPFLAGS=`echo "$CPPFLAGS" | \
10516         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10517                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10518
10519                                 ;;
10520                         esac
10521
10522         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10523         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10524
10525                         ;;
10526                 esac
10527                 ;;
10528         (*)
10529
10530         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10531         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10532
10533                 ;;
10534         esac
10535         ;;
10536 (yes)
10537
10538         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10539         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10540
10541         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10542
10543         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10544                 && test -z "${cf_tst_cflags}" \
10545                 && cf_fix_cppflags=no
10546         ;;
10547 esac
10548 done
10549
10550 if test -n "$cf_new_cflags" ; then
10551
10552         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10553         CFLAGS="${CFLAGS}$cf_new_cflags"
10554
10555 fi
10556
10557 if test -n "$cf_new_cppflags" ; then
10558
10559         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10560         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10561
10562 fi
10563
10564 if test -n "$cf_new_extra_cppflags" ; then
10565
10566         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10567         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10568
10569 fi
10570
10571 fi
10572
10573 fi # cf_cv_posix_visible
10574
10575         ;;
10576 (netbsd*)
10577         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10578         ;;
10579 (openbsd[6-9]*)
10580         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10581         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10582         # Abusing the conformance level is a workaround.
10583         { echo "$as_me:10583: WARNING: this system does not provide usable locale support" >&5
10584 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10585         cf_xopen_source="-D_BSD_SOURCE"
10586         cf_XOPEN_SOURCE=700
10587         ;;
10588 (openbsd[4-5]*)
10589         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10590         cf_xopen_source="-D_BSD_SOURCE"
10591         cf_XOPEN_SOURCE=600
10592         ;;
10593 (openbsd*)
10594         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10595         ;;
10596 (osf[45]*)
10597         cf_xopen_source="-D_OSF_SOURCE"
10598         ;;
10599 (nto-qnx*)
10600         cf_xopen_source="-D_QNX_SOURCE"
10601         ;;
10602 (sco*)
10603         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10604         ;;
10605 (solaris2.*)
10606         cf_xopen_source="-D__EXTENSIONS__"
10607         cf_cv_xopen_source=broken
10608         ;;
10609 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10610         cf_XOPEN_SOURCE=
10611         cf_POSIX_C_SOURCE=
10612         ;;
10613 (*)
10614
10615 echo "$as_me:10615: checking if we should define _XOPEN_SOURCE" >&5
10616 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10617 if test "${cf_cv_xopen_source+set}" = set; then
10618   echo $ECHO_N "(cached) $ECHO_C" >&6
10619 else
10620
10621         cat >"conftest.$ac_ext" <<_ACEOF
10622 #line 10622 "configure"
10623 #include "confdefs.h"
10624
10625 #include <stdlib.h>
10626 #include <string.h>
10627 #include <sys/types.h>
10628
10629 int
10630 main (void)
10631 {
10632
10633 #ifndef _XOPEN_SOURCE
10634 make an error
10635 #endif
10636   ;
10637   return 0;
10638 }
10639 _ACEOF
10640 rm -f "conftest.$ac_objext"
10641 if { (eval echo "$as_me:10641: \"$ac_compile\"") >&5
10642   (eval $ac_compile) 2>&5
10643   ac_status=$?
10644   echo "$as_me:10644: \$? = $ac_status" >&5
10645   (exit "$ac_status"); } &&
10646          { ac_try='test -s "conftest.$ac_objext"'
10647   { (eval echo "$as_me:10647: \"$ac_try\"") >&5
10648   (eval $ac_try) 2>&5
10649   ac_status=$?
10650   echo "$as_me:10650: \$? = $ac_status" >&5
10651   (exit "$ac_status"); }; }; then
10652   cf_cv_xopen_source=no
10653 else
10654   echo "$as_me: failed program was:" >&5
10655 cat "conftest.$ac_ext" >&5
10656 cf_save="$CPPFLAGS"
10657
10658         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10659         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10660
10661          cat >"conftest.$ac_ext" <<_ACEOF
10662 #line 10662 "configure"
10663 #include "confdefs.h"
10664
10665 #include <stdlib.h>
10666 #include <string.h>
10667 #include <sys/types.h>
10668
10669 int
10670 main (void)
10671 {
10672
10673 #ifdef _XOPEN_SOURCE
10674 make an error
10675 #endif
10676   ;
10677   return 0;
10678 }
10679 _ACEOF
10680 rm -f "conftest.$ac_objext"
10681 if { (eval echo "$as_me:10681: \"$ac_compile\"") >&5
10682   (eval $ac_compile) 2>&5
10683   ac_status=$?
10684   echo "$as_me:10684: \$? = $ac_status" >&5
10685   (exit "$ac_status"); } &&
10686          { ac_try='test -s "conftest.$ac_objext"'
10687   { (eval echo "$as_me:10687: \"$ac_try\"") >&5
10688   (eval $ac_try) 2>&5
10689   ac_status=$?
10690   echo "$as_me:10690: \$? = $ac_status" >&5
10691   (exit "$ac_status"); }; }; then
10692   cf_cv_xopen_source=no
10693 else
10694   echo "$as_me: failed program was:" >&5
10695 cat "conftest.$ac_ext" >&5
10696 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10697 fi
10698 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10699         CPPFLAGS="$cf_save"
10700
10701 fi
10702 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10703
10704 fi
10705 echo "$as_me:10705: result: $cf_cv_xopen_source" >&5
10706 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10707
10708 if test "$cf_cv_xopen_source" != no ; then
10709
10710 CFLAGS=`echo "$CFLAGS" | \
10711         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10712                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10713
10714 CPPFLAGS=`echo "$CPPFLAGS" | \
10715         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10716                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10717
10718         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10719
10720 cf_fix_cppflags=no
10721 cf_new_cflags=
10722 cf_new_cppflags=
10723 cf_new_extra_cppflags=
10724
10725 for cf_add_cflags in $cf_temp_xopen_source
10726 do
10727 case "$cf_fix_cppflags" in
10728 (no)
10729         case "$cf_add_cflags" in
10730         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10731                 case "$cf_add_cflags" in
10732                 (-D*)
10733                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10734
10735                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10736                                 && test -z "${cf_tst_cflags}" \
10737                                 && cf_fix_cppflags=yes
10738
10739                         if test "$cf_fix_cppflags" = yes ; then
10740
10741         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10742         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10743
10744                                 continue
10745                         elif test "${cf_tst_cflags}" = "\"'" ; then
10746
10747         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10748         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10749
10750                                 continue
10751                         fi
10752                         ;;
10753                 esac
10754                 case "$CPPFLAGS" in
10755                 (*$cf_add_cflags)
10756                         ;;
10757                 (*)
10758                         case "$cf_add_cflags" in
10759                         (-D*)
10760                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10761
10762 CPPFLAGS=`echo "$CPPFLAGS" | \
10763         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10764                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10765
10766                                 ;;
10767                         esac
10768
10769         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10770         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10771
10772                         ;;
10773                 esac
10774                 ;;
10775         (*)
10776
10777         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10778         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10779
10780                 ;;
10781         esac
10782         ;;
10783 (yes)
10784
10785         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10786         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10787
10788         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10789
10790         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10791                 && test -z "${cf_tst_cflags}" \
10792                 && cf_fix_cppflags=no
10793         ;;
10794 esac
10795 done
10796
10797 if test -n "$cf_new_cflags" ; then
10798
10799         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10800         CFLAGS="${CFLAGS}$cf_new_cflags"
10801
10802 fi
10803
10804 if test -n "$cf_new_cppflags" ; then
10805
10806         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10807         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10808
10809 fi
10810
10811 if test -n "$cf_new_extra_cppflags" ; then
10812
10813         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10814         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10815
10816 fi
10817
10818 fi
10819
10820 if test "$cf_cv_posix_visible" = no; then
10821
10822 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10823
10824 cf_save_CFLAGS="$CFLAGS"
10825 cf_save_CPPFLAGS="$CPPFLAGS"
10826
10827 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10828         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10829                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10830
10831 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10832         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10833                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10834
10835 echo "$as_me:10835: checking if we should define _POSIX_C_SOURCE" >&5
10836 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10837 if test "${cf_cv_posix_c_source+set}" = set; then
10838   echo $ECHO_N "(cached) $ECHO_C" >&6
10839 else
10840
10841 echo "${as_me:-configure}:10841: testing if the symbol is already defined go no further ..." 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   cf_cv_posix_c_source=no
10871 else
10872   echo "$as_me: failed program was:" >&5
10873 cat "conftest.$ac_ext" >&5
10874 cf_want_posix_source=no
10875          case .$cf_POSIX_C_SOURCE in
10876          (.[12]??*)
10877                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10878                 ;;
10879          (.2)
10880                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10881                 cf_want_posix_source=yes
10882                 ;;
10883          (.*)
10884                 cf_want_posix_source=yes
10885                 ;;
10886          esac
10887          if test "$cf_want_posix_source" = yes ; then
10888                 cat >"conftest.$ac_ext" <<_ACEOF
10889 #line 10889 "configure"
10890 #include "confdefs.h"
10891 #include <sys/types.h>
10892 int
10893 main (void)
10894 {
10895
10896 #ifdef _POSIX_SOURCE
10897 make an error
10898 #endif
10899   ;
10900   return 0;
10901 }
10902 _ACEOF
10903 rm -f "conftest.$ac_objext"
10904 if { (eval echo "$as_me:10904: \"$ac_compile\"") >&5
10905   (eval $ac_compile) 2>&5
10906   ac_status=$?
10907   echo "$as_me:10907: \$? = $ac_status" >&5
10908   (exit "$ac_status"); } &&
10909          { ac_try='test -s "conftest.$ac_objext"'
10910   { (eval echo "$as_me:10910: \"$ac_try\"") >&5
10911   (eval $ac_try) 2>&5
10912   ac_status=$?
10913   echo "$as_me:10913: \$? = $ac_status" >&5
10914   (exit "$ac_status"); }; }; then
10915   :
10916 else
10917   echo "$as_me: failed program was:" >&5
10918 cat "conftest.$ac_ext" >&5
10919 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10920 fi
10921 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10922          fi
10923
10924 echo "${as_me:-configure}:10924: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10925
10926          CFLAGS="$cf_trim_CFLAGS"
10927          CPPFLAGS="$cf_trim_CPPFLAGS"
10928
10929         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10930         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10931
10932 echo "${as_me:-configure}:10932: testing if the second compile does not leave our definition intact error ..." 1>&5
10933
10934          cat >"conftest.$ac_ext" <<_ACEOF
10935 #line 10935 "configure"
10936 #include "confdefs.h"
10937 #include <sys/types.h>
10938 int
10939 main (void)
10940 {
10941
10942 #ifndef _POSIX_C_SOURCE
10943 make an error
10944 #endif
10945   ;
10946   return 0;
10947 }
10948 _ACEOF
10949 rm -f "conftest.$ac_objext"
10950 if { (eval echo "$as_me:10950: \"$ac_compile\"") >&5
10951   (eval $ac_compile) 2>&5
10952   ac_status=$?
10953   echo "$as_me:10953: \$? = $ac_status" >&5
10954   (exit "$ac_status"); } &&
10955          { ac_try='test -s "conftest.$ac_objext"'
10956   { (eval echo "$as_me:10956: \"$ac_try\"") >&5
10957   (eval $ac_try) 2>&5
10958   ac_status=$?
10959   echo "$as_me:10959: \$? = $ac_status" >&5
10960   (exit "$ac_status"); }; }; then
10961   :
10962 else
10963   echo "$as_me: failed program was:" >&5
10964 cat "conftest.$ac_ext" >&5
10965 cf_cv_posix_c_source=no
10966 fi
10967 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10968          CFLAGS="$cf_save_CFLAGS"
10969          CPPFLAGS="$cf_save_CPPFLAGS"
10970
10971 fi
10972 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10973
10974 fi
10975 echo "$as_me:10975: result: $cf_cv_posix_c_source" >&5
10976 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10977
10978 if test "$cf_cv_posix_c_source" != no ; then
10979         CFLAGS="$cf_trim_CFLAGS"
10980         CPPFLAGS="$cf_trim_CPPFLAGS"
10981
10982 cf_fix_cppflags=no
10983 cf_new_cflags=
10984 cf_new_cppflags=
10985 cf_new_extra_cppflags=
10986
10987 for cf_add_cflags in $cf_cv_posix_c_source
10988 do
10989 case "$cf_fix_cppflags" in
10990 (no)
10991         case "$cf_add_cflags" in
10992         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10993                 case "$cf_add_cflags" in
10994                 (-D*)
10995                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10996
10997                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10998                                 && test -z "${cf_tst_cflags}" \
10999                                 && cf_fix_cppflags=yes
11000
11001                         if test "$cf_fix_cppflags" = yes ; then
11002
11003         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11004         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11005
11006                                 continue
11007                         elif test "${cf_tst_cflags}" = "\"'" ; then
11008
11009         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11010         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11011
11012                                 continue
11013                         fi
11014                         ;;
11015                 esac
11016                 case "$CPPFLAGS" in
11017                 (*$cf_add_cflags)
11018                         ;;
11019                 (*)
11020                         case "$cf_add_cflags" in
11021                         (-D*)
11022                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11023
11024 CPPFLAGS=`echo "$CPPFLAGS" | \
11025         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11026                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11027
11028                                 ;;
11029                         esac
11030
11031         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11032         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11033
11034                         ;;
11035                 esac
11036                 ;;
11037         (*)
11038
11039         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11040         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11041
11042                 ;;
11043         esac
11044         ;;
11045 (yes)
11046
11047         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11048         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11049
11050         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11051
11052         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11053                 && test -z "${cf_tst_cflags}" \
11054                 && cf_fix_cppflags=no
11055         ;;
11056 esac
11057 done
11058
11059 if test -n "$cf_new_cflags" ; then
11060
11061         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11062         CFLAGS="${CFLAGS}$cf_new_cflags"
11063
11064 fi
11065
11066 if test -n "$cf_new_cppflags" ; then
11067
11068         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11069         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11070
11071 fi
11072
11073 if test -n "$cf_new_extra_cppflags" ; then
11074
11075         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11076         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11077
11078 fi
11079
11080 fi
11081
11082 fi # cf_cv_posix_visible
11083
11084         ;;
11085 esac
11086
11087 if test -n "$cf_xopen_source" ; then
11088
11089 cf_fix_cppflags=no
11090 cf_new_cflags=
11091 cf_new_cppflags=
11092 cf_new_extra_cppflags=
11093
11094 for cf_add_cflags in $cf_xopen_source
11095 do
11096 case "$cf_fix_cppflags" in
11097 (no)
11098         case "$cf_add_cflags" in
11099         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11100                 case "$cf_add_cflags" in
11101                 (-D*)
11102                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11103
11104                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11105                                 && test -z "${cf_tst_cflags}" \
11106                                 && cf_fix_cppflags=yes
11107
11108                         if test "$cf_fix_cppflags" = yes ; then
11109
11110         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11111         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11112
11113                                 continue
11114                         elif test "${cf_tst_cflags}" = "\"'" ; then
11115
11116         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11117         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11118
11119                                 continue
11120                         fi
11121                         ;;
11122                 esac
11123                 case "$CPPFLAGS" in
11124                 (*$cf_add_cflags)
11125                         ;;
11126                 (*)
11127                         case "$cf_add_cflags" in
11128                         (-D*)
11129                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11130
11131 CPPFLAGS=`echo "$CPPFLAGS" | \
11132         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11133                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11134
11135                                 ;;
11136                         esac
11137
11138         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11139         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11140
11141                         ;;
11142                 esac
11143                 ;;
11144         (*)
11145
11146         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11147         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11148
11149                 ;;
11150         esac
11151         ;;
11152 (yes)
11153
11154         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11155         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11156
11157         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11158
11159         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11160                 && test -z "${cf_tst_cflags}" \
11161                 && cf_fix_cppflags=no
11162         ;;
11163 esac
11164 done
11165
11166 if test -n "$cf_new_cflags" ; then
11167         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11168
11169 echo "${as_me:-configure}:11169: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11170
11171         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11172         CFLAGS="${CFLAGS}$cf_new_cflags"
11173
11174 fi
11175
11176 if test -n "$cf_new_cppflags" ; then
11177         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11178
11179 echo "${as_me:-configure}:11179: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11180
11181         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11182         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11183
11184 fi
11185
11186 if test -n "$cf_new_extra_cppflags" ; then
11187         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11188
11189 echo "${as_me:-configure}:11189: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11190
11191         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11192         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11193
11194 fi
11195
11196 fi
11197
11198 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11199         echo "$as_me:11199: checking if _XOPEN_SOURCE really is set" >&5
11200 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11201         cat >"conftest.$ac_ext" <<_ACEOF
11202 #line 11202 "configure"
11203 #include "confdefs.h"
11204 #include <stdlib.h>
11205 int
11206 main (void)
11207 {
11208
11209 #ifndef _XOPEN_SOURCE
11210 make an error
11211 #endif
11212   ;
11213   return 0;
11214 }
11215 _ACEOF
11216 rm -f "conftest.$ac_objext"
11217 if { (eval echo "$as_me:11217: \"$ac_compile\"") >&5
11218   (eval $ac_compile) 2>&5
11219   ac_status=$?
11220   echo "$as_me:11220: \$? = $ac_status" >&5
11221   (exit "$ac_status"); } &&
11222          { ac_try='test -s "conftest.$ac_objext"'
11223   { (eval echo "$as_me:11223: \"$ac_try\"") >&5
11224   (eval $ac_try) 2>&5
11225   ac_status=$?
11226   echo "$as_me:11226: \$? = $ac_status" >&5
11227   (exit "$ac_status"); }; }; then
11228   cf_XOPEN_SOURCE_set=yes
11229 else
11230   echo "$as_me: failed program was:" >&5
11231 cat "conftest.$ac_ext" >&5
11232 cf_XOPEN_SOURCE_set=no
11233 fi
11234 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11235         echo "$as_me:11235: result: $cf_XOPEN_SOURCE_set" >&5
11236 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11237         if test "$cf_XOPEN_SOURCE_set" = yes
11238         then
11239                 cat >"conftest.$ac_ext" <<_ACEOF
11240 #line 11240 "configure"
11241 #include "confdefs.h"
11242 #include <stdlib.h>
11243 int
11244 main (void)
11245 {
11246
11247 #if (_XOPEN_SOURCE - 0) < $cf_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_XOPEN_SOURCE_set_ok=yes
11267 else
11268   echo "$as_me: failed program was:" >&5
11269 cat "conftest.$ac_ext" >&5
11270 cf_XOPEN_SOURCE_set_ok=no
11271 fi
11272 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11273                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11274                 then
11275                         { echo "$as_me:11275: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11276 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11277                 fi
11278         else
11279
11280 echo "$as_me:11280: checking if we should define _XOPEN_SOURCE" >&5
11281 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11282 if test "${cf_cv_xopen_source+set}" = set; then
11283   echo $ECHO_N "(cached) $ECHO_C" >&6
11284 else
11285
11286         cat >"conftest.$ac_ext" <<_ACEOF
11287 #line 11287 "configure"
11288 #include "confdefs.h"
11289
11290 #include <stdlib.h>
11291 #include <string.h>
11292 #include <sys/types.h>
11293
11294 int
11295 main (void)
11296 {
11297
11298 #ifndef _XOPEN_SOURCE
11299 make an error
11300 #endif
11301   ;
11302   return 0;
11303 }
11304 _ACEOF
11305 rm -f "conftest.$ac_objext"
11306 if { (eval echo "$as_me:11306: \"$ac_compile\"") >&5
11307   (eval $ac_compile) 2>&5
11308   ac_status=$?
11309   echo "$as_me:11309: \$? = $ac_status" >&5
11310   (exit "$ac_status"); } &&
11311          { ac_try='test -s "conftest.$ac_objext"'
11312   { (eval echo "$as_me:11312: \"$ac_try\"") >&5
11313   (eval $ac_try) 2>&5
11314   ac_status=$?
11315   echo "$as_me:11315: \$? = $ac_status" >&5
11316   (exit "$ac_status"); }; }; then
11317   cf_cv_xopen_source=no
11318 else
11319   echo "$as_me: failed program was:" >&5
11320 cat "conftest.$ac_ext" >&5
11321 cf_save="$CPPFLAGS"
11322
11323         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11324         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11325
11326          cat >"conftest.$ac_ext" <<_ACEOF
11327 #line 11327 "configure"
11328 #include "confdefs.h"
11329
11330 #include <stdlib.h>
11331 #include <string.h>
11332 #include <sys/types.h>
11333
11334 int
11335 main (void)
11336 {
11337
11338 #ifdef _XOPEN_SOURCE
11339 make an error
11340 #endif
11341   ;
11342   return 0;
11343 }
11344 _ACEOF
11345 rm -f "conftest.$ac_objext"
11346 if { (eval echo "$as_me:11346: \"$ac_compile\"") >&5
11347   (eval $ac_compile) 2>&5
11348   ac_status=$?
11349   echo "$as_me:11349: \$? = $ac_status" >&5
11350   (exit "$ac_status"); } &&
11351          { ac_try='test -s "conftest.$ac_objext"'
11352   { (eval echo "$as_me:11352: \"$ac_try\"") >&5
11353   (eval $ac_try) 2>&5
11354   ac_status=$?
11355   echo "$as_me:11355: \$? = $ac_status" >&5
11356   (exit "$ac_status"); }; }; then
11357   cf_cv_xopen_source=no
11358 else
11359   echo "$as_me: failed program was:" >&5
11360 cat "conftest.$ac_ext" >&5
11361 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11362 fi
11363 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11364         CPPFLAGS="$cf_save"
11365
11366 fi
11367 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11368
11369 fi
11370 echo "$as_me:11370: result: $cf_cv_xopen_source" >&5
11371 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11372
11373 if test "$cf_cv_xopen_source" != no ; then
11374
11375 CFLAGS=`echo "$CFLAGS" | \
11376         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11377                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11378
11379 CPPFLAGS=`echo "$CPPFLAGS" | \
11380         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11381                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11382
11383         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11384
11385 cf_fix_cppflags=no
11386 cf_new_cflags=
11387 cf_new_cppflags=
11388 cf_new_extra_cppflags=
11389
11390 for cf_add_cflags in $cf_temp_xopen_source
11391 do
11392 case "$cf_fix_cppflags" in
11393 (no)
11394         case "$cf_add_cflags" in
11395         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11396                 case "$cf_add_cflags" in
11397                 (-D*)
11398                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11399
11400                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11401                                 && test -z "${cf_tst_cflags}" \
11402                                 && cf_fix_cppflags=yes
11403
11404                         if test "$cf_fix_cppflags" = yes ; then
11405
11406         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11407         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11408
11409                                 continue
11410                         elif test "${cf_tst_cflags}" = "\"'" ; then
11411
11412         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11413         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11414
11415                                 continue
11416                         fi
11417                         ;;
11418                 esac
11419                 case "$CPPFLAGS" in
11420                 (*$cf_add_cflags)
11421                         ;;
11422                 (*)
11423                         case "$cf_add_cflags" in
11424                         (-D*)
11425                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11426
11427 CPPFLAGS=`echo "$CPPFLAGS" | \
11428         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11429                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11430
11431                                 ;;
11432                         esac
11433
11434         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11435         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11436
11437                         ;;
11438                 esac
11439                 ;;
11440         (*)
11441
11442         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11443         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11444
11445                 ;;
11446         esac
11447         ;;
11448 (yes)
11449
11450         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11451         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11452
11453         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11454
11455         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11456                 && test -z "${cf_tst_cflags}" \
11457                 && cf_fix_cppflags=no
11458         ;;
11459 esac
11460 done
11461
11462 if test -n "$cf_new_cflags" ; then
11463
11464         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11465         CFLAGS="${CFLAGS}$cf_new_cflags"
11466
11467 fi
11468
11469 if test -n "$cf_new_cppflags" ; then
11470
11471         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11472         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11473
11474 fi
11475
11476 if test -n "$cf_new_extra_cppflags" ; then
11477
11478         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11479         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11480
11481 fi
11482
11483 fi
11484
11485         fi
11486 fi
11487 fi # cf_cv_posix_visible
11488
11489 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11490
11491 # Work around breakage on OS X
11492
11493 echo "$as_me:11493: checking if SIGWINCH is defined" >&5
11494 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11495 if test "${cf_cv_define_sigwinch+set}" = set; then
11496   echo $ECHO_N "(cached) $ECHO_C" >&6
11497 else
11498
11499         cat >"conftest.$ac_ext" <<_ACEOF
11500 #line 11500 "configure"
11501 #include "confdefs.h"
11502
11503 #include <sys/types.h>
11504 #include <sys/signal.h>
11505
11506 int
11507 main (void)
11508 {
11509 int x = SIGWINCH; (void)x
11510   ;
11511   return 0;
11512 }
11513 _ACEOF
11514 rm -f "conftest.$ac_objext"
11515 if { (eval echo "$as_me:11515: \"$ac_compile\"") >&5
11516   (eval $ac_compile) 2>&5
11517   ac_status=$?
11518   echo "$as_me:11518: \$? = $ac_status" >&5
11519   (exit "$ac_status"); } &&
11520          { ac_try='test -s "conftest.$ac_objext"'
11521   { (eval echo "$as_me:11521: \"$ac_try\"") >&5
11522   (eval $ac_try) 2>&5
11523   ac_status=$?
11524   echo "$as_me:11524: \$? = $ac_status" >&5
11525   (exit "$ac_status"); }; }; then
11526   cf_cv_define_sigwinch=yes
11527 else
11528   echo "$as_me: failed program was:" >&5
11529 cat "conftest.$ac_ext" >&5
11530 cat >"conftest.$ac_ext" <<_ACEOF
11531 #line 11531 "configure"
11532 #include "confdefs.h"
11533
11534 #undef _XOPEN_SOURCE
11535 #undef _POSIX_SOURCE
11536 #undef _POSIX_C_SOURCE
11537 #include <sys/types.h>
11538 #include <sys/signal.h>
11539
11540 int
11541 main (void)
11542 {
11543 int x = SIGWINCH; (void)x
11544   ;
11545   return 0;
11546 }
11547 _ACEOF
11548 rm -f "conftest.$ac_objext"
11549 if { (eval echo "$as_me:11549: \"$ac_compile\"") >&5
11550   (eval $ac_compile) 2>&5
11551   ac_status=$?
11552   echo "$as_me:11552: \$? = $ac_status" >&5
11553   (exit "$ac_status"); } &&
11554          { ac_try='test -s "conftest.$ac_objext"'
11555   { (eval echo "$as_me:11555: \"$ac_try\"") >&5
11556   (eval $ac_try) 2>&5
11557   ac_status=$?
11558   echo "$as_me:11558: \$? = $ac_status" >&5
11559   (exit "$ac_status"); }; }; then
11560   cf_cv_define_sigwinch=maybe
11561 else
11562   echo "$as_me: failed program was:" >&5
11563 cat "conftest.$ac_ext" >&5
11564 cf_cv_define_sigwinch=no
11565 fi
11566 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11567
11568 fi
11569 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11570
11571 fi
11572 echo "$as_me:11572: result: $cf_cv_define_sigwinch" >&5
11573 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11574
11575 if test "$cf_cv_define_sigwinch" = maybe ; then
11576 echo "$as_me:11576: checking for actual SIGWINCH definition" >&5
11577 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11578 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11579   echo $ECHO_N "(cached) $ECHO_C" >&6
11580 else
11581
11582 cf_cv_fixup_sigwinch=unknown
11583 cf_sigwinch=32
11584 while test "$cf_sigwinch" != 1
11585 do
11586         cat >"conftest.$ac_ext" <<_ACEOF
11587 #line 11587 "configure"
11588 #include "confdefs.h"
11589
11590 #undef _XOPEN_SOURCE
11591 #undef _POSIX_SOURCE
11592 #undef _POSIX_C_SOURCE
11593 #include <sys/types.h>
11594 #include <sys/signal.h>
11595
11596 int
11597 main (void)
11598 {
11599
11600 #if SIGWINCH != $cf_sigwinch
11601 make an error
11602 #endif
11603 int x = SIGWINCH; (void)x
11604   ;
11605   return 0;
11606 }
11607 _ACEOF
11608 rm -f "conftest.$ac_objext"
11609 if { (eval echo "$as_me:11609: \"$ac_compile\"") >&5
11610   (eval $ac_compile) 2>&5
11611   ac_status=$?
11612   echo "$as_me:11612: \$? = $ac_status" >&5
11613   (exit "$ac_status"); } &&
11614          { ac_try='test -s "conftest.$ac_objext"'
11615   { (eval echo "$as_me:11615: \"$ac_try\"") >&5
11616   (eval $ac_try) 2>&5
11617   ac_status=$?
11618   echo "$as_me:11618: \$? = $ac_status" >&5
11619   (exit "$ac_status"); }; }; then
11620   cf_cv_fixup_sigwinch=$cf_sigwinch
11621          break
11622 else
11623   echo "$as_me: failed program was:" >&5
11624 cat "conftest.$ac_ext" >&5
11625 fi
11626 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11627
11628 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11629 done
11630
11631 fi
11632 echo "$as_me:11632: result: $cf_cv_fixup_sigwinch" >&5
11633 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11634
11635         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11636                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11637         fi
11638 fi
11639
11640 # Checks for CODESET support.
11641
11642 echo "$as_me:11642: checking for nl_langinfo and CODESET" >&5
11643 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11644 if test "${am_cv_langinfo_codeset+set}" = set; then
11645   echo $ECHO_N "(cached) $ECHO_C" >&6
11646 else
11647   cat >"conftest.$ac_ext" <<_ACEOF
11648 #line 11648 "configure"
11649 #include "confdefs.h"
11650 #include <langinfo.h>
11651 int
11652 main (void)
11653 {
11654 char* cs = nl_langinfo(CODESET); (void)cs
11655   ;
11656   return 0;
11657 }
11658 _ACEOF
11659 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11660 if { (eval echo "$as_me:11660: \"$ac_link\"") >&5
11661   (eval $ac_link) 2>&5
11662   ac_status=$?
11663   echo "$as_me:11663: \$? = $ac_status" >&5
11664   (exit "$ac_status"); } &&
11665          { ac_try='test -s "conftest$ac_exeext"'
11666   { (eval echo "$as_me:11666: \"$ac_try\"") >&5
11667   (eval $ac_try) 2>&5
11668   ac_status=$?
11669   echo "$as_me:11669: \$? = $ac_status" >&5
11670   (exit "$ac_status"); }; }; then
11671   am_cv_langinfo_codeset=yes
11672 else
11673   echo "$as_me: failed program was:" >&5
11674 cat "conftest.$ac_ext" >&5
11675 am_cv_langinfo_codeset=no
11676 fi
11677 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11678
11679 fi
11680 echo "$as_me:11680: result: $am_cv_langinfo_codeset" >&5
11681 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11682         if test "$am_cv_langinfo_codeset" = yes; then
11683
11684 cat >>confdefs.h <<\EOF
11685 #define HAVE_LANGINFO_CODESET 1
11686 EOF
11687
11688         fi
11689
11690 # use these variables to work around a defect in gcc's fixincludes.
11691 NCURSES_OK_WCHAR_T=
11692 NCURSES_OK_WINT_T=
11693
11694 echo "$as_me:11694: checking if you want wide-character code" >&5
11695 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11696
11697 # Check whether --enable-widec or --disable-widec was given.
11698 if test "${enable_widec+set}" = set; then
11699   enableval="$enable_widec"
11700   with_widec=$enableval
11701 else
11702   with_widec=no
11703 fi;
11704 echo "$as_me:11704: result: $with_widec" >&5
11705 echo "${ECHO_T}$with_widec" >&6
11706
11707 NCURSES_WCWIDTH_GRAPHICS=1
11708
11709 if test "x$with_widec" = xyes ; then
11710         if test "x$disable_lib_suffixes" = xno ; then
11711                 LIB_SUFFIX="w${LIB_SUFFIX}"
11712         fi
11713
11714 cat >>confdefs.h <<\EOF
11715 #define USE_WIDEC_SUPPORT 1
11716 EOF
11717
11718 cat >>confdefs.h <<\EOF
11719 #define NCURSES_WIDECHAR 1
11720 EOF
11721
11722 for ac_header in \
11723 wchar.h \
11724 wctype.h \
11725
11726 do
11727 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11728 echo "$as_me:11728: checking for $ac_header" >&5
11729 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11730 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11731   echo $ECHO_N "(cached) $ECHO_C" >&6
11732 else
11733   cat >"conftest.$ac_ext" <<_ACEOF
11734 #line 11734 "configure"
11735 #include "confdefs.h"
11736 #include <$ac_header>
11737 _ACEOF
11738 if { (eval echo "$as_me:11738: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11739   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11740   ac_status=$?
11741   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11742   rm -f conftest.er1
11743   cat conftest.err >&5
11744   echo "$as_me:11744: \$? = $ac_status" >&5
11745   (exit "$ac_status"); } >/dev/null; then
11746   if test -s conftest.err; then
11747     ac_cpp_err=$ac_c_preproc_warn_flag
11748   else
11749     ac_cpp_err=
11750   fi
11751 else
11752   ac_cpp_err=yes
11753 fi
11754 if test -z "$ac_cpp_err"; then
11755   eval "$as_ac_Header=yes"
11756 else
11757   echo "$as_me: failed program was:" >&5
11758   cat "conftest.$ac_ext" >&5
11759   eval "$as_ac_Header=no"
11760 fi
11761 rm -f conftest.err "conftest.$ac_ext"
11762 fi
11763 echo "$as_me:11763: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11764 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11765 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11766   cat >>confdefs.h <<EOF
11767 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11768 EOF
11769
11770 fi
11771 done
11772
11773 echo "$as_me:11773: checking if wchar.h can be used as is" >&5
11774 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11775 if test "${cf_cv_wchar_h_okay+set}" = set; then
11776   echo $ECHO_N "(cached) $ECHO_C" >&6
11777 else
11778
11779 cat >"conftest.$ac_ext" <<_ACEOF
11780 #line 11780 "configure"
11781 #include "confdefs.h"
11782
11783 #include <stdlib.h>
11784 #ifdef HAVE_WCHAR_H
11785 #include <wchar.h>
11786 #endif
11787 #ifdef HAVE_WCTYPE_H
11788 #include <wctype.h>
11789 #endif
11790
11791 int
11792 main (void)
11793 {
11794
11795         wint_t foo = 0;
11796         int bar = iswpunct(foo)
11797   ;
11798   return 0;
11799 }
11800 _ACEOF
11801 rm -f "conftest.$ac_objext"
11802 if { (eval echo "$as_me:11802: \"$ac_compile\"") >&5
11803   (eval $ac_compile) 2>&5
11804   ac_status=$?
11805   echo "$as_me:11805: \$? = $ac_status" >&5
11806   (exit "$ac_status"); } &&
11807          { ac_try='test -s "conftest.$ac_objext"'
11808   { (eval echo "$as_me:11808: \"$ac_try\"") >&5
11809   (eval $ac_try) 2>&5
11810   ac_status=$?
11811   echo "$as_me:11811: \$? = $ac_status" >&5
11812   (exit "$ac_status"); }; }; then
11813   cf_cv_wchar_h_okay=yes
11814 else
11815   echo "$as_me: failed program was:" >&5
11816 cat "conftest.$ac_ext" >&5
11817 cf_cv_wchar_h_okay=no
11818 fi
11819 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11820 fi
11821 echo "$as_me:11821: result: $cf_cv_wchar_h_okay" >&5
11822 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11823
11824 if test "$cf_cv_wchar_h_okay" = no
11825 then
11826
11827 echo "$as_me:11827: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11828 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11829 cat >"conftest.$ac_ext" <<_ACEOF
11830 #line 11830 "configure"
11831 #include "confdefs.h"
11832 #include <sys/types.h>
11833
11834 int
11835 main (void)
11836 {
11837
11838 #ifndef _XOPEN_SOURCE_EXTENDED
11839 make an error
11840 #endif
11841   ;
11842   return 0;
11843 }
11844 _ACEOF
11845 rm -f "conftest.$ac_objext"
11846 if { (eval echo "$as_me:11846: \"$ac_compile\"") >&5
11847   (eval $ac_compile) 2>&5
11848   ac_status=$?
11849   echo "$as_me:11849: \$? = $ac_status" >&5
11850   (exit "$ac_status"); } &&
11851          { ac_try='test -s "conftest.$ac_objext"'
11852   { (eval echo "$as_me:11852: \"$ac_try\"") >&5
11853   (eval $ac_try) 2>&5
11854   ac_status=$?
11855   echo "$as_me:11855: \$? = $ac_status" >&5
11856   (exit "$ac_status"); }; }; then
11857   cf_result=no
11858 else
11859   echo "$as_me: failed program was:" >&5
11860 cat "conftest.$ac_ext" >&5
11861 cf_result=yes
11862 fi
11863 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11864 echo "$as_me:11864: result: $cf_result" >&5
11865 echo "${ECHO_T}$cf_result" >&6
11866
11867 if test "$cf_result" = yes ; then
11868         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11869 elif test "x" != "x" ; then
11870         echo "$as_me:11870: checking checking for compatible value versus " >&5
11871 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11872         cat >"conftest.$ac_ext" <<_ACEOF
11873 #line 11873 "configure"
11874 #include "confdefs.h"
11875 #include <sys/types.h>
11876
11877 int
11878 main (void)
11879 {
11880
11881 #if _XOPEN_SOURCE_EXTENDED- < 0
11882 make an error
11883 #endif
11884   ;
11885   return 0;
11886 }
11887 _ACEOF
11888 rm -f "conftest.$ac_objext"
11889 if { (eval echo "$as_me:11889: \"$ac_compile\"") >&5
11890   (eval $ac_compile) 2>&5
11891   ac_status=$?
11892   echo "$as_me:11892: \$? = $ac_status" >&5
11893   (exit "$ac_status"); } &&
11894          { ac_try='test -s "conftest.$ac_objext"'
11895   { (eval echo "$as_me:11895: \"$ac_try\"") >&5
11896   (eval $ac_try) 2>&5
11897   ac_status=$?
11898   echo "$as_me:11898: \$? = $ac_status" >&5
11899   (exit "$ac_status"); }; }; then
11900   cf_result=yes
11901 else
11902   echo "$as_me: failed program was:" >&5
11903 cat "conftest.$ac_ext" >&5
11904 cf_result=no
11905 fi
11906 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11907         echo "$as_me:11907: result: $cf_result" >&5
11908 echo "${ECHO_T}$cf_result" >&6
11909         if test "$cf_result" = no ; then
11910                 # perhaps we can override it - try...
11911                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11912         fi
11913 fi
11914
11915 fi
11916
11917 echo "$as_me:11917: checking if wcwidth agrees graphics are single-width" >&5
11918 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11919 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11920   echo $ECHO_N "(cached) $ECHO_C" >&6
11921 else
11922
11923 cat >conftest.in <<CF_EOF
11924 -       VT100 symbols
11925 0x250c  upper left corner
11926 0x2514  lower left corner
11927 0x2510  upper right corner
11928 0x2518  lower right corner
11929 0x251c  tee pointing left
11930 0x2524  tee pointing right
11931 0x2534  tee pointing up
11932 0x252c  tee pointing down
11933 0x2500  horizontal line
11934 0x2502  vertical line
11935 0x253c  large plus or crossover
11936 0x23ba  scan line 1
11937 0x23bd  scan line 9
11938 0x25c6  diamond
11939 0x2592  checker board (stipple)
11940 0x00b0  degree symbol
11941 0x00b1  plus/minus
11942 0x00b7  bullet
11943 -       Teletype 5410v1 symbols
11944 0x2190  arrow pointing left
11945 0x2192  arrow pointing right
11946 0x2193  arrow pointing down
11947 0x2191  arrow pointing up
11948 0x2592  board of squares
11949 0x2603  lantern symbol
11950 0x25ae  solid square block
11951 -       these defaults were invented for ncurses
11952 0x23bb  scan line 3
11953 0x23bc  scan line 7
11954 0x2264  less-than-or-equal-to
11955 0x2265  greater-than-or-equal-to
11956 0x03c0  greek pi
11957 0x2260  not-equal
11958 0x00a3  pound-sterling symbol
11959 -       thick-line-drawing
11960 0x250f  upper left corner
11961 0x2517  lower left corner
11962 0x2513  upper right corner
11963 0x251b  lower right corner
11964 0x2523  tee pointing left
11965 0x252b  tee pointing right
11966 0x253b  tee pointing up
11967 0x2533  tee pointing down
11968 0x2501  horizontal line
11969 0x2503  vertical line
11970 0x254b  large plus or crossover
11971 -       double-line-drawing
11972 0x2554  upper left corner
11973 0x255a  lower left corner
11974 0x2557  upper right corner
11975 0x255d  lower right corner
11976 0x2563  tee pointing left
11977 0x2560  tee pointing right
11978 0x2569  tee pointing up
11979 0x2566  tee pointing down
11980 0x2550  horizontal line
11981 0x2551  vertical line
11982 0x256c  large plus or crossover
11983 CF_EOF
11984 if test "$cross_compiling" = yes; then
11985   cf_cv_wcwidth_graphics=unknown
11986 else
11987   cat >"conftest.$ac_ext" <<_ACEOF
11988 #line 11988 "configure"
11989 #include "confdefs.h"
11990
11991 #include <locale.h>
11992 #include <stdio.h>
11993 #include <wchar.h>
11994
11995 #define MY_LEN 80
11996
11997 int
11998 main(void)
11999 {
12000         FILE *fp;
12001         int value;
12002         char buffer[MY_LEN + 1];
12003         char notes[MY_LEN + 1];
12004         int totals = 0;
12005         int passed = 0;
12006
12007         if (setlocale(LC_ALL, "en_US.UTF8") ||
12008                 setlocale(LC_ALL, "en_US.UTF-8") ||
12009                 setlocale(LC_ALL, "en_US.utf8") ||
12010                 setlocale(LC_ALL, "en_US.utf-8")) {
12011                 if ((fp = fopen("conftest.in", "r")) != 0) {
12012                         while (fgets(buffer, MY_LEN, fp) != 0) {
12013                                 if (*buffer == '-') {
12014                                         fprintf(stderr, "\\t%s", buffer);
12015                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12016                                         ++totals;
12017                                         if (wcwidth(value) == 1)
12018                                                 ++passed;
12019                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12020                                 } else {
12021                                         fprintf(stderr, "?\\t%s", buffer);
12022                                 }
12023                         }
12024                 }
12025         }
12026         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12027         return (totals == passed) ? 0 : 1;
12028 }
12029
12030 _ACEOF
12031 rm -f "conftest$ac_exeext"
12032 if { (eval echo "$as_me:12032: \"$ac_link\"") >&5
12033   (eval $ac_link) 2>&5
12034   ac_status=$?
12035   echo "$as_me:12035: \$? = $ac_status" >&5
12036   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12037   { (eval echo "$as_me:12037: \"$ac_try\"") >&5
12038   (eval $ac_try) 2>&5
12039   ac_status=$?
12040   echo "$as_me:12040: \$? = $ac_status" >&5
12041   (exit "$ac_status"); }; }; then
12042   cf_cv_wcwidth_graphics=yes
12043 else
12044   echo "$as_me: program exited with status $ac_status" >&5
12045 echo "$as_me: failed program was:" >&5
12046 cat "conftest.$ac_ext" >&5
12047 cf_cv_wcwidth_graphics=no
12048 fi
12049 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12050 fi
12051
12052 fi
12053 echo "$as_me:12053: result: $cf_cv_wcwidth_graphics" >&5
12054 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12055
12056         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12057
12058         # with_overwrite=no
12059         NCURSES_CH_T=cchar_t
12060
12061 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12062 do
12063 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12064 echo "$as_me:12064: checking for $ac_func" >&5
12065 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12066 if eval "test \"\${$as_ac_var+set}\" = set"; then
12067   echo $ECHO_N "(cached) $ECHO_C" >&6
12068 else
12069   cat >"conftest.$ac_ext" <<_ACEOF
12070 #line 12070 "configure"
12071 #include "confdefs.h"
12072 #define $ac_func autoconf_temporary
12073 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12074 #undef $ac_func
12075
12076 #ifdef __cplusplus
12077 extern "C"
12078 #endif
12079
12080 /* We use char because int might match the return type of a gcc2
12081    builtin and then its argument prototype would still apply.  */
12082 char $ac_func (void);
12083
12084 int
12085 main (void)
12086 {
12087
12088 /* The GNU C library defines stubs for functions which it implements
12089     to always fail with ENOSYS.  Some functions are actually named
12090     something starting with __ and the normal name is an alias.  */
12091 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12092 #error found stub for $ac_func
12093 #endif
12094
12095         return $ac_func ();
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   eval "$as_ac_var=yes"
12113 else
12114   echo "$as_me: failed program was:" >&5
12115 cat "conftest.$ac_ext" >&5
12116 eval "$as_ac_var=no"
12117 fi
12118 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12119 fi
12120 echo "$as_me:12120: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12121 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12122 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12123   cat >>confdefs.h <<EOF
12124 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12125 EOF
12126
12127 fi
12128 done
12129
12130         if test "x$ac_cv_func_putwc" != xyes ; then
12131
12132 for ac_header in wchar.h
12133 do
12134 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12135 echo "$as_me:12135: checking for $ac_header" >&5
12136 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12137 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12138   echo $ECHO_N "(cached) $ECHO_C" >&6
12139 else
12140   cat >"conftest.$ac_ext" <<_ACEOF
12141 #line 12141 "configure"
12142 #include "confdefs.h"
12143 #include <$ac_header>
12144 _ACEOF
12145 if { (eval echo "$as_me:12145: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12146   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12147   ac_status=$?
12148   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12149   rm -f conftest.er1
12150   cat conftest.err >&5
12151   echo "$as_me:12151: \$? = $ac_status" >&5
12152   (exit "$ac_status"); } >/dev/null; then
12153   if test -s conftest.err; then
12154     ac_cpp_err=$ac_c_preproc_warn_flag
12155   else
12156     ac_cpp_err=
12157   fi
12158 else
12159   ac_cpp_err=yes
12160 fi
12161 if test -z "$ac_cpp_err"; then
12162   eval "$as_ac_Header=yes"
12163 else
12164   echo "$as_me: failed program was:" >&5
12165   cat "conftest.$ac_ext" >&5
12166   eval "$as_ac_Header=no"
12167 fi
12168 rm -f conftest.err "conftest.$ac_ext"
12169 fi
12170 echo "$as_me:12170: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12171 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12172 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12173   cat >>confdefs.h <<EOF
12174 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12175 EOF
12176
12177 fi
12178 done
12179
12180 echo "$as_me:12180: checking for multibyte character support" >&5
12181 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12182 if test "${cf_cv_utf8_lib+set}" = set; then
12183   echo $ECHO_N "(cached) $ECHO_C" >&6
12184 else
12185
12186         cf_save_LIBS="$LIBS"
12187         cat >"conftest.$ac_ext" <<_ACEOF
12188 #line 12188 "configure"
12189 #include "confdefs.h"
12190
12191 #include <stdlib.h>
12192 #include <stdio.h>
12193 #ifdef HAVE_WCHAR_H
12194 #include <wchar.h>
12195 #endif
12196
12197 int
12198 main (void)
12199 {
12200 putwc(0,0);
12201   ;
12202   return 0;
12203 }
12204 _ACEOF
12205 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12206 if { (eval echo "$as_me:12206: \"$ac_link\"") >&5
12207   (eval $ac_link) 2>&5
12208   ac_status=$?
12209   echo "$as_me:12209: \$? = $ac_status" >&5
12210   (exit "$ac_status"); } &&
12211          { ac_try='test -s "conftest$ac_exeext"'
12212   { (eval echo "$as_me:12212: \"$ac_try\"") >&5
12213   (eval $ac_try) 2>&5
12214   ac_status=$?
12215   echo "$as_me:12215: \$? = $ac_status" >&5
12216   (exit "$ac_status"); }; }; then
12217   cf_cv_utf8_lib=yes
12218 else
12219   echo "$as_me: failed program was:" >&5
12220 cat "conftest.$ac_ext" >&5
12221
12222 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12223 # will be set on completion of the AC_TRY_LINK below.
12224 cf_cv_header_path_utf8=
12225 cf_cv_library_path_utf8=
12226
12227 echo "${as_me:-configure}:12227: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12228
12229 cf_save_LIBS="$LIBS"
12230
12231 cat >"conftest.$ac_ext" <<_ACEOF
12232 #line 12232 "configure"
12233 #include "confdefs.h"
12234
12235 #include <libutf8.h>
12236 int
12237 main (void)
12238 {
12239 putwc(0,0);
12240   ;
12241   return 0;
12242 }
12243 _ACEOF
12244 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12245 if { (eval echo "$as_me:12245: \"$ac_link\"") >&5
12246   (eval $ac_link) 2>&5
12247   ac_status=$?
12248   echo "$as_me:12248: \$? = $ac_status" >&5
12249   (exit "$ac_status"); } &&
12250          { ac_try='test -s "conftest$ac_exeext"'
12251   { (eval echo "$as_me:12251: \"$ac_try\"") >&5
12252   (eval $ac_try) 2>&5
12253   ac_status=$?
12254   echo "$as_me:12254: \$? = $ac_status" >&5
12255   (exit "$ac_status"); }; }; then
12256
12257         cf_cv_find_linkage_utf8=yes
12258         cf_cv_header_path_utf8=/usr/include
12259         cf_cv_library_path_utf8=/usr/lib
12260
12261 else
12262   echo "$as_me: failed program was:" >&5
12263 cat "conftest.$ac_ext" >&5
12264
12265 LIBS="-lutf8  $cf_save_LIBS"
12266
12267 cat >"conftest.$ac_ext" <<_ACEOF
12268 #line 12268 "configure"
12269 #include "confdefs.h"
12270
12271 #include <libutf8.h>
12272 int
12273 main (void)
12274 {
12275 putwc(0,0);
12276   ;
12277   return 0;
12278 }
12279 _ACEOF
12280 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12281 if { (eval echo "$as_me:12281: \"$ac_link\"") >&5
12282   (eval $ac_link) 2>&5
12283   ac_status=$?
12284   echo "$as_me:12284: \$? = $ac_status" >&5
12285   (exit "$ac_status"); } &&
12286          { ac_try='test -s "conftest$ac_exeext"'
12287   { (eval echo "$as_me:12287: \"$ac_try\"") >&5
12288   (eval $ac_try) 2>&5
12289   ac_status=$?
12290   echo "$as_me:12290: \$? = $ac_status" >&5
12291   (exit "$ac_status"); }; }; then
12292
12293         cf_cv_find_linkage_utf8=yes
12294         cf_cv_header_path_utf8=/usr/include
12295         cf_cv_library_path_utf8=/usr/lib
12296         cf_cv_library_file_utf8="-lutf8"
12297
12298 else
12299   echo "$as_me: failed program was:" >&5
12300 cat "conftest.$ac_ext" >&5
12301
12302         cf_cv_find_linkage_utf8=no
12303         LIBS="$cf_save_LIBS"
12304
12305         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12306
12307 echo "${as_me:-configure}:12307: testing find linkage for utf8 library ..." 1>&5
12308
12309 echo "${as_me:-configure}:12309: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12310
12311         cf_save_CPPFLAGS="$CPPFLAGS"
12312         cf_test_CPPFLAGS="$CPPFLAGS"
12313
12314 cf_search=
12315
12316 # collect the current set of include-directories from compiler flags
12317 cf_header_path_list=""
12318 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12319         for cf_header_path in $CPPFLAGS $CFLAGS
12320         do
12321                 case "$cf_header_path" in
12322                 (-I*)
12323                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12324
12325 test "x$cf_header_path" != "xNONE" && \
12326 test -d "$cf_header_path" && \
12327  {
12328         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12329         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12330         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12331         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12332         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12333         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12334 }
12335
12336                         cf_header_path_list="$cf_header_path_list $cf_search"
12337                         ;;
12338                 esac
12339         done
12340 fi
12341
12342 # add the variations for the package we are looking for
12343
12344 cf_search=
12345
12346 test "x$prefix" != "xNONE" && \
12347 test -d "$prefix" && \
12348  {
12349         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12350         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12351         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12352         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12353         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12354         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12355 }
12356
12357 for cf_subdir_prefix in \
12358         /usr \
12359         /usr/local \
12360         /usr/pkg \
12361         /opt \
12362         /opt/local \
12363         $HOME
12364 do
12365
12366 test "x$cf_subdir_prefix" != "x$prefix" && \
12367 test -d "$cf_subdir_prefix" && \
12368 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12369         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12370         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12371         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12372         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12373         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12374         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12375 }
12376
12377 done
12378
12379 test "$includedir" != NONE && \
12380 test "$includedir" != "/usr/include" && \
12381 test -d "$includedir" && {
12382         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12383         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12384 }
12385
12386 test "$oldincludedir" != NONE && \
12387 test "$oldincludedir" != "/usr/include" && \
12388 test -d "$oldincludedir" && {
12389         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12390         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12391 }
12392
12393 cf_search="$cf_search $cf_header_path_list"
12394
12395         for cf_cv_header_path_utf8 in $cf_search
12396         do
12397                 if test -d "$cf_cv_header_path_utf8" ; then
12398                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12399
12400 echo "${as_me:-configure}:12400: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12401
12402                         CPPFLAGS="$cf_save_CPPFLAGS"
12403
12404         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12405         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12406
12407                         cat >"conftest.$ac_ext" <<_ACEOF
12408 #line 12408 "configure"
12409 #include "confdefs.h"
12410
12411 #include <libutf8.h>
12412 int
12413 main (void)
12414 {
12415 putwc(0,0);
12416   ;
12417   return 0;
12418 }
12419 _ACEOF
12420 rm -f "conftest.$ac_objext"
12421 if { (eval echo "$as_me:12421: \"$ac_compile\"") >&5
12422   (eval $ac_compile) 2>&5
12423   ac_status=$?
12424   echo "$as_me:12424: \$? = $ac_status" >&5
12425   (exit "$ac_status"); } &&
12426          { ac_try='test -s "conftest.$ac_objext"'
12427   { (eval echo "$as_me:12427: \"$ac_try\"") >&5
12428   (eval $ac_try) 2>&5
12429   ac_status=$?
12430   echo "$as_me:12430: \$? = $ac_status" >&5
12431   (exit "$ac_status"); }; }; then
12432
12433                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12434
12435 echo "${as_me:-configure}:12435: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12436
12437                                 cf_cv_find_linkage_utf8=maybe
12438                                 cf_test_CPPFLAGS="$CPPFLAGS"
12439                                 break
12440 else
12441   echo "$as_me: failed program was:" >&5
12442 cat "conftest.$ac_ext" >&5
12443
12444                                 CPPFLAGS="$cf_save_CPPFLAGS"
12445
12446 fi
12447 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12448                 fi
12449         done
12450
12451         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12452
12453 echo "${as_me:-configure}:12453: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12454
12455                 cf_save_LIBS="$LIBS"
12456                 cf_save_LDFLAGS="$LDFLAGS"
12457
12458                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12459
12460 cf_search=
12461 cf_library_path_list=""
12462 if test -n "${LDFLAGS}${LIBS}" ; then
12463         for cf_library_path in $LDFLAGS $LIBS
12464         do
12465                 case "$cf_library_path" in
12466                 (-L*)
12467                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12468
12469 test "x$cf_library_path" != "xNONE" && \
12470 test -d "$cf_library_path" && \
12471  {
12472         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12473         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12474         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12475         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12476         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12477         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12478 }
12479
12480                         cf_library_path_list="$cf_library_path_list $cf_search"
12481                         ;;
12482                 esac
12483         done
12484 fi
12485
12486 cf_search=
12487
12488 test "x$prefix" != "xNONE" && \
12489 test -d "$prefix" && \
12490  {
12491         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12492         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12493         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12494         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12495         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12496         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12497 }
12498
12499 for cf_subdir_prefix in \
12500         /usr \
12501         /usr/local \
12502         /usr/pkg \
12503         /opt \
12504         /opt/local \
12505         $HOME
12506 do
12507
12508 test "x$cf_subdir_prefix" != "x$prefix" && \
12509 test -d "$cf_subdir_prefix" && \
12510 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12511         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12512         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12513         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12514         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12515         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12516         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12517 }
12518
12519 done
12520
12521 cf_search="$cf_library_path_list $cf_search"
12522
12523                         for cf_cv_library_path_utf8 in $cf_search
12524                         do
12525                                 if test -d "$cf_cv_library_path_utf8" ; then
12526                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12527
12528 echo "${as_me:-configure}:12528: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12529
12530                                         CPPFLAGS="$cf_test_CPPFLAGS"
12531                                         LIBS="-lutf8  $cf_save_LIBS"
12532                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12533                                         cat >"conftest.$ac_ext" <<_ACEOF
12534 #line 12534 "configure"
12535 #include "confdefs.h"
12536
12537 #include <libutf8.h>
12538 int
12539 main (void)
12540 {
12541 putwc(0,0);
12542   ;
12543   return 0;
12544 }
12545 _ACEOF
12546 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12547 if { (eval echo "$as_me:12547: \"$ac_link\"") >&5
12548   (eval $ac_link) 2>&5
12549   ac_status=$?
12550   echo "$as_me:12550: \$? = $ac_status" >&5
12551   (exit "$ac_status"); } &&
12552          { ac_try='test -s "conftest$ac_exeext"'
12553   { (eval echo "$as_me:12553: \"$ac_try\"") >&5
12554   (eval $ac_try) 2>&5
12555   ac_status=$?
12556   echo "$as_me:12556: \$? = $ac_status" >&5
12557   (exit "$ac_status"); }; }; then
12558
12559                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12560
12561 echo "${as_me:-configure}:12561: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12562
12563                                         cf_cv_find_linkage_utf8=yes
12564                                         cf_cv_library_file_utf8="-lutf8"
12565                                         break
12566 else
12567   echo "$as_me: failed program was:" >&5
12568 cat "conftest.$ac_ext" >&5
12569
12570                                         CPPFLAGS="$cf_save_CPPFLAGS"
12571                                         LIBS="$cf_save_LIBS"
12572                                         LDFLAGS="$cf_save_LDFLAGS"
12573
12574 fi
12575 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12576                                 fi
12577                         done
12578                         CPPFLAGS="$cf_save_CPPFLAGS"
12579                         LDFLAGS="$cf_save_LDFLAGS"
12580                 fi
12581
12582         else
12583                 cf_cv_find_linkage_utf8=no
12584         fi
12585
12586 fi
12587 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12588
12589 fi
12590 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12591
12592 LIBS="$cf_save_LIBS"
12593
12594 if test "$cf_cv_find_linkage_utf8" = yes ; then
12595 cf_cv_utf8_lib=add-on
12596 else
12597 cf_cv_utf8_lib=no
12598 fi
12599
12600 fi
12601 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12602 fi
12603 echo "$as_me:12603: result: $cf_cv_utf8_lib" >&5
12604 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12605
12606 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12607 # ncurses/ncursesw:
12608 if test "$cf_cv_utf8_lib" = "add-on" ; then
12609
12610 cat >>confdefs.h <<\EOF
12611 #define HAVE_LIBUTF8_H 1
12612 EOF
12613
12614 if test -n "$cf_cv_header_path_utf8" ; then
12615   for cf_add_incdir in $cf_cv_header_path_utf8
12616   do
12617         while test "$cf_add_incdir" != /usr/include
12618         do
12619           if test -d "$cf_add_incdir"
12620           then
12621                 cf_have_incdir=no
12622                 if test -n "$CFLAGS$CPPFLAGS" ; then
12623                   # a loop is needed to ensure we can add subdirs of existing dirs
12624                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12625                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12626                           cf_have_incdir=yes; break
12627                         fi
12628                   done
12629                 fi
12630
12631                 if test "$cf_have_incdir" = no ; then
12632                   if test "$cf_add_incdir" = /usr/local/include ; then
12633                         if test "$GCC" = yes
12634                         then
12635                           cf_save_CPPFLAGS=$CPPFLAGS
12636
12637         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12638         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12639
12640                           cat >"conftest.$ac_ext" <<_ACEOF
12641 #line 12641 "configure"
12642 #include "confdefs.h"
12643 #include <stdio.h>
12644 int
12645 main (void)
12646 {
12647 printf("Hello")
12648   ;
12649   return 0;
12650 }
12651 _ACEOF
12652 rm -f "conftest.$ac_objext"
12653 if { (eval echo "$as_me:12653: \"$ac_compile\"") >&5
12654   (eval $ac_compile) 2>&5
12655   ac_status=$?
12656   echo "$as_me:12656: \$? = $ac_status" >&5
12657   (exit "$ac_status"); } &&
12658          { ac_try='test -s "conftest.$ac_objext"'
12659   { (eval echo "$as_me:12659: \"$ac_try\"") >&5
12660   (eval $ac_try) 2>&5
12661   ac_status=$?
12662   echo "$as_me:12662: \$? = $ac_status" >&5
12663   (exit "$ac_status"); }; }; then
12664   :
12665 else
12666   echo "$as_me: failed program was:" >&5
12667 cat "conftest.$ac_ext" >&5
12668 cf_have_incdir=yes
12669 fi
12670 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12671                           CPPFLAGS=$cf_save_CPPFLAGS
12672                         fi
12673                   fi
12674                 fi
12675
12676                 if test "$cf_have_incdir" = no ; then
12677                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12678
12679 echo "${as_me:-configure}:12679: testing adding $cf_add_incdir to include-path ..." 1>&5
12680
12681                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12682
12683                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12684                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12685                   cf_add_incdir="$cf_top_incdir"
12686                 else
12687                   break
12688                 fi
12689           else
12690                 break
12691           fi
12692         done
12693   done
12694 fi
12695
12696 if test -n "$cf_cv_library_path_utf8" ; then
12697         for cf_add_libdir in $cf_cv_library_path_utf8
12698         do
12699                 if test "$cf_add_libdir" = /usr/lib ; then
12700                         :
12701                 elif test -d "$cf_add_libdir"
12702                 then
12703                         cf_have_libdir=no
12704                         if test -n "$LDFLAGS$LIBS" ; then
12705                                 # a loop is needed to ensure we can add subdirs of existing dirs
12706                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12707                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12708                                                 cf_have_libdir=yes; break
12709                                         fi
12710                                 done
12711                         fi
12712                         if test "$cf_have_libdir" = no ; then
12713                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12714
12715 echo "${as_me:-configure}:12715: testing adding $cf_add_libdir to library-path ..." 1>&5
12716
12717                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12718                         fi
12719                 fi
12720         done
12721 fi
12722
12723 cf_add_libs="$LIBS"
12724 # reverse order
12725 cf_add_0lib=
12726 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12727 # filter duplicates
12728 for cf_add_1lib in $cf_add_0lib; do
12729         for cf_add_2lib in $cf_add_libs; do
12730                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12731                         cf_add_1lib=
12732                         break
12733                 fi
12734         done
12735         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12736 done
12737 LIBS="$cf_add_libs"
12738
12739 fi
12740
12741                 if test "$cf_cv_utf8_lib" != no ; then
12742                         NCURSES_LIBUTF8=1
12743                 fi
12744         fi
12745
12746 # This is needed on Tru64 5.0 to declare mbstate_t
12747 echo "$as_me:12747: checking if we must include wchar.h to declare mbstate_t" >&5
12748 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12749 if test "${cf_cv_mbstate_t+set}" = set; then
12750   echo $ECHO_N "(cached) $ECHO_C" >&6
12751 else
12752
12753 cat >"conftest.$ac_ext" <<_ACEOF
12754 #line 12754 "configure"
12755 #include "confdefs.h"
12756
12757 #include <stdlib.h>
12758 #include <stdarg.h>
12759 #include <stdio.h>
12760 #ifdef HAVE_LIBUTF8_H
12761 #include <libutf8.h>
12762 #endif
12763 int
12764 main (void)
12765 {
12766 mbstate_t state
12767   ;
12768   return 0;
12769 }
12770 _ACEOF
12771 rm -f "conftest.$ac_objext"
12772 if { (eval echo "$as_me:12772: \"$ac_compile\"") >&5
12773   (eval $ac_compile) 2>&5
12774   ac_status=$?
12775   echo "$as_me:12775: \$? = $ac_status" >&5
12776   (exit "$ac_status"); } &&
12777          { ac_try='test -s "conftest.$ac_objext"'
12778   { (eval echo "$as_me:12778: \"$ac_try\"") >&5
12779   (eval $ac_try) 2>&5
12780   ac_status=$?
12781   echo "$as_me:12781: \$? = $ac_status" >&5
12782   (exit "$ac_status"); }; }; then
12783   cf_cv_mbstate_t=no
12784 else
12785   echo "$as_me: failed program was:" >&5
12786 cat "conftest.$ac_ext" >&5
12787 cat >"conftest.$ac_ext" <<_ACEOF
12788 #line 12788 "configure"
12789 #include "confdefs.h"
12790
12791 #include <stdlib.h>
12792 #include <stdarg.h>
12793 #include <stdio.h>
12794 #include <wchar.h>
12795 #ifdef HAVE_LIBUTF8_H
12796 #include <libutf8.h>
12797 #endif
12798 int
12799 main (void)
12800 {
12801 mbstate_t value
12802   ;
12803   return 0;
12804 }
12805 _ACEOF
12806 rm -f "conftest.$ac_objext"
12807 if { (eval echo "$as_me:12807: \"$ac_compile\"") >&5
12808   (eval $ac_compile) 2>&5
12809   ac_status=$?
12810   echo "$as_me:12810: \$? = $ac_status" >&5
12811   (exit "$ac_status"); } &&
12812          { ac_try='test -s "conftest.$ac_objext"'
12813   { (eval echo "$as_me:12813: \"$ac_try\"") >&5
12814   (eval $ac_try) 2>&5
12815   ac_status=$?
12816   echo "$as_me:12816: \$? = $ac_status" >&5
12817   (exit "$ac_status"); }; }; then
12818   cf_cv_mbstate_t=yes
12819 else
12820   echo "$as_me: failed program was:" >&5
12821 cat "conftest.$ac_ext" >&5
12822 cf_cv_mbstate_t=unknown
12823 fi
12824 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12825 fi
12826 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12827 fi
12828 echo "$as_me:12828: result: $cf_cv_mbstate_t" >&5
12829 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12830
12831 if test "$cf_cv_mbstate_t" = yes ; then
12832
12833 cat >>confdefs.h <<\EOF
12834 #define NEED_WCHAR_H 1
12835 EOF
12836
12837         NEED_WCHAR_H=1
12838 fi
12839
12840 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12841 if test "$cf_cv_mbstate_t" = unknown ; then
12842         NCURSES_MBSTATE_T=1
12843 fi
12844
12845 # This is needed on Tru64 5.0 to declare wchar_t
12846 echo "$as_me:12846: checking if we must include wchar.h to declare wchar_t" >&5
12847 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12848 if test "${cf_cv_wchar_t+set}" = set; then
12849   echo $ECHO_N "(cached) $ECHO_C" >&6
12850 else
12851
12852 cat >"conftest.$ac_ext" <<_ACEOF
12853 #line 12853 "configure"
12854 #include "confdefs.h"
12855
12856 #include <stdlib.h>
12857 #include <stdarg.h>
12858 #include <stdio.h>
12859 #ifdef HAVE_LIBUTF8_H
12860 #include <libutf8.h>
12861 #endif
12862 int
12863 main (void)
12864 {
12865 wchar_t state
12866   ;
12867   return 0;
12868 }
12869 _ACEOF
12870 rm -f "conftest.$ac_objext"
12871 if { (eval echo "$as_me:12871: \"$ac_compile\"") >&5
12872   (eval $ac_compile) 2>&5
12873   ac_status=$?
12874   echo "$as_me:12874: \$? = $ac_status" >&5
12875   (exit "$ac_status"); } &&
12876          { ac_try='test -s "conftest.$ac_objext"'
12877   { (eval echo "$as_me:12877: \"$ac_try\"") >&5
12878   (eval $ac_try) 2>&5
12879   ac_status=$?
12880   echo "$as_me:12880: \$? = $ac_status" >&5
12881   (exit "$ac_status"); }; }; then
12882   cf_cv_wchar_t=no
12883 else
12884   echo "$as_me: failed program was:" >&5
12885 cat "conftest.$ac_ext" >&5
12886 cat >"conftest.$ac_ext" <<_ACEOF
12887 #line 12887 "configure"
12888 #include "confdefs.h"
12889
12890 #include <stdlib.h>
12891 #include <stdarg.h>
12892 #include <stdio.h>
12893 #include <wchar.h>
12894 #ifdef HAVE_LIBUTF8_H
12895 #include <libutf8.h>
12896 #endif
12897 int
12898 main (void)
12899 {
12900 wchar_t value
12901   ;
12902   return 0;
12903 }
12904 _ACEOF
12905 rm -f "conftest.$ac_objext"
12906 if { (eval echo "$as_me:12906: \"$ac_compile\"") >&5
12907   (eval $ac_compile) 2>&5
12908   ac_status=$?
12909   echo "$as_me:12909: \$? = $ac_status" >&5
12910   (exit "$ac_status"); } &&
12911          { ac_try='test -s "conftest.$ac_objext"'
12912   { (eval echo "$as_me:12912: \"$ac_try\"") >&5
12913   (eval $ac_try) 2>&5
12914   ac_status=$?
12915   echo "$as_me:12915: \$? = $ac_status" >&5
12916   (exit "$ac_status"); }; }; then
12917   cf_cv_wchar_t=yes
12918 else
12919   echo "$as_me: failed program was:" >&5
12920 cat "conftest.$ac_ext" >&5
12921 cf_cv_wchar_t=unknown
12922 fi
12923 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12924 fi
12925 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12926 fi
12927 echo "$as_me:12927: result: $cf_cv_wchar_t" >&5
12928 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12929
12930 if test "$cf_cv_wchar_t" = yes ; then
12931
12932 cat >>confdefs.h <<\EOF
12933 #define NEED_WCHAR_H 1
12934 EOF
12935
12936         NEED_WCHAR_H=1
12937 fi
12938
12939 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12940 if test "$cf_cv_wchar_t" = unknown ; then
12941         NCURSES_WCHAR_T=1
12942 fi
12943
12944 # if we find wchar_t in either place, use substitution to provide a fallback.
12945 if test "$cf_cv_wchar_t" != unknown ; then
12946         NCURSES_OK_WCHAR_T=1
12947 fi
12948
12949 # This is needed on Tru64 5.0 to declare wint_t
12950 echo "$as_me:12950: checking if we must include wchar.h to declare wint_t" >&5
12951 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12952 if test "${cf_cv_wint_t+set}" = set; then
12953   echo $ECHO_N "(cached) $ECHO_C" >&6
12954 else
12955
12956 cat >"conftest.$ac_ext" <<_ACEOF
12957 #line 12957 "configure"
12958 #include "confdefs.h"
12959
12960 #include <stdlib.h>
12961 #include <stdarg.h>
12962 #include <stdio.h>
12963 #ifdef HAVE_LIBUTF8_H
12964 #include <libutf8.h>
12965 #endif
12966 int
12967 main (void)
12968 {
12969 wint_t state
12970   ;
12971   return 0;
12972 }
12973 _ACEOF
12974 rm -f "conftest.$ac_objext"
12975 if { (eval echo "$as_me:12975: \"$ac_compile\"") >&5
12976   (eval $ac_compile) 2>&5
12977   ac_status=$?
12978   echo "$as_me:12978: \$? = $ac_status" >&5
12979   (exit "$ac_status"); } &&
12980          { ac_try='test -s "conftest.$ac_objext"'
12981   { (eval echo "$as_me:12981: \"$ac_try\"") >&5
12982   (eval $ac_try) 2>&5
12983   ac_status=$?
12984   echo "$as_me:12984: \$? = $ac_status" >&5
12985   (exit "$ac_status"); }; }; then
12986   cf_cv_wint_t=no
12987 else
12988   echo "$as_me: failed program was:" >&5
12989 cat "conftest.$ac_ext" >&5
12990 cat >"conftest.$ac_ext" <<_ACEOF
12991 #line 12991 "configure"
12992 #include "confdefs.h"
12993
12994 #include <stdlib.h>
12995 #include <stdarg.h>
12996 #include <stdio.h>
12997 #include <wchar.h>
12998 #ifdef HAVE_LIBUTF8_H
12999 #include <libutf8.h>
13000 #endif
13001 int
13002 main (void)
13003 {
13004 wint_t value
13005   ;
13006   return 0;
13007 }
13008 _ACEOF
13009 rm -f "conftest.$ac_objext"
13010 if { (eval echo "$as_me:13010: \"$ac_compile\"") >&5
13011   (eval $ac_compile) 2>&5
13012   ac_status=$?
13013   echo "$as_me:13013: \$? = $ac_status" >&5
13014   (exit "$ac_status"); } &&
13015          { ac_try='test -s "conftest.$ac_objext"'
13016   { (eval echo "$as_me:13016: \"$ac_try\"") >&5
13017   (eval $ac_try) 2>&5
13018   ac_status=$?
13019   echo "$as_me:13019: \$? = $ac_status" >&5
13020   (exit "$ac_status"); }; }; then
13021   cf_cv_wint_t=yes
13022 else
13023   echo "$as_me: failed program was:" >&5
13024 cat "conftest.$ac_ext" >&5
13025 cf_cv_wint_t=unknown
13026 fi
13027 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13028 fi
13029 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13030 fi
13031 echo "$as_me:13031: result: $cf_cv_wint_t" >&5
13032 echo "${ECHO_T}$cf_cv_wint_t" >&6
13033
13034 if test "$cf_cv_wint_t" = yes ; then
13035
13036 cat >>confdefs.h <<\EOF
13037 #define NEED_WCHAR_H 1
13038 EOF
13039
13040         NEED_WCHAR_H=1
13041 fi
13042
13043 # if we do not find wint_t in either place, use substitution to provide a fallback.
13044 if test "$cf_cv_wint_t" = unknown ; then
13045         NCURSES_WINT_T=1
13046 fi
13047
13048 # if we find wint_t in either place, use substitution to provide a fallback.
13049 if test "$cf_cv_wint_t" != unknown ; then
13050         NCURSES_OK_WINT_T=1
13051 fi
13052
13053         if test "$NCURSES_MBSTATE_T" != 0; then
13054
13055 cat >>confdefs.h <<\EOF
13056 #define NEED_MBSTATE_T_DEF 1
13057 EOF
13058
13059         fi
13060 fi
13061
13062 ###   use option --disable-lp64 to allow long chtype
13063 echo "$as_me:13063: checking whether to enable _LP64 definition in curses.h" >&5
13064 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13065
13066 # Check whether --enable-lp64 or --disable-lp64 was given.
13067 if test "${enable_lp64+set}" = set; then
13068   enableval="$enable_lp64"
13069   with_lp64=$enableval
13070 else
13071   with_lp64=$cf_dft_with_lp64
13072 fi;
13073 echo "$as_me:13073: result: $with_lp64" >&5
13074 echo "${ECHO_T}$with_lp64" >&6
13075
13076 if test "x$with_lp64" = xyes ; then
13077         cf_cv_enable_lp64=1
13078 else
13079         cf_cv_enable_lp64=0
13080 fi
13081
13082 # Check whether --enable-largefile or --disable-largefile was given.
13083 if test "${enable_largefile+set}" = set; then
13084   enableval="$enable_largefile"
13085
13086 fi;
13087 if test "$enable_largefile" != no; then
13088
13089   echo "$as_me:13089: checking for special C compiler options needed for large files" >&5
13090 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13091 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13092   echo $ECHO_N "(cached) $ECHO_C" >&6
13093 else
13094   ac_cv_sys_largefile_CC=no
13095      if test "$GCC" != yes; then
13096        ac_save_CC=$CC
13097        while :; do
13098          # IRIX 6.2 and later do not support large files by default,
13099          # so use the C compiler's -n32 option if that helps.
13100          cat >"conftest.$ac_ext" <<_ACEOF
13101 #line 13101 "configure"
13102 #include "confdefs.h"
13103 #include <sys/types.h>
13104  /* Check that off_t can represent 2**63 - 1 correctly.
13105     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13106     since some C++ compilers masquerading as C compilers
13107     incorrectly reject 9223372036854775807.  */
13108 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13109   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13110                        && LARGE_OFF_T % 2147483647 == 1)
13111                       ? 1 : -1];
13112 int
13113 main (void)
13114 {
13115
13116   ;
13117   return 0;
13118 }
13119 _ACEOF
13120          rm -f "conftest.$ac_objext"
13121 if { (eval echo "$as_me:13121: \"$ac_compile\"") >&5
13122   (eval $ac_compile) 2>&5
13123   ac_status=$?
13124   echo "$as_me:13124: \$? = $ac_status" >&5
13125   (exit "$ac_status"); } &&
13126          { ac_try='test -s "conftest.$ac_objext"'
13127   { (eval echo "$as_me:13127: \"$ac_try\"") >&5
13128   (eval $ac_try) 2>&5
13129   ac_status=$?
13130   echo "$as_me:13130: \$? = $ac_status" >&5
13131   (exit "$ac_status"); }; }; then
13132   break
13133 else
13134   echo "$as_me: failed program was:" >&5
13135 cat "conftest.$ac_ext" >&5
13136 fi
13137 rm -f "conftest.$ac_objext"
13138          CC="$CC -n32"
13139          rm -f "conftest.$ac_objext"
13140 if { (eval echo "$as_me:13140: \"$ac_compile\"") >&5
13141   (eval $ac_compile) 2>&5
13142   ac_status=$?
13143   echo "$as_me:13143: \$? = $ac_status" >&5
13144   (exit "$ac_status"); } &&
13145          { ac_try='test -s "conftest.$ac_objext"'
13146   { (eval echo "$as_me:13146: \"$ac_try\"") >&5
13147   (eval $ac_try) 2>&5
13148   ac_status=$?
13149   echo "$as_me:13149: \$? = $ac_status" >&5
13150   (exit "$ac_status"); }; }; then
13151   ac_cv_sys_largefile_CC=' -n32'; break
13152 else
13153   echo "$as_me: failed program was:" >&5
13154 cat "conftest.$ac_ext" >&5
13155 fi
13156 rm -f "conftest.$ac_objext"
13157          break
13158        done
13159        CC=$ac_save_CC
13160        rm -f "conftest.$ac_ext"
13161     fi
13162 fi
13163 echo "$as_me:13163: result: $ac_cv_sys_largefile_CC" >&5
13164 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13165   if test "$ac_cv_sys_largefile_CC" != no; then
13166     CC=$CC$ac_cv_sys_largefile_CC
13167   fi
13168
13169   echo "$as_me:13169: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13170 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13171 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13172   echo $ECHO_N "(cached) $ECHO_C" >&6
13173 else
13174   while :; do
13175   ac_cv_sys_file_offset_bits=no
13176   cat >"conftest.$ac_ext" <<_ACEOF
13177 #line 13177 "configure"
13178 #include "confdefs.h"
13179 #include <sys/types.h>
13180  /* Check that off_t can represent 2**63 - 1 correctly.
13181     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13182     since some C++ compilers masquerading as C compilers
13183     incorrectly reject 9223372036854775807.  */
13184 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13185   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13186                        && LARGE_OFF_T % 2147483647 == 1)
13187                       ? 1 : -1];
13188 int
13189 main (void)
13190 {
13191
13192   ;
13193   return 0;
13194 }
13195 _ACEOF
13196 rm -f "conftest.$ac_objext"
13197 if { (eval echo "$as_me:13197: \"$ac_compile\"") >&5
13198   (eval $ac_compile) 2>&5
13199   ac_status=$?
13200   echo "$as_me:13200: \$? = $ac_status" >&5
13201   (exit "$ac_status"); } &&
13202          { ac_try='test -s "conftest.$ac_objext"'
13203   { (eval echo "$as_me:13203: \"$ac_try\"") >&5
13204   (eval $ac_try) 2>&5
13205   ac_status=$?
13206   echo "$as_me:13206: \$? = $ac_status" >&5
13207   (exit "$ac_status"); }; }; then
13208   break
13209 else
13210   echo "$as_me: failed program was:" >&5
13211 cat "conftest.$ac_ext" >&5
13212 fi
13213 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13214   cat >"conftest.$ac_ext" <<_ACEOF
13215 #line 13215 "configure"
13216 #include "confdefs.h"
13217 #define _FILE_OFFSET_BITS 64
13218 #include <sys/types.h>
13219  /* Check that off_t can represent 2**63 - 1 correctly.
13220     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13221     since some C++ compilers masquerading as C compilers
13222     incorrectly reject 9223372036854775807.  */
13223 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13224   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13225                        && LARGE_OFF_T % 2147483647 == 1)
13226                       ? 1 : -1];
13227 int
13228 main (void)
13229 {
13230
13231   ;
13232   return 0;
13233 }
13234 _ACEOF
13235 rm -f "conftest.$ac_objext"
13236 if { (eval echo "$as_me:13236: \"$ac_compile\"") >&5
13237   (eval $ac_compile) 2>&5
13238   ac_status=$?
13239   echo "$as_me:13239: \$? = $ac_status" >&5
13240   (exit "$ac_status"); } &&
13241          { ac_try='test -s "conftest.$ac_objext"'
13242   { (eval echo "$as_me:13242: \"$ac_try\"") >&5
13243   (eval $ac_try) 2>&5
13244   ac_status=$?
13245   echo "$as_me:13245: \$? = $ac_status" >&5
13246   (exit "$ac_status"); }; }; then
13247   ac_cv_sys_file_offset_bits=64; break
13248 else
13249   echo "$as_me: failed program was:" >&5
13250 cat "conftest.$ac_ext" >&5
13251 fi
13252 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13253   break
13254 done
13255 fi
13256 echo "$as_me:13256: result: $ac_cv_sys_file_offset_bits" >&5
13257 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13258 if test "$ac_cv_sys_file_offset_bits" != no; then
13259
13260 cat >>confdefs.h <<EOF
13261 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13262 EOF
13263
13264 fi
13265 rm -rf conftest*
13266   echo "$as_me:13266: checking for _LARGE_FILES value needed for large files" >&5
13267 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13268 if test "${ac_cv_sys_large_files+set}" = set; then
13269   echo $ECHO_N "(cached) $ECHO_C" >&6
13270 else
13271   while :; do
13272   ac_cv_sys_large_files=no
13273   cat >"conftest.$ac_ext" <<_ACEOF
13274 #line 13274 "configure"
13275 #include "confdefs.h"
13276 #include <sys/types.h>
13277  /* Check that off_t can represent 2**63 - 1 correctly.
13278     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13279     since some C++ compilers masquerading as C compilers
13280     incorrectly reject 9223372036854775807.  */
13281 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13282   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13283                        && LARGE_OFF_T % 2147483647 == 1)
13284                       ? 1 : -1];
13285 int
13286 main (void)
13287 {
13288
13289   ;
13290   return 0;
13291 }
13292 _ACEOF
13293 rm -f "conftest.$ac_objext"
13294 if { (eval echo "$as_me:13294: \"$ac_compile\"") >&5
13295   (eval $ac_compile) 2>&5
13296   ac_status=$?
13297   echo "$as_me:13297: \$? = $ac_status" >&5
13298   (exit "$ac_status"); } &&
13299          { ac_try='test -s "conftest.$ac_objext"'
13300   { (eval echo "$as_me:13300: \"$ac_try\"") >&5
13301   (eval $ac_try) 2>&5
13302   ac_status=$?
13303   echo "$as_me:13303: \$? = $ac_status" >&5
13304   (exit "$ac_status"); }; }; then
13305   break
13306 else
13307   echo "$as_me: failed program was:" >&5
13308 cat "conftest.$ac_ext" >&5
13309 fi
13310 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13311   cat >"conftest.$ac_ext" <<_ACEOF
13312 #line 13312 "configure"
13313 #include "confdefs.h"
13314 #define _LARGE_FILES 1
13315 #include <sys/types.h>
13316  /* Check that off_t can represent 2**63 - 1 correctly.
13317     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13318     since some C++ compilers masquerading as C compilers
13319     incorrectly reject 9223372036854775807.  */
13320 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13321   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13322                        && LARGE_OFF_T % 2147483647 == 1)
13323                       ? 1 : -1];
13324 int
13325 main (void)
13326 {
13327
13328   ;
13329   return 0;
13330 }
13331 _ACEOF
13332 rm -f "conftest.$ac_objext"
13333 if { (eval echo "$as_me:13333: \"$ac_compile\"") >&5
13334   (eval $ac_compile) 2>&5
13335   ac_status=$?
13336   echo "$as_me:13336: \$? = $ac_status" >&5
13337   (exit "$ac_status"); } &&
13338          { ac_try='test -s "conftest.$ac_objext"'
13339   { (eval echo "$as_me:13339: \"$ac_try\"") >&5
13340   (eval $ac_try) 2>&5
13341   ac_status=$?
13342   echo "$as_me:13342: \$? = $ac_status" >&5
13343   (exit "$ac_status"); }; }; then
13344   ac_cv_sys_large_files=1; break
13345 else
13346   echo "$as_me: failed program was:" >&5
13347 cat "conftest.$ac_ext" >&5
13348 fi
13349 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13350   break
13351 done
13352 fi
13353 echo "$as_me:13353: result: $ac_cv_sys_large_files" >&5
13354 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13355 if test "$ac_cv_sys_large_files" != no; then
13356
13357 cat >>confdefs.h <<EOF
13358 #define _LARGE_FILES $ac_cv_sys_large_files
13359 EOF
13360
13361 fi
13362 rm -rf conftest*
13363 fi
13364
13365         if test "$enable_largefile" != no ; then
13366         echo "$as_me:13366: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13367 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13368 if test "${ac_cv_sys_largefile_source+set}" = set; then
13369   echo $ECHO_N "(cached) $ECHO_C" >&6
13370 else
13371   while :; do
13372   ac_cv_sys_largefile_source=no
13373   cat >"conftest.$ac_ext" <<_ACEOF
13374 #line 13374 "configure"
13375 #include "confdefs.h"
13376 #include <stdio.h>
13377 int
13378 main (void)
13379 {
13380 return !fseeko;
13381   ;
13382   return 0;
13383 }
13384 _ACEOF
13385 rm -f "conftest.$ac_objext"
13386 if { (eval echo "$as_me:13386: \"$ac_compile\"") >&5
13387   (eval $ac_compile) 2>&5
13388   ac_status=$?
13389   echo "$as_me:13389: \$? = $ac_status" >&5
13390   (exit "$ac_status"); } &&
13391          { ac_try='test -s "conftest.$ac_objext"'
13392   { (eval echo "$as_me:13392: \"$ac_try\"") >&5
13393   (eval $ac_try) 2>&5
13394   ac_status=$?
13395   echo "$as_me:13395: \$? = $ac_status" >&5
13396   (exit "$ac_status"); }; }; then
13397   break
13398 else
13399   echo "$as_me: failed program was:" >&5
13400 cat "conftest.$ac_ext" >&5
13401 fi
13402 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13403   cat >"conftest.$ac_ext" <<_ACEOF
13404 #line 13404 "configure"
13405 #include "confdefs.h"
13406 #define _LARGEFILE_SOURCE 1
13407 #include <stdio.h>
13408 int
13409 main (void)
13410 {
13411 return !fseeko;
13412   ;
13413   return 0;
13414 }
13415 _ACEOF
13416 rm -f "conftest.$ac_objext"
13417 if { (eval echo "$as_me:13417: \"$ac_compile\"") >&5
13418   (eval $ac_compile) 2>&5
13419   ac_status=$?
13420   echo "$as_me:13420: \$? = $ac_status" >&5
13421   (exit "$ac_status"); } &&
13422          { ac_try='test -s "conftest.$ac_objext"'
13423   { (eval echo "$as_me:13423: \"$ac_try\"") >&5
13424   (eval $ac_try) 2>&5
13425   ac_status=$?
13426   echo "$as_me:13426: \$? = $ac_status" >&5
13427   (exit "$ac_status"); }; }; then
13428   ac_cv_sys_largefile_source=1; break
13429 else
13430   echo "$as_me: failed program was:" >&5
13431 cat "conftest.$ac_ext" >&5
13432 fi
13433 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13434   break
13435 done
13436 fi
13437 echo "$as_me:13437: result: $ac_cv_sys_largefile_source" >&5
13438 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13439 if test "$ac_cv_sys_largefile_source" != no; then
13440
13441 cat >>confdefs.h <<EOF
13442 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13443 EOF
13444
13445 fi
13446 rm -rf conftest*
13447
13448 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13449 # in glibc 2.1.3, but that breaks too many other things.
13450 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13451 echo "$as_me:13451: checking for fseeko" >&5
13452 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13453 if test "${ac_cv_func_fseeko+set}" = set; then
13454   echo $ECHO_N "(cached) $ECHO_C" >&6
13455 else
13456   cat >"conftest.$ac_ext" <<_ACEOF
13457 #line 13457 "configure"
13458 #include "confdefs.h"
13459 #include <stdio.h>
13460 int
13461 main (void)
13462 {
13463 return fseeko && fseeko (stdin, 0, 0);
13464   ;
13465   return 0;
13466 }
13467 _ACEOF
13468 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13469 if { (eval echo "$as_me:13469: \"$ac_link\"") >&5
13470   (eval $ac_link) 2>&5
13471   ac_status=$?
13472   echo "$as_me:13472: \$? = $ac_status" >&5
13473   (exit "$ac_status"); } &&
13474          { ac_try='test -s "conftest$ac_exeext"'
13475   { (eval echo "$as_me:13475: \"$ac_try\"") >&5
13476   (eval $ac_try) 2>&5
13477   ac_status=$?
13478   echo "$as_me:13478: \$? = $ac_status" >&5
13479   (exit "$ac_status"); }; }; then
13480   ac_cv_func_fseeko=yes
13481 else
13482   echo "$as_me: failed program was:" >&5
13483 cat "conftest.$ac_ext" >&5
13484 ac_cv_func_fseeko=no
13485 fi
13486 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13487 fi
13488 echo "$as_me:13488: result: $ac_cv_func_fseeko" >&5
13489 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13490 if test $ac_cv_func_fseeko = yes; then
13491
13492 cat >>confdefs.h <<\EOF
13493 #define HAVE_FSEEKO 1
13494 EOF
13495
13496 fi
13497
13498         # Normally we would collect these definitions in the config.h,
13499         # but (like _XOPEN_SOURCE), some environments rely on having these
13500         # defined before any of the system headers are included.  Another
13501         # case comes up with C++, e.g., on AIX the compiler compiles the
13502         # header files by themselves before looking at the body files it is
13503         # told to compile.  For ncurses, those header files do not include
13504         # the config.h
13505         if test "$ac_cv_sys_large_files" != no
13506         then
13507
13508         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13509         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13510
13511         fi
13512         if test "$ac_cv_sys_largefile_source" != no
13513         then
13514
13515         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13516         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13517
13518         fi
13519         if test "$ac_cv_sys_file_offset_bits" != no
13520         then
13521
13522         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13523         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13524
13525         fi
13526
13527         echo "$as_me:13527: checking whether to use struct dirent64" >&5
13528 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13529 if test "${cf_cv_struct_dirent64+set}" = set; then
13530   echo $ECHO_N "(cached) $ECHO_C" >&6
13531 else
13532
13533                 cat >"conftest.$ac_ext" <<_ACEOF
13534 #line 13534 "configure"
13535 #include "confdefs.h"
13536
13537 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13538 #include <sys/types.h>
13539 #include <dirent.h>
13540
13541 int
13542 main (void)
13543 {
13544
13545                 /* if transitional largefile support is setup, this is true */
13546                 extern struct dirent64 * readdir(DIR *);
13547                 struct dirent64 *x = readdir((DIR *)0);
13548                 struct dirent *y = readdir((DIR *)0);
13549                 int z = x - y;
13550                 (void)z;
13551
13552   ;
13553   return 0;
13554 }
13555 _ACEOF
13556 rm -f "conftest.$ac_objext"
13557 if { (eval echo "$as_me:13557: \"$ac_compile\"") >&5
13558   (eval $ac_compile) 2>&5
13559   ac_status=$?
13560   echo "$as_me:13560: \$? = $ac_status" >&5
13561   (exit "$ac_status"); } &&
13562          { ac_try='test -s "conftest.$ac_objext"'
13563   { (eval echo "$as_me:13563: \"$ac_try\"") >&5
13564   (eval $ac_try) 2>&5
13565   ac_status=$?
13566   echo "$as_me:13566: \$? = $ac_status" >&5
13567   (exit "$ac_status"); }; }; then
13568   cf_cv_struct_dirent64=yes
13569 else
13570   echo "$as_me: failed program was:" >&5
13571 cat "conftest.$ac_ext" >&5
13572 cf_cv_struct_dirent64=no
13573 fi
13574 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13575
13576 fi
13577 echo "$as_me:13577: result: $cf_cv_struct_dirent64" >&5
13578 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13579         test "$cf_cv_struct_dirent64" = yes &&
13580 cat >>confdefs.h <<\EOF
13581 #define HAVE_STRUCT_DIRENT64 1
13582 EOF
13583
13584         fi
13585
13586 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13587 echo "$as_me:13587: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13588 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13589
13590 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13591 if test "${enable_tparm_varargs+set}" = set; then
13592   enableval="$enable_tparm_varargs"
13593   with_tparm_varargs=$enableval
13594 else
13595   with_tparm_varargs=yes
13596 fi;
13597 echo "$as_me:13597: result: $with_tparm_varargs" >&5
13598 echo "${ECHO_T}$with_tparm_varargs" >&6
13599 NCURSES_TPARM_VARARGS=0
13600 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13601
13602 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13603 if test "$with_ticlib" != no ; then
13604 echo "$as_me:13604: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13605 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13606
13607 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13608 if test "${enable_tic_depends+set}" = set; then
13609   enableval="$enable_tic_depends"
13610   with_tic_depends=$enableval
13611 else
13612   with_tic_depends=yes
13613 fi;
13614 echo "$as_me:13614: result: $with_tic_depends" >&5
13615 echo "${ECHO_T}$with_tic_depends" >&6
13616 else
13617         with_tic_depends=no
13618 fi
13619
13620 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
13621 echo "$as_me:13621: checking if you want to enable wattr* macros" >&5
13622 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
13623
13624 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13625 if test "${enable_wattr_macros+set}" = set; then
13626   enableval="$enable_wattr_macros"
13627   with_wattr_macros=$enableval
13628 else
13629   with_wattr_macros=no
13630 fi;
13631 if [ "x$with_wattr_macros" != xyes ]; then
13632         NCURSES_WATTR_MACROS=0
13633         echo "$as_me:13633: result: no" >&5
13634 echo "${ECHO_T}no" >&6
13635 else
13636         NCURSES_WATTR_MACROS=1
13637         echo "$as_me:13637: result: yes" >&5
13638 echo "${ECHO_T}yes" >&6
13639 fi
13640
13641 echo "$as_me:13641: checking for X11 rgb file" >&5
13642 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13643
13644 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13645 if test "${with_x11_rgb+set}" = set; then
13646   withval="$with_x11_rgb"
13647   RGB_PATH=$withval
13648 else
13649   RGB_PATH=auto
13650 fi;
13651
13652 if test "x$RGB_PATH" = xauto
13653 then
13654         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13655         for cf_path in \
13656                 /opt/local/share/X11/rgb.txt \
13657                 /opt/X11/share/X11/rgb.txt \
13658                 /usr/share/X11/rgb.txt \
13659                 /usr/X11/share/X11/rgb.txt \
13660                 /usr/X11/lib/X11/rgb.txt \
13661                 /usr/lib/X11/rgb.txt \
13662                 /etc/X11/rgb.txt \
13663                 /usr/pkg/lib/X11/rgb.txt \
13664                 /usr/X11R7/lib/X11/rgb.txt \
13665                 /usr/X11R6/lib/X11/rgb.txt \
13666                 /usr/X11R5/lib/X11/rgb.txt \
13667                 /usr/X11R4/lib/X11/rgb.txt \
13668                 /usr/local/lib/X11/rgb.txt \
13669                 /usr/local/share/X11/rgb.txt \
13670                 /usr/lib64/X11/rgb.txt
13671         do
13672                 if test -f "$cf_path" ; then
13673                         RGB_PATH="$cf_path"
13674                         break
13675                 fi
13676         done
13677 else
13678         cf_path=$RGB_PATH
13679
13680 if test "x$prefix" != xNONE; then
13681         cf_path_syntax="$prefix"
13682 else
13683         cf_path_syntax="$ac_default_prefix"
13684 fi
13685
13686 case ".$cf_path" in
13687 (.\$\(*\)*|.\'*\'*)
13688         ;;
13689 (..|./*|.\\*)
13690         ;;
13691 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13692         ;;
13693 (.\$\{*prefix\}*|.\$\{*dir\}*)
13694         eval cf_path="$cf_path"
13695         case ".$cf_path" in
13696         (.NONE/*)
13697                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13698                 ;;
13699         esac
13700         ;;
13701 (.no|.NONE/*)
13702         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13703         ;;
13704 (*)
13705         { { echo "$as_me:13705: error: expected a pathname, not \"$cf_path\"" >&5
13706 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13707    { (exit 1); exit 1; }; }
13708         ;;
13709 esac
13710
13711 fi
13712
13713 echo "$as_me:13713: result: $RGB_PATH" >&5
13714 echo "${ECHO_T}$RGB_PATH" >&6
13715
13716 cat >>confdefs.h <<EOF
13717 #define RGB_PATH "$cf_path"
13718 EOF
13719
13720 no_x11_rgb=
13721 if test "$RGB_PATH" = no
13722 then
13723         no_x11_rgb="#"
13724 fi
13725
13726 ###   use option --with-bool to override bool's type
13727 echo "$as_me:13727: checking for type of bool" >&5
13728 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13729
13730 # Check whether --with-bool or --without-bool was given.
13731 if test "${with_bool+set}" = set; then
13732   withval="$with_bool"
13733   NCURSES_BOOL="$withval"
13734 else
13735   NCURSES_BOOL=auto
13736 fi;
13737 echo "$as_me:13737: result: $NCURSES_BOOL" >&5
13738 echo "${ECHO_T}$NCURSES_BOOL" >&6
13739
13740 echo "$as_me:13740: checking for alternate terminal capabilities file" >&5
13741 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13742
13743 # Check whether --with-caps or --without-caps was given.
13744 if test "${with_caps+set}" = set; then
13745   withval="$with_caps"
13746   TERMINFO_CAPS=Caps.$withval
13747 else
13748   TERMINFO_CAPS=Caps
13749 fi;
13750 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13751 echo "$as_me:13751: result: $TERMINFO_CAPS" >&5
13752 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13753
13754 ###   use option --with-chtype to override chtype's type
13755 echo "$as_me:13755: checking for type of chtype" >&5
13756 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13757
13758 # Check whether --with-chtype or --without-chtype was given.
13759 if test "${with_chtype+set}" = set; then
13760   withval="$with_chtype"
13761   NCURSES_CHTYPE="$withval"
13762 else
13763   NCURSES_CHTYPE=$cf_dft_chtype
13764 fi;
13765 echo "$as_me:13765: result: $NCURSES_CHTYPE" >&5
13766 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13767
13768 ###   use option --with-ospeed to override ospeed's type
13769 echo "$as_me:13769: checking for type of ospeed" >&5
13770 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13771
13772 # Check whether --with-ospeed or --without-ospeed was given.
13773 if test "${with_ospeed+set}" = set; then
13774   withval="$with_ospeed"
13775   NCURSES_OSPEED="$withval"
13776 else
13777   NCURSES_OSPEED=short
13778 fi;
13779 echo "$as_me:13779: result: $NCURSES_OSPEED" >&5
13780 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13781
13782 ###   use option --with-mmask-t to override mmask_t's type
13783 echo "$as_me:13783: checking for type of mmask_t" >&5
13784 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13785
13786 # Check whether --with-mmask-t or --without-mmask-t was given.
13787 if test "${with_mmask_t+set}" = set; then
13788   withval="$with_mmask_t"
13789   NCURSES_MMASK_T="$withval"
13790 else
13791   NCURSES_MMASK_T=$cf_dft_mmask_t
13792 fi;
13793 echo "$as_me:13793: result: $NCURSES_MMASK_T" >&5
13794 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13795
13796 ###   use option --with-ccharw-max to override CCHARW_MAX size
13797 echo "$as_me:13797: checking for size CCHARW_MAX" >&5
13798 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13799
13800 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13801 if test "${with_ccharw_max+set}" = set; then
13802   withval="$with_ccharw_max"
13803   NCURSES_CCHARW_MAX="$withval"
13804 else
13805   NCURSES_CCHARW_MAX=5
13806 fi;
13807 echo "$as_me:13807: result: $NCURSES_CCHARW_MAX" >&5
13808 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13809
13810 echo "$as_me:13810: checking for ANSI C header files" >&5
13811 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13812 if test "${ac_cv_header_stdc+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 #include <stdlib.h>
13819 #include <stdarg.h>
13820 #include <string.h>
13821 #include <float.h>
13822
13823 _ACEOF
13824 if { (eval echo "$as_me:13824: \"$ac_cpp "conftest.$ac_ext"\"") >&5
13825   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
13826   ac_status=$?
13827   $EGREP -v '^ *\+' conftest.er1 >conftest.err
13828   rm -f conftest.er1
13829   cat conftest.err >&5
13830   echo "$as_me:13830: \$? = $ac_status" >&5
13831   (exit "$ac_status"); } >/dev/null; then
13832   if test -s conftest.err; then
13833     ac_cpp_err=$ac_c_preproc_warn_flag
13834   else
13835     ac_cpp_err=
13836   fi
13837 else
13838   ac_cpp_err=yes
13839 fi
13840 if test -z "$ac_cpp_err"; then
13841   ac_cv_header_stdc=yes
13842 else
13843   echo "$as_me: failed program was:" >&5
13844   cat "conftest.$ac_ext" >&5
13845   ac_cv_header_stdc=no
13846 fi
13847 rm -f conftest.err "conftest.$ac_ext"
13848
13849 if test $ac_cv_header_stdc = yes; then
13850   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13851   cat >"conftest.$ac_ext" <<_ACEOF
13852 #line 13852 "configure"
13853 #include "confdefs.h"
13854 #include <string.h>
13855
13856 _ACEOF
13857 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13858   $EGREP "memchr" >/dev/null 2>&1; then
13859   :
13860 else
13861   ac_cv_header_stdc=no
13862 fi
13863 rm -rf conftest*
13864
13865 fi
13866
13867 if test $ac_cv_header_stdc = yes; then
13868   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13869   cat >"conftest.$ac_ext" <<_ACEOF
13870 #line 13870 "configure"
13871 #include "confdefs.h"
13872 #include <stdlib.h>
13873
13874 _ACEOF
13875 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13876   $EGREP "free" >/dev/null 2>&1; then
13877   :
13878 else
13879   ac_cv_header_stdc=no
13880 fi
13881 rm -rf conftest*
13882
13883 fi
13884
13885 if test $ac_cv_header_stdc = yes; then
13886   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13887   if test "$cross_compiling" = yes; then
13888   :
13889 else
13890   cat >"conftest.$ac_ext" <<_ACEOF
13891 #line 13891 "configure"
13892 #include "confdefs.h"
13893 #include <ctype.h>
13894 #if ((' ' & 0x0FF) == 0x020)
13895 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13896 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13897 #else
13898 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13899                      || ('j' <= (c) && (c) <= 'r') \
13900                      || ('s' <= (c) && (c) <= 'z'))
13901 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13902 #endif
13903
13904 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13905 int
13906 main (void)
13907 {
13908   int i;
13909   for (i = 0; i < 256; i++)
13910     if (XOR (islower (i), ISLOWER (i))
13911         || toupper (i) != TOUPPER (i))
13912       $ac_main_return(2);
13913   $ac_main_return (0);
13914 }
13915 _ACEOF
13916 rm -f "conftest$ac_exeext"
13917 if { (eval echo "$as_me:13917: \"$ac_link\"") >&5
13918   (eval $ac_link) 2>&5
13919   ac_status=$?
13920   echo "$as_me:13920: \$? = $ac_status" >&5
13921   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
13922   { (eval echo "$as_me:13922: \"$ac_try\"") >&5
13923   (eval $ac_try) 2>&5
13924   ac_status=$?
13925   echo "$as_me:13925: \$? = $ac_status" >&5
13926   (exit "$ac_status"); }; }; then
13927   :
13928 else
13929   echo "$as_me: program exited with status $ac_status" >&5
13930 echo "$as_me: failed program was:" >&5
13931 cat "conftest.$ac_ext" >&5
13932 ac_cv_header_stdc=no
13933 fi
13934 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
13935 fi
13936 fi
13937 fi
13938 echo "$as_me:13938: result: $ac_cv_header_stdc" >&5
13939 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13940 if test $ac_cv_header_stdc = yes; then
13941
13942 cat >>confdefs.h <<\EOF
13943 #define STDC_HEADERS 1
13944 EOF
13945
13946 fi
13947
13948 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13949
13950 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13951                   inttypes.h stdint.h unistd.h
13952 do
13953 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13954 echo "$as_me:13954: checking for $ac_header" >&5
13955 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13956 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13957   echo $ECHO_N "(cached) $ECHO_C" >&6
13958 else
13959   cat >"conftest.$ac_ext" <<_ACEOF
13960 #line 13960 "configure"
13961 #include "confdefs.h"
13962 $ac_includes_default
13963 #include <$ac_header>
13964 _ACEOF
13965 rm -f "conftest.$ac_objext"
13966 if { (eval echo "$as_me:13966: \"$ac_compile\"") >&5
13967   (eval $ac_compile) 2>&5
13968   ac_status=$?
13969   echo "$as_me:13969: \$? = $ac_status" >&5
13970   (exit "$ac_status"); } &&
13971          { ac_try='test -s "conftest.$ac_objext"'
13972   { (eval echo "$as_me:13972: \"$ac_try\"") >&5
13973   (eval $ac_try) 2>&5
13974   ac_status=$?
13975   echo "$as_me:13975: \$? = $ac_status" >&5
13976   (exit "$ac_status"); }; }; then
13977   eval "$as_ac_Header=yes"
13978 else
13979   echo "$as_me: failed program was:" >&5
13980 cat "conftest.$ac_ext" >&5
13981 eval "$as_ac_Header=no"
13982 fi
13983 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13984 fi
13985 echo "$as_me:13985: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
13986 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
13987 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
13988   cat >>confdefs.h <<EOF
13989 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13990 EOF
13991
13992 fi
13993 done
13994
13995 echo "$as_me:13995: checking for signed char" >&5
13996 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13997 if test "${ac_cv_type_signed_char+set}" = set; then
13998   echo $ECHO_N "(cached) $ECHO_C" >&6
13999 else
14000   cat >"conftest.$ac_ext" <<_ACEOF
14001 #line 14001 "configure"
14002 #include "confdefs.h"
14003 $ac_includes_default
14004 int
14005 main (void)
14006 {
14007 if ((signed char *) 0)
14008   return 0;
14009 if (sizeof (signed char))
14010   return 0;
14011   ;
14012   return 0;
14013 }
14014 _ACEOF
14015 rm -f "conftest.$ac_objext"
14016 if { (eval echo "$as_me:14016: \"$ac_compile\"") >&5
14017   (eval $ac_compile) 2>&5
14018   ac_status=$?
14019   echo "$as_me:14019: \$? = $ac_status" >&5
14020   (exit "$ac_status"); } &&
14021          { ac_try='test -s "conftest.$ac_objext"'
14022   { (eval echo "$as_me:14022: \"$ac_try\"") >&5
14023   (eval $ac_try) 2>&5
14024   ac_status=$?
14025   echo "$as_me:14025: \$? = $ac_status" >&5
14026   (exit "$ac_status"); }; }; then
14027   ac_cv_type_signed_char=yes
14028 else
14029   echo "$as_me: failed program was:" >&5
14030 cat "conftest.$ac_ext" >&5
14031 ac_cv_type_signed_char=no
14032 fi
14033 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14034 fi
14035 echo "$as_me:14035: result: $ac_cv_type_signed_char" >&5
14036 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14037
14038 echo "$as_me:14038: checking size of signed char" >&5
14039 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14040 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14041   echo $ECHO_N "(cached) $ECHO_C" >&6
14042 else
14043   if test "$ac_cv_type_signed_char" = yes; then
14044   if test "$cross_compiling" = yes; then
14045   # Depending upon the size, compute the lo and hi bounds.
14046 cat >"conftest.$ac_ext" <<_ACEOF
14047 #line 14047 "configure"
14048 #include "confdefs.h"
14049 $ac_includes_default
14050 int
14051 main (void)
14052 {
14053 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14054   ;
14055   return 0;
14056 }
14057 _ACEOF
14058 rm -f "conftest.$ac_objext"
14059 if { (eval echo "$as_me:14059: \"$ac_compile\"") >&5
14060   (eval $ac_compile) 2>&5
14061   ac_status=$?
14062   echo "$as_me:14062: \$? = $ac_status" >&5
14063   (exit "$ac_status"); } &&
14064          { ac_try='test -s "conftest.$ac_objext"'
14065   { (eval echo "$as_me:14065: \"$ac_try\"") >&5
14066   (eval $ac_try) 2>&5
14067   ac_status=$?
14068   echo "$as_me:14068: \$? = $ac_status" >&5
14069   (exit "$ac_status"); }; }; then
14070   ac_lo=0 ac_mid=0
14071   while :; do
14072     cat >"conftest.$ac_ext" <<_ACEOF
14073 #line 14073 "configure"
14074 #include "confdefs.h"
14075 $ac_includes_default
14076 int
14077 main (void)
14078 {
14079 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14080   ;
14081   return 0;
14082 }
14083 _ACEOF
14084 rm -f "conftest.$ac_objext"
14085 if { (eval echo "$as_me:14085: \"$ac_compile\"") >&5
14086   (eval $ac_compile) 2>&5
14087   ac_status=$?
14088   echo "$as_me:14088: \$? = $ac_status" >&5
14089   (exit "$ac_status"); } &&
14090          { ac_try='test -s "conftest.$ac_objext"'
14091   { (eval echo "$as_me:14091: \"$ac_try\"") >&5
14092   (eval $ac_try) 2>&5
14093   ac_status=$?
14094   echo "$as_me:14094: \$? = $ac_status" >&5
14095   (exit "$ac_status"); }; }; then
14096   ac_hi=$ac_mid; break
14097 else
14098   echo "$as_me: failed program was:" >&5
14099 cat "conftest.$ac_ext" >&5
14100 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14101 fi
14102 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14103   done
14104 else
14105   echo "$as_me: failed program was:" >&5
14106 cat "conftest.$ac_ext" >&5
14107 ac_hi=-1 ac_mid=-1
14108   while :; do
14109     cat >"conftest.$ac_ext" <<_ACEOF
14110 #line 14110 "configure"
14111 #include "confdefs.h"
14112 $ac_includes_default
14113 int
14114 main (void)
14115 {
14116 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14117   ;
14118   return 0;
14119 }
14120 _ACEOF
14121 rm -f "conftest.$ac_objext"
14122 if { (eval echo "$as_me:14122: \"$ac_compile\"") >&5
14123   (eval $ac_compile) 2>&5
14124   ac_status=$?
14125   echo "$as_me:14125: \$? = $ac_status" >&5
14126   (exit "$ac_status"); } &&
14127          { ac_try='test -s "conftest.$ac_objext"'
14128   { (eval echo "$as_me:14128: \"$ac_try\"") >&5
14129   (eval $ac_try) 2>&5
14130   ac_status=$?
14131   echo "$as_me:14131: \$? = $ac_status" >&5
14132   (exit "$ac_status"); }; }; then
14133   ac_lo=$ac_mid; break
14134 else
14135   echo "$as_me: failed program was:" >&5
14136 cat "conftest.$ac_ext" >&5
14137 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14138 fi
14139 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14140   done
14141 fi
14142 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14143 # Binary search between lo and hi bounds.
14144 while test "x$ac_lo" != "x$ac_hi"; do
14145   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14146   cat >"conftest.$ac_ext" <<_ACEOF
14147 #line 14147 "configure"
14148 #include "confdefs.h"
14149 $ac_includes_default
14150 int
14151 main (void)
14152 {
14153 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14154   ;
14155   return 0;
14156 }
14157 _ACEOF
14158 rm -f "conftest.$ac_objext"
14159 if { (eval echo "$as_me:14159: \"$ac_compile\"") >&5
14160   (eval $ac_compile) 2>&5
14161   ac_status=$?
14162   echo "$as_me:14162: \$? = $ac_status" >&5
14163   (exit "$ac_status"); } &&
14164          { ac_try='test -s "conftest.$ac_objext"'
14165   { (eval echo "$as_me:14165: \"$ac_try\"") >&5
14166   (eval $ac_try) 2>&5
14167   ac_status=$?
14168   echo "$as_me:14168: \$? = $ac_status" >&5
14169   (exit "$ac_status"); }; }; then
14170   ac_hi=$ac_mid
14171 else
14172   echo "$as_me: failed program was:" >&5
14173 cat "conftest.$ac_ext" >&5
14174 ac_lo=`expr "$ac_mid" + 1`
14175 fi
14176 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14177 done
14178 ac_cv_sizeof_signed_char=$ac_lo
14179 else
14180   if test "$cross_compiling" = yes; then
14181   { { echo "$as_me:14181: error: cannot run test program while cross compiling" >&5
14182 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14183    { (exit 1); exit 1; }; }
14184 else
14185   cat >"conftest.$ac_ext" <<_ACEOF
14186 #line 14186 "configure"
14187 #include "confdefs.h"
14188 $ac_includes_default
14189 int
14190 main (void)
14191 {
14192 FILE *f = fopen ("conftest.val", "w");
14193 if (!f)
14194   $ac_main_return (1);
14195 fprintf (f, "%ld", (long)(sizeof (signed char)));
14196 fclose (f);
14197   ;
14198   return 0;
14199 }
14200 _ACEOF
14201 rm -f "conftest$ac_exeext"
14202 if { (eval echo "$as_me:14202: \"$ac_link\"") >&5
14203   (eval $ac_link) 2>&5
14204   ac_status=$?
14205   echo "$as_me:14205: \$? = $ac_status" >&5
14206   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14207   { (eval echo "$as_me:14207: \"$ac_try\"") >&5
14208   (eval $ac_try) 2>&5
14209   ac_status=$?
14210   echo "$as_me:14210: \$? = $ac_status" >&5
14211   (exit "$ac_status"); }; }; then
14212   ac_cv_sizeof_signed_char=`cat conftest.val`
14213 else
14214   echo "$as_me: program exited with status $ac_status" >&5
14215 echo "$as_me: failed program was:" >&5
14216 cat "conftest.$ac_ext" >&5
14217 fi
14218 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14219 fi
14220 fi
14221 rm -f conftest.val
14222 else
14223   ac_cv_sizeof_signed_char=0
14224 fi
14225 fi
14226 echo "$as_me:14226: result: $ac_cv_sizeof_signed_char" >&5
14227 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14228 cat >>confdefs.h <<EOF
14229 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14230 EOF
14231
14232 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14233         NCURSES_SBOOL="signed char"
14234 else
14235         NCURSES_SBOOL="char"
14236 fi
14237 echo "$as_me:14237: checking if you want to use signed Boolean array in term.h" >&5
14238 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14239
14240 # Check whether --enable-signed-char or --disable-signed-char was given.
14241 if test "${enable_signed_char+set}" = set; then
14242   enableval="$enable_signed_char"
14243   with_signed_char=$enableval
14244 else
14245   with_signed_char=no
14246 fi;
14247 echo "$as_me:14247: result: $with_signed_char" >&5
14248 echo "${ECHO_T}$with_signed_char" >&6
14249 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14250
14251 ###   use option --with-tparm-arg to override tparm's argument type
14252 echo "$as_me:14252: checking for type of tparm args" >&5
14253 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14254
14255 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14256 if test "${with_tparm_arg+set}" = set; then
14257   withval="$with_tparm_arg"
14258   NCURSES_TPARM_ARG="$withval"
14259 else
14260   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14261 fi;
14262 echo "$as_me:14262: result: $NCURSES_TPARM_ARG" >&5
14263 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14264
14265 ### Enable compiling-in rcs id's
14266 echo "$as_me:14266: checking if RCS identifiers should be compiled-in" >&5
14267 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14268
14269 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14270 if test "${with_rcs_ids+set}" = set; then
14271   withval="$with_rcs_ids"
14272   with_rcs_ids=$withval
14273 else
14274   with_rcs_ids=no
14275 fi;
14276 echo "$as_me:14276: result: $with_rcs_ids" >&5
14277 echo "${ECHO_T}$with_rcs_ids" >&6
14278 test "x$with_rcs_ids" = xyes &&
14279 cat >>confdefs.h <<\EOF
14280 #define USE_RCS_IDS 1
14281 EOF
14282
14283 ###############################################################################
14284
14285 echo "$as_me:14285: checking format of man-pages" >&5
14286 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14287
14288 # Check whether --with-manpage-format or --without-manpage-format was given.
14289 if test "${with_manpage_format+set}" = set; then
14290   withval="$with_manpage_format"
14291   MANPAGE_FORMAT=$withval
14292 else
14293   MANPAGE_FORMAT=unknown
14294 fi;
14295
14296 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14297 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14298
14299 cf_unknown=
14300
14301 case "$MANPAGE_FORMAT" in
14302 (unknown)
14303         if test -z "$MANPATH" ; then
14304                 MANPATH="/usr/man:/usr/share/man"
14305         fi
14306
14307         # look for the 'date' man-page (it's most likely to be installed!)
14308         MANPAGE_FORMAT=
14309         cf_preform="no"
14310         cf_catonly="yes"
14311         cf_example="date"
14312
14313         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14314         for cf_dir in $MANPATH; do
14315                 test -z "$cf_dir" && cf_dir=/usr/man
14316                 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
14317                 do
14318                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14319                         if test "x$cf_test" = "x$cf_name" ; then
14320
14321                                 case "$cf_name" in
14322                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14323                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14324                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14325                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14326                                 esac
14327
14328                                 case "$cf_name" in
14329                                 ($cf_dir/man*)
14330                                         cf_catonly=no
14331                                         ;;
14332                                 ($cf_dir/cat*)
14333                                         cf_preform=yes
14334                                         ;;
14335                                 esac
14336                                 break
14337                         fi
14338
14339                         # if we found a match in either man* or cat*, stop looking
14340                         if test -n "$MANPAGE_FORMAT" ; then
14341                                 cf_found=no
14342                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14343                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14344                                 case "$cf_name" in
14345                                 ($cf_dir/cat*)
14346                                         cf_found=yes
14347                                         ;;
14348                                 esac
14349                                 test "$cf_found" = yes && break
14350                         fi
14351                 done
14352                 # only check the first directory in $MANPATH where we find manpages
14353                 if test -n "$MANPAGE_FORMAT" ; then
14354                         break
14355                 fi
14356         done
14357         # if we did not find the example, just assume it is normal
14358         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14359         IFS="$ac_save_ifs"
14360         ;;
14361 (*)
14362         for cf_option in $MANPAGE_FORMAT; do
14363         case "$cf_option" in
14364         (gzip|compress|BSDI|normal|formatted|catonly)
14365                 ;;
14366         (*)
14367                 cf_unknown="$cf_unknown $cf_option"
14368                 ;;
14369         esac
14370         done
14371         ;;
14372 esac
14373
14374 echo "$as_me:14374: result: $MANPAGE_FORMAT" >&5
14375 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14376 if test -n "$cf_unknown" ; then
14377         { echo "$as_me:14377: WARNING: Unexpected manpage-format $cf_unknown" >&5
14378 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14379 fi
14380
14381 echo "$as_me:14381: checking for manpage renaming" >&5
14382 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14383
14384 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14385 if test "${with_manpage_renames+set}" = set; then
14386   withval="$with_manpage_renames"
14387   MANPAGE_RENAMES=$withval
14388 else
14389   MANPAGE_RENAMES=yes
14390 fi;
14391
14392 case ".$MANPAGE_RENAMES" in
14393 (.no)
14394         ;;
14395 (.|.yes)
14396         # Debian 'man' program?
14397         if test -f /etc/debian_version ; then
14398                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14399         else
14400                 MANPAGE_RENAMES=no
14401         fi
14402         ;;
14403 esac
14404
14405 if test "$MANPAGE_RENAMES" != no ; then
14406         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14407                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14408         elif test ! -f "$MANPAGE_RENAMES" ; then
14409                 { { echo "$as_me:14409: error: not a filename: $MANPAGE_RENAMES" >&5
14410 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14411    { (exit 1); exit 1; }; }
14412         fi
14413
14414         test ! -d man && mkdir man
14415
14416         # Construct a sed-script to perform renaming within man-pages
14417         if test -n "$MANPAGE_RENAMES" ; then
14418                 test ! -d man && mkdir man
14419                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14420         fi
14421 fi
14422
14423 echo "$as_me:14423: result: $MANPAGE_RENAMES" >&5
14424 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14425
14426 echo "$as_me:14426: checking if manpage aliases will be installed" >&5
14427 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14428
14429 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14430 if test "${with_manpage_aliases+set}" = set; then
14431   withval="$with_manpage_aliases"
14432   MANPAGE_ALIASES=$withval
14433 else
14434   MANPAGE_ALIASES=yes
14435 fi;
14436
14437 echo "$as_me:14437: result: $MANPAGE_ALIASES" >&5
14438 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14439
14440 case "x$LN_S" in
14441 (xln*)
14442         cf_use_symlinks=yes
14443         ;;
14444 (*)
14445         cf_use_symlinks=no
14446         ;;
14447 esac
14448
14449 MANPAGE_SYMLINKS=no
14450 if test "$MANPAGE_ALIASES" = yes ; then
14451 echo "$as_me:14451: checking if manpage symlinks should be used" >&5
14452 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14453
14454 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14455 if test "${with_manpage_symlinks+set}" = set; then
14456   withval="$with_manpage_symlinks"
14457   MANPAGE_SYMLINKS=$withval
14458 else
14459   MANPAGE_SYMLINKS=$cf_use_symlinks
14460 fi;
14461
14462 if test "$$cf_use_symlinks" = no; then
14463 if test "$MANPAGE_SYMLINKS" = yes ; then
14464         { echo "$as_me:14464: WARNING: cannot make symlinks" >&5
14465 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14466         MANPAGE_SYMLINKS=no
14467 fi
14468 fi
14469
14470 echo "$as_me:14470: result: $MANPAGE_SYMLINKS" >&5
14471 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14472 fi
14473
14474 echo "$as_me:14474: checking for manpage tbl" >&5
14475 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14476
14477 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14478 if test "${with_manpage_tbl+set}" = set; then
14479   withval="$with_manpage_tbl"
14480   MANPAGE_TBL=$withval
14481 else
14482   MANPAGE_TBL=no
14483 fi;
14484
14485 echo "$as_me:14485: result: $MANPAGE_TBL" >&5
14486 echo "${ECHO_T}$MANPAGE_TBL" >&6
14487
14488 if test "$prefix" = "NONE" ; then
14489         cf_prefix="$ac_default_prefix"
14490 else
14491         cf_prefix="$prefix"
14492 fi
14493
14494 case "$MANPAGE_FORMAT" in
14495 (*catonly*)
14496         cf_format=yes
14497         cf_inboth=no
14498         ;;
14499 (*formatted*)
14500         cf_format=yes
14501         cf_inboth=yes
14502         ;;
14503 (*)
14504         cf_format=no
14505         cf_inboth=no
14506         ;;
14507 esac
14508
14509 test ! -d man && mkdir man
14510
14511 cf_so_strip=
14512 cf_compress=
14513 case "$MANPAGE_FORMAT" in
14514 (*compress*)
14515         cf_so_strip="Z"
14516         cf_compress=compress
14517         ;;
14518 (*gzip*)
14519         cf_so_strip="gz"
14520         cf_compress=gzip
14521         ;;
14522 esac
14523
14524 cf_edit_man=./edit_man.sh
14525 cf_man_alias=`pwd`/man_alias.sed
14526
14527 cat >$cf_edit_man <<CF_EOF
14528 #! $SHELL
14529 # this script is generated by the configure-script CF_MAN_PAGES macro.
14530
14531 prefix="$cf_prefix"
14532 datarootdir="$datarootdir"
14533 datadir="$datadir"
14534
14535 NCURSES_MAJOR="$NCURSES_MAJOR"
14536 NCURSES_MINOR="$NCURSES_MINOR"
14537 NCURSES_PATCH="$NCURSES_PATCH"
14538
14539 NCURSES_OSPEED="$NCURSES_OSPEED"
14540 TERMINFO="$TERMINFO"
14541
14542 INSTALL="$INSTALL"
14543 INSTALL_DATA="$INSTALL_DATA"
14544
14545 transform="$program_transform_name"
14546
14547 TMP=\${TMPDIR:=/tmp}/man\$\$
14548 trap "rm -f \$TMP" 0 1 2 3 15
14549
14550 form=\$1
14551 shift || exit 1
14552
14553 verb=\$1
14554 shift || exit 1
14555
14556 mandir=\$1
14557 shift || exit 1
14558
14559 srcdir=\$1
14560 top_srcdir=\$srcdir/..
14561 shift || exit 1
14562
14563 if test "\$form" = normal ; then
14564         if test "$cf_format" = yes ; then
14565         if test "$cf_inboth" = no ; then
14566                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14567                 exit $?
14568         fi
14569         fi
14570         cf_subdir=\$mandir/man
14571         cf_tables=$MANPAGE_TBL
14572 else
14573         cf_subdir=\$mandir/cat
14574         cf_tables=yes
14575 fi
14576
14577 # process the list of source-files
14578 for i in "\$@" ; do
14579 case \$i in
14580 (*.orig|*.rej) ;;
14581 (*.[0-9]*)
14582         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14583         if test "\$verb" = installing ; then
14584         if test ! -d "\$cf_subdir\${section}" ; then
14585                 mkdir -p "\$cf_subdir\$section"
14586         fi
14587         fi
14588
14589         # replace variables in man page
14590         if test ! -f "$cf_man_alias" ; then
14591 cat >>$cf_man_alias <<-CF_EOF2
14592                 s,@DATADIR@,\$datadir,g
14593                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14594                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14595                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14596                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14597                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14598                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14599 CF_EOF
14600
14601         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14602         do
14603                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14604                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14605 cat >>$cf_edit_man <<-CF_EOF
14606                 s,@$cf_NAME@,$cf_name,g
14607 CF_EOF
14608         done
14609
14610 cat >>$cf_edit_man <<CF_EOF
14611 CF_EOF2
14612                 echo "...made $cf_man_alias"
14613         fi
14614
14615         aliases=
14616         cf_source=\`basename "\$i"\`
14617         inalias=\$cf_source
14618         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14619         if test ! -f "\$inalias" ; then
14620                 echo ".. skipped \$cf_source"
14621                 continue
14622         fi
14623 CF_EOF
14624
14625 if test "$MANPAGE_ALIASES" != no ; then
14626 cat >>$cf_edit_man <<CF_EOF
14627         nCurses=ignore.3x
14628         test "$with_curses_h" = yes && nCurses=ncurses.3x
14629         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14630 CF_EOF
14631 fi
14632
14633 if test "$MANPAGE_RENAMES" = no ; then
14634 cat >>$cf_edit_man <<CF_EOF
14635         # perform program transformations for section 1 man pages
14636         if test \$section = 1 ; then
14637                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14638         else
14639                 cf_target=\$cf_subdir\${section}/\$cf_source
14640         fi
14641 CF_EOF
14642 else
14643 cat >>$cf_edit_man <<CF_EOF
14644         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14645         if test -z "\$cf_target" ; then
14646                 echo "? missing rename for \$cf_source"
14647                 cf_target="\$cf_source"
14648         fi
14649         cf_target="\$cf_subdir\${section}/\${cf_target}"
14650
14651 CF_EOF
14652 fi
14653
14654 cat >>$cf_edit_man <<CF_EOF
14655         sed     -f "$cf_man_alias" \\
14656 CF_EOF
14657
14658 if test -f "$MANPAGE_RENAMES" ; then
14659 cat >>$cf_edit_man <<CF_EOF
14660                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14661 CF_EOF
14662 else
14663 cat >>$cf_edit_man <<CF_EOF
14664                 < "\$i" >\$TMP
14665 CF_EOF
14666 fi
14667
14668 cat >>$cf_edit_man <<CF_EOF
14669 if test \$cf_tables = yes ; then
14670         tbl \$TMP >\$TMP.out
14671         mv \$TMP.out \$TMP
14672 fi
14673 CF_EOF
14674
14675 if test "$with_overwrite" != yes ; then
14676 cat >>$cf_edit_man <<CF_EOF
14677         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14678         mv \$TMP.out \$TMP
14679 CF_EOF
14680 fi
14681
14682 if test "$with_curses_h" != yes ; then
14683 cat >>$cf_edit_man <<CF_EOF
14684         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14685         mv \$TMP.out \$TMP
14686 CF_EOF
14687 fi
14688
14689 cat >>$cf_edit_man <<CF_EOF
14690         if test "\$form" = format ; then
14691                 nroff -man \$TMP >\$TMP.out
14692                 mv \$TMP.out \$TMP
14693         fi
14694 CF_EOF
14695
14696 if test -n "$cf_compress" ; then
14697 cat >>$cf_edit_man <<CF_EOF
14698         if test "\$verb" = installing ; then
14699         if ( "$cf_compress" -f \$TMP )
14700         then
14701                 mv \$TMP.$cf_so_strip \$TMP
14702         fi
14703         fi
14704         cf_target="\$cf_target.$cf_so_strip"
14705 CF_EOF
14706 fi
14707
14708 case "$MANPAGE_FORMAT" in
14709 (*BSDI*)
14710 cat >>$cf_edit_man <<CF_EOF
14711         if test "\$form" = format ; then
14712                 # BSDI installs only .0 suffixes in the cat directories
14713                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14714         fi
14715 CF_EOF
14716   ;;
14717 esac
14718
14719 cat >>$cf_edit_man <<CF_EOF
14720         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14721         if test "\$verb" = installing ; then
14722                 echo "\$verb \$cf_target"
14723                 \$INSTALL_DATA \$TMP "\$cf_target"
14724                 test -d "\$cf_subdir\${section}" &&
14725                 test -n "\$aliases" && (
14726                         cd "\$cf_subdir\${section}" && (
14727                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14728                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14729                                 cf_target=\`basename "\$cf_target"\`
14730                                 for cf_alias in \$aliases
14731                                 do
14732                                         if test "\$section" = 1 ; then
14733                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14734                                         fi
14735
14736                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14737                                                 if test -f "\$cf_alias\${suffix}" ; then
14738                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14739                                                         then
14740                                                                 continue
14741                                                         fi
14742                                                 fi
14743                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14744 CF_EOF
14745 case "x$LN_S" in
14746 (*-f)
14747 cat >>$cf_edit_man <<CF_EOF
14748                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14749 CF_EOF
14750         ;;
14751 (*)
14752 cat >>$cf_edit_man <<CF_EOF
14753                                                 rm -f "\$cf_alias\${suffix}"
14754                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14755 CF_EOF
14756         ;;
14757 esac
14758 cat >>$cf_edit_man <<CF_EOF
14759                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14760                                                 echo ".so \$cf_source" >\$TMP
14761 CF_EOF
14762 if test -n "$cf_compress" ; then
14763 cat >>$cf_edit_man <<CF_EOF
14764                                                 if test -n "$cf_so_strip" ; then
14765                                                         "$cf_compress" -f \$TMP
14766                                                         mv \$TMP.$cf_so_strip \$TMP
14767                                                 fi
14768 CF_EOF
14769 fi
14770 cat >>$cf_edit_man <<CF_EOF
14771                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14772                                                 rm -f "\$cf_alias\${suffix}"
14773                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
14774                                         fi
14775                                 done
14776                         )
14777                 )
14778         elif test "\$verb" = removing ; then
14779                 test -f "\$cf_target" && (
14780                         echo "\$verb \$cf_target"
14781                         rm -f "\$cf_target"
14782                 )
14783                 test -d "\$cf_subdir\${section}" &&
14784                 test -n "\$aliases" && (
14785                         cd "\$cf_subdir\${section}" && (
14786                                 for cf_alias in \$aliases
14787                                 do
14788                                         if test "\$section" = 1 ; then
14789                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14790                                         fi
14791
14792                                         echo ".. \$verb alias \$cf_alias\${suffix}"
14793                                         rm -f "\$cf_alias\${suffix}"
14794                                 done
14795                         )
14796                 )
14797         else
14798 #               echo ".hy 0"
14799                 cat \$TMP
14800         fi
14801         ;;
14802 esac
14803 done
14804
14805 if test "$cf_inboth" = yes ; then
14806 if test "\$form" != format ; then
14807         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14808 fi
14809 fi
14810
14811 exit 0
14812 CF_EOF
14813 chmod 755 "$cf_edit_man"
14814
14815 ###############################################################################
14816
14817 ### Note that some functions (such as const) are normally disabled anyway.
14818 echo "$as_me:14818: checking if you want to build with function extensions" >&5
14819 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14820
14821 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14822 if test "${enable_ext_funcs+set}" = set; then
14823   enableval="$enable_ext_funcs"
14824   with_ext_funcs=$enableval
14825 else
14826   with_ext_funcs=yes
14827 fi;
14828 echo "$as_me:14828: result: $with_ext_funcs" >&5
14829 echo "${ECHO_T}$with_ext_funcs" >&6
14830 if test "x$with_ext_funcs" = xyes ; then
14831         NCURSES_EXT_FUNCS=1
14832
14833 cat >>confdefs.h <<\EOF
14834 #define NCURSES_EXT_FUNCS 1
14835 EOF
14836
14837 cat >>confdefs.h <<\EOF
14838 #define HAVE_ASSUME_DEFAULT_COLORS 1
14839 EOF
14840
14841 cat >>confdefs.h <<\EOF
14842 #define HAVE_CURSES_VERSION 1
14843 EOF
14844
14845 cat >>confdefs.h <<\EOF
14846 #define HAVE_HAS_KEY 1
14847 EOF
14848
14849 cat >>confdefs.h <<\EOF
14850 #define HAVE_RESIZETERM 1
14851 EOF
14852
14853 cat >>confdefs.h <<\EOF
14854 #define HAVE_RESIZE_TERM 1
14855 EOF
14856
14857 cat >>confdefs.h <<\EOF
14858 #define HAVE_TERM_ENTRY_H 1
14859 EOF
14860
14861 cat >>confdefs.h <<\EOF
14862 #define HAVE_USE_DEFAULT_COLORS 1
14863 EOF
14864
14865 cat >>confdefs.h <<\EOF
14866 #define HAVE_USE_EXTENDED_NAMES 1
14867 EOF
14868
14869 cat >>confdefs.h <<\EOF
14870 #define HAVE_USE_SCREEN 1
14871 EOF
14872
14873 cat >>confdefs.h <<\EOF
14874 #define HAVE_USE_WINDOW 1
14875 EOF
14876
14877 cat >>confdefs.h <<\EOF
14878 #define HAVE_WRESIZE 1
14879 EOF
14880
14881         GENERATED_EXT_FUNCS=generated
14882         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14883 else
14884         NCURSES_EXT_FUNCS=0
14885         GENERATED_EXT_FUNCS=
14886 fi
14887
14888 echo "$as_me:14888: checking if you want to build with SCREEN extensions" >&5
14889 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14890
14891 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14892 if test "${enable_sp_funcs+set}" = set; then
14893   enableval="$enable_sp_funcs"
14894   with_sp_funcs=$enableval
14895 else
14896   with_sp_funcs=$cf_dft_ext_spfuncs
14897 fi;
14898 echo "$as_me:14898: result: $with_sp_funcs" >&5
14899 echo "${ECHO_T}$with_sp_funcs" >&6
14900 if test "x$with_sp_funcs" = xyes ; then
14901         NCURSES_SP_FUNCS=1
14902
14903 cat >>confdefs.h <<\EOF
14904 #define NCURSES_SP_FUNCS 1
14905 EOF
14906
14907 cat >>confdefs.h <<\EOF
14908 #define HAVE_TPUTS_SP 1
14909 EOF
14910
14911         GENERATED_SP_FUNCS=generated
14912 else
14913         NCURSES_SP_FUNCS=0
14914         GENERATED_SP_FUNCS=
14915 fi
14916
14917 echo "$as_me:14917: checking if you want to build with terminal-driver" >&5
14918 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14919
14920 # Check whether --enable-term-driver or --disable-term-driver was given.
14921 if test "${enable_term_driver+set}" = set; then
14922   enableval="$enable_term_driver"
14923   with_term_driver=$enableval
14924 else
14925   with_term_driver=no
14926 fi;
14927 echo "$as_me:14927: result: $with_term_driver" >&5
14928 echo "${ECHO_T}$with_term_driver" >&6
14929 if test "x$with_term_driver" = xyes ; then
14930
14931 cat >>confdefs.h <<\EOF
14932 #define USE_TERM_DRIVER 1
14933 EOF
14934
14935         if test "x$with_termlib" != xno ; then
14936                 { { echo "$as_me:14936: error: The term-driver option conflicts with the termlib option" >&5
14937 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14938    { (exit 1); exit 1; }; }
14939         fi
14940         if test "x$with_sp_funcs" != xyes ; then
14941                 { { echo "$as_me:14941: error: The term-driver option relies upon sp-funcs" >&5
14942 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14943    { (exit 1); exit 1; }; }
14944         fi
14945 fi
14946
14947 ###   use option --enable-const to turn on use of const beyond that in XSI.
14948 echo "$as_me:14948: checking for extended use of const keyword" >&5
14949 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14950
14951 # Check whether --enable-const or --disable-const was given.
14952 if test "${enable_const+set}" = set; then
14953   enableval="$enable_const"
14954   with_ext_const=$enableval
14955 else
14956   with_ext_const=$cf_dft_ext_const
14957 fi;
14958 echo "$as_me:14958: result: $with_ext_const" >&5
14959 echo "${ECHO_T}$with_ext_const" >&6
14960 NCURSES_CONST='/*nothing*/'
14961 if test "x$with_ext_const" = xyes ; then
14962         NCURSES_CONST=const
14963 fi
14964
14965 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14966 echo "$as_me:14966: checking if you want to use extended colors" >&5
14967 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14968
14969 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14970 if test "${enable_ext_colors+set}" = set; then
14971   enableval="$enable_ext_colors"
14972   with_ext_colors=$enableval
14973 else
14974   with_ext_colors=$cf_dft_ext_colors
14975 fi;
14976 echo "$as_me:14976: result: $with_ext_colors" >&5
14977 echo "${ECHO_T}$with_ext_colors" >&6
14978 NCURSES_EXT_COLORS=0
14979 if test "x$with_ext_colors" = xyes ; then
14980         if test "x$with_widec" != xyes ; then
14981                 { echo "$as_me:14981: WARNING: This option applies only to wide-character library" >&5
14982 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14983         else
14984                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14985
14986 if test "${with_abi_version+set}" != set; then
14987         case "$cf_cv_rel_version" in
14988         (5.*)
14989                 cf_cv_rel_version=6.0
14990                 cf_cv_abi_version=6
14991                 { echo "$as_me:14991: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14992 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14993                 ;;
14994         esac
14995 fi
14996
14997                 NCURSES_EXT_COLORS=1
14998
14999 cat >>confdefs.h <<\EOF
15000 #define NCURSES_EXT_COLORS 1
15001 EOF
15002
15003 cat >>confdefs.h <<\EOF
15004 #define HAVE_ALLOC_PAIR 1
15005 EOF
15006
15007 cat >>confdefs.h <<\EOF
15008 #define HAVE_INIT_EXTENDED_COLOR 1
15009 EOF
15010
15011 cat >>confdefs.h <<\EOF
15012 #define HAVE_RESET_COLOR_PAIRS 1
15013 EOF
15014
15015         fi
15016 fi
15017
15018 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15019 echo "$as_me:15019: checking if you want to use extended mouse encoding" >&5
15020 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15021
15022 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15023 if test "${enable_ext_mouse+set}" = set; then
15024   enableval="$enable_ext_mouse"
15025   with_ext_mouse=$enableval
15026 else
15027   with_ext_mouse=$cf_dft_ext_mouse
15028 fi;
15029 echo "$as_me:15029: result: $with_ext_mouse" >&5
15030 echo "${ECHO_T}$with_ext_mouse" >&6
15031 NCURSES_MOUSE_VERSION=1
15032 if test "x$with_ext_mouse" = xyes ; then
15033         NCURSES_MOUSE_VERSION=2
15034
15035 if test "${with_abi_version+set}" != set; then
15036         case "$cf_cv_rel_version" in
15037         (5.*)
15038                 cf_cv_rel_version=6.0
15039                 cf_cv_abi_version=6
15040                 { echo "$as_me:15040: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15041 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15042                 ;;
15043         esac
15044 fi
15045
15046 fi
15047
15048 ###   use option --enable-ext-putwin to turn on extended screendumps
15049 echo "$as_me:15049: checking if you want to use extended putwin/screendump" >&5
15050 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15051
15052 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15053 if test "${enable_ext_putwin+set}" = set; then
15054   enableval="$enable_ext_putwin"
15055   with_ext_putwin=$enableval
15056 else
15057   with_ext_putwin=$cf_dft_ext_putwin
15058 fi;
15059 echo "$as_me:15059: result: $with_ext_putwin" >&5
15060 echo "${ECHO_T}$with_ext_putwin" >&6
15061 if test "x$with_ext_putwin" = xyes ; then
15062
15063 cat >>confdefs.h <<\EOF
15064 #define NCURSES_EXT_PUTWIN 1
15065 EOF
15066
15067 fi
15068
15069 echo "$as_me:15069: checking if you want \$NCURSES_NO_PADDING code" >&5
15070 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15071
15072 # Check whether --enable-no-padding or --disable-no-padding was given.
15073 if test "${enable_no_padding+set}" = set; then
15074   enableval="$enable_no_padding"
15075   with_no_padding=$enableval
15076 else
15077   with_no_padding=$with_ext_funcs
15078 fi;
15079 echo "$as_me:15079: result: $with_no_padding" >&5
15080 echo "${ECHO_T}$with_no_padding" >&6
15081 test "x$with_no_padding" = xyes &&
15082 cat >>confdefs.h <<\EOF
15083 #define NCURSES_NO_PADDING 1
15084 EOF
15085
15086 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15087 echo "$as_me:15087: checking if you want SIGWINCH handler" >&5
15088 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15089
15090 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15091 if test "${enable_sigwinch+set}" = set; then
15092   enableval="$enable_sigwinch"
15093   with_sigwinch=$enableval
15094 else
15095   with_sigwinch=$with_ext_funcs
15096 fi;
15097 echo "$as_me:15097: result: $with_sigwinch" >&5
15098 echo "${ECHO_T}$with_sigwinch" >&6
15099 test "x$with_sigwinch" = xyes &&
15100 cat >>confdefs.h <<\EOF
15101 #define USE_SIGWINCH 1
15102 EOF
15103
15104 ###   use option --enable-tcap-names to allow user to define new capabilities
15105 echo "$as_me:15105: checking if you want user-definable terminal capabilities like termcap" >&5
15106 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15107
15108 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15109 if test "${enable_tcap_names+set}" = set; then
15110   enableval="$enable_tcap_names"
15111   with_tcap_names=$enableval
15112 else
15113   with_tcap_names=$with_ext_funcs
15114 fi;
15115 echo "$as_me:15115: result: $with_tcap_names" >&5
15116 echo "${ECHO_T}$with_tcap_names" >&6
15117 NCURSES_XNAMES=0
15118 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15119
15120 ##############################################################################
15121
15122 echo "$as_me:15122: checking if you want to link with the pthread library" >&5
15123 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15124
15125 # Check whether --with-pthread or --without-pthread was given.
15126 if test "${with_pthread+set}" = set; then
15127   withval="$with_pthread"
15128   with_pthread=$withval
15129 else
15130   with_pthread=no
15131 fi;
15132 echo "$as_me:15132: result: $with_pthread" >&5
15133 echo "${ECHO_T}$with_pthread" >&6
15134
15135 if test "$with_pthread" != no ; then
15136         echo "$as_me:15136: checking for pthread.h" >&5
15137 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15138 if test "${ac_cv_header_pthread_h+set}" = set; then
15139   echo $ECHO_N "(cached) $ECHO_C" >&6
15140 else
15141   cat >"conftest.$ac_ext" <<_ACEOF
15142 #line 15142 "configure"
15143 #include "confdefs.h"
15144 #include <pthread.h>
15145 _ACEOF
15146 if { (eval echo "$as_me:15146: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15147   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15148   ac_status=$?
15149   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15150   rm -f conftest.er1
15151   cat conftest.err >&5
15152   echo "$as_me:15152: \$? = $ac_status" >&5
15153   (exit "$ac_status"); } >/dev/null; then
15154   if test -s conftest.err; then
15155     ac_cpp_err=$ac_c_preproc_warn_flag
15156   else
15157     ac_cpp_err=
15158   fi
15159 else
15160   ac_cpp_err=yes
15161 fi
15162 if test -z "$ac_cpp_err"; then
15163   ac_cv_header_pthread_h=yes
15164 else
15165   echo "$as_me: failed program was:" >&5
15166   cat "conftest.$ac_ext" >&5
15167   ac_cv_header_pthread_h=no
15168 fi
15169 rm -f conftest.err "conftest.$ac_ext"
15170 fi
15171 echo "$as_me:15171: result: $ac_cv_header_pthread_h" >&5
15172 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15173 if test "$ac_cv_header_pthread_h" = yes; then
15174
15175 cat >>confdefs.h <<\EOF
15176 #define HAVE_PTHREADS_H 1
15177 EOF
15178
15179         for cf_lib_pthread in pthread c_r
15180         do
15181             echo "$as_me:15181: checking if we can link with the $cf_lib_pthread library" >&5
15182 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15183             cf_save_LIBS="$LIBS"
15184
15185 cf_add_libs="$LIBS"
15186 # reverse order
15187 cf_add_0lib=
15188 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15189 # filter duplicates
15190 for cf_add_1lib in $cf_add_0lib; do
15191         for cf_add_2lib in $cf_add_libs; do
15192                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15193                         cf_add_1lib=
15194                         break
15195                 fi
15196         done
15197         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15198 done
15199 LIBS="$cf_add_libs"
15200
15201             cat >"conftest.$ac_ext" <<_ACEOF
15202 #line 15202 "configure"
15203 #include "confdefs.h"
15204
15205 #include <pthread.h>
15206
15207 int
15208 main (void)
15209 {
15210
15211                 int rc = pthread_create(0,0,0,0);
15212                 int r2 = pthread_mutexattr_settype(0, 0);
15213
15214   ;
15215   return 0;
15216 }
15217 _ACEOF
15218 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15219 if { (eval echo "$as_me:15219: \"$ac_link\"") >&5
15220   (eval $ac_link) 2>&5
15221   ac_status=$?
15222   echo "$as_me:15222: \$? = $ac_status" >&5
15223   (exit "$ac_status"); } &&
15224          { ac_try='test -s "conftest$ac_exeext"'
15225   { (eval echo "$as_me:15225: \"$ac_try\"") >&5
15226   (eval $ac_try) 2>&5
15227   ac_status=$?
15228   echo "$as_me:15228: \$? = $ac_status" >&5
15229   (exit "$ac_status"); }; }; then
15230   with_pthread=yes
15231 else
15232   echo "$as_me: failed program was:" >&5
15233 cat "conftest.$ac_ext" >&5
15234 with_pthread=no
15235 fi
15236 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15237             LIBS="$cf_save_LIBS"
15238             echo "$as_me:15238: result: $with_pthread" >&5
15239 echo "${ECHO_T}$with_pthread" >&6
15240             test "$with_pthread" = yes && break
15241         done
15242
15243         if test "$with_pthread" = yes ; then
15244
15245 cf_add_libs="$LIBS"
15246 # reverse order
15247 cf_add_0lib=
15248 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15249 # filter duplicates
15250 for cf_add_1lib in $cf_add_0lib; do
15251         for cf_add_2lib in $cf_add_libs; do
15252                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15253                         cf_add_1lib=
15254                         break
15255                 fi
15256         done
15257         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15258 done
15259 LIBS="$cf_add_libs"
15260
15261 cat >>confdefs.h <<\EOF
15262 #define HAVE_LIBPTHREADS 1
15263 EOF
15264
15265         else
15266             { { echo "$as_me:15266: error: Cannot link with pthread library" >&5
15267 echo "$as_me: error: Cannot link with pthread library" >&2;}
15268    { (exit 1); exit 1; }; }
15269         fi
15270
15271 fi
15272
15273 fi
15274
15275 if test "x$with_pthread" != xno; then
15276         echo "$as_me:15276: checking for pthread_kill" >&5
15277 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15278 if test "${ac_cv_func_pthread_kill+set}" = set; then
15279   echo $ECHO_N "(cached) $ECHO_C" >&6
15280 else
15281   cat >"conftest.$ac_ext" <<_ACEOF
15282 #line 15282 "configure"
15283 #include "confdefs.h"
15284 #define pthread_kill autoconf_temporary
15285 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15286 #undef pthread_kill
15287
15288 #ifdef __cplusplus
15289 extern "C"
15290 #endif
15291
15292 /* We use char because int might match the return type of a gcc2
15293    builtin and then its argument prototype would still apply.  */
15294 char pthread_kill (void);
15295
15296 int
15297 main (void)
15298 {
15299
15300 /* The GNU C library defines stubs for functions which it implements
15301     to always fail with ENOSYS.  Some functions are actually named
15302     something starting with __ and the normal name is an alias.  */
15303 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15304 #error found stub for pthread_kill
15305 #endif
15306
15307         return pthread_kill ();
15308   ;
15309   return 0;
15310 }
15311 _ACEOF
15312 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15313 if { (eval echo "$as_me:15313: \"$ac_link\"") >&5
15314   (eval $ac_link) 2>&5
15315   ac_status=$?
15316   echo "$as_me:15316: \$? = $ac_status" >&5
15317   (exit "$ac_status"); } &&
15318          { ac_try='test -s "conftest$ac_exeext"'
15319   { (eval echo "$as_me:15319: \"$ac_try\"") >&5
15320   (eval $ac_try) 2>&5
15321   ac_status=$?
15322   echo "$as_me:15322: \$? = $ac_status" >&5
15323   (exit "$ac_status"); }; }; then
15324   ac_cv_func_pthread_kill=yes
15325 else
15326   echo "$as_me: failed program was:" >&5
15327 cat "conftest.$ac_ext" >&5
15328 ac_cv_func_pthread_kill=no
15329 fi
15330 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15331 fi
15332 echo "$as_me:15332: result: $ac_cv_func_pthread_kill" >&5
15333 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15334 if test "$ac_cv_func_pthread_kill" = yes; then
15335
15336                 echo "$as_me:15336: checking if you want to allow EINTR in wgetch with pthreads" >&5
15337 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15338
15339 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15340 if test "${enable_pthreads_eintr+set}" = set; then
15341   enableval="$enable_pthreads_eintr"
15342   use_pthreads_eintr=$enableval
15343 else
15344   use_pthreads_eintr=no
15345 fi;
15346                 echo "$as_me:15346: result: $use_pthreads_eintr" >&5
15347 echo "${ECHO_T}$use_pthreads_eintr" >&6
15348                 if test "x$use_pthreads_eintr" = xyes ; then
15349
15350 cat >>confdefs.h <<\EOF
15351 #define USE_PTHREADS_EINTR 1
15352 EOF
15353
15354                 fi
15355 fi
15356
15357         echo "$as_me:15357: checking if you want to use weak-symbols for pthreads" >&5
15358 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15359
15360 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15361 if test "${enable_weak_symbols+set}" = set; then
15362   enableval="$enable_weak_symbols"
15363   use_weak_symbols=$enableval
15364 else
15365   use_weak_symbols=no
15366 fi;
15367         echo "$as_me:15367: result: $use_weak_symbols" >&5
15368 echo "${ECHO_T}$use_weak_symbols" >&6
15369         if test "x$use_weak_symbols" = xyes ; then
15370
15371 echo "$as_me:15371: checking if $CC supports weak symbols" >&5
15372 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15373 if test "${cf_cv_weak_symbols+set}" = set; then
15374   echo $ECHO_N "(cached) $ECHO_C" >&6
15375 else
15376
15377 cat >"conftest.$ac_ext" <<_ACEOF
15378 #line 15378 "configure"
15379 #include "confdefs.h"
15380
15381 #include <stdio.h>
15382 int
15383 main (void)
15384 {
15385
15386 #if defined(__GNUC__)
15387 #  if defined __USE_ISOC99
15388 #    define _cat_pragma(exp)    _Pragma(#exp)
15389 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15390 #  else
15391 #    define _weak_pragma(exp)
15392 #  endif
15393 #  define _declare(name)        __extension__ extern __typeof__(name) name
15394 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15395 #endif
15396
15397 weak_symbol(fopen);
15398
15399   ;
15400   return 0;
15401 }
15402 _ACEOF
15403 rm -f "conftest.$ac_objext"
15404 if { (eval echo "$as_me:15404: \"$ac_compile\"") >&5
15405   (eval $ac_compile) 2>&5
15406   ac_status=$?
15407   echo "$as_me:15407: \$? = $ac_status" >&5
15408   (exit "$ac_status"); } &&
15409          { ac_try='test -s "conftest.$ac_objext"'
15410   { (eval echo "$as_me:15410: \"$ac_try\"") >&5
15411   (eval $ac_try) 2>&5
15412   ac_status=$?
15413   echo "$as_me:15413: \$? = $ac_status" >&5
15414   (exit "$ac_status"); }; }; then
15415   cf_cv_weak_symbols=yes
15416 else
15417   echo "$as_me: failed program was:" >&5
15418 cat "conftest.$ac_ext" >&5
15419 cf_cv_weak_symbols=no
15420 fi
15421 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15422
15423 fi
15424 echo "$as_me:15424: result: $cf_cv_weak_symbols" >&5
15425 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15426
15427         else
15428                 cf_cv_weak_symbols=no
15429         fi
15430
15431         if test "x$cf_cv_weak_symbols" = xyes ; then
15432
15433 cat >>confdefs.h <<\EOF
15434 #define USE_WEAK_SYMBOLS 1
15435 EOF
15436
15437         fi
15438 fi
15439
15440 PTHREAD=
15441 if test "x$with_pthread" = "xyes" ; then
15442
15443 cat >>confdefs.h <<\EOF
15444 #define USE_PTHREADS 1
15445 EOF
15446
15447         enable_reentrant=yes
15448         if test "x$cf_cv_weak_symbols" = xyes ; then
15449                 PTHREAD=-lpthread
15450
15451 cf_add_libs="$PRIVATE_LIBS"
15452 # reverse order
15453 cf_add_0lib=
15454 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15455 # filter duplicates
15456 for cf_add_1lib in $cf_add_0lib; do
15457         for cf_add_2lib in $cf_add_libs; do
15458                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15459                         cf_add_1lib=
15460                         break
15461                 fi
15462         done
15463         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15464 done
15465 PRIVATE_LIBS="$cf_add_libs"
15466
15467         fi
15468 fi
15469
15470 # Reentrant code has to be opaque; there's little advantage to making ncurses
15471 # opaque outside of that, so there is no --enable-opaque option.  We can use
15472 # this option without --with-pthreads, but this will be always set for
15473 # pthreads.
15474 echo "$as_me:15474: checking if you want reentrant code" >&5
15475 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15476
15477 # Check whether --enable-reentrant or --disable-reentrant was given.
15478 if test "${enable_reentrant+set}" = set; then
15479   enableval="$enable_reentrant"
15480   with_reentrant=$enableval
15481 else
15482   with_reentrant=no
15483 fi;
15484 echo "$as_me:15484: result: $with_reentrant" >&5
15485 echo "${ECHO_T}$with_reentrant" >&6
15486 if test "x$with_reentrant" = xyes ; then
15487         cf_cv_enable_reentrant=1
15488         cf_cv_enable_opaque="NCURSES_INTERNALS"
15489         NCURSES_SIZE_T=int
15490         if test "x$cf_cv_weak_symbols" = xyes ; then
15491
15492 # remove pthread library from $LIBS
15493 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15494
15495 cf_add_libs="$TEST_LIBS"
15496 # reverse order
15497 cf_add_0lib=
15498 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15499 # filter duplicates
15500 for cf_add_1lib in $cf_add_0lib; do
15501         for cf_add_2lib in $cf_add_libs; do
15502                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15503                         cf_add_1lib=
15504                         break
15505                 fi
15506         done
15507         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15508 done
15509 TEST_LIBS="$cf_add_libs"
15510
15511 cf_add_libs="$TEST_LIBS2"
15512 # reverse order
15513 cf_add_0lib=
15514 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15515 # filter duplicates
15516 for cf_add_1lib in $cf_add_0lib; do
15517         for cf_add_2lib in $cf_add_libs; do
15518                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15519                         cf_add_1lib=
15520                         break
15521                 fi
15522         done
15523         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15524 done
15525 TEST_LIBS2="$cf_add_libs"
15526
15527 cf_add_libs="$PRIVATE_LIBS"
15528 # reverse order
15529 cf_add_0lib=
15530 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15531 # filter duplicates
15532 for cf_add_1lib in $cf_add_0lib; do
15533         for cf_add_2lib in $cf_add_libs; do
15534                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15535                         cf_add_1lib=
15536                         break
15537                 fi
15538         done
15539         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15540 done
15541 PRIVATE_LIBS="$cf_add_libs"
15542
15543         else
15544                 # when not using weak symbols but with_reentrant,
15545                 # add 't' to the library suffix on all platforms
15546                 # except cygwin, where we only do that if ALSO
15547                 # compiling with full thread support.
15548                 case "$host" in
15549                 (*cygwin* | *msys*)
15550                         if test "$with_pthread" = "yes" ; then
15551                                 if test "x$disable_lib_suffixes" = "xno" ; then
15552                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15553                                 fi
15554                         fi ;;
15555                 (*)
15556                         if test "x$disable_lib_suffixes" = "xno" ; then
15557                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15558                         fi
15559                         ;;
15560                 esac
15561         fi
15562
15563 cat >>confdefs.h <<\EOF
15564 #define USE_REENTRANT 1
15565 EOF
15566
15567 if test "${with_abi_version+set}" != set; then
15568         case "$cf_cv_rel_version" in
15569         (5.*)
15570                 cf_cv_rel_version=6.0
15571                 cf_cv_abi_version=6
15572                 { echo "$as_me:15572: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15573 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15574                 ;;
15575         esac
15576 fi
15577
15578 else
15579         cf_cv_enable_reentrant=0
15580         cf_cv_enable_opaque="NCURSES_OPAQUE"
15581         NCURSES_SIZE_T=short
15582 fi
15583
15584 echo "$as_me:15584: checking if you want opaque curses-library structures" >&5
15585 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15586
15587 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15588 if test "${enable_opaque_curses+set}" = set; then
15589   enableval="$enable_opaque_curses"
15590   test "$enableval" != yes && enableval=no
15591         if test "$enableval" != "no" ; then
15592     enable_opaque_curses=yes
15593         else
15594
15595          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15596          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15597
15598         fi
15599 else
15600   enableval=no
15601
15602          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15603          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15604
15605 fi;
15606 echo "$as_me:15606: result: $enable_opaque_curses" >&5
15607 echo "${ECHO_T}$enable_opaque_curses" >&6
15608
15609 test "$cf_cv_enable_reentrant" = 1 && \
15610 test "$enable_opaque_curses" = no && \
15611 { { echo "$as_me:15611: error: reentrant configuration requires opaque library" >&5
15612 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15613    { (exit 1); exit 1; }; }
15614
15615 echo "$as_me:15615: checking if you want opaque form-library structures" >&5
15616 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15617
15618 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15619 if test "${enable_opaque_form+set}" = set; then
15620   enableval="$enable_opaque_form"
15621   enable_opaque_form=yes
15622 else
15623   enable_opaque_form=no
15624 fi;
15625 echo "$as_me:15625: result: $enable_opaque_form" >&5
15626 echo "${ECHO_T}$enable_opaque_form" >&6
15627
15628 echo "$as_me:15628: checking if you want opaque menu-library structures" >&5
15629 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15630
15631 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15632 if test "${enable_opaque_menu+set}" = set; then
15633   enableval="$enable_opaque_menu"
15634   enable_opaque_menu=yes
15635 else
15636   enable_opaque_menu=no
15637 fi;
15638 echo "$as_me:15638: result: $enable_opaque_menu" >&5
15639 echo "${ECHO_T}$enable_opaque_menu" >&6
15640
15641 echo "$as_me:15641: checking if you want opaque panel-library structures" >&5
15642 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15643
15644 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15645 if test "${enable_opaque_panel+set}" = set; then
15646   enableval="$enable_opaque_panel"
15647   enable_opaque_panel=yes
15648 else
15649   enable_opaque_panel=no
15650 fi;
15651 echo "$as_me:15651: result: $enable_opaque_panel" >&5
15652 echo "${ECHO_T}$enable_opaque_panel" >&6
15653
15654 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15655 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15656 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15657 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15658
15659 ### Allow using a different wrap-prefix
15660 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15661         echo "$as_me:15661: checking for prefix used to wrap public variables" >&5
15662 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15663
15664 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15665 if test "${with_wrap_prefix+set}" = set; then
15666   withval="$with_wrap_prefix"
15667   NCURSES_WRAP_PREFIX=$withval
15668 else
15669   NCURSES_WRAP_PREFIX=_nc_
15670 fi;
15671         echo "$as_me:15671: result: $NCURSES_WRAP_PREFIX" >&5
15672 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15673 else
15674         NCURSES_WRAP_PREFIX=_nc_
15675 fi
15676
15677 cat >>confdefs.h <<EOF
15678 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15679 EOF
15680
15681 ###############################################################################
15682 # These options are relatively safe to experiment with.
15683
15684 echo "$as_me:15684: checking if you want all development code" >&5
15685 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15686
15687 # Check whether --with-develop or --without-develop was given.
15688 if test "${with_develop+set}" = set; then
15689   withval="$with_develop"
15690   with_develop=$withval
15691 else
15692   with_develop=no
15693 fi;
15694 echo "$as_me:15694: result: $with_develop" >&5
15695 echo "${ECHO_T}$with_develop" >&6
15696
15697 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15698 echo "$as_me:15698: checking if you want hard-tabs code" >&5
15699 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15700
15701 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15702 if test "${enable_hard_tabs+set}" = set; then
15703   enableval="$enable_hard_tabs"
15704
15705 else
15706   enable_hard_tabs=$with_develop
15707 fi;
15708 echo "$as_me:15708: result: $enable_hard_tabs" >&5
15709 echo "${ECHO_T}$enable_hard_tabs" >&6
15710 test "x$enable_hard_tabs" = xyes &&
15711 cat >>confdefs.h <<\EOF
15712 #define USE_HARD_TABS 1
15713 EOF
15714
15715 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15716 echo "$as_me:15716: checking if you want limited support for xmc" >&5
15717 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15718
15719 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15720 if test "${enable_xmc_glitch+set}" = set; then
15721   enableval="$enable_xmc_glitch"
15722
15723 else
15724   enable_xmc_glitch=$with_develop
15725 fi;
15726 echo "$as_me:15726: result: $enable_xmc_glitch" >&5
15727 echo "${ECHO_T}$enable_xmc_glitch" >&6
15728 test "x$enable_xmc_glitch" = xyes &&
15729 cat >>confdefs.h <<\EOF
15730 #define USE_XMC_SUPPORT 1
15731 EOF
15732
15733 ###############################################################################
15734 # These are just experimental, probably should not be in a package:
15735
15736 echo "$as_me:15736: checking if you do not want to assume colors are white-on-black" >&5
15737 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15738
15739 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15740 if test "${enable_assumed_color+set}" = set; then
15741   enableval="$enable_assumed_color"
15742   with_assumed_color=$enableval
15743 else
15744   with_assumed_color=yes
15745 fi;
15746 echo "$as_me:15746: result: $with_assumed_color" >&5
15747 echo "${ECHO_T}$with_assumed_color" >&6
15748 test "x$with_assumed_color" = xyes &&
15749 cat >>confdefs.h <<\EOF
15750 #define USE_ASSUMED_COLOR 1
15751 EOF
15752
15753 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15754 echo "$as_me:15754: checking if you want hashmap scrolling-optimization code" >&5
15755 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15756
15757 # Check whether --enable-hashmap or --disable-hashmap was given.
15758 if test "${enable_hashmap+set}" = set; then
15759   enableval="$enable_hashmap"
15760   with_hashmap=$enableval
15761 else
15762   with_hashmap=yes
15763 fi;
15764 echo "$as_me:15764: result: $with_hashmap" >&5
15765 echo "${ECHO_T}$with_hashmap" >&6
15766 test "x$with_hashmap" = xyes &&
15767 cat >>confdefs.h <<\EOF
15768 #define USE_HASHMAP 1
15769 EOF
15770
15771 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15772 echo "$as_me:15772: checking if you want colorfgbg code" >&5
15773 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15774
15775 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15776 if test "${enable_colorfgbg+set}" = set; then
15777   enableval="$enable_colorfgbg"
15778   with_colorfgbg=$enableval
15779 else
15780   with_colorfgbg=no
15781 fi;
15782 echo "$as_me:15782: result: $with_colorfgbg" >&5
15783 echo "${ECHO_T}$with_colorfgbg" >&6
15784 test "x$with_colorfgbg" = xyes &&
15785 cat >>confdefs.h <<\EOF
15786 #define USE_COLORFGBG 1
15787 EOF
15788
15789 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15790 echo "$as_me:15790: checking if you want to use gcc -fvisibility option" >&5
15791 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15792
15793 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15794 if test "${enable_fvisibility+set}" = set; then
15795   enableval="$enable_fvisibility"
15796   cf_with_fvisibility=$enableval
15797 else
15798   cf_with_fvisibility=no
15799 fi;
15800 echo "$as_me:15800: result: $cf_with_fvisibility" >&5
15801 echo "${ECHO_T}$cf_with_fvisibility" >&6
15802
15803 NCURSES_IMPEXP=
15804 NCURSES_CXX_IMPEXP=
15805 if test "x$cf_with_fvisibility" = xyes; then
15806
15807 echo "$as_me:15807: checking if $CC -fvisibility=hidden option works" >&5
15808 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15809 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15810   echo $ECHO_N "(cached) $ECHO_C" >&6
15811 else
15812
15813     cf_save_cflags="$CFLAGS"
15814     CFLAGS="$CFLAGS -fvisibility=hidden"
15815     cat >"conftest.$ac_ext" <<_ACEOF
15816 #line 15816 "configure"
15817 #include "confdefs.h"
15818
15819 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15820
15821 int
15822 main (void)
15823 {
15824
15825         if (somefunc()) return 1;
15826
15827   ;
15828   return 0;
15829 }
15830 _ACEOF
15831 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15832 if { (eval echo "$as_me:15832: \"$ac_link\"") >&5
15833   (eval $ac_link) 2>&5
15834   ac_status=$?
15835   echo "$as_me:15835: \$? = $ac_status" >&5
15836   (exit "$ac_status"); } &&
15837          { ac_try='test -s "conftest$ac_exeext"'
15838   { (eval echo "$as_me:15838: \"$ac_try\"") >&5
15839   (eval $ac_try) 2>&5
15840   ac_status=$?
15841   echo "$as_me:15841: \$? = $ac_status" >&5
15842   (exit "$ac_status"); }; }; then
15843   cf_cv_fvisibility_hidden=yes
15844 else
15845   echo "$as_me: failed program was:" >&5
15846 cat "conftest.$ac_ext" >&5
15847 cf_cv_fvisibility_hidden=no
15848 fi
15849 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15850     CFLAGS=$cf_save_cflags
15851
15852 fi
15853 echo "$as_me:15853: result: $cf_cv_fvisibility_hidden" >&5
15854 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15855
15856         if test "x$cf_cv_fvisibility_hidden" = xyes
15857         then
15858
15859 cf_fix_cppflags=no
15860 cf_new_cflags=
15861 cf_new_cppflags=
15862 cf_new_extra_cppflags=
15863
15864 for cf_add_cflags in -fvisibility=hidden
15865 do
15866 case "$cf_fix_cppflags" in
15867 (no)
15868         case "$cf_add_cflags" in
15869         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15870                 case "$cf_add_cflags" in
15871                 (-D*)
15872                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15873
15874                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15875                                 && test -z "${cf_tst_cflags}" \
15876                                 && cf_fix_cppflags=yes
15877
15878                         if test "$cf_fix_cppflags" = yes ; then
15879
15880         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15881         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15882
15883                                 continue
15884                         elif test "${cf_tst_cflags}" = "\"'" ; then
15885
15886         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15887         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15888
15889                                 continue
15890                         fi
15891                         ;;
15892                 esac
15893                 case "$CPPFLAGS" in
15894                 (*$cf_add_cflags)
15895                         ;;
15896                 (*)
15897                         case "$cf_add_cflags" in
15898                         (-D*)
15899                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15900
15901 CPPFLAGS=`echo "$CPPFLAGS" | \
15902         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15903                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15904
15905                                 ;;
15906                         esac
15907
15908         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15909         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15910
15911                         ;;
15912                 esac
15913                 ;;
15914         (*)
15915
15916         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15917         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15918
15919                 ;;
15920         esac
15921         ;;
15922 (yes)
15923
15924         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15925         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15926
15927         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15928
15929         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15930                 && test -z "${cf_tst_cflags}" \
15931                 && cf_fix_cppflags=no
15932         ;;
15933 esac
15934 done
15935
15936 if test -n "$cf_new_cflags" ; then
15937
15938         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15939         CFLAGS="${CFLAGS}$cf_new_cflags"
15940
15941 fi
15942
15943 if test -n "$cf_new_cppflags" ; then
15944
15945         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15946         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15947
15948 fi
15949
15950 if test -n "$cf_new_extra_cppflags" ; then
15951
15952         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15953         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15954
15955 fi
15956
15957                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15958         fi
15959         if test -n "$CXX"
15960         then
15961                 ac_ext=cc
15962 ac_cpp='$CXXCPP $CPPFLAGS'
15963 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
15964 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
15965 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15966 ac_main_return="return"
15967
15968 echo "$as_me:15968: checking if $CXX -fvisibility=hidden option works" >&5
15969 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15970 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15971   echo $ECHO_N "(cached) $ECHO_C" >&6
15972 else
15973
15974     cf_save_cflags="$CXXFLAGS"
15975     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15976     cat >"conftest.$ac_ext" <<_ACEOF
15977 #line 15977 "configure"
15978 #include "confdefs.h"
15979
15980 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15981
15982 int
15983 main (void)
15984 {
15985
15986         if (somefunc()) return 1;
15987
15988   ;
15989   return 0;
15990 }
15991 _ACEOF
15992 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15993 if { (eval echo "$as_me:15993: \"$ac_link\"") >&5
15994   (eval $ac_link) 2>&5
15995   ac_status=$?
15996   echo "$as_me:15996: \$? = $ac_status" >&5
15997   (exit "$ac_status"); } &&
15998          { ac_try='test -s "conftest$ac_exeext"'
15999   { (eval echo "$as_me:15999: \"$ac_try\"") >&5
16000   (eval $ac_try) 2>&5
16001   ac_status=$?
16002   echo "$as_me:16002: \$? = $ac_status" >&5
16003   (exit "$ac_status"); }; }; then
16004   cf_cv_fvisibility_hidden2=yes
16005 else
16006   echo "$as_me: failed program was:" >&5
16007 cat "conftest.$ac_ext" >&5
16008 cf_cv_fvisibility_hidden2=no
16009 fi
16010 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16011     CXXFLAGS=$cf_save_cflags
16012
16013 fi
16014 echo "$as_me:16014: result: $cf_cv_fvisibility_hidden2" >&5
16015 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16016
16017                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16018                 then
16019
16020 cf_save_CXXFLAGS="$CFLAGS"
16021 CFLAGS="$CXXFLAGS"
16022
16023 cf_fix_cppflags=no
16024 cf_new_cflags=
16025 cf_new_cppflags=
16026 cf_new_extra_cppflags=
16027
16028 for cf_add_cflags in -fvisibility=hidden
16029 do
16030 case "$cf_fix_cppflags" in
16031 (no)
16032         case "$cf_add_cflags" in
16033         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16034                 case "$cf_add_cflags" in
16035                 (-D*)
16036                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16037
16038                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16039                                 && test -z "${cf_tst_cflags}" \
16040                                 && cf_fix_cppflags=yes
16041
16042                         if test "$cf_fix_cppflags" = yes ; then
16043
16044         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16045         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16046
16047                                 continue
16048                         elif test "${cf_tst_cflags}" = "\"'" ; then
16049
16050         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16051         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16052
16053                                 continue
16054                         fi
16055                         ;;
16056                 esac
16057                 case "$CPPFLAGS" in
16058                 (*$cf_add_cflags)
16059                         ;;
16060                 (*)
16061                         case "$cf_add_cflags" in
16062                         (-D*)
16063                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16064
16065 CPPFLAGS=`echo "$CPPFLAGS" | \
16066         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16067                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16068
16069                                 ;;
16070                         esac
16071
16072         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16073         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16074
16075                         ;;
16076                 esac
16077                 ;;
16078         (*)
16079
16080         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16081         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16082
16083                 ;;
16084         esac
16085         ;;
16086 (yes)
16087
16088         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16089         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16090
16091         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16092
16093         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16094                 && test -z "${cf_tst_cflags}" \
16095                 && cf_fix_cppflags=no
16096         ;;
16097 esac
16098 done
16099
16100 if test -n "$cf_new_cflags" ; then
16101
16102         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16103         CFLAGS="${CFLAGS}$cf_new_cflags"
16104
16105 fi
16106
16107 if test -n "$cf_new_cppflags" ; then
16108
16109         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16110         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16111
16112 fi
16113
16114 if test -n "$cf_new_extra_cppflags" ; then
16115
16116         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16117         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16118
16119 fi
16120
16121 CXXFLAGS="$CFLAGS"
16122 CFLAGS="$cf_save_CXXFLAGS"
16123
16124                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16125                 fi
16126                 ac_ext=c
16127 ac_cpp='$CPP $CPPFLAGS'
16128 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16129 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16130 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16131 ac_main_return="return"
16132
16133         fi
16134 fi
16135
16136 ###   use option --enable-interop to turn on use of bindings used for interop
16137 echo "$as_me:16137: checking if you want interop bindings" >&5
16138 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16139
16140 # Check whether --enable-interop or --disable-interop was given.
16141 if test "${enable_interop+set}" = set; then
16142   enableval="$enable_interop"
16143   with_exp_interop=$enableval
16144 else
16145   with_exp_interop=$cf_dft_interop
16146 fi;
16147 echo "$as_me:16147: result: $with_exp_interop" >&5
16148 echo "${ECHO_T}$with_exp_interop" >&6
16149
16150 NCURSES_INTEROP_FUNCS=0
16151 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16152
16153 echo "$as_me:16153: checking if you want experimental safe-sprintf code" >&5
16154 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16155
16156 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16157 if test "${enable_safe_sprintf+set}" = set; then
16158   enableval="$enable_safe_sprintf"
16159   with_safe_sprintf=$enableval
16160 else
16161   with_safe_sprintf=no
16162 fi;
16163 echo "$as_me:16163: result: $with_safe_sprintf" >&5
16164 echo "${ECHO_T}$with_safe_sprintf" >&6
16165
16166 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16167 # when hashmap is used scroll hints are useless
16168 if test "$with_hashmap" = no ; then
16169 echo "$as_me:16169: checking if you want to experiment without scrolling-hints code" >&5
16170 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16171
16172 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16173 if test "${enable_scroll_hints+set}" = set; then
16174   enableval="$enable_scroll_hints"
16175   with_scroll_hints=$enableval
16176 else
16177   with_scroll_hints=yes
16178 fi;
16179 echo "$as_me:16179: result: $with_scroll_hints" >&5
16180 echo "${ECHO_T}$with_scroll_hints" >&6
16181 test "x$with_scroll_hints" = xyes &&
16182 cat >>confdefs.h <<\EOF
16183 #define USE_SCROLL_HINTS 1
16184 EOF
16185
16186 fi
16187
16188 echo "$as_me:16188: checking if you want wgetch-events code" >&5
16189 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16190
16191 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16192 if test "${enable_wgetch_events+set}" = set; then
16193   enableval="$enable_wgetch_events"
16194   with_wgetch_events=$enableval
16195 else
16196   with_wgetch_events=no
16197 fi;
16198 echo "$as_me:16198: result: $with_wgetch_events" >&5
16199 echo "${ECHO_T}$with_wgetch_events" >&6
16200 if test "x$with_wgetch_events" = xyes ; then
16201
16202 cat >>confdefs.h <<\EOF
16203 #define NCURSES_WGETCH_EVENTS 1
16204 EOF
16205
16206         NCURSES_WGETCH_EVENTS=1
16207 else
16208         NCURSES_WGETCH_EVENTS=0
16209 fi
16210
16211 case "$cf_cv_system_name" in
16212 (*mingw32*|*mingw64*|*-msvc*)
16213         echo "$as_me:16213: checking if you want experimental-Windows driver" >&5
16214 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16215
16216 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16217 if test "${enable_exp_win32+set}" = set; then
16218   enableval="$enable_exp_win32"
16219   with_exp_win32=$enableval
16220 else
16221   with_exp_win32=no
16222 fi;
16223         echo "$as_me:16223: result: $with_exp_win32" >&5
16224 echo "${ECHO_T}$with_exp_win32" >&6
16225         if test "x$with_exp_win32" = xyes
16226         then
16227
16228 cat >>confdefs.h <<\EOF
16229 #define EXP_WIN32_DRIVER 1
16230 EOF
16231
16232                 EXP_WIN32_DRIVER=1
16233                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16234         else
16235                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16236                 EXP_WIN32_DRIVER=0
16237         fi
16238         ;;
16239 (*)
16240         EXP_WIN32_DRIVER=0
16241         INTERNALS_HDR=
16242         ;;
16243 esac
16244
16245 ###############################################################################
16246
16247 ###     use option --disable-echo to suppress full display compiling commands
16248
16249 echo "$as_me:16249: checking if you want to see long compiling messages" >&5
16250 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16251
16252 # Check whether --enable-echo or --disable-echo was given.
16253 if test "${enable_echo+set}" = set; then
16254   enableval="$enable_echo"
16255   test "$enableval" != no && enableval=yes
16256         if test "$enableval" != "yes" ; then
16257
16258         ECHO_LT='--silent'
16259         ECHO_LD='@echo linking $@;'
16260         RULE_CC='@echo compiling $<'
16261         SHOW_CC='@echo compiling $@'
16262         ECHO_CC='@'
16263
16264         else
16265
16266         ECHO_LT=''
16267         ECHO_LD=''
16268         RULE_CC=''
16269         SHOW_CC=''
16270         ECHO_CC=''
16271
16272         fi
16273 else
16274   enableval=yes
16275
16276         ECHO_LT=''
16277         ECHO_LD=''
16278         RULE_CC=''
16279         SHOW_CC=''
16280         ECHO_CC=''
16281
16282 fi;
16283 echo "$as_me:16283: result: $enableval" >&5
16284 echo "${ECHO_T}$enableval" >&6
16285
16286 if test "x$enable_echo" = xyes; then
16287         ECHO_LINK=
16288 else
16289         ECHO_LINK='@ echo linking $@ ... ;'
16290         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16291         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16292 fi
16293
16294 # --disable-stripping is used for debugging
16295
16296 echo "$as_me:16296: checking if you want to install stripped executables" >&5
16297 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16298
16299 # Check whether --enable-stripping or --disable-stripping was given.
16300 if test "${enable_stripping+set}" = set; then
16301   enableval="$enable_stripping"
16302   test "$enableval" != no && enableval=yes
16303         if test "$enableval" != "yes" ; then
16304     enable_stripping=no
16305         else
16306                 enable_stripping=yes
16307         fi
16308 else
16309   enableval=yes
16310         enable_stripping=yes
16311
16312 fi;
16313 echo "$as_me:16313: result: $enable_stripping" >&5
16314 echo "${ECHO_T}$enable_stripping" >&6
16315
16316 if test "$enable_stripping" = yes
16317 then
16318         INSTALL_OPT_S="-s"
16319 else
16320         INSTALL_OPT_S=
16321 fi
16322
16323 : "${INSTALL:=install}"
16324 echo "$as_me:16324: checking if install accepts -p option" >&5
16325 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16326 if test "${cf_cv_install_p+set}" = set; then
16327   echo $ECHO_N "(cached) $ECHO_C" >&6
16328 else
16329
16330         rm -rf ./conftest*
16331         date >conftest.in
16332         mkdir conftest.out
16333         sleep 3
16334         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16335         then
16336                 if test -f conftest.out/conftest.in
16337                 then
16338                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16339                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16340                         if test -s conftest.err
16341                         then
16342                                 cf_cv_install_p=no
16343                         else
16344                                 cf_cv_install_p=yes
16345                         fi
16346                 else
16347                         cf_cv_install_p=no
16348                 fi
16349         else
16350                 cf_cv_install_p=no
16351         fi
16352         rm -rf ./conftest*
16353
16354 fi
16355 echo "$as_me:16355: result: $cf_cv_install_p" >&5
16356 echo "${ECHO_T}$cf_cv_install_p" >&6
16357
16358 echo "$as_me:16358: checking if install needs to be told about ownership" >&5
16359 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16360 case `$ac_config_guess` in
16361 (*minix)
16362         with_install_o=yes
16363         ;;
16364 (*)
16365         with_install_o=no
16366         ;;
16367 esac
16368
16369 echo "$as_me:16369: result: $with_install_o" >&5
16370 echo "${ECHO_T}$with_install_o" >&6
16371 if test "x$with_install_o" = xyes
16372 then
16373         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'`"
16374 else
16375         INSTALL_OPT_O=
16376 fi
16377
16378 # If we're avoiding relinking of shared libraries during install, that is to
16379 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16380 # the install program has "-p" (for preserving timestamps).
16381 cf_cv_do_reranlib=yes
16382 if test "x$cf_cv_install_p" = xyes
16383 then
16384         if test "x$cf_cv_do_relink" != xyes
16385         then
16386                 cf_cv_do_reranlib=no
16387                 INSTALL_OPT_P="-p"
16388                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16389         fi
16390 fi
16391
16392 ###     use option --enable-warnings to turn on all gcc warnings
16393
16394 echo "$as_me:16394: checking if you want to use C11 _Noreturn feature" >&5
16395 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16396
16397 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16398 if test "${enable_stdnoreturn+set}" = set; then
16399   enableval="$enable_stdnoreturn"
16400   test "$enableval" != yes && enableval=no
16401         if test "$enableval" != "no" ; then
16402     enable_stdnoreturn=yes
16403         else
16404                 enable_stdnoreturn=no
16405         fi
16406 else
16407   enableval=no
16408         enable_stdnoreturn=no
16409
16410 fi;
16411 echo "$as_me:16411: result: $enable_stdnoreturn" >&5
16412 echo "${ECHO_T}$enable_stdnoreturn" >&6
16413
16414 if test $enable_stdnoreturn = yes; then
16415 echo "$as_me:16415: checking for C11 _Noreturn feature" >&5
16416 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16417 if test "${cf_cv_c11_noreturn+set}" = set; then
16418   echo $ECHO_N "(cached) $ECHO_C" >&6
16419 else
16420   cat >"conftest.$ac_ext" <<_ACEOF
16421 #line 16421 "configure"
16422 #include "confdefs.h"
16423
16424 #include <stdio.h>
16425 #include <stdlib.h>
16426 #include <stdnoreturn.h>
16427 static _Noreturn void giveup(void) { exit(0); }
16428
16429 int
16430 main (void)
16431 {
16432 if (feof(stdin)) giveup()
16433   ;
16434   return 0;
16435 }
16436 _ACEOF
16437 rm -f "conftest.$ac_objext"
16438 if { (eval echo "$as_me:16438: \"$ac_compile\"") >&5
16439   (eval $ac_compile) 2>&5
16440   ac_status=$?
16441   echo "$as_me:16441: \$? = $ac_status" >&5
16442   (exit "$ac_status"); } &&
16443          { ac_try='test -s "conftest.$ac_objext"'
16444   { (eval echo "$as_me:16444: \"$ac_try\"") >&5
16445   (eval $ac_try) 2>&5
16446   ac_status=$?
16447   echo "$as_me:16447: \$? = $ac_status" >&5
16448   (exit "$ac_status"); }; }; then
16449   cf_cv_c11_noreturn=yes
16450 else
16451   echo "$as_me: failed program was:" >&5
16452 cat "conftest.$ac_ext" >&5
16453 cf_cv_c11_noreturn=no
16454 fi
16455 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16456
16457 fi
16458 echo "$as_me:16458: result: $cf_cv_c11_noreturn" >&5
16459 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16460 else
16461         cf_cv_c11_noreturn=no,
16462 fi
16463
16464 if test "$cf_cv_c11_noreturn" = yes; then
16465
16466 cat >>confdefs.h <<\EOF
16467 #define HAVE_STDNORETURN_H 1
16468 EOF
16469
16470 cat >>confdefs.h <<EOF
16471 #define STDC_NORETURN _Noreturn
16472 EOF
16473
16474         HAVE_STDNORETURN_H=1
16475 else
16476         HAVE_STDNORETURN_H=0
16477 fi
16478
16479 if test "$GCC" = yes || test "$GXX" = yes
16480 then
16481
16482 if test "$GCC" = yes || test "$GXX" = yes
16483 then
16484         case $CFLAGS in
16485         (*-Werror=*)
16486                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16487
16488 echo "${as_me:-configure}:16488: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16489
16490                 cf_temp_flags=
16491                 for cf_temp_scan in $CFLAGS
16492                 do
16493                         case "x$cf_temp_scan" in
16494                         (x-Werror=*)
16495
16496         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16497         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16498
16499                                 ;;
16500                         (*)
16501
16502         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16503         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16504
16505                                 ;;
16506                         esac
16507                 done
16508                 CFLAGS="$cf_temp_flags"
16509                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16510
16511 echo "${as_me:-configure}:16511: testing ... fixed $CFLAGS ..." 1>&5
16512
16513                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16514
16515 echo "${as_me:-configure}:16515: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16516
16517                 ;;
16518         esac
16519 fi
16520
16521 if test "$GCC" = yes || test "$GXX" = yes
16522 then
16523         case $CPPFLAGS in
16524         (*-Werror=*)
16525                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16526
16527 echo "${as_me:-configure}:16527: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16528
16529                 cf_temp_flags=
16530                 for cf_temp_scan in $CPPFLAGS
16531                 do
16532                         case "x$cf_temp_scan" in
16533                         (x-Werror=*)
16534
16535         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16536         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16537
16538                                 ;;
16539                         (*)
16540
16541         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16542         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16543
16544                                 ;;
16545                         esac
16546                 done
16547                 CPPFLAGS="$cf_temp_flags"
16548                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16549
16550 echo "${as_me:-configure}:16550: testing ... fixed $CPPFLAGS ..." 1>&5
16551
16552                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16553
16554 echo "${as_me:-configure}:16554: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16555
16556                 ;;
16557         esac
16558 fi
16559
16560 if test "$GCC" = yes || test "$GXX" = yes
16561 then
16562         case $LDFLAGS in
16563         (*-Werror=*)
16564                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16565
16566 echo "${as_me:-configure}:16566: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16567
16568                 cf_temp_flags=
16569                 for cf_temp_scan in $LDFLAGS
16570                 do
16571                         case "x$cf_temp_scan" in
16572                         (x-Werror=*)
16573
16574         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16575         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16576
16577                                 ;;
16578                         (*)
16579
16580         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16581         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16582
16583                                 ;;
16584                         esac
16585                 done
16586                 LDFLAGS="$cf_temp_flags"
16587                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16588
16589 echo "${as_me:-configure}:16589: testing ... fixed $LDFLAGS ..." 1>&5
16590
16591                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16592
16593 echo "${as_me:-configure}:16593: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16594
16595                 ;;
16596         esac
16597 fi
16598
16599 echo "$as_me:16599: checking if you want to turn on gcc warnings" >&5
16600 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16601
16602 # Check whether --enable-warnings or --disable-warnings was given.
16603 if test "${enable_warnings+set}" = set; then
16604   enableval="$enable_warnings"
16605   test "$enableval" != yes && enableval=no
16606         if test "$enableval" != "no" ; then
16607     enable_warnings=yes
16608         else
16609                 enable_warnings=no
16610         fi
16611 else
16612   enableval=no
16613         enable_warnings=no
16614
16615 fi;
16616 echo "$as_me:16616: result: $enable_warnings" >&5
16617 echo "${ECHO_T}$enable_warnings" >&6
16618 if test "$enable_warnings" = "yes"
16619 then
16620
16621 if test "x$have_x" = xyes; then
16622
16623 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16624 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16625 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16626 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16627 for cf_X_CFLAGS in $X_CFLAGS
16628 do
16629         case "x$cf_X_CFLAGS" in
16630         x-[IUD]*)
16631                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16632                 ;;
16633         *)
16634                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16635                 ;;
16636         esac
16637 done
16638
16639 cat >"conftest.$ac_ext" <<_ACEOF
16640 #line 16640 "configure"
16641 #include "confdefs.h"
16642
16643 #include <stdlib.h>
16644 #include <X11/Intrinsic.h>
16645
16646 int
16647 main (void)
16648 {
16649 String foo = malloc(1); free((void*)foo)
16650   ;
16651   return 0;
16652 }
16653 _ACEOF
16654 rm -f "conftest.$ac_objext"
16655 if { (eval echo "$as_me:16655: \"$ac_compile\"") >&5
16656   (eval $ac_compile) 2>&5
16657   ac_status=$?
16658   echo "$as_me:16658: \$? = $ac_status" >&5
16659   (exit "$ac_status"); } &&
16660          { ac_try='test -s "conftest.$ac_objext"'
16661   { (eval echo "$as_me:16661: \"$ac_try\"") >&5
16662   (eval $ac_try) 2>&5
16663   ac_status=$?
16664   echo "$as_me:16664: \$? = $ac_status" >&5
16665   (exit "$ac_status"); }; }; then
16666
16667 echo "$as_me:16667: checking for X11/Xt const-feature" >&5
16668 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16669 if test "${cf_cv_const_x_string+set}" = set; then
16670   echo $ECHO_N "(cached) $ECHO_C" >&6
16671 else
16672
16673         cat >"conftest.$ac_ext" <<_ACEOF
16674 #line 16674 "configure"
16675 #include "confdefs.h"
16676
16677 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16678 #undef  XTSTRINGDEFINES /* X11R5 and later */
16679 #include <stdlib.h>
16680 #include <X11/Intrinsic.h>
16681
16682 int
16683 main (void)
16684 {
16685 String foo = malloc(1); *foo = 0
16686   ;
16687   return 0;
16688 }
16689 _ACEOF
16690 rm -f "conftest.$ac_objext"
16691 if { (eval echo "$as_me:16691: \"$ac_compile\"") >&5
16692   (eval $ac_compile) 2>&5
16693   ac_status=$?
16694   echo "$as_me:16694: \$? = $ac_status" >&5
16695   (exit "$ac_status"); } &&
16696          { ac_try='test -s "conftest.$ac_objext"'
16697   { (eval echo "$as_me:16697: \"$ac_try\"") >&5
16698   (eval $ac_try) 2>&5
16699   ac_status=$?
16700   echo "$as_me:16700: \$? = $ac_status" >&5
16701   (exit "$ac_status"); }; }; then
16702
16703                         cf_cv_const_x_string=no
16704
16705 else
16706   echo "$as_me: failed program was:" >&5
16707 cat "conftest.$ac_ext" >&5
16708
16709                         cf_cv_const_x_string=yes
16710
16711 fi
16712 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16713
16714 fi
16715 echo "$as_me:16715: result: $cf_cv_const_x_string" >&5
16716 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16717
16718 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16719 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16720 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16721
16722 case "$cf_cv_const_x_string" in
16723 (no)
16724
16725         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16726         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16727
16728         ;;
16729 (*)
16730
16731         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16732         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16733
16734         ;;
16735 esac
16736
16737 else
16738   echo "$as_me: failed program was:" >&5
16739 cat "conftest.$ac_ext" >&5
16740 fi
16741 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16742  fi
16743 cat > "conftest.$ac_ext" <<EOF
16744 #line 16744 "${as_me:-configure}"
16745 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16746 EOF
16747 if test "$INTEL_COMPILER" = yes
16748 then
16749 # The "-wdXXX" options suppress warnings:
16750 # remark #1419: external declaration in primary source file
16751 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16752 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16753 # remark #193: zero used for undefined preprocessing identifier
16754 # remark #593: variable "curs_sb_left_arrow" was set but never used
16755 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16756 # remark #869: parameter "tw" was never referenced
16757 # remark #981: operands are evaluated in unspecified order
16758 # warning #279: controlling expression is constant
16759
16760         { echo "$as_me:16760: checking for $CC warning options..." >&5
16761 echo "$as_me: checking for $CC warning options..." >&6;}
16762         cf_save_CFLAGS="$CFLAGS"
16763         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16764         for cf_opt in \
16765                 wd1419 \
16766                 wd1683 \
16767                 wd1684 \
16768                 wd193 \
16769                 wd593 \
16770                 wd279 \
16771                 wd810 \
16772                 wd869 \
16773                 wd981
16774         do
16775                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
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_opt" >&5
16782 echo "${ECHO_T}... -$cf_opt" >&6
16783                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16784                 fi
16785         done
16786         CFLAGS="$cf_save_CFLAGS"
16787 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16788 then
16789         { echo "$as_me:16789: checking for $CC warning options..." >&5
16790 echo "$as_me: checking for $CC warning options..." >&6;}
16791         cf_save_CFLAGS="$CFLAGS"
16792         cf_warn_CONST=""
16793         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16794         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16795         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16796         for cf_opt in W Wall \
16797                 Wbad-function-cast \
16798                 Wcast-align \
16799                 Wcast-qual \
16800                 Wdeclaration-after-statement \
16801                 Wextra \
16802                 Winline \
16803                 Wmissing-declarations \
16804                 Wmissing-prototypes \
16805                 Wnested-externs \
16806                 Wpointer-arith \
16807                 Wshadow \
16808                 Wstrict-prototypes \
16809                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16810         do
16811                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16812                 if { (eval echo "$as_me:16812: \"$ac_compile\"") >&5
16813   (eval $ac_compile) 2>&5
16814   ac_status=$?
16815   echo "$as_me:16815: \$? = $ac_status" >&5
16816   (exit "$ac_status"); }; then
16817                         test -n "$verbose" && echo "$as_me:16817: result: ... -$cf_opt" >&5
16818 echo "${ECHO_T}... -$cf_opt" >&6
16819                         case "$cf_opt" in
16820                         (Winline)
16821                                 case "$GCC_VERSION" in
16822                                 ([34].*)
16823                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16824
16825 echo "${as_me:-configure}:16825: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16826
16827                                         continue;;
16828                                 esac
16829                                 ;;
16830                         (Wpointer-arith)
16831                                 case "$GCC_VERSION" in
16832                                 ([12].*)
16833                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16834
16835 echo "${as_me:-configure}:16835: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16836
16837                                         continue;;
16838                                 esac
16839                                 ;;
16840                         esac
16841                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16842                 fi
16843         done
16844         CFLAGS="$cf_save_CFLAGS"
16845 fi
16846 rm -rf ./conftest*
16847
16848 fi
16849
16850 if test "$GCC" = yes || test "$GXX" = yes
16851 then
16852 cat > conftest.i <<EOF
16853 #ifndef GCC_PRINTF
16854 #define GCC_PRINTF 0
16855 #endif
16856 #ifndef GCC_SCANF
16857 #define GCC_SCANF 0
16858 #endif
16859 #ifndef GCC_NORETURN
16860 #define GCC_NORETURN /* nothing */
16861 #endif
16862 #ifndef GCC_UNUSED
16863 #define GCC_UNUSED /* nothing */
16864 #endif
16865 EOF
16866 if test "$GCC" = yes
16867 then
16868         { echo "$as_me:16868: checking for $CC __attribute__ directives..." >&5
16869 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16870 cat > "conftest.$ac_ext" <<EOF
16871 #line 16871 "${as_me:-configure}"
16872 #include "confdefs.h"
16873 #include "conftest.h"
16874 #include "conftest.i"
16875 #if     GCC_PRINTF
16876 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16877 #else
16878 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16879 #endif
16880 #if     GCC_SCANF
16881 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16882 #else
16883 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16884 #endif
16885 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16886 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
16887 extern GCC_NORETURN void foo(void);
16888 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16889 EOF
16890         cf_printf_attribute=no
16891         cf_scanf_attribute=no
16892         for cf_attribute in scanf printf unused noreturn
16893         do
16894
16895 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16896
16897                 cf_directive="__attribute__(($cf_attribute))"
16898                 echo "checking for $CC $cf_directive" 1>&5
16899
16900                 case "$cf_attribute" in
16901                 (printf)
16902                         cf_printf_attribute=yes
16903                         cat >conftest.h <<EOF
16904 #define GCC_$cf_ATTRIBUTE 1
16905 EOF
16906                         ;;
16907                 (scanf)
16908                         cf_scanf_attribute=yes
16909                         cat >conftest.h <<EOF
16910 #define GCC_$cf_ATTRIBUTE 1
16911 EOF
16912                         ;;
16913                 (*)
16914                         cat >conftest.h <<EOF
16915 #define GCC_$cf_ATTRIBUTE $cf_directive
16916 EOF
16917                         ;;
16918                 esac
16919
16920                 if { (eval echo "$as_me:16920: \"$ac_compile\"") >&5
16921   (eval $ac_compile) 2>&5
16922   ac_status=$?
16923   echo "$as_me:16923: \$? = $ac_status" >&5
16924   (exit "$ac_status"); }; then
16925                         test -n "$verbose" && echo "$as_me:16925: result: ... $cf_attribute" >&5
16926 echo "${ECHO_T}... $cf_attribute" >&6
16927                         cat conftest.h >>confdefs.h
16928                         case "$cf_attribute" in
16929                         (noreturn)
16930
16931 cat >>confdefs.h <<EOF
16932 #define GCC_NORETURN $cf_directive
16933 EOF
16934
16935                                 ;;
16936                         (printf)
16937                                 cf_value='/* nothing */'
16938                                 if test "$cf_printf_attribute" != no ; then
16939                                         cf_value='__attribute__((format(printf,fmt,var)))'
16940
16941 cat >>confdefs.h <<\EOF
16942 #define GCC_PRINTF 1
16943 EOF
16944
16945                                 fi
16946
16947 cat >>confdefs.h <<EOF
16948 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16949 EOF
16950
16951                                 ;;
16952                         (scanf)
16953                                 cf_value='/* nothing */'
16954                                 if test "$cf_scanf_attribute" != no ; then
16955                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16956
16957 cat >>confdefs.h <<\EOF
16958 #define GCC_SCANF 1
16959 EOF
16960
16961                                 fi
16962
16963 cat >>confdefs.h <<EOF
16964 #define GCC_SCANFLIKE(fmt,var) $cf_value
16965 EOF
16966
16967                                 ;;
16968                         (unused)
16969
16970 cat >>confdefs.h <<EOF
16971 #define GCC_UNUSED $cf_directive
16972 EOF
16973
16974                                 ;;
16975                         esac
16976                 fi
16977         done
16978 else
16979         ${FGREP-fgrep} define conftest.i >>confdefs.h
16980 fi
16981 rm -rf ./conftest*
16982 fi
16983
16984 fi
16985
16986 if test "x$enable_warnings" = "xyes"; then
16987
16988         ADAFLAGS="$ADAFLAGS -gnatg"
16989
16990         if test "x$cf_with_cxx" = xyes ; then
16991
16992 INTEL_CPLUSPLUS=no
16993
16994 if test "$GCC" = yes ; then
16995         case "$host_os" in
16996         (linux*|gnu*)
16997                 echo "$as_me:16997: checking if this is really Intel C++ compiler" >&5
16998 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16999                 cf_save_CFLAGS="$CXXFLAGS"
17000                 CXXFLAGS="$CXXFLAGS -no-gcc"
17001                 cat >"conftest.$ac_ext" <<_ACEOF
17002 #line 17002 "configure"
17003 #include "confdefs.h"
17004
17005 int
17006 main (void)
17007 {
17008
17009 #ifdef __INTEL_COMPILER
17010 #else
17011 make an error
17012 #endif
17013
17014   ;
17015   return 0;
17016 }
17017 _ACEOF
17018 rm -f "conftest.$ac_objext"
17019 if { (eval echo "$as_me:17019: \"$ac_compile\"") >&5
17020   (eval $ac_compile) 2>&5
17021   ac_status=$?
17022   echo "$as_me:17022: \$? = $ac_status" >&5
17023   (exit "$ac_status"); } &&
17024          { ac_try='test -s "conftest.$ac_objext"'
17025   { (eval echo "$as_me:17025: \"$ac_try\"") >&5
17026   (eval $ac_try) 2>&5
17027   ac_status=$?
17028   echo "$as_me:17028: \$? = $ac_status" >&5
17029   (exit "$ac_status"); }; }; then
17030   INTEL_CPLUSPLUS=yes
17031 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17032
17033 else
17034   echo "$as_me: failed program was:" >&5
17035 cat "conftest.$ac_ext" >&5
17036 fi
17037 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17038                 CXXFLAGS="$cf_save_CFLAGS"
17039                 echo "$as_me:17039: result: $INTEL_CPLUSPLUS" >&5
17040 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17041                 ;;
17042         esac
17043 fi
17044
17045 CLANG_CPLUSPLUS=no
17046
17047 if test "$GCC" = yes ; then
17048         echo "$as_me:17048: checking if this is really Clang C++ compiler" >&5
17049 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17050         cf_save_CFLAGS="$CXXFLAGS"
17051         cat >"conftest.$ac_ext" <<_ACEOF
17052 #line 17052 "configure"
17053 #include "confdefs.h"
17054
17055 int
17056 main (void)
17057 {
17058
17059 #ifdef __clang__
17060 #else
17061 make an error
17062 #endif
17063
17064   ;
17065   return 0;
17066 }
17067 _ACEOF
17068 rm -f "conftest.$ac_objext"
17069 if { (eval echo "$as_me:17069: \"$ac_compile\"") >&5
17070   (eval $ac_compile) 2>&5
17071   ac_status=$?
17072   echo "$as_me:17072: \$? = $ac_status" >&5
17073   (exit "$ac_status"); } &&
17074          { ac_try='test -s "conftest.$ac_objext"'
17075   { (eval echo "$as_me:17075: \"$ac_try\"") >&5
17076   (eval $ac_try) 2>&5
17077   ac_status=$?
17078   echo "$as_me:17078: \$? = $ac_status" >&5
17079   (exit "$ac_status"); }; }; then
17080   CLANG_CPLUSPLUS=yes
17081
17082 else
17083   echo "$as_me: failed program was:" >&5
17084 cat "conftest.$ac_ext" >&5
17085 fi
17086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17087         CXXFLAGS="$cf_save_CFLAGS"
17088         echo "$as_me:17088: result: $CLANG_CPLUSPLUS" >&5
17089 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17090 fi
17091
17092 CLANG_VERSION=none
17093
17094 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17095         case "$CC" in
17096         (c[1-9][0-9]|*/c[1-9][0-9])
17097                 { echo "$as_me:17097: WARNING: replacing broken compiler alias $CC" >&5
17098 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17099                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17100                 CC=clang
17101                 ;;
17102         esac
17103
17104         echo "$as_me:17104: checking version of $CC" >&5
17105 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17106         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.].*//'`"
17107         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17108         echo "$as_me:17108: result: $CLANG_VERSION" >&5
17109 echo "${ECHO_T}$CLANG_VERSION" >&6
17110
17111         for cf_clang_opt in \
17112                 -Qunused-arguments \
17113                 -Wno-error=implicit-function-declaration
17114         do
17115                 echo "$as_me:17115: checking if option $cf_clang_opt works" >&5
17116 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17117                 cf_save_CFLAGS="$CFLAGS"
17118                 CFLAGS="$CFLAGS $cf_clang_opt"
17119                 cat >"conftest.$ac_ext" <<_ACEOF
17120 #line 17120 "configure"
17121 #include "confdefs.h"
17122
17123                         #include <stdio.h>
17124 int
17125 main (void)
17126 {
17127
17128                         printf("hello!\\n");
17129   ;
17130   return 0;
17131 }
17132 _ACEOF
17133 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17134 if { (eval echo "$as_me:17134: \"$ac_link\"") >&5
17135   (eval $ac_link) 2>&5
17136   ac_status=$?
17137   echo "$as_me:17137: \$? = $ac_status" >&5
17138   (exit "$ac_status"); } &&
17139          { ac_try='test -s "conftest$ac_exeext"'
17140   { (eval echo "$as_me:17140: \"$ac_try\"") >&5
17141   (eval $ac_try) 2>&5
17142   ac_status=$?
17143   echo "$as_me:17143: \$? = $ac_status" >&5
17144   (exit "$ac_status"); }; }; then
17145
17146                         cf_clang_optok=yes
17147 else
17148   echo "$as_me: failed program was:" >&5
17149 cat "conftest.$ac_ext" >&5
17150
17151                         cf_clang_optok=no
17152 fi
17153 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17154                 echo "$as_me:17154: result: $cf_clang_optok" >&5
17155 echo "${ECHO_T}$cf_clang_optok" >&6
17156                 CFLAGS="$cf_save_CFLAGS"
17157                 if test "$cf_clang_optok" = yes; then
17158                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17159
17160 echo "${as_me:-configure}:17160: testing adding option $cf_clang_opt ..." 1>&5
17161
17162         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17163         CFLAGS="${CFLAGS}$cf_clang_opt"
17164
17165                 fi
17166         done
17167 fi
17168
17169 ac_ext=cc
17170 ac_cpp='$CXXCPP $CPPFLAGS'
17171 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17172 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17173 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17174 ac_main_return="return"
17175
17176 cat > conftest.$ac_ext <<EOF
17177 #line 17177 "configure"
17178 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17179 EOF
17180
17181 if test "$INTEL_CPLUSPLUS" = yes
17182 then
17183 # The "-wdXXX" options suppress warnings:
17184 # remark #1419: external declaration in primary source file
17185 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17186 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17187 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17188 # remark #193: zero used for undefined preprocessing identifier
17189 # remark #593: variable "curs_sb_left_arrow" was set but never used
17190 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17191 # remark #869: parameter "tw" was never referenced
17192 # remark #981: operands are evaluated in unspecified order
17193 # warning #269: invalid format string conversion
17194
17195         { echo "$as_me:17195: checking for $CC warning options..." >&5
17196 echo "$as_me: checking for $CC warning options..." >&6;}
17197         cf_save_CXXFLAGS="$CXXFLAGS"
17198         EXTRA_CXXFLAGS="-Wall"
17199         for cf_opt in \
17200                 wd1419 \
17201                 wd1682 \
17202                 wd1683 \
17203                 wd1684 \
17204                 wd193 \
17205                 wd279 \
17206                 wd593 \
17207                 wd810 \
17208                 wd869 \
17209                 wd981
17210         do
17211                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17212                 if { (eval echo "$as_me:17212: \"$ac_compile\"") >&5
17213   (eval $ac_compile) 2>&5
17214   ac_status=$?
17215   echo "$as_me:17215: \$? = $ac_status" >&5
17216   (exit "$ac_status"); }; then
17217                         test -n "$verbose" && echo "$as_me:17217: result: ... -$cf_opt" >&5
17218 echo "${ECHO_T}... -$cf_opt" >&6
17219                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17220                 fi
17221         done
17222         CXXFLAGS="$cf_save_CXXFLAGS"
17223
17224 elif test "$GXX" = yes
17225 then
17226         { echo "$as_me:17226: checking for $CXX warning options..." >&5
17227 echo "$as_me: checking for $CXX warning options..." >&6;}
17228         cf_save_CXXFLAGS="$CXXFLAGS"
17229         EXTRA_CXXFLAGS="-W -Wall"
17230         cf_gxx_extra_warnings=""
17231         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17232         case "$GXX_VERSION" in
17233         ([1-2].*)
17234                 ;;
17235         (*)
17236                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17237                 ;;
17238         esac
17239         for cf_opt in \
17240                 Wabi \
17241                 fabi-version=0 \
17242                 Wextra \
17243                 Wignored-qualifiers \
17244                 Wlogical-op \
17245                 Woverloaded-virtual \
17246                 Wsign-promo \
17247                 Wsynth \
17248                 Wold-style-cast \
17249                 Wcast-align \
17250                 Wcast-qual \
17251                 Wpointer-arith \
17252                 Wshadow \
17253                 Wundef $cf_gxx_extra_warnings Wno-unused
17254         do
17255                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17256                 if { (eval echo "$as_me:17256: \"$ac_compile\"") >&5
17257   (eval $ac_compile) 2>&5
17258   ac_status=$?
17259   echo "$as_me:17259: \$? = $ac_status" >&5
17260   (exit "$ac_status"); }; then
17261                         test -n "$verbose" && echo "$as_me:17261: result: ... -$cf_opt" >&5
17262 echo "${ECHO_T}... -$cf_opt" >&6
17263                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17264                 else
17265                         test -n "$verbose" && echo "$as_me:17265: result: ... no -$cf_opt" >&5
17266 echo "${ECHO_T}... no -$cf_opt" >&6
17267                 fi
17268         done
17269         CXXFLAGS="$cf_save_CXXFLAGS"
17270 fi
17271
17272 rm -rf ./conftest*
17273 ac_ext=c
17274 ac_cpp='$CPP $CPPFLAGS'
17275 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17276 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17277 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17278 ac_main_return="return"
17279
17280         fi
17281 fi
17282
17283 echo "$as_me:17283: checking if you want to work around bogus compiler/loader warnings" >&5
17284 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17285
17286 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17287 if test "${enable_string_hacks+set}" = set; then
17288   enableval="$enable_string_hacks"
17289   enable_string_hacks=$enableval
17290 else
17291   enable_string_hacks=no
17292 fi;
17293 echo "$as_me:17293: result: $enable_string_hacks" >&5
17294 echo "${ECHO_T}$enable_string_hacks" >&6
17295
17296 if test "x$enable_string_hacks" = "xyes"; then
17297
17298 cat >>confdefs.h <<\EOF
17299 #define USE_STRING_HACKS 1
17300 EOF
17301
17302         { echo "$as_me:17302: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17303 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17304         echo "$as_me:17304: checking for strlcat" >&5
17305 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17306 if test "${ac_cv_func_strlcat+set}" = set; then
17307   echo $ECHO_N "(cached) $ECHO_C" >&6
17308 else
17309   cat >"conftest.$ac_ext" <<_ACEOF
17310 #line 17310 "configure"
17311 #include "confdefs.h"
17312 #define strlcat autoconf_temporary
17313 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17314 #undef strlcat
17315
17316 #ifdef __cplusplus
17317 extern "C"
17318 #endif
17319
17320 /* We use char because int might match the return type of a gcc2
17321    builtin and then its argument prototype would still apply.  */
17322 char strlcat (void);
17323
17324 int
17325 main (void)
17326 {
17327
17328 /* The GNU C library defines stubs for functions which it implements
17329     to always fail with ENOSYS.  Some functions are actually named
17330     something starting with __ and the normal name is an alias.  */
17331 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17332 #error found stub for strlcat
17333 #endif
17334
17335         return strlcat ();
17336   ;
17337   return 0;
17338 }
17339 _ACEOF
17340 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17341 if { (eval echo "$as_me:17341: \"$ac_link\"") >&5
17342   (eval $ac_link) 2>&5
17343   ac_status=$?
17344   echo "$as_me:17344: \$? = $ac_status" >&5
17345   (exit "$ac_status"); } &&
17346          { ac_try='test -s "conftest$ac_exeext"'
17347   { (eval echo "$as_me:17347: \"$ac_try\"") >&5
17348   (eval $ac_try) 2>&5
17349   ac_status=$?
17350   echo "$as_me:17350: \$? = $ac_status" >&5
17351   (exit "$ac_status"); }; }; then
17352   ac_cv_func_strlcat=yes
17353 else
17354   echo "$as_me: failed program was:" >&5
17355 cat "conftest.$ac_ext" >&5
17356 ac_cv_func_strlcat=no
17357 fi
17358 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17359 fi
17360 echo "$as_me:17360: result: $ac_cv_func_strlcat" >&5
17361 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17362 if test "$ac_cv_func_strlcat" = yes; then
17363
17364 cat >>confdefs.h <<\EOF
17365 #define HAVE_STRLCAT 1
17366 EOF
17367
17368 else
17369
17370                 echo "$as_me:17370: checking for strlcat in -lbsd" >&5
17371 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17372 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17373   echo $ECHO_N "(cached) $ECHO_C" >&6
17374 else
17375   ac_check_lib_save_LIBS=$LIBS
17376 LIBS="-lbsd  $LIBS"
17377 cat >"conftest.$ac_ext" <<_ACEOF
17378 #line 17378 "configure"
17379 #include "confdefs.h"
17380
17381 /* Override any gcc2 internal prototype to avoid an error.  */
17382 #ifdef __cplusplus
17383 extern "C"
17384 #endif
17385 /* We use char because int might match the return type of a gcc2
17386    builtin and then its argument prototype would still apply.  */
17387 char strlcat ();
17388 int
17389 main (void)
17390 {
17391 strlcat ();
17392   ;
17393   return 0;
17394 }
17395 _ACEOF
17396 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17397 if { (eval echo "$as_me:17397: \"$ac_link\"") >&5
17398   (eval $ac_link) 2>&5
17399   ac_status=$?
17400   echo "$as_me:17400: \$? = $ac_status" >&5
17401   (exit "$ac_status"); } &&
17402          { ac_try='test -s "conftest$ac_exeext"'
17403   { (eval echo "$as_me:17403: \"$ac_try\"") >&5
17404   (eval $ac_try) 2>&5
17405   ac_status=$?
17406   echo "$as_me:17406: \$? = $ac_status" >&5
17407   (exit "$ac_status"); }; }; then
17408   ac_cv_lib_bsd_strlcat=yes
17409 else
17410   echo "$as_me: failed program was:" >&5
17411 cat "conftest.$ac_ext" >&5
17412 ac_cv_lib_bsd_strlcat=no
17413 fi
17414 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17415 LIBS=$ac_check_lib_save_LIBS
17416 fi
17417 echo "$as_me:17417: result: $ac_cv_lib_bsd_strlcat" >&5
17418 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17419 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17420
17421 cf_add_libs="$LIBS"
17422 # reverse order
17423 cf_add_0lib=
17424 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17425 # filter duplicates
17426 for cf_add_1lib in $cf_add_0lib; do
17427         for cf_add_2lib in $cf_add_libs; do
17428                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17429                         cf_add_1lib=
17430                         break
17431                 fi
17432         done
17433         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17434 done
17435 LIBS="$cf_add_libs"
17436
17437 for ac_header in bsd/string.h
17438 do
17439 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17440 echo "$as_me:17440: checking for $ac_header" >&5
17441 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17442 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17443   echo $ECHO_N "(cached) $ECHO_C" >&6
17444 else
17445   cat >"conftest.$ac_ext" <<_ACEOF
17446 #line 17446 "configure"
17447 #include "confdefs.h"
17448 #include <$ac_header>
17449 _ACEOF
17450 if { (eval echo "$as_me:17450: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17451   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17452   ac_status=$?
17453   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17454   rm -f conftest.er1
17455   cat conftest.err >&5
17456   echo "$as_me:17456: \$? = $ac_status" >&5
17457   (exit "$ac_status"); } >/dev/null; then
17458   if test -s conftest.err; then
17459     ac_cpp_err=$ac_c_preproc_warn_flag
17460   else
17461     ac_cpp_err=
17462   fi
17463 else
17464   ac_cpp_err=yes
17465 fi
17466 if test -z "$ac_cpp_err"; then
17467   eval "$as_ac_Header=yes"
17468 else
17469   echo "$as_me: failed program was:" >&5
17470   cat "conftest.$ac_ext" >&5
17471   eval "$as_ac_Header=no"
17472 fi
17473 rm -f conftest.err "conftest.$ac_ext"
17474 fi
17475 echo "$as_me:17475: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17476 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17477 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17478   cat >>confdefs.h <<EOF
17479 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17480 EOF
17481
17482 fi
17483 done
17484
17485 cat >>confdefs.h <<\EOF
17486 #define HAVE_STRLCAT 1
17487 EOF
17488
17489 fi
17490
17491 fi
17492
17493 for ac_func in strlcpy snprintf
17494 do
17495 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17496 echo "$as_me:17496: checking for $ac_func" >&5
17497 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17498 if eval "test \"\${$as_ac_var+set}\" = set"; then
17499   echo $ECHO_N "(cached) $ECHO_C" >&6
17500 else
17501   cat >"conftest.$ac_ext" <<_ACEOF
17502 #line 17502 "configure"
17503 #include "confdefs.h"
17504 #define $ac_func autoconf_temporary
17505 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17506 #undef $ac_func
17507
17508 #ifdef __cplusplus
17509 extern "C"
17510 #endif
17511
17512 /* We use char because int might match the return type of a gcc2
17513    builtin and then its argument prototype would still apply.  */
17514 char $ac_func (void);
17515
17516 int
17517 main (void)
17518 {
17519
17520 /* The GNU C library defines stubs for functions which it implements
17521     to always fail with ENOSYS.  Some functions are actually named
17522     something starting with __ and the normal name is an alias.  */
17523 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17524 #error found stub for $ac_func
17525 #endif
17526
17527         return $ac_func ();
17528   ;
17529   return 0;
17530 }
17531 _ACEOF
17532 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17533 if { (eval echo "$as_me:17533: \"$ac_link\"") >&5
17534   (eval $ac_link) 2>&5
17535   ac_status=$?
17536   echo "$as_me:17536: \$? = $ac_status" >&5
17537   (exit "$ac_status"); } &&
17538          { ac_try='test -s "conftest$ac_exeext"'
17539   { (eval echo "$as_me:17539: \"$ac_try\"") >&5
17540   (eval $ac_try) 2>&5
17541   ac_status=$?
17542   echo "$as_me:17542: \$? = $ac_status" >&5
17543   (exit "$ac_status"); }; }; then
17544   eval "$as_ac_var=yes"
17545 else
17546   echo "$as_me: failed program was:" >&5
17547 cat "conftest.$ac_ext" >&5
17548 eval "$as_ac_var=no"
17549 fi
17550 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17551 fi
17552 echo "$as_me:17552: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17553 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17554 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17555   cat >>confdefs.h <<EOF
17556 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17557 EOF
17558
17559 fi
17560 done
17561
17562 fi
17563
17564 ###     use option --enable-assertions to turn on generation of assertion code
17565 echo "$as_me:17565: checking if you want to enable runtime assertions" >&5
17566 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17567
17568 # Check whether --enable-assertions or --disable-assertions was given.
17569 if test "${enable_assertions+set}" = set; then
17570   enableval="$enable_assertions"
17571   with_assertions=$enableval
17572 else
17573   with_assertions=no
17574 fi;
17575 echo "$as_me:17575: result: $with_assertions" >&5
17576 echo "${ECHO_T}$with_assertions" >&6
17577 if test -n "$GCC"
17578 then
17579         if test "$with_assertions" = no
17580         then
17581                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17582         else
17583
17584         ADAFLAGS="$ADAFLAGS -gnata"
17585
17586         fi
17587 fi
17588
17589 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17590
17591 echo "$as_me:17591: checking if you want to use dmalloc for testing" >&5
17592 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17593
17594 # Check whether --with-dmalloc or --without-dmalloc was given.
17595 if test "${with_dmalloc+set}" = set; then
17596   withval="$with_dmalloc"
17597   case "x$withval" in
17598         (x|xno) ;;
17599         (*)
17600                 : "${with_cflags:=-g}"
17601                 : "${enable_leaks:=no}"
17602                 with_dmalloc=yes
17603
17604 cat >>confdefs.h <<EOF
17605 #define USE_DMALLOC 1
17606 EOF
17607
17608                 ;;
17609         esac
17610 else
17611   with_dmalloc=
17612 fi;
17613 echo "$as_me:17613: result: ${with_dmalloc:-no}" >&5
17614 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17615
17616 case ".$with_cflags" in
17617 (.*-g*)
17618         case .$CFLAGS in
17619         (.*-g*)
17620                 ;;
17621         (*)
17622
17623 cf_fix_cppflags=no
17624 cf_new_cflags=
17625 cf_new_cppflags=
17626 cf_new_extra_cppflags=
17627
17628 for cf_add_cflags in -g
17629 do
17630 case "$cf_fix_cppflags" in
17631 (no)
17632         case "$cf_add_cflags" in
17633         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17634                 case "$cf_add_cflags" in
17635                 (-D*)
17636                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17637
17638                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17639                                 && test -z "${cf_tst_cflags}" \
17640                                 && cf_fix_cppflags=yes
17641
17642                         if test "$cf_fix_cppflags" = yes ; then
17643
17644         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17645         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17646
17647                                 continue
17648                         elif test "${cf_tst_cflags}" = "\"'" ; then
17649
17650         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17651         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17652
17653                                 continue
17654                         fi
17655                         ;;
17656                 esac
17657                 case "$CPPFLAGS" in
17658                 (*$cf_add_cflags)
17659                         ;;
17660                 (*)
17661                         case "$cf_add_cflags" in
17662                         (-D*)
17663                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17664
17665 CPPFLAGS=`echo "$CPPFLAGS" | \
17666         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17667                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17668
17669                                 ;;
17670                         esac
17671
17672         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17673         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17674
17675                         ;;
17676                 esac
17677                 ;;
17678         (*)
17679
17680         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17681         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17682
17683                 ;;
17684         esac
17685         ;;
17686 (yes)
17687
17688         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17689         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17690
17691         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17692
17693         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17694                 && test -z "${cf_tst_cflags}" \
17695                 && cf_fix_cppflags=no
17696         ;;
17697 esac
17698 done
17699
17700 if test -n "$cf_new_cflags" ; then
17701
17702         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17703         CFLAGS="${CFLAGS}$cf_new_cflags"
17704
17705 fi
17706
17707 if test -n "$cf_new_cppflags" ; then
17708
17709         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17710         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17711
17712 fi
17713
17714 if test -n "$cf_new_extra_cppflags" ; then
17715
17716         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17717         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17718
17719 fi
17720
17721                 ;;
17722         esac
17723         ;;
17724 esac
17725
17726 if test "$with_dmalloc" = yes ; then
17727         echo "$as_me:17727: checking for dmalloc.h" >&5
17728 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17729 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17730   echo $ECHO_N "(cached) $ECHO_C" >&6
17731 else
17732   cat >"conftest.$ac_ext" <<_ACEOF
17733 #line 17733 "configure"
17734 #include "confdefs.h"
17735 #include <dmalloc.h>
17736 _ACEOF
17737 if { (eval echo "$as_me:17737: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17738   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17739   ac_status=$?
17740   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17741   rm -f conftest.er1
17742   cat conftest.err >&5
17743   echo "$as_me:17743: \$? = $ac_status" >&5
17744   (exit "$ac_status"); } >/dev/null; then
17745   if test -s conftest.err; then
17746     ac_cpp_err=$ac_c_preproc_warn_flag
17747   else
17748     ac_cpp_err=
17749   fi
17750 else
17751   ac_cpp_err=yes
17752 fi
17753 if test -z "$ac_cpp_err"; then
17754   ac_cv_header_dmalloc_h=yes
17755 else
17756   echo "$as_me: failed program was:" >&5
17757   cat "conftest.$ac_ext" >&5
17758   ac_cv_header_dmalloc_h=no
17759 fi
17760 rm -f conftest.err "conftest.$ac_ext"
17761 fi
17762 echo "$as_me:17762: result: $ac_cv_header_dmalloc_h" >&5
17763 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17764 if test "$ac_cv_header_dmalloc_h" = yes; then
17765
17766 echo "$as_me:17766: checking for dmalloc_debug in -ldmalloc" >&5
17767 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17768 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17769   echo $ECHO_N "(cached) $ECHO_C" >&6
17770 else
17771   ac_check_lib_save_LIBS=$LIBS
17772 LIBS="-ldmalloc  $LIBS"
17773 cat >"conftest.$ac_ext" <<_ACEOF
17774 #line 17774 "configure"
17775 #include "confdefs.h"
17776
17777 /* Override any gcc2 internal prototype to avoid an error.  */
17778 #ifdef __cplusplus
17779 extern "C"
17780 #endif
17781 /* We use char because int might match the return type of a gcc2
17782    builtin and then its argument prototype would still apply.  */
17783 char dmalloc_debug ();
17784 int
17785 main (void)
17786 {
17787 dmalloc_debug ();
17788   ;
17789   return 0;
17790 }
17791 _ACEOF
17792 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17793 if { (eval echo "$as_me:17793: \"$ac_link\"") >&5
17794   (eval $ac_link) 2>&5
17795   ac_status=$?
17796   echo "$as_me:17796: \$? = $ac_status" >&5
17797   (exit "$ac_status"); } &&
17798          { ac_try='test -s "conftest$ac_exeext"'
17799   { (eval echo "$as_me:17799: \"$ac_try\"") >&5
17800   (eval $ac_try) 2>&5
17801   ac_status=$?
17802   echo "$as_me:17802: \$? = $ac_status" >&5
17803   (exit "$ac_status"); }; }; then
17804   ac_cv_lib_dmalloc_dmalloc_debug=yes
17805 else
17806   echo "$as_me: failed program was:" >&5
17807 cat "conftest.$ac_ext" >&5
17808 ac_cv_lib_dmalloc_dmalloc_debug=no
17809 fi
17810 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17811 LIBS=$ac_check_lib_save_LIBS
17812 fi
17813 echo "$as_me:17813: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17814 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17815 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
17816   cat >>confdefs.h <<EOF
17817 #define HAVE_LIBDMALLOC 1
17818 EOF
17819
17820   LIBS="-ldmalloc $LIBS"
17821
17822 fi
17823
17824 fi
17825
17826 fi
17827
17828 echo "$as_me:17828: checking if you want to use dbmalloc for testing" >&5
17829 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17830
17831 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17832 if test "${with_dbmalloc+set}" = set; then
17833   withval="$with_dbmalloc"
17834   case "x$withval" in
17835         (x|xno) ;;
17836         (*)
17837                 : "${with_cflags:=-g}"
17838                 : "${enable_leaks:=no}"
17839                 with_dbmalloc=yes
17840
17841 cat >>confdefs.h <<EOF
17842 #define USE_DBMALLOC 1
17843 EOF
17844
17845                 ;;
17846         esac
17847 else
17848   with_dbmalloc=
17849 fi;
17850 echo "$as_me:17850: result: ${with_dbmalloc:-no}" >&5
17851 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17852
17853 case ".$with_cflags" in
17854 (.*-g*)
17855         case .$CFLAGS in
17856         (.*-g*)
17857                 ;;
17858         (*)
17859
17860 cf_fix_cppflags=no
17861 cf_new_cflags=
17862 cf_new_cppflags=
17863 cf_new_extra_cppflags=
17864
17865 for cf_add_cflags in -g
17866 do
17867 case "$cf_fix_cppflags" in
17868 (no)
17869         case "$cf_add_cflags" in
17870         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17871                 case "$cf_add_cflags" in
17872                 (-D*)
17873                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17874
17875                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17876                                 && test -z "${cf_tst_cflags}" \
17877                                 && cf_fix_cppflags=yes
17878
17879                         if test "$cf_fix_cppflags" = yes ; then
17880
17881         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17882         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17883
17884                                 continue
17885                         elif test "${cf_tst_cflags}" = "\"'" ; then
17886
17887         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17888         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17889
17890                                 continue
17891                         fi
17892                         ;;
17893                 esac
17894                 case "$CPPFLAGS" in
17895                 (*$cf_add_cflags)
17896                         ;;
17897                 (*)
17898                         case "$cf_add_cflags" in
17899                         (-D*)
17900                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17901
17902 CPPFLAGS=`echo "$CPPFLAGS" | \
17903         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17904                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17905
17906                                 ;;
17907                         esac
17908
17909         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17910         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17911
17912                         ;;
17913                 esac
17914                 ;;
17915         (*)
17916
17917         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17918         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17919
17920                 ;;
17921         esac
17922         ;;
17923 (yes)
17924
17925         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17926         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17927
17928         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17929
17930         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17931                 && test -z "${cf_tst_cflags}" \
17932                 && cf_fix_cppflags=no
17933         ;;
17934 esac
17935 done
17936
17937 if test -n "$cf_new_cflags" ; then
17938
17939         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17940         CFLAGS="${CFLAGS}$cf_new_cflags"
17941
17942 fi
17943
17944 if test -n "$cf_new_cppflags" ; then
17945
17946         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17947         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17948
17949 fi
17950
17951 if test -n "$cf_new_extra_cppflags" ; then
17952
17953         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17954         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17955
17956 fi
17957
17958                 ;;
17959         esac
17960         ;;
17961 esac
17962
17963 if test "$with_dbmalloc" = yes ; then
17964         echo "$as_me:17964: checking for dbmalloc.h" >&5
17965 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17966 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17967   echo $ECHO_N "(cached) $ECHO_C" >&6
17968 else
17969   cat >"conftest.$ac_ext" <<_ACEOF
17970 #line 17970 "configure"
17971 #include "confdefs.h"
17972 #include <dbmalloc.h>
17973 _ACEOF
17974 if { (eval echo "$as_me:17974: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17975   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17976   ac_status=$?
17977   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17978   rm -f conftest.er1
17979   cat conftest.err >&5
17980   echo "$as_me:17980: \$? = $ac_status" >&5
17981   (exit "$ac_status"); } >/dev/null; then
17982   if test -s conftest.err; then
17983     ac_cpp_err=$ac_c_preproc_warn_flag
17984   else
17985     ac_cpp_err=
17986   fi
17987 else
17988   ac_cpp_err=yes
17989 fi
17990 if test -z "$ac_cpp_err"; then
17991   ac_cv_header_dbmalloc_h=yes
17992 else
17993   echo "$as_me: failed program was:" >&5
17994   cat "conftest.$ac_ext" >&5
17995   ac_cv_header_dbmalloc_h=no
17996 fi
17997 rm -f conftest.err "conftest.$ac_ext"
17998 fi
17999 echo "$as_me:17999: result: $ac_cv_header_dbmalloc_h" >&5
18000 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18001 if test "$ac_cv_header_dbmalloc_h" = yes; then
18002
18003 echo "$as_me:18003: checking for debug_malloc in -ldbmalloc" >&5
18004 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18005 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18006   echo $ECHO_N "(cached) $ECHO_C" >&6
18007 else
18008   ac_check_lib_save_LIBS=$LIBS
18009 LIBS="-ldbmalloc  $LIBS"
18010 cat >"conftest.$ac_ext" <<_ACEOF
18011 #line 18011 "configure"
18012 #include "confdefs.h"
18013
18014 /* Override any gcc2 internal prototype to avoid an error.  */
18015 #ifdef __cplusplus
18016 extern "C"
18017 #endif
18018 /* We use char because int might match the return type of a gcc2
18019    builtin and then its argument prototype would still apply.  */
18020 char debug_malloc ();
18021 int
18022 main (void)
18023 {
18024 debug_malloc ();
18025   ;
18026   return 0;
18027 }
18028 _ACEOF
18029 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18030 if { (eval echo "$as_me:18030: \"$ac_link\"") >&5
18031   (eval $ac_link) 2>&5
18032   ac_status=$?
18033   echo "$as_me:18033: \$? = $ac_status" >&5
18034   (exit "$ac_status"); } &&
18035          { ac_try='test -s "conftest$ac_exeext"'
18036   { (eval echo "$as_me:18036: \"$ac_try\"") >&5
18037   (eval $ac_try) 2>&5
18038   ac_status=$?
18039   echo "$as_me:18039: \$? = $ac_status" >&5
18040   (exit "$ac_status"); }; }; then
18041   ac_cv_lib_dbmalloc_debug_malloc=yes
18042 else
18043   echo "$as_me: failed program was:" >&5
18044 cat "conftest.$ac_ext" >&5
18045 ac_cv_lib_dbmalloc_debug_malloc=no
18046 fi
18047 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18048 LIBS=$ac_check_lib_save_LIBS
18049 fi
18050 echo "$as_me:18050: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18051 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18052 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18053   cat >>confdefs.h <<EOF
18054 #define HAVE_LIBDBMALLOC 1
18055 EOF
18056
18057   LIBS="-ldbmalloc $LIBS"
18058
18059 fi
18060
18061 fi
18062
18063 fi
18064
18065 echo "$as_me:18065: checking if you want to use valgrind for testing" >&5
18066 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18067
18068 # Check whether --with-valgrind or --without-valgrind was given.
18069 if test "${with_valgrind+set}" = set; then
18070   withval="$with_valgrind"
18071   case "x$withval" in
18072         (x|xno) ;;
18073         (*)
18074                 : "${with_cflags:=-g}"
18075                 : "${enable_leaks:=no}"
18076                 with_valgrind=yes
18077
18078 cat >>confdefs.h <<EOF
18079 #define USE_VALGRIND 1
18080 EOF
18081
18082                 ;;
18083         esac
18084 else
18085   with_valgrind=
18086 fi;
18087 echo "$as_me:18087: result: ${with_valgrind:-no}" >&5
18088 echo "${ECHO_T}${with_valgrind:-no}" >&6
18089
18090 case ".$with_cflags" in
18091 (.*-g*)
18092         case .$CFLAGS in
18093         (.*-g*)
18094                 ;;
18095         (*)
18096
18097 cf_fix_cppflags=no
18098 cf_new_cflags=
18099 cf_new_cppflags=
18100 cf_new_extra_cppflags=
18101
18102 for cf_add_cflags in -g
18103 do
18104 case "$cf_fix_cppflags" in
18105 (no)
18106         case "$cf_add_cflags" in
18107         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18108                 case "$cf_add_cflags" in
18109                 (-D*)
18110                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18111
18112                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18113                                 && test -z "${cf_tst_cflags}" \
18114                                 && cf_fix_cppflags=yes
18115
18116                         if test "$cf_fix_cppflags" = yes ; then
18117
18118         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18119         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18120
18121                                 continue
18122                         elif test "${cf_tst_cflags}" = "\"'" ; then
18123
18124         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18125         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18126
18127                                 continue
18128                         fi
18129                         ;;
18130                 esac
18131                 case "$CPPFLAGS" in
18132                 (*$cf_add_cflags)
18133                         ;;
18134                 (*)
18135                         case "$cf_add_cflags" in
18136                         (-D*)
18137                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18138
18139 CPPFLAGS=`echo "$CPPFLAGS" | \
18140         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18141                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18142
18143                                 ;;
18144                         esac
18145
18146         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18147         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18148
18149                         ;;
18150                 esac
18151                 ;;
18152         (*)
18153
18154         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18155         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18156
18157                 ;;
18158         esac
18159         ;;
18160 (yes)
18161
18162         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18163         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18164
18165         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18166
18167         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18168                 && test -z "${cf_tst_cflags}" \
18169                 && cf_fix_cppflags=no
18170         ;;
18171 esac
18172 done
18173
18174 if test -n "$cf_new_cflags" ; then
18175
18176         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18177         CFLAGS="${CFLAGS}$cf_new_cflags"
18178
18179 fi
18180
18181 if test -n "$cf_new_cppflags" ; then
18182
18183         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18184         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18185
18186 fi
18187
18188 if test -n "$cf_new_extra_cppflags" ; then
18189
18190         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18191         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18192
18193 fi
18194
18195                 ;;
18196         esac
18197         ;;
18198 esac
18199
18200 echo "$as_me:18200: checking if you want to perform memory-leak testing" >&5
18201 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18202
18203 # Check whether --enable-leaks or --disable-leaks was given.
18204 if test "${enable_leaks+set}" = set; then
18205   enableval="$enable_leaks"
18206   enable_leaks=$enableval
18207 else
18208   enable_leaks=yes
18209 fi;
18210 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18211 echo "$as_me:18211: result: $with_no_leaks" >&5
18212 echo "${ECHO_T}$with_no_leaks" >&6
18213
18214 if test "$enable_leaks" = no ; then
18215
18216 cat >>confdefs.h <<\EOF
18217 #define NO_LEAKS 1
18218 EOF
18219
18220 cat >>confdefs.h <<\EOF
18221 #define YY_NO_LEAKS 1
18222 EOF
18223
18224 fi
18225
18226 cat >>confdefs.h <<\EOF
18227 #define HAVE_NC_ALLOC_H 1
18228 EOF
18229
18230 ###     use option --enable-expanded to generate certain macros as functions
18231
18232 # Check whether --enable-expanded or --disable-expanded was given.
18233 if test "${enable_expanded+set}" = set; then
18234   enableval="$enable_expanded"
18235   test "x$enableval" = xyes &&
18236 cat >>confdefs.h <<\EOF
18237 #define NCURSES_EXPANDED 1
18238 EOF
18239
18240 fi;
18241
18242 ###     use option --disable-macros to suppress macros in favor of functions
18243
18244 # Check whether --enable-macros or --disable-macros was given.
18245 if test "${enable_macros+set}" = set; then
18246   enableval="$enable_macros"
18247   test "$enableval" = no &&
18248 cat >>confdefs.h <<\EOF
18249 #define NCURSES_NOMACROS 1
18250 EOF
18251
18252 fi;
18253
18254 # Normally we only add trace() to the debug-library.  Allow this to be
18255 # extended to all models of the ncurses library:
18256 cf_all_traces=no
18257 case "$CFLAGS $CPPFLAGS" in
18258 (*-DTRACE*)
18259         cf_all_traces=yes
18260         ;;
18261 esac
18262
18263 echo "$as_me:18263: checking whether to add trace feature to all models" >&5
18264 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18265
18266 # Check whether --with-trace or --without-trace was given.
18267 if test "${with_trace+set}" = set; then
18268   withval="$with_trace"
18269   cf_with_trace=$withval
18270 else
18271   cf_with_trace=$cf_all_traces
18272 fi;
18273 echo "$as_me:18273: result: $cf_with_trace" >&5
18274 echo "${ECHO_T}$cf_with_trace" >&6
18275
18276 if test "x$cf_with_trace" = xyes ; then
18277         LIB_TRACING=all
18278         ADA_TRACE=TRUE
18279
18280 cf_fix_cppflags=no
18281 cf_new_cflags=
18282 cf_new_cppflags=
18283 cf_new_extra_cppflags=
18284
18285 for cf_add_cflags in -DTRACE
18286 do
18287 case "$cf_fix_cppflags" in
18288 (no)
18289         case "$cf_add_cflags" in
18290         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18291                 case "$cf_add_cflags" in
18292                 (-D*)
18293                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18294
18295                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18296                                 && test -z "${cf_tst_cflags}" \
18297                                 && cf_fix_cppflags=yes
18298
18299                         if test "$cf_fix_cppflags" = yes ; then
18300
18301         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18302         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18303
18304                                 continue
18305                         elif test "${cf_tst_cflags}" = "\"'" ; then
18306
18307         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18308         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18309
18310                                 continue
18311                         fi
18312                         ;;
18313                 esac
18314                 case "$CPPFLAGS" in
18315                 (*$cf_add_cflags)
18316                         ;;
18317                 (*)
18318                         case "$cf_add_cflags" in
18319                         (-D*)
18320                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18321
18322 CPPFLAGS=`echo "$CPPFLAGS" | \
18323         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18324                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18325
18326                                 ;;
18327                         esac
18328
18329         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18330         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18331
18332                         ;;
18333                 esac
18334                 ;;
18335         (*)
18336
18337         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18338         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18339
18340                 ;;
18341         esac
18342         ;;
18343 (yes)
18344
18345         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18346         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18347
18348         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18349
18350         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18351                 && test -z "${cf_tst_cflags}" \
18352                 && cf_fix_cppflags=no
18353         ;;
18354 esac
18355 done
18356
18357 if test -n "$cf_new_cflags" ; then
18358
18359         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18360         CFLAGS="${CFLAGS}$cf_new_cflags"
18361
18362 fi
18363
18364 if test -n "$cf_new_cppflags" ; then
18365
18366         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18367         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18368
18369 fi
18370
18371 if test -n "$cf_new_extra_cppflags" ; then
18372
18373         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18374         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18375
18376 fi
18377
18378 cat >>confdefs.h <<\EOF
18379 #define HAVE__TRACEF 1
18380 EOF
18381
18382 else
18383         LIB_TRACING=DEBUG
18384         ADA_TRACE=FALSE
18385 fi
18386
18387 echo "$as_me:18387: checking if we want to use GNAT projects" >&5
18388 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18389
18390 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18391 if test "${enable_gnat_projects+set}" = set; then
18392   enableval="$enable_gnat_projects"
18393   test "$enableval" != no && enableval=yes
18394         if test "$enableval" != "yes" ; then
18395     enable_gnat_projects=no
18396         else
18397                 enable_gnat_projects=yes
18398         fi
18399 else
18400   enableval=yes
18401         enable_gnat_projects=yes
18402
18403 fi;
18404 echo "$as_me:18404: result: $enable_gnat_projects" >&5
18405 echo "${ECHO_T}$enable_gnat_projects" >&6
18406
18407 ###     Checks for libraries.
18408 case "$cf_cv_system_name" in
18409 (*mingw32*|*mingw64*)
18410         if test "x$with_exp_win32" = xyes ; then
18411         CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18412         else
18413         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18414         fi
18415         # Note: WINVER may be a problem with Windows 10
18416         ;;
18417 (*)
18418 echo "$as_me:18418: checking for gettimeofday" >&5
18419 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18420 if test "${ac_cv_func_gettimeofday+set}" = set; then
18421   echo $ECHO_N "(cached) $ECHO_C" >&6
18422 else
18423   cat >"conftest.$ac_ext" <<_ACEOF
18424 #line 18424 "configure"
18425 #include "confdefs.h"
18426 #define gettimeofday autoconf_temporary
18427 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18428 #undef gettimeofday
18429
18430 #ifdef __cplusplus
18431 extern "C"
18432 #endif
18433
18434 /* We use char because int might match the return type of a gcc2
18435    builtin and then its argument prototype would still apply.  */
18436 char gettimeofday (void);
18437
18438 int
18439 main (void)
18440 {
18441
18442 /* The GNU C library defines stubs for functions which it implements
18443     to always fail with ENOSYS.  Some functions are actually named
18444     something starting with __ and the normal name is an alias.  */
18445 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18446 #error found stub for gettimeofday
18447 #endif
18448
18449         return gettimeofday ();
18450   ;
18451   return 0;
18452 }
18453 _ACEOF
18454 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18455 if { (eval echo "$as_me:18455: \"$ac_link\"") >&5
18456   (eval $ac_link) 2>&5
18457   ac_status=$?
18458   echo "$as_me:18458: \$? = $ac_status" >&5
18459   (exit "$ac_status"); } &&
18460          { ac_try='test -s "conftest$ac_exeext"'
18461   { (eval echo "$as_me:18461: \"$ac_try\"") >&5
18462   (eval $ac_try) 2>&5
18463   ac_status=$?
18464   echo "$as_me:18464: \$? = $ac_status" >&5
18465   (exit "$ac_status"); }; }; then
18466   ac_cv_func_gettimeofday=yes
18467 else
18468   echo "$as_me: failed program was:" >&5
18469 cat "conftest.$ac_ext" >&5
18470 ac_cv_func_gettimeofday=no
18471 fi
18472 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18473 fi
18474 echo "$as_me:18474: result: $ac_cv_func_gettimeofday" >&5
18475 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18476 if test "$ac_cv_func_gettimeofday" = yes; then
18477
18478 cat >>confdefs.h <<\EOF
18479 #define HAVE_GETTIMEOFDAY 1
18480 EOF
18481
18482 else
18483
18484 echo "$as_me:18484: checking for gettimeofday in -lbsd" >&5
18485 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18486 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18487   echo $ECHO_N "(cached) $ECHO_C" >&6
18488 else
18489   ac_check_lib_save_LIBS=$LIBS
18490 LIBS="-lbsd  $LIBS"
18491 cat >"conftest.$ac_ext" <<_ACEOF
18492 #line 18492 "configure"
18493 #include "confdefs.h"
18494
18495 /* Override any gcc2 internal prototype to avoid an error.  */
18496 #ifdef __cplusplus
18497 extern "C"
18498 #endif
18499 /* We use char because int might match the return type of a gcc2
18500    builtin and then its argument prototype would still apply.  */
18501 char gettimeofday ();
18502 int
18503 main (void)
18504 {
18505 gettimeofday ();
18506   ;
18507   return 0;
18508 }
18509 _ACEOF
18510 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18511 if { (eval echo "$as_me:18511: \"$ac_link\"") >&5
18512   (eval $ac_link) 2>&5
18513   ac_status=$?
18514   echo "$as_me:18514: \$? = $ac_status" >&5
18515   (exit "$ac_status"); } &&
18516          { ac_try='test -s "conftest$ac_exeext"'
18517   { (eval echo "$as_me:18517: \"$ac_try\"") >&5
18518   (eval $ac_try) 2>&5
18519   ac_status=$?
18520   echo "$as_me:18520: \$? = $ac_status" >&5
18521   (exit "$ac_status"); }; }; then
18522   ac_cv_lib_bsd_gettimeofday=yes
18523 else
18524   echo "$as_me: failed program was:" >&5
18525 cat "conftest.$ac_ext" >&5
18526 ac_cv_lib_bsd_gettimeofday=no
18527 fi
18528 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18529 LIBS=$ac_check_lib_save_LIBS
18530 fi
18531 echo "$as_me:18531: result: $ac_cv_lib_bsd_gettimeofday" >&5
18532 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18533 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18534
18535 cat >>confdefs.h <<\EOF
18536 #define HAVE_GETTIMEOFDAY 1
18537 EOF
18538
18539 cf_add_libs="$LIBS"
18540 # reverse order
18541 cf_add_0lib=
18542 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18543 # filter duplicates
18544 for cf_add_1lib in $cf_add_0lib; do
18545         for cf_add_2lib in $cf_add_libs; do
18546                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18547                         cf_add_1lib=
18548                         break
18549                 fi
18550         done
18551         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18552 done
18553 LIBS="$cf_add_libs"
18554
18555 fi
18556
18557 fi
18558         ;;
18559 esac
18560
18561 echo "$as_me:18561: checking if -lm needed for math functions" >&5
18562 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18563 if test "${cf_cv_need_libm+set}" = set; then
18564   echo $ECHO_N "(cached) $ECHO_C" >&6
18565 else
18566
18567         cat >"conftest.$ac_ext" <<_ACEOF
18568 #line 18568 "configure"
18569 #include "confdefs.h"
18570
18571         #include <stdio.h>
18572         #include <stdlib.h>
18573         #include <math.h>
18574
18575 int
18576 main (void)
18577 {
18578 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18579   ;
18580   return 0;
18581 }
18582 _ACEOF
18583 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18584 if { (eval echo "$as_me:18584: \"$ac_link\"") >&5
18585   (eval $ac_link) 2>&5
18586   ac_status=$?
18587   echo "$as_me:18587: \$? = $ac_status" >&5
18588   (exit "$ac_status"); } &&
18589          { ac_try='test -s "conftest$ac_exeext"'
18590   { (eval echo "$as_me:18590: \"$ac_try\"") >&5
18591   (eval $ac_try) 2>&5
18592   ac_status=$?
18593   echo "$as_me:18593: \$? = $ac_status" >&5
18594   (exit "$ac_status"); }; }; then
18595   cf_cv_need_libm=no
18596 else
18597   echo "$as_me: failed program was:" >&5
18598 cat "conftest.$ac_ext" >&5
18599 cf_cv_need_libm=yes
18600 fi
18601 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18602 fi
18603 echo "$as_me:18603: result: $cf_cv_need_libm" >&5
18604 echo "${ECHO_T}$cf_cv_need_libm" >&6
18605 if test "$cf_cv_need_libm" = yes
18606 then
18607 MATH_LIB=-lm
18608 fi
18609
18610 ###     Checks for header files.
18611 echo "$as_me:18611: checking for ANSI C header files" >&5
18612 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18613 if test "${ac_cv_header_stdc+set}" = set; then
18614   echo $ECHO_N "(cached) $ECHO_C" >&6
18615 else
18616   cat >"conftest.$ac_ext" <<_ACEOF
18617 #line 18617 "configure"
18618 #include "confdefs.h"
18619 #include <stdlib.h>
18620 #include <stdarg.h>
18621 #include <string.h>
18622 #include <float.h>
18623
18624 _ACEOF
18625 if { (eval echo "$as_me:18625: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18626   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18627   ac_status=$?
18628   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18629   rm -f conftest.er1
18630   cat conftest.err >&5
18631   echo "$as_me:18631: \$? = $ac_status" >&5
18632   (exit "$ac_status"); } >/dev/null; then
18633   if test -s conftest.err; then
18634     ac_cpp_err=$ac_c_preproc_warn_flag
18635   else
18636     ac_cpp_err=
18637   fi
18638 else
18639   ac_cpp_err=yes
18640 fi
18641 if test -z "$ac_cpp_err"; then
18642   ac_cv_header_stdc=yes
18643 else
18644   echo "$as_me: failed program was:" >&5
18645   cat "conftest.$ac_ext" >&5
18646   ac_cv_header_stdc=no
18647 fi
18648 rm -f conftest.err "conftest.$ac_ext"
18649
18650 if test $ac_cv_header_stdc = yes; then
18651   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18652   cat >"conftest.$ac_ext" <<_ACEOF
18653 #line 18653 "configure"
18654 #include "confdefs.h"
18655 #include <string.h>
18656
18657 _ACEOF
18658 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18659   $EGREP "memchr" >/dev/null 2>&1; then
18660   :
18661 else
18662   ac_cv_header_stdc=no
18663 fi
18664 rm -rf conftest*
18665
18666 fi
18667
18668 if test $ac_cv_header_stdc = yes; then
18669   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18670   cat >"conftest.$ac_ext" <<_ACEOF
18671 #line 18671 "configure"
18672 #include "confdefs.h"
18673 #include <stdlib.h>
18674
18675 _ACEOF
18676 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18677   $EGREP "free" >/dev/null 2>&1; then
18678   :
18679 else
18680   ac_cv_header_stdc=no
18681 fi
18682 rm -rf conftest*
18683
18684 fi
18685
18686 if test $ac_cv_header_stdc = yes; then
18687   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18688   if test "$cross_compiling" = yes; then
18689   :
18690 else
18691   cat >"conftest.$ac_ext" <<_ACEOF
18692 #line 18692 "configure"
18693 #include "confdefs.h"
18694 #include <ctype.h>
18695 #if ((' ' & 0x0FF) == 0x020)
18696 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18697 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18698 #else
18699 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18700                      || ('j' <= (c) && (c) <= 'r') \
18701                      || ('s' <= (c) && (c) <= 'z'))
18702 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18703 #endif
18704
18705 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18706 int
18707 main (void)
18708 {
18709   int i;
18710   for (i = 0; i < 256; i++)
18711     if (XOR (islower (i), ISLOWER (i))
18712         || toupper (i) != TOUPPER (i))
18713       $ac_main_return(2);
18714   $ac_main_return (0);
18715 }
18716 _ACEOF
18717 rm -f "conftest$ac_exeext"
18718 if { (eval echo "$as_me:18718: \"$ac_link\"") >&5
18719   (eval $ac_link) 2>&5
18720   ac_status=$?
18721   echo "$as_me:18721: \$? = $ac_status" >&5
18722   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18723   { (eval echo "$as_me:18723: \"$ac_try\"") >&5
18724   (eval $ac_try) 2>&5
18725   ac_status=$?
18726   echo "$as_me:18726: \$? = $ac_status" >&5
18727   (exit "$ac_status"); }; }; then
18728   :
18729 else
18730   echo "$as_me: program exited with status $ac_status" >&5
18731 echo "$as_me: failed program was:" >&5
18732 cat "conftest.$ac_ext" >&5
18733 ac_cv_header_stdc=no
18734 fi
18735 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18736 fi
18737 fi
18738 fi
18739 echo "$as_me:18739: result: $ac_cv_header_stdc" >&5
18740 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18741 if test $ac_cv_header_stdc = yes; then
18742
18743 cat >>confdefs.h <<\EOF
18744 #define STDC_HEADERS 1
18745 EOF
18746
18747 fi
18748
18749 ac_header_dirent=no
18750 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18751   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18752 echo "$as_me:18752: checking for $ac_hdr that defines DIR" >&5
18753 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18754 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18755   echo $ECHO_N "(cached) $ECHO_C" >&6
18756 else
18757   cat >"conftest.$ac_ext" <<_ACEOF
18758 #line 18758 "configure"
18759 #include "confdefs.h"
18760 #include <sys/types.h>
18761 #include <$ac_hdr>
18762
18763 int
18764 main (void)
18765 {
18766 if ((DIR *) 0)
18767 return 0;
18768   ;
18769   return 0;
18770 }
18771 _ACEOF
18772 rm -f "conftest.$ac_objext"
18773 if { (eval echo "$as_me:18773: \"$ac_compile\"") >&5
18774   (eval $ac_compile) 2>&5
18775   ac_status=$?
18776   echo "$as_me:18776: \$? = $ac_status" >&5
18777   (exit "$ac_status"); } &&
18778          { ac_try='test -s "conftest.$ac_objext"'
18779   { (eval echo "$as_me:18779: \"$ac_try\"") >&5
18780   (eval $ac_try) 2>&5
18781   ac_status=$?
18782   echo "$as_me:18782: \$? = $ac_status" >&5
18783   (exit "$ac_status"); }; }; then
18784   eval "$as_ac_Header=yes"
18785 else
18786   echo "$as_me: failed program was:" >&5
18787 cat "conftest.$ac_ext" >&5
18788 eval "$as_ac_Header=no"
18789 fi
18790 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18791 fi
18792 echo "$as_me:18792: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18793 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18794 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18795   cat >>confdefs.h <<EOF
18796 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18797 EOF
18798
18799 ac_header_dirent=$ac_hdr; break
18800 fi
18801
18802 done
18803 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18804 if test $ac_header_dirent = dirent.h; then
18805   echo "$as_me:18805: checking for opendir in -ldir" >&5
18806 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18807 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18808   echo $ECHO_N "(cached) $ECHO_C" >&6
18809 else
18810   ac_check_lib_save_LIBS=$LIBS
18811 LIBS="-ldir  $LIBS"
18812 cat >"conftest.$ac_ext" <<_ACEOF
18813 #line 18813 "configure"
18814 #include "confdefs.h"
18815
18816 /* Override any gcc2 internal prototype to avoid an error.  */
18817 #ifdef __cplusplus
18818 extern "C"
18819 #endif
18820 /* We use char because int might match the return type of a gcc2
18821    builtin and then its argument prototype would still apply.  */
18822 char opendir ();
18823 int
18824 main (void)
18825 {
18826 opendir ();
18827   ;
18828   return 0;
18829 }
18830 _ACEOF
18831 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18832 if { (eval echo "$as_me:18832: \"$ac_link\"") >&5
18833   (eval $ac_link) 2>&5
18834   ac_status=$?
18835   echo "$as_me:18835: \$? = $ac_status" >&5
18836   (exit "$ac_status"); } &&
18837          { ac_try='test -s "conftest$ac_exeext"'
18838   { (eval echo "$as_me:18838: \"$ac_try\"") >&5
18839   (eval $ac_try) 2>&5
18840   ac_status=$?
18841   echo "$as_me:18841: \$? = $ac_status" >&5
18842   (exit "$ac_status"); }; }; then
18843   ac_cv_lib_dir_opendir=yes
18844 else
18845   echo "$as_me: failed program was:" >&5
18846 cat "conftest.$ac_ext" >&5
18847 ac_cv_lib_dir_opendir=no
18848 fi
18849 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18850 LIBS=$ac_check_lib_save_LIBS
18851 fi
18852 echo "$as_me:18852: result: $ac_cv_lib_dir_opendir" >&5
18853 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18854 if test "$ac_cv_lib_dir_opendir" = yes; then
18855   LIBS="$LIBS -ldir"
18856 fi
18857
18858 else
18859   echo "$as_me:18859: checking for opendir in -lx" >&5
18860 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18861 if test "${ac_cv_lib_x_opendir+set}" = set; then
18862   echo $ECHO_N "(cached) $ECHO_C" >&6
18863 else
18864   ac_check_lib_save_LIBS=$LIBS
18865 LIBS="-lx  $LIBS"
18866 cat >"conftest.$ac_ext" <<_ACEOF
18867 #line 18867 "configure"
18868 #include "confdefs.h"
18869
18870 /* Override any gcc2 internal prototype to avoid an error.  */
18871 #ifdef __cplusplus
18872 extern "C"
18873 #endif
18874 /* We use char because int might match the return type of a gcc2
18875    builtin and then its argument prototype would still apply.  */
18876 char opendir ();
18877 int
18878 main (void)
18879 {
18880 opendir ();
18881   ;
18882   return 0;
18883 }
18884 _ACEOF
18885 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18886 if { (eval echo "$as_me:18886: \"$ac_link\"") >&5
18887   (eval $ac_link) 2>&5
18888   ac_status=$?
18889   echo "$as_me:18889: \$? = $ac_status" >&5
18890   (exit "$ac_status"); } &&
18891          { ac_try='test -s "conftest$ac_exeext"'
18892   { (eval echo "$as_me:18892: \"$ac_try\"") >&5
18893   (eval $ac_try) 2>&5
18894   ac_status=$?
18895   echo "$as_me:18895: \$? = $ac_status" >&5
18896   (exit "$ac_status"); }; }; then
18897   ac_cv_lib_x_opendir=yes
18898 else
18899   echo "$as_me: failed program was:" >&5
18900 cat "conftest.$ac_ext" >&5
18901 ac_cv_lib_x_opendir=no
18902 fi
18903 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18904 LIBS=$ac_check_lib_save_LIBS
18905 fi
18906 echo "$as_me:18906: result: $ac_cv_lib_x_opendir" >&5
18907 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18908 if test "$ac_cv_lib_x_opendir" = yes; then
18909   LIBS="$LIBS -lx"
18910 fi
18911
18912 fi
18913
18914 echo "$as_me:18914: checking whether time.h and sys/time.h may both be included" >&5
18915 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18916 if test "${ac_cv_header_time+set}" = set; then
18917   echo $ECHO_N "(cached) $ECHO_C" >&6
18918 else
18919   cat >"conftest.$ac_ext" <<_ACEOF
18920 #line 18920 "configure"
18921 #include "confdefs.h"
18922 #include <sys/types.h>
18923 #include <sys/time.h>
18924 #include <time.h>
18925
18926 int
18927 main (void)
18928 {
18929 if ((struct tm *) 0)
18930 return 0;
18931   ;
18932   return 0;
18933 }
18934 _ACEOF
18935 rm -f "conftest.$ac_objext"
18936 if { (eval echo "$as_me:18936: \"$ac_compile\"") >&5
18937   (eval $ac_compile) 2>&5
18938   ac_status=$?
18939   echo "$as_me:18939: \$? = $ac_status" >&5
18940   (exit "$ac_status"); } &&
18941          { ac_try='test -s "conftest.$ac_objext"'
18942   { (eval echo "$as_me:18942: \"$ac_try\"") >&5
18943   (eval $ac_try) 2>&5
18944   ac_status=$?
18945   echo "$as_me:18945: \$? = $ac_status" >&5
18946   (exit "$ac_status"); }; }; then
18947   ac_cv_header_time=yes
18948 else
18949   echo "$as_me: failed program was:" >&5
18950 cat "conftest.$ac_ext" >&5
18951 ac_cv_header_time=no
18952 fi
18953 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18954 fi
18955 echo "$as_me:18955: result: $ac_cv_header_time" >&5
18956 echo "${ECHO_T}$ac_cv_header_time" >&6
18957 if test $ac_cv_header_time = yes; then
18958
18959 cat >>confdefs.h <<\EOF
18960 #define TIME_WITH_SYS_TIME 1
18961 EOF
18962
18963 fi
18964
18965 cf_regex_func=no
18966 cf_regex_libs=
18967 case "$host_os" in
18968 (mingw*)
18969         # -lsystre -ltre -lintl -liconv
18970         echo "$as_me:18970: checking for regcomp in -lsystre" >&5
18971 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
18972 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
18973   echo $ECHO_N "(cached) $ECHO_C" >&6
18974 else
18975   ac_check_lib_save_LIBS=$LIBS
18976 LIBS="-lsystre  $LIBS"
18977 cat >"conftest.$ac_ext" <<_ACEOF
18978 #line 18978 "configure"
18979 #include "confdefs.h"
18980
18981 /* Override any gcc2 internal prototype to avoid an error.  */
18982 #ifdef __cplusplus
18983 extern "C"
18984 #endif
18985 /* We use char because int might match the return type of a gcc2
18986    builtin and then its argument prototype would still apply.  */
18987 char regcomp ();
18988 int
18989 main (void)
18990 {
18991 regcomp ();
18992   ;
18993   return 0;
18994 }
18995 _ACEOF
18996 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18997 if { (eval echo "$as_me:18997: \"$ac_link\"") >&5
18998   (eval $ac_link) 2>&5
18999   ac_status=$?
19000   echo "$as_me:19000: \$? = $ac_status" >&5
19001   (exit "$ac_status"); } &&
19002          { ac_try='test -s "conftest$ac_exeext"'
19003   { (eval echo "$as_me:19003: \"$ac_try\"") >&5
19004   (eval $ac_try) 2>&5
19005   ac_status=$?
19006   echo "$as_me:19006: \$? = $ac_status" >&5
19007   (exit "$ac_status"); }; }; then
19008   ac_cv_lib_systre_regcomp=yes
19009 else
19010   echo "$as_me: failed program was:" >&5
19011 cat "conftest.$ac_ext" >&5
19012 ac_cv_lib_systre_regcomp=no
19013 fi
19014 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19015 LIBS=$ac_check_lib_save_LIBS
19016 fi
19017 echo "$as_me:19017: result: $ac_cv_lib_systre_regcomp" >&5
19018 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19019 if test "$ac_cv_lib_systre_regcomp" = yes; then
19020
19021                 echo "$as_me:19021: checking for libiconv_open in -liconv" >&5
19022 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19023 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19024   echo $ECHO_N "(cached) $ECHO_C" >&6
19025 else
19026   ac_check_lib_save_LIBS=$LIBS
19027 LIBS="-liconv  $LIBS"
19028 cat >"conftest.$ac_ext" <<_ACEOF
19029 #line 19029 "configure"
19030 #include "confdefs.h"
19031
19032 /* Override any gcc2 internal prototype to avoid an error.  */
19033 #ifdef __cplusplus
19034 extern "C"
19035 #endif
19036 /* We use char because int might match the return type of a gcc2
19037    builtin and then its argument prototype would still apply.  */
19038 char libiconv_open ();
19039 int
19040 main (void)
19041 {
19042 libiconv_open ();
19043   ;
19044   return 0;
19045 }
19046 _ACEOF
19047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19048 if { (eval echo "$as_me:19048: \"$ac_link\"") >&5
19049   (eval $ac_link) 2>&5
19050   ac_status=$?
19051   echo "$as_me:19051: \$? = $ac_status" >&5
19052   (exit "$ac_status"); } &&
19053          { ac_try='test -s "conftest$ac_exeext"'
19054   { (eval echo "$as_me:19054: \"$ac_try\"") >&5
19055   (eval $ac_try) 2>&5
19056   ac_status=$?
19057   echo "$as_me:19057: \$? = $ac_status" >&5
19058   (exit "$ac_status"); }; }; then
19059   ac_cv_lib_iconv_libiconv_open=yes
19060 else
19061   echo "$as_me: failed program was:" >&5
19062 cat "conftest.$ac_ext" >&5
19063 ac_cv_lib_iconv_libiconv_open=no
19064 fi
19065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19066 LIBS=$ac_check_lib_save_LIBS
19067 fi
19068 echo "$as_me:19068: result: $ac_cv_lib_iconv_libiconv_open" >&5
19069 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19070 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19071
19072 cf_add_libs="$LIBS"
19073 # reverse order
19074 cf_add_0lib=
19075 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19076 # filter duplicates
19077 for cf_add_1lib in $cf_add_0lib; do
19078         for cf_add_2lib in $cf_add_libs; do
19079                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19080                         cf_add_1lib=
19081                         break
19082                 fi
19083         done
19084         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19085 done
19086 LIBS="$cf_add_libs"
19087
19088 fi
19089
19090                 echo "$as_me:19090: checking for libintl_gettext in -lintl" >&5
19091 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19092 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19093   echo $ECHO_N "(cached) $ECHO_C" >&6
19094 else
19095   ac_check_lib_save_LIBS=$LIBS
19096 LIBS="-lintl  $LIBS"
19097 cat >"conftest.$ac_ext" <<_ACEOF
19098 #line 19098 "configure"
19099 #include "confdefs.h"
19100
19101 /* Override any gcc2 internal prototype to avoid an error.  */
19102 #ifdef __cplusplus
19103 extern "C"
19104 #endif
19105 /* We use char because int might match the return type of a gcc2
19106    builtin and then its argument prototype would still apply.  */
19107 char libintl_gettext ();
19108 int
19109 main (void)
19110 {
19111 libintl_gettext ();
19112   ;
19113   return 0;
19114 }
19115 _ACEOF
19116 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19117 if { (eval echo "$as_me:19117: \"$ac_link\"") >&5
19118   (eval $ac_link) 2>&5
19119   ac_status=$?
19120   echo "$as_me:19120: \$? = $ac_status" >&5
19121   (exit "$ac_status"); } &&
19122          { ac_try='test -s "conftest$ac_exeext"'
19123   { (eval echo "$as_me:19123: \"$ac_try\"") >&5
19124   (eval $ac_try) 2>&5
19125   ac_status=$?
19126   echo "$as_me:19126: \$? = $ac_status" >&5
19127   (exit "$ac_status"); }; }; then
19128   ac_cv_lib_intl_libintl_gettext=yes
19129 else
19130   echo "$as_me: failed program was:" >&5
19131 cat "conftest.$ac_ext" >&5
19132 ac_cv_lib_intl_libintl_gettext=no
19133 fi
19134 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19135 LIBS=$ac_check_lib_save_LIBS
19136 fi
19137 echo "$as_me:19137: result: $ac_cv_lib_intl_libintl_gettext" >&5
19138 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19139 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19140
19141 cf_add_libs="$LIBS"
19142 # reverse order
19143 cf_add_0lib=
19144 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19145 # filter duplicates
19146 for cf_add_1lib in $cf_add_0lib; do
19147         for cf_add_2lib in $cf_add_libs; do
19148                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19149                         cf_add_1lib=
19150                         break
19151                 fi
19152         done
19153         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19154 done
19155 LIBS="$cf_add_libs"
19156
19157 fi
19158
19159                 echo "$as_me:19159: checking for tre_regcomp in -ltre" >&5
19160 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19161 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19162   echo $ECHO_N "(cached) $ECHO_C" >&6
19163 else
19164   ac_check_lib_save_LIBS=$LIBS
19165 LIBS="-ltre  $LIBS"
19166 cat >"conftest.$ac_ext" <<_ACEOF
19167 #line 19167 "configure"
19168 #include "confdefs.h"
19169
19170 /* Override any gcc2 internal prototype to avoid an error.  */
19171 #ifdef __cplusplus
19172 extern "C"
19173 #endif
19174 /* We use char because int might match the return type of a gcc2
19175    builtin and then its argument prototype would still apply.  */
19176 char tre_regcomp ();
19177 int
19178 main (void)
19179 {
19180 tre_regcomp ();
19181   ;
19182   return 0;
19183 }
19184 _ACEOF
19185 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19186 if { (eval echo "$as_me:19186: \"$ac_link\"") >&5
19187   (eval $ac_link) 2>&5
19188   ac_status=$?
19189   echo "$as_me:19189: \$? = $ac_status" >&5
19190   (exit "$ac_status"); } &&
19191          { ac_try='test -s "conftest$ac_exeext"'
19192   { (eval echo "$as_me:19192: \"$ac_try\"") >&5
19193   (eval $ac_try) 2>&5
19194   ac_status=$?
19195   echo "$as_me:19195: \$? = $ac_status" >&5
19196   (exit "$ac_status"); }; }; then
19197   ac_cv_lib_tre_tre_regcomp=yes
19198 else
19199   echo "$as_me: failed program was:" >&5
19200 cat "conftest.$ac_ext" >&5
19201 ac_cv_lib_tre_tre_regcomp=no
19202 fi
19203 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19204 LIBS=$ac_check_lib_save_LIBS
19205 fi
19206 echo "$as_me:19206: result: $ac_cv_lib_tre_tre_regcomp" >&5
19207 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19208 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19209
19210 cf_add_libs="$LIBS"
19211 # reverse order
19212 cf_add_0lib=
19213 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19214 # filter duplicates
19215 for cf_add_1lib in $cf_add_0lib; do
19216         for cf_add_2lib in $cf_add_libs; do
19217                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19218                         cf_add_1lib=
19219                         break
19220                 fi
19221         done
19222         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19223 done
19224 LIBS="$cf_add_libs"
19225
19226 fi
19227
19228 cf_add_libs="$LIBS"
19229 # reverse order
19230 cf_add_0lib=
19231 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19232 # filter duplicates
19233 for cf_add_1lib in $cf_add_0lib; do
19234         for cf_add_2lib in $cf_add_libs; do
19235                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19236                         cf_add_1lib=
19237                         break
19238                 fi
19239         done
19240         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19241 done
19242 LIBS="$cf_add_libs"
19243
19244                 cf_regex_func=regcomp
19245
19246 else
19247
19248                 echo "$as_me:19248: checking for regcomp in -lgnurx" >&5
19249 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19250 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19251   echo $ECHO_N "(cached) $ECHO_C" >&6
19252 else
19253   ac_check_lib_save_LIBS=$LIBS
19254 LIBS="-lgnurx  $LIBS"
19255 cat >"conftest.$ac_ext" <<_ACEOF
19256 #line 19256 "configure"
19257 #include "confdefs.h"
19258
19259 /* Override any gcc2 internal prototype to avoid an error.  */
19260 #ifdef __cplusplus
19261 extern "C"
19262 #endif
19263 /* We use char because int might match the return type of a gcc2
19264    builtin and then its argument prototype would still apply.  */
19265 char regcomp ();
19266 int
19267 main (void)
19268 {
19269 regcomp ();
19270   ;
19271   return 0;
19272 }
19273 _ACEOF
19274 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19275 if { (eval echo "$as_me:19275: \"$ac_link\"") >&5
19276   (eval $ac_link) 2>&5
19277   ac_status=$?
19278   echo "$as_me:19278: \$? = $ac_status" >&5
19279   (exit "$ac_status"); } &&
19280          { ac_try='test -s "conftest$ac_exeext"'
19281   { (eval echo "$as_me:19281: \"$ac_try\"") >&5
19282   (eval $ac_try) 2>&5
19283   ac_status=$?
19284   echo "$as_me:19284: \$? = $ac_status" >&5
19285   (exit "$ac_status"); }; }; then
19286   ac_cv_lib_gnurx_regcomp=yes
19287 else
19288   echo "$as_me: failed program was:" >&5
19289 cat "conftest.$ac_ext" >&5
19290 ac_cv_lib_gnurx_regcomp=no
19291 fi
19292 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19293 LIBS=$ac_check_lib_save_LIBS
19294 fi
19295 echo "$as_me:19295: result: $ac_cv_lib_gnurx_regcomp" >&5
19296 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19297 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19298
19299 cf_add_libs="$LIBS"
19300 # reverse order
19301 cf_add_0lib=
19302 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19303 # filter duplicates
19304 for cf_add_1lib in $cf_add_0lib; do
19305         for cf_add_2lib in $cf_add_libs; do
19306                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19307                         cf_add_1lib=
19308                         break
19309                 fi
19310         done
19311         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19312 done
19313 LIBS="$cf_add_libs"
19314
19315                         cf_regex_func=regcomp
19316 fi
19317
19318 fi
19319
19320         ;;
19321 (*)
19322         cf_regex_libs="regex re"
19323         echo "$as_me:19323: checking for regcomp" >&5
19324 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19325 if test "${ac_cv_func_regcomp+set}" = set; then
19326   echo $ECHO_N "(cached) $ECHO_C" >&6
19327 else
19328   cat >"conftest.$ac_ext" <<_ACEOF
19329 #line 19329 "configure"
19330 #include "confdefs.h"
19331 #define regcomp autoconf_temporary
19332 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19333 #undef regcomp
19334
19335 #ifdef __cplusplus
19336 extern "C"
19337 #endif
19338
19339 /* We use char because int might match the return type of a gcc2
19340    builtin and then its argument prototype would still apply.  */
19341 char regcomp (void);
19342
19343 int
19344 main (void)
19345 {
19346
19347 /* The GNU C library defines stubs for functions which it implements
19348     to always fail with ENOSYS.  Some functions are actually named
19349     something starting with __ and the normal name is an alias.  */
19350 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19351 #error found stub for regcomp
19352 #endif
19353
19354         return regcomp ();
19355   ;
19356   return 0;
19357 }
19358 _ACEOF
19359 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19360 if { (eval echo "$as_me:19360: \"$ac_link\"") >&5
19361   (eval $ac_link) 2>&5
19362   ac_status=$?
19363   echo "$as_me:19363: \$? = $ac_status" >&5
19364   (exit "$ac_status"); } &&
19365          { ac_try='test -s "conftest$ac_exeext"'
19366   { (eval echo "$as_me:19366: \"$ac_try\"") >&5
19367   (eval $ac_try) 2>&5
19368   ac_status=$?
19369   echo "$as_me:19369: \$? = $ac_status" >&5
19370   (exit "$ac_status"); }; }; then
19371   ac_cv_func_regcomp=yes
19372 else
19373   echo "$as_me: failed program was:" >&5
19374 cat "conftest.$ac_ext" >&5
19375 ac_cv_func_regcomp=no
19376 fi
19377 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19378 fi
19379 echo "$as_me:19379: result: $ac_cv_func_regcomp" >&5
19380 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19381 if test "$ac_cv_func_regcomp" = yes; then
19382   cf_regex_func=regcomp
19383 else
19384
19385                 for cf_regex_lib in $cf_regex_libs
19386                 do
19387                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19388 echo "$as_me:19388: checking for regcomp in -l$cf_regex_lib" >&5
19389 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19390 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19391   echo $ECHO_N "(cached) $ECHO_C" >&6
19392 else
19393   ac_check_lib_save_LIBS=$LIBS
19394 LIBS="-l$cf_regex_lib  $LIBS"
19395 cat >"conftest.$ac_ext" <<_ACEOF
19396 #line 19396 "configure"
19397 #include "confdefs.h"
19398
19399 /* Override any gcc2 internal prototype to avoid an error.  */
19400 #ifdef __cplusplus
19401 extern "C"
19402 #endif
19403 /* We use char because int might match the return type of a gcc2
19404    builtin and then its argument prototype would still apply.  */
19405 char regcomp ();
19406 int
19407 main (void)
19408 {
19409 regcomp ();
19410   ;
19411   return 0;
19412 }
19413 _ACEOF
19414 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19415 if { (eval echo "$as_me:19415: \"$ac_link\"") >&5
19416   (eval $ac_link) 2>&5
19417   ac_status=$?
19418   echo "$as_me:19418: \$? = $ac_status" >&5
19419   (exit "$ac_status"); } &&
19420          { ac_try='test -s "conftest$ac_exeext"'
19421   { (eval echo "$as_me:19421: \"$ac_try\"") >&5
19422   (eval $ac_try) 2>&5
19423   ac_status=$?
19424   echo "$as_me:19424: \$? = $ac_status" >&5
19425   (exit "$ac_status"); }; }; then
19426   eval "$as_ac_Lib=yes"
19427 else
19428   echo "$as_me: failed program was:" >&5
19429 cat "conftest.$ac_ext" >&5
19430 eval "$as_ac_Lib=no"
19431 fi
19432 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19433 LIBS=$ac_check_lib_save_LIBS
19434 fi
19435 echo "$as_me:19435: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19436 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19437 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19438
19439 cf_add_libs="$LIBS"
19440 # reverse order
19441 cf_add_0lib=
19442 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19443 # filter duplicates
19444 for cf_add_1lib in $cf_add_0lib; do
19445         for cf_add_2lib in $cf_add_libs; do
19446                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19447                         cf_add_1lib=
19448                         break
19449                 fi
19450         done
19451         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19452 done
19453 LIBS="$cf_add_libs"
19454
19455                                         cf_regex_func=regcomp
19456                                         break
19457 fi
19458
19459                 done
19460
19461 fi
19462
19463         ;;
19464 esac
19465
19466 if test "$cf_regex_func" = no ; then
19467         echo "$as_me:19467: checking for compile" >&5
19468 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19469 if test "${ac_cv_func_compile+set}" = set; then
19470   echo $ECHO_N "(cached) $ECHO_C" >&6
19471 else
19472   cat >"conftest.$ac_ext" <<_ACEOF
19473 #line 19473 "configure"
19474 #include "confdefs.h"
19475 #define compile autoconf_temporary
19476 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19477 #undef compile
19478
19479 #ifdef __cplusplus
19480 extern "C"
19481 #endif
19482
19483 /* We use char because int might match the return type of a gcc2
19484    builtin and then its argument prototype would still apply.  */
19485 char compile (void);
19486
19487 int
19488 main (void)
19489 {
19490
19491 /* The GNU C library defines stubs for functions which it implements
19492     to always fail with ENOSYS.  Some functions are actually named
19493     something starting with __ and the normal name is an alias.  */
19494 #if defined (__stub_compile) || defined (__stub___compile)
19495 #error found stub for compile
19496 #endif
19497
19498         return compile ();
19499   ;
19500   return 0;
19501 }
19502 _ACEOF
19503 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19504 if { (eval echo "$as_me:19504: \"$ac_link\"") >&5
19505   (eval $ac_link) 2>&5
19506   ac_status=$?
19507   echo "$as_me:19507: \$? = $ac_status" >&5
19508   (exit "$ac_status"); } &&
19509          { ac_try='test -s "conftest$ac_exeext"'
19510   { (eval echo "$as_me:19510: \"$ac_try\"") >&5
19511   (eval $ac_try) 2>&5
19512   ac_status=$?
19513   echo "$as_me:19513: \$? = $ac_status" >&5
19514   (exit "$ac_status"); }; }; then
19515   ac_cv_func_compile=yes
19516 else
19517   echo "$as_me: failed program was:" >&5
19518 cat "conftest.$ac_ext" >&5
19519 ac_cv_func_compile=no
19520 fi
19521 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19522 fi
19523 echo "$as_me:19523: result: $ac_cv_func_compile" >&5
19524 echo "${ECHO_T}$ac_cv_func_compile" >&6
19525 if test "$ac_cv_func_compile" = yes; then
19526   cf_regex_func=compile
19527 else
19528
19529                 echo "$as_me:19529: checking for compile in -lgen" >&5
19530 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19531 if test "${ac_cv_lib_gen_compile+set}" = set; then
19532   echo $ECHO_N "(cached) $ECHO_C" >&6
19533 else
19534   ac_check_lib_save_LIBS=$LIBS
19535 LIBS="-lgen  $LIBS"
19536 cat >"conftest.$ac_ext" <<_ACEOF
19537 #line 19537 "configure"
19538 #include "confdefs.h"
19539
19540 /* Override any gcc2 internal prototype to avoid an error.  */
19541 #ifdef __cplusplus
19542 extern "C"
19543 #endif
19544 /* We use char because int might match the return type of a gcc2
19545    builtin and then its argument prototype would still apply.  */
19546 char compile ();
19547 int
19548 main (void)
19549 {
19550 compile ();
19551   ;
19552   return 0;
19553 }
19554 _ACEOF
19555 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19556 if { (eval echo "$as_me:19556: \"$ac_link\"") >&5
19557   (eval $ac_link) 2>&5
19558   ac_status=$?
19559   echo "$as_me:19559: \$? = $ac_status" >&5
19560   (exit "$ac_status"); } &&
19561          { ac_try='test -s "conftest$ac_exeext"'
19562   { (eval echo "$as_me:19562: \"$ac_try\"") >&5
19563   (eval $ac_try) 2>&5
19564   ac_status=$?
19565   echo "$as_me:19565: \$? = $ac_status" >&5
19566   (exit "$ac_status"); }; }; then
19567   ac_cv_lib_gen_compile=yes
19568 else
19569   echo "$as_me: failed program was:" >&5
19570 cat "conftest.$ac_ext" >&5
19571 ac_cv_lib_gen_compile=no
19572 fi
19573 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19574 LIBS=$ac_check_lib_save_LIBS
19575 fi
19576 echo "$as_me:19576: result: $ac_cv_lib_gen_compile" >&5
19577 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19578 if test "$ac_cv_lib_gen_compile" = yes; then
19579
19580 cf_add_libs="$LIBS"
19581 # reverse order
19582 cf_add_0lib=
19583 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19584 # filter duplicates
19585 for cf_add_1lib in $cf_add_0lib; do
19586         for cf_add_2lib in $cf_add_libs; do
19587                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19588                         cf_add_1lib=
19589                         break
19590                 fi
19591         done
19592         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19593 done
19594 LIBS="$cf_add_libs"
19595
19596                                 cf_regex_func=compile
19597 fi
19598
19599 fi
19600
19601 fi
19602
19603 if test "$cf_regex_func" = no ; then
19604         { echo "$as_me:19604: WARNING: cannot find regular expression library" >&5
19605 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19606 fi
19607
19608 echo "$as_me:19608: checking for regular-expression headers" >&5
19609 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19610 if test "${cf_cv_regex_hdrs+set}" = set; then
19611   echo $ECHO_N "(cached) $ECHO_C" >&6
19612 else
19613
19614 cf_cv_regex_hdrs=no
19615 case "$cf_regex_func" in
19616 (compile)
19617         for cf_regex_hdr in regexp.h regexpr.h
19618         do
19619                 cat >"conftest.$ac_ext" <<_ACEOF
19620 #line 19620 "configure"
19621 #include "confdefs.h"
19622 #include <$cf_regex_hdr>
19623 int
19624 main (void)
19625 {
19626
19627                         char *p = compile("", "", "", 0);
19628                         int x = step("", "");
19629                         (void)p;
19630                         (void)x;
19631
19632   ;
19633   return 0;
19634 }
19635 _ACEOF
19636 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19637 if { (eval echo "$as_me:19637: \"$ac_link\"") >&5
19638   (eval $ac_link) 2>&5
19639   ac_status=$?
19640   echo "$as_me:19640: \$? = $ac_status" >&5
19641   (exit "$ac_status"); } &&
19642          { ac_try='test -s "conftest$ac_exeext"'
19643   { (eval echo "$as_me:19643: \"$ac_try\"") >&5
19644   (eval $ac_try) 2>&5
19645   ac_status=$?
19646   echo "$as_me:19646: \$? = $ac_status" >&5
19647   (exit "$ac_status"); }; }; then
19648
19649                         cf_cv_regex_hdrs=$cf_regex_hdr
19650                         break
19651
19652 else
19653   echo "$as_me: failed program was:" >&5
19654 cat "conftest.$ac_ext" >&5
19655 fi
19656 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19657         done
19658         ;;
19659 (*)
19660         for cf_regex_hdr in regex.h
19661         do
19662                 cat >"conftest.$ac_ext" <<_ACEOF
19663 #line 19663 "configure"
19664 #include "confdefs.h"
19665 #include <sys/types.h>
19666 #include <$cf_regex_hdr>
19667 int
19668 main (void)
19669 {
19670
19671                         regex_t *p = 0;
19672                         int x = regcomp(p, "", 0);
19673                         int y = regexec(p, "", 0, 0, 0);
19674                         (void)x;
19675                         (void)y;
19676                         regfree(p);
19677
19678   ;
19679   return 0;
19680 }
19681 _ACEOF
19682 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19683 if { (eval echo "$as_me:19683: \"$ac_link\"") >&5
19684   (eval $ac_link) 2>&5
19685   ac_status=$?
19686   echo "$as_me:19686: \$? = $ac_status" >&5
19687   (exit "$ac_status"); } &&
19688          { ac_try='test -s "conftest$ac_exeext"'
19689   { (eval echo "$as_me:19689: \"$ac_try\"") >&5
19690   (eval $ac_try) 2>&5
19691   ac_status=$?
19692   echo "$as_me:19692: \$? = $ac_status" >&5
19693   (exit "$ac_status"); }; }; then
19694
19695                         cf_cv_regex_hdrs=$cf_regex_hdr
19696                         break
19697
19698 else
19699   echo "$as_me: failed program was:" >&5
19700 cat "conftest.$ac_ext" >&5
19701 fi
19702 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19703         done
19704         ;;
19705 esac
19706
19707 fi
19708 echo "$as_me:19708: result: $cf_cv_regex_hdrs" >&5
19709 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
19710
19711 case "$cf_cv_regex_hdrs" in
19712         (no)            { echo "$as_me:19712: WARNING: no regular expression header found" >&5
19713 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
19714         (regex.h)
19715 cat >>confdefs.h <<\EOF
19716 #define HAVE_REGEX_H_FUNCS 1
19717 EOF
19718  ;;
19719         (regexp.h)
19720 cat >>confdefs.h <<\EOF
19721 #define HAVE_REGEXP_H_FUNCS 1
19722 EOF
19723  ;;
19724         (regexpr.h)
19725 cat >>confdefs.h <<\EOF
19726 #define HAVE_REGEXPR_H_FUNCS 1
19727 EOF
19728  ;;
19729 esac
19730
19731 for ac_header in \
19732 fcntl.h \
19733 getopt.h \
19734 limits.h \
19735 locale.h \
19736 math.h \
19737 poll.h \
19738 sys/ioctl.h \
19739 sys/param.h \
19740 sys/poll.h \
19741 sys/select.h \
19742 sys/time.h \
19743 sys/times.h \
19744 ttyent.h \
19745 unistd.h \
19746 wctype.h \
19747
19748 do
19749 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19750 echo "$as_me:19750: checking for $ac_header" >&5
19751 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19752 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19753   echo $ECHO_N "(cached) $ECHO_C" >&6
19754 else
19755   cat >"conftest.$ac_ext" <<_ACEOF
19756 #line 19756 "configure"
19757 #include "confdefs.h"
19758 #include <$ac_header>
19759 _ACEOF
19760 if { (eval echo "$as_me:19760: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19761   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19762   ac_status=$?
19763   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19764   rm -f conftest.er1
19765   cat conftest.err >&5
19766   echo "$as_me:19766: \$? = $ac_status" >&5
19767   (exit "$ac_status"); } >/dev/null; then
19768   if test -s conftest.err; then
19769     ac_cpp_err=$ac_c_preproc_warn_flag
19770   else
19771     ac_cpp_err=
19772   fi
19773 else
19774   ac_cpp_err=yes
19775 fi
19776 if test -z "$ac_cpp_err"; then
19777   eval "$as_ac_Header=yes"
19778 else
19779   echo "$as_me: failed program was:" >&5
19780   cat "conftest.$ac_ext" >&5
19781   eval "$as_ac_Header=no"
19782 fi
19783 rm -f conftest.err "conftest.$ac_ext"
19784 fi
19785 echo "$as_me:19785: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19786 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19787 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19788   cat >>confdefs.h <<EOF
19789 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19790 EOF
19791
19792 fi
19793 done
19794
19795 for ac_header in unistd.h getopt.h
19796 do
19797 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19798 echo "$as_me:19798: checking for $ac_header" >&5
19799 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19800 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19801   echo $ECHO_N "(cached) $ECHO_C" >&6
19802 else
19803   cat >"conftest.$ac_ext" <<_ACEOF
19804 #line 19804 "configure"
19805 #include "confdefs.h"
19806 #include <$ac_header>
19807 _ACEOF
19808 if { (eval echo "$as_me:19808: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19809   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19810   ac_status=$?
19811   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19812   rm -f conftest.er1
19813   cat conftest.err >&5
19814   echo "$as_me:19814: \$? = $ac_status" >&5
19815   (exit "$ac_status"); } >/dev/null; then
19816   if test -s conftest.err; then
19817     ac_cpp_err=$ac_c_preproc_warn_flag
19818   else
19819     ac_cpp_err=
19820   fi
19821 else
19822   ac_cpp_err=yes
19823 fi
19824 if test -z "$ac_cpp_err"; then
19825   eval "$as_ac_Header=yes"
19826 else
19827   echo "$as_me: failed program was:" >&5
19828   cat "conftest.$ac_ext" >&5
19829   eval "$as_ac_Header=no"
19830 fi
19831 rm -f conftest.err "conftest.$ac_ext"
19832 fi
19833 echo "$as_me:19833: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19834 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19835 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19836   cat >>confdefs.h <<EOF
19837 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19838 EOF
19839
19840 fi
19841 done
19842
19843 echo "$as_me:19843: checking for header declaring getopt variables" >&5
19844 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
19845 if test "${cf_cv_getopt_header+set}" = set; then
19846   echo $ECHO_N "(cached) $ECHO_C" >&6
19847 else
19848
19849 cf_cv_getopt_header=none
19850 for cf_header in stdio.h stdlib.h unistd.h getopt.h
19851 do
19852 cat >"conftest.$ac_ext" <<_ACEOF
19853 #line 19853 "configure"
19854 #include "confdefs.h"
19855
19856 #include <$cf_header>
19857 int
19858 main (void)
19859 {
19860 int x = optind; char *y = optarg; (void)x; (void)y
19861   ;
19862   return 0;
19863 }
19864 _ACEOF
19865 rm -f "conftest.$ac_objext"
19866 if { (eval echo "$as_me:19866: \"$ac_compile\"") >&5
19867   (eval $ac_compile) 2>&5
19868   ac_status=$?
19869   echo "$as_me:19869: \$? = $ac_status" >&5
19870   (exit "$ac_status"); } &&
19871          { ac_try='test -s "conftest.$ac_objext"'
19872   { (eval echo "$as_me:19872: \"$ac_try\"") >&5
19873   (eval $ac_try) 2>&5
19874   ac_status=$?
19875   echo "$as_me:19875: \$? = $ac_status" >&5
19876   (exit "$ac_status"); }; }; then
19877   cf_cv_getopt_header=$cf_header
19878  break
19879 else
19880   echo "$as_me: failed program was:" >&5
19881 cat "conftest.$ac_ext" >&5
19882 fi
19883 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19884 done
19885
19886 fi
19887 echo "$as_me:19887: result: $cf_cv_getopt_header" >&5
19888 echo "${ECHO_T}$cf_cv_getopt_header" >&6
19889 if test "$cf_cv_getopt_header" != none ; then
19890
19891 cat >>confdefs.h <<\EOF
19892 #define HAVE_GETOPT_HEADER 1
19893 EOF
19894
19895 fi
19896 if test "$cf_cv_getopt_header" = getopt.h ; then
19897
19898 cat >>confdefs.h <<\EOF
19899 #define NEED_GETOPT_H 1
19900 EOF
19901
19902 fi
19903
19904 echo "$as_me:19904: checking if external environ is declared" >&5
19905 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
19906 if test "${cf_cv_dcl_environ+set}" = set; then
19907   echo $ECHO_N "(cached) $ECHO_C" >&6
19908 else
19909
19910     cat >"conftest.$ac_ext" <<_ACEOF
19911 #line 19911 "configure"
19912 #include "confdefs.h"
19913
19914 #ifdef HAVE_STDLIB_H
19915 #include <stdlib.h>
19916 #endif
19917 #include <unistd.h>
19918 int
19919 main (void)
19920 {
19921 int x = (int) environ
19922   ;
19923   return 0;
19924 }
19925 _ACEOF
19926 rm -f "conftest.$ac_objext"
19927 if { (eval echo "$as_me:19927: \"$ac_compile\"") >&5
19928   (eval $ac_compile) 2>&5
19929   ac_status=$?
19930   echo "$as_me:19930: \$? = $ac_status" >&5
19931   (exit "$ac_status"); } &&
19932          { ac_try='test -s "conftest.$ac_objext"'
19933   { (eval echo "$as_me:19933: \"$ac_try\"") >&5
19934   (eval $ac_try) 2>&5
19935   ac_status=$?
19936   echo "$as_me:19936: \$? = $ac_status" >&5
19937   (exit "$ac_status"); }; }; then
19938   cf_cv_dcl_environ=yes
19939 else
19940   echo "$as_me: failed program was:" >&5
19941 cat "conftest.$ac_ext" >&5
19942 cf_cv_dcl_environ=no
19943 fi
19944 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19945
19946 fi
19947 echo "$as_me:19947: result: $cf_cv_dcl_environ" >&5
19948 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
19949
19950 if test "$cf_cv_dcl_environ" = no ; then
19951
19952 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19953
19954     cat >>confdefs.h <<EOF
19955 #define $cf_result 1
19956 EOF
19957
19958 fi
19959
19960 # It's possible (for near-UNIX clones) that the data doesn't exist
19961
19962 echo "$as_me:19962: checking if external environ exists" >&5
19963 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
19964 if test "${cf_cv_have_environ+set}" = set; then
19965   echo $ECHO_N "(cached) $ECHO_C" >&6
19966 else
19967
19968         cat >"conftest.$ac_ext" <<_ACEOF
19969 #line 19969 "configure"
19970 #include "confdefs.h"
19971
19972 #undef environ
19973 extern int environ;
19974
19975 int
19976 main (void)
19977 {
19978 environ = 2
19979   ;
19980   return 0;
19981 }
19982 _ACEOF
19983 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19984 if { (eval echo "$as_me:19984: \"$ac_link\"") >&5
19985   (eval $ac_link) 2>&5
19986   ac_status=$?
19987   echo "$as_me:19987: \$? = $ac_status" >&5
19988   (exit "$ac_status"); } &&
19989          { ac_try='test -s "conftest$ac_exeext"'
19990   { (eval echo "$as_me:19990: \"$ac_try\"") >&5
19991   (eval $ac_try) 2>&5
19992   ac_status=$?
19993   echo "$as_me:19993: \$? = $ac_status" >&5
19994   (exit "$ac_status"); }; }; then
19995   cf_cv_have_environ=yes
19996 else
19997   echo "$as_me: failed program was:" >&5
19998 cat "conftest.$ac_ext" >&5
19999 cf_cv_have_environ=no
20000 fi
20001 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20002
20003 fi
20004 echo "$as_me:20004: result: $cf_cv_have_environ" >&5
20005 echo "${ECHO_T}$cf_cv_have_environ" >&6
20006
20007 if test "$cf_cv_have_environ" = yes ; then
20008
20009 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20010
20011         cat >>confdefs.h <<EOF
20012 #define $cf_result 1
20013 EOF
20014
20015 fi
20016
20017 echo "$as_me:20017: checking for getenv" >&5
20018 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20019 if test "${ac_cv_func_getenv+set}" = set; then
20020   echo $ECHO_N "(cached) $ECHO_C" >&6
20021 else
20022   cat >"conftest.$ac_ext" <<_ACEOF
20023 #line 20023 "configure"
20024 #include "confdefs.h"
20025 #define getenv autoconf_temporary
20026 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20027 #undef getenv
20028
20029 #ifdef __cplusplus
20030 extern "C"
20031 #endif
20032
20033 /* We use char because int might match the return type of a gcc2
20034    builtin and then its argument prototype would still apply.  */
20035 char getenv (void);
20036
20037 int
20038 main (void)
20039 {
20040
20041 /* The GNU C library defines stubs for functions which it implements
20042     to always fail with ENOSYS.  Some functions are actually named
20043     something starting with __ and the normal name is an alias.  */
20044 #if defined (__stub_getenv) || defined (__stub___getenv)
20045 #error found stub for getenv
20046 #endif
20047
20048         return getenv ();
20049   ;
20050   return 0;
20051 }
20052 _ACEOF
20053 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20054 if { (eval echo "$as_me:20054: \"$ac_link\"") >&5
20055   (eval $ac_link) 2>&5
20056   ac_status=$?
20057   echo "$as_me:20057: \$? = $ac_status" >&5
20058   (exit "$ac_status"); } &&
20059          { ac_try='test -s "conftest$ac_exeext"'
20060   { (eval echo "$as_me:20060: \"$ac_try\"") >&5
20061   (eval $ac_try) 2>&5
20062   ac_status=$?
20063   echo "$as_me:20063: \$? = $ac_status" >&5
20064   (exit "$ac_status"); }; }; then
20065   ac_cv_func_getenv=yes
20066 else
20067   echo "$as_me: failed program was:" >&5
20068 cat "conftest.$ac_ext" >&5
20069 ac_cv_func_getenv=no
20070 fi
20071 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20072 fi
20073 echo "$as_me:20073: result: $ac_cv_func_getenv" >&5
20074 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20075
20076 for ac_func in putenv setenv strdup
20077 do
20078 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20079 echo "$as_me:20079: checking for $ac_func" >&5
20080 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20081 if eval "test \"\${$as_ac_var+set}\" = set"; then
20082   echo $ECHO_N "(cached) $ECHO_C" >&6
20083 else
20084   cat >"conftest.$ac_ext" <<_ACEOF
20085 #line 20085 "configure"
20086 #include "confdefs.h"
20087 #define $ac_func autoconf_temporary
20088 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20089 #undef $ac_func
20090
20091 #ifdef __cplusplus
20092 extern "C"
20093 #endif
20094
20095 /* We use char because int might match the return type of a gcc2
20096    builtin and then its argument prototype would still apply.  */
20097 char $ac_func (void);
20098
20099 int
20100 main (void)
20101 {
20102
20103 /* The GNU C library defines stubs for functions which it implements
20104     to always fail with ENOSYS.  Some functions are actually named
20105     something starting with __ and the normal name is an alias.  */
20106 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20107 #error found stub for $ac_func
20108 #endif
20109
20110         return $ac_func ();
20111   ;
20112   return 0;
20113 }
20114 _ACEOF
20115 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20116 if { (eval echo "$as_me:20116: \"$ac_link\"") >&5
20117   (eval $ac_link) 2>&5
20118   ac_status=$?
20119   echo "$as_me:20119: \$? = $ac_status" >&5
20120   (exit "$ac_status"); } &&
20121          { ac_try='test -s "conftest$ac_exeext"'
20122   { (eval echo "$as_me:20122: \"$ac_try\"") >&5
20123   (eval $ac_try) 2>&5
20124   ac_status=$?
20125   echo "$as_me:20125: \$? = $ac_status" >&5
20126   (exit "$ac_status"); }; }; then
20127   eval "$as_ac_var=yes"
20128 else
20129   echo "$as_me: failed program was:" >&5
20130 cat "conftest.$ac_ext" >&5
20131 eval "$as_ac_var=no"
20132 fi
20133 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20134 fi
20135 echo "$as_me:20135: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20136 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20137 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20138   cat >>confdefs.h <<EOF
20139 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20140 EOF
20141
20142 fi
20143 done
20144
20145 echo "$as_me:20145: checking if getenv returns consistent values" >&5
20146 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20147 if test "${cf_cv_consistent_getenv+set}" = set; then
20148   echo $ECHO_N "(cached) $ECHO_C" >&6
20149 else
20150
20151 if test "$cross_compiling" = yes; then
20152   cf_cv_consistent_getenv=unknown
20153 else
20154   cat >"conftest.$ac_ext" <<_ACEOF
20155 #line 20155 "configure"
20156 #include "confdefs.h"
20157
20158 #include <stdlib.h>
20159 #include <unistd.h>
20160 #include <stdio.h>
20161 #include <string.h>
20162 #include <sys/types.h>
20163
20164 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20165 extern char **environ;  /* POSIX, but some systems are not... */
20166 #endif
20167
20168 #if defined(HAVE_STRDUP)
20169 #define str_alloc(s) strdup(s)
20170 #else
20171 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20172 #endif
20173
20174 static void set_value(const char *name, const char *value)
20175 {
20176 #if defined(HAVE_SETENV)
20177         setenv(name, value, 1);
20178 #elif defined(HAVE_PUTENV)
20179         char buffer[1024];
20180         sprintf(buffer, "%s=%s", name, value);
20181         putenv(str_alloc(buffer));
20182 #else
20183 #error neither putenv/setenv found
20184 #endif
20185 }
20186 int main(void)
20187 {
20188         int pass;
20189         size_t numenv, limit, j;
20190         char **mynames;
20191         char **myvalues;
20192         char **mypointer;
20193         char *equals;
20194         for (numenv = 0; environ[numenv]; ++numenv) ;
20195         limit = numenv + 10;
20196         mynames = (char **) calloc(limit + 1, sizeof(char *));
20197         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20198         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20199 #if defined(HAVE_ENVIRON)
20200         for (j = 0; environ[j]; ++j) {
20201                 mynames[j] = str_alloc(environ[j]);
20202                 equals = strchr(mynames[j], '=');
20203                 if (equals != 0) {
20204                         *equals++ = '\\0';
20205                         myvalues[j] = str_alloc(equals);
20206                 } else {
20207                         myvalues[j] = str_alloc("");
20208                 }
20209         }
20210 #endif
20211         for (j = numenv; j < limit; ++j) {
20212                 char name[80];
20213                 char value[80];
20214                 size_t found;
20215                 size_t k = 0;
20216                 do {
20217                         size_t jk;
20218                         found = 0;
20219                         sprintf(name, "TERM%lu", (unsigned long) k);
20220                         for (jk = 0; jk < j; ++jk) {
20221                                 if (!strcmp(name, mynames[jk])) {
20222                                         found = 1;
20223                                         ++k;
20224                                         break;
20225                                 }
20226                         }
20227                 } while (found);
20228                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20229                 set_value(name, value);
20230                 mynames[j] = str_alloc(name);
20231                 myvalues[j] = str_alloc(value);
20232         }
20233         for (pass = 0; pass < 3; ++pass) {
20234                 for (j = 0; j < limit; ++j) {
20235                         char *value = getenv(mynames[j]);
20236                         if (pass) {
20237                                 if (value == 0) {
20238                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20239                                         ${cf_cv_main_return:-return}(1);
20240                                 } else if (value != mypointer[j]) {
20241                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20242                                         ${cf_cv_main_return:-return}(1);
20243                                 } else if (strcmp(value, myvalues[j])) {
20244                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20245                                         ${cf_cv_main_return:-return}(1);
20246                                 }
20247                         } else {
20248                                 size_t k;
20249                                 mypointer[j] = value;
20250                                 for (k = 0; k < j; ++k) {
20251                                         if (mypointer[j] == mypointer[k]) {
20252                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20253                                                 ${cf_cv_main_return:-return}(1);
20254                                         }
20255                                 }
20256                         }
20257                 }
20258         }
20259         ${cf_cv_main_return:-return}(0);
20260 }
20261
20262 _ACEOF
20263 rm -f "conftest$ac_exeext"
20264 if { (eval echo "$as_me:20264: \"$ac_link\"") >&5
20265   (eval $ac_link) 2>&5
20266   ac_status=$?
20267   echo "$as_me:20267: \$? = $ac_status" >&5
20268   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20269   { (eval echo "$as_me:20269: \"$ac_try\"") >&5
20270   (eval $ac_try) 2>&5
20271   ac_status=$?
20272   echo "$as_me:20272: \$? = $ac_status" >&5
20273   (exit "$ac_status"); }; }; then
20274   cf_cv_consistent_getenv=yes
20275 else
20276   echo "$as_me: program exited with status $ac_status" >&5
20277 echo "$as_me: failed program was:" >&5
20278 cat "conftest.$ac_ext" >&5
20279 cf_cv_consistent_getenv=no
20280 fi
20281 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20282 fi
20283
20284 fi
20285 echo "$as_me:20285: result: $cf_cv_consistent_getenv" >&5
20286 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20287
20288 if test "x$cf_cv_consistent_getenv" = xno
20289 then
20290
20291 cat >>confdefs.h <<\EOF
20292 #define HAVE_CONSISTENT_GETENV 1
20293 EOF
20294
20295 fi
20296
20297 if test "x$cf_cv_consistent_getenv" = xno && \
20298         test "x$cf_with_trace" = xyes
20299 then
20300         { echo "$as_me:20300: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20301 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20302 fi
20303
20304 echo "$as_me:20304: checking if sys/time.h works with sys/select.h" >&5
20305 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20306 if test "${cf_cv_sys_time_select+set}" = set; then
20307   echo $ECHO_N "(cached) $ECHO_C" >&6
20308 else
20309
20310 cat >"conftest.$ac_ext" <<_ACEOF
20311 #line 20311 "configure"
20312 #include "confdefs.h"
20313
20314 #include <sys/types.h>
20315 #ifdef HAVE_SYS_TIME_H
20316 #include <sys/time.h>
20317 #endif
20318 #ifdef HAVE_SYS_SELECT_H
20319 #include <sys/select.h>
20320 #endif
20321
20322 int
20323 main (void)
20324 {
20325
20326   ;
20327   return 0;
20328 }
20329 _ACEOF
20330 rm -f "conftest.$ac_objext"
20331 if { (eval echo "$as_me:20331: \"$ac_compile\"") >&5
20332   (eval $ac_compile) 2>&5
20333   ac_status=$?
20334   echo "$as_me:20334: \$? = $ac_status" >&5
20335   (exit "$ac_status"); } &&
20336          { ac_try='test -s "conftest.$ac_objext"'
20337   { (eval echo "$as_me:20337: \"$ac_try\"") >&5
20338   (eval $ac_try) 2>&5
20339   ac_status=$?
20340   echo "$as_me:20340: \$? = $ac_status" >&5
20341   (exit "$ac_status"); }; }; then
20342   cf_cv_sys_time_select=yes
20343 else
20344   echo "$as_me: failed program was:" >&5
20345 cat "conftest.$ac_ext" >&5
20346 cf_cv_sys_time_select=no
20347 fi
20348 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20349
20350 fi
20351
20352 echo "$as_me:20352: result: $cf_cv_sys_time_select" >&5
20353 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20354 test "$cf_cv_sys_time_select" = yes &&
20355 cat >>confdefs.h <<\EOF
20356 #define HAVE_SYS_TIME_SELECT 1
20357 EOF
20358
20359 ###     checks for compiler characteristics
20360 ac_ext=c
20361 ac_cpp='$CPP $CPPFLAGS'
20362 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20363 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20364 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20365 ac_main_return="return"
20366
20367 echo "$as_me:20367: checking for an ANSI C-conforming const" >&5
20368 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20369 if test "${ac_cv_c_const+set}" = set; then
20370   echo $ECHO_N "(cached) $ECHO_C" >&6
20371 else
20372   cat >"conftest.$ac_ext" <<_ACEOF
20373 #line 20373 "configure"
20374 #include "confdefs.h"
20375
20376 int
20377 main (void)
20378 {
20379 /* FIXME: Include the comments suggested by Paul. */
20380 #ifndef __cplusplus
20381   /* Ultrix mips cc rejects this.  */
20382   typedef int charset[2];
20383   const charset x;
20384   /* SunOS 4.1.1 cc rejects this.  */
20385   char const *const *ccp;
20386   char **p;
20387   /* NEC SVR4.0.2 mips cc rejects this.  */
20388   struct point {int x, y;};
20389   static struct point const zero = {0,0};
20390   /* AIX XL C 1.02.0.0 rejects this.
20391      It does not let you subtract one const X* pointer from another in
20392      an arm of an if-expression whose if-part is not a constant
20393      expression */
20394   const char *g = "string";
20395   ccp = &g + (g ? g-g : 0);
20396   /* HPUX 7.0 cc rejects these. */
20397   ++ccp;
20398   p = (char**) ccp;
20399   ccp = (char const *const *) p;
20400   { /* SCO 3.2v4 cc rejects this.  */
20401     char *t;
20402     char const *s = 0 ? (char *) 0 : (char const *) 0;
20403
20404     *t++ = 0;
20405   }
20406   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20407     int x[] = {25, 17};
20408     const int *foo = &x[0];
20409     ++foo;
20410   }
20411   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20412     typedef const int *iptr;
20413     iptr p = 0;
20414     ++p;
20415   }
20416   { /* AIX XL C 1.02.0.0 rejects this saying
20417        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20418     struct s { int j; const int *ap[3]; };
20419     struct s *b; b->j = 5;
20420   }
20421   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20422     const int foo = 10;
20423   }
20424 #endif
20425
20426   ;
20427   return 0;
20428 }
20429 _ACEOF
20430 rm -f "conftest.$ac_objext"
20431 if { (eval echo "$as_me:20431: \"$ac_compile\"") >&5
20432   (eval $ac_compile) 2>&5
20433   ac_status=$?
20434   echo "$as_me:20434: \$? = $ac_status" >&5
20435   (exit "$ac_status"); } &&
20436          { ac_try='test -s "conftest.$ac_objext"'
20437   { (eval echo "$as_me:20437: \"$ac_try\"") >&5
20438   (eval $ac_try) 2>&5
20439   ac_status=$?
20440   echo "$as_me:20440: \$? = $ac_status" >&5
20441   (exit "$ac_status"); }; }; then
20442   ac_cv_c_const=yes
20443 else
20444   echo "$as_me: failed program was:" >&5
20445 cat "conftest.$ac_ext" >&5
20446 ac_cv_c_const=no
20447 fi
20448 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20449 fi
20450 echo "$as_me:20450: result: $ac_cv_c_const" >&5
20451 echo "${ECHO_T}$ac_cv_c_const" >&6
20452 if test $ac_cv_c_const = no; then
20453
20454 cat >>confdefs.h <<\EOF
20455 #define const
20456 EOF
20457
20458 fi
20459
20460 echo "$as_me:20460: checking for inline" >&5
20461 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20462 if test "${ac_cv_c_inline+set}" = set; then
20463   echo $ECHO_N "(cached) $ECHO_C" >&6
20464 else
20465   ac_cv_c_inline=no
20466 for ac_kw in inline __inline__ __inline; do
20467   cat >"conftest.$ac_ext" <<_ACEOF
20468 #line 20468 "configure"
20469 #include "confdefs.h"
20470 #ifndef __cplusplus
20471 static $ac_kw int static_foo () {return 0; }
20472 $ac_kw int foo () {return 0; }
20473 #endif
20474
20475 _ACEOF
20476 rm -f "conftest.$ac_objext"
20477 if { (eval echo "$as_me:20477: \"$ac_compile\"") >&5
20478   (eval $ac_compile) 2>&5
20479   ac_status=$?
20480   echo "$as_me:20480: \$? = $ac_status" >&5
20481   (exit "$ac_status"); } &&
20482          { ac_try='test -s "conftest.$ac_objext"'
20483   { (eval echo "$as_me:20483: \"$ac_try\"") >&5
20484   (eval $ac_try) 2>&5
20485   ac_status=$?
20486   echo "$as_me:20486: \$? = $ac_status" >&5
20487   (exit "$ac_status"); }; }; then
20488   ac_cv_c_inline=$ac_kw; break
20489 else
20490   echo "$as_me: failed program was:" >&5
20491 cat "conftest.$ac_ext" >&5
20492 fi
20493 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20494 done
20495
20496 fi
20497 echo "$as_me:20497: result: $ac_cv_c_inline" >&5
20498 echo "${ECHO_T}$ac_cv_c_inline" >&6
20499 case $ac_cv_c_inline in
20500   inline | yes) ;;
20501   no)
20502 cat >>confdefs.h <<\EOF
20503 #define inline
20504 EOF
20505  ;;
20506   *)  cat >>confdefs.h <<EOF
20507 #define inline $ac_cv_c_inline
20508 EOF
20509  ;;
20510 esac
20511
20512 NCURSES_INLINE=
20513 if test "$ac_cv_c_inline" != no ; then
20514         NCURSES_INLINE=inline
20515         if test "$INTEL_COMPILER" = yes
20516         then
20517                 :
20518         elif test "$CLANG_COMPILER" = yes
20519         then
20520                 :
20521         elif test "$GCC" = yes
20522         then
20523                 echo "$as_me:20523: checking if $CC supports options to tune inlining" >&5
20524 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20525 if test "${cf_cv_gcc_inline+set}" = set; then
20526   echo $ECHO_N "(cached) $ECHO_C" >&6
20527 else
20528
20529                 cf_save_CFLAGS=$CFLAGS
20530                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20531                 cat >"conftest.$ac_ext" <<_ACEOF
20532 #line 20532 "configure"
20533 #include "confdefs.h"
20534 inline int foo(void) { return 1; }
20535 int
20536 main (void)
20537 {
20538 ${cf_cv_main_return:-return} foo()
20539   ;
20540   return 0;
20541 }
20542 _ACEOF
20543 rm -f "conftest.$ac_objext"
20544 if { (eval echo "$as_me:20544: \"$ac_compile\"") >&5
20545   (eval $ac_compile) 2>&5
20546   ac_status=$?
20547   echo "$as_me:20547: \$? = $ac_status" >&5
20548   (exit "$ac_status"); } &&
20549          { ac_try='test -s "conftest.$ac_objext"'
20550   { (eval echo "$as_me:20550: \"$ac_try\"") >&5
20551   (eval $ac_try) 2>&5
20552   ac_status=$?
20553   echo "$as_me:20553: \$? = $ac_status" >&5
20554   (exit "$ac_status"); }; }; then
20555   cf_cv_gcc_inline=yes
20556 else
20557   echo "$as_me: failed program was:" >&5
20558 cat "conftest.$ac_ext" >&5
20559 cf_cv_gcc_inline=no
20560 fi
20561 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20562                 CFLAGS=$cf_save_CFLAGS
20563
20564 fi
20565 echo "$as_me:20565: result: $cf_cv_gcc_inline" >&5
20566 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20567                 if test "$cf_cv_gcc_inline" = yes ; then
20568
20569 cf_fix_cppflags=no
20570 cf_new_cflags=
20571 cf_new_cppflags=
20572 cf_new_extra_cppflags=
20573
20574 for cf_add_cflags in --param max-inline-insns-single=1200
20575 do
20576 case "$cf_fix_cppflags" in
20577 (no)
20578         case "$cf_add_cflags" in
20579         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20580                 case "$cf_add_cflags" in
20581                 (-D*)
20582                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20583
20584                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20585                                 && test -z "${cf_tst_cflags}" \
20586                                 && cf_fix_cppflags=yes
20587
20588                         if test "$cf_fix_cppflags" = yes ; then
20589
20590         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20591         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20592
20593                                 continue
20594                         elif test "${cf_tst_cflags}" = "\"'" ; then
20595
20596         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20597         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20598
20599                                 continue
20600                         fi
20601                         ;;
20602                 esac
20603                 case "$CPPFLAGS" in
20604                 (*$cf_add_cflags)
20605                         ;;
20606                 (*)
20607                         case "$cf_add_cflags" in
20608                         (-D*)
20609                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20610
20611 CPPFLAGS=`echo "$CPPFLAGS" | \
20612         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20613                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20614
20615                                 ;;
20616                         esac
20617
20618         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20619         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20620
20621                         ;;
20622                 esac
20623                 ;;
20624         (*)
20625
20626         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20627         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20628
20629                 ;;
20630         esac
20631         ;;
20632 (yes)
20633
20634         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20635         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20636
20637         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20638
20639         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20640                 && test -z "${cf_tst_cflags}" \
20641                 && cf_fix_cppflags=no
20642         ;;
20643 esac
20644 done
20645
20646 if test -n "$cf_new_cflags" ; then
20647
20648         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20649         CFLAGS="${CFLAGS}$cf_new_cflags"
20650
20651 fi
20652
20653 if test -n "$cf_new_cppflags" ; then
20654
20655         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20656         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20657
20658 fi
20659
20660 if test -n "$cf_new_extra_cppflags" ; then
20661
20662         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20663         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20664
20665 fi
20666
20667                 fi
20668         fi
20669 fi
20670
20671 echo "$as_me:20671: checking for signal global datatype" >&5
20672 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20673 if test "${cf_cv_sig_atomic_t+set}" = set; then
20674   echo $ECHO_N "(cached) $ECHO_C" >&6
20675 else
20676
20677         for cf_type in \
20678                 "volatile sig_atomic_t" \
20679                 "sig_atomic_t" \
20680                 "int"
20681         do
20682         cat >"conftest.$ac_ext" <<_ACEOF
20683 #line 20683 "configure"
20684 #include "confdefs.h"
20685
20686 #include <sys/types.h>
20687 #include <signal.h>
20688 #include <stdio.h>
20689
20690 extern $cf_type x;
20691 $cf_type x;
20692 static void handler(int sig)
20693 {
20694         (void)sig;
20695         x = 5;
20696 }
20697 int
20698 main (void)
20699 {
20700 signal(SIGINT, handler);
20701                  x = 1
20702   ;
20703   return 0;
20704 }
20705 _ACEOF
20706 rm -f "conftest.$ac_objext"
20707 if { (eval echo "$as_me:20707: \"$ac_compile\"") >&5
20708   (eval $ac_compile) 2>&5
20709   ac_status=$?
20710   echo "$as_me:20710: \$? = $ac_status" >&5
20711   (exit "$ac_status"); } &&
20712          { ac_try='test -s "conftest.$ac_objext"'
20713   { (eval echo "$as_me:20713: \"$ac_try\"") >&5
20714   (eval $ac_try) 2>&5
20715   ac_status=$?
20716   echo "$as_me:20716: \$? = $ac_status" >&5
20717   (exit "$ac_status"); }; }; then
20718   cf_cv_sig_atomic_t=$cf_type
20719 else
20720   echo "$as_me: failed program was:" >&5
20721 cat "conftest.$ac_ext" >&5
20722 cf_cv_sig_atomic_t=no
20723 fi
20724 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20725                 test "$cf_cv_sig_atomic_t" != no && break
20726         done
20727
20728 fi
20729
20730 echo "$as_me:20730: result: $cf_cv_sig_atomic_t" >&5
20731 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
20732 test "$cf_cv_sig_atomic_t" != no &&
20733 cat >>confdefs.h <<EOF
20734 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
20735 EOF
20736
20737 if test "$NCURSES_CHTYPE" = auto ; then
20738
20739 echo "$as_me:20739: checking for type of chtype" >&5
20740 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
20741 if test "${cf_cv_typeof_chtype+set}" = set; then
20742   echo $ECHO_N "(cached) $ECHO_C" >&6
20743 else
20744
20745                 if test "$cross_compiling" = yes; then
20746   cf_cv_typeof_chtype=long
20747 else
20748   cat >"conftest.$ac_ext" <<_ACEOF
20749 #line 20749 "configure"
20750 #include "confdefs.h"
20751
20752 #define WANT_BITS 31
20753 #include <stdio.h>
20754 int main(void)
20755 {
20756         FILE *fp = fopen("cf_test.out", "w");
20757         if (fp != 0) {
20758                 char *result = "long";
20759                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
20760                         int n;
20761                         unsigned int x, y;
20762                         for (n = 0; n < WANT_BITS; n++) {
20763                                 x = (1 << n);
20764                                 y = (x >> n);
20765                                 if (y != 1 || x == 0) {
20766                                         x = 0;
20767                                         break;
20768                                 }
20769                         }
20770                         /*
20771                          * If x is nonzero, an int is big enough for the bits
20772                          * that we want.
20773                          */
20774                         result = (x != 0) ? "int" : "long";
20775                 }
20776                 fputs(result, fp);
20777                 fclose(fp);
20778         }
20779         ${cf_cv_main_return:-return}(0);
20780 }
20781
20782 _ACEOF
20783 rm -f "conftest$ac_exeext"
20784 if { (eval echo "$as_me:20784: \"$ac_link\"") >&5
20785   (eval $ac_link) 2>&5
20786   ac_status=$?
20787   echo "$as_me:20787: \$? = $ac_status" >&5
20788   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20789   { (eval echo "$as_me:20789: \"$ac_try\"") >&5
20790   (eval $ac_try) 2>&5
20791   ac_status=$?
20792   echo "$as_me:20792: \$? = $ac_status" >&5
20793   (exit "$ac_status"); }; }; then
20794   cf_cv_typeof_chtype=`cat cf_test.out`
20795 else
20796   echo "$as_me: program exited with status $ac_status" >&5
20797 echo "$as_me: failed program was:" >&5
20798 cat "conftest.$ac_ext" >&5
20799 cf_cv_typeof_chtype=long
20800 fi
20801 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20802 fi
20803                 rm -f cf_test.out
20804
20805 fi
20806
20807 echo "$as_me:20807: result: $cf_cv_typeof_chtype" >&5
20808 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
20809
20810 cat >>confdefs.h <<EOF
20811 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
20812 EOF
20813
20814 else
20815         cf_cv_typeof_chtype=$NCURSES_CHTYPE
20816 fi
20817 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
20818
20819 echo "$as_me:20819: checking if unsigned literals are legal" >&5
20820 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
20821 if test "${cf_cv_unsigned_literals+set}" = set; then
20822   echo $ECHO_N "(cached) $ECHO_C" >&6
20823 else
20824
20825         cat >"conftest.$ac_ext" <<_ACEOF
20826 #line 20826 "configure"
20827 #include "confdefs.h"
20828
20829 int
20830 main (void)
20831 {
20832 long x = 1L + 1UL + 1U + 1
20833   ;
20834   return 0;
20835 }
20836 _ACEOF
20837 rm -f "conftest.$ac_objext"
20838 if { (eval echo "$as_me:20838: \"$ac_compile\"") >&5
20839   (eval $ac_compile) 2>&5
20840   ac_status=$?
20841   echo "$as_me:20841: \$? = $ac_status" >&5
20842   (exit "$ac_status"); } &&
20843          { ac_try='test -s "conftest.$ac_objext"'
20844   { (eval echo "$as_me:20844: \"$ac_try\"") >&5
20845   (eval $ac_try) 2>&5
20846   ac_status=$?
20847   echo "$as_me:20847: \$? = $ac_status" >&5
20848   (exit "$ac_status"); }; }; then
20849   cf_cv_unsigned_literals=yes
20850 else
20851   echo "$as_me: failed program was:" >&5
20852 cat "conftest.$ac_ext" >&5
20853 cf_cv_unsigned_literals=no
20854 fi
20855 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20856
20857 fi
20858
20859 echo "$as_me:20859: result: $cf_cv_unsigned_literals" >&5
20860 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
20861
20862 cf_cv_1UL="1"
20863 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
20864 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
20865
20866 if test "$NCURSES_MMASK_T" = auto ; then
20867         cf_cv_typeof_mmask_t=long
20868 else
20869         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
20870 fi
20871 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
20872
20873 ###     Checks for external-data
20874
20875 echo "$as_me:20875: checking if external errno is declared" >&5
20876 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
20877 if test "${cf_cv_dcl_errno+set}" = set; then
20878   echo $ECHO_N "(cached) $ECHO_C" >&6
20879 else
20880
20881         cat >"conftest.$ac_ext" <<_ACEOF
20882 #line 20882 "configure"
20883 #include "confdefs.h"
20884
20885 #ifdef HAVE_STDLIB_H
20886 #include <stdlib.h>
20887 #endif
20888 #include <stdio.h>
20889 #include <sys/types.h>
20890 #include <errno.h>
20891 int
20892 main (void)
20893 {
20894 int x = (int) errno; (void)x
20895   ;
20896   return 0;
20897 }
20898 _ACEOF
20899 rm -f "conftest.$ac_objext"
20900 if { (eval echo "$as_me:20900: \"$ac_compile\"") >&5
20901   (eval $ac_compile) 2>&5
20902   ac_status=$?
20903   echo "$as_me:20903: \$? = $ac_status" >&5
20904   (exit "$ac_status"); } &&
20905          { ac_try='test -s "conftest.$ac_objext"'
20906   { (eval echo "$as_me:20906: \"$ac_try\"") >&5
20907   (eval $ac_try) 2>&5
20908   ac_status=$?
20909   echo "$as_me:20909: \$? = $ac_status" >&5
20910   (exit "$ac_status"); }; }; then
20911   cf_cv_dcl_errno=yes
20912 else
20913   echo "$as_me: failed program was:" >&5
20914 cat "conftest.$ac_ext" >&5
20915 cf_cv_dcl_errno=no
20916 fi
20917 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20918
20919 fi
20920 echo "$as_me:20920: result: $cf_cv_dcl_errno" >&5
20921 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
20922
20923 if test "$cf_cv_dcl_errno" = no ; then
20924
20925 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20926
20927         cat >>confdefs.h <<EOF
20928 #define $cf_result 1
20929 EOF
20930
20931 fi
20932
20933 # It's possible (for near-UNIX clones) that the data doesn't exist
20934
20935 echo "$as_me:20935: checking if external errno exists" >&5
20936 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
20937 if test "${cf_cv_have_errno+set}" = set; then
20938   echo $ECHO_N "(cached) $ECHO_C" >&6
20939 else
20940
20941         cat >"conftest.$ac_ext" <<_ACEOF
20942 #line 20942 "configure"
20943 #include "confdefs.h"
20944
20945 #undef errno
20946 extern int errno;
20947
20948 int
20949 main (void)
20950 {
20951 errno = 2
20952   ;
20953   return 0;
20954 }
20955 _ACEOF
20956 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20957 if { (eval echo "$as_me:20957: \"$ac_link\"") >&5
20958   (eval $ac_link) 2>&5
20959   ac_status=$?
20960   echo "$as_me:20960: \$? = $ac_status" >&5
20961   (exit "$ac_status"); } &&
20962          { ac_try='test -s "conftest$ac_exeext"'
20963   { (eval echo "$as_me:20963: \"$ac_try\"") >&5
20964   (eval $ac_try) 2>&5
20965   ac_status=$?
20966   echo "$as_me:20966: \$? = $ac_status" >&5
20967   (exit "$ac_status"); }; }; then
20968   cf_cv_have_errno=yes
20969 else
20970   echo "$as_me: failed program was:" >&5
20971 cat "conftest.$ac_ext" >&5
20972 cf_cv_have_errno=no
20973 fi
20974 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20975
20976 fi
20977 echo "$as_me:20977: result: $cf_cv_have_errno" >&5
20978 echo "${ECHO_T}$cf_cv_have_errno" >&6
20979
20980 if test "$cf_cv_have_errno" = yes ; then
20981
20982 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20983
20984         cat >>confdefs.h <<EOF
20985 #define $cf_result 1
20986 EOF
20987
20988 fi
20989
20990 echo "$as_me:20990: checking if data-only library module links" >&5
20991 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
20992 if test "${cf_cv_link_dataonly+set}" = set; then
20993   echo $ECHO_N "(cached) $ECHO_C" >&6
20994 else
20995
20996         rm -f conftest.a
20997         cat >conftest.$ac_ext <<EOF
20998 #line 20998 "configure"
20999 int     testdata[3] = { 123, 456, 789 };
21000 EOF
21001         if { (eval echo "$as_me:21001: \"$ac_compile\"") >&5
21002   (eval $ac_compile) 2>&5
21003   ac_status=$?
21004   echo "$as_me:21004: \$? = $ac_status" >&5
21005   (exit "$ac_status"); } ; then
21006                 mv conftest.o data.o && \
21007                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21008         fi
21009         rm -f conftest.$ac_ext data.o
21010         cat >conftest.$ac_ext <<EOF
21011 #line 21011 "configure"
21012 int     testfunc(void)
21013 {
21014 #if defined(NeXT)
21015         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21016 #else
21017         extern int testdata[3];
21018         return testdata[0] == 123
21019            &&  testdata[1] == 456
21020            &&  testdata[2] == 789;
21021 #endif
21022 }
21023 EOF
21024         if { (eval echo "$as_me:21024: \"$ac_compile\"") >&5
21025   (eval $ac_compile) 2>&5
21026   ac_status=$?
21027   echo "$as_me:21027: \$? = $ac_status" >&5
21028   (exit "$ac_status"); }; then
21029                 mv conftest.o func.o && \
21030                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21031         fi
21032         rm -f conftest.$ac_ext func.o
21033         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21034         cf_saveLIBS="$LIBS"
21035         LIBS="conftest.a $LIBS"
21036         if test "$cross_compiling" = yes; then
21037   cf_cv_link_dataonly=unknown
21038 else
21039   cat >"conftest.$ac_ext" <<_ACEOF
21040 #line 21040 "configure"
21041 #include "confdefs.h"
21042
21043         int main(void)
21044         {
21045                 extern int testfunc();
21046                 ${cf_cv_main_return:-return} (!testfunc());
21047         }
21048
21049 _ACEOF
21050 rm -f "conftest$ac_exeext"
21051 if { (eval echo "$as_me:21051: \"$ac_link\"") >&5
21052   (eval $ac_link) 2>&5
21053   ac_status=$?
21054   echo "$as_me:21054: \$? = $ac_status" >&5
21055   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21056   { (eval echo "$as_me:21056: \"$ac_try\"") >&5
21057   (eval $ac_try) 2>&5
21058   ac_status=$?
21059   echo "$as_me:21059: \$? = $ac_status" >&5
21060   (exit "$ac_status"); }; }; then
21061   cf_cv_link_dataonly=yes
21062 else
21063   echo "$as_me: program exited with status $ac_status" >&5
21064 echo "$as_me: failed program was:" >&5
21065 cat "conftest.$ac_ext" >&5
21066 cf_cv_link_dataonly=no
21067 fi
21068 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21069 fi
21070         LIBS="$cf_saveLIBS"
21071
21072 fi
21073
21074 echo "$as_me:21074: result: $cf_cv_link_dataonly" >&5
21075 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21076
21077 if test "$cf_cv_link_dataonly" = no ; then
21078
21079 cat >>confdefs.h <<\EOF
21080 #define BROKEN_LINKER 1
21081 EOF
21082
21083         BROKEN_LINKER=1
21084 fi
21085
21086 ###     Checks for library functions.
21087
21088 for ac_func in \
21089 getcwd \
21090 getegid \
21091 geteuid \
21092 getopt \
21093 getttynam \
21094 issetugid \
21095 localeconv \
21096 poll \
21097 putenv \
21098 remove \
21099 select \
21100 setbuf \
21101 setbuffer \
21102 setenv \
21103 setfsuid \
21104 setvbuf \
21105 sigaction \
21106 sigvec \
21107 snprintf \
21108 strdup \
21109 strstr \
21110 sysconf \
21111 tcgetpgrp \
21112 times \
21113 tsearch \
21114 vsnprintf \
21115
21116 do
21117 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21118 echo "$as_me:21118: checking for $ac_func" >&5
21119 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21120 if eval "test \"\${$as_ac_var+set}\" = set"; then
21121   echo $ECHO_N "(cached) $ECHO_C" >&6
21122 else
21123   cat >"conftest.$ac_ext" <<_ACEOF
21124 #line 21124 "configure"
21125 #include "confdefs.h"
21126 #define $ac_func autoconf_temporary
21127 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21128 #undef $ac_func
21129
21130 #ifdef __cplusplus
21131 extern "C"
21132 #endif
21133
21134 /* We use char because int might match the return type of a gcc2
21135    builtin and then its argument prototype would still apply.  */
21136 char $ac_func (void);
21137
21138 int
21139 main (void)
21140 {
21141
21142 /* The GNU C library defines stubs for functions which it implements
21143     to always fail with ENOSYS.  Some functions are actually named
21144     something starting with __ and the normal name is an alias.  */
21145 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21146 #error found stub for $ac_func
21147 #endif
21148
21149         return $ac_func ();
21150   ;
21151   return 0;
21152 }
21153 _ACEOF
21154 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21155 if { (eval echo "$as_me:21155: \"$ac_link\"") >&5
21156   (eval $ac_link) 2>&5
21157   ac_status=$?
21158   echo "$as_me:21158: \$? = $ac_status" >&5
21159   (exit "$ac_status"); } &&
21160          { ac_try='test -s "conftest$ac_exeext"'
21161   { (eval echo "$as_me:21161: \"$ac_try\"") >&5
21162   (eval $ac_try) 2>&5
21163   ac_status=$?
21164   echo "$as_me:21164: \$? = $ac_status" >&5
21165   (exit "$ac_status"); }; }; then
21166   eval "$as_ac_var=yes"
21167 else
21168   echo "$as_me: failed program was:" >&5
21169 cat "conftest.$ac_ext" >&5
21170 eval "$as_ac_var=no"
21171 fi
21172 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21173 fi
21174 echo "$as_me:21174: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21175 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21176 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21177   cat >>confdefs.h <<EOF
21178 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21179 EOF
21180
21181 fi
21182 done
21183
21184 if test "x$ac_cv_func_getopt" = xno && \
21185    test "x$cf_with_progs$cf_with_tests" != xnono; then
21186         { { echo "$as_me:21186: error: getopt is required for building programs" >&5
21187 echo "$as_me: error: getopt is required for building programs" >&2;}
21188    { (exit 1); exit 1; }; }
21189 fi
21190
21191 if test "x$with_safe_sprintf" = xyes
21192 then
21193         if test "x$ac_cv_func_vsnprintf" = xyes
21194         then
21195                 { echo "$as_me:21195: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21196 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21197         else
21198
21199 cat >>confdefs.h <<\EOF
21200 #define USE_SAFE_SPRINTF 1
21201 EOF
21202
21203         fi
21204 fi
21205
21206 if test "x$with_getcap" = "xyes" ; then
21207
21208 echo "$as_me:21208: checking for terminal-capability database functions" >&5
21209 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21210 if test "${cf_cv_cgetent+set}" = set; then
21211   echo $ECHO_N "(cached) $ECHO_C" >&6
21212 else
21213
21214 cat >"conftest.$ac_ext" <<_ACEOF
21215 #line 21215 "configure"
21216 #include "confdefs.h"
21217
21218 #include <stdlib.h>
21219 int
21220 main (void)
21221 {
21222
21223         char temp[128];
21224         char *buf = temp;
21225         char *db_array = temp;
21226         cgetent(&buf, &db_array, "vt100");
21227         cgetcap(buf, "tc", '=');
21228         cgetmatch(buf, "tc");
21229
21230   ;
21231   return 0;
21232 }
21233 _ACEOF
21234 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21235 if { (eval echo "$as_me:21235: \"$ac_link\"") >&5
21236   (eval $ac_link) 2>&5
21237   ac_status=$?
21238   echo "$as_me:21238: \$? = $ac_status" >&5
21239   (exit "$ac_status"); } &&
21240          { ac_try='test -s "conftest$ac_exeext"'
21241   { (eval echo "$as_me:21241: \"$ac_try\"") >&5
21242   (eval $ac_try) 2>&5
21243   ac_status=$?
21244   echo "$as_me:21244: \$? = $ac_status" >&5
21245   (exit "$ac_status"); }; }; then
21246   cf_cv_cgetent=yes
21247 else
21248   echo "$as_me: failed program was:" >&5
21249 cat "conftest.$ac_ext" >&5
21250 cf_cv_cgetent=no
21251 fi
21252 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21253
21254 fi
21255 echo "$as_me:21255: result: $cf_cv_cgetent" >&5
21256 echo "${ECHO_T}$cf_cv_cgetent" >&6
21257
21258 if test "$cf_cv_cgetent" = yes
21259 then
21260
21261 cat >>confdefs.h <<\EOF
21262 #define HAVE_BSD_CGETENT 1
21263 EOF
21264
21265 echo "$as_me:21265: checking if cgetent uses const parameter" >&5
21266 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21267 if test "${cf_cv_cgetent_const+set}" = set; then
21268   echo $ECHO_N "(cached) $ECHO_C" >&6
21269 else
21270
21271 cat >"conftest.$ac_ext" <<_ACEOF
21272 #line 21272 "configure"
21273 #include "confdefs.h"
21274
21275 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21276 #include <stdlib.h>
21277 int
21278 main (void)
21279 {
21280
21281         char temp[128];
21282         char *buf = temp;
21283 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21284         const char *db_array = temp;
21285         cgetent(&buf, &db_array, "vt100");
21286 #endif
21287         cgetcap(buf, "tc", '=');
21288         cgetmatch(buf, "tc");
21289
21290   ;
21291   return 0;
21292 }
21293 _ACEOF
21294 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21295 if { (eval echo "$as_me:21295: \"$ac_link\"") >&5
21296   (eval $ac_link) 2>&5
21297   ac_status=$?
21298   echo "$as_me:21298: \$? = $ac_status" >&5
21299   (exit "$ac_status"); } &&
21300          { ac_try='test -s "conftest$ac_exeext"'
21301   { (eval echo "$as_me:21301: \"$ac_try\"") >&5
21302   (eval $ac_try) 2>&5
21303   ac_status=$?
21304   echo "$as_me:21304: \$? = $ac_status" >&5
21305   (exit "$ac_status"); }; }; then
21306   cf_cv_cgetent_const=yes
21307 else
21308   echo "$as_me: failed program was:" >&5
21309 cat "conftest.$ac_ext" >&5
21310 cf_cv_cgetent_const=no
21311 fi
21312 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21313
21314 fi
21315 echo "$as_me:21315: result: $cf_cv_cgetent_const" >&5
21316 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21317         if test "$cf_cv_cgetent_const" = yes
21318         then
21319
21320 cat >>confdefs.h <<EOF
21321 #define CGETENT_CONST const
21322 EOF
21323
21324         fi
21325 fi
21326
21327 fi
21328
21329 echo "$as_me:21329: checking for isascii" >&5
21330 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21331 if test "${cf_cv_have_isascii+set}" = set; then
21332   echo $ECHO_N "(cached) $ECHO_C" >&6
21333 else
21334
21335         cat >"conftest.$ac_ext" <<_ACEOF
21336 #line 21336 "configure"
21337 #include "confdefs.h"
21338 #include <ctype.h>
21339 int
21340 main (void)
21341 {
21342 int x = isascii(' ')
21343   ;
21344   return 0;
21345 }
21346 _ACEOF
21347 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21348 if { (eval echo "$as_me:21348: \"$ac_link\"") >&5
21349   (eval $ac_link) 2>&5
21350   ac_status=$?
21351   echo "$as_me:21351: \$? = $ac_status" >&5
21352   (exit "$ac_status"); } &&
21353          { ac_try='test -s "conftest$ac_exeext"'
21354   { (eval echo "$as_me:21354: \"$ac_try\"") >&5
21355   (eval $ac_try) 2>&5
21356   ac_status=$?
21357   echo "$as_me:21357: \$? = $ac_status" >&5
21358   (exit "$ac_status"); }; }; then
21359   cf_cv_have_isascii=yes
21360 else
21361   echo "$as_me: failed program was:" >&5
21362 cat "conftest.$ac_ext" >&5
21363 cf_cv_have_isascii=no
21364 fi
21365 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21366
21367 fi
21368 echo "$as_me:21368: result: $cf_cv_have_isascii" >&5
21369 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21370 test "$cf_cv_have_isascii" = yes &&
21371 cat >>confdefs.h <<\EOF
21372 #define HAVE_ISASCII 1
21373 EOF
21374
21375 if test "$ac_cv_func_sigaction" = yes; then
21376 echo "$as_me:21376: checking whether sigaction needs _POSIX_SOURCE" >&5
21377 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21378 cat >"conftest.$ac_ext" <<_ACEOF
21379 #line 21379 "configure"
21380 #include "confdefs.h"
21381
21382 #include <sys/types.h>
21383 #include <signal.h>
21384 int
21385 main (void)
21386 {
21387 struct sigaction act
21388   ;
21389   return 0;
21390 }
21391 _ACEOF
21392 rm -f "conftest.$ac_objext"
21393 if { (eval echo "$as_me:21393: \"$ac_compile\"") >&5
21394   (eval $ac_compile) 2>&5
21395   ac_status=$?
21396   echo "$as_me:21396: \$? = $ac_status" >&5
21397   (exit "$ac_status"); } &&
21398          { ac_try='test -s "conftest.$ac_objext"'
21399   { (eval echo "$as_me:21399: \"$ac_try\"") >&5
21400   (eval $ac_try) 2>&5
21401   ac_status=$?
21402   echo "$as_me:21402: \$? = $ac_status" >&5
21403   (exit "$ac_status"); }; }; then
21404   sigact_bad=no
21405 else
21406   echo "$as_me: failed program was:" >&5
21407 cat "conftest.$ac_ext" >&5
21408
21409 cat >"conftest.$ac_ext" <<_ACEOF
21410 #line 21410 "configure"
21411 #include "confdefs.h"
21412
21413 #define _POSIX_SOURCE
21414 #include <sys/types.h>
21415 #include <signal.h>
21416 int
21417 main (void)
21418 {
21419 struct sigaction act
21420   ;
21421   return 0;
21422 }
21423 _ACEOF
21424 rm -f "conftest.$ac_objext"
21425 if { (eval echo "$as_me:21425: \"$ac_compile\"") >&5
21426   (eval $ac_compile) 2>&5
21427   ac_status=$?
21428   echo "$as_me:21428: \$? = $ac_status" >&5
21429   (exit "$ac_status"); } &&
21430          { ac_try='test -s "conftest.$ac_objext"'
21431   { (eval echo "$as_me:21431: \"$ac_try\"") >&5
21432   (eval $ac_try) 2>&5
21433   ac_status=$?
21434   echo "$as_me:21434: \$? = $ac_status" >&5
21435   (exit "$ac_status"); }; }; then
21436   sigact_bad=yes
21437
21438 cat >>confdefs.h <<\EOF
21439 #define _POSIX_SOURCE 1
21440 EOF
21441
21442 else
21443   echo "$as_me: failed program was:" >&5
21444 cat "conftest.$ac_ext" >&5
21445 sigact_bad=unknown
21446 fi
21447 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21448 fi
21449 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21450 echo "$as_me:21450: result: $sigact_bad" >&5
21451 echo "${ECHO_T}$sigact_bad" >&6
21452 fi
21453
21454 echo "$as_me:21454: checking if nanosleep really works" >&5
21455 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21456 if test "${cf_cv_func_nanosleep+set}" = set; then
21457   echo $ECHO_N "(cached) $ECHO_C" >&6
21458 else
21459
21460 if test "$cross_compiling" = yes; then
21461   cf_cv_func_nanosleep=unknown
21462 else
21463   cat >"conftest.$ac_ext" <<_ACEOF
21464 #line 21464 "configure"
21465 #include "confdefs.h"
21466
21467 #include <stdio.h>
21468 #include <errno.h>
21469 #include <time.h>
21470
21471 #ifdef HAVE_SYS_TIME_H
21472 #include <sys/time.h>
21473 #endif
21474
21475 int main(void) {
21476         struct timespec ts1, ts2;
21477         int code;
21478         ts1.tv_sec  = 0;
21479         ts1.tv_nsec = 750000000;
21480         ts2.tv_sec  = 0;
21481         ts2.tv_nsec = 0;
21482         errno = 0;
21483         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21484         ${cf_cv_main_return:-return}(code != 0);
21485 }
21486
21487 _ACEOF
21488 rm -f "conftest$ac_exeext"
21489 if { (eval echo "$as_me:21489: \"$ac_link\"") >&5
21490   (eval $ac_link) 2>&5
21491   ac_status=$?
21492   echo "$as_me:21492: \$? = $ac_status" >&5
21493   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21494   { (eval echo "$as_me:21494: \"$ac_try\"") >&5
21495   (eval $ac_try) 2>&5
21496   ac_status=$?
21497   echo "$as_me:21497: \$? = $ac_status" >&5
21498   (exit "$ac_status"); }; }; then
21499   cf_cv_func_nanosleep=yes
21500 else
21501   echo "$as_me: program exited with status $ac_status" >&5
21502 echo "$as_me: failed program was:" >&5
21503 cat "conftest.$ac_ext" >&5
21504 cf_cv_func_nanosleep=no
21505 fi
21506 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21507 fi
21508 fi
21509 echo "$as_me:21509: result: $cf_cv_func_nanosleep" >&5
21510 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21511
21512 test "$cf_cv_func_nanosleep" = "yes" &&
21513 cat >>confdefs.h <<\EOF
21514 #define HAVE_NANOSLEEP 1
21515 EOF
21516
21517 for ac_header in \
21518 termio.h \
21519 termios.h \
21520 unistd.h \
21521 sys/ioctl.h \
21522 sys/termio.h \
21523
21524 do
21525 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21526 echo "$as_me:21526: checking for $ac_header" >&5
21527 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21528 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21529   echo $ECHO_N "(cached) $ECHO_C" >&6
21530 else
21531   cat >"conftest.$ac_ext" <<_ACEOF
21532 #line 21532 "configure"
21533 #include "confdefs.h"
21534 #include <$ac_header>
21535 _ACEOF
21536 if { (eval echo "$as_me:21536: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21537   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21538   ac_status=$?
21539   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21540   rm -f conftest.er1
21541   cat conftest.err >&5
21542   echo "$as_me:21542: \$? = $ac_status" >&5
21543   (exit "$ac_status"); } >/dev/null; then
21544   if test -s conftest.err; then
21545     ac_cpp_err=$ac_c_preproc_warn_flag
21546   else
21547     ac_cpp_err=
21548   fi
21549 else
21550   ac_cpp_err=yes
21551 fi
21552 if test -z "$ac_cpp_err"; then
21553   eval "$as_ac_Header=yes"
21554 else
21555   echo "$as_me: failed program was:" >&5
21556   cat "conftest.$ac_ext" >&5
21557   eval "$as_ac_Header=no"
21558 fi
21559 rm -f conftest.err "conftest.$ac_ext"
21560 fi
21561 echo "$as_me:21561: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21562 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21563 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21564   cat >>confdefs.h <<EOF
21565 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21566 EOF
21567
21568 fi
21569 done
21570
21571 if test "$ac_cv_header_termios_h" = yes ; then
21572         case "$CFLAGS $CPPFLAGS" in
21573         (*-D_POSIX_SOURCE*)
21574                 termios_bad=dunno ;;
21575         (*)     termios_bad=maybe ;;
21576         esac
21577         if test "$termios_bad" = maybe ; then
21578         echo "$as_me:21578: checking whether termios.h needs _POSIX_SOURCE" >&5
21579 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21580         cat >"conftest.$ac_ext" <<_ACEOF
21581 #line 21581 "configure"
21582 #include "confdefs.h"
21583 #include <termios.h>
21584 int
21585 main (void)
21586 {
21587 struct termios foo; int x = foo.c_iflag = 1; (void)x
21588   ;
21589   return 0;
21590 }
21591 _ACEOF
21592 rm -f "conftest.$ac_objext"
21593 if { (eval echo "$as_me:21593: \"$ac_compile\"") >&5
21594   (eval $ac_compile) 2>&5
21595   ac_status=$?
21596   echo "$as_me:21596: \$? = $ac_status" >&5
21597   (exit "$ac_status"); } &&
21598          { ac_try='test -s "conftest.$ac_objext"'
21599   { (eval echo "$as_me:21599: \"$ac_try\"") >&5
21600   (eval $ac_try) 2>&5
21601   ac_status=$?
21602   echo "$as_me:21602: \$? = $ac_status" >&5
21603   (exit "$ac_status"); }; }; then
21604   termios_bad=no
21605 else
21606   echo "$as_me: failed program was:" >&5
21607 cat "conftest.$ac_ext" >&5
21608
21609                 cat >"conftest.$ac_ext" <<_ACEOF
21610 #line 21610 "configure"
21611 #include "confdefs.h"
21612
21613 #define _POSIX_SOURCE
21614 #include <termios.h>
21615 int
21616 main (void)
21617 {
21618 struct termios foo; int x = foo.c_iflag = 2; (void)x
21619   ;
21620   return 0;
21621 }
21622 _ACEOF
21623 rm -f "conftest.$ac_objext"
21624 if { (eval echo "$as_me:21624: \"$ac_compile\"") >&5
21625   (eval $ac_compile) 2>&5
21626   ac_status=$?
21627   echo "$as_me:21627: \$? = $ac_status" >&5
21628   (exit "$ac_status"); } &&
21629          { ac_try='test -s "conftest.$ac_objext"'
21630   { (eval echo "$as_me:21630: \"$ac_try\"") >&5
21631   (eval $ac_try) 2>&5
21632   ac_status=$?
21633   echo "$as_me:21633: \$? = $ac_status" >&5
21634   (exit "$ac_status"); }; }; then
21635   termios_bad=unknown
21636 else
21637   echo "$as_me: failed program was:" >&5
21638 cat "conftest.$ac_ext" >&5
21639 termios_bad=yes
21640 cat >>confdefs.h <<\EOF
21641 #define _POSIX_SOURCE 1
21642 EOF
21643
21644 fi
21645 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21646
21647 fi
21648 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21649         echo "$as_me:21649: result: $termios_bad" >&5
21650 echo "${ECHO_T}$termios_bad" >&6
21651         fi
21652 fi
21653
21654 echo "$as_me:21654: checking for tcgetattr" >&5
21655 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21656 if test "${cf_cv_have_tcgetattr+set}" = set; then
21657   echo $ECHO_N "(cached) $ECHO_C" >&6
21658 else
21659
21660 cat >"conftest.$ac_ext" <<_ACEOF
21661 #line 21661 "configure"
21662 #include "confdefs.h"
21663
21664 #include <sys/types.h>
21665 #ifdef HAVE_UNISTD_H
21666 #include <unistd.h>
21667 #endif
21668 #ifdef HAVE_TERMIOS_H
21669 #include <termios.h>
21670 #define TTY struct termios
21671 #else
21672 #ifdef HAVE_TERMIO_H
21673 #include <termio.h>
21674 #define TTY struct termio
21675 #endif
21676 #endif
21677
21678 int
21679 main (void)
21680 {
21681
21682 TTY foo;
21683 tcgetattr(1, &foo);
21684   ;
21685   return 0;
21686 }
21687 _ACEOF
21688 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21689 if { (eval echo "$as_me:21689: \"$ac_link\"") >&5
21690   (eval $ac_link) 2>&5
21691   ac_status=$?
21692   echo "$as_me:21692: \$? = $ac_status" >&5
21693   (exit "$ac_status"); } &&
21694          { ac_try='test -s "conftest$ac_exeext"'
21695   { (eval echo "$as_me:21695: \"$ac_try\"") >&5
21696   (eval $ac_try) 2>&5
21697   ac_status=$?
21698   echo "$as_me:21698: \$? = $ac_status" >&5
21699   (exit "$ac_status"); }; }; then
21700   cf_cv_have_tcgetattr=yes
21701 else
21702   echo "$as_me: failed program was:" >&5
21703 cat "conftest.$ac_ext" >&5
21704 cf_cv_have_tcgetattr=no
21705 fi
21706 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21707 fi
21708 echo "$as_me:21708: result: $cf_cv_have_tcgetattr" >&5
21709 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
21710 test "$cf_cv_have_tcgetattr" = yes &&
21711 cat >>confdefs.h <<\EOF
21712 #define HAVE_TCGETATTR 1
21713 EOF
21714
21715 echo "$as_me:21715: checking for vsscanf function or workaround" >&5
21716 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
21717 if test "${cf_cv_func_vsscanf+set}" = set; then
21718   echo $ECHO_N "(cached) $ECHO_C" >&6
21719 else
21720
21721 cat >"conftest.$ac_ext" <<_ACEOF
21722 #line 21722 "configure"
21723 #include "confdefs.h"
21724
21725 #include <stdarg.h>
21726 #include <stdio.h>
21727 int
21728 main (void)
21729 {
21730
21731         va_list ap;
21732         vsscanf("from", "%d", ap)
21733   ;
21734   return 0;
21735 }
21736 _ACEOF
21737 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21738 if { (eval echo "$as_me:21738: \"$ac_link\"") >&5
21739   (eval $ac_link) 2>&5
21740   ac_status=$?
21741   echo "$as_me:21741: \$? = $ac_status" >&5
21742   (exit "$ac_status"); } &&
21743          { ac_try='test -s "conftest$ac_exeext"'
21744   { (eval echo "$as_me:21744: \"$ac_try\"") >&5
21745   (eval $ac_try) 2>&5
21746   ac_status=$?
21747   echo "$as_me:21747: \$? = $ac_status" >&5
21748   (exit "$ac_status"); }; }; then
21749   cf_cv_func_vsscanf=vsscanf
21750 else
21751   echo "$as_me: failed program was:" >&5
21752 cat "conftest.$ac_ext" >&5
21753
21754 cat >"conftest.$ac_ext" <<_ACEOF
21755 #line 21755 "configure"
21756 #include "confdefs.h"
21757
21758 #include <stdarg.h>
21759 #include <stdio.h>
21760 int
21761 main (void)
21762 {
21763
21764         FILE strbuf;
21765         char *str = "from";
21766
21767         strbuf._flag = _IOREAD;
21768         strbuf._ptr = strbuf._base = (unsigned char *) str;
21769         strbuf._cnt = strlen(str);
21770         strbuf._file = _NFILE;
21771         return (vfscanf(&strbuf, "%d", ap))
21772   ;
21773   return 0;
21774 }
21775 _ACEOF
21776 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21777 if { (eval echo "$as_me:21777: \"$ac_link\"") >&5
21778   (eval $ac_link) 2>&5
21779   ac_status=$?
21780   echo "$as_me:21780: \$? = $ac_status" >&5
21781   (exit "$ac_status"); } &&
21782          { ac_try='test -s "conftest$ac_exeext"'
21783   { (eval echo "$as_me:21783: \"$ac_try\"") >&5
21784   (eval $ac_try) 2>&5
21785   ac_status=$?
21786   echo "$as_me:21786: \$? = $ac_status" >&5
21787   (exit "$ac_status"); }; }; then
21788   cf_cv_func_vsscanf=vfscanf
21789 else
21790   echo "$as_me: failed program was:" >&5
21791 cat "conftest.$ac_ext" >&5
21792
21793 cat >"conftest.$ac_ext" <<_ACEOF
21794 #line 21794 "configure"
21795 #include "confdefs.h"
21796
21797 #include <stdarg.h>
21798 #include <stdio.h>
21799 int
21800 main (void)
21801 {
21802
21803         FILE strbuf;
21804         char *str = "from";
21805
21806         strbuf._flag = _IOREAD;
21807         strbuf._ptr = strbuf._base = (unsigned char *) str;
21808         strbuf._cnt = strlen(str);
21809         strbuf._file = _NFILE;
21810         return (_doscan(&strbuf, "%d", ap))
21811   ;
21812   return 0;
21813 }
21814 _ACEOF
21815 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21816 if { (eval echo "$as_me:21816: \"$ac_link\"") >&5
21817   (eval $ac_link) 2>&5
21818   ac_status=$?
21819   echo "$as_me:21819: \$? = $ac_status" >&5
21820   (exit "$ac_status"); } &&
21821          { ac_try='test -s "conftest$ac_exeext"'
21822   { (eval echo "$as_me:21822: \"$ac_try\"") >&5
21823   (eval $ac_try) 2>&5
21824   ac_status=$?
21825   echo "$as_me:21825: \$? = $ac_status" >&5
21826   (exit "$ac_status"); }; }; then
21827   cf_cv_func_vsscanf=_doscan
21828 else
21829   echo "$as_me: failed program was:" >&5
21830 cat "conftest.$ac_ext" >&5
21831
21832 cf_cv_func_vsscanf=no
21833 fi
21834 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21835 fi
21836 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21837 fi
21838 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21839 fi
21840 echo "$as_me:21840: result: $cf_cv_func_vsscanf" >&5
21841 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
21842
21843 case "$cf_cv_func_vsscanf" in
21844 (vsscanf)
21845 cat >>confdefs.h <<\EOF
21846 #define HAVE_VSSCANF 1
21847 EOF
21848 ;;
21849 (vfscanf)
21850 cat >>confdefs.h <<\EOF
21851 #define HAVE_VFSCANF 1
21852 EOF
21853 ;;
21854 (_doscan)
21855 cat >>confdefs.h <<\EOF
21856 #define HAVE__DOSCAN 1
21857 EOF
21858 ;;
21859 esac
21860
21861 for ac_header in \
21862 unistd.h \
21863
21864 do
21865 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21866 echo "$as_me:21866: checking for $ac_header" >&5
21867 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21868 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21869   echo $ECHO_N "(cached) $ECHO_C" >&6
21870 else
21871   cat >"conftest.$ac_ext" <<_ACEOF
21872 #line 21872 "configure"
21873 #include "confdefs.h"
21874 #include <$ac_header>
21875 _ACEOF
21876 if { (eval echo "$as_me:21876: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21877   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21878   ac_status=$?
21879   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21880   rm -f conftest.er1
21881   cat conftest.err >&5
21882   echo "$as_me:21882: \$? = $ac_status" >&5
21883   (exit "$ac_status"); } >/dev/null; then
21884   if test -s conftest.err; then
21885     ac_cpp_err=$ac_c_preproc_warn_flag
21886   else
21887     ac_cpp_err=
21888   fi
21889 else
21890   ac_cpp_err=yes
21891 fi
21892 if test -z "$ac_cpp_err"; then
21893   eval "$as_ac_Header=yes"
21894 else
21895   echo "$as_me: failed program was:" >&5
21896   cat "conftest.$ac_ext" >&5
21897   eval "$as_ac_Header=no"
21898 fi
21899 rm -f conftest.err "conftest.$ac_ext"
21900 fi
21901 echo "$as_me:21901: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21902 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21903 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21904   cat >>confdefs.h <<EOF
21905 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21906 EOF
21907
21908 fi
21909 done
21910
21911 echo "$as_me:21911: checking for working mkstemp" >&5
21912 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
21913 if test "${cf_cv_func_mkstemp+set}" = set; then
21914   echo $ECHO_N "(cached) $ECHO_C" >&6
21915 else
21916
21917 rm -rf ./conftest*
21918 if test "$cross_compiling" = yes; then
21919   cf_cv_func_mkstemp=maybe
21920 else
21921   cat >"conftest.$ac_ext" <<_ACEOF
21922 #line 21922 "configure"
21923 #include "confdefs.h"
21924
21925 #include <sys/types.h>
21926 #ifdef HAVE_UNISTD_H
21927 #include <unistd.h>
21928 #endif
21929 #include <stdlib.h>
21930 #include <stdio.h>
21931 #include <string.h>
21932 #include <sys/stat.h>
21933 int main(void)
21934 {
21935         char *tmpl = "conftestXXXXXX";
21936         char name[2][80];
21937         int n;
21938         int result = 0;
21939         int fd;
21940         struct stat sb;
21941
21942         umask(077);
21943         for (n = 0; n < 2; ++n) {
21944                 strcpy(name[n], tmpl);
21945                 if ((fd = mkstemp(name[n])) >= 0) {
21946                         if (!strcmp(name[n], tmpl)
21947                          || stat(name[n], &sb) != 0
21948                          || (sb.st_mode & S_IFMT) != S_IFREG
21949                          || (sb.st_mode & 077) != 0) {
21950                                 result = 1;
21951                         }
21952                         close(fd);
21953                 }
21954         }
21955         if (result == 0
21956          && !strcmp(name[0], name[1]))
21957                 result = 1;
21958         ${cf_cv_main_return:-return}(result);
21959 }
21960
21961 _ACEOF
21962 rm -f "conftest$ac_exeext"
21963 if { (eval echo "$as_me:21963: \"$ac_link\"") >&5
21964   (eval $ac_link) 2>&5
21965   ac_status=$?
21966   echo "$as_me:21966: \$? = $ac_status" >&5
21967   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21968   { (eval echo "$as_me:21968: \"$ac_try\"") >&5
21969   (eval $ac_try) 2>&5
21970   ac_status=$?
21971   echo "$as_me:21971: \$? = $ac_status" >&5
21972   (exit "$ac_status"); }; }; then
21973   cf_cv_func_mkstemp=yes
21974
21975 else
21976   echo "$as_me: program exited with status $ac_status" >&5
21977 echo "$as_me: failed program was:" >&5
21978 cat "conftest.$ac_ext" >&5
21979 cf_cv_func_mkstemp=no
21980
21981 fi
21982 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21983 fi
21984
21985 fi
21986 echo "$as_me:21986: result: $cf_cv_func_mkstemp" >&5
21987 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
21988 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
21989         echo "$as_me:21989: checking for mkstemp" >&5
21990 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
21991 if test "${ac_cv_func_mkstemp+set}" = set; then
21992   echo $ECHO_N "(cached) $ECHO_C" >&6
21993 else
21994   cat >"conftest.$ac_ext" <<_ACEOF
21995 #line 21995 "configure"
21996 #include "confdefs.h"
21997 #define mkstemp autoconf_temporary
21998 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21999 #undef mkstemp
22000
22001 #ifdef __cplusplus
22002 extern "C"
22003 #endif
22004
22005 /* We use char because int might match the return type of a gcc2
22006    builtin and then its argument prototype would still apply.  */
22007 char mkstemp (void);
22008
22009 int
22010 main (void)
22011 {
22012
22013 /* The GNU C library defines stubs for functions which it implements
22014     to always fail with ENOSYS.  Some functions are actually named
22015     something starting with __ and the normal name is an alias.  */
22016 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22017 #error found stub for mkstemp
22018 #endif
22019
22020         return mkstemp ();
22021   ;
22022   return 0;
22023 }
22024 _ACEOF
22025 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22026 if { (eval echo "$as_me:22026: \"$ac_link\"") >&5
22027   (eval $ac_link) 2>&5
22028   ac_status=$?
22029   echo "$as_me:22029: \$? = $ac_status" >&5
22030   (exit "$ac_status"); } &&
22031          { ac_try='test -s "conftest$ac_exeext"'
22032   { (eval echo "$as_me:22032: \"$ac_try\"") >&5
22033   (eval $ac_try) 2>&5
22034   ac_status=$?
22035   echo "$as_me:22035: \$? = $ac_status" >&5
22036   (exit "$ac_status"); }; }; then
22037   ac_cv_func_mkstemp=yes
22038 else
22039   echo "$as_me: failed program was:" >&5
22040 cat "conftest.$ac_ext" >&5
22041 ac_cv_func_mkstemp=no
22042 fi
22043 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22044 fi
22045 echo "$as_me:22045: result: $ac_cv_func_mkstemp" >&5
22046 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22047
22048 fi
22049 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22050
22051 cat >>confdefs.h <<\EOF
22052 #define HAVE_MKSTEMP 1
22053 EOF
22054
22055 fi
22056
22057 # setup for prototype of fallback for vsscanf()
22058
22059 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22060         HAVE_VSSCANF=1
22061 else
22062         HAVE_VSSCANF=0
22063 fi
22064
22065 if test "x$cross_compiling" = xyes ; then
22066         { echo "$as_me:22066: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22067 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22068 else
22069         echo "$as_me:22069: checking whether setvbuf arguments are reversed" >&5
22070 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22071 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22072   echo $ECHO_N "(cached) $ECHO_C" >&6
22073 else
22074   if test "$cross_compiling" = yes; then
22075   { { echo "$as_me:22075: error: cannot run test program while cross compiling" >&5
22076 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22077    { (exit 1); exit 1; }; }
22078 else
22079   cat >"conftest.$ac_ext" <<_ACEOF
22080 #line 22080 "configure"
22081 #include "confdefs.h"
22082 #include <stdio.h>
22083 /* If setvbuf has the reversed format, exit 0. */
22084 int
22085 main (void)
22086 {
22087   /* This call has the arguments reversed.
22088      A reversed system may check and see that the address of main
22089      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22090   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22091     $ac_main_return(1);
22092   putc('\r', stdout);
22093   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22094 }
22095 _ACEOF
22096 rm -f "conftest$ac_exeext"
22097 if { (eval echo "$as_me:22097: \"$ac_link\"") >&5
22098   (eval $ac_link) 2>&5
22099   ac_status=$?
22100   echo "$as_me:22100: \$? = $ac_status" >&5
22101   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22102   { (eval echo "$as_me:22102: \"$ac_try\"") >&5
22103   (eval $ac_try) 2>&5
22104   ac_status=$?
22105   echo "$as_me:22105: \$? = $ac_status" >&5
22106   (exit "$ac_status"); }; }; then
22107   ac_cv_func_setvbuf_reversed=yes
22108 else
22109   echo "$as_me: program exited with status $ac_status" >&5
22110 echo "$as_me: failed program was:" >&5
22111 cat "conftest.$ac_ext" >&5
22112 ac_cv_func_setvbuf_reversed=no
22113 fi
22114 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22115 fi
22116 rm -f core ./core.* ./*.core
22117 fi
22118 echo "$as_me:22118: result: $ac_cv_func_setvbuf_reversed" >&5
22119 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22120 if test $ac_cv_func_setvbuf_reversed = yes; then
22121
22122 cat >>confdefs.h <<\EOF
22123 #define SETVBUF_REVERSED 1
22124 EOF
22125
22126 fi
22127
22128 fi
22129 echo "$as_me:22129: checking for intptr_t" >&5
22130 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22131 if test "${ac_cv_type_intptr_t+set}" = set; then
22132   echo $ECHO_N "(cached) $ECHO_C" >&6
22133 else
22134   cat >"conftest.$ac_ext" <<_ACEOF
22135 #line 22135 "configure"
22136 #include "confdefs.h"
22137 $ac_includes_default
22138 int
22139 main (void)
22140 {
22141 if ((intptr_t *) 0)
22142   return 0;
22143 if (sizeof (intptr_t))
22144   return 0;
22145   ;
22146   return 0;
22147 }
22148 _ACEOF
22149 rm -f "conftest.$ac_objext"
22150 if { (eval echo "$as_me:22150: \"$ac_compile\"") >&5
22151   (eval $ac_compile) 2>&5
22152   ac_status=$?
22153   echo "$as_me:22153: \$? = $ac_status" >&5
22154   (exit "$ac_status"); } &&
22155          { ac_try='test -s "conftest.$ac_objext"'
22156   { (eval echo "$as_me:22156: \"$ac_try\"") >&5
22157   (eval $ac_try) 2>&5
22158   ac_status=$?
22159   echo "$as_me:22159: \$? = $ac_status" >&5
22160   (exit "$ac_status"); }; }; then
22161   ac_cv_type_intptr_t=yes
22162 else
22163   echo "$as_me: failed program was:" >&5
22164 cat "conftest.$ac_ext" >&5
22165 ac_cv_type_intptr_t=no
22166 fi
22167 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22168 fi
22169 echo "$as_me:22169: result: $ac_cv_type_intptr_t" >&5
22170 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22171 if test "$ac_cv_type_intptr_t" = yes; then
22172   :
22173 else
22174
22175 cat >>confdefs.h <<EOF
22176 #define intptr_t long
22177 EOF
22178
22179 fi
22180
22181 echo "$as_me:22181: checking for ssize_t" >&5
22182 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22183 if test "${ac_cv_type_ssize_t+set}" = set; then
22184   echo $ECHO_N "(cached) $ECHO_C" >&6
22185 else
22186   cat >"conftest.$ac_ext" <<_ACEOF
22187 #line 22187 "configure"
22188 #include "confdefs.h"
22189 $ac_includes_default
22190 int
22191 main (void)
22192 {
22193 if ((ssize_t *) 0)
22194   return 0;
22195 if (sizeof (ssize_t))
22196   return 0;
22197   ;
22198   return 0;
22199 }
22200 _ACEOF
22201 rm -f "conftest.$ac_objext"
22202 if { (eval echo "$as_me:22202: \"$ac_compile\"") >&5
22203   (eval $ac_compile) 2>&5
22204   ac_status=$?
22205   echo "$as_me:22205: \$? = $ac_status" >&5
22206   (exit "$ac_status"); } &&
22207          { ac_try='test -s "conftest.$ac_objext"'
22208   { (eval echo "$as_me:22208: \"$ac_try\"") >&5
22209   (eval $ac_try) 2>&5
22210   ac_status=$?
22211   echo "$as_me:22211: \$? = $ac_status" >&5
22212   (exit "$ac_status"); }; }; then
22213   ac_cv_type_ssize_t=yes
22214 else
22215   echo "$as_me: failed program was:" >&5
22216 cat "conftest.$ac_ext" >&5
22217 ac_cv_type_ssize_t=no
22218 fi
22219 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22220 fi
22221 echo "$as_me:22221: result: $ac_cv_type_ssize_t" >&5
22222 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22223 if test "$ac_cv_type_ssize_t" = yes; then
22224   :
22225 else
22226
22227 cat >>confdefs.h <<EOF
22228 #define ssize_t int
22229 EOF
22230
22231 fi
22232
22233 echo "$as_me:22233: checking for type sigaction_t" >&5
22234 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22235 if test "${cf_cv_type_sigaction+set}" = set; then
22236   echo $ECHO_N "(cached) $ECHO_C" >&6
22237 else
22238
22239         cat >"conftest.$ac_ext" <<_ACEOF
22240 #line 22240 "configure"
22241 #include "confdefs.h"
22242
22243 #include <signal.h>
22244 int
22245 main (void)
22246 {
22247 sigaction_t x
22248   ;
22249   return 0;
22250 }
22251 _ACEOF
22252 rm -f "conftest.$ac_objext"
22253 if { (eval echo "$as_me:22253: \"$ac_compile\"") >&5
22254   (eval $ac_compile) 2>&5
22255   ac_status=$?
22256   echo "$as_me:22256: \$? = $ac_status" >&5
22257   (exit "$ac_status"); } &&
22258          { ac_try='test -s "conftest.$ac_objext"'
22259   { (eval echo "$as_me:22259: \"$ac_try\"") >&5
22260   (eval $ac_try) 2>&5
22261   ac_status=$?
22262   echo "$as_me:22262: \$? = $ac_status" >&5
22263   (exit "$ac_status"); }; }; then
22264   cf_cv_type_sigaction=yes
22265 else
22266   echo "$as_me: failed program was:" >&5
22267 cat "conftest.$ac_ext" >&5
22268 cf_cv_type_sigaction=no
22269 fi
22270 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22271 fi
22272
22273 echo "$as_me:22273: result: $cf_cv_type_sigaction" >&5
22274 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22275 test "$cf_cv_type_sigaction" = yes &&
22276 cat >>confdefs.h <<\EOF
22277 #define HAVE_TYPE_SIGACTION 1
22278 EOF
22279
22280 echo "$as_me:22280: checking declaration of size-change" >&5
22281 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22282 if test "${cf_cv_sizechange+set}" = set; then
22283   echo $ECHO_N "(cached) $ECHO_C" >&6
22284 else
22285
22286         cf_cv_sizechange=unknown
22287         cf_save_CPPFLAGS="$CPPFLAGS"
22288
22289 for cf_opts in "" "NEED_PTEM_H"
22290 do
22291
22292         CPPFLAGS="$cf_save_CPPFLAGS"
22293         if test -n "$cf_opts"
22294         then
22295
22296         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22297         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22298
22299         fi
22300         cat >"conftest.$ac_ext" <<_ACEOF
22301 #line 22301 "configure"
22302 #include "confdefs.h"
22303 #include <sys/types.h>
22304 #ifdef HAVE_TERMIOS_H
22305 #include <termios.h>
22306 #else
22307 #ifdef HAVE_TERMIO_H
22308 #include <termio.h>
22309 #endif
22310 #endif
22311
22312 #ifdef NEED_PTEM_H
22313 /* This is a workaround for SCO:  they neglected to define struct winsize in
22314  * termios.h -- it's only in termio.h and ptem.h
22315  */
22316 #include <sys/stream.h>
22317 #include <sys/ptem.h>
22318 #endif
22319
22320 #ifdef HAVE_SYS_IOCTL_H
22321 #include <sys/ioctl.h>
22322 #endif
22323
22324 int
22325 main (void)
22326 {
22327
22328 #ifdef TIOCGSIZE
22329         struct ttysize win;     /* SunOS 3.0... */
22330         int y = win.ts_lines = 2;
22331         int x = win.ts_cols = 1;
22332         (void)y;
22333         (void)x;
22334 #else
22335 #ifdef TIOCGWINSZ
22336         struct winsize win;     /* everything else */
22337         int y = win.ws_row = 2;
22338         int x = win.ws_col = 1;
22339         (void)y;
22340         (void)x;
22341 #else
22342         no TIOCGSIZE or TIOCGWINSZ
22343 #endif /* TIOCGWINSZ */
22344 #endif /* TIOCGSIZE */
22345
22346   ;
22347   return 0;
22348 }
22349 _ACEOF
22350 rm -f "conftest.$ac_objext"
22351 if { (eval echo "$as_me:22351: \"$ac_compile\"") >&5
22352   (eval $ac_compile) 2>&5
22353   ac_status=$?
22354   echo "$as_me:22354: \$? = $ac_status" >&5
22355   (exit "$ac_status"); } &&
22356          { ac_try='test -s "conftest.$ac_objext"'
22357   { (eval echo "$as_me:22357: \"$ac_try\"") >&5
22358   (eval $ac_try) 2>&5
22359   ac_status=$?
22360   echo "$as_me:22360: \$? = $ac_status" >&5
22361   (exit "$ac_status"); }; }; then
22362   cf_cv_sizechange=yes
22363 else
22364   echo "$as_me: failed program was:" >&5
22365 cat "conftest.$ac_ext" >&5
22366 cf_cv_sizechange=no
22367 fi
22368 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22369
22370         CPPFLAGS="$cf_save_CPPFLAGS"
22371         if test "$cf_cv_sizechange" = yes ; then
22372                 echo "size-change succeeded ($cf_opts)" >&5
22373                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22374                 break
22375         fi
22376 done
22377
22378 fi
22379 echo "$as_me:22379: result: $cf_cv_sizechange" >&5
22380 echo "${ECHO_T}$cf_cv_sizechange" >&6
22381 if test "$cf_cv_sizechange" != no ; then
22382
22383 cat >>confdefs.h <<\EOF
22384 #define HAVE_SIZECHANGE 1
22385 EOF
22386
22387         case "$cf_cv_sizechange" in
22388         (NEED*)
22389                 cat >>confdefs.h <<EOF
22390 #define $cf_cv_sizechange  1
22391 EOF
22392
22393                 ;;
22394         esac
22395 fi
22396
22397 echo "$as_me:22397: checking for memmove" >&5
22398 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22399 if test "${ac_cv_func_memmove+set}" = set; then
22400   echo $ECHO_N "(cached) $ECHO_C" >&6
22401 else
22402   cat >"conftest.$ac_ext" <<_ACEOF
22403 #line 22403 "configure"
22404 #include "confdefs.h"
22405 #define memmove autoconf_temporary
22406 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22407 #undef memmove
22408
22409 #ifdef __cplusplus
22410 extern "C"
22411 #endif
22412
22413 /* We use char because int might match the return type of a gcc2
22414    builtin and then its argument prototype would still apply.  */
22415 char memmove (void);
22416
22417 int
22418 main (void)
22419 {
22420
22421 /* The GNU C library defines stubs for functions which it implements
22422     to always fail with ENOSYS.  Some functions are actually named
22423     something starting with __ and the normal name is an alias.  */
22424 #if defined (__stub_memmove) || defined (__stub___memmove)
22425 #error found stub for memmove
22426 #endif
22427
22428         return memmove ();
22429   ;
22430   return 0;
22431 }
22432 _ACEOF
22433 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22434 if { (eval echo "$as_me:22434: \"$ac_link\"") >&5
22435   (eval $ac_link) 2>&5
22436   ac_status=$?
22437   echo "$as_me:22437: \$? = $ac_status" >&5
22438   (exit "$ac_status"); } &&
22439          { ac_try='test -s "conftest$ac_exeext"'
22440   { (eval echo "$as_me:22440: \"$ac_try\"") >&5
22441   (eval $ac_try) 2>&5
22442   ac_status=$?
22443   echo "$as_me:22443: \$? = $ac_status" >&5
22444   (exit "$ac_status"); }; }; then
22445   ac_cv_func_memmove=yes
22446 else
22447   echo "$as_me: failed program was:" >&5
22448 cat "conftest.$ac_ext" >&5
22449 ac_cv_func_memmove=no
22450 fi
22451 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22452 fi
22453 echo "$as_me:22453: result: $ac_cv_func_memmove" >&5
22454 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22455 if test "$ac_cv_func_memmove" = yes; then
22456   :
22457 else
22458
22459 echo "$as_me:22459: checking for bcopy" >&5
22460 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22461 if test "${ac_cv_func_bcopy+set}" = set; then
22462   echo $ECHO_N "(cached) $ECHO_C" >&6
22463 else
22464   cat >"conftest.$ac_ext" <<_ACEOF
22465 #line 22465 "configure"
22466 #include "confdefs.h"
22467 #define bcopy autoconf_temporary
22468 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22469 #undef bcopy
22470
22471 #ifdef __cplusplus
22472 extern "C"
22473 #endif
22474
22475 /* We use char because int might match the return type of a gcc2
22476    builtin and then its argument prototype would still apply.  */
22477 char bcopy (void);
22478
22479 int
22480 main (void)
22481 {
22482
22483 /* The GNU C library defines stubs for functions which it implements
22484     to always fail with ENOSYS.  Some functions are actually named
22485     something starting with __ and the normal name is an alias.  */
22486 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22487 #error found stub for bcopy
22488 #endif
22489
22490         return bcopy ();
22491   ;
22492   return 0;
22493 }
22494 _ACEOF
22495 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22496 if { (eval echo "$as_me:22496: \"$ac_link\"") >&5
22497   (eval $ac_link) 2>&5
22498   ac_status=$?
22499   echo "$as_me:22499: \$? = $ac_status" >&5
22500   (exit "$ac_status"); } &&
22501          { ac_try='test -s "conftest$ac_exeext"'
22502   { (eval echo "$as_me:22502: \"$ac_try\"") >&5
22503   (eval $ac_try) 2>&5
22504   ac_status=$?
22505   echo "$as_me:22505: \$? = $ac_status" >&5
22506   (exit "$ac_status"); }; }; then
22507   ac_cv_func_bcopy=yes
22508 else
22509   echo "$as_me: failed program was:" >&5
22510 cat "conftest.$ac_ext" >&5
22511 ac_cv_func_bcopy=no
22512 fi
22513 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22514 fi
22515 echo "$as_me:22515: result: $ac_cv_func_bcopy" >&5
22516 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22517 if test "$ac_cv_func_bcopy" = yes; then
22518
22519         echo "$as_me:22519: checking if bcopy does overlapping moves" >&5
22520 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22521 if test "${cf_cv_good_bcopy+set}" = set; then
22522   echo $ECHO_N "(cached) $ECHO_C" >&6
22523 else
22524
22525                 if test "$cross_compiling" = yes; then
22526   cf_cv_good_bcopy=unknown
22527 else
22528   cat >"conftest.$ac_ext" <<_ACEOF
22529 #line 22529 "configure"
22530 #include "confdefs.h"
22531
22532 int main(void) {
22533         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22534         char temp[40];
22535         bcopy(data, temp, sizeof(data));
22536         bcopy(temp+10, temp, 15);
22537         bcopy(temp+5, temp+15, 10);
22538         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22539 }
22540
22541 _ACEOF
22542 rm -f "conftest$ac_exeext"
22543 if { (eval echo "$as_me:22543: \"$ac_link\"") >&5
22544   (eval $ac_link) 2>&5
22545   ac_status=$?
22546   echo "$as_me:22546: \$? = $ac_status" >&5
22547   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22548   { (eval echo "$as_me:22548: \"$ac_try\"") >&5
22549   (eval $ac_try) 2>&5
22550   ac_status=$?
22551   echo "$as_me:22551: \$? = $ac_status" >&5
22552   (exit "$ac_status"); }; }; then
22553   cf_cv_good_bcopy=yes
22554 else
22555   echo "$as_me: program exited with status $ac_status" >&5
22556 echo "$as_me: failed program was:" >&5
22557 cat "conftest.$ac_ext" >&5
22558 cf_cv_good_bcopy=no
22559 fi
22560 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22561 fi
22562
22563 fi
22564 echo "$as_me:22564: result: $cf_cv_good_bcopy" >&5
22565 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22566
22567 else
22568   cf_cv_good_bcopy=no
22569 fi
22570
22571         if test "$cf_cv_good_bcopy" = yes ; then
22572
22573 cat >>confdefs.h <<\EOF
22574 #define USE_OK_BCOPY 1
22575 EOF
22576
22577         else
22578
22579 cat >>confdefs.h <<\EOF
22580 #define USE_MY_MEMMOVE 1
22581 EOF
22582
22583         fi
22584
22585 fi
22586
22587 tty >/dev/null 2>&1 || {
22588 for ac_func in posix_openpt
22589 do
22590 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22591 echo "$as_me:22591: checking for $ac_func" >&5
22592 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22593 if eval "test \"\${$as_ac_var+set}\" = set"; then
22594   echo $ECHO_N "(cached) $ECHO_C" >&6
22595 else
22596   cat >"conftest.$ac_ext" <<_ACEOF
22597 #line 22597 "configure"
22598 #include "confdefs.h"
22599 #define $ac_func autoconf_temporary
22600 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22601 #undef $ac_func
22602
22603 #ifdef __cplusplus
22604 extern "C"
22605 #endif
22606
22607 /* We use char because int might match the return type of a gcc2
22608    builtin and then its argument prototype would still apply.  */
22609 char $ac_func (void);
22610
22611 int
22612 main (void)
22613 {
22614
22615 /* The GNU C library defines stubs for functions which it implements
22616     to always fail with ENOSYS.  Some functions are actually named
22617     something starting with __ and the normal name is an alias.  */
22618 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22619 #error found stub for $ac_func
22620 #endif
22621
22622         return $ac_func ();
22623   ;
22624   return 0;
22625 }
22626 _ACEOF
22627 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22628 if { (eval echo "$as_me:22628: \"$ac_link\"") >&5
22629   (eval $ac_link) 2>&5
22630   ac_status=$?
22631   echo "$as_me:22631: \$? = $ac_status" >&5
22632   (exit "$ac_status"); } &&
22633          { ac_try='test -s "conftest$ac_exeext"'
22634   { (eval echo "$as_me:22634: \"$ac_try\"") >&5
22635   (eval $ac_try) 2>&5
22636   ac_status=$?
22637   echo "$as_me:22637: \$? = $ac_status" >&5
22638   (exit "$ac_status"); }; }; then
22639   eval "$as_ac_var=yes"
22640 else
22641   echo "$as_me: failed program was:" >&5
22642 cat "conftest.$ac_ext" >&5
22643 eval "$as_ac_var=no"
22644 fi
22645 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22646 fi
22647 echo "$as_me:22647: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22648 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22649 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22650   cat >>confdefs.h <<EOF
22651 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22652 EOF
22653
22654 fi
22655 done
22656  }
22657 echo "$as_me:22657: checking if poll really works" >&5
22658 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22659 if test "${cf_cv_working_poll+set}" = set; then
22660   echo $ECHO_N "(cached) $ECHO_C" >&6
22661 else
22662
22663 if test "$cross_compiling" = yes; then
22664   cf_cv_working_poll=unknown
22665 else
22666   cat >"conftest.$ac_ext" <<_ACEOF
22667 #line 22667 "configure"
22668 #include "confdefs.h"
22669
22670 #include <stdlib.h>
22671 #include <stdio.h>
22672 #include <unistd.h>
22673 #include <fcntl.h>
22674 #ifdef HAVE_POLL_H
22675 #include <poll.h>
22676 #else
22677 #include <sys/poll.h>
22678 #endif
22679 int main(void) {
22680         struct pollfd myfds;
22681         int ret;
22682
22683         /* check for Darwin bug with respect to "devices" */
22684         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22685         if (myfds.fd < 0)
22686                 myfds.fd = 0;
22687         myfds.events = POLLIN;
22688         myfds.revents = 0;
22689
22690         ret = poll(&myfds, 1, 100);
22691
22692         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22693                 ret = -1;
22694         } else {
22695                 int fd = 0;
22696                 if (!isatty(fd)) {
22697                         fd = open("/dev/tty", 2);       /* O_RDWR */
22698                 }
22699 #ifdef HAVE_POSIX_OPENPT
22700                 if (fd < 0) {
22701                         fd = posix_openpt(O_RDWR);
22702                 }
22703 #endif
22704
22705                 if (fd >= 0) {
22706                         /* also check with standard input */
22707                         myfds.fd = fd;
22708                         myfds.events = POLLIN;
22709                         myfds.revents = 0;
22710                         ret = poll(&myfds, 1, 100);
22711                 } else {
22712                         ret = -1;
22713                 }
22714         }
22715         ${cf_cv_main_return:-return}(ret < 0);
22716 }
22717 _ACEOF
22718 rm -f "conftest$ac_exeext"
22719 if { (eval echo "$as_me:22719: \"$ac_link\"") >&5
22720   (eval $ac_link) 2>&5
22721   ac_status=$?
22722   echo "$as_me:22722: \$? = $ac_status" >&5
22723   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22724   { (eval echo "$as_me:22724: \"$ac_try\"") >&5
22725   (eval $ac_try) 2>&5
22726   ac_status=$?
22727   echo "$as_me:22727: \$? = $ac_status" >&5
22728   (exit "$ac_status"); }; }; then
22729   cf_cv_working_poll=yes
22730 else
22731   echo "$as_me: program exited with status $ac_status" >&5
22732 echo "$as_me: failed program was:" >&5
22733 cat "conftest.$ac_ext" >&5
22734 cf_cv_working_poll=no
22735 fi
22736 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22737 fi
22738 fi
22739 echo "$as_me:22739: result: $cf_cv_working_poll" >&5
22740 echo "${ECHO_T}$cf_cv_working_poll" >&6
22741 test "$cf_cv_working_poll" = "yes" &&
22742 cat >>confdefs.h <<\EOF
22743 #define HAVE_WORKING_POLL 1
22744 EOF
22745
22746 echo "$as_me:22746: checking for va_copy" >&5
22747 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
22748 if test "${cf_cv_have_va_copy+set}" = set; then
22749   echo $ECHO_N "(cached) $ECHO_C" >&6
22750 else
22751
22752 cat >"conftest.$ac_ext" <<_ACEOF
22753 #line 22753 "configure"
22754 #include "confdefs.h"
22755
22756 #include <stdarg.h>
22757
22758 int
22759 main (void)
22760 {
22761
22762         static va_list dst;
22763         static va_list src;
22764         va_copy(dst, src)
22765   ;
22766   return 0;
22767 }
22768 _ACEOF
22769 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22770 if { (eval echo "$as_me:22770: \"$ac_link\"") >&5
22771   (eval $ac_link) 2>&5
22772   ac_status=$?
22773   echo "$as_me:22773: \$? = $ac_status" >&5
22774   (exit "$ac_status"); } &&
22775          { ac_try='test -s "conftest$ac_exeext"'
22776   { (eval echo "$as_me:22776: \"$ac_try\"") >&5
22777   (eval $ac_try) 2>&5
22778   ac_status=$?
22779   echo "$as_me:22779: \$? = $ac_status" >&5
22780   (exit "$ac_status"); }; }; then
22781   cf_cv_have_va_copy=yes
22782 else
22783   echo "$as_me: failed program was:" >&5
22784 cat "conftest.$ac_ext" >&5
22785 cf_cv_have_va_copy=no
22786 fi
22787 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22788 fi
22789 echo "$as_me:22789: result: $cf_cv_have_va_copy" >&5
22790 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
22791
22792 if test "$cf_cv_have_va_copy" = yes;
22793 then
22794
22795 cat >>confdefs.h <<\EOF
22796 #define HAVE_VA_COPY 1
22797 EOF
22798
22799 else # !cf_cv_have_va_copy
22800
22801 echo "$as_me:22801: checking for __va_copy" >&5
22802 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
22803 if test "${cf_cv_have___va_copy+set}" = set; then
22804   echo $ECHO_N "(cached) $ECHO_C" >&6
22805 else
22806
22807 cat >"conftest.$ac_ext" <<_ACEOF
22808 #line 22808 "configure"
22809 #include "confdefs.h"
22810
22811 #include <stdarg.h>
22812
22813 int
22814 main (void)
22815 {
22816
22817         static va_list dst;
22818         static va_list src;
22819         __va_copy(dst, src)
22820   ;
22821   return 0;
22822 }
22823 _ACEOF
22824 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22825 if { (eval echo "$as_me:22825: \"$ac_link\"") >&5
22826   (eval $ac_link) 2>&5
22827   ac_status=$?
22828   echo "$as_me:22828: \$? = $ac_status" >&5
22829   (exit "$ac_status"); } &&
22830          { ac_try='test -s "conftest$ac_exeext"'
22831   { (eval echo "$as_me:22831: \"$ac_try\"") >&5
22832   (eval $ac_try) 2>&5
22833   ac_status=$?
22834   echo "$as_me:22834: \$? = $ac_status" >&5
22835   (exit "$ac_status"); }; }; then
22836   cf_cv_have___va_copy=yes
22837 else
22838   echo "$as_me: failed program was:" >&5
22839 cat "conftest.$ac_ext" >&5
22840 cf_cv_have___va_copy=no
22841 fi
22842 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22843 fi
22844 echo "$as_me:22844: result: $cf_cv_have___va_copy" >&5
22845 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
22846
22847 if test "$cf_cv_have___va_copy" = yes
22848 then
22849
22850 cat >>confdefs.h <<\EOF
22851 #define HAVE___VA_COPY 1
22852 EOF
22853
22854 else # !cf_cv_have___va_copy
22855
22856 echo "$as_me:22856: checking for __builtin_va_copy" >&5
22857 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
22858 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
22859   echo $ECHO_N "(cached) $ECHO_C" >&6
22860 else
22861
22862 cat >"conftest.$ac_ext" <<_ACEOF
22863 #line 22863 "configure"
22864 #include "confdefs.h"
22865
22866 #include <stdarg.h>
22867
22868 int
22869 main (void)
22870 {
22871
22872         static va_list dst;
22873         static va_list src;
22874         __builtin_va_copy(dst, src)
22875   ;
22876   return 0;
22877 }
22878 _ACEOF
22879 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22880 if { (eval echo "$as_me:22880: \"$ac_link\"") >&5
22881   (eval $ac_link) 2>&5
22882   ac_status=$?
22883   echo "$as_me:22883: \$? = $ac_status" >&5
22884   (exit "$ac_status"); } &&
22885          { ac_try='test -s "conftest$ac_exeext"'
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   cf_cv_have___builtin_va_copy=yes
22892 else
22893   echo "$as_me: failed program was:" >&5
22894 cat "conftest.$ac_ext" >&5
22895 cf_cv_have___builtin_va_copy=no
22896 fi
22897 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22898 fi
22899 echo "$as_me:22899: result: $cf_cv_have___builtin_va_copy" >&5
22900 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
22901
22902 test "$cf_cv_have___builtin_va_copy" = yes &&
22903
22904 cat >>confdefs.h <<\EOF
22905 #define HAVE___BUILTIN_VA_COPY 1
22906 EOF
22907
22908 fi # cf_cv_have___va_copy
22909
22910 fi # cf_cv_have_va_copy
22911
22912 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
22913 (*yes*)
22914         ;;
22915
22916 (*)
22917         echo "$as_me:22917: checking if we can simply copy va_list" >&5
22918 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
22919 if test "${cf_cv_pointer_va_list+set}" = set; then
22920   echo $ECHO_N "(cached) $ECHO_C" >&6
22921 else
22922
22923 cat >"conftest.$ac_ext" <<_ACEOF
22924 #line 22924 "configure"
22925 #include "confdefs.h"
22926
22927 #include <stdarg.h>
22928
22929 int
22930 main (void)
22931 {
22932
22933         va_list dst;
22934         va_list src;
22935         dst = src
22936   ;
22937   return 0;
22938 }
22939 _ACEOF
22940 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22941 if { (eval echo "$as_me:22941: \"$ac_link\"") >&5
22942   (eval $ac_link) 2>&5
22943   ac_status=$?
22944   echo "$as_me:22944: \$? = $ac_status" >&5
22945   (exit "$ac_status"); } &&
22946          { ac_try='test -s "conftest$ac_exeext"'
22947   { (eval echo "$as_me:22947: \"$ac_try\"") >&5
22948   (eval $ac_try) 2>&5
22949   ac_status=$?
22950   echo "$as_me:22950: \$? = $ac_status" >&5
22951   (exit "$ac_status"); }; }; then
22952   cf_cv_pointer_va_list=yes
22953 else
22954   echo "$as_me: failed program was:" >&5
22955 cat "conftest.$ac_ext" >&5
22956 cf_cv_pointer_va_list=no
22957 fi
22958 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22959 fi
22960 echo "$as_me:22960: result: $cf_cv_pointer_va_list" >&5
22961 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
22962
22963         if test "$cf_cv_pointer_va_list" = no
22964         then
22965                 echo "$as_me:22965: checking if we can copy va_list indirectly" >&5
22966 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
22967 if test "${cf_cv_array_va_list+set}" = set; then
22968   echo $ECHO_N "(cached) $ECHO_C" >&6
22969 else
22970
22971 cat >"conftest.$ac_ext" <<_ACEOF
22972 #line 22972 "configure"
22973 #include "confdefs.h"
22974
22975 #include <stdarg.h>
22976
22977 int
22978 main (void)
22979 {
22980
22981         va_list dst;
22982         va_list src;
22983         *dst = *src
22984   ;
22985   return 0;
22986 }
22987 _ACEOF
22988 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22989 if { (eval echo "$as_me:22989: \"$ac_link\"") >&5
22990   (eval $ac_link) 2>&5
22991   ac_status=$?
22992   echo "$as_me:22992: \$? = $ac_status" >&5
22993   (exit "$ac_status"); } &&
22994          { ac_try='test -s "conftest$ac_exeext"'
22995   { (eval echo "$as_me:22995: \"$ac_try\"") >&5
22996   (eval $ac_try) 2>&5
22997   ac_status=$?
22998   echo "$as_me:22998: \$? = $ac_status" >&5
22999   (exit "$ac_status"); }; }; then
23000   cf_cv_array_va_list=yes
23001 else
23002   echo "$as_me: failed program was:" >&5
23003 cat "conftest.$ac_ext" >&5
23004 cf_cv_array_va_list=no
23005 fi
23006 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23007 fi
23008 echo "$as_me:23008: result: $cf_cv_array_va_list" >&5
23009 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23010                 test "$cf_cv_array_va_list" = yes &&
23011 cat >>confdefs.h <<\EOF
23012 #define ARRAY_VA_LIST 1
23013 EOF
23014
23015         fi
23016         ;;
23017 esac
23018
23019 echo "$as_me:23019: checking for pid_t" >&5
23020 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23021 if test "${ac_cv_type_pid_t+set}" = set; then
23022   echo $ECHO_N "(cached) $ECHO_C" >&6
23023 else
23024   cat >"conftest.$ac_ext" <<_ACEOF
23025 #line 23025 "configure"
23026 #include "confdefs.h"
23027 $ac_includes_default
23028 int
23029 main (void)
23030 {
23031 if ((pid_t *) 0)
23032   return 0;
23033 if (sizeof (pid_t))
23034   return 0;
23035   ;
23036   return 0;
23037 }
23038 _ACEOF
23039 rm -f "conftest.$ac_objext"
23040 if { (eval echo "$as_me:23040: \"$ac_compile\"") >&5
23041   (eval $ac_compile) 2>&5
23042   ac_status=$?
23043   echo "$as_me:23043: \$? = $ac_status" >&5
23044   (exit "$ac_status"); } &&
23045          { ac_try='test -s "conftest.$ac_objext"'
23046   { (eval echo "$as_me:23046: \"$ac_try\"") >&5
23047   (eval $ac_try) 2>&5
23048   ac_status=$?
23049   echo "$as_me:23049: \$? = $ac_status" >&5
23050   (exit "$ac_status"); }; }; then
23051   ac_cv_type_pid_t=yes
23052 else
23053   echo "$as_me: failed program was:" >&5
23054 cat "conftest.$ac_ext" >&5
23055 ac_cv_type_pid_t=no
23056 fi
23057 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23058 fi
23059 echo "$as_me:23059: result: $ac_cv_type_pid_t" >&5
23060 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23061 if test "$ac_cv_type_pid_t" = yes; then
23062   :
23063 else
23064
23065 cat >>confdefs.h <<EOF
23066 #define pid_t int
23067 EOF
23068
23069 fi
23070
23071 for ac_header in unistd.h vfork.h
23072 do
23073 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23074 echo "$as_me:23074: checking for $ac_header" >&5
23075 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23076 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23077   echo $ECHO_N "(cached) $ECHO_C" >&6
23078 else
23079   cat >"conftest.$ac_ext" <<_ACEOF
23080 #line 23080 "configure"
23081 #include "confdefs.h"
23082 #include <$ac_header>
23083 _ACEOF
23084 if { (eval echo "$as_me:23084: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23085   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23086   ac_status=$?
23087   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23088   rm -f conftest.er1
23089   cat conftest.err >&5
23090   echo "$as_me:23090: \$? = $ac_status" >&5
23091   (exit "$ac_status"); } >/dev/null; then
23092   if test -s conftest.err; then
23093     ac_cpp_err=$ac_c_preproc_warn_flag
23094   else
23095     ac_cpp_err=
23096   fi
23097 else
23098   ac_cpp_err=yes
23099 fi
23100 if test -z "$ac_cpp_err"; then
23101   eval "$as_ac_Header=yes"
23102 else
23103   echo "$as_me: failed program was:" >&5
23104   cat "conftest.$ac_ext" >&5
23105   eval "$as_ac_Header=no"
23106 fi
23107 rm -f conftest.err "conftest.$ac_ext"
23108 fi
23109 echo "$as_me:23109: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23110 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23111 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23112   cat >>confdefs.h <<EOF
23113 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23114 EOF
23115
23116 fi
23117 done
23118
23119 for ac_func in fork vfork
23120 do
23121 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23122 echo "$as_me:23122: checking for $ac_func" >&5
23123 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23124 if eval "test \"\${$as_ac_var+set}\" = set"; then
23125   echo $ECHO_N "(cached) $ECHO_C" >&6
23126 else
23127   cat >"conftest.$ac_ext" <<_ACEOF
23128 #line 23128 "configure"
23129 #include "confdefs.h"
23130 #define $ac_func autoconf_temporary
23131 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23132 #undef $ac_func
23133
23134 #ifdef __cplusplus
23135 extern "C"
23136 #endif
23137
23138 /* We use char because int might match the return type of a gcc2
23139    builtin and then its argument prototype would still apply.  */
23140 char $ac_func (void);
23141
23142 int
23143 main (void)
23144 {
23145
23146 /* The GNU C library defines stubs for functions which it implements
23147     to always fail with ENOSYS.  Some functions are actually named
23148     something starting with __ and the normal name is an alias.  */
23149 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23150 #error found stub for $ac_func
23151 #endif
23152
23153         return $ac_func ();
23154   ;
23155   return 0;
23156 }
23157 _ACEOF
23158 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23159 if { (eval echo "$as_me:23159: \"$ac_link\"") >&5
23160   (eval $ac_link) 2>&5
23161   ac_status=$?
23162   echo "$as_me:23162: \$? = $ac_status" >&5
23163   (exit "$ac_status"); } &&
23164          { ac_try='test -s "conftest$ac_exeext"'
23165   { (eval echo "$as_me:23165: \"$ac_try\"") >&5
23166   (eval $ac_try) 2>&5
23167   ac_status=$?
23168   echo "$as_me:23168: \$? = $ac_status" >&5
23169   (exit "$ac_status"); }; }; then
23170   eval "$as_ac_var=yes"
23171 else
23172   echo "$as_me: failed program was:" >&5
23173 cat "conftest.$ac_ext" >&5
23174 eval "$as_ac_var=no"
23175 fi
23176 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23177 fi
23178 echo "$as_me:23178: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23179 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23180 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23181   cat >>confdefs.h <<EOF
23182 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23183 EOF
23184
23185 fi
23186 done
23187
23188 ac_cv_func_fork_works=$ac_cv_func_fork
23189 if test "x$ac_cv_func_fork" = xyes; then
23190   echo "$as_me:23190: checking for working fork" >&5
23191 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23192 if test "${ac_cv_func_fork_works+set}" = set; then
23193   echo $ECHO_N "(cached) $ECHO_C" >&6
23194 else
23195   if test "$cross_compiling" = yes; then
23196   ac_cv_func_fork_works=cross
23197 else
23198   cat >"conftest.$ac_ext" <<_ACEOF
23199 /* By Rüdiger Kuhlmann. */
23200       #include <sys/types.h>
23201       #if HAVE_UNISTD_H
23202       # include <unistd.h>
23203       #endif
23204       /* Some systems only have a dummy stub for fork() */
23205       int main (void)
23206       {
23207         if (fork() < 0)
23208           $ac_main_return (1);
23209         $ac_main_return (0);
23210       }
23211 _ACEOF
23212 rm -f "conftest$ac_exeext"
23213 if { (eval echo "$as_me:23213: \"$ac_link\"") >&5
23214   (eval $ac_link) 2>&5
23215   ac_status=$?
23216   echo "$as_me:23216: \$? = $ac_status" >&5
23217   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23218   { (eval echo "$as_me:23218: \"$ac_try\"") >&5
23219   (eval $ac_try) 2>&5
23220   ac_status=$?
23221   echo "$as_me:23221: \$? = $ac_status" >&5
23222   (exit "$ac_status"); }; }; then
23223   ac_cv_func_fork_works=yes
23224 else
23225   echo "$as_me: program exited with status $ac_status" >&5
23226 echo "$as_me: failed program was:" >&5
23227 cat "conftest.$ac_ext" >&5
23228 ac_cv_func_fork_works=no
23229 fi
23230 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23231 fi
23232 fi
23233 echo "$as_me:23233: result: $ac_cv_func_fork_works" >&5
23234 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23235
23236 fi
23237 if test "x$ac_cv_func_fork_works" = xcross; then
23238   case $host in
23239     *-*-amigaos* | *-*-msdosdjgpp*)
23240       # Override, as these systems have only a dummy fork() stub
23241       ac_cv_func_fork_works=no
23242       ;;
23243     *)
23244       ac_cv_func_fork_works=yes
23245       ;;
23246   esac
23247   { echo "$as_me:23247: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23248 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23249 fi
23250 ac_cv_func_vfork_works=$ac_cv_func_vfork
23251 if test "x$ac_cv_func_vfork" = xyes; then
23252   echo "$as_me:23252: checking for working vfork" >&5
23253 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23254 if test "${ac_cv_func_vfork_works+set}" = set; then
23255   echo $ECHO_N "(cached) $ECHO_C" >&6
23256 else
23257   if test "$cross_compiling" = yes; then
23258   ac_cv_func_vfork_works=cross
23259 else
23260   cat >"conftest.$ac_ext" <<_ACEOF
23261 #line 23261 "configure"
23262 #include "confdefs.h"
23263 /* Thanks to Paul Eggert for this test.  */
23264 #include <stdio.h>
23265 #include <sys/types.h>
23266 #include <sys/stat.h>
23267 #if HAVE_UNISTD_H
23268 # include <unistd.h>
23269 #endif
23270 #if HAVE_VFORK_H
23271 # include <vfork.h>
23272 #endif
23273 /* On some sparc systems, changes by the child to local and incoming
23274    argument registers are propagated back to the parent.  The compiler
23275    is told about this with #include <vfork.h>, but some compilers
23276    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23277    static variable whose address is put into a register that is
23278    clobbered by the vfork.  */
23279 static
23280 #ifdef __cplusplus
23281 sparc_address_test (int arg)
23282 # else
23283 sparc_address_test (arg) int arg;
23284 #endif
23285 {
23286   static pid_t child;
23287   if (!child) {
23288     child = vfork ();
23289     if (child < 0) {
23290       perror ("vfork");
23291       _exit(2);
23292     }
23293     if (!child) {
23294       arg = getpid();
23295       write(-1, "", 0);
23296       _exit (arg);
23297     }
23298   }
23299 }
23300
23301 int
23302 main (void)
23303 {
23304   pid_t parent = getpid ();
23305   pid_t child;
23306
23307   sparc_address_test ();
23308
23309   child = vfork ();
23310
23311   if (child == 0) {
23312     /* Here is another test for sparc vfork register problems.  This
23313        test uses lots of local variables, at least as many local
23314        variables as main has allocated so far including compiler
23315        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23316        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23317        reuse the register of parent for one of the local variables,
23318        since it will think that parent can't possibly be used any more
23319        in this routine.  Assigning to the local variable will thus
23320        munge parent in the parent process.  */
23321     pid_t
23322       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23323       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23324     /* Convince the compiler that p..p7 are live; otherwise, it might
23325        use the same hardware register for all 8 local variables.  */
23326     if (p != p1 || p != p2 || p != p3 || p != p4
23327         || p != p5 || p != p6 || p != p7)
23328       _exit(1);
23329
23330     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23331        from child file descriptors.  If the child closes a descriptor
23332        before it execs or exits, this munges the parent's descriptor
23333        as well.  Test for this by closing stdout in the child.  */
23334     _exit(close(fileno(stdout)) != 0);
23335   } else {
23336     int status;
23337     struct stat st;
23338
23339     while (wait(&status) != child)
23340       ;
23341     $ac_main_return(
23342          /* Was there some problem with vforking?  */
23343          child < 0
23344
23345          /* Did the child fail?  (This shouldn't happen.)  */
23346          || status
23347
23348          /* Did the vfork/compiler bug occur?  */
23349          || parent != getpid()
23350
23351          /* Did the file descriptor bug occur?  */
23352          || fstat(fileno(stdout), &st) != 0
23353          );
23354   }
23355 }
23356 _ACEOF
23357 rm -f "conftest$ac_exeext"
23358 if { (eval echo "$as_me:23358: \"$ac_link\"") >&5
23359   (eval $ac_link) 2>&5
23360   ac_status=$?
23361   echo "$as_me:23361: \$? = $ac_status" >&5
23362   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23363   { (eval echo "$as_me:23363: \"$ac_try\"") >&5
23364   (eval $ac_try) 2>&5
23365   ac_status=$?
23366   echo "$as_me:23366: \$? = $ac_status" >&5
23367   (exit "$ac_status"); }; }; then
23368   ac_cv_func_vfork_works=yes
23369 else
23370   echo "$as_me: program exited with status $ac_status" >&5
23371 echo "$as_me: failed program was:" >&5
23372 cat "conftest.$ac_ext" >&5
23373 ac_cv_func_vfork_works=no
23374 fi
23375 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23376 fi
23377 fi
23378 echo "$as_me:23378: result: $ac_cv_func_vfork_works" >&5
23379 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23380
23381 fi;
23382 if test "x$ac_cv_func_fork_works" = xcross; then
23383   ac_cv_func_vfork_works=ac_cv_func_vfork
23384   { echo "$as_me:23384: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23385 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23386 fi
23387
23388 if test "x$ac_cv_func_vfork_works" = xyes; then
23389
23390 cat >>confdefs.h <<\EOF
23391 #define HAVE_WORKING_VFORK 1
23392 EOF
23393
23394 else
23395
23396 cat >>confdefs.h <<\EOF
23397 #define vfork fork
23398 EOF
23399
23400 fi
23401 if test "x$ac_cv_func_fork_works" = xyes; then
23402
23403 cat >>confdefs.h <<\EOF
23404 #define HAVE_WORKING_FORK 1
23405 EOF
23406
23407 fi
23408
23409 echo "$as_me:23409: checking if fopen accepts explicit binary mode" >&5
23410 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23411 if test "${cf_cv_fopen_bin_r+set}" = set; then
23412   echo $ECHO_N "(cached) $ECHO_C" >&6
23413 else
23414
23415         if test "$cross_compiling" = yes; then
23416   cf_cv_fopen_bin_r=unknown
23417 else
23418   cat >"conftest.$ac_ext" <<_ACEOF
23419 #line 23419 "configure"
23420 #include "confdefs.h"
23421
23422 #include <stdio.h>
23423 int main(void) {
23424         FILE *fp = fopen("conftest.tmp", "wb");
23425         int rc = 0;
23426         if (fp != 0) {
23427                 int p, q;
23428                 for (p = 0; p < 256; ++p) {
23429                         fputc(p, fp);
23430                 }
23431                 fclose(fp);
23432                 fp = fopen("conftest.tmp", "rb");
23433                 if (fp != 0) {
23434                         for (p = 0; p < 256; ++p) {
23435                                 q = fgetc(fp);
23436                                 if (q != p) {
23437                                         rc = 1;
23438                                         break;
23439                                 }
23440                         }
23441                 } else {
23442                         rc = 1;
23443                 }
23444         } else {
23445                 rc = 1;
23446         }
23447         ${cf_cv_main_return:-return} (rc);
23448 }
23449
23450 _ACEOF
23451 rm -f "conftest$ac_exeext"
23452 if { (eval echo "$as_me:23452: \"$ac_link\"") >&5
23453   (eval $ac_link) 2>&5
23454   ac_status=$?
23455   echo "$as_me:23455: \$? = $ac_status" >&5
23456   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23457   { (eval echo "$as_me:23457: \"$ac_try\"") >&5
23458   (eval $ac_try) 2>&5
23459   ac_status=$?
23460   echo "$as_me:23460: \$? = $ac_status" >&5
23461   (exit "$ac_status"); }; }; then
23462   cf_cv_fopen_bin_r=yes
23463 else
23464   echo "$as_me: program exited with status $ac_status" >&5
23465 echo "$as_me: failed program was:" >&5
23466 cat "conftest.$ac_ext" >&5
23467 cf_cv_fopen_bin_r=no
23468 fi
23469 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23470 fi
23471
23472 fi
23473 echo "$as_me:23473: result: $cf_cv_fopen_bin_r" >&5
23474 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23475 test "x$cf_cv_fopen_bin_r" != xno &&
23476 cat >>confdefs.h <<\EOF
23477 #define USE_FOPEN_BIN_R 1
23478 EOF
23479
23480 # special check for test/ditto.c
23481
23482 echo "$as_me:23482: checking for openpty in -lutil" >&5
23483 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23484 if test "${ac_cv_lib_util_openpty+set}" = set; then
23485   echo $ECHO_N "(cached) $ECHO_C" >&6
23486 else
23487   ac_check_lib_save_LIBS=$LIBS
23488 LIBS="-lutil  $LIBS"
23489 cat >"conftest.$ac_ext" <<_ACEOF
23490 #line 23490 "configure"
23491 #include "confdefs.h"
23492
23493 /* Override any gcc2 internal prototype to avoid an error.  */
23494 #ifdef __cplusplus
23495 extern "C"
23496 #endif
23497 /* We use char because int might match the return type of a gcc2
23498    builtin and then its argument prototype would still apply.  */
23499 char openpty ();
23500 int
23501 main (void)
23502 {
23503 openpty ();
23504   ;
23505   return 0;
23506 }
23507 _ACEOF
23508 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23509 if { (eval echo "$as_me:23509: \"$ac_link\"") >&5
23510   (eval $ac_link) 2>&5
23511   ac_status=$?
23512   echo "$as_me:23512: \$? = $ac_status" >&5
23513   (exit "$ac_status"); } &&
23514          { ac_try='test -s "conftest$ac_exeext"'
23515   { (eval echo "$as_me:23515: \"$ac_try\"") >&5
23516   (eval $ac_try) 2>&5
23517   ac_status=$?
23518   echo "$as_me:23518: \$? = $ac_status" >&5
23519   (exit "$ac_status"); }; }; then
23520   ac_cv_lib_util_openpty=yes
23521 else
23522   echo "$as_me: failed program was:" >&5
23523 cat "conftest.$ac_ext" >&5
23524 ac_cv_lib_util_openpty=no
23525 fi
23526 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23527 LIBS=$ac_check_lib_save_LIBS
23528 fi
23529 echo "$as_me:23529: result: $ac_cv_lib_util_openpty" >&5
23530 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23531 if test "$ac_cv_lib_util_openpty" = yes; then
23532   cf_cv_lib_util=yes
23533 else
23534   cf_cv_lib_util=no
23535 fi
23536
23537 echo "$as_me:23537: checking for openpty header" >&5
23538 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23539 if test "${cf_cv_func_openpty+set}" = set; then
23540   echo $ECHO_N "(cached) $ECHO_C" >&6
23541 else
23542
23543         cf_save_LIBS="$LIBS"
23544         test "$cf_cv_lib_util" = yes && {
23545 cf_add_libs="$LIBS"
23546 # reverse order
23547 cf_add_0lib=
23548 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23549 # filter duplicates
23550 for cf_add_1lib in $cf_add_0lib; do
23551         for cf_add_2lib in $cf_add_libs; do
23552                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23553                         cf_add_1lib=
23554                         break
23555                 fi
23556         done
23557         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23558 done
23559 LIBS="$cf_add_libs"
23560  }
23561         for cf_header in pty.h libutil.h util.h
23562         do
23563         cat >"conftest.$ac_ext" <<_ACEOF
23564 #line 23564 "configure"
23565 #include "confdefs.h"
23566
23567 #include <$cf_header>
23568
23569 int
23570 main (void)
23571 {
23572
23573         int x = openpty((int *)0, (int *)0, (char *)0,
23574                                    (struct termios *)0, (struct winsize *)0);
23575
23576   ;
23577   return 0;
23578 }
23579 _ACEOF
23580 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23581 if { (eval echo "$as_me:23581: \"$ac_link\"") >&5
23582   (eval $ac_link) 2>&5
23583   ac_status=$?
23584   echo "$as_me:23584: \$? = $ac_status" >&5
23585   (exit "$ac_status"); } &&
23586          { ac_try='test -s "conftest$ac_exeext"'
23587   { (eval echo "$as_me:23587: \"$ac_try\"") >&5
23588   (eval $ac_try) 2>&5
23589   ac_status=$?
23590   echo "$as_me:23590: \$? = $ac_status" >&5
23591   (exit "$ac_status"); }; }; then
23592
23593                 cf_cv_func_openpty=$cf_header
23594                 break
23595
23596 else
23597   echo "$as_me: failed program was:" >&5
23598 cat "conftest.$ac_ext" >&5
23599
23600                 cf_cv_func_openpty=no
23601
23602 fi
23603 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23604         done
23605         LIBS="$cf_save_LIBS"
23606
23607 fi
23608 echo "$as_me:23608: result: $cf_cv_func_openpty" >&5
23609 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23610
23611 if test "$cf_cv_func_openpty" != no ; then
23612
23613 cat >>confdefs.h <<EOF
23614 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23615 EOF
23616
23617 cat >>confdefs.h <<\EOF
23618 #define USE_XTERM_PTY 1
23619 EOF
23620
23621         if test "x$cf_cv_lib_util" = xyes ; then
23622
23623 cf_add_libs="$TEST_LIBS"
23624 # reverse order
23625 cf_add_0lib=
23626 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23627 # filter duplicates
23628 for cf_add_1lib in $cf_add_0lib; do
23629         for cf_add_2lib in $cf_add_libs; do
23630                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23631                         cf_add_1lib=
23632                         break
23633                 fi
23634         done
23635         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23636 done
23637 TEST_LIBS="$cf_add_libs"
23638
23639         fi
23640 fi
23641
23642 if test "$with_hashed_db" != no ; then
23643
23644 cat >>confdefs.h <<\EOF
23645 #define USE_HASHED_DB 1
23646 EOF
23647
23648 case $with_hashed_db in
23649 (yes|*able*)
23650         ;;
23651 (*)
23652         if test -d "$with_hashed_db" ; then
23653
23654 if test -n "$with_hashed_db/include" ; then
23655   for cf_add_incdir in $with_hashed_db/include
23656   do
23657         while test "$cf_add_incdir" != /usr/include
23658         do
23659           if test -d "$cf_add_incdir"
23660           then
23661                 cf_have_incdir=no
23662                 if test -n "$CFLAGS$CPPFLAGS" ; then
23663                   # a loop is needed to ensure we can add subdirs of existing dirs
23664                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23665                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23666                           cf_have_incdir=yes; break
23667                         fi
23668                   done
23669                 fi
23670
23671                 if test "$cf_have_incdir" = no ; then
23672                   if test "$cf_add_incdir" = /usr/local/include ; then
23673                         if test "$GCC" = yes
23674                         then
23675                           cf_save_CPPFLAGS=$CPPFLAGS
23676
23677         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23678         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23679
23680                           cat >"conftest.$ac_ext" <<_ACEOF
23681 #line 23681 "configure"
23682 #include "confdefs.h"
23683 #include <stdio.h>
23684 int
23685 main (void)
23686 {
23687 printf("Hello")
23688   ;
23689   return 0;
23690 }
23691 _ACEOF
23692 rm -f "conftest.$ac_objext"
23693 if { (eval echo "$as_me:23693: \"$ac_compile\"") >&5
23694   (eval $ac_compile) 2>&5
23695   ac_status=$?
23696   echo "$as_me:23696: \$? = $ac_status" >&5
23697   (exit "$ac_status"); } &&
23698          { ac_try='test -s "conftest.$ac_objext"'
23699   { (eval echo "$as_me:23699: \"$ac_try\"") >&5
23700   (eval $ac_try) 2>&5
23701   ac_status=$?
23702   echo "$as_me:23702: \$? = $ac_status" >&5
23703   (exit "$ac_status"); }; }; then
23704   :
23705 else
23706   echo "$as_me: failed program was:" >&5
23707 cat "conftest.$ac_ext" >&5
23708 cf_have_incdir=yes
23709 fi
23710 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23711                           CPPFLAGS=$cf_save_CPPFLAGS
23712                         fi
23713                   fi
23714                 fi
23715
23716                 if test "$cf_have_incdir" = no ; then
23717                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23718
23719 echo "${as_me:-configure}:23719: testing adding $cf_add_incdir to include-path ..." 1>&5
23720
23721                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23722
23723                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23724                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23725                   cf_add_incdir="$cf_top_incdir"
23726                 else
23727                   break
23728                 fi
23729           else
23730                 break
23731           fi
23732         done
23733   done
23734 fi
23735
23736 if test -n "$with_hashed_db/lib" ; then
23737         for cf_add_libdir in $with_hashed_db/lib
23738         do
23739                 if test "$cf_add_libdir" = /usr/lib ; then
23740                         :
23741                 elif test -d "$cf_add_libdir"
23742                 then
23743                         cf_have_libdir=no
23744                         if test -n "$LDFLAGS$LIBS" ; then
23745                                 # a loop is needed to ensure we can add subdirs of existing dirs
23746                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23747                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23748                                                 cf_have_libdir=yes; break
23749                                         fi
23750                                 done
23751                         fi
23752                         if test "$cf_have_libdir" = no ; then
23753                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23754
23755 echo "${as_me:-configure}:23755: testing adding $cf_add_libdir to library-path ..." 1>&5
23756
23757                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23758                         fi
23759                 fi
23760         done
23761 fi
23762
23763         else
23764                 case "$with_hashed_db" in
23765                 (./*|../*|/*)
23766                         { echo "$as_me:23766: WARNING: no such directory $with_hashed_db" >&5
23767 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
23768                         ;;
23769                 (*)
23770
23771 cf_search=
23772
23773 test "x$prefix" != "xNONE" && \
23774 test -d "$prefix" && \
23775  {
23776         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
23777         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
23778         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
23779         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
23780         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
23781         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
23782 }
23783
23784 for cf_subdir_prefix in \
23785         /usr \
23786         /usr/local \
23787         /usr/pkg \
23788         /opt \
23789         /opt/local \
23790         $HOME
23791 do
23792
23793 test "x$cf_subdir_prefix" != "x$prefix" && \
23794 test -d "$cf_subdir_prefix" && \
23795 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23796         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
23797         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
23798         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
23799         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
23800         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
23801         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"
23802 }
23803
23804 done
23805
23806         for cf_item in $cf_search
23807         do
23808                 case "$cf_item" in
23809                 (*/$with_hashed_db)
23810
23811 if test -n "$cf_item" ; then
23812   for cf_add_incdir in $cf_item
23813   do
23814         while test "$cf_add_incdir" != /usr/include
23815         do
23816           if test -d "$cf_add_incdir"
23817           then
23818                 cf_have_incdir=no
23819                 if test -n "$CFLAGS$CPPFLAGS" ; then
23820                   # a loop is needed to ensure we can add subdirs of existing dirs
23821                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23822                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23823                           cf_have_incdir=yes; break
23824                         fi
23825                   done
23826                 fi
23827
23828                 if test "$cf_have_incdir" = no ; then
23829                   if test "$cf_add_incdir" = /usr/local/include ; then
23830                         if test "$GCC" = yes
23831                         then
23832                           cf_save_CPPFLAGS=$CPPFLAGS
23833
23834         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23835         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23836
23837                           cat >"conftest.$ac_ext" <<_ACEOF
23838 #line 23838 "configure"
23839 #include "confdefs.h"
23840 #include <stdio.h>
23841 int
23842 main (void)
23843 {
23844 printf("Hello")
23845   ;
23846   return 0;
23847 }
23848 _ACEOF
23849 rm -f "conftest.$ac_objext"
23850 if { (eval echo "$as_me:23850: \"$ac_compile\"") >&5
23851   (eval $ac_compile) 2>&5
23852   ac_status=$?
23853   echo "$as_me:23853: \$? = $ac_status" >&5
23854   (exit "$ac_status"); } &&
23855          { ac_try='test -s "conftest.$ac_objext"'
23856   { (eval echo "$as_me:23856: \"$ac_try\"") >&5
23857   (eval $ac_try) 2>&5
23858   ac_status=$?
23859   echo "$as_me:23859: \$? = $ac_status" >&5
23860   (exit "$ac_status"); }; }; then
23861   :
23862 else
23863   echo "$as_me: failed program was:" >&5
23864 cat "conftest.$ac_ext" >&5
23865 cf_have_incdir=yes
23866 fi
23867 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23868                           CPPFLAGS=$cf_save_CPPFLAGS
23869                         fi
23870                   fi
23871                 fi
23872
23873                 if test "$cf_have_incdir" = no ; then
23874                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23875
23876 echo "${as_me:-configure}:23876: testing adding $cf_add_incdir to include-path ..." 1>&5
23877
23878                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23879
23880                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23881                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23882                   cf_add_incdir="$cf_top_incdir"
23883                 else
23884                   break
23885                 fi
23886           else
23887                 break
23888           fi
23889         done
23890   done
23891 fi
23892
23893                         ;;
23894                 esac
23895         done
23896
23897 cf_search=
23898
23899 test "x$prefix" != "xNONE" && \
23900 test -d "$prefix" && \
23901  {
23902         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
23903         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
23904         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
23905         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
23906         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
23907         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
23908 }
23909
23910 for cf_subdir_prefix in \
23911         /usr \
23912         /usr/local \
23913         /usr/pkg \
23914         /opt \
23915         /opt/local \
23916         $HOME
23917 do
23918
23919 test "x$cf_subdir_prefix" != "x$prefix" && \
23920 test -d "$cf_subdir_prefix" && \
23921 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23922         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
23923         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
23924         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
23925         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
23926         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
23927         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"
23928 }
23929
23930 done
23931
23932         for cf_item in $cf_search
23933         do
23934                 case "$cf_item" in
23935                 (*/$with_hashed_db)
23936
23937 if test -n "$cf_item" ; then
23938         for cf_add_libdir in $cf_item
23939         do
23940                 if test "$cf_add_libdir" = /usr/lib ; then
23941                         :
23942                 elif test -d "$cf_add_libdir"
23943                 then
23944                         cf_have_libdir=no
23945                         if test -n "$LDFLAGS$LIBS" ; then
23946                                 # a loop is needed to ensure we can add subdirs of existing dirs
23947                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23948                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23949                                                 cf_have_libdir=yes; break
23950                                         fi
23951                                 done
23952                         fi
23953                         if test "$cf_have_libdir" = no ; then
23954                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23955
23956 echo "${as_me:-configure}:23956: testing adding $cf_add_libdir to library-path ..." 1>&5
23957
23958                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23959                         fi
23960                 fi
23961         done
23962 fi
23963
23964                         ;;
23965                 esac
23966         done
23967
23968                         ;;
23969                 esac
23970         fi
23971 esac
23972
23973 echo "$as_me:23973: checking for db.h" >&5
23974 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
23975 if test "${ac_cv_header_db_h+set}" = set; then
23976   echo $ECHO_N "(cached) $ECHO_C" >&6
23977 else
23978   cat >"conftest.$ac_ext" <<_ACEOF
23979 #line 23979 "configure"
23980 #include "confdefs.h"
23981 #include <db.h>
23982 _ACEOF
23983 if { (eval echo "$as_me:23983: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23984   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23985   ac_status=$?
23986   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23987   rm -f conftest.er1
23988   cat conftest.err >&5
23989   echo "$as_me:23989: \$? = $ac_status" >&5
23990   (exit "$ac_status"); } >/dev/null; then
23991   if test -s conftest.err; then
23992     ac_cpp_err=$ac_c_preproc_warn_flag
23993   else
23994     ac_cpp_err=
23995   fi
23996 else
23997   ac_cpp_err=yes
23998 fi
23999 if test -z "$ac_cpp_err"; then
24000   ac_cv_header_db_h=yes
24001 else
24002   echo "$as_me: failed program was:" >&5
24003   cat "conftest.$ac_ext" >&5
24004   ac_cv_header_db_h=no
24005 fi
24006 rm -f conftest.err "conftest.$ac_ext"
24007 fi
24008 echo "$as_me:24008: result: $ac_cv_header_db_h" >&5
24009 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24010 if test "$ac_cv_header_db_h" = yes; then
24011
24012 echo "$as_me:24012: checking for version of db" >&5
24013 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24014 if test "${cf_cv_hashed_db_version+set}" = set; then
24015   echo $ECHO_N "(cached) $ECHO_C" >&6
24016 else
24017
24018 cf_cv_hashed_db_version=unknown
24019
24020 for cf_db_version in 1 2 3 4 5 6
24021 do
24022
24023 echo "${as_me:-configure}:24023: testing checking for db version $cf_db_version ..." 1>&5
24024
24025         cat >"conftest.$ac_ext" <<_ACEOF
24026 #line 24026 "configure"
24027 #include "confdefs.h"
24028
24029 $ac_includes_default
24030 #include <db.h>
24031
24032 #ifdef DB_VERSION_MAJOR
24033         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24034 #if $cf_db_version == DB_VERSION_MAJOR
24035         /* ok */
24036 #else
24037         make an error
24038 #endif
24039 #else
24040 #if $cf_db_version == 1
24041         /* ok: assuming this is DB 1.8.5 */
24042 #else
24043         make an error
24044 #endif
24045 #endif
24046
24047 int
24048 main (void)
24049 {
24050 DBT *foo = 0
24051   ;
24052   return 0;
24053 }
24054 _ACEOF
24055 rm -f "conftest.$ac_objext"
24056 if { (eval echo "$as_me:24056: \"$ac_compile\"") >&5
24057   (eval $ac_compile) 2>&5
24058   ac_status=$?
24059   echo "$as_me:24059: \$? = $ac_status" >&5
24060   (exit "$ac_status"); } &&
24061          { ac_try='test -s "conftest.$ac_objext"'
24062   { (eval echo "$as_me:24062: \"$ac_try\"") >&5
24063   (eval $ac_try) 2>&5
24064   ac_status=$?
24065   echo "$as_me:24065: \$? = $ac_status" >&5
24066   (exit "$ac_status"); }; }; then
24067
24068         cf_cv_hashed_db_version=$cf_db_version
24069         break
24070
24071 else
24072   echo "$as_me: failed program was:" >&5
24073 cat "conftest.$ac_ext" >&5
24074 fi
24075 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24076 done
24077
24078 fi
24079 echo "$as_me:24079: result: $cf_cv_hashed_db_version" >&5
24080 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24081
24082 if test "$cf_cv_hashed_db_version" = unknown ; then
24083         { { echo "$as_me:24083: error: Cannot determine version of db" >&5
24084 echo "$as_me: error: Cannot determine version of db" >&2;}
24085    { (exit 1); exit 1; }; }
24086 else
24087
24088 echo "$as_me:24088: checking for db libraries" >&5
24089 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24090 if test "${cf_cv_hashed_db_libs+set}" = set; then
24091   echo $ECHO_N "(cached) $ECHO_C" >&6
24092 else
24093
24094 cf_cv_hashed_db_libs=unknown
24095 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24096 do
24097         cf_save_libs="$LIBS"
24098         if test -n "$cf_db_libs"; then
24099
24100 cf_add_libs="$LIBS"
24101 # reverse order
24102 cf_add_0lib=
24103 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24104 # filter duplicates
24105 for cf_add_1lib in $cf_add_0lib; do
24106         for cf_add_2lib in $cf_add_libs; do
24107                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24108                         cf_add_1lib=
24109                         break
24110                 fi
24111         done
24112         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24113 done
24114 LIBS="$cf_add_libs"
24115
24116         fi
24117
24118 echo "${as_me:-configure}:24118: testing checking for library $cf_db_libs ..." 1>&5
24119
24120         cat >"conftest.$ac_ext" <<_ACEOF
24121 #line 24121 "configure"
24122 #include "confdefs.h"
24123
24124 $ac_includes_default
24125 #include <db.h>
24126
24127 int
24128 main (void)
24129 {
24130
24131         char *path = "/tmp/foo";
24132 #ifdef DB_VERSION_MAJOR
24133 #if DB_VERSION_MAJOR >= 4
24134         DB *result = 0;
24135         db_create(&result, NULL, 0);
24136         result->open(result,
24137                 NULL,
24138                 path,
24139                 path,
24140                 DB_HASH,
24141                 DB_CREATE,
24142                 0644);
24143 #elif DB_VERSION_MAJOR >= 3
24144         DB *result = 0;
24145         db_create(&result, NULL, 0);
24146         result->open(result,
24147                 path,
24148                 path,
24149                 DB_HASH,
24150                 DB_CREATE,
24151                 0644);
24152 #elif DB_VERSION_MAJOR >= 2
24153         DB *result = 0;
24154         db_open(path,
24155                 DB_HASH,
24156                 DB_CREATE,
24157                 0644,
24158                 (DB_ENV *) 0,
24159                 (DB_INFO *) 0,
24160                 &result);
24161 #endif /* DB_VERSION_MAJOR */
24162 #else
24163         DB *result = dbopen(path,
24164                      2,
24165                      0644,
24166                      DB_HASH,
24167                      0);
24168 #endif
24169         ${cf_cv_main_return:-return}(result != 0)
24170
24171   ;
24172   return 0;
24173 }
24174 _ACEOF
24175 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24176 if { (eval echo "$as_me:24176: \"$ac_link\"") >&5
24177   (eval $ac_link) 2>&5
24178   ac_status=$?
24179   echo "$as_me:24179: \$? = $ac_status" >&5
24180   (exit "$ac_status"); } &&
24181          { ac_try='test -s "conftest$ac_exeext"'
24182   { (eval echo "$as_me:24182: \"$ac_try\"") >&5
24183   (eval $ac_try) 2>&5
24184   ac_status=$?
24185   echo "$as_me:24185: \$? = $ac_status" >&5
24186   (exit "$ac_status"); }; }; then
24187
24188         if test -n "$cf_db_libs" ; then
24189                 cf_cv_hashed_db_libs=$cf_db_libs
24190         else
24191                 cf_cv_hashed_db_libs=default
24192         fi
24193         LIBS="$cf_save_libs"
24194         break
24195
24196 else
24197   echo "$as_me: failed program was:" >&5
24198 cat "conftest.$ac_ext" >&5
24199 fi
24200 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24201         LIBS="$cf_save_libs"
24202 done
24203
24204 fi
24205 echo "$as_me:24205: result: $cf_cv_hashed_db_libs" >&5
24206 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24207
24208         if test "$cf_cv_hashed_db_libs" = unknown ; then
24209                 { { echo "$as_me:24209: error: Cannot determine library for db" >&5
24210 echo "$as_me: error: Cannot determine library for db" >&2;}
24211    { (exit 1); exit 1; }; }
24212         elif test "$cf_cv_hashed_db_libs" != default ; then
24213
24214 cf_add_libs="$LIBS"
24215 # reverse order
24216 cf_add_0lib=
24217 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24218 # filter duplicates
24219 for cf_add_1lib in $cf_add_0lib; do
24220         for cf_add_2lib in $cf_add_libs; do
24221                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24222                         cf_add_1lib=
24223                         break
24224                 fi
24225         done
24226         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24227 done
24228 LIBS="$cf_add_libs"
24229
24230         fi
24231 fi
24232
24233 else
24234
24235         { { echo "$as_me:24235: error: Cannot find db.h" >&5
24236 echo "$as_me: error: Cannot find db.h" >&2;}
24237    { (exit 1); exit 1; }; }
24238
24239 fi
24240
24241 fi
24242
24243 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24244         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24245         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24246 fi
24247
24248 # Just in case, check if the C compiler has a bool type.
24249
24250 echo "$as_me:24250: checking if we should include stdbool.h" >&5
24251 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24252
24253 if test "${cf_cv_header_stdbool_h+set}" = set; then
24254   echo $ECHO_N "(cached) $ECHO_C" >&6
24255 else
24256
24257         cat >"conftest.$ac_ext" <<_ACEOF
24258 #line 24258 "configure"
24259 #include "confdefs.h"
24260
24261 int
24262 main (void)
24263 {
24264 bool foo = false
24265   ;
24266   return 0;
24267 }
24268 _ACEOF
24269 rm -f "conftest.$ac_objext"
24270 if { (eval echo "$as_me:24270: \"$ac_compile\"") >&5
24271   (eval $ac_compile) 2>&5
24272   ac_status=$?
24273   echo "$as_me:24273: \$? = $ac_status" >&5
24274   (exit "$ac_status"); } &&
24275          { ac_try='test -s "conftest.$ac_objext"'
24276   { (eval echo "$as_me:24276: \"$ac_try\"") >&5
24277   (eval $ac_try) 2>&5
24278   ac_status=$?
24279   echo "$as_me:24279: \$? = $ac_status" >&5
24280   (exit "$ac_status"); }; }; then
24281   cf_cv_header_stdbool_h=0
24282 else
24283   echo "$as_me: failed program was:" >&5
24284 cat "conftest.$ac_ext" >&5
24285 cat >"conftest.$ac_ext" <<_ACEOF
24286 #line 24286 "configure"
24287 #include "confdefs.h"
24288
24289 #ifndef __BEOS__
24290 #include <stdbool.h>
24291 #endif
24292
24293 int
24294 main (void)
24295 {
24296 bool foo = false
24297   ;
24298   return 0;
24299 }
24300 _ACEOF
24301 rm -f "conftest.$ac_objext"
24302 if { (eval echo "$as_me:24302: \"$ac_compile\"") >&5
24303   (eval $ac_compile) 2>&5
24304   ac_status=$?
24305   echo "$as_me:24305: \$? = $ac_status" >&5
24306   (exit "$ac_status"); } &&
24307          { ac_try='test -s "conftest.$ac_objext"'
24308   { (eval echo "$as_me:24308: \"$ac_try\"") >&5
24309   (eval $ac_try) 2>&5
24310   ac_status=$?
24311   echo "$as_me:24311: \$? = $ac_status" >&5
24312   (exit "$ac_status"); }; }; then
24313   cf_cv_header_stdbool_h=1
24314 else
24315   echo "$as_me: failed program was:" >&5
24316 cat "conftest.$ac_ext" >&5
24317 cf_cv_header_stdbool_h=0
24318 fi
24319 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24320 fi
24321 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24322 fi
24323
24324 if test "$cf_cv_header_stdbool_h" = 1
24325 then    echo "$as_me:24325: result: yes" >&5
24326 echo "${ECHO_T}yes" >&6
24327 else    echo "$as_me:24327: result: no" >&5
24328 echo "${ECHO_T}no" >&6
24329 fi
24330
24331 echo "$as_me:24331: checking for builtin bool type" >&5
24332 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24333
24334 if test "${cf_cv_cc_bool_type+set}" = set; then
24335   echo $ECHO_N "(cached) $ECHO_C" >&6
24336 else
24337
24338         cat >"conftest.$ac_ext" <<_ACEOF
24339 #line 24339 "configure"
24340 #include "confdefs.h"
24341
24342 #include <stdio.h>
24343 #include <sys/types.h>
24344
24345 int
24346 main (void)
24347 {
24348 bool x = false
24349   ;
24350   return 0;
24351 }
24352 _ACEOF
24353 rm -f "conftest.$ac_objext"
24354 if { (eval echo "$as_me:24354: \"$ac_compile\"") >&5
24355   (eval $ac_compile) 2>&5
24356   ac_status=$?
24357   echo "$as_me:24357: \$? = $ac_status" >&5
24358   (exit "$ac_status"); } &&
24359          { ac_try='test -s "conftest.$ac_objext"'
24360   { (eval echo "$as_me:24360: \"$ac_try\"") >&5
24361   (eval $ac_try) 2>&5
24362   ac_status=$?
24363   echo "$as_me:24363: \$? = $ac_status" >&5
24364   (exit "$ac_status"); }; }; then
24365   cf_cv_cc_bool_type=1
24366 else
24367   echo "$as_me: failed program was:" >&5
24368 cat "conftest.$ac_ext" >&5
24369 cf_cv_cc_bool_type=0
24370 fi
24371 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24372
24373 fi
24374
24375 if test "$cf_cv_cc_bool_type" = 1
24376 then    echo "$as_me:24376: result: yes" >&5
24377 echo "${ECHO_T}yes" >&6
24378 else    echo "$as_me:24378: result: no" >&5
24379 echo "${ECHO_T}no" >&6
24380 fi
24381
24382 # Check for C++ compiler characteristics (and ensure that it's there!)
24383 if test -n "$CXX" ; then
24384         ac_ext=cc
24385 ac_cpp='$CXXCPP $CPPFLAGS'
24386 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24387 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24388 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24389 ac_main_return="return"
24390
24391 if test -n "$GXX" ; then
24392
24393         cf_save="$LIBS"
24394         LIBS="$LIBS $CXXLIBS"
24395         echo "$as_me:24395: checking if we already have C++ library" >&5
24396 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24397         cat >"conftest.$ac_ext" <<_ACEOF
24398 #line 24398 "configure"
24399 #include "confdefs.h"
24400
24401                         #include <iostream>
24402 int
24403 main (void)
24404 {
24405
24406                         std::cout << "Hello World!" << std::endl;
24407   ;
24408   return 0;
24409 }
24410 _ACEOF
24411 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24412 if { (eval echo "$as_me:24412: \"$ac_link\"") >&5
24413   (eval $ac_link) 2>&5
24414   ac_status=$?
24415   echo "$as_me:24415: \$? = $ac_status" >&5
24416   (exit "$ac_status"); } &&
24417          { ac_try='test -s "conftest$ac_exeext"'
24418   { (eval echo "$as_me:24418: \"$ac_try\"") >&5
24419   (eval $ac_try) 2>&5
24420   ac_status=$?
24421   echo "$as_me:24421: \$? = $ac_status" >&5
24422   (exit "$ac_status"); }; }; then
24423   cf_have_libstdcpp=yes
24424 else
24425   echo "$as_me: failed program was:" >&5
24426 cat "conftest.$ac_ext" >&5
24427 cf_have_libstdcpp=no
24428 fi
24429 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24430         echo "$as_me:24430: result: $cf_have_libstdcpp" >&5
24431 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24432         LIBS="$cf_save"
24433
24434         if test "$cf_have_libstdcpp" != yes
24435         then
24436                 case "$cf_cv_system_name" in
24437                 (os2*)
24438                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24439                                 cf_stdcpp_libname=stdcpp
24440                         else
24441                                 cf_stdcpp_libname=stdc++
24442                         fi
24443                         ;;
24444                 (*)
24445                         cf_stdcpp_libname=stdc++
24446                         ;;
24447                 esac
24448
24449                 echo "$as_me:24449: checking for library $cf_stdcpp_libname" >&5
24450 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24451 if test "${cf_cv_libstdcpp+set}" = set; then
24452   echo $ECHO_N "(cached) $ECHO_C" >&6
24453 else
24454
24455                         cf_save="$LIBS"
24456                         LIBS="$LIBS $CXXLIBS"
24457
24458 cf_add_libs="$LIBS"
24459 # reverse order
24460 cf_add_0lib=
24461 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24462 # filter duplicates
24463 for cf_add_1lib in $cf_add_0lib; do
24464         for cf_add_2lib in $cf_add_libs; do
24465                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24466                         cf_add_1lib=
24467                         break
24468                 fi
24469         done
24470         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24471 done
24472 LIBS="$cf_add_libs"
24473
24474                 cat >"conftest.$ac_ext" <<_ACEOF
24475 #line 24475 "configure"
24476 #include "confdefs.h"
24477
24478                                 #include <iostream>
24479 int
24480 main (void)
24481 {
24482
24483                                 std::cout << "Hello World!" << std::endl;
24484   ;
24485   return 0;
24486 }
24487 _ACEOF
24488 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24489 if { (eval echo "$as_me:24489: \"$ac_link\"") >&5
24490   (eval $ac_link) 2>&5
24491   ac_status=$?
24492   echo "$as_me:24492: \$? = $ac_status" >&5
24493   (exit "$ac_status"); } &&
24494          { ac_try='test -s "conftest$ac_exeext"'
24495   { (eval echo "$as_me:24495: \"$ac_try\"") >&5
24496   (eval $ac_try) 2>&5
24497   ac_status=$?
24498   echo "$as_me:24498: \$? = $ac_status" >&5
24499   (exit "$ac_status"); }; }; then
24500   cf_cv_libstdcpp=yes
24501 else
24502   echo "$as_me: failed program was:" >&5
24503 cat "conftest.$ac_ext" >&5
24504 cf_cv_libstdcpp=no
24505 fi
24506 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24507                         LIBS="$cf_save"
24508
24509 fi
24510 echo "$as_me:24510: result: $cf_cv_libstdcpp" >&5
24511 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24512                 test "$cf_cv_libstdcpp" = yes && {
24513 cf_add_libs="$CXXLIBS"
24514 # reverse order
24515 cf_add_0lib=
24516 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24517 # filter duplicates
24518 for cf_add_1lib in $cf_add_0lib; do
24519         for cf_add_2lib in $cf_add_libs; do
24520                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24521                         cf_add_1lib=
24522                         break
24523                 fi
24524         done
24525         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24526 done
24527 CXXLIBS="$cf_add_libs"
24528  }
24529         fi
24530 fi
24531
24532         echo "$as_me:24532: checking whether $CXX understands -c and -o together" >&5
24533 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24534 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24535   echo $ECHO_N "(cached) $ECHO_C" >&6
24536 else
24537
24538 cat > conftest.$ac_ext <<CF_EOF
24539 int main(void)
24540 {
24541         ${cf_cv_main_return:-return}(0);
24542 }
24543 CF_EOF
24544 # We do the test twice because some compilers refuse to overwrite an
24545 # existing .o file with -o, though they will create one.
24546 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24547 if { (eval echo "$as_me:24547: \"$ac_try\"") >&5
24548   (eval $ac_try) 2>&5
24549   ac_status=$?
24550   echo "$as_me:24550: \$? = $ac_status" >&5
24551   (exit "$ac_status"); } &&
24552   test -f conftest2.$ac_objext && { (eval echo "$as_me:24552: \"$ac_try\"") >&5
24553   (eval $ac_try) 2>&5
24554   ac_status=$?
24555   echo "$as_me:24555: \$? = $ac_status" >&5
24556   (exit "$ac_status"); };
24557 then
24558   eval cf_cv_prog_CXX_c_o=yes
24559 else
24560   eval cf_cv_prog_CXX_c_o=no
24561 fi
24562 rm -rf ./conftest*
24563
24564 fi
24565 if test "$cf_cv_prog_CXX_c_o" = yes; then
24566   echo "$as_me:24566: result: yes" >&5
24567 echo "${ECHO_T}yes" >&6
24568 else
24569   echo "$as_me:24569: result: no" >&5
24570 echo "${ECHO_T}no" >&6
24571 fi
24572
24573         case "$GXX_VERSION" in
24574         (1.*|2.[0-6]*|[1-9][0-9].*)
24575                 cf_cxx_library=yes
24576                 ;;
24577         (*-2.7*|2.7*)
24578
24579 cf_cxx_library=unknown
24580 case "$cf_cv_system_name" in
24581 (os2*)
24582         cf_gpp_libname=gpp
24583         ;;
24584 (*)
24585         cf_gpp_libname=g++
24586         ;;
24587 esac
24588 if test "$GXX" = yes; then
24589         echo "$as_me:24589: checking for lib$cf_gpp_libname" >&5
24590 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24591         cf_save="$LIBS"
24592
24593 cf_add_libs="$LIBS"
24594 # reverse order
24595 cf_add_0lib=
24596 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24597 # filter duplicates
24598 for cf_add_1lib in $cf_add_0lib; do
24599         for cf_add_2lib in $cf_add_libs; do
24600                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24601                         cf_add_1lib=
24602                         break
24603                 fi
24604         done
24605         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24606 done
24607 LIBS="$cf_add_libs"
24608
24609         cat >"conftest.$ac_ext" <<_ACEOF
24610 #line 24610 "configure"
24611 #include "confdefs.h"
24612
24613 #include <$cf_gpp_libname/builtin.h>
24614
24615 int
24616 main (void)
24617 {
24618 two_arg_error_handler_t foo2 = lib_error_handler
24619   ;
24620   return 0;
24621 }
24622 _ACEOF
24623 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24624 if { (eval echo "$as_me:24624: \"$ac_link\"") >&5
24625   (eval $ac_link) 2>&5
24626   ac_status=$?
24627   echo "$as_me:24627: \$? = $ac_status" >&5
24628   (exit "$ac_status"); } &&
24629          { ac_try='test -s "conftest$ac_exeext"'
24630   { (eval echo "$as_me:24630: \"$ac_try\"") >&5
24631   (eval $ac_try) 2>&5
24632   ac_status=$?
24633   echo "$as_me:24633: \$? = $ac_status" >&5
24634   (exit "$ac_status"); }; }; then
24635   cf_cxx_library=yes
24636
24637 cf_add_libs="$CXXLIBS"
24638 # reverse order
24639 cf_add_0lib=
24640 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24641 # filter duplicates
24642 for cf_add_1lib in $cf_add_0lib; do
24643         for cf_add_2lib in $cf_add_libs; do
24644                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24645                         cf_add_1lib=
24646                         break
24647                 fi
24648         done
24649         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24650 done
24651 CXXLIBS="$cf_add_libs"
24652
24653          if test "$cf_gpp_libname" = cpp ; then
24654
24655 cat >>confdefs.h <<\EOF
24656 #define HAVE_GPP_BUILTIN_H 1
24657 EOF
24658
24659          else
24660
24661 cat >>confdefs.h <<\EOF
24662 #define HAVE_GXX_BUILTIN_H 1
24663 EOF
24664
24665          fi
24666 else
24667   echo "$as_me: failed program was:" >&5
24668 cat "conftest.$ac_ext" >&5
24669 cat >"conftest.$ac_ext" <<_ACEOF
24670 #line 24670 "configure"
24671 #include "confdefs.h"
24672
24673 #include <builtin.h>
24674
24675 int
24676 main (void)
24677 {
24678 two_arg_error_handler_t foo2 = lib_error_handler
24679   ;
24680   return 0;
24681 }
24682 _ACEOF
24683 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24684 if { (eval echo "$as_me:24684: \"$ac_link\"") >&5
24685   (eval $ac_link) 2>&5
24686   ac_status=$?
24687   echo "$as_me:24687: \$? = $ac_status" >&5
24688   (exit "$ac_status"); } &&
24689          { ac_try='test -s "conftest$ac_exeext"'
24690   { (eval echo "$as_me:24690: \"$ac_try\"") >&5
24691   (eval $ac_try) 2>&5
24692   ac_status=$?
24693   echo "$as_me:24693: \$? = $ac_status" >&5
24694   (exit "$ac_status"); }; }; then
24695   cf_cxx_library=yes
24696
24697 cf_add_libs="$CXXLIBS"
24698 # reverse order
24699 cf_add_0lib=
24700 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24701 # filter duplicates
24702 for cf_add_1lib in $cf_add_0lib; do
24703         for cf_add_2lib in $cf_add_libs; do
24704                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24705                         cf_add_1lib=
24706                         break
24707                 fi
24708         done
24709         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24710 done
24711 CXXLIBS="$cf_add_libs"
24712
24713 cat >>confdefs.h <<\EOF
24714 #define HAVE_BUILTIN_H 1
24715 EOF
24716
24717 else
24718   echo "$as_me: failed program was:" >&5
24719 cat "conftest.$ac_ext" >&5
24720 cf_cxx_library=no
24721 fi
24722 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24723 fi
24724 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24725         LIBS="$cf_save"
24726         echo "$as_me:24726: result: $cf_cxx_library" >&5
24727 echo "${ECHO_T}$cf_cxx_library" >&6
24728 fi
24729
24730                 ;;
24731         (*)
24732                 cf_cxx_library=no
24733                 ;;
24734         esac
24735
24736         ac_ext=cc
24737 ac_cpp='$CXXCPP $CPPFLAGS'
24738 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24739 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24740 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24741 ac_main_return="return"
24742 echo "$as_me:24742: checking how to run the C++ preprocessor" >&5
24743 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
24744 if test -z "$CXXCPP"; then
24745   if test "${ac_cv_prog_CXXCPP+set}" = set; then
24746   echo $ECHO_N "(cached) $ECHO_C" >&6
24747 else
24748       # Double quotes because CXXCPP needs to be expanded
24749     for CXXCPP in "$CXX -E" "/lib/cpp"
24750     do
24751       ac_preproc_ok=false
24752 for ac_cxx_preproc_warn_flag in '' yes
24753 do
24754   # Use a header file that comes with gcc, so configuring glibc
24755   # with a fresh cross-compiler works.
24756   # On the NeXT, cc -E runs the code through the compiler's parser,
24757   # not just through cpp. "Syntax error" is here to catch this case.
24758   cat >"conftest.$ac_ext" <<_ACEOF
24759 #line 24759 "configure"
24760 #include "confdefs.h"
24761 #include <assert.h>
24762                      Syntax error
24763 _ACEOF
24764 if { (eval echo "$as_me:24764: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24765   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24766   ac_status=$?
24767   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24768   rm -f conftest.er1
24769   cat conftest.err >&5
24770   echo "$as_me:24770: \$? = $ac_status" >&5
24771   (exit "$ac_status"); } >/dev/null; then
24772   if test -s conftest.err; then
24773     ac_cpp_err=$ac_cxx_preproc_warn_flag
24774   else
24775     ac_cpp_err=
24776   fi
24777 else
24778   ac_cpp_err=yes
24779 fi
24780 if test -z "$ac_cpp_err"; then
24781   :
24782 else
24783   echo "$as_me: failed program was:" >&5
24784   cat "conftest.$ac_ext" >&5
24785   # Broken: fails on valid input.
24786 continue
24787 fi
24788 rm -f conftest.err "conftest.$ac_ext"
24789
24790   # OK, works on sane cases.  Now check whether non-existent headers
24791   # can be detected and how.
24792   cat >"conftest.$ac_ext" <<_ACEOF
24793 #line 24793 "configure"
24794 #include "confdefs.h"
24795 #include <ac_nonexistent.h>
24796 _ACEOF
24797 if { (eval echo "$as_me:24797: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24798   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24799   ac_status=$?
24800   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24801   rm -f conftest.er1
24802   cat conftest.err >&5
24803   echo "$as_me:24803: \$? = $ac_status" >&5
24804   (exit "$ac_status"); } >/dev/null; then
24805   if test -s conftest.err; then
24806     ac_cpp_err=$ac_cxx_preproc_warn_flag
24807   else
24808     ac_cpp_err=
24809   fi
24810 else
24811   ac_cpp_err=yes
24812 fi
24813 if test -z "$ac_cpp_err"; then
24814   # Broken: success on invalid input.
24815 continue
24816 else
24817   echo "$as_me: failed program was:" >&5
24818   cat "conftest.$ac_ext" >&5
24819   # Passes both tests.
24820 ac_preproc_ok=:
24821 break
24822 fi
24823 rm -f conftest.err "conftest.$ac_ext"
24824
24825 done
24826 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24827 rm -f conftest.err "conftest.$ac_ext"
24828 if $ac_preproc_ok; then
24829   break
24830 fi
24831
24832     done
24833     ac_cv_prog_CXXCPP=$CXXCPP
24834
24835 fi
24836   CXXCPP=$ac_cv_prog_CXXCPP
24837 else
24838   ac_cv_prog_CXXCPP=$CXXCPP
24839 fi
24840 echo "$as_me:24840: result: $CXXCPP" >&5
24841 echo "${ECHO_T}$CXXCPP" >&6
24842 ac_preproc_ok=false
24843 for ac_cxx_preproc_warn_flag in '' yes
24844 do
24845   # Use a header file that comes with gcc, so configuring glibc
24846   # with a fresh cross-compiler works.
24847   # On the NeXT, cc -E runs the code through the compiler's parser,
24848   # not just through cpp. "Syntax error" is here to catch this case.
24849   cat >"conftest.$ac_ext" <<_ACEOF
24850 #line 24850 "configure"
24851 #include "confdefs.h"
24852 #include <assert.h>
24853                      Syntax error
24854 _ACEOF
24855 if { (eval echo "$as_me:24855: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24856   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24857   ac_status=$?
24858   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24859   rm -f conftest.er1
24860   cat conftest.err >&5
24861   echo "$as_me:24861: \$? = $ac_status" >&5
24862   (exit "$ac_status"); } >/dev/null; then
24863   if test -s conftest.err; then
24864     ac_cpp_err=$ac_cxx_preproc_warn_flag
24865   else
24866     ac_cpp_err=
24867   fi
24868 else
24869   ac_cpp_err=yes
24870 fi
24871 if test -z "$ac_cpp_err"; then
24872   :
24873 else
24874   echo "$as_me: failed program was:" >&5
24875   cat "conftest.$ac_ext" >&5
24876   # Broken: fails on valid input.
24877 continue
24878 fi
24879 rm -f conftest.err "conftest.$ac_ext"
24880
24881   # OK, works on sane cases.  Now check whether non-existent headers
24882   # can be detected and how.
24883   cat >"conftest.$ac_ext" <<_ACEOF
24884 #line 24884 "configure"
24885 #include "confdefs.h"
24886 #include <ac_nonexistent.h>
24887 _ACEOF
24888 if { (eval echo "$as_me:24888: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24889   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24890   ac_status=$?
24891   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24892   rm -f conftest.er1
24893   cat conftest.err >&5
24894   echo "$as_me:24894: \$? = $ac_status" >&5
24895   (exit "$ac_status"); } >/dev/null; then
24896   if test -s conftest.err; then
24897     ac_cpp_err=$ac_cxx_preproc_warn_flag
24898   else
24899     ac_cpp_err=
24900   fi
24901 else
24902   ac_cpp_err=yes
24903 fi
24904 if test -z "$ac_cpp_err"; then
24905   # Broken: success on invalid input.
24906 continue
24907 else
24908   echo "$as_me: failed program was:" >&5
24909   cat "conftest.$ac_ext" >&5
24910   # Passes both tests.
24911 ac_preproc_ok=:
24912 break
24913 fi
24914 rm -f conftest.err "conftest.$ac_ext"
24915
24916 done
24917 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24918 rm -f conftest.err "conftest.$ac_ext"
24919 if $ac_preproc_ok; then
24920   :
24921 else
24922   { { echo "$as_me:24922: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
24923 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
24924    { (exit 1); exit 1; }; }
24925 fi
24926
24927 ac_ext=cc
24928 ac_cpp='$CXXCPP $CPPFLAGS'
24929 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24930 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24931 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24932 ac_main_return="return"
24933
24934 for ac_header in typeinfo
24935 do
24936 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24937 echo "$as_me:24937: checking for $ac_header" >&5
24938 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24939 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24940   echo $ECHO_N "(cached) $ECHO_C" >&6
24941 else
24942   cat >"conftest.$ac_ext" <<_ACEOF
24943 #line 24943 "configure"
24944 #include "confdefs.h"
24945 #include <$ac_header>
24946 _ACEOF
24947 if { (eval echo "$as_me:24947: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24948   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24949   ac_status=$?
24950   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24951   rm -f conftest.er1
24952   cat conftest.err >&5
24953   echo "$as_me:24953: \$? = $ac_status" >&5
24954   (exit "$ac_status"); } >/dev/null; then
24955   if test -s conftest.err; then
24956     ac_cpp_err=$ac_cxx_preproc_warn_flag
24957   else
24958     ac_cpp_err=
24959   fi
24960 else
24961   ac_cpp_err=yes
24962 fi
24963 if test -z "$ac_cpp_err"; then
24964   eval "$as_ac_Header=yes"
24965 else
24966   echo "$as_me: failed program was:" >&5
24967   cat "conftest.$ac_ext" >&5
24968   eval "$as_ac_Header=no"
24969 fi
24970 rm -f conftest.err "conftest.$ac_ext"
24971 fi
24972 echo "$as_me:24972: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24973 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24974 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24975   cat >>confdefs.h <<EOF
24976 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24977 EOF
24978
24979 fi
24980 done
24981
24982 for ac_header in iostream
24983 do
24984 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24985 echo "$as_me:24985: checking for $ac_header" >&5
24986 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24987 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24988   echo $ECHO_N "(cached) $ECHO_C" >&6
24989 else
24990   cat >"conftest.$ac_ext" <<_ACEOF
24991 #line 24991 "configure"
24992 #include "confdefs.h"
24993 #include <$ac_header>
24994 _ACEOF
24995 if { (eval echo "$as_me:24995: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24996   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24997   ac_status=$?
24998   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24999   rm -f conftest.er1
25000   cat conftest.err >&5
25001   echo "$as_me:25001: \$? = $ac_status" >&5
25002   (exit "$ac_status"); } >/dev/null; then
25003   if test -s conftest.err; then
25004     ac_cpp_err=$ac_cxx_preproc_warn_flag
25005   else
25006     ac_cpp_err=
25007   fi
25008 else
25009   ac_cpp_err=yes
25010 fi
25011 if test -z "$ac_cpp_err"; then
25012   eval "$as_ac_Header=yes"
25013 else
25014   echo "$as_me: failed program was:" >&5
25015   cat "conftest.$ac_ext" >&5
25016   eval "$as_ac_Header=no"
25017 fi
25018 rm -f conftest.err "conftest.$ac_ext"
25019 fi
25020 echo "$as_me:25020: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25021 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25022 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25023   cat >>confdefs.h <<EOF
25024 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25025 EOF
25026
25027 fi
25028 done
25029
25030 if test x"$ac_cv_header_iostream" = xyes ; then
25031         echo "$as_me:25031: checking if iostream uses std-namespace" >&5
25032 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25033         cat >"conftest.$ac_ext" <<_ACEOF
25034 #line 25034 "configure"
25035 #include "confdefs.h"
25036
25037 #include <iostream>
25038 using std::endl;
25039 using std::cerr;
25040 int
25041 main (void)
25042 {
25043
25044 cerr << "testing" << endl;
25045
25046   ;
25047   return 0;
25048 }
25049 _ACEOF
25050 rm -f "conftest.$ac_objext"
25051 if { (eval echo "$as_me:25051: \"$ac_compile\"") >&5
25052   (eval $ac_compile) 2>&5
25053   ac_status=$?
25054   echo "$as_me:25054: \$? = $ac_status" >&5
25055   (exit "$ac_status"); } &&
25056          { ac_try='test -s "conftest.$ac_objext"'
25057   { (eval echo "$as_me:25057: \"$ac_try\"") >&5
25058   (eval $ac_try) 2>&5
25059   ac_status=$?
25060   echo "$as_me:25060: \$? = $ac_status" >&5
25061   (exit "$ac_status"); }; }; then
25062   cf_iostream_namespace=yes
25063 else
25064   echo "$as_me: failed program was:" >&5
25065 cat "conftest.$ac_ext" >&5
25066 cf_iostream_namespace=no
25067 fi
25068 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25069         echo "$as_me:25069: result: $cf_iostream_namespace" >&5
25070 echo "${ECHO_T}$cf_iostream_namespace" >&6
25071         if test "$cf_iostream_namespace" = yes ; then
25072
25073 cat >>confdefs.h <<\EOF
25074 #define IOSTREAM_NAMESPACE 1
25075 EOF
25076
25077         fi
25078 fi
25079
25080 echo "$as_me:25080: checking if we should include stdbool.h" >&5
25081 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25082
25083 if test "${cf_cv_header_stdbool_h+set}" = set; then
25084   echo $ECHO_N "(cached) $ECHO_C" >&6
25085 else
25086
25087         cat >"conftest.$ac_ext" <<_ACEOF
25088 #line 25088 "configure"
25089 #include "confdefs.h"
25090
25091 int
25092 main (void)
25093 {
25094 bool foo = false
25095   ;
25096   return 0;
25097 }
25098 _ACEOF
25099 rm -f "conftest.$ac_objext"
25100 if { (eval echo "$as_me:25100: \"$ac_compile\"") >&5
25101   (eval $ac_compile) 2>&5
25102   ac_status=$?
25103   echo "$as_me:25103: \$? = $ac_status" >&5
25104   (exit "$ac_status"); } &&
25105          { ac_try='test -s "conftest.$ac_objext"'
25106   { (eval echo "$as_me:25106: \"$ac_try\"") >&5
25107   (eval $ac_try) 2>&5
25108   ac_status=$?
25109   echo "$as_me:25109: \$? = $ac_status" >&5
25110   (exit "$ac_status"); }; }; then
25111   cf_cv_header_stdbool_h=0
25112 else
25113   echo "$as_me: failed program was:" >&5
25114 cat "conftest.$ac_ext" >&5
25115 cat >"conftest.$ac_ext" <<_ACEOF
25116 #line 25116 "configure"
25117 #include "confdefs.h"
25118
25119 #ifndef __BEOS__
25120 #include <stdbool.h>
25121 #endif
25122
25123 int
25124 main (void)
25125 {
25126 bool foo = false
25127   ;
25128   return 0;
25129 }
25130 _ACEOF
25131 rm -f "conftest.$ac_objext"
25132 if { (eval echo "$as_me:25132: \"$ac_compile\"") >&5
25133   (eval $ac_compile) 2>&5
25134   ac_status=$?
25135   echo "$as_me:25135: \$? = $ac_status" >&5
25136   (exit "$ac_status"); } &&
25137          { ac_try='test -s "conftest.$ac_objext"'
25138   { (eval echo "$as_me:25138: \"$ac_try\"") >&5
25139   (eval $ac_try) 2>&5
25140   ac_status=$?
25141   echo "$as_me:25141: \$? = $ac_status" >&5
25142   (exit "$ac_status"); }; }; then
25143   cf_cv_header_stdbool_h=1
25144 else
25145   echo "$as_me: failed program was:" >&5
25146 cat "conftest.$ac_ext" >&5
25147 cf_cv_header_stdbool_h=0
25148 fi
25149 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25150 fi
25151 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25152 fi
25153
25154 if test "$cf_cv_header_stdbool_h" = 1
25155 then    echo "$as_me:25155: result: yes" >&5
25156 echo "${ECHO_T}yes" >&6
25157 else    echo "$as_me:25157: result: no" >&5
25158 echo "${ECHO_T}no" >&6
25159 fi
25160
25161 echo "$as_me:25161: checking for builtin bool type" >&5
25162 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25163
25164 if test "${cf_cv_builtin_bool+set}" = set; then
25165   echo $ECHO_N "(cached) $ECHO_C" >&6
25166 else
25167
25168         cat >"conftest.$ac_ext" <<_ACEOF
25169 #line 25169 "configure"
25170 #include "confdefs.h"
25171
25172 #include <stdio.h>
25173 #include <sys/types.h>
25174
25175 int
25176 main (void)
25177 {
25178 bool x = false
25179   ;
25180   return 0;
25181 }
25182 _ACEOF
25183 rm -f "conftest.$ac_objext"
25184 if { (eval echo "$as_me:25184: \"$ac_compile\"") >&5
25185   (eval $ac_compile) 2>&5
25186   ac_status=$?
25187   echo "$as_me:25187: \$? = $ac_status" >&5
25188   (exit "$ac_status"); } &&
25189          { ac_try='test -s "conftest.$ac_objext"'
25190   { (eval echo "$as_me:25190: \"$ac_try\"") >&5
25191   (eval $ac_try) 2>&5
25192   ac_status=$?
25193   echo "$as_me:25193: \$? = $ac_status" >&5
25194   (exit "$ac_status"); }; }; then
25195   cf_cv_builtin_bool=1
25196 else
25197   echo "$as_me: failed program was:" >&5
25198 cat "conftest.$ac_ext" >&5
25199 cf_cv_builtin_bool=0
25200 fi
25201 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25202
25203 fi
25204
25205 if test "$cf_cv_builtin_bool" = 1
25206 then    echo "$as_me:25206: result: yes" >&5
25207 echo "${ECHO_T}yes" >&6
25208 else    echo "$as_me:25208: result: no" >&5
25209 echo "${ECHO_T}no" >&6
25210 fi
25211
25212 echo "$as_me:25212: checking for bool" >&5
25213 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25214 if test "${ac_cv_type_bool+set}" = set; then
25215   echo $ECHO_N "(cached) $ECHO_C" >&6
25216 else
25217   cat >"conftest.$ac_ext" <<_ACEOF
25218 #line 25218 "configure"
25219 #include "confdefs.h"
25220
25221 #include <stdlib.h>
25222 #include <stdio.h>
25223
25224 #if defined(__cplusplus)
25225
25226 #ifdef HAVE_GXX_BUILTIN_H
25227 #include <g++/builtin.h>
25228 #elif HAVE_GPP_BUILTIN_H
25229 #include <gpp/builtin.h>
25230 #elif HAVE_BUILTIN_H
25231 #include <builtin.h>
25232 #endif
25233
25234 #else
25235
25236 #if $cf_cv_header_stdbool_h
25237 #include <stdbool.h>
25238 #endif
25239
25240 #endif
25241
25242 int
25243 main (void)
25244 {
25245 if ((bool *) 0)
25246   return 0;
25247 if (sizeof (bool))
25248   return 0;
25249   ;
25250   return 0;
25251 }
25252 _ACEOF
25253 rm -f "conftest.$ac_objext"
25254 if { (eval echo "$as_me:25254: \"$ac_compile\"") >&5
25255   (eval $ac_compile) 2>&5
25256   ac_status=$?
25257   echo "$as_me:25257: \$? = $ac_status" >&5
25258   (exit "$ac_status"); } &&
25259          { ac_try='test -s "conftest.$ac_objext"'
25260   { (eval echo "$as_me:25260: \"$ac_try\"") >&5
25261   (eval $ac_try) 2>&5
25262   ac_status=$?
25263   echo "$as_me:25263: \$? = $ac_status" >&5
25264   (exit "$ac_status"); }; }; then
25265   ac_cv_type_bool=yes
25266 else
25267   echo "$as_me: failed program was:" >&5
25268 cat "conftest.$ac_ext" >&5
25269 ac_cv_type_bool=no
25270 fi
25271 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25272 fi
25273 echo "$as_me:25273: result: $ac_cv_type_bool" >&5
25274 echo "${ECHO_T}$ac_cv_type_bool" >&6
25275
25276 echo "$as_me:25276: checking size of bool" >&5
25277 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25278 if test "${ac_cv_sizeof_bool+set}" = set; then
25279   echo $ECHO_N "(cached) $ECHO_C" >&6
25280 else
25281   if test "$ac_cv_type_bool" = yes; then
25282   if test "$cross_compiling" = yes; then
25283   # Depending upon the size, compute the lo and hi bounds.
25284 cat >"conftest.$ac_ext" <<_ACEOF
25285 #line 25285 "configure"
25286 #include "confdefs.h"
25287
25288 #include <stdlib.h>
25289 #include <stdio.h>
25290
25291 #if defined(__cplusplus)
25292
25293 #ifdef HAVE_GXX_BUILTIN_H
25294 #include <g++/builtin.h>
25295 #elif HAVE_GPP_BUILTIN_H
25296 #include <gpp/builtin.h>
25297 #elif HAVE_BUILTIN_H
25298 #include <builtin.h>
25299 #endif
25300
25301 #else
25302
25303 #if $cf_cv_header_stdbool_h
25304 #include <stdbool.h>
25305 #endif
25306
25307 #endif
25308
25309 int
25310 main (void)
25311 {
25312 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25313   ;
25314   return 0;
25315 }
25316 _ACEOF
25317 rm -f "conftest.$ac_objext"
25318 if { (eval echo "$as_me:25318: \"$ac_compile\"") >&5
25319   (eval $ac_compile) 2>&5
25320   ac_status=$?
25321   echo "$as_me:25321: \$? = $ac_status" >&5
25322   (exit "$ac_status"); } &&
25323          { ac_try='test -s "conftest.$ac_objext"'
25324   { (eval echo "$as_me:25324: \"$ac_try\"") >&5
25325   (eval $ac_try) 2>&5
25326   ac_status=$?
25327   echo "$as_me:25327: \$? = $ac_status" >&5
25328   (exit "$ac_status"); }; }; then
25329   ac_lo=0 ac_mid=0
25330   while :; do
25331     cat >"conftest.$ac_ext" <<_ACEOF
25332 #line 25332 "configure"
25333 #include "confdefs.h"
25334
25335 #include <stdlib.h>
25336 #include <stdio.h>
25337
25338 #if defined(__cplusplus)
25339
25340 #ifdef HAVE_GXX_BUILTIN_H
25341 #include <g++/builtin.h>
25342 #elif HAVE_GPP_BUILTIN_H
25343 #include <gpp/builtin.h>
25344 #elif HAVE_BUILTIN_H
25345 #include <builtin.h>
25346 #endif
25347
25348 #else
25349
25350 #if $cf_cv_header_stdbool_h
25351 #include <stdbool.h>
25352 #endif
25353
25354 #endif
25355
25356 int
25357 main (void)
25358 {
25359 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25360   ;
25361   return 0;
25362 }
25363 _ACEOF
25364 rm -f "conftest.$ac_objext"
25365 if { (eval echo "$as_me:25365: \"$ac_compile\"") >&5
25366   (eval $ac_compile) 2>&5
25367   ac_status=$?
25368   echo "$as_me:25368: \$? = $ac_status" >&5
25369   (exit "$ac_status"); } &&
25370          { ac_try='test -s "conftest.$ac_objext"'
25371   { (eval echo "$as_me:25371: \"$ac_try\"") >&5
25372   (eval $ac_try) 2>&5
25373   ac_status=$?
25374   echo "$as_me:25374: \$? = $ac_status" >&5
25375   (exit "$ac_status"); }; }; then
25376   ac_hi=$ac_mid; break
25377 else
25378   echo "$as_me: failed program was:" >&5
25379 cat "conftest.$ac_ext" >&5
25380 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25381 fi
25382 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25383   done
25384 else
25385   echo "$as_me: failed program was:" >&5
25386 cat "conftest.$ac_ext" >&5
25387 ac_hi=-1 ac_mid=-1
25388   while :; do
25389     cat >"conftest.$ac_ext" <<_ACEOF
25390 #line 25390 "configure"
25391 #include "confdefs.h"
25392
25393 #include <stdlib.h>
25394 #include <stdio.h>
25395
25396 #if defined(__cplusplus)
25397
25398 #ifdef HAVE_GXX_BUILTIN_H
25399 #include <g++/builtin.h>
25400 #elif HAVE_GPP_BUILTIN_H
25401 #include <gpp/builtin.h>
25402 #elif HAVE_BUILTIN_H
25403 #include <builtin.h>
25404 #endif
25405
25406 #else
25407
25408 #if $cf_cv_header_stdbool_h
25409 #include <stdbool.h>
25410 #endif
25411
25412 #endif
25413
25414 int
25415 main (void)
25416 {
25417 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25418   ;
25419   return 0;
25420 }
25421 _ACEOF
25422 rm -f "conftest.$ac_objext"
25423 if { (eval echo "$as_me:25423: \"$ac_compile\"") >&5
25424   (eval $ac_compile) 2>&5
25425   ac_status=$?
25426   echo "$as_me:25426: \$? = $ac_status" >&5
25427   (exit "$ac_status"); } &&
25428          { ac_try='test -s "conftest.$ac_objext"'
25429   { (eval echo "$as_me:25429: \"$ac_try\"") >&5
25430   (eval $ac_try) 2>&5
25431   ac_status=$?
25432   echo "$as_me:25432: \$? = $ac_status" >&5
25433   (exit "$ac_status"); }; }; then
25434   ac_lo=$ac_mid; break
25435 else
25436   echo "$as_me: failed program was:" >&5
25437 cat "conftest.$ac_ext" >&5
25438 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25439 fi
25440 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25441   done
25442 fi
25443 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25444 # Binary search between lo and hi bounds.
25445 while test "x$ac_lo" != "x$ac_hi"; do
25446   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25447   cat >"conftest.$ac_ext" <<_ACEOF
25448 #line 25448 "configure"
25449 #include "confdefs.h"
25450
25451 #include <stdlib.h>
25452 #include <stdio.h>
25453
25454 #if defined(__cplusplus)
25455
25456 #ifdef HAVE_GXX_BUILTIN_H
25457 #include <g++/builtin.h>
25458 #elif HAVE_GPP_BUILTIN_H
25459 #include <gpp/builtin.h>
25460 #elif HAVE_BUILTIN_H
25461 #include <builtin.h>
25462 #endif
25463
25464 #else
25465
25466 #if $cf_cv_header_stdbool_h
25467 #include <stdbool.h>
25468 #endif
25469
25470 #endif
25471
25472 int
25473 main (void)
25474 {
25475 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25476   ;
25477   return 0;
25478 }
25479 _ACEOF
25480 rm -f "conftest.$ac_objext"
25481 if { (eval echo "$as_me:25481: \"$ac_compile\"") >&5
25482   (eval $ac_compile) 2>&5
25483   ac_status=$?
25484   echo "$as_me:25484: \$? = $ac_status" >&5
25485   (exit "$ac_status"); } &&
25486          { ac_try='test -s "conftest.$ac_objext"'
25487   { (eval echo "$as_me:25487: \"$ac_try\"") >&5
25488   (eval $ac_try) 2>&5
25489   ac_status=$?
25490   echo "$as_me:25490: \$? = $ac_status" >&5
25491   (exit "$ac_status"); }; }; then
25492   ac_hi=$ac_mid
25493 else
25494   echo "$as_me: failed program was:" >&5
25495 cat "conftest.$ac_ext" >&5
25496 ac_lo=`expr "$ac_mid" + 1`
25497 fi
25498 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25499 done
25500 ac_cv_sizeof_bool=$ac_lo
25501 else
25502   if test "$cross_compiling" = yes; then
25503   { { echo "$as_me:25503: error: cannot run test program while cross compiling" >&5
25504 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25505    { (exit 1); exit 1; }; }
25506 else
25507   cat >"conftest.$ac_ext" <<_ACEOF
25508 #line 25508 "configure"
25509 #include "confdefs.h"
25510
25511 #include <stdlib.h>
25512 #include <stdio.h>
25513
25514 #if defined(__cplusplus)
25515
25516 #ifdef HAVE_GXX_BUILTIN_H
25517 #include <g++/builtin.h>
25518 #elif HAVE_GPP_BUILTIN_H
25519 #include <gpp/builtin.h>
25520 #elif HAVE_BUILTIN_H
25521 #include <builtin.h>
25522 #endif
25523
25524 #else
25525
25526 #if $cf_cv_header_stdbool_h
25527 #include <stdbool.h>
25528 #endif
25529
25530 #endif
25531
25532 int
25533 main (void)
25534 {
25535 FILE *f = fopen ("conftest.val", "w");
25536 if (!f)
25537   $ac_main_return (1);
25538 fprintf (f, "%ld", (long)(sizeof (bool)));
25539 fclose (f);
25540   ;
25541   return 0;
25542 }
25543 _ACEOF
25544 rm -f "conftest$ac_exeext"
25545 if { (eval echo "$as_me:25545: \"$ac_link\"") >&5
25546   (eval $ac_link) 2>&5
25547   ac_status=$?
25548   echo "$as_me:25548: \$? = $ac_status" >&5
25549   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25550   { (eval echo "$as_me:25550: \"$ac_try\"") >&5
25551   (eval $ac_try) 2>&5
25552   ac_status=$?
25553   echo "$as_me:25553: \$? = $ac_status" >&5
25554   (exit "$ac_status"); }; }; then
25555   ac_cv_sizeof_bool=`cat conftest.val`
25556 else
25557   echo "$as_me: program exited with status $ac_status" >&5
25558 echo "$as_me: failed program was:" >&5
25559 cat "conftest.$ac_ext" >&5
25560 fi
25561 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25562 fi
25563 fi
25564 rm -f conftest.val
25565 else
25566   ac_cv_sizeof_bool=0
25567 fi
25568 fi
25569 echo "$as_me:25569: result: $ac_cv_sizeof_bool" >&5
25570 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25571 cat >>confdefs.h <<EOF
25572 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25573 EOF
25574
25575 echo "$as_me:25575: checking for type of bool" >&5
25576 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25577 if test "${cf_cv_type_of_bool+set}" = set; then
25578   echo $ECHO_N "(cached) $ECHO_C" >&6
25579 else
25580
25581         rm -f cf_test.out
25582         if test "$cross_compiling" = yes; then
25583
25584                 case x$ac_cv_sizeof_bool in
25585                 (x1) cf_cv_type_of_bool="unsigned char";;
25586                 (x2) cf_cv_type_of_bool="unsigned short";;
25587                 (x4) cf_cv_type_of_bool="unsigned int";;
25588                 (x8) cf_cv_type_of_bool="unsigned long";;
25589                 (*)  cf_cv_type_of_bool=unknown;;
25590                 esac
25591
25592 else
25593   cat >"conftest.$ac_ext" <<_ACEOF
25594 #line 25594 "configure"
25595 #include "confdefs.h"
25596
25597 #include <stdlib.h>
25598 #include <stdio.h>
25599
25600 #if defined(__cplusplus)
25601
25602 #ifdef HAVE_GXX_BUILTIN_H
25603 #include <g++/builtin.h>
25604 #elif HAVE_GPP_BUILTIN_H
25605 #include <gpp/builtin.h>
25606 #elif HAVE_BUILTIN_H
25607 #include <builtin.h>
25608 #endif
25609
25610 #else
25611
25612 #if $cf_cv_header_stdbool_h
25613 #include <stdbool.h>
25614 #endif
25615
25616 #endif
25617
25618 int main(void)
25619 {
25620         FILE *fp = fopen("cf_test.out", "w");
25621         if (fp != 0) {
25622                 bool x = true;
25623                 if ((bool)(-x) >= 0)
25624                         fputs("unsigned ", fp);
25625                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25626                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25627                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25628                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25629                 fclose(fp);
25630         }
25631         ${cf_cv_main_return:-return}(0);
25632 }
25633
25634 _ACEOF
25635 rm -f "conftest$ac_exeext"
25636 if { (eval echo "$as_me:25636: \"$ac_link\"") >&5
25637   (eval $ac_link) 2>&5
25638   ac_status=$?
25639   echo "$as_me:25639: \$? = $ac_status" >&5
25640   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25641   { (eval echo "$as_me:25641: \"$ac_try\"") >&5
25642   (eval $ac_try) 2>&5
25643   ac_status=$?
25644   echo "$as_me:25644: \$? = $ac_status" >&5
25645   (exit "$ac_status"); }; }; then
25646   cf_cv_type_of_bool=`cat cf_test.out`
25647                  if test -z "$cf_cv_type_of_bool"; then
25648                    cf_cv_type_of_bool=unknown
25649                  fi
25650 else
25651   echo "$as_me: program exited with status $ac_status" >&5
25652 echo "$as_me: failed program was:" >&5
25653 cat "conftest.$ac_ext" >&5
25654 cf_cv_type_of_bool=unknown
25655 fi
25656 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25657 fi
25658         rm -f cf_test.out
25659
25660 fi
25661 echo "$as_me:25661: result: $cf_cv_type_of_bool" >&5
25662 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25663
25664 if test "$cf_cv_type_of_bool" = unknown ; then
25665         case .$NCURSES_BOOL in
25666         (.auto|.) NCURSES_BOOL=unsigned;;
25667         esac
25668         { echo "$as_me:25668: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25669 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25670         cf_cv_type_of_bool=$NCURSES_BOOL
25671 fi
25672
25673 echo "$as_me:25673: checking for special defines needed for etip.h" >&5
25674 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25675 cf_save_CXXFLAGS="$CXXFLAGS"
25676 cf_result="none"
25677
25678 # etip.h includes ncurses.h which includes ncurses_dll.h
25679 # But ncurses_dll.h is generated - fix here.
25680 test -d include || mkdir include
25681 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
25682
25683 for cf_math in "" MATH_H
25684 do
25685 for cf_excp in "" MATH_EXCEPTION
25686 do
25687         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25688         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25689         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25690 cat >"conftest.$ac_ext" <<_ACEOF
25691 #line 25691 "configure"
25692 #include "confdefs.h"
25693
25694 #include <etip.h.in>
25695
25696 int
25697 main (void)
25698 {
25699
25700   ;
25701   return 0;
25702 }
25703 _ACEOF
25704 rm -f "conftest.$ac_objext"
25705 if { (eval echo "$as_me:25705: \"$ac_compile\"") >&5
25706   (eval $ac_compile) 2>&5
25707   ac_status=$?
25708   echo "$as_me:25708: \$? = $ac_status" >&5
25709   (exit "$ac_status"); } &&
25710          { ac_try='test -s "conftest.$ac_objext"'
25711   { (eval echo "$as_me:25711: \"$ac_try\"") >&5
25712   (eval $ac_try) 2>&5
25713   ac_status=$?
25714   echo "$as_me:25714: \$? = $ac_status" >&5
25715   (exit "$ac_status"); }; }; then
25716
25717         test -n "$cf_math" && cat >>confdefs.h <<EOF
25718 #define ETIP_NEEDS_${cf_math} 1
25719 EOF
25720
25721         test -n "$cf_excp" && cat >>confdefs.h <<EOF
25722 #define ETIP_NEEDS_${cf_excp} 1
25723 EOF
25724
25725         cf_result="$cf_math $cf_excp"
25726         break 2
25727
25728 else
25729   echo "$as_me: failed program was:" >&5
25730 cat "conftest.$ac_ext" >&5
25731 fi
25732 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25733 done
25734 done
25735 echo "$as_me:25735: result: $cf_result" >&5
25736 echo "${ECHO_T}$cf_result" >&6
25737 CXXFLAGS="$cf_save_CXXFLAGS"
25738
25739 if test -n "$CXX"; then
25740 echo "$as_me:25740: checking if $CXX accepts parameter initialization" >&5
25741 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
25742 if test "${cf_cv_cpp_param_init+set}" = set; then
25743   echo $ECHO_N "(cached) $ECHO_C" >&6
25744 else
25745
25746         ac_ext=cc
25747 ac_cpp='$CXXCPP $CPPFLAGS'
25748 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25749 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25750 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25751 ac_main_return="return"
25752
25753         if test "$cross_compiling" = yes; then
25754   cf_cv_cpp_param_init=unknown
25755 else
25756   cat >"conftest.$ac_ext" <<_ACEOF
25757 #line 25757 "configure"
25758 #include "confdefs.h"
25759
25760 class TEST {
25761 private:
25762         int value;
25763 public:
25764         TEST(int x = 1);
25765         ~TEST();
25766 };
25767
25768 TEST::TEST(int x = 1)   // some compilers do not like second initializer
25769 {
25770         value = x;
25771 }
25772 int main(void) { }
25773
25774 _ACEOF
25775 rm -f "conftest$ac_exeext"
25776 if { (eval echo "$as_me:25776: \"$ac_link\"") >&5
25777   (eval $ac_link) 2>&5
25778   ac_status=$?
25779   echo "$as_me:25779: \$? = $ac_status" >&5
25780   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25781   { (eval echo "$as_me:25781: \"$ac_try\"") >&5
25782   (eval $ac_try) 2>&5
25783   ac_status=$?
25784   echo "$as_me:25784: \$? = $ac_status" >&5
25785   (exit "$ac_status"); }; }; then
25786   cf_cv_cpp_param_init=yes
25787 else
25788   echo "$as_me: program exited with status $ac_status" >&5
25789 echo "$as_me: failed program was:" >&5
25790 cat "conftest.$ac_ext" >&5
25791 cf_cv_cpp_param_init=no
25792 fi
25793 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25794 fi
25795         ac_ext=cc
25796 ac_cpp='$CXXCPP $CPPFLAGS'
25797 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25798 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25799 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25800 ac_main_return="return"
25801
25802 fi
25803 echo "$as_me:25803: result: $cf_cv_cpp_param_init" >&5
25804 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
25805 fi
25806 test "$cf_cv_cpp_param_init" = yes &&
25807 cat >>confdefs.h <<\EOF
25808 #define CPP_HAS_PARAM_INIT 1
25809 EOF
25810
25811 if test -n "$CXX"; then
25812
25813 echo "$as_me:25813: checking if $CXX accepts static_cast" >&5
25814 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
25815 if test "${cf_cv_cpp_static_cast+set}" = set; then
25816   echo $ECHO_N "(cached) $ECHO_C" >&6
25817 else
25818
25819         ac_ext=cc
25820 ac_cpp='$CXXCPP $CPPFLAGS'
25821 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25822 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25823 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25824 ac_main_return="return"
25825
25826         cat >"conftest.$ac_ext" <<_ACEOF
25827 #line 25827 "configure"
25828 #include "confdefs.h"
25829
25830 class NCursesPanel
25831 {
25832 public:
25833   NCursesPanel(int nlines,
25834                int ncols,
25835                int begin_y = 0,
25836                int begin_x = 0)
25837   {
25838   }
25839   NCursesPanel();
25840   ~NCursesPanel();
25841 };
25842
25843 template<class T> class NCursesUserPanel : public NCursesPanel
25844 {
25845 public:
25846   NCursesUserPanel (int nlines,
25847                     int ncols,
25848                     int begin_y = 0,
25849                     int begin_x = 0,
25850                     const T* p_UserData = static_cast<T*>(0))
25851     : NCursesPanel (nlines, ncols, begin_y, begin_x)
25852   {
25853   };
25854   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
25855   {
25856   };
25857
25858   virtual ~NCursesUserPanel() {};
25859 };
25860
25861 int
25862 main (void)
25863 {
25864
25865         const char* p_UserData = static_cast<char*>(0)
25866   ;
25867   return 0;
25868 }
25869 _ACEOF
25870 rm -f "conftest.$ac_objext"
25871 if { (eval echo "$as_me:25871: \"$ac_compile\"") >&5
25872   (eval $ac_compile) 2>&5
25873   ac_status=$?
25874   echo "$as_me:25874: \$? = $ac_status" >&5
25875   (exit "$ac_status"); } &&
25876          { ac_try='test -s "conftest.$ac_objext"'
25877   { (eval echo "$as_me:25877: \"$ac_try\"") >&5
25878   (eval $ac_try) 2>&5
25879   ac_status=$?
25880   echo "$as_me:25880: \$? = $ac_status" >&5
25881   (exit "$ac_status"); }; }; then
25882   cf_cv_cpp_static_cast=yes
25883 else
25884   echo "$as_me: failed program was:" >&5
25885 cat "conftest.$ac_ext" >&5
25886 cf_cv_cpp_static_cast=no
25887 fi
25888 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25889
25890         ac_ext=cc
25891 ac_cpp='$CXXCPP $CPPFLAGS'
25892 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25893 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25894 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25895 ac_main_return="return"
25896
25897 fi
25898 echo "$as_me:25898: result: $cf_cv_cpp_static_cast" >&5
25899 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
25900
25901 fi
25902
25903 test "$cf_cv_cpp_static_cast" = yes &&
25904 cat >>confdefs.h <<\EOF
25905 #define CPP_HAS_STATIC_CAST 1
25906 EOF
25907
25908         CXX_AR='$(AR)'
25909         CXX_ARFLAGS='$(ARFLAGS)'
25910         case "$cf_cv_system_name" in
25911         (irix*)
25912             if test "$GXX" != yes ; then
25913                 CXX_AR='$(CXX)'
25914                 CXX_ARFLAGS='-ar -o'
25915             fi
25916             ;;
25917         (sco3.2v5*)
25918             CXXLDFLAGS="-u main"
25919             ;;
25920         (solaris2*)
25921             if test "$GXX" != yes ; then
25922                 CXX_AR='$(CXX)'
25923                 CXX_ARFLAGS='-xar -o'
25924             fi
25925             ;;
25926         esac
25927
25928 else
25929         cf_cxx_library=no
25930         cf_cv_builtin_bool=1
25931
25932         # Just because we are not configuring against C++ right now does not
25933         # mean that a user will not want to use C++.  Some distributors disable
25934         # the C++ portion of this configuration as a shortcut (or just to avoid
25935         # compiling the demo in the c++ directory).  So we need a reasonable
25936         # default for the 'bool' type.
25937         #
25938         # Caveat: since the storage of the bool type is not standardized, it
25939         # may change.
25940
25941         if test "$NCURSES_BOOL" != auto ; then
25942                 cf_cv_type_of_bool=$NCURSES_BOOL
25943                 cf_cv_header_stdbool_h=0
25944         else
25945                 if test "$cf_cv_header_stdbool_h" = 1 ; then
25946
25947 echo "$as_me:25947: checking for bool" >&5
25948 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25949 if test "${ac_cv_type_bool+set}" = set; then
25950   echo $ECHO_N "(cached) $ECHO_C" >&6
25951 else
25952   cat >"conftest.$ac_ext" <<_ACEOF
25953 #line 25953 "configure"
25954 #include "confdefs.h"
25955
25956 #include <stdlib.h>
25957 #include <stdio.h>
25958
25959 #if defined(__cplusplus)
25960
25961 #ifdef HAVE_GXX_BUILTIN_H
25962 #include <g++/builtin.h>
25963 #elif HAVE_GPP_BUILTIN_H
25964 #include <gpp/builtin.h>
25965 #elif HAVE_BUILTIN_H
25966 #include <builtin.h>
25967 #endif
25968
25969 #else
25970
25971 #if $cf_cv_header_stdbool_h
25972 #include <stdbool.h>
25973 #endif
25974
25975 #endif
25976
25977 int
25978 main (void)
25979 {
25980 if ((bool *) 0)
25981   return 0;
25982 if (sizeof (bool))
25983   return 0;
25984   ;
25985   return 0;
25986 }
25987 _ACEOF
25988 rm -f "conftest.$ac_objext"
25989 if { (eval echo "$as_me:25989: \"$ac_compile\"") >&5
25990   (eval $ac_compile) 2>&5
25991   ac_status=$?
25992   echo "$as_me:25992: \$? = $ac_status" >&5
25993   (exit "$ac_status"); } &&
25994          { ac_try='test -s "conftest.$ac_objext"'
25995   { (eval echo "$as_me:25995: \"$ac_try\"") >&5
25996   (eval $ac_try) 2>&5
25997   ac_status=$?
25998   echo "$as_me:25998: \$? = $ac_status" >&5
25999   (exit "$ac_status"); }; }; then
26000   ac_cv_type_bool=yes
26001 else
26002   echo "$as_me: failed program was:" >&5
26003 cat "conftest.$ac_ext" >&5
26004 ac_cv_type_bool=no
26005 fi
26006 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26007 fi
26008 echo "$as_me:26008: result: $ac_cv_type_bool" >&5
26009 echo "${ECHO_T}$ac_cv_type_bool" >&6
26010
26011 echo "$as_me:26011: checking size of bool" >&5
26012 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26013 if test "${ac_cv_sizeof_bool+set}" = set; then
26014   echo $ECHO_N "(cached) $ECHO_C" >&6
26015 else
26016   if test "$ac_cv_type_bool" = yes; then
26017   if test "$cross_compiling" = yes; then
26018   # Depending upon the size, compute the lo and hi bounds.
26019 cat >"conftest.$ac_ext" <<_ACEOF
26020 #line 26020 "configure"
26021 #include "confdefs.h"
26022
26023 #include <stdlib.h>
26024 #include <stdio.h>
26025
26026 #if defined(__cplusplus)
26027
26028 #ifdef HAVE_GXX_BUILTIN_H
26029 #include <g++/builtin.h>
26030 #elif HAVE_GPP_BUILTIN_H
26031 #include <gpp/builtin.h>
26032 #elif HAVE_BUILTIN_H
26033 #include <builtin.h>
26034 #endif
26035
26036 #else
26037
26038 #if $cf_cv_header_stdbool_h
26039 #include <stdbool.h>
26040 #endif
26041
26042 #endif
26043
26044 int
26045 main (void)
26046 {
26047 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26048   ;
26049   return 0;
26050 }
26051 _ACEOF
26052 rm -f "conftest.$ac_objext"
26053 if { (eval echo "$as_me:26053: \"$ac_compile\"") >&5
26054   (eval $ac_compile) 2>&5
26055   ac_status=$?
26056   echo "$as_me:26056: \$? = $ac_status" >&5
26057   (exit "$ac_status"); } &&
26058          { ac_try='test -s "conftest.$ac_objext"'
26059   { (eval echo "$as_me:26059: \"$ac_try\"") >&5
26060   (eval $ac_try) 2>&5
26061   ac_status=$?
26062   echo "$as_me:26062: \$? = $ac_status" >&5
26063   (exit "$ac_status"); }; }; then
26064   ac_lo=0 ac_mid=0
26065   while :; do
26066     cat >"conftest.$ac_ext" <<_ACEOF
26067 #line 26067 "configure"
26068 #include "confdefs.h"
26069
26070 #include <stdlib.h>
26071 #include <stdio.h>
26072
26073 #if defined(__cplusplus)
26074
26075 #ifdef HAVE_GXX_BUILTIN_H
26076 #include <g++/builtin.h>
26077 #elif HAVE_GPP_BUILTIN_H
26078 #include <gpp/builtin.h>
26079 #elif HAVE_BUILTIN_H
26080 #include <builtin.h>
26081 #endif
26082
26083 #else
26084
26085 #if $cf_cv_header_stdbool_h
26086 #include <stdbool.h>
26087 #endif
26088
26089 #endif
26090
26091 int
26092 main (void)
26093 {
26094 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26095   ;
26096   return 0;
26097 }
26098 _ACEOF
26099 rm -f "conftest.$ac_objext"
26100 if { (eval echo "$as_me:26100: \"$ac_compile\"") >&5
26101   (eval $ac_compile) 2>&5
26102   ac_status=$?
26103   echo "$as_me:26103: \$? = $ac_status" >&5
26104   (exit "$ac_status"); } &&
26105          { ac_try='test -s "conftest.$ac_objext"'
26106   { (eval echo "$as_me:26106: \"$ac_try\"") >&5
26107   (eval $ac_try) 2>&5
26108   ac_status=$?
26109   echo "$as_me:26109: \$? = $ac_status" >&5
26110   (exit "$ac_status"); }; }; then
26111   ac_hi=$ac_mid; break
26112 else
26113   echo "$as_me: failed program was:" >&5
26114 cat "conftest.$ac_ext" >&5
26115 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26116 fi
26117 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26118   done
26119 else
26120   echo "$as_me: failed program was:" >&5
26121 cat "conftest.$ac_ext" >&5
26122 ac_hi=-1 ac_mid=-1
26123   while :; do
26124     cat >"conftest.$ac_ext" <<_ACEOF
26125 #line 26125 "configure"
26126 #include "confdefs.h"
26127
26128 #include <stdlib.h>
26129 #include <stdio.h>
26130
26131 #if defined(__cplusplus)
26132
26133 #ifdef HAVE_GXX_BUILTIN_H
26134 #include <g++/builtin.h>
26135 #elif HAVE_GPP_BUILTIN_H
26136 #include <gpp/builtin.h>
26137 #elif HAVE_BUILTIN_H
26138 #include <builtin.h>
26139 #endif
26140
26141 #else
26142
26143 #if $cf_cv_header_stdbool_h
26144 #include <stdbool.h>
26145 #endif
26146
26147 #endif
26148
26149 int
26150 main (void)
26151 {
26152 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26153   ;
26154   return 0;
26155 }
26156 _ACEOF
26157 rm -f "conftest.$ac_objext"
26158 if { (eval echo "$as_me:26158: \"$ac_compile\"") >&5
26159   (eval $ac_compile) 2>&5
26160   ac_status=$?
26161   echo "$as_me:26161: \$? = $ac_status" >&5
26162   (exit "$ac_status"); } &&
26163          { ac_try='test -s "conftest.$ac_objext"'
26164   { (eval echo "$as_me:26164: \"$ac_try\"") >&5
26165   (eval $ac_try) 2>&5
26166   ac_status=$?
26167   echo "$as_me:26167: \$? = $ac_status" >&5
26168   (exit "$ac_status"); }; }; then
26169   ac_lo=$ac_mid; break
26170 else
26171   echo "$as_me: failed program was:" >&5
26172 cat "conftest.$ac_ext" >&5
26173 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26174 fi
26175 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26176   done
26177 fi
26178 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26179 # Binary search between lo and hi bounds.
26180 while test "x$ac_lo" != "x$ac_hi"; do
26181   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26182   cat >"conftest.$ac_ext" <<_ACEOF
26183 #line 26183 "configure"
26184 #include "confdefs.h"
26185
26186 #include <stdlib.h>
26187 #include <stdio.h>
26188
26189 #if defined(__cplusplus)
26190
26191 #ifdef HAVE_GXX_BUILTIN_H
26192 #include <g++/builtin.h>
26193 #elif HAVE_GPP_BUILTIN_H
26194 #include <gpp/builtin.h>
26195 #elif HAVE_BUILTIN_H
26196 #include <builtin.h>
26197 #endif
26198
26199 #else
26200
26201 #if $cf_cv_header_stdbool_h
26202 #include <stdbool.h>
26203 #endif
26204
26205 #endif
26206
26207 int
26208 main (void)
26209 {
26210 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26211   ;
26212   return 0;
26213 }
26214 _ACEOF
26215 rm -f "conftest.$ac_objext"
26216 if { (eval echo "$as_me:26216: \"$ac_compile\"") >&5
26217   (eval $ac_compile) 2>&5
26218   ac_status=$?
26219   echo "$as_me:26219: \$? = $ac_status" >&5
26220   (exit "$ac_status"); } &&
26221          { ac_try='test -s "conftest.$ac_objext"'
26222   { (eval echo "$as_me:26222: \"$ac_try\"") >&5
26223   (eval $ac_try) 2>&5
26224   ac_status=$?
26225   echo "$as_me:26225: \$? = $ac_status" >&5
26226   (exit "$ac_status"); }; }; then
26227   ac_hi=$ac_mid
26228 else
26229   echo "$as_me: failed program was:" >&5
26230 cat "conftest.$ac_ext" >&5
26231 ac_lo=`expr "$ac_mid" + 1`
26232 fi
26233 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26234 done
26235 ac_cv_sizeof_bool=$ac_lo
26236 else
26237   if test "$cross_compiling" = yes; then
26238   { { echo "$as_me:26238: error: cannot run test program while cross compiling" >&5
26239 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26240    { (exit 1); exit 1; }; }
26241 else
26242   cat >"conftest.$ac_ext" <<_ACEOF
26243 #line 26243 "configure"
26244 #include "confdefs.h"
26245
26246 #include <stdlib.h>
26247 #include <stdio.h>
26248
26249 #if defined(__cplusplus)
26250
26251 #ifdef HAVE_GXX_BUILTIN_H
26252 #include <g++/builtin.h>
26253 #elif HAVE_GPP_BUILTIN_H
26254 #include <gpp/builtin.h>
26255 #elif HAVE_BUILTIN_H
26256 #include <builtin.h>
26257 #endif
26258
26259 #else
26260
26261 #if $cf_cv_header_stdbool_h
26262 #include <stdbool.h>
26263 #endif
26264
26265 #endif
26266
26267 int
26268 main (void)
26269 {
26270 FILE *f = fopen ("conftest.val", "w");
26271 if (!f)
26272   $ac_main_return (1);
26273 fprintf (f, "%ld", (long)(sizeof (bool)));
26274 fclose (f);
26275   ;
26276   return 0;
26277 }
26278 _ACEOF
26279 rm -f "conftest$ac_exeext"
26280 if { (eval echo "$as_me:26280: \"$ac_link\"") >&5
26281   (eval $ac_link) 2>&5
26282   ac_status=$?
26283   echo "$as_me:26283: \$? = $ac_status" >&5
26284   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26285   { (eval echo "$as_me:26285: \"$ac_try\"") >&5
26286   (eval $ac_try) 2>&5
26287   ac_status=$?
26288   echo "$as_me:26288: \$? = $ac_status" >&5
26289   (exit "$ac_status"); }; }; then
26290   ac_cv_sizeof_bool=`cat conftest.val`
26291 else
26292   echo "$as_me: program exited with status $ac_status" >&5
26293 echo "$as_me: failed program was:" >&5
26294 cat "conftest.$ac_ext" >&5
26295 fi
26296 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26297 fi
26298 fi
26299 rm -f conftest.val
26300 else
26301   ac_cv_sizeof_bool=0
26302 fi
26303 fi
26304 echo "$as_me:26304: result: $ac_cv_sizeof_bool" >&5
26305 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26306 cat >>confdefs.h <<EOF
26307 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26308 EOF
26309
26310 echo "$as_me:26310: checking for type of bool" >&5
26311 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26312 if test "${cf_cv_type_of_bool+set}" = set; then
26313   echo $ECHO_N "(cached) $ECHO_C" >&6
26314 else
26315
26316         rm -f cf_test.out
26317         if test "$cross_compiling" = yes; then
26318
26319                 case x$ac_cv_sizeof_bool in
26320                 (x1) cf_cv_type_of_bool="unsigned char";;
26321                 (x2) cf_cv_type_of_bool="unsigned short";;
26322                 (x4) cf_cv_type_of_bool="unsigned int";;
26323                 (x8) cf_cv_type_of_bool="unsigned long";;
26324                 (*)  cf_cv_type_of_bool=unknown;;
26325                 esac
26326
26327 else
26328   cat >"conftest.$ac_ext" <<_ACEOF
26329 #line 26329 "configure"
26330 #include "confdefs.h"
26331
26332 #include <stdlib.h>
26333 #include <stdio.h>
26334
26335 #if defined(__cplusplus)
26336
26337 #ifdef HAVE_GXX_BUILTIN_H
26338 #include <g++/builtin.h>
26339 #elif HAVE_GPP_BUILTIN_H
26340 #include <gpp/builtin.h>
26341 #elif HAVE_BUILTIN_H
26342 #include <builtin.h>
26343 #endif
26344
26345 #else
26346
26347 #if $cf_cv_header_stdbool_h
26348 #include <stdbool.h>
26349 #endif
26350
26351 #endif
26352
26353 int main(void)
26354 {
26355         FILE *fp = fopen("cf_test.out", "w");
26356         if (fp != 0) {
26357                 bool x = true;
26358                 if ((bool)(-x) >= 0)
26359                         fputs("unsigned ", fp);
26360                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26361                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26362                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26363                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26364                 fclose(fp);
26365         }
26366         ${cf_cv_main_return:-return}(0);
26367 }
26368
26369 _ACEOF
26370 rm -f "conftest$ac_exeext"
26371 if { (eval echo "$as_me:26371: \"$ac_link\"") >&5
26372   (eval $ac_link) 2>&5
26373   ac_status=$?
26374   echo "$as_me:26374: \$? = $ac_status" >&5
26375   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26376   { (eval echo "$as_me:26376: \"$ac_try\"") >&5
26377   (eval $ac_try) 2>&5
26378   ac_status=$?
26379   echo "$as_me:26379: \$? = $ac_status" >&5
26380   (exit "$ac_status"); }; }; then
26381   cf_cv_type_of_bool=`cat cf_test.out`
26382                  if test -z "$cf_cv_type_of_bool"; then
26383                    cf_cv_type_of_bool=unknown
26384                  fi
26385 else
26386   echo "$as_me: program exited with status $ac_status" >&5
26387 echo "$as_me: failed program was:" >&5
26388 cat "conftest.$ac_ext" >&5
26389 cf_cv_type_of_bool=unknown
26390 fi
26391 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26392 fi
26393         rm -f cf_test.out
26394
26395 fi
26396 echo "$as_me:26396: result: $cf_cv_type_of_bool" >&5
26397 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26398
26399 if test "$cf_cv_type_of_bool" = unknown ; then
26400         case .$NCURSES_BOOL in
26401         (.auto|.) NCURSES_BOOL=unsigned;;
26402         esac
26403         { echo "$as_me:26403: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26404 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26405         cf_cv_type_of_bool=$NCURSES_BOOL
26406 fi
26407
26408                 else
26409                         echo "$as_me:26409: checking for fallback type of bool" >&5
26410 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26411                         case "$host_cpu" in
26412                         (i?86)  cf_cv_type_of_bool=char ;;
26413                         (*)     cf_cv_type_of_bool=int  ;;
26414                         esac
26415                         echo "$as_me:26415: result: $cf_cv_type_of_bool" >&5
26416 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26417                 fi
26418         fi
26419 fi
26420
26421 # If the C compiler did not declare bool, and we did not determine that the C++
26422 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26423 # ncurses library use the same type as C++ bool.  Note that this allows one to
26424 # specify the type of bool in a configure-script option and postpone
26425 # integration with the C++ compiler provided that the types are compatible.
26426 USE_CXX_BOOL=1
26427 if test "$cf_cv_cc_bool_type" = 1
26428 then
26429         # oops: C has a bool.  Unlikely, but C++ could differ.
26430         USE_CXX_BOOL=0
26431 elif test "$cf_cv_builtin_bool" = 0
26432 then
26433         # C++ has no bool
26434         USE_CXX_BOOL=0
26435 else
26436         # this is the normal case
26437         USE_CXX_BOOL='defined(__cplusplus)'
26438 fi
26439
26440 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26441
26442         if test "$cf_with_ada" != "no" ; then
26443                 if test "$with_libtool" != "no"; then
26444                         { echo "$as_me:26444: WARNING: libtool does not support Ada - disabling feature" >&5
26445 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26446                         cf_with_ada=no
26447                 fi
26448         fi
26449
26450         if test "$cf_with_ada" != "no" ; then
26451
26452 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26453 do
26454
26455 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26456
26457         unset ac_cv_path_cf_TEMP_gnat
26458         unset cf_TEMP_gnat
26459         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26460 set dummy $cf_prog_gnat; ac_word=$2
26461 echo "$as_me:26461: checking for $ac_word" >&5
26462 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26463 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26464   echo $ECHO_N "(cached) $ECHO_C" >&6
26465 else
26466   case $cf_TEMP_gnat in
26467   [\\/]* | ?:[\\/]*)
26468   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26469   ;;
26470   *)
26471   ac_save_IFS=$IFS; IFS=$ac_path_separator
26472 ac_dummy="$PATH"
26473 for ac_dir in $ac_dummy; do
26474   IFS=$ac_save_IFS
26475   test -z "$ac_dir" && ac_dir=.
26476   if $as_executable_p "$ac_dir/$ac_word"; then
26477    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26478    echo "$as_me:26478: found $ac_dir/$ac_word" >&5
26479    break
26480 fi
26481 done
26482
26483   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26484   ;;
26485 esac
26486 fi
26487 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26488
26489 if test -n "$cf_TEMP_gnat"; then
26490   echo "$as_me:26490: result: $cf_TEMP_gnat" >&5
26491 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26492 else
26493   echo "$as_me:26493: result: no" >&5
26494 echo "${ECHO_T}no" >&6
26495 fi
26496
26497         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
26498
26499         if test "x$cf_TEMP_gnat" != xno; then
26500                 unset cf_cv_gnat_version
26501                 unset cf_TEMP_gnat
26502
26503 echo "$as_me:26503: checking for $cf_prog_gnat version" >&5
26504 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26505 if test "${cf_cv_gnat_version+set}" = set; then
26506   echo $ECHO_N "(cached) $ECHO_C" >&6
26507 else
26508
26509 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26510         grep '[0-9].[0-9][0-9]*' |\
26511         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26512
26513 fi
26514 echo "$as_me:26514: result: $cf_cv_gnat_version" >&5
26515 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26516 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26517 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26518
26519         fi
26520         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
26521
26522         unset cf_TEMP_gnat
26523         unset cf_cv_gnat_version
26524         unset ac_cv_path_cf_TEMP_gnat
26525 done
26526
26527 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26528         cf_ada_make=
26529         cf_cv_prog_gnat_correct=no
26530 else
26531         cf_ada_make=gnatmake
26532         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26533                 # gprconfig is newer than gnatmake; we can continue...
26534                 cf_ada_config="##"
26535         else
26536                 rm -rf ./conftest* ./*~conftest*
26537                 if mkdir conftest.src
26538                 then
26539                         cf_ada_config=""
26540                         cd conftest.src
26541                         for cf_gprconfig in Ada C
26542                         do
26543                                 echo "$as_me:26543: checking for gprconfig name for $cf_gprconfig" >&5
26544 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26545                                 if test "$cf_gprconfig" = C
26546                                 then
26547                                         for cf_gprconfig_param in \
26548                                                 "$cf_gprconfig,,,,GNATGCC" \
26549                                                 "$cf_gprconfig,,,,GCC" \
26550                                                 "$cf_gprconfig"
26551                                         do
26552                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26553                                                 test -n "$cf_gprconfig_value" && break
26554                                         done
26555                                 else
26556                                         cf_gprconfig_param=$cf_gprconfig
26557                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26558                                 fi
26559                                 if test -n "$cf_gprconfig_value"
26560                                 then
26561                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
26562                                         echo "$as_me:26562: result: $cf_gprconfig_value" >&5
26563 echo "${ECHO_T}$cf_gprconfig_value" >&6
26564                                 else
26565                                         echo "$as_me:26565: result: missing" >&5
26566 echo "${ECHO_T}missing" >&6
26567                                         cf_ada_config="#"
26568                                         break
26569                                 fi
26570                         done
26571                         cd ..
26572                         rm -rf ./conftest* ./*~conftest*
26573                 fi
26574         fi
26575         if test "x$cf_ada_config" != "x#"
26576         then
26577
26578 echo "$as_me:26578: checking for gnat version" >&5
26579 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26580 if test "${cf_cv_gnat_version+set}" = set; then
26581   echo $ECHO_N "(cached) $ECHO_C" >&6
26582 else
26583
26584 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26585         grep '[0-9].[0-9][0-9]*' |\
26586         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26587
26588 fi
26589 echo "$as_me:26589: result: $cf_cv_gnat_version" >&5
26590 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26591 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26592
26593 case "$cf_cv_gnat_version" in
26594 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26595         cf_cv_prog_gnat_correct=yes
26596         ;;
26597 (*)
26598         { echo "$as_me:26598: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26599 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26600         cf_cv_prog_gnat_correct=no
26601         ;;
26602 esac
26603
26604                 # Extract the first word of "m4", so it can be a program name with args.
26605 set dummy m4; ac_word=$2
26606 echo "$as_me:26606: checking for $ac_word" >&5
26607 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26608 if test "${ac_cv_prog_M4_exists+set}" = set; then
26609   echo $ECHO_N "(cached) $ECHO_C" >&6
26610 else
26611   if test -n "$M4_exists"; then
26612   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26613 else
26614   ac_save_IFS=$IFS; IFS=$ac_path_separator
26615 ac_dummy="$PATH"
26616 for ac_dir in $ac_dummy; do
26617   IFS=$ac_save_IFS
26618   test -z "$ac_dir" && ac_dir=.
26619   $as_executable_p "$ac_dir/$ac_word" || continue
26620 ac_cv_prog_M4_exists="yes"
26621 echo "$as_me:26621: found $ac_dir/$ac_word" >&5
26622 break
26623 done
26624
26625   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26626 fi
26627 fi
26628 M4_exists=$ac_cv_prog_M4_exists
26629 if test -n "$M4_exists"; then
26630   echo "$as_me:26630: result: $M4_exists" >&5
26631 echo "${ECHO_T}$M4_exists" >&6
26632 else
26633   echo "$as_me:26633: result: no" >&5
26634 echo "${ECHO_T}no" >&6
26635 fi
26636
26637                 if test "$ac_cv_prog_M4_exists" = no; then
26638                         cf_cv_prog_gnat_correct=no
26639                         { echo "$as_me:26639: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26640 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26641                 fi
26642                 if test "$cf_cv_prog_gnat_correct" = yes; then
26643                         echo "$as_me:26643: checking if GNAT works" >&5
26644 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26645
26646 rm -rf ./conftest* ./*~conftest*
26647 cat >>conftest.ads <<CF_EOF
26648 procedure conftest;
26649 CF_EOF
26650 cat >>conftest.adb <<CF_EOF
26651 with Text_IO;
26652 with GNAT.OS_Lib;
26653 procedure conftest is
26654 begin
26655    Text_IO.Put ("Hello World");
26656    Text_IO.New_Line;
26657    GNAT.OS_Lib.OS_Exit (0);
26658 end conftest;
26659 CF_EOF
26660 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26661    if ( ./conftest 1>&5 2>&1 ) ; then
26662       cf_cv_prog_gnat_correct=yes
26663    else
26664       cf_cv_prog_gnat_correct=no
26665    fi
26666 else
26667    cf_cv_prog_gnat_correct=no
26668 fi
26669 rm -rf ./conftest* ./*~conftest*
26670
26671                         echo "$as_me:26671: result: $cf_cv_prog_gnat_correct" >&5
26672 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26673                 fi
26674         else
26675                 cf_cv_prog_gnat_correct=no
26676         fi
26677 fi
26678
26679                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26680
26681         ADAFLAGS="$ADAFLAGS -gnatpn"
26682
26683         echo "$as_me:26683: checking optimization options for ADAFLAGS" >&5
26684 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26685         case "$CFLAGS" in
26686         (*-g*)
26687
26688         ADAFLAGS="$ADAFLAGS -g"
26689
26690                 ;;
26691         esac
26692         case "$CFLAGS" in
26693         (*-O*)
26694                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26695
26696         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26697
26698                 ;;
26699         esac
26700         echo "$as_me:26700: result: $ADAFLAGS" >&5
26701 echo "${ECHO_T}$ADAFLAGS" >&6
26702
26703 echo "$as_me:26703: checking if GNATPREP supports -T option" >&5
26704 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26705 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
26706   echo $ECHO_N "(cached) $ECHO_C" >&6
26707 else
26708
26709 cf_cv_gnatprep_opt_t=no
26710 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
26711
26712 fi
26713 echo "$as_me:26713: result: $cf_cv_gnatprep_opt_t" >&5
26714 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
26715 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
26716
26717 echo "$as_me:26717: checking if GNAT supports generics" >&5
26718 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
26719 case "$cf_cv_gnat_version" in
26720 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26721         cf_gnat_generics=yes
26722         ;;
26723 (*)
26724         cf_gnat_generics=no
26725         ;;
26726 esac
26727 echo "$as_me:26727: result: $cf_gnat_generics" >&5
26728 echo "${ECHO_T}$cf_gnat_generics" >&6
26729
26730 if test "$cf_gnat_generics" = yes
26731 then
26732         cf_compile_generics=generics
26733         cf_generic_objects="\${GENOBJS}"
26734 else
26735         cf_compile_generics=
26736         cf_generic_objects=
26737 fi
26738
26739 echo "$as_me:26739: checking if GNAT supports SIGINT" >&5
26740 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
26741 if test "${cf_cv_gnat_sigint+set}" = set; then
26742   echo $ECHO_N "(cached) $ECHO_C" >&6
26743 else
26744
26745 rm -rf ./conftest* ./*~conftest*
26746 cat >>conftest.ads <<CF_EOF
26747 with Ada.Interrupts.Names;
26748
26749 package ConfTest is
26750
26751    pragma Warnings (Off);  --  the next pragma exists since 3.11p
26752    pragma Unreserve_All_Interrupts;
26753    pragma Warnings (On);
26754
26755    protected Process is
26756       procedure Stop;
26757       function Continue return Boolean;
26758       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
26759    private
26760       Done : Boolean := False;
26761    end Process;
26762
26763 end ConfTest;
26764 CF_EOF
26765 cat >>conftest.adb <<CF_EOF
26766 package body ConfTest is
26767    protected body Process is
26768       procedure Stop is
26769       begin
26770          Done := True;
26771       end Stop;
26772       function Continue return Boolean is
26773       begin
26774          return not Done;
26775       end Continue;
26776    end Process;
26777 end ConfTest;
26778 CF_EOF
26779 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26780       cf_cv_gnat_sigint=yes
26781 else
26782    cf_cv_gnat_sigint=no
26783 fi
26784 rm -rf ./conftest* ./*~conftest*
26785
26786 fi
26787 echo "$as_me:26787: result: $cf_cv_gnat_sigint" >&5
26788 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
26789
26790 if test "$cf_cv_gnat_sigint" = yes ; then
26791         USE_GNAT_SIGINT=""
26792 else
26793         USE_GNAT_SIGINT="#"
26794 fi
26795
26796 cf_gnat_libraries=no
26797 cf_gnat_projects=no
26798
26799 if test "$enable_gnat_projects" != no ; then
26800 echo "$as_me:26800: checking if GNAT supports project files" >&5
26801 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
26802 case "$cf_cv_gnat_version" in
26803 (3.[0-9]*)
26804         ;;
26805 (*)
26806         case "$cf_cv_system_name" in
26807         (cygwin*|msys*)
26808                 ;;
26809         (*)
26810                 rm -rf ./conftest* ./*~conftest*
26811                 if mkdir conftest.src conftest.bin conftest.lib
26812                 then
26813                         cd conftest.src
26814                         rm -rf ./conftest* ./*~conftest*
26815                         cat >>library.gpr <<CF_EOF
26816 project Library is
26817   Kind := External ("LIB_KIND");
26818   for Library_Name use "ConfTest";
26819   for Object_Dir use ".";
26820   for Library_ALI_Dir use External("LIBRARY_DIR");
26821   for Library_Version use External ("SONAME");
26822   for Library_Kind use Kind;
26823   for Library_Dir use External("BUILD_DIR");
26824   Source_Dir := External ("SOURCE_DIR");
26825   for Source_Dirs use (Source_Dir);
26826 end Library;
26827 CF_EOF
26828                         cat >>confpackage.ads <<CF_EOF
26829 package ConfPackage is
26830    procedure conftest;
26831 end ConfPackage;
26832 CF_EOF
26833                         cat >>confpackage.adb <<CF_EOF
26834 with Text_IO;
26835 package body ConfPackage is
26836    procedure conftest is
26837    begin
26838       Text_IO.Put ("Hello World");
26839       Text_IO.New_Line;
26840    end conftest;
26841 end ConfPackage;
26842 CF_EOF
26843                         if ( "$cf_ada_make" $ADAFLAGS \
26844                                         -Plibrary.gpr \
26845                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
26846                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
26847                                         -XSOURCE_DIR="`pwd`" \
26848                                         -XSONAME=libConfTest.so.1 \
26849                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
26850                                 cf_gnat_projects=yes
26851                         fi
26852                         cd ..
26853                 fi
26854                 if test -f conftest.lib/confpackage.ali
26855                 then
26856                         cf_gnat_libraries=yes
26857                 fi
26858                 rm -rf ./conftest* ./*~conftest*
26859                 ;;
26860         esac
26861         ;;
26862 esac
26863 echo "$as_me:26863: result: $cf_gnat_projects" >&5
26864 echo "${ECHO_T}$cf_gnat_projects" >&6
26865 fi # enable_gnat_projects
26866
26867 if test "$cf_gnat_projects" = yes
26868 then
26869         echo "$as_me:26869: checking if GNAT supports libraries" >&5
26870 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
26871         echo "$as_me:26871: result: $cf_gnat_libraries" >&5
26872 echo "${ECHO_T}$cf_gnat_libraries" >&6
26873 fi
26874
26875 USE_OLD_MAKERULES=""
26876 USE_GNAT_PROJECTS="#"
26877 USE_GNAT_MAKE_GPR="#"
26878 USE_GNAT_GPRBUILD="#"
26879
26880 if test "$cf_gnat_projects" = yes
26881 then
26882         USE_OLD_MAKERULES="#"
26883         USE_GNAT_PROJECTS=""
26884         if test "$cf_cv_VERSION_GPRBUILD" != no
26885         then
26886                 USE_GNAT_GPRBUILD=""
26887         elif test "$cf_cv_VERSION_GNATMAKE" != no
26888         then
26889                 USE_GNAT_MAKE_GPR=""
26890         else
26891                 { echo "$as_me:26891: WARNING: use old makefile rules since tools are missing" >&5
26892 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
26893         fi
26894 fi
26895
26896 if test "$cf_gnat_libraries" = yes
26897 then
26898         USE_GNAT_LIBRARIES=""
26899 else
26900         USE_GNAT_LIBRARIES="#"
26901 fi
26902
26903 echo "$as_me:26903: checking for ada-compiler" >&5
26904 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
26905
26906 # Check whether --with-ada-compiler or --without-ada-compiler was given.
26907 if test "${with_ada_compiler+set}" = set; then
26908   withval="$with_ada_compiler"
26909   cf_ada_compiler=$withval
26910 else
26911   cf_ada_compiler=gnatmake
26912 fi;
26913
26914 echo "$as_me:26914: result: $cf_ada_compiler" >&5
26915 echo "${ECHO_T}$cf_ada_compiler" >&6
26916
26917                         cf_ada_package=terminal_interface
26918
26919 echo "$as_me:26919: checking for ada-include" >&5
26920 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
26921
26922 # Check whether --with-ada-include or --without-ada-include was given.
26923 if test "${with_ada_include+set}" = set; then
26924   withval="$with_ada_include"
26925
26926 else
26927   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
26928 fi; if test -n "$prefix/share/ada/adainclude" ; then
26929
26930 if test "x$prefix" != xNONE; then
26931         cf_path_syntax="$prefix"
26932 else
26933         cf_path_syntax="$ac_default_prefix"
26934 fi
26935
26936 case ".$withval" in
26937 (.\$\(*\)*|.\'*\'*)
26938         ;;
26939 (..|./*|.\\*)
26940         ;;
26941 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26942         ;;
26943 (.\$\{*prefix\}*|.\$\{*dir\}*)
26944         eval withval="$withval"
26945         case ".$withval" in
26946         (.NONE/*)
26947                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26948                 ;;
26949         esac
26950         ;;
26951 (.no|.NONE/*)
26952         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26953         ;;
26954 (*)
26955         { { echo "$as_me:26955: error: expected a pathname, not \"$withval\"" >&5
26956 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26957    { (exit 1); exit 1; }; }
26958         ;;
26959 esac
26960
26961 fi
26962 eval ADA_INCLUDE="$withval"
26963
26964 echo "$as_me:26964: result: $ADA_INCLUDE" >&5
26965 echo "${ECHO_T}$ADA_INCLUDE" >&6
26966
26967 echo "$as_me:26967: checking for ada-objects" >&5
26968 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
26969
26970 # Check whether --with-ada-objects or --without-ada-objects was given.
26971 if test "${with_ada_objects+set}" = set; then
26972   withval="$with_ada_objects"
26973
26974 else
26975   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
26976 fi; if test -n "$prefix/lib/ada/adalib" ; then
26977
26978 if test "x$prefix" != xNONE; then
26979         cf_path_syntax="$prefix"
26980 else
26981         cf_path_syntax="$ac_default_prefix"
26982 fi
26983
26984 case ".$withval" in
26985 (.\$\(*\)*|.\'*\'*)
26986         ;;
26987 (..|./*|.\\*)
26988         ;;
26989 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26990         ;;
26991 (.\$\{*prefix\}*|.\$\{*dir\}*)
26992         eval withval="$withval"
26993         case ".$withval" in
26994         (.NONE/*)
26995                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26996                 ;;
26997         esac
26998         ;;
26999 (.no|.NONE/*)
27000         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27001         ;;
27002 (*)
27003         { { echo "$as_me:27003: error: expected a pathname, not \"$withval\"" >&5
27004 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27005    { (exit 1); exit 1; }; }
27006         ;;
27007 esac
27008
27009 fi
27010 eval ADA_OBJECTS="$withval"
27011
27012 echo "$as_me:27012: result: $ADA_OBJECTS" >&5
27013 echo "${ECHO_T}$ADA_OBJECTS" >&6
27014
27015 echo "$as_me:27015: checking if an Ada95 shared-library should be built" >&5
27016 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27017
27018 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27019 if test "${with_ada_sharedlib+set}" = set; then
27020   withval="$with_ada_sharedlib"
27021   with_ada_sharedlib=$withval
27022 else
27023   with_ada_sharedlib=no
27024 fi;
27025 echo "$as_me:27025: result: $with_ada_sharedlib" >&5
27026 echo "${ECHO_T}$with_ada_sharedlib" >&6
27027
27028 if test "x$with_ada_sharedlib" != xno
27029 then
27030         if test "x$cf_gnat_projects" != xyes
27031         then
27032                 { echo "$as_me:27032: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27033 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27034                 with_ada_sharedlib=no
27035         fi
27036 fi
27037
27038 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27039 MAKE_ADA_SHAREDLIB="#"
27040
27041 if test "x$with_ada_sharedlib" != xno
27042 then
27043         MAKE_ADA_SHAREDLIB=
27044         if test "x$with_ada_sharedlib" != xyes
27045         then
27046                 ADA_SHAREDLIB="$with_ada_sharedlib"
27047         fi
27048 fi
27049
27050                         # allow the Ada binding to be renamed
27051
27052 echo "$as_me:27052: checking for ada-libname" >&5
27053 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27054
27055 # Check whether --with-ada-libname or --without-ada-libname was given.
27056 if test "${with_ada_libname+set}" = set; then
27057   withval="$with_ada_libname"
27058   ADA_LIBNAME=$withval
27059 else
27060   ADA_LIBNAME=AdaCurses
27061 fi;
27062 case "x$ADA_LIBNAME" in
27063 (x|xyes|xno)
27064         ADA_LIBNAME=AdaCurses
27065         ;;
27066 esac
27067
27068 echo "$as_me:27068: result: $ADA_LIBNAME" >&5
27069 echo "${ECHO_T}$ADA_LIBNAME" >&6
27070
27071                 fi
27072         fi
27073 else
27074         cf_with_ada=no
27075 fi
27076
27077 # do this "late" to avoid conflict with header-checks
27078 if test "x$with_widec" = xyes ; then
27079         echo "$as_me:27079: checking for wchar_t" >&5
27080 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27081 if test "${ac_cv_type_wchar_t+set}" = set; then
27082   echo $ECHO_N "(cached) $ECHO_C" >&6
27083 else
27084   cat >"conftest.$ac_ext" <<_ACEOF
27085 #line 27085 "configure"
27086 #include "confdefs.h"
27087 $ac_includes_default
27088 int
27089 main (void)
27090 {
27091 if ((wchar_t *) 0)
27092   return 0;
27093 if (sizeof (wchar_t))
27094   return 0;
27095   ;
27096   return 0;
27097 }
27098 _ACEOF
27099 rm -f "conftest.$ac_objext"
27100 if { (eval echo "$as_me:27100: \"$ac_compile\"") >&5
27101   (eval $ac_compile) 2>&5
27102   ac_status=$?
27103   echo "$as_me:27103: \$? = $ac_status" >&5
27104   (exit "$ac_status"); } &&
27105          { ac_try='test -s "conftest.$ac_objext"'
27106   { (eval echo "$as_me:27106: \"$ac_try\"") >&5
27107   (eval $ac_try) 2>&5
27108   ac_status=$?
27109   echo "$as_me:27109: \$? = $ac_status" >&5
27110   (exit "$ac_status"); }; }; then
27111   ac_cv_type_wchar_t=yes
27112 else
27113   echo "$as_me: failed program was:" >&5
27114 cat "conftest.$ac_ext" >&5
27115 ac_cv_type_wchar_t=no
27116 fi
27117 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27118 fi
27119 echo "$as_me:27119: result: $ac_cv_type_wchar_t" >&5
27120 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27121
27122 echo "$as_me:27122: checking size of wchar_t" >&5
27123 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27124 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27125   echo $ECHO_N "(cached) $ECHO_C" >&6
27126 else
27127   if test "$ac_cv_type_wchar_t" = yes; then
27128   if test "$cross_compiling" = yes; then
27129   # Depending upon the size, compute the lo and hi bounds.
27130 cat >"conftest.$ac_ext" <<_ACEOF
27131 #line 27131 "configure"
27132 #include "confdefs.h"
27133 $ac_includes_default
27134 int
27135 main (void)
27136 {
27137 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27138   ;
27139   return 0;
27140 }
27141 _ACEOF
27142 rm -f "conftest.$ac_objext"
27143 if { (eval echo "$as_me:27143: \"$ac_compile\"") >&5
27144   (eval $ac_compile) 2>&5
27145   ac_status=$?
27146   echo "$as_me:27146: \$? = $ac_status" >&5
27147   (exit "$ac_status"); } &&
27148          { ac_try='test -s "conftest.$ac_objext"'
27149   { (eval echo "$as_me:27149: \"$ac_try\"") >&5
27150   (eval $ac_try) 2>&5
27151   ac_status=$?
27152   echo "$as_me:27152: \$? = $ac_status" >&5
27153   (exit "$ac_status"); }; }; then
27154   ac_lo=0 ac_mid=0
27155   while :; do
27156     cat >"conftest.$ac_ext" <<_ACEOF
27157 #line 27157 "configure"
27158 #include "confdefs.h"
27159 $ac_includes_default
27160 int
27161 main (void)
27162 {
27163 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27164   ;
27165   return 0;
27166 }
27167 _ACEOF
27168 rm -f "conftest.$ac_objext"
27169 if { (eval echo "$as_me:27169: \"$ac_compile\"") >&5
27170   (eval $ac_compile) 2>&5
27171   ac_status=$?
27172   echo "$as_me:27172: \$? = $ac_status" >&5
27173   (exit "$ac_status"); } &&
27174          { ac_try='test -s "conftest.$ac_objext"'
27175   { (eval echo "$as_me:27175: \"$ac_try\"") >&5
27176   (eval $ac_try) 2>&5
27177   ac_status=$?
27178   echo "$as_me:27178: \$? = $ac_status" >&5
27179   (exit "$ac_status"); }; }; then
27180   ac_hi=$ac_mid; break
27181 else
27182   echo "$as_me: failed program was:" >&5
27183 cat "conftest.$ac_ext" >&5
27184 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27185 fi
27186 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27187   done
27188 else
27189   echo "$as_me: failed program was:" >&5
27190 cat "conftest.$ac_ext" >&5
27191 ac_hi=-1 ac_mid=-1
27192   while :; do
27193     cat >"conftest.$ac_ext" <<_ACEOF
27194 #line 27194 "configure"
27195 #include "confdefs.h"
27196 $ac_includes_default
27197 int
27198 main (void)
27199 {
27200 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27201   ;
27202   return 0;
27203 }
27204 _ACEOF
27205 rm -f "conftest.$ac_objext"
27206 if { (eval echo "$as_me:27206: \"$ac_compile\"") >&5
27207   (eval $ac_compile) 2>&5
27208   ac_status=$?
27209   echo "$as_me:27209: \$? = $ac_status" >&5
27210   (exit "$ac_status"); } &&
27211          { ac_try='test -s "conftest.$ac_objext"'
27212   { (eval echo "$as_me:27212: \"$ac_try\"") >&5
27213   (eval $ac_try) 2>&5
27214   ac_status=$?
27215   echo "$as_me:27215: \$? = $ac_status" >&5
27216   (exit "$ac_status"); }; }; then
27217   ac_lo=$ac_mid; break
27218 else
27219   echo "$as_me: failed program was:" >&5
27220 cat "conftest.$ac_ext" >&5
27221 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27222 fi
27223 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27224   done
27225 fi
27226 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27227 # Binary search between lo and hi bounds.
27228 while test "x$ac_lo" != "x$ac_hi"; do
27229   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27230   cat >"conftest.$ac_ext" <<_ACEOF
27231 #line 27231 "configure"
27232 #include "confdefs.h"
27233 $ac_includes_default
27234 int
27235 main (void)
27236 {
27237 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27238   ;
27239   return 0;
27240 }
27241 _ACEOF
27242 rm -f "conftest.$ac_objext"
27243 if { (eval echo "$as_me:27243: \"$ac_compile\"") >&5
27244   (eval $ac_compile) 2>&5
27245   ac_status=$?
27246   echo "$as_me:27246: \$? = $ac_status" >&5
27247   (exit "$ac_status"); } &&
27248          { ac_try='test -s "conftest.$ac_objext"'
27249   { (eval echo "$as_me:27249: \"$ac_try\"") >&5
27250   (eval $ac_try) 2>&5
27251   ac_status=$?
27252   echo "$as_me:27252: \$? = $ac_status" >&5
27253   (exit "$ac_status"); }; }; then
27254   ac_hi=$ac_mid
27255 else
27256   echo "$as_me: failed program was:" >&5
27257 cat "conftest.$ac_ext" >&5
27258 ac_lo=`expr "$ac_mid" + 1`
27259 fi
27260 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27261 done
27262 ac_cv_sizeof_wchar_t=$ac_lo
27263 else
27264   if test "$cross_compiling" = yes; then
27265   { { echo "$as_me:27265: error: cannot run test program while cross compiling" >&5
27266 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27267    { (exit 1); exit 1; }; }
27268 else
27269   cat >"conftest.$ac_ext" <<_ACEOF
27270 #line 27270 "configure"
27271 #include "confdefs.h"
27272 $ac_includes_default
27273 int
27274 main (void)
27275 {
27276 FILE *f = fopen ("conftest.val", "w");
27277 if (!f)
27278   $ac_main_return (1);
27279 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
27280 fclose (f);
27281   ;
27282   return 0;
27283 }
27284 _ACEOF
27285 rm -f "conftest$ac_exeext"
27286 if { (eval echo "$as_me:27286: \"$ac_link\"") >&5
27287   (eval $ac_link) 2>&5
27288   ac_status=$?
27289   echo "$as_me:27289: \$? = $ac_status" >&5
27290   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27291   { (eval echo "$as_me:27291: \"$ac_try\"") >&5
27292   (eval $ac_try) 2>&5
27293   ac_status=$?
27294   echo "$as_me:27294: \$? = $ac_status" >&5
27295   (exit "$ac_status"); }; }; then
27296   ac_cv_sizeof_wchar_t=`cat conftest.val`
27297 else
27298   echo "$as_me: program exited with status $ac_status" >&5
27299 echo "$as_me: failed program was:" >&5
27300 cat "conftest.$ac_ext" >&5
27301 fi
27302 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27303 fi
27304 fi
27305 rm -f conftest.val
27306 else
27307   ac_cv_sizeof_wchar_t=0
27308 fi
27309 fi
27310 echo "$as_me:27310: result: $ac_cv_sizeof_wchar_t" >&5
27311 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27312 cat >>confdefs.h <<EOF
27313 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27314 EOF
27315
27316         # cross-compiling to mingw can run into the problem that attempting to
27317         # link with the regex library fails, causing the test to not set this to
27318         # a number.  "recent" autoconf does not address this problem either -TD
27319         if test -z "$ac_cv_sizeof_wchar_t"
27320         then
27321                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27322
27323 echo "${as_me:-configure}:27323: testing test failed (assume 2) ..." 1>&5
27324
27325                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27326                 mv confdefs.tmp confdefs.h
27327                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27328         fi
27329 fi
27330
27331 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27332 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27333 ###
27334 ### ticlib modules may be a separate library, otherwise contained in termlib.
27335 ### termlib modules may be a separate library, otherwise contained in ncurses.
27336 ###
27337 ### The of "+" or " " between the tokens controls the way the script
27338 ### chooses to split module lists into libraries.
27339 ###
27340 ### (see CF_LIB_RULES).
27341 echo "$as_me:27341: checking for library subsets" >&5
27342 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27343 LIB_SUBSETS=
27344
27345 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27346         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27347         if test "$with_ticlib" != no ; then
27348                 LIB_SUBSETS="${LIB_SUBSETS} "
27349         else
27350                 LIB_SUBSETS="${LIB_SUBSETS}+"
27351         fi
27352 fi
27353
27354 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27355 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27356
27357 if test "$with_termlib" != no ; then
27358         LIB_SUBSETS="${LIB_SUBSETS} "
27359 else
27360         LIB_SUBSETS="${LIB_SUBSETS}+"
27361 fi
27362
27363 LIB_SUBSETS="${LIB_SUBSETS}base"
27364
27365 # Most term-driver calls are to tinfo, but some like init_pair are to the
27366 # base library (so it resides in base).
27367 if test "$with_term_driver" != no ; then
27368         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27369         case "$cf_cv_system_name" in
27370         (*mingw32*|*mingw64*)
27371                 if test "x$with_exp_win32" = xyes ; then
27372                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27373                 else
27374                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27375                 fi
27376                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27377                 ;;
27378         (*)
27379                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27380                 ;;
27381         esac
27382 elif test "x$with_exp_win32" = xyes ; then
27383         case "$cf_cv_system_name" in
27384         (*mingw32*|*mingw64*)
27385                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27386                 ;;
27387         (*)
27388                 ;;
27389         esac
27390 fi
27391
27392 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27393 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27394
27395 echo "$as_me:27395: result: $LIB_SUBSETS" >&5
27396 echo "${ECHO_T}$LIB_SUBSETS" >&6
27397
27398 ### Construct the list of include-directories to be generated
27399
27400 if test "$srcdir" != "."; then
27401         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27402 fi
27403 CPPFLAGS="-I../include $CPPFLAGS"
27404 if test "$srcdir" != "."; then
27405         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27406 fi
27407 CPPFLAGS="-I. $CPPFLAGS"
27408
27409 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27410 if test "$srcdir" != "."; then
27411         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27412 fi
27413 if test "$GCC" != yes; then
27414         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27415 elif test "$includedir" != "/usr/include"; then
27416         if test "$includedir" = '${prefix}/include' ; then
27417                 if test x$prefix != x/usr ; then
27418                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27419                 fi
27420         else
27421                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27422         fi
27423 fi
27424
27425 ### Build up pieces for makefile rules
27426 echo "$as_me:27426: checking default library suffix" >&5
27427 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27428
27429         case $DFT_LWR_MODEL in
27430         (libtool) DFT_ARG_SUFFIX=''   ;;
27431         (normal)  DFT_ARG_SUFFIX=''   ;;
27432         (debug)   DFT_ARG_SUFFIX='_g' ;;
27433         (profile) DFT_ARG_SUFFIX='_p' ;;
27434         (shared)  DFT_ARG_SUFFIX=''   ;;
27435         esac
27436         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27437 echo "$as_me:27437: result: $DFT_ARG_SUFFIX" >&5
27438 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27439
27440 echo "$as_me:27440: checking default library-dependency suffix" >&5
27441 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27442
27443         case X$DFT_LWR_MODEL in
27444         (Xlibtool)
27445                 DFT_LIB_SUFFIX='.la'
27446                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27447                 ;;
27448         (Xdebug)
27449                 case "$cf_cv_system_name" in
27450                 (*-msvc*)
27451                         DFT_LIB_SUFFIX='_g.lib'
27452                         ;;
27453                 (*)
27454                         DFT_LIB_SUFFIX='_g.a'
27455                         ;;
27456                 esac
27457                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27458                 ;;
27459         (Xprofile)
27460                 case "$cf_cv_system_name" in
27461                 (*-msvc*)
27462                         DFT_LIB_SUFFIX='_p.lib'
27463                         ;;
27464                 (*)
27465                         DFT_LIB_SUFFIX='_p.a'
27466                         ;;
27467                 esac
27468                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27469                 ;;
27470         (Xshared)
27471                 case "$cf_cv_system_name" in
27472                 (aix[5-7]*)
27473                         DFT_LIB_SUFFIX='.so'
27474                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27475                         ;;
27476                 (*-msvc*)
27477                         DFT_LIB_SUFFIX='.dll'
27478                         DFT_DEP_SUFFIX='.dll.lib'
27479                         ;;
27480                 (cygwin*|msys*|mingw*)
27481                         DFT_LIB_SUFFIX='.dll'
27482                         DFT_DEP_SUFFIX='.dll.a'
27483                         ;;
27484                 (darwin*)
27485                         DFT_LIB_SUFFIX='.dylib'
27486                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27487                         ;;
27488                 (hpux*)
27489                         case "$target" in
27490                         (ia64*)
27491                                 DFT_LIB_SUFFIX='.so'
27492                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27493                                 ;;
27494                         (*)
27495                                 DFT_LIB_SUFFIX='.sl'
27496                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27497                                 ;;
27498                         esac
27499                         ;;
27500                 (*)
27501                         DFT_LIB_SUFFIX='.so'
27502                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27503                         ;;
27504                 esac
27505                 ;;
27506         (*)
27507                 case "$target" in
27508                 (*-msvc*)
27509                         DFT_LIB_SUFFIX='.lib'
27510                         ;;
27511                 (*)
27512                         DFT_LIB_SUFFIX='.a'
27513                         ;;
27514                 esac
27515                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27516                 ;;
27517         esac
27518         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27519         then
27520                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27521                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27522         fi
27523 echo "$as_me:27523: result: $DFT_DEP_SUFFIX" >&5
27524 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27525
27526 echo "$as_me:27526: checking default object directory" >&5
27527 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27528
27529         case $DFT_LWR_MODEL in
27530         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27531         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27532         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27533         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27534         (shared)
27535                 case "$cf_cv_system_name" in
27536                 (cygwin|msys)
27537                         DFT_OBJ_SUBDIR='objects' ;;
27538                 (*)
27539                         DFT_OBJ_SUBDIR='obj_s' ;;
27540                 esac
27541         esac
27542 echo "$as_me:27542: result: $DFT_OBJ_SUBDIR" >&5
27543 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27544
27545 if test "x$cf_with_cxx" = xyes ; then
27546 echo "$as_me:27546: checking c++ library-dependency suffix" >&5
27547 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27548 if test "$with_libtool" != "no"; then
27549         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27550         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27551 elif test "$with_shared_cxx" != "no"; then
27552         # also for g++ users...
27553         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27554 else
27555         # we normally make a static library because C/C++ library rules differ
27556
27557         case Xnormal in
27558         (Xlibtool)
27559                 CXX_LIB_SUFFIX='.la'
27560                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27561                 ;;
27562         (Xdebug)
27563                 case "$cf_cv_system_name" in
27564                 (*-msvc*)
27565                         CXX_LIB_SUFFIX='_g.lib'
27566                         ;;
27567                 (*)
27568                         CXX_LIB_SUFFIX='_g.a'
27569                         ;;
27570                 esac
27571                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27572                 ;;
27573         (Xprofile)
27574                 case "$cf_cv_system_name" in
27575                 (*-msvc*)
27576                         CXX_LIB_SUFFIX='_p.lib'
27577                         ;;
27578                 (*)
27579                         CXX_LIB_SUFFIX='_p.a'
27580                         ;;
27581                 esac
27582                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27583                 ;;
27584         (Xshared)
27585                 case "$cf_cv_system_name" in
27586                 (aix[5-7]*)
27587                         CXX_LIB_SUFFIX='.so'
27588                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27589                         ;;
27590                 (*-msvc*)
27591                         CXX_LIB_SUFFIX='.dll'
27592                         CXX_DEP_SUFFIX='.dll.lib'
27593                         ;;
27594                 (cygwin*|msys*|mingw*)
27595                         CXX_LIB_SUFFIX='.dll'
27596                         CXX_DEP_SUFFIX='.dll.a'
27597                         ;;
27598                 (darwin*)
27599                         CXX_LIB_SUFFIX='.dylib'
27600                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27601                         ;;
27602                 (hpux*)
27603                         case "$target" in
27604                         (ia64*)
27605                                 CXX_LIB_SUFFIX='.so'
27606                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27607                                 ;;
27608                         (*)
27609                                 CXX_LIB_SUFFIX='.sl'
27610                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27611                                 ;;
27612                         esac
27613                         ;;
27614                 (*)
27615                         CXX_LIB_SUFFIX='.so'
27616                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27617                         ;;
27618                 esac
27619                 ;;
27620         (*)
27621                 case "$target" in
27622                 (*-msvc*)
27623                         CXX_LIB_SUFFIX='.lib'
27624                         ;;
27625                 (*)
27626                         CXX_LIB_SUFFIX='.a'
27627                         ;;
27628                 esac
27629                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27630                 ;;
27631         esac
27632         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27633         then
27634                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27635                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27636         fi
27637
27638 fi
27639 echo "$as_me:27639: result: $CXX_LIB_SUFFIX" >&5
27640 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27641
27642 fi
27643
27644 # do not want -ldl in build except as needed for -lncurses dependency
27645 if test "x$with_dlsym" = xyes ; then
27646 if test "$DFT_LWR_MODEL" = shared || \
27647    test "$DFT_LWR_MODEL" = libtool ; then
27648
27649 # remove dl library from $LIBS
27650 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27651
27652 fi
27653 fi
27654 ### Set up low-level terminfo dependencies for makefiles.
27655
27656 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27657 # do not need libdl
27658 TICS_LIST=
27659 if test "x$with_dlsym" = xyes ; then
27660
27661 # remove dl library from $SHLIB_LIST
27662 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27663
27664 fi
27665
27666 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27667 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27668 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27669 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27670 then
27671         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27672 fi
27673
27674 if test "$with_ticlib" != no ; then
27675
27676         if test "x$with_ticlib" != xyes ; then
27677                 TICS_NAME=$with_ticlib
27678                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27679                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27680                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27681                 TICS_LIB_SUFFIX="${with_ticlib}"
27682         else
27683                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27684                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27685                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27686                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27687         fi
27688         TICS_LDFLAGS="-L${LIB_DIR}"
27689         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27690 else
27691         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27692         TICS_LDFLAGS="-L${LIB_DIR}"
27693         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27694 fi
27695
27696 if test "$with_termlib" != no ; then
27697
27698         if test "x$with_termlib" != xyes ; then
27699                 TINFO_NAME=$with_termlib
27700                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27701                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27702                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27703                 TINFO_LIB_SUFFIX="${with_termlib}"
27704         else
27705                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27706                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
27707                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
27708                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
27709         fi
27710
27711         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27712         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27713         if test "$DFT_LWR_MODEL" = "libtool"; then
27714                 TEST_ARGS="${TEST_DEPS}"
27715                 TEST_ARG2="${TEST_DEP2}"
27716                 TINFO_LDFLAGS="-L${LIB_DIR}"
27717                 TINFO_LIBS="$TEST_ARGS"
27718                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
27719                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
27720         else
27721                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
27722                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
27723                 if test "x$with_term_driver" != xno ; then
27724                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27725                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
27726                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27727                 else
27728                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27729                         TINFO_LIBS="$TEST_ARGS"
27730                 fi
27731                 TINFO_LDFLAGS="-L${LIB_DIR}"
27732                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27733         fi
27734 else
27735         # the next lines are needed for linking libtic over libncurses
27736         TINFO_NAME=${LIB_NAME}
27737         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27738         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
27739         if test "x$with_tic_depends" = xyes ; then
27740                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27741         else
27742                 TICS_LIST="$SHLIB_LIST"
27743         fi
27744
27745         TINFO_LDFLAGS="-L${LIB_DIR}"
27746         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27747 fi
27748
27749 if test "$DFT_LWR_MODEL" = shared ; then
27750         case "$cf_cv_system_name" in
27751         (cygwin*|msys*)
27752                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
27753                 TINFO_SUFFIX=.dll
27754                 ;;
27755         esac
27756 fi
27757
27758 if test "x$with_dlsym" = xyes ; then
27759
27760 # remove dl library from $TICS_LIST
27761 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
27762
27763 fi
27764
27765 if test "$DFT_LWR_MODEL" = "libtool"; then
27766         OBJEXT=lo
27767 fi
27768
27769 # needed for Ada95
27770 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
27771
27772 case "$DFT_LWR_MODEL" in
27773 (normal|debug|profile)
27774
27775 if test "$GCC" = yes ; then
27776         case "$cf_cv_system_name" in
27777         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
27778                 LDFLAGS_STATIC=
27779                 LDFLAGS_SHARED=
27780                 ;;
27781         (*)     # normally, except when broken
27782                 LDFLAGS_STATIC=-static
27783                 LDFLAGS_SHARED=-dynamic
27784                 ;;
27785         esac
27786 else
27787         case "$cf_cv_system_name" in
27788         (aix[4-7]*)     # from ld manpage
27789                 LDFLAGS_STATIC=-bstatic
27790                 LDFLAGS_SHARED=-bdynamic
27791                 ;;
27792         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
27793                 # We could also use just "archive" and "shared".
27794                 LDFLAGS_STATIC=-Wl,-a,archive_shared
27795                 LDFLAGS_SHARED=-Wl,-a,shared_archive
27796                 ;;
27797         (irix*)         # from ld manpage IRIX64
27798                 LDFLAGS_STATIC=-Bstatic
27799                 LDFLAGS_SHARED=-Bdynamic
27800                 ;;
27801         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
27802                 # alternative "-oldstyle_liblookup" (not in cc manpage)
27803                 LDFLAGS_STATIC=-noso
27804                 LDFLAGS_SHARED=-so_archive
27805                 ;;
27806         (solaris2*)
27807                 LDFLAGS_STATIC=-Bstatic
27808                 LDFLAGS_SHARED=-Bdynamic
27809                 ;;
27810         esac
27811 fi
27812
27813 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
27814 then
27815         echo "$as_me:27815: checking if linker supports switching between static/dynamic" >&5
27816 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
27817
27818         rm -f libconftest.a
27819         cat >conftest.$ac_ext <<EOF
27820 #line 27820 "configure"
27821 #include <stdio.h>
27822 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
27823 EOF
27824         if { (eval echo "$as_me:27824: \"$ac_compile\"") >&5
27825   (eval $ac_compile) 2>&5
27826   ac_status=$?
27827   echo "$as_me:27827: \$? = $ac_status" >&5
27828   (exit "$ac_status"); } ; then
27829                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
27830                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
27831         fi
27832         rm -f conftest.*
27833
27834         cf_save_LIBS="$LIBS"
27835
27836         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
27837         cat >"conftest.$ac_ext" <<_ACEOF
27838 #line 27838 "configure"
27839 #include "confdefs.h"
27840
27841 #line 27841 "configure"
27842 #include <stdio.h>
27843 int cf_ldflags_static(FILE *fp);
27844
27845 int
27846 main (void)
27847 {
27848
27849         return cf_ldflags_static(stdin);
27850
27851   ;
27852   return 0;
27853 }
27854 _ACEOF
27855 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27856 if { (eval echo "$as_me:27856: \"$ac_link\"") >&5
27857   (eval $ac_link) 2>&5
27858   ac_status=$?
27859   echo "$as_me:27859: \$? = $ac_status" >&5
27860   (exit "$ac_status"); } &&
27861          { ac_try='test -s "conftest$ac_exeext"'
27862   { (eval echo "$as_me:27862: \"$ac_try\"") >&5
27863   (eval $ac_try) 2>&5
27864   ac_status=$?
27865   echo "$as_me:27865: \$? = $ac_status" >&5
27866   (exit "$ac_status"); }; }; then
27867
27868         # some linkers simply ignore the -dynamic
27869         case x`file "conftest$ac_exeext" 2>/dev/null` in
27870         (*static*)
27871                 cf_ldflags_static=no
27872                 ;;
27873         (*)
27874                 cf_ldflags_static=yes
27875                 ;;
27876         esac
27877
27878 else
27879   echo "$as_me: failed program was:" >&5
27880 cat "conftest.$ac_ext" >&5
27881 cf_ldflags_static=no
27882 fi
27883 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27884
27885         rm -f libconftest.*
27886         LIBS="$cf_save_LIBS"
27887
27888         echo "$as_me:27888: result: $cf_ldflags_static" >&5
27889 echo "${ECHO_T}$cf_ldflags_static" >&6
27890
27891         if test "$cf_ldflags_static" != yes
27892         then
27893                 LDFLAGS_STATIC=
27894                 LDFLAGS_SHARED=
27895         fi
27896 else
27897         LDFLAGS_STATIC=
27898         LDFLAGS_SHARED=
27899 fi
27900
27901         ;;
27902 esac
27903
27904 echo "$as_me:27904: checking where we will install curses.h" >&5
27905 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
27906
27907 includesubdir=
27908 if test "$with_overwrite" = no && \
27909  { test "x$includedir" = 'x${prefix}/include' || \
27910    test "x$includedir" = "x${prefix}/include"; }
27911 then
27912         includesubdir="/ncurses${USE_LIB_SUFFIX}"
27913 fi
27914 echo "$as_me:27914: result: ${includedir}${includesubdir}" >&5
27915 echo "${ECHO_T}${includedir}${includesubdir}" >&6
27916
27917 ### Resolve a conflict between normal and wide-curses by forcing applications
27918 ### that will need libutf8 to add it to their configure script.
27919 if test "$with_overwrite" != no ; then
27920 if test "$NCURSES_LIBUTF8" = 1 ; then
27921         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
27922         { echo "$as_me:27922: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
27923 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
27924 fi
27925 fi
27926 WITH_OVERWRITE=$with_overwrite
27927
27928 ### At least on MinGW a shared library build without libtool
27929 ### requires adding the additional libs to the link list.
27930 case "$cf_cv_system_name" in
27931 (*mingw32*|*mingw64*)
27932         if test "$DFT_LWR_MODEL" != "libtool"; then
27933            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
27934         fi
27935         ;;
27936 *)      ;;
27937 esac
27938
27939 # used to separate tack out of the tree
27940 NCURSES_TREE=
27941
27942 ### predefined stuff for the test programs
27943
27944 cat >>confdefs.h <<\EOF
27945 #define HAVE_SLK_COLOR 1
27946 EOF
27947
27948 # pkgsrc uses these
27949
27950 echo "$as_me:27950: checking for desired basename for form library" >&5
27951 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
27952
27953 # Check whether --with-form-libname or --without-form-libname was given.
27954 if test "${with_form_libname+set}" = set; then
27955   withval="$with_form_libname"
27956   with_lib_basename=$withval
27957 else
27958   with_lib_basename=form
27959 fi;
27960 FORM_NAME="$with_lib_basename"
27961
27962 case "x$FORM_NAME" in
27963 (x|xno|xnone|xyes)
27964         FORM_NAME=form
27965         ;;
27966 (*)
27967         ;;
27968 esac
27969
27970 echo "$as_me:27970: result: $FORM_NAME" >&5
27971 echo "${ECHO_T}$FORM_NAME" >&6
27972
27973 echo "$as_me:27973: checking for desired basename for menu library" >&5
27974 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
27975
27976 # Check whether --with-menu-libname or --without-menu-libname was given.
27977 if test "${with_menu_libname+set}" = set; then
27978   withval="$with_menu_libname"
27979   with_lib_basename=$withval
27980 else
27981   with_lib_basename=menu
27982 fi;
27983 MENU_NAME="$with_lib_basename"
27984
27985 case "x$MENU_NAME" in
27986 (x|xno|xnone|xyes)
27987         MENU_NAME=menu
27988         ;;
27989 (*)
27990         ;;
27991 esac
27992
27993 echo "$as_me:27993: result: $MENU_NAME" >&5
27994 echo "${ECHO_T}$MENU_NAME" >&6
27995
27996 echo "$as_me:27996: checking for desired basename for panel library" >&5
27997 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
27998
27999 # Check whether --with-panel-libname or --without-panel-libname was given.
28000 if test "${with_panel_libname+set}" = set; then
28001   withval="$with_panel_libname"
28002   with_lib_basename=$withval
28003 else
28004   with_lib_basename=panel
28005 fi;
28006 PANEL_NAME="$with_lib_basename"
28007
28008 case "x$PANEL_NAME" in
28009 (x|xno|xnone|xyes)
28010         PANEL_NAME=panel
28011         ;;
28012 (*)
28013         ;;
28014 esac
28015
28016 echo "$as_me:28016: result: $PANEL_NAME" >&5
28017 echo "${ECHO_T}$PANEL_NAME" >&6
28018
28019 echo "$as_me:28019: checking for desired basename for cxx library" >&5
28020 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28021
28022 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28023 if test "${with_cxx_libname+set}" = set; then
28024   withval="$with_cxx_libname"
28025   with_lib_basename=$withval
28026 else
28027   with_lib_basename=ncurses++
28028 fi;
28029 CXX_NAME="$with_lib_basename"
28030
28031 case "x$CXX_NAME" in
28032 (x|xno|xnone|xyes)
28033         CXX_NAME=ncurses++
28034         ;;
28035 (*)
28036         ;;
28037 esac
28038
28039 echo "$as_me:28039: result: $CXX_NAME" >&5
28040 echo "${ECHO_T}$CXX_NAME" >&6
28041
28042 ### Construct the list of subdirectories for which we'll customize makefiles
28043 ### with the appropriate compile-rules.
28044
28045 echo "$as_me:28045: checking for src modules" >&5
28046 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28047
28048 # dependencies and linker-arguments for test-programs
28049 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28050 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28051 if test "$DFT_LWR_MODEL" = "libtool"; then
28052         TEST_ARGS="${TEST_DEPS}"
28053         TEST_ARG2="${TEST_DEP2}"
28054 else
28055         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28056         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28057 fi
28058
28059 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28060 cf_cv_src_modules=
28061 for cf_dir in $modules_to_build
28062 do
28063         if test -f "$srcdir/$cf_dir/modules" ; then
28064
28065                 # We may/may not have tack in the distribution, though the
28066                 # makefile is.
28067                 if test "$cf_dir" = tack ; then
28068                         if test "x$cf_with_tack" != "xyes"; then
28069                                 continue
28070                         fi
28071                 fi
28072
28073                 if test -z "$cf_cv_src_modules"; then
28074                         cf_cv_src_modules=$cf_dir
28075                 else
28076                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28077                 fi
28078
28079                 # Make the ncurses_cfg.h file record the library interface files as
28080                 # well.  These are header files that are the same name as their
28081                 # directory.  Ncurses is the only library that does not follow
28082                 # that pattern.
28083                 if test "$cf_dir" = tack ; then
28084                         continue
28085                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28086
28087 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28088
28089                         cat >>confdefs.h <<EOF
28090 #define HAVE_${cf_have_include}_H 1
28091 EOF
28092
28093                         cat >>confdefs.h <<EOF
28094 #define HAVE_LIB${cf_have_include} 1
28095 EOF
28096
28097 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28098
28099 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28100
28101                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28102                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28103                         if test "$DFT_LWR_MODEL" = "libtool"; then
28104                                 TEST_ARGS="${TEST_DEPS}"
28105                                 TEST_ARG2="${TEST_DEP2}"
28106                         else
28107                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28108                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28109                         fi
28110                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28111                 fi
28112         fi
28113 done
28114 echo "$as_me:28114: result: $cf_cv_src_modules" >&5
28115 echo "${ECHO_T}$cf_cv_src_modules" >&6
28116
28117 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28118 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28119
28120 SRC_SUBDIRS=
28121 if test "x$cf_with_manpages" != xno ; then
28122         SRC_SUBDIRS="$SRC_SUBDIRS man"
28123 fi
28124 SRC_SUBDIRS="$SRC_SUBDIRS include"
28125 for cf_dir in $cf_cv_src_modules
28126 do
28127         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28128 done
28129 if test "x$cf_with_tests" != "xno" ; then
28130         SRC_SUBDIRS="$SRC_SUBDIRS test"
28131 fi
28132 # always make this, to install the ncurses-config script
28133 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28134 if test "$cf_with_cxx_binding" != no; then
28135         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28136         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28137 fi
28138
28139 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28140 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28141
28142 ADA_SUBDIRS=
28143 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28144         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28145         ADA_SUBDIRS="gen src"
28146         if test "x$cf_with_tests" != "xno" ; then
28147                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28148         fi
28149 fi
28150
28151 SUB_MAKEFILES=
28152 for cf_dir in $SRC_SUBDIRS
28153 do
28154         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28155 done
28156
28157 if test -n "$ADA_SUBDIRS"; then
28158         for cf_dir in $ADA_SUBDIRS
28159         do
28160                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28161         done
28162
28163 fi
28164
28165 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28166    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28167    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28168    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28169 fi
28170
28171 DIRS_TO_MAKE="lib"
28172 for cf_item in $cf_list_models
28173 do
28174
28175         case $cf_item in
28176         (libtool) cf_subdir='obj_lo'  ;;
28177         (normal)  cf_subdir='objects' ;;
28178         (debug)   cf_subdir='obj_g' ;;
28179         (profile) cf_subdir='obj_p' ;;
28180         (shared)
28181                 case "$cf_cv_system_name" in
28182                 (cygwin|msys)
28183                         cf_subdir='objects' ;;
28184                 (*)
28185                         cf_subdir='obj_s' ;;
28186                 esac
28187         esac
28188
28189         for cf_item2 in $DIRS_TO_MAKE
28190         do
28191                 test "$cf_item2" = "$cf_subdir" && break
28192         done
28193         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28194 done
28195 for cf_dir in $DIRS_TO_MAKE
28196 do
28197         test ! -d "$cf_dir" && mkdir "$cf_dir"
28198 done
28199
28200 # symbols that differ when compiling Ada95 by itself.
28201 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28202
28203 # values to use as strings
28204
28205 cat >>confdefs.h <<EOF
28206 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28207 EOF
28208
28209 cat >>confdefs.h <<EOF
28210 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28211 EOF
28212
28213 ### Define substitutions for header files to avoid name-pollution
28214
28215 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28216         HAVE_TCGETATTR=1
28217 else
28218         HAVE_TCGETATTR=0
28219 fi
28220
28221 if test "x$ac_cv_header_stdint_h" = xyes ; then
28222         HAVE_STDINT_H=1
28223 else
28224         HAVE_STDINT_H=0
28225 fi
28226
28227 if test "x$ac_cv_header_termio_h" = xyes ; then
28228         HAVE_TERMIO_H=1
28229 else
28230         HAVE_TERMIO_H=0
28231 fi
28232
28233 if test "x$ac_cv_header_termios_h" = xyes ; then
28234         HAVE_TERMIOS_H=1
28235 else
28236         HAVE_TERMIOS_H=0
28237 fi
28238
28239 ################################################################################
28240 test "x$use_database" = xyes && \
28241 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28242
28243 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28244 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28245
28246 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28247 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28248 fi
28249
28250 if test "x$cf_with_tests" != xno ; then
28251         MAKE_TESTS=
28252 else
28253         MAKE_TESTS="#"
28254 fi
28255
28256 ADAHTML_DIR=../../doc/html/ada
28257
28258 # workaround for OS/2 (20151017)
28259 case "$cf_cv_system_name" in
28260 (os2*)
28261         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28262         ;;
28263 (*)
28264         LIBTOOL_OPTS_CXX=
28265         ;;
28266 esac
28267
28268 # workaround for g++ versus Solaris (20131116)
28269 case "$cf_cv_system_name" in
28270 (solaris2*)
28271         case "x$CPPFLAGS" in
28272         (*-D_XOPEN_SOURCE_EXTENDED*)
28273                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28274
28275 echo "${as_me:-configure}:28275: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28276
28277                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28278                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28279                 ;;
28280         esac
28281         ;;
28282 esac
28283
28284 # Help to automatically enable the extended curses features when using either
28285 # the *-config or the ".pc" files by adding defines.
28286 echo "$as_me:28286: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28287 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28288 PKG_CFLAGS=
28289 for cf_loop1 in $CPPFLAGS_after_XOPEN
28290 do
28291         cf_found=no
28292         for cf_loop2 in $CPPFLAGS_before_XOPEN
28293         do
28294                 if test "x$cf_loop1" = "x$cf_loop2"
28295                 then
28296                         cf_found=yes
28297                         break
28298                 fi
28299         done
28300         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28301 done
28302 echo "$as_me:28302: result: $PKG_CFLAGS" >&5
28303 echo "${ECHO_T}$PKG_CFLAGS" >&6
28304
28305 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28306 case "x$NCURSES_OSPEED" in
28307 (*short*)
28308         cf_compatible=1
28309         ;;
28310 (*)
28311         cf_compatible=0
28312         ;;
28313 esac
28314
28315 cat >>confdefs.h <<EOF
28316 #define NCURSES_OSPEED_COMPAT $cf_compatible
28317 EOF
28318
28319 case "x$cf_cv_typeof_chtype" in
28320 (xshort|xint|xlong)
28321         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28322         ;;
28323 esac
28324
28325 case "x$cf_cv_typeof_mmask_t" in
28326 (xshort|xint|xlong)
28327         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28328         ;;
28329 esac
28330
28331 # substitute into misc/Makefile to suppress
28332 # (un)install.data from the
28333 # (un)install rules.
28334 if test "x$cf_with_db_install" = "xno"; then
28335         MISC_INSTALL_DATA=
28336         MISC_UNINSTALL_DATA=
28337 else
28338         MISC_INSTALL_DATA=install.data
28339         MISC_UNINSTALL_DATA=uninstall.data
28340 fi
28341
28342 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28343         MAKE_DATABASE="#"
28344 else
28345         MAKE_DATABASE="$MAKE_TERMINFO"
28346 fi
28347
28348 if test -n "$PACKAGE"
28349 then
28350         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28351         export PACKAGE
28352         echo "package: $PACKAGE"
28353 fi
28354
28355 UNALTERED_SYMS=
28356 cf_filter_syms=no
28357
28358 if test -n "$RESULTING_SYMS"
28359 then
28360         cf_filter_syms=$cf_dft_filter_syms
28361         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28362
28363 echo "${as_me:-configure}:28363: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28364
28365 fi
28366
28367 if test "x$WILDCARD_SYMS" = xno
28368 then
28369         cf_filter_syms=yes
28370 fi
28371
28372 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28373
28374 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28375 if test "$cf_filter_syms" = yes
28376 then
28377         RESULTING_SYMS=resulting.map
28378 fi
28379
28380 if test "x$cross_compiling" = xyes ; then
28381         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28382         CHECK_BUILD="#"
28383 else
28384         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28385         CHECK_BUILD=
28386 fi
28387
28388 # This is used for the *-config script and *.pc data files.
28389
28390 echo "$as_me:28390: checking for linker search path" >&5
28391 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28392 if test "${cf_cv_ld_searchpath+set}" = set; then
28393   echo $ECHO_N "(cached) $ECHO_C" >&6
28394 else
28395
28396 if test "$cross_compiling" != yes ; then
28397
28398 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28399 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28400
28401 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28402 # update the cache, which makes it run faster.
28403 test -z "$cf_pathlist" && \
28404         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28405
28406 test -z "$cf_pathlist" &&
28407         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28408
28409 # This works with OpenBSD 6.5, which lists only filenames
28410 test -z "$cf_pathlist" &&
28411         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28412
28413 if test -z "$cf_pathlist"
28414 then
28415         # dyld default path with MacOS
28416         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28417         then
28418                 # do this to bypass check
28419                 cf_cv_ld_searchpath='$HOME/lib'
28420                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28421         fi
28422 fi
28423
28424 if test -z "$cf_pathlist"
28425 then
28426         # Solaris is "SunOS"
28427         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28428         then
28429                 case x`(isainfo -b)` in
28430                 (x64)
28431                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28432                         ;;
28433                 (x32)
28434                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28435                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28436                         ;;
28437                 (*)
28438                         { echo "$as_me:28438: WARNING: problem with Solaris architecture" >&5
28439 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28440                         ;;
28441                 esac
28442         fi
28443 fi
28444
28445 if test -z "$cf_pathlist"
28446 then
28447         # HP-UX
28448         if test x"`uname -s`" = xHP-UX
28449         then
28450                 case x`getconf LONG_BIT` in
28451                 (x64)
28452                         cf_pathlist="/usr/lib/hpux64"
28453                         ;;
28454                 (x*)
28455                         cf_pathlist="/usr/lib/hpux32"
28456                         ;;
28457                 esac
28458         fi
28459 fi
28460
28461 fi
28462
28463 # If nothing else, assume it is conventional
28464 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28465
28466 # Finally, check that this is only directories
28467 for cf_path in $0 $cf_pathlist
28468 do
28469         if test -d "$cf_path"; then
28470                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28471                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28472         fi
28473 done
28474
28475 # Ensure that it is nonempty
28476 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28477
28478 fi
28479 echo "$as_me:28479: result: $cf_cv_ld_searchpath" >&5
28480 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28481
28482 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28483
28484 cat >>confdefs.h <<\EOF
28485 #define HAVE_CURSES_DATA_BOOLNAMES 1
28486 EOF
28487
28488 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"
28489 ac_config_commands="$ac_config_commands default"
28490 cat >confcache <<\_ACEOF
28491 # This file is a shell script that caches the results of configure
28492 # tests run on this system so they can be shared between configure
28493 # scripts and configure runs, see configure's option --config-cache.
28494 # It is not useful on other systems.  If it contains results you don't
28495 # want to keep, you may remove or edit it.
28496 #
28497 # config.status only pays attention to the cache file if you give it
28498 # the --recheck option to rerun configure.
28499 #
28500 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28501 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28502 # following values.
28503
28504 _ACEOF
28505
28506 # The following way of writing the cache mishandles newlines in values,
28507 # but we know of no workaround that is simple, portable, and efficient.
28508 # So, don't put newlines in cache variables' values.
28509 # Ultrix sh set writes to stderr and can't be redirected directly,
28510 # and sets the high bit in the cache file unless we assign to the vars.
28511 {
28512   (set) 2>&1 |
28513     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28514     *ac_space=\ *)
28515       # `set' does not quote correctly, so add quotes (double-quote
28516       # substitution turns \\\\ into \\, and sed turns \\ into \).
28517       sed -n \
28518         "s/'/'\\\\''/g;
28519           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28520       ;;
28521     *)
28522       # `set' quotes correctly as required by POSIX, so do not add quotes.
28523       sed -n \
28524         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28525       ;;
28526     esac;
28527 } |
28528   sed '
28529      t clear
28530      : clear
28531      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28532      t end
28533      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28534      : end' >>confcache
28535 if cmp -s $cache_file confcache; then :; else
28536   if test -w $cache_file; then
28537     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28538     cat confcache >$cache_file
28539   else
28540     echo "not updating unwritable cache $cache_file"
28541   fi
28542 fi
28543 rm -f confcache
28544
28545 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28546 # Let make expand exec_prefix.
28547 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28548
28549 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28550 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28551 # trailing colons and then remove the whole line if VPATH becomes empty
28552 # (actually we leave an empty line to preserve line numbers).
28553 if test "x$srcdir" = x.; then
28554   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28555 s/:*\$(srcdir):*/:/;
28556 s/:*\${srcdir}:*/:/;
28557 s/:*@srcdir@:*/:/;
28558 s/^\([^=]*=[    ]*\):*/\1/;
28559 s/:*$//;
28560 s/^[^=]*=[      ]*$//;
28561 }'
28562 fi
28563
28564 DEFS=-DHAVE_CONFIG_H
28565
28566 : "${CONFIG_STATUS=./config.status}"
28567 ac_clean_files_save=$ac_clean_files
28568 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28569 { echo "$as_me:28569: creating $CONFIG_STATUS" >&5
28570 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28571 cat >"$CONFIG_STATUS" <<_ACEOF
28572 #! $SHELL
28573 # Generated automatically by configure.
28574 # Run this file to recreate the current configuration.
28575 # Compiler output produced by configure, useful for debugging
28576 # configure, is in config.log if it exists.
28577
28578 debug=false
28579 SHELL=\${CONFIG_SHELL-$SHELL}
28580 ac_cs_invocation="\$0 \$@"
28581
28582 CLICOLOR_FORCE= GREP_OPTIONS=
28583 unset CLICOLOR_FORCE GREP_OPTIONS
28584 _ACEOF
28585
28586 cat >>"$CONFIG_STATUS" <<\_ACEOF
28587 # Be Bourne compatible
28588 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28589   emulate sh
28590   NULLCMD=:
28591 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28592   set -o posix
28593 fi
28594
28595 # Name of the executable.
28596 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28597
28598 if expr a : '\(a\)' >/dev/null 2>&1; then
28599   as_expr=expr
28600 else
28601   as_expr=false
28602 fi
28603
28604 rm -f conf$$ conf$$.exe conf$$.file
28605 echo >conf$$.file
28606 if ln -s conf$$.file conf$$ 2>/dev/null; then
28607   # We could just check for DJGPP; but this test a) works b) is more generic
28608   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28609   if test -f conf$$.exe; then
28610     # Don't use ln at all; we don't have any links
28611     as_ln_s='cp -p'
28612   else
28613     as_ln_s='ln -s'
28614   fi
28615 elif ln conf$$.file conf$$ 2>/dev/null; then
28616   as_ln_s=ln
28617 else
28618   as_ln_s='cp -p'
28619 fi
28620 rm -f conf$$ conf$$.exe conf$$.file
28621
28622 as_executable_p="test -f"
28623
28624 # Support unset when possible.
28625 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28626   as_unset="unset"
28627 else
28628   as_unset="false"
28629 fi
28630
28631 # NLS nuisances.
28632 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28633 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28634 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28635 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28636 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28637 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28638 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28639 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28640
28641 # IFS
28642 # We need space, tab and new line, in precisely that order.
28643 as_nl='
28644 '
28645 IFS="   $as_nl"
28646
28647 # CDPATH.
28648 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28649
28650 exec 6>&1
28651
28652 _ACEOF
28653
28654 # Files that config.status was made for.
28655 if test -n "$ac_config_files"; then
28656   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
28657 fi
28658
28659 if test -n "$ac_config_headers"; then
28660   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
28661 fi
28662
28663 if test -n "$ac_config_links"; then
28664   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
28665 fi
28666
28667 if test -n "$ac_config_commands"; then
28668   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
28669 fi
28670
28671 cat >>"$CONFIG_STATUS" <<\EOF
28672
28673 ac_cs_usage="\
28674 \`$as_me' instantiates files from templates according to the
28675 current configuration.
28676
28677 Usage: $0 [OPTIONS] [FILE]...
28678
28679   -h, --help       print this help, then exit
28680   -V, --version    print version number, then exit
28681   -d, --debug      don't remove temporary files
28682       --recheck    update $as_me by reconfiguring in the same conditions
28683   --file=FILE[:TEMPLATE]
28684                    instantiate the configuration file FILE
28685   --header=FILE[:TEMPLATE]
28686                    instantiate the configuration header FILE
28687
28688 Configuration files:
28689 $config_files
28690
28691 Configuration headers:
28692 $config_headers
28693
28694 Configuration commands:
28695 $config_commands
28696
28697 Report bugs to <dickey@invisible-island.net>."
28698 EOF
28699
28700 cat >>"$CONFIG_STATUS" <<EOF
28701 ac_cs_version="\\
28702 config.status
28703 configured by $0, generated by GNU Autoconf 2.52.20210509,
28704   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28705
28706 Copyright 2003-2020,2021        Thomas E. Dickey
28707 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
28708 Free Software Foundation, Inc.
28709 This config.status script is free software; the Free Software Foundation
28710 gives unlimited permission to copy, distribute and modify it."
28711 srcdir="$srcdir"
28712 INSTALL="$INSTALL"
28713 EOF
28714
28715 cat >>"$CONFIG_STATUS" <<\EOF
28716 # If no file are specified by the user, then we need to provide default
28717 # value.  By we need to know if files were specified by the user.
28718 ac_need_defaults=:
28719 while test $# != 0
28720 do
28721   case $1 in
28722   --*=*)
28723     ac_option=`expr "x$1" : 'x\([^=]*\)='`
28724     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
28725     shift
28726     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
28727     shift
28728     ;;
28729   -*);;
28730   *) # This is not an option, so the user has probably given explicit
28731      # arguments.
28732      ac_need_defaults=false;;
28733   esac
28734
28735   case $1 in
28736   # Handling of the options.
28737 EOF
28738 cat >>"$CONFIG_STATUS" <<EOF
28739   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28740     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
28741     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
28742 EOF
28743 cat >>"$CONFIG_STATUS" <<\EOF
28744   --version | --vers* | -V )
28745     echo "$ac_cs_version"; exit 0 ;;
28746   --he | --h)
28747     # Conflict between --help and --header
28748     { { echo "$as_me:28748: error: ambiguous option: $1
28749 Try \`$0 --help' for more information." >&5
28750 echo "$as_me: error: ambiguous option: $1
28751 Try \`$0 --help' for more information." >&2;}
28752    { (exit 1); exit 1; }; };;
28753   --help | --hel | -h )
28754     echo "$ac_cs_usage"; exit 0 ;;
28755   --debug | --d* | -d )
28756     debug=: ;;
28757   --file | --fil | --fi | --f )
28758     shift
28759     CONFIG_FILES="$CONFIG_FILES $1"
28760     ac_need_defaults=false;;
28761   --header | --heade | --head | --hea )
28762     shift
28763     CONFIG_HEADERS="$CONFIG_HEADERS $1"
28764     ac_need_defaults=false;;
28765
28766   # This is an error.
28767   -*) { { echo "$as_me:28767: error: unrecognized option: $1
28768 Try \`$0 --help' for more information." >&5
28769 echo "$as_me: error: unrecognized option: $1
28770 Try \`$0 --help' for more information." >&2;}
28771    { (exit 1); exit 1; }; } ;;
28772
28773   *) ac_config_targets="$ac_config_targets $1" ;;
28774
28775   esac
28776   shift
28777 done
28778
28779 exec 5>>config.log
28780 cat >&5 << _ACEOF
28781
28782 ## ----------------------- ##
28783 ## Running config.status.  ##
28784 ## ----------------------- ##
28785
28786 This file was extended by $as_me 2.52.20210509, executed with
28787   CONFIG_FILES    = $CONFIG_FILES
28788   CONFIG_HEADERS  = $CONFIG_HEADERS
28789   CONFIG_LINKS    = $CONFIG_LINKS
28790   CONFIG_COMMANDS = $CONFIG_COMMANDS
28791   > "$ac_cs_invocation"
28792 on `(hostname || uname -n) 2>/dev/null | sed 1q`
28793
28794 _ACEOF
28795 EOF
28796
28797 cat >>"$CONFIG_STATUS" <<EOF
28798 #
28799 # INIT-COMMANDS section.
28800 #
28801
28802 ### Special initialization commands, used to pass information from the
28803 ### configuration-run into config.status
28804
28805 ALTERNATE_SYMS="$ALTERNATE_SYMS"
28806 AWK="$AWK"
28807 CXX_NAME="$CXX_NAME"
28808 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
28809 DFT_LWR_MODEL="$DFT_LWR_MODEL"
28810 ECHO_LD="$ECHO_LD"
28811 EXTRA_SUFFIX="$EXTRA_SUFFIX"
28812 FORM_NAME="$FORM_NAME"
28813 LDCONFIG="$LDCONFIG"
28814 LIBTOOL_VERSION="$LIBTOOL_VERSION"
28815 LIB_NAME="$LIB_NAME"
28816 LIB_PREFIX="$LIB_PREFIX"
28817 LIB_SUBSETS="$LIB_SUBSETS"
28818 LIB_SUFFIX="$LIB_SUFFIX"
28819 LIB_TRACING="$LIB_TRACING"
28820 LN_S="$LN_S"
28821 MAKE_TERMINFO="$MAKE_TERMINFO"
28822 MENU_NAME="$MENU_NAME"
28823 NCURSES_MAJOR="$NCURSES_MAJOR"
28824 NCURSES_MINOR="$NCURSES_MINOR"
28825 NCURSES_OSPEED="$NCURSES_OSPEED"
28826 NCURSES_PATCH="$NCURSES_PATCH"
28827 PANEL_NAME="$PANEL_NAME"
28828 SRC_SUBDIRS="$SRC_SUBDIRS"
28829 TERMINFO="$TERMINFO"
28830 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
28831 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
28832 TICS_NAME="$TICS_NAME"
28833 TICS_SUFFIX="$TICS_SUFFIX"
28834 TIC_PATH="$TIC_PATH"
28835 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
28836 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
28837 TINFO_NAME="$TINFO_NAME"
28838 TINFO_SUFFIX="$TINFO_SUFFIX"
28839 UNALTERED_SYMS="$UNALTERED_SYMS"
28840 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
28841 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
28842 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
28843 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
28844 WILDCARD_SYMS="$WILDCARD_SYMS"
28845 WITH_CURSES_H="$with_curses_h"
28846 WITH_ECHO="${enable_echo:=yes}"
28847 WITH_OVERWRITE="$with_overwrite"
28848 cf_LIST_MODELS="$cf_list_models"
28849 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
28850 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
28851 cf_cv_abi_version="$cf_cv_abi_version"
28852 cf_cv_do_relink="$cf_cv_do_relink"
28853 cf_cv_do_reranlib="$cf_cv_do_reranlib"
28854 cf_cv_do_symlinks="$cf_cv_do_symlinks"
28855 cf_cv_enable_lp64="$cf_cv_enable_lp64"
28856 cf_cv_enable_opaque="$cf_cv_enable_opaque"
28857 cf_cv_make_PHONY="$cf_cv_make_PHONY"
28858 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
28859 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
28860 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
28861 cf_cv_rel_version="$cf_cv_rel_version"
28862 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
28863 cf_cv_shared_soname='$cf_cv_shared_soname'
28864 cf_cv_shlib_version="$cf_cv_shlib_version"
28865 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
28866 cf_cv_system_name="$cf_cv_system_name"
28867 cf_cv_term_driver="$with_term_driver"
28868 cf_with_ada="$cf_with_ada"
28869 cf_with_cxx_binding="$cf_with_cxx_binding"
28870 cf_with_db_install="$cf_with_db_install"
28871 cf_with_manpages="$cf_with_manpages"
28872 cf_with_tests="$cf_with_tests"
28873 host="$host"
28874 target="$target"
28875 with_shared_cxx="$with_shared_cxx"
28876
28877 EOF
28878
28879 cat >>"$CONFIG_STATUS" <<\EOF
28880 for ac_config_target in $ac_config_targets
28881 do
28882   case "$ac_config_target" in
28883   # Handling of arguments.
28884   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
28885   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
28886   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
28887   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
28888   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
28889   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
28890   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
28891   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
28892   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
28893   *) { { echo "$as_me:28893: error: invalid argument: $ac_config_target" >&5
28894 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
28895    { (exit 1); exit 1; }; };;
28896   esac
28897 done
28898
28899 # If the user did not use the arguments to specify the items to instantiate,
28900 # then the envvar interface is used.  Set only those that are not.
28901 # We use the long form for the default assignment because of an extremely
28902 # bizarre bug on SunOS 4.1.3.
28903 if "$ac_need_defaults"; then
28904   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28905   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28906   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
28907 fi
28908
28909 # Create a temporary directory, and hook for its removal unless debugging.
28910 $debug ||
28911 {
28912   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
28913   trap '{ (exit 1); exit 1; }' 1 2 13 15
28914 }
28915
28916 # Create a (secure) tmp directory for tmp files.
28917 : ${TMPDIR=/tmp}
28918 {
28919   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
28920   test -n "$tmp" && test -d "$tmp"
28921 }  ||
28922 {
28923   tmp=$TMPDIR/cs$$-$RANDOM
28924   (umask 077 && mkdir $tmp)
28925 } ||
28926 {
28927    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
28928    { (exit 1); exit 1; }
28929 }
28930
28931 EOF
28932
28933 cat >>"$CONFIG_STATUS" <<EOF
28934
28935 #
28936 # CONFIG_FILES section.
28937 #
28938
28939 # No need to generate the scripts if there are no CONFIG_FILES.
28940 # This happens for instance when ./config.status config.h
28941 if test -n "\$CONFIG_FILES"; then
28942   # Protect against being on the right side of a sed subst in config.status.
28943   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
28944    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
28945 s,@SHELL@,$SHELL,;t t
28946 s,@exec_prefix@,$exec_prefix,;t t
28947 s,@prefix@,$prefix,;t t
28948 s,@program_transform_name@,$program_transform_name,;t t
28949 s,@bindir@,$bindir,;t t
28950 s,@sbindir@,$sbindir,;t t
28951 s,@libexecdir@,$libexecdir,;t t
28952 s,@datarootdir@,$datarootdir,;t t
28953 s,@datadir@,$datadir,;t t
28954 s,@sysconfdir@,$sysconfdir,;t t
28955 s,@sharedstatedir@,$sharedstatedir,;t t
28956 s,@localstatedir@,$localstatedir,;t t
28957 s,@runstatedir@,$runstatedir,;t t
28958 s,@libdir@,$libdir,;t t
28959 s,@includedir@,$includedir,;t t
28960 s,@oldincludedir@,$oldincludedir,;t t
28961 s,@infodir@,$infodir,;t t
28962 s,@mandir@,$mandir,;t t
28963 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
28964 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
28965 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
28966 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
28967 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
28968 s,@build_alias@,$build_alias,;t t
28969 s,@host_alias@,$host_alias,;t t
28970 s,@target_alias@,$target_alias,;t t
28971 s,@ECHO_C@,$ECHO_C,;t t
28972 s,@ECHO_N@,$ECHO_N,;t t
28973 s,@ECHO_T@,$ECHO_T,;t t
28974 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
28975 s,@DEFS@,$DEFS,;t t
28976 s,@LIBS@,$LIBS,;t t
28977 s,@top_builddir@,$top_builddir,;t t
28978 s,@GREP@,$GREP,;t t
28979 s,@EGREP@,$EGREP,;t t
28980 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
28981 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
28982 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
28983 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
28984 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
28985 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
28986 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
28987 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
28988 s,@VERSION@,$VERSION,;t t
28989 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
28990 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
28991 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
28992 s,@PACKAGE@,$PACKAGE,;t t
28993 s,@build@,$build,;t t
28994 s,@build_cpu@,$build_cpu,;t t
28995 s,@build_vendor@,$build_vendor,;t t
28996 s,@build_os@,$build_os,;t t
28997 s,@host@,$host,;t t
28998 s,@host_cpu@,$host_cpu,;t t
28999 s,@host_vendor@,$host_vendor,;t t
29000 s,@host_os@,$host_os,;t t
29001 s,@target@,$target,;t t
29002 s,@target_cpu@,$target_cpu,;t t
29003 s,@target_vendor@,$target_vendor,;t t
29004 s,@target_os@,$target_os,;t t
29005 s,@FGREP@,$FGREP,;t t
29006 s,@CC@,$CC,;t t
29007 s,@CFLAGS@,$CFLAGS,;t t
29008 s,@LDFLAGS@,$LDFLAGS,;t t
29009 s,@CPPFLAGS@,$CPPFLAGS,;t t
29010 s,@ac_ct_CC@,$ac_ct_CC,;t t
29011 s,@EXEEXT@,$EXEEXT,;t t
29012 s,@OBJEXT@,$OBJEXT,;t t
29013 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29014 s,@CPP@,$CPP,;t t
29015 s,@LDCONFIG@,$LDCONFIG,;t t
29016 s,@CXX@,$CXX,;t t
29017 s,@CXXFLAGS@,$CXXFLAGS,;t t
29018 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29019 s,@AWK@,$AWK,;t t
29020 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29021 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29022 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29023 s,@LINT@,$LINT,;t t
29024 s,@LINT_OPTS@,$LINT_OPTS,;t t
29025 s,@LN_S@,$LN_S,;t t
29026 s,@cf_config_suffix@,$cf_config_suffix,;t t
29027 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29028 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29029 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29030 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29031 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29032 s,@SET_MAKE@,$SET_MAKE,;t t
29033 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29034 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29035 s,@CTAGS@,$CTAGS,;t t
29036 s,@ETAGS@,$ETAGS,;t t
29037 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29038 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29039 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29040 s,@RANLIB@,$RANLIB,;t t
29041 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29042 s,@LD@,$LD,;t t
29043 s,@ac_ct_LD@,$ac_ct_LD,;t t
29044 s,@AR@,$AR,;t t
29045 s,@ac_ct_AR@,$ac_ct_AR,;t t
29046 s,@NM@,$NM,;t t
29047 s,@ac_ct_NM@,$ac_ct_NM,;t t
29048 s,@ARFLAGS@,$ARFLAGS,;t t
29049 s,@DESTDIR@,$DESTDIR,;t t
29050 s,@BUILD_CC@,$BUILD_CC,;t t
29051 s,@BUILD_CPP@,$BUILD_CPP,;t t
29052 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29053 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29054 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29055 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29056 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29057 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29058 s,@cf_list_models@,$cf_list_models,;t t
29059 s,@ABI_VERSION@,$ABI_VERSION,;t t
29060 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29061 s,@LIBTOOL@,$LIBTOOL,;t t
29062 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29063 s,@LT_UNDEF@,$LT_UNDEF,;t t
29064 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29065 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29066 s,@LIB_CREATE@,$LIB_CREATE,;t t
29067 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29068 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29069 s,@LIB_PREP@,$LIB_PREP,;t t
29070 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29071 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29072 s,@LIB_LINK@,$LIB_LINK,;t t
29073 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29074 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29075 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29076 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29077 s,@TICS_NAME@,$TICS_NAME,;t t
29078 s,@TINFO_NAME@,$TINFO_NAME,;t t
29079 s,@LIB_NAME@,$LIB_NAME,;t t
29080 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29081 s,@CC_G_OPT@,$CC_G_OPT,;t t
29082 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29083 s,@LD_MODEL@,$LD_MODEL,;t t
29084 s,@shlibdir@,$shlibdir,;t t
29085 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29086 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29087 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29088 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29089 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29090 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29091 s,@LINK_PROGS@,$LINK_PROGS,;t t
29092 s,@LINK_TESTS@,$LINK_TESTS,;t t
29093 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29094 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29095 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29096 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29097 s,@RPATH_LIST@,$RPATH_LIST,;t t
29098 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29099 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29100 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29101 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29102 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29103 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29104 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29105 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29106 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29107 s,@TIC@,$TIC,;t t
29108 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29109 s,@INFOCMP@,$INFOCMP,;t t
29110 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29111 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29112 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29113 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29114 s,@XTERM_KBS@,$XTERM_KBS,;t t
29115 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29116 s,@TERMINFO@,$TERMINFO,;t t
29117 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29118 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29119 s,@TERMPATH@,$TERMPATH,;t t
29120 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29121 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29122 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29123 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29124 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29125 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29126 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29127 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29128 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29129 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29130 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29131 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29132 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29133 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29134 s,@RGB_PATH@,$RGB_PATH,;t t
29135 s,@no_x11_rgb@,$no_x11_rgb,;t t
29136 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29137 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29138 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29139 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29140 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29141 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29142 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29143 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29144 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29145 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29146 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29147 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29148 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29149 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29150 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29151 s,@PTHREAD@,$PTHREAD,;t t
29152 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29153 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29154 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29155 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29156 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29157 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29158 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29159 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29160 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29161 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29162 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29163 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29164 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29165 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29166 s,@ECHO_LT@,$ECHO_LT,;t t
29167 s,@ECHO_LD@,$ECHO_LD,;t t
29168 s,@RULE_CC@,$RULE_CC,;t t
29169 s,@SHOW_CC@,$SHOW_CC,;t t
29170 s,@ECHO_CC@,$ECHO_CC,;t t
29171 s,@ECHO_LINK@,$ECHO_LINK,;t t
29172 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29173 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29174 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29175 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29176 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29177 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29178 s,@ADAFLAGS@,$ADAFLAGS,;t t
29179 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29180 s,@ADA_TRACE@,$ADA_TRACE,;t t
29181 s,@MATH_LIB@,$MATH_LIB,;t t
29182 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29183 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29184 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29185 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29186 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29187 s,@TEST_LIBS@,$TEST_LIBS,;t t
29188 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29189 s,@CXXCPP@,$CXXCPP,;t t
29190 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29191 s,@CXX_AR@,$CXX_AR,;t t
29192 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29193 s,@CXXLIBS@,$CXXLIBS,;t t
29194 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29195 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29196 s,@M4_exists@,$M4_exists,;t t
29197 s,@cf_ada_make@,$cf_ada_make,;t t
29198 s,@cf_ada_config@,$cf_ada_config,;t t
29199 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29200 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29201 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29202 s,@cf_compile_generics@,$cf_compile_generics,;t t
29203 s,@cf_generic_objects@,$cf_generic_objects,;t t
29204 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29205 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29206 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29207 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29208 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29209 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29210 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29211 s,@cf_ada_package@,$cf_ada_package,;t t
29212 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29213 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29214 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29215 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29216 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29217 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29218 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29219 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29220 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29221 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29222 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29223 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29224 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29225 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29226 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29227 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29228 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29229 s,@TICS_LIBS@,$TICS_LIBS,;t t
29230 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29231 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29232 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29233 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29234 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29235 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29236 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29237 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29238 s,@includesubdir@,$includesubdir,;t t
29239 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29240 s,@TICS_LIST@,$TICS_LIST,;t t
29241 s,@TINFO_LIST@,$TINFO_LIST,;t t
29242 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29243 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29244 s,@FORM_NAME@,$FORM_NAME,;t t
29245 s,@MENU_NAME@,$MENU_NAME,;t t
29246 s,@PANEL_NAME@,$PANEL_NAME,;t t
29247 s,@CXX_NAME@,$CXX_NAME,;t t
29248 s,@TEST_ARGS@,$TEST_ARGS,;t t
29249 s,@TEST_DEPS@,$TEST_DEPS,;t t
29250 s,@TEST_ARG2@,$TEST_ARG2,;t t
29251 s,@TEST_DEP2@,$TEST_DEP2,;t t
29252 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29253 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29254 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29255 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29256 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29257 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29258 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29259 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29260 s,@cross_compiling@,$cross_compiling,;t t
29261 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29262 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29263 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29264 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29265 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29266 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29267 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29268 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29269 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29270 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29271 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29272 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29273 CEOF
29274
29275 EOF
29276
29277   cat >>"$CONFIG_STATUS" <<\EOF
29278   # Split the substitutions into bite-sized pieces for seds with
29279   # small command number limits, like on Digital OSF/1 and HP-UX.
29280   ac_max_sed_lines=48
29281   ac_sed_frag=1 # Number of current file.
29282   ac_beg=1 # First line for current file.
29283   ac_end=$ac_max_sed_lines # Line after last line for current file.
29284   ac_more_lines=:
29285   ac_sed_cmds=
29286   while "$ac_more_lines"; do
29287     if test "$ac_beg" -gt 1; then
29288       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29289     else
29290       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29291     fi
29292     if test ! -s $tmp/subs.frag; then
29293       ac_more_lines=false
29294     else
29295       # The purpose of the label and of the branching condition is to
29296       # speed up the sed processing (if there are no `@' at all, there
29297       # is no need to browse any of the substitutions).
29298       # These are the two extra sed commands mentioned above.
29299       (echo ':t
29300   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29301       # It is possible to make a multiline substitution using escaped newlines.
29302       # Ensure that we do not split the substitution between script fragments.
29303       ac_BEG=$ac_end
29304       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29305       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29306       if test -s $tmp/subs.next; then
29307         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29308         if test ! -s $tmp/subs.edit; then
29309           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29310           if test ! -s $tmp/subs.edit; then
29311             if test "$ac_beg" -gt 1; then
29312               ac_end=`expr "$ac_end" - 1`
29313               continue
29314             fi
29315           fi
29316         fi
29317       fi
29318
29319       if test -z "$ac_sed_cmds"; then
29320         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29321       else
29322         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29323       fi
29324       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29325       ac_beg=$ac_end
29326       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29327     fi
29328   done
29329   if test -z "$ac_sed_cmds"; then
29330     ac_sed_cmds=cat
29331   fi
29332 fi # test -n "$CONFIG_FILES"
29333
29334 EOF
29335 cat >>"$CONFIG_STATUS" <<\EOF
29336 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29337   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29338   case "$ac_file" in
29339   - | *:- | *:-:* ) # input from stdin
29340         cat >$tmp/stdin
29341         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29342         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29343   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29344         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29345   * )   ac_file_in=$ac_file.in ;;
29346   esac
29347
29348   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29349   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29350          X"$ac_file" : 'X\(//\)[^/]' \| \
29351          X"$ac_file" : 'X\(//\)$' \| \
29352          X"$ac_file" : 'X\(/\)' \| \
29353          .     : '\(.\)' 2>/dev/null ||
29354 echo X"$ac_file" |
29355     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29356           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29357           /^X\(\/\/\)$/{ s//\1/; q; }
29358           /^X\(\/\).*/{ s//\1/; q; }
29359           s/.*/./; q'`
29360   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29361     { case "$ac_dir" in
29362   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29363   *)                      as_incr_dir=.;;
29364 esac
29365 as_dummy="$ac_dir"
29366 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29367   case $as_mkdir_dir in
29368     # Skip DOS drivespec
29369     ?:) as_incr_dir=$as_mkdir_dir ;;
29370     *)
29371       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29372       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29373     ;;
29374   esac
29375 done; }
29376
29377     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29378     # A "../" for each directory in $ac_dir_suffix.
29379     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29380   else
29381     ac_dir_suffix= ac_dots=
29382   fi
29383
29384   case "$srcdir" in
29385   .)  ac_srcdir=.
29386       if test -z "$ac_dots"; then
29387          ac_top_srcdir=.
29388       else
29389          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29390       fi ;;
29391   [\\/]* | ?:[\\/]* )
29392       ac_srcdir="$srcdir$ac_dir_suffix";
29393       ac_top_srcdir="$srcdir" ;;
29394   *) # Relative path.
29395     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29396     ac_top_srcdir="$ac_dots$srcdir" ;;
29397   esac
29398
29399   case $INSTALL in
29400   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29401   *) ac_INSTALL=$ac_dots$INSTALL ;;
29402   esac
29403
29404   if test x"$ac_file" != x-; then
29405     { echo "$as_me:29405: creating $ac_file" >&5
29406 echo "$as_me: creating $ac_file" >&6;}
29407     rm -f "$ac_file"
29408   fi
29409   # Let's still pretend it is `configure' which instantiates (i.e., don't
29410   # use $as_me), people would be surprised to read:
29411   #    /* config.h.  Generated automatically by config.status.  */
29412   configure_input="Generated automatically from `echo $ac_file_in |
29413                                                  sed 's,.*/,,'` by configure."
29414
29415   # First look for the input files in the build tree, otherwise in the
29416   # src tree.
29417   ac_file_inputs=`IFS=:
29418     for f in $ac_file_in; do
29419       case $f in
29420       -) echo $tmp/stdin ;;
29421       [\\/$]*)
29422          # Absolute (can't be DOS-style, as IFS=:)
29423          test -f "$f" || { { echo "$as_me:29423: error: cannot find input file: $f" >&5
29424 echo "$as_me: error: cannot find input file: $f" >&2;}
29425    { (exit 1); exit 1; }; }
29426          echo $f;;
29427       *) # Relative
29428          if test -f "$f"; then
29429            # Build tree
29430            echo $f
29431          elif test -f "$srcdir/$f"; then
29432            # Source tree
29433            echo "$srcdir/$f"
29434          else
29435            # /dev/null tree
29436            { { echo "$as_me:29436: error: cannot find input file: $f" >&5
29437 echo "$as_me: error: cannot find input file: $f" >&2;}
29438    { (exit 1); exit 1; }; }
29439          fi;;
29440       esac
29441     done` || { (exit 1); exit 1; }
29442 EOF
29443 cat >>"$CONFIG_STATUS" <<\EOF
29444   ac_warn_datarootdir=no
29445   if test x"$ac_file" != x-; then
29446     for ac_item in $ac_file_inputs
29447     do
29448       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29449       if test -n "$ac_seen"; then
29450         ac_used=`grep '@datarootdir@' "$ac_item"`
29451         if test -z "$ac_used"; then
29452           { echo "$as_me:29452: WARNING: datarootdir was used implicitly but not set:
29453 $ac_seen" >&5
29454 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29455 $ac_seen" >&2;}
29456           ac_warn_datarootdir=yes
29457         fi
29458       fi
29459       ac_seen=`grep '${datarootdir}' "$ac_item"`
29460       if test -n "$ac_seen"; then
29461         { echo "$as_me:29461: WARNING: datarootdir was used explicitly but not set:
29462 $ac_seen" >&5
29463 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29464 $ac_seen" >&2;}
29465         ac_warn_datarootdir=yes
29466       fi
29467     done
29468   fi
29469
29470 if test "x$ac_warn_datarootdir" = xyes; then
29471   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29472 fi
29473
29474 EOF
29475 cat >>"$CONFIG_STATUS" <<EOF
29476   sed "$ac_vpsub
29477 $extrasub
29478 EOF
29479 cat >>"$CONFIG_STATUS" <<\EOF
29480 :t
29481 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29482 s,@configure_input@,$configure_input,;t t
29483 s,@srcdir@,$ac_srcdir,;t t
29484 s,@top_srcdir@,$ac_top_srcdir,;t t
29485 s,@INSTALL@,$ac_INSTALL,;t t
29486 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29487   rm -f $tmp/stdin
29488   if test x"$ac_file" != x-; then
29489     cp "$tmp/out" "$ac_file"
29490
29491     for ac_name in prefix exec_prefix datarootdir
29492     do
29493         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
29494         if test -n "$ac_seen"; then
29495             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
29496             if test -z "$ac_init"; then
29497               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29498               { echo "$as_me:29498: WARNING: Variable $ac_name is used but was not set:
29499 $ac_seen" >&5
29500 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29501 $ac_seen" >&2;}
29502             fi
29503         fi
29504     done
29505     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
29506     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
29507     if test -s $tmp/out; then
29508       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29509       { echo "$as_me:29509: WARNING: Some variables may not be substituted:
29510 $ac_seen" >&5
29511 echo "$as_me: WARNING: Some variables may not be substituted:
29512 $ac_seen" >&2;}
29513     fi
29514   else
29515     cat $tmp/out
29516   fi
29517   rm -f $tmp/out
29518
29519 done
29520 EOF
29521 cat >>"$CONFIG_STATUS" <<\EOF
29522
29523 #
29524 # CONFIG_HEADER section.
29525 #
29526
29527 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29528 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29529 #
29530 # ac_d sets the value in "#define NAME VALUE" lines.
29531 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29532 ac_dB='[        ].*$,\1#\2'
29533 ac_dC=' '
29534 ac_dD=',;t'
29535 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29536 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29537 ac_iB='\([      ]\),\1#\2define\3'
29538 ac_iC=' '
29539 ac_iD='\4,;t'
29540 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29541 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29542 ac_uB='$,\1#\2define\3'
29543 ac_uC=' '
29544 ac_uD=',;t'
29545
29546 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29547   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29548   case "$ac_file" in
29549   - | *:- | *:-:* ) # input from stdin
29550         cat >$tmp/stdin
29551         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29552         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29553   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29554         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29555   * )   ac_file_in=$ac_file.in ;;
29556   esac
29557
29558   test x"$ac_file" != x- && { echo "$as_me:29558: creating $ac_file" >&5
29559 echo "$as_me: creating $ac_file" >&6;}
29560
29561   # First look for the input files in the build tree, otherwise in the
29562   # src tree.
29563   ac_file_inputs=`IFS=:
29564     for f in $ac_file_in; do
29565       case $f in
29566       -) echo $tmp/stdin ;;
29567       [\\/$]*)
29568          # Absolute (can't be DOS-style, as IFS=:)
29569          test -f "$f" || { { echo "$as_me:29569: error: cannot find input file: $f" >&5
29570 echo "$as_me: error: cannot find input file: $f" >&2;}
29571    { (exit 1); exit 1; }; }
29572          echo $f;;
29573       *) # Relative
29574          if test -f "$f"; then
29575            # Build tree
29576            echo $f
29577          elif test -f "$srcdir/$f"; then
29578            # Source tree
29579            echo "$srcdir/$f"
29580          else
29581            # /dev/null tree
29582            { { echo "$as_me:29582: error: cannot find input file: $f" >&5
29583 echo "$as_me: error: cannot find input file: $f" >&2;}
29584    { (exit 1); exit 1; }; }
29585          fi;;
29586       esac
29587     done` || { (exit 1); exit 1; }
29588   # Remove the trailing spaces.
29589   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29590
29591 EOF
29592
29593 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29594 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29595 # be either 'cat' or 'sort'.
29596 cat confdefs.h | uniq >conftest.vals
29597
29598 # Break up conftest.vals because some shells have a limit on
29599 # the size of here documents, and old seds have small limits too.
29600
29601 rm -f conftest.tail
29602 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
29603 while grep . conftest.vals >/dev/null
29604 do
29605   # Write chunks of a limited-size here document to conftest.frag.
29606   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
29607   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
29608   echo 'CEOF' >> "$CONFIG_STATUS"
29609   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
29610   rm -f conftest.vals
29611   mv conftest.tail conftest.vals
29612 done
29613 rm -f conftest.vals
29614
29615 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29616 # marker @DEFS@.
29617 echo '  cat >> conftest.edit <<CEOF
29618 /@DEFS@/r conftest.frag
29619 /@DEFS@/d
29620 CEOF
29621 sed -f conftest.edit $tmp/in > $tmp/out
29622 rm -f $tmp/in
29623 mv $tmp/out $tmp/in
29624 rm -f conftest.edit conftest.frag
29625 ' >> "$CONFIG_STATUS"
29626
29627 cat >>"$CONFIG_STATUS" <<\EOF
29628   # Let's still pretend it is `configure' which instantiates (i.e., don't
29629   # use $as_me), people would be surprised to read:
29630   #    /* config.h.  Generated automatically by config.status.  */
29631   if test x"$ac_file" = x-; then
29632     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29633   else
29634     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29635   fi
29636   cat $tmp/in >>$tmp/config.h
29637   rm -f $tmp/in
29638   if test x"$ac_file" != x-; then
29639     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
29640       { echo "$as_me:29640: $ac_file is unchanged" >&5
29641 echo "$as_me: $ac_file is unchanged" >&6;}
29642     else
29643       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29644          X"$ac_file" : 'X\(//\)[^/]' \| \
29645          X"$ac_file" : 'X\(//\)$' \| \
29646          X"$ac_file" : 'X\(/\)' \| \
29647          .     : '\(.\)' 2>/dev/null ||
29648 echo X"$ac_file" |
29649     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29650           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29651           /^X\(\/\/\)$/{ s//\1/; q; }
29652           /^X\(\/\).*/{ s//\1/; q; }
29653           s/.*/./; q'`
29654       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29655         { case "$ac_dir" in
29656   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29657   *)                      as_incr_dir=.;;
29658 esac
29659 as_dummy="$ac_dir"
29660 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29661   case $as_mkdir_dir in
29662     # Skip DOS drivespec
29663     ?:) as_incr_dir=$as_mkdir_dir ;;
29664     *)
29665       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29666       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29667     ;;
29668   esac
29669 done; }
29670
29671       fi
29672       rm -f "$ac_file"
29673       mv "$tmp/config.h" "$ac_file"
29674     fi
29675   else
29676     cat $tmp/config.h
29677     rm -f $tmp/config.h
29678   fi
29679 done
29680 EOF
29681 cat >>"$CONFIG_STATUS" <<\EOF
29682 #
29683 # CONFIG_COMMANDS section.
29684 #
29685 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29686   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29687   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29688
29689   case "$ac_dest" in
29690     default )
29691 if test "x$cf_with_tests" != xno ; then
29692
29693 for cf_dir in test
29694 do
29695         if test ! -d "$srcdir/$cf_dir" ; then
29696                 continue
29697         elif test -f "$srcdir/$cf_dir/programs" ; then
29698                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
29699         fi
29700 done
29701
29702 fi
29703
29704 cf_prefix=$LIB_PREFIX
29705
29706 case "$cf_cv_shlib_version" in
29707 (cygdll|msysdll|mingw|msvcdll)
29708         TINFO_NAME=$TINFO_ARG_SUFFIX
29709         TINFO_SUFFIX=.dll
29710         ;;
29711 esac
29712
29713 if test -n "$TINFO_SUFFIX" ; then
29714         case "$TINFO_SUFFIX" in
29715         (tw*)
29716                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
29717                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
29718                 ;;
29719         (t*)
29720                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
29721                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
29722                 ;;
29723         (w*)
29724                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
29725                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
29726                 ;;
29727         esac
29728 fi
29729
29730 for cf_dir in $SRC_SUBDIRS
29731 do
29732         if test ! -d "$srcdir/$cf_dir" ; then
29733                 continue
29734         elif test -f "$srcdir/$cf_dir/modules" ; then
29735
29736                 SHARED_LIB=
29737                 Libs_To_Make=
29738                 cf_awk_program=
29739                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
29740                 then
29741                         cf_awk_program="$cf_awk_program\
29742 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
29743 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
29744 "
29745                 fi
29746
29747                 if test "x$WILDCARD_SYMS" = xno
29748                 then
29749                         cf_awk_program="$cf_awk_program\
29750 /[      ]_\\*;/ { skip=1; next; }\
29751 "
29752                 fi
29753
29754                 if test "x$cf_awk_program" != "x"
29755                 then
29756                         cat >>$cf_dir/Makefile <<CF_EOF
29757
29758 # Generated by CF_LIB_RULES
29759 resulting.map: $UNALTERED_SYMS
29760         $AWK 'BEGIN { skip = 1; last=""; } \
29761 $cf_awk_program \
29762 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
29763  skip = 0; last = \$\$0; } \
29764 END { print last; }' < "$UNALTERED_SYMS" >\$@
29765
29766 distclean::
29767         rm -f resulting.map
29768 CF_EOF
29769                 fi
29770
29771                 for cf_item in $cf_LIST_MODELS
29772                 do
29773
29774         case X$cf_item in
29775         (Xlibtool)
29776                 cf_suffix='.la'
29777                 cf_depsuf=$cf_suffix
29778                 ;;
29779         (Xdebug)
29780                 case "$cf_cv_system_name" in
29781                 (*-msvc*)
29782                         cf_suffix='_g.lib'
29783                         ;;
29784                 (*)
29785                         cf_suffix='_g.a'
29786                         ;;
29787                 esac
29788                 cf_depsuf=$cf_suffix
29789                 ;;
29790         (Xprofile)
29791                 case "$cf_cv_system_name" in
29792                 (*-msvc*)
29793                         cf_suffix='_p.lib'
29794                         ;;
29795                 (*)
29796                         cf_suffix='_p.a'
29797                         ;;
29798                 esac
29799                 cf_depsuf=$cf_suffix
29800                 ;;
29801         (Xshared)
29802                 case "$cf_cv_system_name" in
29803                 (aix[5-7]*)
29804                         cf_suffix='.so'
29805                         cf_depsuf=$cf_suffix
29806                         ;;
29807                 (*-msvc*)
29808                         cf_suffix='.dll'
29809                         cf_depsuf='.dll.lib'
29810                         ;;
29811                 (cygwin*|msys*|mingw*)
29812                         cf_suffix='.dll'
29813                         cf_depsuf='.dll.a'
29814                         ;;
29815                 (darwin*)
29816                         cf_suffix='.dylib'
29817                         cf_depsuf=$cf_suffix
29818                         ;;
29819                 (hpux*)
29820                         case "$target" in
29821                         (ia64*)
29822                                 cf_suffix='.so'
29823                                 cf_depsuf=$cf_suffix
29824                                 ;;
29825                         (*)
29826                                 cf_suffix='.sl'
29827                                 cf_depsuf=$cf_suffix
29828                                 ;;
29829                         esac
29830                         ;;
29831                 (*)
29832                         cf_suffix='.so'
29833                         cf_depsuf=$cf_suffix
29834                         ;;
29835                 esac
29836                 ;;
29837         (*)
29838                 case "$target" in
29839                 (*-msvc*)
29840                         cf_suffix='.lib'
29841                         ;;
29842                 (*)
29843                         cf_suffix='.a'
29844                         ;;
29845                 esac
29846                 cf_depsuf=$cf_suffix
29847                 ;;
29848         esac
29849         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29850         then
29851                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29852                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29853         fi
29854
29855                         if test "$cf_dir" = "c++"
29856                         then
29857
29858 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29859
29860 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29861
29862                         else
29863
29864 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29865
29866 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29867
29868                         fi
29869                         test -z "$cf_libname" && cf_libname="$cf_dir"
29870                         if test "$cf_item" = shared ; then
29871                                 if test -n "${LIB_SUFFIX}"
29872                                 then
29873                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29874                                 else
29875                                         cf_shared_suffix="$cf_suffix"
29876                                 fi
29877                                 if test "$cf_cv_do_symlinks" = yes ; then
29878                                         cf_version_name=
29879
29880                                         case "$cf_cv_shlib_version" in
29881                                         (rel)
29882                                                 cf_version_name=REL_VERSION
29883                                                 ;;
29884                                         (abi)
29885                                                 cf_version_name=ABI_VERSION
29886                                                 ;;
29887                                         esac
29888
29889                                         if test -n "$cf_version_name"
29890                                         then
29891                                                 case "$cf_cv_system_name" in
29892                                                 (darwin*)
29893                                                         # "w", etc?
29894                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
29895                                                         ;;
29896                                                 (*)
29897                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
29898                                                         ;;
29899                                                 esac
29900                                         fi
29901                                         if test -n "${USE_LIB_SUFFIX}"
29902                                         then
29903                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29904                                         else
29905                                                 cf_shared_suffix="$cf_suffix"
29906                                         fi
29907                                 fi
29908                                 # cygwin needs import library, and has unique naming convention
29909                                 # use autodetected ${cf_prefix} for import lib and static lib, but
29910                                 # use 'cyg' prefix for shared lib.
29911                                 case "$cf_cv_shlib_version" in
29912                                 (cygdll)
29913                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29914                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
29915                                         ;;
29916                                 (msysdll)
29917                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29918                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
29919                                         ;;
29920                                 (mingw)
29921                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29922                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
29923                                         ;;
29924                                 (msvcdll)
29925                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29926                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
29927                                         ;;
29928                                 (*)
29929                                         cf_add_lib=
29930                                         ;;
29931                                 esac
29932                                 if test -n "$cf_add_lib"
29933                                 then
29934                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29935                                         continue
29936                                 fi
29937                         fi
29938                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
29939                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29940                 done
29941
29942                 if test "$cf_dir" = ncurses ; then
29943                         cf_subsets="$LIB_SUBSETS"
29944                         cf_r_parts="$cf_subsets"
29945                         cf_liblist="$Libs_To_Make"
29946
29947                         while test -n "$cf_r_parts"
29948                         do
29949                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
29950                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
29951                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
29952                                         cf_add_lib=
29953                                         case "$cf_l_parts" in
29954                                         (*termlib*)
29955                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
29956                                                 ;;
29957                                         (*ticlib*)
29958                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
29959                                                 ;;
29960                                         (*)
29961                                                 break
29962                                                 ;;
29963                                         esac
29964                                         if test -n "$cf_add_lib"; then
29965                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
29966                                         fi
29967                                 else
29968                                         break
29969                                 fi
29970                         done
29971                 else
29972                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
29973                 fi
29974
29975                 if test "$cf_dir" = c++; then
29976                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
29977                                 cf_list=
29978                                 for cf_item in $Libs_To_Make
29979                                 do
29980                                         case "$cf_item" in
29981                                         (*.a)
29982                                                 ;;
29983                                         (*)
29984                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
29985                                                 ;;
29986                                         esac
29987                                         for cf_test in $cf_list
29988                                         do
29989                                                 if test "$cf_test" = "$cf_item"
29990                                                 then
29991                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
29992                                                         cf_item=
29993                                                         break
29994                                                 fi
29995                                         done
29996                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
29997                                 done
29998                                 Libs_To_Make="$cf_list"
29999                         fi
30000                 fi
30001
30002                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30003                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30004                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30005                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30006
30007                 $AWK -f "$srcdir/mk-0th.awk" \
30008                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30009                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30010
30011                 for cf_subset in $cf_subsets
30012                 do
30013                         cf_subdirs=
30014                         for cf_item in $cf_LIST_MODELS
30015                         do
30016
30017                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30018
30019 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30020
30021                         CXX_MODEL=$cf_ITEM
30022                         if test "$CXX_MODEL" = SHARED; then
30023                                 case "$cf_cv_shlib_version" in
30024                                 (cygdll|msysdll|mingw|msvcdll)
30025                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30026
30027 echo "${as_me:-configure}:30027: testing overriding CXX_MODEL to SHARED ..." 1>&5
30028
30029                                         with_shared_cxx=yes
30030                                         ;;
30031                                 (*)
30032                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30033                                         ;;
30034                                 esac
30035                         fi
30036
30037         case X$cf_item in
30038         (Xlibtool)
30039                 cf_suffix='.la'
30040                 cf_depsuf=$cf_suffix
30041                 ;;
30042         (Xdebug)
30043                 case "$cf_cv_system_name" in
30044                 (*-msvc*)
30045                         cf_suffix='_g.lib'
30046                         ;;
30047                 (*)
30048                         cf_suffix='_g.a'
30049                         ;;
30050                 esac
30051                 cf_depsuf=$cf_suffix
30052                 ;;
30053         (Xprofile)
30054                 case "$cf_cv_system_name" in
30055                 (*-msvc*)
30056                         cf_suffix='_p.lib'
30057                         ;;
30058                 (*)
30059                         cf_suffix='_p.a'
30060                         ;;
30061                 esac
30062                 cf_depsuf=$cf_suffix
30063                 ;;
30064         (Xshared)
30065                 case "$cf_cv_system_name" in
30066                 (aix[5-7]*)
30067                         cf_suffix='.so'
30068                         cf_depsuf=$cf_suffix
30069                         ;;
30070                 (*-msvc*)
30071                         cf_suffix='.dll'
30072                         cf_depsuf='.dll.lib'
30073                         ;;
30074                 (cygwin*|msys*|mingw*)
30075                         cf_suffix='.dll'
30076                         cf_depsuf='.dll.a'
30077                         ;;
30078                 (darwin*)
30079                         cf_suffix='.dylib'
30080                         cf_depsuf=$cf_suffix
30081                         ;;
30082                 (hpux*)
30083                         case "$target" in
30084                         (ia64*)
30085                                 cf_suffix='.so'
30086                                 cf_depsuf=$cf_suffix
30087                                 ;;
30088                         (*)
30089                                 cf_suffix='.sl'
30090                                 cf_depsuf=$cf_suffix
30091                                 ;;
30092                         esac
30093                         ;;
30094                 (*)
30095                         cf_suffix='.so'
30096                         cf_depsuf=$cf_suffix
30097                         ;;
30098                 esac
30099                 ;;
30100         (*)
30101                 case "$target" in
30102                 (*-msvc*)
30103                         cf_suffix='.lib'
30104                         ;;
30105                 (*)
30106                         cf_suffix='.a'
30107                         ;;
30108                 esac
30109                 cf_depsuf=$cf_suffix
30110                 ;;
30111         esac
30112         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30113         then
30114                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30115                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30116         fi
30117
30118         case $cf_item in
30119         (libtool) cf_subdir='obj_lo'  ;;
30120         (normal)  cf_subdir='objects' ;;
30121         (debug)   cf_subdir='obj_g' ;;
30122         (profile) cf_subdir='obj_p' ;;
30123         (shared)
30124                 case "$cf_cv_system_name" in
30125                 (cygwin|msys)
30126                         cf_subdir='objects' ;;
30127                 (*)
30128                         cf_subdir='obj_s' ;;
30129                 esac
30130         esac
30131
30132                         # Test for case where we build libtinfo with a different name.
30133                         cf_libname=$cf_dir
30134                         if test "$cf_dir" = ncurses ; then
30135                                 case "$cf_subset" in
30136                                 (*base*)
30137                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30138                                         ;;
30139                                 (*termlib*)
30140                                         cf_libname=$TINFO_LIB_SUFFIX
30141                                         ;;
30142                                 (ticlib*)
30143                                         cf_libname=$TICS_LIB_SUFFIX
30144                                         ;;
30145                                 esac
30146                         elif test "$cf_dir" = c++ ; then
30147
30148 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30149
30150 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30151
30152                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30153                         else
30154
30155 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30156
30157 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30158
30159                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30160                         fi
30161                         if test -n "${USE_ARG_SUFFIX}" ; then
30162                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30163                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30164                         fi
30165
30166                         # These dependencies really are for development, not
30167                         # builds, but they are useful in porting, too.
30168                         cf_depend="../include/ncurses_cfg.h"
30169                         if test "$srcdir" = "."; then
30170                                 cf_reldir="."
30171                         else
30172                                 cf_reldir="\${srcdir}"
30173                         fi
30174
30175                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30176                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30177                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30178                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30179                         fi
30180
30181                         cf_dir_suffix=
30182                         old_cf_suffix="$cf_suffix"
30183                         if test "$cf_cv_shlib_version_infix" = yes ; then
30184                         if test -n "$USE_LIB_SUFFIX" ; then
30185                                 case "$USE_LIB_SUFFIX" in
30186                                 (tw*)
30187                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30188                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30189                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30190                                         ;;
30191                                 (t*)
30192                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30193                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30194                                         cf_dir_suffix=t$EXTRA_SUFFIX
30195                                         ;;
30196                                 (w*)
30197                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30198                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30199                                         cf_dir_suffix=w$EXTRA_SUFFIX
30200                                         ;;
30201                                 (*)
30202                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30203                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30204                                         cf_dir_suffix=$EXTRA_SUFFIX
30205                                         ;;
30206                                 esac
30207                         fi
30208                         fi
30209
30210                         $AWK -f "$srcdir/mk-1st.awk" \
30211                                 name=${cf_libname}${cf_dir_suffix} \
30212                                 traces=$LIB_TRACING \
30213                                 MODEL=$cf_ITEM \
30214                                 CXX_MODEL=$CXX_MODEL \
30215                                 LIB_SUFFIX=$LIB_SUFFIX \
30216                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30217                                 make_phony="${cf_cv_make_PHONY:-no}" \
30218                                 model=$cf_subdir \
30219                                 prefix=$cf_prefix \
30220                                 suffix=$cf_suffix \
30221                                 subset=$cf_subset \
30222                                 driver=$cf_cv_term_driver \
30223                                 SymLink="$LN_S" \
30224                                 TermlibRoot=$TINFO_NAME \
30225                                 TermlibSuffix=$TINFO_SUFFIX \
30226                                 ShlibVer=$cf_cv_shlib_version \
30227                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30228                                 ReLink=${cf_cv_do_relink:-no} \
30229                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30230                                 DoLinks=$cf_cv_do_symlinks \
30231                                 rmSoLocs=$cf_cv_rm_so_locs \
30232                                 ldconfig="$LDCONFIG" \
30233                                 overwrite=$WITH_OVERWRITE \
30234                                 depend="$cf_depend" \
30235                                 host="$host" \
30236                                 libtool_version="$LIBTOOL_VERSION" \
30237                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30238
30239                         cf_suffix="$old_cf_suffix"
30240
30241                         for cf_subdir2 in $cf_subdirs lib
30242                         do
30243                                 test "$cf_subdir" = "$cf_subdir2" && break
30244                         done
30245                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30246                         $AWK -f "$srcdir/mk-2nd.awk" \
30247                                 name=$cf_dir \
30248                                 traces=$LIB_TRACING \
30249                                 MODEL=$cf_ITEM \
30250                                 model=$cf_subdir \
30251                                 subset=$cf_subset \
30252                                 srcdir=$srcdir \
30253                                 echo=$WITH_ECHO \
30254                                 crenames=$cf_cv_prog_CC_c_o \
30255                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30256                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30257                         cf_subdirs="$cf_subdirs $cf_subdir"
30258                         done
30259                 done
30260         fi
30261
30262         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30263 done
30264
30265 echo >> Makefile
30266 echo '# generated by CF_LIB_RULES' >> Makefile
30267
30268 if test "x$cf_cv_make_PHONY" = xyes ; then
30269         cat >> Makefile <<-CF_EOF
30270
30271         .PHONY :        libs
30272         .PHONY :        lintlib
30273         .PHONY :        install.includes
30274         .PHONY :        uninstall.includes
30275         .PHONY :        install.libs
30276         .PHONY :        uninstall.libs
30277 CF_EOF
30278 fi
30279
30280 for cf_dir in $SRC_SUBDIRS
30281 do
30282         if test ! -d "$srcdir/$cf_dir" ; then
30283                 continue
30284         fi
30285
30286         if test -f "$cf_dir/Makefile" ; then
30287                 case "$cf_dir" in
30288                 (Ada95)
30289                         echo 'libs \' >> Makefile
30290                         echo 'install.libs \' >> Makefile
30291                         echo 'uninstall.libs ::' >> Makefile
30292                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30293                         ;;
30294                 esac
30295         fi
30296
30297         if test -f "$srcdir/$cf_dir/modules" ; then
30298
30299                 if test "x$cf_cv_make_PHONY" = xyes ; then
30300                         cat >> Makefile <<-CF_EOF
30301
30302                         .PHONY :        install.$cf_dir
30303                         .PHONY :        uninstall.$cf_dir
30304 CF_EOF
30305                 fi
30306
30307                 echo >> Makefile
30308                 if test -f "$srcdir/$cf_dir/headers" ; then
30309 cat >> Makefile <<CF_EOF
30310 install.includes \\
30311 uninstall.includes \\
30312 CF_EOF
30313                 fi
30314
30315 cat >> Makefile <<CF_EOF
30316 lint \\
30317 libs \\
30318 lintlib \\
30319 install.libs \\
30320 uninstall.libs \\
30321 install.$cf_dir \\
30322 uninstall.$cf_dir ::
30323         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30324 CF_EOF
30325         elif test -f "$srcdir/$cf_dir/headers" ; then
30326 cat >> Makefile <<CF_EOF
30327
30328 libs \\
30329 install.libs \\
30330 uninstall.libs \\
30331 install.includes \\
30332 uninstall.includes ::
30333         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30334 CF_EOF
30335 fi
30336 done
30337
30338 if test "x$cf_cv_make_PHONY" = xyes ; then
30339         cat >> Makefile <<-CF_EOF
30340
30341         .PHONY :        install.data
30342         .PHONY :        uninstall.data
30343 CF_EOF
30344 fi
30345
30346 if test "x$cf_with_db_install" = xyes; then
30347 cat >> Makefile <<CF_EOF
30348
30349 install.libs uninstall.libs \\
30350 install.data uninstall.data ::
30351 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30352 CF_EOF
30353 else
30354 cat >> Makefile <<CF_EOF
30355
30356 install.libs uninstall.libs ::
30357         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30358 CF_EOF
30359 fi
30360
30361 if test "x$cf_with_manpages" = xyes; then
30362
30363 if test "x$cf_cv_make_PHONY" = xyes ; then
30364         cat >> Makefile <<-CF_EOF
30365
30366         .PHONY :        install.man
30367         .PHONY :        uninstall.man
30368 CF_EOF
30369 fi
30370
30371 cat >> Makefile <<CF_EOF
30372
30373 install.man \\
30374 uninstall.man ::
30375         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30376 CF_EOF
30377 fi
30378
30379 cat >> Makefile <<CF_EOF
30380
30381 distclean ::
30382         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30383         rm -f headers.sh headers.sed mk_shared_lib.sh
30384         rm -f edit_man.* man_alias.*
30385         rm -rf \${DIRS_TO_MAKE}
30386 CF_EOF
30387
30388 # Special case: tack's manpage lives in its own directory.
30389 if test "x$cf_with_manpages" = xyes; then
30390 if test "x$cf_with_tack" = "xyes"; then
30391 cat >> Makefile <<CF_EOF
30392
30393 install.man \\
30394 uninstall.man ::
30395         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30396 CF_EOF
30397 fi
30398 fi
30399
30400 rm -f headers.sed headers.sh
30401
30402 echo creating headers.sh
30403 cat >headers.sh <<CF_EOF
30404 #! $SHELL
30405 # This shell script is generated by the 'configure' script.  It is invoked in a
30406 # subdirectory of the build tree.  It generates a sed-script in the parent
30407 # directory that is used to adjust includes for header files that reside in a
30408 # subdirectory of /usr/include, etc.
30409 PRG=""
30410 while test \$# != 3
30411 do
30412 PRG="\$PRG \$1"; shift
30413 done
30414 DST=\$1
30415 REF=\$2
30416 SRC=\$3
30417 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30418 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30419 echo installing \$SRC in \$DST
30420 CF_EOF
30421
30422 if test "$WITH_CURSES_H" = yes; then
30423         cat >>headers.sh <<CF_EOF
30424 case \$DST in
30425 (/*/include/*)
30426         END=\`basename \$DST\`
30427         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30428         do
30429                 NAME=\`basename \$i\`
30430                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30431         done
30432         ;;
30433 (*)
30434         echo "" >> \$TMPSED
30435         ;;
30436 esac
30437 CF_EOF
30438
30439 else
30440         cat >>headers.sh <<CF_EOF
30441 case \$DST in
30442 (/*/include/*)
30443         END=\`basename \$DST\`
30444         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30445         do
30446                 NAME=\`basename \$i\`
30447                 if test "\$NAME" = "curses.h"
30448                 then
30449                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30450                         NAME=ncurses.h
30451                 fi
30452                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30453         done
30454         ;;
30455 (*)
30456         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30457         ;;
30458 esac
30459 CF_EOF
30460 fi
30461 cat >>headers.sh <<CF_EOF
30462 rm -f \$TMPSRC
30463 sed -f \$TMPSED \$SRC > \$TMPSRC
30464 NAME=\`basename \$SRC\`
30465 CF_EOF
30466 if test "$WITH_CURSES_H" != yes; then
30467         cat >>headers.sh <<CF_EOF
30468 test "\$NAME" = "curses.h" && NAME=ncurses.h
30469 CF_EOF
30470 fi
30471 cat >>headers.sh <<CF_EOF
30472 # Just in case someone gzip'd manpages, remove the conflicting copy.
30473 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30474
30475 eval \$PRG \$TMPSRC \$DST/\$NAME
30476 rm -f \$TMPSRC \$TMPSED
30477 CF_EOF
30478
30479 chmod 0755 headers.sh
30480
30481 for cf_dir in $SRC_SUBDIRS
30482 do
30483         if test ! -d "$srcdir/$cf_dir" ; then
30484                 continue
30485         fi
30486
30487         if test -f "$srcdir/$cf_dir/headers" ; then
30488                 $AWK -f "$srcdir/mk-hdr.awk" \
30489                         subset="$LIB_SUBSETS" \
30490                         compat="$WITH_CURSES_H" \
30491                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
30492         fi
30493
30494         if test -f "$srcdir/$cf_dir/modules" ; then
30495                 if test "$cf_dir" != "c++" ; then
30496                         if test "x$cf_cv_make_PHONY" = xyes ; then
30497                                 cat >> $cf_dir/Makefile <<-CF_EOF
30498
30499                                 .PHONY :        depend
30500 CF_EOF
30501                         fi
30502
30503                         cat >>$cf_dir/Makefile <<"CF_EOF"
30504 depend : ${AUTO_SRC}
30505         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30506
30507 # DO NOT DELETE THIS LINE -- make depend depends on it.
30508 CF_EOF
30509                 fi
30510         fi
30511 done
30512
30513 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30514 if test -z "$USE_OLD_MAKERULES" ; then
30515         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
30516 fi
30517 fi
30518  ;;
30519   esac
30520 done
30521 EOF
30522
30523 cat >>"$CONFIG_STATUS" <<\EOF
30524
30525 { (exit 0); exit 0; }
30526 EOF
30527 chmod +x "$CONFIG_STATUS"
30528 ac_clean_files=$ac_clean_files_save
30529
30530 # configure is writing to config.log, and then calls config.status.
30531 # config.status does its own redirection, appending to config.log.
30532 # Unfortunately, on DOS this fails, as config.log is still kept open
30533 # by configure, so config.status won't be able to write to it; its
30534 # output is simply discarded.  So we exec the FD to /dev/null,
30535 # effectively closing config.log, so it can be properly (re)opened and
30536 # appended to by config.status.  When coming back to configure, we
30537 # need to make the FD available again.
30538 if test "$no_create" != yes; then
30539   ac_cs_success=:
30540   exec 5>/dev/null
30541   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
30542   exec 5>>config.log
30543   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30544   # would make configure fail if this is the last instruction.
30545   "$ac_cs_success" || { (exit 1); exit 1; }
30546 fi
30547 ${MAKE:-make} preinstall