]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
4c39d24fe21d21c168d3977f04c3e85add9222be
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.753 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20221009.
5 #
6 # Copyright 2003-2021,2022      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/bzip2/xz,
809                           BSDI/normal and optionally formatted/catonly,
810                           e.g., gzip,formatted
811   --with-manpage-renames  specify manpage-renaming
812   --with-manpage-aliases  specify manpage-aliases using .so
813   --with-manpage-symlinks specify manpage-aliases using symlinks
814   --with-manpage-tbl      specify manpage processing with tbl
815 Extensions:
816   --disable-ext-funcs     disable function-extensions
817   --enable-sp-funcs       enable SCREEN-extensions
818   --enable-term-driver    enable terminal-driver
819   --enable-const          compile with extra/non-standard const
820   --enable-ext-colors     compile for 256-color support
821   --enable-ext-mouse      compile for extended mouse-encoding
822   --enable-ext-putwin     compile with extended putwin/screendump
823   --enable-no-padding     compile with $NCURSES_NO_PADDING code
824   --enable-sigwinch       compile with SIGWINCH handler
825   --enable-tcap-names     compile with user-definable terminal capabilities
826 Reentrant Code:
827   --with-pthread          use POSIX thread library
828   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
829   --enable-weak-symbols   enable weak-symbols for pthreads
830   --enable-reentrant      compile with reentrant code
831   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
832   --enable-opaque-form    make form-library structures "opaque"
833   --enable-opaque-menu    make menu-library structures "opaque"
834   --enable-opaque-panel   make panel-library structures "opaque"
835   --with-wrap-prefix=XXX  override prefix used for public variables
836 Development Code:
837   --without-develop       disable development options
838   --enable-hard-tabs      compile with hard-tabs code
839   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
840 Experimental Code:
841   --disable-assumed-color do not assume anything about default-colors
842   --disable-hashmap       compile without hashmap scrolling-optimization
843   --enable-colorfgbg      compile-in experimental $COLORFGBG code
844   --enable-fvisibility    compile with -fvisibility=hidden
845   --enable-interop        compile-in interop bindings
846   --enable-safe-sprintf   compile with experimental safe-sprintf code
847   --disable-scroll-hints  compile without scroll-hints code
848   --enable-wgetch-events  compile with wgetch-events code
849   --enable-exp-win32      compile with experimental-Windows driver
850 Testing/development Options:
851   --disable-echo          do not display "compiling" commands
852   --disable-stripping     do not strip (debug info) installed executables
853   --enable-warnings       test: turn on gcc compiler warnings
854   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
855   --enable-string-hacks   work around bogus compiler/loader warnings
856   --enable-assertions     test: turn on generation of assertion code
857   --with-dmalloc          test: use Gray Watson's dmalloc library
858   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
859   --with-valgrind         test: use valgrind
860   --disable-leaks         test: free permanent memory, analyze leaks
861   --enable-expanded       test: generate functions for certain macros
862   --disable-macros        test: use functions rather than macros
863   --with-trace            test: add trace() function to all models of ncurses
864   --disable-gnat-projects test: disable GNAT projects even if usable
865 Ada Binding Options:
866   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
867   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
868   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
869   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
870   --with-ada-libname=XXX  override default Ada library-name
871   --with-form-libname=XXX override form basename of library
872   --with-menu-libname=XXX override menu basename of library
873   --with-panel-libname=XXX override panel basename of library
874   --with-cxx-libname=XXX override ncurses++ basename of library
875
876 Some influential environment variables:
877   CC          C compiler command
878   CFLAGS      C compiler flags
879   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
880               nonstandard directory <lib dir>
881   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
882               headers in a nonstandard directory <include dir>
883   CPP         C preprocessor
884   CXX         C++ compiler command
885   CXXFLAGS    C++ compiler flags
886   CXXCPP      C++ preprocessor
887
888 Use these variables to override the choices made by `configure' or to help
889 it to find libraries and programs with nonstandard names/locations.
890
891 EOF
892 fi
893
894 if test "$ac_init_help" = "recursive"; then
895   # If there are subdirs, report their specific --help.
896   ac_popdir=`pwd`
897   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
898     cd "$ac_subdir"
899     # A "../" for each directory in /$ac_subdir.
900     ac_dots=`echo "$ac_subdir" |
901              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
902
903     case "$srcdir" in
904     .) # No --srcdir option.  We are building in place.
905       ac_sub_srcdir="$srcdir" ;;
906     [\\/]* | ?:[\\/]* ) # Absolute path.
907       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
908     *) # Relative path.
909       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
910     esac
911
912     # Check for guested configure; otherwise get Cygnus style configure.
913     if test -f "$ac_sub_srcdir/configure.gnu"; then
914       echo
915       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
916     elif test -f "$ac_sub_srcdir/configure"; then
917       echo
918       $SHELL "$ac_sub_srcdir/configure" --help=recursive
919     elif test -f "$ac_sub_srcdir/configure.ac" ||
920            test -f "$ac_sub_srcdir/configure.in"; then
921       echo
922       "$ac_configure" --help
923     else
924       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
925     fi
926     cd "$ac_popdir"
927   done
928 fi
929
930 test -n "$ac_init_help" && exit 0
931 if "$ac_init_version"; then
932   cat <<\EOF
933
934 Copyright 2003-2021,2022        Thomas E. Dickey
935 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
936 Free Software Foundation, Inc.
937 This configure script is free software; the Free Software Foundation
938 gives unlimited permission to copy, distribute and modify it.
939 EOF
940   exit 0
941 fi
942 exec 5>config.log
943 cat >&5 <<EOF
944 This file contains any messages produced by compilers while
945 running configure, to aid debugging if configure makes a mistake.
946
947 It was created by $as_me, which was
948 generated by GNU Autoconf 2.52.20221009.  Invocation command line was
949
950   $ $0 $@
951
952 EOF
953 {
954 cat <<_ASUNAME
955 ## ---------- ##
956 ## Platform.  ##
957 ## ---------- ##
958
959 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
960 uname -m = `(uname -m) 2>/dev/null || echo unknown`
961 uname -r = `(uname -r) 2>/dev/null || echo unknown`
962 uname -s = `(uname -s) 2>/dev/null || echo unknown`
963 uname -v = `(uname -v) 2>/dev/null || echo unknown`
964
965 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
966 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
967
968 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
969 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
970 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
971 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
972 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
973 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
974 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
975
976 PATH = $PATH
977
978 _ASUNAME
979 } >&5
980
981 cat >&5 <<EOF
982 ## ------------ ##
983 ## Core tests.  ##
984 ## ------------ ##
985
986 EOF
987
988 # Keep a trace of the command line.
989 # Strip out --no-create and --no-recursion so they do not pile up.
990 # Also quote any args containing shell meta-characters.
991 ac_configure_args=
992 ac_sep=
993 for ac_arg
994 do
995   case "$ac_arg" in
996   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
997   | --no-cr | --no-c) ;;
998   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
999   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1000   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1001     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1002     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1003     ac_sep=" " ;;
1004   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1005      ac_sep=" " ;;
1006   esac
1007   # Get rid of the leading space.
1008 done
1009
1010 # When interrupted or exit'd, cleanup temporary files, and complete
1011 # config.log.  We remove comments because anyway the quotes in there
1012 # would cause problems or look ugly.
1013 trap 'exit_status=$?
1014   # Save into config.log some information that might help in debugging.
1015   echo >&5
1016   echo "## ----------------- ##" >&5
1017   echo "## Cache variables.  ##" >&5
1018   echo "## ----------------- ##" >&5
1019   echo >&5
1020   # The following way of writing the cache mishandles newlines in values,
1021 {
1022   (set) 2>&1 |
1023     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1024     *ac_space=\ *)
1025       sed -n \
1026         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1027           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1028       ;;
1029     *)
1030       sed -n \
1031         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1032       ;;
1033     esac;
1034 } >&5
1035   sed "/^$/d" confdefs.h >conftest.log
1036   if test -s conftest.log; then
1037     echo >&5
1038     echo "## ------------ ##" >&5
1039     echo "## confdefs.h.  ##" >&5
1040     echo "## ------------ ##" >&5
1041     echo >&5
1042     cat conftest.log >&5
1043   fi
1044   (echo; echo) >&5
1045   test "$ac_signal" != 0 &&
1046     echo "$as_me: caught signal $ac_signal" >&5
1047   echo "$as_me: exit $exit_status" >&5
1048   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1049     exit $exit_status
1050      ' 0
1051 for ac_signal in 1 2 13 15; do
1052   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1053 done
1054 ac_signal=0
1055
1056 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1057 rm -rf conftest* confdefs.h
1058 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1059 echo >confdefs.h
1060
1061 # Let the site file select an alternate cache file if it wants to.
1062 # Prefer explicitly selected file to automatically selected ones.
1063 if test -z "$CONFIG_SITE"; then
1064   if test "x$prefix" != xNONE; then
1065     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1066   else
1067     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1068   fi
1069 fi
1070 for ac_site_file in $CONFIG_SITE; do
1071   if test -r "$ac_site_file"; then
1072     { echo "$as_me:1072: loading site script $ac_site_file" >&5
1073 echo "$as_me: loading site script $ac_site_file" >&6;}
1074     cat "$ac_site_file" >&5
1075     . "$ac_site_file"
1076   fi
1077 done
1078
1079 if test -r "$cache_file"; then
1080   # Some versions of bash will fail to source /dev/null (special
1081   # files actually), so we avoid doing that.
1082   if test -f "$cache_file"; then
1083     { echo "$as_me:1083: loading cache $cache_file" >&5
1084 echo "$as_me: loading cache $cache_file" >&6;}
1085     case $cache_file in
1086       [\\/]* | ?:[\\/]* ) . $cache_file;;
1087       *)                      . ./$cache_file;;
1088     esac
1089   fi
1090 else
1091   { echo "$as_me:1091: creating cache $cache_file" >&5
1092 echo "$as_me: creating cache $cache_file" >&6;}
1093   >$cache_file
1094 fi
1095
1096 # Check that the precious variables saved in the cache have kept the same
1097 # value.
1098 ac_cache_corrupted=false
1099 for ac_var in `(set) 2>&1 |
1100                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1101   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1102   eval ac_new_set=\$ac_env_${ac_var}_set
1103   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1104   eval ac_new_val="\$ac_env_${ac_var}_value"
1105   case "$ac_old_set,$ac_new_set" in
1106     set,)
1107       { echo "$as_me:1107: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1108 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1109       ac_cache_corrupted=: ;;
1110     ,set)
1111       { echo "$as_me:1111: error: \`$ac_var' was not set in the previous run" >&5
1112 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1113       ac_cache_corrupted=: ;;
1114     ,);;
1115     *)
1116       if test "x$ac_old_val" != "x$ac_new_val"; then
1117         { echo "$as_me:1117: error: \`$ac_var' has changed since the previous run:" >&5
1118 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1119         { echo "$as_me:1119:   former value:  $ac_old_val" >&5
1120 echo "$as_me:   former value:  $ac_old_val" >&2;}
1121         { echo "$as_me:1121:   current value: $ac_new_val" >&5
1122 echo "$as_me:   current value: $ac_new_val" >&2;}
1123         ac_cache_corrupted=:
1124       fi;;
1125   esac
1126   # Pass precious variables to config.status.  It doesn't matter if
1127   # we pass some twice (in addition to the command line arguments).
1128   if test "$ac_new_set" = set; then
1129     case "$ac_new_val" in
1130     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1131       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1132       ac_configure_args="$ac_configure_args '$ac_arg'"
1133       ;;
1134     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1135        ;;
1136     esac
1137   fi
1138 done
1139 if "$ac_cache_corrupted"; then
1140   { echo "$as_me:1140: error: changes in the environment can compromise the build" >&5
1141 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1142   { { echo "$as_me:1142: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1143 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1144    { (exit 1); exit 1; }; }
1145 fi
1146
1147 ac_ext=c
1148 ac_cpp='$CPP $CPPFLAGS'
1149 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1150 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1151 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1152 ac_main_return="return"
1153
1154 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1155   *c*,-n*) ECHO_N=
1156            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1157            ECHO_T='     '
1158            ;;
1159   *c*,*  ) ECHO_N=-n
1160            ECHO_C=
1161            ECHO_T=
1162            ;;
1163   *)       ECHO_N=
1164            ECHO_C='\c'
1165            ECHO_T=
1166            ;;
1167 esac
1168 echo "#! $SHELL" >conftest.sh
1169 echo  "exit 0"   >>conftest.sh
1170 chmod +x conftest.sh
1171 if { (echo "$as_me:1171: PATH=\".;.\"; conftest.sh") >&5
1172   (PATH=".;."; conftest.sh) 2>&5
1173   ac_status=$?
1174   echo "$as_me:1174: \$? = $ac_status" >&5
1175   (exit "$ac_status"); }; then
1176   ac_path_separator=';'
1177 else
1178   ac_path_separator=:
1179 fi
1180 PATH_SEPARATOR="$ac_path_separator"
1181 rm -f conftest.sh
1182
1183 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1184
1185 top_builddir=`pwd`
1186
1187 for ac_prog in ggrep grep
1188 do
1189   # Extract the first word of "$ac_prog", so it can be a program name with args.
1190 set dummy $ac_prog; ac_word=$2
1191 echo "$as_me:1191: checking for $ac_word" >&5
1192 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1193 if test "${ac_cv_prog_GREP+set}" = set; then
1194   echo $ECHO_N "(cached) $ECHO_C" >&6
1195 else
1196   if test -n "$GREP"; then
1197   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1198 else
1199   ac_save_IFS=$IFS; IFS=$ac_path_separator
1200 ac_dummy="$PATH"
1201 for ac_dir in $ac_dummy; do
1202   IFS=$ac_save_IFS
1203   test -z "$ac_dir" && ac_dir=.
1204   $as_executable_p "$ac_dir/$ac_word" || continue
1205 ac_cv_prog_GREP="$ac_prog"
1206 echo "$as_me:1206: found $ac_dir/$ac_word" >&5
1207 break
1208 done
1209
1210 fi
1211 fi
1212 GREP=$ac_cv_prog_GREP
1213 if test -n "$GREP"; then
1214   echo "$as_me:1214: result: $GREP" >&5
1215 echo "${ECHO_T}$GREP" >&6
1216 else
1217   echo "$as_me:1217: result: no" >&5
1218 echo "${ECHO_T}no" >&6
1219 fi
1220
1221   test -n "$GREP" && break
1222 done
1223 test -n "$GREP" || GREP=": "
1224
1225 echo "$as_me:1225: checking for egrep" >&5
1226 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1227 if test "${ac_cv_path_EGREP+set}" = set; then
1228   echo $ECHO_N "(cached) $ECHO_C" >&6
1229 else
1230   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1231    then ac_cv_path_EGREP="$GREP -E"
1232    else
1233      for ac_prog in gegrep egrep
1234 do
1235   # Extract the first word of "$ac_prog", so it can be a program name with args.
1236 set dummy $ac_prog; ac_word=$2
1237 echo "$as_me:1237: checking for $ac_word" >&5
1238 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1239 if test "${ac_cv_path_EGREP+set}" = set; then
1240   echo $ECHO_N "(cached) $ECHO_C" >&6
1241 else
1242   case $EGREP in
1243   [\\/]* | ?:[\\/]*)
1244   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1245   ;;
1246   *)
1247   ac_save_IFS=$IFS; IFS=$ac_path_separator
1248 ac_dummy="$PATH"
1249 for ac_dir in $ac_dummy; do
1250   IFS=$ac_save_IFS
1251   test -z "$ac_dir" && ac_dir=.
1252   if $as_executable_p "$ac_dir/$ac_word"; then
1253    ac_cv_path_EGREP="$ac_dir/$ac_word"
1254    echo "$as_me:1254: found $ac_dir/$ac_word" >&5
1255    break
1256 fi
1257 done
1258
1259   ;;
1260 esac
1261 fi
1262 EGREP=$ac_cv_path_EGREP
1263
1264 if test -n "$EGREP"; then
1265   echo "$as_me:1265: result: $EGREP" >&5
1266 echo "${ECHO_T}$EGREP" >&6
1267 else
1268   echo "$as_me:1268: result: no" >&5
1269 echo "${ECHO_T}no" >&6
1270 fi
1271
1272   test -n "$EGREP" && break
1273 done
1274 test -n "$EGREP" || EGREP=": "
1275
1276      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1276: error: cannot find workable egrep" >&5
1277 echo "$as_me: error: cannot find workable egrep" >&2;}
1278    { (exit 1); exit 1; }; }
1279    fi
1280 fi
1281 echo "$as_me:1281: result: $ac_cv_path_EGREP" >&5
1282 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1283  EGREP="$ac_cv_path_EGREP"
1284
1285 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1286 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1287 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1288 cf_cv_abi_version=${NCURSES_MAJOR}
1289 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1290 cf_cv_timestamp=`date`
1291 echo "$as_me:1291: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1292 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1293
1294 if test -f "$srcdir/VERSION" ; then
1295         echo "$as_me:1295: checking for package version" >&5
1296 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1297
1298         # if there are not enough fields, cut returns the last one...
1299         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1300         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1301         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1302
1303         # this is how CF_BUNDLED_INTL uses $VERSION:
1304         VERSION="$cf_field1"
1305
1306         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1307         test -z "$VERSION_MAJOR" && { { echo "$as_me:1307: error: missing major-version" >&5
1308 echo "$as_me: error: missing major-version" >&2;}
1309    { (exit 1); exit 1; }; }
1310
1311         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1312         test -z "$VERSION_MINOR" && { { echo "$as_me:1312: error: missing minor-version" >&5
1313 echo "$as_me: error: missing minor-version" >&2;}
1314    { (exit 1); exit 1; }; }
1315
1316         echo "$as_me:1316: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1317 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1318
1319         echo "$as_me:1319: checking for package patch date" >&5
1320 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1321         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1322         case .$VERSION_PATCH in
1323         (.)
1324                 { { echo "$as_me:1324: error: missing patch-date $VERSION_PATCH" >&5
1325 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1326    { (exit 1); exit 1; }; }
1327                 ;;
1328         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1329                 ;;
1330         (*)
1331                 { { echo "$as_me:1331: error: illegal patch-date $VERSION_PATCH" >&5
1332 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1333    { (exit 1); exit 1; }; }
1334                 ;;
1335         esac
1336         echo "$as_me:1336: result: $VERSION_PATCH" >&5
1337 echo "${ECHO_T}$VERSION_PATCH" >&6
1338 else
1339         { { echo "$as_me:1339: error: did not find $srcdir/VERSION" >&5
1340 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1341    { (exit 1); exit 1; }; }
1342 fi
1343
1344 # show the actual data that we have for versions:
1345 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1346
1347 echo "${as_me:-configure}:1347: testing ABI VERSION $VERSION ..." 1>&5
1348
1349 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1350
1351 echo "${as_me:-configure}:1351: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1352
1353 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1354
1355 echo "${as_me:-configure}:1355: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1356
1357 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1358
1359 echo "${as_me:-configure}:1359: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1360
1361         cf_PACKAGE=NCURSES
1362         PACKAGE=ncurses
1363
1364 cat >>confdefs.h <<EOF
1365 #define PACKAGE "$PACKAGE"
1366 EOF
1367
1368 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1369
1370         cat >>confdefs.h <<EOF
1371 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1372 EOF
1373
1374         cat >>confdefs.h <<EOF
1375 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1376 EOF
1377
1378 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1379
1380 # Check whether --with-rel-version or --without-rel-version was given.
1381 if test "${with_rel_version+set}" = set; then
1382   withval="$with_rel_version"
1383   { echo "$as_me:1383: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1384 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1385  cf_cv_rel_version=$withval
1386 fi;
1387
1388  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1389  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1390
1391 if test -n "$NCURSES_MAJOR" ; then
1392   case $NCURSES_MAJOR in
1393   ([0-9]*)
1394         ;;
1395   (*)
1396         { { echo "$as_me:1396: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1397 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1398    { (exit 1); exit 1; }; }
1399         ;;
1400   esac
1401 else
1402   { { echo "$as_me:1402: error: Release major-version value is empty" >&5
1403 echo "$as_me: error: Release major-version value is empty" >&2;}
1404    { (exit 1); exit 1; }; }
1405 fi
1406
1407 if test -n "$NCURSES_MINOR" ; then
1408   case $NCURSES_MINOR in
1409   ([0-9]*)
1410         ;;
1411   (*)
1412         { { echo "$as_me:1412: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1413 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1414    { (exit 1); exit 1; }; }
1415         ;;
1416   esac
1417 else
1418   { { echo "$as_me:1418: error: Release minor-version value is empty" >&5
1419 echo "$as_me: error: Release minor-version value is empty" >&2;}
1420    { (exit 1); exit 1; }; }
1421 fi
1422
1423 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1424
1425 # Check whether --with-abi-version or --without-abi-version was given.
1426 if test "${with_abi_version+set}" = set; then
1427   withval="$with_abi_version"
1428
1429         if test "x$cf_cv_abi_version" != "x$withval"
1430         then
1431                 { echo "$as_me:1431: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1432 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1433                 case "$cf_cv_rel_version" in
1434                 (5.*)
1435                         cf_cv_rel_version=$withval.0
1436                         ;;
1437                 (6.*)
1438                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1439                         ;;
1440                 esac
1441         fi
1442         cf_cv_abi_version=$withval
1443 fi;
1444
1445 if test -n "$cf_cv_abi_version" ; then
1446   case $cf_cv_abi_version in
1447   ([0-9]*)
1448         ;;
1449   (*)
1450         { { echo "$as_me:1450: error: ABI version is not a number: $cf_cv_abi_version" >&5
1451 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1452    { (exit 1); exit 1; }; }
1453         ;;
1454   esac
1455 else
1456   { { echo "$as_me:1456: error: ABI version value is empty" >&5
1457 echo "$as_me: error: ABI version value is empty" >&2;}
1458    { (exit 1); exit 1; }; }
1459 fi
1460
1461 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1462 then
1463         case "$cf_cv_rel_version" in
1464         (5.*)
1465                 cf_cv_rel_version=$with_abi_version.0
1466                 ;;
1467         esac
1468 fi
1469
1470 ac_aux_dir=
1471 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1472   if test -f "$ac_dir/install-sh"; then
1473     ac_aux_dir=$ac_dir
1474     ac_install_sh="$ac_aux_dir/install-sh -c"
1475     break
1476   elif test -f "$ac_dir/install.sh"; then
1477     ac_aux_dir=$ac_dir
1478     ac_install_sh="$ac_aux_dir/install.sh -c"
1479     break
1480   elif test -f "$ac_dir/shtool"; then
1481     ac_aux_dir=$ac_dir
1482     ac_install_sh="$ac_aux_dir/shtool install -c"
1483     break
1484   fi
1485 done
1486 if test -z "$ac_aux_dir"; then
1487   { { echo "$as_me:1487: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1488 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1489    { (exit 1); exit 1; }; }
1490 fi
1491 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1492 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1493 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1494
1495 # Make sure we can run config.sub.
1496 $ac_config_sub sun4 >/dev/null 2>&1 ||
1497   { { echo "$as_me:1497: error: cannot run $ac_config_sub" >&5
1498 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1499    { (exit 1); exit 1; }; }
1500
1501 echo "$as_me:1501: checking build system type" >&5
1502 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1503 if test "${ac_cv_build+set}" = set; then
1504   echo $ECHO_N "(cached) $ECHO_C" >&6
1505 else
1506   ac_cv_build_alias=$build_alias
1507 test -z "$ac_cv_build_alias" &&
1508   ac_cv_build_alias=`$ac_config_guess`
1509 test -z "$ac_cv_build_alias" &&
1510   { { echo "$as_me:1510: error: cannot guess build type; you must specify one" >&5
1511 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1512    { (exit 1); exit 1; }; }
1513 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1514   { { echo "$as_me:1514: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1515 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1516    { (exit 1); exit 1; }; }
1517
1518 fi
1519 echo "$as_me:1519: result: $ac_cv_build" >&5
1520 echo "${ECHO_T}$ac_cv_build" >&6
1521 build=$ac_cv_build
1522 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1523 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1524 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1525
1526 echo "$as_me:1526: checking host system type" >&5
1527 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1528 if test "${ac_cv_host+set}" = set; then
1529   echo $ECHO_N "(cached) $ECHO_C" >&6
1530 else
1531   ac_cv_host_alias=$host_alias
1532 test -z "$ac_cv_host_alias" &&
1533   ac_cv_host_alias=$ac_cv_build_alias
1534 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1535   { { echo "$as_me:1535: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1536 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1537    { (exit 1); exit 1; }; }
1538
1539 fi
1540 echo "$as_me:1540: result: $ac_cv_host" >&5
1541 echo "${ECHO_T}$ac_cv_host" >&6
1542 host=$ac_cv_host
1543 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1544 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1545 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1546
1547 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1548         echo "$as_me:1548: checking target system type" >&5
1549 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1550 if test "${ac_cv_target+set}" = set; then
1551   echo $ECHO_N "(cached) $ECHO_C" >&6
1552 else
1553   ac_cv_target_alias=$target_alias
1554 test "x$ac_cv_target_alias" = "x" &&
1555   ac_cv_target_alias=$ac_cv_host_alias
1556 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1557   { { echo "$as_me:1557: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1558 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1559    { (exit 1); exit 1; }; }
1560
1561 fi
1562 echo "$as_me:1562: result: $ac_cv_target" >&5
1563 echo "${ECHO_T}$ac_cv_target" >&6
1564 target=$ac_cv_target
1565 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1566 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1567 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1568
1569 # The aliases save the names the user supplied, while $host etc.
1570 # will get canonicalized.
1571 test -n "$target_alias" &&
1572   test "$program_prefix$program_suffix$program_transform_name" = \
1573     NONENONEs,x,x, &&
1574   program_prefix=${target_alias}-
1575         system_name="$host_os"
1576 else
1577         system_name="`(uname -s -r) 2>/dev/null`"
1578         if test -z "$system_name" ; then
1579                 system_name="`(hostname) 2>/dev/null`"
1580         fi
1581 fi
1582 test -n "$system_name" &&
1583 cat >>confdefs.h <<EOF
1584 #define SYSTEM_NAME "$system_name"
1585 EOF
1586
1587 if test "${cf_cv_system_name+set}" = set; then
1588   echo $ECHO_N "(cached) $ECHO_C" >&6
1589 else
1590   cf_cv_system_name="$system_name"
1591 fi
1592
1593 test -z "$system_name" && system_name="$cf_cv_system_name"
1594 test -n "$cf_cv_system_name" && echo "$as_me:1594: result: Configuring for $cf_cv_system_name" >&5
1595 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1596
1597 if test ".$system_name" != ".$cf_cv_system_name" ; then
1598         echo "$as_me:1598: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1599 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1600         { { echo "$as_me:1600: error: \"Please remove config.cache and try again.\"" >&5
1601 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1602    { (exit 1); exit 1; }; }
1603 fi
1604
1605 # Check whether --with-system-type or --without-system-type was given.
1606 if test "${with_system_type+set}" = set; then
1607   withval="$with_system_type"
1608   { echo "$as_me:1608: WARNING: overriding system type to $withval" >&5
1609 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1610         cf_cv_system_name=$withval
1611         host_os=$withval
1612
1613 fi;
1614
1615 ###     Save the given $CFLAGS to allow user-override.
1616 cf_user_CFLAGS="$CFLAGS"
1617
1618 ###     Default install-location
1619 echo "$as_me:1619: checking for fgrep" >&5
1620 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1621 if test "${ac_cv_path_FGREP+set}" = set; then
1622   echo $ECHO_N "(cached) $ECHO_C" >&6
1623 else
1624   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1625    then ac_cv_path_FGREP="$GREP -F"
1626    else
1627      for ac_prog in gfgrep fgrep
1628 do
1629   # Extract the first word of "$ac_prog", so it can be a program name with args.
1630 set dummy $ac_prog; ac_word=$2
1631 echo "$as_me:1631: checking for $ac_word" >&5
1632 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1633 if test "${ac_cv_path_FGREP+set}" = set; then
1634   echo $ECHO_N "(cached) $ECHO_C" >&6
1635 else
1636   case $FGREP in
1637   [\\/]* | ?:[\\/]*)
1638   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1639   ;;
1640   *)
1641   ac_save_IFS=$IFS; IFS=$ac_path_separator
1642 ac_dummy="$PATH"
1643 for ac_dir in $ac_dummy; do
1644   IFS=$ac_save_IFS
1645   test -z "$ac_dir" && ac_dir=.
1646   if $as_executable_p "$ac_dir/$ac_word"; then
1647    ac_cv_path_FGREP="$ac_dir/$ac_word"
1648    echo "$as_me:1648: found $ac_dir/$ac_word" >&5
1649    break
1650 fi
1651 done
1652
1653   ;;
1654 esac
1655 fi
1656 FGREP=$ac_cv_path_FGREP
1657
1658 if test -n "$FGREP"; then
1659   echo "$as_me:1659: result: $FGREP" >&5
1660 echo "${ECHO_T}$FGREP" >&6
1661 else
1662   echo "$as_me:1662: result: no" >&5
1663 echo "${ECHO_T}no" >&6
1664 fi
1665
1666   test -n "$FGREP" && break
1667 done
1668 test -n "$FGREP" || FGREP=": "
1669
1670      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1670: error: cannot find workable fgrep" >&5
1671 echo "$as_me: error: cannot find workable fgrep" >&2;}
1672    { (exit 1); exit 1; }; }
1673    fi
1674 fi
1675 echo "$as_me:1675: result: $ac_cv_path_FGREP" >&5
1676 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1677  FGREP="$ac_cv_path_FGREP"
1678
1679 echo "$as_me:1679: checking for prefix" >&5
1680 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1681 if test "x$prefix" = "xNONE" ; then
1682         case "$cf_cv_system_name" in
1683                 # non-vendor systems don't have a conflict
1684         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1685                 prefix=/usr
1686                 ;;
1687         (*)     prefix=$ac_default_prefix
1688                 ;;
1689         esac
1690 fi
1691 echo "$as_me:1691: result: $prefix" >&5
1692 echo "${ECHO_T}$prefix" >&6
1693
1694 if test "x$prefix" = "xNONE" ; then
1695 echo "$as_me:1695: checking for default include-directory" >&5
1696 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1697 test -n "$verbose" && echo 1>&6
1698 for cf_symbol in \
1699         "$includedir" \
1700         "$includedir/ncurses" \
1701         "$prefix/include" \
1702         "$prefix/include/ncurses" \
1703         /usr/local/include \
1704         /usr/local/include/ncurses \
1705         /usr/include \
1706         /usr/include/ncurses
1707 do
1708         cf_dir=`eval echo "$cf_symbol"`
1709         if test -f "$cf_dir/curses.h" ; then
1710         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1711                 includedir="$cf_symbol"
1712                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1713                 break
1714         fi
1715         fi
1716         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1717 done
1718 echo "$as_me:1718: result: $includedir" >&5
1719 echo "${ECHO_T}$includedir" >&6
1720 fi
1721
1722 ### Defaults for ncurses ABI
1723
1724 # ABI 5 defaults:
1725 cf_dft_ccharw_max=5
1726 cf_dft_chtype=auto
1727 cf_dft_ext_colors=no
1728 cf_dft_ext_const=no
1729 cf_dft_ext_mouse=no
1730 cf_dft_ext_putwin=no
1731 cf_dft_ext_spfuncs=no
1732 cf_dft_filter_syms=no
1733 cf_dft_interop=no
1734 cf_dft_mmask_t=auto
1735 cf_dft_opaque_curses=no
1736 cf_dft_ordinate_type=short
1737 cf_dft_signed_char=no
1738 cf_dft_tparm_arg=long
1739 cf_dft_with_lp64=no
1740
1741 # ABI 6 defaults:
1742 case x$cf_cv_abi_version in
1743 (x[6789])
1744         cf_dft_chtype=uint32_t
1745         cf_dft_ext_colors=yes
1746         cf_dft_ext_const=yes
1747         cf_dft_ext_mouse=yes
1748         cf_dft_ext_putwin=yes
1749         cf_dft_ext_spfuncs=yes
1750         cf_dft_filter_syms=yes
1751         cf_dft_interop=yes
1752         cf_dft_mmask_t=uint32_t
1753         cf_dft_tparm_arg=intptr_t
1754         cf_dft_with_lp64=yes
1755         ;;
1756 esac
1757
1758 # ABI 7 defaults:
1759 case x$cf_cv_abi_version in
1760 (x[789])
1761         cf_dft_ccharw_max=6
1762         cf_dft_mmask_t=uint64_t
1763         cf_dft_opaque_curses=yes
1764         cf_dft_ordinate_type=int
1765         cf_dft_signed_char=yes
1766         # also: remove the wgetch-events feature in ABI 7
1767         ;;
1768 esac
1769
1770 ###     Checks for programs.
1771
1772 # Check whether --with-ada or --without-ada was given.
1773 if test "${with_ada+set}" = set; then
1774   withval="$with_ada"
1775   cf_with_ada=$withval
1776 else
1777   cf_with_ada=yes
1778 fi;
1779
1780 if test "x$cf_with_ada" = xyes
1781 then
1782         cf_prog_cc="gnatgcc gcc cc"
1783 else
1784         cf_prog_cc="gcc cc"
1785 fi
1786
1787 ac_ext=c
1788 ac_cpp='$CPP $CPPFLAGS'
1789 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1790 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1791 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1792 ac_main_return="return"
1793 if test -n "$ac_tool_prefix"; then
1794   for ac_prog in $cf_prog_cc
1795   do
1796     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1797 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1798 echo "$as_me:1798: checking for $ac_word" >&5
1799 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1800 if test "${ac_cv_prog_CC+set}" = set; then
1801   echo $ECHO_N "(cached) $ECHO_C" >&6
1802 else
1803   if test -n "$CC"; then
1804   ac_cv_prog_CC="$CC" # Let the user override the test.
1805 else
1806   ac_save_IFS=$IFS; IFS=$ac_path_separator
1807 ac_dummy="$PATH"
1808 for ac_dir in $ac_dummy; do
1809   IFS=$ac_save_IFS
1810   test -z "$ac_dir" && ac_dir=.
1811   $as_executable_p "$ac_dir/$ac_word" || continue
1812 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1813 echo "$as_me:1813: found $ac_dir/$ac_word" >&5
1814 break
1815 done
1816
1817 fi
1818 fi
1819 CC=$ac_cv_prog_CC
1820 if test -n "$CC"; then
1821   echo "$as_me:1821: result: $CC" >&5
1822 echo "${ECHO_T}$CC" >&6
1823 else
1824   echo "$as_me:1824: result: no" >&5
1825 echo "${ECHO_T}no" >&6
1826 fi
1827
1828     test -n "$CC" && break
1829   done
1830 fi
1831 if test -z "$CC"; then
1832   ac_ct_CC=$CC
1833   for ac_prog in $cf_prog_cc
1834 do
1835   # Extract the first word of "$ac_prog", so it can be a program name with args.
1836 set dummy $ac_prog; ac_word=$2
1837 echo "$as_me:1837: checking for $ac_word" >&5
1838 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1839 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1840   echo $ECHO_N "(cached) $ECHO_C" >&6
1841 else
1842   if test -n "$ac_ct_CC"; then
1843   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1844 else
1845   ac_save_IFS=$IFS; IFS=$ac_path_separator
1846 ac_dummy="$PATH"
1847 for ac_dir in $ac_dummy; do
1848   IFS=$ac_save_IFS
1849   test -z "$ac_dir" && ac_dir=.
1850   $as_executable_p "$ac_dir/$ac_word" || continue
1851 ac_cv_prog_ac_ct_CC="$ac_prog"
1852 echo "$as_me:1852: found $ac_dir/$ac_word" >&5
1853 break
1854 done
1855
1856 fi
1857 fi
1858 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1859 if test -n "$ac_ct_CC"; then
1860   echo "$as_me:1860: result: $ac_ct_CC" >&5
1861 echo "${ECHO_T}$ac_ct_CC" >&6
1862 else
1863   echo "$as_me:1863: result: no" >&5
1864 echo "${ECHO_T}no" >&6
1865 fi
1866
1867   test -n "$ac_ct_CC" && break
1868 done
1869
1870   CC=$ac_ct_CC
1871 fi
1872
1873 test -z "$CC" && { { echo "$as_me:1873: error: no acceptable cc found in \$PATH" >&5
1874 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1875    { (exit 1); exit 1; }; }
1876
1877 # Provide some information about the compiler.
1878 echo "$as_me:1878:" \
1879      "checking for C compiler version" >&5
1880 ac_compiler=`set X $ac_compile; echo "$2"`
1881 { (eval echo "$as_me:1881: \"$ac_compiler --version </dev/null >&5\"") >&5
1882   (eval $ac_compiler --version </dev/null >&5) 2>&5
1883   ac_status=$?
1884   echo "$as_me:1884: \$? = $ac_status" >&5
1885   (exit "$ac_status"); }
1886 { (eval echo "$as_me:1886: \"$ac_compiler -v </dev/null >&5\"") >&5
1887   (eval $ac_compiler -v </dev/null >&5) 2>&5
1888   ac_status=$?
1889   echo "$as_me:1889: \$? = $ac_status" >&5
1890   (exit "$ac_status"); }
1891 { (eval echo "$as_me:1891: \"$ac_compiler -V </dev/null >&5\"") >&5
1892   (eval $ac_compiler -V </dev/null >&5) 2>&5
1893   ac_status=$?
1894   echo "$as_me:1894: \$? = $ac_status" >&5
1895   (exit "$ac_status"); }
1896
1897 cat >"conftest.$ac_ext" <<_ACEOF
1898 #line 1898 "configure"
1899 #include "confdefs.h"
1900
1901 int
1902 main (void)
1903 {
1904
1905   ;
1906   return 0;
1907 }
1908 _ACEOF
1909 ac_clean_files_save=$ac_clean_files
1910 ac_clean_files="$ac_clean_files a.out a.exe"
1911 # Try to create an executable without -o first, disregard a.out.
1912 # It will help us diagnose broken compilers, and finding out an intuition
1913 # of exeext.
1914 echo "$as_me:1914: checking for C compiler default output" >&5
1915 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1916 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1917 if { (eval echo "$as_me:1917: \"$ac_link_default\"") >&5
1918   (eval $ac_link_default) 2>&5
1919   ac_status=$?
1920   echo "$as_me:1920: \$? = $ac_status" >&5
1921   (exit "$ac_status"); }; then
1922   # Find the output, starting from the most likely.  This scheme is
1923 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1924 # resort.
1925 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1926                 ls a.out conftest 2>/dev/null;
1927                 ls a.* conftest.* 2>/dev/null`; do
1928   case $ac_file in
1929     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1930     a.out ) # We found the default executable, but exeext='' is most
1931             # certainly right.
1932             break;;
1933     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1934           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1935           export ac_cv_exeext
1936           break;;
1937     * ) break;;
1938   esac
1939 done
1940 else
1941   echo "$as_me: failed program was:" >&5
1942 cat "conftest.$ac_ext" >&5
1943 { { echo "$as_me:1943: error: C compiler cannot create executables" >&5
1944 echo "$as_me: error: C compiler cannot create executables" >&2;}
1945    { (exit 77); exit 77; }; }
1946 fi
1947
1948 ac_exeext=$ac_cv_exeext
1949 echo "$as_me:1949: result: $ac_file" >&5
1950 echo "${ECHO_T}$ac_file" >&6
1951
1952 # Check the compiler produces executables we can run.  If not, either
1953 # the compiler is broken, or we cross compile.
1954 echo "$as_me:1954: checking whether the C compiler works" >&5
1955 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1956 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1957 # If not cross compiling, check that we can run a simple program.
1958 if test "$cross_compiling" != yes; then
1959   if { ac_try='./$ac_file'
1960   { (eval echo "$as_me:1960: \"$ac_try\"") >&5
1961   (eval $ac_try) 2>&5
1962   ac_status=$?
1963   echo "$as_me:1963: \$? = $ac_status" >&5
1964   (exit "$ac_status"); }; }; then
1965     cross_compiling=no
1966   else
1967     if test "$cross_compiling" = maybe; then
1968         cross_compiling=yes
1969     else
1970         { { echo "$as_me:1970: error: cannot run C compiled programs.
1971 If you meant to cross compile, use \`--host'." >&5
1972 echo "$as_me: error: cannot run C compiled programs.
1973 If you meant to cross compile, use \`--host'." >&2;}
1974    { (exit 1); exit 1; }; }
1975     fi
1976   fi
1977 fi
1978 echo "$as_me:1978: result: yes" >&5
1979 echo "${ECHO_T}yes" >&6
1980
1981 rm -f a.out a.exe "conftest$ac_cv_exeext"
1982 ac_clean_files=$ac_clean_files_save
1983 # Check the compiler produces executables we can run.  If not, either
1984 # the compiler is broken, or we cross compile.
1985 echo "$as_me:1985: checking whether we are cross compiling" >&5
1986 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1987 echo "$as_me:1987: result: $cross_compiling" >&5
1988 echo "${ECHO_T}$cross_compiling" >&6
1989
1990 echo "$as_me:1990: checking for executable suffix" >&5
1991 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1992 if { (eval echo "$as_me:1992: \"$ac_link\"") >&5
1993   (eval $ac_link) 2>&5
1994   ac_status=$?
1995   echo "$as_me:1995: \$? = $ac_status" >&5
1996   (exit "$ac_status"); }; then
1997   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1998 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1999 # work properly (i.e., refer to `conftest.exe'), while it won't with
2000 # `rm'.
2001 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2002   case $ac_file in
2003     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2004     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2005           export ac_cv_exeext
2006           break;;
2007     * ) break;;
2008   esac
2009 done
2010 else
2011   { { echo "$as_me:2011: error: cannot compute EXEEXT: cannot compile and link" >&5
2012 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2013    { (exit 1); exit 1; }; }
2014 fi
2015
2016 rm -f "conftest$ac_cv_exeext"
2017 echo "$as_me:2017: result: $ac_cv_exeext" >&5
2018 echo "${ECHO_T}$ac_cv_exeext" >&6
2019
2020 rm -f "conftest.$ac_ext"
2021 EXEEXT=$ac_cv_exeext
2022 ac_exeext=$EXEEXT
2023 echo "$as_me:2023: checking for object suffix" >&5
2024 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2025 if test "${ac_cv_objext+set}" = set; then
2026   echo $ECHO_N "(cached) $ECHO_C" >&6
2027 else
2028   cat >"conftest.$ac_ext" <<_ACEOF
2029 #line 2029 "configure"
2030 #include "confdefs.h"
2031
2032 int
2033 main (void)
2034 {
2035
2036   ;
2037   return 0;
2038 }
2039 _ACEOF
2040 rm -f conftest.o conftest.obj
2041 if { (eval echo "$as_me:2041: \"$ac_compile\"") >&5
2042   (eval $ac_compile) 2>&5
2043   ac_status=$?
2044   echo "$as_me:2044: \$? = $ac_status" >&5
2045   (exit "$ac_status"); }; then
2046   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2047   case $ac_file in
2048     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2049     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2050        break;;
2051   esac
2052 done
2053 else
2054   echo "$as_me: failed program was:" >&5
2055 cat "conftest.$ac_ext" >&5
2056 { { echo "$as_me:2056: error: cannot compute OBJEXT: cannot compile" >&5
2057 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2058    { (exit 1); exit 1; }; }
2059 fi
2060
2061 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2062 fi
2063 echo "$as_me:2063: result: $ac_cv_objext" >&5
2064 echo "${ECHO_T}$ac_cv_objext" >&6
2065 OBJEXT=$ac_cv_objext
2066 ac_objext=$OBJEXT
2067 echo "$as_me:2067: checking whether we are using the GNU C compiler" >&5
2068 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2069 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2070   echo $ECHO_N "(cached) $ECHO_C" >&6
2071 else
2072   cat >"conftest.$ac_ext" <<_ACEOF
2073 #line 2073 "configure"
2074 #include "confdefs.h"
2075
2076 int
2077 main (void)
2078 {
2079 #ifndef __GNUC__
2080        choke me
2081 #endif
2082
2083   ;
2084   return 0;
2085 }
2086 _ACEOF
2087 rm -f "conftest.$ac_objext"
2088 if { (eval echo "$as_me:2088: \"$ac_compile\"") >&5
2089   (eval $ac_compile) 2>&5
2090   ac_status=$?
2091   echo "$as_me:2091: \$? = $ac_status" >&5
2092   (exit "$ac_status"); } &&
2093          { ac_try='test -s "conftest.$ac_objext"'
2094   { (eval echo "$as_me:2094: \"$ac_try\"") >&5
2095   (eval $ac_try) 2>&5
2096   ac_status=$?
2097   echo "$as_me:2097: \$? = $ac_status" >&5
2098   (exit "$ac_status"); }; }; then
2099   ac_compiler_gnu=yes
2100 else
2101   echo "$as_me: failed program was:" >&5
2102 cat "conftest.$ac_ext" >&5
2103 ac_compiler_gnu=no
2104 fi
2105 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2106 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2107
2108 fi
2109 echo "$as_me:2109: result: $ac_cv_c_compiler_gnu" >&5
2110 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2111 GCC=`test $ac_compiler_gnu = yes && echo yes`
2112 ac_test_CFLAGS=${CFLAGS+set}
2113 ac_save_CFLAGS=$CFLAGS
2114 CFLAGS="-g"
2115 echo "$as_me:2115: checking whether $CC accepts -g" >&5
2116 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2117 if test "${ac_cv_prog_cc_g+set}" = set; then
2118   echo $ECHO_N "(cached) $ECHO_C" >&6
2119 else
2120   cat >"conftest.$ac_ext" <<_ACEOF
2121 #line 2121 "configure"
2122 #include "confdefs.h"
2123
2124 int
2125 main (void)
2126 {
2127
2128   ;
2129   return 0;
2130 }
2131 _ACEOF
2132 rm -f "conftest.$ac_objext"
2133 if { (eval echo "$as_me:2133: \"$ac_compile\"") >&5
2134   (eval $ac_compile) 2>&5
2135   ac_status=$?
2136   echo "$as_me:2136: \$? = $ac_status" >&5
2137   (exit "$ac_status"); } &&
2138          { ac_try='test -s "conftest.$ac_objext"'
2139   { (eval echo "$as_me:2139: \"$ac_try\"") >&5
2140   (eval $ac_try) 2>&5
2141   ac_status=$?
2142   echo "$as_me:2142: \$? = $ac_status" >&5
2143   (exit "$ac_status"); }; }; then
2144   ac_cv_prog_cc_g=yes
2145 else
2146   echo "$as_me: failed program was:" >&5
2147 cat "conftest.$ac_ext" >&5
2148 ac_cv_prog_cc_g=no
2149 fi
2150 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2151 fi
2152 echo "$as_me:2152: result: $ac_cv_prog_cc_g" >&5
2153 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2154 if test "$ac_test_CFLAGS" = set; then
2155   CFLAGS=$ac_save_CFLAGS
2156 elif test $ac_cv_prog_cc_g = yes; then
2157   if test "$GCC" = yes; then
2158     CFLAGS="-g -O2"
2159   else
2160     CFLAGS="-g"
2161   fi
2162 else
2163   if test "$GCC" = yes; then
2164     CFLAGS="-O2"
2165   else
2166     CFLAGS=
2167   fi
2168 fi
2169 # Some people use a C++ compiler to compile C.  Since we use `exit',
2170 # in C++ we need to declare it.  In case someone uses the same compiler
2171 # for both compiling C and C++ we need to have the C++ compiler decide
2172 # the declaration of exit, since it's the most demanding environment.
2173 cat >"conftest.$ac_ext" <<_ACEOF
2174 #ifndef __cplusplus
2175   choke me
2176 #endif
2177 _ACEOF
2178 rm -f "conftest.$ac_objext"
2179 if { (eval echo "$as_me:2179: \"$ac_compile\"") >&5
2180   (eval $ac_compile) 2>&5
2181   ac_status=$?
2182   echo "$as_me:2182: \$? = $ac_status" >&5
2183   (exit "$ac_status"); } &&
2184          { ac_try='test -s "conftest.$ac_objext"'
2185   { (eval echo "$as_me:2185: \"$ac_try\"") >&5
2186   (eval $ac_try) 2>&5
2187   ac_status=$?
2188   echo "$as_me:2188: \$? = $ac_status" >&5
2189   (exit "$ac_status"); }; }; then
2190   for ac_declaration in \
2191    ''\
2192    '#include <stdlib.h>' \
2193    'extern "C" void std::exit (int) throw (); using std::exit;' \
2194    'extern "C" void std::exit (int); using std::exit;' \
2195    'extern "C" void exit (int) throw ();' \
2196    'extern "C" void exit (int);' \
2197    'void exit (int);'
2198 do
2199   cat >"conftest.$ac_ext" <<_ACEOF
2200 #line 2200 "configure"
2201 #include "confdefs.h"
2202 #include <stdlib.h>
2203 $ac_declaration
2204 int
2205 main (void)
2206 {
2207 exit (42);
2208   ;
2209   return 0;
2210 }
2211 _ACEOF
2212 rm -f "conftest.$ac_objext"
2213 if { (eval echo "$as_me:2213: \"$ac_compile\"") >&5
2214   (eval $ac_compile) 2>&5
2215   ac_status=$?
2216   echo "$as_me:2216: \$? = $ac_status" >&5
2217   (exit "$ac_status"); } &&
2218          { ac_try='test -s "conftest.$ac_objext"'
2219   { (eval echo "$as_me:2219: \"$ac_try\"") >&5
2220   (eval $ac_try) 2>&5
2221   ac_status=$?
2222   echo "$as_me:2222: \$? = $ac_status" >&5
2223   (exit "$ac_status"); }; }; then
2224   :
2225 else
2226   echo "$as_me: failed program was:" >&5
2227 cat "conftest.$ac_ext" >&5
2228 continue
2229 fi
2230 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2231   cat >"conftest.$ac_ext" <<_ACEOF
2232 #line 2232 "configure"
2233 #include "confdefs.h"
2234 $ac_declaration
2235 int
2236 main (void)
2237 {
2238 exit (42);
2239   ;
2240   return 0;
2241 }
2242 _ACEOF
2243 rm -f "conftest.$ac_objext"
2244 if { (eval echo "$as_me:2244: \"$ac_compile\"") >&5
2245   (eval $ac_compile) 2>&5
2246   ac_status=$?
2247   echo "$as_me:2247: \$? = $ac_status" >&5
2248   (exit "$ac_status"); } &&
2249          { ac_try='test -s "conftest.$ac_objext"'
2250   { (eval echo "$as_me:2250: \"$ac_try\"") >&5
2251   (eval $ac_try) 2>&5
2252   ac_status=$?
2253   echo "$as_me:2253: \$? = $ac_status" >&5
2254   (exit "$ac_status"); }; }; then
2255   break
2256 else
2257   echo "$as_me: failed program was:" >&5
2258 cat "conftest.$ac_ext" >&5
2259 fi
2260 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2261 done
2262 rm -rf conftest*
2263 if test -n "$ac_declaration"; then
2264   echo '#ifdef __cplusplus' >>confdefs.h
2265   echo "$ac_declaration"    >>confdefs.h
2266   echo '#endif'             >>confdefs.h
2267 fi
2268
2269 else
2270   echo "$as_me: failed program was:" >&5
2271 cat "conftest.$ac_ext" >&5
2272 fi
2273 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2274 ac_ext=c
2275 ac_cpp='$CPP $CPPFLAGS'
2276 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2277 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2278 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2279 ac_main_return="return"
2280
2281 GCC_VERSION=none
2282 if test "$GCC" = yes ; then
2283         echo "$as_me:2283: checking version of $CC" >&5
2284 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2285         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.].*//'`"
2286         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2287         echo "$as_me:2287: result: $GCC_VERSION" >&5
2288 echo "${ECHO_T}$GCC_VERSION" >&6
2289 fi
2290
2291 INTEL_COMPILER=no
2292
2293 if test "$GCC" = yes ; then
2294         case "$host_os" in
2295         (linux*|gnu*)
2296                 echo "$as_me:2296: checking if this is really Intel C compiler" >&5
2297 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2298                 cf_save_CFLAGS="$CFLAGS"
2299                 CFLAGS="$CFLAGS -no-gcc"
2300                 cat >"conftest.$ac_ext" <<_ACEOF
2301 #line 2301 "configure"
2302 #include "confdefs.h"
2303
2304 int
2305 main (void)
2306 {
2307
2308 #ifdef __INTEL_COMPILER
2309 #else
2310 make an error
2311 #endif
2312
2313   ;
2314   return 0;
2315 }
2316 _ACEOF
2317 rm -f "conftest.$ac_objext"
2318 if { (eval echo "$as_me:2318: \"$ac_compile\"") >&5
2319   (eval $ac_compile) 2>&5
2320   ac_status=$?
2321   echo "$as_me:2321: \$? = $ac_status" >&5
2322   (exit "$ac_status"); } &&
2323          { ac_try='test -s "conftest.$ac_objext"'
2324   { (eval echo "$as_me:2324: \"$ac_try\"") >&5
2325   (eval $ac_try) 2>&5
2326   ac_status=$?
2327   echo "$as_me:2327: \$? = $ac_status" >&5
2328   (exit "$ac_status"); }; }; then
2329   INTEL_COMPILER=yes
2330 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2331
2332 else
2333   echo "$as_me: failed program was:" >&5
2334 cat "conftest.$ac_ext" >&5
2335 fi
2336 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2337                 CFLAGS="$cf_save_CFLAGS"
2338                 echo "$as_me:2338: result: $INTEL_COMPILER" >&5
2339 echo "${ECHO_T}$INTEL_COMPILER" >&6
2340                 ;;
2341         esac
2342 fi
2343
2344 CLANG_COMPILER=no
2345
2346 if test "$GCC" = yes ; then
2347         echo "$as_me:2347: checking if this is really Clang C compiler" >&5
2348 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2349         cf_save_CFLAGS="$CFLAGS"
2350         cat >"conftest.$ac_ext" <<_ACEOF
2351 #line 2351 "configure"
2352 #include "confdefs.h"
2353
2354 int
2355 main (void)
2356 {
2357
2358 #ifdef __clang__
2359 #else
2360 make an error
2361 #endif
2362
2363   ;
2364   return 0;
2365 }
2366 _ACEOF
2367 rm -f "conftest.$ac_objext"
2368 if { (eval echo "$as_me:2368: \"$ac_compile\"") >&5
2369   (eval $ac_compile) 2>&5
2370   ac_status=$?
2371   echo "$as_me:2371: \$? = $ac_status" >&5
2372   (exit "$ac_status"); } &&
2373          { ac_try='test -s "conftest.$ac_objext"'
2374   { (eval echo "$as_me:2374: \"$ac_try\"") >&5
2375   (eval $ac_try) 2>&5
2376   ac_status=$?
2377   echo "$as_me:2377: \$? = $ac_status" >&5
2378   (exit "$ac_status"); }; }; then
2379   CLANG_COMPILER=yes
2380
2381 else
2382   echo "$as_me: failed program was:" >&5
2383 cat "conftest.$ac_ext" >&5
2384 fi
2385 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2386         CFLAGS="$cf_save_CFLAGS"
2387         echo "$as_me:2387: result: $CLANG_COMPILER" >&5
2388 echo "${ECHO_T}$CLANG_COMPILER" >&6
2389 fi
2390
2391 CLANG_VERSION=none
2392
2393 if test "x$CLANG_COMPILER" = "xyes" ; then
2394         case "$CC" in
2395         (c[1-9][0-9]|*/c[1-9][0-9])
2396                 { echo "$as_me:2396: WARNING: replacing broken compiler alias $CC" >&5
2397 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2398                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2399                 CC=clang
2400                 ;;
2401         esac
2402
2403         echo "$as_me:2403: checking version of $CC" >&5
2404 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2405         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.].*//'`"
2406         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2407         echo "$as_me:2407: result: $CLANG_VERSION" >&5
2408 echo "${ECHO_T}$CLANG_VERSION" >&6
2409
2410         for cf_clang_opt in \
2411                 -Qunused-arguments \
2412                 -Wno-error=implicit-function-declaration
2413         do
2414                 echo "$as_me:2414: checking if option $cf_clang_opt works" >&5
2415 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2416                 cf_save_CFLAGS="$CFLAGS"
2417                 CFLAGS="$CFLAGS $cf_clang_opt"
2418                 cat >"conftest.$ac_ext" <<_ACEOF
2419 #line 2419 "configure"
2420 #include "confdefs.h"
2421
2422                         #include <stdio.h>
2423 int
2424 main (void)
2425 {
2426
2427                         printf("hello!\\n");
2428   ;
2429   return 0;
2430 }
2431 _ACEOF
2432 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2433 if { (eval echo "$as_me:2433: \"$ac_link\"") >&5
2434   (eval $ac_link) 2>&5
2435   ac_status=$?
2436   echo "$as_me:2436: \$? = $ac_status" >&5
2437   (exit "$ac_status"); } &&
2438          { ac_try='test -s "conftest$ac_exeext"'
2439   { (eval echo "$as_me:2439: \"$ac_try\"") >&5
2440   (eval $ac_try) 2>&5
2441   ac_status=$?
2442   echo "$as_me:2442: \$? = $ac_status" >&5
2443   (exit "$ac_status"); }; }; then
2444
2445                         cf_clang_optok=yes
2446 else
2447   echo "$as_me: failed program was:" >&5
2448 cat "conftest.$ac_ext" >&5
2449
2450                         cf_clang_optok=no
2451 fi
2452 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2453                 echo "$as_me:2453: result: $cf_clang_optok" >&5
2454 echo "${ECHO_T}$cf_clang_optok" >&6
2455                 CFLAGS="$cf_save_CFLAGS"
2456                 if test "$cf_clang_optok" = yes; then
2457                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2458
2459 echo "${as_me:-configure}:2459: testing adding option $cf_clang_opt ..." 1>&5
2460
2461         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2462         CFLAGS="${CFLAGS}$cf_clang_opt"
2463
2464                 fi
2465         done
2466 fi
2467
2468 echo "$as_me:2468: checking for $CC option to accept ANSI C" >&5
2469 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2470 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2471   echo $ECHO_N "(cached) $ECHO_C" >&6
2472 else
2473   ac_cv_prog_cc_stdc=no
2474 ac_save_CC=$CC
2475 cat >"conftest.$ac_ext" <<_ACEOF
2476 #line 2476 "configure"
2477 #include "confdefs.h"
2478 #include <stdarg.h>
2479 #include <stdio.h>
2480 #include <sys/types.h>
2481 #include <sys/stat.h>
2482 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2483 struct buf { int x; };
2484 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2485 static char *e (p, i)
2486      char **p;
2487      int i;
2488 {
2489   return p[i];
2490 }
2491 static char *f (char * (*g) (char **, int), char **p, ...)
2492 {
2493   char *s;
2494   va_list v;
2495   va_start (v,p);
2496   s = g (p, va_arg (v,int));
2497   va_end (v);
2498   return s;
2499 }
2500 int test (int i, double x);
2501 struct s1 {int (*f) (int a);};
2502 struct s2 {int (*f) (double a);};
2503 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2504 int argc;
2505 char **argv;
2506 int
2507 main (void)
2508 {
2509 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2510   ;
2511   return 0;
2512 }
2513 _ACEOF
2514 # Don't try gcc -ansi; that turns off useful extensions and
2515 # breaks some systems' header files.
2516 # AIX                   -qlanglvl=ansi
2517 # Ultrix and OSF/1      -std1
2518 # HP-UX 10.20 and later -Ae
2519 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2520 # SVR4                  -Xc -D__EXTENSIONS__
2521 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2522 do
2523   CC="$ac_save_CC $ac_arg"
2524   rm -f "conftest.$ac_objext"
2525 if { (eval echo "$as_me:2525: \"$ac_compile\"") >&5
2526   (eval $ac_compile) 2>&5
2527   ac_status=$?
2528   echo "$as_me:2528: \$? = $ac_status" >&5
2529   (exit "$ac_status"); } &&
2530          { ac_try='test -s "conftest.$ac_objext"'
2531   { (eval echo "$as_me:2531: \"$ac_try\"") >&5
2532   (eval $ac_try) 2>&5
2533   ac_status=$?
2534   echo "$as_me:2534: \$? = $ac_status" >&5
2535   (exit "$ac_status"); }; }; then
2536   ac_cv_prog_cc_stdc=$ac_arg
2537 break
2538 else
2539   echo "$as_me: failed program was:" >&5
2540 cat "conftest.$ac_ext" >&5
2541 fi
2542 rm -f "conftest.$ac_objext"
2543 done
2544 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2545 CC=$ac_save_CC
2546
2547 fi
2548
2549 case "x$ac_cv_prog_cc_stdc" in
2550   x|xno)
2551     echo "$as_me:2551: result: none needed" >&5
2552 echo "${ECHO_T}none needed" >&6 ;;
2553   *)
2554     echo "$as_me:2554: result: $ac_cv_prog_cc_stdc" >&5
2555 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2556     CC="$CC $ac_cv_prog_cc_stdc" ;;
2557 esac
2558
2559 # This should have been defined by AC_PROG_CC
2560 : "${CC:=cc}"
2561
2562 echo "$as_me:2562: checking \$CFLAGS variable" >&5
2563 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2564 case "x$CFLAGS" in
2565 (*-[IUD]*)
2566         echo "$as_me:2566: result: broken" >&5
2567 echo "${ECHO_T}broken" >&6
2568         { echo "$as_me:2568: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2569 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2570         cf_flags="$CFLAGS"
2571         CFLAGS=
2572         for cf_arg in $cf_flags
2573         do
2574
2575 cf_fix_cppflags=no
2576 cf_new_cflags=
2577 cf_new_cppflags=
2578 cf_new_extra_cppflags=
2579
2580 for cf_add_cflags in $cf_arg
2581 do
2582 case "$cf_fix_cppflags" in
2583 (no)
2584         case "$cf_add_cflags" in
2585         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2586                 case "$cf_add_cflags" in
2587                 (-D*)
2588                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2589
2590                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2591                                 && test -z "${cf_tst_cflags}" \
2592                                 && cf_fix_cppflags=yes
2593
2594                         if test "$cf_fix_cppflags" = yes ; then
2595
2596         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2597         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2598
2599                                 continue
2600                         elif test "${cf_tst_cflags}" = "\"'" ; then
2601
2602         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2603         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2604
2605                                 continue
2606                         fi
2607                         ;;
2608                 esac
2609                 case "$CPPFLAGS" in
2610                 (*$cf_add_cflags)
2611                         ;;
2612                 (*)
2613                         case "$cf_add_cflags" in
2614                         (-D*)
2615                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2616
2617 CPPFLAGS=`echo "$CPPFLAGS" | \
2618         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2619                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2620
2621                                 ;;
2622                         esac
2623
2624         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2625         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2626
2627                         ;;
2628                 esac
2629                 ;;
2630         (*)
2631
2632         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2633         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2634
2635                 ;;
2636         esac
2637         ;;
2638 (yes)
2639
2640         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2641         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2642
2643         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2644
2645         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2646                 && test -z "${cf_tst_cflags}" \
2647                 && cf_fix_cppflags=no
2648         ;;
2649 esac
2650 done
2651
2652 if test -n "$cf_new_cflags" ; then
2653
2654         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2655         CFLAGS="${CFLAGS}$cf_new_cflags"
2656
2657 fi
2658
2659 if test -n "$cf_new_cppflags" ; then
2660
2661         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2662         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2663
2664 fi
2665
2666 if test -n "$cf_new_extra_cppflags" ; then
2667
2668         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2669         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2670
2671 fi
2672
2673         done
2674         ;;
2675 (*)
2676         echo "$as_me:2676: result: ok" >&5
2677 echo "${ECHO_T}ok" >&6
2678         ;;
2679 esac
2680
2681 echo "$as_me:2681: checking \$CC variable" >&5
2682 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2683 case "$CC" in
2684 (*[\ \  ]-*)
2685         echo "$as_me:2685: result: broken" >&5
2686 echo "${ECHO_T}broken" >&6
2687         { echo "$as_me:2687: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2688 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2689         # humor him...
2690         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2691         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2692         CC="$cf_prog"
2693         for cf_arg in $cf_flags
2694         do
2695                 case "x$cf_arg" in
2696                 (x-[IUDfgOW]*)
2697
2698 cf_fix_cppflags=no
2699 cf_new_cflags=
2700 cf_new_cppflags=
2701 cf_new_extra_cppflags=
2702
2703 for cf_add_cflags in $cf_arg
2704 do
2705 case "$cf_fix_cppflags" in
2706 (no)
2707         case "$cf_add_cflags" in
2708         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2709                 case "$cf_add_cflags" in
2710                 (-D*)
2711                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2712
2713                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2714                                 && test -z "${cf_tst_cflags}" \
2715                                 && cf_fix_cppflags=yes
2716
2717                         if test "$cf_fix_cppflags" = yes ; then
2718
2719         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2720         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2721
2722                                 continue
2723                         elif test "${cf_tst_cflags}" = "\"'" ; then
2724
2725         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2726         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2727
2728                                 continue
2729                         fi
2730                         ;;
2731                 esac
2732                 case "$CPPFLAGS" in
2733                 (*$cf_add_cflags)
2734                         ;;
2735                 (*)
2736                         case "$cf_add_cflags" in
2737                         (-D*)
2738                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2739
2740 CPPFLAGS=`echo "$CPPFLAGS" | \
2741         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2742                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2743
2744                                 ;;
2745                         esac
2746
2747         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2748         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2749
2750                         ;;
2751                 esac
2752                 ;;
2753         (*)
2754
2755         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2756         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2757
2758                 ;;
2759         esac
2760         ;;
2761 (yes)
2762
2763         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2764         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2765
2766         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2767
2768         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2769                 && test -z "${cf_tst_cflags}" \
2770                 && cf_fix_cppflags=no
2771         ;;
2772 esac
2773 done
2774
2775 if test -n "$cf_new_cflags" ; then
2776
2777         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2778         CFLAGS="${CFLAGS}$cf_new_cflags"
2779
2780 fi
2781
2782 if test -n "$cf_new_cppflags" ; then
2783
2784         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2785         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2786
2787 fi
2788
2789 if test -n "$cf_new_extra_cppflags" ; then
2790
2791         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2792         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2793
2794 fi
2795
2796                         ;;
2797                 (*)
2798                         CC="$CC $cf_arg"
2799                         ;;
2800                 esac
2801         done
2802         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2803
2804 echo "${as_me:-configure}:2804: testing resulting CC: '$CC' ..." 1>&5
2805
2806         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2807
2808 echo "${as_me:-configure}:2808: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2809
2810         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2811
2812 echo "${as_me:-configure}:2812: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2813
2814         ;;
2815 (*)
2816         echo "$as_me:2816: result: ok" >&5
2817 echo "${ECHO_T}ok" >&6
2818         ;;
2819 esac
2820
2821 ac_ext=c
2822 ac_cpp='$CPP $CPPFLAGS'
2823 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2824 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2825 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2826 ac_main_return="return"
2827 echo "$as_me:2827: checking how to run the C preprocessor" >&5
2828 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2829 # On Suns, sometimes $CPP names a directory.
2830 if test -n "$CPP" && test -d "$CPP"; then
2831   CPP=
2832 fi
2833 if test -z "$CPP"; then
2834   if test "${ac_cv_prog_CPP+set}" = set; then
2835   echo $ECHO_N "(cached) $ECHO_C" >&6
2836 else
2837       # Double quotes because CPP needs to be expanded
2838     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2839     do
2840       ac_preproc_ok=false
2841 for ac_c_preproc_warn_flag in '' yes
2842 do
2843   # Use a header file that comes with gcc, so configuring glibc
2844   # with a fresh cross-compiler works.
2845   # On the NeXT, cc -E runs the code through the compiler's parser,
2846   # not just through cpp. "Syntax error" is here to catch this case.
2847   cat >"conftest.$ac_ext" <<_ACEOF
2848 #line 2848 "configure"
2849 #include "confdefs.h"
2850 #include <assert.h>
2851                      Syntax error
2852 _ACEOF
2853 if { (eval echo "$as_me:2853: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2854   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2855   ac_status=$?
2856   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2857   rm -f conftest.er1
2858   cat conftest.err >&5
2859   echo "$as_me:2859: \$? = $ac_status" >&5
2860   (exit "$ac_status"); } >/dev/null; then
2861   if test -s conftest.err; then
2862     ac_cpp_err=$ac_c_preproc_warn_flag
2863   else
2864     ac_cpp_err=
2865   fi
2866 else
2867   ac_cpp_err=yes
2868 fi
2869 if test -z "$ac_cpp_err"; then
2870   :
2871 else
2872   echo "$as_me: failed program was:" >&5
2873   cat "conftest.$ac_ext" >&5
2874   # Broken: fails on valid input.
2875 continue
2876 fi
2877 rm -f conftest.err "conftest.$ac_ext"
2878
2879   # OK, works on sane cases.  Now check whether non-existent headers
2880   # can be detected and how.
2881   cat >"conftest.$ac_ext" <<_ACEOF
2882 #line 2882 "configure"
2883 #include "confdefs.h"
2884 #include <ac_nonexistent.h>
2885 _ACEOF
2886 if { (eval echo "$as_me:2886: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2887   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2888   ac_status=$?
2889   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2890   rm -f conftest.er1
2891   cat conftest.err >&5
2892   echo "$as_me:2892: \$? = $ac_status" >&5
2893   (exit "$ac_status"); } >/dev/null; then
2894   if test -s conftest.err; then
2895     ac_cpp_err=$ac_c_preproc_warn_flag
2896   else
2897     ac_cpp_err=
2898   fi
2899 else
2900   ac_cpp_err=yes
2901 fi
2902 if test -z "$ac_cpp_err"; then
2903   # Broken: success on invalid input.
2904 continue
2905 else
2906   echo "$as_me: failed program was:" >&5
2907   cat "conftest.$ac_ext" >&5
2908   # Passes both tests.
2909 ac_preproc_ok=:
2910 break
2911 fi
2912 rm -f conftest.err "conftest.$ac_ext"
2913
2914 done
2915 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2916 rm -f conftest.err "conftest.$ac_ext"
2917 if $ac_preproc_ok; then
2918   break
2919 fi
2920
2921     done
2922     ac_cv_prog_CPP=$CPP
2923
2924 fi
2925   CPP=$ac_cv_prog_CPP
2926 else
2927   ac_cv_prog_CPP=$CPP
2928 fi
2929 echo "$as_me:2929: result: $CPP" >&5
2930 echo "${ECHO_T}$CPP" >&6
2931 ac_preproc_ok=false
2932 for ac_c_preproc_warn_flag in '' yes
2933 do
2934   # Use a header file that comes with gcc, so configuring glibc
2935   # with a fresh cross-compiler works.
2936   # On the NeXT, cc -E runs the code through the compiler's parser,
2937   # not just through cpp. "Syntax error" is here to catch this case.
2938   cat >"conftest.$ac_ext" <<_ACEOF
2939 #line 2939 "configure"
2940 #include "confdefs.h"
2941 #include <assert.h>
2942                      Syntax error
2943 _ACEOF
2944 if { (eval echo "$as_me:2944: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2945   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2946   ac_status=$?
2947   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2948   rm -f conftest.er1
2949   cat conftest.err >&5
2950   echo "$as_me:2950: \$? = $ac_status" >&5
2951   (exit "$ac_status"); } >/dev/null; then
2952   if test -s conftest.err; then
2953     ac_cpp_err=$ac_c_preproc_warn_flag
2954   else
2955     ac_cpp_err=
2956   fi
2957 else
2958   ac_cpp_err=yes
2959 fi
2960 if test -z "$ac_cpp_err"; then
2961   :
2962 else
2963   echo "$as_me: failed program was:" >&5
2964   cat "conftest.$ac_ext" >&5
2965   # Broken: fails on valid input.
2966 continue
2967 fi
2968 rm -f conftest.err "conftest.$ac_ext"
2969
2970   # OK, works on sane cases.  Now check whether non-existent headers
2971   # can be detected and how.
2972   cat >"conftest.$ac_ext" <<_ACEOF
2973 #line 2973 "configure"
2974 #include "confdefs.h"
2975 #include <ac_nonexistent.h>
2976 _ACEOF
2977 if { (eval echo "$as_me:2977: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2978   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2979   ac_status=$?
2980   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2981   rm -f conftest.er1
2982   cat conftest.err >&5
2983   echo "$as_me:2983: \$? = $ac_status" >&5
2984   (exit "$ac_status"); } >/dev/null; then
2985   if test -s conftest.err; then
2986     ac_cpp_err=$ac_c_preproc_warn_flag
2987   else
2988     ac_cpp_err=
2989   fi
2990 else
2991   ac_cpp_err=yes
2992 fi
2993 if test -z "$ac_cpp_err"; then
2994   # Broken: success on invalid input.
2995 continue
2996 else
2997   echo "$as_me: failed program was:" >&5
2998   cat "conftest.$ac_ext" >&5
2999   # Passes both tests.
3000 ac_preproc_ok=:
3001 break
3002 fi
3003 rm -f conftest.err "conftest.$ac_ext"
3004
3005 done
3006 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3007 rm -f conftest.err "conftest.$ac_ext"
3008 if $ac_preproc_ok; then
3009   :
3010 else
3011   { { echo "$as_me:3011: error: C preprocessor \"$CPP\" fails sanity check" >&5
3012 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3013    { (exit 1); exit 1; }; }
3014 fi
3015
3016 ac_ext=c
3017 ac_cpp='$CPP $CPPFLAGS'
3018 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3019 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3020 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3021 ac_main_return="return"
3022
3023 if test $ac_cv_c_compiler_gnu = yes; then
3024     echo "$as_me:3024: checking whether $CC needs -traditional" >&5
3025 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3026 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3027   echo $ECHO_N "(cached) $ECHO_C" >&6
3028 else
3029     ac_pattern="Autoconf.*'x'"
3030   cat >"conftest.$ac_ext" <<_ACEOF
3031 #line 3031 "configure"
3032 #include "confdefs.h"
3033 #include <sgtty.h>
3034 int Autoconf = TIOCGETP;
3035 _ACEOF
3036 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3037   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3038   ac_cv_prog_gcc_traditional=yes
3039 else
3040   ac_cv_prog_gcc_traditional=no
3041 fi
3042 rm -rf conftest*
3043
3044   if test $ac_cv_prog_gcc_traditional = no; then
3045     cat >"conftest.$ac_ext" <<_ACEOF
3046 #line 3046 "configure"
3047 #include "confdefs.h"
3048 #include <termio.h>
3049 int Autoconf = TCGETA;
3050 _ACEOF
3051 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3052   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3053   ac_cv_prog_gcc_traditional=yes
3054 fi
3055 rm -rf conftest*
3056
3057   fi
3058 fi
3059 echo "$as_me:3059: result: $ac_cv_prog_gcc_traditional" >&5
3060 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3061   if test $ac_cv_prog_gcc_traditional = yes; then
3062     CC="$CC -traditional"
3063   fi
3064 fi
3065
3066 echo "$as_me:3066: checking whether $CC understands -c and -o together" >&5
3067 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3068 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3069   echo $ECHO_N "(cached) $ECHO_C" >&6
3070 else
3071
3072 cat > conftest.$ac_ext <<CF_EOF
3073 int main(void)
3074 {
3075         ${cf_cv_main_return:-return}(0);
3076 }
3077 CF_EOF
3078 # We do the test twice because some compilers refuse to overwrite an
3079 # existing .o file with -o, though they will create one.
3080 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3081 if { (eval echo "$as_me:3081: \"$ac_try\"") >&5
3082   (eval $ac_try) 2>&5
3083   ac_status=$?
3084   echo "$as_me:3084: \$? = $ac_status" >&5
3085   (exit "$ac_status"); } &&
3086   test -f conftest2.$ac_objext && { (eval echo "$as_me:3086: \"$ac_try\"") >&5
3087   (eval $ac_try) 2>&5
3088   ac_status=$?
3089   echo "$as_me:3089: \$? = $ac_status" >&5
3090   (exit "$ac_status"); };
3091 then
3092   eval cf_cv_prog_CC_c_o=yes
3093 else
3094   eval cf_cv_prog_CC_c_o=no
3095 fi
3096 rm -rf ./conftest*
3097
3098 fi
3099 if test "$cf_cv_prog_CC_c_o" = yes; then
3100   echo "$as_me:3100: result: yes" >&5
3101 echo "${ECHO_T}yes" >&6
3102 else
3103   echo "$as_me:3103: result: no" >&5
3104 echo "${ECHO_T}no" >&6
3105 fi
3106
3107 if test "$cross_compiling" = yes ; then
3108         LDCONFIG=:
3109 else
3110         case "$cf_cv_system_name" in
3111         (dragonfly*|mirbsd*|freebsd*)
3112                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3113                 ;;
3114         (*) LDPATH=$PATH:/sbin:/usr/sbin
3115                 # Extract the first word of "ldconfig", so it can be a program name with args.
3116 set dummy ldconfig; ac_word=$2
3117 echo "$as_me:3117: checking for $ac_word" >&5
3118 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3119 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3120   echo $ECHO_N "(cached) $ECHO_C" >&6
3121 else
3122   case $LDCONFIG in
3123   [\\/]* | ?:[\\/]*)
3124   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3125   ;;
3126   *)
3127   ac_save_IFS=$IFS; IFS=$ac_path_separator
3128 ac_dummy="$LDPATH"
3129 for ac_dir in $ac_dummy; do
3130   IFS=$ac_save_IFS
3131   test -z "$ac_dir" && ac_dir=.
3132   if $as_executable_p "$ac_dir/$ac_word"; then
3133    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3134    echo "$as_me:3134: found $ac_dir/$ac_word" >&5
3135    break
3136 fi
3137 done
3138
3139   ;;
3140 esac
3141 fi
3142 LDCONFIG=$ac_cv_path_LDCONFIG
3143
3144 if test -n "$LDCONFIG"; then
3145   echo "$as_me:3145: result: $LDCONFIG" >&5
3146 echo "${ECHO_T}$LDCONFIG" >&6
3147 else
3148   echo "$as_me:3148: result: no" >&5
3149 echo "${ECHO_T}no" >&6
3150 fi
3151
3152                 ;;
3153         esac
3154 fi
3155
3156 echo "$as_me:3156: checking if you want to ensure bool is consistent with C++" >&5
3157 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3158
3159 # Check whether --with-cxx or --without-cxx was given.
3160 if test "${with_cxx+set}" = set; then
3161   withval="$with_cxx"
3162   cf_with_cxx=$withval
3163 else
3164   cf_with_cxx=yes
3165 fi;
3166 echo "$as_me:3166: result: $cf_with_cxx" >&5
3167 echo "${ECHO_T}$cf_with_cxx" >&6
3168 if test "X$cf_with_cxx" = Xno ; then
3169         CXX=""
3170         GXX=""
3171 else
3172         # with autoconf 2.13, we can change the error to a warning:
3173                 ac_ext=cc
3174 ac_cpp='$CXXCPP $CPPFLAGS'
3175 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3176 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3177 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3178 ac_main_return="return"
3179 if test -n "$ac_tool_prefix"; then
3180   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3181   do
3182     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3183 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3184 echo "$as_me:3184: checking for $ac_word" >&5
3185 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3186 if test "${ac_cv_prog_CXX+set}" = set; then
3187   echo $ECHO_N "(cached) $ECHO_C" >&6
3188 else
3189   if test -n "$CXX"; then
3190   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3191 else
3192   ac_save_IFS=$IFS; IFS=$ac_path_separator
3193 ac_dummy="$PATH"
3194 for ac_dir in $ac_dummy; do
3195   IFS=$ac_save_IFS
3196   test -z "$ac_dir" && ac_dir=.
3197   $as_executable_p "$ac_dir/$ac_word" || continue
3198 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3199 echo "$as_me:3199: found $ac_dir/$ac_word" >&5
3200 break
3201 done
3202
3203 fi
3204 fi
3205 CXX=$ac_cv_prog_CXX
3206 if test -n "$CXX"; then
3207   echo "$as_me:3207: result: $CXX" >&5
3208 echo "${ECHO_T}$CXX" >&6
3209 else
3210   echo "$as_me:3210: result: no" >&5
3211 echo "${ECHO_T}no" >&6
3212 fi
3213
3214     test -n "$CXX" && break
3215   done
3216 fi
3217 if test -z "$CXX"; then
3218   ac_ct_CXX=$CXX
3219   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3220 do
3221   # Extract the first word of "$ac_prog", so it can be a program name with args.
3222 set dummy $ac_prog; ac_word=$2
3223 echo "$as_me:3223: checking for $ac_word" >&5
3224 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3225 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3226   echo $ECHO_N "(cached) $ECHO_C" >&6
3227 else
3228   if test -n "$ac_ct_CXX"; then
3229   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3230 else
3231   ac_save_IFS=$IFS; IFS=$ac_path_separator
3232 ac_dummy="$PATH"
3233 for ac_dir in $ac_dummy; do
3234   IFS=$ac_save_IFS
3235   test -z "$ac_dir" && ac_dir=.
3236   $as_executable_p "$ac_dir/$ac_word" || continue
3237 ac_cv_prog_ac_ct_CXX="$ac_prog"
3238 echo "$as_me:3238: found $ac_dir/$ac_word" >&5
3239 break
3240 done
3241
3242 fi
3243 fi
3244 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3245 if test -n "$ac_ct_CXX"; then
3246   echo "$as_me:3246: result: $ac_ct_CXX" >&5
3247 echo "${ECHO_T}$ac_ct_CXX" >&6
3248 else
3249   echo "$as_me:3249: result: no" >&5
3250 echo "${ECHO_T}no" >&6
3251 fi
3252
3253   test -n "$ac_ct_CXX" && break
3254 done
3255 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3256
3257   CXX=$ac_ct_CXX
3258 fi
3259
3260 # Provide some information about the compiler.
3261 echo "$as_me:3261:" \
3262      "checking for C++ compiler version" >&5
3263 ac_compiler=`set X $ac_compile; echo $2`
3264 { (eval echo "$as_me:3264: \"$ac_compiler --version </dev/null >&5\"") >&5
3265   (eval $ac_compiler --version </dev/null >&5) 2>&5
3266   ac_status=$?
3267   echo "$as_me:3267: \$? = $ac_status" >&5
3268   (exit "$ac_status"); }
3269 { (eval echo "$as_me:3269: \"$ac_compiler -v </dev/null >&5\"") >&5
3270   (eval $ac_compiler -v </dev/null >&5) 2>&5
3271   ac_status=$?
3272   echo "$as_me:3272: \$? = $ac_status" >&5
3273   (exit "$ac_status"); }
3274 { (eval echo "$as_me:3274: \"$ac_compiler -V </dev/null >&5\"") >&5
3275   (eval $ac_compiler -V </dev/null >&5) 2>&5
3276   ac_status=$?
3277   echo "$as_me:3277: \$? = $ac_status" >&5
3278   (exit "$ac_status"); }
3279
3280 echo "$as_me:3280: checking whether we are using the GNU C++ compiler" >&5
3281 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3282 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3283   echo $ECHO_N "(cached) $ECHO_C" >&6
3284 else
3285   cat >"conftest.$ac_ext" <<_ACEOF
3286 #line 3286 "configure"
3287 #include "confdefs.h"
3288
3289 int
3290 main (void)
3291 {
3292 #ifndef __GNUC__
3293        choke me
3294 #endif
3295
3296   ;
3297   return 0;
3298 }
3299 _ACEOF
3300 rm -f "conftest.$ac_objext"
3301 if { (eval echo "$as_me:3301: \"$ac_compile\"") >&5
3302   (eval $ac_compile) 2>&5
3303   ac_status=$?
3304   echo "$as_me:3304: \$? = $ac_status" >&5
3305   (exit "$ac_status"); } &&
3306          { ac_try='test -s "conftest.$ac_objext"'
3307   { (eval echo "$as_me:3307: \"$ac_try\"") >&5
3308   (eval $ac_try) 2>&5
3309   ac_status=$?
3310   echo "$as_me:3310: \$? = $ac_status" >&5
3311   (exit "$ac_status"); }; }; then
3312   ac_compiler_gnu=yes
3313 else
3314   echo "$as_me: failed program was:" >&5
3315 cat "conftest.$ac_ext" >&5
3316 ac_compiler_gnu=no
3317 fi
3318 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3319 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3320
3321 fi
3322 echo "$as_me:3322: result: $ac_cv_cxx_compiler_gnu" >&5
3323 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3324 GXX=`test $ac_compiler_gnu = yes && echo yes`
3325 ac_test_CXXFLAGS=${CXXFLAGS+set}
3326 ac_save_CXXFLAGS=$CXXFLAGS
3327 CXXFLAGS="-g"
3328 echo "$as_me:3328: checking whether $CXX accepts -g" >&5
3329 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3330 if test "${ac_cv_prog_cxx_g+set}" = set; then
3331   echo $ECHO_N "(cached) $ECHO_C" >&6
3332 else
3333   cat >"conftest.$ac_ext" <<_ACEOF
3334 #line 3334 "configure"
3335 #include "confdefs.h"
3336
3337 int
3338 main (void)
3339 {
3340
3341   ;
3342   return 0;
3343 }
3344 _ACEOF
3345 rm -f "conftest.$ac_objext"
3346 if { (eval echo "$as_me:3346: \"$ac_compile\"") >&5
3347   (eval $ac_compile) 2>&5
3348   ac_status=$?
3349   echo "$as_me:3349: \$? = $ac_status" >&5
3350   (exit "$ac_status"); } &&
3351          { ac_try='test -s "conftest.$ac_objext"'
3352   { (eval echo "$as_me:3352: \"$ac_try\"") >&5
3353   (eval $ac_try) 2>&5
3354   ac_status=$?
3355   echo "$as_me:3355: \$? = $ac_status" >&5
3356   (exit "$ac_status"); }; }; then
3357   ac_cv_prog_cxx_g=yes
3358 else
3359   echo "$as_me: failed program was:" >&5
3360 cat "conftest.$ac_ext" >&5
3361 ac_cv_prog_cxx_g=no
3362 fi
3363 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3364 fi
3365 echo "$as_me:3365: result: $ac_cv_prog_cxx_g" >&5
3366 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3367 if test "$ac_test_CXXFLAGS" = set; then
3368   CXXFLAGS=$ac_save_CXXFLAGS
3369 elif test $ac_cv_prog_cxx_g = yes; then
3370   if test "$GXX" = yes; then
3371     CXXFLAGS="-g -O2"
3372   else
3373     CXXFLAGS="-g"
3374   fi
3375 else
3376   if test "$GXX" = yes; then
3377     CXXFLAGS="-O2"
3378   else
3379     CXXFLAGS=
3380   fi
3381 fi
3382 for ac_declaration in \
3383    ''\
3384    '#include <stdlib.h>' \
3385    'extern "C" void std::exit (int) throw (); using std::exit;' \
3386    'extern "C" void std::exit (int); using std::exit;' \
3387    'extern "C" void exit (int) throw ();' \
3388    'extern "C" void exit (int);' \
3389    'void exit (int);'
3390 do
3391   cat >"conftest.$ac_ext" <<_ACEOF
3392 #line 3392 "configure"
3393 #include "confdefs.h"
3394 #include <stdlib.h>
3395 $ac_declaration
3396 int
3397 main (void)
3398 {
3399 exit (42);
3400   ;
3401   return 0;
3402 }
3403 _ACEOF
3404 rm -f "conftest.$ac_objext"
3405 if { (eval echo "$as_me:3405: \"$ac_compile\"") >&5
3406   (eval $ac_compile) 2>&5
3407   ac_status=$?
3408   echo "$as_me:3408: \$? = $ac_status" >&5
3409   (exit "$ac_status"); } &&
3410          { ac_try='test -s "conftest.$ac_objext"'
3411   { (eval echo "$as_me:3411: \"$ac_try\"") >&5
3412   (eval $ac_try) 2>&5
3413   ac_status=$?
3414   echo "$as_me:3414: \$? = $ac_status" >&5
3415   (exit "$ac_status"); }; }; then
3416   :
3417 else
3418   echo "$as_me: failed program was:" >&5
3419 cat "conftest.$ac_ext" >&5
3420 continue
3421 fi
3422 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3423   cat >"conftest.$ac_ext" <<_ACEOF
3424 #line 3424 "configure"
3425 #include "confdefs.h"
3426 $ac_declaration
3427 int
3428 main (void)
3429 {
3430 exit (42);
3431   ;
3432   return 0;
3433 }
3434 _ACEOF
3435 rm -f "conftest.$ac_objext"
3436 if { (eval echo "$as_me:3436: \"$ac_compile\"") >&5
3437   (eval $ac_compile) 2>&5
3438   ac_status=$?
3439   echo "$as_me:3439: \$? = $ac_status" >&5
3440   (exit "$ac_status"); } &&
3441          { ac_try='test -s "conftest.$ac_objext"'
3442   { (eval echo "$as_me:3442: \"$ac_try\"") >&5
3443   (eval $ac_try) 2>&5
3444   ac_status=$?
3445   echo "$as_me:3445: \$? = $ac_status" >&5
3446   (exit "$ac_status"); }; }; then
3447   break
3448 else
3449   echo "$as_me: failed program was:" >&5
3450 cat "conftest.$ac_ext" >&5
3451 fi
3452 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3453 done
3454 rm -rf conftest*
3455 if test -n "$ac_declaration"; then
3456   echo '#ifdef __cplusplus' >>confdefs.h
3457   echo "$ac_declaration"    >>confdefs.h
3458   echo '#endif'             >>confdefs.h
3459 fi
3460
3461 ac_ext=c
3462 ac_cpp='$CPP $CPPFLAGS'
3463 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3464 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3465 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3466 ac_main_return="return"
3467
3468         ac_ext=cc
3469 ac_cpp='$CXXCPP $CPPFLAGS'
3470 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3471 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3472 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3473 ac_main_return="return"
3474
3475         if test "x$cf_with_cxx" != xno
3476         then
3477                 # Several of the C++ configurations do not work, particularly when
3478                 # cross-compiling (20140913 -TD)
3479                 echo "$as_me:3479: checking if $CXX works" >&5
3480 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3481
3482                 save_CPPFLAGS="$CPPFLAGS"
3483                 eval cf_includedir=${includedir}
3484                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3485
3486 cat >"conftest.$ac_ext" <<_ACEOF
3487 #line 3487 "configure"
3488 #include "confdefs.h"
3489
3490 #include <stdlib.h>
3491 #include <stdio.h>
3492
3493 int
3494 main (void)
3495 {
3496
3497                 printf("Hello world!\n")
3498
3499   ;
3500   return 0;
3501 }
3502 _ACEOF
3503 rm -f "conftest.$ac_objext"
3504 if { (eval echo "$as_me:3504: \"$ac_compile\"") >&5
3505   (eval $ac_compile) 2>&5
3506   ac_status=$?
3507   echo "$as_me:3507: \$? = $ac_status" >&5
3508   (exit "$ac_status"); } &&
3509          { ac_try='test -s "conftest.$ac_objext"'
3510   { (eval echo "$as_me:3510: \"$ac_try\"") >&5
3511   (eval $ac_try) 2>&5
3512   ac_status=$?
3513   echo "$as_me:3513: \$? = $ac_status" >&5
3514   (exit "$ac_status"); }; }; then
3515   cf_cxx_works=yes
3516 else
3517   echo "$as_me: failed program was:" >&5
3518 cat "conftest.$ac_ext" >&5
3519 cf_cxx_works=no
3520 fi
3521 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3522                 CPPFLAGS="$save_CPPFLAGS"
3523
3524                 echo "$as_me:3524: result: $cf_cxx_works" >&5
3525 echo "${ECHO_T}$cf_cxx_works" >&6
3526                 if test "x$cf_cxx_works" = xno
3527                 then
3528                         { echo "$as_me:3528: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3529 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3530                         cf_with_cxx=no; CXX=""; GXX="";
3531                 fi
3532         fi
3533         ac_ext=c
3534 ac_cpp='$CPP $CPPFLAGS'
3535 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3536 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3537 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3538 ac_main_return="return"
3539
3540         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3541         if test "$CXX" = "g++" ; then
3542                 # Extract the first word of "g++", so it can be a program name with args.
3543 set dummy g++; ac_word=$2
3544 echo "$as_me:3544: checking for $ac_word" >&5
3545 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3546 if test "${ac_cv_path_CXX+set}" = set; then
3547   echo $ECHO_N "(cached) $ECHO_C" >&6
3548 else
3549   case $CXX in
3550   [\\/]* | ?:[\\/]*)
3551   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3552   ;;
3553   *)
3554   ac_save_IFS=$IFS; IFS=$ac_path_separator
3555 ac_dummy="$PATH"
3556 for ac_dir in $ac_dummy; do
3557   IFS=$ac_save_IFS
3558   test -z "$ac_dir" && ac_dir=.
3559   if $as_executable_p "$ac_dir/$ac_word"; then
3560    ac_cv_path_CXX="$ac_dir/$ac_word"
3561    echo "$as_me:3561: found $ac_dir/$ac_word" >&5
3562    break
3563 fi
3564 done
3565
3566   ;;
3567 esac
3568 fi
3569 CXX=$ac_cv_path_CXX
3570
3571 if test -n "$CXX"; then
3572   echo "$as_me:3572: result: $CXX" >&5
3573 echo "${ECHO_T}$CXX" >&6
3574 else
3575   echo "$as_me:3575: result: no" >&5
3576 echo "${ECHO_T}no" >&6
3577 fi
3578
3579         fi
3580         case "x$CXX" in
3581         (x|xg++)
3582                 { echo "$as_me:3582: WARNING: You don't have any C++ compiler, too bad" >&5
3583 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3584                 cf_with_cxx=no; CXX=""; GXX="";
3585                 ;;
3586         esac
3587 fi
3588
3589 GXX_VERSION=none
3590 if test "$GXX" = yes; then
3591         echo "$as_me:3591: checking version of ${CXX:-g++}" >&5
3592 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3593         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3594         if test -z "$GXX_VERSION"
3595         then
3596                 GXX_VERSION=unknown
3597                 GXX=no
3598         fi
3599         echo "$as_me:3599: result: $GXX_VERSION" >&5
3600 echo "${ECHO_T}$GXX_VERSION" >&6
3601 fi
3602
3603 case "$GXX_VERSION" in
3604 ([1-9][0-9].*)
3605         ;;
3606 (1.*|2.[0-6]*)
3607         { echo "$as_me:3607: WARNING: templates do not work" >&5
3608 echo "$as_me: WARNING: templates do not work" >&2;}
3609         ;;
3610 esac
3611
3612 echo "$as_me:3612: checking if you want to build C++ binding and demo" >&5
3613 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3614
3615 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3616 if test "${with_cxx_binding+set}" = set; then
3617   withval="$with_cxx_binding"
3618   cf_with_cxx_binding=$withval
3619 else
3620   cf_with_cxx_binding=$cf_with_cxx
3621 fi;
3622 echo "$as_me:3622: result: $cf_with_cxx_binding" >&5
3623 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3624
3625 echo "$as_me:3625: checking if you want to build with Ada" >&5
3626 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3627 echo "$as_me:3627: result: $cf_with_ada" >&5
3628 echo "${ECHO_T}$cf_with_ada" >&6
3629
3630 echo "$as_me:3630: checking if you want to install terminal database" >&5
3631 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3632
3633 # Check whether --enable-db-install or --disable-db-install was given.
3634 if test "${enable_db_install+set}" = set; then
3635   enableval="$enable_db_install"
3636   cf_with_db_install=$enableval
3637 else
3638   cf_with_db_install=yes
3639 fi;
3640 echo "$as_me:3640: result: $cf_with_db_install" >&5
3641 echo "${ECHO_T}$cf_with_db_install" >&6
3642
3643 echo "$as_me:3643: checking if you want to install manpages" >&5
3644 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3645
3646 # Check whether --with-manpages or --without-manpages was given.
3647 if test "${with_manpages+set}" = set; then
3648   withval="$with_manpages"
3649   cf_with_manpages=$withval
3650 else
3651   cf_with_manpages=yes
3652 fi;
3653 echo "$as_me:3653: result: $cf_with_manpages" >&5
3654 echo "${ECHO_T}$cf_with_manpages" >&6
3655
3656 echo "$as_me:3656: checking if you want to build programs such as tic" >&5
3657 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3658
3659 # Check whether --with-progs or --without-progs was given.
3660 if test "${with_progs+set}" = set; then
3661   withval="$with_progs"
3662   cf_with_progs=$withval
3663 else
3664   cf_with_progs=yes
3665 fi;
3666 echo "$as_me:3666: result: $cf_with_progs" >&5
3667 echo "${ECHO_T}$cf_with_progs" >&6
3668
3669 if test -f "$srcdir/tack/tack.h" ; then
3670         if test "x$cross_compiling" = xyes ; then
3671                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3672
3673 echo "${as_me:-configure}:3673: testing ignoring tack because we are cross-compiling ..." 1>&5
3674
3675                 cf_with_tack=no
3676         else
3677                 echo "$as_me:3677: checking if you want to build the tack program" >&5
3678 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3679
3680 # Check whether --with-tack or --without-tack was given.
3681 if test "${with_tack+set}" = set; then
3682   withval="$with_tack"
3683   cf_with_tack=$withval
3684 else
3685   cf_with_tack=$cf_with_progs
3686 fi;
3687                 echo "$as_me:3687: result: $cf_with_tack" >&5
3688 echo "${ECHO_T}$cf_with_tack" >&6
3689         fi
3690 else
3691         cf_with_tack=no
3692 fi
3693
3694 echo "$as_me:3694: checking if you want to build test-programs" >&5
3695 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3696
3697 # Check whether --with-tests or --without-tests was given.
3698 if test "${with_tests+set}" = set; then
3699   withval="$with_tests"
3700   cf_with_tests=$withval
3701 else
3702   cf_with_tests=yes
3703 fi;
3704 echo "$as_me:3704: result: $cf_with_tests" >&5
3705 echo "${ECHO_T}$cf_with_tests" >&6
3706
3707 echo "$as_me:3707: checking if you wish to install curses.h" >&5
3708 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3709
3710 # Check whether --with-curses-h or --without-curses-h was given.
3711 if test "${with_curses_h+set}" = set; then
3712   withval="$with_curses_h"
3713   with_curses_h=$withval
3714 else
3715   with_curses_h=yes
3716 fi;
3717 echo "$as_me:3717: result: $with_curses_h" >&5
3718 echo "${ECHO_T}$with_curses_h" >&6
3719
3720 modules_to_build="ncurses"
3721 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3722 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3723 modules_to_build="$modules_to_build panel menu form"
3724
3725 test "$program_prefix" != NONE &&
3726   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3727 # Use a double $ so make ignores it.
3728 test "$program_suffix" != NONE &&
3729   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3730 # Double any \ or $.  echo might interpret backslashes.
3731 # By default was `s,x,x', remove it if useless.
3732 cat <<\_ACEOF >conftest.sed
3733 s/[\\$]/&&/g;s/;s,x,x,$//
3734 _ACEOF
3735 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3736 rm conftest.sed
3737
3738 for ac_prog in mawk gawk nawk awk
3739 do
3740   # Extract the first word of "$ac_prog", so it can be a program name with args.
3741 set dummy $ac_prog; ac_word=$2
3742 echo "$as_me:3742: checking for $ac_word" >&5
3743 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3744 if test "${ac_cv_prog_AWK+set}" = set; then
3745   echo $ECHO_N "(cached) $ECHO_C" >&6
3746 else
3747   if test -n "$AWK"; then
3748   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3749 else
3750   ac_save_IFS=$IFS; IFS=$ac_path_separator
3751 ac_dummy="$PATH"
3752 for ac_dir in $ac_dummy; do
3753   IFS=$ac_save_IFS
3754   test -z "$ac_dir" && ac_dir=.
3755   $as_executable_p "$ac_dir/$ac_word" || continue
3756 ac_cv_prog_AWK="$ac_prog"
3757 echo "$as_me:3757: found $ac_dir/$ac_word" >&5
3758 break
3759 done
3760
3761 fi
3762 fi
3763 AWK=$ac_cv_prog_AWK
3764 if test -n "$AWK"; then
3765   echo "$as_me:3765: result: $AWK" >&5
3766 echo "${ECHO_T}$AWK" >&6
3767 else
3768   echo "$as_me:3768: result: no" >&5
3769 echo "${ECHO_T}no" >&6
3770 fi
3771
3772   test -n "$AWK" && break
3773 done
3774
3775 test -z "$AWK" && { { echo "$as_me:3775: error: No awk program found" >&5
3776 echo "$as_me: error: No awk program found" >&2;}
3777    { (exit 1); exit 1; }; }
3778
3779 # Find a good install program.  We prefer a C program (faster),
3780 # so one script is as good as another.  But avoid the broken or
3781 # incompatible versions:
3782 # SysV /etc/install, /usr/sbin/install
3783 # SunOS /usr/etc/install
3784 # IRIX /sbin/install
3785 # AIX /bin/install
3786 # AmigaOS /C/install, which installs bootblocks on floppy discs
3787 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3788 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3789 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3790 # ./install, which can be erroneously created by make from ./install.sh.
3791 echo "$as_me:3791: checking for a BSD compatible install" >&5
3792 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3793 if test -z "$INSTALL"; then
3794 if test "${ac_cv_path_install+set}" = set; then
3795   echo $ECHO_N "(cached) $ECHO_C" >&6
3796 else
3797     ac_save_IFS=$IFS; IFS=$ac_path_separator
3798   for ac_dir in $PATH; do
3799     IFS=$ac_save_IFS
3800     # Account for people who put trailing slashes in PATH elements.
3801     case $ac_dir/ in
3802     / | ./ | .// | /cC/* \
3803     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3804     | /usr/ucb/* ) ;;
3805     *)
3806       # OSF1 and SCO ODT 3.0 have their own names for install.
3807       # Don't use installbsd from OSF since it installs stuff as root
3808       # by default.
3809       for ac_prog in ginstall scoinst install; do
3810         if $as_executable_p "$ac_dir/$ac_prog"; then
3811           if test $ac_prog = install &&
3812             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3813             # AIX install.  It has an incompatible calling convention.
3814             :
3815           elif test $ac_prog = install &&
3816             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3817             # program-specific install script used by HP pwplus--don't use.
3818             :
3819           else
3820             ac_cv_path_install="$ac_dir/$ac_prog -c"
3821             break 2
3822           fi
3823         fi
3824       done
3825       ;;
3826     esac
3827   done
3828
3829 fi
3830   if test "${ac_cv_path_install+set}" = set; then
3831     INSTALL=$ac_cv_path_install
3832   else
3833     # As a last resort, use the slow shell script.  We don't cache a
3834     # path for INSTALL within a source directory, because that will
3835     # break other packages using the cache if that directory is
3836     # removed, or if the path is relative.
3837     INSTALL=$ac_install_sh
3838   fi
3839 fi
3840 echo "$as_me:3840: result: $INSTALL" >&5
3841 echo "${ECHO_T}$INSTALL" >&6
3842
3843 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3844 # It thinks the first close brace ends the variable substitution.
3845 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3846
3847 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3848
3849 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3850
3851 case $INSTALL in
3852 (/*)
3853         ;;
3854 (*)
3855         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3856         test -z "$cf_dir" && cf_dir=.
3857         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3858         ;;
3859 esac
3860
3861 for ac_prog in lint cppcheck splint
3862 do
3863   # Extract the first word of "$ac_prog", so it can be a program name with args.
3864 set dummy $ac_prog; ac_word=$2
3865 echo "$as_me:3865: checking for $ac_word" >&5
3866 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3867 if test "${ac_cv_prog_LINT+set}" = set; then
3868   echo $ECHO_N "(cached) $ECHO_C" >&6
3869 else
3870   if test -n "$LINT"; then
3871   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3872 else
3873   ac_save_IFS=$IFS; IFS=$ac_path_separator
3874 ac_dummy="$PATH"
3875 for ac_dir in $ac_dummy; do
3876   IFS=$ac_save_IFS
3877   test -z "$ac_dir" && ac_dir=.
3878   $as_executable_p "$ac_dir/$ac_word" || continue
3879 ac_cv_prog_LINT="$ac_prog"
3880 echo "$as_me:3880: found $ac_dir/$ac_word" >&5
3881 break
3882 done
3883
3884 fi
3885 fi
3886 LINT=$ac_cv_prog_LINT
3887 if test -n "$LINT"; then
3888   echo "$as_me:3888: result: $LINT" >&5
3889 echo "${ECHO_T}$LINT" >&6
3890 else
3891   echo "$as_me:3891: result: no" >&5
3892 echo "${ECHO_T}no" >&6
3893 fi
3894
3895   test -n "$LINT" && break
3896 done
3897
3898 case "x$LINT" in
3899 (xcppcheck|x*/cppcheck)
3900         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3901         ;;
3902 esac
3903
3904 echo "$as_me:3904: checking whether ln -s works" >&5
3905 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3906 LN_S=$as_ln_s
3907 if test "$LN_S" = "ln -s"; then
3908   echo "$as_me:3908: result: yes" >&5
3909 echo "${ECHO_T}yes" >&6
3910 else
3911   echo "$as_me:3911: result: no, using $LN_S" >&5
3912 echo "${ECHO_T}no, using $LN_S" >&6
3913 fi
3914
3915 echo "$as_me:3915: checking if $LN_S -f options work" >&5
3916 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3917
3918 rm -f conf$$.src conf$$dst
3919 echo >conf$$.dst
3920 echo first >conf$$.src
3921 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3922         cf_prog_ln_sf=yes
3923 else
3924         cf_prog_ln_sf=no
3925 fi
3926 rm -f conf$$.dst conf$$src
3927 echo "$as_me:3927: result: $cf_prog_ln_sf" >&5
3928 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3929
3930 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3931
3932 echo "$as_me:3932: checking for long file names" >&5
3933 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3934 if test "${ac_cv_sys_long_file_names+set}" = set; then
3935   echo $ECHO_N "(cached) $ECHO_C" >&6
3936 else
3937   ac_cv_sys_long_file_names=yes
3938 # Test for long file names in all the places we know might matter:
3939 #      .                the current directory, where building will happen
3940 #      $prefix/lib      where we will be installing things
3941 #      $exec_prefix/lib likewise
3942 # eval it to expand exec_prefix.
3943 #      $TMPDIR          if set, where it might want to write temporary files
3944 # if $TMPDIR is not set:
3945 #      /tmp             where it might want to write temporary files
3946 #      /var/tmp         likewise
3947 #      /usr/tmp         likewise
3948 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3949   ac_tmpdirs=$TMPDIR
3950 else
3951   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3952 fi
3953 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3954   test -d "$ac_dir" || continue
3955   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3956   ac_xdir=$ac_dir/cf$$
3957   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3958   ac_tf1=$ac_xdir/conftest9012345
3959   ac_tf2=$ac_xdir/conftest9012346
3960   (echo 1 >"$ac_tf1") 2>/dev/null
3961   (echo 2 >"$ac_tf2") 2>/dev/null
3962   ac_val=`cat "$ac_tf1" 2>/dev/null`
3963   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3964     ac_cv_sys_long_file_names=no
3965     rm -rf "$ac_xdir" 2>/dev/null
3966     break
3967   fi
3968   rm -rf "$ac_xdir" 2>/dev/null
3969 done
3970 fi
3971 echo "$as_me:3971: result: $ac_cv_sys_long_file_names" >&5
3972 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3973 if test "$ac_cv_sys_long_file_names" = yes; then
3974
3975 cat >>confdefs.h <<\EOF
3976 #define HAVE_LONG_FILE_NAMES 1
3977 EOF
3978
3979 fi
3980
3981 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3982 # of package conflict.
3983 cf_config_suffix=
3984
3985 # Check whether --with-config-suffix or --without-config-suffix was given.
3986 if test "${with_config_suffix+set}" = set; then
3987   withval="$with_config_suffix"
3988   case "x$withval" in
3989         (xyes|xno)
3990                 { echo "$as_me:3990: WARNING: expected a value for config-suffix option" >&5
3991 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3992                 ;;
3993         (*)     cf_config_suffix="$withval"
3994                 ;;
3995         esac
3996 fi;
3997
3998 # If we find pkg-config, check if we should install the ".pc" files.
3999
4000 echo "$as_me:4000: checking if you want to use pkg-config" >&5
4001 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4002
4003 # Check whether --with-pkg-config or --without-pkg-config was given.
4004 if test "${with_pkg_config+set}" = set; then
4005   withval="$with_pkg_config"
4006   cf_pkg_config=$withval
4007 else
4008   cf_pkg_config=yes
4009 fi;
4010 echo "$as_me:4010: result: $cf_pkg_config" >&5
4011 echo "${ECHO_T}$cf_pkg_config" >&6
4012
4013 case "$cf_pkg_config" in
4014 (no)
4015         PKG_CONFIG=none
4016         ;;
4017 (yes)
4018
4019 if test -n "$ac_tool_prefix"; then
4020   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4021 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4022 echo "$as_me:4022: checking for $ac_word" >&5
4023 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4024 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4025   echo $ECHO_N "(cached) $ECHO_C" >&6
4026 else
4027   case $PKG_CONFIG in
4028   [\\/]* | ?:[\\/]*)
4029   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4030   ;;
4031   *)
4032   ac_save_IFS=$IFS; IFS=$ac_path_separator
4033 ac_dummy="$PATH"
4034 for ac_dir in $ac_dummy; do
4035   IFS=$ac_save_IFS
4036   test -z "$ac_dir" && ac_dir=.
4037   if $as_executable_p "$ac_dir/$ac_word"; then
4038    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4039    echo "$as_me:4039: found $ac_dir/$ac_word" >&5
4040    break
4041 fi
4042 done
4043
4044   ;;
4045 esac
4046 fi
4047 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4048
4049 if test -n "$PKG_CONFIG"; then
4050   echo "$as_me:4050: result: $PKG_CONFIG" >&5
4051 echo "${ECHO_T}$PKG_CONFIG" >&6
4052 else
4053   echo "$as_me:4053: result: no" >&5
4054 echo "${ECHO_T}no" >&6
4055 fi
4056
4057 fi
4058 if test -z "$ac_cv_path_PKG_CONFIG"; then
4059   ac_pt_PKG_CONFIG=$PKG_CONFIG
4060   # Extract the first word of "pkg-config", so it can be a program name with args.
4061 set dummy pkg-config; ac_word=$2
4062 echo "$as_me:4062: checking for $ac_word" >&5
4063 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4064 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4065   echo $ECHO_N "(cached) $ECHO_C" >&6
4066 else
4067   case $ac_pt_PKG_CONFIG in
4068   [\\/]* | ?:[\\/]*)
4069   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4070   ;;
4071   *)
4072   ac_save_IFS=$IFS; IFS=$ac_path_separator
4073 ac_dummy="$PATH"
4074 for ac_dir in $ac_dummy; do
4075   IFS=$ac_save_IFS
4076   test -z "$ac_dir" && ac_dir=.
4077   if $as_executable_p "$ac_dir/$ac_word"; then
4078    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4079    echo "$as_me:4079: found $ac_dir/$ac_word" >&5
4080    break
4081 fi
4082 done
4083
4084   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4085   ;;
4086 esac
4087 fi
4088 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4089
4090 if test -n "$ac_pt_PKG_CONFIG"; then
4091   echo "$as_me:4091: result: $ac_pt_PKG_CONFIG" >&5
4092 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4093 else
4094   echo "$as_me:4094: result: no" >&5
4095 echo "${ECHO_T}no" >&6
4096 fi
4097
4098   PKG_CONFIG=$ac_pt_PKG_CONFIG
4099 else
4100   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4101 fi
4102
4103         ;;
4104 (*)
4105         PKG_CONFIG=$withval
4106         ;;
4107 esac
4108
4109 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4110 if test "$PKG_CONFIG" != none ; then
4111
4112 if test "x$prefix" != xNONE; then
4113         cf_path_syntax="$prefix"
4114 else
4115         cf_path_syntax="$ac_default_prefix"
4116 fi
4117
4118 case ".$PKG_CONFIG" in
4119 (.\$\(*\)*|.\'*\'*)
4120         ;;
4121 (..|./*|.\\*)
4122         ;;
4123 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4124         ;;
4125 (.\$\{*prefix\}*|.\$\{*dir\}*)
4126         eval PKG_CONFIG="$PKG_CONFIG"
4127         case ".$PKG_CONFIG" in
4128         (.NONE/*)
4129                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4130                 ;;
4131         esac
4132         ;;
4133 (.no|.NONE/*)
4134         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4135         ;;
4136 (*)
4137         { { echo "$as_me:4137: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4138 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4139    { (exit 1); exit 1; }; }
4140         ;;
4141 esac
4142
4143 elif test "x$cf_pkg_config" != xno ; then
4144         { echo "$as_me:4144: WARNING: pkg-config is not installed" >&5
4145 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4146 fi
4147
4148 case "$PKG_CONFIG" in
4149 (no|none|yes)
4150         echo "$as_me:4150: checking for pkg-config library directory" >&5
4151 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4152         ;;
4153 (*)
4154         echo "$as_me:4154: checking for $PKG_CONFIG library directory" >&5
4155 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4156         ;;
4157 esac
4158
4159 # if $PKG_CONFIG_LIBDIR is set, try to use that
4160 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,'`
4161
4162 # if the option is used, let that override.  otherwise default to "libdir"
4163
4164 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4165 if test "${with_pkg_config_libdir+set}" = set; then
4166   withval="$with_pkg_config_libdir"
4167   cf_search_path=$withval
4168 else
4169   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4170 fi;
4171
4172 case "x$cf_search_path" in
4173 (xlibdir)
4174         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4175         echo "$as_me:4175: result: $PKG_CONFIG_LIBDIR" >&5
4176 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4177         cf_search_path=
4178         ;;
4179 (x)
4180         ;;
4181 (x/*\ *)
4182         PKG_CONFIG_LIBDIR=
4183         ;;
4184 (x/*)
4185         PKG_CONFIG_LIBDIR="$cf_search_path"
4186         echo "$as_me:4186: result: $PKG_CONFIG_LIBDIR" >&5
4187 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4188         cf_search_path=
4189         ;;
4190 (xyes|xauto)
4191         echo "$as_me:4191: result: auto" >&5
4192 echo "${ECHO_T}auto" >&6
4193         cf_search_path=
4194         # Look for the library directory using the same prefix as the executable
4195         echo "$as_me:4195: checking for search-list" >&5
4196 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4197         if test "x$PKG_CONFIG" != xnone
4198         then
4199                 # works for pkg-config since version 0.24 (2009)
4200                 # works for pkgconf since version 0.8.3 (2012)
4201                 for cf_pkg_program in \
4202                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4203                         pkg-config \
4204                         pkgconf
4205                 do
4206                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4207                         test -n "$cf_search_path" && break
4208                 done
4209
4210                 # works for pkg-config since import in 2005 of original 2001 HP code.
4211                 test -z "$cf_search_path" && \
4212                 cf_search_path=`
4213                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4214 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4215         sub(\"^[^']*'\",\"\"); \
4216         sub(\"'.*\",\"\"); \
4217         printf \" %s\", \\$0; } \
4218 { next; } \
4219 "`
4220         fi
4221
4222         echo "$as_me:4222: result: $cf_search_path" >&5
4223 echo "${ECHO_T}$cf_search_path" >&6
4224         ;;
4225 (*)
4226         { { echo "$as_me:4226: error: Unexpected option value: $cf_search_path" >&5
4227 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4228    { (exit 1); exit 1; }; }
4229         ;;
4230 esac
4231
4232 if test -n "$cf_search_path"
4233 then
4234         echo "$as_me:4234: checking for first directory" >&5
4235 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4236         cf_pkg_config_path=none
4237         for cf_config in $cf_search_path
4238         do
4239                 if test -d "$cf_config"
4240                 then
4241                         cf_pkg_config_path=$cf_config
4242                         break
4243                 fi
4244         done
4245         echo "$as_me:4245: result: $cf_pkg_config_path" >&5
4246 echo "${ECHO_T}$cf_pkg_config_path" >&6
4247
4248         if test "x$cf_pkg_config_path" != xnone ; then
4249                 # limit this to the first directory found
4250                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4251         fi
4252
4253         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4254         then
4255                 echo "$as_me:4255: checking for workaround" >&5
4256 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4257                 if test "$prefix" = "NONE" ; then
4258                         cf_prefix="$ac_default_prefix"
4259                 else
4260                         cf_prefix="$prefix"
4261                 fi
4262                 eval cf_libdir=$libdir
4263                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4264                 cf_backup=
4265                 for cf_config in $cf_search_path
4266                 do
4267                         case $cf_config in
4268                         $cf_libdir/pkgconfig)
4269                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4270                                 break
4271                                 ;;
4272                         *)
4273                                 test -z "$cf_backup" && cf_backup=$cf_config
4274                                 ;;
4275                         esac
4276                 done
4277                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4278                 echo "$as_me:4278: result: $PKG_CONFIG_LIBDIR" >&5
4279 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4280         fi
4281 fi
4282
4283 if test "x$PKG_CONFIG" != xnone
4284 then
4285         echo "$as_me:4285: checking if we should install .pc files for $PKG_CONFIG" >&5
4286 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4287 else
4288         echo "$as_me:4288: checking if we should install .pc files" >&5
4289 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4290 fi
4291
4292 # Check whether --enable-pc-files or --disable-pc-files was given.
4293 if test "${enable_pc_files+set}" = set; then
4294   enableval="$enable_pc_files"
4295   enable_pc_files=$enableval
4296 else
4297   enable_pc_files=no
4298 fi;
4299 echo "$as_me:4299: result: $enable_pc_files" >&5
4300 echo "${ECHO_T}$enable_pc_files" >&6
4301
4302 if test "x$enable_pc_files" != xno
4303 then
4304         MAKE_PC_FILES=
4305         case "x$PKG_CONFIG_LIBDIR" in
4306         (xno|xnone|xyes|x)
4307                 { echo "$as_me:4307: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4308 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4309                 ;;
4310         (*)
4311                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4312
4313 if test "x$prefix" != xNONE; then
4314         cf_path_syntax="$prefix"
4315 else
4316         cf_path_syntax="$ac_default_prefix"
4317 fi
4318
4319 case ".$cf_pkg_config_libdir" in
4320 (.\$\(*\)*|.\'*\'*)
4321         ;;
4322 (..|./*|.\\*)
4323         ;;
4324 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4325         ;;
4326 (.\$\{*prefix\}*|.\$\{*dir\}*)
4327         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4328         case ".$cf_pkg_config_libdir" in
4329         (.NONE/*)
4330                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4331                 ;;
4332         esac
4333         ;;
4334 (.no|.NONE/*)
4335         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4336         ;;
4337 (*)
4338         { { echo "$as_me:4338: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4339 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4340    { (exit 1); exit 1; }; }
4341         ;;
4342 esac
4343
4344                 ;;
4345         esac
4346 else
4347         MAKE_PC_FILES="#"
4348 fi
4349
4350 if test -z "$MAKE_PC_FILES"
4351 then
4352         echo "$as_me:4352: checking for suffix to add to pc-files" >&5
4353 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4354
4355 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4356 if test "${with_pc_suffix+set}" = set; then
4357   withval="$with_pc_suffix"
4358   case "x$withval" in
4359         (xyes|xno)
4360                 PC_MODULE_SUFFIX=
4361                 ;;
4362         (*)     PC_MODULE_SUFFIX="$withval"
4363                 ;;
4364         esac
4365 fi;
4366         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4367         echo "$as_me:4367: result: $PC_MODULE_SUFFIX" >&5
4368 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4369         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4370
4371 fi
4372
4373 echo "$as_me:4373: checking if we should assume mixed-case filenames" >&5
4374 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4375
4376 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4377 if test "${enable_mixed_case+set}" = set; then
4378   enableval="$enable_mixed_case"
4379   enable_mixedcase=$enableval
4380 else
4381   enable_mixedcase=auto
4382 fi;
4383 echo "$as_me:4383: result: $enable_mixedcase" >&5
4384 echo "${ECHO_T}$enable_mixedcase" >&6
4385 if test "$enable_mixedcase" = "auto" ; then
4386
4387 echo "$as_me:4387: checking if filesystem supports mixed-case filenames" >&5
4388 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4389 if test "${cf_cv_mixedcase+set}" = set; then
4390   echo $ECHO_N "(cached) $ECHO_C" >&6
4391 else
4392
4393 if test "$cross_compiling" = yes ; then
4394         case "$target_alias" in
4395         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4396                 cf_cv_mixedcase=no
4397                 ;;
4398         (*)
4399                 cf_cv_mixedcase=yes
4400                 ;;
4401         esac
4402 else
4403         rm -f conftest CONFTEST
4404         echo test >conftest
4405         if test -f CONFTEST ; then
4406                 cf_cv_mixedcase=no
4407         else
4408                 cf_cv_mixedcase=yes
4409         fi
4410         rm -f conftest CONFTEST
4411 fi
4412
4413 fi
4414 echo "$as_me:4414: result: $cf_cv_mixedcase" >&5
4415 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4416 test "$cf_cv_mixedcase" = yes &&
4417 cat >>confdefs.h <<\EOF
4418 #define MIXEDCASE_FILENAMES 1
4419 EOF
4420
4421 else
4422         cf_cv_mixedcase=$enable_mixedcase
4423         if test "x$enable_mixedcase" = "xyes" ; then
4424
4425 cat >>confdefs.h <<\EOF
4426 #define MIXEDCASE_FILENAMES 1
4427 EOF
4428
4429         fi
4430 fi
4431
4432 # do this after mixed-case option (tags/TAGS is not as important as tic).
4433 echo "$as_me:4433: checking whether ${MAKE-make} sets \${MAKE}" >&5
4434 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4435 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4436 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4437   echo $ECHO_N "(cached) $ECHO_C" >&6
4438 else
4439   cat >conftest.make <<\EOF
4440 all:
4441         @echo 'ac_maketemp="${MAKE}"'
4442 EOF
4443 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4444 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4445 if test -n "$ac_maketemp"; then
4446   eval ac_cv_prog_make_${ac_make}_set=yes
4447 else
4448   eval ac_cv_prog_make_${ac_make}_set=no
4449 fi
4450 rm -f conftest.make
4451 fi
4452 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4453   echo "$as_me:4453: result: yes" >&5
4454 echo "${ECHO_T}yes" >&6
4455   SET_MAKE=
4456 else
4457   echo "$as_me:4457: result: no" >&5
4458 echo "${ECHO_T}no" >&6
4459   SET_MAKE="MAKE=${MAKE-make}"
4460 fi
4461
4462 echo "$as_me:4462: checking for \".PHONY\" make-support" >&5
4463 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4464 if test "${cf_cv_make_PHONY+set}" = set; then
4465   echo $ECHO_N "(cached) $ECHO_C" >&6
4466 else
4467
4468         rm -rf conftest*
4469         (
4470                 mkdir conftest || exit 1
4471                 cd conftest
4472                 cat >makefile <<'CF_EOF'
4473 .PHONY: always
4474 DATA=0
4475 always: always.out
4476         @echo "** making $@ $(DATA)"
4477 once: once.out
4478         @echo "** making $@ $(DATA)"
4479 always.out:
4480         @echo "** making $@ $(DATA)"
4481         echo $(DATA) > $@
4482 once.out:
4483         @echo "** making $@ $(DATA)"
4484         echo $(DATA) > $@
4485 CF_EOF
4486                 for cf_data in 1 2 3
4487                 do
4488                         ${MAKE:-make} always DATA=$cf_data
4489                         ${MAKE:-make} once   DATA=$cf_data
4490                         ${MAKE:-make} -t always once
4491                         if test -f always ; then
4492                                 echo "no (case 1)" > ../conftest.tmp
4493                         elif test ! -f always.out ; then
4494                                 echo "no (case 2)" > ../conftest.tmp
4495                         elif test ! -f once.out ; then
4496                                 echo "no (case 3)" > ../conftest.tmp
4497                         elif ! cmp -s always.out once.out ; then
4498                                 echo "no (case 4)" > ../conftest.tmp
4499                                 diff always.out once.out
4500                         else
4501                                 cf_check="`cat always.out`"
4502                                 if test "x$cf_check" != "x$cf_data" ; then
4503                                         echo "no (case 5)" > ../conftest.tmp
4504                                 else
4505                                         echo yes > ../conftest.tmp
4506                                         rm -f ./*.out
4507                                         continue
4508                                 fi
4509                         fi
4510                         break
4511                 done
4512         ) >&5 2>&1
4513         cf_cv_make_PHONY="`cat conftest.tmp`"
4514         rm -rf conftest*
4515
4516 fi
4517 echo "$as_me:4517: result: $cf_cv_make_PHONY" >&5
4518 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4519 MAKE_NO_PHONY="#"
4520 MAKE_PHONY="#"
4521 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4522 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4523
4524 for ac_prog in exctags ctags
4525 do
4526   # Extract the first word of "$ac_prog", so it can be a program name with args.
4527 set dummy $ac_prog; ac_word=$2
4528 echo "$as_me:4528: checking for $ac_word" >&5
4529 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4530 if test "${ac_cv_prog_CTAGS+set}" = set; then
4531   echo $ECHO_N "(cached) $ECHO_C" >&6
4532 else
4533   if test -n "$CTAGS"; then
4534   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4535 else
4536   ac_save_IFS=$IFS; IFS=$ac_path_separator
4537 ac_dummy="$PATH"
4538 for ac_dir in $ac_dummy; do
4539   IFS=$ac_save_IFS
4540   test -z "$ac_dir" && ac_dir=.
4541   $as_executable_p "$ac_dir/$ac_word" || continue
4542 ac_cv_prog_CTAGS="$ac_prog"
4543 echo "$as_me:4543: found $ac_dir/$ac_word" >&5
4544 break
4545 done
4546
4547 fi
4548 fi
4549 CTAGS=$ac_cv_prog_CTAGS
4550 if test -n "$CTAGS"; then
4551   echo "$as_me:4551: result: $CTAGS" >&5
4552 echo "${ECHO_T}$CTAGS" >&6
4553 else
4554   echo "$as_me:4554: result: no" >&5
4555 echo "${ECHO_T}no" >&6
4556 fi
4557
4558   test -n "$CTAGS" && break
4559 done
4560
4561 for ac_prog in exetags etags
4562 do
4563   # Extract the first word of "$ac_prog", so it can be a program name with args.
4564 set dummy $ac_prog; ac_word=$2
4565 echo "$as_me:4565: checking for $ac_word" >&5
4566 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4567 if test "${ac_cv_prog_ETAGS+set}" = set; then
4568   echo $ECHO_N "(cached) $ECHO_C" >&6
4569 else
4570   if test -n "$ETAGS"; then
4571   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4572 else
4573   ac_save_IFS=$IFS; IFS=$ac_path_separator
4574 ac_dummy="$PATH"
4575 for ac_dir in $ac_dummy; do
4576   IFS=$ac_save_IFS
4577   test -z "$ac_dir" && ac_dir=.
4578   $as_executable_p "$ac_dir/$ac_word" || continue
4579 ac_cv_prog_ETAGS="$ac_prog"
4580 echo "$as_me:4580: found $ac_dir/$ac_word" >&5
4581 break
4582 done
4583
4584 fi
4585 fi
4586 ETAGS=$ac_cv_prog_ETAGS
4587 if test -n "$ETAGS"; then
4588   echo "$as_me:4588: result: $ETAGS" >&5
4589 echo "${ECHO_T}$ETAGS" >&6
4590 else
4591   echo "$as_me:4591: result: no" >&5
4592 echo "${ECHO_T}no" >&6
4593 fi
4594
4595   test -n "$ETAGS" && break
4596 done
4597
4598 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4599 set dummy ${CTAGS:-ctags}; ac_word=$2
4600 echo "$as_me:4600: checking for $ac_word" >&5
4601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4602 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4603   echo $ECHO_N "(cached) $ECHO_C" >&6
4604 else
4605   if test -n "$MAKE_LOWER_TAGS"; then
4606   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4607 else
4608   ac_save_IFS=$IFS; IFS=$ac_path_separator
4609 ac_dummy="$PATH"
4610 for ac_dir in $ac_dummy; do
4611   IFS=$ac_save_IFS
4612   test -z "$ac_dir" && ac_dir=.
4613   $as_executable_p "$ac_dir/$ac_word" || continue
4614 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4615 echo "$as_me:4615: found $ac_dir/$ac_word" >&5
4616 break
4617 done
4618
4619   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4620 fi
4621 fi
4622 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4623 if test -n "$MAKE_LOWER_TAGS"; then
4624   echo "$as_me:4624: result: $MAKE_LOWER_TAGS" >&5
4625 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4626 else
4627   echo "$as_me:4627: result: no" >&5
4628 echo "${ECHO_T}no" >&6
4629 fi
4630
4631 if test "$cf_cv_mixedcase" = yes ; then
4632         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4633 set dummy ${ETAGS:-etags}; ac_word=$2
4634 echo "$as_me:4634: checking for $ac_word" >&5
4635 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4636 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4637   echo $ECHO_N "(cached) $ECHO_C" >&6
4638 else
4639   if test -n "$MAKE_UPPER_TAGS"; then
4640   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4641 else
4642   ac_save_IFS=$IFS; IFS=$ac_path_separator
4643 ac_dummy="$PATH"
4644 for ac_dir in $ac_dummy; do
4645   IFS=$ac_save_IFS
4646   test -z "$ac_dir" && ac_dir=.
4647   $as_executable_p "$ac_dir/$ac_word" || continue
4648 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4649 echo "$as_me:4649: found $ac_dir/$ac_word" >&5
4650 break
4651 done
4652
4653   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4654 fi
4655 fi
4656 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4657 if test -n "$MAKE_UPPER_TAGS"; then
4658   echo "$as_me:4658: result: $MAKE_UPPER_TAGS" >&5
4659 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4660 else
4661   echo "$as_me:4661: result: no" >&5
4662 echo "${ECHO_T}no" >&6
4663 fi
4664
4665 else
4666         MAKE_UPPER_TAGS=no
4667 fi
4668
4669 if test "$MAKE_UPPER_TAGS" = yes ; then
4670         MAKE_UPPER_TAGS=
4671 else
4672         MAKE_UPPER_TAGS="#"
4673 fi
4674
4675 if test "$MAKE_LOWER_TAGS" = yes ; then
4676         MAKE_LOWER_TAGS=
4677 else
4678         MAKE_LOWER_TAGS="#"
4679 fi
4680
4681 echo "$as_me:4681: checking for makeflags variable" >&5
4682 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4683 if test "${cf_cv_makeflags+set}" = set; then
4684   echo $ECHO_N "(cached) $ECHO_C" >&6
4685 else
4686
4687         cf_cv_makeflags=''
4688         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4689         do
4690                 cat >cf_makeflags.tmp <<CF_EOF
4691 SHELL = $SHELL
4692 all :
4693         @ echo '.$cf_option'
4694 CF_EOF
4695                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4696                 case "$cf_result" in
4697                 (.*k|.*kw)
4698                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4699                         case "$cf_result" in
4700                         (.*CC=*)        cf_cv_makeflags=
4701                                 ;;
4702                         (*)     cf_cv_makeflags=$cf_option
4703                                 ;;
4704                         esac
4705                         break
4706                         ;;
4707                 (.-)
4708                         ;;
4709                 (*)
4710
4711 echo "${as_me:-configure}:4711: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4712
4713                         ;;
4714                 esac
4715         done
4716         rm -f cf_makeflags.tmp
4717
4718 fi
4719 echo "$as_me:4719: result: $cf_cv_makeflags" >&5
4720 echo "${ECHO_T}$cf_cv_makeflags" >&6
4721
4722 if test -n "$ac_tool_prefix"; then
4723   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4724 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4725 echo "$as_me:4725: checking for $ac_word" >&5
4726 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4727 if test "${ac_cv_prog_RANLIB+set}" = set; then
4728   echo $ECHO_N "(cached) $ECHO_C" >&6
4729 else
4730   if test -n "$RANLIB"; then
4731   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4732 else
4733   ac_save_IFS=$IFS; IFS=$ac_path_separator
4734 ac_dummy="$PATH"
4735 for ac_dir in $ac_dummy; do
4736   IFS=$ac_save_IFS
4737   test -z "$ac_dir" && ac_dir=.
4738   $as_executable_p "$ac_dir/$ac_word" || continue
4739 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4740 echo "$as_me:4740: found $ac_dir/$ac_word" >&5
4741 break
4742 done
4743
4744 fi
4745 fi
4746 RANLIB=$ac_cv_prog_RANLIB
4747 if test -n "$RANLIB"; then
4748   echo "$as_me:4748: result: $RANLIB" >&5
4749 echo "${ECHO_T}$RANLIB" >&6
4750 else
4751   echo "$as_me:4751: result: no" >&5
4752 echo "${ECHO_T}no" >&6
4753 fi
4754
4755 fi
4756 if test -z "$ac_cv_prog_RANLIB"; then
4757   ac_ct_RANLIB=$RANLIB
4758   # Extract the first word of "ranlib", so it can be a program name with args.
4759 set dummy ranlib; ac_word=$2
4760 echo "$as_me:4760: checking for $ac_word" >&5
4761 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4762 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4763   echo $ECHO_N "(cached) $ECHO_C" >&6
4764 else
4765   if test -n "$ac_ct_RANLIB"; then
4766   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4767 else
4768   ac_save_IFS=$IFS; IFS=$ac_path_separator
4769 ac_dummy="$PATH"
4770 for ac_dir in $ac_dummy; do
4771   IFS=$ac_save_IFS
4772   test -z "$ac_dir" && ac_dir=.
4773   $as_executable_p "$ac_dir/$ac_word" || continue
4774 ac_cv_prog_ac_ct_RANLIB="ranlib"
4775 echo "$as_me:4775: found $ac_dir/$ac_word" >&5
4776 break
4777 done
4778
4779   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4780 fi
4781 fi
4782 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4783 if test -n "$ac_ct_RANLIB"; then
4784   echo "$as_me:4784: result: $ac_ct_RANLIB" >&5
4785 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4786 else
4787   echo "$as_me:4787: result: no" >&5
4788 echo "${ECHO_T}no" >&6
4789 fi
4790
4791   RANLIB=$ac_ct_RANLIB
4792 else
4793   RANLIB="$ac_cv_prog_RANLIB"
4794 fi
4795
4796 if test -n "$ac_tool_prefix"; then
4797   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4798 set dummy ${ac_tool_prefix}ld; ac_word=$2
4799 echo "$as_me:4799: checking for $ac_word" >&5
4800 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4801 if test "${ac_cv_prog_LD+set}" = set; then
4802   echo $ECHO_N "(cached) $ECHO_C" >&6
4803 else
4804   if test -n "$LD"; then
4805   ac_cv_prog_LD="$LD" # Let the user override the test.
4806 else
4807   ac_save_IFS=$IFS; IFS=$ac_path_separator
4808 ac_dummy="$PATH"
4809 for ac_dir in $ac_dummy; do
4810   IFS=$ac_save_IFS
4811   test -z "$ac_dir" && ac_dir=.
4812   $as_executable_p "$ac_dir/$ac_word" || continue
4813 ac_cv_prog_LD="${ac_tool_prefix}ld"
4814 echo "$as_me:4814: found $ac_dir/$ac_word" >&5
4815 break
4816 done
4817
4818 fi
4819 fi
4820 LD=$ac_cv_prog_LD
4821 if test -n "$LD"; then
4822   echo "$as_me:4822: result: $LD" >&5
4823 echo "${ECHO_T}$LD" >&6
4824 else
4825   echo "$as_me:4825: result: no" >&5
4826 echo "${ECHO_T}no" >&6
4827 fi
4828
4829 fi
4830 if test -z "$ac_cv_prog_LD"; then
4831   ac_ct_LD=$LD
4832   # Extract the first word of "ld", so it can be a program name with args.
4833 set dummy ld; ac_word=$2
4834 echo "$as_me:4834: checking for $ac_word" >&5
4835 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4836 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4837   echo $ECHO_N "(cached) $ECHO_C" >&6
4838 else
4839   if test -n "$ac_ct_LD"; then
4840   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4841 else
4842   ac_save_IFS=$IFS; IFS=$ac_path_separator
4843 ac_dummy="$PATH"
4844 for ac_dir in $ac_dummy; do
4845   IFS=$ac_save_IFS
4846   test -z "$ac_dir" && ac_dir=.
4847   $as_executable_p "$ac_dir/$ac_word" || continue
4848 ac_cv_prog_ac_ct_LD="ld"
4849 echo "$as_me:4849: found $ac_dir/$ac_word" >&5
4850 break
4851 done
4852
4853   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4854 fi
4855 fi
4856 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4857 if test -n "$ac_ct_LD"; then
4858   echo "$as_me:4858: result: $ac_ct_LD" >&5
4859 echo "${ECHO_T}$ac_ct_LD" >&6
4860 else
4861   echo "$as_me:4861: result: no" >&5
4862 echo "${ECHO_T}no" >&6
4863 fi
4864
4865   LD=$ac_ct_LD
4866 else
4867   LD="$ac_cv_prog_LD"
4868 fi
4869
4870 if test -n "$ac_tool_prefix"; then
4871   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4872 set dummy ${ac_tool_prefix}ar; ac_word=$2
4873 echo "$as_me:4873: checking for $ac_word" >&5
4874 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4875 if test "${ac_cv_prog_AR+set}" = set; then
4876   echo $ECHO_N "(cached) $ECHO_C" >&6
4877 else
4878   if test -n "$AR"; then
4879   ac_cv_prog_AR="$AR" # Let the user override the test.
4880 else
4881   ac_save_IFS=$IFS; IFS=$ac_path_separator
4882 ac_dummy="$PATH"
4883 for ac_dir in $ac_dummy; do
4884   IFS=$ac_save_IFS
4885   test -z "$ac_dir" && ac_dir=.
4886   $as_executable_p "$ac_dir/$ac_word" || continue
4887 ac_cv_prog_AR="${ac_tool_prefix}ar"
4888 echo "$as_me:4888: found $ac_dir/$ac_word" >&5
4889 break
4890 done
4891
4892 fi
4893 fi
4894 AR=$ac_cv_prog_AR
4895 if test -n "$AR"; then
4896   echo "$as_me:4896: result: $AR" >&5
4897 echo "${ECHO_T}$AR" >&6
4898 else
4899   echo "$as_me:4899: result: no" >&5
4900 echo "${ECHO_T}no" >&6
4901 fi
4902
4903 fi
4904 if test -z "$ac_cv_prog_AR"; then
4905   ac_ct_AR=$AR
4906   # Extract the first word of "ar", so it can be a program name with args.
4907 set dummy ar; ac_word=$2
4908 echo "$as_me:4908: checking for $ac_word" >&5
4909 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4910 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4911   echo $ECHO_N "(cached) $ECHO_C" >&6
4912 else
4913   if test -n "$ac_ct_AR"; then
4914   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4915 else
4916   ac_save_IFS=$IFS; IFS=$ac_path_separator
4917 ac_dummy="$PATH"
4918 for ac_dir in $ac_dummy; do
4919   IFS=$ac_save_IFS
4920   test -z "$ac_dir" && ac_dir=.
4921   $as_executable_p "$ac_dir/$ac_word" || continue
4922 ac_cv_prog_ac_ct_AR="ar"
4923 echo "$as_me:4923: found $ac_dir/$ac_word" >&5
4924 break
4925 done
4926
4927   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4928 fi
4929 fi
4930 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4931 if test -n "$ac_ct_AR"; then
4932   echo "$as_me:4932: result: $ac_ct_AR" >&5
4933 echo "${ECHO_T}$ac_ct_AR" >&6
4934 else
4935   echo "$as_me:4935: result: no" >&5
4936 echo "${ECHO_T}no" >&6
4937 fi
4938
4939   AR=$ac_ct_AR
4940 else
4941   AR="$ac_cv_prog_AR"
4942 fi
4943
4944 if test -n "$ac_tool_prefix"; then
4945   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4946 set dummy ${ac_tool_prefix}nm; ac_word=$2
4947 echo "$as_me:4947: checking for $ac_word" >&5
4948 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4949 if test "${ac_cv_prog_NM+set}" = set; then
4950   echo $ECHO_N "(cached) $ECHO_C" >&6
4951 else
4952   if test -n "$NM"; then
4953   ac_cv_prog_NM="$NM" # Let the user override the test.
4954 else
4955   ac_save_IFS=$IFS; IFS=$ac_path_separator
4956 ac_dummy="$PATH"
4957 for ac_dir in $ac_dummy; do
4958   IFS=$ac_save_IFS
4959   test -z "$ac_dir" && ac_dir=.
4960   $as_executable_p "$ac_dir/$ac_word" || continue
4961 ac_cv_prog_NM="${ac_tool_prefix}nm"
4962 echo "$as_me:4962: found $ac_dir/$ac_word" >&5
4963 break
4964 done
4965
4966 fi
4967 fi
4968 NM=$ac_cv_prog_NM
4969 if test -n "$NM"; then
4970   echo "$as_me:4970: result: $NM" >&5
4971 echo "${ECHO_T}$NM" >&6
4972 else
4973   echo "$as_me:4973: result: no" >&5
4974 echo "${ECHO_T}no" >&6
4975 fi
4976
4977 fi
4978 if test -z "$ac_cv_prog_NM"; then
4979   ac_ct_NM=$NM
4980   # Extract the first word of "nm", so it can be a program name with args.
4981 set dummy nm; ac_word=$2
4982 echo "$as_me:4982: checking for $ac_word" >&5
4983 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4984 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4985   echo $ECHO_N "(cached) $ECHO_C" >&6
4986 else
4987   if test -n "$ac_ct_NM"; then
4988   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4989 else
4990   ac_save_IFS=$IFS; IFS=$ac_path_separator
4991 ac_dummy="$PATH"
4992 for ac_dir in $ac_dummy; do
4993   IFS=$ac_save_IFS
4994   test -z "$ac_dir" && ac_dir=.
4995   $as_executable_p "$ac_dir/$ac_word" || continue
4996 ac_cv_prog_ac_ct_NM="nm"
4997 echo "$as_me:4997: found $ac_dir/$ac_word" >&5
4998 break
4999 done
5000
5001   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5002 fi
5003 fi
5004 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5005 if test -n "$ac_ct_NM"; then
5006   echo "$as_me:5006: result: $ac_ct_NM" >&5
5007 echo "${ECHO_T}$ac_ct_NM" >&6
5008 else
5009   echo "$as_me:5009: result: no" >&5
5010 echo "${ECHO_T}no" >&6
5011 fi
5012
5013   NM=$ac_ct_NM
5014 else
5015   NM="$ac_cv_prog_NM"
5016 fi
5017
5018 if test -n "$ac_tool_prefix"; then
5019   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5020 set dummy ${ac_tool_prefix}ar; ac_word=$2
5021 echo "$as_me:5021: checking for $ac_word" >&5
5022 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5023 if test "${ac_cv_prog_AR+set}" = set; then
5024   echo $ECHO_N "(cached) $ECHO_C" >&6
5025 else
5026   if test -n "$AR"; then
5027   ac_cv_prog_AR="$AR" # Let the user override the test.
5028 else
5029   ac_save_IFS=$IFS; IFS=$ac_path_separator
5030 ac_dummy="$PATH"
5031 for ac_dir in $ac_dummy; do
5032   IFS=$ac_save_IFS
5033   test -z "$ac_dir" && ac_dir=.
5034   $as_executable_p "$ac_dir/$ac_word" || continue
5035 ac_cv_prog_AR="${ac_tool_prefix}ar"
5036 echo "$as_me:5036: found $ac_dir/$ac_word" >&5
5037 break
5038 done
5039
5040 fi
5041 fi
5042 AR=$ac_cv_prog_AR
5043 if test -n "$AR"; then
5044   echo "$as_me:5044: result: $AR" >&5
5045 echo "${ECHO_T}$AR" >&6
5046 else
5047   echo "$as_me:5047: result: no" >&5
5048 echo "${ECHO_T}no" >&6
5049 fi
5050
5051 fi
5052 if test -z "$ac_cv_prog_AR"; then
5053   ac_ct_AR=$AR
5054   # Extract the first word of "ar", so it can be a program name with args.
5055 set dummy ar; ac_word=$2
5056 echo "$as_me:5056: checking for $ac_word" >&5
5057 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5058 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5059   echo $ECHO_N "(cached) $ECHO_C" >&6
5060 else
5061   if test -n "$ac_ct_AR"; then
5062   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5063 else
5064   ac_save_IFS=$IFS; IFS=$ac_path_separator
5065 ac_dummy="$PATH"
5066 for ac_dir in $ac_dummy; do
5067   IFS=$ac_save_IFS
5068   test -z "$ac_dir" && ac_dir=.
5069   $as_executable_p "$ac_dir/$ac_word" || continue
5070 ac_cv_prog_ac_ct_AR="ar"
5071 echo "$as_me:5071: found $ac_dir/$ac_word" >&5
5072 break
5073 done
5074
5075   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5076 fi
5077 fi
5078 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5079 if test -n "$ac_ct_AR"; then
5080   echo "$as_me:5080: result: $ac_ct_AR" >&5
5081 echo "${ECHO_T}$ac_ct_AR" >&6
5082 else
5083   echo "$as_me:5083: result: no" >&5
5084 echo "${ECHO_T}no" >&6
5085 fi
5086
5087   AR=$ac_ct_AR
5088 else
5089   AR="$ac_cv_prog_AR"
5090 fi
5091
5092 echo "$as_me:5092: checking for options to update archives" >&5
5093 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5094 if test "${cf_cv_ar_flags+set}" = set; then
5095   echo $ECHO_N "(cached) $ECHO_C" >&6
5096 else
5097
5098         case "$cf_cv_system_name" in
5099         (*-msvc*)
5100                 cf_cv_ar_flags=''
5101                 cat >mk_static_lib.sh <<-EOF
5102                 #!$SHELL
5103                 MSVC_BIN="$AR"
5104                 out="\$1"
5105                 shift
5106                 exec \$MSVC_BIN -out:"\$out" \$@
5107                 EOF
5108                 chmod +x mk_static_lib.sh
5109                 AR=`pwd`/mk_static_lib.sh
5110                 ;;
5111         (*)
5112                 cf_cv_ar_flags=unknown
5113                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5114                 do
5115
5116                         # check if $ARFLAGS already contains this choice
5117                         if test "x$ARFLAGS" != "x" ; then
5118                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5119                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5120                                         cf_cv_ar_flags=
5121                                         break
5122                                 fi
5123                         fi
5124
5125                         rm -f "conftest.$ac_cv_objext"
5126                         rm -f conftest.a
5127
5128                         cat >"conftest.$ac_ext" <<EOF
5129 #line 5129 "configure"
5130 int     testdata[3] = { 123, 456, 789 };
5131 EOF
5132                         if { (eval echo "$as_me:5132: \"$ac_compile\"") >&5
5133   (eval $ac_compile) 2>&5
5134   ac_status=$?
5135   echo "$as_me:5135: \$? = $ac_status" >&5
5136   (exit "$ac_status"); } ; then
5137                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5138                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5139                                 if test -f conftest.a ; then
5140                                         cf_cv_ar_flags="$cf_ar_flags"
5141                                         break
5142                                 fi
5143                         else
5144                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5145
5146 echo "${as_me:-configure}:5146: testing cannot compile test-program ..." 1>&5
5147
5148                                 break
5149                         fi
5150                 done
5151                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5152                 ;;
5153         esac
5154
5155 fi
5156 echo "$as_me:5156: result: $cf_cv_ar_flags" >&5
5157 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5158
5159 if test -n "$ARFLAGS" ; then
5160         if test -n "$cf_cv_ar_flags" ; then
5161                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5162         fi
5163 else
5164         ARFLAGS=$cf_cv_ar_flags
5165 fi
5166
5167 echo "$as_me:5167: checking if you have specified an install-prefix" >&5
5168 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5169
5170 # Check whether --with-install-prefix or --without-install-prefix was given.
5171 if test "${with_install_prefix+set}" = set; then
5172   withval="$with_install_prefix"
5173   case "x$withval" in
5174         (xyes|xno)
5175                 ;;
5176         (*)     DESTDIR="$withval"
5177                 ;;
5178         esac
5179 fi;
5180 echo "$as_me:5180: result: $DESTDIR" >&5
5181 echo "${ECHO_T}$DESTDIR" >&6
5182
5183 ###############################################################################
5184
5185 # If we're cross-compiling, allow the user to override the tools and their
5186 # options.  The configure script is oriented toward identifying the host
5187 # compiler, etc., but we need a build compiler to generate parts of the source.
5188
5189 case "$cf_cv_system_name" in
5190 (*-msvc*)
5191         LDFLAGS="$LDFLAGS user32.lib"
5192         export LDFLAGS
5193         ;;
5194 esac
5195
5196 if test "$cross_compiling" = yes ; then
5197
5198         # defaults that we might want to override
5199         : ${BUILD_CFLAGS:=''}
5200         : ${BUILD_CPPFLAGS:=''}
5201         : ${BUILD_LDFLAGS:=''}
5202         : ${BUILD_LIBS:=''}
5203         : ${BUILD_EXEEXT:='$x'}
5204         : ${BUILD_OBJEXT:='o'}
5205
5206 # Check whether --with-build-cc or --without-build-cc was given.
5207 if test "${with_build_cc+set}" = set; then
5208   withval="$with_build_cc"
5209   BUILD_CC="$withval"
5210 else
5211   for ac_prog in gcc clang c99 c89 cc cl
5212 do
5213   # Extract the first word of "$ac_prog", so it can be a program name with args.
5214 set dummy $ac_prog; ac_word=$2
5215 echo "$as_me:5215: checking for $ac_word" >&5
5216 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5217 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5218   echo $ECHO_N "(cached) $ECHO_C" >&6
5219 else
5220   if test -n "$BUILD_CC"; then
5221   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5222 else
5223   ac_save_IFS=$IFS; IFS=$ac_path_separator
5224 ac_dummy="$PATH"
5225 for ac_dir in $ac_dummy; do
5226   IFS=$ac_save_IFS
5227   test -z "$ac_dir" && ac_dir=.
5228   $as_executable_p "$ac_dir/$ac_word" || continue
5229 ac_cv_prog_BUILD_CC="$ac_prog"
5230 echo "$as_me:5230: found $ac_dir/$ac_word" >&5
5231 break
5232 done
5233
5234 fi
5235 fi
5236 BUILD_CC=$ac_cv_prog_BUILD_CC
5237 if test -n "$BUILD_CC"; then
5238   echo "$as_me:5238: result: $BUILD_CC" >&5
5239 echo "${ECHO_T}$BUILD_CC" >&6
5240 else
5241   echo "$as_me:5241: result: no" >&5
5242 echo "${ECHO_T}no" >&6
5243 fi
5244
5245   test -n "$BUILD_CC" && break
5246 done
5247 test -n "$BUILD_CC" || BUILD_CC="none"
5248
5249 fi;
5250         echo "$as_me:5250: checking for native build C compiler" >&5
5251 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5252         echo "$as_me:5252: result: $BUILD_CC" >&5
5253 echo "${ECHO_T}$BUILD_CC" >&6
5254
5255         echo "$as_me:5255: checking for native build C preprocessor" >&5
5256 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5257
5258 # Check whether --with-build-cpp or --without-build-cpp was given.
5259 if test "${with_build_cpp+set}" = set; then
5260   withval="$with_build_cpp"
5261   BUILD_CPP="$withval"
5262 else
5263   BUILD_CPP='${BUILD_CC} -E'
5264 fi;
5265         echo "$as_me:5265: result: $BUILD_CPP" >&5
5266 echo "${ECHO_T}$BUILD_CPP" >&6
5267
5268         echo "$as_me:5268: checking for native build C flags" >&5
5269 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5270
5271 # Check whether --with-build-cflags or --without-build-cflags was given.
5272 if test "${with_build_cflags+set}" = set; then
5273   withval="$with_build_cflags"
5274   BUILD_CFLAGS="$withval"
5275 fi;
5276         echo "$as_me:5276: result: $BUILD_CFLAGS" >&5
5277 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5278
5279         echo "$as_me:5279: checking for native build C preprocessor-flags" >&5
5280 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5281
5282 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5283 if test "${with_build_cppflags+set}" = set; then
5284   withval="$with_build_cppflags"
5285   BUILD_CPPFLAGS="$withval"
5286 fi;
5287         echo "$as_me:5287: result: $BUILD_CPPFLAGS" >&5
5288 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5289
5290         echo "$as_me:5290: checking for native build linker-flags" >&5
5291 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5292
5293 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5294 if test "${with_build_ldflags+set}" = set; then
5295   withval="$with_build_ldflags"
5296   BUILD_LDFLAGS="$withval"
5297 fi;
5298         echo "$as_me:5298: result: $BUILD_LDFLAGS" >&5
5299 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5300
5301         echo "$as_me:5301: checking for native build linker-libraries" >&5
5302 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5303
5304 # Check whether --with-build-libs or --without-build-libs was given.
5305 if test "${with_build_libs+set}" = set; then
5306   withval="$with_build_libs"
5307   BUILD_LIBS="$withval"
5308 fi;
5309         echo "$as_me:5309: result: $BUILD_LIBS" >&5
5310 echo "${ECHO_T}$BUILD_LIBS" >&6
5311
5312         # this assumes we're on Unix.
5313         BUILD_EXEEXT=
5314         BUILD_OBJEXT=o
5315
5316         : ${BUILD_CC:='${CC}'}
5317
5318         echo "$as_me:5318: checking if the build-compiler \"$BUILD_CC\" works" >&5
5319 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
5320
5321         cf_save_crossed=$cross_compiling
5322         cf_save_ac_link=$ac_link
5323         cross_compiling=no
5324         ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $BUILD_CPPFLAGS $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
5325
5326         if test "$cross_compiling" = yes; then
5327   cf_ok_build_cc=unknown
5328 else
5329   cat >"conftest.$ac_ext" <<_ACEOF
5330 #line 5330 "configure"
5331 #include "confdefs.h"
5332 #include <stdio.h>
5333                 int main(int argc, char *argv[])
5334                 {
5335                         ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
5336                 }
5337
5338 _ACEOF
5339 rm -f "conftest$ac_exeext"
5340 if { (eval echo "$as_me:5340: \"$ac_link\"") >&5
5341   (eval $ac_link) 2>&5
5342   ac_status=$?
5343   echo "$as_me:5343: \$? = $ac_status" >&5
5344   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5345   { (eval echo "$as_me:5345: \"$ac_try\"") >&5
5346   (eval $ac_try) 2>&5
5347   ac_status=$?
5348   echo "$as_me:5348: \$? = $ac_status" >&5
5349   (exit "$ac_status"); }; }; then
5350   cf_ok_build_cc=yes
5351 else
5352   echo "$as_me: program exited with status $ac_status" >&5
5353 echo "$as_me: failed program was:" >&5
5354 cat "conftest.$ac_ext" >&5
5355 cf_ok_build_cc=no
5356 fi
5357 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5358 fi
5359
5360         cross_compiling=$cf_save_crossed
5361         ac_link=$cf_save_ac_link
5362
5363         echo "$as_me:5363: result: $cf_ok_build_cc" >&5
5364 echo "${ECHO_T}$cf_ok_build_cc" >&6
5365
5366         if test "$cf_ok_build_cc" != yes
5367         then
5368                 { { echo "$as_me:5368: error: Cross-build requires two compilers.
5369 Use --with-build-cc to specify the native compiler." >&5
5370 echo "$as_me: error: Cross-build requires two compilers.
5371 Use --with-build-cc to specify the native compiler." >&2;}
5372    { (exit 1); exit 1; }; }
5373         fi
5374
5375 else
5376         : ${BUILD_CC:='${CC}'}
5377         : ${BUILD_CPP:='${CPP}'}
5378         : ${BUILD_CFLAGS:='${CFLAGS}'}
5379         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5380         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5381         : ${BUILD_LIBS:='${LIBS}'}
5382         : ${BUILD_EXEEXT:='$x'}
5383         : ${BUILD_OBJEXT:='o'}
5384 fi
5385
5386 ###############################################################################
5387
5388 ### Options to allow the user to specify the set of libraries which are used.
5389 ### Use "--without-normal --with-shared" to allow the default model to be
5390 ### shared, for example.
5391 cf_list_models=""
5392
5393 echo "$as_me:5393: checking if libtool -version-number should be used" >&5
5394 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5395
5396 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5397 if test "${enable_libtool_version+set}" = set; then
5398   enableval="$enable_libtool_version"
5399   test "$enableval" != no && enableval=yes
5400         if test "$enableval" != "yes" ; then
5401     cf_libtool_version=no
5402         else
5403                 cf_libtool_version=yes
5404         fi
5405 else
5406   enableval=yes
5407         cf_libtool_version=yes
5408
5409 fi;
5410 echo "$as_me:5410: result: $cf_libtool_version" >&5
5411 echo "${ECHO_T}$cf_libtool_version" >&6
5412
5413 if test "$cf_libtool_version" = yes ; then
5414         LIBTOOL_VERSION="-version-number"
5415 else
5416         LIBTOOL_VERSION="-version-info"
5417         case "x$VERSION" in
5418         (x)
5419                 { echo "$as_me:5419: WARNING: VERSION was not set" >&5
5420 echo "$as_me: WARNING: VERSION was not set" >&2;}
5421                 ;;
5422         (x*.*.*)
5423                 ABI_VERSION="$VERSION"
5424                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5425
5426 echo "${as_me:-configure}:5426: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5427
5428                 ;;
5429         (x*:*:*)
5430                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5431                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5432
5433 echo "${as_me:-configure}:5433: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5434
5435                 ;;
5436         (*)
5437                 { echo "$as_me:5437: WARNING: unexpected VERSION value: $VERSION" >&5
5438 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5439                 ;;
5440         esac
5441 fi
5442
5443 LIBTOOL=
5444
5445 # common library maintenance symbols that are convenient for libtool scripts:
5446 LIB_CREATE='${AR} -cr'
5447 LIB_OBJECT='${OBJECTS}'
5448 LIB_SUFFIX=.a
5449 LIB_PREP="$RANLIB"
5450
5451 # symbols used to prop libtool up to enable it to determine what it should be
5452 # doing:
5453 LIB_CLEAN=
5454 LIB_COMPILE=
5455 LIB_LINK='${CC}'
5456 LIB_INSTALL=
5457 LIB_UNINSTALL=
5458
5459 echo "$as_me:5459: checking if you want to build libraries with libtool" >&5
5460 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5461
5462 # Check whether --with-libtool or --without-libtool was given.
5463 if test "${with_libtool+set}" = set; then
5464   withval="$with_libtool"
5465   with_libtool=$withval
5466 else
5467   with_libtool=no
5468 fi;
5469 echo "$as_me:5469: result: $with_libtool" >&5
5470 echo "${ECHO_T}$with_libtool" >&6
5471 if test "$with_libtool" != "no"; then
5472
5473         if test "$with_libtool" != "yes" ; then
5474
5475 if test "x$prefix" != xNONE; then
5476         cf_path_syntax="$prefix"
5477 else
5478         cf_path_syntax="$ac_default_prefix"
5479 fi
5480
5481 case ".$with_libtool" in
5482 (.\$\(*\)*|.\'*\'*)
5483         ;;
5484 (..|./*|.\\*)
5485         ;;
5486 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5487         ;;
5488 (.\$\{*prefix\}*|.\$\{*dir\}*)
5489         eval with_libtool="$with_libtool"
5490         case ".$with_libtool" in
5491         (.NONE/*)
5492                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5493                 ;;
5494         esac
5495         ;;
5496 (.no|.NONE/*)
5497         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5498         ;;
5499 (*)
5500         { { echo "$as_me:5500: error: expected a pathname, not \"$with_libtool\"" >&5
5501 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5502    { (exit 1); exit 1; }; }
5503         ;;
5504 esac
5505
5506                 LIBTOOL=$with_libtool
5507         else
5508                 if test -n "$ac_tool_prefix"; then
5509   for ac_prog in libtool glibtool
5510   do
5511     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5512 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5513 echo "$as_me:5513: checking for $ac_word" >&5
5514 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5515 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5516   echo $ECHO_N "(cached) $ECHO_C" >&6
5517 else
5518   if test -n "$LIBTOOL"; then
5519   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5520 else
5521   ac_save_IFS=$IFS; IFS=$ac_path_separator
5522 ac_dummy="$PATH"
5523 for ac_dir in $ac_dummy; do
5524   IFS=$ac_save_IFS
5525   test -z "$ac_dir" && ac_dir=.
5526   $as_executable_p "$ac_dir/$ac_word" || continue
5527 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5528 echo "$as_me:5528: found $ac_dir/$ac_word" >&5
5529 break
5530 done
5531
5532 fi
5533 fi
5534 LIBTOOL=$ac_cv_prog_LIBTOOL
5535 if test -n "$LIBTOOL"; then
5536   echo "$as_me:5536: result: $LIBTOOL" >&5
5537 echo "${ECHO_T}$LIBTOOL" >&6
5538 else
5539   echo "$as_me:5539: result: no" >&5
5540 echo "${ECHO_T}no" >&6
5541 fi
5542
5543     test -n "$LIBTOOL" && break
5544   done
5545 fi
5546 if test -z "$LIBTOOL"; then
5547   ac_ct_LIBTOOL=$LIBTOOL
5548   for ac_prog in libtool glibtool
5549 do
5550   # Extract the first word of "$ac_prog", so it can be a program name with args.
5551 set dummy $ac_prog; ac_word=$2
5552 echo "$as_me:5552: checking for $ac_word" >&5
5553 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5554 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5555   echo $ECHO_N "(cached) $ECHO_C" >&6
5556 else
5557   if test -n "$ac_ct_LIBTOOL"; then
5558   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5559 else
5560   ac_save_IFS=$IFS; IFS=$ac_path_separator
5561 ac_dummy="$PATH"
5562 for ac_dir in $ac_dummy; do
5563   IFS=$ac_save_IFS
5564   test -z "$ac_dir" && ac_dir=.
5565   $as_executable_p "$ac_dir/$ac_word" || continue
5566 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5567 echo "$as_me:5567: found $ac_dir/$ac_word" >&5
5568 break
5569 done
5570
5571 fi
5572 fi
5573 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5574 if test -n "$ac_ct_LIBTOOL"; then
5575   echo "$as_me:5575: result: $ac_ct_LIBTOOL" >&5
5576 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5577 else
5578   echo "$as_me:5578: result: no" >&5
5579 echo "${ECHO_T}no" >&6
5580 fi
5581
5582   test -n "$ac_ct_LIBTOOL" && break
5583 done
5584 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5585
5586   LIBTOOL=$ac_ct_LIBTOOL
5587 fi
5588
5589 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5590 then
5591         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.].*//'`
5592 else
5593         cf_cv_libtool_version=
5594 fi
5595 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5596
5597                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5598                 then
5599
5600 unset ac_cv_prog_ac_ct_LIBTOOL
5601 unset ac_ct_LIBTOOL
5602 unset LIBTOOL
5603
5604                         if test -n "$ac_tool_prefix"; then
5605   for ac_prog in glibtool
5606   do
5607     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5608 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5609 echo "$as_me:5609: checking for $ac_word" >&5
5610 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5611 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5612   echo $ECHO_N "(cached) $ECHO_C" >&6
5613 else
5614   if test -n "$LIBTOOL"; then
5615   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5616 else
5617   ac_save_IFS=$IFS; IFS=$ac_path_separator
5618 ac_dummy="$PATH"
5619 for ac_dir in $ac_dummy; do
5620   IFS=$ac_save_IFS
5621   test -z "$ac_dir" && ac_dir=.
5622   $as_executable_p "$ac_dir/$ac_word" || continue
5623 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5624 echo "$as_me:5624: found $ac_dir/$ac_word" >&5
5625 break
5626 done
5627
5628 fi
5629 fi
5630 LIBTOOL=$ac_cv_prog_LIBTOOL
5631 if test -n "$LIBTOOL"; then
5632   echo "$as_me:5632: result: $LIBTOOL" >&5
5633 echo "${ECHO_T}$LIBTOOL" >&6
5634 else
5635   echo "$as_me:5635: result: no" >&5
5636 echo "${ECHO_T}no" >&6
5637 fi
5638
5639     test -n "$LIBTOOL" && break
5640   done
5641 fi
5642 if test -z "$LIBTOOL"; then
5643   ac_ct_LIBTOOL=$LIBTOOL
5644   for ac_prog in glibtool
5645 do
5646   # Extract the first word of "$ac_prog", so it can be a program name with args.
5647 set dummy $ac_prog; ac_word=$2
5648 echo "$as_me:5648: checking for $ac_word" >&5
5649 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5650 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5651   echo $ECHO_N "(cached) $ECHO_C" >&6
5652 else
5653   if test -n "$ac_ct_LIBTOOL"; then
5654   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5655 else
5656   ac_save_IFS=$IFS; IFS=$ac_path_separator
5657 ac_dummy="$PATH"
5658 for ac_dir in $ac_dummy; do
5659   IFS=$ac_save_IFS
5660   test -z "$ac_dir" && ac_dir=.
5661   $as_executable_p "$ac_dir/$ac_word" || continue
5662 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5663 echo "$as_me:5663: found $ac_dir/$ac_word" >&5
5664 break
5665 done
5666
5667 fi
5668 fi
5669 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5670 if test -n "$ac_ct_LIBTOOL"; then
5671   echo "$as_me:5671: result: $ac_ct_LIBTOOL" >&5
5672 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5673 else
5674   echo "$as_me:5674: result: no" >&5
5675 echo "${ECHO_T}no" >&6
5676 fi
5677
5678   test -n "$ac_ct_LIBTOOL" && break
5679 done
5680 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5681
5682   LIBTOOL=$ac_ct_LIBTOOL
5683 fi
5684
5685 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5686 then
5687         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.].*//'`
5688 else
5689         cf_cv_libtool_version=
5690 fi
5691 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5692
5693                 fi
5694         fi
5695         if test -z "$LIBTOOL" ; then
5696                 { { echo "$as_me:5696: error: Cannot find libtool" >&5
5697 echo "$as_me: error: Cannot find libtool" >&2;}
5698    { (exit 1); exit 1; }; }
5699         fi
5700         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5701         LIB_OBJECT='${OBJECTS:.o=.lo}'
5702         LIB_SUFFIX=.la
5703         LIB_CLEAN='${LIBTOOL} --mode=clean'
5704         LIB_COMPILE='${LIBTOOL} --mode=compile'
5705         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5706         LIB_INSTALL='${LIBTOOL} --mode=install'
5707         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5708         LIB_PREP=:
5709
5710 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5711 then
5712         echo "$as_me:5712: checking version of $LIBTOOL" >&5
5713 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5714
5715 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5716 then
5717         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.].*//'`
5718 else
5719         cf_cv_libtool_version=
5720 fi
5721 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5722
5723         echo "$as_me:5723: result: $cf_cv_libtool_version" >&5
5724 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5725         if test -n "$cf_cv_libtool_version"
5726         then
5727                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5728                 case "x$cf_check_libtool_version" in
5729                 (*...GNU-libtool...*)
5730                         ;;
5731                 (*)
5732                         { { echo "$as_me:5732: error: This is not GNU libtool" >&5
5733 echo "$as_me: error: This is not GNU libtool" >&2;}
5734    { (exit 1); exit 1; }; }
5735                         ;;
5736                 esac
5737         else
5738                 { { echo "$as_me:5738: error: No version found for $LIBTOOL" >&5
5739 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5740    { (exit 1); exit 1; }; }
5741         fi
5742 else
5743         { { echo "$as_me:5743: error: GNU libtool has not been found" >&5
5744 echo "$as_me: error: GNU libtool has not been found" >&2;}
5745    { (exit 1); exit 1; }; }
5746 fi
5747
5748         # special hack to add -no-undefined (which libtool should do for itself)
5749         LT_UNDEF=
5750         case "$cf_cv_system_name" in
5751         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5752                 LT_UNDEF=-no-undefined
5753                 ;;
5754         esac
5755
5756         # special hack to add --tag option for C++ compiler
5757         case "$cf_cv_libtool_version" in
5758         (1.[5-9]*|[2-9].[0-9.a-z]*)
5759                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5760                 LIBTOOL="$LIBTOOL --tag=CC"
5761                 ;;
5762         (*)
5763                 LIBTOOL_CXX="$LIBTOOL"
5764                 ;;
5765         esac
5766 else
5767         LIBTOOL=""
5768         LIBTOOL_CXX=""
5769 fi
5770
5771 test -z "$LIBTOOL" && ECHO_LT=
5772
5773 if test "$with_libtool" != "no" ; then
5774
5775 cf_list_models="$cf_list_models libtool"
5776
5777 else
5778
5779 echo "$as_me:5779: checking if you want to build shared libraries" >&5
5780 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5781
5782 # Check whether --with-shared or --without-shared was given.
5783 if test "${with_shared+set}" = set; then
5784   withval="$with_shared"
5785   with_shared=$withval
5786 else
5787   with_shared=no
5788 fi;
5789 echo "$as_me:5789: result: $with_shared" >&5
5790 echo "${ECHO_T}$with_shared" >&6
5791 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5792
5793 echo "$as_me:5793: checking if you want to build static libraries" >&5
5794 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5795
5796 # Check whether --with-normal or --without-normal was given.
5797 if test "${with_normal+set}" = set; then
5798   withval="$with_normal"
5799   with_normal=$withval
5800 else
5801   with_normal=yes
5802 fi;
5803 echo "$as_me:5803: result: $with_normal" >&5
5804 echo "${ECHO_T}$with_normal" >&6
5805 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5806
5807 echo "$as_me:5807: checking if you want to build debug libraries" >&5
5808 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5809
5810 # Check whether --with-debug or --without-debug was given.
5811 if test "${with_debug+set}" = set; then
5812   withval="$with_debug"
5813   with_debug=$withval
5814 else
5815   with_debug=yes
5816 fi;
5817 echo "$as_me:5817: result: $with_debug" >&5
5818 echo "${ECHO_T}$with_debug" >&6
5819 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5820
5821 echo "$as_me:5821: checking if you want to build profiling libraries" >&5
5822 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5823
5824 # Check whether --with-profile or --without-profile was given.
5825 if test "${with_profile+set}" = set; then
5826   withval="$with_profile"
5827   with_profile=$withval
5828 else
5829   with_profile=no
5830 fi;
5831 echo "$as_me:5831: result: $with_profile" >&5
5832 echo "${ECHO_T}$with_profile" >&6
5833 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5834
5835 fi
5836
5837 if test "X$cf_with_cxx_binding" != Xno; then
5838 if test "x$with_shared" = "xyes"; then
5839 echo "$as_me:5839: checking if you want to build C++ shared libraries" >&5
5840 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5841
5842 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5843 if test "${with_cxx_shared+set}" = set; then
5844   withval="$with_cxx_shared"
5845   with_shared_cxx=$withval
5846 else
5847   with_shared_cxx=no
5848 fi;
5849 echo "$as_me:5849: result: $with_shared_cxx" >&5
5850 echo "${ECHO_T}$with_shared_cxx" >&6
5851 fi
5852 fi
5853
5854 ###############################################################################
5855
5856 echo "$as_me:5856: checking for specified models" >&5
5857 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5858 test -z "$cf_list_models" && cf_list_models=normal
5859 test "$with_libtool" != "no" && cf_list_models=libtool
5860 echo "$as_me:5860: result: $cf_list_models" >&5
5861 echo "${ECHO_T}$cf_list_models" >&6
5862
5863 ### Use the first model as the default, and save its suffix for use in building
5864 ### up test-applications.
5865 echo "$as_me:5865: checking for default model" >&5
5866 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5867 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5868 echo "$as_me:5868: result: $DFT_LWR_MODEL" >&5
5869 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5870
5871 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5872
5873 TICS_NAME=tic
5874
5875 TINFO_NAME=tinfo
5876
5877 LIB_NAME=ncurses
5878
5879 LIB_DIR=../lib
5880 LIB_2ND=../../lib
5881
5882 echo "$as_me:5882: checking if you want to have a library-prefix" >&5
5883 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5884
5885 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5886 if test "${with_lib_prefix+set}" = set; then
5887   withval="$with_lib_prefix"
5888   with_lib_prefix=$withval
5889 else
5890   with_lib_prefix=auto
5891 fi;
5892 echo "$as_me:5892: result: $with_lib_prefix" >&5
5893 echo "${ECHO_T}$with_lib_prefix" >&6
5894
5895 if test "$with_lib_prefix" = auto
5896 then
5897
5898         case "$cf_cv_system_name" in
5899         (OS/2*|os2*)
5900                 if test "$DFT_LWR_MODEL" = libtool; then
5901                         LIB_PREFIX='lib'
5902                 else
5903                         LIB_PREFIX=''
5904                 fi
5905                 ;;
5906         (*-msvc*)
5907                 LIB_PREFIX=''
5908                 ;;
5909         (*)     LIB_PREFIX='lib'
5910                 ;;
5911         esac
5912 cf_prefix=$LIB_PREFIX
5913
5914 elif test "$with_lib_prefix" = no
5915 then
5916         LIB_PREFIX=
5917 else
5918         LIB_PREFIX=$with_lib_prefix
5919 fi
5920
5921 LIB_SUFFIX=
5922
5923         echo "$as_me:5923: checking for PATH separator" >&5
5924 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5925         case "$cf_cv_system_name" in
5926         (os2*)  PATH_SEPARATOR=';'  ;;
5927         (*)     ${PATH_SEPARATOR:=':'}  ;;
5928         esac
5929
5930         echo "$as_me:5930: result: $PATH_SEPARATOR" >&5
5931 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5932
5933 ###############################################################################
5934
5935 echo "$as_me:5935: checking if you want to build a separate terminfo library" >&5
5936 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5937
5938 # Check whether --with-termlib or --without-termlib was given.
5939 if test "${with_termlib+set}" = set; then
5940   withval="$with_termlib"
5941   with_termlib=$withval
5942 else
5943   with_termlib=no
5944 fi;
5945 echo "$as_me:5945: result: $with_termlib" >&5
5946 echo "${ECHO_T}$with_termlib" >&6
5947
5948 echo "$as_me:5948: checking if you want to build a separate tic library" >&5
5949 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5950
5951 # Check whether --with-ticlib or --without-ticlib was given.
5952 if test "${with_ticlib+set}" = set; then
5953   withval="$with_ticlib"
5954   with_ticlib=$withval
5955 else
5956   with_ticlib=no
5957 fi;
5958 echo "$as_me:5958: result: $with_ticlib" >&5
5959 echo "${ECHO_T}$with_ticlib" >&6
5960
5961 if test X"$CC_G_OPT" = X"" ; then
5962         CC_G_OPT='-g'
5963         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5964 fi
5965
5966 if test X"$CXX_G_OPT" = X"" ; then
5967         CXX_G_OPT='-g'
5968         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5969 fi
5970
5971 echo "$as_me:5971: checking for default loader flags" >&5
5972 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5973 case "$DFT_LWR_MODEL" in
5974 (libtool) LD_MODEL=''   ;;
5975 (normal)  LD_MODEL=''   ;;
5976 (debug)   LD_MODEL=$CC_G_OPT ;;
5977 (profile) LD_MODEL='-pg';;
5978 (shared)  LD_MODEL=''   ;;
5979 esac
5980 echo "$as_me:5980: result: $LD_MODEL" >&5
5981 echo "${ECHO_T}$LD_MODEL" >&6
5982
5983 case "$DFT_LWR_MODEL" in
5984 (shared)
5985
5986 echo "$as_me:5986: checking if rpath option should be used" >&5
5987 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5988
5989 # Check whether --enable-rpath or --disable-rpath was given.
5990 if test "${enable_rpath+set}" = set; then
5991   enableval="$enable_rpath"
5992   cf_cv_enable_rpath=$enableval
5993 else
5994   cf_cv_enable_rpath=no
5995 fi;
5996 echo "$as_me:5996: result: $cf_cv_enable_rpath" >&5
5997 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5998
5999 echo "$as_me:5999: checking if shared libraries should be relinked during install" >&5
6000 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
6001
6002 # Check whether --enable-relink or --disable-relink was given.
6003 if test "${enable_relink+set}" = set; then
6004   enableval="$enable_relink"
6005   cf_cv_do_relink=$enableval
6006 else
6007   cf_cv_do_relink=yes
6008 fi;
6009 echo "$as_me:6009: result: $cf_cv_do_relink" >&5
6010 echo "${ECHO_T}$cf_cv_do_relink" >&6
6011         ;;
6012 esac
6013
6014 # we will build libraries one-level down.
6015 rel_builddir=..
6016
6017 LD_RPATH_OPT=
6018 if test "x$cf_cv_enable_rpath" != xno
6019 then
6020         echo "$as_me:6020: checking for an rpath option" >&5
6021 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
6022         case "$cf_cv_system_name" in
6023         (irix*)
6024                 if test "$GCC" = yes; then
6025                         LD_RPATH_OPT="-Wl,-rpath,"
6026                 else
6027                         LD_RPATH_OPT="-rpath "
6028                 fi
6029                 ;;
6030         (linux*|gnu*|k*bsd*-gnu|freebsd*)
6031                 LD_RPATH_OPT="-Wl,-rpath,"
6032                 ;;
6033         (openbsd[2-9].*|mirbsd*)
6034                 LD_RPATH_OPT="-Wl,-rpath,"
6035                 ;;
6036         (dragonfly*)
6037                 LD_RPATH_OPT="-rpath "
6038                 ;;
6039         (netbsd*)
6040                 LD_RPATH_OPT="-Wl,-rpath,"
6041                 ;;
6042         (osf*|mls+*)
6043                 LD_RPATH_OPT="-rpath "
6044                 ;;
6045         (solaris2*)
6046                 LD_RPATH_OPT="-R"
6047                 ;;
6048         (*)
6049                 ;;
6050         esac
6051         echo "$as_me:6051: result: $LD_RPATH_OPT" >&5
6052 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6053
6054         case "x$LD_RPATH_OPT" in
6055         (x-R*)
6056                 echo "$as_me:6056: checking if we need a space after rpath option" >&5
6057 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6058                 cf_save_LIBS="$LIBS"
6059
6060 cf_add_libs="$LIBS"
6061 # reverse order
6062 cf_add_0lib=
6063 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6064 # filter duplicates
6065 for cf_add_1lib in $cf_add_0lib; do
6066         for cf_add_2lib in $cf_add_libs; do
6067                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6068                         cf_add_1lib=
6069                         break
6070                 fi
6071         done
6072         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6073 done
6074 LIBS="$cf_add_libs"
6075
6076                 cat >"conftest.$ac_ext" <<_ACEOF
6077 #line 6077 "configure"
6078 #include "confdefs.h"
6079
6080 int
6081 main (void)
6082 {
6083
6084   ;
6085   return 0;
6086 }
6087 _ACEOF
6088 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6089 if { (eval echo "$as_me:6089: \"$ac_link\"") >&5
6090   (eval $ac_link) 2>&5
6091   ac_status=$?
6092   echo "$as_me:6092: \$? = $ac_status" >&5
6093   (exit "$ac_status"); } &&
6094          { ac_try='test -s "conftest$ac_exeext"'
6095   { (eval echo "$as_me:6095: \"$ac_try\"") >&5
6096   (eval $ac_try) 2>&5
6097   ac_status=$?
6098   echo "$as_me:6098: \$? = $ac_status" >&5
6099   (exit "$ac_status"); }; }; then
6100   cf_rpath_space=no
6101 else
6102   echo "$as_me: failed program was:" >&5
6103 cat "conftest.$ac_ext" >&5
6104 cf_rpath_space=yes
6105 fi
6106 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6107                 LIBS="$cf_save_LIBS"
6108                 echo "$as_me:6108: result: $cf_rpath_space" >&5
6109 echo "${ECHO_T}$cf_rpath_space" >&6
6110                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6111                 ;;
6112         esac
6113 fi
6114
6115         RM_SHARED_OPTS=
6116         LOCAL_LDFLAGS=
6117         LOCAL_LDFLAGS2=
6118         LD_SHARED_OPTS=
6119         INSTALL_LIB="-m 644"
6120         : ${rel_builddir:=.}
6121
6122         shlibdir=$libdir
6123
6124         MAKE_DLLS="#"
6125
6126         cf_cv_do_symlinks=no
6127         cf_ld_rpath_opt=
6128         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6129
6130         echo "$as_me:6130: checking if release/abi version should be used for shared libs" >&5
6131 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6132
6133 # Check whether --with-shlib-version or --without-shlib-version was given.
6134 if test "${with_shlib_version+set}" = set; then
6135   withval="$with_shlib_version"
6136   test -z "$withval" && withval=auto
6137         case "$withval" in
6138         (yes)
6139                 cf_cv_shlib_version=auto
6140                 ;;
6141         (rel|abi|auto)
6142                 cf_cv_shlib_version=$withval
6143                 ;;
6144         (*)
6145                 echo "$as_me:6145: result: $withval" >&5
6146 echo "${ECHO_T}$withval" >&6
6147                 { { echo "$as_me:6147: error: option value must be one of: rel, abi, or auto" >&5
6148 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6149    { (exit 1); exit 1; }; }
6150                 ;;
6151         esac
6152
6153 else
6154   cf_cv_shlib_version=auto
6155 fi;
6156         echo "$as_me:6156: result: $cf_cv_shlib_version" >&5
6157 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6158
6159         cf_cv_rm_so_locs=no
6160         cf_try_cflags=
6161
6162         # Some less-capable ports of gcc support only -fpic
6163         CC_SHARED_OPTS=
6164
6165         cf_try_fPIC=no
6166         if test "$GCC" = yes
6167         then
6168                 cf_try_fPIC=yes
6169         else
6170                 case "$cf_cv_system_name" in
6171                 (*linux*)       # e.g., PGI compiler
6172                         cf_try_fPIC=yes
6173                         ;;
6174                 esac
6175         fi
6176
6177         if test "$cf_try_fPIC" = yes
6178         then
6179                 echo "$as_me:6179: checking which $CC option to use" >&5
6180 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6181                 cf_save_CFLAGS="$CFLAGS"
6182                 for CC_SHARED_OPTS in -fPIC -fpic ''
6183                 do
6184                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6185                         cat >"conftest.$ac_ext" <<_ACEOF
6186 #line 6186 "configure"
6187 #include "confdefs.h"
6188 #include <stdio.h>
6189 int
6190 main (void)
6191 {
6192 int x = 1
6193   ;
6194   return 0;
6195 }
6196 _ACEOF
6197 rm -f "conftest.$ac_objext"
6198 if { (eval echo "$as_me:6198: \"$ac_compile\"") >&5
6199   (eval $ac_compile) 2>&5
6200   ac_status=$?
6201   echo "$as_me:6201: \$? = $ac_status" >&5
6202   (exit "$ac_status"); } &&
6203          { ac_try='test -s "conftest.$ac_objext"'
6204   { (eval echo "$as_me:6204: \"$ac_try\"") >&5
6205   (eval $ac_try) 2>&5
6206   ac_status=$?
6207   echo "$as_me:6207: \$? = $ac_status" >&5
6208   (exit "$ac_status"); }; }; then
6209   break
6210 else
6211   echo "$as_me: failed program was:" >&5
6212 cat "conftest.$ac_ext" >&5
6213 fi
6214 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6215                 done
6216                 echo "$as_me:6216: result: $CC_SHARED_OPTS" >&5
6217 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6218                 CFLAGS="$cf_save_CFLAGS"
6219         fi
6220
6221         cf_cv_shlib_version_infix=no
6222
6223         case "$cf_cv_system_name" in
6224         (aix4.3-9*|aix[5-7]*)
6225                 if test "$GCC" = yes; then
6226                         CC_SHARED_OPTS='-Wl,-brtl'
6227                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6228                 else
6229                         CC_SHARED_OPTS='-brtl'
6230                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6231                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6232                 fi
6233                 ;;
6234         (beos*)
6235                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6236                 ;;
6237         (cygwin*)
6238                 CC_SHARED_OPTS=
6239                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6240                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6241                 cf_cv_shlib_version=cygdll
6242                 cf_cv_shlib_version_infix=cygdll
6243                 shlibdir=$bindir
6244                 MAKE_DLLS=
6245                 cat >mk_shared_lib.sh <<-CF_EOF
6246                 #!$SHELL
6247                 SHARED_LIB=\$1
6248                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6249                 shift
6250                 cat <<-EOF
6251                 Linking shared library
6252                 ** SHARED_LIB \$SHARED_LIB
6253                 ** IMPORT_LIB \$IMPORT_LIB
6254 EOF
6255                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6256 CF_EOF
6257                 chmod +x mk_shared_lib.sh
6258                 ;;
6259         (msys*)
6260                 CC_SHARED_OPTS=
6261                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6262                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6263                 cf_cv_shlib_version=msysdll
6264                 cf_cv_shlib_version_infix=msysdll
6265                 shlibdir=$bindir
6266                 MAKE_DLLS=
6267                 cat >mk_shared_lib.sh <<-CF_EOF
6268                 #!$SHELL
6269                 SHARED_LIB=\$1
6270                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6271                 shift
6272                 cat <<-EOF
6273                 Linking shared library
6274                 ** SHARED_LIB \$SHARED_LIB
6275                 ** IMPORT_LIB \$IMPORT_LIB
6276 EOF
6277                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6278 CF_EOF
6279                 chmod +x mk_shared_lib.sh
6280                 ;;
6281         (darwin*)
6282                 cf_try_cflags="no-cpp-precomp"
6283                 CC_SHARED_OPTS="-dynamic"
6284                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6285                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6286                 cf_cv_shlib_version_infix=yes
6287                 echo "$as_me:6287: checking if ld -search_paths_first works" >&5
6288 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6289 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6290   echo $ECHO_N "(cached) $ECHO_C" >&6
6291 else
6292
6293                         cf_save_LDFLAGS=$LDFLAGS
6294                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6295                         cat >"conftest.$ac_ext" <<_ACEOF
6296 #line 6296 "configure"
6297 #include "confdefs.h"
6298
6299 int
6300 main (void)
6301 {
6302 int i;
6303   ;
6304   return 0;
6305 }
6306 _ACEOF
6307 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6308 if { (eval echo "$as_me:6308: \"$ac_link\"") >&5
6309   (eval $ac_link) 2>&5
6310   ac_status=$?
6311   echo "$as_me:6311: \$? = $ac_status" >&5
6312   (exit "$ac_status"); } &&
6313          { ac_try='test -s "conftest$ac_exeext"'
6314   { (eval echo "$as_me:6314: \"$ac_try\"") >&5
6315   (eval $ac_try) 2>&5
6316   ac_status=$?
6317   echo "$as_me:6317: \$? = $ac_status" >&5
6318   (exit "$ac_status"); }; }; then
6319   cf_cv_ldflags_search_paths_first=yes
6320 else
6321   echo "$as_me: failed program was:" >&5
6322 cat "conftest.$ac_ext" >&5
6323 cf_cv_ldflags_search_paths_first=no
6324 fi
6325 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6326                                 LDFLAGS=$cf_save_LDFLAGS
6327 fi
6328 echo "$as_me:6328: result: $cf_cv_ldflags_search_paths_first" >&5
6329 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6330                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6331                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6332                 fi
6333                 ;;
6334         (haiku*)
6335
6336         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6337         if test "$cf_cv_shlib_version" = rel; then
6338                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6339         else
6340                 cf_cv_shared_soname='`basename $@`'
6341         fi
6342
6343                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6344                 ;;
6345         (hpux[7-8]*)
6346                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6347                 if test "$GCC" != yes; then
6348                         CC_SHARED_OPTS='+Z'
6349                 fi
6350                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6351                 INSTALL_LIB="-m 555"
6352                 ;;
6353         (hpux*)
6354                 # (tested with gcc 2.7.2 -- I don't have c89)
6355                 if test "$GCC" = yes; then
6356                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6357                 else
6358                         CC_SHARED_OPTS='+Z'
6359                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6360                 fi
6361                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6362                 # HP-UX shared libraries must be executable, and should be
6363                 # readonly to exploit a quirk in the memory manager.
6364                 INSTALL_LIB="-m 555"
6365                 ;;
6366         (interix*)
6367                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6368                 if test "$cf_cv_shlib_version" = rel; then
6369                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6370                 else
6371                         cf_shared_soname='`basename $@`'
6372                 fi
6373                 CC_SHARED_OPTS=
6374                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6375                 ;;
6376         (irix*)
6377                 if test "$cf_cv_enable_rpath" = yes ; then
6378                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6379                 fi
6380                 # tested with IRIX 5.2 and 'cc'.
6381                 if test "$GCC" != yes; then
6382                         CC_SHARED_OPTS='-KPIC'
6383                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6384                 else
6385                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6386                 fi
6387                 cf_cv_rm_so_locs=yes
6388                 ;;
6389         (linux*|gnu*|k*bsd*-gnu)
6390                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6391                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6392                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6393                 fi
6394                 if test "$cf_cv_enable_rpath" = yes ; then
6395                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6396                 fi
6397
6398         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6399         if test "$cf_cv_shlib_version" = rel; then
6400                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6401         else
6402                 cf_cv_shared_soname='`basename $@`'
6403         fi
6404
6405                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6406                 ;;
6407         (mingw*msvc*)
6408                 cf_cv_shlib_version=msvcdll
6409                 cf_cv_shlib_version_infix=msvcdll
6410                 shlibdir=$bindir
6411                 MAKE_DLLS=
6412                 if test "$DFT_LWR_MODEL" = "shared" ; then
6413                         LOCAL_LDFLAGS="-link -dll"
6414                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6415                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6416                 fi
6417                 CC_SHARED_OPTS=
6418                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6419                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6420                 cat >mk_shared_lib.sh <<-CF_EOF
6421                 #!$SHELL
6422                 SHARED_LIB=\$1
6423                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6424                 shift
6425                 my_ld=\$1
6426                 shift
6427                 cat <<-EOF
6428                 Linking shared library
6429                 ** SHARED LIB \$SHARED_LIB
6430                 ** IMPORT_LIB \$IMPORT_LIB
6431 EOF
6432                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6433                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6434                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6435 CF_EOF
6436                 chmod +x mk_shared_lib.sh
6437                 cat >mk_prog.sh <<-CF_EOF
6438                 #!$SHELL
6439                 shift
6440                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6441                 LD="$LD"
6442                 clopts=()
6443                 ldopts=("/subsystem:console")
6444                 libs=()
6445                 isdll=0
6446                 while test \$# -gt 0; do
6447                         case "\$1" in
6448                                 -link)
6449                                         # ignore -link argument
6450                                         ;;
6451                                 -M[TD] | -M[TD]d)
6452                                         # ignore runtime-library option
6453                                         ;;
6454                                 -dll)
6455                                         isdll=1
6456                                         ;;
6457                                 -W* | -w*)
6458                                         # ignore warnings
6459                                         ;;
6460                                 -D*)
6461                                         clopts+=("\$1")
6462                                         ;;
6463                                 -I*)
6464                                         clopts+=("\$1")
6465                                         ;;
6466                                 -l*)
6467                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6468                                         ;;
6469                                 -L*)
6470                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6471                                         ;;
6472                                 *.obj | *.o)
6473                                         ldopts+=("\$1")
6474                                         ;;
6475                                 -Wl,*)
6476                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6477                                                 ldopts+=("\${linkarg}")
6478                                         done
6479                                         ;;
6480                                 *.lib)
6481                                         ldopts+=("\$1")
6482                                         ;;
6483                                 -o)
6484                                         shift
6485                                         ldopts+=("-out:\$1")
6486                                         ;;
6487                                 *)
6488                                         clopts+=("\$1")
6489                                         ldopts+=("\$1")
6490                                         ;;
6491                         esac
6492                         shift
6493                 done
6494                 if [ "\$isdll" -ne 0 ]; then
6495                         for lib in \${libs[*]}; do
6496                                 ldopts+=("\$lib.dll.lib")
6497                         done
6498                 else
6499                         for lib in \${libs[*]}; do
6500                                 ldopts+=("\$lib.lib")
6501                         done
6502                 fi
6503                 cat <<-EOF
6504                 Creating program
6505                 ** ld options:   "\${ldopts[@]}"
6506 EOF
6507                 exec \$LD \${ldopts[@]}
6508 CF_EOF
6509                 chmod +x mk_prog.sh
6510                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6511                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6512                 ;;
6513         (mingw*)
6514                 cf_cv_shlib_version=mingw
6515                 cf_cv_shlib_version_infix=mingw
6516                 shlibdir=$bindir
6517                 MAKE_DLLS=
6518                 if test "$DFT_LWR_MODEL" = "shared" ; then
6519                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6520                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6521                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6522                 fi
6523                 CC_SHARED_OPTS=
6524                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6525                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6526                 cat >mk_shared_lib.sh <<-CF_EOF
6527                 #!$SHELL
6528                 SHARED_LIB=\$1
6529                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6530                 shift
6531                 cat <<-EOF
6532                 Linking shared library
6533                 ** SHARED_LIB \$SHARED_LIB
6534                 ** IMPORT_LIB \$IMPORT_LIB
6535 EOF
6536                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6537 CF_EOF
6538                 chmod +x mk_shared_lib.sh
6539                 ;;
6540         (openbsd[2-9].*|mirbsd*)
6541                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6542                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6543                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6544                 fi
6545                 if test "$cf_cv_enable_rpath" = yes ; then
6546                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6547                 fi
6548                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6549
6550         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6551         if test "$cf_cv_shlib_version" = rel; then
6552                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6553         else
6554                 cf_cv_shared_soname='`basename $@`'
6555         fi
6556
6557                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6558                 ;;
6559         (nskJ*)
6560                 CC_SHARED_OPTS=
6561                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6562                 ;;
6563         (nskL*)
6564                 CC_SHARED_OPTS=
6565                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6566                 ;;
6567         (nto-qnx*|openbsd*|freebsd[12].*)
6568                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6569                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6570                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6571                 ;;
6572         (dragonfly*|freebsd*)
6573                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6574                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6575                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6576                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6577                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6578                 fi
6579
6580         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6581         if test "$cf_cv_shlib_version" = rel; then
6582                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6583         else
6584                 cf_cv_shared_soname='`basename $@`'
6585         fi
6586
6587                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6588                 ;;
6589         (netbsd*)
6590                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6591                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6592                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6593                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6594                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6595                         if test "$cf_cv_shlib_version" = auto; then
6596                         if test -f /usr/libexec/ld.elf_so; then
6597                                 cf_cv_shlib_version=abi
6598                         else
6599                                 cf_cv_shlib_version=rel
6600                         fi
6601                         fi
6602
6603         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6604         if test "$cf_cv_shlib_version" = rel; then
6605                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6606         else
6607                 cf_cv_shared_soname='`basename $@`'
6608         fi
6609
6610                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6611                 else
6612                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6613                 fi
6614                 ;;
6615         (osf*|mls+*)
6616                 # tested with OSF/1 V3.2 and 'cc'
6617                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6618                 # link with shared libs).
6619                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6620                 case "$host_os" in
6621                 (osf4*)
6622                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6623                         ;;
6624                 esac
6625                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6626                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6627                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6628                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6629                 fi
6630                 cf_cv_rm_so_locs=yes
6631                 ;;
6632         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6633                 # tested with osr5.0.5
6634                 if test "$GCC" != yes; then
6635                         CC_SHARED_OPTS='-belf -KPIC'
6636                 fi
6637                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6638                 if test "$cf_cv_enable_rpath" = yes ; then
6639                         # only way is to set LD_RUN_PATH but no switch for it
6640                         RUN_PATH=$libdir
6641                 fi
6642                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6643                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6644                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6645                 ;;
6646         (sunos4*)
6647                 # tested with SunOS 4.1.1 and gcc 2.7.0
6648                 if test "$GCC" != yes; then
6649                         CC_SHARED_OPTS='-KPIC'
6650                 fi
6651                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6652                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6653                 ;;
6654         (solaris2*)
6655                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6656                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6657                 if test "$DFT_LWR_MODEL" = "shared" ; then
6658                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6659                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6660                 fi
6661                 if test "$cf_cv_enable_rpath" = yes ; then
6662                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6663                 fi
6664
6665         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6666         if test "$cf_cv_shlib_version" = rel; then
6667                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6668         else
6669                 cf_cv_shared_soname='`basename $@`'
6670         fi
6671
6672                 if test "$GCC" != yes; then
6673                         cf_save_CFLAGS="$CFLAGS"
6674                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6675                         do
6676                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6677                                 cat >"conftest.$ac_ext" <<_ACEOF
6678 #line 6678 "configure"
6679 #include "confdefs.h"
6680 #include <stdio.h>
6681 int
6682 main (void)
6683 {
6684 printf("Hello\\n");
6685   ;
6686   return 0;
6687 }
6688 _ACEOF
6689 rm -f "conftest.$ac_objext"
6690 if { (eval echo "$as_me:6690: \"$ac_compile\"") >&5
6691   (eval $ac_compile) 2>&5
6692   ac_status=$?
6693   echo "$as_me:6693: \$? = $ac_status" >&5
6694   (exit "$ac_status"); } &&
6695          { ac_try='test -s "conftest.$ac_objext"'
6696   { (eval echo "$as_me:6696: \"$ac_try\"") >&5
6697   (eval $ac_try) 2>&5
6698   ac_status=$?
6699   echo "$as_me:6699: \$? = $ac_status" >&5
6700   (exit "$ac_status"); }; }; then
6701   break
6702 else
6703   echo "$as_me: failed program was:" >&5
6704 cat "conftest.$ac_ext" >&5
6705 fi
6706 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6707                         done
6708                         CFLAGS="$cf_save_CFLAGS"
6709                         CC_SHARED_OPTS=$cf_shared_opts
6710                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6711                 else
6712                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6713                 fi
6714                 ;;
6715         (sysv5uw7*|unix_sv*)
6716                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6717                 if test "$GCC" != yes; then
6718                         CC_SHARED_OPTS='-KPIC'
6719                 fi
6720                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6721                 ;;
6722         (*)
6723                 CC_SHARED_OPTS='unknown'
6724                 MK_SHARED_LIB='echo unknown'
6725                 ;;
6726         esac
6727
6728         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6729         case "$cf_cv_shlib_version" in
6730         (rel|abi)
6731                 case "$MK_SHARED_LIB" in
6732                 (*'-o $@')
6733                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6734                         ;;
6735                 (*)
6736                         { echo "$as_me:6736: WARNING: ignored --with-shlib-version" >&5
6737 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6738                         ;;
6739                 esac
6740                 ;;
6741         esac
6742
6743         if test -n "$cf_try_cflags"
6744         then
6745 cat > conftest.$ac_ext <<EOF
6746 #line 6746 "${as_me:-configure}"
6747 #include <stdio.h>
6748 int main(int argc, char *argv[])
6749 {
6750         printf("hello\\n");
6751         return (argv[argc-1] == 0) ;
6752 }
6753 EOF
6754                 cf_save_CFLAGS="$CFLAGS"
6755                 for cf_opt in $cf_try_cflags
6756                 do
6757                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6758                         echo "$as_me:6758: checking if CFLAGS option -$cf_opt works" >&5
6759 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6760                         if { (eval echo "$as_me:6760: \"$ac_compile\"") >&5
6761   (eval $ac_compile) 2>&5
6762   ac_status=$?
6763   echo "$as_me:6763: \$? = $ac_status" >&5
6764   (exit "$ac_status"); }; then
6765                                 echo "$as_me:6765: result: yes" >&5
6766 echo "${ECHO_T}yes" >&6
6767                                 cf_save_CFLAGS="$CFLAGS"
6768                         else
6769                                 echo "$as_me:6769: result: no" >&5
6770 echo "${ECHO_T}no" >&6
6771                         fi
6772                 done
6773                 CFLAGS="$cf_save_CFLAGS"
6774         fi
6775
6776         # RPATH_LIST is a colon-separated list of directories
6777         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6778         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6779
6780         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6781
6782         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6783
6784 echo "${as_me:-configure}:6784: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6785
6786         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6787
6788 echo "${as_me:-configure}:6788: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6789
6790 for model in $cf_list_models ; do
6791         case "$model" in
6792         (libtool)
6793
6794 echo "$as_me:6794: checking for additional libtool options" >&5
6795 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6796
6797 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6798 if test "${with_libtool_opts+set}" = set; then
6799   withval="$with_libtool_opts"
6800   with_libtool_opts=$withval
6801 else
6802   with_libtool_opts=no
6803 fi;
6804 echo "$as_me:6804: result: $with_libtool_opts" >&5
6805 echo "${ECHO_T}$with_libtool_opts" >&6
6806
6807 case .$with_libtool_opts in
6808 (.yes|.no|.)
6809         ;;
6810 (*)
6811         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6812         ;;
6813 esac
6814
6815 echo "$as_me:6815: checking if exported-symbols file should be used" >&5
6816 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6817
6818 # Check whether --with-export-syms or --without-export-syms was given.
6819 if test "${with_export_syms+set}" = set; then
6820   withval="$with_export_syms"
6821   with_export_syms=$withval
6822 else
6823   with_export_syms=no
6824 fi;
6825 if test "x$with_export_syms" = xyes
6826 then
6827         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6828
6829 fi
6830 echo "$as_me:6830: result: $with_export_syms" >&5
6831 echo "${ECHO_T}$with_export_syms" >&6
6832 if test "x$with_export_syms" != xno
6833 then
6834         EXPORT_SYMS="-export-symbols $with_export_syms"
6835
6836 fi
6837
6838                 ;;
6839         (shared)
6840                 if test "$CC_SHARED_OPTS" = "unknown"; then
6841                         { { echo "$as_me:6841: error: Shared libraries are not supported in this version" >&5
6842 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6843    { (exit 1); exit 1; }; }
6844                 fi
6845                 # workaround for inept transition to PIE vs PIC...
6846                 echo "$as_me:6846: checking if current CFLAGS link properly" >&5
6847 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6848                 cat >"conftest.$ac_ext" <<_ACEOF
6849 #line 6849 "configure"
6850 #include "confdefs.h"
6851 #include <stdio.h>
6852 int
6853 main (void)
6854 {
6855 printf("Hello work\\n");
6856   ;
6857   return 0;
6858 }
6859 _ACEOF
6860 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6861 if { (eval echo "$as_me:6861: \"$ac_link\"") >&5
6862   (eval $ac_link) 2>&5
6863   ac_status=$?
6864   echo "$as_me:6864: \$? = $ac_status" >&5
6865   (exit "$ac_status"); } &&
6866          { ac_try='test -s "conftest$ac_exeext"'
6867   { (eval echo "$as_me:6867: \"$ac_try\"") >&5
6868   (eval $ac_try) 2>&5
6869   ac_status=$?
6870   echo "$as_me:6870: \$? = $ac_status" >&5
6871   (exit "$ac_status"); }; }; then
6872   cf_cflags_work=yes
6873 else
6874   echo "$as_me: failed program was:" >&5
6875 cat "conftest.$ac_ext" >&5
6876 cf_cflags_work=no
6877 fi
6878 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6879                 echo "$as_me:6879: result: $cf_cflags_work" >&5
6880 echo "${ECHO_T}$cf_cflags_work" >&6
6881                 if test "$cf_cflags_work" = no
6882                 then
6883                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6884
6885 echo "${as_me:-configure}:6885: testing try to work around by appending shared-options ..." 1>&5
6886
6887                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6888                 fi
6889
6890 echo "$as_me:6890: checking if versioned-symbols file should be used" >&5
6891 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6892
6893 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6894 if test "${with_versioned_syms+set}" = set; then
6895   withval="$with_versioned_syms"
6896   with_versioned_syms=$withval
6897 else
6898   with_versioned_syms=no
6899 fi;
6900 case "x$with_versioned_syms" in
6901 (xyes)
6902         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6903
6904         ;;
6905 (xno)
6906         ;;
6907 (x/*)
6908         test -f "$with_versioned_syms" || { { echo "$as_me:6908: error: expected a filename: $with_versioned_syms" >&5
6909 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6910    { (exit 1); exit 1; }; }
6911         ;;
6912 (*)
6913         test -f "$with_versioned_syms" || { { echo "$as_me:6913: error: expected a filename: $with_versioned_syms" >&5
6914 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6915    { (exit 1); exit 1; }; }
6916         with_versioned_syms=`pwd`/"$with_versioned_syms"
6917         ;;
6918 esac
6919 echo "$as_me:6919: result: $with_versioned_syms" >&5
6920 echo "${ECHO_T}$with_versioned_syms" >&6
6921
6922 RESULTING_SYMS=
6923 VERSIONED_SYMS=
6924 WILDCARD_SYMS=
6925
6926 if test "x$with_versioned_syms" != xno
6927 then
6928         RESULTING_SYMS=$with_versioned_syms
6929         case "x$MK_SHARED_LIB" in
6930         (*-Wl,*)
6931                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6932                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6933                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6934
6935 echo "${as_me:-configure}:6935: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6936
6937                 ;;
6938         (*-dy\ *)
6939                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6940                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6941                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6942
6943 echo "${as_me:-configure}:6943: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6944
6945                 ;;
6946         (*)
6947                 { echo "$as_me:6947: WARNING: this system does not support versioned-symbols" >&5
6948 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6949                 ;;
6950         esac
6951
6952         # Linux ld can selectively override scope, e.g., of symbols beginning with
6953         # "_" by first declaring some as global, and then using a wildcard to
6954         # declare the others as local.  Some other loaders cannot do this.  Check
6955         # by constructing a (very) simple shared library and inspecting its
6956         # symbols.
6957         if test "x$VERSIONED_SYMS" != "x"
6958         then
6959                 echo "$as_me:6959: checking if wildcards can be used to selectively omit symbols" >&5
6960 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6961                 WILDCARD_SYMS=no
6962
6963                 # make sources
6964                 rm -f conftest.*
6965
6966                 cat >conftest.ver <<EOF
6967 module_1.0 {
6968 global:
6969         globalf1;
6970 local:
6971         localf1;
6972 };
6973 module_2.0 {
6974 global:
6975         globalf2;
6976 local:
6977         localf2;
6978         _*;
6979 } module_1.0;
6980 submodule_1.0 {
6981 global:
6982         subglobalf1;
6983         _ismissing;
6984 local:
6985         sublocalf1;
6986 };
6987 submodule_2.0 {
6988 global:
6989         subglobalf2;
6990 local:
6991         sublocalf2;
6992         _*;
6993 } submodule_1.0;
6994 EOF
6995                 cat >conftest.$ac_ext <<EOF
6996 #line 6996 "configure"
6997 int     _ismissing(void) { return 1; }
6998 int     _localf1(void) { return 1; }
6999 int     _localf2(void) { return 2; }
7000 int     globalf1(void) { return 1; }
7001 int     globalf2(void) { return 2; }
7002 int     _sublocalf1(void) { return 1; }
7003 int     _sublocalf2(void) { return 2; }
7004 int     subglobalf1(void) { return 1; }
7005 int     subglobalf2(void) { return 2; }
7006 EOF
7007                 cat >conftest.mk <<EOF
7008 CC=${CC}
7009 CFLAGS=${CFLAGS}
7010 CPPFLAGS=${CPPFLAGS}
7011 LDFLAGS=${LDFLAGS}
7012 LIBS=${LIBS}
7013 VERSIONED_SYMS=${VERSIONED_SYMS}
7014 RESULTING_SYMS=conftest.ver
7015 MK_SHARED_LIB=${MK_SHARED_LIB}
7016 conftest.so: conftest.$ac_cv_objext
7017                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
7018 EOF
7019
7020                 # compile source, make library
7021                 if make -f conftest.mk 2>&5 >/dev/null
7022                 then
7023                         # test for missing symbol in either Data or Text section
7024                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
7025                         test -n "$cf_missing" && WILDCARD_SYMS=yes
7026                 fi
7027                 echo "$as_me:7027: result: $WILDCARD_SYMS" >&5
7028 echo "${ECHO_T}$WILDCARD_SYMS" >&6
7029                 rm -f conftest.*
7030         fi
7031 fi
7032
7033                 ;;
7034         esac
7035 done
7036
7037 ### Checks for special libraries, must be done up-front.
7038 SHLIB_LIST=""
7039
7040 echo "$as_me:7040: checking if you want to link with the GPM mouse library" >&5
7041 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
7042
7043 # Check whether --with-gpm or --without-gpm was given.
7044 if test "${with_gpm+set}" = set; then
7045   withval="$with_gpm"
7046   with_gpm=$withval
7047 else
7048   with_gpm=maybe
7049 fi;
7050 echo "$as_me:7050: result: $with_gpm" >&5
7051 echo "${ECHO_T}$with_gpm" >&6
7052
7053 if test "$with_gpm" != no ; then
7054         echo "$as_me:7054: checking for gpm.h" >&5
7055 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7056 if test "${ac_cv_header_gpm_h+set}" = set; then
7057   echo $ECHO_N "(cached) $ECHO_C" >&6
7058 else
7059   cat >"conftest.$ac_ext" <<_ACEOF
7060 #line 7060 "configure"
7061 #include "confdefs.h"
7062 #include <gpm.h>
7063 _ACEOF
7064 if { (eval echo "$as_me:7064: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7065   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7066   ac_status=$?
7067   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7068   rm -f conftest.er1
7069   cat conftest.err >&5
7070   echo "$as_me:7070: \$? = $ac_status" >&5
7071   (exit "$ac_status"); } >/dev/null; then
7072   if test -s conftest.err; then
7073     ac_cpp_err=$ac_c_preproc_warn_flag
7074   else
7075     ac_cpp_err=
7076   fi
7077 else
7078   ac_cpp_err=yes
7079 fi
7080 if test -z "$ac_cpp_err"; then
7081   ac_cv_header_gpm_h=yes
7082 else
7083   echo "$as_me: failed program was:" >&5
7084   cat "conftest.$ac_ext" >&5
7085   ac_cv_header_gpm_h=no
7086 fi
7087 rm -f conftest.err "conftest.$ac_ext"
7088 fi
7089 echo "$as_me:7089: result: $ac_cv_header_gpm_h" >&5
7090 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7091 if test "$ac_cv_header_gpm_h" = yes; then
7092
7093 cat >>confdefs.h <<\EOF
7094 #define HAVE_GPM_H 1
7095 EOF
7096
7097                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7098                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7099
7100 echo "${as_me:-configure}:7100: testing assuming we really have GPM library ..." 1>&5
7101
7102 cat >>confdefs.h <<\EOF
7103 #define HAVE_LIBGPM 1
7104 EOF
7105
7106                         with_gpm=yes
7107                 else
7108                         echo "$as_me:7108: checking for Gpm_Open in -lgpm" >&5
7109 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7110 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7111   echo $ECHO_N "(cached) $ECHO_C" >&6
7112 else
7113   ac_check_lib_save_LIBS=$LIBS
7114 LIBS="-lgpm  $LIBS"
7115 cat >"conftest.$ac_ext" <<_ACEOF
7116 #line 7116 "configure"
7117 #include "confdefs.h"
7118
7119 /* Override any gcc2 internal prototype to avoid an error.  */
7120 #ifdef __cplusplus
7121 extern "C"
7122 #endif
7123 /* We use char because int might match the return type of a gcc2
7124    builtin and then its argument prototype would still apply.  */
7125 char Gpm_Open ();
7126 int
7127 main (void)
7128 {
7129 Gpm_Open ();
7130   ;
7131   return 0;
7132 }
7133 _ACEOF
7134 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7135 if { (eval echo "$as_me:7135: \"$ac_link\"") >&5
7136   (eval $ac_link) 2>&5
7137   ac_status=$?
7138   echo "$as_me:7138: \$? = $ac_status" >&5
7139   (exit "$ac_status"); } &&
7140          { ac_try='test -s "conftest$ac_exeext"'
7141   { (eval echo "$as_me:7141: \"$ac_try\"") >&5
7142   (eval $ac_try) 2>&5
7143   ac_status=$?
7144   echo "$as_me:7144: \$? = $ac_status" >&5
7145   (exit "$ac_status"); }; }; then
7146   ac_cv_lib_gpm_Gpm_Open=yes
7147 else
7148   echo "$as_me: failed program was:" >&5
7149 cat "conftest.$ac_ext" >&5
7150 ac_cv_lib_gpm_Gpm_Open=no
7151 fi
7152 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7153 LIBS=$ac_check_lib_save_LIBS
7154 fi
7155 echo "$as_me:7155: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7156 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7157 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7158   with_gpm=yes
7159 else
7160
7161                                 if test "$with_gpm" = maybe; then
7162                                         { echo "$as_me:7162: WARNING: Cannot link with GPM library" >&5
7163 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7164                                         with_gpm=no
7165                                 else
7166                                         { { echo "$as_me:7166: error: Cannot link with GPM library" >&5
7167 echo "$as_me: error: Cannot link with GPM library" >&2;}
7168    { (exit 1); exit 1; }; }
7169                                 fi
7170
7171 fi
7172
7173                 fi
7174
7175 else
7176
7177                 test "$with_gpm" != maybe && { echo "$as_me:7177: WARNING: Cannot find GPM header" >&5
7178 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7179                 with_gpm=no
7180
7181 fi
7182
7183 fi
7184
7185 if test "$with_gpm" != no ; then
7186         echo "$as_me:7186: checking if you want to load GPM dynamically" >&5
7187 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7188
7189 # Check whether --with-dlsym or --without-dlsym was given.
7190 if test "${with_dlsym+set}" = set; then
7191   withval="$with_dlsym"
7192   with_dlsym=$withval
7193 else
7194   with_dlsym=yes
7195 fi;
7196         echo "$as_me:7196: result: $with_dlsym" >&5
7197 echo "${ECHO_T}$with_dlsym" >&6
7198         if test "x$with_dlsym" = xyes ; then
7199
7200 cf_have_dlsym=no
7201 echo "$as_me:7201: checking for dlsym" >&5
7202 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7203 if test "${ac_cv_func_dlsym+set}" = set; then
7204   echo $ECHO_N "(cached) $ECHO_C" >&6
7205 else
7206   cat >"conftest.$ac_ext" <<_ACEOF
7207 #line 7207 "configure"
7208 #include "confdefs.h"
7209 #define dlsym autoconf_temporary
7210 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7211 #undef dlsym
7212
7213 #ifdef __cplusplus
7214 extern "C"
7215 #endif
7216
7217 /* We use char because int might match the return type of a gcc2
7218    builtin and then its argument prototype would still apply.  */
7219 char dlsym (void);
7220
7221 int
7222 main (void)
7223 {
7224
7225 /* The GNU C library defines stubs for functions which it implements
7226     to always fail with ENOSYS.  Some functions are actually named
7227     something starting with __ and the normal name is an alias.  */
7228 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7229 #error found stub for dlsym
7230 #endif
7231
7232         return dlsym ();
7233   ;
7234   return 0;
7235 }
7236 _ACEOF
7237 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7238 if { (eval echo "$as_me:7238: \"$ac_link\"") >&5
7239   (eval $ac_link) 2>&5
7240   ac_status=$?
7241   echo "$as_me:7241: \$? = $ac_status" >&5
7242   (exit "$ac_status"); } &&
7243          { ac_try='test -s "conftest$ac_exeext"'
7244   { (eval echo "$as_me:7244: \"$ac_try\"") >&5
7245   (eval $ac_try) 2>&5
7246   ac_status=$?
7247   echo "$as_me:7247: \$? = $ac_status" >&5
7248   (exit "$ac_status"); }; }; then
7249   ac_cv_func_dlsym=yes
7250 else
7251   echo "$as_me: failed program was:" >&5
7252 cat "conftest.$ac_ext" >&5
7253 ac_cv_func_dlsym=no
7254 fi
7255 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7256 fi
7257 echo "$as_me:7257: result: $ac_cv_func_dlsym" >&5
7258 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7259 if test "$ac_cv_func_dlsym" = yes; then
7260   cf_have_dlsym=yes
7261 else
7262
7263 cf_have_libdl=no
7264 echo "$as_me:7264: checking for dlsym in -ldl" >&5
7265 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7266 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7267   echo $ECHO_N "(cached) $ECHO_C" >&6
7268 else
7269   ac_check_lib_save_LIBS=$LIBS
7270 LIBS="-ldl  $LIBS"
7271 cat >"conftest.$ac_ext" <<_ACEOF
7272 #line 7272 "configure"
7273 #include "confdefs.h"
7274
7275 /* Override any gcc2 internal prototype to avoid an error.  */
7276 #ifdef __cplusplus
7277 extern "C"
7278 #endif
7279 /* We use char because int might match the return type of a gcc2
7280    builtin and then its argument prototype would still apply.  */
7281 char dlsym ();
7282 int
7283 main (void)
7284 {
7285 dlsym ();
7286   ;
7287   return 0;
7288 }
7289 _ACEOF
7290 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7291 if { (eval echo "$as_me:7291: \"$ac_link\"") >&5
7292   (eval $ac_link) 2>&5
7293   ac_status=$?
7294   echo "$as_me:7294: \$? = $ac_status" >&5
7295   (exit "$ac_status"); } &&
7296          { ac_try='test -s "conftest$ac_exeext"'
7297   { (eval echo "$as_me:7297: \"$ac_try\"") >&5
7298   (eval $ac_try) 2>&5
7299   ac_status=$?
7300   echo "$as_me:7300: \$? = $ac_status" >&5
7301   (exit "$ac_status"); }; }; then
7302   ac_cv_lib_dl_dlsym=yes
7303 else
7304   echo "$as_me: failed program was:" >&5
7305 cat "conftest.$ac_ext" >&5
7306 ac_cv_lib_dl_dlsym=no
7307 fi
7308 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7309 LIBS=$ac_check_lib_save_LIBS
7310 fi
7311 echo "$as_me:7311: result: $ac_cv_lib_dl_dlsym" >&5
7312 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7313 if test "$ac_cv_lib_dl_dlsym" = yes; then
7314
7315         cf_have_dlsym=yes
7316         cf_have_libdl=yes
7317 fi
7318
7319 fi
7320
7321 if test "$cf_have_dlsym" = yes ; then
7322         test "$cf_have_libdl" = yes && {
7323 cf_add_libs="$LIBS"
7324 # reverse order
7325 cf_add_0lib=
7326 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7327 # filter duplicates
7328 for cf_add_1lib in $cf_add_0lib; do
7329         for cf_add_2lib in $cf_add_libs; do
7330                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7331                         cf_add_1lib=
7332                         break
7333                 fi
7334         done
7335         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7336 done
7337 LIBS="$cf_add_libs"
7338  }
7339
7340         echo "$as_me:7340: checking whether able to link to dl*() functions" >&5
7341 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7342         cat >"conftest.$ac_ext" <<_ACEOF
7343 #line 7343 "configure"
7344 #include "confdefs.h"
7345 #include <dlfcn.h>
7346 int
7347 main (void)
7348 {
7349
7350                 void *obj;
7351                 if ((obj = dlopen("filename", 0)) != 0) {
7352                         if (dlsym(obj, "symbolname") == 0) {
7353                         dlclose(obj);
7354                         }
7355                 }
7356   ;
7357   return 0;
7358 }
7359 _ACEOF
7360 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7361 if { (eval echo "$as_me:7361: \"$ac_link\"") >&5
7362   (eval $ac_link) 2>&5
7363   ac_status=$?
7364   echo "$as_me:7364: \$? = $ac_status" >&5
7365   (exit "$ac_status"); } &&
7366          { ac_try='test -s "conftest$ac_exeext"'
7367   { (eval echo "$as_me:7367: \"$ac_try\"") >&5
7368   (eval $ac_try) 2>&5
7369   ac_status=$?
7370   echo "$as_me:7370: \$? = $ac_status" >&5
7371   (exit "$ac_status"); }; }; then
7372
7373 cat >>confdefs.h <<\EOF
7374 #define HAVE_LIBDL 1
7375 EOF
7376
7377 else
7378   echo "$as_me: failed program was:" >&5
7379 cat "conftest.$ac_ext" >&5
7380
7381                 { { echo "$as_me:7381: error: Cannot link test program for libdl" >&5
7382 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7383    { (exit 1); exit 1; }; }
7384 fi
7385 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7386         echo "$as_me:7386: result: ok" >&5
7387 echo "${ECHO_T}ok" >&6
7388 else
7389         { { echo "$as_me:7389: error: Cannot find dlsym function" >&5
7390 echo "$as_me: error: Cannot find dlsym function" >&2;}
7391    { (exit 1); exit 1; }; }
7392 fi
7393
7394                 if test "x$with_gpm" != xyes ; then
7395                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7396
7397 echo "${as_me:-configure}:7397: testing assuming soname for gpm is $with_gpm ..." 1>&5
7398
7399                         cf_cv_gpm_soname="$with_gpm"
7400                 else
7401
7402 echo "$as_me:7402: checking for soname of gpm library" >&5
7403 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7404 if test "${cf_cv_gpm_soname+set}" = set; then
7405   echo $ECHO_N "(cached) $ECHO_C" >&6
7406 else
7407
7408 cf_cv_gpm_soname=unknown
7409 if test "$cross_compiling" != yes ; then
7410 cat >conftest.$ac_ext <<CF_EOF
7411 #include <gpm.h>
7412 int main(void)
7413 {
7414 if (Gpm_Open(0,0)) Gpm_Close();
7415         ${cf_cv_main_return:-return}(0);
7416 }
7417 CF_EOF
7418 cf_save_LIBS="$LIBS"
7419
7420 cf_add_libs="$LIBS"
7421 # reverse order
7422 cf_add_0lib=
7423 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7424 # filter duplicates
7425 for cf_add_1lib in $cf_add_0lib; do
7426         for cf_add_2lib in $cf_add_libs; do
7427                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7428                         cf_add_1lib=
7429                         break
7430                 fi
7431         done
7432         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7433 done
7434 LIBS="$cf_add_libs"
7435
7436         if { (eval echo "$as_me:7436: \"$ac_compile\"") >&5
7437   (eval $ac_compile) 2>&5
7438   ac_status=$?
7439   echo "$as_me:7439: \$? = $ac_status" >&5
7440   (exit "$ac_status"); } ; then
7441                 if { (eval echo "$as_me:7441: \"$ac_link\"") >&5
7442   (eval $ac_link) 2>&5
7443   ac_status=$?
7444   echo "$as_me:7444: \$? = $ac_status" >&5
7445   (exit "$ac_status"); } ; then
7446                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7447                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7448                 fi
7449         fi
7450 rm -rf ./conftest*
7451 LIBS="$cf_save_LIBS"
7452 fi
7453
7454 fi
7455 echo "$as_me:7455: result: $cf_cv_gpm_soname" >&5
7456 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7457
7458                 fi
7459                 test "$cf_cv_gpm_soname" != "unknown" &&
7460 cat >>confdefs.h <<EOF
7461 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7462 EOF
7463
7464                 SHLIB_LIST="-ldl $SHLIB_LIST"
7465
7466 cf_add_libs="$PRIVATE_LIBS"
7467 # reverse order
7468 cf_add_0lib=
7469 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7470 # filter duplicates
7471 for cf_add_1lib in $cf_add_0lib; do
7472         for cf_add_2lib in $cf_add_libs; do
7473                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7474                         cf_add_1lib=
7475                         break
7476                 fi
7477         done
7478         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7479 done
7480 PRIVATE_LIBS="$cf_add_libs"
7481
7482         else
7483                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7484
7485 cf_add_libs="$TEST_LIBS"
7486 # reverse order
7487 cf_add_0lib=
7488 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7489 # filter duplicates
7490 for cf_add_1lib in $cf_add_0lib; do
7491         for cf_add_2lib in $cf_add_libs; do
7492                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7493                         cf_add_1lib=
7494                         break
7495                 fi
7496         done
7497         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7498 done
7499 TEST_LIBS="$cf_add_libs"
7500
7501 cf_add_libs="$PRIVATE_LIBS"
7502 # reverse order
7503 cf_add_0lib=
7504 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7505 # filter duplicates
7506 for cf_add_1lib in $cf_add_0lib; do
7507         for cf_add_2lib in $cf_add_libs; do
7508                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7509                         cf_add_1lib=
7510                         break
7511                 fi
7512         done
7513         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7514 done
7515 PRIVATE_LIBS="$cf_add_libs"
7516
7517         fi
7518
7519 cat >>confdefs.h <<\EOF
7520 #define HAVE_LIBGPM 1
7521 EOF
7522
7523 echo "$as_me:7523: checking for Gpm_Wgetch in -lgpm" >&5
7524 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7525 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7526   echo $ECHO_N "(cached) $ECHO_C" >&6
7527 else
7528   ac_check_lib_save_LIBS=$LIBS
7529 LIBS="-lgpm  $LIBS"
7530 cat >"conftest.$ac_ext" <<_ACEOF
7531 #line 7531 "configure"
7532 #include "confdefs.h"
7533
7534 /* Override any gcc2 internal prototype to avoid an error.  */
7535 #ifdef __cplusplus
7536 extern "C"
7537 #endif
7538 /* We use char because int might match the return type of a gcc2
7539    builtin and then its argument prototype would still apply.  */
7540 char Gpm_Wgetch ();
7541 int
7542 main (void)
7543 {
7544 Gpm_Wgetch ();
7545   ;
7546   return 0;
7547 }
7548 _ACEOF
7549 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7550 if { (eval echo "$as_me:7550: \"$ac_link\"") >&5
7551   (eval $ac_link) 2>&5
7552   ac_status=$?
7553   echo "$as_me:7553: \$? = $ac_status" >&5
7554   (exit "$ac_status"); } &&
7555          { ac_try='test -s "conftest$ac_exeext"'
7556   { (eval echo "$as_me:7556: \"$ac_try\"") >&5
7557   (eval $ac_try) 2>&5
7558   ac_status=$?
7559   echo "$as_me:7559: \$? = $ac_status" >&5
7560   (exit "$ac_status"); }; }; then
7561   ac_cv_lib_gpm_Gpm_Wgetch=yes
7562 else
7563   echo "$as_me: failed program was:" >&5
7564 cat "conftest.$ac_ext" >&5
7565 ac_cv_lib_gpm_Gpm_Wgetch=no
7566 fi
7567 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7568 LIBS=$ac_check_lib_save_LIBS
7569 fi
7570 echo "$as_me:7570: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7571 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7572 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7573
7574 echo "$as_me:7574: checking if GPM is weakly bound to curses library" >&5
7575 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7576 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7577   echo $ECHO_N "(cached) $ECHO_C" >&6
7578 else
7579
7580 cf_cv_check_gpm_wgetch=unknown
7581 if test "$cross_compiling" != yes ; then
7582
7583 cat >conftest.$ac_ext <<CF_EOF
7584 #include <gpm.h>
7585 int main(void)
7586 {
7587         Gpm_Wgetch();
7588         ${cf_cv_main_return:-return}(0);
7589 }
7590 CF_EOF
7591
7592         cf_save_LIBS="$LIBS"
7593         # This only works if we can look at the symbol table.  If a shared
7594         # library is stripped for install, we cannot use that.  So we're forced
7595         # to rely on the static library, noting that some packagers may not
7596         # include it.
7597         LIBS="-static -lgpm -dynamic $LIBS"
7598         if { (eval echo "$as_me:7598: \"$ac_compile\"") >&5
7599   (eval $ac_compile) 2>&5
7600   ac_status=$?
7601   echo "$as_me:7601: \$? = $ac_status" >&5
7602   (exit "$ac_status"); } ; then
7603                 if { (eval echo "$as_me:7603: \"$ac_link\"") >&5
7604   (eval $ac_link) 2>&5
7605   ac_status=$?
7606   echo "$as_me:7606: \$? = $ac_status" >&5
7607   (exit "$ac_status"); } ; then
7608                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7609                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7610                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7611                 fi
7612         fi
7613         rm -rf ./conftest*
7614         LIBS="$cf_save_LIBS"
7615 fi
7616
7617 fi
7618 echo "$as_me:7618: result: $cf_cv_check_gpm_wgetch" >&5
7619 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7620
7621 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7622         { echo "$as_me:7622: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7623 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7624 fi
7625
7626 fi
7627
7628 fi
7629
7630 echo "$as_me:7630: checking if you want to use PCRE2 for regular-expressions" >&5
7631 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7632
7633 # Check whether --with-pcre2 or --without-pcre2 was given.
7634 if test "${with_pcre2+set}" = set; then
7635   withval="$with_pcre2"
7636
7637 fi;
7638 test -z "$with_pcre2" && with_pcre2=no
7639 echo "$as_me:7639: result: $with_pcre2" >&5
7640 echo "${ECHO_T}$with_pcre2" >&6
7641
7642 if test "x$with_pcre2" != xno ; then
7643         cf_with_pcre2_ok=no
7644         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7645         do
7646
7647 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7648         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7649
7650 echo "${as_me:-configure}:7650: testing found package $cf_with_pcre2 ..." 1>&5
7651
7652         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7653         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7654         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7655
7656 echo "${as_me:-configure}:7656: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7657
7658         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7659
7660 echo "${as_me:-configure}:7660: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7661
7662 cf_fix_cppflags=no
7663 cf_new_cflags=
7664 cf_new_cppflags=
7665 cf_new_extra_cppflags=
7666
7667 for cf_add_cflags in $cf_pkgconfig_incs
7668 do
7669 case "$cf_fix_cppflags" in
7670 (no)
7671         case "$cf_add_cflags" in
7672         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7673                 case "$cf_add_cflags" in
7674                 (-D*)
7675                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7676
7677                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7678                                 && test -z "${cf_tst_cflags}" \
7679                                 && cf_fix_cppflags=yes
7680
7681                         if test "$cf_fix_cppflags" = yes ; then
7682
7683         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7684         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7685
7686                                 continue
7687                         elif test "${cf_tst_cflags}" = "\"'" ; then
7688
7689         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7690         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7691
7692                                 continue
7693                         fi
7694                         ;;
7695                 esac
7696                 case "$CPPFLAGS" in
7697                 (*$cf_add_cflags)
7698                         ;;
7699                 (*)
7700                         case "$cf_add_cflags" in
7701                         (-D*)
7702                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7703
7704 CPPFLAGS=`echo "$CPPFLAGS" | \
7705         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7706                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7707
7708                                 ;;
7709                         esac
7710
7711         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7712         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7713
7714                         ;;
7715                 esac
7716                 ;;
7717         (*)
7718
7719         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7720         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7721
7722                 ;;
7723         esac
7724         ;;
7725 (yes)
7726
7727         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7728         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7729
7730         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7731
7732         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7733                 && test -z "${cf_tst_cflags}" \
7734                 && cf_fix_cppflags=no
7735         ;;
7736 esac
7737 done
7738
7739 if test -n "$cf_new_cflags" ; then
7740
7741         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7742         CFLAGS="${CFLAGS}$cf_new_cflags"
7743
7744 fi
7745
7746 if test -n "$cf_new_cppflags" ; then
7747
7748         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7749         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7750
7751 fi
7752
7753 if test -n "$cf_new_extra_cppflags" ; then
7754
7755         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7756         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7757
7758 fi
7759
7760 cf_add_libs="$LIBS"
7761 # reverse order
7762 cf_add_0lib=
7763 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7764 # filter duplicates
7765 for cf_add_1lib in $cf_add_0lib; do
7766         for cf_add_2lib in $cf_add_libs; do
7767                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7768                         cf_add_1lib=
7769                         break
7770                 fi
7771         done
7772         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7773 done
7774 LIBS="$cf_add_libs"
7775
7776         cf_with_pcre2_ok=yes; break
7777 else
7778         cf_pkgconfig_incs=
7779         cf_pkgconfig_libs=
7780         :
7781 fi
7782
7783         done
7784         cf_with_pcre2_ok=yes || { { echo "$as_me:7784: error: Cannot find PCRE2 library" >&5
7785 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7786    { (exit 1); exit 1; }; }
7787
7788 cat >>confdefs.h <<\EOF
7789 #define HAVE_LIB_PCRE2 1
7790 EOF
7791
7792         # if pkgconfig gave no results, look for the libraries directly
7793         case "$LIBS" in
7794         (*pcre2-posix*|*pcreposix*)
7795                 ;;
7796         (*)
7797                 echo "$as_me:7797: checking for regcomp in -lpcre2-posix" >&5
7798 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7799 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7800   echo $ECHO_N "(cached) $ECHO_C" >&6
7801 else
7802   ac_check_lib_save_LIBS=$LIBS
7803 LIBS="-lpcre2-posix  $LIBS"
7804 cat >"conftest.$ac_ext" <<_ACEOF
7805 #line 7805 "configure"
7806 #include "confdefs.h"
7807
7808 /* Override any gcc2 internal prototype to avoid an error.  */
7809 #ifdef __cplusplus
7810 extern "C"
7811 #endif
7812 /* We use char because int might match the return type of a gcc2
7813    builtin and then its argument prototype would still apply.  */
7814 char regcomp ();
7815 int
7816 main (void)
7817 {
7818 regcomp ();
7819   ;
7820   return 0;
7821 }
7822 _ACEOF
7823 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7824 if { (eval echo "$as_me:7824: \"$ac_link\"") >&5
7825   (eval $ac_link) 2>&5
7826   ac_status=$?
7827   echo "$as_me:7827: \$? = $ac_status" >&5
7828   (exit "$ac_status"); } &&
7829          { ac_try='test -s "conftest$ac_exeext"'
7830   { (eval echo "$as_me:7830: \"$ac_try\"") >&5
7831   (eval $ac_try) 2>&5
7832   ac_status=$?
7833   echo "$as_me:7833: \$? = $ac_status" >&5
7834   (exit "$ac_status"); }; }; then
7835   ac_cv_lib_pcre2_posix_regcomp=yes
7836 else
7837   echo "$as_me: failed program was:" >&5
7838 cat "conftest.$ac_ext" >&5
7839 ac_cv_lib_pcre2_posix_regcomp=no
7840 fi
7841 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7842 LIBS=$ac_check_lib_save_LIBS
7843 fi
7844 echo "$as_me:7844: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7845 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7846 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7847
7848 cf_add_libs="$LIBS"
7849 # reverse order
7850 cf_add_0lib=
7851 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7852 # filter duplicates
7853 for cf_add_1lib in $cf_add_0lib; do
7854         for cf_add_2lib in $cf_add_libs; do
7855                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7856                         cf_add_1lib=
7857                         break
7858                 fi
7859         done
7860         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7861 done
7862 LIBS="$cf_add_libs"
7863
7864 else
7865   echo "$as_me:7865: checking for regcomp in -lpcreposix" >&5
7866 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7867 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7868   echo $ECHO_N "(cached) $ECHO_C" >&6
7869 else
7870   ac_check_lib_save_LIBS=$LIBS
7871 LIBS="-lpcreposix  $LIBS"
7872 cat >"conftest.$ac_ext" <<_ACEOF
7873 #line 7873 "configure"
7874 #include "confdefs.h"
7875
7876 /* Override any gcc2 internal prototype to avoid an error.  */
7877 #ifdef __cplusplus
7878 extern "C"
7879 #endif
7880 /* We use char because int might match the return type of a gcc2
7881    builtin and then its argument prototype would still apply.  */
7882 char regcomp ();
7883 int
7884 main (void)
7885 {
7886 regcomp ();
7887   ;
7888   return 0;
7889 }
7890 _ACEOF
7891 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7892 if { (eval echo "$as_me:7892: \"$ac_link\"") >&5
7893   (eval $ac_link) 2>&5
7894   ac_status=$?
7895   echo "$as_me:7895: \$? = $ac_status" >&5
7896   (exit "$ac_status"); } &&
7897          { ac_try='test -s "conftest$ac_exeext"'
7898   { (eval echo "$as_me:7898: \"$ac_try\"") >&5
7899   (eval $ac_try) 2>&5
7900   ac_status=$?
7901   echo "$as_me:7901: \$? = $ac_status" >&5
7902   (exit "$ac_status"); }; }; then
7903   ac_cv_lib_pcreposix_regcomp=yes
7904 else
7905   echo "$as_me: failed program was:" >&5
7906 cat "conftest.$ac_ext" >&5
7907 ac_cv_lib_pcreposix_regcomp=no
7908 fi
7909 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7910 LIBS=$ac_check_lib_save_LIBS
7911 fi
7912 echo "$as_me:7912: result: $ac_cv_lib_pcreposix_regcomp" >&5
7913 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7914 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7915
7916 cf_add_libs="$LIBS"
7917 # reverse order
7918 cf_add_0lib=
7919 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7920 # filter duplicates
7921 for cf_add_1lib in $cf_add_0lib; do
7922         for cf_add_2lib in $cf_add_libs; do
7923                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7924                         cf_add_1lib=
7925                         break
7926                 fi
7927         done
7928         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7929 done
7930 LIBS="$cf_add_libs"
7931
7932 else
7933   { { echo "$as_me:7933: error: Cannot find PCRE2 POSIX library" >&5
7934 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7935    { (exit 1); exit 1; }; }
7936 fi
7937
7938 fi
7939
7940                 ;;
7941         esac
7942
7943         # either way, check for the library header files
7944
7945 for ac_header in pcre2posix.h pcreposix.h
7946 do
7947 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7948 echo "$as_me:7948: checking for $ac_header" >&5
7949 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7950 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7951   echo $ECHO_N "(cached) $ECHO_C" >&6
7952 else
7953   cat >"conftest.$ac_ext" <<_ACEOF
7954 #line 7954 "configure"
7955 #include "confdefs.h"
7956 #include <$ac_header>
7957 _ACEOF
7958 if { (eval echo "$as_me:7958: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7959   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7960   ac_status=$?
7961   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7962   rm -f conftest.er1
7963   cat conftest.err >&5
7964   echo "$as_me:7964: \$? = $ac_status" >&5
7965   (exit "$ac_status"); } >/dev/null; then
7966   if test -s conftest.err; then
7967     ac_cpp_err=$ac_c_preproc_warn_flag
7968   else
7969     ac_cpp_err=
7970   fi
7971 else
7972   ac_cpp_err=yes
7973 fi
7974 if test -z "$ac_cpp_err"; then
7975   eval "$as_ac_Header=yes"
7976 else
7977   echo "$as_me: failed program was:" >&5
7978   cat "conftest.$ac_ext" >&5
7979   eval "$as_ac_Header=no"
7980 fi
7981 rm -f conftest.err "conftest.$ac_ext"
7982 fi
7983 echo "$as_me:7983: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7984 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7985 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7986   cat >>confdefs.h <<EOF
7987 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7988 EOF
7989
7990 fi
7991 done
7992
7993 for ac_func in PCRE2regcomp
7994 do
7995 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7996 echo "$as_me:7996: checking for $ac_func" >&5
7997 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7998 if eval "test \"\${$as_ac_var+set}\" = set"; then
7999   echo $ECHO_N "(cached) $ECHO_C" >&6
8000 else
8001   cat >"conftest.$ac_ext" <<_ACEOF
8002 #line 8002 "configure"
8003 #include "confdefs.h"
8004 #define $ac_func autoconf_temporary
8005 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8006 #undef $ac_func
8007
8008 #ifdef __cplusplus
8009 extern "C"
8010 #endif
8011
8012 /* We use char because int might match the return type of a gcc2
8013    builtin and then its argument prototype would still apply.  */
8014 char $ac_func (void);
8015
8016 int
8017 main (void)
8018 {
8019
8020 /* The GNU C library defines stubs for functions which it implements
8021     to always fail with ENOSYS.  Some functions are actually named
8022     something starting with __ and the normal name is an alias.  */
8023 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8024 #error found stub for $ac_func
8025 #endif
8026
8027         return $ac_func ();
8028   ;
8029   return 0;
8030 }
8031 _ACEOF
8032 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8033 if { (eval echo "$as_me:8033: \"$ac_link\"") >&5
8034   (eval $ac_link) 2>&5
8035   ac_status=$?
8036   echo "$as_me:8036: \$? = $ac_status" >&5
8037   (exit "$ac_status"); } &&
8038          { ac_try='test -s "conftest$ac_exeext"'
8039   { (eval echo "$as_me:8039: \"$ac_try\"") >&5
8040   (eval $ac_try) 2>&5
8041   ac_status=$?
8042   echo "$as_me:8042: \$? = $ac_status" >&5
8043   (exit "$ac_status"); }; }; then
8044   eval "$as_ac_var=yes"
8045 else
8046   echo "$as_me: failed program was:" >&5
8047 cat "conftest.$ac_ext" >&5
8048 eval "$as_ac_var=no"
8049 fi
8050 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8051 fi
8052 echo "$as_me:8052: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8053 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8054 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8055   cat >>confdefs.h <<EOF
8056 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8057 EOF
8058
8059 fi
8060 done
8061
8062 fi
8063
8064 # not everyone has "test -c"
8065 if test -c /dev/sysmouse 2>/dev/null ; then
8066 echo "$as_me:8066: checking if you want to use sysmouse" >&5
8067 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8068
8069 # Check whether --with-sysmouse or --without-sysmouse was given.
8070 if test "${with_sysmouse+set}" = set; then
8071   withval="$with_sysmouse"
8072   cf_with_sysmouse=$withval
8073 else
8074   cf_with_sysmouse=maybe
8075 fi;
8076         if test "$cf_with_sysmouse" != no ; then
8077         cat >"conftest.$ac_ext" <<_ACEOF
8078 #line 8078 "configure"
8079 #include "confdefs.h"
8080
8081 #include <osreldate.h>
8082 #if (__FreeBSD_version >= 400017)
8083 #include <sys/consio.h>
8084 #include <sys/fbio.h>
8085 #else
8086 #include <machine/console.h>
8087 #endif
8088
8089 int
8090 main (void)
8091 {
8092
8093         struct mouse_info the_mouse;
8094         ioctl(0, CONS_MOUSECTL, &the_mouse);
8095
8096   ;
8097   return 0;
8098 }
8099 _ACEOF
8100 rm -f "conftest.$ac_objext"
8101 if { (eval echo "$as_me:8101: \"$ac_compile\"") >&5
8102   (eval $ac_compile) 2>&5
8103   ac_status=$?
8104   echo "$as_me:8104: \$? = $ac_status" >&5
8105   (exit "$ac_status"); } &&
8106          { ac_try='test -s "conftest.$ac_objext"'
8107   { (eval echo "$as_me:8107: \"$ac_try\"") >&5
8108   (eval $ac_try) 2>&5
8109   ac_status=$?
8110   echo "$as_me:8110: \$? = $ac_status" >&5
8111   (exit "$ac_status"); }; }; then
8112   cf_with_sysmouse=yes
8113 else
8114   echo "$as_me: failed program was:" >&5
8115 cat "conftest.$ac_ext" >&5
8116 cf_with_sysmouse=no
8117 fi
8118 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8119         fi
8120 echo "$as_me:8120: result: $cf_with_sysmouse" >&5
8121 echo "${ECHO_T}$cf_with_sysmouse" >&6
8122 test "$cf_with_sysmouse" = yes &&
8123 cat >>confdefs.h <<\EOF
8124 #define USE_SYSMOUSE 1
8125 EOF
8126
8127 fi
8128
8129 # pretend that ncurses==ncursesw==ncursest
8130 echo "$as_me:8130: checking if you want to disable library suffixes" >&5
8131 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8132
8133 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8134 if test "${enable_lib_suffixes+set}" = set; then
8135   enableval="$enable_lib_suffixes"
8136   test "$enableval" != no && enableval=yes
8137         if test "$enableval" != "yes" ; then
8138     disable_lib_suffixes=yes
8139         else
8140                 disable_lib_suffixes=no
8141         fi
8142 else
8143   enableval=yes
8144         disable_lib_suffixes=no
8145
8146 fi;
8147 echo "$as_me:8147: result: $disable_lib_suffixes" >&5
8148 echo "${ECHO_T}$disable_lib_suffixes" >&6
8149
8150 ### If we're building with rpath, try to link non-standard libs that way too.
8151 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8152
8153 echo "$as_me:8153: checking if rpath-hack should be disabled" >&5
8154 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8155
8156 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8157 if test "${enable_rpath_hack+set}" = set; then
8158   enableval="$enable_rpath_hack"
8159   test "$enableval" != no && enableval=yes
8160         if test "$enableval" != "yes" ; then
8161     enable_rpath_hack=no
8162         else
8163                 enable_rpath_hack=yes
8164         fi
8165 else
8166   enableval=yes
8167         enable_rpath_hack=yes
8168
8169 fi;
8170 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8171 echo "$as_me:8171: result: $cf_disable_rpath_hack" >&5
8172 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8173
8174 if test "$enable_rpath_hack" = yes ; then
8175
8176 echo "$as_me:8176: checking for updated LDFLAGS" >&5
8177 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8178 if test -n "$LD_RPATH_OPT" ; then
8179         echo "$as_me:8179: result: maybe" >&5
8180 echo "${ECHO_T}maybe" >&6
8181
8182         for ac_prog in ldd
8183 do
8184   # Extract the first word of "$ac_prog", so it can be a program name with args.
8185 set dummy $ac_prog; ac_word=$2
8186 echo "$as_me:8186: checking for $ac_word" >&5
8187 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8188 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8189   echo $ECHO_N "(cached) $ECHO_C" >&6
8190 else
8191   if test -n "$cf_ldd_prog"; then
8192   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8193 else
8194   ac_save_IFS=$IFS; IFS=$ac_path_separator
8195 ac_dummy="$PATH"
8196 for ac_dir in $ac_dummy; do
8197   IFS=$ac_save_IFS
8198   test -z "$ac_dir" && ac_dir=.
8199   $as_executable_p "$ac_dir/$ac_word" || continue
8200 ac_cv_prog_cf_ldd_prog="$ac_prog"
8201 echo "$as_me:8201: found $ac_dir/$ac_word" >&5
8202 break
8203 done
8204
8205 fi
8206 fi
8207 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8208 if test -n "$cf_ldd_prog"; then
8209   echo "$as_me:8209: result: $cf_ldd_prog" >&5
8210 echo "${ECHO_T}$cf_ldd_prog" >&6
8211 else
8212   echo "$as_me:8212: result: no" >&5
8213 echo "${ECHO_T}no" >&6
8214 fi
8215
8216   test -n "$cf_ldd_prog" && break
8217 done
8218 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8219
8220         cf_rpath_list="/usr/lib /lib"
8221         if test "$cf_ldd_prog" != no
8222         then
8223                 cf_rpath_oops=
8224
8225 cat >"conftest.$ac_ext" <<_ACEOF
8226 #line 8226 "configure"
8227 #include "confdefs.h"
8228 #include <stdio.h>
8229 int
8230 main (void)
8231 {
8232 printf("Hello");
8233   ;
8234   return 0;
8235 }
8236 _ACEOF
8237 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8238 if { (eval echo "$as_me:8238: \"$ac_link\"") >&5
8239   (eval $ac_link) 2>&5
8240   ac_status=$?
8241   echo "$as_me:8241: \$? = $ac_status" >&5
8242   (exit "$ac_status"); } &&
8243          { ac_try='test -s "conftest$ac_exeext"'
8244   { (eval echo "$as_me:8244: \"$ac_try\"") >&5
8245   (eval $ac_try) 2>&5
8246   ac_status=$?
8247   echo "$as_me:8247: \$? = $ac_status" >&5
8248   (exit "$ac_status"); }; }; then
8249   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8250                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8251 else
8252   echo "$as_me: failed program was:" >&5
8253 cat "conftest.$ac_ext" >&5
8254 fi
8255 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8256
8257                 # If we passed the link-test, but get a "not found" on a given library,
8258                 # this could be due to inept reconfiguration of gcc to make it only
8259                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8260                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8261                 # /usr/local libraries.
8262                 if test -n "$cf_rpath_oops"
8263                 then
8264                         for cf_rpath_src in $cf_rpath_oops
8265                         do
8266                                 for cf_rpath_dir in \
8267                                         /usr/local \
8268                                         /usr/pkg \
8269                                         /opt/sfw
8270                                 do
8271                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8272                                         then
8273                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8274
8275 echo "${as_me:-configure}:8275: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8276
8277                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8278                                                 break
8279                                         fi
8280                                 done
8281                         done
8282                 fi
8283         fi
8284
8285         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8286
8287 echo "${as_me:-configure}:8287: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8288
8289 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8290
8291 echo "${as_me:-configure}:8291: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8292
8293 cf_rpath_dst=
8294 for cf_rpath_src in $LDFLAGS
8295 do
8296         case "$cf_rpath_src" in
8297         (-L*)
8298
8299                 # check if this refers to a directory which we will ignore
8300                 cf_rpath_skip=no
8301                 if test -n "$cf_rpath_list"
8302                 then
8303                         for cf_rpath_item in $cf_rpath_list
8304                         do
8305                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8306                                 then
8307                                         cf_rpath_skip=yes
8308                                         break
8309                                 fi
8310                         done
8311                 fi
8312
8313                 if test "$cf_rpath_skip" = no
8314                 then
8315                         # transform the option
8316                         if test "$LD_RPATH_OPT" = "-R " ; then
8317                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8318                         else
8319                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8320                         fi
8321
8322                         # if we have not already added this, add it now
8323                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8324                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8325                         then
8326                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8327
8328 echo "${as_me:-configure}:8328: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8329
8330                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8331                         fi
8332                 fi
8333                 ;;
8334         esac
8335         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8336 done
8337 LDFLAGS=$cf_rpath_dst
8338
8339 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8340
8341 echo "${as_me:-configure}:8341: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8342
8343 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8344
8345 echo "${as_me:-configure}:8345: testing ...checking LIBS $LIBS ..." 1>&5
8346
8347 cf_rpath_dst=
8348 for cf_rpath_src in $LIBS
8349 do
8350         case "$cf_rpath_src" in
8351         (-L*)
8352
8353                 # check if this refers to a directory which we will ignore
8354                 cf_rpath_skip=no
8355                 if test -n "$cf_rpath_list"
8356                 then
8357                         for cf_rpath_item in $cf_rpath_list
8358                         do
8359                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8360                                 then
8361                                         cf_rpath_skip=yes
8362                                         break
8363                                 fi
8364                         done
8365                 fi
8366
8367                 if test "$cf_rpath_skip" = no
8368                 then
8369                         # transform the option
8370                         if test "$LD_RPATH_OPT" = "-R " ; then
8371                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8372                         else
8373                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8374                         fi
8375
8376                         # if we have not already added this, add it now
8377                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8378                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8379                         then
8380                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8381
8382 echo "${as_me:-configure}:8382: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8383
8384                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8385                         fi
8386                 fi
8387                 ;;
8388         esac
8389         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8390 done
8391 LIBS=$cf_rpath_dst
8392
8393 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8394
8395 echo "${as_me:-configure}:8395: testing ...checked LIBS $LIBS ..." 1>&5
8396
8397         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8398
8399 echo "${as_me:-configure}:8399: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8400
8401 else
8402         echo "$as_me:8402: result: no" >&5
8403 echo "${ECHO_T}no" >&6
8404 fi
8405
8406 fi
8407
8408 fi
8409
8410 ### Depending on the system, someone may use rpath to build ncurses but not
8411 # want users of the package to rely upon that feature.  Give those people an
8412 # option to suppress that detail from EXTRA_LDFLAGS.
8413 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8414 if test -n "$EXTRA_PKG_LDFLAGS"
8415 then
8416         echo "$as_me:8416: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8417 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8418
8419 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8420 if test "${enable_pkg_ldflags+set}" = set; then
8421   enableval="$enable_pkg_ldflags"
8422   test "$enableval" != no && enableval=yes
8423         if test "$enableval" != "yes" ; then
8424     disable_pkg_ldflags=yes
8425         else
8426                 disable_pkg_ldflags=no
8427         fi
8428 else
8429   enableval=yes
8430         disable_pkg_ldflags=no
8431
8432 fi;
8433         echo "$as_me:8433: result: $disable_pkg_ldflags" >&5
8434 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8435         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8436 fi
8437
8438 ###############################################################################
8439
8440 ###     use option --with-extra-suffix to append suffix to headers and libraries
8441 echo "$as_me:8441: checking if you wish to append extra suffix to header/library paths" >&5
8442 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8443 EXTRA_SUFFIX=
8444
8445 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8446 if test "${with_extra_suffix+set}" = set; then
8447   withval="$with_extra_suffix"
8448   case x$withval in
8449         (xno)
8450                 ;;
8451         (xyes|x)
8452                 EXTRA_SUFFIX=$cf_cv_abi_version
8453                 ;;
8454         (*)
8455                 EXTRA_SUFFIX=$withval
8456                 ;;
8457         esac
8458
8459 fi;
8460 echo "$as_me:8460: result: $EXTRA_SUFFIX" >&5
8461 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8462
8463 ###     use option --disable-overwrite to leave out the link to -lcurses
8464 echo "$as_me:8464: checking if you wish to install ncurses overwriting curses" >&5
8465 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8466
8467 # Check whether --enable-overwrite or --disable-overwrite was given.
8468 if test "${enable_overwrite+set}" = set; then
8469   enableval="$enable_overwrite"
8470   with_overwrite=$enableval
8471 else
8472   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8473 fi;
8474 echo "$as_me:8474: result: $with_overwrite" >&5
8475 echo "${ECHO_T}$with_overwrite" >&6
8476
8477 echo "$as_me:8477: checking if external terminfo-database is used" >&5
8478 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8479
8480 # Check whether --enable-database or --disable-database was given.
8481 if test "${enable_database+set}" = set; then
8482   enableval="$enable_database"
8483   use_database=$enableval
8484 else
8485   use_database=yes
8486 fi;
8487 echo "$as_me:8487: result: $use_database" >&5
8488 echo "${ECHO_T}$use_database" >&6
8489
8490 case "$host_os" in
8491 (os2*)
8492         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8493         ;;
8494 (*)
8495         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8496         ;;
8497 esac
8498
8499 NCURSES_USE_DATABASE=0
8500 if test "$use_database" != no ; then
8501         NCURSES_USE_DATABASE=1
8502
8503         echo "$as_me:8503: checking which terminfo source-file will be installed" >&5
8504 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8505
8506 # Check whether --with-database or --without-database was given.
8507 if test "${with_database+set}" = set; then
8508   withval="$with_database"
8509   TERMINFO_SRC=$withval
8510 fi;
8511         echo "$as_me:8511: result: $TERMINFO_SRC" >&5
8512 echo "${ECHO_T}$TERMINFO_SRC" >&6
8513
8514         echo "$as_me:8514: checking whether to use hashed database instead of directory/tree" >&5
8515 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8516
8517 # Check whether --with-hashed-db or --without-hashed-db was given.
8518 if test "${with_hashed_db+set}" = set; then
8519   withval="$with_hashed_db"
8520
8521 else
8522   with_hashed_db=no
8523 fi;
8524         echo "$as_me:8524: result: $with_hashed_db" >&5
8525 echo "${ECHO_T}$with_hashed_db" >&6
8526 else
8527         with_hashed_db=no
8528 fi
8529
8530 echo "$as_me:8530: checking for list of fallback descriptions" >&5
8531 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8532
8533 # Check whether --with-fallbacks or --without-fallbacks was given.
8534 if test "${with_fallbacks+set}" = set; then
8535   withval="$with_fallbacks"
8536   with_fallback=$withval
8537 else
8538   with_fallback=
8539 fi;
8540 echo "$as_me:8540: result: $with_fallback" >&5
8541 echo "${ECHO_T}$with_fallback" >&6
8542
8543 case ".$with_fallback" in
8544 (.|.no)
8545         FALLBACK_LIST=
8546         ;;
8547 (.yes)
8548         { echo "$as_me:8548: WARNING: expected a list of terminal descriptions" >&5
8549 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8550         ;;
8551 (*)
8552         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8553         ;;
8554 esac
8555
8556 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8557 # tree for generating the terminal descriptions that will be compiled into the
8558 # library.  If your toolchain is old, it may not handle current terminal
8559 # databases.  Use configure-options to point to the tools which will be used,
8560 # rather than the first ones found on the $PATH.
8561 if test -n "$ac_tool_prefix"; then
8562   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8563 set dummy ${ac_tool_prefix}tic; ac_word=$2
8564 echo "$as_me:8564: checking for $ac_word" >&5
8565 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8566 if test "${ac_cv_prog_TIC+set}" = set; then
8567   echo $ECHO_N "(cached) $ECHO_C" >&6
8568 else
8569   if test -n "$TIC"; then
8570   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8571 else
8572   ac_save_IFS=$IFS; IFS=$ac_path_separator
8573 ac_dummy="$PATH"
8574 for ac_dir in $ac_dummy; do
8575   IFS=$ac_save_IFS
8576   test -z "$ac_dir" && ac_dir=.
8577   $as_executable_p "$ac_dir/$ac_word" || continue
8578 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8579 echo "$as_me:8579: found $ac_dir/$ac_word" >&5
8580 break
8581 done
8582
8583 fi
8584 fi
8585 TIC=$ac_cv_prog_TIC
8586 if test -n "$TIC"; then
8587   echo "$as_me:8587: result: $TIC" >&5
8588 echo "${ECHO_T}$TIC" >&6
8589 else
8590   echo "$as_me:8590: result: no" >&5
8591 echo "${ECHO_T}no" >&6
8592 fi
8593
8594 fi
8595 if test -z "$ac_cv_prog_TIC"; then
8596   ac_ct_TIC=$TIC
8597   # Extract the first word of "tic", so it can be a program name with args.
8598 set dummy tic; ac_word=$2
8599 echo "$as_me:8599: checking for $ac_word" >&5
8600 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8601 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8602   echo $ECHO_N "(cached) $ECHO_C" >&6
8603 else
8604   if test -n "$ac_ct_TIC"; then
8605   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8606 else
8607   ac_save_IFS=$IFS; IFS=$ac_path_separator
8608 ac_dummy="$PATH"
8609 for ac_dir in $ac_dummy; do
8610   IFS=$ac_save_IFS
8611   test -z "$ac_dir" && ac_dir=.
8612   $as_executable_p "$ac_dir/$ac_word" || continue
8613 ac_cv_prog_ac_ct_TIC="tic"
8614 echo "$as_me:8614: found $ac_dir/$ac_word" >&5
8615 break
8616 done
8617
8618 fi
8619 fi
8620 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8621 if test -n "$ac_ct_TIC"; then
8622   echo "$as_me:8622: result: $ac_ct_TIC" >&5
8623 echo "${ECHO_T}$ac_ct_TIC" >&6
8624 else
8625   echo "$as_me:8625: result: no" >&5
8626 echo "${ECHO_T}no" >&6
8627 fi
8628
8629   TIC=$ac_ct_TIC
8630 else
8631   TIC="$ac_cv_prog_TIC"
8632 fi
8633
8634 if test -n "$ac_tool_prefix"; then
8635   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8636 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8637 echo "$as_me:8637: checking for $ac_word" >&5
8638 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8639 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8640   echo $ECHO_N "(cached) $ECHO_C" >&6
8641 else
8642   if test -n "$INFOCMP"; then
8643   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8644 else
8645   ac_save_IFS=$IFS; IFS=$ac_path_separator
8646 ac_dummy="$PATH"
8647 for ac_dir in $ac_dummy; do
8648   IFS=$ac_save_IFS
8649   test -z "$ac_dir" && ac_dir=.
8650   $as_executable_p "$ac_dir/$ac_word" || continue
8651 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8652 echo "$as_me:8652: found $ac_dir/$ac_word" >&5
8653 break
8654 done
8655
8656 fi
8657 fi
8658 INFOCMP=$ac_cv_prog_INFOCMP
8659 if test -n "$INFOCMP"; then
8660   echo "$as_me:8660: result: $INFOCMP" >&5
8661 echo "${ECHO_T}$INFOCMP" >&6
8662 else
8663   echo "$as_me:8663: result: no" >&5
8664 echo "${ECHO_T}no" >&6
8665 fi
8666
8667 fi
8668 if test -z "$ac_cv_prog_INFOCMP"; then
8669   ac_ct_INFOCMP=$INFOCMP
8670   # Extract the first word of "infocmp", so it can be a program name with args.
8671 set dummy infocmp; ac_word=$2
8672 echo "$as_me:8672: checking for $ac_word" >&5
8673 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8674 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8675   echo $ECHO_N "(cached) $ECHO_C" >&6
8676 else
8677   if test -n "$ac_ct_INFOCMP"; then
8678   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8679 else
8680   ac_save_IFS=$IFS; IFS=$ac_path_separator
8681 ac_dummy="$PATH"
8682 for ac_dir in $ac_dummy; do
8683   IFS=$ac_save_IFS
8684   test -z "$ac_dir" && ac_dir=.
8685   $as_executable_p "$ac_dir/$ac_word" || continue
8686 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8687 echo "$as_me:8687: found $ac_dir/$ac_word" >&5
8688 break
8689 done
8690
8691 fi
8692 fi
8693 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8694 if test -n "$ac_ct_INFOCMP"; then
8695   echo "$as_me:8695: result: $ac_ct_INFOCMP" >&5
8696 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8697 else
8698   echo "$as_me:8698: result: no" >&5
8699 echo "${ECHO_T}no" >&6
8700 fi
8701
8702   INFOCMP=$ac_ct_INFOCMP
8703 else
8704   INFOCMP="$ac_cv_prog_INFOCMP"
8705 fi
8706
8707 if test -n "$FALLBACK_LIST"
8708 then
8709
8710 # Check whether --with-tic-path or --without-tic-path was given.
8711 if test "${with_tic_path+set}" = set; then
8712   withval="$with_tic_path"
8713   echo "$as_me:8713: checking for tic program for fallbacks" >&5
8714 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8715                 TIC=$withval
8716                 echo "$as_me:8716: result: $TIC" >&5
8717 echo "${ECHO_T}$TIC" >&6
8718
8719 if test "x$prefix" != xNONE; then
8720         cf_path_syntax="$prefix"
8721 else
8722         cf_path_syntax="$ac_default_prefix"
8723 fi
8724
8725 case ".$TIC" in
8726 (.\$\(*\)*|.\'*\'*)
8727         ;;
8728 (..|./*|.\\*)
8729         ;;
8730 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8731         ;;
8732 (.\$\{*prefix\}*|.\$\{*dir\}*)
8733         eval TIC="$TIC"
8734         case ".$TIC" in
8735         (.NONE/*)
8736                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8737                 ;;
8738         esac
8739         ;;
8740 (.no|.NONE/*)
8741         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8742         ;;
8743 (*)
8744         { { echo "$as_me:8744: error: expected a pathname, not \"$TIC\"" >&5
8745 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8746    { (exit 1); exit 1; }; }
8747         ;;
8748 esac
8749
8750 else
8751
8752 test -z "$TIC" && TIC="tic"
8753 for ac_prog in $TIC tic
8754 do
8755   # Extract the first word of "$ac_prog", so it can be a program name with args.
8756 set dummy $ac_prog; ac_word=$2
8757 echo "$as_me:8757: checking for $ac_word" >&5
8758 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8759 if test "${ac_cv_path_TIC+set}" = set; then
8760   echo $ECHO_N "(cached) $ECHO_C" >&6
8761 else
8762   case $TIC in
8763   [\\/]* | ?:[\\/]*)
8764   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8765   ;;
8766   *)
8767   ac_save_IFS=$IFS; IFS=$ac_path_separator
8768 ac_dummy="$PATH:/usr/local/ncurses/bin"
8769 for ac_dir in $ac_dummy; do
8770   IFS=$ac_save_IFS
8771   test -z "$ac_dir" && ac_dir=.
8772   if $as_executable_p "$ac_dir/$ac_word"; then
8773    ac_cv_path_TIC="$ac_dir/$ac_word"
8774    echo "$as_me:8774: found $ac_dir/$ac_word" >&5
8775    break
8776 fi
8777 done
8778
8779   ;;
8780 esac
8781 fi
8782 TIC=$ac_cv_path_TIC
8783
8784 if test -n "$TIC"; then
8785   echo "$as_me:8785: result: $TIC" >&5
8786 echo "${ECHO_T}$TIC" >&6
8787 else
8788   echo "$as_me:8788: result: no" >&5
8789 echo "${ECHO_T}no" >&6
8790 fi
8791
8792   test -n "$TIC" && break
8793 done
8794 test -n "$TIC" || TIC="$TIC"
8795
8796 cf_path_prog=""
8797 cf_path_args=""
8798 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8799 for cf_temp in $ac_cv_path_TIC
8800 do
8801         if test -z "$cf_path_prog" ; then
8802                 if test "$with_full_paths" = yes ; then
8803
8804 if test "x$prefix" != xNONE; then
8805         cf_path_syntax="$prefix"
8806 else
8807         cf_path_syntax="$ac_default_prefix"
8808 fi
8809
8810 case ".$cf_temp" in
8811 (.\$\(*\)*|.\'*\'*)
8812         ;;
8813 (..|./*|.\\*)
8814         ;;
8815 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8816         ;;
8817 (.\$\{*prefix\}*|.\$\{*dir\}*)
8818         eval cf_temp="$cf_temp"
8819         case ".$cf_temp" in
8820         (.NONE/*)
8821                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8822                 ;;
8823         esac
8824         ;;
8825 (.no|.NONE/*)
8826         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8827         ;;
8828 (*)
8829         break
8830         ;;
8831 esac
8832
8833                         cf_path_prog="$cf_temp"
8834                 else
8835                         cf_path_prog="`basename "$cf_temp"`"
8836                 fi
8837         elif test -z "$cf_path_args" ; then
8838                 cf_path_args="$cf_temp"
8839         else
8840                 cf_path_args="$cf_path_args $cf_temp"
8841         fi
8842 done
8843 IFS="$cf_save_ifs"
8844
8845 if test -n "$cf_path_prog" ; then
8846
8847 echo "${as_me:-configure}:8847: testing defining path for ${cf_path_prog} ..." 1>&5
8848
8849 cat >>confdefs.h <<EOF
8850 #define TIC_PATH "$cf_path_prog"
8851 EOF
8852
8853         test -n "$cf_path_args" &&
8854 cat >>confdefs.h <<EOF
8855 #define TIC_ARGS "$cf_path_args"
8856 EOF
8857
8858 fi
8859
8860                 if test -z "$TIC"
8861                 then
8862                         { echo "$as_me:8862: WARNING: no tic program found for fallbacks" >&5
8863 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8864                 fi
8865
8866 fi;
8867
8868 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8869 if test "${with_infocmp_path+set}" = set; then
8870   withval="$with_infocmp_path"
8871   echo "$as_me:8871: checking for infocmp program for fallbacks" >&5
8872 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8873                 INFOCMP=$withval
8874                 echo "$as_me:8874: result: $INFOCMP" >&5
8875 echo "${ECHO_T}$INFOCMP" >&6
8876
8877 if test "x$prefix" != xNONE; then
8878         cf_path_syntax="$prefix"
8879 else
8880         cf_path_syntax="$ac_default_prefix"
8881 fi
8882
8883 case ".$INFOCMP" in
8884 (.\$\(*\)*|.\'*\'*)
8885         ;;
8886 (..|./*|.\\*)
8887         ;;
8888 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8889         ;;
8890 (.\$\{*prefix\}*|.\$\{*dir\}*)
8891         eval INFOCMP="$INFOCMP"
8892         case ".$INFOCMP" in
8893         (.NONE/*)
8894                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8895                 ;;
8896         esac
8897         ;;
8898 (.no|.NONE/*)
8899         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8900         ;;
8901 (*)
8902         { { echo "$as_me:8902: error: expected a pathname, not \"$INFOCMP\"" >&5
8903 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8904    { (exit 1); exit 1; }; }
8905         ;;
8906 esac
8907
8908 else
8909
8910 test -z "$INFOCMP" && INFOCMP="infocmp"
8911 for ac_prog in $INFOCMP infocmp
8912 do
8913   # Extract the first word of "$ac_prog", so it can be a program name with args.
8914 set dummy $ac_prog; ac_word=$2
8915 echo "$as_me:8915: checking for $ac_word" >&5
8916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8917 if test "${ac_cv_path_INFOCMP+set}" = set; then
8918   echo $ECHO_N "(cached) $ECHO_C" >&6
8919 else
8920   case $INFOCMP in
8921   [\\/]* | ?:[\\/]*)
8922   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8923   ;;
8924   *)
8925   ac_save_IFS=$IFS; IFS=$ac_path_separator
8926 ac_dummy="$PATH:/usr/local/ncurses/bin"
8927 for ac_dir in $ac_dummy; do
8928   IFS=$ac_save_IFS
8929   test -z "$ac_dir" && ac_dir=.
8930   if $as_executable_p "$ac_dir/$ac_word"; then
8931    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8932    echo "$as_me:8932: found $ac_dir/$ac_word" >&5
8933    break
8934 fi
8935 done
8936
8937   ;;
8938 esac
8939 fi
8940 INFOCMP=$ac_cv_path_INFOCMP
8941
8942 if test -n "$INFOCMP"; then
8943   echo "$as_me:8943: result: $INFOCMP" >&5
8944 echo "${ECHO_T}$INFOCMP" >&6
8945 else
8946   echo "$as_me:8946: result: no" >&5
8947 echo "${ECHO_T}no" >&6
8948 fi
8949
8950   test -n "$INFOCMP" && break
8951 done
8952 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8953
8954 cf_path_prog=""
8955 cf_path_args=""
8956 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8957 for cf_temp in $ac_cv_path_INFOCMP
8958 do
8959         if test -z "$cf_path_prog" ; then
8960                 if test "$with_full_paths" = yes ; then
8961
8962 if test "x$prefix" != xNONE; then
8963         cf_path_syntax="$prefix"
8964 else
8965         cf_path_syntax="$ac_default_prefix"
8966 fi
8967
8968 case ".$cf_temp" in
8969 (.\$\(*\)*|.\'*\'*)
8970         ;;
8971 (..|./*|.\\*)
8972         ;;
8973 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8974         ;;
8975 (.\$\{*prefix\}*|.\$\{*dir\}*)
8976         eval cf_temp="$cf_temp"
8977         case ".$cf_temp" in
8978         (.NONE/*)
8979                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8980                 ;;
8981         esac
8982         ;;
8983 (.no|.NONE/*)
8984         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8985         ;;
8986 (*)
8987         break
8988         ;;
8989 esac
8990
8991                         cf_path_prog="$cf_temp"
8992                 else
8993                         cf_path_prog="`basename "$cf_temp"`"
8994                 fi
8995         elif test -z "$cf_path_args" ; then
8996                 cf_path_args="$cf_temp"
8997         else
8998                 cf_path_args="$cf_path_args $cf_temp"
8999         fi
9000 done
9001 IFS="$cf_save_ifs"
9002
9003 if test -n "$cf_path_prog" ; then
9004
9005 echo "${as_me:-configure}:9005: testing defining path for ${cf_path_prog} ..." 1>&5
9006
9007 cat >>confdefs.h <<EOF
9008 #define INFOCMP_PATH "$cf_path_prog"
9009 EOF
9010
9011         test -n "$cf_path_args" &&
9012 cat >>confdefs.h <<EOF
9013 #define INFOCMP_ARGS "$cf_path_args"
9014 EOF
9015
9016 fi
9017
9018                 if test -z "$INFOCMP"
9019                 then
9020                         { echo "$as_me:9020: WARNING: no infocmp program found for fallbacks" >&5
9021 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
9022                 fi
9023
9024 fi;
9025
9026         test -z "$TIC" && FALLBACK_LIST=
9027         test -z "$INFOCMP" && FALLBACK_LIST=
9028         if test -z "$FALLBACK_LIST"
9029         then
9030                 { echo "$as_me:9030: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
9031 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
9032         fi
9033 fi
9034
9035 USE_FALLBACKS=
9036 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
9037
9038 echo "$as_me:9038: checking if you want modern xterm or antique" >&5
9039 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
9040
9041 # Check whether --with-xterm-new or --without-xterm-new was given.
9042 if test "${with_xterm_new+set}" = set; then
9043   withval="$with_xterm_new"
9044   with_xterm_new=$withval
9045 else
9046   with_xterm_new=yes
9047 fi;
9048 case "$with_xterm_new" in
9049 (no) with_xterm_new=xterm-old;;
9050 (*)      with_xterm_new=xterm-new;;
9051 esac
9052 echo "$as_me:9052: result: $with_xterm_new" >&5
9053 echo "${ECHO_T}$with_xterm_new" >&6
9054 WHICH_XTERM=$with_xterm_new
9055
9056 case $host_os in
9057 (*linux-gnu|*cygwin|*mingw32|*msys)
9058         want_xterm_kbs=DEL
9059         ;;
9060 (*)
9061         want_xterm_kbs=BS
9062         ;;
9063 esac
9064
9065 echo "$as_me:9065: checking if xterm backspace sends BS or DEL" >&5
9066 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9067
9068 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9069 if test "${with_xterm_kbs+set}" = set; then
9070   withval="$with_xterm_kbs"
9071   with_xterm_kbs=$withval
9072 else
9073   with_xterm_kbs=BS
9074 fi;
9075 case x$with_xterm_kbs in
9076 (xyes|xno|xBS|xbs|x8)
9077         with_xterm_kbs=BS
9078         ;;
9079 (xDEL|xdel|x127)
9080         with_xterm_kbs=DEL
9081         ;;
9082 (*)
9083         with_xterm_kbs=$withval
9084         ;;
9085 esac
9086 echo "$as_me:9086: result: $with_xterm_kbs" >&5
9087 echo "${ECHO_T}$with_xterm_kbs" >&6
9088 XTERM_KBS=$with_xterm_kbs
9089
9090 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9091 then
9092         { echo "$as_me:9092: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&5
9093 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&2;}
9094 fi
9095
9096 MAKE_TERMINFO=
9097 if test "$use_database" = no ; then
9098         TERMINFO="${datadir}/terminfo"
9099         MAKE_TERMINFO="#"
9100 else
9101
9102 echo "$as_me:9102: checking for list of terminfo directories" >&5
9103 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9104
9105 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9106 if test "${with_terminfo_dirs+set}" = set; then
9107   withval="$with_terminfo_dirs"
9108
9109 else
9110   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9111 fi;
9112 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9113 cf_dst_path=
9114 for cf_src_path in $withval
9115 do
9116
9117 if test "x$prefix" != xNONE; then
9118         cf_path_syntax="$prefix"
9119 else
9120         cf_path_syntax="$ac_default_prefix"
9121 fi
9122
9123 case ".$cf_src_path" in
9124 (.\$\(*\)*|.\'*\'*)
9125         ;;
9126 (..|./*|.\\*)
9127         ;;
9128 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9129         ;;
9130 (.\$\{*prefix\}*|.\$\{*dir\}*)
9131         eval cf_src_path="$cf_src_path"
9132         case ".$cf_src_path" in
9133         (.NONE/*)
9134                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9135                 ;;
9136         esac
9137         ;;
9138 (.no|.NONE/*)
9139         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9140         ;;
9141 (*)
9142         { { echo "$as_me:9142: error: expected a pathname, not \"$cf_src_path\"" >&5
9143 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9144    { (exit 1); exit 1; }; }
9145         ;;
9146 esac
9147
9148   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9149   cf_dst_path="${cf_dst_path}${cf_src_path}"
9150 done
9151 IFS="$ac_save_ifs"
9152
9153 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9154 # so we have to check/work around.  We do prefer the result of "eval"...
9155 eval cf_dst_eval="$cf_dst_path"
9156 case "x$cf_dst_eval" in
9157 (xNONE*)
9158         TERMINFO_DIRS=$cf_dst_path
9159         ;;
9160 (*)
9161         TERMINFO_DIRS="$cf_dst_eval"
9162         ;;
9163 esac
9164
9165 echo "$as_me:9165: result: $TERMINFO_DIRS" >&5
9166 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9167 test -n "$TERMINFO_DIRS" &&
9168 cat >>confdefs.h <<EOF
9169 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9170 EOF
9171
9172 case "x$TERMINFO" in
9173 x???:*)
9174         { echo "$as_me:9174: WARNING: ignoring non-directory/file TERMINFO value" >&5
9175 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9176         unset TERMINFO
9177         ;;
9178 esac
9179
9180 echo "$as_me:9180: checking for default terminfo directory" >&5
9181 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9182
9183 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9184 if test "${with_default_terminfo_dir+set}" = set; then
9185   withval="$with_default_terminfo_dir"
9186
9187 else
9188   withval="${TERMINFO:-${datadir}/terminfo}"
9189 fi; if test -n "${datadir}/terminfo" ; then
9190
9191 if test "x$prefix" != xNONE; then
9192         cf_path_syntax="$prefix"
9193 else
9194         cf_path_syntax="$ac_default_prefix"
9195 fi
9196
9197 case ".$withval" in
9198 (.\$\(*\)*|.\'*\'*)
9199         ;;
9200 (..|./*|.\\*)
9201         ;;
9202 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9203         ;;
9204 (.\$\{*prefix\}*|.\$\{*dir\}*)
9205         eval withval="$withval"
9206         case ".$withval" in
9207         (.NONE/*)
9208                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9209                 ;;
9210         esac
9211         ;;
9212 (.no|.NONE/*)
9213         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9214         ;;
9215 (*)
9216         { { echo "$as_me:9216: error: expected a pathname, not \"$withval\"" >&5
9217 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9218    { (exit 1); exit 1; }; }
9219         ;;
9220 esac
9221
9222 fi
9223 eval TERMINFO="$withval"
9224
9225 echo "$as_me:9225: result: $TERMINFO" >&5
9226 echo "${ECHO_T}$TERMINFO" >&6
9227
9228 cat >>confdefs.h <<EOF
9229 #define TERMINFO "$TERMINFO"
9230 EOF
9231
9232 fi
9233
9234 ###     use option --disable-big-core to make tic run on small machines
9235 ###     We need 4Mb, check if we can allocate 50% more than that.
9236 echo "$as_me:9236: checking if big-core option selected" >&5
9237 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9238
9239 # Check whether --enable-big-core or --disable-big-core was given.
9240 if test "${enable_big_core+set}" = set; then
9241   enableval="$enable_big_core"
9242   with_big_core=$enableval
9243 else
9244   if test "$cross_compiling" = yes; then
9245   with_big_core=no
9246 else
9247   cat >"conftest.$ac_ext" <<_ACEOF
9248 #line 9248 "configure"
9249 #include "confdefs.h"
9250
9251 #include <stdlib.h>
9252 #include <string.h>
9253 int main() {
9254         unsigned long n = 6000000L;
9255         char *s = malloc(n);
9256         if (s != 0)
9257                 s[0] = s[n-1] = 0;
9258         ${cf_cv_main_return:-return}(s == 0);
9259 }
9260 _ACEOF
9261 rm -f "conftest$ac_exeext"
9262 if { (eval echo "$as_me:9262: \"$ac_link\"") >&5
9263   (eval $ac_link) 2>&5
9264   ac_status=$?
9265   echo "$as_me:9265: \$? = $ac_status" >&5
9266   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9267   { (eval echo "$as_me:9267: \"$ac_try\"") >&5
9268   (eval $ac_try) 2>&5
9269   ac_status=$?
9270   echo "$as_me:9270: \$? = $ac_status" >&5
9271   (exit "$ac_status"); }; }; then
9272   with_big_core=yes
9273 else
9274   echo "$as_me: program exited with status $ac_status" >&5
9275 echo "$as_me: failed program was:" >&5
9276 cat "conftest.$ac_ext" >&5
9277 with_big_core=no
9278 fi
9279 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9280 fi
9281 fi;
9282 echo "$as_me:9282: result: $with_big_core" >&5
9283 echo "${ECHO_T}$with_big_core" >&6
9284 test "x$with_big_core" = "xyes" &&
9285 cat >>confdefs.h <<\EOF
9286 #define HAVE_BIG_CORE 1
9287 EOF
9288
9289 ### ISO C only guarantees 512-char strings, we have tables which load faster
9290 ### when constructed using "big" strings.  More than the C compiler, the awk
9291 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9292 echo "$as_me:9292: checking if big-strings option selected" >&5
9293 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9294
9295 # Check whether --enable-big-strings or --disable-big-strings was given.
9296 if test "${enable_big_strings+set}" = set; then
9297   enableval="$enable_big_strings"
9298   with_big_strings=$enableval
9299 else
9300
9301         case x$AWK in
9302         (x)
9303                 eval with_big_strings=no
9304                 ;;
9305         (*)
9306                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9307                         | $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
9308                         eval with_big_strings=yes
9309                 else
9310                         eval with_big_strings=no
9311                 fi
9312                 ;;
9313         esac
9314
9315 fi;
9316 echo "$as_me:9316: result: $with_big_strings" >&5
9317 echo "${ECHO_T}$with_big_strings" >&6
9318
9319 USE_BIG_STRINGS=0
9320 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9321
9322 ###     use option --enable-termcap to compile in the termcap fallback support
9323 echo "$as_me:9323: checking if you want termcap-fallback support" >&5
9324 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9325
9326 # Check whether --enable-termcap or --disable-termcap was given.
9327 if test "${enable_termcap+set}" = set; then
9328   enableval="$enable_termcap"
9329   with_termcap=$enableval
9330 else
9331   with_termcap=no
9332 fi;
9333 echo "$as_me:9333: result: $with_termcap" >&5
9334 echo "${ECHO_T}$with_termcap" >&6
9335
9336 NCURSES_USE_TERMCAP=0
9337 if test "x$with_termcap" != "xyes" ; then
9338         if test "$use_database" = no ; then
9339                 if test -z "$with_fallback" ; then
9340                         { { echo "$as_me:9340: error: You have disabled the database w/o specifying fallbacks" >&5
9341 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9342    { (exit 1); exit 1; }; }
9343                 fi
9344         fi
9345
9346 cat >>confdefs.h <<\EOF
9347 #define PURE_TERMINFO 1
9348 EOF
9349
9350 else
9351
9352         if test "$with_ticlib" != no ; then
9353                 { { echo "$as_me:9353: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9354 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9355    { (exit 1); exit 1; }; }
9356         fi
9357
9358         NCURSES_USE_TERMCAP=1
9359         echo "$as_me:9359: checking for list of termcap files" >&5
9360 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9361
9362 # Check whether --with-termpath or --without-termpath was given.
9363 if test "${with_termpath+set}" = set; then
9364   withval="$with_termpath"
9365
9366 else
9367   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9368 fi;
9369 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9370 cf_dst_path=
9371 for cf_src_path in $withval
9372 do
9373
9374 if test "x$prefix" != xNONE; then
9375         cf_path_syntax="$prefix"
9376 else
9377         cf_path_syntax="$ac_default_prefix"
9378 fi
9379
9380 case ".$cf_src_path" in
9381 (.\$\(*\)*|.\'*\'*)
9382         ;;
9383 (..|./*|.\\*)
9384         ;;
9385 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9386         ;;
9387 (.\$\{*prefix\}*|.\$\{*dir\}*)
9388         eval cf_src_path="$cf_src_path"
9389         case ".$cf_src_path" in
9390         (.NONE/*)
9391                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9392                 ;;
9393         esac
9394         ;;
9395 (.no|.NONE/*)
9396         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9397         ;;
9398 (*)
9399         { { echo "$as_me:9399: error: expected a pathname, not \"$cf_src_path\"" >&5
9400 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9401    { (exit 1); exit 1; }; }
9402         ;;
9403 esac
9404
9405   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9406   cf_dst_path="${cf_dst_path}${cf_src_path}"
9407 done
9408 IFS="$ac_save_ifs"
9409
9410 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9411 # so we have to check/work around.  We do prefer the result of "eval"...
9412 eval cf_dst_eval="$cf_dst_path"
9413 case "x$cf_dst_eval" in
9414 (xNONE*)
9415         TERMPATH=$cf_dst_path
9416         ;;
9417 (*)
9418         TERMPATH="$cf_dst_eval"
9419         ;;
9420 esac
9421
9422         echo "$as_me:9422: result: $TERMPATH" >&5
9423 echo "${ECHO_T}$TERMPATH" >&6
9424         test -n "$TERMPATH" &&
9425 cat >>confdefs.h <<EOF
9426 #define TERMPATH "$TERMPATH"
9427 EOF
9428
9429         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9430         echo "$as_me:9430: checking if fast termcap-loader is needed" >&5
9431 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9432
9433 # Check whether --enable-getcap or --disable-getcap was given.
9434 if test "${enable_getcap+set}" = set; then
9435   enableval="$enable_getcap"
9436   with_getcap=$enableval
9437 else
9438   with_getcap=no
9439 fi;
9440         echo "$as_me:9440: result: $with_getcap" >&5
9441 echo "${ECHO_T}$with_getcap" >&6
9442         test "x$with_getcap" = "xyes" &&
9443 cat >>confdefs.h <<\EOF
9444 #define USE_GETCAP 1
9445 EOF
9446
9447         echo "$as_me:9447: checking if translated termcaps will be cached in ~/.terminfo" >&5
9448 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9449
9450 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9451 if test "${enable_getcap_cache+set}" = set; then
9452   enableval="$enable_getcap_cache"
9453   with_getcap_cache=$enableval
9454 else
9455   with_getcap_cache=no
9456 fi;
9457         echo "$as_me:9457: result: $with_getcap_cache" >&5
9458 echo "${ECHO_T}$with_getcap_cache" >&6
9459         test "x$with_getcap_cache" = "xyes" &&
9460 cat >>confdefs.h <<\EOF
9461 #define USE_GETCAP_CACHE 1
9462 EOF
9463
9464 fi
9465
9466 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9467 echo "$as_me:9467: checking if ~/.terminfo is wanted" >&5
9468 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9469
9470 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9471 if test "${enable_home_terminfo+set}" = set; then
9472   enableval="$enable_home_terminfo"
9473   with_home_terminfo=$enableval
9474 else
9475   with_home_terminfo=yes
9476 fi;
9477 echo "$as_me:9477: result: $with_home_terminfo" >&5
9478 echo "${ECHO_T}$with_home_terminfo" >&6
9479 test "x$with_home_terminfo" = "xyes" &&
9480 cat >>confdefs.h <<\EOF
9481 #define USE_HOME_TERMINFO 1
9482 EOF
9483
9484 echo "$as_me:9484: checking if you want to permit root to use ncurses environment variables" >&5
9485 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9486
9487 # Check whether --enable-root-environ or --disable-root-environ was given.
9488 if test "${enable_root_environ+set}" = set; then
9489   enableval="$enable_root_environ"
9490   with_root_environ=$enableval
9491 else
9492   with_root_environ=yes
9493 fi;
9494 echo "$as_me:9494: result: $with_root_environ" >&5
9495 echo "${ECHO_T}$with_root_environ" >&6
9496 test "x$with_root_environ" = xyes &&
9497 cat >>confdefs.h <<\EOF
9498 #define USE_ROOT_ENVIRON 1
9499 EOF
9500
9501 echo "$as_me:9501: checking if you want to permit setuid programs to access all files" >&5
9502 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9503
9504 # Check whether --enable-root-environ or --disable-root-environ was given.
9505 if test "${enable_root_environ+set}" = set; then
9506   enableval="$enable_root_environ"
9507   with_root_access=$enableval
9508 else
9509   with_root_access=yes
9510 fi;
9511 echo "$as_me:9511: result: $with_root_access" >&5
9512 echo "${ECHO_T}$with_root_access" >&6
9513 test "x$with_root_access" = xyes &&
9514 cat >>confdefs.h <<\EOF
9515 #define USE_ROOT_ACCESS 1
9516 EOF
9517
9518 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9519 ###   to reduce storage requirements for the terminfo database.
9520
9521 for ac_header in \
9522 unistd.h \
9523
9524 do
9525 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9526 echo "$as_me:9526: checking for $ac_header" >&5
9527 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9528 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9529   echo $ECHO_N "(cached) $ECHO_C" >&6
9530 else
9531   cat >"conftest.$ac_ext" <<_ACEOF
9532 #line 9532 "configure"
9533 #include "confdefs.h"
9534 #include <$ac_header>
9535 _ACEOF
9536 if { (eval echo "$as_me:9536: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9537   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9538   ac_status=$?
9539   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9540   rm -f conftest.er1
9541   cat conftest.err >&5
9542   echo "$as_me:9542: \$? = $ac_status" >&5
9543   (exit "$ac_status"); } >/dev/null; then
9544   if test -s conftest.err; then
9545     ac_cpp_err=$ac_c_preproc_warn_flag
9546   else
9547     ac_cpp_err=
9548   fi
9549 else
9550   ac_cpp_err=yes
9551 fi
9552 if test -z "$ac_cpp_err"; then
9553   eval "$as_ac_Header=yes"
9554 else
9555   echo "$as_me: failed program was:" >&5
9556   cat "conftest.$ac_ext" >&5
9557   eval "$as_ac_Header=no"
9558 fi
9559 rm -f conftest.err "conftest.$ac_ext"
9560 fi
9561 echo "$as_me:9561: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9562 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9563 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9564   cat >>confdefs.h <<EOF
9565 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9566 EOF
9567
9568 fi
9569 done
9570
9571 for ac_func in \
9572         remove \
9573         unlink
9574 do
9575 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9576 echo "$as_me:9576: checking for $ac_func" >&5
9577 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9578 if eval "test \"\${$as_ac_var+set}\" = set"; then
9579   echo $ECHO_N "(cached) $ECHO_C" >&6
9580 else
9581   cat >"conftest.$ac_ext" <<_ACEOF
9582 #line 9582 "configure"
9583 #include "confdefs.h"
9584 #define $ac_func autoconf_temporary
9585 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9586 #undef $ac_func
9587
9588 #ifdef __cplusplus
9589 extern "C"
9590 #endif
9591
9592 /* We use char because int might match the return type of a gcc2
9593    builtin and then its argument prototype would still apply.  */
9594 char $ac_func (void);
9595
9596 int
9597 main (void)
9598 {
9599
9600 /* The GNU C library defines stubs for functions which it implements
9601     to always fail with ENOSYS.  Some functions are actually named
9602     something starting with __ and the normal name is an alias.  */
9603 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9604 #error found stub for $ac_func
9605 #endif
9606
9607         return $ac_func ();
9608   ;
9609   return 0;
9610 }
9611 _ACEOF
9612 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9613 if { (eval echo "$as_me:9613: \"$ac_link\"") >&5
9614   (eval $ac_link) 2>&5
9615   ac_status=$?
9616   echo "$as_me:9616: \$? = $ac_status" >&5
9617   (exit "$ac_status"); } &&
9618          { ac_try='test -s "conftest$ac_exeext"'
9619   { (eval echo "$as_me:9619: \"$ac_try\"") >&5
9620   (eval $ac_try) 2>&5
9621   ac_status=$?
9622   echo "$as_me:9622: \$? = $ac_status" >&5
9623   (exit "$ac_status"); }; }; then
9624   eval "$as_ac_var=yes"
9625 else
9626   echo "$as_me: failed program was:" >&5
9627 cat "conftest.$ac_ext" >&5
9628 eval "$as_ac_var=no"
9629 fi
9630 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9631 fi
9632 echo "$as_me:9632: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9633 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9634 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9635   cat >>confdefs.h <<EOF
9636 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9637 EOF
9638
9639 fi
9640 done
9641
9642 if test "$cross_compiling" = yes ; then
9643
9644 for ac_func in \
9645                 link \
9646                 symlink
9647 do
9648 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9649 echo "$as_me:9649: checking for $ac_func" >&5
9650 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9651 if eval "test \"\${$as_ac_var+set}\" = set"; then
9652   echo $ECHO_N "(cached) $ECHO_C" >&6
9653 else
9654   cat >"conftest.$ac_ext" <<_ACEOF
9655 #line 9655 "configure"
9656 #include "confdefs.h"
9657 #define $ac_func autoconf_temporary
9658 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9659 #undef $ac_func
9660
9661 #ifdef __cplusplus
9662 extern "C"
9663 #endif
9664
9665 /* We use char because int might match the return type of a gcc2
9666    builtin and then its argument prototype would still apply.  */
9667 char $ac_func (void);
9668
9669 int
9670 main (void)
9671 {
9672
9673 /* The GNU C library defines stubs for functions which it implements
9674     to always fail with ENOSYS.  Some functions are actually named
9675     something starting with __ and the normal name is an alias.  */
9676 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9677 #error found stub for $ac_func
9678 #endif
9679
9680         return $ac_func ();
9681   ;
9682   return 0;
9683 }
9684 _ACEOF
9685 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9686 if { (eval echo "$as_me:9686: \"$ac_link\"") >&5
9687   (eval $ac_link) 2>&5
9688   ac_status=$?
9689   echo "$as_me:9689: \$? = $ac_status" >&5
9690   (exit "$ac_status"); } &&
9691          { ac_try='test -s "conftest$ac_exeext"'
9692   { (eval echo "$as_me:9692: \"$ac_try\"") >&5
9693   (eval $ac_try) 2>&5
9694   ac_status=$?
9695   echo "$as_me:9695: \$? = $ac_status" >&5
9696   (exit "$ac_status"); }; }; then
9697   eval "$as_ac_var=yes"
9698 else
9699   echo "$as_me: failed program was:" >&5
9700 cat "conftest.$ac_ext" >&5
9701 eval "$as_ac_var=no"
9702 fi
9703 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9704 fi
9705 echo "$as_me:9705: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9706 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9707 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9708   cat >>confdefs.h <<EOF
9709 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9710 EOF
9711
9712 fi
9713 done
9714
9715 else
9716         echo "$as_me:9716: checking if link/symlink functions work" >&5
9717 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9718 if test "${cf_cv_link_funcs+set}" = set; then
9719   echo $ECHO_N "(cached) $ECHO_C" >&6
9720 else
9721
9722                 cf_cv_link_funcs=
9723                 for cf_func in link symlink ; do
9724                         if test "$cross_compiling" = yes; then
9725
9726                         eval 'ac_cv_func_'$cf_func'=error'
9727 else
9728   cat >"conftest.$ac_ext" <<_ACEOF
9729 #line 9729 "configure"
9730 #include "confdefs.h"
9731
9732 #include <stdio.h>
9733 #include <sys/types.h>
9734 #include <sys/stat.h>
9735 #ifdef HAVE_UNISTD_H
9736 #include <unistd.h>
9737 #endif
9738 int main(void)
9739 {
9740         int fail = 0;
9741         char *src = "conftest.tmp";
9742         char *dst = "conftest.chk";
9743         struct stat src_sb, dst_sb;
9744         FILE *fp = fopen(src, "w");
9745         if (fp == 0) { fail = 3; } else {
9746                 fclose(fp); stat(src, &src_sb);
9747                 if ($cf_func(src, dst) < 0) {
9748                         fail = 1;
9749                 } else if (stat(dst, &dst_sb) < 0) {
9750                         fail = 2;
9751                 } else {
9752                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9753                         if (diff < 0) diff = -diff;
9754                         if (diff > 2) fail = 3;
9755                 }
9756         }
9757 #ifdef HAVE_UNLINK
9758         unlink(dst); unlink(src);
9759 #else
9760         remove(dst); remove(src);
9761 #endif
9762         ${cf_cv_main_return:-return} (fail);
9763 }
9764
9765 _ACEOF
9766 rm -f "conftest$ac_exeext"
9767 if { (eval echo "$as_me:9767: \"$ac_link\"") >&5
9768   (eval $ac_link) 2>&5
9769   ac_status=$?
9770   echo "$as_me:9770: \$? = $ac_status" >&5
9771   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9772   { (eval echo "$as_me:9772: \"$ac_try\"") >&5
9773   (eval $ac_try) 2>&5
9774   ac_status=$?
9775   echo "$as_me:9775: \$? = $ac_status" >&5
9776   (exit "$ac_status"); }; }; then
9777
9778                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9779                         eval 'ac_cv_func_'$cf_func'=yes'
9780 else
9781   echo "$as_me: program exited with status $ac_status" >&5
9782 echo "$as_me: failed program was:" >&5
9783 cat "conftest.$ac_ext" >&5
9784
9785                         eval 'ac_cv_func_'$cf_func'=no'
9786 fi
9787 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9788 fi
9789                 done
9790                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9791
9792 fi
9793 echo "$as_me:9793: result: $cf_cv_link_funcs" >&5
9794 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9795         test "$ac_cv_func_link"    = yes &&
9796 cat >>confdefs.h <<\EOF
9797 #define HAVE_LINK 1
9798 EOF
9799
9800         test "$ac_cv_func_symlink" = yes &&
9801 cat >>confdefs.h <<\EOF
9802 #define HAVE_SYMLINK 1
9803 EOF
9804
9805 fi
9806
9807 with_links=no
9808 with_symlinks=no
9809
9810 # soft links (symbolic links) are useful for some systems where hard links do
9811 # not work, or to make it simpler to copy terminfo trees around.
9812 if test "x$ac_cv_func_symlink" = xyes ; then
9813         echo "$as_me:9813: checking if tic should use symbolic links" >&5
9814 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9815
9816 # Check whether --enable-symlinks or --disable-symlinks was given.
9817 if test "${enable_symlinks+set}" = set; then
9818   enableval="$enable_symlinks"
9819   with_symlinks=$enableval
9820 else
9821   with_symlinks=no
9822 fi;
9823         echo "$as_me:9823: result: $with_symlinks" >&5
9824 echo "${ECHO_T}$with_symlinks" >&6
9825 fi
9826
9827 # If we have hard links and did not choose to use soft links instead, there is
9828 # no reason to make this choice optional - use the hard links.
9829 if test "$with_symlinks" = no ; then
9830         echo "$as_me:9830: checking if tic should use hard links" >&5
9831 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9832         if test "x$ac_cv_func_link" = xyes ; then
9833                 with_links=yes
9834         else
9835                 with_links=no
9836         fi
9837         echo "$as_me:9837: result: $with_links" >&5
9838 echo "${ECHO_T}$with_links" >&6
9839 fi
9840
9841 test "x$with_links" = xyes &&
9842 cat >>confdefs.h <<\EOF
9843 #define USE_LINKS 1
9844 EOF
9845
9846 test "x$with_symlinks" = xyes &&
9847 cat >>confdefs.h <<\EOF
9848 #define USE_SYMLINKS 1
9849 EOF
9850
9851 ###   use option --enable-broken-linker to force on use of broken-linker support
9852
9853 echo "$as_me:9853: checking if you want broken-linker support code" >&5
9854 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9855
9856 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9857 if test "${enable_broken_linker+set}" = set; then
9858   enableval="$enable_broken_linker"
9859   with_broken_linker=$enableval
9860 else
9861   with_broken_linker=no
9862 fi;
9863 echo "$as_me:9863: result: $with_broken_linker" >&5
9864 echo "${ECHO_T}$with_broken_linker" >&6
9865
9866 : "${BROKEN_LINKER:=0}"
9867 if test "x$with_broken_linker" = xyes ; then
9868
9869 cat >>confdefs.h <<\EOF
9870 #define BROKEN_LINKER 1
9871 EOF
9872
9873         BROKEN_LINKER=1
9874 fi
9875
9876 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9877 echo "$as_me:9877: checking if tputs should process BSD-style prefix padding" >&5
9878 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9879
9880 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9881 if test "${enable_bsdpad+set}" = set; then
9882   enableval="$enable_bsdpad"
9883   with_bsdpad=$enableval
9884 else
9885   with_bsdpad=no
9886 fi;
9887 echo "$as_me:9887: result: $with_bsdpad" >&5
9888 echo "${ECHO_T}$with_bsdpad" >&6
9889 test "x$with_bsdpad" = xyes &&
9890 cat >>confdefs.h <<\EOF
9891 #define BSD_TPUTS 1
9892 EOF
9893
9894 ###   use option --enable-widec to turn on use of wide-character support
9895 NCURSES_CH_T=chtype
9896 NCURSES_LIBUTF8=0
9897
9898 NEED_WCHAR_H=0
9899 NCURSES_MBSTATE_T=0
9900 NCURSES_WCHAR_T=0
9901 NCURSES_WINT_T=0
9902
9903 # Check to define _XOPEN_SOURCE "automatically"
9904 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9905
9906 echo "$as_me:9906: checking if the POSIX test-macros are already defined" >&5
9907 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9908 if test "${cf_cv_posix_visible+set}" = set; then
9909   echo $ECHO_N "(cached) $ECHO_C" >&6
9910 else
9911
9912 cat >"conftest.$ac_ext" <<_ACEOF
9913 #line 9913 "configure"
9914 #include "confdefs.h"
9915 #include <stdio.h>
9916 int
9917 main (void)
9918 {
9919
9920 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9921         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9922         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9923         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9924 #error conflicting symbols found
9925 #endif
9926
9927   ;
9928   return 0;
9929 }
9930 _ACEOF
9931 rm -f "conftest.$ac_objext"
9932 if { (eval echo "$as_me:9932: \"$ac_compile\"") >&5
9933   (eval $ac_compile) 2>&5
9934   ac_status=$?
9935   echo "$as_me:9935: \$? = $ac_status" >&5
9936   (exit "$ac_status"); } &&
9937          { ac_try='test -s "conftest.$ac_objext"'
9938   { (eval echo "$as_me:9938: \"$ac_try\"") >&5
9939   (eval $ac_try) 2>&5
9940   ac_status=$?
9941   echo "$as_me:9941: \$? = $ac_status" >&5
9942   (exit "$ac_status"); }; }; then
9943   cf_cv_posix_visible=no
9944 else
9945   echo "$as_me: failed program was:" >&5
9946 cat "conftest.$ac_ext" >&5
9947 cf_cv_posix_visible=yes
9948 fi
9949 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9950
9951 fi
9952 echo "$as_me:9952: result: $cf_cv_posix_visible" >&5
9953 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9954
9955 if test "$cf_cv_posix_visible" = no; then
9956
9957 cf_XOPEN_SOURCE=600
9958 cf_POSIX_C_SOURCE=199506L
9959 cf_xopen_source=
9960
9961 case "$host_os" in
9962 (aix[4-7]*)
9963         cf_xopen_source="-D_ALL_SOURCE"
9964         ;;
9965 (msys)
9966         cf_XOPEN_SOURCE=600
9967         ;;
9968 (darwin[0-8].*)
9969         cf_xopen_source="-D_APPLE_C_SOURCE"
9970         ;;
9971 (darwin*)
9972         cf_xopen_source="-D_DARWIN_C_SOURCE"
9973         cf_XOPEN_SOURCE=
9974         ;;
9975 (freebsd*|dragonfly*|midnightbsd*)
9976         # 5.x headers associate
9977         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9978         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9979         cf_POSIX_C_SOURCE=200112L
9980         cf_XOPEN_SOURCE=600
9981         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9982         ;;
9983 (hpux11*)
9984         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9985         ;;
9986 (hpux*)
9987         cf_xopen_source="-D_HPUX_SOURCE"
9988         ;;
9989 (irix[56].*)
9990         cf_xopen_source="-D_SGI_SOURCE"
9991         cf_XOPEN_SOURCE=
9992         ;;
9993 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9994
9995 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9996
9997 echo "$as_me:9997: checking if this is the GNU C library" >&5
9998 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9999 if test "${cf_cv_gnu_library+set}" = set; then
10000   echo $ECHO_N "(cached) $ECHO_C" >&6
10001 else
10002
10003 cat >"conftest.$ac_ext" <<_ACEOF
10004 #line 10004 "configure"
10005 #include "confdefs.h"
10006 #include <sys/types.h>
10007 int
10008 main (void)
10009 {
10010
10011         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10012                 return 0;
10013         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10014                 return 0;
10015         #else
10016         #       error not GNU C library
10017         #endif
10018   ;
10019   return 0;
10020 }
10021 _ACEOF
10022 rm -f "conftest.$ac_objext"
10023 if { (eval echo "$as_me:10023: \"$ac_compile\"") >&5
10024   (eval $ac_compile) 2>&5
10025   ac_status=$?
10026   echo "$as_me:10026: \$? = $ac_status" >&5
10027   (exit "$ac_status"); } &&
10028          { ac_try='test -s "conftest.$ac_objext"'
10029   { (eval echo "$as_me:10029: \"$ac_try\"") >&5
10030   (eval $ac_try) 2>&5
10031   ac_status=$?
10032   echo "$as_me:10032: \$? = $ac_status" >&5
10033   (exit "$ac_status"); }; }; then
10034   cf_cv_gnu_library=yes
10035 else
10036   echo "$as_me: failed program was:" >&5
10037 cat "conftest.$ac_ext" >&5
10038 cf_cv_gnu_library=no
10039 fi
10040 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10041
10042 fi
10043 echo "$as_me:10043: result: $cf_cv_gnu_library" >&5
10044 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10045
10046 if test x$cf_cv_gnu_library = xyes; then
10047
10048         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10049         # was changed to help a little.  newlib incorporated the change about 4
10050         # years later.
10051         echo "$as_me:10051: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10052 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10053 if test "${cf_cv_gnu_library_219+set}" = set; then
10054   echo $ECHO_N "(cached) $ECHO_C" >&6
10055 else
10056
10057                 cf_save="$CPPFLAGS"
10058
10059         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10060         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10061
10062                 cat >"conftest.$ac_ext" <<_ACEOF
10063 #line 10063 "configure"
10064 #include "confdefs.h"
10065 #include <sys/types.h>
10066 int
10067 main (void)
10068 {
10069
10070                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10071                                 return 0;
10072                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10073                                 return 0;
10074                         #else
10075                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10076                         #endif
10077   ;
10078   return 0;
10079 }
10080 _ACEOF
10081 rm -f "conftest.$ac_objext"
10082 if { (eval echo "$as_me:10082: \"$ac_compile\"") >&5
10083   (eval $ac_compile) 2>&5
10084   ac_status=$?
10085   echo "$as_me:10085: \$? = $ac_status" >&5
10086   (exit "$ac_status"); } &&
10087          { ac_try='test -s "conftest.$ac_objext"'
10088   { (eval echo "$as_me:10088: \"$ac_try\"") >&5
10089   (eval $ac_try) 2>&5
10090   ac_status=$?
10091   echo "$as_me:10091: \$? = $ac_status" >&5
10092   (exit "$ac_status"); }; }; then
10093   cf_cv_gnu_library_219=yes
10094 else
10095   echo "$as_me: failed program was:" >&5
10096 cat "conftest.$ac_ext" >&5
10097 cf_cv_gnu_library_219=no
10098 fi
10099 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10100                 CPPFLAGS="$cf_save"
10101
10102 fi
10103 echo "$as_me:10103: result: $cf_cv_gnu_library_219" >&5
10104 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10105
10106         if test "x$cf_cv_gnu_library_219" = xyes; then
10107                 cf_save="$CPPFLAGS"
10108                 echo "$as_me:10108: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10109 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10110 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10111   echo $ECHO_N "(cached) $ECHO_C" >&6
10112 else
10113
10114 cf_fix_cppflags=no
10115 cf_new_cflags=
10116 cf_new_cppflags=
10117 cf_new_extra_cppflags=
10118
10119 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10120 do
10121 case "$cf_fix_cppflags" in
10122 (no)
10123         case "$cf_add_cflags" in
10124         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10125                 case "$cf_add_cflags" in
10126                 (-D*)
10127                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10128
10129                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10130                                 && test -z "${cf_tst_cflags}" \
10131                                 && cf_fix_cppflags=yes
10132
10133                         if test "$cf_fix_cppflags" = yes ; then
10134
10135         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10136         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10137
10138                                 continue
10139                         elif test "${cf_tst_cflags}" = "\"'" ; then
10140
10141         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10142         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10143
10144                                 continue
10145                         fi
10146                         ;;
10147                 esac
10148                 case "$CPPFLAGS" in
10149                 (*$cf_add_cflags)
10150                         ;;
10151                 (*)
10152                         case "$cf_add_cflags" in
10153                         (-D*)
10154                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10155
10156 CPPFLAGS=`echo "$CPPFLAGS" | \
10157         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10158                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10159
10160                                 ;;
10161                         esac
10162
10163         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10164         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10165
10166                         ;;
10167                 esac
10168                 ;;
10169         (*)
10170
10171         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10172         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10173
10174                 ;;
10175         esac
10176         ;;
10177 (yes)
10178
10179         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10180         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10181
10182         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10183
10184         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10185                 && test -z "${cf_tst_cflags}" \
10186                 && cf_fix_cppflags=no
10187         ;;
10188 esac
10189 done
10190
10191 if test -n "$cf_new_cflags" ; then
10192
10193         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10194         CFLAGS="${CFLAGS}$cf_new_cflags"
10195
10196 fi
10197
10198 if test -n "$cf_new_cppflags" ; then
10199
10200         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10201         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10202
10203 fi
10204
10205 if test -n "$cf_new_extra_cppflags" ; then
10206
10207         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10208         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10209
10210 fi
10211
10212                         cat >"conftest.$ac_ext" <<_ACEOF
10213 #line 10213 "configure"
10214 #include "confdefs.h"
10215
10216                                 #include <limits.h>
10217                                 #include <sys/types.h>
10218
10219 int
10220 main (void)
10221 {
10222
10223                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10224                                         return 0;
10225                                 #else
10226                                 #       error GNU C library is too old
10227                                 #endif
10228   ;
10229   return 0;
10230 }
10231 _ACEOF
10232 rm -f "conftest.$ac_objext"
10233 if { (eval echo "$as_me:10233: \"$ac_compile\"") >&5
10234   (eval $ac_compile) 2>&5
10235   ac_status=$?
10236   echo "$as_me:10236: \$? = $ac_status" >&5
10237   (exit "$ac_status"); } &&
10238          { ac_try='test -s "conftest.$ac_objext"'
10239   { (eval echo "$as_me:10239: \"$ac_try\"") >&5
10240   (eval $ac_try) 2>&5
10241   ac_status=$?
10242   echo "$as_me:10242: \$? = $ac_status" >&5
10243   (exit "$ac_status"); }; }; then
10244   cf_cv_gnu_dftsrc_219=yes
10245 else
10246   echo "$as_me: failed program was:" >&5
10247 cat "conftest.$ac_ext" >&5
10248 cf_cv_gnu_dftsrc_219=no
10249 fi
10250 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10251
10252 fi
10253 echo "$as_me:10253: result: $cf_cv_gnu_dftsrc_219" >&5
10254 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10255                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10256         else
10257                 cf_cv_gnu_dftsrc_219=maybe
10258         fi
10259
10260         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10261
10262                 echo "$as_me:10262: checking if we must define _GNU_SOURCE" >&5
10263 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10264 if test "${cf_cv_gnu_source+set}" = set; then
10265   echo $ECHO_N "(cached) $ECHO_C" >&6
10266 else
10267
10268                 cat >"conftest.$ac_ext" <<_ACEOF
10269 #line 10269 "configure"
10270 #include "confdefs.h"
10271 #include <sys/types.h>
10272 int
10273 main (void)
10274 {
10275
10276                         #ifndef _XOPEN_SOURCE
10277                         #error  expected _XOPEN_SOURCE to be defined
10278                         #endif
10279   ;
10280   return 0;
10281 }
10282 _ACEOF
10283 rm -f "conftest.$ac_objext"
10284 if { (eval echo "$as_me:10284: \"$ac_compile\"") >&5
10285   (eval $ac_compile) 2>&5
10286   ac_status=$?
10287   echo "$as_me:10287: \$? = $ac_status" >&5
10288   (exit "$ac_status"); } &&
10289          { ac_try='test -s "conftest.$ac_objext"'
10290   { (eval echo "$as_me:10290: \"$ac_try\"") >&5
10291   (eval $ac_try) 2>&5
10292   ac_status=$?
10293   echo "$as_me:10293: \$? = $ac_status" >&5
10294   (exit "$ac_status"); }; }; then
10295   cf_cv_gnu_source=no
10296 else
10297   echo "$as_me: failed program was:" >&5
10298 cat "conftest.$ac_ext" >&5
10299 cf_save="$CPPFLAGS"
10300
10301 cf_fix_cppflags=no
10302 cf_new_cflags=
10303 cf_new_cppflags=
10304 cf_new_extra_cppflags=
10305
10306 for cf_add_cflags in -D_GNU_SOURCE
10307 do
10308 case "$cf_fix_cppflags" in
10309 (no)
10310         case "$cf_add_cflags" in
10311         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10312                 case "$cf_add_cflags" in
10313                 (-D*)
10314                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10315
10316                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10317                                 && test -z "${cf_tst_cflags}" \
10318                                 && cf_fix_cppflags=yes
10319
10320                         if test "$cf_fix_cppflags" = yes ; then
10321
10322         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10323         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10324
10325                                 continue
10326                         elif test "${cf_tst_cflags}" = "\"'" ; then
10327
10328         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10329         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10330
10331                                 continue
10332                         fi
10333                         ;;
10334                 esac
10335                 case "$CPPFLAGS" in
10336                 (*$cf_add_cflags)
10337                         ;;
10338                 (*)
10339                         case "$cf_add_cflags" in
10340                         (-D*)
10341                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10342
10343 CPPFLAGS=`echo "$CPPFLAGS" | \
10344         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10345                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10346
10347                                 ;;
10348                         esac
10349
10350         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10351         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10352
10353                         ;;
10354                 esac
10355                 ;;
10356         (*)
10357
10358         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10359         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10360
10361                 ;;
10362         esac
10363         ;;
10364 (yes)
10365
10366         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10367         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10368
10369         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10370
10371         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10372                 && test -z "${cf_tst_cflags}" \
10373                 && cf_fix_cppflags=no
10374         ;;
10375 esac
10376 done
10377
10378 if test -n "$cf_new_cflags" ; then
10379
10380         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10381         CFLAGS="${CFLAGS}$cf_new_cflags"
10382
10383 fi
10384
10385 if test -n "$cf_new_cppflags" ; then
10386
10387         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10388         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10389
10390 fi
10391
10392 if test -n "$cf_new_extra_cppflags" ; then
10393
10394         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10395         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10396
10397 fi
10398
10399                          cat >"conftest.$ac_ext" <<_ACEOF
10400 #line 10400 "configure"
10401 #include "confdefs.h"
10402 #include <sys/types.h>
10403 int
10404 main (void)
10405 {
10406
10407                                 #ifdef _XOPEN_SOURCE
10408                                 #error  expected _XOPEN_SOURCE to be undefined
10409                                 #endif
10410   ;
10411   return 0;
10412 }
10413 _ACEOF
10414 rm -f "conftest.$ac_objext"
10415 if { (eval echo "$as_me:10415: \"$ac_compile\"") >&5
10416   (eval $ac_compile) 2>&5
10417   ac_status=$?
10418   echo "$as_me:10418: \$? = $ac_status" >&5
10419   (exit "$ac_status"); } &&
10420          { ac_try='test -s "conftest.$ac_objext"'
10421   { (eval echo "$as_me:10421: \"$ac_try\"") >&5
10422   (eval $ac_try) 2>&5
10423   ac_status=$?
10424   echo "$as_me:10424: \$? = $ac_status" >&5
10425   (exit "$ac_status"); }; }; then
10426   cf_cv_gnu_source=no
10427 else
10428   echo "$as_me: failed program was:" >&5
10429 cat "conftest.$ac_ext" >&5
10430 cf_cv_gnu_source=yes
10431 fi
10432 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10433                         CPPFLAGS="$cf_save"
10434
10435 fi
10436 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10437
10438 fi
10439 echo "$as_me:10439: result: $cf_cv_gnu_source" >&5
10440 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10441
10442                 if test "$cf_cv_gnu_source" = yes
10443                 then
10444                 echo "$as_me:10444: checking if we should also define _DEFAULT_SOURCE" >&5
10445 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10446 if test "${cf_cv_default_source+set}" = set; then
10447   echo $ECHO_N "(cached) $ECHO_C" >&6
10448 else
10449
10450         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10451         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10452
10453                         cat >"conftest.$ac_ext" <<_ACEOF
10454 #line 10454 "configure"
10455 #include "confdefs.h"
10456 #include <sys/types.h>
10457 int
10458 main (void)
10459 {
10460
10461                                 #ifdef _DEFAULT_SOURCE
10462                                 #error  expected _DEFAULT_SOURCE to be undefined
10463                                 #endif
10464   ;
10465   return 0;
10466 }
10467 _ACEOF
10468 rm -f "conftest.$ac_objext"
10469 if { (eval echo "$as_me:10469: \"$ac_compile\"") >&5
10470   (eval $ac_compile) 2>&5
10471   ac_status=$?
10472   echo "$as_me:10472: \$? = $ac_status" >&5
10473   (exit "$ac_status"); } &&
10474          { ac_try='test -s "conftest.$ac_objext"'
10475   { (eval echo "$as_me:10475: \"$ac_try\"") >&5
10476   (eval $ac_try) 2>&5
10477   ac_status=$?
10478   echo "$as_me:10478: \$? = $ac_status" >&5
10479   (exit "$ac_status"); }; }; then
10480   cf_cv_default_source=no
10481 else
10482   echo "$as_me: failed program was:" >&5
10483 cat "conftest.$ac_ext" >&5
10484 cf_cv_default_source=yes
10485 fi
10486 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10487
10488 fi
10489 echo "$as_me:10489: result: $cf_cv_default_source" >&5
10490 echo "${ECHO_T}$cf_cv_default_source" >&6
10491                         if test "$cf_cv_default_source" = yes
10492                         then
10493
10494         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10495         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10496
10497                         fi
10498                 fi
10499         fi
10500
10501 fi
10502
10503         ;;
10504 (minix*)
10505         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10506         ;;
10507 (mirbsd*)
10508         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10509         cf_XOPEN_SOURCE=
10510
10511 if test "$cf_cv_posix_visible" = no; then
10512
10513 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10514
10515 cf_save_CFLAGS="$CFLAGS"
10516 cf_save_CPPFLAGS="$CPPFLAGS"
10517
10518 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10519         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10520                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10521
10522 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10523         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10524                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10525
10526 echo "$as_me:10526: checking if we should define _POSIX_C_SOURCE" >&5
10527 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10528 if test "${cf_cv_posix_c_source+set}" = set; then
10529   echo $ECHO_N "(cached) $ECHO_C" >&6
10530 else
10531
10532 echo "${as_me:-configure}:10532: testing if the symbol is already defined go no further ..." 1>&5
10533
10534         cat >"conftest.$ac_ext" <<_ACEOF
10535 #line 10535 "configure"
10536 #include "confdefs.h"
10537 #include <sys/types.h>
10538 int
10539 main (void)
10540 {
10541
10542 #ifndef _POSIX_C_SOURCE
10543 make an error
10544 #endif
10545   ;
10546   return 0;
10547 }
10548 _ACEOF
10549 rm -f "conftest.$ac_objext"
10550 if { (eval echo "$as_me:10550: \"$ac_compile\"") >&5
10551   (eval $ac_compile) 2>&5
10552   ac_status=$?
10553   echo "$as_me:10553: \$? = $ac_status" >&5
10554   (exit "$ac_status"); } &&
10555          { ac_try='test -s "conftest.$ac_objext"'
10556   { (eval echo "$as_me:10556: \"$ac_try\"") >&5
10557   (eval $ac_try) 2>&5
10558   ac_status=$?
10559   echo "$as_me:10559: \$? = $ac_status" >&5
10560   (exit "$ac_status"); }; }; then
10561   cf_cv_posix_c_source=no
10562 else
10563   echo "$as_me: failed program was:" >&5
10564 cat "conftest.$ac_ext" >&5
10565 cf_want_posix_source=no
10566          case .$cf_POSIX_C_SOURCE in
10567          (.[12]??*)
10568                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10569                 ;;
10570          (.2)
10571                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10572                 cf_want_posix_source=yes
10573                 ;;
10574          (.*)
10575                 cf_want_posix_source=yes
10576                 ;;
10577          esac
10578          if test "$cf_want_posix_source" = yes ; then
10579                 cat >"conftest.$ac_ext" <<_ACEOF
10580 #line 10580 "configure"
10581 #include "confdefs.h"
10582 #include <sys/types.h>
10583 int
10584 main (void)
10585 {
10586
10587 #ifdef _POSIX_SOURCE
10588 make an error
10589 #endif
10590   ;
10591   return 0;
10592 }
10593 _ACEOF
10594 rm -f "conftest.$ac_objext"
10595 if { (eval echo "$as_me:10595: \"$ac_compile\"") >&5
10596   (eval $ac_compile) 2>&5
10597   ac_status=$?
10598   echo "$as_me:10598: \$? = $ac_status" >&5
10599   (exit "$ac_status"); } &&
10600          { ac_try='test -s "conftest.$ac_objext"'
10601   { (eval echo "$as_me:10601: \"$ac_try\"") >&5
10602   (eval $ac_try) 2>&5
10603   ac_status=$?
10604   echo "$as_me:10604: \$? = $ac_status" >&5
10605   (exit "$ac_status"); }; }; then
10606   :
10607 else
10608   echo "$as_me: failed program was:" >&5
10609 cat "conftest.$ac_ext" >&5
10610 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10611 fi
10612 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10613          fi
10614
10615 echo "${as_me:-configure}:10615: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10616
10617          CFLAGS="$cf_trim_CFLAGS"
10618          CPPFLAGS="$cf_trim_CPPFLAGS"
10619
10620         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10621         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10622
10623 echo "${as_me:-configure}:10623: testing if the second compile does not leave our definition intact error ..." 1>&5
10624
10625          cat >"conftest.$ac_ext" <<_ACEOF
10626 #line 10626 "configure"
10627 #include "confdefs.h"
10628 #include <sys/types.h>
10629 int
10630 main (void)
10631 {
10632
10633 #ifndef _POSIX_C_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   :
10653 else
10654   echo "$as_me: failed program was:" >&5
10655 cat "conftest.$ac_ext" >&5
10656 cf_cv_posix_c_source=no
10657 fi
10658 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10659          CFLAGS="$cf_save_CFLAGS"
10660          CPPFLAGS="$cf_save_CPPFLAGS"
10661
10662 fi
10663 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10664
10665 fi
10666 echo "$as_me:10666: result: $cf_cv_posix_c_source" >&5
10667 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10668
10669 if test "$cf_cv_posix_c_source" != no ; then
10670         CFLAGS="$cf_trim_CFLAGS"
10671         CPPFLAGS="$cf_trim_CPPFLAGS"
10672
10673 cf_fix_cppflags=no
10674 cf_new_cflags=
10675 cf_new_cppflags=
10676 cf_new_extra_cppflags=
10677
10678 for cf_add_cflags in $cf_cv_posix_c_source
10679 do
10680 case "$cf_fix_cppflags" in
10681 (no)
10682         case "$cf_add_cflags" in
10683         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10684                 case "$cf_add_cflags" in
10685                 (-D*)
10686                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10687
10688                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10689                                 && test -z "${cf_tst_cflags}" \
10690                                 && cf_fix_cppflags=yes
10691
10692                         if test "$cf_fix_cppflags" = yes ; then
10693
10694         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10695         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10696
10697                                 continue
10698                         elif test "${cf_tst_cflags}" = "\"'" ; then
10699
10700         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10701         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10702
10703                                 continue
10704                         fi
10705                         ;;
10706                 esac
10707                 case "$CPPFLAGS" in
10708                 (*$cf_add_cflags)
10709                         ;;
10710                 (*)
10711                         case "$cf_add_cflags" in
10712                         (-D*)
10713                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10714
10715 CPPFLAGS=`echo "$CPPFLAGS" | \
10716         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10717                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10718
10719                                 ;;
10720                         esac
10721
10722         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10723         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10724
10725                         ;;
10726                 esac
10727                 ;;
10728         (*)
10729
10730         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10731         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10732
10733                 ;;
10734         esac
10735         ;;
10736 (yes)
10737
10738         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10739         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10740
10741         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10742
10743         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10744                 && test -z "${cf_tst_cflags}" \
10745                 && cf_fix_cppflags=no
10746         ;;
10747 esac
10748 done
10749
10750 if test -n "$cf_new_cflags" ; then
10751
10752         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10753         CFLAGS="${CFLAGS}$cf_new_cflags"
10754
10755 fi
10756
10757 if test -n "$cf_new_cppflags" ; then
10758
10759         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10760         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10761
10762 fi
10763
10764 if test -n "$cf_new_extra_cppflags" ; then
10765
10766         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10767         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10768
10769 fi
10770
10771 fi
10772
10773 fi # cf_cv_posix_visible
10774
10775         ;;
10776 (netbsd*)
10777         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10778         ;;
10779 (openbsd[6-9]*)
10780         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10781         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10782         # Abusing the conformance level is a workaround.
10783         { echo "$as_me:10783: WARNING: this system does not provide usable locale support" >&5
10784 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10785         cf_xopen_source="-D_BSD_SOURCE"
10786         cf_XOPEN_SOURCE=700
10787         ;;
10788 (openbsd[4-5]*)
10789         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10790         cf_xopen_source="-D_BSD_SOURCE"
10791         cf_XOPEN_SOURCE=600
10792         ;;
10793 (openbsd*)
10794         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10795         ;;
10796 (osf[45]*)
10797         cf_xopen_source="-D_OSF_SOURCE"
10798         ;;
10799 (nto-qnx*)
10800         cf_xopen_source="-D_QNX_SOURCE"
10801         ;;
10802 (sco*)
10803         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10804         ;;
10805 (solaris2.*)
10806         cf_xopen_source="-D__EXTENSIONS__"
10807         cf_cv_xopen_source=broken
10808         ;;
10809 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10810         cf_XOPEN_SOURCE=
10811         cf_POSIX_C_SOURCE=
10812         ;;
10813 (*)
10814
10815 echo "$as_me:10815: checking if we should define _XOPEN_SOURCE" >&5
10816 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10817 if test "${cf_cv_xopen_source+set}" = set; then
10818   echo $ECHO_N "(cached) $ECHO_C" >&6
10819 else
10820
10821         cat >"conftest.$ac_ext" <<_ACEOF
10822 #line 10822 "configure"
10823 #include "confdefs.h"
10824
10825 #include <stdlib.h>
10826 #include <string.h>
10827 #include <sys/types.h>
10828
10829 int
10830 main (void)
10831 {
10832
10833 #ifndef _XOPEN_SOURCE
10834 make an error
10835 #endif
10836
10837   ;
10838   return 0;
10839 }
10840 _ACEOF
10841 rm -f "conftest.$ac_objext"
10842 if { (eval echo "$as_me:10842: \"$ac_compile\"") >&5
10843   (eval $ac_compile) 2>&5
10844   ac_status=$?
10845   echo "$as_me:10845: \$? = $ac_status" >&5
10846   (exit "$ac_status"); } &&
10847          { ac_try='test -s "conftest.$ac_objext"'
10848   { (eval echo "$as_me:10848: \"$ac_try\"") >&5
10849   (eval $ac_try) 2>&5
10850   ac_status=$?
10851   echo "$as_me:10851: \$? = $ac_status" >&5
10852   (exit "$ac_status"); }; }; then
10853   cf_cv_xopen_source=no
10854 else
10855   echo "$as_me: failed program was:" >&5
10856 cat "conftest.$ac_ext" >&5
10857 cf_save="$CPPFLAGS"
10858
10859         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10860         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10861
10862          cat >"conftest.$ac_ext" <<_ACEOF
10863 #line 10863 "configure"
10864 #include "confdefs.h"
10865
10866 #include <stdlib.h>
10867 #include <string.h>
10868 #include <sys/types.h>
10869
10870 int
10871 main (void)
10872 {
10873
10874 #ifndef _XOPEN_SOURCE
10875 make an error
10876 #endif
10877
10878   ;
10879   return 0;
10880 }
10881 _ACEOF
10882 rm -f "conftest.$ac_objext"
10883 if { (eval echo "$as_me:10883: \"$ac_compile\"") >&5
10884   (eval $ac_compile) 2>&5
10885   ac_status=$?
10886   echo "$as_me:10886: \$? = $ac_status" >&5
10887   (exit "$ac_status"); } &&
10888          { ac_try='test -s "conftest.$ac_objext"'
10889   { (eval echo "$as_me:10889: \"$ac_try\"") >&5
10890   (eval $ac_try) 2>&5
10891   ac_status=$?
10892   echo "$as_me:10892: \$? = $ac_status" >&5
10893   (exit "$ac_status"); }; }; then
10894   cf_cv_xopen_source=no
10895 else
10896   echo "$as_me: failed program was:" >&5
10897 cat "conftest.$ac_ext" >&5
10898 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10899 fi
10900 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10901                 CPPFLAGS="$cf_save"
10902
10903 fi
10904 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10905
10906 fi
10907 echo "$as_me:10907: result: $cf_cv_xopen_source" >&5
10908 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10909
10910 if test "$cf_cv_xopen_source" != no ; then
10911
10912 CFLAGS=`echo "$CFLAGS" | \
10913         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10914                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10915
10916 CPPFLAGS=`echo "$CPPFLAGS" | \
10917         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10918                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10919
10920         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10921
10922 for cf_add_cflags in $cf_temp_xopen_source
10923 do
10924         case "x$cf_add_cflags" in
10925         (x-[DU]*)
10926
10927 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10928 while true
10929 do
10930         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10931         test "$CFLAGS" != "$cf_old_cflag" || break
10932
10933         CFLAGS="$cf_old_cflag"
10934 done
10935
10936 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10937 while true
10938 do
10939         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10940         test "$CPPFLAGS" != "$cf_old_cflag" || break
10941
10942         CPPFLAGS="$cf_old_cflag"
10943 done
10944
10945                 ;;
10946         esac
10947
10948 cf_fix_cppflags=no
10949 cf_new_cflags=
10950 cf_new_cppflags=
10951 cf_new_extra_cppflags=
10952
10953 for cf_add_cflags in $cf_add_cflags
10954 do
10955 case "$cf_fix_cppflags" in
10956 (no)
10957         case "$cf_add_cflags" in
10958         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10959                 case "$cf_add_cflags" in
10960                 (-D*)
10961                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10962
10963                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10964                                 && test -z "${cf_tst_cflags}" \
10965                                 && cf_fix_cppflags=yes
10966
10967                         if test "$cf_fix_cppflags" = yes ; then
10968
10969         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10970         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10971
10972                                 continue
10973                         elif test "${cf_tst_cflags}" = "\"'" ; then
10974
10975         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10976         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10977
10978                                 continue
10979                         fi
10980                         ;;
10981                 esac
10982                 case "$CPPFLAGS" in
10983                 (*$cf_add_cflags)
10984                         ;;
10985                 (*)
10986                         case "$cf_add_cflags" in
10987                         (-D*)
10988                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10989
10990 CPPFLAGS=`echo "$CPPFLAGS" | \
10991         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10992                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10993
10994                                 ;;
10995                         esac
10996
10997         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10998         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10999
11000                         ;;
11001                 esac
11002                 ;;
11003         (*)
11004
11005         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11006         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11007
11008                 ;;
11009         esac
11010         ;;
11011 (yes)
11012
11013         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11014         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11015
11016         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11017
11018         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11019                 && test -z "${cf_tst_cflags}" \
11020                 && cf_fix_cppflags=no
11021         ;;
11022 esac
11023 done
11024
11025 if test -n "$cf_new_cflags" ; then
11026
11027         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11028         CFLAGS="${CFLAGS}$cf_new_cflags"
11029
11030 fi
11031
11032 if test -n "$cf_new_cppflags" ; then
11033
11034         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11035         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11036
11037 fi
11038
11039 if test -n "$cf_new_extra_cppflags" ; then
11040
11041         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11042         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11043
11044 fi
11045
11046 done
11047
11048 fi
11049
11050         cf_save_xopen_cppflags="$CPPFLAGS"
11051
11052 if test "$cf_cv_posix_visible" = no; then
11053
11054 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11055
11056 cf_save_CFLAGS="$CFLAGS"
11057 cf_save_CPPFLAGS="$CPPFLAGS"
11058
11059 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11060         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11061                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11062
11063 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11064         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11065                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11066
11067 echo "$as_me:11067: checking if we should define _POSIX_C_SOURCE" >&5
11068 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11069 if test "${cf_cv_posix_c_source+set}" = set; then
11070   echo $ECHO_N "(cached) $ECHO_C" >&6
11071 else
11072
11073 echo "${as_me:-configure}:11073: testing if the symbol is already defined go no further ..." 1>&5
11074
11075         cat >"conftest.$ac_ext" <<_ACEOF
11076 #line 11076 "configure"
11077 #include "confdefs.h"
11078 #include <sys/types.h>
11079 int
11080 main (void)
11081 {
11082
11083 #ifndef _POSIX_C_SOURCE
11084 make an error
11085 #endif
11086   ;
11087   return 0;
11088 }
11089 _ACEOF
11090 rm -f "conftest.$ac_objext"
11091 if { (eval echo "$as_me:11091: \"$ac_compile\"") >&5
11092   (eval $ac_compile) 2>&5
11093   ac_status=$?
11094   echo "$as_me:11094: \$? = $ac_status" >&5
11095   (exit "$ac_status"); } &&
11096          { ac_try='test -s "conftest.$ac_objext"'
11097   { (eval echo "$as_me:11097: \"$ac_try\"") >&5
11098   (eval $ac_try) 2>&5
11099   ac_status=$?
11100   echo "$as_me:11100: \$? = $ac_status" >&5
11101   (exit "$ac_status"); }; }; then
11102   cf_cv_posix_c_source=no
11103 else
11104   echo "$as_me: failed program was:" >&5
11105 cat "conftest.$ac_ext" >&5
11106 cf_want_posix_source=no
11107          case .$cf_POSIX_C_SOURCE in
11108          (.[12]??*)
11109                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11110                 ;;
11111          (.2)
11112                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11113                 cf_want_posix_source=yes
11114                 ;;
11115          (.*)
11116                 cf_want_posix_source=yes
11117                 ;;
11118          esac
11119          if test "$cf_want_posix_source" = yes ; then
11120                 cat >"conftest.$ac_ext" <<_ACEOF
11121 #line 11121 "configure"
11122 #include "confdefs.h"
11123 #include <sys/types.h>
11124 int
11125 main (void)
11126 {
11127
11128 #ifdef _POSIX_SOURCE
11129 make an error
11130 #endif
11131   ;
11132   return 0;
11133 }
11134 _ACEOF
11135 rm -f "conftest.$ac_objext"
11136 if { (eval echo "$as_me:11136: \"$ac_compile\"") >&5
11137   (eval $ac_compile) 2>&5
11138   ac_status=$?
11139   echo "$as_me:11139: \$? = $ac_status" >&5
11140   (exit "$ac_status"); } &&
11141          { ac_try='test -s "conftest.$ac_objext"'
11142   { (eval echo "$as_me:11142: \"$ac_try\"") >&5
11143   (eval $ac_try) 2>&5
11144   ac_status=$?
11145   echo "$as_me:11145: \$? = $ac_status" >&5
11146   (exit "$ac_status"); }; }; then
11147   :
11148 else
11149   echo "$as_me: failed program was:" >&5
11150 cat "conftest.$ac_ext" >&5
11151 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11152 fi
11153 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11154          fi
11155
11156 echo "${as_me:-configure}:11156: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11157
11158          CFLAGS="$cf_trim_CFLAGS"
11159          CPPFLAGS="$cf_trim_CPPFLAGS"
11160
11161         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11162         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11163
11164 echo "${as_me:-configure}:11164: testing if the second compile does not leave our definition intact error ..." 1>&5
11165
11166          cat >"conftest.$ac_ext" <<_ACEOF
11167 #line 11167 "configure"
11168 #include "confdefs.h"
11169 #include <sys/types.h>
11170 int
11171 main (void)
11172 {
11173
11174 #ifndef _POSIX_C_SOURCE
11175 make an error
11176 #endif
11177   ;
11178   return 0;
11179 }
11180 _ACEOF
11181 rm -f "conftest.$ac_objext"
11182 if { (eval echo "$as_me:11182: \"$ac_compile\"") >&5
11183   (eval $ac_compile) 2>&5
11184   ac_status=$?
11185   echo "$as_me:11185: \$? = $ac_status" >&5
11186   (exit "$ac_status"); } &&
11187          { ac_try='test -s "conftest.$ac_objext"'
11188   { (eval echo "$as_me:11188: \"$ac_try\"") >&5
11189   (eval $ac_try) 2>&5
11190   ac_status=$?
11191   echo "$as_me:11191: \$? = $ac_status" >&5
11192   (exit "$ac_status"); }; }; then
11193   :
11194 else
11195   echo "$as_me: failed program was:" >&5
11196 cat "conftest.$ac_ext" >&5
11197 cf_cv_posix_c_source=no
11198 fi
11199 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11200          CFLAGS="$cf_save_CFLAGS"
11201          CPPFLAGS="$cf_save_CPPFLAGS"
11202
11203 fi
11204 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11205
11206 fi
11207 echo "$as_me:11207: result: $cf_cv_posix_c_source" >&5
11208 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11209
11210 if test "$cf_cv_posix_c_source" != no ; then
11211         CFLAGS="$cf_trim_CFLAGS"
11212         CPPFLAGS="$cf_trim_CPPFLAGS"
11213
11214 cf_fix_cppflags=no
11215 cf_new_cflags=
11216 cf_new_cppflags=
11217 cf_new_extra_cppflags=
11218
11219 for cf_add_cflags in $cf_cv_posix_c_source
11220 do
11221 case "$cf_fix_cppflags" in
11222 (no)
11223         case "$cf_add_cflags" in
11224         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11225                 case "$cf_add_cflags" in
11226                 (-D*)
11227                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11228
11229                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11230                                 && test -z "${cf_tst_cflags}" \
11231                                 && cf_fix_cppflags=yes
11232
11233                         if test "$cf_fix_cppflags" = yes ; then
11234
11235         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11236         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11237
11238                                 continue
11239                         elif test "${cf_tst_cflags}" = "\"'" ; then
11240
11241         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11242         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11243
11244                                 continue
11245                         fi
11246                         ;;
11247                 esac
11248                 case "$CPPFLAGS" in
11249                 (*$cf_add_cflags)
11250                         ;;
11251                 (*)
11252                         case "$cf_add_cflags" in
11253                         (-D*)
11254                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11255
11256 CPPFLAGS=`echo "$CPPFLAGS" | \
11257         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11258                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11259
11260                                 ;;
11261                         esac
11262
11263         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11264         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11265
11266                         ;;
11267                 esac
11268                 ;;
11269         (*)
11270
11271         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11272         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11273
11274                 ;;
11275         esac
11276         ;;
11277 (yes)
11278
11279         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11280         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11281
11282         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11283
11284         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11285                 && test -z "${cf_tst_cflags}" \
11286                 && cf_fix_cppflags=no
11287         ;;
11288 esac
11289 done
11290
11291 if test -n "$cf_new_cflags" ; then
11292
11293         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11294         CFLAGS="${CFLAGS}$cf_new_cflags"
11295
11296 fi
11297
11298 if test -n "$cf_new_cppflags" ; then
11299
11300         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11301         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11302
11303 fi
11304
11305 if test -n "$cf_new_extra_cppflags" ; then
11306
11307         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11308         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11309
11310 fi
11311
11312 fi
11313
11314 fi # cf_cv_posix_visible
11315
11316         # Some of these niche implementations use copy/paste, double-check...
11317         test -n "$verbose" && echo "    checking if _POSIX_C_SOURCE inteferes" 1>&6
11318
11319 echo "${as_me:-configure}:11319: testing checking if _POSIX_C_SOURCE inteferes ..." 1>&5
11320
11321         cat >"conftest.$ac_ext" <<_ACEOF
11322 #line 11322 "configure"
11323 #include "confdefs.h"
11324
11325 #include <stdlib.h>
11326 #include <string.h>
11327 #include <sys/types.h>
11328
11329 int
11330 main (void)
11331 {
11332
11333 #ifndef _XOPEN_SOURCE
11334 make an error
11335 #endif
11336
11337   ;
11338   return 0;
11339 }
11340 _ACEOF
11341 rm -f "conftest.$ac_objext"
11342 if { (eval echo "$as_me:11342: \"$ac_compile\"") >&5
11343   (eval $ac_compile) 2>&5
11344   ac_status=$?
11345   echo "$as_me:11345: \$? = $ac_status" >&5
11346   (exit "$ac_status"); } &&
11347          { ac_try='test -s "conftest.$ac_objext"'
11348   { (eval echo "$as_me:11348: \"$ac_try\"") >&5
11349   (eval $ac_try) 2>&5
11350   ac_status=$?
11351   echo "$as_me:11351: \$? = $ac_status" >&5
11352   (exit "$ac_status"); }; }; then
11353   :
11354 else
11355   echo "$as_me: failed program was:" >&5
11356 cat "conftest.$ac_ext" >&5
11357
11358                 { echo "$as_me:11358: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
11359 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
11360                 CPPFLAGS="$cf_save_xopen_cppflags"
11361 fi
11362 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11363         ;;
11364 esac
11365
11366 if test -n "$cf_xopen_source" ; then
11367
11368 for cf_add_cflags in $cf_xopen_source
11369 do
11370         case "x$cf_add_cflags" in
11371         (x-[DU]*)
11372
11373 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11374 while true
11375 do
11376         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11377         test "$CFLAGS" != "$cf_old_cflag" || break
11378         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11379
11380 echo "${as_me:-configure}:11380: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11381
11382         CFLAGS="$cf_old_cflag"
11383 done
11384
11385 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11386 while true
11387 do
11388         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11389         test "$CPPFLAGS" != "$cf_old_cflag" || break
11390         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11391
11392 echo "${as_me:-configure}:11392: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11393
11394         CPPFLAGS="$cf_old_cflag"
11395 done
11396
11397                 ;;
11398         esac
11399
11400 cf_fix_cppflags=no
11401 cf_new_cflags=
11402 cf_new_cppflags=
11403 cf_new_extra_cppflags=
11404
11405 for cf_add_cflags in $cf_add_cflags
11406 do
11407 case "$cf_fix_cppflags" in
11408 (no)
11409         case "$cf_add_cflags" in
11410         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11411                 case "$cf_add_cflags" in
11412                 (-D*)
11413                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11414
11415                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11416                                 && test -z "${cf_tst_cflags}" \
11417                                 && cf_fix_cppflags=yes
11418
11419                         if test "$cf_fix_cppflags" = yes ; then
11420
11421         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11422         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11423
11424                                 continue
11425                         elif test "${cf_tst_cflags}" = "\"'" ; then
11426
11427         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11428         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11429
11430                                 continue
11431                         fi
11432                         ;;
11433                 esac
11434                 case "$CPPFLAGS" in
11435                 (*$cf_add_cflags)
11436                         ;;
11437                 (*)
11438                         case "$cf_add_cflags" in
11439                         (-D*)
11440                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11441
11442 CPPFLAGS=`echo "$CPPFLAGS" | \
11443         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11444                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11445
11446                                 ;;
11447                         esac
11448
11449         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11450         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11451
11452                         ;;
11453                 esac
11454                 ;;
11455         (*)
11456
11457         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11458         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11459
11460                 ;;
11461         esac
11462         ;;
11463 (yes)
11464
11465         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11466         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11467
11468         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11469
11470         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11471                 && test -z "${cf_tst_cflags}" \
11472                 && cf_fix_cppflags=no
11473         ;;
11474 esac
11475 done
11476
11477 if test -n "$cf_new_cflags" ; then
11478         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11479
11480 echo "${as_me:-configure}:11480: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11481
11482         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11483         CFLAGS="${CFLAGS}$cf_new_cflags"
11484
11485 fi
11486
11487 if test -n "$cf_new_cppflags" ; then
11488         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11489
11490 echo "${as_me:-configure}:11490: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11491
11492         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11493         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11494
11495 fi
11496
11497 if test -n "$cf_new_extra_cppflags" ; then
11498         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11499
11500 echo "${as_me:-configure}:11500: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11501
11502         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11503         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11504
11505 fi
11506
11507 done
11508
11509 fi
11510
11511 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11512         echo "$as_me:11512: checking if _XOPEN_SOURCE really is set" >&5
11513 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11514         cat >"conftest.$ac_ext" <<_ACEOF
11515 #line 11515 "configure"
11516 #include "confdefs.h"
11517 #include <stdlib.h>
11518 int
11519 main (void)
11520 {
11521
11522 #ifndef _XOPEN_SOURCE
11523 make an error
11524 #endif
11525   ;
11526   return 0;
11527 }
11528 _ACEOF
11529 rm -f "conftest.$ac_objext"
11530 if { (eval echo "$as_me:11530: \"$ac_compile\"") >&5
11531   (eval $ac_compile) 2>&5
11532   ac_status=$?
11533   echo "$as_me:11533: \$? = $ac_status" >&5
11534   (exit "$ac_status"); } &&
11535          { ac_try='test -s "conftest.$ac_objext"'
11536   { (eval echo "$as_me:11536: \"$ac_try\"") >&5
11537   (eval $ac_try) 2>&5
11538   ac_status=$?
11539   echo "$as_me:11539: \$? = $ac_status" >&5
11540   (exit "$ac_status"); }; }; then
11541   cf_XOPEN_SOURCE_set=yes
11542 else
11543   echo "$as_me: failed program was:" >&5
11544 cat "conftest.$ac_ext" >&5
11545 cf_XOPEN_SOURCE_set=no
11546 fi
11547 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11548         echo "$as_me:11548: result: $cf_XOPEN_SOURCE_set" >&5
11549 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11550         if test "$cf_XOPEN_SOURCE_set" = yes
11551         then
11552                 cat >"conftest.$ac_ext" <<_ACEOF
11553 #line 11553 "configure"
11554 #include "confdefs.h"
11555 #include <stdlib.h>
11556 int
11557 main (void)
11558 {
11559
11560 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11561 make an error
11562 #endif
11563   ;
11564   return 0;
11565 }
11566 _ACEOF
11567 rm -f "conftest.$ac_objext"
11568 if { (eval echo "$as_me:11568: \"$ac_compile\"") >&5
11569   (eval $ac_compile) 2>&5
11570   ac_status=$?
11571   echo "$as_me:11571: \$? = $ac_status" >&5
11572   (exit "$ac_status"); } &&
11573          { ac_try='test -s "conftest.$ac_objext"'
11574   { (eval echo "$as_me:11574: \"$ac_try\"") >&5
11575   (eval $ac_try) 2>&5
11576   ac_status=$?
11577   echo "$as_me:11577: \$? = $ac_status" >&5
11578   (exit "$ac_status"); }; }; then
11579   cf_XOPEN_SOURCE_set_ok=yes
11580 else
11581   echo "$as_me: failed program was:" >&5
11582 cat "conftest.$ac_ext" >&5
11583 cf_XOPEN_SOURCE_set_ok=no
11584 fi
11585 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11586                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11587                 then
11588                         { echo "$as_me:11588: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11589 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11590                 fi
11591         else
11592
11593 echo "$as_me:11593: checking if we should define _XOPEN_SOURCE" >&5
11594 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11595 if test "${cf_cv_xopen_source+set}" = set; then
11596   echo $ECHO_N "(cached) $ECHO_C" >&6
11597 else
11598
11599         cat >"conftest.$ac_ext" <<_ACEOF
11600 #line 11600 "configure"
11601 #include "confdefs.h"
11602
11603 #include <stdlib.h>
11604 #include <string.h>
11605 #include <sys/types.h>
11606
11607 int
11608 main (void)
11609 {
11610
11611 #ifndef _XOPEN_SOURCE
11612 make an error
11613 #endif
11614
11615   ;
11616   return 0;
11617 }
11618 _ACEOF
11619 rm -f "conftest.$ac_objext"
11620 if { (eval echo "$as_me:11620: \"$ac_compile\"") >&5
11621   (eval $ac_compile) 2>&5
11622   ac_status=$?
11623   echo "$as_me:11623: \$? = $ac_status" >&5
11624   (exit "$ac_status"); } &&
11625          { ac_try='test -s "conftest.$ac_objext"'
11626   { (eval echo "$as_me:11626: \"$ac_try\"") >&5
11627   (eval $ac_try) 2>&5
11628   ac_status=$?
11629   echo "$as_me:11629: \$? = $ac_status" >&5
11630   (exit "$ac_status"); }; }; then
11631   cf_cv_xopen_source=no
11632 else
11633   echo "$as_me: failed program was:" >&5
11634 cat "conftest.$ac_ext" >&5
11635 cf_save="$CPPFLAGS"
11636
11637         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11638         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11639
11640          cat >"conftest.$ac_ext" <<_ACEOF
11641 #line 11641 "configure"
11642 #include "confdefs.h"
11643
11644 #include <stdlib.h>
11645 #include <string.h>
11646 #include <sys/types.h>
11647
11648 int
11649 main (void)
11650 {
11651
11652 #ifndef _XOPEN_SOURCE
11653 make an error
11654 #endif
11655
11656   ;
11657   return 0;
11658 }
11659 _ACEOF
11660 rm -f "conftest.$ac_objext"
11661 if { (eval echo "$as_me:11661: \"$ac_compile\"") >&5
11662   (eval $ac_compile) 2>&5
11663   ac_status=$?
11664   echo "$as_me:11664: \$? = $ac_status" >&5
11665   (exit "$ac_status"); } &&
11666          { ac_try='test -s "conftest.$ac_objext"'
11667   { (eval echo "$as_me:11667: \"$ac_try\"") >&5
11668   (eval $ac_try) 2>&5
11669   ac_status=$?
11670   echo "$as_me:11670: \$? = $ac_status" >&5
11671   (exit "$ac_status"); }; }; then
11672   cf_cv_xopen_source=no
11673 else
11674   echo "$as_me: failed program was:" >&5
11675 cat "conftest.$ac_ext" >&5
11676 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11677 fi
11678 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11679                 CPPFLAGS="$cf_save"
11680
11681 fi
11682 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11683
11684 fi
11685 echo "$as_me:11685: result: $cf_cv_xopen_source" >&5
11686 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11687
11688 if test "$cf_cv_xopen_source" != no ; then
11689
11690 CFLAGS=`echo "$CFLAGS" | \
11691         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11692                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11693
11694 CPPFLAGS=`echo "$CPPFLAGS" | \
11695         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11696                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11697
11698         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11699
11700 for cf_add_cflags in $cf_temp_xopen_source
11701 do
11702         case "x$cf_add_cflags" in
11703         (x-[DU]*)
11704
11705 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11706 while true
11707 do
11708         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11709         test "$CFLAGS" != "$cf_old_cflag" || break
11710
11711         CFLAGS="$cf_old_cflag"
11712 done
11713
11714 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11715 while true
11716 do
11717         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11718         test "$CPPFLAGS" != "$cf_old_cflag" || break
11719
11720         CPPFLAGS="$cf_old_cflag"
11721 done
11722
11723                 ;;
11724         esac
11725
11726 cf_fix_cppflags=no
11727 cf_new_cflags=
11728 cf_new_cppflags=
11729 cf_new_extra_cppflags=
11730
11731 for cf_add_cflags in $cf_add_cflags
11732 do
11733 case "$cf_fix_cppflags" in
11734 (no)
11735         case "$cf_add_cflags" in
11736         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11737                 case "$cf_add_cflags" in
11738                 (-D*)
11739                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11740
11741                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11742                                 && test -z "${cf_tst_cflags}" \
11743                                 && cf_fix_cppflags=yes
11744
11745                         if test "$cf_fix_cppflags" = yes ; then
11746
11747         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11748         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11749
11750                                 continue
11751                         elif test "${cf_tst_cflags}" = "\"'" ; then
11752
11753         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11754         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11755
11756                                 continue
11757                         fi
11758                         ;;
11759                 esac
11760                 case "$CPPFLAGS" in
11761                 (*$cf_add_cflags)
11762                         ;;
11763                 (*)
11764                         case "$cf_add_cflags" in
11765                         (-D*)
11766                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11767
11768 CPPFLAGS=`echo "$CPPFLAGS" | \
11769         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11770                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11771
11772                                 ;;
11773                         esac
11774
11775         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11776         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11777
11778                         ;;
11779                 esac
11780                 ;;
11781         (*)
11782
11783         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11784         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11785
11786                 ;;
11787         esac
11788         ;;
11789 (yes)
11790
11791         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11792         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11793
11794         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11795
11796         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11797                 && test -z "${cf_tst_cflags}" \
11798                 && cf_fix_cppflags=no
11799         ;;
11800 esac
11801 done
11802
11803 if test -n "$cf_new_cflags" ; then
11804
11805         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11806         CFLAGS="${CFLAGS}$cf_new_cflags"
11807
11808 fi
11809
11810 if test -n "$cf_new_cppflags" ; then
11811
11812         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11813         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11814
11815 fi
11816
11817 if test -n "$cf_new_extra_cppflags" ; then
11818
11819         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11820         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11821
11822 fi
11823
11824 done
11825
11826 fi
11827
11828         fi
11829 fi
11830 fi # cf_cv_posix_visible
11831
11832 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11833
11834 # Work around breakage on OS X
11835
11836 echo "$as_me:11836: checking if SIGWINCH is defined" >&5
11837 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11838 if test "${cf_cv_define_sigwinch+set}" = set; then
11839   echo $ECHO_N "(cached) $ECHO_C" >&6
11840 else
11841
11842         cat >"conftest.$ac_ext" <<_ACEOF
11843 #line 11843 "configure"
11844 #include "confdefs.h"
11845
11846 #include <sys/types.h>
11847 #include <sys/signal.h>
11848
11849 int
11850 main (void)
11851 {
11852 int x = SIGWINCH; (void)x
11853   ;
11854   return 0;
11855 }
11856 _ACEOF
11857 rm -f "conftest.$ac_objext"
11858 if { (eval echo "$as_me:11858: \"$ac_compile\"") >&5
11859   (eval $ac_compile) 2>&5
11860   ac_status=$?
11861   echo "$as_me:11861: \$? = $ac_status" >&5
11862   (exit "$ac_status"); } &&
11863          { ac_try='test -s "conftest.$ac_objext"'
11864   { (eval echo "$as_me:11864: \"$ac_try\"") >&5
11865   (eval $ac_try) 2>&5
11866   ac_status=$?
11867   echo "$as_me:11867: \$? = $ac_status" >&5
11868   (exit "$ac_status"); }; }; then
11869   cf_cv_define_sigwinch=yes
11870 else
11871   echo "$as_me: failed program was:" >&5
11872 cat "conftest.$ac_ext" >&5
11873 cat >"conftest.$ac_ext" <<_ACEOF
11874 #line 11874 "configure"
11875 #include "confdefs.h"
11876
11877 #undef _XOPEN_SOURCE
11878 #undef _POSIX_SOURCE
11879 #undef _POSIX_C_SOURCE
11880 #include <sys/types.h>
11881 #include <sys/signal.h>
11882
11883 int
11884 main (void)
11885 {
11886 int x = SIGWINCH; (void)x
11887   ;
11888   return 0;
11889 }
11890 _ACEOF
11891 rm -f "conftest.$ac_objext"
11892 if { (eval echo "$as_me:11892: \"$ac_compile\"") >&5
11893   (eval $ac_compile) 2>&5
11894   ac_status=$?
11895   echo "$as_me:11895: \$? = $ac_status" >&5
11896   (exit "$ac_status"); } &&
11897          { ac_try='test -s "conftest.$ac_objext"'
11898   { (eval echo "$as_me:11898: \"$ac_try\"") >&5
11899   (eval $ac_try) 2>&5
11900   ac_status=$?
11901   echo "$as_me:11901: \$? = $ac_status" >&5
11902   (exit "$ac_status"); }; }; then
11903   cf_cv_define_sigwinch=maybe
11904 else
11905   echo "$as_me: failed program was:" >&5
11906 cat "conftest.$ac_ext" >&5
11907 cf_cv_define_sigwinch=no
11908 fi
11909 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11910
11911 fi
11912 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11913
11914 fi
11915 echo "$as_me:11915: result: $cf_cv_define_sigwinch" >&5
11916 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11917
11918 if test "$cf_cv_define_sigwinch" = maybe ; then
11919 echo "$as_me:11919: checking for actual SIGWINCH definition" >&5
11920 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11921 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11922   echo $ECHO_N "(cached) $ECHO_C" >&6
11923 else
11924
11925 cf_cv_fixup_sigwinch=unknown
11926 cf_sigwinch=32
11927 while test "$cf_sigwinch" != 1
11928 do
11929         cat >"conftest.$ac_ext" <<_ACEOF
11930 #line 11930 "configure"
11931 #include "confdefs.h"
11932
11933 #undef _XOPEN_SOURCE
11934 #undef _POSIX_SOURCE
11935 #undef _POSIX_C_SOURCE
11936 #include <sys/types.h>
11937 #include <sys/signal.h>
11938
11939 int
11940 main (void)
11941 {
11942
11943 #if SIGWINCH != $cf_sigwinch
11944 make an error
11945 #endif
11946 int x = SIGWINCH; (void)x
11947   ;
11948   return 0;
11949 }
11950 _ACEOF
11951 rm -f "conftest.$ac_objext"
11952 if { (eval echo "$as_me:11952: \"$ac_compile\"") >&5
11953   (eval $ac_compile) 2>&5
11954   ac_status=$?
11955   echo "$as_me:11955: \$? = $ac_status" >&5
11956   (exit "$ac_status"); } &&
11957          { ac_try='test -s "conftest.$ac_objext"'
11958   { (eval echo "$as_me:11958: \"$ac_try\"") >&5
11959   (eval $ac_try) 2>&5
11960   ac_status=$?
11961   echo "$as_me:11961: \$? = $ac_status" >&5
11962   (exit "$ac_status"); }; }; then
11963   cf_cv_fixup_sigwinch=$cf_sigwinch
11964          break
11965 else
11966   echo "$as_me: failed program was:" >&5
11967 cat "conftest.$ac_ext" >&5
11968 fi
11969 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11970
11971 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11972 done
11973
11974 fi
11975 echo "$as_me:11975: result: $cf_cv_fixup_sigwinch" >&5
11976 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11977
11978         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11979                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11980         fi
11981 fi
11982
11983 # Checks for CODESET support.
11984
11985 echo "$as_me:11985: checking for nl_langinfo and CODESET" >&5
11986 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11987 if test "${am_cv_langinfo_codeset+set}" = set; then
11988   echo $ECHO_N "(cached) $ECHO_C" >&6
11989 else
11990   cat >"conftest.$ac_ext" <<_ACEOF
11991 #line 11991 "configure"
11992 #include "confdefs.h"
11993 #include <langinfo.h>
11994 int
11995 main (void)
11996 {
11997 char* cs = nl_langinfo(CODESET); (void)cs
11998   ;
11999   return 0;
12000 }
12001 _ACEOF
12002 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12003 if { (eval echo "$as_me:12003: \"$ac_link\"") >&5
12004   (eval $ac_link) 2>&5
12005   ac_status=$?
12006   echo "$as_me:12006: \$? = $ac_status" >&5
12007   (exit "$ac_status"); } &&
12008          { ac_try='test -s "conftest$ac_exeext"'
12009   { (eval echo "$as_me:12009: \"$ac_try\"") >&5
12010   (eval $ac_try) 2>&5
12011   ac_status=$?
12012   echo "$as_me:12012: \$? = $ac_status" >&5
12013   (exit "$ac_status"); }; }; then
12014   am_cv_langinfo_codeset=yes
12015 else
12016   echo "$as_me: failed program was:" >&5
12017 cat "conftest.$ac_ext" >&5
12018 am_cv_langinfo_codeset=no
12019 fi
12020 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12021
12022 fi
12023 echo "$as_me:12023: result: $am_cv_langinfo_codeset" >&5
12024 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
12025         if test "$am_cv_langinfo_codeset" = yes; then
12026
12027 cat >>confdefs.h <<\EOF
12028 #define HAVE_LANGINFO_CODESET 1
12029 EOF
12030
12031         fi
12032
12033 # use these variables to work around a defect in gcc's fixincludes.
12034 NCURSES_OK_WCHAR_T=
12035 NCURSES_OK_WINT_T=
12036
12037 echo "$as_me:12037: checking if you want wide-character code" >&5
12038 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12039
12040 # Check whether --enable-widec or --disable-widec was given.
12041 if test "${enable_widec+set}" = set; then
12042   enableval="$enable_widec"
12043   with_widec=$enableval
12044 else
12045   with_widec=no
12046 fi;
12047 echo "$as_me:12047: result: $with_widec" >&5
12048 echo "${ECHO_T}$with_widec" >&6
12049
12050 NCURSES_WCWIDTH_GRAPHICS=1
12051
12052 if test "x$with_widec" = xyes ; then
12053         if test "x$disable_lib_suffixes" = xno ; then
12054                 LIB_SUFFIX="w${LIB_SUFFIX}"
12055         fi
12056
12057 cat >>confdefs.h <<\EOF
12058 #define USE_WIDEC_SUPPORT 1
12059 EOF
12060
12061 cat >>confdefs.h <<\EOF
12062 #define NCURSES_WIDECHAR 1
12063 EOF
12064
12065         case "$CPPFLAGS" in
12066         (*_XOPEN_SOURCE=*)
12067                 ;;
12068         (*)
12069                 { echo "$as_me:12069: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12070 echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12071                 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12072                 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12073                 ;;
12074         esac
12075
12076 for ac_header in \
12077 wchar.h \
12078 wctype.h \
12079
12080 do
12081 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12082 echo "$as_me:12082: checking for $ac_header" >&5
12083 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12084 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12085   echo $ECHO_N "(cached) $ECHO_C" >&6
12086 else
12087   cat >"conftest.$ac_ext" <<_ACEOF
12088 #line 12088 "configure"
12089 #include "confdefs.h"
12090 #include <$ac_header>
12091 _ACEOF
12092 if { (eval echo "$as_me:12092: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12093   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12094   ac_status=$?
12095   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12096   rm -f conftest.er1
12097   cat conftest.err >&5
12098   echo "$as_me:12098: \$? = $ac_status" >&5
12099   (exit "$ac_status"); } >/dev/null; then
12100   if test -s conftest.err; then
12101     ac_cpp_err=$ac_c_preproc_warn_flag
12102   else
12103     ac_cpp_err=
12104   fi
12105 else
12106   ac_cpp_err=yes
12107 fi
12108 if test -z "$ac_cpp_err"; then
12109   eval "$as_ac_Header=yes"
12110 else
12111   echo "$as_me: failed program was:" >&5
12112   cat "conftest.$ac_ext" >&5
12113   eval "$as_ac_Header=no"
12114 fi
12115 rm -f conftest.err "conftest.$ac_ext"
12116 fi
12117 echo "$as_me:12117: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12118 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12119 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12120   cat >>confdefs.h <<EOF
12121 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12122 EOF
12123
12124 fi
12125 done
12126
12127 echo "$as_me:12127: checking if wchar.h can be used as is" >&5
12128 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12129 if test "${cf_cv_wchar_h_okay+set}" = set; then
12130   echo $ECHO_N "(cached) $ECHO_C" >&6
12131 else
12132
12133 cat >"conftest.$ac_ext" <<_ACEOF
12134 #line 12134 "configure"
12135 #include "confdefs.h"
12136
12137 #include <stdlib.h>
12138 #ifdef HAVE_WCHAR_H
12139 #include <wchar.h>
12140 #endif
12141 #ifdef HAVE_WCTYPE_H
12142 #include <wctype.h>
12143 #endif
12144
12145 int
12146 main (void)
12147 {
12148
12149         wint_t foo = 0;
12150         int bar = iswpunct(foo)
12151   ;
12152   return 0;
12153 }
12154 _ACEOF
12155 rm -f "conftest.$ac_objext"
12156 if { (eval echo "$as_me:12156: \"$ac_compile\"") >&5
12157   (eval $ac_compile) 2>&5
12158   ac_status=$?
12159   echo "$as_me:12159: \$? = $ac_status" >&5
12160   (exit "$ac_status"); } &&
12161          { ac_try='test -s "conftest.$ac_objext"'
12162   { (eval echo "$as_me:12162: \"$ac_try\"") >&5
12163   (eval $ac_try) 2>&5
12164   ac_status=$?
12165   echo "$as_me:12165: \$? = $ac_status" >&5
12166   (exit "$ac_status"); }; }; then
12167   cf_cv_wchar_h_okay=yes
12168 else
12169   echo "$as_me: failed program was:" >&5
12170 cat "conftest.$ac_ext" >&5
12171 cf_cv_wchar_h_okay=no
12172 fi
12173 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12174 fi
12175 echo "$as_me:12175: result: $cf_cv_wchar_h_okay" >&5
12176 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12177
12178 if test "$cf_cv_wchar_h_okay" = no
12179 then
12180
12181 echo "$as_me:12181: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12182 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12183 cat >"conftest.$ac_ext" <<_ACEOF
12184 #line 12184 "configure"
12185 #include "confdefs.h"
12186 #include <sys/types.h>
12187
12188 int
12189 main (void)
12190 {
12191
12192 #ifndef _XOPEN_SOURCE_EXTENDED
12193 make an error
12194 #endif
12195   ;
12196   return 0;
12197 }
12198 _ACEOF
12199 rm -f "conftest.$ac_objext"
12200 if { (eval echo "$as_me:12200: \"$ac_compile\"") >&5
12201   (eval $ac_compile) 2>&5
12202   ac_status=$?
12203   echo "$as_me:12203: \$? = $ac_status" >&5
12204   (exit "$ac_status"); } &&
12205          { ac_try='test -s "conftest.$ac_objext"'
12206   { (eval echo "$as_me:12206: \"$ac_try\"") >&5
12207   (eval $ac_try) 2>&5
12208   ac_status=$?
12209   echo "$as_me:12209: \$? = $ac_status" >&5
12210   (exit "$ac_status"); }; }; then
12211   cf_result=no
12212 else
12213   echo "$as_me: failed program was:" >&5
12214 cat "conftest.$ac_ext" >&5
12215 cf_result=yes
12216 fi
12217 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12218 echo "$as_me:12218: result: $cf_result" >&5
12219 echo "${ECHO_T}$cf_result" >&6
12220
12221 if test "$cf_result" = yes ; then
12222         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12223 elif test "x" != "x" ; then
12224         echo "$as_me:12224: checking checking for compatible value versus " >&5
12225 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12226         cat >"conftest.$ac_ext" <<_ACEOF
12227 #line 12227 "configure"
12228 #include "confdefs.h"
12229 #include <sys/types.h>
12230
12231 int
12232 main (void)
12233 {
12234
12235 #if _XOPEN_SOURCE_EXTENDED- < 0
12236 make an error
12237 #endif
12238   ;
12239   return 0;
12240 }
12241 _ACEOF
12242 rm -f "conftest.$ac_objext"
12243 if { (eval echo "$as_me:12243: \"$ac_compile\"") >&5
12244   (eval $ac_compile) 2>&5
12245   ac_status=$?
12246   echo "$as_me:12246: \$? = $ac_status" >&5
12247   (exit "$ac_status"); } &&
12248          { ac_try='test -s "conftest.$ac_objext"'
12249   { (eval echo "$as_me:12249: \"$ac_try\"") >&5
12250   (eval $ac_try) 2>&5
12251   ac_status=$?
12252   echo "$as_me:12252: \$? = $ac_status" >&5
12253   (exit "$ac_status"); }; }; then
12254   cf_result=yes
12255 else
12256   echo "$as_me: failed program was:" >&5
12257 cat "conftest.$ac_ext" >&5
12258 cf_result=no
12259 fi
12260 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12261         echo "$as_me:12261: result: $cf_result" >&5
12262 echo "${ECHO_T}$cf_result" >&6
12263         if test "$cf_result" = no ; then
12264                 # perhaps we can override it - try...
12265                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12266         fi
12267 fi
12268
12269 fi
12270
12271 echo "$as_me:12271: checking if wcwidth agrees graphics are single-width" >&5
12272 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12273 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12274   echo $ECHO_N "(cached) $ECHO_C" >&6
12275 else
12276
12277 cat >conftest.in <<CF_EOF
12278 -       VT100 symbols
12279 0x250c  upper left corner
12280 0x2514  lower left corner
12281 0x2510  upper right corner
12282 0x2518  lower right corner
12283 0x251c  tee pointing left
12284 0x2524  tee pointing right
12285 0x2534  tee pointing up
12286 0x252c  tee pointing down
12287 0x2500  horizontal line
12288 0x2502  vertical line
12289 0x253c  large plus or crossover
12290 0x23ba  scan line 1
12291 0x23bd  scan line 9
12292 0x25c6  diamond
12293 0x2592  checker board (stipple)
12294 0x00b0  degree symbol
12295 0x00b1  plus/minus
12296 0x00b7  bullet
12297 -       Teletype 5410v1 symbols
12298 0x2190  arrow pointing left
12299 0x2192  arrow pointing right
12300 0x2193  arrow pointing down
12301 0x2191  arrow pointing up
12302 0x2592  board of squares
12303 0x2603  lantern symbol
12304 0x25ae  solid square block
12305 -       these defaults were invented for ncurses
12306 0x23bb  scan line 3
12307 0x23bc  scan line 7
12308 0x2264  less-than-or-equal-to
12309 0x2265  greater-than-or-equal-to
12310 0x03c0  greek pi
12311 0x2260  not-equal
12312 0x00a3  pound-sterling symbol
12313 -       thick-line-drawing
12314 0x250f  upper left corner
12315 0x2517  lower left corner
12316 0x2513  upper right corner
12317 0x251b  lower right corner
12318 0x2523  tee pointing left
12319 0x252b  tee pointing right
12320 0x253b  tee pointing up
12321 0x2533  tee pointing down
12322 0x2501  horizontal line
12323 0x2503  vertical line
12324 0x254b  large plus or crossover
12325 -       double-line-drawing
12326 0x2554  upper left corner
12327 0x255a  lower left corner
12328 0x2557  upper right corner
12329 0x255d  lower right corner
12330 0x2563  tee pointing left
12331 0x2560  tee pointing right
12332 0x2569  tee pointing up
12333 0x2566  tee pointing down
12334 0x2550  horizontal line
12335 0x2551  vertical line
12336 0x256c  large plus or crossover
12337 CF_EOF
12338 if test "$cross_compiling" = yes; then
12339   cf_cv_wcwidth_graphics=unknown
12340 else
12341   cat >"conftest.$ac_ext" <<_ACEOF
12342 #line 12342 "configure"
12343 #include "confdefs.h"
12344
12345 #include <locale.h>
12346 #include <stdio.h>
12347 #include <wchar.h>
12348
12349 #define MY_LEN 80
12350
12351 int
12352 main(void)
12353 {
12354         FILE *fp;
12355         int value;
12356         char buffer[MY_LEN + 1];
12357         char notes[MY_LEN + 1];
12358         int totals = 0;
12359         int passed = 0;
12360
12361         if (setlocale(LC_ALL, "en_US.UTF8") ||
12362                 setlocale(LC_ALL, "en_US.UTF-8") ||
12363                 setlocale(LC_ALL, "en_US.utf8") ||
12364                 setlocale(LC_ALL, "en_US.utf-8")) {
12365                 if ((fp = fopen("conftest.in", "r")) != 0) {
12366                         while (fgets(buffer, MY_LEN, fp) != 0) {
12367                                 if (*buffer == '-') {
12368                                         fprintf(stderr, "\\t%s", buffer);
12369                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12370                                         ++totals;
12371                                         if (wcwidth(value) == 1)
12372                                                 ++passed;
12373                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12374                                 } else {
12375                                         fprintf(stderr, "?\\t%s", buffer);
12376                                 }
12377                         }
12378                 }
12379         }
12380         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12381         return (totals == passed) ? 0 : 1;
12382 }
12383
12384 _ACEOF
12385 rm -f "conftest$ac_exeext"
12386 if { (eval echo "$as_me:12386: \"$ac_link\"") >&5
12387   (eval $ac_link) 2>&5
12388   ac_status=$?
12389   echo "$as_me:12389: \$? = $ac_status" >&5
12390   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12391   { (eval echo "$as_me:12391: \"$ac_try\"") >&5
12392   (eval $ac_try) 2>&5
12393   ac_status=$?
12394   echo "$as_me:12394: \$? = $ac_status" >&5
12395   (exit "$ac_status"); }; }; then
12396   cf_cv_wcwidth_graphics=yes
12397 else
12398   echo "$as_me: program exited with status $ac_status" >&5
12399 echo "$as_me: failed program was:" >&5
12400 cat "conftest.$ac_ext" >&5
12401 cf_cv_wcwidth_graphics=no
12402 fi
12403 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12404 fi
12405
12406 fi
12407 echo "$as_me:12407: result: $cf_cv_wcwidth_graphics" >&5
12408 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12409
12410         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12411
12412         # with_overwrite=no
12413         NCURSES_CH_T=cchar_t
12414
12415 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12416 do
12417 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12418 echo "$as_me:12418: checking for $ac_func" >&5
12419 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12420 if eval "test \"\${$as_ac_var+set}\" = set"; then
12421   echo $ECHO_N "(cached) $ECHO_C" >&6
12422 else
12423   cat >"conftest.$ac_ext" <<_ACEOF
12424 #line 12424 "configure"
12425 #include "confdefs.h"
12426 #define $ac_func autoconf_temporary
12427 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12428 #undef $ac_func
12429
12430 #ifdef __cplusplus
12431 extern "C"
12432 #endif
12433
12434 /* We use char because int might match the return type of a gcc2
12435    builtin and then its argument prototype would still apply.  */
12436 char $ac_func (void);
12437
12438 int
12439 main (void)
12440 {
12441
12442 /* The GNU C library defines stubs for functions which it implements
12443     to always fail with ENOSYS.  Some functions are actually named
12444     something starting with __ and the normal name is an alias.  */
12445 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12446 #error found stub for $ac_func
12447 #endif
12448
12449         return $ac_func ();
12450   ;
12451   return 0;
12452 }
12453 _ACEOF
12454 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12455 if { (eval echo "$as_me:12455: \"$ac_link\"") >&5
12456   (eval $ac_link) 2>&5
12457   ac_status=$?
12458   echo "$as_me:12458: \$? = $ac_status" >&5
12459   (exit "$ac_status"); } &&
12460          { ac_try='test -s "conftest$ac_exeext"'
12461   { (eval echo "$as_me:12461: \"$ac_try\"") >&5
12462   (eval $ac_try) 2>&5
12463   ac_status=$?
12464   echo "$as_me:12464: \$? = $ac_status" >&5
12465   (exit "$ac_status"); }; }; then
12466   eval "$as_ac_var=yes"
12467 else
12468   echo "$as_me: failed program was:" >&5
12469 cat "conftest.$ac_ext" >&5
12470 eval "$as_ac_var=no"
12471 fi
12472 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12473 fi
12474 echo "$as_me:12474: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12475 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12476 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12477   cat >>confdefs.h <<EOF
12478 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12479 EOF
12480
12481 fi
12482 done
12483
12484         if test "x$ac_cv_func_putwc" != xyes ; then
12485
12486 for ac_header in wchar.h
12487 do
12488 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12489 echo "$as_me:12489: checking for $ac_header" >&5
12490 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12491 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12492   echo $ECHO_N "(cached) $ECHO_C" >&6
12493 else
12494   cat >"conftest.$ac_ext" <<_ACEOF
12495 #line 12495 "configure"
12496 #include "confdefs.h"
12497 #include <$ac_header>
12498 _ACEOF
12499 if { (eval echo "$as_me:12499: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12500   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12501   ac_status=$?
12502   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12503   rm -f conftest.er1
12504   cat conftest.err >&5
12505   echo "$as_me:12505: \$? = $ac_status" >&5
12506   (exit "$ac_status"); } >/dev/null; then
12507   if test -s conftest.err; then
12508     ac_cpp_err=$ac_c_preproc_warn_flag
12509   else
12510     ac_cpp_err=
12511   fi
12512 else
12513   ac_cpp_err=yes
12514 fi
12515 if test -z "$ac_cpp_err"; then
12516   eval "$as_ac_Header=yes"
12517 else
12518   echo "$as_me: failed program was:" >&5
12519   cat "conftest.$ac_ext" >&5
12520   eval "$as_ac_Header=no"
12521 fi
12522 rm -f conftest.err "conftest.$ac_ext"
12523 fi
12524 echo "$as_me:12524: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12525 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12526 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12527   cat >>confdefs.h <<EOF
12528 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12529 EOF
12530
12531 fi
12532 done
12533
12534 echo "$as_me:12534: checking for multibyte character support" >&5
12535 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12536 if test "${cf_cv_utf8_lib+set}" = set; then
12537   echo $ECHO_N "(cached) $ECHO_C" >&6
12538 else
12539
12540         cf_save_LIBS="$LIBS"
12541         cat >"conftest.$ac_ext" <<_ACEOF
12542 #line 12542 "configure"
12543 #include "confdefs.h"
12544
12545 #include <stdlib.h>
12546 #include <stdio.h>
12547 #ifdef HAVE_WCHAR_H
12548 #include <wchar.h>
12549 #endif
12550
12551 int
12552 main (void)
12553 {
12554 putwc(0,0);
12555   ;
12556   return 0;
12557 }
12558 _ACEOF
12559 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12560 if { (eval echo "$as_me:12560: \"$ac_link\"") >&5
12561   (eval $ac_link) 2>&5
12562   ac_status=$?
12563   echo "$as_me:12563: \$? = $ac_status" >&5
12564   (exit "$ac_status"); } &&
12565          { ac_try='test -s "conftest$ac_exeext"'
12566   { (eval echo "$as_me:12566: \"$ac_try\"") >&5
12567   (eval $ac_try) 2>&5
12568   ac_status=$?
12569   echo "$as_me:12569: \$? = $ac_status" >&5
12570   (exit "$ac_status"); }; }; then
12571   cf_cv_utf8_lib=yes
12572 else
12573   echo "$as_me: failed program was:" >&5
12574 cat "conftest.$ac_ext" >&5
12575
12576 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12577 # will be set on completion of the AC_TRY_LINK below.
12578 cf_cv_header_path_utf8=
12579 cf_cv_library_path_utf8=
12580
12581 echo "${as_me:-configure}:12581: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12582
12583 cf_save_LIBS="$LIBS"
12584
12585 cat >"conftest.$ac_ext" <<_ACEOF
12586 #line 12586 "configure"
12587 #include "confdefs.h"
12588
12589 #include <libutf8.h>
12590 int
12591 main (void)
12592 {
12593 putwc(0,0);
12594   ;
12595   return 0;
12596 }
12597 _ACEOF
12598 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12599 if { (eval echo "$as_me:12599: \"$ac_link\"") >&5
12600   (eval $ac_link) 2>&5
12601   ac_status=$?
12602   echo "$as_me:12602: \$? = $ac_status" >&5
12603   (exit "$ac_status"); } &&
12604          { ac_try='test -s "conftest$ac_exeext"'
12605   { (eval echo "$as_me:12605: \"$ac_try\"") >&5
12606   (eval $ac_try) 2>&5
12607   ac_status=$?
12608   echo "$as_me:12608: \$? = $ac_status" >&5
12609   (exit "$ac_status"); }; }; then
12610
12611         cf_cv_find_linkage_utf8=yes
12612         cf_cv_header_path_utf8=/usr/include
12613         cf_cv_library_path_utf8=/usr/lib
12614
12615 else
12616   echo "$as_me: failed program was:" >&5
12617 cat "conftest.$ac_ext" >&5
12618
12619 LIBS="-lutf8  $cf_save_LIBS"
12620
12621 cat >"conftest.$ac_ext" <<_ACEOF
12622 #line 12622 "configure"
12623 #include "confdefs.h"
12624
12625 #include <libutf8.h>
12626 int
12627 main (void)
12628 {
12629 putwc(0,0);
12630   ;
12631   return 0;
12632 }
12633 _ACEOF
12634 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12635 if { (eval echo "$as_me:12635: \"$ac_link\"") >&5
12636   (eval $ac_link) 2>&5
12637   ac_status=$?
12638   echo "$as_me:12638: \$? = $ac_status" >&5
12639   (exit "$ac_status"); } &&
12640          { ac_try='test -s "conftest$ac_exeext"'
12641   { (eval echo "$as_me:12641: \"$ac_try\"") >&5
12642   (eval $ac_try) 2>&5
12643   ac_status=$?
12644   echo "$as_me:12644: \$? = $ac_status" >&5
12645   (exit "$ac_status"); }; }; then
12646
12647         cf_cv_find_linkage_utf8=yes
12648         cf_cv_header_path_utf8=/usr/include
12649         cf_cv_library_path_utf8=/usr/lib
12650         cf_cv_library_file_utf8="-lutf8"
12651
12652 else
12653   echo "$as_me: failed program was:" >&5
12654 cat "conftest.$ac_ext" >&5
12655
12656         cf_cv_find_linkage_utf8=no
12657         LIBS="$cf_save_LIBS"
12658
12659         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12660
12661 echo "${as_me:-configure}:12661: testing find linkage for utf8 library ..." 1>&5
12662
12663 echo "${as_me:-configure}:12663: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12664
12665         cf_save_CPPFLAGS="$CPPFLAGS"
12666         cf_test_CPPFLAGS="$CPPFLAGS"
12667
12668 cf_search=
12669
12670 # collect the current set of include-directories from compiler flags
12671 cf_header_path_list=""
12672 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12673         for cf_header_path in $CPPFLAGS $CFLAGS
12674         do
12675                 case "$cf_header_path" in
12676                 (-I*)
12677                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12678
12679 test "x$cf_header_path" != "xNONE" && \
12680 test -d "$cf_header_path" && \
12681  {
12682         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12683         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12684         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12685         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12686         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12687         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12688 }
12689
12690                         cf_header_path_list="$cf_header_path_list $cf_search"
12691                         ;;
12692                 esac
12693         done
12694 fi
12695
12696 # add the variations for the package we are looking for
12697
12698 cf_search=
12699
12700 test "x$prefix" != "xNONE" && \
12701 test -d "$prefix" && \
12702  {
12703         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12704         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12705         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12706         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12707         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12708         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12709 }
12710
12711 for cf_subdir_prefix in \
12712         /usr \
12713         /usr/local \
12714         /usr/pkg \
12715         /opt \
12716         /opt/local \
12717         $HOME
12718 do
12719
12720 test "x$cf_subdir_prefix" != "x$prefix" && \
12721 test -d "$cf_subdir_prefix" && \
12722 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12723         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12724         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12725         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12726         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12727         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12728         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12729 }
12730
12731 done
12732
12733 test "$includedir" != NONE && \
12734 test "$includedir" != "/usr/include" && \
12735 test -d "$includedir" && {
12736         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12737         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12738 }
12739
12740 test "$oldincludedir" != NONE && \
12741 test "$oldincludedir" != "/usr/include" && \
12742 test -d "$oldincludedir" && {
12743         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12744         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12745 }
12746
12747 cf_search="$cf_search $cf_header_path_list"
12748
12749         for cf_cv_header_path_utf8 in $cf_search
12750         do
12751                 if test -d "$cf_cv_header_path_utf8" ; then
12752                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12753
12754 echo "${as_me:-configure}:12754: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12755
12756                         CPPFLAGS="$cf_save_CPPFLAGS"
12757
12758         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12759         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12760
12761                         cat >"conftest.$ac_ext" <<_ACEOF
12762 #line 12762 "configure"
12763 #include "confdefs.h"
12764
12765 #include <libutf8.h>
12766 int
12767 main (void)
12768 {
12769 putwc(0,0);
12770   ;
12771   return 0;
12772 }
12773 _ACEOF
12774 rm -f "conftest.$ac_objext"
12775 if { (eval echo "$as_me:12775: \"$ac_compile\"") >&5
12776   (eval $ac_compile) 2>&5
12777   ac_status=$?
12778   echo "$as_me:12778: \$? = $ac_status" >&5
12779   (exit "$ac_status"); } &&
12780          { ac_try='test -s "conftest.$ac_objext"'
12781   { (eval echo "$as_me:12781: \"$ac_try\"") >&5
12782   (eval $ac_try) 2>&5
12783   ac_status=$?
12784   echo "$as_me:12784: \$? = $ac_status" >&5
12785   (exit "$ac_status"); }; }; then
12786
12787                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12788
12789 echo "${as_me:-configure}:12789: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12790
12791                                 cf_cv_find_linkage_utf8=maybe
12792                                 cf_test_CPPFLAGS="$CPPFLAGS"
12793                                 break
12794 else
12795   echo "$as_me: failed program was:" >&5
12796 cat "conftest.$ac_ext" >&5
12797
12798                                 CPPFLAGS="$cf_save_CPPFLAGS"
12799
12800 fi
12801 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12802                 fi
12803         done
12804
12805         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12806
12807 echo "${as_me:-configure}:12807: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12808
12809                 cf_save_LIBS="$LIBS"
12810                 cf_save_LDFLAGS="$LDFLAGS"
12811
12812                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12813
12814 cf_search=
12815 cf_library_path_list=""
12816 if test -n "${LDFLAGS}${LIBS}" ; then
12817         for cf_library_path in $LDFLAGS $LIBS
12818         do
12819                 case "$cf_library_path" in
12820                 (-L*)
12821                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12822
12823 test "x$cf_library_path" != "xNONE" && \
12824 test -d "$cf_library_path" && \
12825  {
12826         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12827         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12828         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12829         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12830         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12831         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12832 }
12833
12834                         cf_library_path_list="$cf_library_path_list $cf_search"
12835                         ;;
12836                 esac
12837         done
12838 fi
12839
12840 cf_search=
12841
12842 test "x$prefix" != "xNONE" && \
12843 test -d "$prefix" && \
12844  {
12845         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12846         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12847         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12848         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12849         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12850         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12851 }
12852
12853 for cf_subdir_prefix in \
12854         /usr \
12855         /usr/local \
12856         /usr/pkg \
12857         /opt \
12858         /opt/local \
12859         $HOME
12860 do
12861
12862 test "x$cf_subdir_prefix" != "x$prefix" && \
12863 test -d "$cf_subdir_prefix" && \
12864 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12865         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12866         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12867         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12868         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12869         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12870         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12871 }
12872
12873 done
12874
12875 cf_search="$cf_library_path_list $cf_search"
12876
12877                         for cf_cv_library_path_utf8 in $cf_search
12878                         do
12879                                 if test -d "$cf_cv_library_path_utf8" ; then
12880                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12881
12882 echo "${as_me:-configure}:12882: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12883
12884                                         CPPFLAGS="$cf_test_CPPFLAGS"
12885                                         LIBS="-lutf8  $cf_save_LIBS"
12886                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12887                                         cat >"conftest.$ac_ext" <<_ACEOF
12888 #line 12888 "configure"
12889 #include "confdefs.h"
12890
12891 #include <libutf8.h>
12892 int
12893 main (void)
12894 {
12895 putwc(0,0);
12896   ;
12897   return 0;
12898 }
12899 _ACEOF
12900 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12901 if { (eval echo "$as_me:12901: \"$ac_link\"") >&5
12902   (eval $ac_link) 2>&5
12903   ac_status=$?
12904   echo "$as_me:12904: \$? = $ac_status" >&5
12905   (exit "$ac_status"); } &&
12906          { ac_try='test -s "conftest$ac_exeext"'
12907   { (eval echo "$as_me:12907: \"$ac_try\"") >&5
12908   (eval $ac_try) 2>&5
12909   ac_status=$?
12910   echo "$as_me:12910: \$? = $ac_status" >&5
12911   (exit "$ac_status"); }; }; then
12912
12913                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12914
12915 echo "${as_me:-configure}:12915: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12916
12917                                         cf_cv_find_linkage_utf8=yes
12918                                         cf_cv_library_file_utf8="-lutf8"
12919                                         break
12920 else
12921   echo "$as_me: failed program was:" >&5
12922 cat "conftest.$ac_ext" >&5
12923
12924                                         CPPFLAGS="$cf_save_CPPFLAGS"
12925                                         LIBS="$cf_save_LIBS"
12926                                         LDFLAGS="$cf_save_LDFLAGS"
12927
12928 fi
12929 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12930                                 fi
12931                         done
12932                         CPPFLAGS="$cf_save_CPPFLAGS"
12933                         LDFLAGS="$cf_save_LDFLAGS"
12934                 fi
12935
12936         else
12937                 cf_cv_find_linkage_utf8=no
12938         fi
12939
12940 fi
12941 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12942
12943 fi
12944 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12945
12946 LIBS="$cf_save_LIBS"
12947
12948 if test "$cf_cv_find_linkage_utf8" = yes ; then
12949 cf_cv_utf8_lib=add-on
12950 else
12951 cf_cv_utf8_lib=no
12952 fi
12953
12954 fi
12955 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12956 fi
12957 echo "$as_me:12957: result: $cf_cv_utf8_lib" >&5
12958 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12959
12960 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12961 # ncurses/ncursesw:
12962 if test "$cf_cv_utf8_lib" = "add-on" ; then
12963
12964 cat >>confdefs.h <<\EOF
12965 #define HAVE_LIBUTF8_H 1
12966 EOF
12967
12968 if test -n "$cf_cv_header_path_utf8" ; then
12969   for cf_add_incdir in $cf_cv_header_path_utf8
12970   do
12971         while test "$cf_add_incdir" != /usr/include
12972         do
12973           if test -d "$cf_add_incdir"
12974           then
12975                 cf_have_incdir=no
12976                 if test -n "$CFLAGS$CPPFLAGS" ; then
12977                   # a loop is needed to ensure we can add subdirs of existing dirs
12978                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12979                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12980                           cf_have_incdir=yes; break
12981                         fi
12982                   done
12983                 fi
12984
12985                 if test "$cf_have_incdir" = no ; then
12986                   if test "$cf_add_incdir" = /usr/local/include ; then
12987                         if test "$GCC" = yes
12988                         then
12989                           cf_save_CPPFLAGS=$CPPFLAGS
12990
12991         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12992         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12993
12994                           cat >"conftest.$ac_ext" <<_ACEOF
12995 #line 12995 "configure"
12996 #include "confdefs.h"
12997 #include <stdio.h>
12998 int
12999 main (void)
13000 {
13001 printf("Hello")
13002   ;
13003   return 0;
13004 }
13005 _ACEOF
13006 rm -f "conftest.$ac_objext"
13007 if { (eval echo "$as_me:13007: \"$ac_compile\"") >&5
13008   (eval $ac_compile) 2>&5
13009   ac_status=$?
13010   echo "$as_me:13010: \$? = $ac_status" >&5
13011   (exit "$ac_status"); } &&
13012          { ac_try='test -s "conftest.$ac_objext"'
13013   { (eval echo "$as_me:13013: \"$ac_try\"") >&5
13014   (eval $ac_try) 2>&5
13015   ac_status=$?
13016   echo "$as_me:13016: \$? = $ac_status" >&5
13017   (exit "$ac_status"); }; }; then
13018   :
13019 else
13020   echo "$as_me: failed program was:" >&5
13021 cat "conftest.$ac_ext" >&5
13022 cf_have_incdir=yes
13023 fi
13024 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13025                           CPPFLAGS=$cf_save_CPPFLAGS
13026                         fi
13027                   fi
13028                 fi
13029
13030                 if test "$cf_have_incdir" = no ; then
13031                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13032
13033 echo "${as_me:-configure}:13033: testing adding $cf_add_incdir to include-path ..." 1>&5
13034
13035                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13036
13037                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13038                   test "$cf_top_incdir" = "$cf_add_incdir" && break
13039                   cf_add_incdir="$cf_top_incdir"
13040                 else
13041                   break
13042                 fi
13043           else
13044                 break
13045           fi
13046         done
13047   done
13048 fi
13049
13050 if test -n "$cf_cv_library_path_utf8" ; then
13051         for cf_add_libdir in $cf_cv_library_path_utf8
13052         do
13053                 if test "$cf_add_libdir" = /usr/lib ; then
13054                         :
13055                 elif test -d "$cf_add_libdir"
13056                 then
13057                         cf_have_libdir=no
13058                         if test -n "$LDFLAGS$LIBS" ; then
13059                                 # a loop is needed to ensure we can add subdirs of existing dirs
13060                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13061                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13062                                                 cf_have_libdir=yes; break
13063                                         fi
13064                                 done
13065                         fi
13066                         if test "$cf_have_libdir" = no ; then
13067                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13068
13069 echo "${as_me:-configure}:13069: testing adding $cf_add_libdir to library-path ..." 1>&5
13070
13071                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13072                         fi
13073                 fi
13074         done
13075 fi
13076
13077 cf_add_libs="$LIBS"
13078 # reverse order
13079 cf_add_0lib=
13080 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13081 # filter duplicates
13082 for cf_add_1lib in $cf_add_0lib; do
13083         for cf_add_2lib in $cf_add_libs; do
13084                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13085                         cf_add_1lib=
13086                         break
13087                 fi
13088         done
13089         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13090 done
13091 LIBS="$cf_add_libs"
13092
13093 fi
13094
13095                 if test "$cf_cv_utf8_lib" != no ; then
13096                         NCURSES_LIBUTF8=1
13097                 fi
13098         fi
13099
13100 # This is needed on Tru64 5.0 to declare mbstate_t
13101 echo "$as_me:13101: checking if we must include wchar.h to declare mbstate_t" >&5
13102 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13103 if test "${cf_cv_mbstate_t+set}" = set; then
13104   echo $ECHO_N "(cached) $ECHO_C" >&6
13105 else
13106
13107 cat >"conftest.$ac_ext" <<_ACEOF
13108 #line 13108 "configure"
13109 #include "confdefs.h"
13110
13111 #include <stdlib.h>
13112 #include <stdarg.h>
13113 #include <stdio.h>
13114 #ifdef HAVE_LIBUTF8_H
13115 #include <libutf8.h>
13116 #endif
13117 int
13118 main (void)
13119 {
13120 mbstate_t state
13121   ;
13122   return 0;
13123 }
13124 _ACEOF
13125 rm -f "conftest.$ac_objext"
13126 if { (eval echo "$as_me:13126: \"$ac_compile\"") >&5
13127   (eval $ac_compile) 2>&5
13128   ac_status=$?
13129   echo "$as_me:13129: \$? = $ac_status" >&5
13130   (exit "$ac_status"); } &&
13131          { ac_try='test -s "conftest.$ac_objext"'
13132   { (eval echo "$as_me:13132: \"$ac_try\"") >&5
13133   (eval $ac_try) 2>&5
13134   ac_status=$?
13135   echo "$as_me:13135: \$? = $ac_status" >&5
13136   (exit "$ac_status"); }; }; then
13137   cf_cv_mbstate_t=no
13138 else
13139   echo "$as_me: failed program was:" >&5
13140 cat "conftest.$ac_ext" >&5
13141 cat >"conftest.$ac_ext" <<_ACEOF
13142 #line 13142 "configure"
13143 #include "confdefs.h"
13144
13145 #include <stdlib.h>
13146 #include <stdarg.h>
13147 #include <stdio.h>
13148 #include <wchar.h>
13149 #ifdef HAVE_LIBUTF8_H
13150 #include <libutf8.h>
13151 #endif
13152 int
13153 main (void)
13154 {
13155 mbstate_t value
13156   ;
13157   return 0;
13158 }
13159 _ACEOF
13160 rm -f "conftest.$ac_objext"
13161 if { (eval echo "$as_me:13161: \"$ac_compile\"") >&5
13162   (eval $ac_compile) 2>&5
13163   ac_status=$?
13164   echo "$as_me:13164: \$? = $ac_status" >&5
13165   (exit "$ac_status"); } &&
13166          { ac_try='test -s "conftest.$ac_objext"'
13167   { (eval echo "$as_me:13167: \"$ac_try\"") >&5
13168   (eval $ac_try) 2>&5
13169   ac_status=$?
13170   echo "$as_me:13170: \$? = $ac_status" >&5
13171   (exit "$ac_status"); }; }; then
13172   cf_cv_mbstate_t=yes
13173 else
13174   echo "$as_me: failed program was:" >&5
13175 cat "conftest.$ac_ext" >&5
13176 cf_cv_mbstate_t=unknown
13177 fi
13178 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13179 fi
13180 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13181 fi
13182 echo "$as_me:13182: result: $cf_cv_mbstate_t" >&5
13183 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13184
13185 if test "$cf_cv_mbstate_t" = yes ; then
13186
13187 cat >>confdefs.h <<\EOF
13188 #define NEED_WCHAR_H 1
13189 EOF
13190
13191         NEED_WCHAR_H=1
13192 fi
13193
13194 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13195 if test "$cf_cv_mbstate_t" = unknown ; then
13196         NCURSES_MBSTATE_T=1
13197 fi
13198
13199 # This is needed on Tru64 5.0 to declare wchar_t
13200 echo "$as_me:13200: checking if we must include wchar.h to declare wchar_t" >&5
13201 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13202 if test "${cf_cv_wchar_t+set}" = set; then
13203   echo $ECHO_N "(cached) $ECHO_C" >&6
13204 else
13205
13206 cat >"conftest.$ac_ext" <<_ACEOF
13207 #line 13207 "configure"
13208 #include "confdefs.h"
13209
13210 #include <stdlib.h>
13211 #include <stdarg.h>
13212 #include <stdio.h>
13213 #ifdef HAVE_LIBUTF8_H
13214 #include <libutf8.h>
13215 #endif
13216 int
13217 main (void)
13218 {
13219 wchar_t state
13220   ;
13221   return 0;
13222 }
13223 _ACEOF
13224 rm -f "conftest.$ac_objext"
13225 if { (eval echo "$as_me:13225: \"$ac_compile\"") >&5
13226   (eval $ac_compile) 2>&5
13227   ac_status=$?
13228   echo "$as_me:13228: \$? = $ac_status" >&5
13229   (exit "$ac_status"); } &&
13230          { ac_try='test -s "conftest.$ac_objext"'
13231   { (eval echo "$as_me:13231: \"$ac_try\"") >&5
13232   (eval $ac_try) 2>&5
13233   ac_status=$?
13234   echo "$as_me:13234: \$? = $ac_status" >&5
13235   (exit "$ac_status"); }; }; then
13236   cf_cv_wchar_t=no
13237 else
13238   echo "$as_me: failed program was:" >&5
13239 cat "conftest.$ac_ext" >&5
13240 cat >"conftest.$ac_ext" <<_ACEOF
13241 #line 13241 "configure"
13242 #include "confdefs.h"
13243
13244 #include <stdlib.h>
13245 #include <stdarg.h>
13246 #include <stdio.h>
13247 #include <wchar.h>
13248 #ifdef HAVE_LIBUTF8_H
13249 #include <libutf8.h>
13250 #endif
13251 int
13252 main (void)
13253 {
13254 wchar_t value
13255   ;
13256   return 0;
13257 }
13258 _ACEOF
13259 rm -f "conftest.$ac_objext"
13260 if { (eval echo "$as_me:13260: \"$ac_compile\"") >&5
13261   (eval $ac_compile) 2>&5
13262   ac_status=$?
13263   echo "$as_me:13263: \$? = $ac_status" >&5
13264   (exit "$ac_status"); } &&
13265          { ac_try='test -s "conftest.$ac_objext"'
13266   { (eval echo "$as_me:13266: \"$ac_try\"") >&5
13267   (eval $ac_try) 2>&5
13268   ac_status=$?
13269   echo "$as_me:13269: \$? = $ac_status" >&5
13270   (exit "$ac_status"); }; }; then
13271   cf_cv_wchar_t=yes
13272 else
13273   echo "$as_me: failed program was:" >&5
13274 cat "conftest.$ac_ext" >&5
13275 cf_cv_wchar_t=unknown
13276 fi
13277 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13278 fi
13279 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13280 fi
13281 echo "$as_me:13281: result: $cf_cv_wchar_t" >&5
13282 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13283
13284 if test "$cf_cv_wchar_t" = yes ; then
13285
13286 cat >>confdefs.h <<\EOF
13287 #define NEED_WCHAR_H 1
13288 EOF
13289
13290         NEED_WCHAR_H=1
13291 fi
13292
13293 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13294 if test "$cf_cv_wchar_t" = unknown ; then
13295         NCURSES_WCHAR_T=1
13296 fi
13297
13298 # if we find wchar_t in either place, use substitution to provide a fallback.
13299 if test "$cf_cv_wchar_t" != unknown ; then
13300         NCURSES_OK_WCHAR_T=1
13301 fi
13302
13303 # This is needed on Tru64 5.0 to declare wint_t
13304 echo "$as_me:13304: checking if we must include wchar.h to declare wint_t" >&5
13305 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13306 if test "${cf_cv_wint_t+set}" = set; then
13307   echo $ECHO_N "(cached) $ECHO_C" >&6
13308 else
13309
13310 cat >"conftest.$ac_ext" <<_ACEOF
13311 #line 13311 "configure"
13312 #include "confdefs.h"
13313
13314 #include <stdlib.h>
13315 #include <stdarg.h>
13316 #include <stdio.h>
13317 #ifdef HAVE_LIBUTF8_H
13318 #include <libutf8.h>
13319 #endif
13320 int
13321 main (void)
13322 {
13323 wint_t state
13324   ;
13325   return 0;
13326 }
13327 _ACEOF
13328 rm -f "conftest.$ac_objext"
13329 if { (eval echo "$as_me:13329: \"$ac_compile\"") >&5
13330   (eval $ac_compile) 2>&5
13331   ac_status=$?
13332   echo "$as_me:13332: \$? = $ac_status" >&5
13333   (exit "$ac_status"); } &&
13334          { ac_try='test -s "conftest.$ac_objext"'
13335   { (eval echo "$as_me:13335: \"$ac_try\"") >&5
13336   (eval $ac_try) 2>&5
13337   ac_status=$?
13338   echo "$as_me:13338: \$? = $ac_status" >&5
13339   (exit "$ac_status"); }; }; then
13340   cf_cv_wint_t=no
13341 else
13342   echo "$as_me: failed program was:" >&5
13343 cat "conftest.$ac_ext" >&5
13344 cat >"conftest.$ac_ext" <<_ACEOF
13345 #line 13345 "configure"
13346 #include "confdefs.h"
13347
13348 #include <stdlib.h>
13349 #include <stdarg.h>
13350 #include <stdio.h>
13351 #include <wchar.h>
13352 #ifdef HAVE_LIBUTF8_H
13353 #include <libutf8.h>
13354 #endif
13355 int
13356 main (void)
13357 {
13358 wint_t value
13359   ;
13360   return 0;
13361 }
13362 _ACEOF
13363 rm -f "conftest.$ac_objext"
13364 if { (eval echo "$as_me:13364: \"$ac_compile\"") >&5
13365   (eval $ac_compile) 2>&5
13366   ac_status=$?
13367   echo "$as_me:13367: \$? = $ac_status" >&5
13368   (exit "$ac_status"); } &&
13369          { ac_try='test -s "conftest.$ac_objext"'
13370   { (eval echo "$as_me:13370: \"$ac_try\"") >&5
13371   (eval $ac_try) 2>&5
13372   ac_status=$?
13373   echo "$as_me:13373: \$? = $ac_status" >&5
13374   (exit "$ac_status"); }; }; then
13375   cf_cv_wint_t=yes
13376 else
13377   echo "$as_me: failed program was:" >&5
13378 cat "conftest.$ac_ext" >&5
13379 cf_cv_wint_t=unknown
13380 fi
13381 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13382 fi
13383 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13384 fi
13385 echo "$as_me:13385: result: $cf_cv_wint_t" >&5
13386 echo "${ECHO_T}$cf_cv_wint_t" >&6
13387
13388 if test "$cf_cv_wint_t" = yes ; then
13389
13390 cat >>confdefs.h <<\EOF
13391 #define NEED_WCHAR_H 1
13392 EOF
13393
13394         NEED_WCHAR_H=1
13395 fi
13396
13397 # if we do not find wint_t in either place, use substitution to provide a fallback.
13398 if test "$cf_cv_wint_t" = unknown ; then
13399         NCURSES_WINT_T=1
13400 fi
13401
13402 # if we find wint_t in either place, use substitution to provide a fallback.
13403 if test "$cf_cv_wint_t" != unknown ; then
13404         NCURSES_OK_WINT_T=1
13405 fi
13406
13407         if test "$NCURSES_MBSTATE_T" != 0; then
13408
13409 cat >>confdefs.h <<\EOF
13410 #define NEED_MBSTATE_T_DEF 1
13411 EOF
13412
13413         fi
13414 fi
13415
13416 ###   use option --disable-lp64 to allow long chtype
13417 echo "$as_me:13417: checking whether to enable _LP64 definition in curses.h" >&5
13418 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13419
13420 # Check whether --enable-lp64 or --disable-lp64 was given.
13421 if test "${enable_lp64+set}" = set; then
13422   enableval="$enable_lp64"
13423   with_lp64=$enableval
13424 else
13425   with_lp64=$cf_dft_with_lp64
13426 fi;
13427 echo "$as_me:13427: result: $with_lp64" >&5
13428 echo "${ECHO_T}$with_lp64" >&6
13429
13430 if test "x$with_lp64" = xyes ; then
13431         cf_cv_enable_lp64=1
13432 else
13433         cf_cv_enable_lp64=0
13434 fi
13435
13436 # Check whether --enable-largefile or --disable-largefile was given.
13437 if test "${enable_largefile+set}" = set; then
13438   enableval="$enable_largefile"
13439
13440 fi;
13441 if test "$enable_largefile" != no; then
13442
13443   echo "$as_me:13443: checking for special C compiler options needed for large files" >&5
13444 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13445 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13446   echo $ECHO_N "(cached) $ECHO_C" >&6
13447 else
13448   ac_cv_sys_largefile_CC=no
13449      if test "$GCC" != yes; then
13450        ac_save_CC=$CC
13451        while :; do
13452          # IRIX 6.2 and later do not support large files by default,
13453          # so use the C compiler's -n32 option if that helps.
13454          cat >"conftest.$ac_ext" <<_ACEOF
13455 #line 13455 "configure"
13456 #include "confdefs.h"
13457 #include <sys/types.h>
13458  /* Check that off_t can represent 2**63 - 1 correctly.
13459     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13460     since some C++ compilers masquerading as C compilers
13461     incorrectly reject 9223372036854775807.  */
13462 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13463   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13464                        && LARGE_OFF_T % 2147483647 == 1)
13465                       ? 1 : -1];
13466 int
13467 main (void)
13468 {
13469
13470   ;
13471   return 0;
13472 }
13473 _ACEOF
13474          rm -f "conftest.$ac_objext"
13475 if { (eval echo "$as_me:13475: \"$ac_compile\"") >&5
13476   (eval $ac_compile) 2>&5
13477   ac_status=$?
13478   echo "$as_me:13478: \$? = $ac_status" >&5
13479   (exit "$ac_status"); } &&
13480          { ac_try='test -s "conftest.$ac_objext"'
13481   { (eval echo "$as_me:13481: \"$ac_try\"") >&5
13482   (eval $ac_try) 2>&5
13483   ac_status=$?
13484   echo "$as_me:13484: \$? = $ac_status" >&5
13485   (exit "$ac_status"); }; }; then
13486   break
13487 else
13488   echo "$as_me: failed program was:" >&5
13489 cat "conftest.$ac_ext" >&5
13490 fi
13491 rm -f "conftest.$ac_objext"
13492          CC="$CC -n32"
13493          rm -f "conftest.$ac_objext"
13494 if { (eval echo "$as_me:13494: \"$ac_compile\"") >&5
13495   (eval $ac_compile) 2>&5
13496   ac_status=$?
13497   echo "$as_me:13497: \$? = $ac_status" >&5
13498   (exit "$ac_status"); } &&
13499          { ac_try='test -s "conftest.$ac_objext"'
13500   { (eval echo "$as_me:13500: \"$ac_try\"") >&5
13501   (eval $ac_try) 2>&5
13502   ac_status=$?
13503   echo "$as_me:13503: \$? = $ac_status" >&5
13504   (exit "$ac_status"); }; }; then
13505   ac_cv_sys_largefile_CC=' -n32'; break
13506 else
13507   echo "$as_me: failed program was:" >&5
13508 cat "conftest.$ac_ext" >&5
13509 fi
13510 rm -f "conftest.$ac_objext"
13511          break
13512        done
13513        CC=$ac_save_CC
13514        rm -f "conftest.$ac_ext"
13515     fi
13516 fi
13517 echo "$as_me:13517: result: $ac_cv_sys_largefile_CC" >&5
13518 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13519   if test "$ac_cv_sys_largefile_CC" != no; then
13520     CC=$CC$ac_cv_sys_largefile_CC
13521   fi
13522
13523   echo "$as_me:13523: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13524 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13525 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13526   echo $ECHO_N "(cached) $ECHO_C" >&6
13527 else
13528   while :; do
13529   ac_cv_sys_file_offset_bits=no
13530   cat >"conftest.$ac_ext" <<_ACEOF
13531 #line 13531 "configure"
13532 #include "confdefs.h"
13533 #include <sys/types.h>
13534  /* Check that off_t can represent 2**63 - 1 correctly.
13535     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13536     since some C++ compilers masquerading as C compilers
13537     incorrectly reject 9223372036854775807.  */
13538 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13539   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13540                        && LARGE_OFF_T % 2147483647 == 1)
13541                       ? 1 : -1];
13542 int
13543 main (void)
13544 {
13545
13546   ;
13547   return 0;
13548 }
13549 _ACEOF
13550 rm -f "conftest.$ac_objext"
13551 if { (eval echo "$as_me:13551: \"$ac_compile\"") >&5
13552   (eval $ac_compile) 2>&5
13553   ac_status=$?
13554   echo "$as_me:13554: \$? = $ac_status" >&5
13555   (exit "$ac_status"); } &&
13556          { ac_try='test -s "conftest.$ac_objext"'
13557   { (eval echo "$as_me:13557: \"$ac_try\"") >&5
13558   (eval $ac_try) 2>&5
13559   ac_status=$?
13560   echo "$as_me:13560: \$? = $ac_status" >&5
13561   (exit "$ac_status"); }; }; then
13562   break
13563 else
13564   echo "$as_me: failed program was:" >&5
13565 cat "conftest.$ac_ext" >&5
13566 fi
13567 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13568   cat >"conftest.$ac_ext" <<_ACEOF
13569 #line 13569 "configure"
13570 #include "confdefs.h"
13571 #define _FILE_OFFSET_BITS 64
13572 #include <sys/types.h>
13573  /* Check that off_t can represent 2**63 - 1 correctly.
13574     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13575     since some C++ compilers masquerading as C compilers
13576     incorrectly reject 9223372036854775807.  */
13577 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13578   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13579                        && LARGE_OFF_T % 2147483647 == 1)
13580                       ? 1 : -1];
13581 int
13582 main (void)
13583 {
13584
13585   ;
13586   return 0;
13587 }
13588 _ACEOF
13589 rm -f "conftest.$ac_objext"
13590 if { (eval echo "$as_me:13590: \"$ac_compile\"") >&5
13591   (eval $ac_compile) 2>&5
13592   ac_status=$?
13593   echo "$as_me:13593: \$? = $ac_status" >&5
13594   (exit "$ac_status"); } &&
13595          { ac_try='test -s "conftest.$ac_objext"'
13596   { (eval echo "$as_me:13596: \"$ac_try\"") >&5
13597   (eval $ac_try) 2>&5
13598   ac_status=$?
13599   echo "$as_me:13599: \$? = $ac_status" >&5
13600   (exit "$ac_status"); }; }; then
13601   ac_cv_sys_file_offset_bits=64; break
13602 else
13603   echo "$as_me: failed program was:" >&5
13604 cat "conftest.$ac_ext" >&5
13605 fi
13606 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13607   break
13608 done
13609 fi
13610 echo "$as_me:13610: result: $ac_cv_sys_file_offset_bits" >&5
13611 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13612 if test "$ac_cv_sys_file_offset_bits" != no; then
13613
13614 cat >>confdefs.h <<EOF
13615 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13616 EOF
13617
13618 fi
13619 rm -rf conftest*
13620   echo "$as_me:13620: checking for _LARGE_FILES value needed for large files" >&5
13621 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13622 if test "${ac_cv_sys_large_files+set}" = set; then
13623   echo $ECHO_N "(cached) $ECHO_C" >&6
13624 else
13625   while :; do
13626   ac_cv_sys_large_files=no
13627   cat >"conftest.$ac_ext" <<_ACEOF
13628 #line 13628 "configure"
13629 #include "confdefs.h"
13630 #include <sys/types.h>
13631  /* Check that off_t can represent 2**63 - 1 correctly.
13632     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13633     since some C++ compilers masquerading as C compilers
13634     incorrectly reject 9223372036854775807.  */
13635 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13636   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13637                        && LARGE_OFF_T % 2147483647 == 1)
13638                       ? 1 : -1];
13639 int
13640 main (void)
13641 {
13642
13643   ;
13644   return 0;
13645 }
13646 _ACEOF
13647 rm -f "conftest.$ac_objext"
13648 if { (eval echo "$as_me:13648: \"$ac_compile\"") >&5
13649   (eval $ac_compile) 2>&5
13650   ac_status=$?
13651   echo "$as_me:13651: \$? = $ac_status" >&5
13652   (exit "$ac_status"); } &&
13653          { ac_try='test -s "conftest.$ac_objext"'
13654   { (eval echo "$as_me:13654: \"$ac_try\"") >&5
13655   (eval $ac_try) 2>&5
13656   ac_status=$?
13657   echo "$as_me:13657: \$? = $ac_status" >&5
13658   (exit "$ac_status"); }; }; then
13659   break
13660 else
13661   echo "$as_me: failed program was:" >&5
13662 cat "conftest.$ac_ext" >&5
13663 fi
13664 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13665   cat >"conftest.$ac_ext" <<_ACEOF
13666 #line 13666 "configure"
13667 #include "confdefs.h"
13668 #define _LARGE_FILES 1
13669 #include <sys/types.h>
13670  /* Check that off_t can represent 2**63 - 1 correctly.
13671     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13672     since some C++ compilers masquerading as C compilers
13673     incorrectly reject 9223372036854775807.  */
13674 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13675   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13676                        && LARGE_OFF_T % 2147483647 == 1)
13677                       ? 1 : -1];
13678 int
13679 main (void)
13680 {
13681
13682   ;
13683   return 0;
13684 }
13685 _ACEOF
13686 rm -f "conftest.$ac_objext"
13687 if { (eval echo "$as_me:13687: \"$ac_compile\"") >&5
13688   (eval $ac_compile) 2>&5
13689   ac_status=$?
13690   echo "$as_me:13690: \$? = $ac_status" >&5
13691   (exit "$ac_status"); } &&
13692          { ac_try='test -s "conftest.$ac_objext"'
13693   { (eval echo "$as_me:13693: \"$ac_try\"") >&5
13694   (eval $ac_try) 2>&5
13695   ac_status=$?
13696   echo "$as_me:13696: \$? = $ac_status" >&5
13697   (exit "$ac_status"); }; }; then
13698   ac_cv_sys_large_files=1; break
13699 else
13700   echo "$as_me: failed program was:" >&5
13701 cat "conftest.$ac_ext" >&5
13702 fi
13703 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13704   break
13705 done
13706 fi
13707 echo "$as_me:13707: result: $ac_cv_sys_large_files" >&5
13708 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13709 if test "$ac_cv_sys_large_files" != no; then
13710
13711 cat >>confdefs.h <<EOF
13712 #define _LARGE_FILES $ac_cv_sys_large_files
13713 EOF
13714
13715 fi
13716 rm -rf conftest*
13717 fi
13718
13719         if test "$enable_largefile" != no ; then
13720         echo "$as_me:13720: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13721 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13722 if test "${ac_cv_sys_largefile_source+set}" = set; then
13723   echo $ECHO_N "(cached) $ECHO_C" >&6
13724 else
13725   while :; do
13726   ac_cv_sys_largefile_source=no
13727   cat >"conftest.$ac_ext" <<_ACEOF
13728 #line 13728 "configure"
13729 #include "confdefs.h"
13730 #include <stdio.h>
13731 int
13732 main (void)
13733 {
13734 return !fseeko;
13735   ;
13736   return 0;
13737 }
13738 _ACEOF
13739 rm -f "conftest.$ac_objext"
13740 if { (eval echo "$as_me:13740: \"$ac_compile\"") >&5
13741   (eval $ac_compile) 2>&5
13742   ac_status=$?
13743   echo "$as_me:13743: \$? = $ac_status" >&5
13744   (exit "$ac_status"); } &&
13745          { ac_try='test -s "conftest.$ac_objext"'
13746   { (eval echo "$as_me:13746: \"$ac_try\"") >&5
13747   (eval $ac_try) 2>&5
13748   ac_status=$?
13749   echo "$as_me:13749: \$? = $ac_status" >&5
13750   (exit "$ac_status"); }; }; then
13751   break
13752 else
13753   echo "$as_me: failed program was:" >&5
13754 cat "conftest.$ac_ext" >&5
13755 fi
13756 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13757   cat >"conftest.$ac_ext" <<_ACEOF
13758 #line 13758 "configure"
13759 #include "confdefs.h"
13760 #define _LARGEFILE_SOURCE 1
13761 #include <stdio.h>
13762 int
13763 main (void)
13764 {
13765 return !fseeko;
13766   ;
13767   return 0;
13768 }
13769 _ACEOF
13770 rm -f "conftest.$ac_objext"
13771 if { (eval echo "$as_me:13771: \"$ac_compile\"") >&5
13772   (eval $ac_compile) 2>&5
13773   ac_status=$?
13774   echo "$as_me:13774: \$? = $ac_status" >&5
13775   (exit "$ac_status"); } &&
13776          { ac_try='test -s "conftest.$ac_objext"'
13777   { (eval echo "$as_me:13777: \"$ac_try\"") >&5
13778   (eval $ac_try) 2>&5
13779   ac_status=$?
13780   echo "$as_me:13780: \$? = $ac_status" >&5
13781   (exit "$ac_status"); }; }; then
13782   ac_cv_sys_largefile_source=1; break
13783 else
13784   echo "$as_me: failed program was:" >&5
13785 cat "conftest.$ac_ext" >&5
13786 fi
13787 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13788   break
13789 done
13790 fi
13791 echo "$as_me:13791: result: $ac_cv_sys_largefile_source" >&5
13792 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13793 if test "$ac_cv_sys_largefile_source" != no; then
13794
13795 cat >>confdefs.h <<EOF
13796 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13797 EOF
13798
13799 fi
13800 rm -rf conftest*
13801
13802 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13803 # in glibc 2.1.3, but that breaks too many other things.
13804 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13805 echo "$as_me:13805: checking for fseeko" >&5
13806 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13807 if test "${ac_cv_func_fseeko+set}" = set; then
13808   echo $ECHO_N "(cached) $ECHO_C" >&6
13809 else
13810   cat >"conftest.$ac_ext" <<_ACEOF
13811 #line 13811 "configure"
13812 #include "confdefs.h"
13813 #include <stdio.h>
13814 int
13815 main (void)
13816 {
13817 return fseeko && fseeko (stdin, 0, 0);
13818   ;
13819   return 0;
13820 }
13821 _ACEOF
13822 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13823 if { (eval echo "$as_me:13823: \"$ac_link\"") >&5
13824   (eval $ac_link) 2>&5
13825   ac_status=$?
13826   echo "$as_me:13826: \$? = $ac_status" >&5
13827   (exit "$ac_status"); } &&
13828          { ac_try='test -s "conftest$ac_exeext"'
13829   { (eval echo "$as_me:13829: \"$ac_try\"") >&5
13830   (eval $ac_try) 2>&5
13831   ac_status=$?
13832   echo "$as_me:13832: \$? = $ac_status" >&5
13833   (exit "$ac_status"); }; }; then
13834   ac_cv_func_fseeko=yes
13835 else
13836   echo "$as_me: failed program was:" >&5
13837 cat "conftest.$ac_ext" >&5
13838 ac_cv_func_fseeko=no
13839 fi
13840 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13841 fi
13842 echo "$as_me:13842: result: $ac_cv_func_fseeko" >&5
13843 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13844 if test $ac_cv_func_fseeko = yes; then
13845
13846 cat >>confdefs.h <<\EOF
13847 #define HAVE_FSEEKO 1
13848 EOF
13849
13850 fi
13851
13852         # Normally we would collect these definitions in the config.h,
13853         # but (like _XOPEN_SOURCE), some environments rely on having these
13854         # defined before any of the system headers are included.  Another
13855         # case comes up with C++, e.g., on AIX the compiler compiles the
13856         # header files by themselves before looking at the body files it is
13857         # told to compile.  For ncurses, those header files do not include
13858         # the config.h
13859         if test "$ac_cv_sys_large_files" != no
13860         then
13861
13862         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13863         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13864
13865         fi
13866         if test "$ac_cv_sys_largefile_source" != no
13867         then
13868
13869         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13870         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13871
13872         fi
13873         if test "$ac_cv_sys_file_offset_bits" != no
13874         then
13875
13876         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13877         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13878
13879         fi
13880
13881         echo "$as_me:13881: checking whether to use struct dirent64" >&5
13882 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13883 if test "${cf_cv_struct_dirent64+set}" = set; then
13884   echo $ECHO_N "(cached) $ECHO_C" >&6
13885 else
13886
13887                 cat >"conftest.$ac_ext" <<_ACEOF
13888 #line 13888 "configure"
13889 #include "confdefs.h"
13890
13891 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13892 #include <sys/types.h>
13893 #include <dirent.h>
13894
13895 int
13896 main (void)
13897 {
13898
13899                 /* if transitional largefile support is setup, this is true */
13900                 extern struct dirent64 * readdir(DIR *);
13901                 struct dirent64 *x = readdir((DIR *)0);
13902                 struct dirent *y = readdir((DIR *)0);
13903                 int z = x - y;
13904                 (void)z;
13905
13906   ;
13907   return 0;
13908 }
13909 _ACEOF
13910 rm -f "conftest.$ac_objext"
13911 if { (eval echo "$as_me:13911: \"$ac_compile\"") >&5
13912   (eval $ac_compile) 2>&5
13913   ac_status=$?
13914   echo "$as_me:13914: \$? = $ac_status" >&5
13915   (exit "$ac_status"); } &&
13916          { ac_try='test -s "conftest.$ac_objext"'
13917   { (eval echo "$as_me:13917: \"$ac_try\"") >&5
13918   (eval $ac_try) 2>&5
13919   ac_status=$?
13920   echo "$as_me:13920: \$? = $ac_status" >&5
13921   (exit "$ac_status"); }; }; then
13922   cf_cv_struct_dirent64=yes
13923 else
13924   echo "$as_me: failed program was:" >&5
13925 cat "conftest.$ac_ext" >&5
13926 cf_cv_struct_dirent64=no
13927 fi
13928 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13929
13930 fi
13931 echo "$as_me:13931: result: $cf_cv_struct_dirent64" >&5
13932 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13933         test "$cf_cv_struct_dirent64" = yes &&
13934 cat >>confdefs.h <<\EOF
13935 #define HAVE_STRUCT_DIRENT64 1
13936 EOF
13937
13938         fi
13939
13940 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13941 echo "$as_me:13941: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13942 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13943
13944 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13945 if test "${enable_tparm_varargs+set}" = set; then
13946   enableval="$enable_tparm_varargs"
13947   with_tparm_varargs=$enableval
13948 else
13949   with_tparm_varargs=yes
13950 fi;
13951 echo "$as_me:13951: result: $with_tparm_varargs" >&5
13952 echo "${ECHO_T}$with_tparm_varargs" >&6
13953 NCURSES_TPARM_VARARGS=0
13954 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13955
13956 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13957 if test "$with_ticlib" != no ; then
13958 echo "$as_me:13958: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13959 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13960
13961 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13962 if test "${enable_tic_depends+set}" = set; then
13963   enableval="$enable_tic_depends"
13964   with_tic_depends=$enableval
13965 else
13966   with_tic_depends=yes
13967 fi;
13968 echo "$as_me:13968: result: $with_tic_depends" >&5
13969 echo "${ECHO_T}$with_tic_depends" >&6
13970 else
13971         with_tic_depends=no
13972 fi
13973
13974 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
13975 echo "$as_me:13975: checking if you want to enable wattr* macros" >&5
13976 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
13977
13978 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13979 if test "${enable_wattr_macros+set}" = set; then
13980   enableval="$enable_wattr_macros"
13981   with_wattr_macros=$enableval
13982 else
13983   with_wattr_macros=no
13984 fi;
13985 if [ "x$with_wattr_macros" != xyes ]; then
13986         NCURSES_WATTR_MACROS=0
13987         echo "$as_me:13987: result: no" >&5
13988 echo "${ECHO_T}no" >&6
13989 else
13990         NCURSES_WATTR_MACROS=1
13991         echo "$as_me:13991: result: yes" >&5
13992 echo "${ECHO_T}yes" >&6
13993 fi
13994
13995 echo "$as_me:13995: checking for X11 rgb file" >&5
13996 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13997
13998 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13999 if test "${with_x11_rgb+set}" = set; then
14000   withval="$with_x11_rgb"
14001   RGB_PATH=$withval
14002 else
14003   RGB_PATH=auto
14004 fi;
14005
14006 if test "x$RGB_PATH" = xauto
14007 then
14008         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14009         for cf_path in \
14010                 /opt/local/share/X11/rgb.txt \
14011                 /opt/X11/share/X11/rgb.txt \
14012                 /usr/share/X11/rgb.txt \
14013                 /usr/X11/share/X11/rgb.txt \
14014                 /usr/X11/lib/X11/rgb.txt \
14015                 /usr/lib/X11/rgb.txt \
14016                 /etc/X11/rgb.txt \
14017                 /usr/pkg/lib/X11/rgb.txt \
14018                 /usr/X11R7/lib/X11/rgb.txt \
14019                 /usr/X11R6/lib/X11/rgb.txt \
14020                 /usr/X11R5/lib/X11/rgb.txt \
14021                 /usr/X11R4/lib/X11/rgb.txt \
14022                 /usr/local/lib/X11/rgb.txt \
14023                 /usr/local/share/X11/rgb.txt \
14024                 /usr/lib64/X11/rgb.txt
14025         do
14026                 if test -f "$cf_path" ; then
14027                         RGB_PATH="$cf_path"
14028                         break
14029                 fi
14030         done
14031 else
14032         cf_path=$RGB_PATH
14033
14034 if test "x$prefix" != xNONE; then
14035         cf_path_syntax="$prefix"
14036 else
14037         cf_path_syntax="$ac_default_prefix"
14038 fi
14039
14040 case ".$cf_path" in
14041 (.\$\(*\)*|.\'*\'*)
14042         ;;
14043 (..|./*|.\\*)
14044         ;;
14045 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14046         ;;
14047 (.\$\{*prefix\}*|.\$\{*dir\}*)
14048         eval cf_path="$cf_path"
14049         case ".$cf_path" in
14050         (.NONE/*)
14051                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14052                 ;;
14053         esac
14054         ;;
14055 (.no|.NONE/*)
14056         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14057         ;;
14058 (*)
14059         { { echo "$as_me:14059: error: expected a pathname, not \"$cf_path\"" >&5
14060 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14061    { (exit 1); exit 1; }; }
14062         ;;
14063 esac
14064
14065 fi
14066
14067 echo "$as_me:14067: result: $RGB_PATH" >&5
14068 echo "${ECHO_T}$RGB_PATH" >&6
14069
14070 cat >>confdefs.h <<EOF
14071 #define RGB_PATH "$cf_path"
14072 EOF
14073
14074 no_x11_rgb=
14075 if test "$RGB_PATH" = no
14076 then
14077         no_x11_rgb="#"
14078 fi
14079
14080 ###   use option --with-bool to override bool's type
14081 echo "$as_me:14081: checking for type of bool" >&5
14082 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14083
14084 # Check whether --with-bool or --without-bool was given.
14085 if test "${with_bool+set}" = set; then
14086   withval="$with_bool"
14087   NCURSES_BOOL="$withval"
14088 else
14089   NCURSES_BOOL=auto
14090 fi;
14091 echo "$as_me:14091: result: $NCURSES_BOOL" >&5
14092 echo "${ECHO_T}$NCURSES_BOOL" >&6
14093
14094 echo "$as_me:14094: checking for alternate terminal capabilities file" >&5
14095 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14096
14097 # Check whether --with-caps or --without-caps was given.
14098 if test "${with_caps+set}" = set; then
14099   withval="$with_caps"
14100   TERMINFO_CAPS=Caps.$withval
14101 else
14102   TERMINFO_CAPS=Caps
14103 fi;
14104 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14105 then
14106         { echo "$as_me:14106: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14107 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14108         TERMINFO_CAPS=Caps
14109 fi
14110 echo "$as_me:14110: result: $TERMINFO_CAPS" >&5
14111 echo "${ECHO_T}$TERMINFO_CAPS" >&6
14112
14113 ###   use option --with-chtype to override chtype's type
14114 echo "$as_me:14114: checking for type of chtype" >&5
14115 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14116
14117 # Check whether --with-chtype or --without-chtype was given.
14118 if test "${with_chtype+set}" = set; then
14119   withval="$with_chtype"
14120   NCURSES_CHTYPE="$withval"
14121 else
14122   NCURSES_CHTYPE=$cf_dft_chtype
14123 fi;
14124 echo "$as_me:14124: result: $NCURSES_CHTYPE" >&5
14125 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14126
14127 ###   use option --with-ospeed to override ospeed's type
14128 echo "$as_me:14128: checking for type of ospeed" >&5
14129 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14130
14131 # Check whether --with-ospeed or --without-ospeed was given.
14132 if test "${with_ospeed+set}" = set; then
14133   withval="$with_ospeed"
14134   NCURSES_OSPEED="$withval"
14135 else
14136   NCURSES_OSPEED=short
14137 fi;
14138 echo "$as_me:14138: result: $NCURSES_OSPEED" >&5
14139 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14140
14141 ###   use option --with-mmask-t to override mmask_t's type
14142 echo "$as_me:14142: checking for type of mmask_t" >&5
14143 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14144
14145 # Check whether --with-mmask-t or --without-mmask-t was given.
14146 if test "${with_mmask_t+set}" = set; then
14147   withval="$with_mmask_t"
14148   NCURSES_MMASK_T="$withval"
14149 else
14150   NCURSES_MMASK_T=$cf_dft_mmask_t
14151 fi;
14152 echo "$as_me:14152: result: $NCURSES_MMASK_T" >&5
14153 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14154
14155 ###   use option --with-ccharw-max to override CCHARW_MAX size
14156 echo "$as_me:14156: checking for size CCHARW_MAX" >&5
14157 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14158
14159 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14160 if test "${with_ccharw_max+set}" = set; then
14161   withval="$with_ccharw_max"
14162   NCURSES_CCHARW_MAX="$withval"
14163 else
14164   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14165 fi;
14166 echo "$as_me:14166: result: $NCURSES_CCHARW_MAX" >&5
14167 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14168
14169 echo "$as_me:14169: checking for ANSI C header files" >&5
14170 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14171 if test "${ac_cv_header_stdc+set}" = set; then
14172   echo $ECHO_N "(cached) $ECHO_C" >&6
14173 else
14174   cat >"conftest.$ac_ext" <<_ACEOF
14175 #line 14175 "configure"
14176 #include "confdefs.h"
14177 #include <stdlib.h>
14178 #include <stdarg.h>
14179 #include <string.h>
14180 #include <float.h>
14181
14182 _ACEOF
14183 if { (eval echo "$as_me:14183: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14184   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14185   ac_status=$?
14186   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14187   rm -f conftest.er1
14188   cat conftest.err >&5
14189   echo "$as_me:14189: \$? = $ac_status" >&5
14190   (exit "$ac_status"); } >/dev/null; then
14191   if test -s conftest.err; then
14192     ac_cpp_err=$ac_c_preproc_warn_flag
14193   else
14194     ac_cpp_err=
14195   fi
14196 else
14197   ac_cpp_err=yes
14198 fi
14199 if test -z "$ac_cpp_err"; then
14200   ac_cv_header_stdc=yes
14201 else
14202   echo "$as_me: failed program was:" >&5
14203   cat "conftest.$ac_ext" >&5
14204   ac_cv_header_stdc=no
14205 fi
14206 rm -f conftest.err "conftest.$ac_ext"
14207
14208 if test $ac_cv_header_stdc = yes; then
14209   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14210   cat >"conftest.$ac_ext" <<_ACEOF
14211 #line 14211 "configure"
14212 #include "confdefs.h"
14213 #include <string.h>
14214
14215 _ACEOF
14216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14217   $EGREP "memchr" >/dev/null 2>&1; then
14218   :
14219 else
14220   ac_cv_header_stdc=no
14221 fi
14222 rm -rf conftest*
14223
14224 fi
14225
14226 if test $ac_cv_header_stdc = yes; then
14227   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14228   cat >"conftest.$ac_ext" <<_ACEOF
14229 #line 14229 "configure"
14230 #include "confdefs.h"
14231 #include <stdlib.h>
14232
14233 _ACEOF
14234 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14235   $EGREP "free" >/dev/null 2>&1; then
14236   :
14237 else
14238   ac_cv_header_stdc=no
14239 fi
14240 rm -rf conftest*
14241
14242 fi
14243
14244 if test $ac_cv_header_stdc = yes; then
14245   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14246   if test "$cross_compiling" = yes; then
14247   :
14248 else
14249   cat >"conftest.$ac_ext" <<_ACEOF
14250 #line 14250 "configure"
14251 #include "confdefs.h"
14252 #include <ctype.h>
14253 #if ((' ' & 0x0FF) == 0x020)
14254 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14255 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14256 #else
14257 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14258                      || ('j' <= (c) && (c) <= 'r') \
14259                      || ('s' <= (c) && (c) <= 'z'))
14260 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14261 #endif
14262
14263 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14264 int
14265 main (void)
14266 {
14267   int i;
14268   for (i = 0; i < 256; i++)
14269     if (XOR (islower (i), ISLOWER (i))
14270         || toupper (i) != TOUPPER (i))
14271       $ac_main_return(2);
14272   $ac_main_return (0);
14273 }
14274 _ACEOF
14275 rm -f "conftest$ac_exeext"
14276 if { (eval echo "$as_me:14276: \"$ac_link\"") >&5
14277   (eval $ac_link) 2>&5
14278   ac_status=$?
14279   echo "$as_me:14279: \$? = $ac_status" >&5
14280   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14281   { (eval echo "$as_me:14281: \"$ac_try\"") >&5
14282   (eval $ac_try) 2>&5
14283   ac_status=$?
14284   echo "$as_me:14284: \$? = $ac_status" >&5
14285   (exit "$ac_status"); }; }; then
14286   :
14287 else
14288   echo "$as_me: program exited with status $ac_status" >&5
14289 echo "$as_me: failed program was:" >&5
14290 cat "conftest.$ac_ext" >&5
14291 ac_cv_header_stdc=no
14292 fi
14293 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14294 fi
14295 fi
14296 fi
14297 echo "$as_me:14297: result: $ac_cv_header_stdc" >&5
14298 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14299 if test $ac_cv_header_stdc = yes; then
14300
14301 cat >>confdefs.h <<\EOF
14302 #define STDC_HEADERS 1
14303 EOF
14304
14305 fi
14306
14307 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14308
14309 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14310                   inttypes.h stdint.h unistd.h
14311 do
14312 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14313 echo "$as_me:14313: checking for $ac_header" >&5
14314 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14315 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14316   echo $ECHO_N "(cached) $ECHO_C" >&6
14317 else
14318   cat >"conftest.$ac_ext" <<_ACEOF
14319 #line 14319 "configure"
14320 #include "confdefs.h"
14321 $ac_includes_default
14322 #include <$ac_header>
14323 _ACEOF
14324 rm -f "conftest.$ac_objext"
14325 if { (eval echo "$as_me:14325: \"$ac_compile\"") >&5
14326   (eval $ac_compile) 2>&5
14327   ac_status=$?
14328   echo "$as_me:14328: \$? = $ac_status" >&5
14329   (exit "$ac_status"); } &&
14330          { ac_try='test -s "conftest.$ac_objext"'
14331   { (eval echo "$as_me:14331: \"$ac_try\"") >&5
14332   (eval $ac_try) 2>&5
14333   ac_status=$?
14334   echo "$as_me:14334: \$? = $ac_status" >&5
14335   (exit "$ac_status"); }; }; then
14336   eval "$as_ac_Header=yes"
14337 else
14338   echo "$as_me: failed program was:" >&5
14339 cat "conftest.$ac_ext" >&5
14340 eval "$as_ac_Header=no"
14341 fi
14342 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14343 fi
14344 echo "$as_me:14344: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14345 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14346 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14347   cat >>confdefs.h <<EOF
14348 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14349 EOF
14350
14351 fi
14352 done
14353
14354 echo "$as_me:14354: checking for signed char" >&5
14355 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14356 if test "${ac_cv_type_signed_char+set}" = set; then
14357   echo $ECHO_N "(cached) $ECHO_C" >&6
14358 else
14359   cat >"conftest.$ac_ext" <<_ACEOF
14360 #line 14360 "configure"
14361 #include "confdefs.h"
14362 $ac_includes_default
14363 int
14364 main (void)
14365 {
14366 if ((signed char *) 0)
14367   return 0;
14368 if (sizeof (signed char))
14369   return 0;
14370   ;
14371   return 0;
14372 }
14373 _ACEOF
14374 rm -f "conftest.$ac_objext"
14375 if { (eval echo "$as_me:14375: \"$ac_compile\"") >&5
14376   (eval $ac_compile) 2>&5
14377   ac_status=$?
14378   echo "$as_me:14378: \$? = $ac_status" >&5
14379   (exit "$ac_status"); } &&
14380          { ac_try='test -s "conftest.$ac_objext"'
14381   { (eval echo "$as_me:14381: \"$ac_try\"") >&5
14382   (eval $ac_try) 2>&5
14383   ac_status=$?
14384   echo "$as_me:14384: \$? = $ac_status" >&5
14385   (exit "$ac_status"); }; }; then
14386   ac_cv_type_signed_char=yes
14387 else
14388   echo "$as_me: failed program was:" >&5
14389 cat "conftest.$ac_ext" >&5
14390 ac_cv_type_signed_char=no
14391 fi
14392 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14393 fi
14394 echo "$as_me:14394: result: $ac_cv_type_signed_char" >&5
14395 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14396
14397 echo "$as_me:14397: checking size of signed char" >&5
14398 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14399 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14400   echo $ECHO_N "(cached) $ECHO_C" >&6
14401 else
14402   if test "$ac_cv_type_signed_char" = yes; then
14403   if test "$cross_compiling" = yes; then
14404   # Depending upon the size, compute the lo and hi bounds.
14405 cat >"conftest.$ac_ext" <<_ACEOF
14406 #line 14406 "configure"
14407 #include "confdefs.h"
14408 $ac_includes_default
14409 int
14410 main (void)
14411 {
14412 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14413   ;
14414   return 0;
14415 }
14416 _ACEOF
14417 rm -f "conftest.$ac_objext"
14418 if { (eval echo "$as_me:14418: \"$ac_compile\"") >&5
14419   (eval $ac_compile) 2>&5
14420   ac_status=$?
14421   echo "$as_me:14421: \$? = $ac_status" >&5
14422   (exit "$ac_status"); } &&
14423          { ac_try='test -s "conftest.$ac_objext"'
14424   { (eval echo "$as_me:14424: \"$ac_try\"") >&5
14425   (eval $ac_try) 2>&5
14426   ac_status=$?
14427   echo "$as_me:14427: \$? = $ac_status" >&5
14428   (exit "$ac_status"); }; }; then
14429   ac_lo=0 ac_mid=0
14430   while :; do
14431     cat >"conftest.$ac_ext" <<_ACEOF
14432 #line 14432 "configure"
14433 #include "confdefs.h"
14434 $ac_includes_default
14435 int
14436 main (void)
14437 {
14438 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14439   ;
14440   return 0;
14441 }
14442 _ACEOF
14443 rm -f "conftest.$ac_objext"
14444 if { (eval echo "$as_me:14444: \"$ac_compile\"") >&5
14445   (eval $ac_compile) 2>&5
14446   ac_status=$?
14447   echo "$as_me:14447: \$? = $ac_status" >&5
14448   (exit "$ac_status"); } &&
14449          { ac_try='test -s "conftest.$ac_objext"'
14450   { (eval echo "$as_me:14450: \"$ac_try\"") >&5
14451   (eval $ac_try) 2>&5
14452   ac_status=$?
14453   echo "$as_me:14453: \$? = $ac_status" >&5
14454   (exit "$ac_status"); }; }; then
14455   ac_hi=$ac_mid; break
14456 else
14457   echo "$as_me: failed program was:" >&5
14458 cat "conftest.$ac_ext" >&5
14459 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14460 fi
14461 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14462   done
14463 else
14464   echo "$as_me: failed program was:" >&5
14465 cat "conftest.$ac_ext" >&5
14466 ac_hi=-1 ac_mid=-1
14467   while :; do
14468     cat >"conftest.$ac_ext" <<_ACEOF
14469 #line 14469 "configure"
14470 #include "confdefs.h"
14471 $ac_includes_default
14472 int
14473 main (void)
14474 {
14475 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14476   ;
14477   return 0;
14478 }
14479 _ACEOF
14480 rm -f "conftest.$ac_objext"
14481 if { (eval echo "$as_me:14481: \"$ac_compile\"") >&5
14482   (eval $ac_compile) 2>&5
14483   ac_status=$?
14484   echo "$as_me:14484: \$? = $ac_status" >&5
14485   (exit "$ac_status"); } &&
14486          { ac_try='test -s "conftest.$ac_objext"'
14487   { (eval echo "$as_me:14487: \"$ac_try\"") >&5
14488   (eval $ac_try) 2>&5
14489   ac_status=$?
14490   echo "$as_me:14490: \$? = $ac_status" >&5
14491   (exit "$ac_status"); }; }; then
14492   ac_lo=$ac_mid; break
14493 else
14494   echo "$as_me: failed program was:" >&5
14495 cat "conftest.$ac_ext" >&5
14496 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14497 fi
14498 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14499   done
14500 fi
14501 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14502 # Binary search between lo and hi bounds.
14503 while test "x$ac_lo" != "x$ac_hi"; do
14504   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14505   cat >"conftest.$ac_ext" <<_ACEOF
14506 #line 14506 "configure"
14507 #include "confdefs.h"
14508 $ac_includes_default
14509 int
14510 main (void)
14511 {
14512 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14513   ;
14514   return 0;
14515 }
14516 _ACEOF
14517 rm -f "conftest.$ac_objext"
14518 if { (eval echo "$as_me:14518: \"$ac_compile\"") >&5
14519   (eval $ac_compile) 2>&5
14520   ac_status=$?
14521   echo "$as_me:14521: \$? = $ac_status" >&5
14522   (exit "$ac_status"); } &&
14523          { ac_try='test -s "conftest.$ac_objext"'
14524   { (eval echo "$as_me:14524: \"$ac_try\"") >&5
14525   (eval $ac_try) 2>&5
14526   ac_status=$?
14527   echo "$as_me:14527: \$? = $ac_status" >&5
14528   (exit "$ac_status"); }; }; then
14529   ac_hi=$ac_mid
14530 else
14531   echo "$as_me: failed program was:" >&5
14532 cat "conftest.$ac_ext" >&5
14533 ac_lo=`expr "$ac_mid" + 1`
14534 fi
14535 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14536 done
14537 ac_cv_sizeof_signed_char=$ac_lo
14538 else
14539   if test "$cross_compiling" = yes; then
14540   { { echo "$as_me:14540: error: cannot run test program while cross compiling" >&5
14541 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14542    { (exit 1); exit 1; }; }
14543 else
14544   cat >"conftest.$ac_ext" <<_ACEOF
14545 #line 14545 "configure"
14546 #include "confdefs.h"
14547 $ac_includes_default
14548 int
14549 main (void)
14550 {
14551 FILE *f = fopen ("conftest.val", "w");
14552 if (!f)
14553   $ac_main_return (1);
14554 fprintf (f, "%ld", (long)(sizeof (signed char)));
14555 fclose (f);
14556   ;
14557   return 0;
14558 }
14559 _ACEOF
14560 rm -f "conftest$ac_exeext"
14561 if { (eval echo "$as_me:14561: \"$ac_link\"") >&5
14562   (eval $ac_link) 2>&5
14563   ac_status=$?
14564   echo "$as_me:14564: \$? = $ac_status" >&5
14565   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14566   { (eval echo "$as_me:14566: \"$ac_try\"") >&5
14567   (eval $ac_try) 2>&5
14568   ac_status=$?
14569   echo "$as_me:14569: \$? = $ac_status" >&5
14570   (exit "$ac_status"); }; }; then
14571   ac_cv_sizeof_signed_char=`cat conftest.val`
14572 else
14573   echo "$as_me: program exited with status $ac_status" >&5
14574 echo "$as_me: failed program was:" >&5
14575 cat "conftest.$ac_ext" >&5
14576 fi
14577 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14578 fi
14579 fi
14580 rm -f conftest.val
14581 else
14582   ac_cv_sizeof_signed_char=0
14583 fi
14584 fi
14585 echo "$as_me:14585: result: $ac_cv_sizeof_signed_char" >&5
14586 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14587 cat >>confdefs.h <<EOF
14588 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14589 EOF
14590
14591 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14592         NCURSES_SBOOL="signed char"
14593 else
14594         NCURSES_SBOOL="char"
14595 fi
14596 echo "$as_me:14596: checking if you want to use signed Boolean array in term.h" >&5
14597 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14598
14599 # Check whether --enable-signed-char or --disable-signed-char was given.
14600 if test "${enable_signed_char+set}" = set; then
14601   enableval="$enable_signed_char"
14602   with_signed_char=$enableval
14603 else
14604   with_signed_char=$cf_dft_signed_char
14605 fi;
14606 echo "$as_me:14606: result: $with_signed_char" >&5
14607 echo "${ECHO_T}$with_signed_char" >&6
14608 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14609
14610 ###   use option --with-tparm-arg to override tparm's argument type
14611 echo "$as_me:14611: checking for type of tparm args" >&5
14612 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14613
14614 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14615 if test "${with_tparm_arg+set}" = set; then
14616   withval="$with_tparm_arg"
14617   NCURSES_TPARM_ARG="$withval"
14618 else
14619   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14620 fi;
14621 echo "$as_me:14621: result: $NCURSES_TPARM_ARG" >&5
14622 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14623
14624 ### Enable compiling-in rcs id's
14625 echo "$as_me:14625: checking if RCS identifiers should be compiled-in" >&5
14626 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14627
14628 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14629 if test "${with_rcs_ids+set}" = set; then
14630   withval="$with_rcs_ids"
14631   with_rcs_ids=$withval
14632 else
14633   with_rcs_ids=no
14634 fi;
14635 echo "$as_me:14635: result: $with_rcs_ids" >&5
14636 echo "${ECHO_T}$with_rcs_ids" >&6
14637 test "x$with_rcs_ids" = xyes &&
14638 cat >>confdefs.h <<\EOF
14639 #define USE_RCS_IDS 1
14640 EOF
14641
14642 ###############################################################################
14643
14644 echo "$as_me:14644: checking format of man-pages" >&5
14645 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14646
14647 # Check whether --with-manpage-format or --without-manpage-format was given.
14648 if test "${with_manpage_format+set}" = set; then
14649   withval="$with_manpage_format"
14650   MANPAGE_FORMAT=$withval
14651 else
14652   MANPAGE_FORMAT=unknown
14653 fi;
14654
14655 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14656 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14657
14658 cf_unknown=
14659
14660 case "$MANPAGE_FORMAT" in
14661 (unknown)
14662         if test -z "$MANPATH" ; then
14663                 MANPATH="/usr/man:/usr/share/man"
14664         fi
14665
14666         # look for the 'date' man-page (it is most likely to be installed!)
14667         MANPAGE_FORMAT=
14668         cf_preform="no"
14669         cf_catonly="yes"
14670         cf_example="date"
14671
14672         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14673         for cf_dir in $MANPATH; do
14674                 test -z "$cf_dir" && cf_dir=/usr/man
14675                 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
14676                 do
14677                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14678                         if test "x$cf_test" = "x$cf_name" ; then
14679
14680                                 case "$cf_name" in
14681                                 (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
14682                                 (*.xz)  MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
14683                                 (*.gz)  MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14684                                 (*.Z)   MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14685                                 (*.0)   MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14686                                 (*)     MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14687                                 esac
14688
14689                                 case "$cf_name" in
14690                                 ($cf_dir/man*)
14691                                         cf_catonly=no
14692                                         ;;
14693                                 ($cf_dir/cat*)
14694                                         cf_preform=yes
14695                                         ;;
14696                                 esac
14697                                 break
14698                         fi
14699
14700                         # if we found a match in either man* or cat*, stop looking
14701                         if test -n "$MANPAGE_FORMAT" ; then
14702                                 cf_found=no
14703                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14704                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14705                                 case "$cf_name" in
14706                                 ($cf_dir/cat*)
14707                                         cf_found=yes
14708                                         ;;
14709                                 esac
14710                                 test "$cf_found" = yes && break
14711                         fi
14712                 done
14713                 # only check the first directory in $MANPATH where we find manpages
14714                 if test -n "$MANPAGE_FORMAT" ; then
14715                         break
14716                 fi
14717         done
14718         # if we did not find the example, just assume it is normal
14719         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14720         IFS="$ac_save_ifs"
14721         ;;
14722 (*)
14723         for cf_option in $MANPAGE_FORMAT; do
14724         case "$cf_option" in
14725         (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
14726                 ;;
14727         (*)
14728                 cf_unknown="$cf_unknown $cf_option"
14729                 ;;
14730         esac
14731         done
14732         ;;
14733 esac
14734
14735 echo "$as_me:14735: result: $MANPAGE_FORMAT" >&5
14736 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14737 if test -n "$cf_unknown" ; then
14738         { echo "$as_me:14738: WARNING: Unexpected manpage-format $cf_unknown" >&5
14739 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14740 fi
14741
14742 echo "$as_me:14742: checking for manpage renaming" >&5
14743 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14744
14745 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14746 if test "${with_manpage_renames+set}" = set; then
14747   withval="$with_manpage_renames"
14748   MANPAGE_RENAMES=$withval
14749 else
14750   MANPAGE_RENAMES=yes
14751 fi;
14752
14753 case ".$MANPAGE_RENAMES" in
14754 (.no)
14755         ;;
14756 (.|.yes)
14757         # Debian 'man' program?
14758         if test -f /etc/debian_version ; then
14759                 MANPAGE_RENAMES=man/man_db.renames
14760         else
14761                 MANPAGE_RENAMES=no
14762         fi
14763         ;;
14764 esac
14765
14766 if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
14767         MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
14768 elif test "$MANPAGE_RENAMES" = no ; then
14769         :
14770 elif test ! -f "$MANPAGE_RENAMES" ; then
14771         { { echo "$as_me:14771: error: not a filename: $MANPAGE_RENAMES" >&5
14772 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14773    { (exit 1); exit 1; }; }
14774 fi
14775
14776 echo "$as_me:14776: result: $MANPAGE_RENAMES" >&5
14777 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14778
14779 echo "$as_me:14779: checking if manpage aliases will be installed" >&5
14780 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14781
14782 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14783 if test "${with_manpage_aliases+set}" = set; then
14784   withval="$with_manpage_aliases"
14785   MANPAGE_ALIASES=$withval
14786 else
14787   MANPAGE_ALIASES=yes
14788 fi;
14789
14790 echo "$as_me:14790: result: $MANPAGE_ALIASES" >&5
14791 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14792
14793 case "x$LN_S" in
14794 (xln*)
14795         cf_use_symlinks=yes
14796         ;;
14797 (*)
14798         cf_use_symlinks=no
14799         ;;
14800 esac
14801
14802 MANPAGE_SYMLINKS=no
14803 if test "$MANPAGE_ALIASES" = yes ; then
14804 echo "$as_me:14804: checking if manpage symlinks should be used" >&5
14805 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14806
14807 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14808 if test "${with_manpage_symlinks+set}" = set; then
14809   withval="$with_manpage_symlinks"
14810   MANPAGE_SYMLINKS=$withval
14811 else
14812   MANPAGE_SYMLINKS=$cf_use_symlinks
14813 fi;
14814
14815 if test "$$cf_use_symlinks" = no; then
14816 if test "$MANPAGE_SYMLINKS" = yes ; then
14817         { echo "$as_me:14817: WARNING: cannot make symlinks" >&5
14818 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14819         MANPAGE_SYMLINKS=no
14820 fi
14821 fi
14822
14823 echo "$as_me:14823: result: $MANPAGE_SYMLINKS" >&5
14824 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14825 fi
14826
14827 echo "$as_me:14827: checking for manpage tbl" >&5
14828 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14829
14830 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14831 if test "${with_manpage_tbl+set}" = set; then
14832   withval="$with_manpage_tbl"
14833   MANPAGE_TBL=$withval
14834 else
14835   MANPAGE_TBL=no
14836 fi;
14837
14838 echo "$as_me:14838: result: $MANPAGE_TBL" >&5
14839 echo "${ECHO_T}$MANPAGE_TBL" >&6
14840
14841 if test "$prefix" = "NONE" ; then
14842         cf_prefix="$ac_default_prefix"
14843 else
14844         cf_prefix="$prefix"
14845 fi
14846
14847 case "$MANPAGE_FORMAT" in
14848 (*catonly*)
14849         cf_format=yes
14850         cf_inboth=no
14851         ;;
14852 (*formatted*)
14853         cf_format=yes
14854         cf_inboth=yes
14855         ;;
14856 (*)
14857         cf_format=no
14858         cf_inboth=no
14859         ;;
14860 esac
14861
14862 test ! -d man && mkdir man
14863
14864 cf_so_strip=
14865 cf_compress=
14866 for cf_manpage_format in $MANPAGE_FORMAT
14867 do
14868 case "$cf_manpage_format" in
14869 (compress)
14870         cf_so_strip="Z"
14871         cf_compress=compress
14872         ;;
14873 (gzip)
14874         cf_so_strip="gz"
14875         cf_compress=gzip
14876         ;;
14877 (bzip2)
14878         cf_so_strip="bz2"
14879         cf_compress=bzip2
14880         ;;
14881 (xz)
14882         cf_so_strip="xz"
14883         cf_compress=xz
14884         ;;
14885 esac
14886 done
14887
14888 cf_edit_man=./edit_man.sh
14889 cf_man_alias=`pwd`/man_alias.sed
14890
14891 cat >$cf_edit_man <<CF_EOF
14892 #! $SHELL
14893 # this script is generated by the configure-script CF_MAN_PAGES macro.
14894
14895 prefix="$cf_prefix"
14896 datarootdir="$datarootdir"
14897 datadir="$datadir"
14898
14899 NCURSES_MAJOR="$NCURSES_MAJOR"
14900 NCURSES_MINOR="$NCURSES_MINOR"
14901 NCURSES_PATCH="$NCURSES_PATCH"
14902
14903 NCURSES_OSPEED="$NCURSES_OSPEED"
14904 TERMINFO="$TERMINFO"
14905
14906 INSTALL="$INSTALL"
14907 INSTALL_DATA="$INSTALL_DATA"
14908
14909 transform="$program_transform_name"
14910
14911 TMP=\${TMPDIR:=/tmp}/man\$\$
14912 trap "rm -f \$TMP; exit 1" 1 2 3 15
14913 trap "rm -f \$TMP" 0
14914
14915 form=\$1
14916 shift || exit 1
14917
14918 verb=\$1
14919 shift || exit 1
14920
14921 mandir=\$1
14922 shift || exit 1
14923
14924 srcdir=\$1
14925 top_srcdir=\$srcdir/..
14926 shift || exit 1
14927
14928 if test "\$form" = normal ; then
14929         if test "$cf_format" = yes ; then
14930         if test "$cf_inboth" = no ; then
14931                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14932                 exit $?
14933         fi
14934         fi
14935         cf_subdir=\$mandir/man
14936         cf_tables=$MANPAGE_TBL
14937 else
14938         cf_subdir=\$mandir/cat
14939         cf_tables=yes
14940 fi
14941
14942 # process the list of source-files
14943 for i in "\$@" ; do
14944 case \$i in
14945 (*.orig|*.rej) ;;
14946 (*.[0-9]*)
14947         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14948         if test "\$verb" = installing ; then
14949         if test ! -d "\$cf_subdir\${section}" ; then
14950                 mkdir -p "\$cf_subdir\$section"
14951         fi
14952         fi
14953
14954         # replace variables in man page
14955         if test ! -f "$cf_man_alias" ; then
14956 cat >>$cf_man_alias <<-CF_EOF2
14957                 s,@DATADIR@,\$datadir,g
14958                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14959                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14960                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14961                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14962                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14963                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14964 CF_EOF
14965
14966         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14967         do
14968                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14969                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14970 cat >>$cf_edit_man <<-CF_EOF
14971                 s,@$cf_NAME@,$cf_name,g
14972 CF_EOF
14973         done
14974
14975 cat >>$cf_edit_man <<CF_EOF
14976 CF_EOF2
14977                 echo "...made $cf_man_alias"
14978         fi
14979
14980         aliases=
14981         cf_source=\`basename "\$i"\`
14982         inalias=\$cf_source
14983         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14984         if test ! -f "\$inalias" ; then
14985                 echo ".. skipped \$cf_source"
14986                 continue
14987         fi
14988 CF_EOF
14989
14990 if test "$MANPAGE_ALIASES" != no ; then
14991 cat >>$cf_edit_man <<CF_EOF
14992         nCurses=ignore.3x
14993         test "$with_curses_h" = yes && nCurses=ncurses.3x
14994         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14995 CF_EOF
14996 fi
14997
14998 if test "$MANPAGE_RENAMES" = no ; then
14999 cat >>$cf_edit_man <<CF_EOF
15000         # perform program transformations for section 1 man pages
15001         if test \$section = 1 ; then
15002                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
15003         else
15004                 cf_target=\$cf_subdir\${section}/\$cf_source
15005         fi
15006 CF_EOF
15007 else
15008 cat >>$cf_edit_man <<CF_EOF
15009         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
15010         if test -z "\$cf_target" ; then
15011                 echo "? missing rename for \$cf_source"
15012                 cf_target="\$cf_source"
15013         fi
15014         cf_target="\$cf_subdir\${section}/\${cf_target}"
15015
15016 CF_EOF
15017 fi
15018
15019 cat >>$cf_edit_man <<CF_EOF
15020         sed     -f "$cf_man_alias" \\
15021 CF_EOF
15022
15023 if test "$MANPAGE_RENAMES" != no ; then
15024 cat >>$cf_edit_man <<CF_EOF
15025                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
15026 CF_EOF
15027 else
15028 cat >>$cf_edit_man <<CF_EOF
15029                 < "\$i" >\$TMP
15030 CF_EOF
15031 fi
15032
15033 cat >>$cf_edit_man <<CF_EOF
15034 if test \$cf_tables = yes ; then
15035         tbl \$TMP >\$TMP.out
15036         mv \$TMP.out \$TMP
15037 fi
15038 CF_EOF
15039
15040 if test "$with_overwrite" != yes ; then
15041 cat >>$cf_edit_man <<CF_EOF
15042         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
15043         mv \$TMP.out \$TMP
15044 CF_EOF
15045 fi
15046
15047 if test "$with_curses_h" != yes ; then
15048 cat >>$cf_edit_man <<CF_EOF
15049         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
15050         mv \$TMP.out \$TMP
15051 CF_EOF
15052 fi
15053
15054 cat >>$cf_edit_man <<CF_EOF
15055         if test "\$form" = format ; then
15056                 nroff -man \$TMP >\$TMP.out
15057                 mv \$TMP.out \$TMP
15058         fi
15059 CF_EOF
15060
15061 if test -n "$cf_compress" ; then
15062 cat >>$cf_edit_man <<CF_EOF
15063         if test "\$verb" = installing ; then
15064         if ( "$cf_compress" -f \$TMP )
15065         then
15066                 mv \$TMP.$cf_so_strip \$TMP
15067         fi
15068         fi
15069         cf_target="\$cf_target.$cf_so_strip"
15070 CF_EOF
15071 fi
15072
15073 case "$MANPAGE_FORMAT" in
15074 (*BSDI*)
15075 cat >>$cf_edit_man <<CF_EOF
15076         if test "\$form" = format ; then
15077                 # BSDI installs only .0 suffixes in the cat directories
15078                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15079         fi
15080 CF_EOF
15081   ;;
15082 esac
15083
15084 cat >>$cf_edit_man <<CF_EOF
15085         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15086         if test "\$verb" = installing ; then
15087                 echo "\$verb \$cf_target"
15088                 \$INSTALL_DATA \$TMP "\$cf_target"
15089                 test -d "\$cf_subdir\${section}" &&
15090                 test -n "\$aliases" && (
15091                         cd "\$cf_subdir\${section}" && (
15092                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15093                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
15094                                 cf_target=\`basename "\$cf_target"\`
15095                                 for cf_alias in \$aliases
15096                                 do
15097                                         if test "\$section" = 1 ; then
15098                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15099                                         fi
15100
15101                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15102                                                 if test -f "\$cf_alias\${suffix}" ; then
15103                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15104                                                         then
15105                                                                 continue
15106                                                         fi
15107                                                 fi
15108                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15109 CF_EOF
15110 case "x$LN_S" in
15111 (*-f)
15112 cat >>$cf_edit_man <<CF_EOF
15113                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15114 CF_EOF
15115         ;;
15116 (*)
15117 cat >>$cf_edit_man <<CF_EOF
15118                                                 rm -f "\$cf_alias\${suffix}"
15119                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15120 CF_EOF
15121         ;;
15122 esac
15123 cat >>$cf_edit_man <<CF_EOF
15124                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15125                                                 echo ".so \$cf_source" >\$TMP
15126 CF_EOF
15127 if test -n "$cf_compress" ; then
15128 cat >>$cf_edit_man <<CF_EOF
15129                                                 if test -n "$cf_so_strip" ; then
15130                                                         "$cf_compress" -f \$TMP
15131                                                         mv \$TMP.$cf_so_strip \$TMP
15132                                                 fi
15133 CF_EOF
15134 fi
15135 cat >>$cf_edit_man <<CF_EOF
15136                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15137                                                 rm -f "\$cf_alias\${suffix}"
15138                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15139                                         fi
15140                                 done
15141                         )
15142                 )
15143         elif test "\$verb" = removing ; then
15144                 test -f "\$cf_target" && (
15145                         echo "\$verb \$cf_target"
15146                         rm -f "\$cf_target"
15147                 )
15148                 test -d "\$cf_subdir\${section}" &&
15149                 test -n "\$aliases" && (
15150                         cd "\$cf_subdir\${section}" && (
15151                                 for cf_alias in \$aliases
15152                                 do
15153                                         if test "\$section" = 1 ; then
15154                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15155                                         fi
15156
15157                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15158                                         rm -f "\$cf_alias\${suffix}"
15159                                 done
15160                         )
15161                 )
15162         else
15163 #               echo ".hy 0"
15164                 cat \$TMP
15165         fi
15166         ;;
15167 esac
15168 done
15169
15170 if test "$cf_inboth" = yes ; then
15171 if test "\$form" != format ; then
15172         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15173 fi
15174 fi
15175
15176 exit 0
15177 CF_EOF
15178 chmod 755 "$cf_edit_man"
15179
15180 ###############################################################################
15181
15182 ### Note that some functions (such as const) are normally disabled anyway.
15183 echo "$as_me:15183: checking if you want to build with function extensions" >&5
15184 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15185
15186 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15187 if test "${enable_ext_funcs+set}" = set; then
15188   enableval="$enable_ext_funcs"
15189   with_ext_funcs=$enableval
15190 else
15191   with_ext_funcs=yes
15192 fi;
15193 echo "$as_me:15193: result: $with_ext_funcs" >&5
15194 echo "${ECHO_T}$with_ext_funcs" >&6
15195 if test "x$with_ext_funcs" = xyes ; then
15196         NCURSES_EXT_FUNCS=1
15197
15198 cat >>confdefs.h <<\EOF
15199 #define NCURSES_EXT_FUNCS 1
15200 EOF
15201
15202 cat >>confdefs.h <<\EOF
15203 #define HAVE_ASSUME_DEFAULT_COLORS 1
15204 EOF
15205
15206 cat >>confdefs.h <<\EOF
15207 #define HAVE_CURSES_VERSION 1
15208 EOF
15209
15210 cat >>confdefs.h <<\EOF
15211 #define HAVE_HAS_KEY 1
15212 EOF
15213
15214 cat >>confdefs.h <<\EOF
15215 #define HAVE_RESIZETERM 1
15216 EOF
15217
15218 cat >>confdefs.h <<\EOF
15219 #define HAVE_RESIZE_TERM 1
15220 EOF
15221
15222 cat >>confdefs.h <<\EOF
15223 #define HAVE_TERM_ENTRY_H 1
15224 EOF
15225
15226 cat >>confdefs.h <<\EOF
15227 #define HAVE_USE_DEFAULT_COLORS 1
15228 EOF
15229
15230 cat >>confdefs.h <<\EOF
15231 #define HAVE_USE_EXTENDED_NAMES 1
15232 EOF
15233
15234 cat >>confdefs.h <<\EOF
15235 #define HAVE_USE_SCREEN 1
15236 EOF
15237
15238 cat >>confdefs.h <<\EOF
15239 #define HAVE_USE_WINDOW 1
15240 EOF
15241
15242 cat >>confdefs.h <<\EOF
15243 #define HAVE_WRESIZE 1
15244 EOF
15245
15246         GENERATED_EXT_FUNCS=generated
15247         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15248 else
15249         NCURSES_EXT_FUNCS=0
15250         GENERATED_EXT_FUNCS=
15251 fi
15252
15253 echo "$as_me:15253: checking if you want to build with SCREEN extensions" >&5
15254 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15255
15256 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15257 if test "${enable_sp_funcs+set}" = set; then
15258   enableval="$enable_sp_funcs"
15259   with_sp_funcs=$enableval
15260 else
15261   with_sp_funcs=$cf_dft_ext_spfuncs
15262 fi;
15263 echo "$as_me:15263: result: $with_sp_funcs" >&5
15264 echo "${ECHO_T}$with_sp_funcs" >&6
15265 if test "x$with_sp_funcs" = xyes ; then
15266         NCURSES_SP_FUNCS=1
15267
15268 cat >>confdefs.h <<\EOF
15269 #define NCURSES_SP_FUNCS 1
15270 EOF
15271
15272 cat >>confdefs.h <<\EOF
15273 #define HAVE_TPUTS_SP 1
15274 EOF
15275
15276         GENERATED_SP_FUNCS=generated
15277 else
15278         NCURSES_SP_FUNCS=0
15279         GENERATED_SP_FUNCS=
15280 fi
15281
15282 echo "$as_me:15282: checking if you want to build with terminal-driver" >&5
15283 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15284
15285 # Check whether --enable-term-driver or --disable-term-driver was given.
15286 if test "${enable_term_driver+set}" = set; then
15287   enableval="$enable_term_driver"
15288   with_term_driver=$enableval
15289 else
15290   with_term_driver=no
15291 fi;
15292 echo "$as_me:15292: result: $with_term_driver" >&5
15293 echo "${ECHO_T}$with_term_driver" >&6
15294 if test "x$with_term_driver" = xyes ; then
15295
15296 cat >>confdefs.h <<\EOF
15297 #define USE_TERM_DRIVER 1
15298 EOF
15299
15300         if test "x$with_termlib" != xno ; then
15301                 { { echo "$as_me:15301: error: The term-driver option conflicts with the termlib option" >&5
15302 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15303    { (exit 1); exit 1; }; }
15304         fi
15305         if test "x$with_sp_funcs" != xyes ; then
15306                 { { echo "$as_me:15306: error: The term-driver option relies upon sp-funcs" >&5
15307 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15308    { (exit 1); exit 1; }; }
15309         fi
15310 fi
15311
15312 ###   use option --enable-const to turn on use of const beyond that in XSI.
15313 echo "$as_me:15313: checking for extended use of const keyword" >&5
15314 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15315
15316 # Check whether --enable-const or --disable-const was given.
15317 if test "${enable_const+set}" = set; then
15318   enableval="$enable_const"
15319   with_ext_const=$enableval
15320 else
15321   with_ext_const=$cf_dft_ext_const
15322 fi;
15323 echo "$as_me:15323: result: $with_ext_const" >&5
15324 echo "${ECHO_T}$with_ext_const" >&6
15325 NCURSES_CONST='/*nothing*/'
15326 if test "x$with_ext_const" = xyes ; then
15327         NCURSES_CONST=const
15328 fi
15329
15330 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15331 echo "$as_me:15331: checking if you want to use extended colors" >&5
15332 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15333
15334 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15335 if test "${enable_ext_colors+set}" = set; then
15336   enableval="$enable_ext_colors"
15337   with_ext_colors=$enableval
15338 else
15339   with_ext_colors=$cf_dft_ext_colors
15340 fi;
15341 echo "$as_me:15341: result: $with_ext_colors" >&5
15342 echo "${ECHO_T}$with_ext_colors" >&6
15343 NCURSES_EXT_COLORS=0
15344 if test "x$with_ext_colors" = xyes ; then
15345         if test "x$with_widec" != xyes ; then
15346                 { echo "$as_me:15346: WARNING: This option applies only to wide-character library" >&5
15347 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15348         else
15349                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15350
15351 if test "${with_abi_version+set}" != set; then
15352         case "$cf_cv_rel_version" in
15353         (5.*)
15354                 cf_cv_rel_version=6.0
15355                 cf_cv_abi_version=6
15356                 { echo "$as_me:15356: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15357 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15358                 ;;
15359         esac
15360 fi
15361
15362                 NCURSES_EXT_COLORS=1
15363
15364 cat >>confdefs.h <<\EOF
15365 #define NCURSES_EXT_COLORS 1
15366 EOF
15367
15368 cat >>confdefs.h <<\EOF
15369 #define HAVE_ALLOC_PAIR 1
15370 EOF
15371
15372 cat >>confdefs.h <<\EOF
15373 #define HAVE_INIT_EXTENDED_COLOR 1
15374 EOF
15375
15376 cat >>confdefs.h <<\EOF
15377 #define HAVE_RESET_COLOR_PAIRS 1
15378 EOF
15379
15380         fi
15381 fi
15382
15383 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15384 echo "$as_me:15384: checking if you want to use extended mouse encoding" >&5
15385 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15386
15387 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15388 if test "${enable_ext_mouse+set}" = set; then
15389   enableval="$enable_ext_mouse"
15390   with_ext_mouse=$enableval
15391 else
15392   with_ext_mouse=$cf_dft_ext_mouse
15393 fi;
15394 echo "$as_me:15394: result: $with_ext_mouse" >&5
15395 echo "${ECHO_T}$with_ext_mouse" >&6
15396 if test "x$with_ext_mouse" = xyes ; then
15397
15398 if test "${with_abi_version+set}" != set; then
15399         case "$cf_cv_rel_version" in
15400         (5.*)
15401                 cf_cv_rel_version=6.0
15402                 cf_cv_abi_version=6
15403                 { echo "$as_me:15403: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15404 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15405                 ;;
15406         esac
15407 fi
15408
15409 fi
15410
15411 case $cf_cv_abi_version in
15412 (5)
15413         NCURSES_MOUSE_VERSION=1
15414         ;;
15415 (6)
15416         NCURSES_MOUSE_VERSION=2
15417         ;;
15418 ([789])
15419         NCURSES_MOUSE_VERSION=3
15420         ;;
15421 esac
15422
15423 ###   use option --enable-ext-putwin to turn on extended screendumps
15424 echo "$as_me:15424: checking if you want to use extended putwin/screendump" >&5
15425 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15426
15427 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15428 if test "${enable_ext_putwin+set}" = set; then
15429   enableval="$enable_ext_putwin"
15430   with_ext_putwin=$enableval
15431 else
15432   with_ext_putwin=$cf_dft_ext_putwin
15433 fi;
15434 echo "$as_me:15434: result: $with_ext_putwin" >&5
15435 echo "${ECHO_T}$with_ext_putwin" >&6
15436 if test "x$with_ext_putwin" = xyes ; then
15437
15438 cat >>confdefs.h <<\EOF
15439 #define NCURSES_EXT_PUTWIN 1
15440 EOF
15441
15442 fi
15443
15444 echo "$as_me:15444: checking if you want \$NCURSES_NO_PADDING code" >&5
15445 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15446
15447 # Check whether --enable-no-padding or --disable-no-padding was given.
15448 if test "${enable_no_padding+set}" = set; then
15449   enableval="$enable_no_padding"
15450   with_no_padding=$enableval
15451 else
15452   with_no_padding=$with_ext_funcs
15453 fi;
15454 echo "$as_me:15454: result: $with_no_padding" >&5
15455 echo "${ECHO_T}$with_no_padding" >&6
15456 test "x$with_no_padding" = xyes &&
15457 cat >>confdefs.h <<\EOF
15458 #define NCURSES_NO_PADDING 1
15459 EOF
15460
15461 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15462 echo "$as_me:15462: checking if you want SIGWINCH handler" >&5
15463 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15464
15465 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15466 if test "${enable_sigwinch+set}" = set; then
15467   enableval="$enable_sigwinch"
15468   with_sigwinch=$enableval
15469 else
15470   with_sigwinch=$with_ext_funcs
15471 fi;
15472 echo "$as_me:15472: result: $with_sigwinch" >&5
15473 echo "${ECHO_T}$with_sigwinch" >&6
15474 test "x$with_sigwinch" = xyes &&
15475 cat >>confdefs.h <<\EOF
15476 #define USE_SIGWINCH 1
15477 EOF
15478
15479 ###   use option --enable-tcap-names to allow user to define new capabilities
15480 echo "$as_me:15480: checking if you want user-definable terminal capabilities like termcap" >&5
15481 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15482
15483 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15484 if test "${enable_tcap_names+set}" = set; then
15485   enableval="$enable_tcap_names"
15486   with_tcap_names=$enableval
15487 else
15488   with_tcap_names=$with_ext_funcs
15489 fi;
15490 echo "$as_me:15490: result: $with_tcap_names" >&5
15491 echo "${ECHO_T}$with_tcap_names" >&6
15492 NCURSES_XNAMES=0
15493 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15494
15495 ##############################################################################
15496
15497 echo "$as_me:15497: checking if you want to link with the pthread library" >&5
15498 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15499
15500 # Check whether --with-pthread or --without-pthread was given.
15501 if test "${with_pthread+set}" = set; then
15502   withval="$with_pthread"
15503   with_pthread=$withval
15504 else
15505   with_pthread=no
15506 fi;
15507 echo "$as_me:15507: result: $with_pthread" >&5
15508 echo "${ECHO_T}$with_pthread" >&6
15509
15510 if test "$with_pthread" != no ; then
15511         echo "$as_me:15511: checking for pthread.h" >&5
15512 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15513 if test "${ac_cv_header_pthread_h+set}" = set; then
15514   echo $ECHO_N "(cached) $ECHO_C" >&6
15515 else
15516   cat >"conftest.$ac_ext" <<_ACEOF
15517 #line 15517 "configure"
15518 #include "confdefs.h"
15519 #include <pthread.h>
15520 _ACEOF
15521 if { (eval echo "$as_me:15521: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15522   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15523   ac_status=$?
15524   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15525   rm -f conftest.er1
15526   cat conftest.err >&5
15527   echo "$as_me:15527: \$? = $ac_status" >&5
15528   (exit "$ac_status"); } >/dev/null; then
15529   if test -s conftest.err; then
15530     ac_cpp_err=$ac_c_preproc_warn_flag
15531   else
15532     ac_cpp_err=
15533   fi
15534 else
15535   ac_cpp_err=yes
15536 fi
15537 if test -z "$ac_cpp_err"; then
15538   ac_cv_header_pthread_h=yes
15539 else
15540   echo "$as_me: failed program was:" >&5
15541   cat "conftest.$ac_ext" >&5
15542   ac_cv_header_pthread_h=no
15543 fi
15544 rm -f conftest.err "conftest.$ac_ext"
15545 fi
15546 echo "$as_me:15546: result: $ac_cv_header_pthread_h" >&5
15547 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15548 if test "$ac_cv_header_pthread_h" = yes; then
15549
15550 cat >>confdefs.h <<\EOF
15551 #define HAVE_PTHREADS_H 1
15552 EOF
15553
15554         for cf_lib_pthread in pthread c_r
15555         do
15556             echo "$as_me:15556: checking if we can link with the $cf_lib_pthread library" >&5
15557 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15558             cf_save_LIBS="$LIBS"
15559
15560 cf_add_libs="$LIBS"
15561 # reverse order
15562 cf_add_0lib=
15563 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15564 # filter duplicates
15565 for cf_add_1lib in $cf_add_0lib; do
15566         for cf_add_2lib in $cf_add_libs; do
15567                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15568                         cf_add_1lib=
15569                         break
15570                 fi
15571         done
15572         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15573 done
15574 LIBS="$cf_add_libs"
15575
15576             cat >"conftest.$ac_ext" <<_ACEOF
15577 #line 15577 "configure"
15578 #include "confdefs.h"
15579
15580 #include <pthread.h>
15581
15582 int
15583 main (void)
15584 {
15585
15586                 int rc = pthread_create(0,0,0,0);
15587                 int r2 = pthread_mutexattr_settype(0, 0);
15588
15589   ;
15590   return 0;
15591 }
15592 _ACEOF
15593 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15594 if { (eval echo "$as_me:15594: \"$ac_link\"") >&5
15595   (eval $ac_link) 2>&5
15596   ac_status=$?
15597   echo "$as_me:15597: \$? = $ac_status" >&5
15598   (exit "$ac_status"); } &&
15599          { ac_try='test -s "conftest$ac_exeext"'
15600   { (eval echo "$as_me:15600: \"$ac_try\"") >&5
15601   (eval $ac_try) 2>&5
15602   ac_status=$?
15603   echo "$as_me:15603: \$? = $ac_status" >&5
15604   (exit "$ac_status"); }; }; then
15605   with_pthread=yes
15606 else
15607   echo "$as_me: failed program was:" >&5
15608 cat "conftest.$ac_ext" >&5
15609 with_pthread=no
15610 fi
15611 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15612             LIBS="$cf_save_LIBS"
15613             echo "$as_me:15613: result: $with_pthread" >&5
15614 echo "${ECHO_T}$with_pthread" >&6
15615             test "$with_pthread" = yes && break
15616         done
15617
15618         if test "$with_pthread" = yes ; then
15619
15620 cf_add_libs="$LIBS"
15621 # reverse order
15622 cf_add_0lib=
15623 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15624 # filter duplicates
15625 for cf_add_1lib in $cf_add_0lib; do
15626         for cf_add_2lib in $cf_add_libs; do
15627                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15628                         cf_add_1lib=
15629                         break
15630                 fi
15631         done
15632         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15633 done
15634 LIBS="$cf_add_libs"
15635
15636 cat >>confdefs.h <<\EOF
15637 #define HAVE_LIBPTHREADS 1
15638 EOF
15639
15640         else
15641             { { echo "$as_me:15641: error: Cannot link with pthread library" >&5
15642 echo "$as_me: error: Cannot link with pthread library" >&2;}
15643    { (exit 1); exit 1; }; }
15644         fi
15645
15646 fi
15647
15648 fi
15649
15650 if test "x$with_pthread" != xno; then
15651         echo "$as_me:15651: checking for pthread_kill" >&5
15652 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15653 if test "${ac_cv_func_pthread_kill+set}" = set; then
15654   echo $ECHO_N "(cached) $ECHO_C" >&6
15655 else
15656   cat >"conftest.$ac_ext" <<_ACEOF
15657 #line 15657 "configure"
15658 #include "confdefs.h"
15659 #define pthread_kill autoconf_temporary
15660 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15661 #undef pthread_kill
15662
15663 #ifdef __cplusplus
15664 extern "C"
15665 #endif
15666
15667 /* We use char because int might match the return type of a gcc2
15668    builtin and then its argument prototype would still apply.  */
15669 char pthread_kill (void);
15670
15671 int
15672 main (void)
15673 {
15674
15675 /* The GNU C library defines stubs for functions which it implements
15676     to always fail with ENOSYS.  Some functions are actually named
15677     something starting with __ and the normal name is an alias.  */
15678 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15679 #error found stub for pthread_kill
15680 #endif
15681
15682         return pthread_kill ();
15683   ;
15684   return 0;
15685 }
15686 _ACEOF
15687 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15688 if { (eval echo "$as_me:15688: \"$ac_link\"") >&5
15689   (eval $ac_link) 2>&5
15690   ac_status=$?
15691   echo "$as_me:15691: \$? = $ac_status" >&5
15692   (exit "$ac_status"); } &&
15693          { ac_try='test -s "conftest$ac_exeext"'
15694   { (eval echo "$as_me:15694: \"$ac_try\"") >&5
15695   (eval $ac_try) 2>&5
15696   ac_status=$?
15697   echo "$as_me:15697: \$? = $ac_status" >&5
15698   (exit "$ac_status"); }; }; then
15699   ac_cv_func_pthread_kill=yes
15700 else
15701   echo "$as_me: failed program was:" >&5
15702 cat "conftest.$ac_ext" >&5
15703 ac_cv_func_pthread_kill=no
15704 fi
15705 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15706 fi
15707 echo "$as_me:15707: result: $ac_cv_func_pthread_kill" >&5
15708 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15709 if test "$ac_cv_func_pthread_kill" = yes; then
15710
15711                 echo "$as_me:15711: checking if you want to allow EINTR in wgetch with pthreads" >&5
15712 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15713
15714 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15715 if test "${enable_pthreads_eintr+set}" = set; then
15716   enableval="$enable_pthreads_eintr"
15717   use_pthreads_eintr=$enableval
15718 else
15719   use_pthreads_eintr=no
15720 fi;
15721                 echo "$as_me:15721: result: $use_pthreads_eintr" >&5
15722 echo "${ECHO_T}$use_pthreads_eintr" >&6
15723                 if test "x$use_pthreads_eintr" = xyes ; then
15724
15725 cat >>confdefs.h <<\EOF
15726 #define USE_PTHREADS_EINTR 1
15727 EOF
15728
15729                 fi
15730 fi
15731
15732         echo "$as_me:15732: checking if you want to use weak-symbols for pthreads" >&5
15733 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15734
15735 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15736 if test "${enable_weak_symbols+set}" = set; then
15737   enableval="$enable_weak_symbols"
15738   use_weak_symbols=$enableval
15739 else
15740   use_weak_symbols=no
15741 fi;
15742         echo "$as_me:15742: result: $use_weak_symbols" >&5
15743 echo "${ECHO_T}$use_weak_symbols" >&6
15744         if test "x$use_weak_symbols" = xyes ; then
15745
15746 echo "$as_me:15746: checking if $CC supports weak symbols" >&5
15747 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15748 if test "${cf_cv_weak_symbols+set}" = set; then
15749   echo $ECHO_N "(cached) $ECHO_C" >&6
15750 else
15751
15752 cat >"conftest.$ac_ext" <<_ACEOF
15753 #line 15753 "configure"
15754 #include "confdefs.h"
15755
15756 #include <stdio.h>
15757 int
15758 main (void)
15759 {
15760
15761 #if defined(__GNUC__)
15762 #  if defined __USE_ISOC99
15763 #    define _cat_pragma(exp)    _Pragma(#exp)
15764 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15765 #  else
15766 #    define _weak_pragma(exp)
15767 #  endif
15768 #  define _declare(name)        __extension__ extern __typeof__(name) name
15769 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15770 #endif
15771
15772 weak_symbol(fopen);
15773
15774   ;
15775   return 0;
15776 }
15777 _ACEOF
15778 rm -f "conftest.$ac_objext"
15779 if { (eval echo "$as_me:15779: \"$ac_compile\"") >&5
15780   (eval $ac_compile) 2>&5
15781   ac_status=$?
15782   echo "$as_me:15782: \$? = $ac_status" >&5
15783   (exit "$ac_status"); } &&
15784          { ac_try='test -s "conftest.$ac_objext"'
15785   { (eval echo "$as_me:15785: \"$ac_try\"") >&5
15786   (eval $ac_try) 2>&5
15787   ac_status=$?
15788   echo "$as_me:15788: \$? = $ac_status" >&5
15789   (exit "$ac_status"); }; }; then
15790   cf_cv_weak_symbols=yes
15791 else
15792   echo "$as_me: failed program was:" >&5
15793 cat "conftest.$ac_ext" >&5
15794 cf_cv_weak_symbols=no
15795 fi
15796 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15797
15798 fi
15799 echo "$as_me:15799: result: $cf_cv_weak_symbols" >&5
15800 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15801
15802         else
15803                 cf_cv_weak_symbols=no
15804         fi
15805
15806         if test "x$cf_cv_weak_symbols" = xyes ; then
15807
15808 cat >>confdefs.h <<\EOF
15809 #define USE_WEAK_SYMBOLS 1
15810 EOF
15811
15812         fi
15813 fi
15814
15815 PTHREAD=
15816 if test "x$with_pthread" = "xyes" ; then
15817
15818 cat >>confdefs.h <<\EOF
15819 #define USE_PTHREADS 1
15820 EOF
15821
15822         enable_reentrant=yes
15823         if test "x$cf_cv_weak_symbols" = xyes ; then
15824                 PTHREAD=-lpthread
15825
15826 cf_add_libs="$PRIVATE_LIBS"
15827 # reverse order
15828 cf_add_0lib=
15829 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15830 # filter duplicates
15831 for cf_add_1lib in $cf_add_0lib; do
15832         for cf_add_2lib in $cf_add_libs; do
15833                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15834                         cf_add_1lib=
15835                         break
15836                 fi
15837         done
15838         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15839 done
15840 PRIVATE_LIBS="$cf_add_libs"
15841
15842         fi
15843 fi
15844
15845 # Reentrant code has to be opaque; there's little advantage to making ncurses
15846 # opaque outside of that, so there is no --enable-opaque option.  We can use
15847 # this option without --with-pthreads, but this will be always set for
15848 # pthreads.
15849 echo "$as_me:15849: checking if you want reentrant code" >&5
15850 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15851
15852 # Check whether --enable-reentrant or --disable-reentrant was given.
15853 if test "${enable_reentrant+set}" = set; then
15854   enableval="$enable_reentrant"
15855   with_reentrant=$enableval
15856 else
15857   with_reentrant=no
15858 fi;
15859 echo "$as_me:15859: result: $with_reentrant" >&5
15860 echo "${ECHO_T}$with_reentrant" >&6
15861 if test "x$with_reentrant" = xyes ; then
15862         cf_cv_enable_reentrant=1
15863         cf_cv_enable_opaque="NCURSES_INTERNALS"
15864         NCURSES_SIZE_T=int
15865         if test "x$cf_cv_weak_symbols" = xyes ; then
15866
15867 # remove pthread library from $LIBS
15868 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15869
15870 cf_add_libs="$TEST_LIBS"
15871 # reverse order
15872 cf_add_0lib=
15873 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15874 # filter duplicates
15875 for cf_add_1lib in $cf_add_0lib; do
15876         for cf_add_2lib in $cf_add_libs; do
15877                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15878                         cf_add_1lib=
15879                         break
15880                 fi
15881         done
15882         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15883 done
15884 TEST_LIBS="$cf_add_libs"
15885
15886 cf_add_libs="$TEST_LIBS2"
15887 # reverse order
15888 cf_add_0lib=
15889 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15890 # filter duplicates
15891 for cf_add_1lib in $cf_add_0lib; do
15892         for cf_add_2lib in $cf_add_libs; do
15893                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15894                         cf_add_1lib=
15895                         break
15896                 fi
15897         done
15898         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15899 done
15900 TEST_LIBS2="$cf_add_libs"
15901
15902 cf_add_libs="$PRIVATE_LIBS"
15903 # reverse order
15904 cf_add_0lib=
15905 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15906 # filter duplicates
15907 for cf_add_1lib in $cf_add_0lib; do
15908         for cf_add_2lib in $cf_add_libs; do
15909                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15910                         cf_add_1lib=
15911                         break
15912                 fi
15913         done
15914         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15915 done
15916 PRIVATE_LIBS="$cf_add_libs"
15917
15918         else
15919                 # when not using weak symbols but with_reentrant,
15920                 # add 't' to the library suffix on all platforms
15921                 # except cygwin, where we only do that if ALSO
15922                 # compiling with full thread support.
15923                 case "$host" in
15924                 (*cygwin* | *msys*)
15925                         if test "$with_pthread" = "yes" ; then
15926                                 if test "x$disable_lib_suffixes" = "xno" ; then
15927                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15928                                 fi
15929                         fi ;;
15930                 (*)
15931                         if test "x$disable_lib_suffixes" = "xno" ; then
15932                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15933                         fi
15934                         ;;
15935                 esac
15936         fi
15937
15938 cat >>confdefs.h <<\EOF
15939 #define USE_REENTRANT 1
15940 EOF
15941
15942 if test "${with_abi_version+set}" != set; then
15943         case "$cf_cv_rel_version" in
15944         (5.*)
15945                 cf_cv_rel_version=6.0
15946                 cf_cv_abi_version=6
15947                 { echo "$as_me:15947: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15948 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15949                 ;;
15950         esac
15951 fi
15952
15953 else
15954         cf_cv_enable_reentrant=0
15955         cf_cv_enable_opaque="NCURSES_OPAQUE"
15956         NCURSES_SIZE_T=$cf_dft_ordinate_type
15957 fi
15958
15959 echo "$as_me:15959: checking if you want opaque curses-library structures" >&5
15960 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15961
15962 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15963 if test "${enable_opaque_curses+set}" = set; then
15964   enableval="$enable_opaque_curses"
15965   test "$enableval" != yes && enableval=no
15966         if test "$enableval" != "no" ; then
15967     enable_opaque_curses=yes
15968         else
15969
15970          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15971          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
15972
15973         fi
15974 else
15975   enableval=no
15976
15977          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15978          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
15979
15980 fi;
15981 echo "$as_me:15981: result: $enable_opaque_curses" >&5
15982 echo "${ECHO_T}$enable_opaque_curses" >&6
15983
15984 test "$cf_cv_enable_reentrant" = 1 && \
15985 test "$enable_opaque_curses" = no && \
15986 { { echo "$as_me:15986: error: reentrant configuration requires opaque library" >&5
15987 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15988    { (exit 1); exit 1; }; }
15989
15990 echo "$as_me:15990: checking if you want opaque form-library structures" >&5
15991 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15992
15993 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15994 if test "${enable_opaque_form+set}" = set; then
15995   enableval="$enable_opaque_form"
15996   enable_opaque_form=yes
15997 else
15998   enable_opaque_form=no
15999 fi;
16000 echo "$as_me:16000: result: $enable_opaque_form" >&5
16001 echo "${ECHO_T}$enable_opaque_form" >&6
16002
16003 echo "$as_me:16003: checking if you want opaque menu-library structures" >&5
16004 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
16005
16006 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16007 if test "${enable_opaque_menu+set}" = set; then
16008   enableval="$enable_opaque_menu"
16009   enable_opaque_menu=yes
16010 else
16011   enable_opaque_menu=no
16012 fi;
16013 echo "$as_me:16013: result: $enable_opaque_menu" >&5
16014 echo "${ECHO_T}$enable_opaque_menu" >&6
16015
16016 echo "$as_me:16016: checking if you want opaque panel-library structures" >&5
16017 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
16018
16019 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16020 if test "${enable_opaque_panel+set}" = set; then
16021   enableval="$enable_opaque_panel"
16022   enable_opaque_panel=yes
16023 else
16024   enable_opaque_panel=no
16025 fi;
16026 echo "$as_me:16026: result: $enable_opaque_panel" >&5
16027 echo "${ECHO_T}$enable_opaque_panel" >&6
16028
16029 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16030 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16031 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16032 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16033
16034 ### Allow using a different wrap-prefix
16035 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16036         echo "$as_me:16036: checking for prefix used to wrap public variables" >&5
16037 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16038
16039 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16040 if test "${with_wrap_prefix+set}" = set; then
16041   withval="$with_wrap_prefix"
16042   NCURSES_WRAP_PREFIX=$withval
16043 else
16044   NCURSES_WRAP_PREFIX=_nc_
16045 fi;
16046         echo "$as_me:16046: result: $NCURSES_WRAP_PREFIX" >&5
16047 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16048 else
16049         NCURSES_WRAP_PREFIX=_nc_
16050 fi
16051
16052 cat >>confdefs.h <<EOF
16053 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16054 EOF
16055
16056 ###############################################################################
16057 # These options are relatively safe to experiment with.
16058
16059 echo "$as_me:16059: checking if you want all development code" >&5
16060 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16061
16062 # Check whether --with-develop or --without-develop was given.
16063 if test "${with_develop+set}" = set; then
16064   withval="$with_develop"
16065   with_develop=$withval
16066 else
16067   with_develop=no
16068 fi;
16069 echo "$as_me:16069: result: $with_develop" >&5
16070 echo "${ECHO_T}$with_develop" >&6
16071
16072 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16073 echo "$as_me:16073: checking if you want hard-tabs code" >&5
16074 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16075
16076 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16077 if test "${enable_hard_tabs+set}" = set; then
16078   enableval="$enable_hard_tabs"
16079
16080 else
16081   enable_hard_tabs=$with_develop
16082 fi;
16083 echo "$as_me:16083: result: $enable_hard_tabs" >&5
16084 echo "${ECHO_T}$enable_hard_tabs" >&6
16085 test "x$enable_hard_tabs" = xyes &&
16086 cat >>confdefs.h <<\EOF
16087 #define USE_HARD_TABS 1
16088 EOF
16089
16090 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16091 echo "$as_me:16091: checking if you want limited support for xmc" >&5
16092 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16093
16094 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16095 if test "${enable_xmc_glitch+set}" = set; then
16096   enableval="$enable_xmc_glitch"
16097
16098 else
16099   enable_xmc_glitch=$with_develop
16100 fi;
16101 echo "$as_me:16101: result: $enable_xmc_glitch" >&5
16102 echo "${ECHO_T}$enable_xmc_glitch" >&6
16103 test "x$enable_xmc_glitch" = xyes &&
16104 cat >>confdefs.h <<\EOF
16105 #define USE_XMC_SUPPORT 1
16106 EOF
16107
16108 ###############################################################################
16109 # These are just experimental, probably should not be in a package:
16110
16111 echo "$as_me:16111: checking if you do not want to assume colors are white-on-black" >&5
16112 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16113
16114 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16115 if test "${enable_assumed_color+set}" = set; then
16116   enableval="$enable_assumed_color"
16117   with_assumed_color=$enableval
16118 else
16119   with_assumed_color=yes
16120 fi;
16121 echo "$as_me:16121: result: $with_assumed_color" >&5
16122 echo "${ECHO_T}$with_assumed_color" >&6
16123 test "x$with_assumed_color" = xyes &&
16124 cat >>confdefs.h <<\EOF
16125 #define USE_ASSUMED_COLOR 1
16126 EOF
16127
16128 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16129 echo "$as_me:16129: checking if you want hashmap scrolling-optimization code" >&5
16130 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16131
16132 # Check whether --enable-hashmap or --disable-hashmap was given.
16133 if test "${enable_hashmap+set}" = set; then
16134   enableval="$enable_hashmap"
16135   with_hashmap=$enableval
16136 else
16137   with_hashmap=yes
16138 fi;
16139 echo "$as_me:16139: result: $with_hashmap" >&5
16140 echo "${ECHO_T}$with_hashmap" >&6
16141 test "x$with_hashmap" = xyes &&
16142 cat >>confdefs.h <<\EOF
16143 #define USE_HASHMAP 1
16144 EOF
16145
16146 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16147 echo "$as_me:16147: checking if you want colorfgbg code" >&5
16148 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16149
16150 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16151 if test "${enable_colorfgbg+set}" = set; then
16152   enableval="$enable_colorfgbg"
16153   with_colorfgbg=$enableval
16154 else
16155   with_colorfgbg=no
16156 fi;
16157 echo "$as_me:16157: result: $with_colorfgbg" >&5
16158 echo "${ECHO_T}$with_colorfgbg" >&6
16159 test "x$with_colorfgbg" = xyes &&
16160 cat >>confdefs.h <<\EOF
16161 #define USE_COLORFGBG 1
16162 EOF
16163
16164 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16165 echo "$as_me:16165: checking if you want to use gcc -fvisibility option" >&5
16166 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16167
16168 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16169 if test "${enable_fvisibility+set}" = set; then
16170   enableval="$enable_fvisibility"
16171   cf_with_fvisibility=$enableval
16172 else
16173   cf_with_fvisibility=no
16174 fi;
16175 echo "$as_me:16175: result: $cf_with_fvisibility" >&5
16176 echo "${ECHO_T}$cf_with_fvisibility" >&6
16177
16178 NCURSES_IMPEXP=
16179 NCURSES_CXX_IMPEXP=
16180 if test "x$cf_with_fvisibility" = xyes; then
16181
16182 echo "$as_me:16182: checking if $CC -fvisibility=hidden option works" >&5
16183 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16184 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16185   echo $ECHO_N "(cached) $ECHO_C" >&6
16186 else
16187
16188     cf_save_cflags="$CFLAGS"
16189     CFLAGS="$CFLAGS -fvisibility=hidden"
16190     cat >"conftest.$ac_ext" <<_ACEOF
16191 #line 16191 "configure"
16192 #include "confdefs.h"
16193
16194 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16195
16196 int
16197 main (void)
16198 {
16199
16200         if (somefunc()) return 1;
16201
16202   ;
16203   return 0;
16204 }
16205 _ACEOF
16206 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16207 if { (eval echo "$as_me:16207: \"$ac_link\"") >&5
16208   (eval $ac_link) 2>&5
16209   ac_status=$?
16210   echo "$as_me:16210: \$? = $ac_status" >&5
16211   (exit "$ac_status"); } &&
16212          { ac_try='test -s "conftest$ac_exeext"'
16213   { (eval echo "$as_me:16213: \"$ac_try\"") >&5
16214   (eval $ac_try) 2>&5
16215   ac_status=$?
16216   echo "$as_me:16216: \$? = $ac_status" >&5
16217   (exit "$ac_status"); }; }; then
16218   cf_cv_fvisibility_hidden=yes
16219 else
16220   echo "$as_me: failed program was:" >&5
16221 cat "conftest.$ac_ext" >&5
16222 cf_cv_fvisibility_hidden=no
16223 fi
16224 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16225     CFLAGS=$cf_save_cflags
16226
16227 fi
16228 echo "$as_me:16228: result: $cf_cv_fvisibility_hidden" >&5
16229 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16230
16231         if test "x$cf_cv_fvisibility_hidden" = xyes
16232         then
16233
16234 cf_fix_cppflags=no
16235 cf_new_cflags=
16236 cf_new_cppflags=
16237 cf_new_extra_cppflags=
16238
16239 for cf_add_cflags in -fvisibility=hidden
16240 do
16241 case "$cf_fix_cppflags" in
16242 (no)
16243         case "$cf_add_cflags" in
16244         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16245                 case "$cf_add_cflags" in
16246                 (-D*)
16247                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16248
16249                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16250                                 && test -z "${cf_tst_cflags}" \
16251                                 && cf_fix_cppflags=yes
16252
16253                         if test "$cf_fix_cppflags" = yes ; then
16254
16255         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16256         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16257
16258                                 continue
16259                         elif test "${cf_tst_cflags}" = "\"'" ; then
16260
16261         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16262         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16263
16264                                 continue
16265                         fi
16266                         ;;
16267                 esac
16268                 case "$CPPFLAGS" in
16269                 (*$cf_add_cflags)
16270                         ;;
16271                 (*)
16272                         case "$cf_add_cflags" in
16273                         (-D*)
16274                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16275
16276 CPPFLAGS=`echo "$CPPFLAGS" | \
16277         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16278                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16279
16280                                 ;;
16281                         esac
16282
16283         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16284         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16285
16286                         ;;
16287                 esac
16288                 ;;
16289         (*)
16290
16291         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16292         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16293
16294                 ;;
16295         esac
16296         ;;
16297 (yes)
16298
16299         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16300         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16301
16302         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16303
16304         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16305                 && test -z "${cf_tst_cflags}" \
16306                 && cf_fix_cppflags=no
16307         ;;
16308 esac
16309 done
16310
16311 if test -n "$cf_new_cflags" ; then
16312
16313         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16314         CFLAGS="${CFLAGS}$cf_new_cflags"
16315
16316 fi
16317
16318 if test -n "$cf_new_cppflags" ; then
16319
16320         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16321         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16322
16323 fi
16324
16325 if test -n "$cf_new_extra_cppflags" ; then
16326
16327         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16328         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16329
16330 fi
16331
16332                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16333         fi
16334         if test -n "$CXX"
16335         then
16336                 ac_ext=cc
16337 ac_cpp='$CXXCPP $CPPFLAGS'
16338 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16339 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16340 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16341 ac_main_return="return"
16342
16343 echo "$as_me:16343: checking if $CXX -fvisibility=hidden option works" >&5
16344 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16345 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16346   echo $ECHO_N "(cached) $ECHO_C" >&6
16347 else
16348
16349     cf_save_cflags="$CXXFLAGS"
16350     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16351     cat >"conftest.$ac_ext" <<_ACEOF
16352 #line 16352 "configure"
16353 #include "confdefs.h"
16354
16355 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16356
16357 int
16358 main (void)
16359 {
16360
16361         if (somefunc()) return 1;
16362
16363   ;
16364   return 0;
16365 }
16366 _ACEOF
16367 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16368 if { (eval echo "$as_me:16368: \"$ac_link\"") >&5
16369   (eval $ac_link) 2>&5
16370   ac_status=$?
16371   echo "$as_me:16371: \$? = $ac_status" >&5
16372   (exit "$ac_status"); } &&
16373          { ac_try='test -s "conftest$ac_exeext"'
16374   { (eval echo "$as_me:16374: \"$ac_try\"") >&5
16375   (eval $ac_try) 2>&5
16376   ac_status=$?
16377   echo "$as_me:16377: \$? = $ac_status" >&5
16378   (exit "$ac_status"); }; }; then
16379   cf_cv_fvisibility_hidden2=yes
16380 else
16381   echo "$as_me: failed program was:" >&5
16382 cat "conftest.$ac_ext" >&5
16383 cf_cv_fvisibility_hidden2=no
16384 fi
16385 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16386     CXXFLAGS=$cf_save_cflags
16387
16388 fi
16389 echo "$as_me:16389: result: $cf_cv_fvisibility_hidden2" >&5
16390 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16391
16392                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16393                 then
16394
16395 cf_save_CXXFLAGS="$CFLAGS"
16396 CFLAGS="$CXXFLAGS"
16397
16398 cf_fix_cppflags=no
16399 cf_new_cflags=
16400 cf_new_cppflags=
16401 cf_new_extra_cppflags=
16402
16403 for cf_add_cflags in -fvisibility=hidden
16404 do
16405 case "$cf_fix_cppflags" in
16406 (no)
16407         case "$cf_add_cflags" in
16408         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16409                 case "$cf_add_cflags" in
16410                 (-D*)
16411                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16412
16413                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16414                                 && test -z "${cf_tst_cflags}" \
16415                                 && cf_fix_cppflags=yes
16416
16417                         if test "$cf_fix_cppflags" = yes ; then
16418
16419         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16420         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16421
16422                                 continue
16423                         elif test "${cf_tst_cflags}" = "\"'" ; then
16424
16425         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16426         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16427
16428                                 continue
16429                         fi
16430                         ;;
16431                 esac
16432                 case "$CPPFLAGS" in
16433                 (*$cf_add_cflags)
16434                         ;;
16435                 (*)
16436                         case "$cf_add_cflags" in
16437                         (-D*)
16438                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16439
16440 CPPFLAGS=`echo "$CPPFLAGS" | \
16441         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16442                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16443
16444                                 ;;
16445                         esac
16446
16447         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16448         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16449
16450                         ;;
16451                 esac
16452                 ;;
16453         (*)
16454
16455         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16456         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16457
16458                 ;;
16459         esac
16460         ;;
16461 (yes)
16462
16463         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16464         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16465
16466         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16467
16468         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16469                 && test -z "${cf_tst_cflags}" \
16470                 && cf_fix_cppflags=no
16471         ;;
16472 esac
16473 done
16474
16475 if test -n "$cf_new_cflags" ; then
16476
16477         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16478         CFLAGS="${CFLAGS}$cf_new_cflags"
16479
16480 fi
16481
16482 if test -n "$cf_new_cppflags" ; then
16483
16484         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16485         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16486
16487 fi
16488
16489 if test -n "$cf_new_extra_cppflags" ; then
16490
16491         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16492         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16493
16494 fi
16495
16496 CXXFLAGS="$CFLAGS"
16497 CFLAGS="$cf_save_CXXFLAGS"
16498
16499                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16500                 fi
16501                 ac_ext=c
16502 ac_cpp='$CPP $CPPFLAGS'
16503 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16504 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16505 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16506 ac_main_return="return"
16507
16508         fi
16509 fi
16510
16511 ###   use option --enable-interop to turn on use of bindings used for interop
16512 echo "$as_me:16512: checking if you want interop bindings" >&5
16513 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16514
16515 # Check whether --enable-interop or --disable-interop was given.
16516 if test "${enable_interop+set}" = set; then
16517   enableval="$enable_interop"
16518   with_exp_interop=$enableval
16519 else
16520   with_exp_interop=$cf_dft_interop
16521 fi;
16522 echo "$as_me:16522: result: $with_exp_interop" >&5
16523 echo "${ECHO_T}$with_exp_interop" >&6
16524
16525 NCURSES_INTEROP_FUNCS=0
16526 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16527
16528 echo "$as_me:16528: checking if you want experimental safe-sprintf code" >&5
16529 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16530
16531 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16532 if test "${enable_safe_sprintf+set}" = set; then
16533   enableval="$enable_safe_sprintf"
16534   with_safe_sprintf=$enableval
16535 else
16536   with_safe_sprintf=no
16537 fi;
16538 echo "$as_me:16538: result: $with_safe_sprintf" >&5
16539 echo "${ECHO_T}$with_safe_sprintf" >&6
16540
16541 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16542 # when hashmap is used scroll hints are useless
16543 if test "$with_hashmap" = no ; then
16544 echo "$as_me:16544: checking if you want to experiment without scrolling-hints code" >&5
16545 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16546
16547 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16548 if test "${enable_scroll_hints+set}" = set; then
16549   enableval="$enable_scroll_hints"
16550   with_scroll_hints=$enableval
16551 else
16552   with_scroll_hints=yes
16553 fi;
16554 echo "$as_me:16554: result: $with_scroll_hints" >&5
16555 echo "${ECHO_T}$with_scroll_hints" >&6
16556 test "x$with_scroll_hints" = xyes &&
16557 cat >>confdefs.h <<\EOF
16558 #define USE_SCROLL_HINTS 1
16559 EOF
16560
16561 fi
16562
16563 echo "$as_me:16563: checking if you want wgetch-events code" >&5
16564 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16565
16566 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16567 if test "${enable_wgetch_events+set}" = set; then
16568   enableval="$enable_wgetch_events"
16569   with_wgetch_events=$enableval
16570 else
16571   with_wgetch_events=no
16572 fi;
16573 echo "$as_me:16573: result: $with_wgetch_events" >&5
16574 echo "${ECHO_T}$with_wgetch_events" >&6
16575 if test "x$with_wgetch_events" = xyes ; then
16576
16577 cat >>confdefs.h <<\EOF
16578 #define NCURSES_WGETCH_EVENTS 1
16579 EOF
16580
16581         NCURSES_WGETCH_EVENTS=1
16582 else
16583         NCURSES_WGETCH_EVENTS=0
16584 fi
16585
16586 case "$cf_cv_system_name" in
16587 (*mingw32*|*mingw64*|*-msvc*)
16588         echo "$as_me:16588: checking if you want experimental-Windows driver" >&5
16589 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16590
16591 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16592 if test "${enable_exp_win32+set}" = set; then
16593   enableval="$enable_exp_win32"
16594   with_exp_win32=$enableval
16595 else
16596   with_exp_win32=no
16597 fi;
16598         echo "$as_me:16598: result: $with_exp_win32" >&5
16599 echo "${ECHO_T}$with_exp_win32" >&6
16600         if test "x$with_exp_win32" = xyes
16601         then
16602
16603 cat >>confdefs.h <<\EOF
16604 #define EXP_WIN32_DRIVER 1
16605 EOF
16606
16607                 EXP_WIN32_DRIVER=1
16608                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16609         else
16610                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16611                 EXP_WIN32_DRIVER=0
16612         fi
16613         ;;
16614 (*)
16615         EXP_WIN32_DRIVER=0
16616         INTERNALS_HDR=
16617         ;;
16618 esac
16619
16620 ###############################################################################
16621
16622 ###     use option --disable-echo to suppress full display compiling commands
16623
16624 echo "$as_me:16624: checking if you want to see long compiling messages" >&5
16625 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16626
16627 # Check whether --enable-echo or --disable-echo was given.
16628 if test "${enable_echo+set}" = set; then
16629   enableval="$enable_echo"
16630   test "$enableval" != no && enableval=yes
16631         if test "$enableval" != "yes" ; then
16632
16633         ECHO_LT='--silent'
16634         ECHO_LD='@echo linking $@;'
16635         RULE_CC='@echo compiling $<'
16636         SHOW_CC='@echo compiling $@'
16637         ECHO_CC='@'
16638
16639         else
16640
16641         ECHO_LT=''
16642         ECHO_LD=''
16643         RULE_CC=''
16644         SHOW_CC=''
16645         ECHO_CC=''
16646
16647         fi
16648 else
16649   enableval=yes
16650
16651         ECHO_LT=''
16652         ECHO_LD=''
16653         RULE_CC=''
16654         SHOW_CC=''
16655         ECHO_CC=''
16656
16657 fi;
16658 echo "$as_me:16658: result: $enableval" >&5
16659 echo "${ECHO_T}$enableval" >&6
16660
16661 if test "x$enable_echo" = xyes; then
16662         ECHO_LINK=
16663 else
16664         ECHO_LINK='@ echo linking $@ ... ;'
16665         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16666         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16667 fi
16668
16669 # --disable-stripping is used for debugging
16670
16671 echo "$as_me:16671: checking if you want to install stripped executables" >&5
16672 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16673
16674 # Check whether --enable-stripping or --disable-stripping was given.
16675 if test "${enable_stripping+set}" = set; then
16676   enableval="$enable_stripping"
16677   test "$enableval" != no && enableval=yes
16678         if test "$enableval" != "yes" ; then
16679     enable_stripping=no
16680         else
16681                 enable_stripping=yes
16682         fi
16683 else
16684   enableval=yes
16685         enable_stripping=yes
16686
16687 fi;
16688 echo "$as_me:16688: result: $enable_stripping" >&5
16689 echo "${ECHO_T}$enable_stripping" >&6
16690
16691 if test "$enable_stripping" = yes
16692 then
16693         INSTALL_OPT_S="-s"
16694 else
16695         INSTALL_OPT_S=
16696 fi
16697
16698 : "${INSTALL:=install}"
16699 echo "$as_me:16699: checking if install accepts -p option" >&5
16700 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16701 if test "${cf_cv_install_p+set}" = set; then
16702   echo $ECHO_N "(cached) $ECHO_C" >&6
16703 else
16704
16705         rm -rf ./conftest*
16706         date >conftest.in
16707         mkdir conftest.out
16708         sleep 3
16709         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16710         then
16711                 if test -f conftest.out/conftest.in
16712                 then
16713                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16714                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16715                         if test -s conftest.err
16716                         then
16717                                 cf_cv_install_p=no
16718                         else
16719                                 cf_cv_install_p=yes
16720                         fi
16721                 else
16722                         cf_cv_install_p=no
16723                 fi
16724         else
16725                 cf_cv_install_p=no
16726         fi
16727         rm -rf ./conftest*
16728
16729 fi
16730 echo "$as_me:16730: result: $cf_cv_install_p" >&5
16731 echo "${ECHO_T}$cf_cv_install_p" >&6
16732
16733 echo "$as_me:16733: checking if install needs to be told about ownership" >&5
16734 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16735 case `$ac_config_guess` in
16736 (*minix)
16737         with_install_o=yes
16738         ;;
16739 (*)
16740         with_install_o=no
16741         ;;
16742 esac
16743
16744 echo "$as_me:16744: result: $with_install_o" >&5
16745 echo "${ECHO_T}$with_install_o" >&6
16746 if test "x$with_install_o" = xyes
16747 then
16748         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'`"
16749 else
16750         INSTALL_OPT_O=
16751 fi
16752
16753 # If we're avoiding relinking of shared libraries during install, that is to
16754 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16755 # the install program has "-p" (for preserving timestamps).
16756 cf_cv_do_reranlib=yes
16757 if test "x$cf_cv_install_p" = xyes
16758 then
16759         if test "x$cf_cv_do_relink" != xyes
16760         then
16761                 cf_cv_do_reranlib=no
16762                 INSTALL_OPT_P="-p"
16763                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16764         fi
16765 fi
16766
16767 ###     use option --enable-warnings to turn on all gcc warnings
16768
16769 echo "$as_me:16769: checking if you want to use C11 _Noreturn feature" >&5
16770 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16771
16772 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16773 if test "${enable_stdnoreturn+set}" = set; then
16774   enableval="$enable_stdnoreturn"
16775   test "$enableval" != yes && enableval=no
16776         if test "$enableval" != "no" ; then
16777     enable_stdnoreturn=yes
16778         else
16779                 enable_stdnoreturn=no
16780         fi
16781 else
16782   enableval=no
16783         enable_stdnoreturn=no
16784
16785 fi;
16786 echo "$as_me:16786: result: $enable_stdnoreturn" >&5
16787 echo "${ECHO_T}$enable_stdnoreturn" >&6
16788
16789 if test $enable_stdnoreturn = yes; then
16790 echo "$as_me:16790: checking for C11 _Noreturn feature" >&5
16791 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16792 if test "${cf_cv_c11_noreturn+set}" = set; then
16793   echo $ECHO_N "(cached) $ECHO_C" >&6
16794 else
16795   cat >"conftest.$ac_ext" <<_ACEOF
16796 #line 16796 "configure"
16797 #include "confdefs.h"
16798
16799 #include <stdio.h>
16800 #include <stdlib.h>
16801 #include <stdnoreturn.h>
16802 static _Noreturn void giveup(void) { exit(0); }
16803
16804 int
16805 main (void)
16806 {
16807 if (feof(stdin)) giveup()
16808   ;
16809   return 0;
16810 }
16811 _ACEOF
16812 rm -f "conftest.$ac_objext"
16813 if { (eval echo "$as_me:16813: \"$ac_compile\"") >&5
16814   (eval $ac_compile) 2>&5
16815   ac_status=$?
16816   echo "$as_me:16816: \$? = $ac_status" >&5
16817   (exit "$ac_status"); } &&
16818          { ac_try='test -s "conftest.$ac_objext"'
16819   { (eval echo "$as_me:16819: \"$ac_try\"") >&5
16820   (eval $ac_try) 2>&5
16821   ac_status=$?
16822   echo "$as_me:16822: \$? = $ac_status" >&5
16823   (exit "$ac_status"); }; }; then
16824   cf_cv_c11_noreturn=yes
16825 else
16826   echo "$as_me: failed program was:" >&5
16827 cat "conftest.$ac_ext" >&5
16828 cf_cv_c11_noreturn=no
16829 fi
16830 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16831
16832 fi
16833 echo "$as_me:16833: result: $cf_cv_c11_noreturn" >&5
16834 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16835 else
16836         cf_cv_c11_noreturn=no,
16837 fi
16838
16839 if test "$cf_cv_c11_noreturn" = yes; then
16840
16841 cat >>confdefs.h <<\EOF
16842 #define HAVE_STDNORETURN_H 1
16843 EOF
16844
16845 cat >>confdefs.h <<EOF
16846 #define STDC_NORETURN _Noreturn
16847 EOF
16848
16849         HAVE_STDNORETURN_H=1
16850 else
16851         HAVE_STDNORETURN_H=0
16852 fi
16853
16854 if test "$GCC" = yes || test "$GXX" = yes
16855 then
16856
16857 if test "$GCC" = yes || test "$GXX" = yes
16858 then
16859         case $CFLAGS in
16860         (*-Werror=*)
16861                 cf_temp_flags=
16862                 for cf_temp_scan in $CFLAGS
16863                 do
16864                         case "x$cf_temp_scan" in
16865                         (x-Werror=format*)
16866
16867         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16868         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16869
16870                                 ;;
16871                         (x-Werror=*)
16872
16873         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16874         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16875
16876                                 ;;
16877                         (*)
16878
16879         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16880         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16881
16882                                 ;;
16883                         esac
16884                 done
16885                 if test "x$CFLAGS" != "x$cf_temp_flags"
16886                 then
16887                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16888
16889 echo "${as_me:-configure}:16889: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16890
16891                         CFLAGS="$cf_temp_flags"
16892                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16893
16894 echo "${as_me:-configure}:16894: testing ... fixed $CFLAGS ..." 1>&5
16895
16896                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16897
16898 echo "${as_me:-configure}:16898: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16899
16900                 fi
16901                 ;;
16902         esac
16903 fi
16904
16905 if test "$GCC" = yes || test "$GXX" = yes
16906 then
16907         case $CPPFLAGS in
16908         (*-Werror=*)
16909                 cf_temp_flags=
16910                 for cf_temp_scan in $CPPFLAGS
16911                 do
16912                         case "x$cf_temp_scan" in
16913                         (x-Werror=format*)
16914
16915         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16916         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16917
16918                                 ;;
16919                         (x-Werror=*)
16920
16921         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16922         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16923
16924                                 ;;
16925                         (*)
16926
16927         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16928         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16929
16930                                 ;;
16931                         esac
16932                 done
16933                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
16934                 then
16935                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16936
16937 echo "${as_me:-configure}:16937: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16938
16939                         CPPFLAGS="$cf_temp_flags"
16940                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16941
16942 echo "${as_me:-configure}:16942: testing ... fixed $CPPFLAGS ..." 1>&5
16943
16944                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16945
16946 echo "${as_me:-configure}:16946: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16947
16948                 fi
16949                 ;;
16950         esac
16951 fi
16952
16953 if test "$GCC" = yes || test "$GXX" = yes
16954 then
16955         case $LDFLAGS in
16956         (*-Werror=*)
16957                 cf_temp_flags=
16958                 for cf_temp_scan in $LDFLAGS
16959                 do
16960                         case "x$cf_temp_scan" in
16961                         (x-Werror=format*)
16962
16963         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16964         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16965
16966                                 ;;
16967                         (x-Werror=*)
16968
16969         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16970         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16971
16972                                 ;;
16973                         (*)
16974
16975         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16976         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16977
16978                                 ;;
16979                         esac
16980                 done
16981                 if test "x$LDFLAGS" != "x$cf_temp_flags"
16982                 then
16983                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16984
16985 echo "${as_me:-configure}:16985: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16986
16987                         LDFLAGS="$cf_temp_flags"
16988                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16989
16990 echo "${as_me:-configure}:16990: testing ... fixed $LDFLAGS ..." 1>&5
16991
16992                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16993
16994 echo "${as_me:-configure}:16994: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16995
16996                 fi
16997                 ;;
16998         esac
16999 fi
17000
17001 echo "$as_me:17001: checking if you want to turn on gcc warnings" >&5
17002 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17003
17004 # Check whether --enable-warnings or --disable-warnings was given.
17005 if test "${enable_warnings+set}" = set; then
17006   enableval="$enable_warnings"
17007   test "$enableval" != yes && enableval=no
17008         if test "$enableval" != "no" ; then
17009     enable_warnings=yes
17010         else
17011                 enable_warnings=no
17012         fi
17013 else
17014   enableval=no
17015         enable_warnings=no
17016
17017 fi;
17018 echo "$as_me:17018: result: $enable_warnings" >&5
17019 echo "${ECHO_T}$enable_warnings" >&6
17020 if test "$enable_warnings" = "yes"
17021 then
17022
17023 if test "x$have_x" = xyes; then
17024
17025 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17026 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17027 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17028 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17029 for cf_X_CFLAGS in $X_CFLAGS
17030 do
17031         case "x$cf_X_CFLAGS" in
17032         x-[IUD]*)
17033                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17034                 ;;
17035         *)
17036                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17037                 ;;
17038         esac
17039 done
17040
17041 cat >"conftest.$ac_ext" <<_ACEOF
17042 #line 17042 "configure"
17043 #include "confdefs.h"
17044
17045 #include <stdlib.h>
17046 #include <X11/Intrinsic.h>
17047
17048 int
17049 main (void)
17050 {
17051 String foo = malloc(1); free((void*)foo)
17052   ;
17053   return 0;
17054 }
17055 _ACEOF
17056 rm -f "conftest.$ac_objext"
17057 if { (eval echo "$as_me:17057: \"$ac_compile\"") >&5
17058   (eval $ac_compile) 2>&5
17059   ac_status=$?
17060   echo "$as_me:17060: \$? = $ac_status" >&5
17061   (exit "$ac_status"); } &&
17062          { ac_try='test -s "conftest.$ac_objext"'
17063   { (eval echo "$as_me:17063: \"$ac_try\"") >&5
17064   (eval $ac_try) 2>&5
17065   ac_status=$?
17066   echo "$as_me:17066: \$? = $ac_status" >&5
17067   (exit "$ac_status"); }; }; then
17068
17069 echo "$as_me:17069: checking for X11/Xt const-feature" >&5
17070 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17071 if test "${cf_cv_const_x_string+set}" = set; then
17072   echo $ECHO_N "(cached) $ECHO_C" >&6
17073 else
17074
17075         cat >"conftest.$ac_ext" <<_ACEOF
17076 #line 17076 "configure"
17077 #include "confdefs.h"
17078
17079 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17080 #undef  XTSTRINGDEFINES /* X11R5 and later */
17081 #include <stdlib.h>
17082 #include <X11/Intrinsic.h>
17083
17084 int
17085 main (void)
17086 {
17087 String foo = malloc(1); *foo = 0
17088   ;
17089   return 0;
17090 }
17091 _ACEOF
17092 rm -f "conftest.$ac_objext"
17093 if { (eval echo "$as_me:17093: \"$ac_compile\"") >&5
17094   (eval $ac_compile) 2>&5
17095   ac_status=$?
17096   echo "$as_me:17096: \$? = $ac_status" >&5
17097   (exit "$ac_status"); } &&
17098          { ac_try='test -s "conftest.$ac_objext"'
17099   { (eval echo "$as_me:17099: \"$ac_try\"") >&5
17100   (eval $ac_try) 2>&5
17101   ac_status=$?
17102   echo "$as_me:17102: \$? = $ac_status" >&5
17103   (exit "$ac_status"); }; }; then
17104
17105                         cf_cv_const_x_string=no
17106
17107 else
17108   echo "$as_me: failed program was:" >&5
17109 cat "conftest.$ac_ext" >&5
17110
17111                         cf_cv_const_x_string=yes
17112
17113 fi
17114 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17115
17116 fi
17117 echo "$as_me:17117: result: $cf_cv_const_x_string" >&5
17118 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17119
17120 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17121 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17122 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17123
17124 case "$cf_cv_const_x_string" in
17125 (no)
17126
17127         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17128         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17129
17130         ;;
17131 (*)
17132
17133         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17134         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17135
17136         ;;
17137 esac
17138
17139 else
17140   echo "$as_me: failed program was:" >&5
17141 cat "conftest.$ac_ext" >&5
17142 fi
17143 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17144  fi
17145 cat > "conftest.$ac_ext" <<EOF
17146 #line 17146 "${as_me:-configure}"
17147 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17148 EOF
17149 if test "$INTEL_COMPILER" = yes
17150 then
17151 # The "-wdXXX" options suppress warnings:
17152 # remark #1419: external declaration in primary source file
17153 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17154 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17155 # remark #193: zero used for undefined preprocessing identifier
17156 # remark #593: variable "curs_sb_left_arrow" was set but never used
17157 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17158 # remark #869: parameter "tw" was never referenced
17159 # remark #981: operands are evaluated in unspecified order
17160 # warning #279: controlling expression is constant
17161
17162         { echo "$as_me:17162: checking for $CC warning options..." >&5
17163 echo "$as_me: checking for $CC warning options..." >&6;}
17164         cf_save_CFLAGS="$CFLAGS"
17165         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17166         for cf_opt in \
17167                 wd1419 \
17168                 wd1683 \
17169                 wd1684 \
17170                 wd193 \
17171                 wd593 \
17172                 wd279 \
17173                 wd810 \
17174                 wd869 \
17175                 wd981
17176         do
17177                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17178                 if { (eval echo "$as_me:17178: \"$ac_compile\"") >&5
17179   (eval $ac_compile) 2>&5
17180   ac_status=$?
17181   echo "$as_me:17181: \$? = $ac_status" >&5
17182   (exit "$ac_status"); }; then
17183                         test -n "$verbose" && echo "$as_me:17183: result: ... -$cf_opt" >&5
17184 echo "${ECHO_T}... -$cf_opt" >&6
17185                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17186                 fi
17187         done
17188         CFLAGS="$cf_save_CFLAGS"
17189 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17190 then
17191         { echo "$as_me:17191: checking for $CC warning options..." >&5
17192 echo "$as_me: checking for $CC warning options..." >&6;}
17193         cf_save_CFLAGS="$CFLAGS"
17194         cf_warn_CONST=""
17195         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17196         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17197         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17198         for cf_opt in W Wall \
17199                 Wbad-function-cast \
17200                 Wcast-align \
17201                 Wcast-qual \
17202                 Wdeclaration-after-statement \
17203                 Wextra \
17204                 Winline \
17205                 Wmissing-declarations \
17206                 Wmissing-prototypes \
17207                 Wnested-externs \
17208                 Wpointer-arith \
17209                 Wshadow \
17210                 Wstrict-prototypes \
17211                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17212         do
17213                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17214                 if { (eval echo "$as_me:17214: \"$ac_compile\"") >&5
17215   (eval $ac_compile) 2>&5
17216   ac_status=$?
17217   echo "$as_me:17217: \$? = $ac_status" >&5
17218   (exit "$ac_status"); }; then
17219                         test -n "$verbose" && echo "$as_me:17219: result: ... -$cf_opt" >&5
17220 echo "${ECHO_T}... -$cf_opt" >&6
17221                         case "$cf_opt" in
17222                         (Winline)
17223                                 case "$GCC_VERSION" in
17224                                 ([34].*)
17225                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17226
17227 echo "${as_me:-configure}:17227: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17228
17229                                         continue;;
17230                                 esac
17231                                 ;;
17232                         (Wpointer-arith)
17233                                 case "$GCC_VERSION" in
17234                                 ([12].*)
17235                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17236
17237 echo "${as_me:-configure}:17237: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17238
17239                                         continue;;
17240                                 esac
17241                                 ;;
17242                         esac
17243                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17244                 fi
17245         done
17246         CFLAGS="$cf_save_CFLAGS"
17247 fi
17248 rm -rf ./conftest*
17249
17250 fi
17251
17252 if test "$GCC" = yes || test "$GXX" = yes
17253 then
17254 cat > conftest.i <<EOF
17255 #ifndef GCC_PRINTF
17256 #define GCC_PRINTF 0
17257 #endif
17258 #ifndef GCC_SCANF
17259 #define GCC_SCANF 0
17260 #endif
17261 #ifndef GCC_NORETURN
17262 #define GCC_NORETURN /* nothing */
17263 #endif
17264 #ifndef GCC_UNUSED
17265 #define GCC_UNUSED /* nothing */
17266 #endif
17267 EOF
17268 if test "$GCC" = yes
17269 then
17270         { echo "$as_me:17270: checking for $CC __attribute__ directives..." >&5
17271 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17272 cat > "conftest.$ac_ext" <<EOF
17273 #line 17273 "${as_me:-configure}"
17274 #include "confdefs.h"
17275 #include "conftest.h"
17276 #include "conftest.i"
17277 #if     GCC_PRINTF
17278 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17279 #else
17280 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17281 #endif
17282 #if     GCC_SCANF
17283 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17284 #else
17285 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17286 #endif
17287 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17288 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17289 extern GCC_NORETURN void foo(void);
17290 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17291 EOF
17292         cf_printf_attribute=no
17293         cf_scanf_attribute=no
17294         for cf_attribute in scanf printf unused noreturn
17295         do
17296
17297 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17298
17299                 cf_directive="__attribute__(($cf_attribute))"
17300                 echo "checking for $CC $cf_directive" 1>&5
17301
17302                 case "$cf_attribute" in
17303                 (printf)
17304                         cf_printf_attribute=yes
17305                         cat >conftest.h <<EOF
17306 #define GCC_$cf_ATTRIBUTE 1
17307 EOF
17308                         ;;
17309                 (scanf)
17310                         cf_scanf_attribute=yes
17311                         cat >conftest.h <<EOF
17312 #define GCC_$cf_ATTRIBUTE 1
17313 EOF
17314                         ;;
17315                 (*)
17316                         cat >conftest.h <<EOF
17317 #define GCC_$cf_ATTRIBUTE $cf_directive
17318 EOF
17319                         ;;
17320                 esac
17321
17322                 if { (eval echo "$as_me:17322: \"$ac_compile\"") >&5
17323   (eval $ac_compile) 2>&5
17324   ac_status=$?
17325   echo "$as_me:17325: \$? = $ac_status" >&5
17326   (exit "$ac_status"); }; then
17327                         test -n "$verbose" && echo "$as_me:17327: result: ... $cf_attribute" >&5
17328 echo "${ECHO_T}... $cf_attribute" >&6
17329                         cat conftest.h >>confdefs.h
17330                         case "$cf_attribute" in
17331                         (noreturn)
17332
17333 cat >>confdefs.h <<EOF
17334 #define GCC_NORETURN $cf_directive
17335 EOF
17336
17337                                 ;;
17338                         (printf)
17339                                 cf_value='/* nothing */'
17340                                 if test "$cf_printf_attribute" != no ; then
17341                                         cf_value='__attribute__((format(printf,fmt,var)))'
17342
17343 cat >>confdefs.h <<\EOF
17344 #define GCC_PRINTF 1
17345 EOF
17346
17347                                 fi
17348
17349 cat >>confdefs.h <<EOF
17350 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17351 EOF
17352
17353                                 ;;
17354                         (scanf)
17355                                 cf_value='/* nothing */'
17356                                 if test "$cf_scanf_attribute" != no ; then
17357                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17358
17359 cat >>confdefs.h <<\EOF
17360 #define GCC_SCANF 1
17361 EOF
17362
17363                                 fi
17364
17365 cat >>confdefs.h <<EOF
17366 #define GCC_SCANFLIKE(fmt,var) $cf_value
17367 EOF
17368
17369                                 ;;
17370                         (unused)
17371
17372 cat >>confdefs.h <<EOF
17373 #define GCC_UNUSED $cf_directive
17374 EOF
17375
17376                                 ;;
17377                         esac
17378                 fi
17379         done
17380 else
17381         ${FGREP-fgrep} define conftest.i >>confdefs.h
17382 fi
17383 rm -rf ./conftest*
17384 fi
17385
17386 fi
17387
17388 if test "x$enable_warnings" = "xyes"; then
17389
17390         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17391
17392         if test "x$cf_with_cxx" = xyes ; then
17393
17394 INTEL_CPLUSPLUS=no
17395
17396 if test "$GCC" = yes ; then
17397         case "$host_os" in
17398         (linux*|gnu*)
17399                 echo "$as_me:17399: checking if this is really Intel C++ compiler" >&5
17400 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17401                 cf_save_CFLAGS="$CXXFLAGS"
17402                 CXXFLAGS="$CXXFLAGS -no-gcc"
17403                 cat >"conftest.$ac_ext" <<_ACEOF
17404 #line 17404 "configure"
17405 #include "confdefs.h"
17406
17407 int
17408 main (void)
17409 {
17410
17411 #ifdef __INTEL_COMPILER
17412 #else
17413 make an error
17414 #endif
17415
17416   ;
17417   return 0;
17418 }
17419 _ACEOF
17420 rm -f "conftest.$ac_objext"
17421 if { (eval echo "$as_me:17421: \"$ac_compile\"") >&5
17422   (eval $ac_compile) 2>&5
17423   ac_status=$?
17424   echo "$as_me:17424: \$? = $ac_status" >&5
17425   (exit "$ac_status"); } &&
17426          { ac_try='test -s "conftest.$ac_objext"'
17427   { (eval echo "$as_me:17427: \"$ac_try\"") >&5
17428   (eval $ac_try) 2>&5
17429   ac_status=$?
17430   echo "$as_me:17430: \$? = $ac_status" >&5
17431   (exit "$ac_status"); }; }; then
17432   INTEL_CPLUSPLUS=yes
17433 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17434
17435 else
17436   echo "$as_me: failed program was:" >&5
17437 cat "conftest.$ac_ext" >&5
17438 fi
17439 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17440                 CXXFLAGS="$cf_save_CFLAGS"
17441                 echo "$as_me:17441: result: $INTEL_CPLUSPLUS" >&5
17442 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17443                 ;;
17444         esac
17445 fi
17446
17447 CLANG_CPLUSPLUS=no
17448
17449 if test "$GCC" = yes ; then
17450         echo "$as_me:17450: checking if this is really Clang C++ compiler" >&5
17451 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17452         cf_save_CFLAGS="$CXXFLAGS"
17453         cat >"conftest.$ac_ext" <<_ACEOF
17454 #line 17454 "configure"
17455 #include "confdefs.h"
17456
17457 int
17458 main (void)
17459 {
17460
17461 #ifdef __clang__
17462 #else
17463 make an error
17464 #endif
17465
17466   ;
17467   return 0;
17468 }
17469 _ACEOF
17470 rm -f "conftest.$ac_objext"
17471 if { (eval echo "$as_me:17471: \"$ac_compile\"") >&5
17472   (eval $ac_compile) 2>&5
17473   ac_status=$?
17474   echo "$as_me:17474: \$? = $ac_status" >&5
17475   (exit "$ac_status"); } &&
17476          { ac_try='test -s "conftest.$ac_objext"'
17477   { (eval echo "$as_me:17477: \"$ac_try\"") >&5
17478   (eval $ac_try) 2>&5
17479   ac_status=$?
17480   echo "$as_me:17480: \$? = $ac_status" >&5
17481   (exit "$ac_status"); }; }; then
17482   CLANG_CPLUSPLUS=yes
17483
17484 else
17485   echo "$as_me: failed program was:" >&5
17486 cat "conftest.$ac_ext" >&5
17487 fi
17488 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17489         CXXFLAGS="$cf_save_CFLAGS"
17490         echo "$as_me:17490: result: $CLANG_CPLUSPLUS" >&5
17491 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17492 fi
17493
17494 CLANG_VERSION=none
17495
17496 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17497         case "$CC" in
17498         (c[1-9][0-9]|*/c[1-9][0-9])
17499                 { echo "$as_me:17499: WARNING: replacing broken compiler alias $CC" >&5
17500 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17501                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17502                 CC=clang
17503                 ;;
17504         esac
17505
17506         echo "$as_me:17506: checking version of $CC" >&5
17507 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17508         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.].*//'`"
17509         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17510         echo "$as_me:17510: result: $CLANG_VERSION" >&5
17511 echo "${ECHO_T}$CLANG_VERSION" >&6
17512
17513         for cf_clang_opt in \
17514                 -Qunused-arguments \
17515                 -Wno-error=implicit-function-declaration
17516         do
17517                 echo "$as_me:17517: checking if option $cf_clang_opt works" >&5
17518 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17519                 cf_save_CFLAGS="$CFLAGS"
17520                 CFLAGS="$CFLAGS $cf_clang_opt"
17521                 cat >"conftest.$ac_ext" <<_ACEOF
17522 #line 17522 "configure"
17523 #include "confdefs.h"
17524
17525                         #include <stdio.h>
17526 int
17527 main (void)
17528 {
17529
17530                         printf("hello!\\n");
17531   ;
17532   return 0;
17533 }
17534 _ACEOF
17535 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17536 if { (eval echo "$as_me:17536: \"$ac_link\"") >&5
17537   (eval $ac_link) 2>&5
17538   ac_status=$?
17539   echo "$as_me:17539: \$? = $ac_status" >&5
17540   (exit "$ac_status"); } &&
17541          { ac_try='test -s "conftest$ac_exeext"'
17542   { (eval echo "$as_me:17542: \"$ac_try\"") >&5
17543   (eval $ac_try) 2>&5
17544   ac_status=$?
17545   echo "$as_me:17545: \$? = $ac_status" >&5
17546   (exit "$ac_status"); }; }; then
17547
17548                         cf_clang_optok=yes
17549 else
17550   echo "$as_me: failed program was:" >&5
17551 cat "conftest.$ac_ext" >&5
17552
17553                         cf_clang_optok=no
17554 fi
17555 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17556                 echo "$as_me:17556: result: $cf_clang_optok" >&5
17557 echo "${ECHO_T}$cf_clang_optok" >&6
17558                 CFLAGS="$cf_save_CFLAGS"
17559                 if test "$cf_clang_optok" = yes; then
17560                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17561
17562 echo "${as_me:-configure}:17562: testing adding option $cf_clang_opt ..." 1>&5
17563
17564         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17565         CFLAGS="${CFLAGS}$cf_clang_opt"
17566
17567                 fi
17568         done
17569 fi
17570
17571 ac_ext=cc
17572 ac_cpp='$CXXCPP $CPPFLAGS'
17573 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17574 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17575 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17576 ac_main_return="return"
17577
17578 cat > conftest.$ac_ext <<EOF
17579 #line 17579 "configure"
17580 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17581 EOF
17582
17583 if test "$INTEL_CPLUSPLUS" = yes
17584 then
17585 # The "-wdXXX" options suppress warnings:
17586 # remark #1419: external declaration in primary source file
17587 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17588 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17589 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17590 # remark #193: zero used for undefined preprocessing identifier
17591 # remark #593: variable "curs_sb_left_arrow" was set but never used
17592 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17593 # remark #869: parameter "tw" was never referenced
17594 # remark #981: operands are evaluated in unspecified order
17595 # warning #269: invalid format string conversion
17596
17597         { echo "$as_me:17597: checking for $CC warning options..." >&5
17598 echo "$as_me: checking for $CC warning options..." >&6;}
17599         cf_save_CXXFLAGS="$CXXFLAGS"
17600         EXTRA_CXXFLAGS="-Wall"
17601         for cf_opt in \
17602                 wd1419 \
17603                 wd1682 \
17604                 wd1683 \
17605                 wd1684 \
17606                 wd193 \
17607                 wd279 \
17608                 wd593 \
17609                 wd810 \
17610                 wd869 \
17611                 wd981
17612         do
17613                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17614                 if { (eval echo "$as_me:17614: \"$ac_compile\"") >&5
17615   (eval $ac_compile) 2>&5
17616   ac_status=$?
17617   echo "$as_me:17617: \$? = $ac_status" >&5
17618   (exit "$ac_status"); }; then
17619                         test -n "$verbose" && echo "$as_me:17619: result: ... -$cf_opt" >&5
17620 echo "${ECHO_T}... -$cf_opt" >&6
17621                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17622                 fi
17623         done
17624         CXXFLAGS="$cf_save_CXXFLAGS"
17625
17626 elif test "$GXX" = yes
17627 then
17628         { echo "$as_me:17628: checking for $CXX warning options..." >&5
17629 echo "$as_me: checking for $CXX warning options..." >&6;}
17630         cf_save_CXXFLAGS="$CXXFLAGS"
17631         EXTRA_CXXFLAGS="-W -Wall"
17632         cf_gxx_extra_warnings=""
17633         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17634         case "$GXX_VERSION" in
17635         ([1-2].*)
17636                 ;;
17637         (*)
17638                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17639                 ;;
17640         esac
17641         for cf_opt in \
17642                 Wabi \
17643                 fabi-version=0 \
17644                 Wextra \
17645                 Wignored-qualifiers \
17646                 Wlogical-op \
17647                 Woverloaded-virtual \
17648                 Wsign-promo \
17649                 Wsynth \
17650                 Wold-style-cast \
17651                 Wcast-align \
17652                 Wcast-qual \
17653                 Wpointer-arith \
17654                 Wshadow \
17655                 Wundef $cf_gxx_extra_warnings Wno-unused
17656         do
17657                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17658                 if { (eval echo "$as_me:17658: \"$ac_compile\"") >&5
17659   (eval $ac_compile) 2>&5
17660   ac_status=$?
17661   echo "$as_me:17661: \$? = $ac_status" >&5
17662   (exit "$ac_status"); }; then
17663                         test -n "$verbose" && echo "$as_me:17663: result: ... -$cf_opt" >&5
17664 echo "${ECHO_T}... -$cf_opt" >&6
17665                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17666                 else
17667                         test -n "$verbose" && echo "$as_me:17667: result: ... no -$cf_opt" >&5
17668 echo "${ECHO_T}... no -$cf_opt" >&6
17669                 fi
17670         done
17671         CXXFLAGS="$cf_save_CXXFLAGS"
17672 fi
17673
17674 rm -rf ./conftest*
17675 ac_ext=c
17676 ac_cpp='$CPP $CPPFLAGS'
17677 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17678 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17679 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17680 ac_main_return="return"
17681
17682         fi
17683 fi
17684
17685 echo "$as_me:17685: checking if you want to work around bogus compiler/loader warnings" >&5
17686 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17687
17688 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17689 if test "${enable_string_hacks+set}" = set; then
17690   enableval="$enable_string_hacks"
17691   enable_string_hacks=$enableval
17692 else
17693   enable_string_hacks=no
17694 fi;
17695 echo "$as_me:17695: result: $enable_string_hacks" >&5
17696 echo "${ECHO_T}$enable_string_hacks" >&6
17697
17698 if test "x$enable_string_hacks" = "xyes"; then
17699
17700 cat >>confdefs.h <<\EOF
17701 #define USE_STRING_HACKS 1
17702 EOF
17703
17704         { echo "$as_me:17704: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17705 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17706         echo "$as_me:17706: checking for strlcat" >&5
17707 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17708 if test "${ac_cv_func_strlcat+set}" = set; then
17709   echo $ECHO_N "(cached) $ECHO_C" >&6
17710 else
17711   cat >"conftest.$ac_ext" <<_ACEOF
17712 #line 17712 "configure"
17713 #include "confdefs.h"
17714 #define strlcat autoconf_temporary
17715 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17716 #undef strlcat
17717
17718 #ifdef __cplusplus
17719 extern "C"
17720 #endif
17721
17722 /* We use char because int might match the return type of a gcc2
17723    builtin and then its argument prototype would still apply.  */
17724 char strlcat (void);
17725
17726 int
17727 main (void)
17728 {
17729
17730 /* The GNU C library defines stubs for functions which it implements
17731     to always fail with ENOSYS.  Some functions are actually named
17732     something starting with __ and the normal name is an alias.  */
17733 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17734 #error found stub for strlcat
17735 #endif
17736
17737         return strlcat ();
17738   ;
17739   return 0;
17740 }
17741 _ACEOF
17742 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17743 if { (eval echo "$as_me:17743: \"$ac_link\"") >&5
17744   (eval $ac_link) 2>&5
17745   ac_status=$?
17746   echo "$as_me:17746: \$? = $ac_status" >&5
17747   (exit "$ac_status"); } &&
17748          { ac_try='test -s "conftest$ac_exeext"'
17749   { (eval echo "$as_me:17749: \"$ac_try\"") >&5
17750   (eval $ac_try) 2>&5
17751   ac_status=$?
17752   echo "$as_me:17752: \$? = $ac_status" >&5
17753   (exit "$ac_status"); }; }; then
17754   ac_cv_func_strlcat=yes
17755 else
17756   echo "$as_me: failed program was:" >&5
17757 cat "conftest.$ac_ext" >&5
17758 ac_cv_func_strlcat=no
17759 fi
17760 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17761 fi
17762 echo "$as_me:17762: result: $ac_cv_func_strlcat" >&5
17763 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17764 if test "$ac_cv_func_strlcat" = yes; then
17765
17766 cat >>confdefs.h <<\EOF
17767 #define HAVE_STRLCAT 1
17768 EOF
17769
17770 else
17771
17772                 echo "$as_me:17772: checking for strlcat in -lbsd" >&5
17773 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17774 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17775   echo $ECHO_N "(cached) $ECHO_C" >&6
17776 else
17777   ac_check_lib_save_LIBS=$LIBS
17778 LIBS="-lbsd  $LIBS"
17779 cat >"conftest.$ac_ext" <<_ACEOF
17780 #line 17780 "configure"
17781 #include "confdefs.h"
17782
17783 /* Override any gcc2 internal prototype to avoid an error.  */
17784 #ifdef __cplusplus
17785 extern "C"
17786 #endif
17787 /* We use char because int might match the return type of a gcc2
17788    builtin and then its argument prototype would still apply.  */
17789 char strlcat ();
17790 int
17791 main (void)
17792 {
17793 strlcat ();
17794   ;
17795   return 0;
17796 }
17797 _ACEOF
17798 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17799 if { (eval echo "$as_me:17799: \"$ac_link\"") >&5
17800   (eval $ac_link) 2>&5
17801   ac_status=$?
17802   echo "$as_me:17802: \$? = $ac_status" >&5
17803   (exit "$ac_status"); } &&
17804          { ac_try='test -s "conftest$ac_exeext"'
17805   { (eval echo "$as_me:17805: \"$ac_try\"") >&5
17806   (eval $ac_try) 2>&5
17807   ac_status=$?
17808   echo "$as_me:17808: \$? = $ac_status" >&5
17809   (exit "$ac_status"); }; }; then
17810   ac_cv_lib_bsd_strlcat=yes
17811 else
17812   echo "$as_me: failed program was:" >&5
17813 cat "conftest.$ac_ext" >&5
17814 ac_cv_lib_bsd_strlcat=no
17815 fi
17816 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17817 LIBS=$ac_check_lib_save_LIBS
17818 fi
17819 echo "$as_me:17819: result: $ac_cv_lib_bsd_strlcat" >&5
17820 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17821 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17822
17823 cf_add_libs="$LIBS"
17824 # reverse order
17825 cf_add_0lib=
17826 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17827 # filter duplicates
17828 for cf_add_1lib in $cf_add_0lib; do
17829         for cf_add_2lib in $cf_add_libs; do
17830                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17831                         cf_add_1lib=
17832                         break
17833                 fi
17834         done
17835         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17836 done
17837 LIBS="$cf_add_libs"
17838
17839 for ac_header in bsd/string.h
17840 do
17841 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17842 echo "$as_me:17842: checking for $ac_header" >&5
17843 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17844 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17845   echo $ECHO_N "(cached) $ECHO_C" >&6
17846 else
17847   cat >"conftest.$ac_ext" <<_ACEOF
17848 #line 17848 "configure"
17849 #include "confdefs.h"
17850 #include <$ac_header>
17851 _ACEOF
17852 if { (eval echo "$as_me:17852: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17853   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17854   ac_status=$?
17855   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17856   rm -f conftest.er1
17857   cat conftest.err >&5
17858   echo "$as_me:17858: \$? = $ac_status" >&5
17859   (exit "$ac_status"); } >/dev/null; then
17860   if test -s conftest.err; then
17861     ac_cpp_err=$ac_c_preproc_warn_flag
17862   else
17863     ac_cpp_err=
17864   fi
17865 else
17866   ac_cpp_err=yes
17867 fi
17868 if test -z "$ac_cpp_err"; then
17869   eval "$as_ac_Header=yes"
17870 else
17871   echo "$as_me: failed program was:" >&5
17872   cat "conftest.$ac_ext" >&5
17873   eval "$as_ac_Header=no"
17874 fi
17875 rm -f conftest.err "conftest.$ac_ext"
17876 fi
17877 echo "$as_me:17877: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17878 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17879 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17880   cat >>confdefs.h <<EOF
17881 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17882 EOF
17883
17884 fi
17885 done
17886
17887 cat >>confdefs.h <<\EOF
17888 #define HAVE_STRLCAT 1
17889 EOF
17890
17891 fi
17892
17893 fi
17894
17895 for ac_func in strlcpy snprintf
17896 do
17897 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17898 echo "$as_me:17898: checking for $ac_func" >&5
17899 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17900 if eval "test \"\${$as_ac_var+set}\" = set"; then
17901   echo $ECHO_N "(cached) $ECHO_C" >&6
17902 else
17903   cat >"conftest.$ac_ext" <<_ACEOF
17904 #line 17904 "configure"
17905 #include "confdefs.h"
17906 #define $ac_func autoconf_temporary
17907 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17908 #undef $ac_func
17909
17910 #ifdef __cplusplus
17911 extern "C"
17912 #endif
17913
17914 /* We use char because int might match the return type of a gcc2
17915    builtin and then its argument prototype would still apply.  */
17916 char $ac_func (void);
17917
17918 int
17919 main (void)
17920 {
17921
17922 /* The GNU C library defines stubs for functions which it implements
17923     to always fail with ENOSYS.  Some functions are actually named
17924     something starting with __ and the normal name is an alias.  */
17925 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17926 #error found stub for $ac_func
17927 #endif
17928
17929         return $ac_func ();
17930   ;
17931   return 0;
17932 }
17933 _ACEOF
17934 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17935 if { (eval echo "$as_me:17935: \"$ac_link\"") >&5
17936   (eval $ac_link) 2>&5
17937   ac_status=$?
17938   echo "$as_me:17938: \$? = $ac_status" >&5
17939   (exit "$ac_status"); } &&
17940          { ac_try='test -s "conftest$ac_exeext"'
17941   { (eval echo "$as_me:17941: \"$ac_try\"") >&5
17942   (eval $ac_try) 2>&5
17943   ac_status=$?
17944   echo "$as_me:17944: \$? = $ac_status" >&5
17945   (exit "$ac_status"); }; }; then
17946   eval "$as_ac_var=yes"
17947 else
17948   echo "$as_me: failed program was:" >&5
17949 cat "conftest.$ac_ext" >&5
17950 eval "$as_ac_var=no"
17951 fi
17952 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17953 fi
17954 echo "$as_me:17954: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17955 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17956 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17957   cat >>confdefs.h <<EOF
17958 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17959 EOF
17960
17961 fi
17962 done
17963
17964 fi
17965
17966 ###     use option --enable-assertions to turn on generation of assertion code
17967 echo "$as_me:17967: checking if you want to enable runtime assertions" >&5
17968 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17969
17970 # Check whether --enable-assertions or --disable-assertions was given.
17971 if test "${enable_assertions+set}" = set; then
17972   enableval="$enable_assertions"
17973   with_assertions=$enableval
17974 else
17975   with_assertions=no
17976 fi;
17977 echo "$as_me:17977: result: $with_assertions" >&5
17978 echo "${ECHO_T}$with_assertions" >&6
17979 if test -n "$GCC"
17980 then
17981         if test "$with_assertions" = no
17982         then
17983                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17984         else
17985
17986         ADAFLAGS="$ADAFLAGS -gnata"
17987
17988         fi
17989 fi
17990
17991 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17992
17993 echo "$as_me:17993: checking if you want to use dmalloc for testing" >&5
17994 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17995
17996 # Check whether --with-dmalloc or --without-dmalloc was given.
17997 if test "${with_dmalloc+set}" = set; then
17998   withval="$with_dmalloc"
17999   case "x$withval" in
18000         (x|xno) ;;
18001         (*)
18002                 : "${with_cflags:=-g}"
18003                 : "${enable_leaks:=no}"
18004                 with_dmalloc=yes
18005
18006 cat >>confdefs.h <<EOF
18007 #define USE_DMALLOC 1
18008 EOF
18009
18010                 ;;
18011         esac
18012 else
18013   with_dmalloc=
18014 fi;
18015 echo "$as_me:18015: result: ${with_dmalloc:-no}" >&5
18016 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18017
18018 case ".$with_cflags" in
18019 (.*-g*)
18020         case .$CFLAGS in
18021         (.*-g*)
18022                 ;;
18023         (*)
18024
18025 cf_fix_cppflags=no
18026 cf_new_cflags=
18027 cf_new_cppflags=
18028 cf_new_extra_cppflags=
18029
18030 for cf_add_cflags in -g
18031 do
18032 case "$cf_fix_cppflags" in
18033 (no)
18034         case "$cf_add_cflags" in
18035         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18036                 case "$cf_add_cflags" in
18037                 (-D*)
18038                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18039
18040                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18041                                 && test -z "${cf_tst_cflags}" \
18042                                 && cf_fix_cppflags=yes
18043
18044                         if test "$cf_fix_cppflags" = yes ; then
18045
18046         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18047         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18048
18049                                 continue
18050                         elif test "${cf_tst_cflags}" = "\"'" ; then
18051
18052         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18053         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18054
18055                                 continue
18056                         fi
18057                         ;;
18058                 esac
18059                 case "$CPPFLAGS" in
18060                 (*$cf_add_cflags)
18061                         ;;
18062                 (*)
18063                         case "$cf_add_cflags" in
18064                         (-D*)
18065                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18066
18067 CPPFLAGS=`echo "$CPPFLAGS" | \
18068         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18069                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18070
18071                                 ;;
18072                         esac
18073
18074         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18075         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18076
18077                         ;;
18078                 esac
18079                 ;;
18080         (*)
18081
18082         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18083         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18084
18085                 ;;
18086         esac
18087         ;;
18088 (yes)
18089
18090         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18091         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18092
18093         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18094
18095         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18096                 && test -z "${cf_tst_cflags}" \
18097                 && cf_fix_cppflags=no
18098         ;;
18099 esac
18100 done
18101
18102 if test -n "$cf_new_cflags" ; then
18103
18104         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18105         CFLAGS="${CFLAGS}$cf_new_cflags"
18106
18107 fi
18108
18109 if test -n "$cf_new_cppflags" ; then
18110
18111         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18112         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18113
18114 fi
18115
18116 if test -n "$cf_new_extra_cppflags" ; then
18117
18118         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18119         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18120
18121 fi
18122
18123                 ;;
18124         esac
18125         ;;
18126 esac
18127
18128 if test "$with_dmalloc" = yes ; then
18129         echo "$as_me:18129: checking for dmalloc.h" >&5
18130 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18131 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18132   echo $ECHO_N "(cached) $ECHO_C" >&6
18133 else
18134   cat >"conftest.$ac_ext" <<_ACEOF
18135 #line 18135 "configure"
18136 #include "confdefs.h"
18137 #include <dmalloc.h>
18138 _ACEOF
18139 if { (eval echo "$as_me:18139: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18140   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18141   ac_status=$?
18142   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18143   rm -f conftest.er1
18144   cat conftest.err >&5
18145   echo "$as_me:18145: \$? = $ac_status" >&5
18146   (exit "$ac_status"); } >/dev/null; then
18147   if test -s conftest.err; then
18148     ac_cpp_err=$ac_c_preproc_warn_flag
18149   else
18150     ac_cpp_err=
18151   fi
18152 else
18153   ac_cpp_err=yes
18154 fi
18155 if test -z "$ac_cpp_err"; then
18156   ac_cv_header_dmalloc_h=yes
18157 else
18158   echo "$as_me: failed program was:" >&5
18159   cat "conftest.$ac_ext" >&5
18160   ac_cv_header_dmalloc_h=no
18161 fi
18162 rm -f conftest.err "conftest.$ac_ext"
18163 fi
18164 echo "$as_me:18164: result: $ac_cv_header_dmalloc_h" >&5
18165 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18166 if test "$ac_cv_header_dmalloc_h" = yes; then
18167
18168 echo "$as_me:18168: checking for dmalloc_debug in -ldmalloc" >&5
18169 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18170 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18171   echo $ECHO_N "(cached) $ECHO_C" >&6
18172 else
18173   ac_check_lib_save_LIBS=$LIBS
18174 LIBS="-ldmalloc  $LIBS"
18175 cat >"conftest.$ac_ext" <<_ACEOF
18176 #line 18176 "configure"
18177 #include "confdefs.h"
18178
18179 /* Override any gcc2 internal prototype to avoid an error.  */
18180 #ifdef __cplusplus
18181 extern "C"
18182 #endif
18183 /* We use char because int might match the return type of a gcc2
18184    builtin and then its argument prototype would still apply.  */
18185 char dmalloc_debug ();
18186 int
18187 main (void)
18188 {
18189 dmalloc_debug ();
18190   ;
18191   return 0;
18192 }
18193 _ACEOF
18194 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18195 if { (eval echo "$as_me:18195: \"$ac_link\"") >&5
18196   (eval $ac_link) 2>&5
18197   ac_status=$?
18198   echo "$as_me:18198: \$? = $ac_status" >&5
18199   (exit "$ac_status"); } &&
18200          { ac_try='test -s "conftest$ac_exeext"'
18201   { (eval echo "$as_me:18201: \"$ac_try\"") >&5
18202   (eval $ac_try) 2>&5
18203   ac_status=$?
18204   echo "$as_me:18204: \$? = $ac_status" >&5
18205   (exit "$ac_status"); }; }; then
18206   ac_cv_lib_dmalloc_dmalloc_debug=yes
18207 else
18208   echo "$as_me: failed program was:" >&5
18209 cat "conftest.$ac_ext" >&5
18210 ac_cv_lib_dmalloc_dmalloc_debug=no
18211 fi
18212 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18213 LIBS=$ac_check_lib_save_LIBS
18214 fi
18215 echo "$as_me:18215: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18216 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18217 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18218   cat >>confdefs.h <<EOF
18219 #define HAVE_LIBDMALLOC 1
18220 EOF
18221
18222   LIBS="-ldmalloc $LIBS"
18223
18224 fi
18225
18226 fi
18227
18228 fi
18229
18230 echo "$as_me:18230: checking if you want to use dbmalloc for testing" >&5
18231 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18232
18233 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18234 if test "${with_dbmalloc+set}" = set; then
18235   withval="$with_dbmalloc"
18236   case "x$withval" in
18237         (x|xno) ;;
18238         (*)
18239                 : "${with_cflags:=-g}"
18240                 : "${enable_leaks:=no}"
18241                 with_dbmalloc=yes
18242
18243 cat >>confdefs.h <<EOF
18244 #define USE_DBMALLOC 1
18245 EOF
18246
18247                 ;;
18248         esac
18249 else
18250   with_dbmalloc=
18251 fi;
18252 echo "$as_me:18252: result: ${with_dbmalloc:-no}" >&5
18253 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18254
18255 case ".$with_cflags" in
18256 (.*-g*)
18257         case .$CFLAGS in
18258         (.*-g*)
18259                 ;;
18260         (*)
18261
18262 cf_fix_cppflags=no
18263 cf_new_cflags=
18264 cf_new_cppflags=
18265 cf_new_extra_cppflags=
18266
18267 for cf_add_cflags in -g
18268 do
18269 case "$cf_fix_cppflags" in
18270 (no)
18271         case "$cf_add_cflags" in
18272         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18273                 case "$cf_add_cflags" in
18274                 (-D*)
18275                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18276
18277                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18278                                 && test -z "${cf_tst_cflags}" \
18279                                 && cf_fix_cppflags=yes
18280
18281                         if test "$cf_fix_cppflags" = yes ; then
18282
18283         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18284         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18285
18286                                 continue
18287                         elif test "${cf_tst_cflags}" = "\"'" ; then
18288
18289         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18290         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18291
18292                                 continue
18293                         fi
18294                         ;;
18295                 esac
18296                 case "$CPPFLAGS" in
18297                 (*$cf_add_cflags)
18298                         ;;
18299                 (*)
18300                         case "$cf_add_cflags" in
18301                         (-D*)
18302                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18303
18304 CPPFLAGS=`echo "$CPPFLAGS" | \
18305         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18306                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18307
18308                                 ;;
18309                         esac
18310
18311         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18312         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18313
18314                         ;;
18315                 esac
18316                 ;;
18317         (*)
18318
18319         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18320         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18321
18322                 ;;
18323         esac
18324         ;;
18325 (yes)
18326
18327         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18328         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18329
18330         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18331
18332         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18333                 && test -z "${cf_tst_cflags}" \
18334                 && cf_fix_cppflags=no
18335         ;;
18336 esac
18337 done
18338
18339 if test -n "$cf_new_cflags" ; then
18340
18341         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18342         CFLAGS="${CFLAGS}$cf_new_cflags"
18343
18344 fi
18345
18346 if test -n "$cf_new_cppflags" ; then
18347
18348         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18349         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18350
18351 fi
18352
18353 if test -n "$cf_new_extra_cppflags" ; then
18354
18355         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18356         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18357
18358 fi
18359
18360                 ;;
18361         esac
18362         ;;
18363 esac
18364
18365 if test "$with_dbmalloc" = yes ; then
18366         echo "$as_me:18366: checking for dbmalloc.h" >&5
18367 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18368 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18369   echo $ECHO_N "(cached) $ECHO_C" >&6
18370 else
18371   cat >"conftest.$ac_ext" <<_ACEOF
18372 #line 18372 "configure"
18373 #include "confdefs.h"
18374 #include <dbmalloc.h>
18375 _ACEOF
18376 if { (eval echo "$as_me:18376: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18377   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18378   ac_status=$?
18379   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18380   rm -f conftest.er1
18381   cat conftest.err >&5
18382   echo "$as_me:18382: \$? = $ac_status" >&5
18383   (exit "$ac_status"); } >/dev/null; then
18384   if test -s conftest.err; then
18385     ac_cpp_err=$ac_c_preproc_warn_flag
18386   else
18387     ac_cpp_err=
18388   fi
18389 else
18390   ac_cpp_err=yes
18391 fi
18392 if test -z "$ac_cpp_err"; then
18393   ac_cv_header_dbmalloc_h=yes
18394 else
18395   echo "$as_me: failed program was:" >&5
18396   cat "conftest.$ac_ext" >&5
18397   ac_cv_header_dbmalloc_h=no
18398 fi
18399 rm -f conftest.err "conftest.$ac_ext"
18400 fi
18401 echo "$as_me:18401: result: $ac_cv_header_dbmalloc_h" >&5
18402 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18403 if test "$ac_cv_header_dbmalloc_h" = yes; then
18404
18405 echo "$as_me:18405: checking for debug_malloc in -ldbmalloc" >&5
18406 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18407 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18408   echo $ECHO_N "(cached) $ECHO_C" >&6
18409 else
18410   ac_check_lib_save_LIBS=$LIBS
18411 LIBS="-ldbmalloc  $LIBS"
18412 cat >"conftest.$ac_ext" <<_ACEOF
18413 #line 18413 "configure"
18414 #include "confdefs.h"
18415
18416 /* Override any gcc2 internal prototype to avoid an error.  */
18417 #ifdef __cplusplus
18418 extern "C"
18419 #endif
18420 /* We use char because int might match the return type of a gcc2
18421    builtin and then its argument prototype would still apply.  */
18422 char debug_malloc ();
18423 int
18424 main (void)
18425 {
18426 debug_malloc ();
18427   ;
18428   return 0;
18429 }
18430 _ACEOF
18431 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18432 if { (eval echo "$as_me:18432: \"$ac_link\"") >&5
18433   (eval $ac_link) 2>&5
18434   ac_status=$?
18435   echo "$as_me:18435: \$? = $ac_status" >&5
18436   (exit "$ac_status"); } &&
18437          { ac_try='test -s "conftest$ac_exeext"'
18438   { (eval echo "$as_me:18438: \"$ac_try\"") >&5
18439   (eval $ac_try) 2>&5
18440   ac_status=$?
18441   echo "$as_me:18441: \$? = $ac_status" >&5
18442   (exit "$ac_status"); }; }; then
18443   ac_cv_lib_dbmalloc_debug_malloc=yes
18444 else
18445   echo "$as_me: failed program was:" >&5
18446 cat "conftest.$ac_ext" >&5
18447 ac_cv_lib_dbmalloc_debug_malloc=no
18448 fi
18449 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18450 LIBS=$ac_check_lib_save_LIBS
18451 fi
18452 echo "$as_me:18452: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18453 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18454 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18455   cat >>confdefs.h <<EOF
18456 #define HAVE_LIBDBMALLOC 1
18457 EOF
18458
18459   LIBS="-ldbmalloc $LIBS"
18460
18461 fi
18462
18463 fi
18464
18465 fi
18466
18467 echo "$as_me:18467: checking if you want to use valgrind for testing" >&5
18468 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18469
18470 # Check whether --with-valgrind or --without-valgrind was given.
18471 if test "${with_valgrind+set}" = set; then
18472   withval="$with_valgrind"
18473   case "x$withval" in
18474         (x|xno) ;;
18475         (*)
18476                 : "${with_cflags:=-g}"
18477                 : "${enable_leaks:=no}"
18478                 with_valgrind=yes
18479
18480 cat >>confdefs.h <<EOF
18481 #define USE_VALGRIND 1
18482 EOF
18483
18484                 ;;
18485         esac
18486 else
18487   with_valgrind=
18488 fi;
18489 echo "$as_me:18489: result: ${with_valgrind:-no}" >&5
18490 echo "${ECHO_T}${with_valgrind:-no}" >&6
18491
18492 case ".$with_cflags" in
18493 (.*-g*)
18494         case .$CFLAGS in
18495         (.*-g*)
18496                 ;;
18497         (*)
18498
18499 cf_fix_cppflags=no
18500 cf_new_cflags=
18501 cf_new_cppflags=
18502 cf_new_extra_cppflags=
18503
18504 for cf_add_cflags in -g
18505 do
18506 case "$cf_fix_cppflags" in
18507 (no)
18508         case "$cf_add_cflags" in
18509         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18510                 case "$cf_add_cflags" in
18511                 (-D*)
18512                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18513
18514                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18515                                 && test -z "${cf_tst_cflags}" \
18516                                 && cf_fix_cppflags=yes
18517
18518                         if test "$cf_fix_cppflags" = yes ; then
18519
18520         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18521         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18522
18523                                 continue
18524                         elif test "${cf_tst_cflags}" = "\"'" ; then
18525
18526         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18527         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18528
18529                                 continue
18530                         fi
18531                         ;;
18532                 esac
18533                 case "$CPPFLAGS" in
18534                 (*$cf_add_cflags)
18535                         ;;
18536                 (*)
18537                         case "$cf_add_cflags" in
18538                         (-D*)
18539                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18540
18541 CPPFLAGS=`echo "$CPPFLAGS" | \
18542         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18543                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18544
18545                                 ;;
18546                         esac
18547
18548         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18549         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18550
18551                         ;;
18552                 esac
18553                 ;;
18554         (*)
18555
18556         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18557         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18558
18559                 ;;
18560         esac
18561         ;;
18562 (yes)
18563
18564         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18565         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18566
18567         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18568
18569         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18570                 && test -z "${cf_tst_cflags}" \
18571                 && cf_fix_cppflags=no
18572         ;;
18573 esac
18574 done
18575
18576 if test -n "$cf_new_cflags" ; then
18577
18578         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18579         CFLAGS="${CFLAGS}$cf_new_cflags"
18580
18581 fi
18582
18583 if test -n "$cf_new_cppflags" ; then
18584
18585         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18586         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18587
18588 fi
18589
18590 if test -n "$cf_new_extra_cppflags" ; then
18591
18592         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18593         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18594
18595 fi
18596
18597                 ;;
18598         esac
18599         ;;
18600 esac
18601
18602 echo "$as_me:18602: checking if you want to perform memory-leak testing" >&5
18603 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18604
18605 # Check whether --enable-leaks or --disable-leaks was given.
18606 if test "${enable_leaks+set}" = set; then
18607   enableval="$enable_leaks"
18608   enable_leaks=$enableval
18609 else
18610   enable_leaks=yes
18611 fi;
18612 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18613 echo "$as_me:18613: result: $with_no_leaks" >&5
18614 echo "${ECHO_T}$with_no_leaks" >&6
18615
18616 if test "$enable_leaks" = no ; then
18617
18618 cat >>confdefs.h <<\EOF
18619 #define NO_LEAKS 1
18620 EOF
18621
18622 cat >>confdefs.h <<\EOF
18623 #define YY_NO_LEAKS 1
18624 EOF
18625
18626 fi
18627
18628 cat >>confdefs.h <<\EOF
18629 #define HAVE_NC_ALLOC_H 1
18630 EOF
18631
18632 ###     use option --enable-expanded to generate certain macros as functions
18633
18634 # Check whether --enable-expanded or --disable-expanded was given.
18635 if test "${enable_expanded+set}" = set; then
18636   enableval="$enable_expanded"
18637   test "x$enableval" = xyes &&
18638 cat >>confdefs.h <<\EOF
18639 #define NCURSES_EXPANDED 1
18640 EOF
18641
18642 fi;
18643
18644 ###     use option --disable-macros to suppress macros in favor of functions
18645
18646 # Check whether --enable-macros or --disable-macros was given.
18647 if test "${enable_macros+set}" = set; then
18648   enableval="$enable_macros"
18649   test "$enableval" = no &&
18650 cat >>confdefs.h <<\EOF
18651 #define NCURSES_NOMACROS 1
18652 EOF
18653
18654 fi;
18655
18656 # Normally we only add trace() to the debug-library.  Allow this to be
18657 # extended to all models of the ncurses library:
18658 cf_all_traces=no
18659 case "$CFLAGS $CPPFLAGS" in
18660 (*-DTRACE*)
18661         cf_all_traces=yes
18662         ;;
18663 esac
18664
18665 echo "$as_me:18665: checking whether to add trace feature to all models" >&5
18666 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18667
18668 # Check whether --with-trace or --without-trace was given.
18669 if test "${with_trace+set}" = set; then
18670   withval="$with_trace"
18671   cf_with_trace=$withval
18672 else
18673   cf_with_trace=$cf_all_traces
18674 fi;
18675 echo "$as_me:18675: result: $cf_with_trace" >&5
18676 echo "${ECHO_T}$cf_with_trace" >&6
18677
18678 if test "x$cf_with_trace" = xyes ; then
18679         LIB_TRACING=all
18680         ADA_TRACE=TRUE
18681
18682 cf_fix_cppflags=no
18683 cf_new_cflags=
18684 cf_new_cppflags=
18685 cf_new_extra_cppflags=
18686
18687 for cf_add_cflags in -DTRACE
18688 do
18689 case "$cf_fix_cppflags" in
18690 (no)
18691         case "$cf_add_cflags" in
18692         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18693                 case "$cf_add_cflags" in
18694                 (-D*)
18695                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18696
18697                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18698                                 && test -z "${cf_tst_cflags}" \
18699                                 && cf_fix_cppflags=yes
18700
18701                         if test "$cf_fix_cppflags" = yes ; then
18702
18703         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18704         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18705
18706                                 continue
18707                         elif test "${cf_tst_cflags}" = "\"'" ; then
18708
18709         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18710         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18711
18712                                 continue
18713                         fi
18714                         ;;
18715                 esac
18716                 case "$CPPFLAGS" in
18717                 (*$cf_add_cflags)
18718                         ;;
18719                 (*)
18720                         case "$cf_add_cflags" in
18721                         (-D*)
18722                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18723
18724 CPPFLAGS=`echo "$CPPFLAGS" | \
18725         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18726                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18727
18728                                 ;;
18729                         esac
18730
18731         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18732         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18733
18734                         ;;
18735                 esac
18736                 ;;
18737         (*)
18738
18739         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18740         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18741
18742                 ;;
18743         esac
18744         ;;
18745 (yes)
18746
18747         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18748         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18749
18750         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18751
18752         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18753                 && test -z "${cf_tst_cflags}" \
18754                 && cf_fix_cppflags=no
18755         ;;
18756 esac
18757 done
18758
18759 if test -n "$cf_new_cflags" ; then
18760
18761         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18762         CFLAGS="${CFLAGS}$cf_new_cflags"
18763
18764 fi
18765
18766 if test -n "$cf_new_cppflags" ; then
18767
18768         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18769         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18770
18771 fi
18772
18773 if test -n "$cf_new_extra_cppflags" ; then
18774
18775         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18776         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18777
18778 fi
18779
18780 cat >>confdefs.h <<\EOF
18781 #define HAVE__TRACEF 1
18782 EOF
18783
18784 else
18785         LIB_TRACING=DEBUG
18786         ADA_TRACE=FALSE
18787 fi
18788
18789 echo "$as_me:18789: checking if we want to use GNAT projects" >&5
18790 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18791
18792 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18793 if test "${enable_gnat_projects+set}" = set; then
18794   enableval="$enable_gnat_projects"
18795   test "$enableval" != no && enableval=yes
18796         if test "$enableval" != "yes" ; then
18797     enable_gnat_projects=no
18798         else
18799                 enable_gnat_projects=yes
18800         fi
18801 else
18802   enableval=yes
18803         enable_gnat_projects=yes
18804
18805 fi;
18806 echo "$as_me:18806: result: $enable_gnat_projects" >&5
18807 echo "${ECHO_T}$enable_gnat_projects" >&6
18808
18809 ###     Checks for libraries.
18810 case "$cf_cv_system_name" in
18811 (*mingw32*|*mingw64*)
18812         # Note: WINVER may be a problem with Windows 10
18813         if test "x$with_exp_win32" = xyes ; then
18814                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18815         else
18816                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18817         fi
18818
18819 echo "$as_me:18819: checking if ssp library is needed" >&5
18820 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
18821 if test "${cf_cv_need_libssp+set}" = set; then
18822   echo $ECHO_N "(cached) $ECHO_C" >&6
18823 else
18824
18825 cat >"conftest.$ac_ext" <<_ACEOF
18826 #line 18826 "configure"
18827 #include "confdefs.h"
18828
18829 #include <sys/types.h>
18830 #include <dirent.h>
18831
18832 int
18833 main (void)
18834 {
18835
18836        DIR *dp = opendir(".");
18837
18838   ;
18839   return 0;
18840 }
18841 _ACEOF
18842 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18843 if { (eval echo "$as_me:18843: \"$ac_link\"") >&5
18844   (eval $ac_link) 2>&5
18845   ac_status=$?
18846   echo "$as_me:18846: \$? = $ac_status" >&5
18847   (exit "$ac_status"); } &&
18848          { ac_try='test -s "conftest$ac_exeext"'
18849   { (eval echo "$as_me:18849: \"$ac_try\"") >&5
18850   (eval $ac_try) 2>&5
18851   ac_status=$?
18852   echo "$as_me:18852: \$? = $ac_status" >&5
18853   (exit "$ac_status"); }; }; then
18854   cf_cv_need_libssp=no
18855 else
18856   echo "$as_me: failed program was:" >&5
18857 cat "conftest.$ac_ext" >&5
18858
18859         cf_save_LIBS="$LIBS"
18860         LIBS="$LIBS -lssp"
18861         cat >"conftest.$ac_ext" <<_ACEOF
18862 #line 18862 "configure"
18863 #include "confdefs.h"
18864
18865 #include <sys/types.h>
18866 #include <dirent.h>
18867
18868 int
18869 main (void)
18870 {
18871
18872                    DIR *dp = opendir(".");
18873
18874   ;
18875   return 0;
18876 }
18877 _ACEOF
18878 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18879 if { (eval echo "$as_me:18879: \"$ac_link\"") >&5
18880   (eval $ac_link) 2>&5
18881   ac_status=$?
18882   echo "$as_me:18882: \$? = $ac_status" >&5
18883   (exit "$ac_status"); } &&
18884          { ac_try='test -s "conftest$ac_exeext"'
18885   { (eval echo "$as_me:18885: \"$ac_try\"") >&5
18886   (eval $ac_try) 2>&5
18887   ac_status=$?
18888   echo "$as_me:18888: \$? = $ac_status" >&5
18889   (exit "$ac_status"); }; }; then
18890   cf_cv_need_libssp=yes
18891 else
18892   echo "$as_me: failed program was:" >&5
18893 cat "conftest.$ac_ext" >&5
18894 cf_cv_need_libssp=maybe
18895 fi
18896 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18897         LIBS="$cf_save_LIBS"
18898
18899 fi
18900 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18901 fi
18902 echo "$as_me:18902: result: $cf_cv_need_libssp" >&5
18903 echo "${ECHO_T}$cf_cv_need_libssp" >&6
18904
18905 if test "x$cf_cv_need_libssp" = xyes
18906 then
18907
18908 cf_add_libs="$LIBS"
18909 # reverse order
18910 cf_add_0lib=
18911 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18912 # filter duplicates
18913 for cf_add_1lib in $cf_add_0lib; do
18914         for cf_add_2lib in $cf_add_libs; do
18915                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18916                         cf_add_1lib=
18917                         break
18918                 fi
18919         done
18920         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18921 done
18922 LIBS="$cf_add_libs"
18923
18924 fi
18925
18926         ;;
18927 (*)
18928 echo "$as_me:18928: checking for gettimeofday" >&5
18929 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18930 if test "${ac_cv_func_gettimeofday+set}" = set; then
18931   echo $ECHO_N "(cached) $ECHO_C" >&6
18932 else
18933   cat >"conftest.$ac_ext" <<_ACEOF
18934 #line 18934 "configure"
18935 #include "confdefs.h"
18936 #define gettimeofday autoconf_temporary
18937 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18938 #undef gettimeofday
18939
18940 #ifdef __cplusplus
18941 extern "C"
18942 #endif
18943
18944 /* We use char because int might match the return type of a gcc2
18945    builtin and then its argument prototype would still apply.  */
18946 char gettimeofday (void);
18947
18948 int
18949 main (void)
18950 {
18951
18952 /* The GNU C library defines stubs for functions which it implements
18953     to always fail with ENOSYS.  Some functions are actually named
18954     something starting with __ and the normal name is an alias.  */
18955 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18956 #error found stub for gettimeofday
18957 #endif
18958
18959         return gettimeofday ();
18960   ;
18961   return 0;
18962 }
18963 _ACEOF
18964 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18965 if { (eval echo "$as_me:18965: \"$ac_link\"") >&5
18966   (eval $ac_link) 2>&5
18967   ac_status=$?
18968   echo "$as_me:18968: \$? = $ac_status" >&5
18969   (exit "$ac_status"); } &&
18970          { ac_try='test -s "conftest$ac_exeext"'
18971   { (eval echo "$as_me:18971: \"$ac_try\"") >&5
18972   (eval $ac_try) 2>&5
18973   ac_status=$?
18974   echo "$as_me:18974: \$? = $ac_status" >&5
18975   (exit "$ac_status"); }; }; then
18976   ac_cv_func_gettimeofday=yes
18977 else
18978   echo "$as_me: failed program was:" >&5
18979 cat "conftest.$ac_ext" >&5
18980 ac_cv_func_gettimeofday=no
18981 fi
18982 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18983 fi
18984 echo "$as_me:18984: result: $ac_cv_func_gettimeofday" >&5
18985 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18986 if test "$ac_cv_func_gettimeofday" = yes; then
18987
18988 cat >>confdefs.h <<\EOF
18989 #define HAVE_GETTIMEOFDAY 1
18990 EOF
18991
18992 else
18993
18994 echo "$as_me:18994: checking for gettimeofday in -lbsd" >&5
18995 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18996 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18997   echo $ECHO_N "(cached) $ECHO_C" >&6
18998 else
18999   ac_check_lib_save_LIBS=$LIBS
19000 LIBS="-lbsd  $LIBS"
19001 cat >"conftest.$ac_ext" <<_ACEOF
19002 #line 19002 "configure"
19003 #include "confdefs.h"
19004
19005 /* Override any gcc2 internal prototype to avoid an error.  */
19006 #ifdef __cplusplus
19007 extern "C"
19008 #endif
19009 /* We use char because int might match the return type of a gcc2
19010    builtin and then its argument prototype would still apply.  */
19011 char gettimeofday ();
19012 int
19013 main (void)
19014 {
19015 gettimeofday ();
19016   ;
19017   return 0;
19018 }
19019 _ACEOF
19020 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19021 if { (eval echo "$as_me:19021: \"$ac_link\"") >&5
19022   (eval $ac_link) 2>&5
19023   ac_status=$?
19024   echo "$as_me:19024: \$? = $ac_status" >&5
19025   (exit "$ac_status"); } &&
19026          { ac_try='test -s "conftest$ac_exeext"'
19027   { (eval echo "$as_me:19027: \"$ac_try\"") >&5
19028   (eval $ac_try) 2>&5
19029   ac_status=$?
19030   echo "$as_me:19030: \$? = $ac_status" >&5
19031   (exit "$ac_status"); }; }; then
19032   ac_cv_lib_bsd_gettimeofday=yes
19033 else
19034   echo "$as_me: failed program was:" >&5
19035 cat "conftest.$ac_ext" >&5
19036 ac_cv_lib_bsd_gettimeofday=no
19037 fi
19038 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19039 LIBS=$ac_check_lib_save_LIBS
19040 fi
19041 echo "$as_me:19041: result: $ac_cv_lib_bsd_gettimeofday" >&5
19042 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
19043 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
19044
19045 cat >>confdefs.h <<\EOF
19046 #define HAVE_GETTIMEOFDAY 1
19047 EOF
19048
19049 cf_add_libs="$LIBS"
19050 # reverse order
19051 cf_add_0lib=
19052 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19053 # filter duplicates
19054 for cf_add_1lib in $cf_add_0lib; do
19055         for cf_add_2lib in $cf_add_libs; do
19056                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19057                         cf_add_1lib=
19058                         break
19059                 fi
19060         done
19061         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19062 done
19063 LIBS="$cf_add_libs"
19064
19065 fi
19066
19067 fi
19068         ;;
19069 esac
19070
19071 echo "$as_me:19071: checking if -lm needed for math functions" >&5
19072 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19073 if test "${cf_cv_need_libm+set}" = set; then
19074   echo $ECHO_N "(cached) $ECHO_C" >&6
19075 else
19076
19077         cat >"conftest.$ac_ext" <<_ACEOF
19078 #line 19078 "configure"
19079 #include "confdefs.h"
19080
19081                 #include <stdio.h>
19082                 #include <stdlib.h>
19083                 #include <math.h>
19084
19085 int
19086 main (void)
19087 {
19088 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19089   ;
19090   return 0;
19091 }
19092 _ACEOF
19093 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19094 if { (eval echo "$as_me:19094: \"$ac_link\"") >&5
19095   (eval $ac_link) 2>&5
19096   ac_status=$?
19097   echo "$as_me:19097: \$? = $ac_status" >&5
19098   (exit "$ac_status"); } &&
19099          { ac_try='test -s "conftest$ac_exeext"'
19100   { (eval echo "$as_me:19100: \"$ac_try\"") >&5
19101   (eval $ac_try) 2>&5
19102   ac_status=$?
19103   echo "$as_me:19103: \$? = $ac_status" >&5
19104   (exit "$ac_status"); }; }; then
19105   cf_cv_need_libm=no
19106 else
19107   echo "$as_me: failed program was:" >&5
19108 cat "conftest.$ac_ext" >&5
19109 cf_cv_need_libm=yes
19110 fi
19111 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19112 fi
19113 echo "$as_me:19113: result: $cf_cv_need_libm" >&5
19114 echo "${ECHO_T}$cf_cv_need_libm" >&6
19115
19116 if test "$cf_cv_need_libm" = yes
19117 then
19118
19119         cf_save_LIBS="$LIBS"
19120         LIBS="$LIBS -lm"
19121         echo "$as_me:19121: checking if -lm is available for math functions" >&5
19122 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19123 if test "${cf_cv_have_libm+set}" = set; then
19124   echo $ECHO_N "(cached) $ECHO_C" >&6
19125 else
19126
19127         cat >"conftest.$ac_ext" <<_ACEOF
19128 #line 19128 "configure"
19129 #include "confdefs.h"
19130
19131                 #include <stdio.h>
19132                 #include <stdlib.h>
19133                 #include <math.h>
19134
19135 int
19136 main (void)
19137 {
19138 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19139   ;
19140   return 0;
19141 }
19142 _ACEOF
19143 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19144 if { (eval echo "$as_me:19144: \"$ac_link\"") >&5
19145   (eval $ac_link) 2>&5
19146   ac_status=$?
19147   echo "$as_me:19147: \$? = $ac_status" >&5
19148   (exit "$ac_status"); } &&
19149          { ac_try='test -s "conftest$ac_exeext"'
19150   { (eval echo "$as_me:19150: \"$ac_try\"") >&5
19151   (eval $ac_try) 2>&5
19152   ac_status=$?
19153   echo "$as_me:19153: \$? = $ac_status" >&5
19154   (exit "$ac_status"); }; }; then
19155   cf_cv_have_libm=yes
19156 else
19157   echo "$as_me: failed program was:" >&5
19158 cat "conftest.$ac_ext" >&5
19159 cf_cv_have_libm=no
19160 fi
19161 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19162 fi
19163 echo "$as_me:19163: result: $cf_cv_have_libm" >&5
19164 echo "${ECHO_T}$cf_cv_have_libm" >&6
19165         LIBS="$cf_save_LIBS"
19166
19167         if test "$cf_cv_have_libm" = yes
19168         then
19169                 MATH_LIB=-lm
19170         fi
19171 else
19172         cf_cv_have_libm=yes
19173 fi
19174
19175 if test "$cf_cv_have_libm" = yes
19176 then
19177
19178 cat >>confdefs.h <<\EOF
19179 #define HAVE_MATH_FUNCS 1
19180 EOF
19181
19182 fi
19183
19184 ###     Checks for header files.
19185 echo "$as_me:19185: checking for ANSI C header files" >&5
19186 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
19187 if test "${ac_cv_header_stdc+set}" = set; then
19188   echo $ECHO_N "(cached) $ECHO_C" >&6
19189 else
19190   cat >"conftest.$ac_ext" <<_ACEOF
19191 #line 19191 "configure"
19192 #include "confdefs.h"
19193 #include <stdlib.h>
19194 #include <stdarg.h>
19195 #include <string.h>
19196 #include <float.h>
19197
19198 _ACEOF
19199 if { (eval echo "$as_me:19199: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19200   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19201   ac_status=$?
19202   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19203   rm -f conftest.er1
19204   cat conftest.err >&5
19205   echo "$as_me:19205: \$? = $ac_status" >&5
19206   (exit "$ac_status"); } >/dev/null; then
19207   if test -s conftest.err; then
19208     ac_cpp_err=$ac_c_preproc_warn_flag
19209   else
19210     ac_cpp_err=
19211   fi
19212 else
19213   ac_cpp_err=yes
19214 fi
19215 if test -z "$ac_cpp_err"; then
19216   ac_cv_header_stdc=yes
19217 else
19218   echo "$as_me: failed program was:" >&5
19219   cat "conftest.$ac_ext" >&5
19220   ac_cv_header_stdc=no
19221 fi
19222 rm -f conftest.err "conftest.$ac_ext"
19223
19224 if test $ac_cv_header_stdc = yes; then
19225   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
19226   cat >"conftest.$ac_ext" <<_ACEOF
19227 #line 19227 "configure"
19228 #include "confdefs.h"
19229 #include <string.h>
19230
19231 _ACEOF
19232 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19233   $EGREP "memchr" >/dev/null 2>&1; then
19234   :
19235 else
19236   ac_cv_header_stdc=no
19237 fi
19238 rm -rf conftest*
19239
19240 fi
19241
19242 if test $ac_cv_header_stdc = yes; then
19243   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
19244   cat >"conftest.$ac_ext" <<_ACEOF
19245 #line 19245 "configure"
19246 #include "confdefs.h"
19247 #include <stdlib.h>
19248
19249 _ACEOF
19250 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19251   $EGREP "free" >/dev/null 2>&1; then
19252   :
19253 else
19254   ac_cv_header_stdc=no
19255 fi
19256 rm -rf conftest*
19257
19258 fi
19259
19260 if test $ac_cv_header_stdc = yes; then
19261   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
19262   if test "$cross_compiling" = yes; then
19263   :
19264 else
19265   cat >"conftest.$ac_ext" <<_ACEOF
19266 #line 19266 "configure"
19267 #include "confdefs.h"
19268 #include <ctype.h>
19269 #if ((' ' & 0x0FF) == 0x020)
19270 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
19271 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
19272 #else
19273 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
19274                      || ('j' <= (c) && (c) <= 'r') \
19275                      || ('s' <= (c) && (c) <= 'z'))
19276 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
19277 #endif
19278
19279 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
19280 int
19281 main (void)
19282 {
19283   int i;
19284   for (i = 0; i < 256; i++)
19285     if (XOR (islower (i), ISLOWER (i))
19286         || toupper (i) != TOUPPER (i))
19287       $ac_main_return(2);
19288   $ac_main_return (0);
19289 }
19290 _ACEOF
19291 rm -f "conftest$ac_exeext"
19292 if { (eval echo "$as_me:19292: \"$ac_link\"") >&5
19293   (eval $ac_link) 2>&5
19294   ac_status=$?
19295   echo "$as_me:19295: \$? = $ac_status" >&5
19296   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19297   { (eval echo "$as_me:19297: \"$ac_try\"") >&5
19298   (eval $ac_try) 2>&5
19299   ac_status=$?
19300   echo "$as_me:19300: \$? = $ac_status" >&5
19301   (exit "$ac_status"); }; }; then
19302   :
19303 else
19304   echo "$as_me: program exited with status $ac_status" >&5
19305 echo "$as_me: failed program was:" >&5
19306 cat "conftest.$ac_ext" >&5
19307 ac_cv_header_stdc=no
19308 fi
19309 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19310 fi
19311 fi
19312 fi
19313 echo "$as_me:19313: result: $ac_cv_header_stdc" >&5
19314 echo "${ECHO_T}$ac_cv_header_stdc" >&6
19315 if test $ac_cv_header_stdc = yes; then
19316
19317 cat >>confdefs.h <<\EOF
19318 #define STDC_HEADERS 1
19319 EOF
19320
19321 fi
19322
19323 ac_header_dirent=no
19324 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
19325   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
19326 echo "$as_me:19326: checking for $ac_hdr that defines DIR" >&5
19327 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
19328 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19329   echo $ECHO_N "(cached) $ECHO_C" >&6
19330 else
19331   cat >"conftest.$ac_ext" <<_ACEOF
19332 #line 19332 "configure"
19333 #include "confdefs.h"
19334 #include <sys/types.h>
19335 #include <$ac_hdr>
19336
19337 int
19338 main (void)
19339 {
19340 if ((DIR *) 0)
19341 return 0;
19342   ;
19343   return 0;
19344 }
19345 _ACEOF
19346 rm -f "conftest.$ac_objext"
19347 if { (eval echo "$as_me:19347: \"$ac_compile\"") >&5
19348   (eval $ac_compile) 2>&5
19349   ac_status=$?
19350   echo "$as_me:19350: \$? = $ac_status" >&5
19351   (exit "$ac_status"); } &&
19352          { ac_try='test -s "conftest.$ac_objext"'
19353   { (eval echo "$as_me:19353: \"$ac_try\"") >&5
19354   (eval $ac_try) 2>&5
19355   ac_status=$?
19356   echo "$as_me:19356: \$? = $ac_status" >&5
19357   (exit "$ac_status"); }; }; then
19358   eval "$as_ac_Header=yes"
19359 else
19360   echo "$as_me: failed program was:" >&5
19361 cat "conftest.$ac_ext" >&5
19362 eval "$as_ac_Header=no"
19363 fi
19364 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19365 fi
19366 echo "$as_me:19366: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19367 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19368 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19369   cat >>confdefs.h <<EOF
19370 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
19371 EOF
19372
19373 ac_header_dirent=$ac_hdr; break
19374 fi
19375
19376 done
19377 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
19378 if test $ac_header_dirent = dirent.h; then
19379   echo "$as_me:19379: checking for opendir in -ldir" >&5
19380 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
19381 if test "${ac_cv_lib_dir_opendir+set}" = set; then
19382   echo $ECHO_N "(cached) $ECHO_C" >&6
19383 else
19384   ac_check_lib_save_LIBS=$LIBS
19385 LIBS="-ldir  $LIBS"
19386 cat >"conftest.$ac_ext" <<_ACEOF
19387 #line 19387 "configure"
19388 #include "confdefs.h"
19389
19390 /* Override any gcc2 internal prototype to avoid an error.  */
19391 #ifdef __cplusplus
19392 extern "C"
19393 #endif
19394 /* We use char because int might match the return type of a gcc2
19395    builtin and then its argument prototype would still apply.  */
19396 char opendir ();
19397 int
19398 main (void)
19399 {
19400 opendir ();
19401   ;
19402   return 0;
19403 }
19404 _ACEOF
19405 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19406 if { (eval echo "$as_me:19406: \"$ac_link\"") >&5
19407   (eval $ac_link) 2>&5
19408   ac_status=$?
19409   echo "$as_me:19409: \$? = $ac_status" >&5
19410   (exit "$ac_status"); } &&
19411          { ac_try='test -s "conftest$ac_exeext"'
19412   { (eval echo "$as_me:19412: \"$ac_try\"") >&5
19413   (eval $ac_try) 2>&5
19414   ac_status=$?
19415   echo "$as_me:19415: \$? = $ac_status" >&5
19416   (exit "$ac_status"); }; }; then
19417   ac_cv_lib_dir_opendir=yes
19418 else
19419   echo "$as_me: failed program was:" >&5
19420 cat "conftest.$ac_ext" >&5
19421 ac_cv_lib_dir_opendir=no
19422 fi
19423 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19424 LIBS=$ac_check_lib_save_LIBS
19425 fi
19426 echo "$as_me:19426: result: $ac_cv_lib_dir_opendir" >&5
19427 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
19428 if test "$ac_cv_lib_dir_opendir" = yes; then
19429   LIBS="$LIBS -ldir"
19430 fi
19431
19432 else
19433   echo "$as_me:19433: checking for opendir in -lx" >&5
19434 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
19435 if test "${ac_cv_lib_x_opendir+set}" = set; then
19436   echo $ECHO_N "(cached) $ECHO_C" >&6
19437 else
19438   ac_check_lib_save_LIBS=$LIBS
19439 LIBS="-lx  $LIBS"
19440 cat >"conftest.$ac_ext" <<_ACEOF
19441 #line 19441 "configure"
19442 #include "confdefs.h"
19443
19444 /* Override any gcc2 internal prototype to avoid an error.  */
19445 #ifdef __cplusplus
19446 extern "C"
19447 #endif
19448 /* We use char because int might match the return type of a gcc2
19449    builtin and then its argument prototype would still apply.  */
19450 char opendir ();
19451 int
19452 main (void)
19453 {
19454 opendir ();
19455   ;
19456   return 0;
19457 }
19458 _ACEOF
19459 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19460 if { (eval echo "$as_me:19460: \"$ac_link\"") >&5
19461   (eval $ac_link) 2>&5
19462   ac_status=$?
19463   echo "$as_me:19463: \$? = $ac_status" >&5
19464   (exit "$ac_status"); } &&
19465          { ac_try='test -s "conftest$ac_exeext"'
19466   { (eval echo "$as_me:19466: \"$ac_try\"") >&5
19467   (eval $ac_try) 2>&5
19468   ac_status=$?
19469   echo "$as_me:19469: \$? = $ac_status" >&5
19470   (exit "$ac_status"); }; }; then
19471   ac_cv_lib_x_opendir=yes
19472 else
19473   echo "$as_me: failed program was:" >&5
19474 cat "conftest.$ac_ext" >&5
19475 ac_cv_lib_x_opendir=no
19476 fi
19477 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19478 LIBS=$ac_check_lib_save_LIBS
19479 fi
19480 echo "$as_me:19480: result: $ac_cv_lib_x_opendir" >&5
19481 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
19482 if test "$ac_cv_lib_x_opendir" = yes; then
19483   LIBS="$LIBS -lx"
19484 fi
19485
19486 fi
19487
19488 echo "$as_me:19488: checking whether time.h and sys/time.h may both be included" >&5
19489 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19490 if test "${ac_cv_header_time+set}" = set; then
19491   echo $ECHO_N "(cached) $ECHO_C" >&6
19492 else
19493   cat >"conftest.$ac_ext" <<_ACEOF
19494 #line 19494 "configure"
19495 #include "confdefs.h"
19496 #include <sys/types.h>
19497 #include <sys/time.h>
19498 #include <time.h>
19499
19500 int
19501 main (void)
19502 {
19503 if ((struct tm *) 0)
19504 return 0;
19505   ;
19506   return 0;
19507 }
19508 _ACEOF
19509 rm -f "conftest.$ac_objext"
19510 if { (eval echo "$as_me:19510: \"$ac_compile\"") >&5
19511   (eval $ac_compile) 2>&5
19512   ac_status=$?
19513   echo "$as_me:19513: \$? = $ac_status" >&5
19514   (exit "$ac_status"); } &&
19515          { ac_try='test -s "conftest.$ac_objext"'
19516   { (eval echo "$as_me:19516: \"$ac_try\"") >&5
19517   (eval $ac_try) 2>&5
19518   ac_status=$?
19519   echo "$as_me:19519: \$? = $ac_status" >&5
19520   (exit "$ac_status"); }; }; then
19521   ac_cv_header_time=yes
19522 else
19523   echo "$as_me: failed program was:" >&5
19524 cat "conftest.$ac_ext" >&5
19525 ac_cv_header_time=no
19526 fi
19527 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19528 fi
19529 echo "$as_me:19529: result: $ac_cv_header_time" >&5
19530 echo "${ECHO_T}$ac_cv_header_time" >&6
19531 if test $ac_cv_header_time = yes; then
19532
19533 cat >>confdefs.h <<\EOF
19534 #define TIME_WITH_SYS_TIME 1
19535 EOF
19536
19537 fi
19538
19539 cf_regex_func=no
19540 cf_regex_libs=
19541 case "$host_os" in
19542 (mingw*)
19543         # -lsystre -ltre -lintl -liconv
19544         echo "$as_me:19544: checking for regcomp in -lsystre" >&5
19545 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19546 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19547   echo $ECHO_N "(cached) $ECHO_C" >&6
19548 else
19549   ac_check_lib_save_LIBS=$LIBS
19550 LIBS="-lsystre  $LIBS"
19551 cat >"conftest.$ac_ext" <<_ACEOF
19552 #line 19552 "configure"
19553 #include "confdefs.h"
19554
19555 /* Override any gcc2 internal prototype to avoid an error.  */
19556 #ifdef __cplusplus
19557 extern "C"
19558 #endif
19559 /* We use char because int might match the return type of a gcc2
19560    builtin and then its argument prototype would still apply.  */
19561 char regcomp ();
19562 int
19563 main (void)
19564 {
19565 regcomp ();
19566   ;
19567   return 0;
19568 }
19569 _ACEOF
19570 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19571 if { (eval echo "$as_me:19571: \"$ac_link\"") >&5
19572   (eval $ac_link) 2>&5
19573   ac_status=$?
19574   echo "$as_me:19574: \$? = $ac_status" >&5
19575   (exit "$ac_status"); } &&
19576          { ac_try='test -s "conftest$ac_exeext"'
19577   { (eval echo "$as_me:19577: \"$ac_try\"") >&5
19578   (eval $ac_try) 2>&5
19579   ac_status=$?
19580   echo "$as_me:19580: \$? = $ac_status" >&5
19581   (exit "$ac_status"); }; }; then
19582   ac_cv_lib_systre_regcomp=yes
19583 else
19584   echo "$as_me: failed program was:" >&5
19585 cat "conftest.$ac_ext" >&5
19586 ac_cv_lib_systre_regcomp=no
19587 fi
19588 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19589 LIBS=$ac_check_lib_save_LIBS
19590 fi
19591 echo "$as_me:19591: result: $ac_cv_lib_systre_regcomp" >&5
19592 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19593 if test "$ac_cv_lib_systre_regcomp" = yes; then
19594
19595                 echo "$as_me:19595: checking for libiconv_open in -liconv" >&5
19596 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19597 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19598   echo $ECHO_N "(cached) $ECHO_C" >&6
19599 else
19600   ac_check_lib_save_LIBS=$LIBS
19601 LIBS="-liconv  $LIBS"
19602 cat >"conftest.$ac_ext" <<_ACEOF
19603 #line 19603 "configure"
19604 #include "confdefs.h"
19605
19606 /* Override any gcc2 internal prototype to avoid an error.  */
19607 #ifdef __cplusplus
19608 extern "C"
19609 #endif
19610 /* We use char because int might match the return type of a gcc2
19611    builtin and then its argument prototype would still apply.  */
19612 char libiconv_open ();
19613 int
19614 main (void)
19615 {
19616 libiconv_open ();
19617   ;
19618   return 0;
19619 }
19620 _ACEOF
19621 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19622 if { (eval echo "$as_me:19622: \"$ac_link\"") >&5
19623   (eval $ac_link) 2>&5
19624   ac_status=$?
19625   echo "$as_me:19625: \$? = $ac_status" >&5
19626   (exit "$ac_status"); } &&
19627          { ac_try='test -s "conftest$ac_exeext"'
19628   { (eval echo "$as_me:19628: \"$ac_try\"") >&5
19629   (eval $ac_try) 2>&5
19630   ac_status=$?
19631   echo "$as_me:19631: \$? = $ac_status" >&5
19632   (exit "$ac_status"); }; }; then
19633   ac_cv_lib_iconv_libiconv_open=yes
19634 else
19635   echo "$as_me: failed program was:" >&5
19636 cat "conftest.$ac_ext" >&5
19637 ac_cv_lib_iconv_libiconv_open=no
19638 fi
19639 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19640 LIBS=$ac_check_lib_save_LIBS
19641 fi
19642 echo "$as_me:19642: result: $ac_cv_lib_iconv_libiconv_open" >&5
19643 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19644 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19645
19646 cf_add_libs="$LIBS"
19647 # reverse order
19648 cf_add_0lib=
19649 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19650 # filter duplicates
19651 for cf_add_1lib in $cf_add_0lib; do
19652         for cf_add_2lib in $cf_add_libs; do
19653                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19654                         cf_add_1lib=
19655                         break
19656                 fi
19657         done
19658         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19659 done
19660 LIBS="$cf_add_libs"
19661
19662 fi
19663
19664                 echo "$as_me:19664: checking for libintl_gettext in -lintl" >&5
19665 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19666 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19667   echo $ECHO_N "(cached) $ECHO_C" >&6
19668 else
19669   ac_check_lib_save_LIBS=$LIBS
19670 LIBS="-lintl  $LIBS"
19671 cat >"conftest.$ac_ext" <<_ACEOF
19672 #line 19672 "configure"
19673 #include "confdefs.h"
19674
19675 /* Override any gcc2 internal prototype to avoid an error.  */
19676 #ifdef __cplusplus
19677 extern "C"
19678 #endif
19679 /* We use char because int might match the return type of a gcc2
19680    builtin and then its argument prototype would still apply.  */
19681 char libintl_gettext ();
19682 int
19683 main (void)
19684 {
19685 libintl_gettext ();
19686   ;
19687   return 0;
19688 }
19689 _ACEOF
19690 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19691 if { (eval echo "$as_me:19691: \"$ac_link\"") >&5
19692   (eval $ac_link) 2>&5
19693   ac_status=$?
19694   echo "$as_me:19694: \$? = $ac_status" >&5
19695   (exit "$ac_status"); } &&
19696          { ac_try='test -s "conftest$ac_exeext"'
19697   { (eval echo "$as_me:19697: \"$ac_try\"") >&5
19698   (eval $ac_try) 2>&5
19699   ac_status=$?
19700   echo "$as_me:19700: \$? = $ac_status" >&5
19701   (exit "$ac_status"); }; }; then
19702   ac_cv_lib_intl_libintl_gettext=yes
19703 else
19704   echo "$as_me: failed program was:" >&5
19705 cat "conftest.$ac_ext" >&5
19706 ac_cv_lib_intl_libintl_gettext=no
19707 fi
19708 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19709 LIBS=$ac_check_lib_save_LIBS
19710 fi
19711 echo "$as_me:19711: result: $ac_cv_lib_intl_libintl_gettext" >&5
19712 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19713 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19714
19715 cf_add_libs="$LIBS"
19716 # reverse order
19717 cf_add_0lib=
19718 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19719 # filter duplicates
19720 for cf_add_1lib in $cf_add_0lib; do
19721         for cf_add_2lib in $cf_add_libs; do
19722                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19723                         cf_add_1lib=
19724                         break
19725                 fi
19726         done
19727         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19728 done
19729 LIBS="$cf_add_libs"
19730
19731 fi
19732
19733                 echo "$as_me:19733: checking for tre_regcomp in -ltre" >&5
19734 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19735 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19736   echo $ECHO_N "(cached) $ECHO_C" >&6
19737 else
19738   ac_check_lib_save_LIBS=$LIBS
19739 LIBS="-ltre  $LIBS"
19740 cat >"conftest.$ac_ext" <<_ACEOF
19741 #line 19741 "configure"
19742 #include "confdefs.h"
19743
19744 /* Override any gcc2 internal prototype to avoid an error.  */
19745 #ifdef __cplusplus
19746 extern "C"
19747 #endif
19748 /* We use char because int might match the return type of a gcc2
19749    builtin and then its argument prototype would still apply.  */
19750 char tre_regcomp ();
19751 int
19752 main (void)
19753 {
19754 tre_regcomp ();
19755   ;
19756   return 0;
19757 }
19758 _ACEOF
19759 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19760 if { (eval echo "$as_me:19760: \"$ac_link\"") >&5
19761   (eval $ac_link) 2>&5
19762   ac_status=$?
19763   echo "$as_me:19763: \$? = $ac_status" >&5
19764   (exit "$ac_status"); } &&
19765          { ac_try='test -s "conftest$ac_exeext"'
19766   { (eval echo "$as_me:19766: \"$ac_try\"") >&5
19767   (eval $ac_try) 2>&5
19768   ac_status=$?
19769   echo "$as_me:19769: \$? = $ac_status" >&5
19770   (exit "$ac_status"); }; }; then
19771   ac_cv_lib_tre_tre_regcomp=yes
19772 else
19773   echo "$as_me: failed program was:" >&5
19774 cat "conftest.$ac_ext" >&5
19775 ac_cv_lib_tre_tre_regcomp=no
19776 fi
19777 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19778 LIBS=$ac_check_lib_save_LIBS
19779 fi
19780 echo "$as_me:19780: result: $ac_cv_lib_tre_tre_regcomp" >&5
19781 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19782 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19783
19784 cf_add_libs="$LIBS"
19785 # reverse order
19786 cf_add_0lib=
19787 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19788 # filter duplicates
19789 for cf_add_1lib in $cf_add_0lib; do
19790         for cf_add_2lib in $cf_add_libs; do
19791                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19792                         cf_add_1lib=
19793                         break
19794                 fi
19795         done
19796         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19797 done
19798 LIBS="$cf_add_libs"
19799
19800 fi
19801
19802 cf_add_libs="$LIBS"
19803 # reverse order
19804 cf_add_0lib=
19805 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19806 # filter duplicates
19807 for cf_add_1lib in $cf_add_0lib; do
19808         for cf_add_2lib in $cf_add_libs; do
19809                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19810                         cf_add_1lib=
19811                         break
19812                 fi
19813         done
19814         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19815 done
19816 LIBS="$cf_add_libs"
19817
19818                 cf_regex_func=regcomp
19819
19820 else
19821
19822                 echo "$as_me:19822: checking for regcomp in -lgnurx" >&5
19823 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19824 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19825   echo $ECHO_N "(cached) $ECHO_C" >&6
19826 else
19827   ac_check_lib_save_LIBS=$LIBS
19828 LIBS="-lgnurx  $LIBS"
19829 cat >"conftest.$ac_ext" <<_ACEOF
19830 #line 19830 "configure"
19831 #include "confdefs.h"
19832
19833 /* Override any gcc2 internal prototype to avoid an error.  */
19834 #ifdef __cplusplus
19835 extern "C"
19836 #endif
19837 /* We use char because int might match the return type of a gcc2
19838    builtin and then its argument prototype would still apply.  */
19839 char regcomp ();
19840 int
19841 main (void)
19842 {
19843 regcomp ();
19844   ;
19845   return 0;
19846 }
19847 _ACEOF
19848 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19849 if { (eval echo "$as_me:19849: \"$ac_link\"") >&5
19850   (eval $ac_link) 2>&5
19851   ac_status=$?
19852   echo "$as_me:19852: \$? = $ac_status" >&5
19853   (exit "$ac_status"); } &&
19854          { ac_try='test -s "conftest$ac_exeext"'
19855   { (eval echo "$as_me:19855: \"$ac_try\"") >&5
19856   (eval $ac_try) 2>&5
19857   ac_status=$?
19858   echo "$as_me:19858: \$? = $ac_status" >&5
19859   (exit "$ac_status"); }; }; then
19860   ac_cv_lib_gnurx_regcomp=yes
19861 else
19862   echo "$as_me: failed program was:" >&5
19863 cat "conftest.$ac_ext" >&5
19864 ac_cv_lib_gnurx_regcomp=no
19865 fi
19866 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19867 LIBS=$ac_check_lib_save_LIBS
19868 fi
19869 echo "$as_me:19869: result: $ac_cv_lib_gnurx_regcomp" >&5
19870 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19871 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19872
19873 cf_add_libs="$LIBS"
19874 # reverse order
19875 cf_add_0lib=
19876 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19877 # filter duplicates
19878 for cf_add_1lib in $cf_add_0lib; do
19879         for cf_add_2lib in $cf_add_libs; do
19880                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19881                         cf_add_1lib=
19882                         break
19883                 fi
19884         done
19885         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19886 done
19887 LIBS="$cf_add_libs"
19888
19889                         cf_regex_func=regcomp
19890 fi
19891
19892 fi
19893
19894         ;;
19895 (*)
19896         cf_regex_libs="regex re"
19897         echo "$as_me:19897: checking for regcomp" >&5
19898 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19899 if test "${ac_cv_func_regcomp+set}" = set; then
19900   echo $ECHO_N "(cached) $ECHO_C" >&6
19901 else
19902   cat >"conftest.$ac_ext" <<_ACEOF
19903 #line 19903 "configure"
19904 #include "confdefs.h"
19905 #define regcomp autoconf_temporary
19906 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19907 #undef regcomp
19908
19909 #ifdef __cplusplus
19910 extern "C"
19911 #endif
19912
19913 /* We use char because int might match the return type of a gcc2
19914    builtin and then its argument prototype would still apply.  */
19915 char regcomp (void);
19916
19917 int
19918 main (void)
19919 {
19920
19921 /* The GNU C library defines stubs for functions which it implements
19922     to always fail with ENOSYS.  Some functions are actually named
19923     something starting with __ and the normal name is an alias.  */
19924 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19925 #error found stub for regcomp
19926 #endif
19927
19928         return regcomp ();
19929   ;
19930   return 0;
19931 }
19932 _ACEOF
19933 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19934 if { (eval echo "$as_me:19934: \"$ac_link\"") >&5
19935   (eval $ac_link) 2>&5
19936   ac_status=$?
19937   echo "$as_me:19937: \$? = $ac_status" >&5
19938   (exit "$ac_status"); } &&
19939          { ac_try='test -s "conftest$ac_exeext"'
19940   { (eval echo "$as_me:19940: \"$ac_try\"") >&5
19941   (eval $ac_try) 2>&5
19942   ac_status=$?
19943   echo "$as_me:19943: \$? = $ac_status" >&5
19944   (exit "$ac_status"); }; }; then
19945   ac_cv_func_regcomp=yes
19946 else
19947   echo "$as_me: failed program was:" >&5
19948 cat "conftest.$ac_ext" >&5
19949 ac_cv_func_regcomp=no
19950 fi
19951 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19952 fi
19953 echo "$as_me:19953: result: $ac_cv_func_regcomp" >&5
19954 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19955 if test "$ac_cv_func_regcomp" = yes; then
19956   cf_regex_func=regcomp
19957 else
19958
19959                 for cf_regex_lib in $cf_regex_libs
19960                 do
19961                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19962 echo "$as_me:19962: checking for regcomp in -l$cf_regex_lib" >&5
19963 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19964 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19965   echo $ECHO_N "(cached) $ECHO_C" >&6
19966 else
19967   ac_check_lib_save_LIBS=$LIBS
19968 LIBS="-l$cf_regex_lib  $LIBS"
19969 cat >"conftest.$ac_ext" <<_ACEOF
19970 #line 19970 "configure"
19971 #include "confdefs.h"
19972
19973 /* Override any gcc2 internal prototype to avoid an error.  */
19974 #ifdef __cplusplus
19975 extern "C"
19976 #endif
19977 /* We use char because int might match the return type of a gcc2
19978    builtin and then its argument prototype would still apply.  */
19979 char regcomp ();
19980 int
19981 main (void)
19982 {
19983 regcomp ();
19984   ;
19985   return 0;
19986 }
19987 _ACEOF
19988 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19989 if { (eval echo "$as_me:19989: \"$ac_link\"") >&5
19990   (eval $ac_link) 2>&5
19991   ac_status=$?
19992   echo "$as_me:19992: \$? = $ac_status" >&5
19993   (exit "$ac_status"); } &&
19994          { ac_try='test -s "conftest$ac_exeext"'
19995   { (eval echo "$as_me:19995: \"$ac_try\"") >&5
19996   (eval $ac_try) 2>&5
19997   ac_status=$?
19998   echo "$as_me:19998: \$? = $ac_status" >&5
19999   (exit "$ac_status"); }; }; then
20000   eval "$as_ac_Lib=yes"
20001 else
20002   echo "$as_me: failed program was:" >&5
20003 cat "conftest.$ac_ext" >&5
20004 eval "$as_ac_Lib=no"
20005 fi
20006 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20007 LIBS=$ac_check_lib_save_LIBS
20008 fi
20009 echo "$as_me:20009: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
20010 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
20011 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
20012
20013 cf_add_libs="$LIBS"
20014 # reverse order
20015 cf_add_0lib=
20016 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20017 # filter duplicates
20018 for cf_add_1lib in $cf_add_0lib; do
20019         for cf_add_2lib in $cf_add_libs; do
20020                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20021                         cf_add_1lib=
20022                         break
20023                 fi
20024         done
20025         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20026 done
20027 LIBS="$cf_add_libs"
20028
20029                                         cf_regex_func=regcomp
20030                                         break
20031 fi
20032
20033                 done
20034
20035 fi
20036
20037         ;;
20038 esac
20039
20040 if test "$cf_regex_func" = no ; then
20041         echo "$as_me:20041: checking for compile" >&5
20042 echo $ECHO_N "checking for compile... $ECHO_C" >&6
20043 if test "${ac_cv_func_compile+set}" = set; then
20044   echo $ECHO_N "(cached) $ECHO_C" >&6
20045 else
20046   cat >"conftest.$ac_ext" <<_ACEOF
20047 #line 20047 "configure"
20048 #include "confdefs.h"
20049 #define compile autoconf_temporary
20050 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20051 #undef compile
20052
20053 #ifdef __cplusplus
20054 extern "C"
20055 #endif
20056
20057 /* We use char because int might match the return type of a gcc2
20058    builtin and then its argument prototype would still apply.  */
20059 char compile (void);
20060
20061 int
20062 main (void)
20063 {
20064
20065 /* The GNU C library defines stubs for functions which it implements
20066     to always fail with ENOSYS.  Some functions are actually named
20067     something starting with __ and the normal name is an alias.  */
20068 #if defined (__stub_compile) || defined (__stub___compile)
20069 #error found stub for compile
20070 #endif
20071
20072         return compile ();
20073   ;
20074   return 0;
20075 }
20076 _ACEOF
20077 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20078 if { (eval echo "$as_me:20078: \"$ac_link\"") >&5
20079   (eval $ac_link) 2>&5
20080   ac_status=$?
20081   echo "$as_me:20081: \$? = $ac_status" >&5
20082   (exit "$ac_status"); } &&
20083          { ac_try='test -s "conftest$ac_exeext"'
20084   { (eval echo "$as_me:20084: \"$ac_try\"") >&5
20085   (eval $ac_try) 2>&5
20086   ac_status=$?
20087   echo "$as_me:20087: \$? = $ac_status" >&5
20088   (exit "$ac_status"); }; }; then
20089   ac_cv_func_compile=yes
20090 else
20091   echo "$as_me: failed program was:" >&5
20092 cat "conftest.$ac_ext" >&5
20093 ac_cv_func_compile=no
20094 fi
20095 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20096 fi
20097 echo "$as_me:20097: result: $ac_cv_func_compile" >&5
20098 echo "${ECHO_T}$ac_cv_func_compile" >&6
20099 if test "$ac_cv_func_compile" = yes; then
20100   cf_regex_func=compile
20101 else
20102
20103                 echo "$as_me:20103: checking for compile in -lgen" >&5
20104 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
20105 if test "${ac_cv_lib_gen_compile+set}" = set; then
20106   echo $ECHO_N "(cached) $ECHO_C" >&6
20107 else
20108   ac_check_lib_save_LIBS=$LIBS
20109 LIBS="-lgen  $LIBS"
20110 cat >"conftest.$ac_ext" <<_ACEOF
20111 #line 20111 "configure"
20112 #include "confdefs.h"
20113
20114 /* Override any gcc2 internal prototype to avoid an error.  */
20115 #ifdef __cplusplus
20116 extern "C"
20117 #endif
20118 /* We use char because int might match the return type of a gcc2
20119    builtin and then its argument prototype would still apply.  */
20120 char compile ();
20121 int
20122 main (void)
20123 {
20124 compile ();
20125   ;
20126   return 0;
20127 }
20128 _ACEOF
20129 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20130 if { (eval echo "$as_me:20130: \"$ac_link\"") >&5
20131   (eval $ac_link) 2>&5
20132   ac_status=$?
20133   echo "$as_me:20133: \$? = $ac_status" >&5
20134   (exit "$ac_status"); } &&
20135          { ac_try='test -s "conftest$ac_exeext"'
20136   { (eval echo "$as_me:20136: \"$ac_try\"") >&5
20137   (eval $ac_try) 2>&5
20138   ac_status=$?
20139   echo "$as_me:20139: \$? = $ac_status" >&5
20140   (exit "$ac_status"); }; }; then
20141   ac_cv_lib_gen_compile=yes
20142 else
20143   echo "$as_me: failed program was:" >&5
20144 cat "conftest.$ac_ext" >&5
20145 ac_cv_lib_gen_compile=no
20146 fi
20147 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20148 LIBS=$ac_check_lib_save_LIBS
20149 fi
20150 echo "$as_me:20150: result: $ac_cv_lib_gen_compile" >&5
20151 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
20152 if test "$ac_cv_lib_gen_compile" = yes; then
20153
20154 cf_add_libs="$LIBS"
20155 # reverse order
20156 cf_add_0lib=
20157 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20158 # filter duplicates
20159 for cf_add_1lib in $cf_add_0lib; do
20160         for cf_add_2lib in $cf_add_libs; do
20161                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20162                         cf_add_1lib=
20163                         break
20164                 fi
20165         done
20166         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20167 done
20168 LIBS="$cf_add_libs"
20169
20170                                 cf_regex_func=compile
20171 fi
20172
20173 fi
20174
20175 fi
20176
20177 if test "$cf_regex_func" = no ; then
20178         { echo "$as_me:20178: WARNING: cannot find regular expression library" >&5
20179 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20180 fi
20181
20182 echo "$as_me:20182: checking for regular-expression headers" >&5
20183 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20184 if test "${cf_cv_regex_hdrs+set}" = set; then
20185   echo $ECHO_N "(cached) $ECHO_C" >&6
20186 else
20187
20188 cf_cv_regex_hdrs=no
20189 case "$cf_regex_func" in
20190 (compile)
20191         for cf_regex_hdr in regexp.h regexpr.h
20192         do
20193                 cat >"conftest.$ac_ext" <<_ACEOF
20194 #line 20194 "configure"
20195 #include "confdefs.h"
20196 #include <$cf_regex_hdr>
20197 int
20198 main (void)
20199 {
20200
20201                         char *p = compile("", "", "", 0);
20202                         int x = step("", "");
20203                         (void)p;
20204                         (void)x;
20205
20206   ;
20207   return 0;
20208 }
20209 _ACEOF
20210 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20211 if { (eval echo "$as_me:20211: \"$ac_link\"") >&5
20212   (eval $ac_link) 2>&5
20213   ac_status=$?
20214   echo "$as_me:20214: \$? = $ac_status" >&5
20215   (exit "$ac_status"); } &&
20216          { ac_try='test -s "conftest$ac_exeext"'
20217   { (eval echo "$as_me:20217: \"$ac_try\"") >&5
20218   (eval $ac_try) 2>&5
20219   ac_status=$?
20220   echo "$as_me:20220: \$? = $ac_status" >&5
20221   (exit "$ac_status"); }; }; then
20222
20223                         cf_cv_regex_hdrs=$cf_regex_hdr
20224                         break
20225
20226 else
20227   echo "$as_me: failed program was:" >&5
20228 cat "conftest.$ac_ext" >&5
20229 fi
20230 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20231         done
20232         ;;
20233 (*)
20234         for cf_regex_hdr in regex.h
20235         do
20236                 cat >"conftest.$ac_ext" <<_ACEOF
20237 #line 20237 "configure"
20238 #include "confdefs.h"
20239 #include <sys/types.h>
20240 #include <$cf_regex_hdr>
20241 int
20242 main (void)
20243 {
20244
20245                         regex_t *p = 0;
20246                         int x = regcomp(p, "", 0);
20247                         int y = regexec(p, "", 0, 0, 0);
20248                         (void)x;
20249                         (void)y;
20250                         regfree(p);
20251
20252   ;
20253   return 0;
20254 }
20255 _ACEOF
20256 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20257 if { (eval echo "$as_me:20257: \"$ac_link\"") >&5
20258   (eval $ac_link) 2>&5
20259   ac_status=$?
20260   echo "$as_me:20260: \$? = $ac_status" >&5
20261   (exit "$ac_status"); } &&
20262          { ac_try='test -s "conftest$ac_exeext"'
20263   { (eval echo "$as_me:20263: \"$ac_try\"") >&5
20264   (eval $ac_try) 2>&5
20265   ac_status=$?
20266   echo "$as_me:20266: \$? = $ac_status" >&5
20267   (exit "$ac_status"); }; }; then
20268
20269                         cf_cv_regex_hdrs=$cf_regex_hdr
20270                         break
20271
20272 else
20273   echo "$as_me: failed program was:" >&5
20274 cat "conftest.$ac_ext" >&5
20275 fi
20276 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20277         done
20278         ;;
20279 esac
20280
20281 fi
20282 echo "$as_me:20282: result: $cf_cv_regex_hdrs" >&5
20283 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20284
20285 case "$cf_cv_regex_hdrs" in
20286         (no)            { echo "$as_me:20286: WARNING: no regular expression header found" >&5
20287 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20288         (regex.h)
20289 cat >>confdefs.h <<\EOF
20290 #define HAVE_REGEX_H_FUNCS 1
20291 EOF
20292  ;;
20293         (regexp.h)
20294 cat >>confdefs.h <<\EOF
20295 #define HAVE_REGEXP_H_FUNCS 1
20296 EOF
20297  ;;
20298         (regexpr.h)
20299 cat >>confdefs.h <<\EOF
20300 #define HAVE_REGEXPR_H_FUNCS 1
20301 EOF
20302  ;;
20303 esac
20304
20305 for ac_header in \
20306 fcntl.h \
20307 getopt.h \
20308 limits.h \
20309 locale.h \
20310 math.h \
20311 poll.h \
20312 sys/ioctl.h \
20313 sys/param.h \
20314 sys/poll.h \
20315 sys/select.h \
20316 sys/time.h \
20317 sys/times.h \
20318 unistd.h \
20319 wctype.h \
20320
20321 do
20322 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20323 echo "$as_me:20323: checking for $ac_header" >&5
20324 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20325 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20326   echo $ECHO_N "(cached) $ECHO_C" >&6
20327 else
20328   cat >"conftest.$ac_ext" <<_ACEOF
20329 #line 20329 "configure"
20330 #include "confdefs.h"
20331 #include <$ac_header>
20332 _ACEOF
20333 if { (eval echo "$as_me:20333: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20334   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20335   ac_status=$?
20336   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20337   rm -f conftest.er1
20338   cat conftest.err >&5
20339   echo "$as_me:20339: \$? = $ac_status" >&5
20340   (exit "$ac_status"); } >/dev/null; then
20341   if test -s conftest.err; then
20342     ac_cpp_err=$ac_c_preproc_warn_flag
20343   else
20344     ac_cpp_err=
20345   fi
20346 else
20347   ac_cpp_err=yes
20348 fi
20349 if test -z "$ac_cpp_err"; then
20350   eval "$as_ac_Header=yes"
20351 else
20352   echo "$as_me: failed program was:" >&5
20353   cat "conftest.$ac_ext" >&5
20354   eval "$as_ac_Header=no"
20355 fi
20356 rm -f conftest.err "conftest.$ac_ext"
20357 fi
20358 echo "$as_me:20358: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20359 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20360 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20361   cat >>confdefs.h <<EOF
20362 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20363 EOF
20364
20365 fi
20366 done
20367
20368 for ac_header in unistd.h getopt.h
20369 do
20370 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20371 echo "$as_me:20371: checking for $ac_header" >&5
20372 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20373 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20374   echo $ECHO_N "(cached) $ECHO_C" >&6
20375 else
20376   cat >"conftest.$ac_ext" <<_ACEOF
20377 #line 20377 "configure"
20378 #include "confdefs.h"
20379 #include <$ac_header>
20380 _ACEOF
20381 if { (eval echo "$as_me:20381: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20382   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20383   ac_status=$?
20384   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20385   rm -f conftest.er1
20386   cat conftest.err >&5
20387   echo "$as_me:20387: \$? = $ac_status" >&5
20388   (exit "$ac_status"); } >/dev/null; then
20389   if test -s conftest.err; then
20390     ac_cpp_err=$ac_c_preproc_warn_flag
20391   else
20392     ac_cpp_err=
20393   fi
20394 else
20395   ac_cpp_err=yes
20396 fi
20397 if test -z "$ac_cpp_err"; then
20398   eval "$as_ac_Header=yes"
20399 else
20400   echo "$as_me: failed program was:" >&5
20401   cat "conftest.$ac_ext" >&5
20402   eval "$as_ac_Header=no"
20403 fi
20404 rm -f conftest.err "conftest.$ac_ext"
20405 fi
20406 echo "$as_me:20406: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20407 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20408 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20409   cat >>confdefs.h <<EOF
20410 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20411 EOF
20412
20413 fi
20414 done
20415
20416 echo "$as_me:20416: checking for header declaring getopt variables" >&5
20417 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20418 if test "${cf_cv_getopt_header+set}" = set; then
20419   echo $ECHO_N "(cached) $ECHO_C" >&6
20420 else
20421
20422 cf_cv_getopt_header=none
20423 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20424 do
20425 cat >"conftest.$ac_ext" <<_ACEOF
20426 #line 20426 "configure"
20427 #include "confdefs.h"
20428
20429 #include <$cf_header>
20430 int
20431 main (void)
20432 {
20433 int x = optind; char *y = optarg; (void)x; (void)y
20434   ;
20435   return 0;
20436 }
20437 _ACEOF
20438 rm -f "conftest.$ac_objext"
20439 if { (eval echo "$as_me:20439: \"$ac_compile\"") >&5
20440   (eval $ac_compile) 2>&5
20441   ac_status=$?
20442   echo "$as_me:20442: \$? = $ac_status" >&5
20443   (exit "$ac_status"); } &&
20444          { ac_try='test -s "conftest.$ac_objext"'
20445   { (eval echo "$as_me:20445: \"$ac_try\"") >&5
20446   (eval $ac_try) 2>&5
20447   ac_status=$?
20448   echo "$as_me:20448: \$? = $ac_status" >&5
20449   (exit "$ac_status"); }; }; then
20450   cf_cv_getopt_header=$cf_header
20451  break
20452 else
20453   echo "$as_me: failed program was:" >&5
20454 cat "conftest.$ac_ext" >&5
20455 fi
20456 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20457 done
20458
20459 fi
20460 echo "$as_me:20460: result: $cf_cv_getopt_header" >&5
20461 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20462 if test "$cf_cv_getopt_header" != none ; then
20463
20464 cat >>confdefs.h <<\EOF
20465 #define HAVE_GETOPT_HEADER 1
20466 EOF
20467
20468 fi
20469 if test "$cf_cv_getopt_header" = getopt.h ; then
20470
20471 cat >>confdefs.h <<\EOF
20472 #define NEED_GETOPT_H 1
20473 EOF
20474
20475 fi
20476
20477 echo "$as_me:20477: checking if external environ is declared" >&5
20478 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20479 if test "${cf_cv_dcl_environ+set}" = set; then
20480   echo $ECHO_N "(cached) $ECHO_C" >&6
20481 else
20482
20483     cat >"conftest.$ac_ext" <<_ACEOF
20484 #line 20484 "configure"
20485 #include "confdefs.h"
20486
20487 #ifdef HAVE_STDLIB_H
20488 #include <stdlib.h>
20489 #endif
20490 #include <unistd.h>
20491 int
20492 main (void)
20493 {
20494 int x = (int) environ
20495   ;
20496   return 0;
20497 }
20498 _ACEOF
20499 rm -f "conftest.$ac_objext"
20500 if { (eval echo "$as_me:20500: \"$ac_compile\"") >&5
20501   (eval $ac_compile) 2>&5
20502   ac_status=$?
20503   echo "$as_me:20503: \$? = $ac_status" >&5
20504   (exit "$ac_status"); } &&
20505          { ac_try='test -s "conftest.$ac_objext"'
20506   { (eval echo "$as_me:20506: \"$ac_try\"") >&5
20507   (eval $ac_try) 2>&5
20508   ac_status=$?
20509   echo "$as_me:20509: \$? = $ac_status" >&5
20510   (exit "$ac_status"); }; }; then
20511   cf_cv_dcl_environ=yes
20512 else
20513   echo "$as_me: failed program was:" >&5
20514 cat "conftest.$ac_ext" >&5
20515 cf_cv_dcl_environ=no
20516 fi
20517 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20518
20519 fi
20520 echo "$as_me:20520: result: $cf_cv_dcl_environ" >&5
20521 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20522
20523 if test "$cf_cv_dcl_environ" = no ; then
20524
20525 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20526
20527     cat >>confdefs.h <<EOF
20528 #define $cf_result 1
20529 EOF
20530
20531 fi
20532
20533 # It's possible (for near-UNIX clones) that the data doesn't exist
20534
20535 echo "$as_me:20535: checking if external environ exists" >&5
20536 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20537 if test "${cf_cv_have_environ+set}" = set; then
20538   echo $ECHO_N "(cached) $ECHO_C" >&6
20539 else
20540
20541         cat >"conftest.$ac_ext" <<_ACEOF
20542 #line 20542 "configure"
20543 #include "confdefs.h"
20544
20545 #undef environ
20546 extern int environ;
20547
20548 int
20549 main (void)
20550 {
20551 environ = 2
20552   ;
20553   return 0;
20554 }
20555 _ACEOF
20556 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20557 if { (eval echo "$as_me:20557: \"$ac_link\"") >&5
20558   (eval $ac_link) 2>&5
20559   ac_status=$?
20560   echo "$as_me:20560: \$? = $ac_status" >&5
20561   (exit "$ac_status"); } &&
20562          { ac_try='test -s "conftest$ac_exeext"'
20563   { (eval echo "$as_me:20563: \"$ac_try\"") >&5
20564   (eval $ac_try) 2>&5
20565   ac_status=$?
20566   echo "$as_me:20566: \$? = $ac_status" >&5
20567   (exit "$ac_status"); }; }; then
20568   cf_cv_have_environ=yes
20569 else
20570   echo "$as_me: failed program was:" >&5
20571 cat "conftest.$ac_ext" >&5
20572 cf_cv_have_environ=no
20573 fi
20574 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20575
20576 fi
20577 echo "$as_me:20577: result: $cf_cv_have_environ" >&5
20578 echo "${ECHO_T}$cf_cv_have_environ" >&6
20579
20580 if test "$cf_cv_have_environ" = yes ; then
20581
20582 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20583
20584         cat >>confdefs.h <<EOF
20585 #define $cf_result 1
20586 EOF
20587
20588 fi
20589
20590 echo "$as_me:20590: checking for getenv" >&5
20591 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20592 if test "${ac_cv_func_getenv+set}" = set; then
20593   echo $ECHO_N "(cached) $ECHO_C" >&6
20594 else
20595   cat >"conftest.$ac_ext" <<_ACEOF
20596 #line 20596 "configure"
20597 #include "confdefs.h"
20598 #define getenv autoconf_temporary
20599 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20600 #undef getenv
20601
20602 #ifdef __cplusplus
20603 extern "C"
20604 #endif
20605
20606 /* We use char because int might match the return type of a gcc2
20607    builtin and then its argument prototype would still apply.  */
20608 char getenv (void);
20609
20610 int
20611 main (void)
20612 {
20613
20614 /* The GNU C library defines stubs for functions which it implements
20615     to always fail with ENOSYS.  Some functions are actually named
20616     something starting with __ and the normal name is an alias.  */
20617 #if defined (__stub_getenv) || defined (__stub___getenv)
20618 #error found stub for getenv
20619 #endif
20620
20621         return getenv ();
20622   ;
20623   return 0;
20624 }
20625 _ACEOF
20626 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20627 if { (eval echo "$as_me:20627: \"$ac_link\"") >&5
20628   (eval $ac_link) 2>&5
20629   ac_status=$?
20630   echo "$as_me:20630: \$? = $ac_status" >&5
20631   (exit "$ac_status"); } &&
20632          { ac_try='test -s "conftest$ac_exeext"'
20633   { (eval echo "$as_me:20633: \"$ac_try\"") >&5
20634   (eval $ac_try) 2>&5
20635   ac_status=$?
20636   echo "$as_me:20636: \$? = $ac_status" >&5
20637   (exit "$ac_status"); }; }; then
20638   ac_cv_func_getenv=yes
20639 else
20640   echo "$as_me: failed program was:" >&5
20641 cat "conftest.$ac_ext" >&5
20642 ac_cv_func_getenv=no
20643 fi
20644 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20645 fi
20646 echo "$as_me:20646: result: $ac_cv_func_getenv" >&5
20647 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20648
20649 for ac_func in putenv setenv strdup
20650 do
20651 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20652 echo "$as_me:20652: checking for $ac_func" >&5
20653 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20654 if eval "test \"\${$as_ac_var+set}\" = set"; then
20655   echo $ECHO_N "(cached) $ECHO_C" >&6
20656 else
20657   cat >"conftest.$ac_ext" <<_ACEOF
20658 #line 20658 "configure"
20659 #include "confdefs.h"
20660 #define $ac_func autoconf_temporary
20661 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20662 #undef $ac_func
20663
20664 #ifdef __cplusplus
20665 extern "C"
20666 #endif
20667
20668 /* We use char because int might match the return type of a gcc2
20669    builtin and then its argument prototype would still apply.  */
20670 char $ac_func (void);
20671
20672 int
20673 main (void)
20674 {
20675
20676 /* The GNU C library defines stubs for functions which it implements
20677     to always fail with ENOSYS.  Some functions are actually named
20678     something starting with __ and the normal name is an alias.  */
20679 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20680 #error found stub for $ac_func
20681 #endif
20682
20683         return $ac_func ();
20684   ;
20685   return 0;
20686 }
20687 _ACEOF
20688 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20689 if { (eval echo "$as_me:20689: \"$ac_link\"") >&5
20690   (eval $ac_link) 2>&5
20691   ac_status=$?
20692   echo "$as_me:20692: \$? = $ac_status" >&5
20693   (exit "$ac_status"); } &&
20694          { ac_try='test -s "conftest$ac_exeext"'
20695   { (eval echo "$as_me:20695: \"$ac_try\"") >&5
20696   (eval $ac_try) 2>&5
20697   ac_status=$?
20698   echo "$as_me:20698: \$? = $ac_status" >&5
20699   (exit "$ac_status"); }; }; then
20700   eval "$as_ac_var=yes"
20701 else
20702   echo "$as_me: failed program was:" >&5
20703 cat "conftest.$ac_ext" >&5
20704 eval "$as_ac_var=no"
20705 fi
20706 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20707 fi
20708 echo "$as_me:20708: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20709 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20710 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20711   cat >>confdefs.h <<EOF
20712 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20713 EOF
20714
20715 fi
20716 done
20717
20718 echo "$as_me:20718: checking if getenv returns consistent values" >&5
20719 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20720 if test "${cf_cv_consistent_getenv+set}" = set; then
20721   echo $ECHO_N "(cached) $ECHO_C" >&6
20722 else
20723
20724 if test "$cross_compiling" = yes; then
20725   cf_cv_consistent_getenv=unknown
20726 else
20727   cat >"conftest.$ac_ext" <<_ACEOF
20728 #line 20728 "configure"
20729 #include "confdefs.h"
20730
20731 #include <stdlib.h>
20732 #include <unistd.h>
20733 #include <stdio.h>
20734 #include <string.h>
20735 #include <sys/types.h>
20736
20737 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20738 extern char **environ;  /* POSIX, but some systems are not... */
20739 #endif
20740
20741 #if defined(HAVE_STRDUP)
20742 #define str_alloc(s) strdup(s)
20743 #else
20744 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20745 #endif
20746
20747 static void set_value(const char *name, const char *value)
20748 {
20749 #if defined(HAVE_SETENV)
20750         setenv(name, value, 1);
20751 #elif defined(HAVE_PUTENV)
20752         char buffer[1024];
20753         sprintf(buffer, "%s=%s", name, value);
20754         putenv(str_alloc(buffer));
20755 #else
20756 #error neither putenv/setenv found
20757 #endif
20758 }
20759 int main(void)
20760 {
20761         int pass;
20762         size_t numenv, limit, j;
20763         char **mynames;
20764         char **myvalues;
20765         char **mypointer;
20766         char *equals;
20767         for (numenv = 0; environ[numenv]; ++numenv) ;
20768         limit = numenv + 10;
20769         mynames = (char **) calloc(limit + 1, sizeof(char *));
20770         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20771         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20772 #if defined(HAVE_ENVIRON)
20773         for (j = 0; environ[j]; ++j) {
20774                 mynames[j] = str_alloc(environ[j]);
20775                 equals = strchr(mynames[j], '=');
20776                 if (equals != 0) {
20777                         *equals++ = '\\0';
20778                         myvalues[j] = str_alloc(equals);
20779                 } else {
20780                         myvalues[j] = str_alloc("");
20781                 }
20782         }
20783 #endif
20784         for (j = numenv; j < limit; ++j) {
20785                 char name[80];
20786                 char value[80];
20787                 size_t found;
20788                 size_t k = 0;
20789                 do {
20790                         size_t jk;
20791                         found = 0;
20792                         sprintf(name, "TERM%lu", (unsigned long) k);
20793                         for (jk = 0; jk < j; ++jk) {
20794                                 if (!strcmp(name, mynames[jk])) {
20795                                         found = 1;
20796                                         ++k;
20797                                         break;
20798                                 }
20799                         }
20800                 } while (found);
20801                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20802                 set_value(name, value);
20803                 mynames[j] = str_alloc(name);
20804                 myvalues[j] = str_alloc(value);
20805         }
20806         for (pass = 0; pass < 3; ++pass) {
20807                 for (j = 0; j < limit; ++j) {
20808                         char *value = getenv(mynames[j]);
20809                         if (pass) {
20810                                 if (value == 0) {
20811                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20812                                         ${cf_cv_main_return:-return}(1);
20813                                 } else if (value != mypointer[j]) {
20814                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20815                                         ${cf_cv_main_return:-return}(1);
20816                                 } else if (strcmp(value, myvalues[j])) {
20817                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20818                                         ${cf_cv_main_return:-return}(1);
20819                                 }
20820                         } else {
20821                                 size_t k;
20822                                 mypointer[j] = value;
20823                                 for (k = 0; k < j; ++k) {
20824                                         if (mypointer[j] == mypointer[k]) {
20825                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20826                                                 ${cf_cv_main_return:-return}(1);
20827                                         }
20828                                 }
20829                         }
20830                 }
20831         }
20832         ${cf_cv_main_return:-return}(0);
20833 }
20834
20835 _ACEOF
20836 rm -f "conftest$ac_exeext"
20837 if { (eval echo "$as_me:20837: \"$ac_link\"") >&5
20838   (eval $ac_link) 2>&5
20839   ac_status=$?
20840   echo "$as_me:20840: \$? = $ac_status" >&5
20841   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20842   { (eval echo "$as_me:20842: \"$ac_try\"") >&5
20843   (eval $ac_try) 2>&5
20844   ac_status=$?
20845   echo "$as_me:20845: \$? = $ac_status" >&5
20846   (exit "$ac_status"); }; }; then
20847   cf_cv_consistent_getenv=yes
20848 else
20849   echo "$as_me: program exited with status $ac_status" >&5
20850 echo "$as_me: failed program was:" >&5
20851 cat "conftest.$ac_ext" >&5
20852 cf_cv_consistent_getenv=no
20853 fi
20854 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20855 fi
20856
20857 fi
20858 echo "$as_me:20858: result: $cf_cv_consistent_getenv" >&5
20859 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20860
20861 if test "x$cf_cv_consistent_getenv" = xno
20862 then
20863
20864 cat >>confdefs.h <<\EOF
20865 #define HAVE_CONSISTENT_GETENV 1
20866 EOF
20867
20868 fi
20869
20870 if test "x$cf_cv_consistent_getenv" = xno && \
20871         test "x$cf_with_trace" = xyes
20872 then
20873         { echo "$as_me:20873: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20874 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20875 fi
20876
20877 echo "$as_me:20877: checking if sys/time.h works with sys/select.h" >&5
20878 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20879 if test "${cf_cv_sys_time_select+set}" = set; then
20880   echo $ECHO_N "(cached) $ECHO_C" >&6
20881 else
20882
20883 cat >"conftest.$ac_ext" <<_ACEOF
20884 #line 20884 "configure"
20885 #include "confdefs.h"
20886
20887 #include <sys/types.h>
20888 #ifdef HAVE_SYS_TIME_H
20889 #include <sys/time.h>
20890 #endif
20891 #ifdef HAVE_SYS_SELECT_H
20892 #include <sys/select.h>
20893 #endif
20894
20895 int
20896 main (void)
20897 {
20898
20899   ;
20900   return 0;
20901 }
20902 _ACEOF
20903 rm -f "conftest.$ac_objext"
20904 if { (eval echo "$as_me:20904: \"$ac_compile\"") >&5
20905   (eval $ac_compile) 2>&5
20906   ac_status=$?
20907   echo "$as_me:20907: \$? = $ac_status" >&5
20908   (exit "$ac_status"); } &&
20909          { ac_try='test -s "conftest.$ac_objext"'
20910   { (eval echo "$as_me:20910: \"$ac_try\"") >&5
20911   (eval $ac_try) 2>&5
20912   ac_status=$?
20913   echo "$as_me:20913: \$? = $ac_status" >&5
20914   (exit "$ac_status"); }; }; then
20915   cf_cv_sys_time_select=yes
20916 else
20917   echo "$as_me: failed program was:" >&5
20918 cat "conftest.$ac_ext" >&5
20919 cf_cv_sys_time_select=no
20920 fi
20921 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20922
20923 fi
20924
20925 echo "$as_me:20925: result: $cf_cv_sys_time_select" >&5
20926 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20927 test "$cf_cv_sys_time_select" = yes &&
20928 cat >>confdefs.h <<\EOF
20929 #define HAVE_SYS_TIME_SELECT 1
20930 EOF
20931
20932 ###     checks for compiler characteristics
20933 ac_ext=c
20934 ac_cpp='$CPP $CPPFLAGS'
20935 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20936 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20937 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20938 ac_main_return="return"
20939
20940 echo "$as_me:20940: checking for an ANSI C-conforming const" >&5
20941 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20942 if test "${ac_cv_c_const+set}" = set; then
20943   echo $ECHO_N "(cached) $ECHO_C" >&6
20944 else
20945   cat >"conftest.$ac_ext" <<_ACEOF
20946 #line 20946 "configure"
20947 #include "confdefs.h"
20948
20949 int
20950 main (void)
20951 {
20952 /* FIXME: Include the comments suggested by Paul. */
20953 #ifndef __cplusplus
20954   /* Ultrix mips cc rejects this.  */
20955   typedef int charset[2];
20956   const charset x;
20957   /* SunOS 4.1.1 cc rejects this.  */
20958   char const *const *ccp;
20959   char **p;
20960   /* NEC SVR4.0.2 mips cc rejects this.  */
20961   struct point {int x, y;};
20962   static struct point const zero = {0,0};
20963   /* AIX XL C 1.02.0.0 rejects this.
20964      It does not let you subtract one const X* pointer from another in
20965      an arm of an if-expression whose if-part is not a constant
20966      expression */
20967   const char *g = "string";
20968   ccp = &g + (g ? g-g : 0);
20969   /* HPUX 7.0 cc rejects these. */
20970   ++ccp;
20971   p = (char**) ccp;
20972   ccp = (char const *const *) p;
20973   { /* SCO 3.2v4 cc rejects this.  */
20974     char *t;
20975     char const *s = 0 ? (char *) 0 : (char const *) 0;
20976
20977     *t++ = 0;
20978   }
20979   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20980     int x[] = {25, 17};
20981     const int *foo = &x[0];
20982     ++foo;
20983   }
20984   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20985     typedef const int *iptr;
20986     iptr p = 0;
20987     ++p;
20988   }
20989   { /* AIX XL C 1.02.0.0 rejects this saying
20990        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20991     struct s { int j; const int *ap[3]; };
20992     struct s *b; b->j = 5;
20993   }
20994   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20995     const int foo = 10;
20996   }
20997 #endif
20998
20999   ;
21000   return 0;
21001 }
21002 _ACEOF
21003 rm -f "conftest.$ac_objext"
21004 if { (eval echo "$as_me:21004: \"$ac_compile\"") >&5
21005   (eval $ac_compile) 2>&5
21006   ac_status=$?
21007   echo "$as_me:21007: \$? = $ac_status" >&5
21008   (exit "$ac_status"); } &&
21009          { ac_try='test -s "conftest.$ac_objext"'
21010   { (eval echo "$as_me:21010: \"$ac_try\"") >&5
21011   (eval $ac_try) 2>&5
21012   ac_status=$?
21013   echo "$as_me:21013: \$? = $ac_status" >&5
21014   (exit "$ac_status"); }; }; then
21015   ac_cv_c_const=yes
21016 else
21017   echo "$as_me: failed program was:" >&5
21018 cat "conftest.$ac_ext" >&5
21019 ac_cv_c_const=no
21020 fi
21021 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21022 fi
21023 echo "$as_me:21023: result: $ac_cv_c_const" >&5
21024 echo "${ECHO_T}$ac_cv_c_const" >&6
21025 if test $ac_cv_c_const = no; then
21026
21027 cat >>confdefs.h <<\EOF
21028 #define const
21029 EOF
21030
21031 fi
21032
21033 echo "$as_me:21033: checking for inline" >&5
21034 echo $ECHO_N "checking for inline... $ECHO_C" >&6
21035 if test "${ac_cv_c_inline+set}" = set; then
21036   echo $ECHO_N "(cached) $ECHO_C" >&6
21037 else
21038   ac_cv_c_inline=no
21039 for ac_kw in inline __inline__ __inline; do
21040   cat >"conftest.$ac_ext" <<_ACEOF
21041 #line 21041 "configure"
21042 #include "confdefs.h"
21043 #ifndef __cplusplus
21044 static $ac_kw int static_foo () {return 0; }
21045 $ac_kw int foo () {return 0; }
21046 #endif
21047
21048 _ACEOF
21049 rm -f "conftest.$ac_objext"
21050 if { (eval echo "$as_me:21050: \"$ac_compile\"") >&5
21051   (eval $ac_compile) 2>&5
21052   ac_status=$?
21053   echo "$as_me:21053: \$? = $ac_status" >&5
21054   (exit "$ac_status"); } &&
21055          { ac_try='test -s "conftest.$ac_objext"'
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   ac_cv_c_inline=$ac_kw; break
21062 else
21063   echo "$as_me: failed program was:" >&5
21064 cat "conftest.$ac_ext" >&5
21065 fi
21066 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21067 done
21068
21069 fi
21070 echo "$as_me:21070: result: $ac_cv_c_inline" >&5
21071 echo "${ECHO_T}$ac_cv_c_inline" >&6
21072 case $ac_cv_c_inline in
21073   inline | yes) ;;
21074   no)
21075 cat >>confdefs.h <<\EOF
21076 #define inline
21077 EOF
21078  ;;
21079   *)  cat >>confdefs.h <<EOF
21080 #define inline $ac_cv_c_inline
21081 EOF
21082  ;;
21083 esac
21084
21085 NCURSES_INLINE=
21086 if test "$ac_cv_c_inline" != no ; then
21087         NCURSES_INLINE=inline
21088         if test "$INTEL_COMPILER" = yes
21089         then
21090                 :
21091         elif test "$CLANG_COMPILER" = yes
21092         then
21093                 :
21094         elif test "$GCC" = yes
21095         then
21096                 echo "$as_me:21096: checking if $CC supports options to tune inlining" >&5
21097 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
21098 if test "${cf_cv_gcc_inline+set}" = set; then
21099   echo $ECHO_N "(cached) $ECHO_C" >&6
21100 else
21101
21102                 cf_save_CFLAGS=$CFLAGS
21103                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
21104                 cat >"conftest.$ac_ext" <<_ACEOF
21105 #line 21105 "configure"
21106 #include "confdefs.h"
21107 inline int foo(void) { return 1; }
21108 int
21109 main (void)
21110 {
21111 ${cf_cv_main_return:-return} foo()
21112   ;
21113   return 0;
21114 }
21115 _ACEOF
21116 rm -f "conftest.$ac_objext"
21117 if { (eval echo "$as_me:21117: \"$ac_compile\"") >&5
21118   (eval $ac_compile) 2>&5
21119   ac_status=$?
21120   echo "$as_me:21120: \$? = $ac_status" >&5
21121   (exit "$ac_status"); } &&
21122          { ac_try='test -s "conftest.$ac_objext"'
21123   { (eval echo "$as_me:21123: \"$ac_try\"") >&5
21124   (eval $ac_try) 2>&5
21125   ac_status=$?
21126   echo "$as_me:21126: \$? = $ac_status" >&5
21127   (exit "$ac_status"); }; }; then
21128   cf_cv_gcc_inline=yes
21129 else
21130   echo "$as_me: failed program was:" >&5
21131 cat "conftest.$ac_ext" >&5
21132 cf_cv_gcc_inline=no
21133 fi
21134 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21135                 CFLAGS=$cf_save_CFLAGS
21136
21137 fi
21138 echo "$as_me:21138: result: $cf_cv_gcc_inline" >&5
21139 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
21140                 if test "$cf_cv_gcc_inline" = yes ; then
21141
21142 cf_fix_cppflags=no
21143 cf_new_cflags=
21144 cf_new_cppflags=
21145 cf_new_extra_cppflags=
21146
21147 for cf_add_cflags in --param max-inline-insns-single=1200
21148 do
21149 case "$cf_fix_cppflags" in
21150 (no)
21151         case "$cf_add_cflags" in
21152         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21153                 case "$cf_add_cflags" in
21154                 (-D*)
21155                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21156
21157                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21158                                 && test -z "${cf_tst_cflags}" \
21159                                 && cf_fix_cppflags=yes
21160
21161                         if test "$cf_fix_cppflags" = yes ; then
21162
21163         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21164         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21165
21166                                 continue
21167                         elif test "${cf_tst_cflags}" = "\"'" ; then
21168
21169         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21170         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21171
21172                                 continue
21173                         fi
21174                         ;;
21175                 esac
21176                 case "$CPPFLAGS" in
21177                 (*$cf_add_cflags)
21178                         ;;
21179                 (*)
21180                         case "$cf_add_cflags" in
21181                         (-D*)
21182                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21183
21184 CPPFLAGS=`echo "$CPPFLAGS" | \
21185         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21186                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21187
21188                                 ;;
21189                         esac
21190
21191         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21192         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21193
21194                         ;;
21195                 esac
21196                 ;;
21197         (*)
21198
21199         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21200         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21201
21202                 ;;
21203         esac
21204         ;;
21205 (yes)
21206
21207         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21208         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21209
21210         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21211
21212         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21213                 && test -z "${cf_tst_cflags}" \
21214                 && cf_fix_cppflags=no
21215         ;;
21216 esac
21217 done
21218
21219 if test -n "$cf_new_cflags" ; then
21220
21221         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21222         CFLAGS="${CFLAGS}$cf_new_cflags"
21223
21224 fi
21225
21226 if test -n "$cf_new_cppflags" ; then
21227
21228         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21229         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21230
21231 fi
21232
21233 if test -n "$cf_new_extra_cppflags" ; then
21234
21235         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21236         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21237
21238 fi
21239
21240                 fi
21241         fi
21242 fi
21243
21244 echo "$as_me:21244: checking for signal global datatype" >&5
21245 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21246 if test "${cf_cv_sig_atomic_t+set}" = set; then
21247   echo $ECHO_N "(cached) $ECHO_C" >&6
21248 else
21249
21250         for cf_type in \
21251                 "volatile sig_atomic_t" \
21252                 "sig_atomic_t" \
21253                 "int"
21254         do
21255         cat >"conftest.$ac_ext" <<_ACEOF
21256 #line 21256 "configure"
21257 #include "confdefs.h"
21258
21259 #include <sys/types.h>
21260 #include <signal.h>
21261 #include <stdio.h>
21262
21263 extern $cf_type x;
21264 $cf_type x;
21265 static void handler(int sig)
21266 {
21267         (void)sig;
21268         x = 5;
21269 }
21270 int
21271 main (void)
21272 {
21273 signal(SIGINT, handler);
21274                  x = 1
21275   ;
21276   return 0;
21277 }
21278 _ACEOF
21279 rm -f "conftest.$ac_objext"
21280 if { (eval echo "$as_me:21280: \"$ac_compile\"") >&5
21281   (eval $ac_compile) 2>&5
21282   ac_status=$?
21283   echo "$as_me:21283: \$? = $ac_status" >&5
21284   (exit "$ac_status"); } &&
21285          { ac_try='test -s "conftest.$ac_objext"'
21286   { (eval echo "$as_me:21286: \"$ac_try\"") >&5
21287   (eval $ac_try) 2>&5
21288   ac_status=$?
21289   echo "$as_me:21289: \$? = $ac_status" >&5
21290   (exit "$ac_status"); }; }; then
21291   cf_cv_sig_atomic_t=$cf_type
21292 else
21293   echo "$as_me: failed program was:" >&5
21294 cat "conftest.$ac_ext" >&5
21295 cf_cv_sig_atomic_t=no
21296 fi
21297 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21298                 test "$cf_cv_sig_atomic_t" != no && break
21299         done
21300
21301 fi
21302
21303 echo "$as_me:21303: result: $cf_cv_sig_atomic_t" >&5
21304 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21305 test "$cf_cv_sig_atomic_t" != no &&
21306 cat >>confdefs.h <<EOF
21307 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21308 EOF
21309
21310 if test "$NCURSES_CHTYPE" = auto ; then
21311
21312 echo "$as_me:21312: checking for type of chtype" >&5
21313 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21314 if test "${cf_cv_typeof_chtype+set}" = set; then
21315   echo $ECHO_N "(cached) $ECHO_C" >&6
21316 else
21317
21318                 if test "$cross_compiling" = yes; then
21319   cf_cv_typeof_chtype=long
21320 else
21321   cat >"conftest.$ac_ext" <<_ACEOF
21322 #line 21322 "configure"
21323 #include "confdefs.h"
21324
21325 #define WANT_BITS 31
21326 #include <stdio.h>
21327 int main(void)
21328 {
21329         FILE *fp = fopen("cf_test.out", "w");
21330         if (fp != 0) {
21331                 char *result = "long";
21332                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21333                         int n;
21334                         unsigned int x, y;
21335                         for (n = 0; n < WANT_BITS; n++) {
21336                                 x = (1 << n);
21337                                 y = (x >> n);
21338                                 if (y != 1 || x == 0) {
21339                                         x = 0;
21340                                         break;
21341                                 }
21342                         }
21343                         /*
21344                          * If x is nonzero, an int is big enough for the bits
21345                          * that we want.
21346                          */
21347                         result = (x != 0) ? "int" : "long";
21348                 }
21349                 fputs(result, fp);
21350                 fclose(fp);
21351         }
21352         ${cf_cv_main_return:-return}(0);
21353 }
21354
21355 _ACEOF
21356 rm -f "conftest$ac_exeext"
21357 if { (eval echo "$as_me:21357: \"$ac_link\"") >&5
21358   (eval $ac_link) 2>&5
21359   ac_status=$?
21360   echo "$as_me:21360: \$? = $ac_status" >&5
21361   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21362   { (eval echo "$as_me:21362: \"$ac_try\"") >&5
21363   (eval $ac_try) 2>&5
21364   ac_status=$?
21365   echo "$as_me:21365: \$? = $ac_status" >&5
21366   (exit "$ac_status"); }; }; then
21367   cf_cv_typeof_chtype=`cat cf_test.out`
21368 else
21369   echo "$as_me: program exited with status $ac_status" >&5
21370 echo "$as_me: failed program was:" >&5
21371 cat "conftest.$ac_ext" >&5
21372 cf_cv_typeof_chtype=long
21373 fi
21374 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21375 fi
21376                 rm -f cf_test.out
21377
21378 fi
21379
21380 echo "$as_me:21380: result: $cf_cv_typeof_chtype" >&5
21381 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21382
21383 cat >>confdefs.h <<EOF
21384 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21385 EOF
21386
21387 else
21388         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21389 fi
21390 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21391
21392 echo "$as_me:21392: checking if unsigned literals are legal" >&5
21393 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21394 if test "${cf_cv_unsigned_literals+set}" = set; then
21395   echo $ECHO_N "(cached) $ECHO_C" >&6
21396 else
21397
21398         cat >"conftest.$ac_ext" <<_ACEOF
21399 #line 21399 "configure"
21400 #include "confdefs.h"
21401
21402 int
21403 main (void)
21404 {
21405 long x = 1L + 1UL + 1U + 1
21406   ;
21407   return 0;
21408 }
21409 _ACEOF
21410 rm -f "conftest.$ac_objext"
21411 if { (eval echo "$as_me:21411: \"$ac_compile\"") >&5
21412   (eval $ac_compile) 2>&5
21413   ac_status=$?
21414   echo "$as_me:21414: \$? = $ac_status" >&5
21415   (exit "$ac_status"); } &&
21416          { ac_try='test -s "conftest.$ac_objext"'
21417   { (eval echo "$as_me:21417: \"$ac_try\"") >&5
21418   (eval $ac_try) 2>&5
21419   ac_status=$?
21420   echo "$as_me:21420: \$? = $ac_status" >&5
21421   (exit "$ac_status"); }; }; then
21422   cf_cv_unsigned_literals=yes
21423 else
21424   echo "$as_me: failed program was:" >&5
21425 cat "conftest.$ac_ext" >&5
21426 cf_cv_unsigned_literals=no
21427 fi
21428 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21429
21430 fi
21431
21432 echo "$as_me:21432: result: $cf_cv_unsigned_literals" >&5
21433 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21434
21435 cf_cv_1UL="1"
21436 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21437 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21438
21439 if test "$NCURSES_MMASK_T" = auto ; then
21440         cf_cv_typeof_mmask_t=long
21441 else
21442         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21443 fi
21444 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21445
21446 ###     Checks for external-data
21447
21448 echo "$as_me:21448: checking if external errno is declared" >&5
21449 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21450 if test "${cf_cv_dcl_errno+set}" = set; then
21451   echo $ECHO_N "(cached) $ECHO_C" >&6
21452 else
21453
21454         cat >"conftest.$ac_ext" <<_ACEOF
21455 #line 21455 "configure"
21456 #include "confdefs.h"
21457
21458 #ifdef HAVE_STDLIB_H
21459 #include <stdlib.h>
21460 #endif
21461 #include <stdio.h>
21462 #include <sys/types.h>
21463 #include <errno.h>
21464 int
21465 main (void)
21466 {
21467 int x = (int) errno; (void)x
21468   ;
21469   return 0;
21470 }
21471 _ACEOF
21472 rm -f "conftest.$ac_objext"
21473 if { (eval echo "$as_me:21473: \"$ac_compile\"") >&5
21474   (eval $ac_compile) 2>&5
21475   ac_status=$?
21476   echo "$as_me:21476: \$? = $ac_status" >&5
21477   (exit "$ac_status"); } &&
21478          { ac_try='test -s "conftest.$ac_objext"'
21479   { (eval echo "$as_me:21479: \"$ac_try\"") >&5
21480   (eval $ac_try) 2>&5
21481   ac_status=$?
21482   echo "$as_me:21482: \$? = $ac_status" >&5
21483   (exit "$ac_status"); }; }; then
21484   cf_cv_dcl_errno=yes
21485 else
21486   echo "$as_me: failed program was:" >&5
21487 cat "conftest.$ac_ext" >&5
21488 cf_cv_dcl_errno=no
21489 fi
21490 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21491
21492 fi
21493 echo "$as_me:21493: result: $cf_cv_dcl_errno" >&5
21494 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21495
21496 if test "$cf_cv_dcl_errno" = no ; then
21497
21498 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21499
21500         cat >>confdefs.h <<EOF
21501 #define $cf_result 1
21502 EOF
21503
21504 fi
21505
21506 # It's possible (for near-UNIX clones) that the data doesn't exist
21507
21508 echo "$as_me:21508: checking if external errno exists" >&5
21509 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21510 if test "${cf_cv_have_errno+set}" = set; then
21511   echo $ECHO_N "(cached) $ECHO_C" >&6
21512 else
21513
21514         cat >"conftest.$ac_ext" <<_ACEOF
21515 #line 21515 "configure"
21516 #include "confdefs.h"
21517
21518 #undef errno
21519 extern int errno;
21520
21521 int
21522 main (void)
21523 {
21524 errno = 2
21525   ;
21526   return 0;
21527 }
21528 _ACEOF
21529 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21530 if { (eval echo "$as_me:21530: \"$ac_link\"") >&5
21531   (eval $ac_link) 2>&5
21532   ac_status=$?
21533   echo "$as_me:21533: \$? = $ac_status" >&5
21534   (exit "$ac_status"); } &&
21535          { ac_try='test -s "conftest$ac_exeext"'
21536   { (eval echo "$as_me:21536: \"$ac_try\"") >&5
21537   (eval $ac_try) 2>&5
21538   ac_status=$?
21539   echo "$as_me:21539: \$? = $ac_status" >&5
21540   (exit "$ac_status"); }; }; then
21541   cf_cv_have_errno=yes
21542 else
21543   echo "$as_me: failed program was:" >&5
21544 cat "conftest.$ac_ext" >&5
21545 cf_cv_have_errno=no
21546 fi
21547 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21548
21549 fi
21550 echo "$as_me:21550: result: $cf_cv_have_errno" >&5
21551 echo "${ECHO_T}$cf_cv_have_errno" >&6
21552
21553 if test "$cf_cv_have_errno" = yes ; then
21554
21555 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21556
21557         cat >>confdefs.h <<EOF
21558 #define $cf_result 1
21559 EOF
21560
21561 fi
21562
21563 echo "$as_me:21563: checking if data-only library module links" >&5
21564 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21565 if test "${cf_cv_link_dataonly+set}" = set; then
21566   echo $ECHO_N "(cached) $ECHO_C" >&6
21567 else
21568
21569         rm -f conftest.a
21570         cat >conftest.$ac_ext <<EOF
21571 #line 21571 "configure"
21572 int     testdata[3] = { 123, 456, 789 };
21573 EOF
21574         if { (eval echo "$as_me:21574: \"$ac_compile\"") >&5
21575   (eval $ac_compile) 2>&5
21576   ac_status=$?
21577   echo "$as_me:21577: \$? = $ac_status" >&5
21578   (exit "$ac_status"); } ; then
21579                 mv conftest.o data.o && \
21580                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21581         fi
21582         rm -f conftest.$ac_ext data.o
21583         cat >conftest.$ac_ext <<EOF
21584 #line 21584 "configure"
21585 int     testfunc(void)
21586 {
21587 #if defined(NeXT)
21588         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21589 #else
21590         extern int testdata[3];
21591         return testdata[0] == 123
21592            &&  testdata[1] == 456
21593            &&  testdata[2] == 789;
21594 #endif
21595 }
21596 EOF
21597         if { (eval echo "$as_me:21597: \"$ac_compile\"") >&5
21598   (eval $ac_compile) 2>&5
21599   ac_status=$?
21600   echo "$as_me:21600: \$? = $ac_status" >&5
21601   (exit "$ac_status"); }; then
21602                 mv conftest.o func.o && \
21603                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21604         fi
21605         rm -f conftest.$ac_ext func.o
21606         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21607         cf_saveLIBS="$LIBS"
21608         LIBS="conftest.a $LIBS"
21609         if test "$cross_compiling" = yes; then
21610   cf_cv_link_dataonly=unknown
21611 else
21612   cat >"conftest.$ac_ext" <<_ACEOF
21613 #line 21613 "configure"
21614 #include "confdefs.h"
21615
21616         int main(void)
21617         {
21618                 extern int testfunc();
21619                 ${cf_cv_main_return:-return} (!testfunc());
21620         }
21621
21622 _ACEOF
21623 rm -f "conftest$ac_exeext"
21624 if { (eval echo "$as_me:21624: \"$ac_link\"") >&5
21625   (eval $ac_link) 2>&5
21626   ac_status=$?
21627   echo "$as_me:21627: \$? = $ac_status" >&5
21628   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21629   { (eval echo "$as_me:21629: \"$ac_try\"") >&5
21630   (eval $ac_try) 2>&5
21631   ac_status=$?
21632   echo "$as_me:21632: \$? = $ac_status" >&5
21633   (exit "$ac_status"); }; }; then
21634   cf_cv_link_dataonly=yes
21635 else
21636   echo "$as_me: program exited with status $ac_status" >&5
21637 echo "$as_me: failed program was:" >&5
21638 cat "conftest.$ac_ext" >&5
21639 cf_cv_link_dataonly=no
21640 fi
21641 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21642 fi
21643         LIBS="$cf_saveLIBS"
21644
21645 fi
21646
21647 echo "$as_me:21647: result: $cf_cv_link_dataonly" >&5
21648 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21649
21650 if test "$cf_cv_link_dataonly" = no ; then
21651
21652 cat >>confdefs.h <<\EOF
21653 #define BROKEN_LINKER 1
21654 EOF
21655
21656         BROKEN_LINKER=1
21657 fi
21658
21659 ###     Checks for library functions.
21660
21661 for ac_func in \
21662 fpathconf \
21663 getcwd \
21664 getegid \
21665 geteuid \
21666 getopt \
21667 issetugid \
21668 localeconv \
21669 poll \
21670 putenv \
21671 remove \
21672 select \
21673 setbuf \
21674 setbuffer \
21675 setenv \
21676 setfsuid \
21677 setvbuf \
21678 sigaction \
21679 sigvec \
21680 snprintf \
21681 strdup \
21682 strstr \
21683 sysconf \
21684 tcgetpgrp \
21685 times \
21686 tsearch \
21687 vsnprintf \
21688
21689 do
21690 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21691 echo "$as_me:21691: checking for $ac_func" >&5
21692 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21693 if eval "test \"\${$as_ac_var+set}\" = set"; then
21694   echo $ECHO_N "(cached) $ECHO_C" >&6
21695 else
21696   cat >"conftest.$ac_ext" <<_ACEOF
21697 #line 21697 "configure"
21698 #include "confdefs.h"
21699 #define $ac_func autoconf_temporary
21700 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21701 #undef $ac_func
21702
21703 #ifdef __cplusplus
21704 extern "C"
21705 #endif
21706
21707 /* We use char because int might match the return type of a gcc2
21708    builtin and then its argument prototype would still apply.  */
21709 char $ac_func (void);
21710
21711 int
21712 main (void)
21713 {
21714
21715 /* The GNU C library defines stubs for functions which it implements
21716     to always fail with ENOSYS.  Some functions are actually named
21717     something starting with __ and the normal name is an alias.  */
21718 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21719 #error found stub for $ac_func
21720 #endif
21721
21722         return $ac_func ();
21723   ;
21724   return 0;
21725 }
21726 _ACEOF
21727 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21728 if { (eval echo "$as_me:21728: \"$ac_link\"") >&5
21729   (eval $ac_link) 2>&5
21730   ac_status=$?
21731   echo "$as_me:21731: \$? = $ac_status" >&5
21732   (exit "$ac_status"); } &&
21733          { ac_try='test -s "conftest$ac_exeext"'
21734   { (eval echo "$as_me:21734: \"$ac_try\"") >&5
21735   (eval $ac_try) 2>&5
21736   ac_status=$?
21737   echo "$as_me:21737: \$? = $ac_status" >&5
21738   (exit "$ac_status"); }; }; then
21739   eval "$as_ac_var=yes"
21740 else
21741   echo "$as_me: failed program was:" >&5
21742 cat "conftest.$ac_ext" >&5
21743 eval "$as_ac_var=no"
21744 fi
21745 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21746 fi
21747 echo "$as_me:21747: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21748 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21749 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21750   cat >>confdefs.h <<EOF
21751 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21752 EOF
21753
21754 fi
21755 done
21756
21757 echo "$as_me:21757: checking if _PATH_TTYS is defined in ttyent.h" >&5
21758 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21759 if test "${cf_cv_PATH_TTYS+set}" = set; then
21760   echo $ECHO_N "(cached) $ECHO_C" >&6
21761 else
21762
21763 cat >"conftest.$ac_ext" <<_ACEOF
21764 #line 21764 "configure"
21765 #include "confdefs.h"
21766
21767 #include <stdio.h>
21768 #include <ttyent.h>
21769 int
21770 main (void)
21771 {
21772
21773 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21774   ;
21775   return 0;
21776 }
21777 _ACEOF
21778 rm -f "conftest.$ac_objext"
21779 if { (eval echo "$as_me:21779: \"$ac_compile\"") >&5
21780   (eval $ac_compile) 2>&5
21781   ac_status=$?
21782   echo "$as_me:21782: \$? = $ac_status" >&5
21783   (exit "$ac_status"); } &&
21784          { ac_try='test -s "conftest.$ac_objext"'
21785   { (eval echo "$as_me:21785: \"$ac_try\"") >&5
21786   (eval $ac_try) 2>&5
21787   ac_status=$?
21788   echo "$as_me:21788: \$? = $ac_status" >&5
21789   (exit "$ac_status"); }; }; then
21790   cf_cv_PATH_TTYS=yes
21791 else
21792   echo "$as_me: failed program was:" >&5
21793 cat "conftest.$ac_ext" >&5
21794 cf_cv_PATH_TTYS=no
21795 fi
21796 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21797 fi
21798 echo "$as_me:21798: result: $cf_cv_PATH_TTYS" >&5
21799 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21800
21801 if test $cf_cv_PATH_TTYS = no
21802 then
21803         for cf_ttys in /etc/ttytype /etc/ttys
21804         do
21805                 if test -f $cf_ttys
21806                 then
21807                         cf_cv_PATH_TTYS=maybe
21808
21809 cat >>confdefs.h <<\EOF
21810 #define _PATH_TTYS $cf_ttys
21811 EOF
21812
21813                         break
21814                 fi
21815         done
21816 fi
21817
21818 if test $cf_cv_PATH_TTYS != no
21819 then
21820         echo "$as_me:21820: checking if _PATH_TTYS file exists" >&5
21821 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21822 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21823   echo $ECHO_N "(cached) $ECHO_C" >&6
21824 else
21825
21826                 if test "$cross_compiling" = yes; then
21827   cf_cv_have_PATH_TTYS=unknown
21828 else
21829   cat >"conftest.$ac_ext" <<_ACEOF
21830 #line 21830 "configure"
21831 #include "confdefs.h"
21832
21833 #include <stdio.h>
21834 #include <ttyent.h>
21835 int main(void) {
21836         FILE *fp = fopen(_PATH_TTYS, "r");
21837         ${cf_cv_main_return:-return} (fp == 0);
21838 }
21839 _ACEOF
21840 rm -f "conftest$ac_exeext"
21841 if { (eval echo "$as_me:21841: \"$ac_link\"") >&5
21842   (eval $ac_link) 2>&5
21843   ac_status=$?
21844   echo "$as_me:21844: \$? = $ac_status" >&5
21845   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21846   { (eval echo "$as_me:21846: \"$ac_try\"") >&5
21847   (eval $ac_try) 2>&5
21848   ac_status=$?
21849   echo "$as_me:21849: \$? = $ac_status" >&5
21850   (exit "$ac_status"); }; }; then
21851   cf_cv_have_PATH_TTYS=yes
21852 else
21853   echo "$as_me: program exited with status $ac_status" >&5
21854 echo "$as_me: failed program was:" >&5
21855 cat "conftest.$ac_ext" >&5
21856 cf_cv_have_PATH_TTYS=no
21857 fi
21858 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21859 fi
21860 fi
21861 echo "$as_me:21861: result: $cf_cv_have_PATH_TTYS" >&5
21862 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21863         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21864 fi
21865
21866 if test $cf_cv_PATH_TTYS != no
21867 then
21868
21869 cat >>confdefs.h <<\EOF
21870 #define HAVE_PATH_TTYS 1
21871 EOF
21872
21873         echo "$as_me:21873: checking for getttynam" >&5
21874 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21875 if test "${cf_cv_func_getttynam+set}" = set; then
21876   echo $ECHO_N "(cached) $ECHO_C" >&6
21877 else
21878
21879                 cat >"conftest.$ac_ext" <<_ACEOF
21880 #line 21880 "configure"
21881 #include "confdefs.h"
21882 #include <ttyent.h>
21883 int
21884 main (void)
21885 {
21886 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21887   ;
21888   return 0;
21889 }
21890 _ACEOF
21891 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21892 if { (eval echo "$as_me:21892: \"$ac_link\"") >&5
21893   (eval $ac_link) 2>&5
21894   ac_status=$?
21895   echo "$as_me:21895: \$? = $ac_status" >&5
21896   (exit "$ac_status"); } &&
21897          { ac_try='test -s "conftest$ac_exeext"'
21898   { (eval echo "$as_me:21898: \"$ac_try\"") >&5
21899   (eval $ac_try) 2>&5
21900   ac_status=$?
21901   echo "$as_me:21901: \$? = $ac_status" >&5
21902   (exit "$ac_status"); }; }; then
21903   cf_cv_func_getttynam=yes
21904 else
21905   echo "$as_me: failed program was:" >&5
21906 cat "conftest.$ac_ext" >&5
21907 cf_cv_func_getttynam=no
21908 fi
21909 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21910 fi
21911 echo "$as_me:21911: result: $cf_cv_func_getttynam" >&5
21912 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21913         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21914 #define HAVE_GETTTYNAM 1
21915 EOF
21916
21917 fi
21918
21919 if test "x$ac_cv_func_getopt" = xno && \
21920    test "x$cf_with_progs$cf_with_tests" != xnono; then
21921         { { echo "$as_me:21921: error: getopt is required for building programs" >&5
21922 echo "$as_me: error: getopt is required for building programs" >&2;}
21923    { (exit 1); exit 1; }; }
21924 fi
21925
21926 if test "x$with_safe_sprintf" = xyes
21927 then
21928         if test "x$ac_cv_func_vsnprintf" = xyes
21929         then
21930                 { echo "$as_me:21930: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21931 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21932         else
21933
21934 cat >>confdefs.h <<\EOF
21935 #define USE_SAFE_SPRINTF 1
21936 EOF
21937
21938         fi
21939 fi
21940
21941 if test "x$with_getcap" = "xyes" ; then
21942
21943 echo "$as_me:21943: checking for terminal-capability database functions" >&5
21944 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21945 if test "${cf_cv_cgetent+set}" = set; then
21946   echo $ECHO_N "(cached) $ECHO_C" >&6
21947 else
21948
21949 cat >"conftest.$ac_ext" <<_ACEOF
21950 #line 21950 "configure"
21951 #include "confdefs.h"
21952
21953 #include <stdlib.h>
21954 int
21955 main (void)
21956 {
21957
21958         char temp[128];
21959         char *buf = temp;
21960         char *db_array = temp;
21961         cgetent(&buf, &db_array, "vt100");
21962         cgetcap(buf, "tc", '=');
21963         cgetmatch(buf, "tc");
21964
21965   ;
21966   return 0;
21967 }
21968 _ACEOF
21969 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21970 if { (eval echo "$as_me:21970: \"$ac_link\"") >&5
21971   (eval $ac_link) 2>&5
21972   ac_status=$?
21973   echo "$as_me:21973: \$? = $ac_status" >&5
21974   (exit "$ac_status"); } &&
21975          { ac_try='test -s "conftest$ac_exeext"'
21976   { (eval echo "$as_me:21976: \"$ac_try\"") >&5
21977   (eval $ac_try) 2>&5
21978   ac_status=$?
21979   echo "$as_me:21979: \$? = $ac_status" >&5
21980   (exit "$ac_status"); }; }; then
21981   cf_cv_cgetent=yes
21982 else
21983   echo "$as_me: failed program was:" >&5
21984 cat "conftest.$ac_ext" >&5
21985 cf_cv_cgetent=no
21986 fi
21987 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21988
21989 fi
21990 echo "$as_me:21990: result: $cf_cv_cgetent" >&5
21991 echo "${ECHO_T}$cf_cv_cgetent" >&6
21992
21993 if test "$cf_cv_cgetent" = yes
21994 then
21995
21996 cat >>confdefs.h <<\EOF
21997 #define HAVE_BSD_CGETENT 1
21998 EOF
21999
22000 echo "$as_me:22000: checking if cgetent uses const parameter" >&5
22001 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
22002 if test "${cf_cv_cgetent_const+set}" = set; then
22003   echo $ECHO_N "(cached) $ECHO_C" >&6
22004 else
22005
22006 cat >"conftest.$ac_ext" <<_ACEOF
22007 #line 22007 "configure"
22008 #include "confdefs.h"
22009
22010 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
22011 #include <stdlib.h>
22012 int
22013 main (void)
22014 {
22015
22016         char temp[128];
22017         char *buf = temp;
22018 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
22019         const char *db_array = temp;
22020         cgetent(&buf, &db_array, "vt100");
22021 #endif
22022         cgetcap(buf, "tc", '=');
22023         cgetmatch(buf, "tc");
22024
22025   ;
22026   return 0;
22027 }
22028 _ACEOF
22029 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22030 if { (eval echo "$as_me:22030: \"$ac_link\"") >&5
22031   (eval $ac_link) 2>&5
22032   ac_status=$?
22033   echo "$as_me:22033: \$? = $ac_status" >&5
22034   (exit "$ac_status"); } &&
22035          { ac_try='test -s "conftest$ac_exeext"'
22036   { (eval echo "$as_me:22036: \"$ac_try\"") >&5
22037   (eval $ac_try) 2>&5
22038   ac_status=$?
22039   echo "$as_me:22039: \$? = $ac_status" >&5
22040   (exit "$ac_status"); }; }; then
22041   cf_cv_cgetent_const=yes
22042 else
22043   echo "$as_me: failed program was:" >&5
22044 cat "conftest.$ac_ext" >&5
22045 cf_cv_cgetent_const=no
22046 fi
22047 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22048
22049 fi
22050 echo "$as_me:22050: result: $cf_cv_cgetent_const" >&5
22051 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22052         if test "$cf_cv_cgetent_const" = yes
22053         then
22054
22055 cat >>confdefs.h <<EOF
22056 #define CGETENT_CONST const
22057 EOF
22058
22059         fi
22060 fi
22061
22062 fi
22063
22064 echo "$as_me:22064: checking for isascii" >&5
22065 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22066 if test "${cf_cv_have_isascii+set}" = set; then
22067   echo $ECHO_N "(cached) $ECHO_C" >&6
22068 else
22069
22070         cat >"conftest.$ac_ext" <<_ACEOF
22071 #line 22071 "configure"
22072 #include "confdefs.h"
22073 #include <ctype.h>
22074 int
22075 main (void)
22076 {
22077 int x = isascii(' ')
22078   ;
22079   return 0;
22080 }
22081 _ACEOF
22082 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22083 if { (eval echo "$as_me:22083: \"$ac_link\"") >&5
22084   (eval $ac_link) 2>&5
22085   ac_status=$?
22086   echo "$as_me:22086: \$? = $ac_status" >&5
22087   (exit "$ac_status"); } &&
22088          { ac_try='test -s "conftest$ac_exeext"'
22089   { (eval echo "$as_me:22089: \"$ac_try\"") >&5
22090   (eval $ac_try) 2>&5
22091   ac_status=$?
22092   echo "$as_me:22092: \$? = $ac_status" >&5
22093   (exit "$ac_status"); }; }; then
22094   cf_cv_have_isascii=yes
22095 else
22096   echo "$as_me: failed program was:" >&5
22097 cat "conftest.$ac_ext" >&5
22098 cf_cv_have_isascii=no
22099 fi
22100 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22101
22102 fi
22103 echo "$as_me:22103: result: $cf_cv_have_isascii" >&5
22104 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22105 test "$cf_cv_have_isascii" = yes &&
22106 cat >>confdefs.h <<\EOF
22107 #define HAVE_ISASCII 1
22108 EOF
22109
22110 if test "$ac_cv_func_sigaction" = yes; then
22111 echo "$as_me:22111: checking whether sigaction needs _POSIX_SOURCE" >&5
22112 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22113 cat >"conftest.$ac_ext" <<_ACEOF
22114 #line 22114 "configure"
22115 #include "confdefs.h"
22116
22117 #include <sys/types.h>
22118 #include <signal.h>
22119 int
22120 main (void)
22121 {
22122 struct sigaction act
22123   ;
22124   return 0;
22125 }
22126 _ACEOF
22127 rm -f "conftest.$ac_objext"
22128 if { (eval echo "$as_me:22128: \"$ac_compile\"") >&5
22129   (eval $ac_compile) 2>&5
22130   ac_status=$?
22131   echo "$as_me:22131: \$? = $ac_status" >&5
22132   (exit "$ac_status"); } &&
22133          { ac_try='test -s "conftest.$ac_objext"'
22134   { (eval echo "$as_me:22134: \"$ac_try\"") >&5
22135   (eval $ac_try) 2>&5
22136   ac_status=$?
22137   echo "$as_me:22137: \$? = $ac_status" >&5
22138   (exit "$ac_status"); }; }; then
22139   sigact_bad=no
22140 else
22141   echo "$as_me: failed program was:" >&5
22142 cat "conftest.$ac_ext" >&5
22143
22144 cat >"conftest.$ac_ext" <<_ACEOF
22145 #line 22145 "configure"
22146 #include "confdefs.h"
22147
22148 #define _POSIX_SOURCE
22149 #include <sys/types.h>
22150 #include <signal.h>
22151 int
22152 main (void)
22153 {
22154 struct sigaction act
22155   ;
22156   return 0;
22157 }
22158 _ACEOF
22159 rm -f "conftest.$ac_objext"
22160 if { (eval echo "$as_me:22160: \"$ac_compile\"") >&5
22161   (eval $ac_compile) 2>&5
22162   ac_status=$?
22163   echo "$as_me:22163: \$? = $ac_status" >&5
22164   (exit "$ac_status"); } &&
22165          { ac_try='test -s "conftest.$ac_objext"'
22166   { (eval echo "$as_me:22166: \"$ac_try\"") >&5
22167   (eval $ac_try) 2>&5
22168   ac_status=$?
22169   echo "$as_me:22169: \$? = $ac_status" >&5
22170   (exit "$ac_status"); }; }; then
22171   sigact_bad=yes
22172
22173 cat >>confdefs.h <<\EOF
22174 #define _POSIX_SOURCE 1
22175 EOF
22176
22177 else
22178   echo "$as_me: failed program was:" >&5
22179 cat "conftest.$ac_ext" >&5
22180 sigact_bad=unknown
22181 fi
22182 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22183 fi
22184 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22185 echo "$as_me:22185: result: $sigact_bad" >&5
22186 echo "${ECHO_T}$sigact_bad" >&6
22187 fi
22188
22189 echo "$as_me:22189: checking if nanosleep really works" >&5
22190 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22191 if test "${cf_cv_func_nanosleep+set}" = set; then
22192   echo $ECHO_N "(cached) $ECHO_C" >&6
22193 else
22194
22195 if test "$cross_compiling" = yes; then
22196   cf_cv_func_nanosleep=unknown
22197 else
22198   cat >"conftest.$ac_ext" <<_ACEOF
22199 #line 22199 "configure"
22200 #include "confdefs.h"
22201
22202 #include <stdio.h>
22203 #include <errno.h>
22204 #include <time.h>
22205
22206 #ifdef HAVE_SYS_TIME_H
22207 #include <sys/time.h>
22208 #endif
22209
22210 int main(void) {
22211         struct timespec ts1, ts2;
22212         int code;
22213         ts1.tv_sec  = 0;
22214         ts1.tv_nsec = 750000000;
22215         ts2.tv_sec  = 0;
22216         ts2.tv_nsec = 0;
22217         errno = 0;
22218         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22219         ${cf_cv_main_return:-return}(code != 0);
22220 }
22221
22222 _ACEOF
22223 rm -f "conftest$ac_exeext"
22224 if { (eval echo "$as_me:22224: \"$ac_link\"") >&5
22225   (eval $ac_link) 2>&5
22226   ac_status=$?
22227   echo "$as_me:22227: \$? = $ac_status" >&5
22228   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22229   { (eval echo "$as_me:22229: \"$ac_try\"") >&5
22230   (eval $ac_try) 2>&5
22231   ac_status=$?
22232   echo "$as_me:22232: \$? = $ac_status" >&5
22233   (exit "$ac_status"); }; }; then
22234   cf_cv_func_nanosleep=yes
22235 else
22236   echo "$as_me: program exited with status $ac_status" >&5
22237 echo "$as_me: failed program was:" >&5
22238 cat "conftest.$ac_ext" >&5
22239 cf_cv_func_nanosleep=no
22240 fi
22241 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22242 fi
22243 fi
22244 echo "$as_me:22244: result: $cf_cv_func_nanosleep" >&5
22245 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22246
22247 test "$cf_cv_func_nanosleep" = "yes" &&
22248 cat >>confdefs.h <<\EOF
22249 #define HAVE_NANOSLEEP 1
22250 EOF
22251
22252 for ac_header in \
22253 termio.h \
22254 termios.h \
22255 unistd.h \
22256 sys/ioctl.h \
22257 sys/termio.h \
22258
22259 do
22260 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22261 echo "$as_me:22261: checking for $ac_header" >&5
22262 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22263 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22264   echo $ECHO_N "(cached) $ECHO_C" >&6
22265 else
22266   cat >"conftest.$ac_ext" <<_ACEOF
22267 #line 22267 "configure"
22268 #include "confdefs.h"
22269 #include <$ac_header>
22270 _ACEOF
22271 if { (eval echo "$as_me:22271: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22272   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22273   ac_status=$?
22274   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22275   rm -f conftest.er1
22276   cat conftest.err >&5
22277   echo "$as_me:22277: \$? = $ac_status" >&5
22278   (exit "$ac_status"); } >/dev/null; then
22279   if test -s conftest.err; then
22280     ac_cpp_err=$ac_c_preproc_warn_flag
22281   else
22282     ac_cpp_err=
22283   fi
22284 else
22285   ac_cpp_err=yes
22286 fi
22287 if test -z "$ac_cpp_err"; then
22288   eval "$as_ac_Header=yes"
22289 else
22290   echo "$as_me: failed program was:" >&5
22291   cat "conftest.$ac_ext" >&5
22292   eval "$as_ac_Header=no"
22293 fi
22294 rm -f conftest.err "conftest.$ac_ext"
22295 fi
22296 echo "$as_me:22296: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22297 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22298 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22299   cat >>confdefs.h <<EOF
22300 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22301 EOF
22302
22303 fi
22304 done
22305
22306 if test "$ac_cv_header_termios_h" = yes ; then
22307         case "$CFLAGS $CPPFLAGS" in
22308         (*-D_POSIX_SOURCE*)
22309                 termios_bad=dunno ;;
22310         (*)     termios_bad=maybe ;;
22311         esac
22312         if test "$termios_bad" = maybe ; then
22313         echo "$as_me:22313: checking whether termios.h needs _POSIX_SOURCE" >&5
22314 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22315         cat >"conftest.$ac_ext" <<_ACEOF
22316 #line 22316 "configure"
22317 #include "confdefs.h"
22318 #include <termios.h>
22319 int
22320 main (void)
22321 {
22322 struct termios foo; int x = foo.c_iflag = 1; (void)x
22323   ;
22324   return 0;
22325 }
22326 _ACEOF
22327 rm -f "conftest.$ac_objext"
22328 if { (eval echo "$as_me:22328: \"$ac_compile\"") >&5
22329   (eval $ac_compile) 2>&5
22330   ac_status=$?
22331   echo "$as_me:22331: \$? = $ac_status" >&5
22332   (exit "$ac_status"); } &&
22333          { ac_try='test -s "conftest.$ac_objext"'
22334   { (eval echo "$as_me:22334: \"$ac_try\"") >&5
22335   (eval $ac_try) 2>&5
22336   ac_status=$?
22337   echo "$as_me:22337: \$? = $ac_status" >&5
22338   (exit "$ac_status"); }; }; then
22339   termios_bad=no
22340 else
22341   echo "$as_me: failed program was:" >&5
22342 cat "conftest.$ac_ext" >&5
22343
22344                 cat >"conftest.$ac_ext" <<_ACEOF
22345 #line 22345 "configure"
22346 #include "confdefs.h"
22347
22348 #define _POSIX_SOURCE
22349 #include <termios.h>
22350 int
22351 main (void)
22352 {
22353 struct termios foo; int x = foo.c_iflag = 2; (void)x
22354   ;
22355   return 0;
22356 }
22357 _ACEOF
22358 rm -f "conftest.$ac_objext"
22359 if { (eval echo "$as_me:22359: \"$ac_compile\"") >&5
22360   (eval $ac_compile) 2>&5
22361   ac_status=$?
22362   echo "$as_me:22362: \$? = $ac_status" >&5
22363   (exit "$ac_status"); } &&
22364          { ac_try='test -s "conftest.$ac_objext"'
22365   { (eval echo "$as_me:22365: \"$ac_try\"") >&5
22366   (eval $ac_try) 2>&5
22367   ac_status=$?
22368   echo "$as_me:22368: \$? = $ac_status" >&5
22369   (exit "$ac_status"); }; }; then
22370   termios_bad=unknown
22371 else
22372   echo "$as_me: failed program was:" >&5
22373 cat "conftest.$ac_ext" >&5
22374 termios_bad=yes
22375 cat >>confdefs.h <<\EOF
22376 #define _POSIX_SOURCE 1
22377 EOF
22378
22379 fi
22380 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22381
22382 fi
22383 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22384         echo "$as_me:22384: result: $termios_bad" >&5
22385 echo "${ECHO_T}$termios_bad" >&6
22386         fi
22387 fi
22388
22389 echo "$as_me:22389: checking for tcgetattr" >&5
22390 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22391 if test "${cf_cv_have_tcgetattr+set}" = set; then
22392   echo $ECHO_N "(cached) $ECHO_C" >&6
22393 else
22394
22395 cat >"conftest.$ac_ext" <<_ACEOF
22396 #line 22396 "configure"
22397 #include "confdefs.h"
22398
22399 #include <sys/types.h>
22400 #ifdef HAVE_UNISTD_H
22401 #include <unistd.h>
22402 #endif
22403 #ifdef HAVE_TERMIOS_H
22404 #include <termios.h>
22405 #define TTY struct termios
22406 #else
22407 #ifdef HAVE_TERMIO_H
22408 #include <termio.h>
22409 #define TTY struct termio
22410 #endif
22411 #endif
22412
22413 int
22414 main (void)
22415 {
22416
22417 TTY foo;
22418 tcgetattr(1, &foo);
22419   ;
22420   return 0;
22421 }
22422 _ACEOF
22423 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22424 if { (eval echo "$as_me:22424: \"$ac_link\"") >&5
22425   (eval $ac_link) 2>&5
22426   ac_status=$?
22427   echo "$as_me:22427: \$? = $ac_status" >&5
22428   (exit "$ac_status"); } &&
22429          { ac_try='test -s "conftest$ac_exeext"'
22430   { (eval echo "$as_me:22430: \"$ac_try\"") >&5
22431   (eval $ac_try) 2>&5
22432   ac_status=$?
22433   echo "$as_me:22433: \$? = $ac_status" >&5
22434   (exit "$ac_status"); }; }; then
22435   cf_cv_have_tcgetattr=yes
22436 else
22437   echo "$as_me: failed program was:" >&5
22438 cat "conftest.$ac_ext" >&5
22439 cf_cv_have_tcgetattr=no
22440 fi
22441 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22442 fi
22443 echo "$as_me:22443: result: $cf_cv_have_tcgetattr" >&5
22444 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22445 test "$cf_cv_have_tcgetattr" = yes &&
22446 cat >>confdefs.h <<\EOF
22447 #define HAVE_TCGETATTR 1
22448 EOF
22449
22450 echo "$as_me:22450: checking for vsscanf function or workaround" >&5
22451 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22452 if test "${cf_cv_func_vsscanf+set}" = set; then
22453   echo $ECHO_N "(cached) $ECHO_C" >&6
22454 else
22455
22456 cat >"conftest.$ac_ext" <<_ACEOF
22457 #line 22457 "configure"
22458 #include "confdefs.h"
22459
22460 #include <stdarg.h>
22461 #include <stdio.h>
22462 int
22463 main (void)
22464 {
22465
22466         va_list ap;
22467         vsscanf("from", "%d", ap)
22468   ;
22469   return 0;
22470 }
22471 _ACEOF
22472 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22473 if { (eval echo "$as_me:22473: \"$ac_link\"") >&5
22474   (eval $ac_link) 2>&5
22475   ac_status=$?
22476   echo "$as_me:22476: \$? = $ac_status" >&5
22477   (exit "$ac_status"); } &&
22478          { ac_try='test -s "conftest$ac_exeext"'
22479   { (eval echo "$as_me:22479: \"$ac_try\"") >&5
22480   (eval $ac_try) 2>&5
22481   ac_status=$?
22482   echo "$as_me:22482: \$? = $ac_status" >&5
22483   (exit "$ac_status"); }; }; then
22484   cf_cv_func_vsscanf=vsscanf
22485 else
22486   echo "$as_me: failed program was:" >&5
22487 cat "conftest.$ac_ext" >&5
22488
22489 cat >"conftest.$ac_ext" <<_ACEOF
22490 #line 22490 "configure"
22491 #include "confdefs.h"
22492
22493 #include <stdarg.h>
22494 #include <stdio.h>
22495 int
22496 main (void)
22497 {
22498
22499         FILE strbuf;
22500         char *str = "from";
22501
22502         strbuf._flag = _IOREAD;
22503         strbuf._ptr = strbuf._base = (unsigned char *) str;
22504         strbuf._cnt = strlen(str);
22505         strbuf._file = _NFILE;
22506         return (vfscanf(&strbuf, "%d", ap))
22507   ;
22508   return 0;
22509 }
22510 _ACEOF
22511 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22512 if { (eval echo "$as_me:22512: \"$ac_link\"") >&5
22513   (eval $ac_link) 2>&5
22514   ac_status=$?
22515   echo "$as_me:22515: \$? = $ac_status" >&5
22516   (exit "$ac_status"); } &&
22517          { ac_try='test -s "conftest$ac_exeext"'
22518   { (eval echo "$as_me:22518: \"$ac_try\"") >&5
22519   (eval $ac_try) 2>&5
22520   ac_status=$?
22521   echo "$as_me:22521: \$? = $ac_status" >&5
22522   (exit "$ac_status"); }; }; then
22523   cf_cv_func_vsscanf=vfscanf
22524 else
22525   echo "$as_me: failed program was:" >&5
22526 cat "conftest.$ac_ext" >&5
22527
22528 cat >"conftest.$ac_ext" <<_ACEOF
22529 #line 22529 "configure"
22530 #include "confdefs.h"
22531
22532 #include <stdarg.h>
22533 #include <stdio.h>
22534 int
22535 main (void)
22536 {
22537
22538         FILE strbuf;
22539         char *str = "from";
22540
22541         strbuf._flag = _IOREAD;
22542         strbuf._ptr = strbuf._base = (unsigned char *) str;
22543         strbuf._cnt = strlen(str);
22544         strbuf._file = _NFILE;
22545         return (_doscan(&strbuf, "%d", ap))
22546   ;
22547   return 0;
22548 }
22549 _ACEOF
22550 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22551 if { (eval echo "$as_me:22551: \"$ac_link\"") >&5
22552   (eval $ac_link) 2>&5
22553   ac_status=$?
22554   echo "$as_me:22554: \$? = $ac_status" >&5
22555   (exit "$ac_status"); } &&
22556          { ac_try='test -s "conftest$ac_exeext"'
22557   { (eval echo "$as_me:22557: \"$ac_try\"") >&5
22558   (eval $ac_try) 2>&5
22559   ac_status=$?
22560   echo "$as_me:22560: \$? = $ac_status" >&5
22561   (exit "$ac_status"); }; }; then
22562   cf_cv_func_vsscanf=_doscan
22563 else
22564   echo "$as_me: failed program was:" >&5
22565 cat "conftest.$ac_ext" >&5
22566
22567 cf_cv_func_vsscanf=no
22568 fi
22569 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22570 fi
22571 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22572 fi
22573 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22574 fi
22575 echo "$as_me:22575: result: $cf_cv_func_vsscanf" >&5
22576 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22577
22578 case "$cf_cv_func_vsscanf" in
22579 (vsscanf)
22580 cat >>confdefs.h <<\EOF
22581 #define HAVE_VSSCANF 1
22582 EOF
22583 ;;
22584 (vfscanf)
22585 cat >>confdefs.h <<\EOF
22586 #define HAVE_VFSCANF 1
22587 EOF
22588 ;;
22589 (_doscan)
22590 cat >>confdefs.h <<\EOF
22591 #define HAVE__DOSCAN 1
22592 EOF
22593 ;;
22594 esac
22595
22596 for ac_header in \
22597 unistd.h \
22598
22599 do
22600 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22601 echo "$as_me:22601: checking for $ac_header" >&5
22602 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22603 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22604   echo $ECHO_N "(cached) $ECHO_C" >&6
22605 else
22606   cat >"conftest.$ac_ext" <<_ACEOF
22607 #line 22607 "configure"
22608 #include "confdefs.h"
22609 #include <$ac_header>
22610 _ACEOF
22611 if { (eval echo "$as_me:22611: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22612   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22613   ac_status=$?
22614   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22615   rm -f conftest.er1
22616   cat conftest.err >&5
22617   echo "$as_me:22617: \$? = $ac_status" >&5
22618   (exit "$ac_status"); } >/dev/null; then
22619   if test -s conftest.err; then
22620     ac_cpp_err=$ac_c_preproc_warn_flag
22621   else
22622     ac_cpp_err=
22623   fi
22624 else
22625   ac_cpp_err=yes
22626 fi
22627 if test -z "$ac_cpp_err"; then
22628   eval "$as_ac_Header=yes"
22629 else
22630   echo "$as_me: failed program was:" >&5
22631   cat "conftest.$ac_ext" >&5
22632   eval "$as_ac_Header=no"
22633 fi
22634 rm -f conftest.err "conftest.$ac_ext"
22635 fi
22636 echo "$as_me:22636: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22637 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22638 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22639   cat >>confdefs.h <<EOF
22640 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22641 EOF
22642
22643 fi
22644 done
22645
22646 echo "$as_me:22646: checking for working mkstemp" >&5
22647 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22648 if test "${cf_cv_func_mkstemp+set}" = set; then
22649   echo $ECHO_N "(cached) $ECHO_C" >&6
22650 else
22651
22652 rm -rf ./conftest*
22653 if test "$cross_compiling" = yes; then
22654   cf_cv_func_mkstemp=maybe
22655 else
22656   cat >"conftest.$ac_ext" <<_ACEOF
22657 #line 22657 "configure"
22658 #include "confdefs.h"
22659
22660 #include <sys/types.h>
22661 #ifdef HAVE_UNISTD_H
22662 #include <unistd.h>
22663 #endif
22664 #include <stdlib.h>
22665 #include <stdio.h>
22666 #include <string.h>
22667 #include <sys/stat.h>
22668 int main(void)
22669 {
22670         char *tmpl = "conftestXXXXXX";
22671         char name[2][80];
22672         int n;
22673         int result = 0;
22674         int fd;
22675         struct stat sb;
22676
22677         umask(077);
22678         for (n = 0; n < 2; ++n) {
22679                 strcpy(name[n], tmpl);
22680                 if ((fd = mkstemp(name[n])) >= 0) {
22681                         if (!strcmp(name[n], tmpl)
22682                          || stat(name[n], &sb) != 0
22683                          || (sb.st_mode & S_IFMT) != S_IFREG
22684                          || (sb.st_mode & 077) != 0) {
22685                                 result = 1;
22686                         }
22687                         close(fd);
22688                 }
22689         }
22690         if (result == 0
22691          && !strcmp(name[0], name[1]))
22692                 result = 1;
22693         ${cf_cv_main_return:-return}(result);
22694 }
22695
22696 _ACEOF
22697 rm -f "conftest$ac_exeext"
22698 if { (eval echo "$as_me:22698: \"$ac_link\"") >&5
22699   (eval $ac_link) 2>&5
22700   ac_status=$?
22701   echo "$as_me:22701: \$? = $ac_status" >&5
22702   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22703   { (eval echo "$as_me:22703: \"$ac_try\"") >&5
22704   (eval $ac_try) 2>&5
22705   ac_status=$?
22706   echo "$as_me:22706: \$? = $ac_status" >&5
22707   (exit "$ac_status"); }; }; then
22708   cf_cv_func_mkstemp=yes
22709
22710 else
22711   echo "$as_me: program exited with status $ac_status" >&5
22712 echo "$as_me: failed program was:" >&5
22713 cat "conftest.$ac_ext" >&5
22714 cf_cv_func_mkstemp=no
22715
22716 fi
22717 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22718 fi
22719
22720 fi
22721 echo "$as_me:22721: result: $cf_cv_func_mkstemp" >&5
22722 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22723 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22724         echo "$as_me:22724: checking for mkstemp" >&5
22725 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22726 if test "${ac_cv_func_mkstemp+set}" = set; then
22727   echo $ECHO_N "(cached) $ECHO_C" >&6
22728 else
22729   cat >"conftest.$ac_ext" <<_ACEOF
22730 #line 22730 "configure"
22731 #include "confdefs.h"
22732 #define mkstemp autoconf_temporary
22733 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22734 #undef mkstemp
22735
22736 #ifdef __cplusplus
22737 extern "C"
22738 #endif
22739
22740 /* We use char because int might match the return type of a gcc2
22741    builtin and then its argument prototype would still apply.  */
22742 char mkstemp (void);
22743
22744 int
22745 main (void)
22746 {
22747
22748 /* The GNU C library defines stubs for functions which it implements
22749     to always fail with ENOSYS.  Some functions are actually named
22750     something starting with __ and the normal name is an alias.  */
22751 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22752 #error found stub for mkstemp
22753 #endif
22754
22755         return mkstemp ();
22756   ;
22757   return 0;
22758 }
22759 _ACEOF
22760 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22761 if { (eval echo "$as_me:22761: \"$ac_link\"") >&5
22762   (eval $ac_link) 2>&5
22763   ac_status=$?
22764   echo "$as_me:22764: \$? = $ac_status" >&5
22765   (exit "$ac_status"); } &&
22766          { ac_try='test -s "conftest$ac_exeext"'
22767   { (eval echo "$as_me:22767: \"$ac_try\"") >&5
22768   (eval $ac_try) 2>&5
22769   ac_status=$?
22770   echo "$as_me:22770: \$? = $ac_status" >&5
22771   (exit "$ac_status"); }; }; then
22772   ac_cv_func_mkstemp=yes
22773 else
22774   echo "$as_me: failed program was:" >&5
22775 cat "conftest.$ac_ext" >&5
22776 ac_cv_func_mkstemp=no
22777 fi
22778 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22779 fi
22780 echo "$as_me:22780: result: $ac_cv_func_mkstemp" >&5
22781 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22782
22783 fi
22784 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22785
22786 cat >>confdefs.h <<\EOF
22787 #define HAVE_MKSTEMP 1
22788 EOF
22789
22790 fi
22791
22792 # setup for prototype of fallback for vsscanf()
22793
22794 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22795         HAVE_VSSCANF=1
22796 else
22797         HAVE_VSSCANF=0
22798 fi
22799
22800 if test "x$cross_compiling" = xyes ; then
22801         { echo "$as_me:22801: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22802 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22803 else
22804         echo "$as_me:22804: checking whether setvbuf arguments are reversed" >&5
22805 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22806 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22807   echo $ECHO_N "(cached) $ECHO_C" >&6
22808 else
22809   if test "$cross_compiling" = yes; then
22810   { { echo "$as_me:22810: error: cannot run test program while cross compiling" >&5
22811 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22812    { (exit 1); exit 1; }; }
22813 else
22814   cat >"conftest.$ac_ext" <<_ACEOF
22815 #line 22815 "configure"
22816 #include "confdefs.h"
22817 #include <stdio.h>
22818 /* If setvbuf has the reversed format, exit 0. */
22819 int
22820 main (void)
22821 {
22822   /* This call has the arguments reversed.
22823      A reversed system may check and see that the address of main
22824      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22825   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22826     $ac_main_return(1);
22827   putc('\r', stdout);
22828   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22829 }
22830 _ACEOF
22831 rm -f "conftest$ac_exeext"
22832 if { (eval echo "$as_me:22832: \"$ac_link\"") >&5
22833   (eval $ac_link) 2>&5
22834   ac_status=$?
22835   echo "$as_me:22835: \$? = $ac_status" >&5
22836   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22837   { (eval echo "$as_me:22837: \"$ac_try\"") >&5
22838   (eval $ac_try) 2>&5
22839   ac_status=$?
22840   echo "$as_me:22840: \$? = $ac_status" >&5
22841   (exit "$ac_status"); }; }; then
22842   ac_cv_func_setvbuf_reversed=yes
22843 else
22844   echo "$as_me: program exited with status $ac_status" >&5
22845 echo "$as_me: failed program was:" >&5
22846 cat "conftest.$ac_ext" >&5
22847 ac_cv_func_setvbuf_reversed=no
22848 fi
22849 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22850 fi
22851 rm -f core ./core.* ./*.core
22852 fi
22853 echo "$as_me:22853: result: $ac_cv_func_setvbuf_reversed" >&5
22854 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22855 if test $ac_cv_func_setvbuf_reversed = yes; then
22856
22857 cat >>confdefs.h <<\EOF
22858 #define SETVBUF_REVERSED 1
22859 EOF
22860
22861 fi
22862
22863 fi
22864 echo "$as_me:22864: checking for intptr_t" >&5
22865 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22866 if test "${ac_cv_type_intptr_t+set}" = set; then
22867   echo $ECHO_N "(cached) $ECHO_C" >&6
22868 else
22869   cat >"conftest.$ac_ext" <<_ACEOF
22870 #line 22870 "configure"
22871 #include "confdefs.h"
22872 $ac_includes_default
22873 int
22874 main (void)
22875 {
22876 if ((intptr_t *) 0)
22877   return 0;
22878 if (sizeof (intptr_t))
22879   return 0;
22880   ;
22881   return 0;
22882 }
22883 _ACEOF
22884 rm -f "conftest.$ac_objext"
22885 if { (eval echo "$as_me:22885: \"$ac_compile\"") >&5
22886   (eval $ac_compile) 2>&5
22887   ac_status=$?
22888   echo "$as_me:22888: \$? = $ac_status" >&5
22889   (exit "$ac_status"); } &&
22890          { ac_try='test -s "conftest.$ac_objext"'
22891   { (eval echo "$as_me:22891: \"$ac_try\"") >&5
22892   (eval $ac_try) 2>&5
22893   ac_status=$?
22894   echo "$as_me:22894: \$? = $ac_status" >&5
22895   (exit "$ac_status"); }; }; then
22896   ac_cv_type_intptr_t=yes
22897 else
22898   echo "$as_me: failed program was:" >&5
22899 cat "conftest.$ac_ext" >&5
22900 ac_cv_type_intptr_t=no
22901 fi
22902 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22903 fi
22904 echo "$as_me:22904: result: $ac_cv_type_intptr_t" >&5
22905 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22906 if test "$ac_cv_type_intptr_t" = yes; then
22907   :
22908 else
22909
22910 cat >>confdefs.h <<EOF
22911 #define intptr_t long
22912 EOF
22913
22914 fi
22915
22916 echo "$as_me:22916: checking for ssize_t" >&5
22917 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22918 if test "${ac_cv_type_ssize_t+set}" = set; then
22919   echo $ECHO_N "(cached) $ECHO_C" >&6
22920 else
22921   cat >"conftest.$ac_ext" <<_ACEOF
22922 #line 22922 "configure"
22923 #include "confdefs.h"
22924 $ac_includes_default
22925 int
22926 main (void)
22927 {
22928 if ((ssize_t *) 0)
22929   return 0;
22930 if (sizeof (ssize_t))
22931   return 0;
22932   ;
22933   return 0;
22934 }
22935 _ACEOF
22936 rm -f "conftest.$ac_objext"
22937 if { (eval echo "$as_me:22937: \"$ac_compile\"") >&5
22938   (eval $ac_compile) 2>&5
22939   ac_status=$?
22940   echo "$as_me:22940: \$? = $ac_status" >&5
22941   (exit "$ac_status"); } &&
22942          { ac_try='test -s "conftest.$ac_objext"'
22943   { (eval echo "$as_me:22943: \"$ac_try\"") >&5
22944   (eval $ac_try) 2>&5
22945   ac_status=$?
22946   echo "$as_me:22946: \$? = $ac_status" >&5
22947   (exit "$ac_status"); }; }; then
22948   ac_cv_type_ssize_t=yes
22949 else
22950   echo "$as_me: failed program was:" >&5
22951 cat "conftest.$ac_ext" >&5
22952 ac_cv_type_ssize_t=no
22953 fi
22954 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22955 fi
22956 echo "$as_me:22956: result: $ac_cv_type_ssize_t" >&5
22957 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22958 if test "$ac_cv_type_ssize_t" = yes; then
22959   :
22960 else
22961
22962 cat >>confdefs.h <<EOF
22963 #define ssize_t int
22964 EOF
22965
22966 fi
22967
22968 echo "$as_me:22968: checking for type sigaction_t" >&5
22969 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22970 if test "${cf_cv_type_sigaction+set}" = set; then
22971   echo $ECHO_N "(cached) $ECHO_C" >&6
22972 else
22973
22974         cat >"conftest.$ac_ext" <<_ACEOF
22975 #line 22975 "configure"
22976 #include "confdefs.h"
22977
22978 #include <signal.h>
22979 int
22980 main (void)
22981 {
22982 sigaction_t x
22983   ;
22984   return 0;
22985 }
22986 _ACEOF
22987 rm -f "conftest.$ac_objext"
22988 if { (eval echo "$as_me:22988: \"$ac_compile\"") >&5
22989   (eval $ac_compile) 2>&5
22990   ac_status=$?
22991   echo "$as_me:22991: \$? = $ac_status" >&5
22992   (exit "$ac_status"); } &&
22993          { ac_try='test -s "conftest.$ac_objext"'
22994   { (eval echo "$as_me:22994: \"$ac_try\"") >&5
22995   (eval $ac_try) 2>&5
22996   ac_status=$?
22997   echo "$as_me:22997: \$? = $ac_status" >&5
22998   (exit "$ac_status"); }; }; then
22999   cf_cv_type_sigaction=yes
23000 else
23001   echo "$as_me: failed program was:" >&5
23002 cat "conftest.$ac_ext" >&5
23003 cf_cv_type_sigaction=no
23004 fi
23005 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23006 fi
23007
23008 echo "$as_me:23008: result: $cf_cv_type_sigaction" >&5
23009 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
23010 test "$cf_cv_type_sigaction" = yes &&
23011 cat >>confdefs.h <<\EOF
23012 #define HAVE_TYPE_SIGACTION 1
23013 EOF
23014
23015 echo "$as_me:23015: checking declaration of size-change" >&5
23016 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
23017 if test "${cf_cv_sizechange+set}" = set; then
23018   echo $ECHO_N "(cached) $ECHO_C" >&6
23019 else
23020
23021         cf_cv_sizechange=unknown
23022         cf_save_CPPFLAGS="$CPPFLAGS"
23023
23024 for cf_opts in "" "NEED_PTEM_H"
23025 do
23026
23027         CPPFLAGS="$cf_save_CPPFLAGS"
23028         if test -n "$cf_opts"
23029         then
23030
23031         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23032         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23033
23034         fi
23035         cat >"conftest.$ac_ext" <<_ACEOF
23036 #line 23036 "configure"
23037 #include "confdefs.h"
23038 #include <sys/types.h>
23039 #ifdef HAVE_TERMIOS_H
23040 #include <termios.h>
23041 #else
23042 #ifdef HAVE_TERMIO_H
23043 #include <termio.h>
23044 #endif
23045 #endif
23046
23047 #ifdef NEED_PTEM_H
23048 /* This is a workaround for SCO:  they neglected to define struct winsize in
23049  * termios.h -- it is only in termio.h and ptem.h
23050  */
23051 #include <sys/stream.h>
23052 #include <sys/ptem.h>
23053 #endif
23054
23055 #ifdef HAVE_SYS_IOCTL_H
23056 #include <sys/ioctl.h>
23057 #endif
23058
23059 int
23060 main (void)
23061 {
23062
23063 #ifdef TIOCGSIZE
23064         struct ttysize win;     /* SunOS 3.0... */
23065         int y = win.ts_lines = 2;
23066         int x = win.ts_cols = 1;
23067         (void)y;
23068         (void)x;
23069 #else
23070 #ifdef TIOCGWINSZ
23071         struct winsize win;     /* everything else */
23072         int y = win.ws_row = 2;
23073         int x = win.ws_col = 1;
23074         (void)y;
23075         (void)x;
23076 #else
23077         no TIOCGSIZE or TIOCGWINSZ
23078 #endif /* TIOCGWINSZ */
23079 #endif /* TIOCGSIZE */
23080
23081   ;
23082   return 0;
23083 }
23084 _ACEOF
23085 rm -f "conftest.$ac_objext"
23086 if { (eval echo "$as_me:23086: \"$ac_compile\"") >&5
23087   (eval $ac_compile) 2>&5
23088   ac_status=$?
23089   echo "$as_me:23089: \$? = $ac_status" >&5
23090   (exit "$ac_status"); } &&
23091          { ac_try='test -s "conftest.$ac_objext"'
23092   { (eval echo "$as_me:23092: \"$ac_try\"") >&5
23093   (eval $ac_try) 2>&5
23094   ac_status=$?
23095   echo "$as_me:23095: \$? = $ac_status" >&5
23096   (exit "$ac_status"); }; }; then
23097   cf_cv_sizechange=yes
23098 else
23099   echo "$as_me: failed program was:" >&5
23100 cat "conftest.$ac_ext" >&5
23101 cf_cv_sizechange=no
23102 fi
23103 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23104
23105         CPPFLAGS="$cf_save_CPPFLAGS"
23106         if test "$cf_cv_sizechange" = yes ; then
23107                 echo "size-change succeeded ($cf_opts)" >&5
23108                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23109                 break
23110         fi
23111 done
23112
23113 fi
23114 echo "$as_me:23114: result: $cf_cv_sizechange" >&5
23115 echo "${ECHO_T}$cf_cv_sizechange" >&6
23116 if test "$cf_cv_sizechange" != no ; then
23117
23118 cat >>confdefs.h <<\EOF
23119 #define HAVE_SIZECHANGE 1
23120 EOF
23121
23122         case "$cf_cv_sizechange" in
23123         (NEED*)
23124                 cat >>confdefs.h <<EOF
23125 #define $cf_cv_sizechange  1
23126 EOF
23127
23128                 ;;
23129         esac
23130 fi
23131
23132 echo "$as_me:23132: checking for memmove" >&5
23133 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23134 if test "${ac_cv_func_memmove+set}" = set; then
23135   echo $ECHO_N "(cached) $ECHO_C" >&6
23136 else
23137   cat >"conftest.$ac_ext" <<_ACEOF
23138 #line 23138 "configure"
23139 #include "confdefs.h"
23140 #define memmove autoconf_temporary
23141 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23142 #undef memmove
23143
23144 #ifdef __cplusplus
23145 extern "C"
23146 #endif
23147
23148 /* We use char because int might match the return type of a gcc2
23149    builtin and then its argument prototype would still apply.  */
23150 char memmove (void);
23151
23152 int
23153 main (void)
23154 {
23155
23156 /* The GNU C library defines stubs for functions which it implements
23157     to always fail with ENOSYS.  Some functions are actually named
23158     something starting with __ and the normal name is an alias.  */
23159 #if defined (__stub_memmove) || defined (__stub___memmove)
23160 #error found stub for memmove
23161 #endif
23162
23163         return memmove ();
23164   ;
23165   return 0;
23166 }
23167 _ACEOF
23168 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23169 if { (eval echo "$as_me:23169: \"$ac_link\"") >&5
23170   (eval $ac_link) 2>&5
23171   ac_status=$?
23172   echo "$as_me:23172: \$? = $ac_status" >&5
23173   (exit "$ac_status"); } &&
23174          { ac_try='test -s "conftest$ac_exeext"'
23175   { (eval echo "$as_me:23175: \"$ac_try\"") >&5
23176   (eval $ac_try) 2>&5
23177   ac_status=$?
23178   echo "$as_me:23178: \$? = $ac_status" >&5
23179   (exit "$ac_status"); }; }; then
23180   ac_cv_func_memmove=yes
23181 else
23182   echo "$as_me: failed program was:" >&5
23183 cat "conftest.$ac_ext" >&5
23184 ac_cv_func_memmove=no
23185 fi
23186 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23187 fi
23188 echo "$as_me:23188: result: $ac_cv_func_memmove" >&5
23189 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23190 if test "$ac_cv_func_memmove" = yes; then
23191   :
23192 else
23193
23194 echo "$as_me:23194: checking for bcopy" >&5
23195 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23196 if test "${ac_cv_func_bcopy+set}" = set; then
23197   echo $ECHO_N "(cached) $ECHO_C" >&6
23198 else
23199   cat >"conftest.$ac_ext" <<_ACEOF
23200 #line 23200 "configure"
23201 #include "confdefs.h"
23202 #define bcopy autoconf_temporary
23203 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23204 #undef bcopy
23205
23206 #ifdef __cplusplus
23207 extern "C"
23208 #endif
23209
23210 /* We use char because int might match the return type of a gcc2
23211    builtin and then its argument prototype would still apply.  */
23212 char bcopy (void);
23213
23214 int
23215 main (void)
23216 {
23217
23218 /* The GNU C library defines stubs for functions which it implements
23219     to always fail with ENOSYS.  Some functions are actually named
23220     something starting with __ and the normal name is an alias.  */
23221 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23222 #error found stub for bcopy
23223 #endif
23224
23225         return bcopy ();
23226   ;
23227   return 0;
23228 }
23229 _ACEOF
23230 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23231 if { (eval echo "$as_me:23231: \"$ac_link\"") >&5
23232   (eval $ac_link) 2>&5
23233   ac_status=$?
23234   echo "$as_me:23234: \$? = $ac_status" >&5
23235   (exit "$ac_status"); } &&
23236          { ac_try='test -s "conftest$ac_exeext"'
23237   { (eval echo "$as_me:23237: \"$ac_try\"") >&5
23238   (eval $ac_try) 2>&5
23239   ac_status=$?
23240   echo "$as_me:23240: \$? = $ac_status" >&5
23241   (exit "$ac_status"); }; }; then
23242   ac_cv_func_bcopy=yes
23243 else
23244   echo "$as_me: failed program was:" >&5
23245 cat "conftest.$ac_ext" >&5
23246 ac_cv_func_bcopy=no
23247 fi
23248 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23249 fi
23250 echo "$as_me:23250: result: $ac_cv_func_bcopy" >&5
23251 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23252 if test "$ac_cv_func_bcopy" = yes; then
23253
23254         echo "$as_me:23254: checking if bcopy does overlapping moves" >&5
23255 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23256 if test "${cf_cv_good_bcopy+set}" = set; then
23257   echo $ECHO_N "(cached) $ECHO_C" >&6
23258 else
23259
23260                 if test "$cross_compiling" = yes; then
23261   cf_cv_good_bcopy=unknown
23262 else
23263   cat >"conftest.$ac_ext" <<_ACEOF
23264 #line 23264 "configure"
23265 #include "confdefs.h"
23266
23267 int main(void) {
23268         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23269         char temp[40];
23270         bcopy(data, temp, sizeof(data));
23271         bcopy(temp+10, temp, 15);
23272         bcopy(temp+5, temp+15, 10);
23273         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23274 }
23275
23276 _ACEOF
23277 rm -f "conftest$ac_exeext"
23278 if { (eval echo "$as_me:23278: \"$ac_link\"") >&5
23279   (eval $ac_link) 2>&5
23280   ac_status=$?
23281   echo "$as_me:23281: \$? = $ac_status" >&5
23282   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23283   { (eval echo "$as_me:23283: \"$ac_try\"") >&5
23284   (eval $ac_try) 2>&5
23285   ac_status=$?
23286   echo "$as_me:23286: \$? = $ac_status" >&5
23287   (exit "$ac_status"); }; }; then
23288   cf_cv_good_bcopy=yes
23289 else
23290   echo "$as_me: program exited with status $ac_status" >&5
23291 echo "$as_me: failed program was:" >&5
23292 cat "conftest.$ac_ext" >&5
23293 cf_cv_good_bcopy=no
23294 fi
23295 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23296 fi
23297
23298 fi
23299 echo "$as_me:23299: result: $cf_cv_good_bcopy" >&5
23300 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23301
23302 else
23303   cf_cv_good_bcopy=no
23304 fi
23305
23306         if test "$cf_cv_good_bcopy" = yes ; then
23307
23308 cat >>confdefs.h <<\EOF
23309 #define USE_OK_BCOPY 1
23310 EOF
23311
23312         else
23313
23314 cat >>confdefs.h <<\EOF
23315 #define USE_MY_MEMMOVE 1
23316 EOF
23317
23318         fi
23319
23320 fi
23321
23322 tty >/dev/null 2>&1 || {
23323 for ac_func in posix_openpt
23324 do
23325 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23326 echo "$as_me:23326: checking for $ac_func" >&5
23327 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23328 if eval "test \"\${$as_ac_var+set}\" = set"; then
23329   echo $ECHO_N "(cached) $ECHO_C" >&6
23330 else
23331   cat >"conftest.$ac_ext" <<_ACEOF
23332 #line 23332 "configure"
23333 #include "confdefs.h"
23334 #define $ac_func autoconf_temporary
23335 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23336 #undef $ac_func
23337
23338 #ifdef __cplusplus
23339 extern "C"
23340 #endif
23341
23342 /* We use char because int might match the return type of a gcc2
23343    builtin and then its argument prototype would still apply.  */
23344 char $ac_func (void);
23345
23346 int
23347 main (void)
23348 {
23349
23350 /* The GNU C library defines stubs for functions which it implements
23351     to always fail with ENOSYS.  Some functions are actually named
23352     something starting with __ and the normal name is an alias.  */
23353 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23354 #error found stub for $ac_func
23355 #endif
23356
23357         return $ac_func ();
23358   ;
23359   return 0;
23360 }
23361 _ACEOF
23362 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23363 if { (eval echo "$as_me:23363: \"$ac_link\"") >&5
23364   (eval $ac_link) 2>&5
23365   ac_status=$?
23366   echo "$as_me:23366: \$? = $ac_status" >&5
23367   (exit "$ac_status"); } &&
23368          { ac_try='test -s "conftest$ac_exeext"'
23369   { (eval echo "$as_me:23369: \"$ac_try\"") >&5
23370   (eval $ac_try) 2>&5
23371   ac_status=$?
23372   echo "$as_me:23372: \$? = $ac_status" >&5
23373   (exit "$ac_status"); }; }; then
23374   eval "$as_ac_var=yes"
23375 else
23376   echo "$as_me: failed program was:" >&5
23377 cat "conftest.$ac_ext" >&5
23378 eval "$as_ac_var=no"
23379 fi
23380 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23381 fi
23382 echo "$as_me:23382: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23383 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23384 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23385   cat >>confdefs.h <<EOF
23386 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23387 EOF
23388
23389 fi
23390 done
23391  }
23392 echo "$as_me:23392: checking if poll really works" >&5
23393 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23394 if test "${cf_cv_working_poll+set}" = set; then
23395   echo $ECHO_N "(cached) $ECHO_C" >&6
23396 else
23397
23398 if test "$cross_compiling" = yes; then
23399   cf_cv_working_poll=unknown
23400 else
23401   cat >"conftest.$ac_ext" <<_ACEOF
23402 #line 23402 "configure"
23403 #include "confdefs.h"
23404
23405 #include <stdlib.h>
23406 #include <stdio.h>
23407 #include <unistd.h>
23408 #include <fcntl.h>
23409 #ifdef HAVE_POLL_H
23410 #include <poll.h>
23411 #else
23412 #include <sys/poll.h>
23413 #endif
23414 int main(void) {
23415         struct pollfd myfds;
23416         int ret;
23417
23418         /* check for Darwin bug with respect to "devices" */
23419         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23420         if (myfds.fd < 0)
23421                 myfds.fd = 0;
23422         myfds.events = POLLIN;
23423         myfds.revents = 0;
23424
23425         ret = poll(&myfds, 1, 100);
23426
23427         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23428                 ret = -1;
23429         } else {
23430                 int fd = 0;
23431                 if (!isatty(fd)) {
23432                         fd = open("/dev/tty", 2);       /* O_RDWR */
23433                 }
23434 #ifdef HAVE_POSIX_OPENPT
23435                 if (fd < 0) {
23436                         fd = posix_openpt(O_RDWR);
23437                 }
23438 #endif
23439
23440                 if (fd >= 0) {
23441                         /* also check with standard input */
23442                         myfds.fd = fd;
23443                         myfds.events = POLLIN;
23444                         myfds.revents = 0;
23445                         ret = poll(&myfds, 1, 100);
23446                 } else {
23447                         ret = -1;
23448                 }
23449         }
23450         ${cf_cv_main_return:-return}(ret < 0);
23451 }
23452 _ACEOF
23453 rm -f "conftest$ac_exeext"
23454 if { (eval echo "$as_me:23454: \"$ac_link\"") >&5
23455   (eval $ac_link) 2>&5
23456   ac_status=$?
23457   echo "$as_me:23457: \$? = $ac_status" >&5
23458   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23459   { (eval echo "$as_me:23459: \"$ac_try\"") >&5
23460   (eval $ac_try) 2>&5
23461   ac_status=$?
23462   echo "$as_me:23462: \$? = $ac_status" >&5
23463   (exit "$ac_status"); }; }; then
23464   cf_cv_working_poll=yes
23465 else
23466   echo "$as_me: program exited with status $ac_status" >&5
23467 echo "$as_me: failed program was:" >&5
23468 cat "conftest.$ac_ext" >&5
23469 cf_cv_working_poll=no
23470 fi
23471 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23472 fi
23473 fi
23474 echo "$as_me:23474: result: $cf_cv_working_poll" >&5
23475 echo "${ECHO_T}$cf_cv_working_poll" >&6
23476 test "$cf_cv_working_poll" = "yes" &&
23477 cat >>confdefs.h <<\EOF
23478 #define HAVE_WORKING_POLL 1
23479 EOF
23480
23481 echo "$as_me:23481: checking for va_copy" >&5
23482 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23483 if test "${cf_cv_have_va_copy+set}" = set; then
23484   echo $ECHO_N "(cached) $ECHO_C" >&6
23485 else
23486
23487 cat >"conftest.$ac_ext" <<_ACEOF
23488 #line 23488 "configure"
23489 #include "confdefs.h"
23490
23491 #include <stdarg.h>
23492
23493 int
23494 main (void)
23495 {
23496
23497         static va_list dst;
23498         static va_list src;
23499         va_copy(dst, src)
23500   ;
23501   return 0;
23502 }
23503 _ACEOF
23504 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23505 if { (eval echo "$as_me:23505: \"$ac_link\"") >&5
23506   (eval $ac_link) 2>&5
23507   ac_status=$?
23508   echo "$as_me:23508: \$? = $ac_status" >&5
23509   (exit "$ac_status"); } &&
23510          { ac_try='test -s "conftest$ac_exeext"'
23511   { (eval echo "$as_me:23511: \"$ac_try\"") >&5
23512   (eval $ac_try) 2>&5
23513   ac_status=$?
23514   echo "$as_me:23514: \$? = $ac_status" >&5
23515   (exit "$ac_status"); }; }; then
23516   cf_cv_have_va_copy=yes
23517 else
23518   echo "$as_me: failed program was:" >&5
23519 cat "conftest.$ac_ext" >&5
23520 cf_cv_have_va_copy=no
23521 fi
23522 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23523 fi
23524 echo "$as_me:23524: result: $cf_cv_have_va_copy" >&5
23525 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23526
23527 if test "$cf_cv_have_va_copy" = yes;
23528 then
23529
23530 cat >>confdefs.h <<\EOF
23531 #define HAVE_VA_COPY 1
23532 EOF
23533
23534 else # !cf_cv_have_va_copy
23535
23536 echo "$as_me:23536: checking for __va_copy" >&5
23537 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23538 if test "${cf_cv_have___va_copy+set}" = set; then
23539   echo $ECHO_N "(cached) $ECHO_C" >&6
23540 else
23541
23542 cat >"conftest.$ac_ext" <<_ACEOF
23543 #line 23543 "configure"
23544 #include "confdefs.h"
23545
23546 #include <stdarg.h>
23547
23548 int
23549 main (void)
23550 {
23551
23552         static va_list dst;
23553         static va_list src;
23554         __va_copy(dst, src)
23555   ;
23556   return 0;
23557 }
23558 _ACEOF
23559 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23560 if { (eval echo "$as_me:23560: \"$ac_link\"") >&5
23561   (eval $ac_link) 2>&5
23562   ac_status=$?
23563   echo "$as_me:23563: \$? = $ac_status" >&5
23564   (exit "$ac_status"); } &&
23565          { ac_try='test -s "conftest$ac_exeext"'
23566   { (eval echo "$as_me:23566: \"$ac_try\"") >&5
23567   (eval $ac_try) 2>&5
23568   ac_status=$?
23569   echo "$as_me:23569: \$? = $ac_status" >&5
23570   (exit "$ac_status"); }; }; then
23571   cf_cv_have___va_copy=yes
23572 else
23573   echo "$as_me: failed program was:" >&5
23574 cat "conftest.$ac_ext" >&5
23575 cf_cv_have___va_copy=no
23576 fi
23577 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23578 fi
23579 echo "$as_me:23579: result: $cf_cv_have___va_copy" >&5
23580 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23581
23582 if test "$cf_cv_have___va_copy" = yes
23583 then
23584
23585 cat >>confdefs.h <<\EOF
23586 #define HAVE___VA_COPY 1
23587 EOF
23588
23589 else # !cf_cv_have___va_copy
23590
23591 echo "$as_me:23591: checking for __builtin_va_copy" >&5
23592 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23593 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23594   echo $ECHO_N "(cached) $ECHO_C" >&6
23595 else
23596
23597 cat >"conftest.$ac_ext" <<_ACEOF
23598 #line 23598 "configure"
23599 #include "confdefs.h"
23600
23601 #include <stdarg.h>
23602
23603 int
23604 main (void)
23605 {
23606
23607         static va_list dst;
23608         static va_list src;
23609         __builtin_va_copy(dst, src)
23610   ;
23611   return 0;
23612 }
23613 _ACEOF
23614 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23615 if { (eval echo "$as_me:23615: \"$ac_link\"") >&5
23616   (eval $ac_link) 2>&5
23617   ac_status=$?
23618   echo "$as_me:23618: \$? = $ac_status" >&5
23619   (exit "$ac_status"); } &&
23620          { ac_try='test -s "conftest$ac_exeext"'
23621   { (eval echo "$as_me:23621: \"$ac_try\"") >&5
23622   (eval $ac_try) 2>&5
23623   ac_status=$?
23624   echo "$as_me:23624: \$? = $ac_status" >&5
23625   (exit "$ac_status"); }; }; then
23626   cf_cv_have___builtin_va_copy=yes
23627 else
23628   echo "$as_me: failed program was:" >&5
23629 cat "conftest.$ac_ext" >&5
23630 cf_cv_have___builtin_va_copy=no
23631 fi
23632 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23633 fi
23634 echo "$as_me:23634: result: $cf_cv_have___builtin_va_copy" >&5
23635 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23636
23637 test "$cf_cv_have___builtin_va_copy" = yes &&
23638
23639 cat >>confdefs.h <<\EOF
23640 #define HAVE___BUILTIN_VA_COPY 1
23641 EOF
23642
23643 fi # cf_cv_have___va_copy
23644
23645 fi # cf_cv_have_va_copy
23646
23647 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23648 (*yes*)
23649         ;;
23650
23651 (*)
23652         echo "$as_me:23652: checking if we can simply copy va_list" >&5
23653 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23654 if test "${cf_cv_pointer_va_list+set}" = set; then
23655   echo $ECHO_N "(cached) $ECHO_C" >&6
23656 else
23657
23658 cat >"conftest.$ac_ext" <<_ACEOF
23659 #line 23659 "configure"
23660 #include "confdefs.h"
23661
23662 #include <stdarg.h>
23663
23664 int
23665 main (void)
23666 {
23667
23668         va_list dst;
23669         va_list src;
23670         dst = src
23671   ;
23672   return 0;
23673 }
23674 _ACEOF
23675 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23676 if { (eval echo "$as_me:23676: \"$ac_link\"") >&5
23677   (eval $ac_link) 2>&5
23678   ac_status=$?
23679   echo "$as_me:23679: \$? = $ac_status" >&5
23680   (exit "$ac_status"); } &&
23681          { ac_try='test -s "conftest$ac_exeext"'
23682   { (eval echo "$as_me:23682: \"$ac_try\"") >&5
23683   (eval $ac_try) 2>&5
23684   ac_status=$?
23685   echo "$as_me:23685: \$? = $ac_status" >&5
23686   (exit "$ac_status"); }; }; then
23687   cf_cv_pointer_va_list=yes
23688 else
23689   echo "$as_me: failed program was:" >&5
23690 cat "conftest.$ac_ext" >&5
23691 cf_cv_pointer_va_list=no
23692 fi
23693 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23694 fi
23695 echo "$as_me:23695: result: $cf_cv_pointer_va_list" >&5
23696 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23697
23698         if test "$cf_cv_pointer_va_list" = no
23699         then
23700                 echo "$as_me:23700: checking if we can copy va_list indirectly" >&5
23701 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23702 if test "${cf_cv_array_va_list+set}" = set; then
23703   echo $ECHO_N "(cached) $ECHO_C" >&6
23704 else
23705
23706 cat >"conftest.$ac_ext" <<_ACEOF
23707 #line 23707 "configure"
23708 #include "confdefs.h"
23709
23710 #include <stdarg.h>
23711
23712 int
23713 main (void)
23714 {
23715
23716         va_list dst;
23717         va_list src;
23718         *dst = *src
23719   ;
23720   return 0;
23721 }
23722 _ACEOF
23723 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23724 if { (eval echo "$as_me:23724: \"$ac_link\"") >&5
23725   (eval $ac_link) 2>&5
23726   ac_status=$?
23727   echo "$as_me:23727: \$? = $ac_status" >&5
23728   (exit "$ac_status"); } &&
23729          { ac_try='test -s "conftest$ac_exeext"'
23730   { (eval echo "$as_me:23730: \"$ac_try\"") >&5
23731   (eval $ac_try) 2>&5
23732   ac_status=$?
23733   echo "$as_me:23733: \$? = $ac_status" >&5
23734   (exit "$ac_status"); }; }; then
23735   cf_cv_array_va_list=yes
23736 else
23737   echo "$as_me: failed program was:" >&5
23738 cat "conftest.$ac_ext" >&5
23739 cf_cv_array_va_list=no
23740 fi
23741 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23742 fi
23743 echo "$as_me:23743: result: $cf_cv_array_va_list" >&5
23744 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23745                 test "$cf_cv_array_va_list" = yes &&
23746 cat >>confdefs.h <<\EOF
23747 #define ARRAY_VA_LIST 1
23748 EOF
23749
23750         fi
23751         ;;
23752 esac
23753
23754 echo "$as_me:23754: checking for pid_t" >&5
23755 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23756 if test "${ac_cv_type_pid_t+set}" = set; then
23757   echo $ECHO_N "(cached) $ECHO_C" >&6
23758 else
23759   cat >"conftest.$ac_ext" <<_ACEOF
23760 #line 23760 "configure"
23761 #include "confdefs.h"
23762 $ac_includes_default
23763 int
23764 main (void)
23765 {
23766 if ((pid_t *) 0)
23767   return 0;
23768 if (sizeof (pid_t))
23769   return 0;
23770   ;
23771   return 0;
23772 }
23773 _ACEOF
23774 rm -f "conftest.$ac_objext"
23775 if { (eval echo "$as_me:23775: \"$ac_compile\"") >&5
23776   (eval $ac_compile) 2>&5
23777   ac_status=$?
23778   echo "$as_me:23778: \$? = $ac_status" >&5
23779   (exit "$ac_status"); } &&
23780          { ac_try='test -s "conftest.$ac_objext"'
23781   { (eval echo "$as_me:23781: \"$ac_try\"") >&5
23782   (eval $ac_try) 2>&5
23783   ac_status=$?
23784   echo "$as_me:23784: \$? = $ac_status" >&5
23785   (exit "$ac_status"); }; }; then
23786   ac_cv_type_pid_t=yes
23787 else
23788   echo "$as_me: failed program was:" >&5
23789 cat "conftest.$ac_ext" >&5
23790 ac_cv_type_pid_t=no
23791 fi
23792 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23793 fi
23794 echo "$as_me:23794: result: $ac_cv_type_pid_t" >&5
23795 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23796 if test "$ac_cv_type_pid_t" = yes; then
23797   :
23798 else
23799
23800 cat >>confdefs.h <<EOF
23801 #define pid_t int
23802 EOF
23803
23804 fi
23805
23806 for ac_header in unistd.h vfork.h
23807 do
23808 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23809 echo "$as_me:23809: checking for $ac_header" >&5
23810 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23811 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23812   echo $ECHO_N "(cached) $ECHO_C" >&6
23813 else
23814   cat >"conftest.$ac_ext" <<_ACEOF
23815 #line 23815 "configure"
23816 #include "confdefs.h"
23817 #include <$ac_header>
23818 _ACEOF
23819 if { (eval echo "$as_me:23819: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23820   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23821   ac_status=$?
23822   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23823   rm -f conftest.er1
23824   cat conftest.err >&5
23825   echo "$as_me:23825: \$? = $ac_status" >&5
23826   (exit "$ac_status"); } >/dev/null; then
23827   if test -s conftest.err; then
23828     ac_cpp_err=$ac_c_preproc_warn_flag
23829   else
23830     ac_cpp_err=
23831   fi
23832 else
23833   ac_cpp_err=yes
23834 fi
23835 if test -z "$ac_cpp_err"; then
23836   eval "$as_ac_Header=yes"
23837 else
23838   echo "$as_me: failed program was:" >&5
23839   cat "conftest.$ac_ext" >&5
23840   eval "$as_ac_Header=no"
23841 fi
23842 rm -f conftest.err "conftest.$ac_ext"
23843 fi
23844 echo "$as_me:23844: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23845 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23846 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23847   cat >>confdefs.h <<EOF
23848 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23849 EOF
23850
23851 fi
23852 done
23853
23854 for ac_func in fork vfork
23855 do
23856 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23857 echo "$as_me:23857: checking for $ac_func" >&5
23858 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23859 if eval "test \"\${$as_ac_var+set}\" = set"; then
23860   echo $ECHO_N "(cached) $ECHO_C" >&6
23861 else
23862   cat >"conftest.$ac_ext" <<_ACEOF
23863 #line 23863 "configure"
23864 #include "confdefs.h"
23865 #define $ac_func autoconf_temporary
23866 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23867 #undef $ac_func
23868
23869 #ifdef __cplusplus
23870 extern "C"
23871 #endif
23872
23873 /* We use char because int might match the return type of a gcc2
23874    builtin and then its argument prototype would still apply.  */
23875 char $ac_func (void);
23876
23877 int
23878 main (void)
23879 {
23880
23881 /* The GNU C library defines stubs for functions which it implements
23882     to always fail with ENOSYS.  Some functions are actually named
23883     something starting with __ and the normal name is an alias.  */
23884 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23885 #error found stub for $ac_func
23886 #endif
23887
23888         return $ac_func ();
23889   ;
23890   return 0;
23891 }
23892 _ACEOF
23893 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23894 if { (eval echo "$as_me:23894: \"$ac_link\"") >&5
23895   (eval $ac_link) 2>&5
23896   ac_status=$?
23897   echo "$as_me:23897: \$? = $ac_status" >&5
23898   (exit "$ac_status"); } &&
23899          { ac_try='test -s "conftest$ac_exeext"'
23900   { (eval echo "$as_me:23900: \"$ac_try\"") >&5
23901   (eval $ac_try) 2>&5
23902   ac_status=$?
23903   echo "$as_me:23903: \$? = $ac_status" >&5
23904   (exit "$ac_status"); }; }; then
23905   eval "$as_ac_var=yes"
23906 else
23907   echo "$as_me: failed program was:" >&5
23908 cat "conftest.$ac_ext" >&5
23909 eval "$as_ac_var=no"
23910 fi
23911 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23912 fi
23913 echo "$as_me:23913: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23914 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23915 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23916   cat >>confdefs.h <<EOF
23917 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23918 EOF
23919
23920 fi
23921 done
23922
23923 ac_cv_func_fork_works=$ac_cv_func_fork
23924 if test "x$ac_cv_func_fork" = xyes; then
23925   echo "$as_me:23925: checking for working fork" >&5
23926 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23927 if test "${ac_cv_func_fork_works+set}" = set; then
23928   echo $ECHO_N "(cached) $ECHO_C" >&6
23929 else
23930   if test "$cross_compiling" = yes; then
23931   ac_cv_func_fork_works=cross
23932 else
23933   cat >"conftest.$ac_ext" <<_ACEOF
23934 /* By Rüdiger Kuhlmann. */
23935       #include <sys/types.h>
23936       #if HAVE_UNISTD_H
23937       # include <unistd.h>
23938       #endif
23939       /* Some systems only have a dummy stub for fork() */
23940       int main (void)
23941       {
23942         if (fork() < 0)
23943           $ac_main_return (1);
23944         $ac_main_return (0);
23945       }
23946 _ACEOF
23947 rm -f "conftest$ac_exeext"
23948 if { (eval echo "$as_me:23948: \"$ac_link\"") >&5
23949   (eval $ac_link) 2>&5
23950   ac_status=$?
23951   echo "$as_me:23951: \$? = $ac_status" >&5
23952   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23953   { (eval echo "$as_me:23953: \"$ac_try\"") >&5
23954   (eval $ac_try) 2>&5
23955   ac_status=$?
23956   echo "$as_me:23956: \$? = $ac_status" >&5
23957   (exit "$ac_status"); }; }; then
23958   ac_cv_func_fork_works=yes
23959 else
23960   echo "$as_me: program exited with status $ac_status" >&5
23961 echo "$as_me: failed program was:" >&5
23962 cat "conftest.$ac_ext" >&5
23963 ac_cv_func_fork_works=no
23964 fi
23965 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23966 fi
23967 fi
23968 echo "$as_me:23968: result: $ac_cv_func_fork_works" >&5
23969 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23970
23971 fi
23972 if test "x$ac_cv_func_fork_works" = xcross; then
23973   case $host in
23974     *-*-amigaos* | *-*-msdosdjgpp*)
23975       # Override, as these systems have only a dummy fork() stub
23976       ac_cv_func_fork_works=no
23977       ;;
23978     *)
23979       ac_cv_func_fork_works=yes
23980       ;;
23981   esac
23982   { echo "$as_me:23982: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23983 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23984 fi
23985 ac_cv_func_vfork_works=$ac_cv_func_vfork
23986 if test "x$ac_cv_func_vfork" = xyes; then
23987   echo "$as_me:23987: checking for working vfork" >&5
23988 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23989 if test "${ac_cv_func_vfork_works+set}" = set; then
23990   echo $ECHO_N "(cached) $ECHO_C" >&6
23991 else
23992   if test "$cross_compiling" = yes; then
23993   ac_cv_func_vfork_works=cross
23994 else
23995   cat >"conftest.$ac_ext" <<_ACEOF
23996 #line 23996 "configure"
23997 #include "confdefs.h"
23998 /* Thanks to Paul Eggert for this test.  */
23999 #include <stdio.h>
24000 #include <sys/types.h>
24001 #include <sys/stat.h>
24002 #if HAVE_UNISTD_H
24003 # include <unistd.h>
24004 #endif
24005 #if HAVE_VFORK_H
24006 # include <vfork.h>
24007 #endif
24008 /* On some sparc systems, changes by the child to local and incoming
24009    argument registers are propagated back to the parent.  The compiler
24010    is told about this with #include <vfork.h>, but some compilers
24011    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
24012    static variable whose address is put into a register that is
24013    clobbered by the vfork.  */
24014 static
24015 #ifdef __cplusplus
24016 sparc_address_test (int arg)
24017 # else
24018 sparc_address_test (arg) int arg;
24019 #endif
24020 {
24021   static pid_t child;
24022   if (!child) {
24023     child = vfork ();
24024     if (child < 0) {
24025       perror ("vfork");
24026       _exit(2);
24027     }
24028     if (!child) {
24029       arg = getpid();
24030       write(-1, "", 0);
24031       _exit (arg);
24032     }
24033   }
24034 }
24035
24036 int
24037 main (void)
24038 {
24039   pid_t parent = getpid ();
24040   pid_t child;
24041
24042   sparc_address_test ();
24043
24044   child = vfork ();
24045
24046   if (child == 0) {
24047     /* Here is another test for sparc vfork register problems.  This
24048        test uses lots of local variables, at least as many local
24049        variables as main has allocated so far including compiler
24050        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24051        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24052        reuse the register of parent for one of the local variables,
24053        since it will think that parent can't possibly be used any more
24054        in this routine.  Assigning to the local variable will thus
24055        munge parent in the parent process.  */
24056     pid_t
24057       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24058       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24059     /* Convince the compiler that p..p7 are live; otherwise, it might
24060        use the same hardware register for all 8 local variables.  */
24061     if (p != p1 || p != p2 || p != p3 || p != p4
24062         || p != p5 || p != p6 || p != p7)
24063       _exit(1);
24064
24065     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24066        from child file descriptors.  If the child closes a descriptor
24067        before it execs or exits, this munges the parent's descriptor
24068        as well.  Test for this by closing stdout in the child.  */
24069     _exit(close(fileno(stdout)) != 0);
24070   } else {
24071     int status;
24072     struct stat st;
24073
24074     while (wait(&status) != child)
24075       ;
24076     $ac_main_return(
24077          /* Was there some problem with vforking?  */
24078          child < 0
24079
24080          /* Did the child fail?  (This shouldn't happen.)  */
24081          || status
24082
24083          /* Did the vfork/compiler bug occur?  */
24084          || parent != getpid()
24085
24086          /* Did the file descriptor bug occur?  */
24087          || fstat(fileno(stdout), &st) != 0
24088          );
24089   }
24090 }
24091 _ACEOF
24092 rm -f "conftest$ac_exeext"
24093 if { (eval echo "$as_me:24093: \"$ac_link\"") >&5
24094   (eval $ac_link) 2>&5
24095   ac_status=$?
24096   echo "$as_me:24096: \$? = $ac_status" >&5
24097   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24098   { (eval echo "$as_me:24098: \"$ac_try\"") >&5
24099   (eval $ac_try) 2>&5
24100   ac_status=$?
24101   echo "$as_me:24101: \$? = $ac_status" >&5
24102   (exit "$ac_status"); }; }; then
24103   ac_cv_func_vfork_works=yes
24104 else
24105   echo "$as_me: program exited with status $ac_status" >&5
24106 echo "$as_me: failed program was:" >&5
24107 cat "conftest.$ac_ext" >&5
24108 ac_cv_func_vfork_works=no
24109 fi
24110 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24111 fi
24112 fi
24113 echo "$as_me:24113: result: $ac_cv_func_vfork_works" >&5
24114 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24115
24116 fi;
24117 if test "x$ac_cv_func_fork_works" = xcross; then
24118   ac_cv_func_vfork_works=ac_cv_func_vfork
24119   { echo "$as_me:24119: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24120 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24121 fi
24122
24123 if test "x$ac_cv_func_vfork_works" = xyes; then
24124
24125 cat >>confdefs.h <<\EOF
24126 #define HAVE_WORKING_VFORK 1
24127 EOF
24128
24129 else
24130
24131 cat >>confdefs.h <<\EOF
24132 #define vfork fork
24133 EOF
24134
24135 fi
24136 if test "x$ac_cv_func_fork_works" = xyes; then
24137
24138 cat >>confdefs.h <<\EOF
24139 #define HAVE_WORKING_FORK 1
24140 EOF
24141
24142 fi
24143
24144 echo "$as_me:24144: checking if fopen accepts explicit binary mode" >&5
24145 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24146 if test "${cf_cv_fopen_bin_r+set}" = set; then
24147   echo $ECHO_N "(cached) $ECHO_C" >&6
24148 else
24149
24150         if test "$cross_compiling" = yes; then
24151   cf_cv_fopen_bin_r=unknown
24152 else
24153   cat >"conftest.$ac_ext" <<_ACEOF
24154 #line 24154 "configure"
24155 #include "confdefs.h"
24156
24157 #include <stdio.h>
24158 int main(void) {
24159         FILE *fp = fopen("conftest.tmp", "wb");
24160         int rc = 0;
24161         if (fp != 0) {
24162                 int p, q;
24163                 for (p = 0; p < 256; ++p) {
24164                         fputc(p, fp);
24165                 }
24166                 fclose(fp);
24167                 fp = fopen("conftest.tmp", "rb");
24168                 if (fp != 0) {
24169                         for (p = 0; p < 256; ++p) {
24170                                 q = fgetc(fp);
24171                                 if (q != p) {
24172                                         rc = 1;
24173                                         break;
24174                                 }
24175                         }
24176                 } else {
24177                         rc = 1;
24178                 }
24179         } else {
24180                 rc = 1;
24181         }
24182         ${cf_cv_main_return:-return} (rc);
24183 }
24184
24185 _ACEOF
24186 rm -f "conftest$ac_exeext"
24187 if { (eval echo "$as_me:24187: \"$ac_link\"") >&5
24188   (eval $ac_link) 2>&5
24189   ac_status=$?
24190   echo "$as_me:24190: \$? = $ac_status" >&5
24191   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24192   { (eval echo "$as_me:24192: \"$ac_try\"") >&5
24193   (eval $ac_try) 2>&5
24194   ac_status=$?
24195   echo "$as_me:24195: \$? = $ac_status" >&5
24196   (exit "$ac_status"); }; }; then
24197   cf_cv_fopen_bin_r=yes
24198 else
24199   echo "$as_me: program exited with status $ac_status" >&5
24200 echo "$as_me: failed program was:" >&5
24201 cat "conftest.$ac_ext" >&5
24202 cf_cv_fopen_bin_r=no
24203 fi
24204 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24205 fi
24206
24207 fi
24208 echo "$as_me:24208: result: $cf_cv_fopen_bin_r" >&5
24209 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24210 test "x$cf_cv_fopen_bin_r" != xno &&
24211 cat >>confdefs.h <<\EOF
24212 #define USE_FOPEN_BIN_R 1
24213 EOF
24214
24215 # special check for test/ditto.c
24216
24217 echo "$as_me:24217: checking for openpty in -lutil" >&5
24218 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24219 if test "${ac_cv_lib_util_openpty+set}" = set; then
24220   echo $ECHO_N "(cached) $ECHO_C" >&6
24221 else
24222   ac_check_lib_save_LIBS=$LIBS
24223 LIBS="-lutil  $LIBS"
24224 cat >"conftest.$ac_ext" <<_ACEOF
24225 #line 24225 "configure"
24226 #include "confdefs.h"
24227
24228 /* Override any gcc2 internal prototype to avoid an error.  */
24229 #ifdef __cplusplus
24230 extern "C"
24231 #endif
24232 /* We use char because int might match the return type of a gcc2
24233    builtin and then its argument prototype would still apply.  */
24234 char openpty ();
24235 int
24236 main (void)
24237 {
24238 openpty ();
24239   ;
24240   return 0;
24241 }
24242 _ACEOF
24243 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24244 if { (eval echo "$as_me:24244: \"$ac_link\"") >&5
24245   (eval $ac_link) 2>&5
24246   ac_status=$?
24247   echo "$as_me:24247: \$? = $ac_status" >&5
24248   (exit "$ac_status"); } &&
24249          { ac_try='test -s "conftest$ac_exeext"'
24250   { (eval echo "$as_me:24250: \"$ac_try\"") >&5
24251   (eval $ac_try) 2>&5
24252   ac_status=$?
24253   echo "$as_me:24253: \$? = $ac_status" >&5
24254   (exit "$ac_status"); }; }; then
24255   ac_cv_lib_util_openpty=yes
24256 else
24257   echo "$as_me: failed program was:" >&5
24258 cat "conftest.$ac_ext" >&5
24259 ac_cv_lib_util_openpty=no
24260 fi
24261 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24262 LIBS=$ac_check_lib_save_LIBS
24263 fi
24264 echo "$as_me:24264: result: $ac_cv_lib_util_openpty" >&5
24265 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24266 if test "$ac_cv_lib_util_openpty" = yes; then
24267   cf_cv_lib_util=yes
24268 else
24269   cf_cv_lib_util=no
24270 fi
24271
24272 echo "$as_me:24272: checking for openpty header" >&5
24273 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24274 if test "${cf_cv_func_openpty+set}" = set; then
24275   echo $ECHO_N "(cached) $ECHO_C" >&6
24276 else
24277
24278         cf_save_LIBS="$LIBS"
24279         test "$cf_cv_lib_util" = yes && {
24280 cf_add_libs="$LIBS"
24281 # reverse order
24282 cf_add_0lib=
24283 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24284 # filter duplicates
24285 for cf_add_1lib in $cf_add_0lib; do
24286         for cf_add_2lib in $cf_add_libs; do
24287                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24288                         cf_add_1lib=
24289                         break
24290                 fi
24291         done
24292         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24293 done
24294 LIBS="$cf_add_libs"
24295  }
24296         for cf_header in pty.h libutil.h util.h
24297         do
24298         cat >"conftest.$ac_ext" <<_ACEOF
24299 #line 24299 "configure"
24300 #include "confdefs.h"
24301
24302 #include <$cf_header>
24303
24304 int
24305 main (void)
24306 {
24307
24308         int x = openpty((int *)0, (int *)0, (char *)0,
24309                                    (struct termios *)0, (struct winsize *)0);
24310
24311   ;
24312   return 0;
24313 }
24314 _ACEOF
24315 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24316 if { (eval echo "$as_me:24316: \"$ac_link\"") >&5
24317   (eval $ac_link) 2>&5
24318   ac_status=$?
24319   echo "$as_me:24319: \$? = $ac_status" >&5
24320   (exit "$ac_status"); } &&
24321          { ac_try='test -s "conftest$ac_exeext"'
24322   { (eval echo "$as_me:24322: \"$ac_try\"") >&5
24323   (eval $ac_try) 2>&5
24324   ac_status=$?
24325   echo "$as_me:24325: \$? = $ac_status" >&5
24326   (exit "$ac_status"); }; }; then
24327
24328                 cf_cv_func_openpty=$cf_header
24329                 break
24330
24331 else
24332   echo "$as_me: failed program was:" >&5
24333 cat "conftest.$ac_ext" >&5
24334
24335                 cf_cv_func_openpty=no
24336
24337 fi
24338 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24339         done
24340         LIBS="$cf_save_LIBS"
24341
24342 fi
24343 echo "$as_me:24343: result: $cf_cv_func_openpty" >&5
24344 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24345
24346 if test "$cf_cv_func_openpty" != no ; then
24347
24348 cat >>confdefs.h <<EOF
24349 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24350 EOF
24351
24352 cat >>confdefs.h <<\EOF
24353 #define USE_XTERM_PTY 1
24354 EOF
24355
24356         if test "x$cf_cv_lib_util" = xyes ; then
24357
24358 cf_add_libs="$TEST_LIBS"
24359 # reverse order
24360 cf_add_0lib=
24361 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24362 # filter duplicates
24363 for cf_add_1lib in $cf_add_0lib; do
24364         for cf_add_2lib in $cf_add_libs; do
24365                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24366                         cf_add_1lib=
24367                         break
24368                 fi
24369         done
24370         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24371 done
24372 TEST_LIBS="$cf_add_libs"
24373
24374         fi
24375 fi
24376
24377 if test "$with_hashed_db" != no ; then
24378
24379 cat >>confdefs.h <<\EOF
24380 #define USE_HASHED_DB 1
24381 EOF
24382
24383 case $with_hashed_db in
24384 (yes|*able*)
24385         ;;
24386 (*)
24387         if test -d "$with_hashed_db" ; then
24388
24389 if test -n "$with_hashed_db/include" ; then
24390   for cf_add_incdir in $with_hashed_db/include
24391   do
24392         while test "$cf_add_incdir" != /usr/include
24393         do
24394           if test -d "$cf_add_incdir"
24395           then
24396                 cf_have_incdir=no
24397                 if test -n "$CFLAGS$CPPFLAGS" ; then
24398                   # a loop is needed to ensure we can add subdirs of existing dirs
24399                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24400                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24401                           cf_have_incdir=yes; break
24402                         fi
24403                   done
24404                 fi
24405
24406                 if test "$cf_have_incdir" = no ; then
24407                   if test "$cf_add_incdir" = /usr/local/include ; then
24408                         if test "$GCC" = yes
24409                         then
24410                           cf_save_CPPFLAGS=$CPPFLAGS
24411
24412         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24413         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24414
24415                           cat >"conftest.$ac_ext" <<_ACEOF
24416 #line 24416 "configure"
24417 #include "confdefs.h"
24418 #include <stdio.h>
24419 int
24420 main (void)
24421 {
24422 printf("Hello")
24423   ;
24424   return 0;
24425 }
24426 _ACEOF
24427 rm -f "conftest.$ac_objext"
24428 if { (eval echo "$as_me:24428: \"$ac_compile\"") >&5
24429   (eval $ac_compile) 2>&5
24430   ac_status=$?
24431   echo "$as_me:24431: \$? = $ac_status" >&5
24432   (exit "$ac_status"); } &&
24433          { ac_try='test -s "conftest.$ac_objext"'
24434   { (eval echo "$as_me:24434: \"$ac_try\"") >&5
24435   (eval $ac_try) 2>&5
24436   ac_status=$?
24437   echo "$as_me:24437: \$? = $ac_status" >&5
24438   (exit "$ac_status"); }; }; then
24439   :
24440 else
24441   echo "$as_me: failed program was:" >&5
24442 cat "conftest.$ac_ext" >&5
24443 cf_have_incdir=yes
24444 fi
24445 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24446                           CPPFLAGS=$cf_save_CPPFLAGS
24447                         fi
24448                   fi
24449                 fi
24450
24451                 if test "$cf_have_incdir" = no ; then
24452                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24453
24454 echo "${as_me:-configure}:24454: testing adding $cf_add_incdir to include-path ..." 1>&5
24455
24456                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24457
24458                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24459                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24460                   cf_add_incdir="$cf_top_incdir"
24461                 else
24462                   break
24463                 fi
24464           else
24465                 break
24466           fi
24467         done
24468   done
24469 fi
24470
24471 if test -n "$with_hashed_db/lib" ; then
24472         for cf_add_libdir in $with_hashed_db/lib
24473         do
24474                 if test "$cf_add_libdir" = /usr/lib ; then
24475                         :
24476                 elif test -d "$cf_add_libdir"
24477                 then
24478                         cf_have_libdir=no
24479                         if test -n "$LDFLAGS$LIBS" ; then
24480                                 # a loop is needed to ensure we can add subdirs of existing dirs
24481                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24482                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24483                                                 cf_have_libdir=yes; break
24484                                         fi
24485                                 done
24486                         fi
24487                         if test "$cf_have_libdir" = no ; then
24488                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24489
24490 echo "${as_me:-configure}:24490: testing adding $cf_add_libdir to library-path ..." 1>&5
24491
24492                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24493                         fi
24494                 fi
24495         done
24496 fi
24497
24498         else
24499                 case "$with_hashed_db" in
24500                 (./*|../*|/*)
24501                         { echo "$as_me:24501: WARNING: no such directory $with_hashed_db" >&5
24502 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24503                         ;;
24504                 (*)
24505
24506 cf_search=
24507
24508 test "x$prefix" != "xNONE" && \
24509 test -d "$prefix" && \
24510  {
24511         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24512         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24513         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24514         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24515         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24516         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24517 }
24518
24519 for cf_subdir_prefix in \
24520         /usr \
24521         /usr/local \
24522         /usr/pkg \
24523         /opt \
24524         /opt/local \
24525         $HOME
24526 do
24527
24528 test "x$cf_subdir_prefix" != "x$prefix" && \
24529 test -d "$cf_subdir_prefix" && \
24530 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24531         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24532         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24533         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24534         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24535         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24536         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"
24537 }
24538
24539 done
24540
24541         for cf_item in $cf_search
24542         do
24543                 case "$cf_item" in
24544                 (*/$with_hashed_db)
24545
24546 if test -n "$cf_item" ; then
24547   for cf_add_incdir in $cf_item
24548   do
24549         while test "$cf_add_incdir" != /usr/include
24550         do
24551           if test -d "$cf_add_incdir"
24552           then
24553                 cf_have_incdir=no
24554                 if test -n "$CFLAGS$CPPFLAGS" ; then
24555                   # a loop is needed to ensure we can add subdirs of existing dirs
24556                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24557                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24558                           cf_have_incdir=yes; break
24559                         fi
24560                   done
24561                 fi
24562
24563                 if test "$cf_have_incdir" = no ; then
24564                   if test "$cf_add_incdir" = /usr/local/include ; then
24565                         if test "$GCC" = yes
24566                         then
24567                           cf_save_CPPFLAGS=$CPPFLAGS
24568
24569         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24570         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24571
24572                           cat >"conftest.$ac_ext" <<_ACEOF
24573 #line 24573 "configure"
24574 #include "confdefs.h"
24575 #include <stdio.h>
24576 int
24577 main (void)
24578 {
24579 printf("Hello")
24580   ;
24581   return 0;
24582 }
24583 _ACEOF
24584 rm -f "conftest.$ac_objext"
24585 if { (eval echo "$as_me:24585: \"$ac_compile\"") >&5
24586   (eval $ac_compile) 2>&5
24587   ac_status=$?
24588   echo "$as_me:24588: \$? = $ac_status" >&5
24589   (exit "$ac_status"); } &&
24590          { ac_try='test -s "conftest.$ac_objext"'
24591   { (eval echo "$as_me:24591: \"$ac_try\"") >&5
24592   (eval $ac_try) 2>&5
24593   ac_status=$?
24594   echo "$as_me:24594: \$? = $ac_status" >&5
24595   (exit "$ac_status"); }; }; then
24596   :
24597 else
24598   echo "$as_me: failed program was:" >&5
24599 cat "conftest.$ac_ext" >&5
24600 cf_have_incdir=yes
24601 fi
24602 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24603                           CPPFLAGS=$cf_save_CPPFLAGS
24604                         fi
24605                   fi
24606                 fi
24607
24608                 if test "$cf_have_incdir" = no ; then
24609                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24610
24611 echo "${as_me:-configure}:24611: testing adding $cf_add_incdir to include-path ..." 1>&5
24612
24613                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24614
24615                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24616                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24617                   cf_add_incdir="$cf_top_incdir"
24618                 else
24619                   break
24620                 fi
24621           else
24622                 break
24623           fi
24624         done
24625   done
24626 fi
24627
24628                         ;;
24629                 esac
24630         done
24631
24632 cf_search=
24633
24634 test "x$prefix" != "xNONE" && \
24635 test -d "$prefix" && \
24636  {
24637         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24638         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24639         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24640         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24641         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24642         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24643 }
24644
24645 for cf_subdir_prefix in \
24646         /usr \
24647         /usr/local \
24648         /usr/pkg \
24649         /opt \
24650         /opt/local \
24651         $HOME
24652 do
24653
24654 test "x$cf_subdir_prefix" != "x$prefix" && \
24655 test -d "$cf_subdir_prefix" && \
24656 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24657         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24658         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24659         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24660         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24661         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24662         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"
24663 }
24664
24665 done
24666
24667         for cf_item in $cf_search
24668         do
24669                 case "$cf_item" in
24670                 (*/$with_hashed_db)
24671
24672 if test -n "$cf_item" ; then
24673         for cf_add_libdir in $cf_item
24674         do
24675                 if test "$cf_add_libdir" = /usr/lib ; then
24676                         :
24677                 elif test -d "$cf_add_libdir"
24678                 then
24679                         cf_have_libdir=no
24680                         if test -n "$LDFLAGS$LIBS" ; then
24681                                 # a loop is needed to ensure we can add subdirs of existing dirs
24682                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24683                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24684                                                 cf_have_libdir=yes; break
24685                                         fi
24686                                 done
24687                         fi
24688                         if test "$cf_have_libdir" = no ; then
24689                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24690
24691 echo "${as_me:-configure}:24691: testing adding $cf_add_libdir to library-path ..." 1>&5
24692
24693                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24694                         fi
24695                 fi
24696         done
24697 fi
24698
24699                         ;;
24700                 esac
24701         done
24702
24703                         ;;
24704                 esac
24705         fi
24706 esac
24707
24708 echo "$as_me:24708: checking for db.h" >&5
24709 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24710 if test "${ac_cv_header_db_h+set}" = set; then
24711   echo $ECHO_N "(cached) $ECHO_C" >&6
24712 else
24713   cat >"conftest.$ac_ext" <<_ACEOF
24714 #line 24714 "configure"
24715 #include "confdefs.h"
24716 #include <db.h>
24717 _ACEOF
24718 if { (eval echo "$as_me:24718: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24719   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24720   ac_status=$?
24721   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24722   rm -f conftest.er1
24723   cat conftest.err >&5
24724   echo "$as_me:24724: \$? = $ac_status" >&5
24725   (exit "$ac_status"); } >/dev/null; then
24726   if test -s conftest.err; then
24727     ac_cpp_err=$ac_c_preproc_warn_flag
24728   else
24729     ac_cpp_err=
24730   fi
24731 else
24732   ac_cpp_err=yes
24733 fi
24734 if test -z "$ac_cpp_err"; then
24735   ac_cv_header_db_h=yes
24736 else
24737   echo "$as_me: failed program was:" >&5
24738   cat "conftest.$ac_ext" >&5
24739   ac_cv_header_db_h=no
24740 fi
24741 rm -f conftest.err "conftest.$ac_ext"
24742 fi
24743 echo "$as_me:24743: result: $ac_cv_header_db_h" >&5
24744 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24745 if test "$ac_cv_header_db_h" = yes; then
24746
24747 echo "$as_me:24747: checking for version of db" >&5
24748 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24749 if test "${cf_cv_hashed_db_version+set}" = set; then
24750   echo $ECHO_N "(cached) $ECHO_C" >&6
24751 else
24752
24753 cf_cv_hashed_db_version=unknown
24754
24755 for cf_db_version in 1 2 3 4 5 6
24756 do
24757
24758 echo "${as_me:-configure}:24758: testing checking for db version $cf_db_version ..." 1>&5
24759
24760         cat >"conftest.$ac_ext" <<_ACEOF
24761 #line 24761 "configure"
24762 #include "confdefs.h"
24763
24764 $ac_includes_default
24765 #include <db.h>
24766
24767 #ifdef DB_VERSION_MAJOR
24768         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24769 #if $cf_db_version == DB_VERSION_MAJOR
24770         /* ok */
24771 #else
24772         make an error
24773 #endif
24774 #else
24775 #if $cf_db_version == 1
24776         /* ok: assuming this is DB 1.8.5 */
24777 #else
24778         make an error
24779 #endif
24780 #endif
24781
24782 int
24783 main (void)
24784 {
24785 DBT *foo = 0
24786   ;
24787   return 0;
24788 }
24789 _ACEOF
24790 rm -f "conftest.$ac_objext"
24791 if { (eval echo "$as_me:24791: \"$ac_compile\"") >&5
24792   (eval $ac_compile) 2>&5
24793   ac_status=$?
24794   echo "$as_me:24794: \$? = $ac_status" >&5
24795   (exit "$ac_status"); } &&
24796          { ac_try='test -s "conftest.$ac_objext"'
24797   { (eval echo "$as_me:24797: \"$ac_try\"") >&5
24798   (eval $ac_try) 2>&5
24799   ac_status=$?
24800   echo "$as_me:24800: \$? = $ac_status" >&5
24801   (exit "$ac_status"); }; }; then
24802
24803         cf_cv_hashed_db_version=$cf_db_version
24804         break
24805
24806 else
24807   echo "$as_me: failed program was:" >&5
24808 cat "conftest.$ac_ext" >&5
24809 fi
24810 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24811 done
24812
24813 fi
24814 echo "$as_me:24814: result: $cf_cv_hashed_db_version" >&5
24815 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24816
24817 if test "$cf_cv_hashed_db_version" = unknown ; then
24818         { { echo "$as_me:24818: error: Cannot determine version of db" >&5
24819 echo "$as_me: error: Cannot determine version of db" >&2;}
24820    { (exit 1); exit 1; }; }
24821 else
24822
24823 echo "$as_me:24823: checking for db libraries" >&5
24824 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24825 if test "${cf_cv_hashed_db_libs+set}" = set; then
24826   echo $ECHO_N "(cached) $ECHO_C" >&6
24827 else
24828
24829 cf_cv_hashed_db_libs=unknown
24830 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24831 do
24832         cf_save_libs="$LIBS"
24833         if test -n "$cf_db_libs"; then
24834
24835 cf_add_libs="$LIBS"
24836 # reverse order
24837 cf_add_0lib=
24838 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24839 # filter duplicates
24840 for cf_add_1lib in $cf_add_0lib; do
24841         for cf_add_2lib in $cf_add_libs; do
24842                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24843                         cf_add_1lib=
24844                         break
24845                 fi
24846         done
24847         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24848 done
24849 LIBS="$cf_add_libs"
24850
24851         fi
24852
24853 echo "${as_me:-configure}:24853: testing checking for library $cf_db_libs ..." 1>&5
24854
24855         cat >"conftest.$ac_ext" <<_ACEOF
24856 #line 24856 "configure"
24857 #include "confdefs.h"
24858
24859 $ac_includes_default
24860 #include <db.h>
24861
24862 int
24863 main (void)
24864 {
24865
24866         char *path = "/tmp/foo";
24867 #ifdef DB_VERSION_MAJOR
24868 #if DB_VERSION_MAJOR >= 4
24869         DB *result = 0;
24870         db_create(&result, NULL, 0);
24871         result->open(result,
24872                 NULL,
24873                 path,
24874                 path,
24875                 DB_HASH,
24876                 DB_CREATE,
24877                 0644);
24878 #elif DB_VERSION_MAJOR >= 3
24879         DB *result = 0;
24880         db_create(&result, NULL, 0);
24881         result->open(result,
24882                 path,
24883                 path,
24884                 DB_HASH,
24885                 DB_CREATE,
24886                 0644);
24887 #elif DB_VERSION_MAJOR >= 2
24888         DB *result = 0;
24889         db_open(path,
24890                 DB_HASH,
24891                 DB_CREATE,
24892                 0644,
24893                 (DB_ENV *) 0,
24894                 (DB_INFO *) 0,
24895                 &result);
24896 #endif /* DB_VERSION_MAJOR */
24897 #else
24898         DB *result = dbopen(path,
24899                      2,
24900                      0644,
24901                      DB_HASH,
24902                      0);
24903 #endif
24904         ${cf_cv_main_return:-return}(result != 0)
24905
24906   ;
24907   return 0;
24908 }
24909 _ACEOF
24910 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24911 if { (eval echo "$as_me:24911: \"$ac_link\"") >&5
24912   (eval $ac_link) 2>&5
24913   ac_status=$?
24914   echo "$as_me:24914: \$? = $ac_status" >&5
24915   (exit "$ac_status"); } &&
24916          { ac_try='test -s "conftest$ac_exeext"'
24917   { (eval echo "$as_me:24917: \"$ac_try\"") >&5
24918   (eval $ac_try) 2>&5
24919   ac_status=$?
24920   echo "$as_me:24920: \$? = $ac_status" >&5
24921   (exit "$ac_status"); }; }; then
24922
24923         if test -n "$cf_db_libs" ; then
24924                 cf_cv_hashed_db_libs=$cf_db_libs
24925         else
24926                 cf_cv_hashed_db_libs=default
24927         fi
24928         LIBS="$cf_save_libs"
24929         break
24930
24931 else
24932   echo "$as_me: failed program was:" >&5
24933 cat "conftest.$ac_ext" >&5
24934 fi
24935 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24936         LIBS="$cf_save_libs"
24937 done
24938
24939 fi
24940 echo "$as_me:24940: result: $cf_cv_hashed_db_libs" >&5
24941 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24942
24943         if test "$cf_cv_hashed_db_libs" = unknown ; then
24944                 { { echo "$as_me:24944: error: Cannot determine library for db" >&5
24945 echo "$as_me: error: Cannot determine library for db" >&2;}
24946    { (exit 1); exit 1; }; }
24947         elif test "$cf_cv_hashed_db_libs" != default ; then
24948
24949 cf_add_libs="$LIBS"
24950 # reverse order
24951 cf_add_0lib=
24952 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24953 # filter duplicates
24954 for cf_add_1lib in $cf_add_0lib; do
24955         for cf_add_2lib in $cf_add_libs; do
24956                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24957                         cf_add_1lib=
24958                         break
24959                 fi
24960         done
24961         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24962 done
24963 LIBS="$cf_add_libs"
24964
24965         fi
24966 fi
24967
24968 else
24969
24970         { { echo "$as_me:24970: error: Cannot find db.h" >&5
24971 echo "$as_me: error: Cannot find db.h" >&2;}
24972    { (exit 1); exit 1; }; }
24973
24974 fi
24975
24976 fi
24977
24978 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24979         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24980         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24981 fi
24982
24983 # Just in case, check if the C compiler has a bool type.
24984
24985 echo "$as_me:24985: checking if we should include stdbool.h" >&5
24986 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24987
24988 if test "${cf_cv_header_stdbool_h+set}" = set; then
24989   echo $ECHO_N "(cached) $ECHO_C" >&6
24990 else
24991
24992         cat >"conftest.$ac_ext" <<_ACEOF
24993 #line 24993 "configure"
24994 #include "confdefs.h"
24995
24996 int
24997 main (void)
24998 {
24999 bool foo = false
25000   ;
25001   return 0;
25002 }
25003 _ACEOF
25004 rm -f "conftest.$ac_objext"
25005 if { (eval echo "$as_me:25005: \"$ac_compile\"") >&5
25006   (eval $ac_compile) 2>&5
25007   ac_status=$?
25008   echo "$as_me:25008: \$? = $ac_status" >&5
25009   (exit "$ac_status"); } &&
25010          { ac_try='test -s "conftest.$ac_objext"'
25011   { (eval echo "$as_me:25011: \"$ac_try\"") >&5
25012   (eval $ac_try) 2>&5
25013   ac_status=$?
25014   echo "$as_me:25014: \$? = $ac_status" >&5
25015   (exit "$ac_status"); }; }; then
25016   cf_cv_header_stdbool_h=0
25017 else
25018   echo "$as_me: failed program was:" >&5
25019 cat "conftest.$ac_ext" >&5
25020 cat >"conftest.$ac_ext" <<_ACEOF
25021 #line 25021 "configure"
25022 #include "confdefs.h"
25023
25024 #ifndef __BEOS__
25025 #include <stdbool.h>
25026 #endif
25027
25028 int
25029 main (void)
25030 {
25031 bool foo = false
25032   ;
25033   return 0;
25034 }
25035 _ACEOF
25036 rm -f "conftest.$ac_objext"
25037 if { (eval echo "$as_me:25037: \"$ac_compile\"") >&5
25038   (eval $ac_compile) 2>&5
25039   ac_status=$?
25040   echo "$as_me:25040: \$? = $ac_status" >&5
25041   (exit "$ac_status"); } &&
25042          { ac_try='test -s "conftest.$ac_objext"'
25043   { (eval echo "$as_me:25043: \"$ac_try\"") >&5
25044   (eval $ac_try) 2>&5
25045   ac_status=$?
25046   echo "$as_me:25046: \$? = $ac_status" >&5
25047   (exit "$ac_status"); }; }; then
25048   cf_cv_header_stdbool_h=1
25049 else
25050   echo "$as_me: failed program was:" >&5
25051 cat "conftest.$ac_ext" >&5
25052 cf_cv_header_stdbool_h=0
25053 fi
25054 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25055 fi
25056 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25057 fi
25058
25059 if test "$cf_cv_header_stdbool_h" = 1
25060 then    echo "$as_me:25060: result: yes" >&5
25061 echo "${ECHO_T}yes" >&6
25062 else    echo "$as_me:25062: result: no" >&5
25063 echo "${ECHO_T}no" >&6
25064 fi
25065
25066 echo "$as_me:25066: checking for builtin bool type" >&5
25067 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25068
25069 if test "${cf_cv_cc_bool_type+set}" = set; then
25070   echo $ECHO_N "(cached) $ECHO_C" >&6
25071 else
25072
25073         cat >"conftest.$ac_ext" <<_ACEOF
25074 #line 25074 "configure"
25075 #include "confdefs.h"
25076
25077 #include <stdio.h>
25078 #include <sys/types.h>
25079
25080 int
25081 main (void)
25082 {
25083 bool x = false
25084   ;
25085   return 0;
25086 }
25087 _ACEOF
25088 rm -f "conftest.$ac_objext"
25089 if { (eval echo "$as_me:25089: \"$ac_compile\"") >&5
25090   (eval $ac_compile) 2>&5
25091   ac_status=$?
25092   echo "$as_me:25092: \$? = $ac_status" >&5
25093   (exit "$ac_status"); } &&
25094          { ac_try='test -s "conftest.$ac_objext"'
25095   { (eval echo "$as_me:25095: \"$ac_try\"") >&5
25096   (eval $ac_try) 2>&5
25097   ac_status=$?
25098   echo "$as_me:25098: \$? = $ac_status" >&5
25099   (exit "$ac_status"); }; }; then
25100   cf_cv_cc_bool_type=1
25101 else
25102   echo "$as_me: failed program was:" >&5
25103 cat "conftest.$ac_ext" >&5
25104 cf_cv_cc_bool_type=0
25105 fi
25106 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25107
25108 fi
25109
25110 if test "$cf_cv_cc_bool_type" = 1
25111 then    echo "$as_me:25111: result: yes" >&5
25112 echo "${ECHO_T}yes" >&6
25113 else    echo "$as_me:25113: result: no" >&5
25114 echo "${ECHO_T}no" >&6
25115 fi
25116
25117 # Check for C++ compiler characteristics (and ensure that it's there!)
25118 if test -n "$CXX" ; then
25119         ac_ext=cc
25120 ac_cpp='$CXXCPP $CPPFLAGS'
25121 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25122 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25123 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25124 ac_main_return="return"
25125
25126 if test -n "$GXX" ; then
25127
25128         cf_save="$LIBS"
25129         LIBS="$LIBS $CXXLIBS"
25130         echo "$as_me:25130: checking if we already have C++ library" >&5
25131 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25132         cat >"conftest.$ac_ext" <<_ACEOF
25133 #line 25133 "configure"
25134 #include "confdefs.h"
25135
25136                         #include <iostream>
25137 int
25138 main (void)
25139 {
25140
25141                         std::cout << "Hello World!" << std::endl;
25142   ;
25143   return 0;
25144 }
25145 _ACEOF
25146 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25147 if { (eval echo "$as_me:25147: \"$ac_link\"") >&5
25148   (eval $ac_link) 2>&5
25149   ac_status=$?
25150   echo "$as_me:25150: \$? = $ac_status" >&5
25151   (exit "$ac_status"); } &&
25152          { ac_try='test -s "conftest$ac_exeext"'
25153   { (eval echo "$as_me:25153: \"$ac_try\"") >&5
25154   (eval $ac_try) 2>&5
25155   ac_status=$?
25156   echo "$as_me:25156: \$? = $ac_status" >&5
25157   (exit "$ac_status"); }; }; then
25158   cf_have_libstdcpp=yes
25159 else
25160   echo "$as_me: failed program was:" >&5
25161 cat "conftest.$ac_ext" >&5
25162 cf_have_libstdcpp=no
25163 fi
25164 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25165         echo "$as_me:25165: result: $cf_have_libstdcpp" >&5
25166 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25167         LIBS="$cf_save"
25168
25169         if test "$cf_have_libstdcpp" != yes
25170         then
25171                 case "$cf_cv_system_name" in
25172                 (os2*)
25173                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25174                                 cf_stdcpp_libname=stdcpp
25175                         else
25176                                 cf_stdcpp_libname=stdc++
25177                         fi
25178                         ;;
25179                 (*)
25180                         cf_stdcpp_libname=stdc++
25181                         ;;
25182                 esac
25183
25184                 echo "$as_me:25184: checking for library $cf_stdcpp_libname" >&5
25185 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25186 if test "${cf_cv_libstdcpp+set}" = set; then
25187   echo $ECHO_N "(cached) $ECHO_C" >&6
25188 else
25189
25190                         cf_save="$LIBS"
25191                         LIBS="$LIBS $CXXLIBS"
25192
25193 cf_add_libs="$LIBS"
25194 # reverse order
25195 cf_add_0lib=
25196 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25197 # filter duplicates
25198 for cf_add_1lib in $cf_add_0lib; do
25199         for cf_add_2lib in $cf_add_libs; do
25200                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25201                         cf_add_1lib=
25202                         break
25203                 fi
25204         done
25205         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25206 done
25207 LIBS="$cf_add_libs"
25208
25209                 cat >"conftest.$ac_ext" <<_ACEOF
25210 #line 25210 "configure"
25211 #include "confdefs.h"
25212
25213                                 #include <iostream>
25214 int
25215 main (void)
25216 {
25217
25218                                 std::cout << "Hello World!" << std::endl;
25219   ;
25220   return 0;
25221 }
25222 _ACEOF
25223 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25224 if { (eval echo "$as_me:25224: \"$ac_link\"") >&5
25225   (eval $ac_link) 2>&5
25226   ac_status=$?
25227   echo "$as_me:25227: \$? = $ac_status" >&5
25228   (exit "$ac_status"); } &&
25229          { ac_try='test -s "conftest$ac_exeext"'
25230   { (eval echo "$as_me:25230: \"$ac_try\"") >&5
25231   (eval $ac_try) 2>&5
25232   ac_status=$?
25233   echo "$as_me:25233: \$? = $ac_status" >&5
25234   (exit "$ac_status"); }; }; then
25235   cf_cv_libstdcpp=yes
25236 else
25237   echo "$as_me: failed program was:" >&5
25238 cat "conftest.$ac_ext" >&5
25239 cf_cv_libstdcpp=no
25240 fi
25241 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25242                         LIBS="$cf_save"
25243
25244 fi
25245 echo "$as_me:25245: result: $cf_cv_libstdcpp" >&5
25246 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25247                 test "$cf_cv_libstdcpp" = yes && {
25248 cf_add_libs="$CXXLIBS"
25249 # reverse order
25250 cf_add_0lib=
25251 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25252 # filter duplicates
25253 for cf_add_1lib in $cf_add_0lib; do
25254         for cf_add_2lib in $cf_add_libs; do
25255                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25256                         cf_add_1lib=
25257                         break
25258                 fi
25259         done
25260         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25261 done
25262 CXXLIBS="$cf_add_libs"
25263  }
25264         fi
25265 fi
25266
25267         echo "$as_me:25267: checking whether $CXX understands -c and -o together" >&5
25268 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25269 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25270   echo $ECHO_N "(cached) $ECHO_C" >&6
25271 else
25272
25273 cat > conftest.$ac_ext <<CF_EOF
25274 int main(void)
25275 {
25276         ${cf_cv_main_return:-return}(0);
25277 }
25278 CF_EOF
25279 # We do the test twice because some compilers refuse to overwrite an
25280 # existing .o file with -o, though they will create one.
25281 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25282 if { (eval echo "$as_me:25282: \"$ac_try\"") >&5
25283   (eval $ac_try) 2>&5
25284   ac_status=$?
25285   echo "$as_me:25285: \$? = $ac_status" >&5
25286   (exit "$ac_status"); } &&
25287   test -f conftest2.$ac_objext && { (eval echo "$as_me:25287: \"$ac_try\"") >&5
25288   (eval $ac_try) 2>&5
25289   ac_status=$?
25290   echo "$as_me:25290: \$? = $ac_status" >&5
25291   (exit "$ac_status"); };
25292 then
25293   eval cf_cv_prog_CXX_c_o=yes
25294 else
25295   eval cf_cv_prog_CXX_c_o=no
25296 fi
25297 rm -rf ./conftest*
25298
25299 fi
25300 if test "$cf_cv_prog_CXX_c_o" = yes; then
25301   echo "$as_me:25301: result: yes" >&5
25302 echo "${ECHO_T}yes" >&6
25303 else
25304   echo "$as_me:25304: result: no" >&5
25305 echo "${ECHO_T}no" >&6
25306 fi
25307
25308         case "$GXX_VERSION" in
25309         (1.*|2.[0-6]*|[1-9][0-9].*)
25310                 cf_cxx_library=yes
25311                 ;;
25312         (*-2.7*|2.7*)
25313
25314 cf_cxx_library=unknown
25315 case "$cf_cv_system_name" in
25316 (os2*)
25317         cf_gpp_libname=gpp
25318         ;;
25319 (*)
25320         cf_gpp_libname=g++
25321         ;;
25322 esac
25323 if test "$GXX" = yes; then
25324         echo "$as_me:25324: checking for lib$cf_gpp_libname" >&5
25325 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25326         cf_save="$LIBS"
25327
25328 cf_add_libs="$LIBS"
25329 # reverse order
25330 cf_add_0lib=
25331 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25332 # filter duplicates
25333 for cf_add_1lib in $cf_add_0lib; do
25334         for cf_add_2lib in $cf_add_libs; do
25335                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25336                         cf_add_1lib=
25337                         break
25338                 fi
25339         done
25340         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25341 done
25342 LIBS="$cf_add_libs"
25343
25344         cat >"conftest.$ac_ext" <<_ACEOF
25345 #line 25345 "configure"
25346 #include "confdefs.h"
25347
25348 #include <$cf_gpp_libname/builtin.h>
25349
25350 int
25351 main (void)
25352 {
25353 two_arg_error_handler_t foo2 = lib_error_handler
25354   ;
25355   return 0;
25356 }
25357 _ACEOF
25358 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25359 if { (eval echo "$as_me:25359: \"$ac_link\"") >&5
25360   (eval $ac_link) 2>&5
25361   ac_status=$?
25362   echo "$as_me:25362: \$? = $ac_status" >&5
25363   (exit "$ac_status"); } &&
25364          { ac_try='test -s "conftest$ac_exeext"'
25365   { (eval echo "$as_me:25365: \"$ac_try\"") >&5
25366   (eval $ac_try) 2>&5
25367   ac_status=$?
25368   echo "$as_me:25368: \$? = $ac_status" >&5
25369   (exit "$ac_status"); }; }; then
25370   cf_cxx_library=yes
25371
25372 cf_add_libs="$CXXLIBS"
25373 # reverse order
25374 cf_add_0lib=
25375 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25376 # filter duplicates
25377 for cf_add_1lib in $cf_add_0lib; do
25378         for cf_add_2lib in $cf_add_libs; do
25379                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25380                         cf_add_1lib=
25381                         break
25382                 fi
25383         done
25384         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25385 done
25386 CXXLIBS="$cf_add_libs"
25387
25388          if test "$cf_gpp_libname" = cpp ; then
25389
25390 cat >>confdefs.h <<\EOF
25391 #define HAVE_GPP_BUILTIN_H 1
25392 EOF
25393
25394          else
25395
25396 cat >>confdefs.h <<\EOF
25397 #define HAVE_GXX_BUILTIN_H 1
25398 EOF
25399
25400          fi
25401 else
25402   echo "$as_me: failed program was:" >&5
25403 cat "conftest.$ac_ext" >&5
25404 cat >"conftest.$ac_ext" <<_ACEOF
25405 #line 25405 "configure"
25406 #include "confdefs.h"
25407
25408 #include <builtin.h>
25409
25410 int
25411 main (void)
25412 {
25413 two_arg_error_handler_t foo2 = lib_error_handler
25414   ;
25415   return 0;
25416 }
25417 _ACEOF
25418 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25419 if { (eval echo "$as_me:25419: \"$ac_link\"") >&5
25420   (eval $ac_link) 2>&5
25421   ac_status=$?
25422   echo "$as_me:25422: \$? = $ac_status" >&5
25423   (exit "$ac_status"); } &&
25424          { ac_try='test -s "conftest$ac_exeext"'
25425   { (eval echo "$as_me:25425: \"$ac_try\"") >&5
25426   (eval $ac_try) 2>&5
25427   ac_status=$?
25428   echo "$as_me:25428: \$? = $ac_status" >&5
25429   (exit "$ac_status"); }; }; then
25430   cf_cxx_library=yes
25431
25432 cf_add_libs="$CXXLIBS"
25433 # reverse order
25434 cf_add_0lib=
25435 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25436 # filter duplicates
25437 for cf_add_1lib in $cf_add_0lib; do
25438         for cf_add_2lib in $cf_add_libs; do
25439                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25440                         cf_add_1lib=
25441                         break
25442                 fi
25443         done
25444         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25445 done
25446 CXXLIBS="$cf_add_libs"
25447
25448 cat >>confdefs.h <<\EOF
25449 #define HAVE_BUILTIN_H 1
25450 EOF
25451
25452 else
25453   echo "$as_me: failed program was:" >&5
25454 cat "conftest.$ac_ext" >&5
25455 cf_cxx_library=no
25456 fi
25457 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25458 fi
25459 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25460         LIBS="$cf_save"
25461         echo "$as_me:25461: result: $cf_cxx_library" >&5
25462 echo "${ECHO_T}$cf_cxx_library" >&6
25463 fi
25464
25465                 ;;
25466         (*)
25467                 cf_cxx_library=no
25468                 ;;
25469         esac
25470
25471         ac_ext=cc
25472 ac_cpp='$CXXCPP $CPPFLAGS'
25473 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25474 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25475 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25476 ac_main_return="return"
25477 echo "$as_me:25477: checking how to run the C++ preprocessor" >&5
25478 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25479 if test -z "$CXXCPP"; then
25480   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25481   echo $ECHO_N "(cached) $ECHO_C" >&6
25482 else
25483       # Double quotes because CXXCPP needs to be expanded
25484     for CXXCPP in "$CXX -E" "/lib/cpp"
25485     do
25486       ac_preproc_ok=false
25487 for ac_cxx_preproc_warn_flag in '' yes
25488 do
25489   # Use a header file that comes with gcc, so configuring glibc
25490   # with a fresh cross-compiler works.
25491   # On the NeXT, cc -E runs the code through the compiler's parser,
25492   # not just through cpp. "Syntax error" is here to catch this case.
25493   cat >"conftest.$ac_ext" <<_ACEOF
25494 #line 25494 "configure"
25495 #include "confdefs.h"
25496 #include <assert.h>
25497                      Syntax error
25498 _ACEOF
25499 if { (eval echo "$as_me:25499: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25500   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25501   ac_status=$?
25502   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25503   rm -f conftest.er1
25504   cat conftest.err >&5
25505   echo "$as_me:25505: \$? = $ac_status" >&5
25506   (exit "$ac_status"); } >/dev/null; then
25507   if test -s conftest.err; then
25508     ac_cpp_err=$ac_cxx_preproc_warn_flag
25509   else
25510     ac_cpp_err=
25511   fi
25512 else
25513   ac_cpp_err=yes
25514 fi
25515 if test -z "$ac_cpp_err"; then
25516   :
25517 else
25518   echo "$as_me: failed program was:" >&5
25519   cat "conftest.$ac_ext" >&5
25520   # Broken: fails on valid input.
25521 continue
25522 fi
25523 rm -f conftest.err "conftest.$ac_ext"
25524
25525   # OK, works on sane cases.  Now check whether non-existent headers
25526   # can be detected and how.
25527   cat >"conftest.$ac_ext" <<_ACEOF
25528 #line 25528 "configure"
25529 #include "confdefs.h"
25530 #include <ac_nonexistent.h>
25531 _ACEOF
25532 if { (eval echo "$as_me:25532: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25533   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25534   ac_status=$?
25535   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25536   rm -f conftest.er1
25537   cat conftest.err >&5
25538   echo "$as_me:25538: \$? = $ac_status" >&5
25539   (exit "$ac_status"); } >/dev/null; then
25540   if test -s conftest.err; then
25541     ac_cpp_err=$ac_cxx_preproc_warn_flag
25542   else
25543     ac_cpp_err=
25544   fi
25545 else
25546   ac_cpp_err=yes
25547 fi
25548 if test -z "$ac_cpp_err"; then
25549   # Broken: success on invalid input.
25550 continue
25551 else
25552   echo "$as_me: failed program was:" >&5
25553   cat "conftest.$ac_ext" >&5
25554   # Passes both tests.
25555 ac_preproc_ok=:
25556 break
25557 fi
25558 rm -f conftest.err "conftest.$ac_ext"
25559
25560 done
25561 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25562 rm -f conftest.err "conftest.$ac_ext"
25563 if $ac_preproc_ok; then
25564   break
25565 fi
25566
25567     done
25568     ac_cv_prog_CXXCPP=$CXXCPP
25569
25570 fi
25571   CXXCPP=$ac_cv_prog_CXXCPP
25572 else
25573   ac_cv_prog_CXXCPP=$CXXCPP
25574 fi
25575 echo "$as_me:25575: result: $CXXCPP" >&5
25576 echo "${ECHO_T}$CXXCPP" >&6
25577 ac_preproc_ok=false
25578 for ac_cxx_preproc_warn_flag in '' yes
25579 do
25580   # Use a header file that comes with gcc, so configuring glibc
25581   # with a fresh cross-compiler works.
25582   # On the NeXT, cc -E runs the code through the compiler's parser,
25583   # not just through cpp. "Syntax error" is here to catch this case.
25584   cat >"conftest.$ac_ext" <<_ACEOF
25585 #line 25585 "configure"
25586 #include "confdefs.h"
25587 #include <assert.h>
25588                      Syntax error
25589 _ACEOF
25590 if { (eval echo "$as_me:25590: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25591   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25592   ac_status=$?
25593   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25594   rm -f conftest.er1
25595   cat conftest.err >&5
25596   echo "$as_me:25596: \$? = $ac_status" >&5
25597   (exit "$ac_status"); } >/dev/null; then
25598   if test -s conftest.err; then
25599     ac_cpp_err=$ac_cxx_preproc_warn_flag
25600   else
25601     ac_cpp_err=
25602   fi
25603 else
25604   ac_cpp_err=yes
25605 fi
25606 if test -z "$ac_cpp_err"; then
25607   :
25608 else
25609   echo "$as_me: failed program was:" >&5
25610   cat "conftest.$ac_ext" >&5
25611   # Broken: fails on valid input.
25612 continue
25613 fi
25614 rm -f conftest.err "conftest.$ac_ext"
25615
25616   # OK, works on sane cases.  Now check whether non-existent headers
25617   # can be detected and how.
25618   cat >"conftest.$ac_ext" <<_ACEOF
25619 #line 25619 "configure"
25620 #include "confdefs.h"
25621 #include <ac_nonexistent.h>
25622 _ACEOF
25623 if { (eval echo "$as_me:25623: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25624   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25625   ac_status=$?
25626   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25627   rm -f conftest.er1
25628   cat conftest.err >&5
25629   echo "$as_me:25629: \$? = $ac_status" >&5
25630   (exit "$ac_status"); } >/dev/null; then
25631   if test -s conftest.err; then
25632     ac_cpp_err=$ac_cxx_preproc_warn_flag
25633   else
25634     ac_cpp_err=
25635   fi
25636 else
25637   ac_cpp_err=yes
25638 fi
25639 if test -z "$ac_cpp_err"; then
25640   # Broken: success on invalid input.
25641 continue
25642 else
25643   echo "$as_me: failed program was:" >&5
25644   cat "conftest.$ac_ext" >&5
25645   # Passes both tests.
25646 ac_preproc_ok=:
25647 break
25648 fi
25649 rm -f conftest.err "conftest.$ac_ext"
25650
25651 done
25652 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25653 rm -f conftest.err "conftest.$ac_ext"
25654 if $ac_preproc_ok; then
25655   :
25656 else
25657   { { echo "$as_me:25657: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25658 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25659    { (exit 1); exit 1; }; }
25660 fi
25661
25662 ac_ext=cc
25663 ac_cpp='$CXXCPP $CPPFLAGS'
25664 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25665 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25666 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25667 ac_main_return="return"
25668
25669 for ac_header in typeinfo
25670 do
25671 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25672 echo "$as_me:25672: checking for $ac_header" >&5
25673 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25674 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25675   echo $ECHO_N "(cached) $ECHO_C" >&6
25676 else
25677   cat >"conftest.$ac_ext" <<_ACEOF
25678 #line 25678 "configure"
25679 #include "confdefs.h"
25680 #include <$ac_header>
25681 _ACEOF
25682 if { (eval echo "$as_me:25682: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25683   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25684   ac_status=$?
25685   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25686   rm -f conftest.er1
25687   cat conftest.err >&5
25688   echo "$as_me:25688: \$? = $ac_status" >&5
25689   (exit "$ac_status"); } >/dev/null; then
25690   if test -s conftest.err; then
25691     ac_cpp_err=$ac_cxx_preproc_warn_flag
25692   else
25693     ac_cpp_err=
25694   fi
25695 else
25696   ac_cpp_err=yes
25697 fi
25698 if test -z "$ac_cpp_err"; then
25699   eval "$as_ac_Header=yes"
25700 else
25701   echo "$as_me: failed program was:" >&5
25702   cat "conftest.$ac_ext" >&5
25703   eval "$as_ac_Header=no"
25704 fi
25705 rm -f conftest.err "conftest.$ac_ext"
25706 fi
25707 echo "$as_me:25707: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25708 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25709 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25710   cat >>confdefs.h <<EOF
25711 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25712 EOF
25713
25714 fi
25715 done
25716
25717 for ac_header in iostream
25718 do
25719 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25720 echo "$as_me:25720: checking for $ac_header" >&5
25721 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25722 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25723   echo $ECHO_N "(cached) $ECHO_C" >&6
25724 else
25725   cat >"conftest.$ac_ext" <<_ACEOF
25726 #line 25726 "configure"
25727 #include "confdefs.h"
25728 #include <$ac_header>
25729 _ACEOF
25730 if { (eval echo "$as_me:25730: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25731   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25732   ac_status=$?
25733   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25734   rm -f conftest.er1
25735   cat conftest.err >&5
25736   echo "$as_me:25736: \$? = $ac_status" >&5
25737   (exit "$ac_status"); } >/dev/null; then
25738   if test -s conftest.err; then
25739     ac_cpp_err=$ac_cxx_preproc_warn_flag
25740   else
25741     ac_cpp_err=
25742   fi
25743 else
25744   ac_cpp_err=yes
25745 fi
25746 if test -z "$ac_cpp_err"; then
25747   eval "$as_ac_Header=yes"
25748 else
25749   echo "$as_me: failed program was:" >&5
25750   cat "conftest.$ac_ext" >&5
25751   eval "$as_ac_Header=no"
25752 fi
25753 rm -f conftest.err "conftest.$ac_ext"
25754 fi
25755 echo "$as_me:25755: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25756 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25757 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25758   cat >>confdefs.h <<EOF
25759 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25760 EOF
25761
25762 fi
25763 done
25764
25765 if test x"$ac_cv_header_iostream" = xyes ; then
25766         echo "$as_me:25766: checking if iostream uses std-namespace" >&5
25767 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25768         cat >"conftest.$ac_ext" <<_ACEOF
25769 #line 25769 "configure"
25770 #include "confdefs.h"
25771
25772 #include <iostream>
25773 using std::endl;
25774 using std::cerr;
25775 int
25776 main (void)
25777 {
25778
25779 cerr << "testing" << endl;
25780
25781   ;
25782   return 0;
25783 }
25784 _ACEOF
25785 rm -f "conftest.$ac_objext"
25786 if { (eval echo "$as_me:25786: \"$ac_compile\"") >&5
25787   (eval $ac_compile) 2>&5
25788   ac_status=$?
25789   echo "$as_me:25789: \$? = $ac_status" >&5
25790   (exit "$ac_status"); } &&
25791          { ac_try='test -s "conftest.$ac_objext"'
25792   { (eval echo "$as_me:25792: \"$ac_try\"") >&5
25793   (eval $ac_try) 2>&5
25794   ac_status=$?
25795   echo "$as_me:25795: \$? = $ac_status" >&5
25796   (exit "$ac_status"); }; }; then
25797   cf_iostream_namespace=yes
25798 else
25799   echo "$as_me: failed program was:" >&5
25800 cat "conftest.$ac_ext" >&5
25801 cf_iostream_namespace=no
25802 fi
25803 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25804         echo "$as_me:25804: result: $cf_iostream_namespace" >&5
25805 echo "${ECHO_T}$cf_iostream_namespace" >&6
25806         if test "$cf_iostream_namespace" = yes ; then
25807
25808 cat >>confdefs.h <<\EOF
25809 #define IOSTREAM_NAMESPACE 1
25810 EOF
25811
25812         fi
25813 fi
25814
25815 echo "$as_me:25815: checking if we should include stdbool.h" >&5
25816 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25817
25818 if test "${cf_cv_header_stdbool_h+set}" = set; then
25819   echo $ECHO_N "(cached) $ECHO_C" >&6
25820 else
25821
25822         cat >"conftest.$ac_ext" <<_ACEOF
25823 #line 25823 "configure"
25824 #include "confdefs.h"
25825
25826 int
25827 main (void)
25828 {
25829 bool foo = false
25830   ;
25831   return 0;
25832 }
25833 _ACEOF
25834 rm -f "conftest.$ac_objext"
25835 if { (eval echo "$as_me:25835: \"$ac_compile\"") >&5
25836   (eval $ac_compile) 2>&5
25837   ac_status=$?
25838   echo "$as_me:25838: \$? = $ac_status" >&5
25839   (exit "$ac_status"); } &&
25840          { ac_try='test -s "conftest.$ac_objext"'
25841   { (eval echo "$as_me:25841: \"$ac_try\"") >&5
25842   (eval $ac_try) 2>&5
25843   ac_status=$?
25844   echo "$as_me:25844: \$? = $ac_status" >&5
25845   (exit "$ac_status"); }; }; then
25846   cf_cv_header_stdbool_h=0
25847 else
25848   echo "$as_me: failed program was:" >&5
25849 cat "conftest.$ac_ext" >&5
25850 cat >"conftest.$ac_ext" <<_ACEOF
25851 #line 25851 "configure"
25852 #include "confdefs.h"
25853
25854 #ifndef __BEOS__
25855 #include <stdbool.h>
25856 #endif
25857
25858 int
25859 main (void)
25860 {
25861 bool foo = false
25862   ;
25863   return 0;
25864 }
25865 _ACEOF
25866 rm -f "conftest.$ac_objext"
25867 if { (eval echo "$as_me:25867: \"$ac_compile\"") >&5
25868   (eval $ac_compile) 2>&5
25869   ac_status=$?
25870   echo "$as_me:25870: \$? = $ac_status" >&5
25871   (exit "$ac_status"); } &&
25872          { ac_try='test -s "conftest.$ac_objext"'
25873   { (eval echo "$as_me:25873: \"$ac_try\"") >&5
25874   (eval $ac_try) 2>&5
25875   ac_status=$?
25876   echo "$as_me:25876: \$? = $ac_status" >&5
25877   (exit "$ac_status"); }; }; then
25878   cf_cv_header_stdbool_h=1
25879 else
25880   echo "$as_me: failed program was:" >&5
25881 cat "conftest.$ac_ext" >&5
25882 cf_cv_header_stdbool_h=0
25883 fi
25884 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25885 fi
25886 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25887 fi
25888
25889 if test "$cf_cv_header_stdbool_h" = 1
25890 then    echo "$as_me:25890: result: yes" >&5
25891 echo "${ECHO_T}yes" >&6
25892 else    echo "$as_me:25892: result: no" >&5
25893 echo "${ECHO_T}no" >&6
25894 fi
25895
25896 echo "$as_me:25896: checking for builtin bool type" >&5
25897 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25898
25899 if test "${cf_cv_builtin_bool+set}" = set; then
25900   echo $ECHO_N "(cached) $ECHO_C" >&6
25901 else
25902
25903         cat >"conftest.$ac_ext" <<_ACEOF
25904 #line 25904 "configure"
25905 #include "confdefs.h"
25906
25907 #include <stdio.h>
25908 #include <sys/types.h>
25909
25910 int
25911 main (void)
25912 {
25913 bool x = false
25914   ;
25915   return 0;
25916 }
25917 _ACEOF
25918 rm -f "conftest.$ac_objext"
25919 if { (eval echo "$as_me:25919: \"$ac_compile\"") >&5
25920   (eval $ac_compile) 2>&5
25921   ac_status=$?
25922   echo "$as_me:25922: \$? = $ac_status" >&5
25923   (exit "$ac_status"); } &&
25924          { ac_try='test -s "conftest.$ac_objext"'
25925   { (eval echo "$as_me:25925: \"$ac_try\"") >&5
25926   (eval $ac_try) 2>&5
25927   ac_status=$?
25928   echo "$as_me:25928: \$? = $ac_status" >&5
25929   (exit "$ac_status"); }; }; then
25930   cf_cv_builtin_bool=1
25931 else
25932   echo "$as_me: failed program was:" >&5
25933 cat "conftest.$ac_ext" >&5
25934 cf_cv_builtin_bool=0
25935 fi
25936 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25937
25938 fi
25939
25940 if test "$cf_cv_builtin_bool" = 1
25941 then    echo "$as_me:25941: result: yes" >&5
25942 echo "${ECHO_T}yes" >&6
25943 else    echo "$as_me:25943: result: no" >&5
25944 echo "${ECHO_T}no" >&6
25945 fi
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 echo "$as_me:26408: checking for special defines needed for etip.h" >&5
26409 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26410 cf_save_CXXFLAGS="$CXXFLAGS"
26411 cf_result="none"
26412
26413 # etip.h includes ncurses.h which includes ncurses_dll.h
26414 # But ncurses_dll.h is generated - fix here.
26415 test -d include || mkdir include
26416 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
26417
26418 for cf_math in "" MATH_H
26419 do
26420 for cf_excp in "" MATH_EXCEPTION
26421 do
26422         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26423         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26424         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26425 cat >"conftest.$ac_ext" <<_ACEOF
26426 #line 26426 "configure"
26427 #include "confdefs.h"
26428
26429 #include <etip.h.in>
26430
26431 int
26432 main (void)
26433 {
26434
26435   ;
26436   return 0;
26437 }
26438 _ACEOF
26439 rm -f "conftest.$ac_objext"
26440 if { (eval echo "$as_me:26440: \"$ac_compile\"") >&5
26441   (eval $ac_compile) 2>&5
26442   ac_status=$?
26443   echo "$as_me:26443: \$? = $ac_status" >&5
26444   (exit "$ac_status"); } &&
26445          { ac_try='test -s "conftest.$ac_objext"'
26446   { (eval echo "$as_me:26446: \"$ac_try\"") >&5
26447   (eval $ac_try) 2>&5
26448   ac_status=$?
26449   echo "$as_me:26449: \$? = $ac_status" >&5
26450   (exit "$ac_status"); }; }; then
26451
26452         test -n "$cf_math" && cat >>confdefs.h <<EOF
26453 #define ETIP_NEEDS_${cf_math} 1
26454 EOF
26455
26456         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26457 #define ETIP_NEEDS_${cf_excp} 1
26458 EOF
26459
26460         cf_result="$cf_math $cf_excp"
26461         break 2
26462
26463 else
26464   echo "$as_me: failed program was:" >&5
26465 cat "conftest.$ac_ext" >&5
26466 fi
26467 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26468 done
26469 done
26470 echo "$as_me:26470: result: $cf_result" >&5
26471 echo "${ECHO_T}$cf_result" >&6
26472 CXXFLAGS="$cf_save_CXXFLAGS"
26473
26474 if test -n "$CXX"; then
26475 echo "$as_me:26475: checking if $CXX accepts override keyword" >&5
26476 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26477 if test "${cf_cv_cpp_override+set}" = set; then
26478   echo $ECHO_N "(cached) $ECHO_C" >&6
26479 else
26480
26481         ac_ext=cc
26482 ac_cpp='$CXXCPP $CPPFLAGS'
26483 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26484 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26485 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26486 ac_main_return="return"
26487
26488         if test "$cross_compiling" = yes; then
26489   cf_cv_cpp_override=unknown
26490 else
26491   cat >"conftest.$ac_ext" <<_ACEOF
26492 #line 26492 "configure"
26493 #include "confdefs.h"
26494
26495 class base
26496 {
26497 public:
26498         virtual int foo(float x) = 0;
26499 };
26500
26501 class derived: public base
26502 {
26503 public:
26504         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26505 };
26506
26507 int main(void) { }
26508
26509 _ACEOF
26510 rm -f "conftest$ac_exeext"
26511 if { (eval echo "$as_me:26511: \"$ac_link\"") >&5
26512   (eval $ac_link) 2>&5
26513   ac_status=$?
26514   echo "$as_me:26514: \$? = $ac_status" >&5
26515   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26516   { (eval echo "$as_me:26516: \"$ac_try\"") >&5
26517   (eval $ac_try) 2>&5
26518   ac_status=$?
26519   echo "$as_me:26519: \$? = $ac_status" >&5
26520   (exit "$ac_status"); }; }; then
26521   cf_cv_cpp_override=yes
26522 else
26523   echo "$as_me: program exited with status $ac_status" >&5
26524 echo "$as_me: failed program was:" >&5
26525 cat "conftest.$ac_ext" >&5
26526 cf_cv_cpp_override=no
26527 fi
26528 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26529 fi
26530         ac_ext=cc
26531 ac_cpp='$CXXCPP $CPPFLAGS'
26532 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26533 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26534 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26535 ac_main_return="return"
26536
26537 fi
26538 echo "$as_me:26538: result: $cf_cv_cpp_override" >&5
26539 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26540 fi
26541 test "$cf_cv_cpp_override" = yes &&
26542 cat >>confdefs.h <<\EOF
26543 #define CPP_HAS_OVERRIDE 1
26544 EOF
26545
26546 if test -n "$CXX"; then
26547 echo "$as_me:26547: checking if $CXX accepts parameter initialization" >&5
26548 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26549 if test "${cf_cv_cpp_param_init+set}" = set; then
26550   echo $ECHO_N "(cached) $ECHO_C" >&6
26551 else
26552
26553         ac_ext=cc
26554 ac_cpp='$CXXCPP $CPPFLAGS'
26555 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26556 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26557 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26558 ac_main_return="return"
26559
26560         if test "$cross_compiling" = yes; then
26561   cf_cv_cpp_param_init=unknown
26562 else
26563   cat >"conftest.$ac_ext" <<_ACEOF
26564 #line 26564 "configure"
26565 #include "confdefs.h"
26566
26567 class TEST {
26568 private:
26569         int value;
26570 public:
26571         TEST(int x = 1);
26572         ~TEST();
26573 };
26574
26575 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26576 {
26577         value = x;
26578 }
26579 int main(void) { }
26580
26581 _ACEOF
26582 rm -f "conftest$ac_exeext"
26583 if { (eval echo "$as_me:26583: \"$ac_link\"") >&5
26584   (eval $ac_link) 2>&5
26585   ac_status=$?
26586   echo "$as_me:26586: \$? = $ac_status" >&5
26587   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26588   { (eval echo "$as_me:26588: \"$ac_try\"") >&5
26589   (eval $ac_try) 2>&5
26590   ac_status=$?
26591   echo "$as_me:26591: \$? = $ac_status" >&5
26592   (exit "$ac_status"); }; }; then
26593   cf_cv_cpp_param_init=yes
26594 else
26595   echo "$as_me: program exited with status $ac_status" >&5
26596 echo "$as_me: failed program was:" >&5
26597 cat "conftest.$ac_ext" >&5
26598 cf_cv_cpp_param_init=no
26599 fi
26600 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26601 fi
26602         ac_ext=cc
26603 ac_cpp='$CXXCPP $CPPFLAGS'
26604 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26605 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26606 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26607 ac_main_return="return"
26608
26609 fi
26610 echo "$as_me:26610: result: $cf_cv_cpp_param_init" >&5
26611 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26612 fi
26613 test "$cf_cv_cpp_param_init" = yes &&
26614 cat >>confdefs.h <<\EOF
26615 #define CPP_HAS_PARAM_INIT 1
26616 EOF
26617
26618 if test -n "$CXX"; then
26619
26620 echo "$as_me:26620: checking if $CXX accepts static_cast" >&5
26621 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26622 if test "${cf_cv_cpp_static_cast+set}" = set; then
26623   echo $ECHO_N "(cached) $ECHO_C" >&6
26624 else
26625
26626         ac_ext=cc
26627 ac_cpp='$CXXCPP $CPPFLAGS'
26628 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26629 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26630 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26631 ac_main_return="return"
26632
26633         cat >"conftest.$ac_ext" <<_ACEOF
26634 #line 26634 "configure"
26635 #include "confdefs.h"
26636
26637 class NCursesPanel
26638 {
26639 public:
26640   NCursesPanel(int nlines,
26641                int ncols,
26642                int begin_y = 0,
26643                int begin_x = 0)
26644   {
26645   }
26646   NCursesPanel();
26647   ~NCursesPanel();
26648 };
26649
26650 template<class T> class NCursesUserPanel : public NCursesPanel
26651 {
26652 public:
26653   NCursesUserPanel (int nlines,
26654                     int ncols,
26655                     int begin_y = 0,
26656                     int begin_x = 0,
26657                     const T* p_UserData = static_cast<T*>(0))
26658     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26659   {
26660   };
26661   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26662   {
26663   };
26664
26665   virtual ~NCursesUserPanel() {};
26666 };
26667
26668 int
26669 main (void)
26670 {
26671
26672         const char* p_UserData = static_cast<char*>(0)
26673   ;
26674   return 0;
26675 }
26676 _ACEOF
26677 rm -f "conftest.$ac_objext"
26678 if { (eval echo "$as_me:26678: \"$ac_compile\"") >&5
26679   (eval $ac_compile) 2>&5
26680   ac_status=$?
26681   echo "$as_me:26681: \$? = $ac_status" >&5
26682   (exit "$ac_status"); } &&
26683          { ac_try='test -s "conftest.$ac_objext"'
26684   { (eval echo "$as_me:26684: \"$ac_try\"") >&5
26685   (eval $ac_try) 2>&5
26686   ac_status=$?
26687   echo "$as_me:26687: \$? = $ac_status" >&5
26688   (exit "$ac_status"); }; }; then
26689   cf_cv_cpp_static_cast=yes
26690 else
26691   echo "$as_me: failed program was:" >&5
26692 cat "conftest.$ac_ext" >&5
26693 cf_cv_cpp_static_cast=no
26694 fi
26695 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26696
26697         ac_ext=cc
26698 ac_cpp='$CXXCPP $CPPFLAGS'
26699 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26700 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26701 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26702 ac_main_return="return"
26703
26704 fi
26705 echo "$as_me:26705: result: $cf_cv_cpp_static_cast" >&5
26706 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26707
26708 fi
26709
26710 test "$cf_cv_cpp_static_cast" = yes &&
26711 cat >>confdefs.h <<\EOF
26712 #define CPP_HAS_STATIC_CAST 1
26713 EOF
26714
26715         CXX_AR='$(AR)'
26716         CXX_ARFLAGS='$(ARFLAGS)'
26717         case "$cf_cv_system_name" in
26718         (irix*)
26719             if test "$GXX" != yes ; then
26720                 CXX_AR='$(CXX)'
26721                 CXX_ARFLAGS='-ar -o'
26722             fi
26723             ;;
26724         (sco3.2v5*)
26725             CXXLDFLAGS="-u main"
26726             ;;
26727         (solaris2*)
26728             if test "$GXX" != yes ; then
26729                 CXX_AR='$(CXX)'
26730                 CXX_ARFLAGS='-xar -o'
26731             fi
26732             ;;
26733         esac
26734
26735 else
26736         cf_cxx_library=no
26737         cf_cv_builtin_bool=1
26738
26739         # Just because we are not configuring against C++ right now does not
26740         # mean that a user will not want to use C++.  Some distributors disable
26741         # the C++ portion of this configuration as a shortcut (or just to avoid
26742         # compiling the demo in the c++ directory).  So we need a reasonable
26743         # default for the 'bool' type.
26744         #
26745         # Caveat: since the storage of the bool type is not standardized, it
26746         # may change.
26747
26748         if test "$NCURSES_BOOL" != auto ; then
26749                 cf_cv_type_of_bool=$NCURSES_BOOL
26750                 cf_cv_header_stdbool_h=0
26751         else
26752                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26753
26754 echo "$as_me:26754: checking for bool" >&5
26755 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26756 if test "${ac_cv_type_bool+set}" = set; then
26757   echo $ECHO_N "(cached) $ECHO_C" >&6
26758 else
26759   cat >"conftest.$ac_ext" <<_ACEOF
26760 #line 26760 "configure"
26761 #include "confdefs.h"
26762
26763 #include <stdlib.h>
26764 #include <stdio.h>
26765
26766 #if defined(__cplusplus)
26767
26768 #ifdef HAVE_GXX_BUILTIN_H
26769 #include <g++/builtin.h>
26770 #elif HAVE_GPP_BUILTIN_H
26771 #include <gpp/builtin.h>
26772 #elif HAVE_BUILTIN_H
26773 #include <builtin.h>
26774 #endif
26775
26776 #else
26777
26778 #if $cf_cv_header_stdbool_h
26779 #include <stdbool.h>
26780 #endif
26781
26782 #endif
26783
26784 int
26785 main (void)
26786 {
26787 if ((bool *) 0)
26788   return 0;
26789 if (sizeof (bool))
26790   return 0;
26791   ;
26792   return 0;
26793 }
26794 _ACEOF
26795 rm -f "conftest.$ac_objext"
26796 if { (eval echo "$as_me:26796: \"$ac_compile\"") >&5
26797   (eval $ac_compile) 2>&5
26798   ac_status=$?
26799   echo "$as_me:26799: \$? = $ac_status" >&5
26800   (exit "$ac_status"); } &&
26801          { ac_try='test -s "conftest.$ac_objext"'
26802   { (eval echo "$as_me:26802: \"$ac_try\"") >&5
26803   (eval $ac_try) 2>&5
26804   ac_status=$?
26805   echo "$as_me:26805: \$? = $ac_status" >&5
26806   (exit "$ac_status"); }; }; then
26807   ac_cv_type_bool=yes
26808 else
26809   echo "$as_me: failed program was:" >&5
26810 cat "conftest.$ac_ext" >&5
26811 ac_cv_type_bool=no
26812 fi
26813 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26814 fi
26815 echo "$as_me:26815: result: $ac_cv_type_bool" >&5
26816 echo "${ECHO_T}$ac_cv_type_bool" >&6
26817
26818 echo "$as_me:26818: checking size of bool" >&5
26819 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26820 if test "${ac_cv_sizeof_bool+set}" = set; then
26821   echo $ECHO_N "(cached) $ECHO_C" >&6
26822 else
26823   if test "$ac_cv_type_bool" = yes; then
26824   if test "$cross_compiling" = yes; then
26825   # Depending upon the size, compute the lo and hi bounds.
26826 cat >"conftest.$ac_ext" <<_ACEOF
26827 #line 26827 "configure"
26828 #include "confdefs.h"
26829
26830 #include <stdlib.h>
26831 #include <stdio.h>
26832
26833 #if defined(__cplusplus)
26834
26835 #ifdef HAVE_GXX_BUILTIN_H
26836 #include <g++/builtin.h>
26837 #elif HAVE_GPP_BUILTIN_H
26838 #include <gpp/builtin.h>
26839 #elif HAVE_BUILTIN_H
26840 #include <builtin.h>
26841 #endif
26842
26843 #else
26844
26845 #if $cf_cv_header_stdbool_h
26846 #include <stdbool.h>
26847 #endif
26848
26849 #endif
26850
26851 int
26852 main (void)
26853 {
26854 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26855   ;
26856   return 0;
26857 }
26858 _ACEOF
26859 rm -f "conftest.$ac_objext"
26860 if { (eval echo "$as_me:26860: \"$ac_compile\"") >&5
26861   (eval $ac_compile) 2>&5
26862   ac_status=$?
26863   echo "$as_me:26863: \$? = $ac_status" >&5
26864   (exit "$ac_status"); } &&
26865          { ac_try='test -s "conftest.$ac_objext"'
26866   { (eval echo "$as_me:26866: \"$ac_try\"") >&5
26867   (eval $ac_try) 2>&5
26868   ac_status=$?
26869   echo "$as_me:26869: \$? = $ac_status" >&5
26870   (exit "$ac_status"); }; }; then
26871   ac_lo=0 ac_mid=0
26872   while :; do
26873     cat >"conftest.$ac_ext" <<_ACEOF
26874 #line 26874 "configure"
26875 #include "confdefs.h"
26876
26877 #include <stdlib.h>
26878 #include <stdio.h>
26879
26880 #if defined(__cplusplus)
26881
26882 #ifdef HAVE_GXX_BUILTIN_H
26883 #include <g++/builtin.h>
26884 #elif HAVE_GPP_BUILTIN_H
26885 #include <gpp/builtin.h>
26886 #elif HAVE_BUILTIN_H
26887 #include <builtin.h>
26888 #endif
26889
26890 #else
26891
26892 #if $cf_cv_header_stdbool_h
26893 #include <stdbool.h>
26894 #endif
26895
26896 #endif
26897
26898 int
26899 main (void)
26900 {
26901 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26902   ;
26903   return 0;
26904 }
26905 _ACEOF
26906 rm -f "conftest.$ac_objext"
26907 if { (eval echo "$as_me:26907: \"$ac_compile\"") >&5
26908   (eval $ac_compile) 2>&5
26909   ac_status=$?
26910   echo "$as_me:26910: \$? = $ac_status" >&5
26911   (exit "$ac_status"); } &&
26912          { ac_try='test -s "conftest.$ac_objext"'
26913   { (eval echo "$as_me:26913: \"$ac_try\"") >&5
26914   (eval $ac_try) 2>&5
26915   ac_status=$?
26916   echo "$as_me:26916: \$? = $ac_status" >&5
26917   (exit "$ac_status"); }; }; then
26918   ac_hi=$ac_mid; break
26919 else
26920   echo "$as_me: failed program was:" >&5
26921 cat "conftest.$ac_ext" >&5
26922 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26923 fi
26924 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26925   done
26926 else
26927   echo "$as_me: failed program was:" >&5
26928 cat "conftest.$ac_ext" >&5
26929 ac_hi=-1 ac_mid=-1
26930   while :; do
26931     cat >"conftest.$ac_ext" <<_ACEOF
26932 #line 26932 "configure"
26933 #include "confdefs.h"
26934
26935 #include <stdlib.h>
26936 #include <stdio.h>
26937
26938 #if defined(__cplusplus)
26939
26940 #ifdef HAVE_GXX_BUILTIN_H
26941 #include <g++/builtin.h>
26942 #elif HAVE_GPP_BUILTIN_H
26943 #include <gpp/builtin.h>
26944 #elif HAVE_BUILTIN_H
26945 #include <builtin.h>
26946 #endif
26947
26948 #else
26949
26950 #if $cf_cv_header_stdbool_h
26951 #include <stdbool.h>
26952 #endif
26953
26954 #endif
26955
26956 int
26957 main (void)
26958 {
26959 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26960   ;
26961   return 0;
26962 }
26963 _ACEOF
26964 rm -f "conftest.$ac_objext"
26965 if { (eval echo "$as_me:26965: \"$ac_compile\"") >&5
26966   (eval $ac_compile) 2>&5
26967   ac_status=$?
26968   echo "$as_me:26968: \$? = $ac_status" >&5
26969   (exit "$ac_status"); } &&
26970          { ac_try='test -s "conftest.$ac_objext"'
26971   { (eval echo "$as_me:26971: \"$ac_try\"") >&5
26972   (eval $ac_try) 2>&5
26973   ac_status=$?
26974   echo "$as_me:26974: \$? = $ac_status" >&5
26975   (exit "$ac_status"); }; }; then
26976   ac_lo=$ac_mid; break
26977 else
26978   echo "$as_me: failed program was:" >&5
26979 cat "conftest.$ac_ext" >&5
26980 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26981 fi
26982 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26983   done
26984 fi
26985 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26986 # Binary search between lo and hi bounds.
26987 while test "x$ac_lo" != "x$ac_hi"; do
26988   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26989   cat >"conftest.$ac_ext" <<_ACEOF
26990 #line 26990 "configure"
26991 #include "confdefs.h"
26992
26993 #include <stdlib.h>
26994 #include <stdio.h>
26995
26996 #if defined(__cplusplus)
26997
26998 #ifdef HAVE_GXX_BUILTIN_H
26999 #include <g++/builtin.h>
27000 #elif HAVE_GPP_BUILTIN_H
27001 #include <gpp/builtin.h>
27002 #elif HAVE_BUILTIN_H
27003 #include <builtin.h>
27004 #endif
27005
27006 #else
27007
27008 #if $cf_cv_header_stdbool_h
27009 #include <stdbool.h>
27010 #endif
27011
27012 #endif
27013
27014 int
27015 main (void)
27016 {
27017 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27018   ;
27019   return 0;
27020 }
27021 _ACEOF
27022 rm -f "conftest.$ac_objext"
27023 if { (eval echo "$as_me:27023: \"$ac_compile\"") >&5
27024   (eval $ac_compile) 2>&5
27025   ac_status=$?
27026   echo "$as_me:27026: \$? = $ac_status" >&5
27027   (exit "$ac_status"); } &&
27028          { ac_try='test -s "conftest.$ac_objext"'
27029   { (eval echo "$as_me:27029: \"$ac_try\"") >&5
27030   (eval $ac_try) 2>&5
27031   ac_status=$?
27032   echo "$as_me:27032: \$? = $ac_status" >&5
27033   (exit "$ac_status"); }; }; then
27034   ac_hi=$ac_mid
27035 else
27036   echo "$as_me: failed program was:" >&5
27037 cat "conftest.$ac_ext" >&5
27038 ac_lo=`expr "$ac_mid" + 1`
27039 fi
27040 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27041 done
27042 ac_cv_sizeof_bool=$ac_lo
27043 else
27044   if test "$cross_compiling" = yes; then
27045   { { echo "$as_me:27045: error: cannot run test program while cross compiling" >&5
27046 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27047    { (exit 1); exit 1; }; }
27048 else
27049   cat >"conftest.$ac_ext" <<_ACEOF
27050 #line 27050 "configure"
27051 #include "confdefs.h"
27052
27053 #include <stdlib.h>
27054 #include <stdio.h>
27055
27056 #if defined(__cplusplus)
27057
27058 #ifdef HAVE_GXX_BUILTIN_H
27059 #include <g++/builtin.h>
27060 #elif HAVE_GPP_BUILTIN_H
27061 #include <gpp/builtin.h>
27062 #elif HAVE_BUILTIN_H
27063 #include <builtin.h>
27064 #endif
27065
27066 #else
27067
27068 #if $cf_cv_header_stdbool_h
27069 #include <stdbool.h>
27070 #endif
27071
27072 #endif
27073
27074 int
27075 main (void)
27076 {
27077 FILE *f = fopen ("conftest.val", "w");
27078 if (!f)
27079   $ac_main_return (1);
27080 fprintf (f, "%ld", (long)(sizeof (bool)));
27081 fclose (f);
27082   ;
27083   return 0;
27084 }
27085 _ACEOF
27086 rm -f "conftest$ac_exeext"
27087 if { (eval echo "$as_me:27087: \"$ac_link\"") >&5
27088   (eval $ac_link) 2>&5
27089   ac_status=$?
27090   echo "$as_me:27090: \$? = $ac_status" >&5
27091   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27092   { (eval echo "$as_me:27092: \"$ac_try\"") >&5
27093   (eval $ac_try) 2>&5
27094   ac_status=$?
27095   echo "$as_me:27095: \$? = $ac_status" >&5
27096   (exit "$ac_status"); }; }; then
27097   ac_cv_sizeof_bool=`cat conftest.val`
27098 else
27099   echo "$as_me: program exited with status $ac_status" >&5
27100 echo "$as_me: failed program was:" >&5
27101 cat "conftest.$ac_ext" >&5
27102 fi
27103 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27104 fi
27105 fi
27106 rm -f conftest.val
27107 else
27108   ac_cv_sizeof_bool=0
27109 fi
27110 fi
27111 echo "$as_me:27111: result: $ac_cv_sizeof_bool" >&5
27112 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27113 cat >>confdefs.h <<EOF
27114 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27115 EOF
27116
27117 echo "$as_me:27117: checking for type of bool" >&5
27118 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27119 if test "${cf_cv_type_of_bool+set}" = set; then
27120   echo $ECHO_N "(cached) $ECHO_C" >&6
27121 else
27122
27123         rm -f cf_test.out
27124         if test "$cross_compiling" = yes; then
27125
27126                 case x$ac_cv_sizeof_bool in
27127                 (x1) cf_cv_type_of_bool="unsigned char";;
27128                 (x2) cf_cv_type_of_bool="unsigned short";;
27129                 (x4) cf_cv_type_of_bool="unsigned int";;
27130                 (x8) cf_cv_type_of_bool="unsigned long";;
27131                 (*)  cf_cv_type_of_bool=unknown;;
27132                 esac
27133
27134 else
27135   cat >"conftest.$ac_ext" <<_ACEOF
27136 #line 27136 "configure"
27137 #include "confdefs.h"
27138
27139 #include <stdlib.h>
27140 #include <stdio.h>
27141
27142 #if defined(__cplusplus)
27143
27144 #ifdef HAVE_GXX_BUILTIN_H
27145 #include <g++/builtin.h>
27146 #elif HAVE_GPP_BUILTIN_H
27147 #include <gpp/builtin.h>
27148 #elif HAVE_BUILTIN_H
27149 #include <builtin.h>
27150 #endif
27151
27152 #else
27153
27154 #if $cf_cv_header_stdbool_h
27155 #include <stdbool.h>
27156 #endif
27157
27158 #endif
27159
27160 int main(void)
27161 {
27162         FILE *fp = fopen("cf_test.out", "w");
27163         if (fp != 0) {
27164                 bool x = true;
27165                 if ((bool)(-x) >= 0)
27166                         fputs("unsigned ", fp);
27167                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27168                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27169                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27170                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27171                 fclose(fp);
27172         }
27173         ${cf_cv_main_return:-return}(0);
27174 }
27175
27176 _ACEOF
27177 rm -f "conftest$ac_exeext"
27178 if { (eval echo "$as_me:27178: \"$ac_link\"") >&5
27179   (eval $ac_link) 2>&5
27180   ac_status=$?
27181   echo "$as_me:27181: \$? = $ac_status" >&5
27182   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27183   { (eval echo "$as_me:27183: \"$ac_try\"") >&5
27184   (eval $ac_try) 2>&5
27185   ac_status=$?
27186   echo "$as_me:27186: \$? = $ac_status" >&5
27187   (exit "$ac_status"); }; }; then
27188   cf_cv_type_of_bool=`cat cf_test.out`
27189                  if test -z "$cf_cv_type_of_bool"; then
27190                    cf_cv_type_of_bool=unknown
27191                  fi
27192 else
27193   echo "$as_me: program exited with status $ac_status" >&5
27194 echo "$as_me: failed program was:" >&5
27195 cat "conftest.$ac_ext" >&5
27196 cf_cv_type_of_bool=unknown
27197 fi
27198 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27199 fi
27200         rm -f cf_test.out
27201
27202 fi
27203 echo "$as_me:27203: result: $cf_cv_type_of_bool" >&5
27204 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27205
27206 if test "$cf_cv_type_of_bool" = unknown ; then
27207         case .$NCURSES_BOOL in
27208         (.auto|.) NCURSES_BOOL=unsigned;;
27209         esac
27210         { echo "$as_me:27210: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27211 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27212         cf_cv_type_of_bool=$NCURSES_BOOL
27213 fi
27214
27215                 else
27216                         echo "$as_me:27216: checking for fallback type of bool" >&5
27217 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27218                         case "$host_cpu" in
27219                         (i?86)  cf_cv_type_of_bool=char ;;
27220                         (*)     cf_cv_type_of_bool=int  ;;
27221                         esac
27222                         echo "$as_me:27222: result: $cf_cv_type_of_bool" >&5
27223 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27224                 fi
27225         fi
27226 fi
27227
27228 # If the C compiler did not declare bool, and we did not determine that the C++
27229 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27230 # ncurses library use the same type as C++ bool.  Note that this allows one to
27231 # specify the type of bool in a configure-script option and postpone
27232 # integration with the C++ compiler provided that the types are compatible.
27233 USE_CXX_BOOL=1
27234 if test "$cf_cv_cc_bool_type" = 1
27235 then
27236         # oops: C has a bool.  Unlikely, but C++ could differ.
27237         USE_CXX_BOOL=0
27238 elif test "$cf_cv_builtin_bool" = 0
27239 then
27240         # C++ has no bool
27241         USE_CXX_BOOL=0
27242 else
27243         # this is the normal case
27244         USE_CXX_BOOL='defined(__cplusplus)'
27245 fi
27246
27247 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27248
27249         if test "$cf_with_ada" != "no" ; then
27250                 if test "$with_libtool" != "no"; then
27251                         { echo "$as_me:27251: WARNING: libtool does not support Ada - disabling feature" >&5
27252 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27253                         cf_with_ada=no
27254                 fi
27255         fi
27256
27257         if test "$cf_with_ada" != "no" ; then
27258
27259 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27260 do
27261
27262 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27263
27264         unset ac_cv_path_cf_TEMP_gnat
27265         unset cf_TEMP_gnat
27266         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27267 set dummy $cf_prog_gnat; ac_word=$2
27268 echo "$as_me:27268: checking for $ac_word" >&5
27269 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27270 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27271   echo $ECHO_N "(cached) $ECHO_C" >&6
27272 else
27273   case $cf_TEMP_gnat in
27274   [\\/]* | ?:[\\/]*)
27275   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27276   ;;
27277   *)
27278   ac_save_IFS=$IFS; IFS=$ac_path_separator
27279 ac_dummy="$PATH"
27280 for ac_dir in $ac_dummy; do
27281   IFS=$ac_save_IFS
27282   test -z "$ac_dir" && ac_dir=.
27283   if $as_executable_p "$ac_dir/$ac_word"; then
27284    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27285    echo "$as_me:27285: found $ac_dir/$ac_word" >&5
27286    break
27287 fi
27288 done
27289
27290   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27291   ;;
27292 esac
27293 fi
27294 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27295
27296 if test -n "$cf_TEMP_gnat"; then
27297   echo "$as_me:27297: result: $cf_TEMP_gnat" >&5
27298 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27299 else
27300   echo "$as_me:27300: result: no" >&5
27301 echo "${ECHO_T}no" >&6
27302 fi
27303
27304         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27305
27306         if test "x$cf_TEMP_gnat" != xno; then
27307                 unset cf_cv_gnat_version
27308                 unset cf_TEMP_gnat
27309
27310 echo "$as_me:27310: checking for $cf_prog_gnat version" >&5
27311 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27312 if test "${cf_cv_gnat_version+set}" = set; then
27313   echo $ECHO_N "(cached) $ECHO_C" >&6
27314 else
27315
27316 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27317         grep '[0-9].[0-9][0-9]*' |\
27318         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27319
27320 fi
27321 echo "$as_me:27321: result: $cf_cv_gnat_version" >&5
27322 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27323 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27324 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27325
27326         fi
27327         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27328
27329         unset cf_TEMP_gnat
27330         unset cf_cv_gnat_version
27331         unset ac_cv_path_cf_TEMP_gnat
27332 done
27333
27334 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27335         cf_ada_make=
27336         cf_cv_prog_gnat_correct=no
27337 else
27338         cf_ada_make=gnatmake
27339         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27340                 # gprconfig is newer than gnatmake; we can continue...
27341                 cf_ada_config="##"
27342         else
27343                 rm -rf ./conftest* ./*~conftest*
27344                 if mkdir conftest.src
27345                 then
27346                         cf_ada_config=""
27347                         cd conftest.src
27348                         for cf_gprconfig in Ada C
27349                         do
27350                                 echo "$as_me:27350: checking for gprconfig name for $cf_gprconfig" >&5
27351 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27352                                 if test "$cf_gprconfig" = C
27353                                 then
27354                                         for cf_gprconfig_param in \
27355                                                 "$cf_gprconfig,,,,GNATGCC" \
27356                                                 "$cf_gprconfig,,,,GCC" \
27357                                                 "$cf_gprconfig"
27358                                         do
27359                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27360                                                 test -n "$cf_gprconfig_value" && break
27361                                         done
27362                                 else
27363                                         cf_gprconfig_param=$cf_gprconfig
27364                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27365                                 fi
27366                                 if test -n "$cf_gprconfig_value"
27367                                 then
27368                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27369                                         echo "$as_me:27369: result: $cf_gprconfig_value" >&5
27370 echo "${ECHO_T}$cf_gprconfig_value" >&6
27371                                 else
27372                                         echo "$as_me:27372: result: missing" >&5
27373 echo "${ECHO_T}missing" >&6
27374                                         cf_ada_config="#"
27375                                         break
27376                                 fi
27377                         done
27378                         cd ..
27379                         rm -rf ./conftest* ./*~conftest*
27380                 fi
27381         fi
27382         if test "x$cf_ada_config" != "x#"
27383         then
27384
27385 echo "$as_me:27385: checking for gnat version" >&5
27386 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27387 if test "${cf_cv_gnat_version+set}" = set; then
27388   echo $ECHO_N "(cached) $ECHO_C" >&6
27389 else
27390
27391 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27392         grep '[0-9].[0-9][0-9]*' |\
27393         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27394
27395 fi
27396 echo "$as_me:27396: result: $cf_cv_gnat_version" >&5
27397 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27398 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27399
27400 case "$cf_cv_gnat_version" in
27401 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27402         cf_cv_prog_gnat_correct=yes
27403         ;;
27404 (*)
27405         { echo "$as_me:27405: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27406 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27407         cf_cv_prog_gnat_correct=no
27408         ;;
27409 esac
27410
27411                 # Extract the first word of "m4", so it can be a program name with args.
27412 set dummy m4; ac_word=$2
27413 echo "$as_me:27413: checking for $ac_word" >&5
27414 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27415 if test "${ac_cv_prog_M4_exists+set}" = set; then
27416   echo $ECHO_N "(cached) $ECHO_C" >&6
27417 else
27418   if test -n "$M4_exists"; then
27419   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27420 else
27421   ac_save_IFS=$IFS; IFS=$ac_path_separator
27422 ac_dummy="$PATH"
27423 for ac_dir in $ac_dummy; do
27424   IFS=$ac_save_IFS
27425   test -z "$ac_dir" && ac_dir=.
27426   $as_executable_p "$ac_dir/$ac_word" || continue
27427 ac_cv_prog_M4_exists="yes"
27428 echo "$as_me:27428: found $ac_dir/$ac_word" >&5
27429 break
27430 done
27431
27432   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27433 fi
27434 fi
27435 M4_exists=$ac_cv_prog_M4_exists
27436 if test -n "$M4_exists"; then
27437   echo "$as_me:27437: result: $M4_exists" >&5
27438 echo "${ECHO_T}$M4_exists" >&6
27439 else
27440   echo "$as_me:27440: result: no" >&5
27441 echo "${ECHO_T}no" >&6
27442 fi
27443
27444                 if test "$ac_cv_prog_M4_exists" = no; then
27445                         cf_cv_prog_gnat_correct=no
27446                         { echo "$as_me:27446: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27447 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27448                 fi
27449                 if test "$cf_cv_prog_gnat_correct" = yes; then
27450                         echo "$as_me:27450: checking if GNAT works" >&5
27451 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27452
27453 rm -rf ./conftest* ./*~conftest*
27454 cat >>conftest.ads <<CF_EOF
27455 procedure conftest;
27456 CF_EOF
27457 cat >>conftest.adb <<CF_EOF
27458 with Text_IO;
27459 with GNAT.OS_Lib;
27460 procedure conftest is
27461 begin
27462    Text_IO.Put ("Hello World");
27463    Text_IO.New_Line;
27464    GNAT.OS_Lib.OS_Exit (0);
27465 end conftest;
27466 CF_EOF
27467 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27468    if ( ./conftest 1>&5 2>&1 ) ; then
27469       cf_cv_prog_gnat_correct=yes
27470    else
27471       cf_cv_prog_gnat_correct=no
27472    fi
27473 else
27474    cf_cv_prog_gnat_correct=no
27475 fi
27476 rm -rf ./conftest* ./*~conftest*
27477
27478                         echo "$as_me:27478: result: $cf_cv_prog_gnat_correct" >&5
27479 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27480                 fi
27481         else
27482                 cf_cv_prog_gnat_correct=no
27483         fi
27484 fi
27485
27486                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27487
27488         ADAFLAGS="$ADAFLAGS -gnatpn"
27489
27490         echo "$as_me:27490: checking optimization options for ADAFLAGS" >&5
27491 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27492         case "$CFLAGS" in
27493         (*-g*)
27494
27495         ADAFLAGS="$ADAFLAGS -g"
27496
27497                 ;;
27498         esac
27499         case "$CFLAGS" in
27500         (*-O*)
27501                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27502
27503         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27504
27505                 ;;
27506         esac
27507         echo "$as_me:27507: result: $ADAFLAGS" >&5
27508 echo "${ECHO_T}$ADAFLAGS" >&6
27509
27510 echo "$as_me:27510: checking if GNATPREP supports -T option" >&5
27511 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27512 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27513   echo $ECHO_N "(cached) $ECHO_C" >&6
27514 else
27515
27516 cf_cv_gnatprep_opt_t=no
27517 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27518
27519 fi
27520 echo "$as_me:27520: result: $cf_cv_gnatprep_opt_t" >&5
27521 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27522 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27523
27524 echo "$as_me:27524: checking if GNAT supports generics" >&5
27525 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27526 case "$cf_cv_gnat_version" in
27527 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27528         cf_gnat_generics=yes
27529         ;;
27530 (*)
27531         cf_gnat_generics=no
27532         ;;
27533 esac
27534 echo "$as_me:27534: result: $cf_gnat_generics" >&5
27535 echo "${ECHO_T}$cf_gnat_generics" >&6
27536
27537 if test "$cf_gnat_generics" = yes
27538 then
27539         cf_compile_generics=generics
27540         cf_generic_objects="\${GENOBJS}"
27541 else
27542         cf_compile_generics=
27543         cf_generic_objects=
27544 fi
27545
27546 echo "$as_me:27546: checking if GNAT supports SIGINT" >&5
27547 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27548 if test "${cf_cv_gnat_sigint+set}" = set; then
27549   echo $ECHO_N "(cached) $ECHO_C" >&6
27550 else
27551
27552 rm -rf ./conftest* ./*~conftest*
27553 cat >>conftest.ads <<CF_EOF
27554 with Ada.Interrupts.Names;
27555
27556 package ConfTest is
27557
27558    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27559    pragma Unreserve_All_Interrupts;
27560    pragma Warnings (On);
27561
27562    protected Process is
27563       procedure Stop;
27564       function Continue return Boolean;
27565       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27566    private
27567       Done : Boolean := False;
27568    end Process;
27569
27570 end ConfTest;
27571 CF_EOF
27572 cat >>conftest.adb <<CF_EOF
27573 package body ConfTest is
27574    protected body Process is
27575       procedure Stop is
27576       begin
27577          Done := True;
27578       end Stop;
27579       function Continue return Boolean is
27580       begin
27581          return not Done;
27582       end Continue;
27583    end Process;
27584 end ConfTest;
27585 CF_EOF
27586 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27587       cf_cv_gnat_sigint=yes
27588 else
27589    cf_cv_gnat_sigint=no
27590 fi
27591 rm -rf ./conftest* ./*~conftest*
27592
27593 fi
27594 echo "$as_me:27594: result: $cf_cv_gnat_sigint" >&5
27595 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27596
27597 if test "$cf_cv_gnat_sigint" = yes ; then
27598         USE_GNAT_SIGINT=""
27599 else
27600         USE_GNAT_SIGINT="#"
27601 fi
27602
27603 cf_gnat_libraries=no
27604 cf_gnat_projects=no
27605
27606 if test "$enable_gnat_projects" != no ; then
27607 echo "$as_me:27607: checking if GNAT supports project files" >&5
27608 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27609 case "$cf_cv_gnat_version" in
27610 (3.[0-9]*)
27611         ;;
27612 (*)
27613         case "$cf_cv_system_name" in
27614         (cygwin*|msys*)
27615                 ;;
27616         (*)
27617                 rm -rf ./conftest* ./*~conftest*
27618                 if mkdir conftest.src conftest.bin conftest.lib
27619                 then
27620                         cd conftest.src
27621                         rm -rf ./conftest* ./*~conftest*
27622                         cat >>library.gpr <<CF_EOF
27623 project Library is
27624   Kind := External ("LIB_KIND");
27625   for Library_Name use "ConfTest";
27626   for Object_Dir use ".";
27627   for Library_ALI_Dir use External("LIBRARY_DIR");
27628   for Library_Version use External ("SONAME");
27629   for Library_Kind use Kind;
27630   for Library_Dir use External("BUILD_DIR");
27631   Source_Dir := External ("SOURCE_DIR");
27632   for Source_Dirs use (Source_Dir);
27633 end Library;
27634 CF_EOF
27635                         cat >>confpackage.ads <<CF_EOF
27636 package ConfPackage is
27637    procedure conftest;
27638 end ConfPackage;
27639 CF_EOF
27640                         cat >>confpackage.adb <<CF_EOF
27641 with Text_IO;
27642 package body ConfPackage is
27643    procedure conftest is
27644    begin
27645       Text_IO.Put ("Hello World");
27646       Text_IO.New_Line;
27647    end conftest;
27648 end ConfPackage;
27649 CF_EOF
27650                         if ( "$cf_ada_make" $ADAFLAGS \
27651                                         -Plibrary.gpr \
27652                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27653                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27654                                         -XSOURCE_DIR="`pwd`" \
27655                                         -XSONAME=libConfTest.so.1 \
27656                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27657                                 cf_gnat_projects=yes
27658                         fi
27659                         cd ..
27660                 fi
27661                 if test -f conftest.lib/confpackage.ali
27662                 then
27663                         cf_gnat_libraries=yes
27664                 fi
27665                 rm -rf ./conftest* ./*~conftest*
27666                 ;;
27667         esac
27668         ;;
27669 esac
27670 echo "$as_me:27670: result: $cf_gnat_projects" >&5
27671 echo "${ECHO_T}$cf_gnat_projects" >&6
27672 fi # enable_gnat_projects
27673
27674 if test "$cf_gnat_projects" = yes
27675 then
27676         echo "$as_me:27676: checking if GNAT supports libraries" >&5
27677 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27678         echo "$as_me:27678: result: $cf_gnat_libraries" >&5
27679 echo "${ECHO_T}$cf_gnat_libraries" >&6
27680 fi
27681
27682 USE_OLD_MAKERULES=""
27683 USE_GNAT_PROJECTS="#"
27684 USE_GNAT_MAKE_GPR="#"
27685 USE_GNAT_GPRBUILD="#"
27686
27687 if test "$cf_gnat_projects" = yes
27688 then
27689         USE_OLD_MAKERULES="#"
27690         USE_GNAT_PROJECTS=""
27691         if test "$cf_cv_VERSION_GPRBUILD" != no
27692         then
27693                 USE_GNAT_GPRBUILD=""
27694         elif test "$cf_cv_VERSION_GNATMAKE" != no
27695         then
27696                 USE_GNAT_MAKE_GPR=""
27697         else
27698                 { echo "$as_me:27698: WARNING: use old makefile rules since tools are missing" >&5
27699 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27700         fi
27701 fi
27702
27703 if test "$cf_gnat_libraries" = yes
27704 then
27705         USE_GNAT_LIBRARIES=""
27706 else
27707         USE_GNAT_LIBRARIES="#"
27708 fi
27709
27710 echo "$as_me:27710: checking for ada-compiler" >&5
27711 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27712
27713 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27714 if test "${with_ada_compiler+set}" = set; then
27715   withval="$with_ada_compiler"
27716   cf_ada_compiler=$withval
27717 else
27718   cf_ada_compiler=gnatmake
27719 fi;
27720
27721 echo "$as_me:27721: result: $cf_ada_compiler" >&5
27722 echo "${ECHO_T}$cf_ada_compiler" >&6
27723
27724                         cf_ada_package=terminal_interface
27725
27726 echo "$as_me:27726: checking for ada-include" >&5
27727 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27728
27729 # Check whether --with-ada-include or --without-ada-include was given.
27730 if test "${with_ada_include+set}" = set; then
27731   withval="$with_ada_include"
27732
27733 else
27734   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27735 fi; if test -n "$prefix/share/ada/adainclude" ; then
27736
27737 if test "x$prefix" != xNONE; then
27738         cf_path_syntax="$prefix"
27739 else
27740         cf_path_syntax="$ac_default_prefix"
27741 fi
27742
27743 case ".$withval" in
27744 (.\$\(*\)*|.\'*\'*)
27745         ;;
27746 (..|./*|.\\*)
27747         ;;
27748 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27749         ;;
27750 (.\$\{*prefix\}*|.\$\{*dir\}*)
27751         eval withval="$withval"
27752         case ".$withval" in
27753         (.NONE/*)
27754                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27755                 ;;
27756         esac
27757         ;;
27758 (.no|.NONE/*)
27759         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27760         ;;
27761 (*)
27762         { { echo "$as_me:27762: error: expected a pathname, not \"$withval\"" >&5
27763 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27764    { (exit 1); exit 1; }; }
27765         ;;
27766 esac
27767
27768 fi
27769 eval ADA_INCLUDE="$withval"
27770
27771 echo "$as_me:27771: result: $ADA_INCLUDE" >&5
27772 echo "${ECHO_T}$ADA_INCLUDE" >&6
27773
27774 echo "$as_me:27774: checking for ada-objects" >&5
27775 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27776
27777 # Check whether --with-ada-objects or --without-ada-objects was given.
27778 if test "${with_ada_objects+set}" = set; then
27779   withval="$with_ada_objects"
27780
27781 else
27782   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27783 fi; if test -n "$prefix/lib/ada/adalib" ; then
27784
27785 if test "x$prefix" != xNONE; then
27786         cf_path_syntax="$prefix"
27787 else
27788         cf_path_syntax="$ac_default_prefix"
27789 fi
27790
27791 case ".$withval" in
27792 (.\$\(*\)*|.\'*\'*)
27793         ;;
27794 (..|./*|.\\*)
27795         ;;
27796 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27797         ;;
27798 (.\$\{*prefix\}*|.\$\{*dir\}*)
27799         eval withval="$withval"
27800         case ".$withval" in
27801         (.NONE/*)
27802                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27803                 ;;
27804         esac
27805         ;;
27806 (.no|.NONE/*)
27807         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27808         ;;
27809 (*)
27810         { { echo "$as_me:27810: error: expected a pathname, not \"$withval\"" >&5
27811 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27812    { (exit 1); exit 1; }; }
27813         ;;
27814 esac
27815
27816 fi
27817 eval ADA_OBJECTS="$withval"
27818
27819 echo "$as_me:27819: result: $ADA_OBJECTS" >&5
27820 echo "${ECHO_T}$ADA_OBJECTS" >&6
27821
27822 echo "$as_me:27822: checking if an Ada95 shared-library should be built" >&5
27823 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27824
27825 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27826 if test "${with_ada_sharedlib+set}" = set; then
27827   withval="$with_ada_sharedlib"
27828   with_ada_sharedlib=$withval
27829 else
27830   with_ada_sharedlib=no
27831 fi;
27832 echo "$as_me:27832: result: $with_ada_sharedlib" >&5
27833 echo "${ECHO_T}$with_ada_sharedlib" >&6
27834
27835 if test "x$with_ada_sharedlib" != xno
27836 then
27837         if test "x$cf_gnat_projects" != xyes
27838         then
27839                 { echo "$as_me:27839: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27840 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27841                 with_ada_sharedlib=no
27842         fi
27843 fi
27844
27845 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27846 MAKE_ADA_SHAREDLIB="#"
27847
27848 if test "x$with_ada_sharedlib" != xno
27849 then
27850         MAKE_ADA_SHAREDLIB=
27851         if test "x$with_ada_sharedlib" != xyes
27852         then
27853                 ADA_SHAREDLIB="$with_ada_sharedlib"
27854         fi
27855 fi
27856
27857                         # allow the Ada binding to be renamed
27858
27859 echo "$as_me:27859: checking for ada-libname" >&5
27860 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27861
27862 # Check whether --with-ada-libname or --without-ada-libname was given.
27863 if test "${with_ada_libname+set}" = set; then
27864   withval="$with_ada_libname"
27865   ADA_LIBNAME=$withval
27866 else
27867   ADA_LIBNAME=AdaCurses
27868 fi;
27869 case "x$ADA_LIBNAME" in
27870 (x|xyes|xno)
27871         ADA_LIBNAME=AdaCurses
27872         ;;
27873 esac
27874
27875 echo "$as_me:27875: result: $ADA_LIBNAME" >&5
27876 echo "${ECHO_T}$ADA_LIBNAME" >&6
27877
27878                 fi
27879         fi
27880 else
27881         cf_with_ada=no
27882 fi
27883
27884 # do this "late" to avoid conflict with header-checks
27885 if test "x$with_widec" = xyes ; then
27886         echo "$as_me:27886: checking for wchar_t" >&5
27887 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27888 if test "${ac_cv_type_wchar_t+set}" = set; then
27889   echo $ECHO_N "(cached) $ECHO_C" >&6
27890 else
27891   cat >"conftest.$ac_ext" <<_ACEOF
27892 #line 27892 "configure"
27893 #include "confdefs.h"
27894 $ac_includes_default
27895 int
27896 main (void)
27897 {
27898 if ((wchar_t *) 0)
27899   return 0;
27900 if (sizeof (wchar_t))
27901   return 0;
27902   ;
27903   return 0;
27904 }
27905 _ACEOF
27906 rm -f "conftest.$ac_objext"
27907 if { (eval echo "$as_me:27907: \"$ac_compile\"") >&5
27908   (eval $ac_compile) 2>&5
27909   ac_status=$?
27910   echo "$as_me:27910: \$? = $ac_status" >&5
27911   (exit "$ac_status"); } &&
27912          { ac_try='test -s "conftest.$ac_objext"'
27913   { (eval echo "$as_me:27913: \"$ac_try\"") >&5
27914   (eval $ac_try) 2>&5
27915   ac_status=$?
27916   echo "$as_me:27916: \$? = $ac_status" >&5
27917   (exit "$ac_status"); }; }; then
27918   ac_cv_type_wchar_t=yes
27919 else
27920   echo "$as_me: failed program was:" >&5
27921 cat "conftest.$ac_ext" >&5
27922 ac_cv_type_wchar_t=no
27923 fi
27924 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27925 fi
27926 echo "$as_me:27926: result: $ac_cv_type_wchar_t" >&5
27927 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27928
27929 echo "$as_me:27929: checking size of wchar_t" >&5
27930 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27931 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27932   echo $ECHO_N "(cached) $ECHO_C" >&6
27933 else
27934   if test "$ac_cv_type_wchar_t" = yes; then
27935   if test "$cross_compiling" = yes; then
27936   # Depending upon the size, compute the lo and hi bounds.
27937 cat >"conftest.$ac_ext" <<_ACEOF
27938 #line 27938 "configure"
27939 #include "confdefs.h"
27940 $ac_includes_default
27941 int
27942 main (void)
27943 {
27944 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27945   ;
27946   return 0;
27947 }
27948 _ACEOF
27949 rm -f "conftest.$ac_objext"
27950 if { (eval echo "$as_me:27950: \"$ac_compile\"") >&5
27951   (eval $ac_compile) 2>&5
27952   ac_status=$?
27953   echo "$as_me:27953: \$? = $ac_status" >&5
27954   (exit "$ac_status"); } &&
27955          { ac_try='test -s "conftest.$ac_objext"'
27956   { (eval echo "$as_me:27956: \"$ac_try\"") >&5
27957   (eval $ac_try) 2>&5
27958   ac_status=$?
27959   echo "$as_me:27959: \$? = $ac_status" >&5
27960   (exit "$ac_status"); }; }; then
27961   ac_lo=0 ac_mid=0
27962   while :; do
27963     cat >"conftest.$ac_ext" <<_ACEOF
27964 #line 27964 "configure"
27965 #include "confdefs.h"
27966 $ac_includes_default
27967 int
27968 main (void)
27969 {
27970 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27971   ;
27972   return 0;
27973 }
27974 _ACEOF
27975 rm -f "conftest.$ac_objext"
27976 if { (eval echo "$as_me:27976: \"$ac_compile\"") >&5
27977   (eval $ac_compile) 2>&5
27978   ac_status=$?
27979   echo "$as_me:27979: \$? = $ac_status" >&5
27980   (exit "$ac_status"); } &&
27981          { ac_try='test -s "conftest.$ac_objext"'
27982   { (eval echo "$as_me:27982: \"$ac_try\"") >&5
27983   (eval $ac_try) 2>&5
27984   ac_status=$?
27985   echo "$as_me:27985: \$? = $ac_status" >&5
27986   (exit "$ac_status"); }; }; then
27987   ac_hi=$ac_mid; break
27988 else
27989   echo "$as_me: failed program was:" >&5
27990 cat "conftest.$ac_ext" >&5
27991 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27992 fi
27993 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27994   done
27995 else
27996   echo "$as_me: failed program was:" >&5
27997 cat "conftest.$ac_ext" >&5
27998 ac_hi=-1 ac_mid=-1
27999   while :; do
28000     cat >"conftest.$ac_ext" <<_ACEOF
28001 #line 28001 "configure"
28002 #include "confdefs.h"
28003 $ac_includes_default
28004 int
28005 main (void)
28006 {
28007 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
28008   ;
28009   return 0;
28010 }
28011 _ACEOF
28012 rm -f "conftest.$ac_objext"
28013 if { (eval echo "$as_me:28013: \"$ac_compile\"") >&5
28014   (eval $ac_compile) 2>&5
28015   ac_status=$?
28016   echo "$as_me:28016: \$? = $ac_status" >&5
28017   (exit "$ac_status"); } &&
28018          { ac_try='test -s "conftest.$ac_objext"'
28019   { (eval echo "$as_me:28019: \"$ac_try\"") >&5
28020   (eval $ac_try) 2>&5
28021   ac_status=$?
28022   echo "$as_me:28022: \$? = $ac_status" >&5
28023   (exit "$ac_status"); }; }; then
28024   ac_lo=$ac_mid; break
28025 else
28026   echo "$as_me: failed program was:" >&5
28027 cat "conftest.$ac_ext" >&5
28028 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
28029 fi
28030 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28031   done
28032 fi
28033 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28034 # Binary search between lo and hi bounds.
28035 while test "x$ac_lo" != "x$ac_hi"; do
28036   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
28037   cat >"conftest.$ac_ext" <<_ACEOF
28038 #line 28038 "configure"
28039 #include "confdefs.h"
28040 $ac_includes_default
28041 int
28042 main (void)
28043 {
28044 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28045   ;
28046   return 0;
28047 }
28048 _ACEOF
28049 rm -f "conftest.$ac_objext"
28050 if { (eval echo "$as_me:28050: \"$ac_compile\"") >&5
28051   (eval $ac_compile) 2>&5
28052   ac_status=$?
28053   echo "$as_me:28053: \$? = $ac_status" >&5
28054   (exit "$ac_status"); } &&
28055          { ac_try='test -s "conftest.$ac_objext"'
28056   { (eval echo "$as_me:28056: \"$ac_try\"") >&5
28057   (eval $ac_try) 2>&5
28058   ac_status=$?
28059   echo "$as_me:28059: \$? = $ac_status" >&5
28060   (exit "$ac_status"); }; }; then
28061   ac_hi=$ac_mid
28062 else
28063   echo "$as_me: failed program was:" >&5
28064 cat "conftest.$ac_ext" >&5
28065 ac_lo=`expr "$ac_mid" + 1`
28066 fi
28067 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28068 done
28069 ac_cv_sizeof_wchar_t=$ac_lo
28070 else
28071   if test "$cross_compiling" = yes; then
28072   { { echo "$as_me:28072: error: cannot run test program while cross compiling" >&5
28073 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28074    { (exit 1); exit 1; }; }
28075 else
28076   cat >"conftest.$ac_ext" <<_ACEOF
28077 #line 28077 "configure"
28078 #include "confdefs.h"
28079 $ac_includes_default
28080 int
28081 main (void)
28082 {
28083 FILE *f = fopen ("conftest.val", "w");
28084 if (!f)
28085   $ac_main_return (1);
28086 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28087 fclose (f);
28088   ;
28089   return 0;
28090 }
28091 _ACEOF
28092 rm -f "conftest$ac_exeext"
28093 if { (eval echo "$as_me:28093: \"$ac_link\"") >&5
28094   (eval $ac_link) 2>&5
28095   ac_status=$?
28096   echo "$as_me:28096: \$? = $ac_status" >&5
28097   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28098   { (eval echo "$as_me:28098: \"$ac_try\"") >&5
28099   (eval $ac_try) 2>&5
28100   ac_status=$?
28101   echo "$as_me:28101: \$? = $ac_status" >&5
28102   (exit "$ac_status"); }; }; then
28103   ac_cv_sizeof_wchar_t=`cat conftest.val`
28104 else
28105   echo "$as_me: program exited with status $ac_status" >&5
28106 echo "$as_me: failed program was:" >&5
28107 cat "conftest.$ac_ext" >&5
28108 fi
28109 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28110 fi
28111 fi
28112 rm -f conftest.val
28113 else
28114   ac_cv_sizeof_wchar_t=0
28115 fi
28116 fi
28117 echo "$as_me:28117: result: $ac_cv_sizeof_wchar_t" >&5
28118 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28119 cat >>confdefs.h <<EOF
28120 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28121 EOF
28122
28123         # cross-compiling to mingw can run into the problem that attempting to
28124         # link with the regex library fails, causing the test to not set this to
28125         # a number.  "recent" autoconf does not address this problem either -TD
28126         if test -z "$ac_cv_sizeof_wchar_t"
28127         then
28128                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28129
28130 echo "${as_me:-configure}:28130: testing test failed (assume 2) ..." 1>&5
28131
28132                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28133                 mv confdefs.tmp confdefs.h
28134                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28135         fi
28136 fi
28137
28138 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28139 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28140 ###
28141 ### ticlib modules may be a separate library, otherwise contained in termlib.
28142 ### termlib modules may be a separate library, otherwise contained in ncurses.
28143 ###
28144 ### The of "+" or " " between the tokens controls the way the script
28145 ### chooses to split module lists into libraries.
28146 ###
28147 ### (see CF_LIB_RULES).
28148 echo "$as_me:28148: checking for library subsets" >&5
28149 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28150 LIB_SUBSETS=
28151
28152 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28153         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28154         if test "$with_ticlib" != no ; then
28155                 LIB_SUBSETS="${LIB_SUBSETS} "
28156         else
28157                 LIB_SUBSETS="${LIB_SUBSETS}+"
28158         fi
28159 fi
28160
28161 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28162 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28163
28164 if test "$with_termlib" != no ; then
28165         LIB_SUBSETS="${LIB_SUBSETS} "
28166 else
28167         LIB_SUBSETS="${LIB_SUBSETS}+"
28168 fi
28169
28170 LIB_SUBSETS="${LIB_SUBSETS}base"
28171
28172 # Most term-driver calls are to tinfo, but some like init_pair are to the
28173 # base library (so it resides in base).
28174 if test "$with_term_driver" != no ; then
28175         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28176         case "$cf_cv_system_name" in
28177         (*mingw32*|*mingw64*)
28178                 if test "x$with_exp_win32" = xyes ; then
28179                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28180                 else
28181                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28182                 fi
28183                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28184                 ;;
28185         (*)
28186                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28187                 ;;
28188         esac
28189 elif test "x$with_exp_win32" = xyes ; then
28190         case "$cf_cv_system_name" in
28191         (*mingw32*|*mingw64*)
28192                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28193                 ;;
28194         (*)
28195                 ;;
28196         esac
28197 fi
28198
28199 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28200 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28201
28202 echo "$as_me:28202: result: $LIB_SUBSETS" >&5
28203 echo "${ECHO_T}$LIB_SUBSETS" >&6
28204
28205 ### Construct the list of include-directories to be generated
28206
28207 if test "$srcdir" != "."; then
28208         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28209 fi
28210 CPPFLAGS="-I../include $CPPFLAGS"
28211 if test "$srcdir" != "."; then
28212         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28213 fi
28214 CPPFLAGS="-I. $CPPFLAGS"
28215
28216 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28217 if test "$srcdir" != "."; then
28218         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28219 fi
28220 if test "$GCC" != yes; then
28221         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28222 elif test "$includedir" != "/usr/include"; then
28223         if test "$includedir" = '${prefix}/include' ; then
28224                 if test x$prefix != x/usr ; then
28225                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28226                 fi
28227         else
28228                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28229         fi
28230 fi
28231
28232 ### Build up pieces for makefile rules
28233 echo "$as_me:28233: checking default library suffix" >&5
28234 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28235
28236         case $DFT_LWR_MODEL in
28237         (libtool) DFT_ARG_SUFFIX=''   ;;
28238         (normal)  DFT_ARG_SUFFIX=''   ;;
28239         (debug)   DFT_ARG_SUFFIX='_g' ;;
28240         (profile) DFT_ARG_SUFFIX='_p' ;;
28241         (shared)  DFT_ARG_SUFFIX=''   ;;
28242         esac
28243         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28244 echo "$as_me:28244: result: $DFT_ARG_SUFFIX" >&5
28245 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28246
28247 echo "$as_me:28247: checking default library-dependency suffix" >&5
28248 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28249
28250         case X$DFT_LWR_MODEL in
28251         (Xlibtool)
28252                 DFT_LIB_SUFFIX='.la'
28253                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28254                 ;;
28255         (Xdebug)
28256                 case "$cf_cv_system_name" in
28257                 (*-msvc*)
28258                         DFT_LIB_SUFFIX='_g.lib'
28259                         ;;
28260                 (*)
28261                         DFT_LIB_SUFFIX='_g.a'
28262                         ;;
28263                 esac
28264                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28265                 ;;
28266         (Xprofile)
28267                 case "$cf_cv_system_name" in
28268                 (*-msvc*)
28269                         DFT_LIB_SUFFIX='_p.lib'
28270                         ;;
28271                 (*)
28272                         DFT_LIB_SUFFIX='_p.a'
28273                         ;;
28274                 esac
28275                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28276                 ;;
28277         (Xshared)
28278                 case "$cf_cv_system_name" in
28279                 (aix[5-7]*)
28280                         DFT_LIB_SUFFIX='.so'
28281                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28282                         ;;
28283                 (*-msvc*)
28284                         DFT_LIB_SUFFIX='.dll'
28285                         DFT_DEP_SUFFIX='.dll.lib'
28286                         ;;
28287                 (cygwin*|msys*|mingw*)
28288                         DFT_LIB_SUFFIX='.dll'
28289                         DFT_DEP_SUFFIX='.dll.a'
28290                         ;;
28291                 (darwin*)
28292                         DFT_LIB_SUFFIX='.dylib'
28293                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28294                         ;;
28295                 (hpux*)
28296                         case "$target" in
28297                         (ia64*)
28298                                 DFT_LIB_SUFFIX='.so'
28299                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28300                                 ;;
28301                         (*)
28302                                 DFT_LIB_SUFFIX='.sl'
28303                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28304                                 ;;
28305                         esac
28306                         ;;
28307                 (*)
28308                         DFT_LIB_SUFFIX='.so'
28309                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28310                         ;;
28311                 esac
28312                 ;;
28313         (*)
28314                 case "$target" in
28315                 (*-msvc*)
28316                         DFT_LIB_SUFFIX='.lib'
28317                         ;;
28318                 (*)
28319                         DFT_LIB_SUFFIX='.a'
28320                         ;;
28321                 esac
28322                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28323                 ;;
28324         esac
28325         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28326         then
28327                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28328                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28329         fi
28330 echo "$as_me:28330: result: $DFT_DEP_SUFFIX" >&5
28331 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28332
28333 echo "$as_me:28333: checking default object directory" >&5
28334 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28335
28336         case $DFT_LWR_MODEL in
28337         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28338         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28339         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28340         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28341         (shared)
28342                 case "$cf_cv_system_name" in
28343                 (cygwin|msys)
28344                         DFT_OBJ_SUBDIR='objects' ;;
28345                 (*)
28346                         DFT_OBJ_SUBDIR='obj_s' ;;
28347                 esac
28348         esac
28349 echo "$as_me:28349: result: $DFT_OBJ_SUBDIR" >&5
28350 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28351
28352 if test "x$cf_with_cxx" = xyes ; then
28353 echo "$as_me:28353: checking c++ library-dependency suffix" >&5
28354 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28355 if test "$with_libtool" != "no"; then
28356         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28357         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28358 elif test "$with_shared_cxx" != "no"; then
28359         # also for g++ users...
28360         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28361 else
28362         # we normally make a static library because C/C++ library rules differ
28363
28364         case Xnormal in
28365         (Xlibtool)
28366                 CXX_LIB_SUFFIX='.la'
28367                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28368                 ;;
28369         (Xdebug)
28370                 case "$cf_cv_system_name" in
28371                 (*-msvc*)
28372                         CXX_LIB_SUFFIX='_g.lib'
28373                         ;;
28374                 (*)
28375                         CXX_LIB_SUFFIX='_g.a'
28376                         ;;
28377                 esac
28378                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28379                 ;;
28380         (Xprofile)
28381                 case "$cf_cv_system_name" in
28382                 (*-msvc*)
28383                         CXX_LIB_SUFFIX='_p.lib'
28384                         ;;
28385                 (*)
28386                         CXX_LIB_SUFFIX='_p.a'
28387                         ;;
28388                 esac
28389                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28390                 ;;
28391         (Xshared)
28392                 case "$cf_cv_system_name" in
28393                 (aix[5-7]*)
28394                         CXX_LIB_SUFFIX='.so'
28395                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28396                         ;;
28397                 (*-msvc*)
28398                         CXX_LIB_SUFFIX='.dll'
28399                         CXX_DEP_SUFFIX='.dll.lib'
28400                         ;;
28401                 (cygwin*|msys*|mingw*)
28402                         CXX_LIB_SUFFIX='.dll'
28403                         CXX_DEP_SUFFIX='.dll.a'
28404                         ;;
28405                 (darwin*)
28406                         CXX_LIB_SUFFIX='.dylib'
28407                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28408                         ;;
28409                 (hpux*)
28410                         case "$target" in
28411                         (ia64*)
28412                                 CXX_LIB_SUFFIX='.so'
28413                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28414                                 ;;
28415                         (*)
28416                                 CXX_LIB_SUFFIX='.sl'
28417                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28418                                 ;;
28419                         esac
28420                         ;;
28421                 (*)
28422                         CXX_LIB_SUFFIX='.so'
28423                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28424                         ;;
28425                 esac
28426                 ;;
28427         (*)
28428                 case "$target" in
28429                 (*-msvc*)
28430                         CXX_LIB_SUFFIX='.lib'
28431                         ;;
28432                 (*)
28433                         CXX_LIB_SUFFIX='.a'
28434                         ;;
28435                 esac
28436                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28437                 ;;
28438         esac
28439         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28440         then
28441                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28442                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28443         fi
28444
28445 fi
28446 echo "$as_me:28446: result: $CXX_LIB_SUFFIX" >&5
28447 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28448
28449 fi
28450
28451 # do not want -ldl in build except as needed for -lncurses dependency
28452 if test "x$with_dlsym" = xyes ; then
28453 if test "$DFT_LWR_MODEL" = shared || \
28454    test "$DFT_LWR_MODEL" = libtool ; then
28455
28456 # remove dl library from $LIBS
28457 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28458
28459 fi
28460 fi
28461 ### Set up low-level terminfo dependencies for makefiles.
28462
28463 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28464 # do not need libdl
28465 TICS_LIST=
28466 if test "x$with_dlsym" = xyes ; then
28467
28468 # remove dl library from $SHLIB_LIST
28469 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28470
28471 fi
28472
28473 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28474 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28475 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28476 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28477 then
28478         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28479 fi
28480
28481 if test "$with_ticlib" != no ; then
28482
28483         if test "x$with_ticlib" != xyes ; then
28484                 TICS_NAME=$with_ticlib
28485                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28486                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28487                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28488                 TICS_LIB_SUFFIX="${with_ticlib}"
28489         else
28490                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28491                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28492                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28493                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28494         fi
28495         TICS_LDFLAGS="-L${LIB_DIR}"
28496         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28497 else
28498         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28499         TICS_LDFLAGS="-L${LIB_DIR}"
28500         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28501 fi
28502
28503 if test "$with_termlib" != no ; then
28504
28505         if test "x$with_termlib" != xyes ; then
28506                 TINFO_NAME=$with_termlib
28507                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28508                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28509                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28510                 TINFO_LIB_SUFFIX="${with_termlib}"
28511         else
28512                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28513                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28514                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28515                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28516         fi
28517
28518         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28519         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28520         if test "$DFT_LWR_MODEL" = "libtool"; then
28521                 TEST_ARGS="${TEST_DEPS}"
28522                 TEST_ARG2="${TEST_DEP2}"
28523                 TINFO_LDFLAGS="-L${LIB_DIR}"
28524                 TINFO_LIBS="$TEST_ARGS"
28525                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28526                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28527         else
28528                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28529                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28530                 if test "x$with_term_driver" != xno ; then
28531                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28532                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28533                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28534                 else
28535                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28536                         TINFO_LIBS="$TEST_ARGS"
28537                 fi
28538                 TINFO_LDFLAGS="-L${LIB_DIR}"
28539                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28540         fi
28541 else
28542         # the next lines are needed for linking libtic over libncurses
28543         TINFO_NAME=${LIB_NAME}
28544         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28545         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28546         if test "x$with_tic_depends" = xyes ; then
28547                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28548         else
28549                 TICS_LIST="$SHLIB_LIST"
28550         fi
28551
28552         TINFO_LDFLAGS="-L${LIB_DIR}"
28553         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28554 fi
28555
28556 if test "$DFT_LWR_MODEL" = shared ; then
28557         case "$cf_cv_system_name" in
28558         (cygwin*|msys*)
28559                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28560                 TINFO_SUFFIX=.dll
28561                 ;;
28562         esac
28563 fi
28564
28565 if test "x$with_dlsym" = xyes ; then
28566
28567 # remove dl library from $TICS_LIST
28568 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28569
28570 fi
28571
28572 if test "$DFT_LWR_MODEL" = "libtool"; then
28573         OBJEXT=lo
28574 fi
28575
28576 # needed for Ada95
28577 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28578
28579 case "$DFT_LWR_MODEL" in
28580 (normal|debug|profile)
28581
28582 if test "$GCC" = yes ; then
28583         case "$cf_cv_system_name" in
28584         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28585                 LDFLAGS_STATIC=
28586                 LDFLAGS_SHARED=
28587                 ;;
28588         (*)     # normally, except when broken
28589                 LDFLAGS_STATIC=-static
28590                 LDFLAGS_SHARED=-dynamic
28591                 ;;
28592         esac
28593 else
28594         case "$cf_cv_system_name" in
28595         (aix[4-7]*)     # from ld manpage
28596                 LDFLAGS_STATIC=-bstatic
28597                 LDFLAGS_SHARED=-bdynamic
28598                 ;;
28599         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28600                 # We could also use just "archive" and "shared".
28601                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28602                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28603                 ;;
28604         (irix*)         # from ld manpage IRIX64
28605                 LDFLAGS_STATIC=-Bstatic
28606                 LDFLAGS_SHARED=-Bdynamic
28607                 ;;
28608         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28609                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28610                 LDFLAGS_STATIC=-noso
28611                 LDFLAGS_SHARED=-so_archive
28612                 ;;
28613         (solaris2*)
28614                 LDFLAGS_STATIC=-Bstatic
28615                 LDFLAGS_SHARED=-Bdynamic
28616                 ;;
28617         esac
28618 fi
28619
28620 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28621 then
28622         echo "$as_me:28622: checking if linker supports switching between static/dynamic" >&5
28623 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28624
28625         rm -f libconftest.a
28626         cat >conftest.$ac_ext <<EOF
28627 #line 28627 "configure"
28628 #include <stdio.h>
28629 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28630 EOF
28631         if { (eval echo "$as_me:28631: \"$ac_compile\"") >&5
28632   (eval $ac_compile) 2>&5
28633   ac_status=$?
28634   echo "$as_me:28634: \$? = $ac_status" >&5
28635   (exit "$ac_status"); } ; then
28636                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28637                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28638         fi
28639         rm -f conftest.*
28640
28641         cf_save_LIBS="$LIBS"
28642
28643         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28644         cat >"conftest.$ac_ext" <<_ACEOF
28645 #line 28645 "configure"
28646 #include "confdefs.h"
28647
28648 #line 28648 "configure"
28649 #include <stdio.h>
28650 int cf_ldflags_static(FILE *fp);
28651
28652 int
28653 main (void)
28654 {
28655
28656         return cf_ldflags_static(stdin);
28657
28658   ;
28659   return 0;
28660 }
28661 _ACEOF
28662 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28663 if { (eval echo "$as_me:28663: \"$ac_link\"") >&5
28664   (eval $ac_link) 2>&5
28665   ac_status=$?
28666   echo "$as_me:28666: \$? = $ac_status" >&5
28667   (exit "$ac_status"); } &&
28668          { ac_try='test -s "conftest$ac_exeext"'
28669   { (eval echo "$as_me:28669: \"$ac_try\"") >&5
28670   (eval $ac_try) 2>&5
28671   ac_status=$?
28672   echo "$as_me:28672: \$? = $ac_status" >&5
28673   (exit "$ac_status"); }; }; then
28674
28675         # some linkers simply ignore the -dynamic
28676         case x`file "conftest$ac_exeext" 2>/dev/null` in
28677         (*static*)
28678                 cf_ldflags_static=no
28679                 ;;
28680         (*)
28681                 cf_ldflags_static=yes
28682                 ;;
28683         esac
28684
28685 else
28686   echo "$as_me: failed program was:" >&5
28687 cat "conftest.$ac_ext" >&5
28688 cf_ldflags_static=no
28689 fi
28690 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28691
28692         rm -f libconftest.*
28693         LIBS="$cf_save_LIBS"
28694
28695         echo "$as_me:28695: result: $cf_ldflags_static" >&5
28696 echo "${ECHO_T}$cf_ldflags_static" >&6
28697
28698         if test "$cf_ldflags_static" != yes
28699         then
28700                 LDFLAGS_STATIC=
28701                 LDFLAGS_SHARED=
28702         fi
28703 else
28704         LDFLAGS_STATIC=
28705         LDFLAGS_SHARED=
28706 fi
28707
28708         ;;
28709 esac
28710
28711 echo "$as_me:28711: checking where we will install curses.h" >&5
28712 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28713
28714 includesubdir=
28715 if test "$with_overwrite" = no && \
28716  { test "x$includedir" = 'x${prefix}/include' || \
28717    test "x$includedir" = "x${prefix}/include"; }
28718 then
28719         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28720 fi
28721 echo "$as_me:28721: result: ${includedir}${includesubdir}" >&5
28722 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28723
28724 ### Resolve a conflict between normal and wide-curses by forcing applications
28725 ### that will need libutf8 to add it to their configure script.
28726 if test "$with_overwrite" != no ; then
28727 if test "$NCURSES_LIBUTF8" = 1 ; then
28728         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28729         { echo "$as_me:28729: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28730 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28731 fi
28732 fi
28733 WITH_OVERWRITE=$with_overwrite
28734
28735 ### At least on MinGW a shared library build without libtool
28736 ### requires adding the additional libs to the link list.
28737 case "$cf_cv_system_name" in
28738 (*mingw32*|*mingw64*)
28739         if test "$DFT_LWR_MODEL" != "libtool"; then
28740            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28741         fi
28742         ;;
28743 *)      ;;
28744 esac
28745
28746 # used to separate tack out of the tree
28747 NCURSES_TREE=
28748
28749 ### predefined stuff for the test programs
28750
28751 cat >>confdefs.h <<\EOF
28752 #define HAVE_SLK_COLOR 1
28753 EOF
28754
28755 # pkgsrc uses these
28756
28757 echo "$as_me:28757: checking for desired basename for form library" >&5
28758 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28759
28760 # Check whether --with-form-libname or --without-form-libname was given.
28761 if test "${with_form_libname+set}" = set; then
28762   withval="$with_form_libname"
28763   with_lib_basename=$withval
28764 else
28765   with_lib_basename=form
28766 fi;
28767 FORM_NAME="$with_lib_basename"
28768
28769 case "x$FORM_NAME" in
28770 (x|xno|xnone|xyes)
28771         FORM_NAME=form
28772         ;;
28773 (*)
28774         ;;
28775 esac
28776
28777 echo "$as_me:28777: result: $FORM_NAME" >&5
28778 echo "${ECHO_T}$FORM_NAME" >&6
28779
28780 echo "$as_me:28780: checking for desired basename for menu library" >&5
28781 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28782
28783 # Check whether --with-menu-libname or --without-menu-libname was given.
28784 if test "${with_menu_libname+set}" = set; then
28785   withval="$with_menu_libname"
28786   with_lib_basename=$withval
28787 else
28788   with_lib_basename=menu
28789 fi;
28790 MENU_NAME="$with_lib_basename"
28791
28792 case "x$MENU_NAME" in
28793 (x|xno|xnone|xyes)
28794         MENU_NAME=menu
28795         ;;
28796 (*)
28797         ;;
28798 esac
28799
28800 echo "$as_me:28800: result: $MENU_NAME" >&5
28801 echo "${ECHO_T}$MENU_NAME" >&6
28802
28803 echo "$as_me:28803: checking for desired basename for panel library" >&5
28804 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28805
28806 # Check whether --with-panel-libname or --without-panel-libname was given.
28807 if test "${with_panel_libname+set}" = set; then
28808   withval="$with_panel_libname"
28809   with_lib_basename=$withval
28810 else
28811   with_lib_basename=panel
28812 fi;
28813 PANEL_NAME="$with_lib_basename"
28814
28815 case "x$PANEL_NAME" in
28816 (x|xno|xnone|xyes)
28817         PANEL_NAME=panel
28818         ;;
28819 (*)
28820         ;;
28821 esac
28822
28823 echo "$as_me:28823: result: $PANEL_NAME" >&5
28824 echo "${ECHO_T}$PANEL_NAME" >&6
28825
28826 echo "$as_me:28826: checking for desired basename for cxx library" >&5
28827 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28828
28829 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28830 if test "${with_cxx_libname+set}" = set; then
28831   withval="$with_cxx_libname"
28832   with_lib_basename=$withval
28833 else
28834   with_lib_basename=ncurses++
28835 fi;
28836 CXX_NAME="$with_lib_basename"
28837
28838 case "x$CXX_NAME" in
28839 (x|xno|xnone|xyes)
28840         CXX_NAME=ncurses++
28841         ;;
28842 (*)
28843         ;;
28844 esac
28845
28846 echo "$as_me:28846: result: $CXX_NAME" >&5
28847 echo "${ECHO_T}$CXX_NAME" >&6
28848
28849 ### Construct the list of subdirectories for which we'll customize makefiles
28850 ### with the appropriate compile-rules.
28851
28852 echo "$as_me:28852: checking for src modules" >&5
28853 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28854
28855 # dependencies and linker-arguments for test-programs
28856 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28857 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28858 if test "$DFT_LWR_MODEL" = "libtool"; then
28859         TEST_ARGS="${TEST_DEPS}"
28860         TEST_ARG2="${TEST_DEP2}"
28861 else
28862         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28863         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28864 fi
28865
28866 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28867 cf_cv_src_modules=
28868 for cf_dir in $modules_to_build
28869 do
28870         if test -f "$srcdir/$cf_dir/modules" ; then
28871
28872                 # We may/may not have tack in the distribution, though the
28873                 # makefile is.
28874                 if test "$cf_dir" = tack ; then
28875                         if test "x$cf_with_tack" != "xyes"; then
28876                                 continue
28877                         fi
28878                 fi
28879
28880                 if test -z "$cf_cv_src_modules"; then
28881                         cf_cv_src_modules=$cf_dir
28882                 else
28883                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28884                 fi
28885
28886                 # Make the ncurses_cfg.h file record the library interface files as
28887                 # well.  These are header files that are the same name as their
28888                 # directory.  Ncurses is the only library that does not follow
28889                 # that pattern.
28890                 if test "$cf_dir" = tack ; then
28891                         continue
28892                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28893
28894 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28895
28896                         cat >>confdefs.h <<EOF
28897 #define HAVE_${cf_have_include}_H 1
28898 EOF
28899
28900                         cat >>confdefs.h <<EOF
28901 #define HAVE_LIB${cf_have_include} 1
28902 EOF
28903
28904 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28905
28906 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28907
28908                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28909                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28910                         if test "$DFT_LWR_MODEL" = "libtool"; then
28911                                 TEST_ARGS="${TEST_DEPS}"
28912                                 TEST_ARG2="${TEST_DEP2}"
28913                         else
28914                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28915                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28916                         fi
28917                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28918                 fi
28919         fi
28920 done
28921 echo "$as_me:28921: result: $cf_cv_src_modules" >&5
28922 echo "${ECHO_T}$cf_cv_src_modules" >&6
28923
28924 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28925 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28926
28927 SRC_SUBDIRS=
28928 if test "x$cf_with_manpages" != xno ; then
28929         SRC_SUBDIRS="$SRC_SUBDIRS man"
28930 fi
28931 SRC_SUBDIRS="$SRC_SUBDIRS include"
28932 for cf_dir in $cf_cv_src_modules
28933 do
28934         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28935 done
28936 if test "x$cf_with_tests" != "xno" ; then
28937         SRC_SUBDIRS="$SRC_SUBDIRS test"
28938 fi
28939 # always make this, to install the ncurses-config script
28940 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28941 if test "$cf_with_cxx_binding" != no; then
28942         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28943         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28944 fi
28945
28946 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28947 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28948
28949 ADA_SUBDIRS=
28950 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28951         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28952         ADA_SUBDIRS="gen src"
28953         if test "x$cf_with_tests" != "xno" ; then
28954                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28955         fi
28956 fi
28957
28958 SUB_MAKEFILES=
28959 for cf_dir in $SRC_SUBDIRS
28960 do
28961         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28962 done
28963
28964 if test -n "$ADA_SUBDIRS"; then
28965         for cf_dir in $ADA_SUBDIRS
28966         do
28967                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28968         done
28969
28970 fi
28971
28972 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28973    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28974    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28975    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28976 fi
28977
28978 DIRS_TO_MAKE="lib"
28979 for cf_item in $cf_list_models
28980 do
28981
28982         case $cf_item in
28983         (libtool) cf_subdir='obj_lo'  ;;
28984         (normal)  cf_subdir='objects' ;;
28985         (debug)   cf_subdir='obj_g' ;;
28986         (profile) cf_subdir='obj_p' ;;
28987         (shared)
28988                 case "$cf_cv_system_name" in
28989                 (cygwin|msys)
28990                         cf_subdir='objects' ;;
28991                 (*)
28992                         cf_subdir='obj_s' ;;
28993                 esac
28994         esac
28995
28996         for cf_item2 in $DIRS_TO_MAKE
28997         do
28998                 test "$cf_item2" = "$cf_subdir" && break
28999         done
29000         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
29001 done
29002 for cf_dir in $DIRS_TO_MAKE
29003 do
29004         test ! -d "$cf_dir" && mkdir "$cf_dir"
29005 done
29006
29007 # symbols that differ when compiling Ada95 by itself.
29008 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
29009
29010 # values to use as strings
29011
29012 cat >>confdefs.h <<EOF
29013 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
29014 EOF
29015
29016 cat >>confdefs.h <<EOF
29017 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
29018 EOF
29019
29020 ### Define substitutions for header files to avoid name-pollution
29021
29022 if test "x$cf_cv_have_tcgetattr" = xyes ; then
29023         HAVE_TCGETATTR=1
29024 else
29025         HAVE_TCGETATTR=0
29026 fi
29027
29028 if test "x$ac_cv_header_stdint_h" = xyes ; then
29029         HAVE_STDINT_H=1
29030 else
29031         HAVE_STDINT_H=0
29032 fi
29033
29034 if test "x$ac_cv_header_termio_h" = xyes ; then
29035         HAVE_TERMIO_H=1
29036 else
29037         HAVE_TERMIO_H=0
29038 fi
29039
29040 if test "x$ac_cv_header_termios_h" = xyes ; then
29041         HAVE_TERMIOS_H=1
29042 else
29043         HAVE_TERMIOS_H=0
29044 fi
29045
29046 ################################################################################
29047 test "x$use_database" = xyes && \
29048 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
29049
29050 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
29051 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
29052
29053 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
29054 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29055 fi
29056
29057 if test "x$cf_with_tests" != xno ; then
29058         MAKE_TESTS=
29059 else
29060         MAKE_TESTS="#"
29061 fi
29062
29063 ADAHTML_DIR=../../doc/html/ada
29064
29065 # workaround for OS/2 (20151017)
29066 case "$cf_cv_system_name" in
29067 (os2*)
29068         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29069         ;;
29070 (*)
29071         LIBTOOL_OPTS_CXX=
29072         ;;
29073 esac
29074
29075 # workaround for g++ versus Solaris (20131116)
29076 case "$cf_cv_system_name" in
29077 (solaris2*)
29078         case "x$CPPFLAGS" in
29079         (*-D_XOPEN_SOURCE_EXTENDED*)
29080                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29081
29082 echo "${as_me:-configure}:29082: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29083
29084                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29085                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29086                 ;;
29087         esac
29088         ;;
29089 esac
29090
29091 # Help to automatically enable the extended curses features when using either
29092 # the *-config or the ".pc" files by adding defines.
29093 echo "$as_me:29093: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
29094 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
29095 PKG_CFLAGS=
29096 for cf_loop1 in $CPPFLAGS_after_XOPEN
29097 do
29098         cf_found=no
29099         for cf_loop2 in $CPPFLAGS_before_XOPEN
29100         do
29101                 if test "x$cf_loop1" = "x$cf_loop2"
29102                 then
29103                         cf_found=yes
29104                         break
29105                 fi
29106         done
29107         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29108 done
29109 echo "$as_me:29109: result: $PKG_CFLAGS" >&5
29110 echo "${ECHO_T}$PKG_CFLAGS" >&6
29111
29112 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29113 case "x$NCURSES_OSPEED" in
29114 (*short*)
29115         cf_compatible=1
29116         ;;
29117 (*)
29118         cf_compatible=0
29119         ;;
29120 esac
29121
29122 cat >>confdefs.h <<EOF
29123 #define NCURSES_OSPEED_COMPAT $cf_compatible
29124 EOF
29125
29126 case "x$cf_cv_typeof_chtype" in
29127 (xshort|xint|xlong)
29128         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29129         ;;
29130 esac
29131
29132 case "x$cf_cv_typeof_mmask_t" in
29133 (xshort|xint|xlong)
29134         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29135         ;;
29136 esac
29137
29138 # substitute into misc/Makefile to suppress
29139 # (un)install.data from the
29140 # (un)install rules.
29141 if test "x$cf_with_db_install" = "xno"; then
29142         MISC_INSTALL_DATA=
29143         MISC_UNINSTALL_DATA=
29144 else
29145         MISC_INSTALL_DATA=install.data
29146         MISC_UNINSTALL_DATA=uninstall.data
29147 fi
29148
29149 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29150         MAKE_DATABASE="#"
29151 else
29152         MAKE_DATABASE="$MAKE_TERMINFO"
29153 fi
29154
29155 if test -n "$PACKAGE"
29156 then
29157         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29158         export PACKAGE
29159         echo "package: $PACKAGE"
29160 fi
29161
29162 UNALTERED_SYMS=
29163 cf_filter_syms=no
29164
29165 if test -n "$RESULTING_SYMS"
29166 then
29167         cf_filter_syms=$cf_dft_filter_syms
29168         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
29169
29170 echo "${as_me:-configure}:29170: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
29171
29172 fi
29173
29174 if test "x$WILDCARD_SYMS" = xno
29175 then
29176         cf_filter_syms=yes
29177 fi
29178
29179 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29180
29181 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29182 if test "$cf_filter_syms" = yes
29183 then
29184         RESULTING_SYMS=resulting.map
29185 fi
29186
29187 if test "x$cross_compiling" = xyes ; then
29188         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29189         CHECK_BUILD="#"
29190 else
29191         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29192         CHECK_BUILD=
29193 fi
29194
29195 # This is used for the *-config script and *.pc data files.
29196
29197 echo "$as_me:29197: checking for linker search path" >&5
29198 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29199 if test "${cf_cv_ld_searchpath+set}" = set; then
29200   echo $ECHO_N "(cached) $ECHO_C" >&6
29201 else
29202
29203 if test "$cross_compiling" != yes ; then
29204
29205 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29206 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29207
29208 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29209 # update the cache, which makes it run faster.
29210 test -z "$cf_pathlist" && \
29211         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29212
29213 test -z "$cf_pathlist" &&
29214         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29215
29216 # This works with OpenBSD 6.5, which lists only filenames
29217 test -z "$cf_pathlist" &&
29218         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29219
29220 if test -z "$cf_pathlist"
29221 then
29222         # dyld default path with MacOS
29223         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29224         then
29225                 # do this to bypass check
29226                 cf_cv_ld_searchpath='$HOME/lib'
29227                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29228         fi
29229 fi
29230
29231 if test -z "$cf_pathlist"
29232 then
29233         # Solaris is "SunOS"
29234         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29235         then
29236                 case x`(isainfo -b)` in
29237                 (x64)
29238                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29239                         ;;
29240                 (x32)
29241                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29242                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29243                         ;;
29244                 (*)
29245                         { echo "$as_me:29245: WARNING: problem with Solaris architecture" >&5
29246 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29247                         ;;
29248                 esac
29249         fi
29250 fi
29251
29252 if test -z "$cf_pathlist"
29253 then
29254         # HP-UX
29255         if test x"`uname -s`" = xHP-UX
29256         then
29257                 case x`getconf LONG_BIT` in
29258                 (x64)
29259                         cf_pathlist="/usr/lib/hpux64"
29260                         ;;
29261                 (x*)
29262                         cf_pathlist="/usr/lib/hpux32"
29263                         ;;
29264                 esac
29265         fi
29266 fi
29267
29268 fi
29269
29270 # If nothing else, assume it is conventional
29271 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29272
29273 # Finally, check that this is only directories
29274 for cf_path in $0 $cf_pathlist
29275 do
29276         if test -d "$cf_path"; then
29277                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29278                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29279         fi
29280 done
29281
29282 # Ensure that it is nonempty
29283 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29284
29285 fi
29286 echo "$as_me:29286: result: $cf_cv_ld_searchpath" >&5
29287 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29288
29289 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29290
29291 cat >>confdefs.h <<\EOF
29292 #define HAVE_CURSES_DATA_BOOLNAMES 1
29293 EOF
29294
29295 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 man/man_db.renames $SUB_MAKEFILES Makefile"
29296 ac_config_commands="$ac_config_commands default"
29297 cat >confcache <<\_ACEOF
29298 # This file is a shell script that caches the results of configure
29299 # tests run on this system so they can be shared between configure
29300 # scripts and configure runs, see configure's option --config-cache.
29301 # It is not useful on other systems.  If it contains results you don't
29302 # want to keep, you may remove or edit it.
29303 #
29304 # config.status only pays attention to the cache file if you give it
29305 # the --recheck option to rerun configure.
29306 #
29307 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29308 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29309 # following values.
29310
29311 _ACEOF
29312
29313 # The following way of writing the cache mishandles newlines in values,
29314 # but we know of no workaround that is simple, portable, and efficient.
29315 # So, don't put newlines in cache variables' values.
29316 # Ultrix sh set writes to stderr and can't be redirected directly,
29317 # and sets the high bit in the cache file unless we assign to the vars.
29318 {
29319   (set) 2>&1 |
29320     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29321     *ac_space=\ *)
29322       # `set' does not quote correctly, so add quotes (double-quote
29323       # substitution turns \\\\ into \\, and sed turns \\ into \).
29324       sed -n \
29325         "s/'/'\\\\''/g;
29326           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29327       ;;
29328     *)
29329       # `set' quotes correctly as required by POSIX, so do not add quotes.
29330       sed -n \
29331         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29332       ;;
29333     esac;
29334 } |
29335   sed '
29336      t clear
29337      : clear
29338      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29339      t end
29340      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29341      : end' >>confcache
29342 if cmp -s $cache_file confcache; then :; else
29343   if test -w $cache_file; then
29344     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29345     cat confcache >$cache_file
29346   else
29347     echo "not updating unwritable cache $cache_file"
29348   fi
29349 fi
29350 rm -f confcache
29351
29352 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29353 # Let make expand exec_prefix.
29354 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29355
29356 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29357 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29358 # trailing colons and then remove the whole line if VPATH becomes empty
29359 # (actually we leave an empty line to preserve line numbers).
29360 if test "x$srcdir" = x.; then
29361   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29362 s/:*\$(srcdir):*/:/;
29363 s/:*\${srcdir}:*/:/;
29364 s/:*@srcdir@:*/:/;
29365 s/^\([^=]*=[    ]*\):*/\1/;
29366 s/:*$//;
29367 s/^[^=]*=[      ]*$//;
29368 }'
29369 fi
29370
29371 DEFS=-DHAVE_CONFIG_H
29372
29373 : "${CONFIG_STATUS=./config.status}"
29374 ac_clean_files_save=$ac_clean_files
29375 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29376 { echo "$as_me:29376: creating $CONFIG_STATUS" >&5
29377 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29378 cat >"$CONFIG_STATUS" <<_ACEOF
29379 #! $SHELL
29380 # Generated automatically by configure.
29381 # Run this file to recreate the current configuration.
29382 # Compiler output produced by configure, useful for debugging
29383 # configure, is in config.log if it exists.
29384
29385 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
29386
29387 debug=false
29388 SHELL=\${CONFIG_SHELL-$SHELL}
29389 ac_cs_invocation="\$0 \$@"
29390
29391 CLICOLOR_FORCE= GREP_OPTIONS=
29392 unset CLICOLOR_FORCE GREP_OPTIONS
29393 _ACEOF
29394
29395 cat >>"$CONFIG_STATUS" <<\_ACEOF
29396 # Be Bourne compatible
29397 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29398   emulate sh
29399   NULLCMD=:
29400 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29401   set -o posix
29402 fi
29403
29404 # Name of the executable.
29405 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29406
29407 if expr a : '\(a\)' >/dev/null 2>&1; then
29408   as_expr="expr"
29409 else
29410   as_expr="false"
29411 fi
29412
29413 rm -f conf$$ conf$$.exe conf$$.file
29414 echo >conf$$.file
29415 if ln -s conf$$.file conf$$ 2>/dev/null; then
29416   # We could just check for DJGPP; but this test a) works b) is more generic
29417   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29418   if test -f conf$$.exe; then
29419     # Don't use ln at all; we don't have any links
29420     as_ln_s='cp -p'
29421   else
29422     as_ln_s='ln -s'
29423   fi
29424 elif ln conf$$.file conf$$ 2>/dev/null; then
29425   as_ln_s='ln'
29426 else
29427   as_ln_s='cp -p'
29428 fi
29429 rm -f conf$$ conf$$.exe conf$$.file
29430
29431 as_executable_p="test -f"
29432
29433 # Support unset when possible.
29434 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29435   as_unset="unset"
29436 else
29437   as_unset="false"
29438 fi
29439
29440 # NLS nuisances.
29441 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29442 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29443 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29444 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29445 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29446 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29447 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29448 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29449
29450 # IFS
29451 # We need space, tab and new line, in precisely that order.
29452 as_nl='
29453 '
29454 IFS="   $as_nl"
29455
29456 # CDPATH.
29457 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29458
29459 exec 6>&1
29460
29461 _ACEOF
29462
29463 # Files that config.status was made for.
29464 if test -n "$ac_config_files"; then
29465   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29466 fi
29467
29468 if test -n "$ac_config_headers"; then
29469   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29470 fi
29471
29472 if test -n "$ac_config_links"; then
29473   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29474 fi
29475
29476 if test -n "$ac_config_commands"; then
29477   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29478 fi
29479
29480 cat >>"$CONFIG_STATUS" <<\EOF
29481
29482 ac_cs_usage="\
29483 \`$as_me' instantiates files from templates according to the
29484 current configuration.
29485
29486 Usage: $0 [OPTIONS] [FILE]...
29487
29488   -h, --help       print this help, then exit
29489   -V, --version    print version number, then exit
29490   -d, --debug      don't remove temporary files
29491       --recheck    update $as_me by reconfiguring in the same conditions
29492   --file=FILE[:TEMPLATE]
29493                    instantiate the configuration file FILE
29494   --header=FILE[:TEMPLATE]
29495                    instantiate the configuration header FILE
29496
29497 Configuration files:
29498 $config_files
29499
29500 Configuration headers:
29501 $config_headers
29502
29503 Configuration commands:
29504 $config_commands
29505
29506 Report bugs to <dickey@invisible-island.net>."
29507 EOF
29508
29509 cat >>"$CONFIG_STATUS" <<EOF
29510 ac_cs_version="\\
29511 config.status
29512 configured by $0, generated by GNU Autoconf 2.52.20221009,
29513   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29514
29515 Copyright 2003-2021,2022        Thomas E. Dickey
29516 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29517 Free Software Foundation, Inc.
29518 This config.status script is free software; the Free Software Foundation
29519 gives unlimited permission to copy, distribute and modify it."
29520 srcdir="$srcdir"
29521 INSTALL="$INSTALL"
29522 EOF
29523
29524 cat >>"$CONFIG_STATUS" <<\EOF
29525 # If no file are specified by the user, then we need to provide default
29526 # value.  By we need to know if files were specified by the user.
29527 ac_need_defaults=:
29528 while test $# != 0
29529 do
29530   case $1 in
29531   --*=*)
29532     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29533     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29534     shift
29535     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29536     shift
29537     ;;
29538   -*);;
29539   *) # This is not an option, so the user has probably given explicit
29540      # arguments.
29541      ac_need_defaults=false;;
29542   esac
29543
29544   case $1 in
29545   # Handling of the options.
29546 EOF
29547 cat >>"$CONFIG_STATUS" <<EOF
29548   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29549     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29550     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29551 EOF
29552 cat >>"$CONFIG_STATUS" <<\EOF
29553   --version | --vers* | -V )
29554     echo "$ac_cs_version"; exit 0 ;;
29555   --he | --h)
29556     # Conflict between --help and --header
29557     { { echo "$as_me:29557: error: ambiguous option: $1
29558 Try \`$0 --help' for more information." >&5
29559 echo "$as_me: error: ambiguous option: $1
29560 Try \`$0 --help' for more information." >&2;}
29561    { (exit 1); exit 1; }; };;
29562   --help | --hel | -h )
29563     echo "$ac_cs_usage"; exit 0 ;;
29564   --debug | --d* | -d )
29565     debug=: ;;
29566   --file | --fil | --fi | --f )
29567     shift
29568     CONFIG_FILES="$CONFIG_FILES $1"
29569     ac_need_defaults=false;;
29570   --header | --heade | --head | --hea )
29571     shift
29572     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29573     ac_need_defaults=false;;
29574
29575   # This is an error.
29576   -*) { { echo "$as_me:29576: error: unrecognized option: $1
29577 Try \`$0 --help' for more information." >&5
29578 echo "$as_me: error: unrecognized option: $1
29579 Try \`$0 --help' for more information." >&2;}
29580    { (exit 1); exit 1; }; } ;;
29581
29582   *) ac_config_targets="$ac_config_targets $1" ;;
29583
29584   esac
29585   shift
29586 done
29587
29588 exec 5>>config.log
29589 cat >&5 << _ACEOF
29590
29591 ## ----------------------- ##
29592 ## Running config.status.  ##
29593 ## ----------------------- ##
29594
29595 This file was extended by $as_me 2.52.20221009, executed with
29596   CONFIG_FILES    = $CONFIG_FILES
29597   CONFIG_HEADERS  = $CONFIG_HEADERS
29598   CONFIG_LINKS    = $CONFIG_LINKS
29599   CONFIG_COMMANDS = $CONFIG_COMMANDS
29600   > "$ac_cs_invocation"
29601 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29602
29603 _ACEOF
29604 EOF
29605
29606 cat >>"$CONFIG_STATUS" <<EOF
29607 #
29608 # INIT-COMMANDS section.
29609 #
29610
29611 ### Special initialization commands, used to pass information from the
29612 ### configuration-run into config.status
29613
29614 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29615 AWK="$AWK"
29616 CXX_NAME="$CXX_NAME"
29617 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29618 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29619 ECHO_LD="$ECHO_LD"
29620 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29621 FORM_NAME="$FORM_NAME"
29622 LDCONFIG="$LDCONFIG"
29623 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29624 LIB_NAME="$LIB_NAME"
29625 LIB_PREFIX="$LIB_PREFIX"
29626 LIB_SUBSETS="$LIB_SUBSETS"
29627 LIB_SUFFIX="$LIB_SUFFIX"
29628 LIB_TRACING="$LIB_TRACING"
29629 LN_S="$LN_S"
29630 MAKE_TERMINFO="$MAKE_TERMINFO"
29631 MANPAGE_RENAMES="$MANPAGE_RENAMES"
29632 MENU_NAME="$MENU_NAME"
29633 NCURSES_MAJOR="$NCURSES_MAJOR"
29634 NCURSES_MINOR="$NCURSES_MINOR"
29635 NCURSES_OSPEED="$NCURSES_OSPEED"
29636 NCURSES_PATCH="$NCURSES_PATCH"
29637 PANEL_NAME="$PANEL_NAME"
29638 SRC_SUBDIRS="$SRC_SUBDIRS"
29639 TERMINFO="$TERMINFO"
29640 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29641 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29642 TICS_NAME="$TICS_NAME"
29643 TICS_SUFFIX="$TICS_SUFFIX"
29644 TIC_PATH="$TIC_PATH"
29645 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29646 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29647 TINFO_NAME="$TINFO_NAME"
29648 TINFO_SUFFIX="$TINFO_SUFFIX"
29649 UNALTERED_SYMS="$UNALTERED_SYMS"
29650 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29651 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29652 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29653 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29654 WILDCARD_SYMS="$WILDCARD_SYMS"
29655 WITH_CURSES_H="$with_curses_h"
29656 WITH_ECHO="${enable_echo:=yes}"
29657 WITH_OVERWRITE="$with_overwrite"
29658 cf_LIST_MODELS="$cf_list_models"
29659 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29660 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29661 cf_cv_abi_version="$cf_cv_abi_version"
29662 cf_cv_do_relink="$cf_cv_do_relink"
29663 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29664 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29665 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29666 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29667 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29668 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29669 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29670 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29671 cf_cv_rel_version="$cf_cv_rel_version"
29672 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29673 cf_cv_shared_soname='$cf_cv_shared_soname'
29674 cf_cv_shlib_version="$cf_cv_shlib_version"
29675 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29676 cf_cv_system_name="$cf_cv_system_name"
29677 cf_cv_term_driver="$with_term_driver"
29678 cf_with_ada="$cf_with_ada"
29679 cf_with_cxx_binding="$cf_with_cxx_binding"
29680 cf_with_db_install="$cf_with_db_install"
29681 cf_with_manpages="$cf_with_manpages"
29682 cf_with_tests="$cf_with_tests"
29683 host="$host"
29684 target="$target"
29685 verbose="$verbose"
29686 with_shared_cxx="$with_shared_cxx"
29687
29688 EOF
29689
29690 cat >>"$CONFIG_STATUS" <<\EOF
29691 for ac_config_target in $ac_config_targets
29692 do
29693   case "$ac_config_target" in
29694   # Handling of arguments.
29695   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29696   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29697   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29698   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29699   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29700   "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
29701   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29702   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29703   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29704   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29705   *) { { echo "$as_me:29705: error: invalid argument: $ac_config_target" >&5
29706 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29707    { (exit 1); exit 1; }; };;
29708   esac
29709 done
29710
29711 # If the user did not use the arguments to specify the items to instantiate,
29712 # then the envvar interface is used.  Set only those that are not.
29713 # We use the long form for the default assignment because of an extremely
29714 # bizarre bug on SunOS 4.1.3.
29715 if "$ac_need_defaults"; then
29716   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29717   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29718   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29719 fi
29720
29721 # Create a temporary directory, and hook for its removal unless debugging.
29722 $debug ||
29723 {
29724   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29725   trap '{ (exit 1); exit 1; }' 1 2 13 15
29726 }
29727
29728 # Create a (secure) tmp directory for tmp files.
29729 : "${TMPDIR=/tmp}"
29730 {
29731   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29732   test -n "$tmp" && test -d "$tmp"
29733 }  ||
29734 {
29735   tmp=$TMPDIR/cs$$-$RANDOM
29736   (umask 077 && mkdir "$tmp")
29737 } ||
29738 {
29739    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29740    { (exit 1); exit 1; }
29741 }
29742
29743 EOF
29744
29745 cat >>"$CONFIG_STATUS" <<EOF
29746
29747 #
29748 # CONFIG_FILES section.
29749 #
29750
29751 # No need to generate the scripts if there are no CONFIG_FILES.
29752 # This happens for instance when ./config.status config.h
29753 if test -n "\$CONFIG_FILES"; then
29754   # Protect against being on the right side of a sed subst in config.status.
29755   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29756    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
29757 s,@SHELL@,$SHELL,;t t
29758 s,@exec_prefix@,$exec_prefix,;t t
29759 s,@prefix@,$prefix,;t t
29760 s,@program_transform_name@,$program_transform_name,;t t
29761 s,@bindir@,$bindir,;t t
29762 s,@sbindir@,$sbindir,;t t
29763 s,@libexecdir@,$libexecdir,;t t
29764 s,@datarootdir@,$datarootdir,;t t
29765 s,@datadir@,$datadir,;t t
29766 s,@sysconfdir@,$sysconfdir,;t t
29767 s,@sharedstatedir@,$sharedstatedir,;t t
29768 s,@localstatedir@,$localstatedir,;t t
29769 s,@runstatedir@,$runstatedir,;t t
29770 s,@libdir@,$libdir,;t t
29771 s,@includedir@,$includedir,;t t
29772 s,@oldincludedir@,$oldincludedir,;t t
29773 s,@infodir@,$infodir,;t t
29774 s,@mandir@,$mandir,;t t
29775 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29776 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29777 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29778 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29779 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29780 s,@build_alias@,$build_alias,;t t
29781 s,@host_alias@,$host_alias,;t t
29782 s,@target_alias@,$target_alias,;t t
29783 s,@ECHO_C@,$ECHO_C,;t t
29784 s,@ECHO_N@,$ECHO_N,;t t
29785 s,@ECHO_T@,$ECHO_T,;t t
29786 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29787 s,@DEFS@,$DEFS,;t t
29788 s,@LIBS@,$LIBS,;t t
29789 s,@top_builddir@,$top_builddir,;t t
29790 s,@GREP@,$GREP,;t t
29791 s,@EGREP@,$EGREP,;t t
29792 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29793 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29794 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29795 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29796 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29797 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29798 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29799 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29800 s,@VERSION@,$VERSION,;t t
29801 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29802 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29803 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29804 s,@PACKAGE@,$PACKAGE,;t t
29805 s,@build@,$build,;t t
29806 s,@build_cpu@,$build_cpu,;t t
29807 s,@build_vendor@,$build_vendor,;t t
29808 s,@build_os@,$build_os,;t t
29809 s,@host@,$host,;t t
29810 s,@host_cpu@,$host_cpu,;t t
29811 s,@host_vendor@,$host_vendor,;t t
29812 s,@host_os@,$host_os,;t t
29813 s,@target@,$target,;t t
29814 s,@target_cpu@,$target_cpu,;t t
29815 s,@target_vendor@,$target_vendor,;t t
29816 s,@target_os@,$target_os,;t t
29817 s,@FGREP@,$FGREP,;t t
29818 s,@CC@,$CC,;t t
29819 s,@CFLAGS@,$CFLAGS,;t t
29820 s,@LDFLAGS@,$LDFLAGS,;t t
29821 s,@CPPFLAGS@,$CPPFLAGS,;t t
29822 s,@ac_ct_CC@,$ac_ct_CC,;t t
29823 s,@EXEEXT@,$EXEEXT,;t t
29824 s,@OBJEXT@,$OBJEXT,;t t
29825 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29826 s,@CPP@,$CPP,;t t
29827 s,@LDCONFIG@,$LDCONFIG,;t t
29828 s,@CXX@,$CXX,;t t
29829 s,@CXXFLAGS@,$CXXFLAGS,;t t
29830 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29831 s,@AWK@,$AWK,;t t
29832 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29833 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29834 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29835 s,@LINT@,$LINT,;t t
29836 s,@LINT_OPTS@,$LINT_OPTS,;t t
29837 s,@LINT_LIBS@,$LINT_LIBS,;t t
29838 s,@LN_S@,$LN_S,;t t
29839 s,@cf_config_suffix@,$cf_config_suffix,;t t
29840 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29841 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29842 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29843 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29844 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29845 s,@SET_MAKE@,$SET_MAKE,;t t
29846 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29847 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29848 s,@CTAGS@,$CTAGS,;t t
29849 s,@ETAGS@,$ETAGS,;t t
29850 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29851 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29852 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29853 s,@RANLIB@,$RANLIB,;t t
29854 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29855 s,@LD@,$LD,;t t
29856 s,@ac_ct_LD@,$ac_ct_LD,;t t
29857 s,@AR@,$AR,;t t
29858 s,@ac_ct_AR@,$ac_ct_AR,;t t
29859 s,@NM@,$NM,;t t
29860 s,@ac_ct_NM@,$ac_ct_NM,;t t
29861 s,@ARFLAGS@,$ARFLAGS,;t t
29862 s,@DESTDIR@,$DESTDIR,;t t
29863 s,@BUILD_CC@,$BUILD_CC,;t t
29864 s,@BUILD_CPP@,$BUILD_CPP,;t t
29865 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29866 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29867 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29868 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29869 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29870 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29871 s,@cf_list_models@,$cf_list_models,;t t
29872 s,@ABI_VERSION@,$ABI_VERSION,;t t
29873 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29874 s,@LIBTOOL@,$LIBTOOL,;t t
29875 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29876 s,@LT_UNDEF@,$LT_UNDEF,;t t
29877 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29878 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29879 s,@LIB_CREATE@,$LIB_CREATE,;t t
29880 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29881 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29882 s,@LIB_PREP@,$LIB_PREP,;t t
29883 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29884 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29885 s,@LIB_LINK@,$LIB_LINK,;t t
29886 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29887 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29888 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29889 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29890 s,@TICS_NAME@,$TICS_NAME,;t t
29891 s,@TINFO_NAME@,$TINFO_NAME,;t t
29892 s,@LIB_NAME@,$LIB_NAME,;t t
29893 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29894 s,@CC_G_OPT@,$CC_G_OPT,;t t
29895 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29896 s,@LD_MODEL@,$LD_MODEL,;t t
29897 s,@shlibdir@,$shlibdir,;t t
29898 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29899 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29900 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29901 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29902 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29903 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29904 s,@LINK_PROGS@,$LINK_PROGS,;t t
29905 s,@LINK_TESTS@,$LINK_TESTS,;t t
29906 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29907 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29908 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29909 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29910 s,@RPATH_LIST@,$RPATH_LIST,;t t
29911 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29912 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29913 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29914 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29915 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29916 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29917 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29918 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29919 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29920 s,@TIC@,$TIC,;t t
29921 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29922 s,@INFOCMP@,$INFOCMP,;t t
29923 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29924 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29925 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29926 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29927 s,@XTERM_KBS@,$XTERM_KBS,;t t
29928 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29929 s,@TERMINFO@,$TERMINFO,;t t
29930 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29931 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29932 s,@TERMPATH@,$TERMPATH,;t t
29933 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29934 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29935 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29936 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29937 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29938 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29939 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29940 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29941 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29942 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29943 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29944 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29945 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29946 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29947 s,@RGB_PATH@,$RGB_PATH,;t t
29948 s,@no_x11_rgb@,$no_x11_rgb,;t t
29949 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29950 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29951 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29952 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29953 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29954 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29955 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29956 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29957 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29958 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29959 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29960 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29961 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29962 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29963 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29964 s,@PTHREAD@,$PTHREAD,;t t
29965 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29966 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29967 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29968 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29969 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29970 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29971 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29972 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29973 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29974 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29975 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29976 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29977 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29978 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29979 s,@ECHO_LT@,$ECHO_LT,;t t
29980 s,@ECHO_LD@,$ECHO_LD,;t t
29981 s,@RULE_CC@,$RULE_CC,;t t
29982 s,@SHOW_CC@,$SHOW_CC,;t t
29983 s,@ECHO_CC@,$ECHO_CC,;t t
29984 s,@ECHO_LINK@,$ECHO_LINK,;t t
29985 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29986 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29987 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29988 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29989 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29990 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29991 s,@ADAFLAGS@,$ADAFLAGS,;t t
29992 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29993 s,@ADA_TRACE@,$ADA_TRACE,;t t
29994 s,@MATH_LIB@,$MATH_LIB,;t t
29995 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29996 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29997 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29998 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29999 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
30000 s,@TEST_LIBS@,$TEST_LIBS,;t t
30001 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
30002 s,@CXXCPP@,$CXXCPP,;t t
30003 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
30004 s,@CXX_AR@,$CXX_AR,;t t
30005 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
30006 s,@CXXLIBS@,$CXXLIBS,;t t
30007 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
30008 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
30009 s,@M4_exists@,$M4_exists,;t t
30010 s,@cf_ada_make@,$cf_ada_make,;t t
30011 s,@cf_ada_config@,$cf_ada_config,;t t
30012 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
30013 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
30014 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
30015 s,@cf_compile_generics@,$cf_compile_generics,;t t
30016 s,@cf_generic_objects@,$cf_generic_objects,;t t
30017 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
30018 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
30019 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
30020 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
30021 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
30022 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
30023 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
30024 s,@cf_ada_package@,$cf_ada_package,;t t
30025 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
30026 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
30027 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
30028 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
30029 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
30030 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
30031 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
30032 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
30033 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
30034 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
30035 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
30036 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
30037 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
30038 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
30039 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
30040 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
30041 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
30042 s,@TICS_LIBS@,$TICS_LIBS,;t t
30043 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
30044 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
30045 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
30046 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
30047 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
30048 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
30049 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
30050 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
30051 s,@includesubdir@,$includesubdir,;t t
30052 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
30053 s,@TICS_LIST@,$TICS_LIST,;t t
30054 s,@TINFO_LIST@,$TINFO_LIST,;t t
30055 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
30056 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
30057 s,@FORM_NAME@,$FORM_NAME,;t t
30058 s,@MENU_NAME@,$MENU_NAME,;t t
30059 s,@PANEL_NAME@,$PANEL_NAME,;t t
30060 s,@CXX_NAME@,$CXX_NAME,;t t
30061 s,@TEST_ARGS@,$TEST_ARGS,;t t
30062 s,@TEST_DEPS@,$TEST_DEPS,;t t
30063 s,@TEST_ARG2@,$TEST_ARG2,;t t
30064 s,@TEST_DEP2@,$TEST_DEP2,;t t
30065 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30066 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30067 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30068 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30069 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30070 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30071 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30072 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30073 s,@cross_compiling@,$cross_compiling,;t t
30074 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30075 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30076 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30077 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30078 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30079 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30080 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30081 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30082 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30083 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30084 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30085 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30086 CEOF
30087
30088 EOF
30089
30090   cat >>"$CONFIG_STATUS" <<\EOF
30091   # Split the substitutions into bite-sized pieces for seds with
30092   # small command number limits, like on Digital OSF/1 and HP-UX.
30093   ac_max_sed_lines=48
30094   ac_sed_frag=1 # Number of current file.
30095   ac_beg=1 # First line for current file.
30096   ac_end=$ac_max_sed_lines # Line after last line for current file.
30097   ac_more_lines=:
30098   ac_sed_cmds=
30099   while "$ac_more_lines"; do
30100     if test "$ac_beg" -gt 1; then
30101       sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30102     else
30103       sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30104     fi
30105     if test ! -s "$tmp"/subs.frag; then
30106       ac_more_lines=false
30107     else
30108       # The purpose of the label and of the branching condition is to
30109       # speed up the sed processing (if there are no `@' at all, there
30110       # is no need to browse any of the substitutions).
30111       # These are the two extra sed commands mentioned above.
30112       (echo ':t
30113   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30114       # It is possible to make a multiline substitution using escaped newlines.
30115       # Ensure that we do not split the substitution between script fragments.
30116       ac_BEG=$ac_end
30117       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30118       sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30119       if test -s "$tmp"/subs.next; then
30120         grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
30121         if test ! -s "$tmp"/subs.edit; then
30122           grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30123           if test ! -s "$tmp"/subs.edit; then
30124             if test "$ac_beg" -gt 1; then
30125               ac_end=`expr "$ac_end" - 1`
30126               continue
30127             fi
30128           fi
30129         fi
30130       fi
30131
30132       if test -z "$ac_sed_cmds"; then
30133         ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30134       else
30135         ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30136       fi
30137       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30138       ac_beg=$ac_end
30139       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30140     fi
30141   done
30142   if test -z "$ac_sed_cmds"; then
30143     ac_sed_cmds="cat"
30144   fi
30145 fi # test -n "$CONFIG_FILES"
30146
30147 EOF
30148 cat >>"$CONFIG_STATUS" <<\EOF
30149 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30150   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30151   case "$ac_file" in
30152   - | *:- | *:-:* ) # input from stdin
30153         cat >"$tmp"/stdin
30154         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30155         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30156   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30157         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30158   * )   ac_file_in=$ac_file.in ;;
30159   esac
30160
30161   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30162   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30163          X"$ac_file" : 'X\(//\)[^/]' \| \
30164          X"$ac_file" : 'X\(//\)$' \| \
30165          X"$ac_file" : 'X\(/\)' \| \
30166          .     : '\(.\)' 2>/dev/null ||
30167 echo X"$ac_file" |
30168     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30169           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30170           /^X\(\/\/\)$/{ s//\1/; q; }
30171           /^X\(\/\).*/{ s//\1/; q; }
30172           s/.*/./; q'`
30173   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30174     { case "$ac_dir" in
30175   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30176   *)                      as_incr_dir=.;;
30177 esac
30178 as_dummy="$ac_dir"
30179 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30180   case $as_mkdir_dir in
30181     # Skip DOS drivespec
30182     ?:) as_incr_dir=$as_mkdir_dir ;;
30183     *)
30184       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30185       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30186     ;;
30187   esac
30188 done; }
30189
30190     ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30191     # A "../" for each directory in $ac_dir_suffix.
30192     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30193   else
30194     ac_dir_suffix= ac_dots=
30195   fi
30196
30197   case "$srcdir" in
30198   .)  ac_srcdir=.
30199       if test -z "$ac_dots"; then
30200          ac_top_srcdir=.
30201       else
30202          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30203       fi ;;
30204   [\\/]* | ?:[\\/]* )
30205       ac_srcdir="$srcdir$ac_dir_suffix";
30206       ac_top_srcdir="$srcdir" ;;
30207   *) # Relative path.
30208     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30209     ac_top_srcdir="$ac_dots$srcdir" ;;
30210   esac
30211
30212   case $INSTALL in
30213   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30214   *) ac_INSTALL=$ac_dots$INSTALL ;;
30215   esac
30216
30217   if test x"$ac_file" != x-; then
30218     { echo "$as_me:30218: creating $ac_file" >&5
30219 echo "$as_me: creating $ac_file" >&6;}
30220     rm -f "$ac_file"
30221   fi
30222   # Let's still pretend it is `configure' which instantiates (i.e., don't
30223   # use $as_me), people would be surprised to read:
30224   #    /* config.h.  Generated automatically by config.status.  */
30225   configure_input="Generated automatically from `echo $ac_file_in |
30226                                                  sed 's,.*/,,'` by configure."
30227
30228   # First look for the input files in the build tree, otherwise in the
30229   # src tree.
30230   ac_file_inputs=`IFS=:
30231     for f in $ac_file_in; do
30232       case $f in
30233       -) echo "$tmp"/stdin ;;
30234       [\\/$]*)
30235          # Absolute (can't be DOS-style, as IFS=:)
30236          test -f "$f" || { { echo "$as_me:30236: error: cannot find input file: $f" >&5
30237 echo "$as_me: error: cannot find input file: $f" >&2;}
30238    { (exit 1); exit 1; }; }
30239          echo "$f";;
30240       *) # Relative
30241          if test -f "$f"; then
30242            # Build tree
30243            echo "$f"
30244          elif test -f "$srcdir/$f"; then
30245            # Source tree
30246            echo "$srcdir/$f"
30247          else
30248            # /dev/null tree
30249            { { echo "$as_me:30249: error: cannot find input file: $f" >&5
30250 echo "$as_me: error: cannot find input file: $f" >&2;}
30251    { (exit 1); exit 1; }; }
30252          fi;;
30253       esac
30254     done` || { (exit 1); exit 1; }
30255 EOF
30256 cat >>"$CONFIG_STATUS" <<\EOF
30257   ac_warn_datarootdir=no
30258   if test x"$ac_file" != x-; then
30259     for ac_item in $ac_file_inputs
30260     do
30261       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30262       if test -n "$ac_seen"; then
30263         ac_used=`grep '@datarootdir@' "$ac_item"`
30264         if test -z "$ac_used"; then
30265           { echo "$as_me:30265: WARNING: datarootdir was used implicitly but not set:
30266 $ac_seen" >&5
30267 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30268 $ac_seen" >&2;}
30269           ac_warn_datarootdir=yes
30270         fi
30271       fi
30272       ac_seen=`grep '${datarootdir}' "$ac_item"`
30273       if test -n "$ac_seen"; then
30274         { echo "$as_me:30274: WARNING: datarootdir was used explicitly but not set:
30275 $ac_seen" >&5
30276 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30277 $ac_seen" >&2;}
30278         ac_warn_datarootdir=yes
30279       fi
30280     done
30281   fi
30282
30283 if test "x$ac_warn_datarootdir" = xyes; then
30284   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30285 fi
30286
30287 EOF
30288 cat >>"$CONFIG_STATUS" <<EOF
30289   sed "$ac_vpsub
30290 $extrasub
30291 EOF
30292 cat >>"$CONFIG_STATUS" <<\EOF
30293 :t
30294 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30295 s,@configure_input@,$configure_input,;t t
30296 s,@srcdir@,$ac_srcdir,;t t
30297 s,@top_srcdir@,$ac_top_srcdir,;t t
30298 s,@INSTALL@,$ac_INSTALL,;t t
30299 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
30300   rm -f "$tmp"/stdin
30301 EOF
30302 : "${FGREP:=grep -F}"
30303 : "${EGREP:=grep -E}"
30304 cat >>"$CONFIG_STATUS" <<EOF
30305   : "\${FGREP:=$FGREP}"
30306   : "\${EGREP:=$EGREP}"
30307 EOF
30308 cat >>"$CONFIG_STATUS" <<\EOF
30309   if test x"$ac_file" != x-; then
30310     cp "$tmp/out" "$ac_file"
30311
30312     for ac_name in prefix exec_prefix datarootdir
30313     do
30314         ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
30315         if test -n "$ac_seen"; then
30316             ac_init=`$EGREP '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30317             if test -z "$ac_init"; then
30318               ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
30319               { echo "$as_me:30319: WARNING: Variable $ac_name is used but was not set:
30320 $ac_seen" >&5
30321 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30322 $ac_seen" >&2;}
30323             fi
30324         fi
30325     done
30326     $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
30327     $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
30328     if test -s "$tmp"/out; then
30329       ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
30330       { echo "$as_me:30330: WARNING: Some variables may not be substituted:
30331 $ac_seen" >&5
30332 echo "$as_me: WARNING: Some variables may not be substituted:
30333 $ac_seen" >&2;}
30334     fi
30335   else
30336     cat "$tmp"/out
30337   fi
30338   rm -f "$tmp"/out
30339
30340 done
30341 EOF
30342 cat >>"$CONFIG_STATUS" <<\EOF
30343
30344 #
30345 # CONFIG_HEADER section.
30346 #
30347
30348 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30349 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30350 #
30351 # ac_d sets the value in "#define NAME VALUE" lines.
30352 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30353 ac_dB='[        ].*$,\1#\2'
30354 ac_dC=' '
30355 ac_dD=',;t'
30356 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30357 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30358 ac_iB='\([      ]\),\1#\2define\3'
30359 ac_iC=' '
30360 ac_iD='\4,;t'
30361 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30362 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30363 ac_uB='$,\1#\2define\3'
30364 ac_uC=' '
30365 ac_uD=',;t'
30366
30367 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30368   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30369   case "$ac_file" in
30370   - | *:- | *:-:* ) # input from stdin
30371         cat >"$tmp"/stdin
30372         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30373         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30374   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30375         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30376   * )   ac_file_in=$ac_file.in ;;
30377   esac
30378
30379   test x"$ac_file" != x- && { echo "$as_me:30379: creating $ac_file" >&5
30380 echo "$as_me: creating $ac_file" >&6;}
30381
30382   # First look for the input files in the build tree, otherwise in the
30383   # src tree.
30384   ac_file_inputs=`IFS=:
30385     for f in $ac_file_in; do
30386       case $f in
30387       -) echo "$tmp"/stdin ;;
30388       [\\/$]*)
30389          # Absolute (can't be DOS-style, as IFS=:)
30390          test -f "$f" || { { echo "$as_me:30390: error: cannot find input file: $f" >&5
30391 echo "$as_me: error: cannot find input file: $f" >&2;}
30392    { (exit 1); exit 1; }; }
30393          echo $f;;
30394       *) # Relative
30395          if test -f "$f"; then
30396            # Build tree
30397            echo $f
30398          elif test -f "$srcdir/$f"; then
30399            # Source tree
30400            echo "$srcdir/$f"
30401          else
30402            # /dev/null tree
30403            { { echo "$as_me:30403: error: cannot find input file: $f" >&5
30404 echo "$as_me: error: cannot find input file: $f" >&2;}
30405    { (exit 1); exit 1; }; }
30406          fi;;
30407       esac
30408     done` || { (exit 1); exit 1; }
30409   # Remove the trailing spaces.
30410   sed 's/[      ]*$//' $ac_file_inputs >"$tmp"/in
30411
30412 EOF
30413
30414 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30415 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30416 # be either 'cat' or 'sort'.
30417 cat confdefs.h | uniq >conftest.vals
30418
30419 # Break up conftest.vals because some shells have a limit on
30420 # the size of here documents, and old seds have small limits too.
30421
30422 rm -f conftest.tail
30423 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30424 while grep . conftest.vals >/dev/null
30425 do
30426   # Write chunks of a limited-size here document to conftest.frag.
30427   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30428   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30429   echo 'CEOF' >> "$CONFIG_STATUS"
30430   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30431   rm -f conftest.vals
30432   mv conftest.tail conftest.vals
30433 done
30434 rm -f conftest.vals
30435
30436 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30437 # marker @DEFS@.
30438 echo '  cat >> conftest.edit <<CEOF
30439 /@DEFS@/r conftest.frag
30440 /@DEFS@/d
30441 CEOF
30442 sed -f conftest.edit "$tmp"/in > "$tmp"/out
30443 rm -f "$tmp"/in
30444 mv "$tmp"/out "$tmp"/in
30445 rm -f conftest.edit conftest.frag
30446 ' >> "$CONFIG_STATUS"
30447
30448 cat >>"$CONFIG_STATUS" <<\EOF
30449   # Let's still pretend it is `configure' which instantiates (i.e., don't
30450   # use $as_me), people would be surprised to read:
30451   #    /* config.h.  Generated automatically by config.status.  */
30452   if test x"$ac_file" = x-; then
30453     echo "/* Generated automatically by configure.  */" >"$tmp"/config.h
30454   else
30455     echo "/* $ac_file.  Generated automatically by configure.  */" >"$tmp"/config.h
30456   fi
30457   cat "$tmp"/in >>"$tmp"/config.h
30458   rm -f "$tmp"/in
30459   if test x"$ac_file" != x-; then
30460     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30461       { echo "$as_me:30461: $ac_file is unchanged" >&5
30462 echo "$as_me: $ac_file is unchanged" >&6;}
30463     else
30464       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30465          X"$ac_file" : 'X\(//\)[^/]' \| \
30466          X"$ac_file" : 'X\(//\)$' \| \
30467          X"$ac_file" : 'X\(/\)' \| \
30468          .     : '\(.\)' 2>/dev/null ||
30469 echo X"$ac_file" |
30470     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30471           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30472           /^X\(\/\/\)$/{ s//\1/; q; }
30473           /^X\(\/\).*/{ s//\1/; q; }
30474           s/.*/./; q'`
30475       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30476         { case "$ac_dir" in
30477   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30478   *)                      as_incr_dir=.;;
30479 esac
30480 as_dummy="$ac_dir"
30481 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30482   case $as_mkdir_dir in
30483     # Skip DOS drivespec
30484     ?:) as_incr_dir=$as_mkdir_dir ;;
30485     *)
30486       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30487       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30488     ;;
30489   esac
30490 done; }
30491
30492       fi
30493       rm -f "$ac_file"
30494       mv "$tmp/config.h" "$ac_file"
30495     fi
30496   else
30497     cat "$tmp"/config.h
30498     rm -f "$tmp"/config.h
30499   fi
30500 done
30501 EOF
30502 cat >>"$CONFIG_STATUS" <<\EOF
30503 #
30504 # CONFIG_COMMANDS section.
30505 #
30506 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30507   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30508   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30509
30510   case "$ac_dest" in
30511     default )
30512 if test "x$cf_with_tests" != xno ; then
30513
30514 for cf_dir in test
30515 do
30516         if test ! -d "$srcdir/$cf_dir" ; then
30517                 continue
30518         elif test -f "$srcdir/$cf_dir/programs" ; then
30519                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30520         fi
30521 done
30522
30523 fi
30524
30525 cf_prefix=$LIB_PREFIX
30526
30527 case "$cf_cv_shlib_version" in
30528 (cygdll|msysdll|mingw|msvcdll)
30529         TINFO_NAME=$TINFO_ARG_SUFFIX
30530         TINFO_SUFFIX=.dll
30531         ;;
30532 esac
30533
30534 if test -n "$TINFO_SUFFIX" ; then
30535         case "$TINFO_SUFFIX" in
30536         (tw*)
30537                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30538                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30539                 ;;
30540         (t*)
30541                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30542                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30543                 ;;
30544         (w*)
30545                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30546                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30547                 ;;
30548         esac
30549 fi
30550
30551 for cf_dir in $SRC_SUBDIRS
30552 do
30553         if test ! -d "$srcdir/$cf_dir" ; then
30554                 continue
30555         elif test -f "$srcdir/$cf_dir/modules" ; then
30556
30557                 SHARED_LIB=
30558                 Libs_To_Make=
30559                 cf_awk_program=
30560                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
30561                 then
30562                         cf_awk_program="$cf_awk_program\
30563 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
30564 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
30565 "
30566                 fi
30567
30568                 if test "x$WILDCARD_SYMS" = xno
30569                 then
30570                         cf_awk_program="$cf_awk_program\
30571 /[      ]_\\*;/ { skip=1; next; }\
30572 "
30573                 fi
30574
30575                 if test "x$cf_awk_program" != "x"
30576                 then
30577                         cat >>$cf_dir/Makefile <<CF_EOF
30578
30579 # Generated by CF_LIB_RULES
30580 resulting.map: $UNALTERED_SYMS
30581         $AWK 'BEGIN { skip = 1; last=""; } \
30582 $cf_awk_program \
30583 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30584  skip = 0; last = \$\$0; } \
30585 END { print last; }' < "$UNALTERED_SYMS" >\$@
30586
30587 distclean::
30588         rm -f resulting.map
30589 CF_EOF
30590                 fi
30591
30592                 for cf_item in $cf_LIST_MODELS
30593                 do
30594
30595         case X$cf_item in
30596         (Xlibtool)
30597                 cf_suffix='.la'
30598                 cf_depsuf=$cf_suffix
30599                 ;;
30600         (Xdebug)
30601                 case "$cf_cv_system_name" in
30602                 (*-msvc*)
30603                         cf_suffix='_g.lib'
30604                         ;;
30605                 (*)
30606                         cf_suffix='_g.a'
30607                         ;;
30608                 esac
30609                 cf_depsuf=$cf_suffix
30610                 ;;
30611         (Xprofile)
30612                 case "$cf_cv_system_name" in
30613                 (*-msvc*)
30614                         cf_suffix='_p.lib'
30615                         ;;
30616                 (*)
30617                         cf_suffix='_p.a'
30618                         ;;
30619                 esac
30620                 cf_depsuf=$cf_suffix
30621                 ;;
30622         (Xshared)
30623                 case "$cf_cv_system_name" in
30624                 (aix[5-7]*)
30625                         cf_suffix='.so'
30626                         cf_depsuf=$cf_suffix
30627                         ;;
30628                 (*-msvc*)
30629                         cf_suffix='.dll'
30630                         cf_depsuf='.dll.lib'
30631                         ;;
30632                 (cygwin*|msys*|mingw*)
30633                         cf_suffix='.dll'
30634                         cf_depsuf='.dll.a'
30635                         ;;
30636                 (darwin*)
30637                         cf_suffix='.dylib'
30638                         cf_depsuf=$cf_suffix
30639                         ;;
30640                 (hpux*)
30641                         case "$target" in
30642                         (ia64*)
30643                                 cf_suffix='.so'
30644                                 cf_depsuf=$cf_suffix
30645                                 ;;
30646                         (*)
30647                                 cf_suffix='.sl'
30648                                 cf_depsuf=$cf_suffix
30649                                 ;;
30650                         esac
30651                         ;;
30652                 (*)
30653                         cf_suffix='.so'
30654                         cf_depsuf=$cf_suffix
30655                         ;;
30656                 esac
30657                 ;;
30658         (*)
30659                 case "$target" in
30660                 (*-msvc*)
30661                         cf_suffix='.lib'
30662                         ;;
30663                 (*)
30664                         cf_suffix='.a'
30665                         ;;
30666                 esac
30667                 cf_depsuf=$cf_suffix
30668                 ;;
30669         esac
30670         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30671         then
30672                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30673                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30674         fi
30675
30676                         if test "$cf_dir" = "c++"
30677                         then
30678
30679 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30680
30681 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30682
30683                         else
30684
30685 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30686
30687 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30688
30689                         fi
30690                         test -z "$cf_libname" && cf_libname="$cf_dir"
30691                         if test "$cf_item" = shared ; then
30692                                 if test -n "${LIB_SUFFIX}"
30693                                 then
30694                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30695                                 else
30696                                         cf_shared_suffix="$cf_suffix"
30697                                 fi
30698                                 if test "$cf_cv_do_symlinks" = yes ; then
30699                                         cf_version_name=
30700
30701                                         case "$cf_cv_shlib_version" in
30702                                         (rel)
30703                                                 cf_version_name=REL_VERSION
30704                                                 ;;
30705                                         (abi)
30706                                                 cf_version_name=ABI_VERSION
30707                                                 ;;
30708                                         esac
30709
30710                                         if test -n "$cf_version_name"
30711                                         then
30712                                                 case "$cf_cv_system_name" in
30713                                                 (darwin*)
30714                                                         # "w", etc?
30715                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30716                                                         ;;
30717                                                 (*)
30718                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30719                                                         ;;
30720                                                 esac
30721                                         fi
30722                                         if test -n "${USE_LIB_SUFFIX}"
30723                                         then
30724                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30725                                         else
30726                                                 cf_shared_suffix="$cf_suffix"
30727                                         fi
30728                                 fi
30729                                 # cygwin needs import library, and has unique naming convention
30730                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30731                                 # use 'cyg' prefix for shared lib.
30732                                 case "$cf_cv_shlib_version" in
30733                                 (cygdll)
30734                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30735                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30736                                         ;;
30737                                 (msysdll)
30738                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30739                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30740                                         ;;
30741                                 (mingw)
30742                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30743                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30744                                         ;;
30745                                 (msvcdll)
30746                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30747                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30748                                         ;;
30749                                 (*)
30750                                         cf_add_lib=
30751                                         ;;
30752                                 esac
30753                                 if test -n "$cf_add_lib"
30754                                 then
30755                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30756                                         continue
30757                                 fi
30758                         fi
30759                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30760                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30761                 done
30762
30763                 if test "$cf_dir" = ncurses ; then
30764                         cf_subsets="$LIB_SUBSETS"
30765                         cf_r_parts="$cf_subsets"
30766                         cf_liblist="$Libs_To_Make"
30767
30768                         while test -n "$cf_r_parts"
30769                         do
30770                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30771                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30772                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30773                                         cf_add_lib=
30774                                         case "$cf_l_parts" in
30775                                         (*termlib*)
30776                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30777                                                 ;;
30778                                         (*ticlib*)
30779                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30780                                                 ;;
30781                                         (*)
30782                                                 break
30783                                                 ;;
30784                                         esac
30785                                         if test -n "$cf_add_lib"; then
30786                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30787                                         fi
30788                                 else
30789                                         break
30790                                 fi
30791                         done
30792                 else
30793                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30794                 fi
30795
30796                 if test "$cf_dir" = c++; then
30797                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30798                                 cf_list=
30799                                 for cf_item in $Libs_To_Make
30800                                 do
30801                                         case "$cf_item" in
30802                                         (*.a)
30803                                                 ;;
30804                                         (*)
30805                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30806                                                 ;;
30807                                         esac
30808                                         for cf_test in $cf_list
30809                                         do
30810                                                 if test "$cf_test" = "$cf_item"
30811                                                 then
30812                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30813                                                         cf_item=
30814                                                         break
30815                                                 fi
30816                                         done
30817                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30818                                 done
30819                                 Libs_To_Make="$cf_list"
30820                         fi
30821                 fi
30822
30823                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30824                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30825                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30826                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30827
30828                 $AWK -f "$srcdir/mk-0th.awk" \
30829                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30830                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30831
30832                 for cf_subset in $cf_subsets
30833                 do
30834                         cf_subdirs=
30835                         for cf_item in $cf_LIST_MODELS
30836                         do
30837
30838                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30839
30840 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30841
30842                         CXX_MODEL=$cf_ITEM
30843                         if test "$CXX_MODEL" = SHARED; then
30844                                 case "$cf_cv_shlib_version" in
30845                                 (cygdll|msysdll|mingw|msvcdll)
30846                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30847
30848 echo "${as_me:-configure}:30848: testing overriding CXX_MODEL to SHARED ..." 1>&5
30849
30850                                         with_shared_cxx=yes
30851                                         ;;
30852                                 (*)
30853                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30854                                         ;;
30855                                 esac
30856                         fi
30857
30858         case X$cf_item in
30859         (Xlibtool)
30860                 cf_suffix='.la'
30861                 cf_depsuf=$cf_suffix
30862                 ;;
30863         (Xdebug)
30864                 case "$cf_cv_system_name" in
30865                 (*-msvc*)
30866                         cf_suffix='_g.lib'
30867                         ;;
30868                 (*)
30869                         cf_suffix='_g.a'
30870                         ;;
30871                 esac
30872                 cf_depsuf=$cf_suffix
30873                 ;;
30874         (Xprofile)
30875                 case "$cf_cv_system_name" in
30876                 (*-msvc*)
30877                         cf_suffix='_p.lib'
30878                         ;;
30879                 (*)
30880                         cf_suffix='_p.a'
30881                         ;;
30882                 esac
30883                 cf_depsuf=$cf_suffix
30884                 ;;
30885         (Xshared)
30886                 case "$cf_cv_system_name" in
30887                 (aix[5-7]*)
30888                         cf_suffix='.so'
30889                         cf_depsuf=$cf_suffix
30890                         ;;
30891                 (*-msvc*)
30892                         cf_suffix='.dll'
30893                         cf_depsuf='.dll.lib'
30894                         ;;
30895                 (cygwin*|msys*|mingw*)
30896                         cf_suffix='.dll'
30897                         cf_depsuf='.dll.a'
30898                         ;;
30899                 (darwin*)
30900                         cf_suffix='.dylib'
30901                         cf_depsuf=$cf_suffix
30902                         ;;
30903                 (hpux*)
30904                         case "$target" in
30905                         (ia64*)
30906                                 cf_suffix='.so'
30907                                 cf_depsuf=$cf_suffix
30908                                 ;;
30909                         (*)
30910                                 cf_suffix='.sl'
30911                                 cf_depsuf=$cf_suffix
30912                                 ;;
30913                         esac
30914                         ;;
30915                 (*)
30916                         cf_suffix='.so'
30917                         cf_depsuf=$cf_suffix
30918                         ;;
30919                 esac
30920                 ;;
30921         (*)
30922                 case "$target" in
30923                 (*-msvc*)
30924                         cf_suffix='.lib'
30925                         ;;
30926                 (*)
30927                         cf_suffix='.a'
30928                         ;;
30929                 esac
30930                 cf_depsuf=$cf_suffix
30931                 ;;
30932         esac
30933         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30934         then
30935                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30936                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30937         fi
30938
30939         case $cf_item in
30940         (libtool) cf_subdir='obj_lo'  ;;
30941         (normal)  cf_subdir='objects' ;;
30942         (debug)   cf_subdir='obj_g' ;;
30943         (profile) cf_subdir='obj_p' ;;
30944         (shared)
30945                 case "$cf_cv_system_name" in
30946                 (cygwin|msys)
30947                         cf_subdir='objects' ;;
30948                 (*)
30949                         cf_subdir='obj_s' ;;
30950                 esac
30951         esac
30952
30953                         # Test for case where we build libtinfo with a different name.
30954                         cf_libname=$cf_dir
30955                         if test "$cf_dir" = ncurses ; then
30956                                 case "$cf_subset" in
30957                                 (*base*)
30958                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30959                                         ;;
30960                                 (*termlib*)
30961                                         cf_libname=$TINFO_LIB_SUFFIX
30962                                         ;;
30963                                 (ticlib*)
30964                                         cf_libname=$TICS_LIB_SUFFIX
30965                                         ;;
30966                                 esac
30967                         elif test "$cf_dir" = c++ ; then
30968
30969 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30970
30971 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30972
30973                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30974                         else
30975
30976 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30977
30978 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30979
30980                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30981                         fi
30982                         if test -n "${USE_ARG_SUFFIX}" ; then
30983                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30984                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30985                         fi
30986
30987                         # These dependencies really are for development, not
30988                         # builds, but they are useful in porting, too.
30989                         cf_depend="../include/ncurses_cfg.h"
30990                         if test "$srcdir" = "."; then
30991                                 cf_reldir="."
30992                         else
30993                                 cf_reldir="\${srcdir}"
30994                         fi
30995
30996                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30997                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30998                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30999                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
31000                         fi
31001
31002                         cf_dir_suffix=
31003                         old_cf_suffix="$cf_suffix"
31004                         if test "$cf_cv_shlib_version_infix" = yes ; then
31005                         if test -n "$USE_LIB_SUFFIX" ; then
31006                                 case "$USE_LIB_SUFFIX" in
31007                                 (tw*)
31008                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
31009                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
31010                                         cf_dir_suffix=tw$EXTRA_SUFFIX
31011                                         ;;
31012                                 (t*)
31013                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
31014                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
31015                                         cf_dir_suffix=t$EXTRA_SUFFIX
31016                                         ;;
31017                                 (w*)
31018                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
31019                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
31020                                         cf_dir_suffix=w$EXTRA_SUFFIX
31021                                         ;;
31022                                 (*)
31023                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
31024                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
31025                                         cf_dir_suffix=$EXTRA_SUFFIX
31026                                         ;;
31027                                 esac
31028                         fi
31029                         fi
31030
31031                         $AWK -f "$srcdir/mk-1st.awk" \
31032                                 name=${cf_libname}${cf_dir_suffix} \
31033                                 traces=$LIB_TRACING \
31034                                 MODEL=$cf_ITEM \
31035                                 CXX_MODEL=$CXX_MODEL \
31036                                 LIB_SUFFIX=$LIB_SUFFIX \
31037                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
31038                                 make_phony="${cf_cv_make_PHONY:-no}" \
31039                                 model=$cf_subdir \
31040                                 prefix=$cf_prefix \
31041                                 suffix=$cf_suffix \
31042                                 subset=$cf_subset \
31043                                 driver=$cf_cv_term_driver \
31044                                 SymLink="$LN_S" \
31045                                 TermlibRoot=$TINFO_NAME \
31046                                 TermlibSuffix=$TINFO_SUFFIX \
31047                                 ShlibVer=$cf_cv_shlib_version \
31048                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
31049                                 ReLink=${cf_cv_do_relink:-no} \
31050                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
31051                                 DoLinks=$cf_cv_do_symlinks \
31052                                 rmSoLocs=$cf_cv_rm_so_locs \
31053                                 ldconfig="$LDCONFIG" \
31054                                 overwrite=$WITH_OVERWRITE \
31055                                 depend="$cf_depend" \
31056                                 host="$host" \
31057                                 libtool_version="$LIBTOOL_VERSION" \
31058                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31059
31060                         cf_suffix="$old_cf_suffix"
31061
31062                         for cf_subdir2 in $cf_subdirs lib
31063                         do
31064                                 test "$cf_subdir" = "$cf_subdir2" && break
31065                         done
31066                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31067                         $AWK -f "$srcdir/mk-2nd.awk" \
31068                                 name=$cf_dir \
31069                                 traces=$LIB_TRACING \
31070                                 MODEL=$cf_ITEM \
31071                                 model=$cf_subdir \
31072                                 subset=$cf_subset \
31073                                 srcdir=$srcdir \
31074                                 echo=$WITH_ECHO \
31075                                 crenames=$cf_cv_prog_CC_c_o \
31076                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31077                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31078                         cf_subdirs="$cf_subdirs $cf_subdir"
31079                         done
31080                 done
31081         fi
31082
31083         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31084 done
31085
31086 echo >> Makefile
31087 echo '# generated by CF_LIB_RULES' >> Makefile
31088
31089 if test "x$cf_cv_make_PHONY" = xyes ; then
31090         cat >> Makefile <<-CF_EOF
31091
31092         .PHONY :        libs
31093         .PHONY :        lintlib
31094         .PHONY :        install.includes
31095         .PHONY :        uninstall.includes
31096         .PHONY :        install.libs
31097         .PHONY :        uninstall.libs
31098 CF_EOF
31099 fi
31100
31101 for cf_dir in $SRC_SUBDIRS
31102 do
31103         if test ! -d "$srcdir/$cf_dir" ; then
31104                 continue
31105         fi
31106
31107         if test -f "$cf_dir/Makefile" ; then
31108                 case "$cf_dir" in
31109                 (Ada95)
31110                         echo 'libs \' >> Makefile
31111                         echo 'install.libs \' >> Makefile
31112                         echo 'uninstall.libs ::' >> Makefile
31113                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31114                         ;;
31115                 esac
31116         fi
31117
31118         if test -f "$srcdir/$cf_dir/modules" ; then
31119
31120                 if test "x$cf_cv_make_PHONY" = xyes ; then
31121                         cat >> Makefile <<-CF_EOF
31122
31123                         .PHONY :        install.$cf_dir
31124                         .PHONY :        uninstall.$cf_dir
31125 CF_EOF
31126                 fi
31127
31128                 echo >> Makefile
31129                 if test -f "$srcdir/$cf_dir/headers" ; then
31130 cat >> Makefile <<CF_EOF
31131 install.includes \\
31132 uninstall.includes \\
31133 CF_EOF
31134                 fi
31135
31136 cat >> Makefile <<CF_EOF
31137 lint \\
31138 libs \\
31139 lintlib \\
31140 install.libs \\
31141 uninstall.libs \\
31142 install.$cf_dir \\
31143 uninstall.$cf_dir ::
31144         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31145 CF_EOF
31146         elif test -f "$srcdir/$cf_dir/headers" ; then
31147 cat >> Makefile <<CF_EOF
31148
31149 libs \\
31150 install.libs \\
31151 uninstall.libs \\
31152 install.includes \\
31153 uninstall.includes ::
31154         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31155 CF_EOF
31156 fi
31157 done
31158
31159 if test "x$cf_cv_make_PHONY" = xyes ; then
31160         cat >> Makefile <<-CF_EOF
31161
31162         .PHONY :        install.data
31163         .PHONY :        uninstall.data
31164 CF_EOF
31165 fi
31166
31167 if test "x$cf_with_db_install" = xyes; then
31168 cat >> Makefile <<CF_EOF
31169
31170 install.libs uninstall.libs \\
31171 install.data uninstall.data ::
31172 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31173 CF_EOF
31174 else
31175 cat >> Makefile <<CF_EOF
31176
31177 install.libs uninstall.libs ::
31178         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31179 CF_EOF
31180 fi
31181
31182 if test "x$cf_with_manpages" = xyes; then
31183
31184 if test "x$cf_cv_make_PHONY" = xyes ; then
31185         cat >> Makefile <<-CF_EOF
31186
31187         .PHONY :        install.man
31188         .PHONY :        uninstall.man
31189 CF_EOF
31190 fi
31191
31192 cat >> Makefile <<CF_EOF
31193
31194 install.man \\
31195 uninstall.man ::
31196         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31197 CF_EOF
31198 fi
31199
31200 cat >> Makefile <<CF_EOF
31201
31202 distclean ::
31203         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31204         rm -f headers.sh headers.sed mk_shared_lib.sh
31205         rm -f edit_man.* man_alias.*
31206         rm -rf \${DIRS_TO_MAKE}
31207 CF_EOF
31208
31209 # Special case: tack's manpage lives in its own directory.
31210 if test "x$cf_with_manpages" = xyes; then
31211 if test "x$cf_with_tack" = "xyes"; then
31212 cat >> Makefile <<CF_EOF
31213
31214 install.man \\
31215 uninstall.man ::
31216         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
31217 CF_EOF
31218 fi
31219 fi
31220
31221 rm -f headers.sed headers.sh
31222
31223 echo creating headers.sh
31224 cat >headers.sh <<CF_EOF
31225 #! $SHELL
31226 # This shell script is generated by the 'configure' script.  It is invoked in a
31227 # subdirectory of the build tree.  It generates a sed-script in the parent
31228 # directory that is used to adjust includes for header files that reside in a
31229 # subdirectory of /usr/include, etc.
31230 PRG=""
31231 while test \$# != 3
31232 do
31233 PRG="\$PRG \$1"; shift
31234 done
31235 DST=\$1
31236 REF=\$2
31237 SRC=\$3
31238 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31239 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31240 echo installing \$SRC in \$DST
31241 CF_EOF
31242
31243 if test "$WITH_CURSES_H" = yes; then
31244         cat >>headers.sh <<CF_EOF
31245 case \$DST in
31246 (/*/include/*)
31247         END=\`basename \$DST\`
31248         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31249         do
31250                 NAME=\`basename \$i\`
31251                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31252         done
31253         ;;
31254 (*)
31255         echo "" >> \$TMPSED
31256         ;;
31257 esac
31258 CF_EOF
31259
31260 else
31261         cat >>headers.sh <<CF_EOF
31262 case \$DST in
31263 (/*/include/*)
31264         END=\`basename \$DST\`
31265         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31266         do
31267                 NAME=\`basename \$i\`
31268                 if test "\$NAME" = "curses.h"
31269                 then
31270                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31271                         NAME=ncurses.h
31272                 fi
31273                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31274         done
31275         ;;
31276 (*)
31277         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31278         ;;
31279 esac
31280 CF_EOF
31281 fi
31282 cat >>headers.sh <<CF_EOF
31283 rm -f \$TMPSRC
31284 sed -f \$TMPSED \$SRC > \$TMPSRC
31285 NAME=\`basename \$SRC\`
31286 CF_EOF
31287 if test "$WITH_CURSES_H" != yes; then
31288         cat >>headers.sh <<CF_EOF
31289 test "\$NAME" = "curses.h" && NAME=ncurses.h
31290 CF_EOF
31291 fi
31292 cat >>headers.sh <<CF_EOF
31293 # Just in case someone gzip'd manpages, remove the conflicting copy.
31294 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31295
31296 eval \$PRG \$TMPSRC \$DST/\$NAME
31297 rm -f \$TMPSRC \$TMPSED
31298 CF_EOF
31299
31300 chmod 0755 headers.sh
31301
31302 for cf_dir in $SRC_SUBDIRS
31303 do
31304         if test ! -d "$srcdir/$cf_dir" ; then
31305                 continue
31306         fi
31307
31308         if test -f "$srcdir/$cf_dir/headers" ; then
31309                 $AWK -f "$srcdir/mk-hdr.awk" \
31310                         subset="$LIB_SUBSETS" \
31311                         compat="$WITH_CURSES_H" \
31312                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31313         fi
31314
31315         if test -f "$srcdir/$cf_dir/modules" ; then
31316                 if test "$cf_dir" != "c++" ; then
31317                         if test "x$cf_cv_make_PHONY" = xyes ; then
31318                                 cat >> $cf_dir/Makefile <<-CF_EOF
31319
31320                                 .PHONY :        depend
31321 CF_EOF
31322                         fi
31323
31324                         cat >>$cf_dir/Makefile <<"CF_EOF"
31325 depend : ${AUTO_SRC}
31326         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31327
31328 # DO NOT DELETE THIS LINE -- make depend depends on it.
31329 CF_EOF
31330                 fi
31331         fi
31332 done
31333
31334 if test "$MANPAGE_RENAMES" != no ; then
31335         # Construct a sed-script to perform renaming within man-pages
31336         test -n "$verbose" && echo "creating edit_man.sed"
31337         test ! -d man && mkdir man
31338         FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31339 fi
31340
31341 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31342 if test -z "$USE_OLD_MAKERULES" ; then
31343         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31344 fi
31345 fi
31346  ;;
31347   esac
31348 done
31349 EOF
31350
31351 cat >>"$CONFIG_STATUS" <<\EOF
31352
31353 { (exit 0); exit 0; }
31354 EOF
31355 chmod +x "$CONFIG_STATUS"
31356 ac_clean_files=$ac_clean_files_save
31357
31358 # configure is writing to config.log, and then calls config.status.
31359 # config.status does its own redirection, appending to config.log.
31360 # Unfortunately, on DOS this fails, as config.log is still kept open
31361 # by configure, so config.status won't be able to write to it; its
31362 # output is simply discarded.  So we exec the FD to /dev/null,
31363 # effectively closing config.log, so it can be properly (re)opened and
31364 # appended to by config.status.  When coming back to configure, we
31365 # need to make the FD available again.
31366 if test "$no_create" != yes; then
31367   ac_cs_success=:
31368   exec 5>/dev/null
31369   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31370   exec 5>>config.log
31371   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31372   # would make configure fail if this is the last instruction.
31373   "$ac_cs_success" || { (exit 1); exit 1; }
31374 fi
31375 ${MAKE:-make} preinstall