]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.3 - patch 20220820
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.747 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210509.
5 #
6 # Copyright 2003-2020,2021      Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27   emulate sh
28   NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36 if expr a : '\(a\)' >/dev/null 2>&1; then
37   as_expr=expr
38 else
39   as_expr=false
40 fi
41
42 rm -f conf$$ conf$$.exe conf$$.file
43 echo >conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45   # We could just check for DJGPP; but this test a) works b) is more generic
46   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47   if test -f conf$$.exe; then
48     # Don't use ln at all; we don't have any links
49     as_ln_s='cp -p'
50   else
51     as_ln_s='ln -s'
52   fi
53 elif ln conf$$.file conf$$ 2>/dev/null; then
54   as_ln_s=ln
55 else
56   as_ln_s='cp -p'
57 fi
58 rm -f conf$$ conf$$.exe conf$$.file
59
60 as_executable_p="test -f"
61
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64   as_unset="unset"
65 else
66   as_unset="false"
67 fi
68
69 # NLS nuisances.
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79 # IFS
80 # We need space, tab and new line, in precisely that order.
81 as_nl='
82 '
83 IFS="   $as_nl"
84
85 # CDPATH.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88 # Name of the host.
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93 exec 6>&1
94
95 #
96 # Initializations.
97 #
98 ac_default_prefix=/usr/local
99 cross_compiling=no
100 subdirs=
101 MFLAGS=
102 MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete.  It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
109
110 ac_unique_file="ncurses/base/lib_initscr.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
113 #include <stdio.h>
114 #if HAVE_SYS_TYPES_H
115 # include <sys/types.h>
116 #endif
117 #if HAVE_SYS_STAT_H
118 # include <sys/stat.h>
119 #endif
120 #if STDC_HEADERS
121 # include <stdlib.h>
122 # include <stddef.h>
123 #else
124 # if HAVE_STDLIB_H
125 #  include <stdlib.h>
126 # endif
127 #endif
128 #if HAVE_STRING_H
129 # if !STDC_HEADERS && HAVE_MEMORY_H
130 #  include <memory.h>
131 # endif
132 # include <string.h>
133 #endif
134 #if HAVE_STRINGS_H
135 # include <strings.h>
136 #endif
137 #if HAVE_INTTYPES_H
138 # include <inttypes.h>
139 #else
140 # if HAVE_STDINT_H
141 #  include <stdint.h>
142 # endif
143 #endif
144 #if HAVE_UNISTD_H
145 # include <unistd.h>
146 #endif"
147
148 # Initialize some variables set by options.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
187
188 # Identity of this package.
189 PACKAGE_NAME=
190 PACKAGE_TARNAME=
191 PACKAGE_VERSION=
192 PACKAGE_STRING=
193 PACKAGE_BUGREPORT=
194
195 ac_prev=
196 for ac_option
197 do
198   # If the previous option needs an argument, assign it.
199   if test -n "$ac_prev"; then
200     eval "$ac_prev=\$ac_option"
201     ac_prev=
202     continue
203   fi
204
205   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207   # Accept the important Cygnus configure options, so we can diagnose typos.
208
209   case "$ac_option" in
210
211   -bindir | --bindir | --bindi | --bind | --bin | --bi)
212     ac_prev=bindir ;;
213   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214     bindir=$ac_optarg ;;
215
216   -build | --build | --buil | --bui | --bu)
217     ac_prev=build_alias ;;
218   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219     build_alias=$ac_optarg ;;
220
221   -cache-file | --cache-file | --cache-fil | --cache-fi \
222   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223     ac_prev=cache_file ;;
224   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226     cache_file=$ac_optarg ;;
227
228   --config-cache | -C)
229     cache_file=config.cache ;;
230
231   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232     ac_prev=datadir ;;
233   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234   | --da=*)
235     datadir=$ac_optarg ;;
236
237   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238   | --dataroo | --dataro | --datar)
239     ac_prev=datarootdir ;;
240   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242     datarootdir=$ac_optarg ;;
243
244   -disable-* | --disable-*)
245     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246     # Reject names that are not valid shell variable names.
247     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249    { (exit 1); exit 1; }; }
250     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251     eval "enable_$ac_feature=no" ;;
252
253   -enable-* | --enable-*)
254     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255     # Reject names that are not valid shell variable names.
256     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258    { (exit 1); exit 1; }; }
259     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260     case "$ac_option" in
261       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262       *) ac_optarg=yes ;;
263     esac
264     eval "enable_$ac_feature='$ac_optarg'" ;;
265
266   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268   | --exec | --exe | --ex)
269     ac_prev=exec_prefix ;;
270   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272   | --exec=* | --exe=* | --ex=*)
273     exec_prefix=$ac_optarg ;;
274
275   -gas | --gas | --ga | --g)
276     # Obsolete; use --with-gas.
277     with_gas=yes ;;
278
279   -help | --help | --hel | --he | -h)
280     ac_init_help=long ;;
281   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282     ac_init_help=recursive ;;
283   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284     ac_init_help=short ;;
285
286   -host | --host | --hos | --ho)
287     ac_prev=host_alias ;;
288   -host=* | --host=* | --hos=* | --ho=*)
289     host_alias=$ac_optarg ;;
290
291   -includedir | --includedir | --includedi | --included | --include \
292   | --includ | --inclu | --incl | --inc)
293     ac_prev=includedir ;;
294   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295   | --includ=* | --inclu=* | --incl=* | --inc=*)
296     includedir=$ac_optarg ;;
297
298   -infodir | --infodir | --infodi | --infod | --info | --inf)
299     ac_prev=infodir ;;
300   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301     infodir=$ac_optarg ;;
302
303   -libdir | --libdir | --libdi | --libd)
304     ac_prev=libdir ;;
305   -libdir=* | --libdir=* | --libdi=* | --libd=*)
306     libdir=$ac_optarg ;;
307
308   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309   | --libexe | --libex | --libe)
310     ac_prev=libexecdir ;;
311   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312   | --libexe=* | --libex=* | --libe=*)
313     libexecdir=$ac_optarg ;;
314
315   -localstatedir | --localstatedir | --localstatedi | --localstated \
316   | --localstate | --localstat | --localsta | --localst \
317   | --locals | --local | --loca | --loc | --lo)
318     ac_prev=localstatedir ;;
319   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322     localstatedir=$ac_optarg ;;
323
324   -runstatedir | --runstatedir | --runstatedi | --runstated \
325   | --runstate | --runstat | --runsta | --runst \
326   | --runs | --run | --ru)
327     ac_prev=runstatedir ;;
328   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330   | --runs=* | --run=* | --ru=*)
331     runstatedir=$ac_optarg ;;
332
333   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334     ac_prev=mandir ;;
335   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336     mandir=$ac_optarg ;;
337
338   -nfp | --nfp | --nf)
339     # Obsolete; use --without-fp.
340     with_fp=no ;;
341
342   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343   | --no-cr | --no-c)
344     no_create=yes ;;
345
346   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348     no_recursion=yes ;;
349
350   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352   | --oldin | --oldi | --old | --ol | --o)
353     ac_prev=oldincludedir ;;
354   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357     oldincludedir=$ac_optarg ;;
358
359   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360     ac_prev=prefix ;;
361   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362     prefix=$ac_optarg ;;
363
364   -program-prefix | --program-prefix | --program-prefi | --program-pref \
365   | --program-pre | --program-pr | --program-p)
366     ac_prev=program_prefix ;;
367   -program-prefix=* | --program-prefix=* | --program-prefi=* \
368   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369     program_prefix=$ac_optarg ;;
370
371   -program-suffix | --program-suffix | --program-suffi | --program-suff \
372   | --program-suf | --program-su | --program-s)
373     ac_prev=program_suffix ;;
374   -program-suffix=* | --program-suffix=* | --program-suffi=* \
375   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376     program_suffix=$ac_optarg ;;
377
378   -program-transform-name | --program-transform-name \
379   | --program-transform-nam | --program-transform-na \
380   | --program-transform-n | --program-transform- \
381   | --program-transform | --program-transfor \
382   | --program-transfo | --program-transf \
383   | --program-trans | --program-tran \
384   | --progr-tra | --program-tr | --program-t)
385     ac_prev=program_transform_name ;;
386   -program-transform-name=* | --program-transform-name=* \
387   | --program-transform-nam=* | --program-transform-na=* \
388   | --program-transform-n=* | --program-transform-=* \
389   | --program-transform=* | --program-transfor=* \
390   | --program-transfo=* | --program-transf=* \
391   | --program-trans=* | --program-tran=* \
392   | --progr-tra=* | --program-tr=* | --program-t=*)
393     program_transform_name=$ac_optarg ;;
394
395   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396   | -silent | --silent | --silen | --sile | --sil)
397     silent=yes ;;
398
399   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400     ac_prev=sbindir ;;
401   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402   | --sbi=* | --sb=*)
403     sbindir=$ac_optarg ;;
404
405   -sharedstatedir | --sharedstatedir | --sharedstatedi \
406   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407   | --sharedst | --shareds | --shared | --share | --shar \
408   | --sha | --sh)
409     ac_prev=sharedstatedir ;;
410   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413   | --sha=* | --sh=*)
414     sharedstatedir=$ac_optarg ;;
415
416   -site | --site | --sit)
417     ac_prev=site ;;
418   -site=* | --site=* | --sit=*)
419     site=$ac_optarg ;;
420
421   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422     ac_prev=srcdir ;;
423   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424     srcdir=$ac_optarg ;;
425
426   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427   | --syscon | --sysco | --sysc | --sys | --sy)
428     ac_prev=sysconfdir ;;
429   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431     sysconfdir=$ac_optarg ;;
432
433   -target | --target | --targe | --targ | --tar | --ta | --t)
434     ac_prev=target_alias ;;
435   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436     target_alias=$ac_optarg ;;
437
438   -v | -verbose | --verbose | --verbos | --verbo | --verb)
439     verbose=yes ;;
440
441   -version | --version | --versio | --versi | --vers | -V)
442     ac_init_version=: ;;
443
444   -with-* | --with-*)
445     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446     # Reject names that are not valid shell variable names.
447     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448       { echo "$as_me: error: invalid package name: $ac_package" >&2
449    { (exit 1); exit 1; }; }
450     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451     case "$ac_option" in
452       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453       *) ac_optarg=yes ;;
454     esac
455     eval "with_$ac_package='$ac_optarg'" ;;
456
457   -without-* | --without-*)
458     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459     # Reject names that are not valid shell variable names.
460     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461       { echo "$as_me: error: invalid package name: $ac_package" >&2
462    { (exit 1); exit 1; }; }
463     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464     eval "with_$ac_package=no" ;;
465
466   --x)
467     # Obsolete; use --with-x.
468     with_x=yes ;;
469
470   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471   | --x-incl | --x-inc | --x-in | --x-i)
472     ac_prev=x_includes ;;
473   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475     x_includes=$ac_optarg ;;
476
477   -x-libraries | --x-libraries | --x-librarie | --x-librari \
478   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479     ac_prev=x_libraries ;;
480   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482     x_libraries=$ac_optarg ;;
483
484   -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486    { (exit 1); exit 1; }; }
487     ;;
488
489   *=*)
490     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491     # Reject names that are not valid shell variable names.
492     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494    { (exit 1); exit 1; }; }
495     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496     eval "$ac_envvar='$ac_optarg'"
497     export "$ac_envvar" ;;
498
499   *)
500     # FIXME: should be removed in autoconf 3.0.
501     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504     : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512   { echo "$as_me: error: missing argument to $ac_option" >&2
513    { (exit 1); exit 1; }; }
514 fi
515
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
518 do
519   eval ac_val=$`echo "$ac_var"`
520   case "$ac_val" in
521     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529               localstatedir libdir includedir oldincludedir infodir mandir
530 do
531   eval ac_val=$`echo "$ac_var"`
532   case "$ac_val" in
533     [\\/$]* | ?:[\\/]* ) ;;
534     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535    { (exit 1); exit 1; }; };;
536   esac
537 done
538
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
541 build=$build_alias
542 host=$host_alias
543 target=$target_alias
544
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547   if test "x$build_alias" = x; then
548     cross_compiling=maybe
549     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550     If a cross compiler is detected then cross compile mode will be used." >&2
551   elif test "x$build_alias" != "x$host_alias"; then
552     cross_compiling=yes
553   fi
554 fi
555
556 ac_tool_prefix=
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
558
559 test "$silent" = yes && exec 6>/dev/null
560
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563   ac_srcdir_defaulted=yes
564   # Try the directory containing this script, then its parent.
565   ac_prog=$0
566   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568   srcdir=$ac_confdir
569   if test ! -r "$srcdir/$ac_unique_file"; then
570     srcdir=..
571   fi
572 else
573   ac_srcdir_defaulted=no
574 fi
575 if test ! -r "$srcdir/$ac_unique_file"; then
576   if test "$ac_srcdir_defaulted" = yes; then
577     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578    { (exit 1); exit 1; }; }
579   else
580     { echo "$as_me: error: cannot find sources in $srcdir" >&2
581    { (exit 1); exit 1; }; }
582   fi
583 fi
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
598 ac_env_CC_value=$CC
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
617 ac_env_CXX_set=${CXX+set}
618 ac_env_CXX_value=$CXX
619 ac_cv_env_CXX_set=${CXX+set}
620 ac_cv_env_CXX_value=$CXX
621 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_env_CXXFLAGS_value=$CXXFLAGS
623 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
624 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
625 ac_env_CXXCPP_set=${CXXCPP+set}
626 ac_env_CXXCPP_value=$CXXCPP
627 ac_cv_env_CXXCPP_set=${CXXCPP+set}
628 ac_cv_env_CXXCPP_value=$CXXCPP
629
630 #
631 # Report the --help message.
632 #
633 if test "$ac_init_help" = "long"; then
634   # Omit some internal or obsolete options to make the list less imposing.
635   # This message is too long to be a string in the A/UX 3.1 sh.
636   cat <<EOF
637 \`configure' configures this package to adapt to many kinds of systems.
638
639 Usage: $0 [OPTION]... [VAR=VALUE]...
640
641 To assign environment variables (e.g., CC, CFLAGS...), specify them as
642 VAR=VALUE.  See below for descriptions of some of the useful variables.
643
644 Defaults for the options are specified in brackets.
645
646 Configuration:
647   -h, --help              display this help and exit
648       --help=short        display options specific to this package
649       --help=recursive    display the short help of all the included packages
650   -V, --version           display version information and exit
651   -q, --quiet, --silent   do not print \`checking...' messages
652       --cache-file=FILE   cache test results in FILE [disabled]
653   -C, --config-cache      alias for \`--cache-file=config.cache'
654   -n, --no-create         do not create output files
655       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
656
657 EOF
658
659   cat <<EOF
660 Installation directories:
661   --prefix=PREFIX         install architecture-independent files in PREFIX
662                           [$ac_default_prefix]
663   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
664                           [PREFIX]
665
666 By default, \`make install' will install all the files in
667 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
668 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
669 for instance \`--prefix=\$HOME'.
670
671 For better control, use the options below.
672
673 Fine tuning of the installation directories:
674   --bindir=DIR            user executables [EPREFIX/bin]
675   --sbindir=DIR           system admin executables [EPREFIX/sbin]
676   --libexecdir=DIR        program executables [EPREFIX/libexec]
677   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
678   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
682   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
683   --libdir=DIR            object code libraries [EPREFIX/lib]
684   --includedir=DIR        C header files [PREFIX/include]
685   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
686   --infodir=DIR           info documentation [DATAROOTDIR/info]
687   --mandir=DIR            man documentation [DATAROOTDIR/man]
688 EOF
689
690   cat <<\EOF
691
692 Program names:
693   --program-prefix=PREFIX            prepend PREFIX to installed program names
694   --program-suffix=SUFFIX            append SUFFIX to installed program names
695   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
696
697 System types:
698   --build=BUILD           configure for building on BUILD [guessed]
699   --host=HOST       build programs to run on HOST [BUILD]
700   --target=TARGET   configure for building compilers for TARGET [HOST]
701 EOF
702 fi
703
704 if test -n "$ac_init_help"; then
705
706   cat <<\EOF
707
708 Optional Packages:
709   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
710   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
711
712 Optional Features:
713   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
714   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
715
716   --with-rel-version=XXX  override derived release version
717   --with-abi-version=XXX  override derived ABI version
718   --with-system-type=XXX  test: override derived host system-type
719   --without-ada           suppress check for Ada compiler, don't build demo
720   --without-cxx           do not adjust ncurses bool to match C++
721   --without-cxx-binding   do not build C++ binding and demo
722   --disable-db-install    suppress install of terminal database
723   --without-manpages      suppress install of manpages
724   --without-progs         suppress build/install with programs (e.g., tic)
725   --without-tack          suppress build/install with tack program
726   --without-tests         suppress build/install with test-programs
727   --without-curses-h      install curses.h as ncurses.h only
728   --with-config-suffix=X  suffixes ncursesXX-config file
729   --with-pkg-config{=path} enable/disable use of pkg-config
730   --with-pkg-config-libdir=XXX use given directory for installing pc-files
731   --enable-pc-files       generate and install .pc files for pkg-config
732   --with-pc-suffix        suffixes pc-files
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix   prefixes actual install-location ($DESTDIR)
735 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
737   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
738   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
742 Options to Specify the Libraries Built/Used:
743   --disable-libtool-version  enable to use libtool's incompatible naming scheme
744   --with-libtool          generate libraries with libtool
745   --with-shared           generate shared-libraries
746   --with-normal           generate normal-libraries (default)
747   --with-debug            generate debug-libraries (default)
748   --with-profile          generate profile-libraries
749   --with-cxx-shared       generate C++ shared-libraries
750   --with-lib-prefix       override library-prefix
751   --with-termlib          generate separate terminfo library
752   --with-ticlib           generate separate tic library
753   --enable-rpath          use rpath option when generating shared libraries
754   --disable-relink        relink shared libraries during install
755   --with-shlib-version=X  Specify rel or abi version for shared libs
756   --with-libtool-opts=XXX specify additional libtool options
757   --with-export-syms=XXX  limit exported symbols using libtool
758   --with-versioned-syms=X markup versioned symbols using ld
759   --with-gpm              use Alessandro Rubini's GPM library
760   --without-dlsym         do not use dlsym() to load GPM dynamically
761   --with-pcre2            use PCRE2 for regular-expressions
762   --with-sysmouse         use sysmouse (FreeBSD console)
763   --disable-lib-suffixes  disable library suffixes
764   --disable-rpath-hack    don't add rpath options for additional libraries
765   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
766 Fine-Tuning Your Configuration:
767   --with-extra-suffix=X   append extra suffix to header/library paths
768   --disable-overwrite     put headers in subdir, omit link to -lcurses
769   --disable-database      do not use terminfo, only fallbacks/termcap
770   --with-database=XXX     specify terminfo source to install
771   --with-hashed-db        specify hashed-database library
772   --with-fallbacks=XXX    specify list of fallback terminal descriptions
773   --with-tic-path=XXX     specify path of tic for fallbacks
774   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
775   --without-xterm-new     specify if xterm terminfo should be old version
776   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
777   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779   --disable-big-core      assume machine has little memory
780   --disable-big-strings   assume compiler has only standard-size strings
781   --enable-termcap        compile in termcap fallback support
782   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783   --enable-getcap         fast termcap load, no xrefs to terminfo
784   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
785   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
786   --disable-root-environ  restrict root use of ncurses environment variables
787   --disable-root-access   restrict file-access when running setuid
788   --enable-symlinks       make tic use symbolic links not hard links
789   --enable-broken_linker  compile with broken-linker support code
790   --enable-bsdpad         recognize BSD-style prefix padding
791   --enable-widec          compile with wide-char/UTF-8 code
792   --disable-lp64          allow chtype to be long (ignore _LP64)
793   --disable-largefile     omit support for large files
794   --disable-tparm-varargs compile tparm() without varargs interface
795   --disable-tic-depends   link tic library without explicit dependency on ncurses library
796   --enable-wattr-macros   enable wattr* macros
797   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
798   --with-bool=TYPE        override fallback type of bool variable
799   --with-caps=alt         compile with alternate Caps file
800   --with-chtype=TYPE      override type of chtype
801   --with-ospeed=TYPE      override type of ospeed variable
802   --with-mmask-t=TYPE     override type of mmask_t
803   --with-ccharw-max=XXX   override size CCHARW_MAX
804   --enable-signed-char    compile using signed Boolean's in term.h
805   --with-tparm-arg=TYPE   override parameter type of tparm
806   --with-rcs-ids          compile-in RCS identifiers
807 Options to Specify How Manpages are Installed:
808   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
809                           optionally formatted/catonly, e.g., gzip,formatted
810   --with-manpage-renames  specify manpage-renaming
811   --with-manpage-aliases  specify manpage-aliases using .so
812   --with-manpage-symlinks specify manpage-aliases using symlinks
813   --with-manpage-tbl      specify manpage processing with tbl
814 Extensions:
815   --disable-ext-funcs     disable function-extensions
816   --enable-sp-funcs       enable SCREEN-extensions
817   --enable-term-driver    enable terminal-driver
818   --enable-const          compile with extra/non-standard const
819   --enable-ext-colors     compile for 256-color support
820   --enable-ext-mouse      compile for extended mouse-encoding
821   --enable-ext-putwin     compile with extended putwin/screendump
822   --enable-no-padding     compile with $NCURSES_NO_PADDING code
823   --enable-sigwinch       compile with SIGWINCH handler
824   --enable-tcap-names     compile with user-definable terminal capabilities
825 Reentrant Code:
826   --with-pthread          use POSIX thread library
827   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
828   --enable-weak-symbols   enable weak-symbols for pthreads
829   --enable-reentrant      compile with reentrant code
830   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
831   --enable-opaque-form    make form-library structures "opaque"
832   --enable-opaque-menu    make menu-library structures "opaque"
833   --enable-opaque-panel   make panel-library structures "opaque"
834   --with-wrap-prefix=XXX  override prefix used for public variables
835 Development Code:
836   --without-develop       disable development options
837   --enable-hard-tabs      compile with hard-tabs code
838   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
839 Experimental Code:
840   --disable-assumed-color do not assume anything about default-colors
841   --disable-hashmap       compile without hashmap scrolling-optimization
842   --enable-colorfgbg      compile-in experimental $COLORFGBG code
843   --enable-fvisibility    compile with -fvisibility=hidden
844   --enable-interop        compile-in interop bindings
845   --enable-safe-sprintf   compile with experimental safe-sprintf code
846   --disable-scroll-hints  compile without scroll-hints code
847   --enable-wgetch-events  compile with wgetch-events code
848   --enable-exp-win32      compile with experimental-Windows driver
849 Testing/development Options:
850   --disable-echo          do not display "compiling" commands
851   --disable-stripping     do not strip (debug info) installed executables
852   --enable-warnings       test: turn on gcc compiler warnings
853   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
854   --enable-string-hacks   work around bogus compiler/loader warnings
855   --enable-assertions     test: turn on generation of assertion code
856   --with-dmalloc          test: use Gray Watson's dmalloc library
857   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
858   --with-valgrind         test: use valgrind
859   --disable-leaks         test: free permanent memory, analyze leaks
860   --enable-expanded       test: generate functions for certain macros
861   --disable-macros        test: use functions rather than macros
862   --with-trace            test: add trace() function to all models of ncurses
863   --disable-gnat-projects test: disable GNAT projects even if usable
864 Ada Binding Options:
865   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
866   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
867   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
868   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
869   --with-ada-libname=XXX  override default Ada library-name
870   --with-form-libname=XXX override form basename of library
871   --with-menu-libname=XXX override menu basename of library
872   --with-panel-libname=XXX override panel basename of library
873   --with-cxx-libname=XXX override ncurses++ basename of library
874
875 Some influential environment variables:
876   CC          C compiler command
877   CFLAGS      C compiler flags
878   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
879               nonstandard directory <lib dir>
880   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
881               headers in a nonstandard directory <include dir>
882   CPP         C preprocessor
883   CXX         C++ compiler command
884   CXXFLAGS    C++ compiler flags
885   CXXCPP      C++ preprocessor
886
887 Use these variables to override the choices made by `configure' or to help
888 it to find libraries and programs with nonstandard names/locations.
889
890 EOF
891 fi
892
893 if test "$ac_init_help" = "recursive"; then
894   # If there are subdirs, report their specific --help.
895   ac_popdir=`pwd`
896   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
897     cd "$ac_subdir"
898     # A "../" for each directory in /$ac_subdir.
899     ac_dots=`echo "$ac_subdir" |
900              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
901
902     case "$srcdir" in
903     .) # No --srcdir option.  We are building in place.
904       ac_sub_srcdir="$srcdir" ;;
905     [\\/]* | ?:[\\/]* ) # Absolute path.
906       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
907     *) # Relative path.
908       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
909     esac
910
911     # Check for guested configure; otherwise get Cygnus style configure.
912     if test -f "$ac_sub_srcdir/configure.gnu"; then
913       echo
914       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
915     elif test -f "$ac_sub_srcdir/configure"; then
916       echo
917       $SHELL "$ac_sub_srcdir/configure" --help=recursive
918     elif test -f "$ac_sub_srcdir/configure.ac" ||
919            test -f "$ac_sub_srcdir/configure.in"; then
920       echo
921       "$ac_configure" --help
922     else
923       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
924     fi
925     cd "$ac_popdir"
926   done
927 fi
928
929 test -n "$ac_init_help" && exit 0
930 if "$ac_init_version"; then
931   cat <<\EOF
932
933 Copyright 2003-2020,2021        Thomas E. Dickey
934 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
935 Free Software Foundation, Inc.
936 This configure script is free software; the Free Software Foundation
937 gives unlimited permission to copy, distribute and modify it.
938 EOF
939   exit 0
940 fi
941 exec 5>config.log
942 cat >&5 <<EOF
943 This file contains any messages produced by compilers while
944 running configure, to aid debugging if configure makes a mistake.
945
946 It was created by $as_me, which was
947 generated by GNU Autoconf 2.52.20210509.  Invocation command line was
948
949   $ $0 $@
950
951 EOF
952 {
953 cat <<_ASUNAME
954 ## ---------- ##
955 ## Platform.  ##
956 ## ---------- ##
957
958 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
959 uname -m = `(uname -m) 2>/dev/null || echo unknown`
960 uname -r = `(uname -r) 2>/dev/null || echo unknown`
961 uname -s = `(uname -s) 2>/dev/null || echo unknown`
962 uname -v = `(uname -v) 2>/dev/null || echo unknown`
963
964 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
965 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
966
967 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
968 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
969 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
970 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
971 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
972 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
973 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
974
975 PATH = $PATH
976
977 _ASUNAME
978 } >&5
979
980 cat >&5 <<EOF
981 ## ------------ ##
982 ## Core tests.  ##
983 ## ------------ ##
984
985 EOF
986
987 # Keep a trace of the command line.
988 # Strip out --no-create and --no-recursion so they do not pile up.
989 # Also quote any args containing shell meta-characters.
990 ac_configure_args=
991 ac_sep=
992 for ac_arg
993 do
994   case "$ac_arg" in
995   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
996   | --no-cr | --no-c) ;;
997   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
998   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
999   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1000     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1001     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1002     ac_sep=" " ;;
1003   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1004      ac_sep=" " ;;
1005   esac
1006   # Get rid of the leading space.
1007 done
1008
1009 # When interrupted or exit'd, cleanup temporary files, and complete
1010 # config.log.  We remove comments because anyway the quotes in there
1011 # would cause problems or look ugly.
1012 trap 'exit_status=$?
1013   # Save into config.log some information that might help in debugging.
1014   echo >&5
1015   echo "## ----------------- ##" >&5
1016   echo "## Cache variables.  ##" >&5
1017   echo "## ----------------- ##" >&5
1018   echo >&5
1019   # The following way of writing the cache mishandles newlines in values,
1020 {
1021   (set) 2>&1 |
1022     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1023     *ac_space=\ *)
1024       sed -n \
1025         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1026           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1027       ;;
1028     *)
1029       sed -n \
1030         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1031       ;;
1032     esac;
1033 } >&5
1034   sed "/^$/d" confdefs.h >conftest.log
1035   if test -s conftest.log; then
1036     echo >&5
1037     echo "## ------------ ##" >&5
1038     echo "## confdefs.h.  ##" >&5
1039     echo "## ------------ ##" >&5
1040     echo >&5
1041     cat conftest.log >&5
1042   fi
1043   (echo; echo) >&5
1044   test "$ac_signal" != 0 &&
1045     echo "$as_me: caught signal $ac_signal" >&5
1046   echo "$as_me: exit $exit_status" >&5
1047   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1048     exit $exit_status
1049      ' 0
1050 for ac_signal in 1 2 13 15; do
1051   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1052 done
1053 ac_signal=0
1054
1055 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1056 rm -rf conftest* confdefs.h
1057 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1058 echo >confdefs.h
1059
1060 # Let the site file select an alternate cache file if it wants to.
1061 # Prefer explicitly selected file to automatically selected ones.
1062 if test -z "$CONFIG_SITE"; then
1063   if test "x$prefix" != xNONE; then
1064     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1065   else
1066     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1067   fi
1068 fi
1069 for ac_site_file in $CONFIG_SITE; do
1070   if test -r "$ac_site_file"; then
1071     { echo "$as_me:1071: loading site script $ac_site_file" >&5
1072 echo "$as_me: loading site script $ac_site_file" >&6;}
1073     cat "$ac_site_file" >&5
1074     . "$ac_site_file"
1075   fi
1076 done
1077
1078 if test -r "$cache_file"; then
1079   # Some versions of bash will fail to source /dev/null (special
1080   # files actually), so we avoid doing that.
1081   if test -f "$cache_file"; then
1082     { echo "$as_me:1082: loading cache $cache_file" >&5
1083 echo "$as_me: loading cache $cache_file" >&6;}
1084     case $cache_file in
1085       [\\/]* | ?:[\\/]* ) . $cache_file;;
1086       *)                      . ./$cache_file;;
1087     esac
1088   fi
1089 else
1090   { echo "$as_me:1090: creating cache $cache_file" >&5
1091 echo "$as_me: creating cache $cache_file" >&6;}
1092   >$cache_file
1093 fi
1094
1095 # Check that the precious variables saved in the cache have kept the same
1096 # value.
1097 ac_cache_corrupted=false
1098 for ac_var in `(set) 2>&1 |
1099                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1100   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1101   eval ac_new_set=\$ac_env_${ac_var}_set
1102   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1103   eval ac_new_val="\$ac_env_${ac_var}_value"
1104   case "$ac_old_set,$ac_new_set" in
1105     set,)
1106       { echo "$as_me:1106: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1107 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1108       ac_cache_corrupted=: ;;
1109     ,set)
1110       { echo "$as_me:1110: error: \`$ac_var' was not set in the previous run" >&5
1111 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1112       ac_cache_corrupted=: ;;
1113     ,);;
1114     *)
1115       if test "x$ac_old_val" != "x$ac_new_val"; then
1116         { echo "$as_me:1116: error: \`$ac_var' has changed since the previous run:" >&5
1117 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1118         { echo "$as_me:1118:   former value:  $ac_old_val" >&5
1119 echo "$as_me:   former value:  $ac_old_val" >&2;}
1120         { echo "$as_me:1120:   current value: $ac_new_val" >&5
1121 echo "$as_me:   current value: $ac_new_val" >&2;}
1122         ac_cache_corrupted=:
1123       fi;;
1124   esac
1125   # Pass precious variables to config.status.  It doesn't matter if
1126   # we pass some twice (in addition to the command line arguments).
1127   if test "$ac_new_set" = set; then
1128     case "$ac_new_val" in
1129     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1130       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1131       ac_configure_args="$ac_configure_args '$ac_arg'"
1132       ;;
1133     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1134        ;;
1135     esac
1136   fi
1137 done
1138 if "$ac_cache_corrupted"; then
1139   { echo "$as_me:1139: error: changes in the environment can compromise the build" >&5
1140 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1141   { { echo "$as_me:1141: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1142 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1143    { (exit 1); exit 1; }; }
1144 fi
1145
1146 ac_ext=c
1147 ac_cpp='$CPP $CPPFLAGS'
1148 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1149 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1150 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1151 ac_main_return="return"
1152
1153 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1154   *c*,-n*) ECHO_N=
1155            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1156            ECHO_T='     '
1157            ;;
1158   *c*,*  ) ECHO_N=-n
1159            ECHO_C=
1160            ECHO_T=
1161            ;;
1162   *)       ECHO_N=
1163            ECHO_C='\c'
1164            ECHO_T=
1165            ;;
1166 esac
1167 echo "#! $SHELL" >conftest.sh
1168 echo  "exit 0"   >>conftest.sh
1169 chmod +x conftest.sh
1170 if { (echo "$as_me:1170: PATH=\".;.\"; conftest.sh") >&5
1171   (PATH=".;."; conftest.sh) 2>&5
1172   ac_status=$?
1173   echo "$as_me:1173: \$? = $ac_status" >&5
1174   (exit "$ac_status"); }; then
1175   ac_path_separator=';'
1176 else
1177   ac_path_separator=:
1178 fi
1179 PATH_SEPARATOR="$ac_path_separator"
1180 rm -f conftest.sh
1181
1182 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1183
1184 top_builddir=`pwd`
1185
1186 for ac_prog in ggrep grep
1187 do
1188   # Extract the first word of "$ac_prog", so it can be a program name with args.
1189 set dummy $ac_prog; ac_word=$2
1190 echo "$as_me:1190: checking for $ac_word" >&5
1191 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1192 if test "${ac_cv_prog_GREP+set}" = set; then
1193   echo $ECHO_N "(cached) $ECHO_C" >&6
1194 else
1195   if test -n "$GREP"; then
1196   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1197 else
1198   ac_save_IFS=$IFS; IFS=$ac_path_separator
1199 ac_dummy="$PATH"
1200 for ac_dir in $ac_dummy; do
1201   IFS=$ac_save_IFS
1202   test -z "$ac_dir" && ac_dir=.
1203   $as_executable_p "$ac_dir/$ac_word" || continue
1204 ac_cv_prog_GREP="$ac_prog"
1205 echo "$as_me:1205: found $ac_dir/$ac_word" >&5
1206 break
1207 done
1208
1209 fi
1210 fi
1211 GREP=$ac_cv_prog_GREP
1212 if test -n "$GREP"; then
1213   echo "$as_me:1213: result: $GREP" >&5
1214 echo "${ECHO_T}$GREP" >&6
1215 else
1216   echo "$as_me:1216: result: no" >&5
1217 echo "${ECHO_T}no" >&6
1218 fi
1219
1220   test -n "$GREP" && break
1221 done
1222 test -n "$GREP" || GREP=": "
1223
1224 echo "$as_me:1224: checking for egrep" >&5
1225 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1226 if test "${ac_cv_path_EGREP+set}" = set; then
1227   echo $ECHO_N "(cached) $ECHO_C" >&6
1228 else
1229   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1230    then ac_cv_path_EGREP="$GREP -E"
1231    else
1232      for ac_prog in gegrep egrep
1233 do
1234   # Extract the first word of "$ac_prog", so it can be a program name with args.
1235 set dummy $ac_prog; ac_word=$2
1236 echo "$as_me:1236: checking for $ac_word" >&5
1237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1238 if test "${ac_cv_path_EGREP+set}" = set; then
1239   echo $ECHO_N "(cached) $ECHO_C" >&6
1240 else
1241   case $EGREP in
1242   [\\/]* | ?:[\\/]*)
1243   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1244   ;;
1245   *)
1246   ac_save_IFS=$IFS; IFS=$ac_path_separator
1247 ac_dummy="$PATH"
1248 for ac_dir in $ac_dummy; do
1249   IFS=$ac_save_IFS
1250   test -z "$ac_dir" && ac_dir=.
1251   if $as_executable_p "$ac_dir/$ac_word"; then
1252    ac_cv_path_EGREP="$ac_dir/$ac_word"
1253    echo "$as_me:1253: found $ac_dir/$ac_word" >&5
1254    break
1255 fi
1256 done
1257
1258   ;;
1259 esac
1260 fi
1261 EGREP=$ac_cv_path_EGREP
1262
1263 if test -n "$EGREP"; then
1264   echo "$as_me:1264: result: $EGREP" >&5
1265 echo "${ECHO_T}$EGREP" >&6
1266 else
1267   echo "$as_me:1267: result: no" >&5
1268 echo "${ECHO_T}no" >&6
1269 fi
1270
1271   test -n "$EGREP" && break
1272 done
1273 test -n "$EGREP" || EGREP=": "
1274
1275      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1275: error: cannot find workable egrep" >&5
1276 echo "$as_me: error: cannot find workable egrep" >&2;}
1277    { (exit 1); exit 1; }; }
1278    fi
1279 fi
1280 echo "$as_me:1280: result: $ac_cv_path_EGREP" >&5
1281 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1282  EGREP="$ac_cv_path_EGREP"
1283
1284 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1285 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1286 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1287 cf_cv_abi_version=${NCURSES_MAJOR}
1288 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1289 cf_cv_timestamp=`date`
1290 echo "$as_me:1290: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1291 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1292
1293 if test -f "$srcdir/VERSION" ; then
1294         echo "$as_me:1294: checking for package version" >&5
1295 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1296
1297         # if there are not enough fields, cut returns the last one...
1298         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1299         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1300         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1301
1302         # this is how CF_BUNDLED_INTL uses $VERSION:
1303         VERSION="$cf_field1"
1304
1305         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1306         test -z "$VERSION_MAJOR" && { { echo "$as_me:1306: error: missing major-version" >&5
1307 echo "$as_me: error: missing major-version" >&2;}
1308    { (exit 1); exit 1; }; }
1309
1310         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1311         test -z "$VERSION_MINOR" && { { echo "$as_me:1311: error: missing minor-version" >&5
1312 echo "$as_me: error: missing minor-version" >&2;}
1313    { (exit 1); exit 1; }; }
1314
1315         echo "$as_me:1315: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1316 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1317
1318         echo "$as_me:1318: checking for package patch date" >&5
1319 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1320         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1321         case .$VERSION_PATCH in
1322         (.)
1323                 { { echo "$as_me:1323: error: missing patch-date $VERSION_PATCH" >&5
1324 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1325    { (exit 1); exit 1; }; }
1326                 ;;
1327         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1328                 ;;
1329         (*)
1330                 { { echo "$as_me:1330: error: illegal patch-date $VERSION_PATCH" >&5
1331 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1332    { (exit 1); exit 1; }; }
1333                 ;;
1334         esac
1335         echo "$as_me:1335: result: $VERSION_PATCH" >&5
1336 echo "${ECHO_T}$VERSION_PATCH" >&6
1337 else
1338         { { echo "$as_me:1338: error: did not find $srcdir/VERSION" >&5
1339 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1340    { (exit 1); exit 1; }; }
1341 fi
1342
1343 # show the actual data that we have for versions:
1344 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1345
1346 echo "${as_me:-configure}:1346: testing ABI VERSION $VERSION ..." 1>&5
1347
1348 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1349
1350 echo "${as_me:-configure}:1350: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1351
1352 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1353
1354 echo "${as_me:-configure}:1354: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1355
1356 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1357
1358 echo "${as_me:-configure}:1358: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1359
1360         cf_PACKAGE=NCURSES
1361         PACKAGE=ncurses
1362
1363 cat >>confdefs.h <<EOF
1364 #define PACKAGE "$PACKAGE"
1365 EOF
1366
1367 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1368
1369         cat >>confdefs.h <<EOF
1370 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1371 EOF
1372
1373         cat >>confdefs.h <<EOF
1374 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1375 EOF
1376
1377 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1378
1379 # Check whether --with-rel-version or --without-rel-version was given.
1380 if test "${with_rel_version+set}" = set; then
1381   withval="$with_rel_version"
1382   { echo "$as_me:1382: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1383 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1384  cf_cv_rel_version=$withval
1385 fi;
1386
1387  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1388  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1389
1390 if test -n "$NCURSES_MAJOR" ; then
1391   case $NCURSES_MAJOR in
1392   ([0-9]*)
1393         ;;
1394   (*)
1395         { { echo "$as_me:1395: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1396 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1397    { (exit 1); exit 1; }; }
1398         ;;
1399   esac
1400 else
1401   { { echo "$as_me:1401: error: Release major-version value is empty" >&5
1402 echo "$as_me: error: Release major-version value is empty" >&2;}
1403    { (exit 1); exit 1; }; }
1404 fi
1405
1406 if test -n "$NCURSES_MINOR" ; then
1407   case $NCURSES_MINOR in
1408   ([0-9]*)
1409         ;;
1410   (*)
1411         { { echo "$as_me:1411: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1412 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1413    { (exit 1); exit 1; }; }
1414         ;;
1415   esac
1416 else
1417   { { echo "$as_me:1417: error: Release minor-version value is empty" >&5
1418 echo "$as_me: error: Release minor-version value is empty" >&2;}
1419    { (exit 1); exit 1; }; }
1420 fi
1421
1422 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1423
1424 # Check whether --with-abi-version or --without-abi-version was given.
1425 if test "${with_abi_version+set}" = set; then
1426   withval="$with_abi_version"
1427
1428         if test "x$cf_cv_abi_version" != "x$withval"
1429         then
1430                 { echo "$as_me:1430: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1431 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1432                 case "$cf_cv_rel_version" in
1433                 (5.*)
1434                         cf_cv_rel_version=$withval.0
1435                         ;;
1436                 (6.*)
1437                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1438                         ;;
1439                 esac
1440         fi
1441         cf_cv_abi_version=$withval
1442 fi;
1443
1444 if test -n "$cf_cv_abi_version" ; then
1445   case $cf_cv_abi_version in
1446   ([0-9]*)
1447         ;;
1448   (*)
1449         { { echo "$as_me:1449: error: ABI version is not a number: $cf_cv_abi_version" >&5
1450 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1451    { (exit 1); exit 1; }; }
1452         ;;
1453   esac
1454 else
1455   { { echo "$as_me:1455: error: ABI version value is empty" >&5
1456 echo "$as_me: error: ABI version value is empty" >&2;}
1457    { (exit 1); exit 1; }; }
1458 fi
1459
1460 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1461 then
1462         case "$cf_cv_rel_version" in
1463         (5.*)
1464                 cf_cv_rel_version=$with_abi_version.0
1465                 ;;
1466         esac
1467 fi
1468
1469 ac_aux_dir=
1470 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1471   if test -f "$ac_dir/install-sh"; then
1472     ac_aux_dir=$ac_dir
1473     ac_install_sh="$ac_aux_dir/install-sh -c"
1474     break
1475   elif test -f "$ac_dir/install.sh"; then
1476     ac_aux_dir=$ac_dir
1477     ac_install_sh="$ac_aux_dir/install.sh -c"
1478     break
1479   elif test -f "$ac_dir/shtool"; then
1480     ac_aux_dir=$ac_dir
1481     ac_install_sh="$ac_aux_dir/shtool install -c"
1482     break
1483   fi
1484 done
1485 if test -z "$ac_aux_dir"; then
1486   { { echo "$as_me:1486: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1487 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1488    { (exit 1); exit 1; }; }
1489 fi
1490 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1491 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1492 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1493
1494 # Make sure we can run config.sub.
1495 $ac_config_sub sun4 >/dev/null 2>&1 ||
1496   { { echo "$as_me:1496: error: cannot run $ac_config_sub" >&5
1497 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1498    { (exit 1); exit 1; }; }
1499
1500 echo "$as_me:1500: checking build system type" >&5
1501 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1502 if test "${ac_cv_build+set}" = set; then
1503   echo $ECHO_N "(cached) $ECHO_C" >&6
1504 else
1505   ac_cv_build_alias=$build_alias
1506 test -z "$ac_cv_build_alias" &&
1507   ac_cv_build_alias=`$ac_config_guess`
1508 test -z "$ac_cv_build_alias" &&
1509   { { echo "$as_me:1509: error: cannot guess build type; you must specify one" >&5
1510 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1511    { (exit 1); exit 1; }; }
1512 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1513   { { echo "$as_me:1513: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1514 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1515    { (exit 1); exit 1; }; }
1516
1517 fi
1518 echo "$as_me:1518: result: $ac_cv_build" >&5
1519 echo "${ECHO_T}$ac_cv_build" >&6
1520 build=$ac_cv_build
1521 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1522 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1523 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1524
1525 echo "$as_me:1525: checking host system type" >&5
1526 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1527 if test "${ac_cv_host+set}" = set; then
1528   echo $ECHO_N "(cached) $ECHO_C" >&6
1529 else
1530   ac_cv_host_alias=$host_alias
1531 test -z "$ac_cv_host_alias" &&
1532   ac_cv_host_alias=$ac_cv_build_alias
1533 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1534   { { echo "$as_me:1534: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1535 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1536    { (exit 1); exit 1; }; }
1537
1538 fi
1539 echo "$as_me:1539: result: $ac_cv_host" >&5
1540 echo "${ECHO_T}$ac_cv_host" >&6
1541 host=$ac_cv_host
1542 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1543 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1544 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1545
1546 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1547         echo "$as_me:1547: checking target system type" >&5
1548 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1549 if test "${ac_cv_target+set}" = set; then
1550   echo $ECHO_N "(cached) $ECHO_C" >&6
1551 else
1552   ac_cv_target_alias=$target_alias
1553 test "x$ac_cv_target_alias" = "x" &&
1554   ac_cv_target_alias=$ac_cv_host_alias
1555 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1556   { { echo "$as_me:1556: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1557 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1558    { (exit 1); exit 1; }; }
1559
1560 fi
1561 echo "$as_me:1561: result: $ac_cv_target" >&5
1562 echo "${ECHO_T}$ac_cv_target" >&6
1563 target=$ac_cv_target
1564 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1565 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1566 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1567
1568 # The aliases save the names the user supplied, while $host etc.
1569 # will get canonicalized.
1570 test -n "$target_alias" &&
1571   test "$program_prefix$program_suffix$program_transform_name" = \
1572     NONENONEs,x,x, &&
1573   program_prefix=${target_alias}-
1574         system_name="$host_os"
1575 else
1576         system_name="`(uname -s -r) 2>/dev/null`"
1577         if test -z "$system_name" ; then
1578                 system_name="`(hostname) 2>/dev/null`"
1579         fi
1580 fi
1581 test -n "$system_name" &&
1582 cat >>confdefs.h <<EOF
1583 #define SYSTEM_NAME "$system_name"
1584 EOF
1585
1586 if test "${cf_cv_system_name+set}" = set; then
1587   echo $ECHO_N "(cached) $ECHO_C" >&6
1588 else
1589   cf_cv_system_name="$system_name"
1590 fi
1591
1592 test -z "$system_name" && system_name="$cf_cv_system_name"
1593 test -n "$cf_cv_system_name" && echo "$as_me:1593: result: Configuring for $cf_cv_system_name" >&5
1594 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1595
1596 if test ".$system_name" != ".$cf_cv_system_name" ; then
1597         echo "$as_me:1597: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1598 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1599         { { echo "$as_me:1599: error: \"Please remove config.cache and try again.\"" >&5
1600 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1601    { (exit 1); exit 1; }; }
1602 fi
1603
1604 # Check whether --with-system-type or --without-system-type was given.
1605 if test "${with_system_type+set}" = set; then
1606   withval="$with_system_type"
1607   { echo "$as_me:1607: WARNING: overriding system type to $withval" >&5
1608 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1609         cf_cv_system_name=$withval
1610         host_os=$withval
1611
1612 fi;
1613
1614 ###     Save the given $CFLAGS to allow user-override.
1615 cf_user_CFLAGS="$CFLAGS"
1616
1617 ###     Default install-location
1618 echo "$as_me:1618: checking for fgrep" >&5
1619 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1620 if test "${ac_cv_path_FGREP+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1624    then ac_cv_path_FGREP="$GREP -F"
1625    else
1626      for ac_prog in gfgrep fgrep
1627 do
1628   # Extract the first word of "$ac_prog", so it can be a program name with args.
1629 set dummy $ac_prog; ac_word=$2
1630 echo "$as_me:1630: checking for $ac_word" >&5
1631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1632 if test "${ac_cv_path_FGREP+set}" = set; then
1633   echo $ECHO_N "(cached) $ECHO_C" >&6
1634 else
1635   case $FGREP in
1636   [\\/]* | ?:[\\/]*)
1637   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1638   ;;
1639   *)
1640   ac_save_IFS=$IFS; IFS=$ac_path_separator
1641 ac_dummy="$PATH"
1642 for ac_dir in $ac_dummy; do
1643   IFS=$ac_save_IFS
1644   test -z "$ac_dir" && ac_dir=.
1645   if $as_executable_p "$ac_dir/$ac_word"; then
1646    ac_cv_path_FGREP="$ac_dir/$ac_word"
1647    echo "$as_me:1647: found $ac_dir/$ac_word" >&5
1648    break
1649 fi
1650 done
1651
1652   ;;
1653 esac
1654 fi
1655 FGREP=$ac_cv_path_FGREP
1656
1657 if test -n "$FGREP"; then
1658   echo "$as_me:1658: result: $FGREP" >&5
1659 echo "${ECHO_T}$FGREP" >&6
1660 else
1661   echo "$as_me:1661: result: no" >&5
1662 echo "${ECHO_T}no" >&6
1663 fi
1664
1665   test -n "$FGREP" && break
1666 done
1667 test -n "$FGREP" || FGREP=": "
1668
1669      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1669: error: cannot find workable fgrep" >&5
1670 echo "$as_me: error: cannot find workable fgrep" >&2;}
1671    { (exit 1); exit 1; }; }
1672    fi
1673 fi
1674 echo "$as_me:1674: result: $ac_cv_path_FGREP" >&5
1675 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1676  FGREP="$ac_cv_path_FGREP"
1677
1678 echo "$as_me:1678: checking for prefix" >&5
1679 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1680 if test "x$prefix" = "xNONE" ; then
1681         case "$cf_cv_system_name" in
1682                 # non-vendor systems don't have a conflict
1683         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1684                 prefix=/usr
1685                 ;;
1686         (*)     prefix=$ac_default_prefix
1687                 ;;
1688         esac
1689 fi
1690 echo "$as_me:1690: result: $prefix" >&5
1691 echo "${ECHO_T}$prefix" >&6
1692
1693 if test "x$prefix" = "xNONE" ; then
1694 echo "$as_me:1694: checking for default include-directory" >&5
1695 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1696 test -n "$verbose" && echo 1>&6
1697 for cf_symbol in \
1698         "$includedir" \
1699         "$includedir/ncurses" \
1700         "$prefix/include" \
1701         "$prefix/include/ncurses" \
1702         /usr/local/include \
1703         /usr/local/include/ncurses \
1704         /usr/include \
1705         /usr/include/ncurses
1706 do
1707         cf_dir=`eval echo "$cf_symbol"`
1708         if test -f "$cf_dir/curses.h" ; then
1709         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1710                 includedir="$cf_symbol"
1711                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1712                 break
1713         fi
1714         fi
1715         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1716 done
1717 echo "$as_me:1717: result: $includedir" >&5
1718 echo "${ECHO_T}$includedir" >&6
1719 fi
1720
1721 ### Defaults for ncurses ABI
1722
1723 # ABI 5 defaults:
1724 cf_dft_ccharw_max=5
1725 cf_dft_chtype=auto
1726 cf_dft_ext_colors=no
1727 cf_dft_ext_const=no
1728 cf_dft_ext_mouse=no
1729 cf_dft_ext_putwin=no
1730 cf_dft_ext_spfuncs=no
1731 cf_dft_filter_syms=no
1732 cf_dft_interop=no
1733 cf_dft_mmask_t=auto
1734 cf_dft_opaque_curses=no
1735 cf_dft_ordinate_type=short
1736 cf_dft_signed_char=no
1737 cf_dft_tparm_arg=long
1738 cf_dft_with_lp64=no
1739
1740 # ABI 6 defaults:
1741 case x$cf_cv_abi_version in
1742 (x[6789])
1743         cf_dft_chtype=uint32_t
1744         cf_dft_ext_colors=yes
1745         cf_dft_ext_const=yes
1746         cf_dft_ext_mouse=yes
1747         cf_dft_ext_putwin=yes
1748         cf_dft_ext_spfuncs=yes
1749         cf_dft_filter_syms=yes
1750         cf_dft_interop=yes
1751         cf_dft_mmask_t=uint32_t
1752         cf_dft_tparm_arg=intptr_t
1753         cf_dft_with_lp64=yes
1754         ;;
1755 esac
1756
1757 # ABI 7 defaults:
1758 case x$cf_cv_abi_version in
1759 (x[789])
1760         cf_dft_ccharw_max=6
1761         cf_dft_mmask_t=uint64_t
1762         cf_dft_opaque_curses=yes
1763         cf_dft_ordinate_type=int
1764         cf_dft_signed_char=yes
1765         # also: remove the wgetch-events feature in ABI 7
1766         ;;
1767 esac
1768
1769 ###     Checks for programs.
1770
1771 # Check whether --with-ada or --without-ada was given.
1772 if test "${with_ada+set}" = set; then
1773   withval="$with_ada"
1774   cf_with_ada=$withval
1775 else
1776   cf_with_ada=yes
1777 fi;
1778
1779 if test "x$cf_with_ada" = xyes
1780 then
1781         cf_prog_cc="gnatgcc gcc cc"
1782 else
1783         cf_prog_cc="gcc cc"
1784 fi
1785
1786 ac_ext=c
1787 ac_cpp='$CPP $CPPFLAGS'
1788 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1789 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1790 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1791 ac_main_return="return"
1792 if test -n "$ac_tool_prefix"; then
1793   for ac_prog in $cf_prog_cc
1794   do
1795     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1796 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1797 echo "$as_me:1797: checking for $ac_word" >&5
1798 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1799 if test "${ac_cv_prog_CC+set}" = set; then
1800   echo $ECHO_N "(cached) $ECHO_C" >&6
1801 else
1802   if test -n "$CC"; then
1803   ac_cv_prog_CC="$CC" # Let the user override the test.
1804 else
1805   ac_save_IFS=$IFS; IFS=$ac_path_separator
1806 ac_dummy="$PATH"
1807 for ac_dir in $ac_dummy; do
1808   IFS=$ac_save_IFS
1809   test -z "$ac_dir" && ac_dir=.
1810   $as_executable_p "$ac_dir/$ac_word" || continue
1811 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1812 echo "$as_me:1812: found $ac_dir/$ac_word" >&5
1813 break
1814 done
1815
1816 fi
1817 fi
1818 CC=$ac_cv_prog_CC
1819 if test -n "$CC"; then
1820   echo "$as_me:1820: result: $CC" >&5
1821 echo "${ECHO_T}$CC" >&6
1822 else
1823   echo "$as_me:1823: result: no" >&5
1824 echo "${ECHO_T}no" >&6
1825 fi
1826
1827     test -n "$CC" && break
1828   done
1829 fi
1830 if test -z "$CC"; then
1831   ac_ct_CC=$CC
1832   for ac_prog in $cf_prog_cc
1833 do
1834   # Extract the first word of "$ac_prog", so it can be a program name with args.
1835 set dummy $ac_prog; ac_word=$2
1836 echo "$as_me:1836: checking for $ac_word" >&5
1837 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1838 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1839   echo $ECHO_N "(cached) $ECHO_C" >&6
1840 else
1841   if test -n "$ac_ct_CC"; then
1842   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1843 else
1844   ac_save_IFS=$IFS; IFS=$ac_path_separator
1845 ac_dummy="$PATH"
1846 for ac_dir in $ac_dummy; do
1847   IFS=$ac_save_IFS
1848   test -z "$ac_dir" && ac_dir=.
1849   $as_executable_p "$ac_dir/$ac_word" || continue
1850 ac_cv_prog_ac_ct_CC="$ac_prog"
1851 echo "$as_me:1851: found $ac_dir/$ac_word" >&5
1852 break
1853 done
1854
1855 fi
1856 fi
1857 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1858 if test -n "$ac_ct_CC"; then
1859   echo "$as_me:1859: result: $ac_ct_CC" >&5
1860 echo "${ECHO_T}$ac_ct_CC" >&6
1861 else
1862   echo "$as_me:1862: result: no" >&5
1863 echo "${ECHO_T}no" >&6
1864 fi
1865
1866   test -n "$ac_ct_CC" && break
1867 done
1868
1869   CC=$ac_ct_CC
1870 fi
1871
1872 test -z "$CC" && { { echo "$as_me:1872: error: no acceptable cc found in \$PATH" >&5
1873 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1874    { (exit 1); exit 1; }; }
1875
1876 # Provide some information about the compiler.
1877 echo "$as_me:1877:" \
1878      "checking for C compiler version" >&5
1879 ac_compiler=`set X $ac_compile; echo "$2"`
1880 { (eval echo "$as_me:1880: \"$ac_compiler --version </dev/null >&5\"") >&5
1881   (eval $ac_compiler --version </dev/null >&5) 2>&5
1882   ac_status=$?
1883   echo "$as_me:1883: \$? = $ac_status" >&5
1884   (exit "$ac_status"); }
1885 { (eval echo "$as_me:1885: \"$ac_compiler -v </dev/null >&5\"") >&5
1886   (eval $ac_compiler -v </dev/null >&5) 2>&5
1887   ac_status=$?
1888   echo "$as_me:1888: \$? = $ac_status" >&5
1889   (exit "$ac_status"); }
1890 { (eval echo "$as_me:1890: \"$ac_compiler -V </dev/null >&5\"") >&5
1891   (eval $ac_compiler -V </dev/null >&5) 2>&5
1892   ac_status=$?
1893   echo "$as_me:1893: \$? = $ac_status" >&5
1894   (exit "$ac_status"); }
1895
1896 cat >"conftest.$ac_ext" <<_ACEOF
1897 #line 1897 "configure"
1898 #include "confdefs.h"
1899
1900 int
1901 main (void)
1902 {
1903
1904   ;
1905   return 0;
1906 }
1907 _ACEOF
1908 ac_clean_files_save=$ac_clean_files
1909 ac_clean_files="$ac_clean_files a.out a.exe"
1910 # Try to create an executable without -o first, disregard a.out.
1911 # It will help us diagnose broken compilers, and finding out an intuition
1912 # of exeext.
1913 echo "$as_me:1913: checking for C compiler default output" >&5
1914 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1915 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1916 if { (eval echo "$as_me:1916: \"$ac_link_default\"") >&5
1917   (eval $ac_link_default) 2>&5
1918   ac_status=$?
1919   echo "$as_me:1919: \$? = $ac_status" >&5
1920   (exit "$ac_status"); }; then
1921   # Find the output, starting from the most likely.  This scheme is
1922 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1923 # resort.
1924 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1925                 ls a.out conftest 2>/dev/null;
1926                 ls a.* conftest.* 2>/dev/null`; do
1927   case $ac_file in
1928     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1929     a.out ) # We found the default executable, but exeext='' is most
1930             # certainly right.
1931             break;;
1932     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1933           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1934           export ac_cv_exeext
1935           break;;
1936     * ) break;;
1937   esac
1938 done
1939 else
1940   echo "$as_me: failed program was:" >&5
1941 cat "conftest.$ac_ext" >&5
1942 { { echo "$as_me:1942: error: C compiler cannot create executables" >&5
1943 echo "$as_me: error: C compiler cannot create executables" >&2;}
1944    { (exit 77); exit 77; }; }
1945 fi
1946
1947 ac_exeext=$ac_cv_exeext
1948 echo "$as_me:1948: result: $ac_file" >&5
1949 echo "${ECHO_T}$ac_file" >&6
1950
1951 # Check the compiler produces executables we can run.  If not, either
1952 # the compiler is broken, or we cross compile.
1953 echo "$as_me:1953: checking whether the C compiler works" >&5
1954 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1955 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1956 # If not cross compiling, check that we can run a simple program.
1957 if test "$cross_compiling" != yes; then
1958   if { ac_try='./$ac_file'
1959   { (eval echo "$as_me:1959: \"$ac_try\"") >&5
1960   (eval $ac_try) 2>&5
1961   ac_status=$?
1962   echo "$as_me:1962: \$? = $ac_status" >&5
1963   (exit "$ac_status"); }; }; then
1964     cross_compiling=no
1965   else
1966     if test "$cross_compiling" = maybe; then
1967         cross_compiling=yes
1968     else
1969         { { echo "$as_me:1969: error: cannot run C compiled programs.
1970 If you meant to cross compile, use \`--host'." >&5
1971 echo "$as_me: error: cannot run C compiled programs.
1972 If you meant to cross compile, use \`--host'." >&2;}
1973    { (exit 1); exit 1; }; }
1974     fi
1975   fi
1976 fi
1977 echo "$as_me:1977: result: yes" >&5
1978 echo "${ECHO_T}yes" >&6
1979
1980 rm -f a.out a.exe "conftest$ac_cv_exeext"
1981 ac_clean_files=$ac_clean_files_save
1982 # Check the compiler produces executables we can run.  If not, either
1983 # the compiler is broken, or we cross compile.
1984 echo "$as_me:1984: checking whether we are cross compiling" >&5
1985 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1986 echo "$as_me:1986: result: $cross_compiling" >&5
1987 echo "${ECHO_T}$cross_compiling" >&6
1988
1989 echo "$as_me:1989: checking for executable suffix" >&5
1990 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1991 if { (eval echo "$as_me:1991: \"$ac_link\"") >&5
1992   (eval $ac_link) 2>&5
1993   ac_status=$?
1994   echo "$as_me:1994: \$? = $ac_status" >&5
1995   (exit "$ac_status"); }; then
1996   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1997 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1998 # work properly (i.e., refer to `conftest.exe'), while it won't with
1999 # `rm'.
2000 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2001   case $ac_file in
2002     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2003     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2004           export ac_cv_exeext
2005           break;;
2006     * ) break;;
2007   esac
2008 done
2009 else
2010   { { echo "$as_me:2010: error: cannot compute EXEEXT: cannot compile and link" >&5
2011 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2012    { (exit 1); exit 1; }; }
2013 fi
2014
2015 rm -f "conftest$ac_cv_exeext"
2016 echo "$as_me:2016: result: $ac_cv_exeext" >&5
2017 echo "${ECHO_T}$ac_cv_exeext" >&6
2018
2019 rm -f "conftest.$ac_ext"
2020 EXEEXT=$ac_cv_exeext
2021 ac_exeext=$EXEEXT
2022 echo "$as_me:2022: checking for object suffix" >&5
2023 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2024 if test "${ac_cv_objext+set}" = set; then
2025   echo $ECHO_N "(cached) $ECHO_C" >&6
2026 else
2027   cat >"conftest.$ac_ext" <<_ACEOF
2028 #line 2028 "configure"
2029 #include "confdefs.h"
2030
2031 int
2032 main (void)
2033 {
2034
2035   ;
2036   return 0;
2037 }
2038 _ACEOF
2039 rm -f conftest.o conftest.obj
2040 if { (eval echo "$as_me:2040: \"$ac_compile\"") >&5
2041   (eval $ac_compile) 2>&5
2042   ac_status=$?
2043   echo "$as_me:2043: \$? = $ac_status" >&5
2044   (exit "$ac_status"); }; then
2045   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2046   case $ac_file in
2047     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2048     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2049        break;;
2050   esac
2051 done
2052 else
2053   echo "$as_me: failed program was:" >&5
2054 cat "conftest.$ac_ext" >&5
2055 { { echo "$as_me:2055: error: cannot compute OBJEXT: cannot compile" >&5
2056 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2057    { (exit 1); exit 1; }; }
2058 fi
2059
2060 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2061 fi
2062 echo "$as_me:2062: result: $ac_cv_objext" >&5
2063 echo "${ECHO_T}$ac_cv_objext" >&6
2064 OBJEXT=$ac_cv_objext
2065 ac_objext=$OBJEXT
2066 echo "$as_me:2066: checking whether we are using the GNU C compiler" >&5
2067 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2068 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2069   echo $ECHO_N "(cached) $ECHO_C" >&6
2070 else
2071   cat >"conftest.$ac_ext" <<_ACEOF
2072 #line 2072 "configure"
2073 #include "confdefs.h"
2074
2075 int
2076 main (void)
2077 {
2078 #ifndef __GNUC__
2079        choke me
2080 #endif
2081
2082   ;
2083   return 0;
2084 }
2085 _ACEOF
2086 rm -f "conftest.$ac_objext"
2087 if { (eval echo "$as_me:2087: \"$ac_compile\"") >&5
2088   (eval $ac_compile) 2>&5
2089   ac_status=$?
2090   echo "$as_me:2090: \$? = $ac_status" >&5
2091   (exit "$ac_status"); } &&
2092          { ac_try='test -s "conftest.$ac_objext"'
2093   { (eval echo "$as_me:2093: \"$ac_try\"") >&5
2094   (eval $ac_try) 2>&5
2095   ac_status=$?
2096   echo "$as_me:2096: \$? = $ac_status" >&5
2097   (exit "$ac_status"); }; }; then
2098   ac_compiler_gnu=yes
2099 else
2100   echo "$as_me: failed program was:" >&5
2101 cat "conftest.$ac_ext" >&5
2102 ac_compiler_gnu=no
2103 fi
2104 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2105 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2106
2107 fi
2108 echo "$as_me:2108: result: $ac_cv_c_compiler_gnu" >&5
2109 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2110 GCC=`test $ac_compiler_gnu = yes && echo yes`
2111 ac_test_CFLAGS=${CFLAGS+set}
2112 ac_save_CFLAGS=$CFLAGS
2113 CFLAGS="-g"
2114 echo "$as_me:2114: checking whether $CC accepts -g" >&5
2115 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2116 if test "${ac_cv_prog_cc_g+set}" = set; then
2117   echo $ECHO_N "(cached) $ECHO_C" >&6
2118 else
2119   cat >"conftest.$ac_ext" <<_ACEOF
2120 #line 2120 "configure"
2121 #include "confdefs.h"
2122
2123 int
2124 main (void)
2125 {
2126
2127   ;
2128   return 0;
2129 }
2130 _ACEOF
2131 rm -f "conftest.$ac_objext"
2132 if { (eval echo "$as_me:2132: \"$ac_compile\"") >&5
2133   (eval $ac_compile) 2>&5
2134   ac_status=$?
2135   echo "$as_me:2135: \$? = $ac_status" >&5
2136   (exit "$ac_status"); } &&
2137          { ac_try='test -s "conftest.$ac_objext"'
2138   { (eval echo "$as_me:2138: \"$ac_try\"") >&5
2139   (eval $ac_try) 2>&5
2140   ac_status=$?
2141   echo "$as_me:2141: \$? = $ac_status" >&5
2142   (exit "$ac_status"); }; }; then
2143   ac_cv_prog_cc_g=yes
2144 else
2145   echo "$as_me: failed program was:" >&5
2146 cat "conftest.$ac_ext" >&5
2147 ac_cv_prog_cc_g=no
2148 fi
2149 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2150 fi
2151 echo "$as_me:2151: result: $ac_cv_prog_cc_g" >&5
2152 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2153 if test "$ac_test_CFLAGS" = set; then
2154   CFLAGS=$ac_save_CFLAGS
2155 elif test $ac_cv_prog_cc_g = yes; then
2156   if test "$GCC" = yes; then
2157     CFLAGS="-g -O2"
2158   else
2159     CFLAGS="-g"
2160   fi
2161 else
2162   if test "$GCC" = yes; then
2163     CFLAGS="-O2"
2164   else
2165     CFLAGS=
2166   fi
2167 fi
2168 # Some people use a C++ compiler to compile C.  Since we use `exit',
2169 # in C++ we need to declare it.  In case someone uses the same compiler
2170 # for both compiling C and C++ we need to have the C++ compiler decide
2171 # the declaration of exit, since it's the most demanding environment.
2172 cat >"conftest.$ac_ext" <<_ACEOF
2173 #ifndef __cplusplus
2174   choke me
2175 #endif
2176 _ACEOF
2177 rm -f "conftest.$ac_objext"
2178 if { (eval echo "$as_me:2178: \"$ac_compile\"") >&5
2179   (eval $ac_compile) 2>&5
2180   ac_status=$?
2181   echo "$as_me:2181: \$? = $ac_status" >&5
2182   (exit "$ac_status"); } &&
2183          { ac_try='test -s "conftest.$ac_objext"'
2184   { (eval echo "$as_me:2184: \"$ac_try\"") >&5
2185   (eval $ac_try) 2>&5
2186   ac_status=$?
2187   echo "$as_me:2187: \$? = $ac_status" >&5
2188   (exit "$ac_status"); }; }; then
2189   for ac_declaration in \
2190    ''\
2191    '#include <stdlib.h>' \
2192    'extern "C" void std::exit (int) throw (); using std::exit;' \
2193    'extern "C" void std::exit (int); using std::exit;' \
2194    'extern "C" void exit (int) throw ();' \
2195    'extern "C" void exit (int);' \
2196    'void exit (int);'
2197 do
2198   cat >"conftest.$ac_ext" <<_ACEOF
2199 #line 2199 "configure"
2200 #include "confdefs.h"
2201 #include <stdlib.h>
2202 $ac_declaration
2203 int
2204 main (void)
2205 {
2206 exit (42);
2207   ;
2208   return 0;
2209 }
2210 _ACEOF
2211 rm -f "conftest.$ac_objext"
2212 if { (eval echo "$as_me:2212: \"$ac_compile\"") >&5
2213   (eval $ac_compile) 2>&5
2214   ac_status=$?
2215   echo "$as_me:2215: \$? = $ac_status" >&5
2216   (exit "$ac_status"); } &&
2217          { ac_try='test -s "conftest.$ac_objext"'
2218   { (eval echo "$as_me:2218: \"$ac_try\"") >&5
2219   (eval $ac_try) 2>&5
2220   ac_status=$?
2221   echo "$as_me:2221: \$? = $ac_status" >&5
2222   (exit "$ac_status"); }; }; then
2223   :
2224 else
2225   echo "$as_me: failed program was:" >&5
2226 cat "conftest.$ac_ext" >&5
2227 continue
2228 fi
2229 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2230   cat >"conftest.$ac_ext" <<_ACEOF
2231 #line 2231 "configure"
2232 #include "confdefs.h"
2233 $ac_declaration
2234 int
2235 main (void)
2236 {
2237 exit (42);
2238   ;
2239   return 0;
2240 }
2241 _ACEOF
2242 rm -f "conftest.$ac_objext"
2243 if { (eval echo "$as_me:2243: \"$ac_compile\"") >&5
2244   (eval $ac_compile) 2>&5
2245   ac_status=$?
2246   echo "$as_me:2246: \$? = $ac_status" >&5
2247   (exit "$ac_status"); } &&
2248          { ac_try='test -s "conftest.$ac_objext"'
2249   { (eval echo "$as_me:2249: \"$ac_try\"") >&5
2250   (eval $ac_try) 2>&5
2251   ac_status=$?
2252   echo "$as_me:2252: \$? = $ac_status" >&5
2253   (exit "$ac_status"); }; }; then
2254   break
2255 else
2256   echo "$as_me: failed program was:" >&5
2257 cat "conftest.$ac_ext" >&5
2258 fi
2259 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2260 done
2261 rm -rf conftest*
2262 if test -n "$ac_declaration"; then
2263   echo '#ifdef __cplusplus' >>confdefs.h
2264   echo "$ac_declaration"    >>confdefs.h
2265   echo '#endif'             >>confdefs.h
2266 fi
2267
2268 else
2269   echo "$as_me: failed program was:" >&5
2270 cat "conftest.$ac_ext" >&5
2271 fi
2272 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2273 ac_ext=c
2274 ac_cpp='$CPP $CPPFLAGS'
2275 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2276 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2277 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2278 ac_main_return="return"
2279
2280 GCC_VERSION=none
2281 if test "$GCC" = yes ; then
2282         echo "$as_me:2282: checking version of $CC" >&5
2283 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2284         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.].*//'`"
2285         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2286         echo "$as_me:2286: result: $GCC_VERSION" >&5
2287 echo "${ECHO_T}$GCC_VERSION" >&6
2288 fi
2289
2290 INTEL_COMPILER=no
2291
2292 if test "$GCC" = yes ; then
2293         case "$host_os" in
2294         (linux*|gnu*)
2295                 echo "$as_me:2295: checking if this is really Intel C compiler" >&5
2296 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2297                 cf_save_CFLAGS="$CFLAGS"
2298                 CFLAGS="$CFLAGS -no-gcc"
2299                 cat >"conftest.$ac_ext" <<_ACEOF
2300 #line 2300 "configure"
2301 #include "confdefs.h"
2302
2303 int
2304 main (void)
2305 {
2306
2307 #ifdef __INTEL_COMPILER
2308 #else
2309 make an error
2310 #endif
2311
2312   ;
2313   return 0;
2314 }
2315 _ACEOF
2316 rm -f "conftest.$ac_objext"
2317 if { (eval echo "$as_me:2317: \"$ac_compile\"") >&5
2318   (eval $ac_compile) 2>&5
2319   ac_status=$?
2320   echo "$as_me:2320: \$? = $ac_status" >&5
2321   (exit "$ac_status"); } &&
2322          { ac_try='test -s "conftest.$ac_objext"'
2323   { (eval echo "$as_me:2323: \"$ac_try\"") >&5
2324   (eval $ac_try) 2>&5
2325   ac_status=$?
2326   echo "$as_me:2326: \$? = $ac_status" >&5
2327   (exit "$ac_status"); }; }; then
2328   INTEL_COMPILER=yes
2329 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2330
2331 else
2332   echo "$as_me: failed program was:" >&5
2333 cat "conftest.$ac_ext" >&5
2334 fi
2335 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2336                 CFLAGS="$cf_save_CFLAGS"
2337                 echo "$as_me:2337: result: $INTEL_COMPILER" >&5
2338 echo "${ECHO_T}$INTEL_COMPILER" >&6
2339                 ;;
2340         esac
2341 fi
2342
2343 CLANG_COMPILER=no
2344
2345 if test "$GCC" = yes ; then
2346         echo "$as_me:2346: checking if this is really Clang C compiler" >&5
2347 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2348         cf_save_CFLAGS="$CFLAGS"
2349         cat >"conftest.$ac_ext" <<_ACEOF
2350 #line 2350 "configure"
2351 #include "confdefs.h"
2352
2353 int
2354 main (void)
2355 {
2356
2357 #ifdef __clang__
2358 #else
2359 make an error
2360 #endif
2361
2362   ;
2363   return 0;
2364 }
2365 _ACEOF
2366 rm -f "conftest.$ac_objext"
2367 if { (eval echo "$as_me:2367: \"$ac_compile\"") >&5
2368   (eval $ac_compile) 2>&5
2369   ac_status=$?
2370   echo "$as_me:2370: \$? = $ac_status" >&5
2371   (exit "$ac_status"); } &&
2372          { ac_try='test -s "conftest.$ac_objext"'
2373   { (eval echo "$as_me:2373: \"$ac_try\"") >&5
2374   (eval $ac_try) 2>&5
2375   ac_status=$?
2376   echo "$as_me:2376: \$? = $ac_status" >&5
2377   (exit "$ac_status"); }; }; then
2378   CLANG_COMPILER=yes
2379
2380 else
2381   echo "$as_me: failed program was:" >&5
2382 cat "conftest.$ac_ext" >&5
2383 fi
2384 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2385         CFLAGS="$cf_save_CFLAGS"
2386         echo "$as_me:2386: result: $CLANG_COMPILER" >&5
2387 echo "${ECHO_T}$CLANG_COMPILER" >&6
2388 fi
2389
2390 CLANG_VERSION=none
2391
2392 if test "x$CLANG_COMPILER" = "xyes" ; then
2393         case "$CC" in
2394         (c[1-9][0-9]|*/c[1-9][0-9])
2395                 { echo "$as_me:2395: WARNING: replacing broken compiler alias $CC" >&5
2396 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2397                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2398                 CC=clang
2399                 ;;
2400         esac
2401
2402         echo "$as_me:2402: checking version of $CC" >&5
2403 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2404         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.].*//'`"
2405         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2406         echo "$as_me:2406: result: $CLANG_VERSION" >&5
2407 echo "${ECHO_T}$CLANG_VERSION" >&6
2408
2409         for cf_clang_opt in \
2410                 -Qunused-arguments \
2411                 -Wno-error=implicit-function-declaration
2412         do
2413                 echo "$as_me:2413: checking if option $cf_clang_opt works" >&5
2414 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2415                 cf_save_CFLAGS="$CFLAGS"
2416                 CFLAGS="$CFLAGS $cf_clang_opt"
2417                 cat >"conftest.$ac_ext" <<_ACEOF
2418 #line 2418 "configure"
2419 #include "confdefs.h"
2420
2421                         #include <stdio.h>
2422 int
2423 main (void)
2424 {
2425
2426                         printf("hello!\\n");
2427   ;
2428   return 0;
2429 }
2430 _ACEOF
2431 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2432 if { (eval echo "$as_me:2432: \"$ac_link\"") >&5
2433   (eval $ac_link) 2>&5
2434   ac_status=$?
2435   echo "$as_me:2435: \$? = $ac_status" >&5
2436   (exit "$ac_status"); } &&
2437          { ac_try='test -s "conftest$ac_exeext"'
2438   { (eval echo "$as_me:2438: \"$ac_try\"") >&5
2439   (eval $ac_try) 2>&5
2440   ac_status=$?
2441   echo "$as_me:2441: \$? = $ac_status" >&5
2442   (exit "$ac_status"); }; }; then
2443
2444                         cf_clang_optok=yes
2445 else
2446   echo "$as_me: failed program was:" >&5
2447 cat "conftest.$ac_ext" >&5
2448
2449                         cf_clang_optok=no
2450 fi
2451 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2452                 echo "$as_me:2452: result: $cf_clang_optok" >&5
2453 echo "${ECHO_T}$cf_clang_optok" >&6
2454                 CFLAGS="$cf_save_CFLAGS"
2455                 if test "$cf_clang_optok" = yes; then
2456                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2457
2458 echo "${as_me:-configure}:2458: testing adding option $cf_clang_opt ..." 1>&5
2459
2460         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2461         CFLAGS="${CFLAGS}$cf_clang_opt"
2462
2463                 fi
2464         done
2465 fi
2466
2467 echo "$as_me:2467: checking for $CC option to accept ANSI C" >&5
2468 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2469 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2470   echo $ECHO_N "(cached) $ECHO_C" >&6
2471 else
2472   ac_cv_prog_cc_stdc=no
2473 ac_save_CC=$CC
2474 cat >"conftest.$ac_ext" <<_ACEOF
2475 #line 2475 "configure"
2476 #include "confdefs.h"
2477 #include <stdarg.h>
2478 #include <stdio.h>
2479 #include <sys/types.h>
2480 #include <sys/stat.h>
2481 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2482 struct buf { int x; };
2483 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2484 static char *e (p, i)
2485      char **p;
2486      int i;
2487 {
2488   return p[i];
2489 }
2490 static char *f (char * (*g) (char **, int), char **p, ...)
2491 {
2492   char *s;
2493   va_list v;
2494   va_start (v,p);
2495   s = g (p, va_arg (v,int));
2496   va_end (v);
2497   return s;
2498 }
2499 int test (int i, double x);
2500 struct s1 {int (*f) (int a);};
2501 struct s2 {int (*f) (double a);};
2502 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2503 int argc;
2504 char **argv;
2505 int
2506 main (void)
2507 {
2508 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2509   ;
2510   return 0;
2511 }
2512 _ACEOF
2513 # Don't try gcc -ansi; that turns off useful extensions and
2514 # breaks some systems' header files.
2515 # AIX                   -qlanglvl=ansi
2516 # Ultrix and OSF/1      -std1
2517 # HP-UX 10.20 and later -Ae
2518 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2519 # SVR4                  -Xc -D__EXTENSIONS__
2520 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2521 do
2522   CC="$ac_save_CC $ac_arg"
2523   rm -f "conftest.$ac_objext"
2524 if { (eval echo "$as_me:2524: \"$ac_compile\"") >&5
2525   (eval $ac_compile) 2>&5
2526   ac_status=$?
2527   echo "$as_me:2527: \$? = $ac_status" >&5
2528   (exit "$ac_status"); } &&
2529          { ac_try='test -s "conftest.$ac_objext"'
2530   { (eval echo "$as_me:2530: \"$ac_try\"") >&5
2531   (eval $ac_try) 2>&5
2532   ac_status=$?
2533   echo "$as_me:2533: \$? = $ac_status" >&5
2534   (exit "$ac_status"); }; }; then
2535   ac_cv_prog_cc_stdc=$ac_arg
2536 break
2537 else
2538   echo "$as_me: failed program was:" >&5
2539 cat "conftest.$ac_ext" >&5
2540 fi
2541 rm -f "conftest.$ac_objext"
2542 done
2543 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2544 CC=$ac_save_CC
2545
2546 fi
2547
2548 case "x$ac_cv_prog_cc_stdc" in
2549   x|xno)
2550     echo "$as_me:2550: result: none needed" >&5
2551 echo "${ECHO_T}none needed" >&6 ;;
2552   *)
2553     echo "$as_me:2553: result: $ac_cv_prog_cc_stdc" >&5
2554 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2555     CC="$CC $ac_cv_prog_cc_stdc" ;;
2556 esac
2557
2558 # This should have been defined by AC_PROG_CC
2559 : "${CC:=cc}"
2560
2561 echo "$as_me:2561: checking \$CFLAGS variable" >&5
2562 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2563 case "x$CFLAGS" in
2564 (*-[IUD]*)
2565         echo "$as_me:2565: result: broken" >&5
2566 echo "${ECHO_T}broken" >&6
2567         { echo "$as_me:2567: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2568 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2569         cf_flags="$CFLAGS"
2570         CFLAGS=
2571         for cf_arg in $cf_flags
2572         do
2573
2574 cf_fix_cppflags=no
2575 cf_new_cflags=
2576 cf_new_cppflags=
2577 cf_new_extra_cppflags=
2578
2579 for cf_add_cflags in $cf_arg
2580 do
2581 case "$cf_fix_cppflags" in
2582 (no)
2583         case "$cf_add_cflags" in
2584         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2585                 case "$cf_add_cflags" in
2586                 (-D*)
2587                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2588
2589                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2590                                 && test -z "${cf_tst_cflags}" \
2591                                 && cf_fix_cppflags=yes
2592
2593                         if test "$cf_fix_cppflags" = yes ; then
2594
2595         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2596         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2597
2598                                 continue
2599                         elif test "${cf_tst_cflags}" = "\"'" ; then
2600
2601         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2602         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2603
2604                                 continue
2605                         fi
2606                         ;;
2607                 esac
2608                 case "$CPPFLAGS" in
2609                 (*$cf_add_cflags)
2610                         ;;
2611                 (*)
2612                         case "$cf_add_cflags" in
2613                         (-D*)
2614                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2615
2616 CPPFLAGS=`echo "$CPPFLAGS" | \
2617         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2618                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2619
2620                                 ;;
2621                         esac
2622
2623         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2624         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2625
2626                         ;;
2627                 esac
2628                 ;;
2629         (*)
2630
2631         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2632         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2633
2634                 ;;
2635         esac
2636         ;;
2637 (yes)
2638
2639         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2640         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2641
2642         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2643
2644         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2645                 && test -z "${cf_tst_cflags}" \
2646                 && cf_fix_cppflags=no
2647         ;;
2648 esac
2649 done
2650
2651 if test -n "$cf_new_cflags" ; then
2652
2653         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2654         CFLAGS="${CFLAGS}$cf_new_cflags"
2655
2656 fi
2657
2658 if test -n "$cf_new_cppflags" ; then
2659
2660         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2661         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2662
2663 fi
2664
2665 if test -n "$cf_new_extra_cppflags" ; then
2666
2667         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2668         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2669
2670 fi
2671
2672         done
2673         ;;
2674 (*)
2675         echo "$as_me:2675: result: ok" >&5
2676 echo "${ECHO_T}ok" >&6
2677         ;;
2678 esac
2679
2680 echo "$as_me:2680: checking \$CC variable" >&5
2681 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2682 case "$CC" in
2683 (*[\ \  ]-*)
2684         echo "$as_me:2684: result: broken" >&5
2685 echo "${ECHO_T}broken" >&6
2686         { echo "$as_me:2686: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2687 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2688         # humor him...
2689         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2690         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2691         CC="$cf_prog"
2692         for cf_arg in $cf_flags
2693         do
2694                 case "x$cf_arg" in
2695                 (x-[IUDfgOW]*)
2696
2697 cf_fix_cppflags=no
2698 cf_new_cflags=
2699 cf_new_cppflags=
2700 cf_new_extra_cppflags=
2701
2702 for cf_add_cflags in $cf_arg
2703 do
2704 case "$cf_fix_cppflags" in
2705 (no)
2706         case "$cf_add_cflags" in
2707         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2708                 case "$cf_add_cflags" in
2709                 (-D*)
2710                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2711
2712                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2713                                 && test -z "${cf_tst_cflags}" \
2714                                 && cf_fix_cppflags=yes
2715
2716                         if test "$cf_fix_cppflags" = yes ; then
2717
2718         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2719         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2720
2721                                 continue
2722                         elif test "${cf_tst_cflags}" = "\"'" ; then
2723
2724         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2725         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2726
2727                                 continue
2728                         fi
2729                         ;;
2730                 esac
2731                 case "$CPPFLAGS" in
2732                 (*$cf_add_cflags)
2733                         ;;
2734                 (*)
2735                         case "$cf_add_cflags" in
2736                         (-D*)
2737                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2738
2739 CPPFLAGS=`echo "$CPPFLAGS" | \
2740         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2741                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2742
2743                                 ;;
2744                         esac
2745
2746         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2747         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2748
2749                         ;;
2750                 esac
2751                 ;;
2752         (*)
2753
2754         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2755         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2756
2757                 ;;
2758         esac
2759         ;;
2760 (yes)
2761
2762         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2763         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2764
2765         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2766
2767         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2768                 && test -z "${cf_tst_cflags}" \
2769                 && cf_fix_cppflags=no
2770         ;;
2771 esac
2772 done
2773
2774 if test -n "$cf_new_cflags" ; then
2775
2776         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2777         CFLAGS="${CFLAGS}$cf_new_cflags"
2778
2779 fi
2780
2781 if test -n "$cf_new_cppflags" ; then
2782
2783         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2784         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2785
2786 fi
2787
2788 if test -n "$cf_new_extra_cppflags" ; then
2789
2790         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2791         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2792
2793 fi
2794
2795                         ;;
2796                 (*)
2797                         CC="$CC $cf_arg"
2798                         ;;
2799                 esac
2800         done
2801         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2802
2803 echo "${as_me:-configure}:2803: testing resulting CC: '$CC' ..." 1>&5
2804
2805         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2806
2807 echo "${as_me:-configure}:2807: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2808
2809         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2810
2811 echo "${as_me:-configure}:2811: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2812
2813         ;;
2814 (*)
2815         echo "$as_me:2815: result: ok" >&5
2816 echo "${ECHO_T}ok" >&6
2817         ;;
2818 esac
2819
2820 ac_ext=c
2821 ac_cpp='$CPP $CPPFLAGS'
2822 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2823 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2824 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2825 ac_main_return="return"
2826 echo "$as_me:2826: checking how to run the C preprocessor" >&5
2827 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2828 # On Suns, sometimes $CPP names a directory.
2829 if test -n "$CPP" && test -d "$CPP"; then
2830   CPP=
2831 fi
2832 if test -z "$CPP"; then
2833   if test "${ac_cv_prog_CPP+set}" = set; then
2834   echo $ECHO_N "(cached) $ECHO_C" >&6
2835 else
2836       # Double quotes because CPP needs to be expanded
2837     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2838     do
2839       ac_preproc_ok=false
2840 for ac_c_preproc_warn_flag in '' yes
2841 do
2842   # Use a header file that comes with gcc, so configuring glibc
2843   # with a fresh cross-compiler works.
2844   # On the NeXT, cc -E runs the code through the compiler's parser,
2845   # not just through cpp. "Syntax error" is here to catch this case.
2846   cat >"conftest.$ac_ext" <<_ACEOF
2847 #line 2847 "configure"
2848 #include "confdefs.h"
2849 #include <assert.h>
2850                      Syntax error
2851 _ACEOF
2852 if { (eval echo "$as_me:2852: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2853   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2854   ac_status=$?
2855   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2856   rm -f conftest.er1
2857   cat conftest.err >&5
2858   echo "$as_me:2858: \$? = $ac_status" >&5
2859   (exit "$ac_status"); } >/dev/null; then
2860   if test -s conftest.err; then
2861     ac_cpp_err=$ac_c_preproc_warn_flag
2862   else
2863     ac_cpp_err=
2864   fi
2865 else
2866   ac_cpp_err=yes
2867 fi
2868 if test -z "$ac_cpp_err"; then
2869   :
2870 else
2871   echo "$as_me: failed program was:" >&5
2872   cat "conftest.$ac_ext" >&5
2873   # Broken: fails on valid input.
2874 continue
2875 fi
2876 rm -f conftest.err "conftest.$ac_ext"
2877
2878   # OK, works on sane cases.  Now check whether non-existent headers
2879   # can be detected and how.
2880   cat >"conftest.$ac_ext" <<_ACEOF
2881 #line 2881 "configure"
2882 #include "confdefs.h"
2883 #include <ac_nonexistent.h>
2884 _ACEOF
2885 if { (eval echo "$as_me:2885: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2886   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2887   ac_status=$?
2888   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2889   rm -f conftest.er1
2890   cat conftest.err >&5
2891   echo "$as_me:2891: \$? = $ac_status" >&5
2892   (exit "$ac_status"); } >/dev/null; then
2893   if test -s conftest.err; then
2894     ac_cpp_err=$ac_c_preproc_warn_flag
2895   else
2896     ac_cpp_err=
2897   fi
2898 else
2899   ac_cpp_err=yes
2900 fi
2901 if test -z "$ac_cpp_err"; then
2902   # Broken: success on invalid input.
2903 continue
2904 else
2905   echo "$as_me: failed program was:" >&5
2906   cat "conftest.$ac_ext" >&5
2907   # Passes both tests.
2908 ac_preproc_ok=:
2909 break
2910 fi
2911 rm -f conftest.err "conftest.$ac_ext"
2912
2913 done
2914 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2915 rm -f conftest.err "conftest.$ac_ext"
2916 if $ac_preproc_ok; then
2917   break
2918 fi
2919
2920     done
2921     ac_cv_prog_CPP=$CPP
2922
2923 fi
2924   CPP=$ac_cv_prog_CPP
2925 else
2926   ac_cv_prog_CPP=$CPP
2927 fi
2928 echo "$as_me:2928: result: $CPP" >&5
2929 echo "${ECHO_T}$CPP" >&6
2930 ac_preproc_ok=false
2931 for ac_c_preproc_warn_flag in '' yes
2932 do
2933   # Use a header file that comes with gcc, so configuring glibc
2934   # with a fresh cross-compiler works.
2935   # On the NeXT, cc -E runs the code through the compiler's parser,
2936   # not just through cpp. "Syntax error" is here to catch this case.
2937   cat >"conftest.$ac_ext" <<_ACEOF
2938 #line 2938 "configure"
2939 #include "confdefs.h"
2940 #include <assert.h>
2941                      Syntax error
2942 _ACEOF
2943 if { (eval echo "$as_me:2943: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2944   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2945   ac_status=$?
2946   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2947   rm -f conftest.er1
2948   cat conftest.err >&5
2949   echo "$as_me:2949: \$? = $ac_status" >&5
2950   (exit "$ac_status"); } >/dev/null; then
2951   if test -s conftest.err; then
2952     ac_cpp_err=$ac_c_preproc_warn_flag
2953   else
2954     ac_cpp_err=
2955   fi
2956 else
2957   ac_cpp_err=yes
2958 fi
2959 if test -z "$ac_cpp_err"; then
2960   :
2961 else
2962   echo "$as_me: failed program was:" >&5
2963   cat "conftest.$ac_ext" >&5
2964   # Broken: fails on valid input.
2965 continue
2966 fi
2967 rm -f conftest.err "conftest.$ac_ext"
2968
2969   # OK, works on sane cases.  Now check whether non-existent headers
2970   # can be detected and how.
2971   cat >"conftest.$ac_ext" <<_ACEOF
2972 #line 2972 "configure"
2973 #include "confdefs.h"
2974 #include <ac_nonexistent.h>
2975 _ACEOF
2976 if { (eval echo "$as_me:2976: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2977   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2978   ac_status=$?
2979   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2980   rm -f conftest.er1
2981   cat conftest.err >&5
2982   echo "$as_me:2982: \$? = $ac_status" >&5
2983   (exit "$ac_status"); } >/dev/null; then
2984   if test -s conftest.err; then
2985     ac_cpp_err=$ac_c_preproc_warn_flag
2986   else
2987     ac_cpp_err=
2988   fi
2989 else
2990   ac_cpp_err=yes
2991 fi
2992 if test -z "$ac_cpp_err"; then
2993   # Broken: success on invalid input.
2994 continue
2995 else
2996   echo "$as_me: failed program was:" >&5
2997   cat "conftest.$ac_ext" >&5
2998   # Passes both tests.
2999 ac_preproc_ok=:
3000 break
3001 fi
3002 rm -f conftest.err "conftest.$ac_ext"
3003
3004 done
3005 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3006 rm -f conftest.err "conftest.$ac_ext"
3007 if $ac_preproc_ok; then
3008   :
3009 else
3010   { { echo "$as_me:3010: error: C preprocessor \"$CPP\" fails sanity check" >&5
3011 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3012    { (exit 1); exit 1; }; }
3013 fi
3014
3015 ac_ext=c
3016 ac_cpp='$CPP $CPPFLAGS'
3017 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3018 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3019 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3020 ac_main_return="return"
3021
3022 if test $ac_cv_c_compiler_gnu = yes; then
3023     echo "$as_me:3023: checking whether $CC needs -traditional" >&5
3024 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3025 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3026   echo $ECHO_N "(cached) $ECHO_C" >&6
3027 else
3028     ac_pattern="Autoconf.*'x'"
3029   cat >"conftest.$ac_ext" <<_ACEOF
3030 #line 3030 "configure"
3031 #include "confdefs.h"
3032 #include <sgtty.h>
3033 int Autoconf = TIOCGETP;
3034 _ACEOF
3035 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3036   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3037   ac_cv_prog_gcc_traditional=yes
3038 else
3039   ac_cv_prog_gcc_traditional=no
3040 fi
3041 rm -rf conftest*
3042
3043   if test $ac_cv_prog_gcc_traditional = no; then
3044     cat >"conftest.$ac_ext" <<_ACEOF
3045 #line 3045 "configure"
3046 #include "confdefs.h"
3047 #include <termio.h>
3048 int Autoconf = TCGETA;
3049 _ACEOF
3050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3051   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3052   ac_cv_prog_gcc_traditional=yes
3053 fi
3054 rm -rf conftest*
3055
3056   fi
3057 fi
3058 echo "$as_me:3058: result: $ac_cv_prog_gcc_traditional" >&5
3059 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3060   if test $ac_cv_prog_gcc_traditional = yes; then
3061     CC="$CC -traditional"
3062   fi
3063 fi
3064
3065 echo "$as_me:3065: checking whether $CC understands -c and -o together" >&5
3066 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3067 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3068   echo $ECHO_N "(cached) $ECHO_C" >&6
3069 else
3070
3071 cat > conftest.$ac_ext <<CF_EOF
3072 int main(void)
3073 {
3074         ${cf_cv_main_return:-return}(0);
3075 }
3076 CF_EOF
3077 # We do the test twice because some compilers refuse to overwrite an
3078 # existing .o file with -o, though they will create one.
3079 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3080 if { (eval echo "$as_me:3080: \"$ac_try\"") >&5
3081   (eval $ac_try) 2>&5
3082   ac_status=$?
3083   echo "$as_me:3083: \$? = $ac_status" >&5
3084   (exit "$ac_status"); } &&
3085   test -f conftest2.$ac_objext && { (eval echo "$as_me:3085: \"$ac_try\"") >&5
3086   (eval $ac_try) 2>&5
3087   ac_status=$?
3088   echo "$as_me:3088: \$? = $ac_status" >&5
3089   (exit "$ac_status"); };
3090 then
3091   eval cf_cv_prog_CC_c_o=yes
3092 else
3093   eval cf_cv_prog_CC_c_o=no
3094 fi
3095 rm -rf ./conftest*
3096
3097 fi
3098 if test "$cf_cv_prog_CC_c_o" = yes; then
3099   echo "$as_me:3099: result: yes" >&5
3100 echo "${ECHO_T}yes" >&6
3101 else
3102   echo "$as_me:3102: result: no" >&5
3103 echo "${ECHO_T}no" >&6
3104 fi
3105
3106 if test "$cross_compiling" = yes ; then
3107         LDCONFIG=:
3108 else
3109         case "$cf_cv_system_name" in
3110         (dragonfly*|mirbsd*|freebsd*)
3111                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3112                 ;;
3113         (*) LDPATH=$PATH:/sbin:/usr/sbin
3114                 # Extract the first word of "ldconfig", so it can be a program name with args.
3115 set dummy ldconfig; ac_word=$2
3116 echo "$as_me:3116: checking for $ac_word" >&5
3117 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3118 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3119   echo $ECHO_N "(cached) $ECHO_C" >&6
3120 else
3121   case $LDCONFIG in
3122   [\\/]* | ?:[\\/]*)
3123   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3124   ;;
3125   *)
3126   ac_save_IFS=$IFS; IFS=$ac_path_separator
3127 ac_dummy="$LDPATH"
3128 for ac_dir in $ac_dummy; do
3129   IFS=$ac_save_IFS
3130   test -z "$ac_dir" && ac_dir=.
3131   if $as_executable_p "$ac_dir/$ac_word"; then
3132    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3133    echo "$as_me:3133: found $ac_dir/$ac_word" >&5
3134    break
3135 fi
3136 done
3137
3138   ;;
3139 esac
3140 fi
3141 LDCONFIG=$ac_cv_path_LDCONFIG
3142
3143 if test -n "$LDCONFIG"; then
3144   echo "$as_me:3144: result: $LDCONFIG" >&5
3145 echo "${ECHO_T}$LDCONFIG" >&6
3146 else
3147   echo "$as_me:3147: result: no" >&5
3148 echo "${ECHO_T}no" >&6
3149 fi
3150
3151                 ;;
3152         esac
3153 fi
3154
3155 echo "$as_me:3155: checking if you want to ensure bool is consistent with C++" >&5
3156 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3157
3158 # Check whether --with-cxx or --without-cxx was given.
3159 if test "${with_cxx+set}" = set; then
3160   withval="$with_cxx"
3161   cf_with_cxx=$withval
3162 else
3163   cf_with_cxx=yes
3164 fi;
3165 echo "$as_me:3165: result: $cf_with_cxx" >&5
3166 echo "${ECHO_T}$cf_with_cxx" >&6
3167 if test "X$cf_with_cxx" = Xno ; then
3168         CXX=""
3169         GXX=""
3170 else
3171         # with autoconf 2.13, we can change the error to a warning:
3172                 ac_ext=cc
3173 ac_cpp='$CXXCPP $CPPFLAGS'
3174 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3175 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3176 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3177 ac_main_return="return"
3178 if test -n "$ac_tool_prefix"; then
3179   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3180   do
3181     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3182 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3183 echo "$as_me:3183: checking for $ac_word" >&5
3184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3185 if test "${ac_cv_prog_CXX+set}" = set; then
3186   echo $ECHO_N "(cached) $ECHO_C" >&6
3187 else
3188   if test -n "$CXX"; then
3189   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3190 else
3191   ac_save_IFS=$IFS; IFS=$ac_path_separator
3192 ac_dummy="$PATH"
3193 for ac_dir in $ac_dummy; do
3194   IFS=$ac_save_IFS
3195   test -z "$ac_dir" && ac_dir=.
3196   $as_executable_p "$ac_dir/$ac_word" || continue
3197 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3198 echo "$as_me:3198: found $ac_dir/$ac_word" >&5
3199 break
3200 done
3201
3202 fi
3203 fi
3204 CXX=$ac_cv_prog_CXX
3205 if test -n "$CXX"; then
3206   echo "$as_me:3206: result: $CXX" >&5
3207 echo "${ECHO_T}$CXX" >&6
3208 else
3209   echo "$as_me:3209: result: no" >&5
3210 echo "${ECHO_T}no" >&6
3211 fi
3212
3213     test -n "$CXX" && break
3214   done
3215 fi
3216 if test -z "$CXX"; then
3217   ac_ct_CXX=$CXX
3218   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3219 do
3220   # Extract the first word of "$ac_prog", so it can be a program name with args.
3221 set dummy $ac_prog; ac_word=$2
3222 echo "$as_me:3222: checking for $ac_word" >&5
3223 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3224 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3225   echo $ECHO_N "(cached) $ECHO_C" >&6
3226 else
3227   if test -n "$ac_ct_CXX"; then
3228   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3229 else
3230   ac_save_IFS=$IFS; IFS=$ac_path_separator
3231 ac_dummy="$PATH"
3232 for ac_dir in $ac_dummy; do
3233   IFS=$ac_save_IFS
3234   test -z "$ac_dir" && ac_dir=.
3235   $as_executable_p "$ac_dir/$ac_word" || continue
3236 ac_cv_prog_ac_ct_CXX="$ac_prog"
3237 echo "$as_me:3237: found $ac_dir/$ac_word" >&5
3238 break
3239 done
3240
3241 fi
3242 fi
3243 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3244 if test -n "$ac_ct_CXX"; then
3245   echo "$as_me:3245: result: $ac_ct_CXX" >&5
3246 echo "${ECHO_T}$ac_ct_CXX" >&6
3247 else
3248   echo "$as_me:3248: result: no" >&5
3249 echo "${ECHO_T}no" >&6
3250 fi
3251
3252   test -n "$ac_ct_CXX" && break
3253 done
3254 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3255
3256   CXX=$ac_ct_CXX
3257 fi
3258
3259 # Provide some information about the compiler.
3260 echo "$as_me:3260:" \
3261      "checking for C++ compiler version" >&5
3262 ac_compiler=`set X $ac_compile; echo $2`
3263 { (eval echo "$as_me:3263: \"$ac_compiler --version </dev/null >&5\"") >&5
3264   (eval $ac_compiler --version </dev/null >&5) 2>&5
3265   ac_status=$?
3266   echo "$as_me:3266: \$? = $ac_status" >&5
3267   (exit "$ac_status"); }
3268 { (eval echo "$as_me:3268: \"$ac_compiler -v </dev/null >&5\"") >&5
3269   (eval $ac_compiler -v </dev/null >&5) 2>&5
3270   ac_status=$?
3271   echo "$as_me:3271: \$? = $ac_status" >&5
3272   (exit "$ac_status"); }
3273 { (eval echo "$as_me:3273: \"$ac_compiler -V </dev/null >&5\"") >&5
3274   (eval $ac_compiler -V </dev/null >&5) 2>&5
3275   ac_status=$?
3276   echo "$as_me:3276: \$? = $ac_status" >&5
3277   (exit "$ac_status"); }
3278
3279 echo "$as_me:3279: checking whether we are using the GNU C++ compiler" >&5
3280 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3281 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3282   echo $ECHO_N "(cached) $ECHO_C" >&6
3283 else
3284   cat >"conftest.$ac_ext" <<_ACEOF
3285 #line 3285 "configure"
3286 #include "confdefs.h"
3287
3288 int
3289 main (void)
3290 {
3291 #ifndef __GNUC__
3292        choke me
3293 #endif
3294
3295   ;
3296   return 0;
3297 }
3298 _ACEOF
3299 rm -f "conftest.$ac_objext"
3300 if { (eval echo "$as_me:3300: \"$ac_compile\"") >&5
3301   (eval $ac_compile) 2>&5
3302   ac_status=$?
3303   echo "$as_me:3303: \$? = $ac_status" >&5
3304   (exit "$ac_status"); } &&
3305          { ac_try='test -s "conftest.$ac_objext"'
3306   { (eval echo "$as_me:3306: \"$ac_try\"") >&5
3307   (eval $ac_try) 2>&5
3308   ac_status=$?
3309   echo "$as_me:3309: \$? = $ac_status" >&5
3310   (exit "$ac_status"); }; }; then
3311   ac_compiler_gnu=yes
3312 else
3313   echo "$as_me: failed program was:" >&5
3314 cat "conftest.$ac_ext" >&5
3315 ac_compiler_gnu=no
3316 fi
3317 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3318 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3319
3320 fi
3321 echo "$as_me:3321: result: $ac_cv_cxx_compiler_gnu" >&5
3322 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3323 GXX=`test $ac_compiler_gnu = yes && echo yes`
3324 ac_test_CXXFLAGS=${CXXFLAGS+set}
3325 ac_save_CXXFLAGS=$CXXFLAGS
3326 CXXFLAGS="-g"
3327 echo "$as_me:3327: checking whether $CXX accepts -g" >&5
3328 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3329 if test "${ac_cv_prog_cxx_g+set}" = set; then
3330   echo $ECHO_N "(cached) $ECHO_C" >&6
3331 else
3332   cat >"conftest.$ac_ext" <<_ACEOF
3333 #line 3333 "configure"
3334 #include "confdefs.h"
3335
3336 int
3337 main (void)
3338 {
3339
3340   ;
3341   return 0;
3342 }
3343 _ACEOF
3344 rm -f "conftest.$ac_objext"
3345 if { (eval echo "$as_me:3345: \"$ac_compile\"") >&5
3346   (eval $ac_compile) 2>&5
3347   ac_status=$?
3348   echo "$as_me:3348: \$? = $ac_status" >&5
3349   (exit "$ac_status"); } &&
3350          { ac_try='test -s "conftest.$ac_objext"'
3351   { (eval echo "$as_me:3351: \"$ac_try\"") >&5
3352   (eval $ac_try) 2>&5
3353   ac_status=$?
3354   echo "$as_me:3354: \$? = $ac_status" >&5
3355   (exit "$ac_status"); }; }; then
3356   ac_cv_prog_cxx_g=yes
3357 else
3358   echo "$as_me: failed program was:" >&5
3359 cat "conftest.$ac_ext" >&5
3360 ac_cv_prog_cxx_g=no
3361 fi
3362 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3363 fi
3364 echo "$as_me:3364: result: $ac_cv_prog_cxx_g" >&5
3365 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3366 if test "$ac_test_CXXFLAGS" = set; then
3367   CXXFLAGS=$ac_save_CXXFLAGS
3368 elif test $ac_cv_prog_cxx_g = yes; then
3369   if test "$GXX" = yes; then
3370     CXXFLAGS="-g -O2"
3371   else
3372     CXXFLAGS="-g"
3373   fi
3374 else
3375   if test "$GXX" = yes; then
3376     CXXFLAGS="-O2"
3377   else
3378     CXXFLAGS=
3379   fi
3380 fi
3381 for ac_declaration in \
3382    ''\
3383    '#include <stdlib.h>' \
3384    'extern "C" void std::exit (int) throw (); using std::exit;' \
3385    'extern "C" void std::exit (int); using std::exit;' \
3386    'extern "C" void exit (int) throw ();' \
3387    'extern "C" void exit (int);' \
3388    'void exit (int);'
3389 do
3390   cat >"conftest.$ac_ext" <<_ACEOF
3391 #line 3391 "configure"
3392 #include "confdefs.h"
3393 #include <stdlib.h>
3394 $ac_declaration
3395 int
3396 main (void)
3397 {
3398 exit (42);
3399   ;
3400   return 0;
3401 }
3402 _ACEOF
3403 rm -f "conftest.$ac_objext"
3404 if { (eval echo "$as_me:3404: \"$ac_compile\"") >&5
3405   (eval $ac_compile) 2>&5
3406   ac_status=$?
3407   echo "$as_me:3407: \$? = $ac_status" >&5
3408   (exit "$ac_status"); } &&
3409          { ac_try='test -s "conftest.$ac_objext"'
3410   { (eval echo "$as_me:3410: \"$ac_try\"") >&5
3411   (eval $ac_try) 2>&5
3412   ac_status=$?
3413   echo "$as_me:3413: \$? = $ac_status" >&5
3414   (exit "$ac_status"); }; }; then
3415   :
3416 else
3417   echo "$as_me: failed program was:" >&5
3418 cat "conftest.$ac_ext" >&5
3419 continue
3420 fi
3421 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3422   cat >"conftest.$ac_ext" <<_ACEOF
3423 #line 3423 "configure"
3424 #include "confdefs.h"
3425 $ac_declaration
3426 int
3427 main (void)
3428 {
3429 exit (42);
3430   ;
3431   return 0;
3432 }
3433 _ACEOF
3434 rm -f "conftest.$ac_objext"
3435 if { (eval echo "$as_me:3435: \"$ac_compile\"") >&5
3436   (eval $ac_compile) 2>&5
3437   ac_status=$?
3438   echo "$as_me:3438: \$? = $ac_status" >&5
3439   (exit "$ac_status"); } &&
3440          { ac_try='test -s "conftest.$ac_objext"'
3441   { (eval echo "$as_me:3441: \"$ac_try\"") >&5
3442   (eval $ac_try) 2>&5
3443   ac_status=$?
3444   echo "$as_me:3444: \$? = $ac_status" >&5
3445   (exit "$ac_status"); }; }; then
3446   break
3447 else
3448   echo "$as_me: failed program was:" >&5
3449 cat "conftest.$ac_ext" >&5
3450 fi
3451 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3452 done
3453 rm -rf conftest*
3454 if test -n "$ac_declaration"; then
3455   echo '#ifdef __cplusplus' >>confdefs.h
3456   echo "$ac_declaration"    >>confdefs.h
3457   echo '#endif'             >>confdefs.h
3458 fi
3459
3460 ac_ext=c
3461 ac_cpp='$CPP $CPPFLAGS'
3462 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3463 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3464 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3465 ac_main_return="return"
3466
3467         ac_ext=cc
3468 ac_cpp='$CXXCPP $CPPFLAGS'
3469 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3470 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3471 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3472 ac_main_return="return"
3473
3474         if test "x$cf_with_cxx" != xno
3475         then
3476                 # Several of the C++ configurations do not work, particularly when
3477                 # cross-compiling (20140913 -TD)
3478                 echo "$as_me:3478: checking if $CXX works" >&5
3479 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3480
3481                 save_CPPFLAGS="$CPPFLAGS"
3482                 eval cf_includedir=${includedir}
3483                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3484
3485 cat >"conftest.$ac_ext" <<_ACEOF
3486 #line 3486 "configure"
3487 #include "confdefs.h"
3488
3489 #include <stdlib.h>
3490 #include <stdio.h>
3491
3492 int
3493 main (void)
3494 {
3495
3496                 printf("Hello world!\n")
3497
3498   ;
3499   return 0;
3500 }
3501 _ACEOF
3502 rm -f "conftest.$ac_objext"
3503 if { (eval echo "$as_me:3503: \"$ac_compile\"") >&5
3504   (eval $ac_compile) 2>&5
3505   ac_status=$?
3506   echo "$as_me:3506: \$? = $ac_status" >&5
3507   (exit "$ac_status"); } &&
3508          { ac_try='test -s "conftest.$ac_objext"'
3509   { (eval echo "$as_me:3509: \"$ac_try\"") >&5
3510   (eval $ac_try) 2>&5
3511   ac_status=$?
3512   echo "$as_me:3512: \$? = $ac_status" >&5
3513   (exit "$ac_status"); }; }; then
3514   cf_cxx_works=yes
3515 else
3516   echo "$as_me: failed program was:" >&5
3517 cat "conftest.$ac_ext" >&5
3518 cf_cxx_works=no
3519 fi
3520 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3521                 CPPFLAGS="$save_CPPFLAGS"
3522
3523                 echo "$as_me:3523: result: $cf_cxx_works" >&5
3524 echo "${ECHO_T}$cf_cxx_works" >&6
3525                 if test "x$cf_cxx_works" = xno
3526                 then
3527                         { echo "$as_me:3527: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3528 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3529                         cf_with_cxx=no; CXX=""; GXX="";
3530                 fi
3531         fi
3532         ac_ext=c
3533 ac_cpp='$CPP $CPPFLAGS'
3534 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3535 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3536 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3537 ac_main_return="return"
3538
3539         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3540         if test "$CXX" = "g++" ; then
3541                 # Extract the first word of "g++", so it can be a program name with args.
3542 set dummy g++; ac_word=$2
3543 echo "$as_me:3543: checking for $ac_word" >&5
3544 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3545 if test "${ac_cv_path_CXX+set}" = set; then
3546   echo $ECHO_N "(cached) $ECHO_C" >&6
3547 else
3548   case $CXX in
3549   [\\/]* | ?:[\\/]*)
3550   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3551   ;;
3552   *)
3553   ac_save_IFS=$IFS; IFS=$ac_path_separator
3554 ac_dummy="$PATH"
3555 for ac_dir in $ac_dummy; do
3556   IFS=$ac_save_IFS
3557   test -z "$ac_dir" && ac_dir=.
3558   if $as_executable_p "$ac_dir/$ac_word"; then
3559    ac_cv_path_CXX="$ac_dir/$ac_word"
3560    echo "$as_me:3560: found $ac_dir/$ac_word" >&5
3561    break
3562 fi
3563 done
3564
3565   ;;
3566 esac
3567 fi
3568 CXX=$ac_cv_path_CXX
3569
3570 if test -n "$CXX"; then
3571   echo "$as_me:3571: result: $CXX" >&5
3572 echo "${ECHO_T}$CXX" >&6
3573 else
3574   echo "$as_me:3574: result: no" >&5
3575 echo "${ECHO_T}no" >&6
3576 fi
3577
3578         fi
3579         case "x$CXX" in
3580         (x|xg++)
3581                 { echo "$as_me:3581: WARNING: You don't have any C++ compiler, too bad" >&5
3582 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3583                 cf_with_cxx=no; CXX=""; GXX="";
3584                 ;;
3585         esac
3586 fi
3587
3588 GXX_VERSION=none
3589 if test "$GXX" = yes; then
3590         echo "$as_me:3590: checking version of ${CXX:-g++}" >&5
3591 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3592         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3593         if test -z "$GXX_VERSION"
3594         then
3595                 GXX_VERSION=unknown
3596                 GXX=no
3597         fi
3598         echo "$as_me:3598: result: $GXX_VERSION" >&5
3599 echo "${ECHO_T}$GXX_VERSION" >&6
3600 fi
3601
3602 case "$GXX_VERSION" in
3603 ([1-9][0-9].*)
3604         ;;
3605 (1.*|2.[0-6]*)
3606         { echo "$as_me:3606: WARNING: templates do not work" >&5
3607 echo "$as_me: WARNING: templates do not work" >&2;}
3608         ;;
3609 esac
3610
3611 echo "$as_me:3611: checking if you want to build C++ binding and demo" >&5
3612 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3613
3614 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3615 if test "${with_cxx_binding+set}" = set; then
3616   withval="$with_cxx_binding"
3617   cf_with_cxx_binding=$withval
3618 else
3619   cf_with_cxx_binding=$cf_with_cxx
3620 fi;
3621 echo "$as_me:3621: result: $cf_with_cxx_binding" >&5
3622 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3623
3624 echo "$as_me:3624: checking if you want to build with Ada" >&5
3625 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3626 echo "$as_me:3626: result: $cf_with_ada" >&5
3627 echo "${ECHO_T}$cf_with_ada" >&6
3628
3629 echo "$as_me:3629: checking if you want to install terminal database" >&5
3630 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3631
3632 # Check whether --enable-db-install or --disable-db-install was given.
3633 if test "${enable_db_install+set}" = set; then
3634   enableval="$enable_db_install"
3635   cf_with_db_install=$enableval
3636 else
3637   cf_with_db_install=yes
3638 fi;
3639 echo "$as_me:3639: result: $cf_with_db_install" >&5
3640 echo "${ECHO_T}$cf_with_db_install" >&6
3641
3642 echo "$as_me:3642: checking if you want to install manpages" >&5
3643 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3644
3645 # Check whether --with-manpages or --without-manpages was given.
3646 if test "${with_manpages+set}" = set; then
3647   withval="$with_manpages"
3648   cf_with_manpages=$withval
3649 else
3650   cf_with_manpages=yes
3651 fi;
3652 echo "$as_me:3652: result: $cf_with_manpages" >&5
3653 echo "${ECHO_T}$cf_with_manpages" >&6
3654
3655 echo "$as_me:3655: checking if you want to build programs such as tic" >&5
3656 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3657
3658 # Check whether --with-progs or --without-progs was given.
3659 if test "${with_progs+set}" = set; then
3660   withval="$with_progs"
3661   cf_with_progs=$withval
3662 else
3663   cf_with_progs=yes
3664 fi;
3665 echo "$as_me:3665: result: $cf_with_progs" >&5
3666 echo "${ECHO_T}$cf_with_progs" >&6
3667
3668 if test -f "$srcdir/tack/tack.h" ; then
3669         if test "x$cross_compiling" = xyes ; then
3670                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3671
3672 echo "${as_me:-configure}:3672: testing ignoring tack because we are cross-compiling ..." 1>&5
3673
3674                 cf_with_tack=no
3675         else
3676                 echo "$as_me:3676: checking if you want to build the tack program" >&5
3677 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3678
3679 # Check whether --with-tack or --without-tack was given.
3680 if test "${with_tack+set}" = set; then
3681   withval="$with_tack"
3682   cf_with_tack=$withval
3683 else
3684   cf_with_tack=$cf_with_progs
3685 fi;
3686                 echo "$as_me:3686: result: $cf_with_tack" >&5
3687 echo "${ECHO_T}$cf_with_tack" >&6
3688         fi
3689 else
3690         cf_with_tack=no
3691 fi
3692
3693 echo "$as_me:3693: checking if you want to build test-programs" >&5
3694 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3695
3696 # Check whether --with-tests or --without-tests was given.
3697 if test "${with_tests+set}" = set; then
3698   withval="$with_tests"
3699   cf_with_tests=$withval
3700 else
3701   cf_with_tests=yes
3702 fi;
3703 echo "$as_me:3703: result: $cf_with_tests" >&5
3704 echo "${ECHO_T}$cf_with_tests" >&6
3705
3706 echo "$as_me:3706: checking if you wish to install curses.h" >&5
3707 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3708
3709 # Check whether --with-curses-h or --without-curses-h was given.
3710 if test "${with_curses_h+set}" = set; then
3711   withval="$with_curses_h"
3712   with_curses_h=$withval
3713 else
3714   with_curses_h=yes
3715 fi;
3716 echo "$as_me:3716: result: $with_curses_h" >&5
3717 echo "${ECHO_T}$with_curses_h" >&6
3718
3719 modules_to_build="ncurses"
3720 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3721 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3722 modules_to_build="$modules_to_build panel menu form"
3723
3724 test "$program_prefix" != NONE &&
3725   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3726 # Use a double $ so make ignores it.
3727 test "$program_suffix" != NONE &&
3728   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3729 # Double any \ or $.  echo might interpret backslashes.
3730 # By default was `s,x,x', remove it if useless.
3731 cat <<\_ACEOF >conftest.sed
3732 s/[\\$]/&&/g;s/;s,x,x,$//
3733 _ACEOF
3734 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3735 rm conftest.sed
3736
3737 for ac_prog in mawk gawk nawk awk
3738 do
3739   # Extract the first word of "$ac_prog", so it can be a program name with args.
3740 set dummy $ac_prog; ac_word=$2
3741 echo "$as_me:3741: checking for $ac_word" >&5
3742 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3743 if test "${ac_cv_prog_AWK+set}" = set; then
3744   echo $ECHO_N "(cached) $ECHO_C" >&6
3745 else
3746   if test -n "$AWK"; then
3747   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3748 else
3749   ac_save_IFS=$IFS; IFS=$ac_path_separator
3750 ac_dummy="$PATH"
3751 for ac_dir in $ac_dummy; do
3752   IFS=$ac_save_IFS
3753   test -z "$ac_dir" && ac_dir=.
3754   $as_executable_p "$ac_dir/$ac_word" || continue
3755 ac_cv_prog_AWK="$ac_prog"
3756 echo "$as_me:3756: found $ac_dir/$ac_word" >&5
3757 break
3758 done
3759
3760 fi
3761 fi
3762 AWK=$ac_cv_prog_AWK
3763 if test -n "$AWK"; then
3764   echo "$as_me:3764: result: $AWK" >&5
3765 echo "${ECHO_T}$AWK" >&6
3766 else
3767   echo "$as_me:3767: result: no" >&5
3768 echo "${ECHO_T}no" >&6
3769 fi
3770
3771   test -n "$AWK" && break
3772 done
3773
3774 test -z "$AWK" && { { echo "$as_me:3774: error: No awk program found" >&5
3775 echo "$as_me: error: No awk program found" >&2;}
3776    { (exit 1); exit 1; }; }
3777
3778 # Find a good install program.  We prefer a C program (faster),
3779 # so one script is as good as another.  But avoid the broken or
3780 # incompatible versions:
3781 # SysV /etc/install, /usr/sbin/install
3782 # SunOS /usr/etc/install
3783 # IRIX /sbin/install
3784 # AIX /bin/install
3785 # AmigaOS /C/install, which installs bootblocks on floppy discs
3786 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3787 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3788 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3789 # ./install, which can be erroneously created by make from ./install.sh.
3790 echo "$as_me:3790: checking for a BSD compatible install" >&5
3791 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3792 if test -z "$INSTALL"; then
3793 if test "${ac_cv_path_install+set}" = set; then
3794   echo $ECHO_N "(cached) $ECHO_C" >&6
3795 else
3796     ac_save_IFS=$IFS; IFS=$ac_path_separator
3797   for ac_dir in $PATH; do
3798     IFS=$ac_save_IFS
3799     # Account for people who put trailing slashes in PATH elements.
3800     case $ac_dir/ in
3801     / | ./ | .// | /cC/* \
3802     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3803     | /usr/ucb/* ) ;;
3804     *)
3805       # OSF1 and SCO ODT 3.0 have their own names for install.
3806       # Don't use installbsd from OSF since it installs stuff as root
3807       # by default.
3808       for ac_prog in ginstall scoinst install; do
3809         if $as_executable_p "$ac_dir/$ac_prog"; then
3810           if test $ac_prog = install &&
3811             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3812             # AIX install.  It has an incompatible calling convention.
3813             :
3814           elif test $ac_prog = install &&
3815             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3816             # program-specific install script used by HP pwplus--don't use.
3817             :
3818           else
3819             ac_cv_path_install="$ac_dir/$ac_prog -c"
3820             break 2
3821           fi
3822         fi
3823       done
3824       ;;
3825     esac
3826   done
3827
3828 fi
3829   if test "${ac_cv_path_install+set}" = set; then
3830     INSTALL=$ac_cv_path_install
3831   else
3832     # As a last resort, use the slow shell script.  We don't cache a
3833     # path for INSTALL within a source directory, because that will
3834     # break other packages using the cache if that directory is
3835     # removed, or if the path is relative.
3836     INSTALL=$ac_install_sh
3837   fi
3838 fi
3839 echo "$as_me:3839: result: $INSTALL" >&5
3840 echo "${ECHO_T}$INSTALL" >&6
3841
3842 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3843 # It thinks the first close brace ends the variable substitution.
3844 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3845
3846 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3847
3848 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3849
3850 case $INSTALL in
3851 (/*)
3852         ;;
3853 (*)
3854         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3855         test -z "$cf_dir" && cf_dir=.
3856         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3857         ;;
3858 esac
3859
3860 for ac_prog in lint cppcheck splint
3861 do
3862   # Extract the first word of "$ac_prog", so it can be a program name with args.
3863 set dummy $ac_prog; ac_word=$2
3864 echo "$as_me:3864: checking for $ac_word" >&5
3865 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3866 if test "${ac_cv_prog_LINT+set}" = set; then
3867   echo $ECHO_N "(cached) $ECHO_C" >&6
3868 else
3869   if test -n "$LINT"; then
3870   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3871 else
3872   ac_save_IFS=$IFS; IFS=$ac_path_separator
3873 ac_dummy="$PATH"
3874 for ac_dir in $ac_dummy; do
3875   IFS=$ac_save_IFS
3876   test -z "$ac_dir" && ac_dir=.
3877   $as_executable_p "$ac_dir/$ac_word" || continue
3878 ac_cv_prog_LINT="$ac_prog"
3879 echo "$as_me:3879: found $ac_dir/$ac_word" >&5
3880 break
3881 done
3882
3883 fi
3884 fi
3885 LINT=$ac_cv_prog_LINT
3886 if test -n "$LINT"; then
3887   echo "$as_me:3887: result: $LINT" >&5
3888 echo "${ECHO_T}$LINT" >&6
3889 else
3890   echo "$as_me:3890: result: no" >&5
3891 echo "${ECHO_T}no" >&6
3892 fi
3893
3894   test -n "$LINT" && break
3895 done
3896
3897 case "x$LINT" in
3898 (xcppcheck|x*/cppcheck)
3899         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3900         ;;
3901 esac
3902
3903 echo "$as_me:3903: checking whether ln -s works" >&5
3904 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3905 LN_S=$as_ln_s
3906 if test "$LN_S" = "ln -s"; then
3907   echo "$as_me:3907: result: yes" >&5
3908 echo "${ECHO_T}yes" >&6
3909 else
3910   echo "$as_me:3910: result: no, using $LN_S" >&5
3911 echo "${ECHO_T}no, using $LN_S" >&6
3912 fi
3913
3914 echo "$as_me:3914: checking if $LN_S -f options work" >&5
3915 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3916
3917 rm -f conf$$.src conf$$dst
3918 echo >conf$$.dst
3919 echo first >conf$$.src
3920 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3921         cf_prog_ln_sf=yes
3922 else
3923         cf_prog_ln_sf=no
3924 fi
3925 rm -f conf$$.dst conf$$src
3926 echo "$as_me:3926: result: $cf_prog_ln_sf" >&5
3927 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3928
3929 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3930
3931 echo "$as_me:3931: checking for long file names" >&5
3932 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3933 if test "${ac_cv_sys_long_file_names+set}" = set; then
3934   echo $ECHO_N "(cached) $ECHO_C" >&6
3935 else
3936   ac_cv_sys_long_file_names=yes
3937 # Test for long file names in all the places we know might matter:
3938 #      .                the current directory, where building will happen
3939 #      $prefix/lib      where we will be installing things
3940 #      $exec_prefix/lib likewise
3941 # eval it to expand exec_prefix.
3942 #      $TMPDIR          if set, where it might want to write temporary files
3943 # if $TMPDIR is not set:
3944 #      /tmp             where it might want to write temporary files
3945 #      /var/tmp         likewise
3946 #      /usr/tmp         likewise
3947 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3948   ac_tmpdirs=$TMPDIR
3949 else
3950   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3951 fi
3952 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3953   test -d "$ac_dir" || continue
3954   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3955   ac_xdir=$ac_dir/cf$$
3956   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3957   ac_tf1=$ac_xdir/conftest9012345
3958   ac_tf2=$ac_xdir/conftest9012346
3959   (echo 1 >"$ac_tf1") 2>/dev/null
3960   (echo 2 >"$ac_tf2") 2>/dev/null
3961   ac_val=`cat "$ac_tf1" 2>/dev/null`
3962   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3963     ac_cv_sys_long_file_names=no
3964     rm -rf "$ac_xdir" 2>/dev/null
3965     break
3966   fi
3967   rm -rf "$ac_xdir" 2>/dev/null
3968 done
3969 fi
3970 echo "$as_me:3970: result: $ac_cv_sys_long_file_names" >&5
3971 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3972 if test "$ac_cv_sys_long_file_names" = yes; then
3973
3974 cat >>confdefs.h <<\EOF
3975 #define HAVE_LONG_FILE_NAMES 1
3976 EOF
3977
3978 fi
3979
3980 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3981 # of package conflict.
3982 cf_config_suffix=
3983
3984 # Check whether --with-config-suffix or --without-config-suffix was given.
3985 if test "${with_config_suffix+set}" = set; then
3986   withval="$with_config_suffix"
3987   case "x$withval" in
3988         (xyes|xno)
3989                 { echo "$as_me:3989: WARNING: expected a value for config-suffix option" >&5
3990 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3991                 ;;
3992         (*)     cf_config_suffix="$withval"
3993                 ;;
3994         esac
3995 fi;
3996
3997 # If we find pkg-config, check if we should install the ".pc" files.
3998
3999 echo "$as_me:3999: checking if you want to use pkg-config" >&5
4000 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4001
4002 # Check whether --with-pkg-config or --without-pkg-config was given.
4003 if test "${with_pkg_config+set}" = set; then
4004   withval="$with_pkg_config"
4005   cf_pkg_config=$withval
4006 else
4007   cf_pkg_config=yes
4008 fi;
4009 echo "$as_me:4009: result: $cf_pkg_config" >&5
4010 echo "${ECHO_T}$cf_pkg_config" >&6
4011
4012 case "$cf_pkg_config" in
4013 (no)
4014         PKG_CONFIG=none
4015         ;;
4016 (yes)
4017
4018 if test -n "$ac_tool_prefix"; then
4019   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4020 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4021 echo "$as_me:4021: checking for $ac_word" >&5
4022 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4023 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4024   echo $ECHO_N "(cached) $ECHO_C" >&6
4025 else
4026   case $PKG_CONFIG in
4027   [\\/]* | ?:[\\/]*)
4028   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4029   ;;
4030   *)
4031   ac_save_IFS=$IFS; IFS=$ac_path_separator
4032 ac_dummy="$PATH"
4033 for ac_dir in $ac_dummy; do
4034   IFS=$ac_save_IFS
4035   test -z "$ac_dir" && ac_dir=.
4036   if $as_executable_p "$ac_dir/$ac_word"; then
4037    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4038    echo "$as_me:4038: found $ac_dir/$ac_word" >&5
4039    break
4040 fi
4041 done
4042
4043   ;;
4044 esac
4045 fi
4046 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4047
4048 if test -n "$PKG_CONFIG"; then
4049   echo "$as_me:4049: result: $PKG_CONFIG" >&5
4050 echo "${ECHO_T}$PKG_CONFIG" >&6
4051 else
4052   echo "$as_me:4052: result: no" >&5
4053 echo "${ECHO_T}no" >&6
4054 fi
4055
4056 fi
4057 if test -z "$ac_cv_path_PKG_CONFIG"; then
4058   ac_pt_PKG_CONFIG=$PKG_CONFIG
4059   # Extract the first word of "pkg-config", so it can be a program name with args.
4060 set dummy pkg-config; ac_word=$2
4061 echo "$as_me:4061: checking for $ac_word" >&5
4062 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4063 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4064   echo $ECHO_N "(cached) $ECHO_C" >&6
4065 else
4066   case $ac_pt_PKG_CONFIG in
4067   [\\/]* | ?:[\\/]*)
4068   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4069   ;;
4070   *)
4071   ac_save_IFS=$IFS; IFS=$ac_path_separator
4072 ac_dummy="$PATH"
4073 for ac_dir in $ac_dummy; do
4074   IFS=$ac_save_IFS
4075   test -z "$ac_dir" && ac_dir=.
4076   if $as_executable_p "$ac_dir/$ac_word"; then
4077    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4078    echo "$as_me:4078: found $ac_dir/$ac_word" >&5
4079    break
4080 fi
4081 done
4082
4083   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4084   ;;
4085 esac
4086 fi
4087 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4088
4089 if test -n "$ac_pt_PKG_CONFIG"; then
4090   echo "$as_me:4090: result: $ac_pt_PKG_CONFIG" >&5
4091 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4092 else
4093   echo "$as_me:4093: result: no" >&5
4094 echo "${ECHO_T}no" >&6
4095 fi
4096
4097   PKG_CONFIG=$ac_pt_PKG_CONFIG
4098 else
4099   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4100 fi
4101
4102         ;;
4103 (*)
4104         PKG_CONFIG=$withval
4105         ;;
4106 esac
4107
4108 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4109 if test "$PKG_CONFIG" != none ; then
4110
4111 if test "x$prefix" != xNONE; then
4112         cf_path_syntax="$prefix"
4113 else
4114         cf_path_syntax="$ac_default_prefix"
4115 fi
4116
4117 case ".$PKG_CONFIG" in
4118 (.\$\(*\)*|.\'*\'*)
4119         ;;
4120 (..|./*|.\\*)
4121         ;;
4122 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4123         ;;
4124 (.\$\{*prefix\}*|.\$\{*dir\}*)
4125         eval PKG_CONFIG="$PKG_CONFIG"
4126         case ".$PKG_CONFIG" in
4127         (.NONE/*)
4128                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4129                 ;;
4130         esac
4131         ;;
4132 (.no|.NONE/*)
4133         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4134         ;;
4135 (*)
4136         { { echo "$as_me:4136: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4137 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4138    { (exit 1); exit 1; }; }
4139         ;;
4140 esac
4141
4142 elif test "x$cf_pkg_config" != xno ; then
4143         { echo "$as_me:4143: WARNING: pkg-config is not installed" >&5
4144 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4145 fi
4146
4147 case "$PKG_CONFIG" in
4148 (no|none|yes)
4149         echo "$as_me:4149: checking for pkg-config library directory" >&5
4150 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4151         ;;
4152 (*)
4153         echo "$as_me:4153: checking for $PKG_CONFIG library directory" >&5
4154 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4155         ;;
4156 esac
4157
4158 # if $PKG_CONFIG_LIBDIR is set, try to use that
4159 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,'`
4160
4161 # if the option is used, let that override.  otherwise default to "libdir"
4162
4163 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4164 if test "${with_pkg_config_libdir+set}" = set; then
4165   withval="$with_pkg_config_libdir"
4166   cf_search_path=$withval
4167 else
4168   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4169 fi;
4170
4171 case "x$cf_search_path" in
4172 (xlibdir)
4173         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4174         echo "$as_me:4174: result: $PKG_CONFIG_LIBDIR" >&5
4175 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4176         cf_search_path=
4177         ;;
4178 (x)
4179         ;;
4180 (x/*\ *)
4181         PKG_CONFIG_LIBDIR=
4182         ;;
4183 (x/*)
4184         PKG_CONFIG_LIBDIR="$cf_search_path"
4185         echo "$as_me:4185: result: $PKG_CONFIG_LIBDIR" >&5
4186 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4187         cf_search_path=
4188         ;;
4189 (xyes|xauto)
4190         echo "$as_me:4190: result: auto" >&5
4191 echo "${ECHO_T}auto" >&6
4192         cf_search_path=
4193         # Look for the library directory using the same prefix as the executable
4194         echo "$as_me:4194: checking for search-list" >&5
4195 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4196         if test "x$PKG_CONFIG" != xnone
4197         then
4198                 # works for pkg-config since version 0.24 (2009)
4199                 # works for pkgconf since version 0.8.3 (2012)
4200                 for cf_pkg_program in \
4201                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4202                         pkg-config \
4203                         pkgconf
4204                 do
4205                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4206                         test -n "$cf_search_path" && break
4207                 done
4208
4209                 # works for pkg-config since import in 2005 of original 2001 HP code.
4210                 test -z "$cf_search_path" && \
4211                 cf_search_path=`
4212                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4213 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4214         sub(\"^[^']*'\",\"\"); \
4215         sub(\"'.*\",\"\"); \
4216         printf \" %s\", \\$0; } \
4217 { next; } \
4218 "`
4219         fi
4220
4221         echo "$as_me:4221: result: $cf_search_path" >&5
4222 echo "${ECHO_T}$cf_search_path" >&6
4223         ;;
4224 (*)
4225         { { echo "$as_me:4225: error: Unexpected option value: $cf_search_path" >&5
4226 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4227    { (exit 1); exit 1; }; }
4228         ;;
4229 esac
4230
4231 if test -n "$cf_search_path"
4232 then
4233         echo "$as_me:4233: checking for first directory" >&5
4234 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4235         cf_pkg_config_path=none
4236         for cf_config in $cf_search_path
4237         do
4238                 if test -d "$cf_config"
4239                 then
4240                         cf_pkg_config_path=$cf_config
4241                         break
4242                 fi
4243         done
4244         echo "$as_me:4244: result: $cf_pkg_config_path" >&5
4245 echo "${ECHO_T}$cf_pkg_config_path" >&6
4246
4247         if test "x$cf_pkg_config_path" != xnone ; then
4248                 # limit this to the first directory found
4249                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4250         fi
4251
4252         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4253         then
4254                 echo "$as_me:4254: checking for workaround" >&5
4255 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4256                 if test "$prefix" = "NONE" ; then
4257                         cf_prefix="$ac_default_prefix"
4258                 else
4259                         cf_prefix="$prefix"
4260                 fi
4261                 eval cf_libdir=$libdir
4262                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4263                 cf_backup=
4264                 for cf_config in $cf_search_path
4265                 do
4266                         case $cf_config in
4267                         $cf_libdir/pkgconfig)
4268                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4269                                 break
4270                                 ;;
4271                         *)
4272                                 test -z "$cf_backup" && cf_backup=$cf_config
4273                                 ;;
4274                         esac
4275                 done
4276                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4277                 echo "$as_me:4277: result: $PKG_CONFIG_LIBDIR" >&5
4278 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4279         fi
4280 fi
4281
4282 if test "x$PKG_CONFIG" != xnone
4283 then
4284         echo "$as_me:4284: checking if we should install .pc files for $PKG_CONFIG" >&5
4285 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4286 else
4287         echo "$as_me:4287: checking if we should install .pc files" >&5
4288 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4289 fi
4290
4291 # Check whether --enable-pc-files or --disable-pc-files was given.
4292 if test "${enable_pc_files+set}" = set; then
4293   enableval="$enable_pc_files"
4294   enable_pc_files=$enableval
4295 else
4296   enable_pc_files=no
4297 fi;
4298 echo "$as_me:4298: result: $enable_pc_files" >&5
4299 echo "${ECHO_T}$enable_pc_files" >&6
4300
4301 if test "x$enable_pc_files" != xno
4302 then
4303         MAKE_PC_FILES=
4304         case "x$PKG_CONFIG_LIBDIR" in
4305         (xno|xnone|xyes|x)
4306                 { echo "$as_me:4306: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4307 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4308                 ;;
4309         (*)
4310                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4311
4312 if test "x$prefix" != xNONE; then
4313         cf_path_syntax="$prefix"
4314 else
4315         cf_path_syntax="$ac_default_prefix"
4316 fi
4317
4318 case ".$cf_pkg_config_libdir" in
4319 (.\$\(*\)*|.\'*\'*)
4320         ;;
4321 (..|./*|.\\*)
4322         ;;
4323 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4324         ;;
4325 (.\$\{*prefix\}*|.\$\{*dir\}*)
4326         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4327         case ".$cf_pkg_config_libdir" in
4328         (.NONE/*)
4329                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4330                 ;;
4331         esac
4332         ;;
4333 (.no|.NONE/*)
4334         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4335         ;;
4336 (*)
4337         { { echo "$as_me:4337: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4338 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4339    { (exit 1); exit 1; }; }
4340         ;;
4341 esac
4342
4343                 ;;
4344         esac
4345 else
4346         MAKE_PC_FILES="#"
4347 fi
4348
4349 if test -z "$MAKE_PC_FILES"
4350 then
4351         echo "$as_me:4351: checking for suffix to add to pc-files" >&5
4352 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4353
4354 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4355 if test "${with_pc_suffix+set}" = set; then
4356   withval="$with_pc_suffix"
4357   case "x$withval" in
4358         (xyes|xno)
4359                 PC_MODULE_SUFFIX=
4360                 ;;
4361         (*)     PC_MODULE_SUFFIX="$withval"
4362                 ;;
4363         esac
4364 fi;
4365         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4366         echo "$as_me:4366: result: $PC_MODULE_SUFFIX" >&5
4367 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4368         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4369
4370 fi
4371
4372 echo "$as_me:4372: checking if we should assume mixed-case filenames" >&5
4373 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4374
4375 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4376 if test "${enable_mixed_case+set}" = set; then
4377   enableval="$enable_mixed_case"
4378   enable_mixedcase=$enableval
4379 else
4380   enable_mixedcase=auto
4381 fi;
4382 echo "$as_me:4382: result: $enable_mixedcase" >&5
4383 echo "${ECHO_T}$enable_mixedcase" >&6
4384 if test "$enable_mixedcase" = "auto" ; then
4385
4386 echo "$as_me:4386: checking if filesystem supports mixed-case filenames" >&5
4387 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4388 if test "${cf_cv_mixedcase+set}" = set; then
4389   echo $ECHO_N "(cached) $ECHO_C" >&6
4390 else
4391
4392 if test "$cross_compiling" = yes ; then
4393         case "$target_alias" in
4394         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4395                 cf_cv_mixedcase=no
4396                 ;;
4397         (*)
4398                 cf_cv_mixedcase=yes
4399                 ;;
4400         esac
4401 else
4402         rm -f conftest CONFTEST
4403         echo test >conftest
4404         if test -f CONFTEST ; then
4405                 cf_cv_mixedcase=no
4406         else
4407                 cf_cv_mixedcase=yes
4408         fi
4409         rm -f conftest CONFTEST
4410 fi
4411
4412 fi
4413 echo "$as_me:4413: result: $cf_cv_mixedcase" >&5
4414 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4415 test "$cf_cv_mixedcase" = yes &&
4416 cat >>confdefs.h <<\EOF
4417 #define MIXEDCASE_FILENAMES 1
4418 EOF
4419
4420 else
4421         cf_cv_mixedcase=$enable_mixedcase
4422         if test "x$enable_mixedcase" = "xyes" ; then
4423
4424 cat >>confdefs.h <<\EOF
4425 #define MIXEDCASE_FILENAMES 1
4426 EOF
4427
4428         fi
4429 fi
4430
4431 # do this after mixed-case option (tags/TAGS is not as important as tic).
4432 echo "$as_me:4432: checking whether ${MAKE-make} sets \${MAKE}" >&5
4433 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4434 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4435 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4436   echo $ECHO_N "(cached) $ECHO_C" >&6
4437 else
4438   cat >conftest.make <<\EOF
4439 all:
4440         @echo 'ac_maketemp="${MAKE}"'
4441 EOF
4442 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4443 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4444 if test -n "$ac_maketemp"; then
4445   eval ac_cv_prog_make_${ac_make}_set=yes
4446 else
4447   eval ac_cv_prog_make_${ac_make}_set=no
4448 fi
4449 rm -f conftest.make
4450 fi
4451 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4452   echo "$as_me:4452: result: yes" >&5
4453 echo "${ECHO_T}yes" >&6
4454   SET_MAKE=
4455 else
4456   echo "$as_me:4456: result: no" >&5
4457 echo "${ECHO_T}no" >&6
4458   SET_MAKE="MAKE=${MAKE-make}"
4459 fi
4460
4461 echo "$as_me:4461: checking for \".PHONY\" make-support" >&5
4462 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4463 if test "${cf_cv_make_PHONY+set}" = set; then
4464   echo $ECHO_N "(cached) $ECHO_C" >&6
4465 else
4466
4467         rm -rf conftest*
4468         (
4469                 mkdir conftest || exit 1
4470                 cd conftest
4471                 cat >makefile <<'CF_EOF'
4472 .PHONY: always
4473 DATA=0
4474 always: always.out
4475         @echo "** making $@ $(DATA)"
4476 once: once.out
4477         @echo "** making $@ $(DATA)"
4478 always.out:
4479         @echo "** making $@ $(DATA)"
4480         echo $(DATA) > $@
4481 once.out:
4482         @echo "** making $@ $(DATA)"
4483         echo $(DATA) > $@
4484 CF_EOF
4485                 for cf_data in 1 2 3
4486                 do
4487                         ${MAKE:-make} always DATA=$cf_data
4488                         ${MAKE:-make} once   DATA=$cf_data
4489                         ${MAKE:-make} -t always once
4490                         if test -f always ; then
4491                                 echo "no (case 1)" > ../conftest.tmp
4492                         elif test ! -f always.out ; then
4493                                 echo "no (case 2)" > ../conftest.tmp
4494                         elif test ! -f once.out ; then
4495                                 echo "no (case 3)" > ../conftest.tmp
4496                         elif ! cmp -s always.out once.out ; then
4497                                 echo "no (case 4)" > ../conftest.tmp
4498                                 diff always.out once.out
4499                         else
4500                                 cf_check="`cat always.out`"
4501                                 if test "x$cf_check" != "x$cf_data" ; then
4502                                         echo "no (case 5)" > ../conftest.tmp
4503                                 else
4504                                         echo yes > ../conftest.tmp
4505                                         rm -f ./*.out
4506                                         continue
4507                                 fi
4508                         fi
4509                         break
4510                 done
4511         ) >&5 2>&1
4512         cf_cv_make_PHONY="`cat conftest.tmp`"
4513         rm -rf conftest*
4514
4515 fi
4516 echo "$as_me:4516: result: $cf_cv_make_PHONY" >&5
4517 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4518 MAKE_NO_PHONY="#"
4519 MAKE_PHONY="#"
4520 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4521 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4522
4523 for ac_prog in exctags ctags
4524 do
4525   # Extract the first word of "$ac_prog", so it can be a program name with args.
4526 set dummy $ac_prog; ac_word=$2
4527 echo "$as_me:4527: checking for $ac_word" >&5
4528 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4529 if test "${ac_cv_prog_CTAGS+set}" = set; then
4530   echo $ECHO_N "(cached) $ECHO_C" >&6
4531 else
4532   if test -n "$CTAGS"; then
4533   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4534 else
4535   ac_save_IFS=$IFS; IFS=$ac_path_separator
4536 ac_dummy="$PATH"
4537 for ac_dir in $ac_dummy; do
4538   IFS=$ac_save_IFS
4539   test -z "$ac_dir" && ac_dir=.
4540   $as_executable_p "$ac_dir/$ac_word" || continue
4541 ac_cv_prog_CTAGS="$ac_prog"
4542 echo "$as_me:4542: found $ac_dir/$ac_word" >&5
4543 break
4544 done
4545
4546 fi
4547 fi
4548 CTAGS=$ac_cv_prog_CTAGS
4549 if test -n "$CTAGS"; then
4550   echo "$as_me:4550: result: $CTAGS" >&5
4551 echo "${ECHO_T}$CTAGS" >&6
4552 else
4553   echo "$as_me:4553: result: no" >&5
4554 echo "${ECHO_T}no" >&6
4555 fi
4556
4557   test -n "$CTAGS" && break
4558 done
4559
4560 for ac_prog in exetags etags
4561 do
4562   # Extract the first word of "$ac_prog", so it can be a program name with args.
4563 set dummy $ac_prog; ac_word=$2
4564 echo "$as_me:4564: checking for $ac_word" >&5
4565 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4566 if test "${ac_cv_prog_ETAGS+set}" = set; then
4567   echo $ECHO_N "(cached) $ECHO_C" >&6
4568 else
4569   if test -n "$ETAGS"; then
4570   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4571 else
4572   ac_save_IFS=$IFS; IFS=$ac_path_separator
4573 ac_dummy="$PATH"
4574 for ac_dir in $ac_dummy; do
4575   IFS=$ac_save_IFS
4576   test -z "$ac_dir" && ac_dir=.
4577   $as_executable_p "$ac_dir/$ac_word" || continue
4578 ac_cv_prog_ETAGS="$ac_prog"
4579 echo "$as_me:4579: found $ac_dir/$ac_word" >&5
4580 break
4581 done
4582
4583 fi
4584 fi
4585 ETAGS=$ac_cv_prog_ETAGS
4586 if test -n "$ETAGS"; then
4587   echo "$as_me:4587: result: $ETAGS" >&5
4588 echo "${ECHO_T}$ETAGS" >&6
4589 else
4590   echo "$as_me:4590: result: no" >&5
4591 echo "${ECHO_T}no" >&6
4592 fi
4593
4594   test -n "$ETAGS" && break
4595 done
4596
4597 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4598 set dummy ${CTAGS:-ctags}; ac_word=$2
4599 echo "$as_me:4599: checking for $ac_word" >&5
4600 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4601 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4602   echo $ECHO_N "(cached) $ECHO_C" >&6
4603 else
4604   if test -n "$MAKE_LOWER_TAGS"; then
4605   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4606 else
4607   ac_save_IFS=$IFS; IFS=$ac_path_separator
4608 ac_dummy="$PATH"
4609 for ac_dir in $ac_dummy; do
4610   IFS=$ac_save_IFS
4611   test -z "$ac_dir" && ac_dir=.
4612   $as_executable_p "$ac_dir/$ac_word" || continue
4613 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4614 echo "$as_me:4614: found $ac_dir/$ac_word" >&5
4615 break
4616 done
4617
4618   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4619 fi
4620 fi
4621 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4622 if test -n "$MAKE_LOWER_TAGS"; then
4623   echo "$as_me:4623: result: $MAKE_LOWER_TAGS" >&5
4624 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4625 else
4626   echo "$as_me:4626: result: no" >&5
4627 echo "${ECHO_T}no" >&6
4628 fi
4629
4630 if test "$cf_cv_mixedcase" = yes ; then
4631         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4632 set dummy ${ETAGS:-etags}; ac_word=$2
4633 echo "$as_me:4633: checking for $ac_word" >&5
4634 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4635 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4636   echo $ECHO_N "(cached) $ECHO_C" >&6
4637 else
4638   if test -n "$MAKE_UPPER_TAGS"; then
4639   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4640 else
4641   ac_save_IFS=$IFS; IFS=$ac_path_separator
4642 ac_dummy="$PATH"
4643 for ac_dir in $ac_dummy; do
4644   IFS=$ac_save_IFS
4645   test -z "$ac_dir" && ac_dir=.
4646   $as_executable_p "$ac_dir/$ac_word" || continue
4647 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4648 echo "$as_me:4648: found $ac_dir/$ac_word" >&5
4649 break
4650 done
4651
4652   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4653 fi
4654 fi
4655 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4656 if test -n "$MAKE_UPPER_TAGS"; then
4657   echo "$as_me:4657: result: $MAKE_UPPER_TAGS" >&5
4658 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4659 else
4660   echo "$as_me:4660: result: no" >&5
4661 echo "${ECHO_T}no" >&6
4662 fi
4663
4664 else
4665         MAKE_UPPER_TAGS=no
4666 fi
4667
4668 if test "$MAKE_UPPER_TAGS" = yes ; then
4669         MAKE_UPPER_TAGS=
4670 else
4671         MAKE_UPPER_TAGS="#"
4672 fi
4673
4674 if test "$MAKE_LOWER_TAGS" = yes ; then
4675         MAKE_LOWER_TAGS=
4676 else
4677         MAKE_LOWER_TAGS="#"
4678 fi
4679
4680 echo "$as_me:4680: checking for makeflags variable" >&5
4681 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4682 if test "${cf_cv_makeflags+set}" = set; then
4683   echo $ECHO_N "(cached) $ECHO_C" >&6
4684 else
4685
4686         cf_cv_makeflags=''
4687         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4688         do
4689                 cat >cf_makeflags.tmp <<CF_EOF
4690 SHELL = $SHELL
4691 all :
4692         @ echo '.$cf_option'
4693 CF_EOF
4694                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4695                 case "$cf_result" in
4696                 (.*k|.*kw)
4697                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4698                         case "$cf_result" in
4699                         (.*CC=*)        cf_cv_makeflags=
4700                                 ;;
4701                         (*)     cf_cv_makeflags=$cf_option
4702                                 ;;
4703                         esac
4704                         break
4705                         ;;
4706                 (.-)
4707                         ;;
4708                 (*)
4709
4710 echo "${as_me:-configure}:4710: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4711
4712                         ;;
4713                 esac
4714         done
4715         rm -f cf_makeflags.tmp
4716
4717 fi
4718 echo "$as_me:4718: result: $cf_cv_makeflags" >&5
4719 echo "${ECHO_T}$cf_cv_makeflags" >&6
4720
4721 if test -n "$ac_tool_prefix"; then
4722   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4723 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4724 echo "$as_me:4724: checking for $ac_word" >&5
4725 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4726 if test "${ac_cv_prog_RANLIB+set}" = set; then
4727   echo $ECHO_N "(cached) $ECHO_C" >&6
4728 else
4729   if test -n "$RANLIB"; then
4730   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4731 else
4732   ac_save_IFS=$IFS; IFS=$ac_path_separator
4733 ac_dummy="$PATH"
4734 for ac_dir in $ac_dummy; do
4735   IFS=$ac_save_IFS
4736   test -z "$ac_dir" && ac_dir=.
4737   $as_executable_p "$ac_dir/$ac_word" || continue
4738 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4739 echo "$as_me:4739: found $ac_dir/$ac_word" >&5
4740 break
4741 done
4742
4743 fi
4744 fi
4745 RANLIB=$ac_cv_prog_RANLIB
4746 if test -n "$RANLIB"; then
4747   echo "$as_me:4747: result: $RANLIB" >&5
4748 echo "${ECHO_T}$RANLIB" >&6
4749 else
4750   echo "$as_me:4750: result: no" >&5
4751 echo "${ECHO_T}no" >&6
4752 fi
4753
4754 fi
4755 if test -z "$ac_cv_prog_RANLIB"; then
4756   ac_ct_RANLIB=$RANLIB
4757   # Extract the first word of "ranlib", so it can be a program name with args.
4758 set dummy ranlib; ac_word=$2
4759 echo "$as_me:4759: checking for $ac_word" >&5
4760 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4761 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4762   echo $ECHO_N "(cached) $ECHO_C" >&6
4763 else
4764   if test -n "$ac_ct_RANLIB"; then
4765   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4766 else
4767   ac_save_IFS=$IFS; IFS=$ac_path_separator
4768 ac_dummy="$PATH"
4769 for ac_dir in $ac_dummy; do
4770   IFS=$ac_save_IFS
4771   test -z "$ac_dir" && ac_dir=.
4772   $as_executable_p "$ac_dir/$ac_word" || continue
4773 ac_cv_prog_ac_ct_RANLIB="ranlib"
4774 echo "$as_me:4774: found $ac_dir/$ac_word" >&5
4775 break
4776 done
4777
4778   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4779 fi
4780 fi
4781 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4782 if test -n "$ac_ct_RANLIB"; then
4783   echo "$as_me:4783: result: $ac_ct_RANLIB" >&5
4784 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4785 else
4786   echo "$as_me:4786: result: no" >&5
4787 echo "${ECHO_T}no" >&6
4788 fi
4789
4790   RANLIB=$ac_ct_RANLIB
4791 else
4792   RANLIB="$ac_cv_prog_RANLIB"
4793 fi
4794
4795 if test -n "$ac_tool_prefix"; then
4796   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4797 set dummy ${ac_tool_prefix}ld; ac_word=$2
4798 echo "$as_me:4798: checking for $ac_word" >&5
4799 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4800 if test "${ac_cv_prog_LD+set}" = set; then
4801   echo $ECHO_N "(cached) $ECHO_C" >&6
4802 else
4803   if test -n "$LD"; then
4804   ac_cv_prog_LD="$LD" # Let the user override the test.
4805 else
4806   ac_save_IFS=$IFS; IFS=$ac_path_separator
4807 ac_dummy="$PATH"
4808 for ac_dir in $ac_dummy; do
4809   IFS=$ac_save_IFS
4810   test -z "$ac_dir" && ac_dir=.
4811   $as_executable_p "$ac_dir/$ac_word" || continue
4812 ac_cv_prog_LD="${ac_tool_prefix}ld"
4813 echo "$as_me:4813: found $ac_dir/$ac_word" >&5
4814 break
4815 done
4816
4817 fi
4818 fi
4819 LD=$ac_cv_prog_LD
4820 if test -n "$LD"; then
4821   echo "$as_me:4821: result: $LD" >&5
4822 echo "${ECHO_T}$LD" >&6
4823 else
4824   echo "$as_me:4824: result: no" >&5
4825 echo "${ECHO_T}no" >&6
4826 fi
4827
4828 fi
4829 if test -z "$ac_cv_prog_LD"; then
4830   ac_ct_LD=$LD
4831   # Extract the first word of "ld", so it can be a program name with args.
4832 set dummy ld; ac_word=$2
4833 echo "$as_me:4833: checking for $ac_word" >&5
4834 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4835 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4836   echo $ECHO_N "(cached) $ECHO_C" >&6
4837 else
4838   if test -n "$ac_ct_LD"; then
4839   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4840 else
4841   ac_save_IFS=$IFS; IFS=$ac_path_separator
4842 ac_dummy="$PATH"
4843 for ac_dir in $ac_dummy; do
4844   IFS=$ac_save_IFS
4845   test -z "$ac_dir" && ac_dir=.
4846   $as_executable_p "$ac_dir/$ac_word" || continue
4847 ac_cv_prog_ac_ct_LD="ld"
4848 echo "$as_me:4848: found $ac_dir/$ac_word" >&5
4849 break
4850 done
4851
4852   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4853 fi
4854 fi
4855 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4856 if test -n "$ac_ct_LD"; then
4857   echo "$as_me:4857: result: $ac_ct_LD" >&5
4858 echo "${ECHO_T}$ac_ct_LD" >&6
4859 else
4860   echo "$as_me:4860: result: no" >&5
4861 echo "${ECHO_T}no" >&6
4862 fi
4863
4864   LD=$ac_ct_LD
4865 else
4866   LD="$ac_cv_prog_LD"
4867 fi
4868
4869 if test -n "$ac_tool_prefix"; then
4870   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4871 set dummy ${ac_tool_prefix}ar; ac_word=$2
4872 echo "$as_me:4872: checking for $ac_word" >&5
4873 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4874 if test "${ac_cv_prog_AR+set}" = set; then
4875   echo $ECHO_N "(cached) $ECHO_C" >&6
4876 else
4877   if test -n "$AR"; then
4878   ac_cv_prog_AR="$AR" # Let the user override the test.
4879 else
4880   ac_save_IFS=$IFS; IFS=$ac_path_separator
4881 ac_dummy="$PATH"
4882 for ac_dir in $ac_dummy; do
4883   IFS=$ac_save_IFS
4884   test -z "$ac_dir" && ac_dir=.
4885   $as_executable_p "$ac_dir/$ac_word" || continue
4886 ac_cv_prog_AR="${ac_tool_prefix}ar"
4887 echo "$as_me:4887: found $ac_dir/$ac_word" >&5
4888 break
4889 done
4890
4891 fi
4892 fi
4893 AR=$ac_cv_prog_AR
4894 if test -n "$AR"; then
4895   echo "$as_me:4895: result: $AR" >&5
4896 echo "${ECHO_T}$AR" >&6
4897 else
4898   echo "$as_me:4898: result: no" >&5
4899 echo "${ECHO_T}no" >&6
4900 fi
4901
4902 fi
4903 if test -z "$ac_cv_prog_AR"; then
4904   ac_ct_AR=$AR
4905   # Extract the first word of "ar", so it can be a program name with args.
4906 set dummy ar; ac_word=$2
4907 echo "$as_me:4907: checking for $ac_word" >&5
4908 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4909 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4910   echo $ECHO_N "(cached) $ECHO_C" >&6
4911 else
4912   if test -n "$ac_ct_AR"; then
4913   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4914 else
4915   ac_save_IFS=$IFS; IFS=$ac_path_separator
4916 ac_dummy="$PATH"
4917 for ac_dir in $ac_dummy; do
4918   IFS=$ac_save_IFS
4919   test -z "$ac_dir" && ac_dir=.
4920   $as_executable_p "$ac_dir/$ac_word" || continue
4921 ac_cv_prog_ac_ct_AR="ar"
4922 echo "$as_me:4922: found $ac_dir/$ac_word" >&5
4923 break
4924 done
4925
4926   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4927 fi
4928 fi
4929 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4930 if test -n "$ac_ct_AR"; then
4931   echo "$as_me:4931: result: $ac_ct_AR" >&5
4932 echo "${ECHO_T}$ac_ct_AR" >&6
4933 else
4934   echo "$as_me:4934: result: no" >&5
4935 echo "${ECHO_T}no" >&6
4936 fi
4937
4938   AR=$ac_ct_AR
4939 else
4940   AR="$ac_cv_prog_AR"
4941 fi
4942
4943 if test -n "$ac_tool_prefix"; then
4944   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4945 set dummy ${ac_tool_prefix}nm; ac_word=$2
4946 echo "$as_me:4946: checking for $ac_word" >&5
4947 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4948 if test "${ac_cv_prog_NM+set}" = set; then
4949   echo $ECHO_N "(cached) $ECHO_C" >&6
4950 else
4951   if test -n "$NM"; then
4952   ac_cv_prog_NM="$NM" # Let the user override the test.
4953 else
4954   ac_save_IFS=$IFS; IFS=$ac_path_separator
4955 ac_dummy="$PATH"
4956 for ac_dir in $ac_dummy; do
4957   IFS=$ac_save_IFS
4958   test -z "$ac_dir" && ac_dir=.
4959   $as_executable_p "$ac_dir/$ac_word" || continue
4960 ac_cv_prog_NM="${ac_tool_prefix}nm"
4961 echo "$as_me:4961: found $ac_dir/$ac_word" >&5
4962 break
4963 done
4964
4965 fi
4966 fi
4967 NM=$ac_cv_prog_NM
4968 if test -n "$NM"; then
4969   echo "$as_me:4969: result: $NM" >&5
4970 echo "${ECHO_T}$NM" >&6
4971 else
4972   echo "$as_me:4972: result: no" >&5
4973 echo "${ECHO_T}no" >&6
4974 fi
4975
4976 fi
4977 if test -z "$ac_cv_prog_NM"; then
4978   ac_ct_NM=$NM
4979   # Extract the first word of "nm", so it can be a program name with args.
4980 set dummy nm; ac_word=$2
4981 echo "$as_me:4981: checking for $ac_word" >&5
4982 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4983 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4984   echo $ECHO_N "(cached) $ECHO_C" >&6
4985 else
4986   if test -n "$ac_ct_NM"; then
4987   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4988 else
4989   ac_save_IFS=$IFS; IFS=$ac_path_separator
4990 ac_dummy="$PATH"
4991 for ac_dir in $ac_dummy; do
4992   IFS=$ac_save_IFS
4993   test -z "$ac_dir" && ac_dir=.
4994   $as_executable_p "$ac_dir/$ac_word" || continue
4995 ac_cv_prog_ac_ct_NM="nm"
4996 echo "$as_me:4996: found $ac_dir/$ac_word" >&5
4997 break
4998 done
4999
5000   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5001 fi
5002 fi
5003 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5004 if test -n "$ac_ct_NM"; then
5005   echo "$as_me:5005: result: $ac_ct_NM" >&5
5006 echo "${ECHO_T}$ac_ct_NM" >&6
5007 else
5008   echo "$as_me:5008: result: no" >&5
5009 echo "${ECHO_T}no" >&6
5010 fi
5011
5012   NM=$ac_ct_NM
5013 else
5014   NM="$ac_cv_prog_NM"
5015 fi
5016
5017 if test -n "$ac_tool_prefix"; then
5018   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5019 set dummy ${ac_tool_prefix}ar; ac_word=$2
5020 echo "$as_me:5020: checking for $ac_word" >&5
5021 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5022 if test "${ac_cv_prog_AR+set}" = set; then
5023   echo $ECHO_N "(cached) $ECHO_C" >&6
5024 else
5025   if test -n "$AR"; then
5026   ac_cv_prog_AR="$AR" # Let the user override the test.
5027 else
5028   ac_save_IFS=$IFS; IFS=$ac_path_separator
5029 ac_dummy="$PATH"
5030 for ac_dir in $ac_dummy; do
5031   IFS=$ac_save_IFS
5032   test -z "$ac_dir" && ac_dir=.
5033   $as_executable_p "$ac_dir/$ac_word" || continue
5034 ac_cv_prog_AR="${ac_tool_prefix}ar"
5035 echo "$as_me:5035: found $ac_dir/$ac_word" >&5
5036 break
5037 done
5038
5039 fi
5040 fi
5041 AR=$ac_cv_prog_AR
5042 if test -n "$AR"; then
5043   echo "$as_me:5043: result: $AR" >&5
5044 echo "${ECHO_T}$AR" >&6
5045 else
5046   echo "$as_me:5046: result: no" >&5
5047 echo "${ECHO_T}no" >&6
5048 fi
5049
5050 fi
5051 if test -z "$ac_cv_prog_AR"; then
5052   ac_ct_AR=$AR
5053   # Extract the first word of "ar", so it can be a program name with args.
5054 set dummy ar; ac_word=$2
5055 echo "$as_me:5055: checking for $ac_word" >&5
5056 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5057 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5058   echo $ECHO_N "(cached) $ECHO_C" >&6
5059 else
5060   if test -n "$ac_ct_AR"; then
5061   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5062 else
5063   ac_save_IFS=$IFS; IFS=$ac_path_separator
5064 ac_dummy="$PATH"
5065 for ac_dir in $ac_dummy; do
5066   IFS=$ac_save_IFS
5067   test -z "$ac_dir" && ac_dir=.
5068   $as_executable_p "$ac_dir/$ac_word" || continue
5069 ac_cv_prog_ac_ct_AR="ar"
5070 echo "$as_me:5070: found $ac_dir/$ac_word" >&5
5071 break
5072 done
5073
5074   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5075 fi
5076 fi
5077 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5078 if test -n "$ac_ct_AR"; then
5079   echo "$as_me:5079: result: $ac_ct_AR" >&5
5080 echo "${ECHO_T}$ac_ct_AR" >&6
5081 else
5082   echo "$as_me:5082: result: no" >&5
5083 echo "${ECHO_T}no" >&6
5084 fi
5085
5086   AR=$ac_ct_AR
5087 else
5088   AR="$ac_cv_prog_AR"
5089 fi
5090
5091 echo "$as_me:5091: checking for options to update archives" >&5
5092 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5093 if test "${cf_cv_ar_flags+set}" = set; then
5094   echo $ECHO_N "(cached) $ECHO_C" >&6
5095 else
5096
5097         case "$cf_cv_system_name" in
5098         (*-msvc*)
5099                 cf_cv_ar_flags=''
5100                 cat >mk_static_lib.sh <<-EOF
5101                 #!$SHELL
5102                 MSVC_BIN="$AR"
5103                 out="\$1"
5104                 shift
5105                 exec \$MSVC_BIN -out:"\$out" \$@
5106                 EOF
5107                 chmod +x mk_static_lib.sh
5108                 AR=`pwd`/mk_static_lib.sh
5109                 ;;
5110         (*)
5111                 cf_cv_ar_flags=unknown
5112                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5113                 do
5114
5115                         # check if $ARFLAGS already contains this choice
5116                         if test "x$ARFLAGS" != "x" ; then
5117                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5118                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5119                                         cf_cv_ar_flags=
5120                                         break
5121                                 fi
5122                         fi
5123
5124                         rm -f "conftest.$ac_cv_objext"
5125                         rm -f conftest.a
5126
5127                         cat >"conftest.$ac_ext" <<EOF
5128 #line 5128 "configure"
5129 int     testdata[3] = { 123, 456, 789 };
5130 EOF
5131                         if { (eval echo "$as_me:5131: \"$ac_compile\"") >&5
5132   (eval $ac_compile) 2>&5
5133   ac_status=$?
5134   echo "$as_me:5134: \$? = $ac_status" >&5
5135   (exit "$ac_status"); } ; then
5136                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5137                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5138                                 if test -f conftest.a ; then
5139                                         cf_cv_ar_flags="$cf_ar_flags"
5140                                         break
5141                                 fi
5142                         else
5143                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5144
5145 echo "${as_me:-configure}:5145: testing cannot compile test-program ..." 1>&5
5146
5147                                 break
5148                         fi
5149                 done
5150                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5151                 ;;
5152         esac
5153
5154 fi
5155 echo "$as_me:5155: result: $cf_cv_ar_flags" >&5
5156 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5157
5158 if test -n "$ARFLAGS" ; then
5159         if test -n "$cf_cv_ar_flags" ; then
5160                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5161         fi
5162 else
5163         ARFLAGS=$cf_cv_ar_flags
5164 fi
5165
5166 echo "$as_me:5166: checking if you have specified an install-prefix" >&5
5167 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5168
5169 # Check whether --with-install-prefix or --without-install-prefix was given.
5170 if test "${with_install_prefix+set}" = set; then
5171   withval="$with_install_prefix"
5172   case "x$withval" in
5173         (xyes|xno)
5174                 ;;
5175         (*)     DESTDIR="$withval"
5176                 ;;
5177         esac
5178 fi;
5179 echo "$as_me:5179: result: $DESTDIR" >&5
5180 echo "${ECHO_T}$DESTDIR" >&6
5181
5182 ###############################################################################
5183
5184 # If we're cross-compiling, allow the user to override the tools and their
5185 # options.  The configure script is oriented toward identifying the host
5186 # compiler, etc., but we need a build compiler to generate parts of the source.
5187
5188 case "$cf_cv_system_name" in
5189 (*-msvc*)
5190         LDFLAGS="$LDFLAGS user32.lib"
5191         export LDFLAGS
5192         ;;
5193 esac
5194
5195 if test "$cross_compiling" = yes ; then
5196
5197         # defaults that we might want to override
5198         : ${BUILD_CFLAGS:=''}
5199         : ${BUILD_CPPFLAGS:=''}
5200         : ${BUILD_LDFLAGS:=''}
5201         : ${BUILD_LIBS:=''}
5202         : ${BUILD_EXEEXT:='$x'}
5203         : ${BUILD_OBJEXT:='o'}
5204
5205 # Check whether --with-build-cc or --without-build-cc was given.
5206 if test "${with_build_cc+set}" = set; then
5207   withval="$with_build_cc"
5208   BUILD_CC="$withval"
5209 else
5210   for ac_prog in gcc clang c99 c89 cc cl
5211 do
5212   # Extract the first word of "$ac_prog", so it can be a program name with args.
5213 set dummy $ac_prog; ac_word=$2
5214 echo "$as_me:5214: checking for $ac_word" >&5
5215 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5216 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5217   echo $ECHO_N "(cached) $ECHO_C" >&6
5218 else
5219   if test -n "$BUILD_CC"; then
5220   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5221 else
5222   ac_save_IFS=$IFS; IFS=$ac_path_separator
5223 ac_dummy="$PATH"
5224 for ac_dir in $ac_dummy; do
5225   IFS=$ac_save_IFS
5226   test -z "$ac_dir" && ac_dir=.
5227   $as_executable_p "$ac_dir/$ac_word" || continue
5228 ac_cv_prog_BUILD_CC="$ac_prog"
5229 echo "$as_me:5229: found $ac_dir/$ac_word" >&5
5230 break
5231 done
5232
5233 fi
5234 fi
5235 BUILD_CC=$ac_cv_prog_BUILD_CC
5236 if test -n "$BUILD_CC"; then
5237   echo "$as_me:5237: result: $BUILD_CC" >&5
5238 echo "${ECHO_T}$BUILD_CC" >&6
5239 else
5240   echo "$as_me:5240: result: no" >&5
5241 echo "${ECHO_T}no" >&6
5242 fi
5243
5244   test -n "$BUILD_CC" && break
5245 done
5246 test -n "$BUILD_CC" || BUILD_CC="none"
5247
5248 fi;
5249         echo "$as_me:5249: checking for native build C compiler" >&5
5250 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5251         echo "$as_me:5251: result: $BUILD_CC" >&5
5252 echo "${ECHO_T}$BUILD_CC" >&6
5253
5254         echo "$as_me:5254: checking for native build C preprocessor" >&5
5255 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5256
5257 # Check whether --with-build-cpp or --without-build-cpp was given.
5258 if test "${with_build_cpp+set}" = set; then
5259   withval="$with_build_cpp"
5260   BUILD_CPP="$withval"
5261 else
5262   BUILD_CPP='${BUILD_CC} -E'
5263 fi;
5264         echo "$as_me:5264: result: $BUILD_CPP" >&5
5265 echo "${ECHO_T}$BUILD_CPP" >&6
5266
5267         echo "$as_me:5267: checking for native build C flags" >&5
5268 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5269
5270 # Check whether --with-build-cflags or --without-build-cflags was given.
5271 if test "${with_build_cflags+set}" = set; then
5272   withval="$with_build_cflags"
5273   BUILD_CFLAGS="$withval"
5274 fi;
5275         echo "$as_me:5275: result: $BUILD_CFLAGS" >&5
5276 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5277
5278         echo "$as_me:5278: checking for native build C preprocessor-flags" >&5
5279 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5280
5281 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5282 if test "${with_build_cppflags+set}" = set; then
5283   withval="$with_build_cppflags"
5284   BUILD_CPPFLAGS="$withval"
5285 fi;
5286         echo "$as_me:5286: result: $BUILD_CPPFLAGS" >&5
5287 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5288
5289         echo "$as_me:5289: checking for native build linker-flags" >&5
5290 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5291
5292 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5293 if test "${with_build_ldflags+set}" = set; then
5294   withval="$with_build_ldflags"
5295   BUILD_LDFLAGS="$withval"
5296 fi;
5297         echo "$as_me:5297: result: $BUILD_LDFLAGS" >&5
5298 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5299
5300         echo "$as_me:5300: checking for native build linker-libraries" >&5
5301 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5302
5303 # Check whether --with-build-libs or --without-build-libs was given.
5304 if test "${with_build_libs+set}" = set; then
5305   withval="$with_build_libs"
5306   BUILD_LIBS="$withval"
5307 fi;
5308         echo "$as_me:5308: result: $BUILD_LIBS" >&5
5309 echo "${ECHO_T}$BUILD_LIBS" >&6
5310
5311         # this assumes we're on Unix.
5312         BUILD_EXEEXT=
5313         BUILD_OBJEXT=o
5314
5315         : ${BUILD_CC:='${CC}'}
5316
5317         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5318                 { { echo "$as_me:5318: error: Cross-build requires two compilers.
5319 Use --with-build-cc to specify the native compiler." >&5
5320 echo "$as_me: error: Cross-build requires two compilers.
5321 Use --with-build-cc to specify the native compiler." >&2;}
5322    { (exit 1); exit 1; }; }
5323         fi
5324
5325 else
5326         : ${BUILD_CC:='${CC}'}
5327         : ${BUILD_CPP:='${CPP}'}
5328         : ${BUILD_CFLAGS:='${CFLAGS}'}
5329         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5330         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5331         : ${BUILD_LIBS:='${LIBS}'}
5332         : ${BUILD_EXEEXT:='$x'}
5333         : ${BUILD_OBJEXT:='o'}
5334 fi
5335
5336 ###############################################################################
5337
5338 ### Options to allow the user to specify the set of libraries which are used.
5339 ### Use "--without-normal --with-shared" to allow the default model to be
5340 ### shared, for example.
5341 cf_list_models=""
5342
5343 echo "$as_me:5343: checking if libtool -version-number should be used" >&5
5344 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5345
5346 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5347 if test "${enable_libtool_version+set}" = set; then
5348   enableval="$enable_libtool_version"
5349   test "$enableval" != no && enableval=yes
5350         if test "$enableval" != "yes" ; then
5351     cf_libtool_version=no
5352         else
5353                 cf_libtool_version=yes
5354         fi
5355 else
5356   enableval=yes
5357         cf_libtool_version=yes
5358
5359 fi;
5360 echo "$as_me:5360: result: $cf_libtool_version" >&5
5361 echo "${ECHO_T}$cf_libtool_version" >&6
5362
5363 if test "$cf_libtool_version" = yes ; then
5364         LIBTOOL_VERSION="-version-number"
5365 else
5366         LIBTOOL_VERSION="-version-info"
5367         case "x$VERSION" in
5368         (x)
5369                 { echo "$as_me:5369: WARNING: VERSION was not set" >&5
5370 echo "$as_me: WARNING: VERSION was not set" >&2;}
5371                 ;;
5372         (x*.*.*)
5373                 ABI_VERSION="$VERSION"
5374                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5375
5376 echo "${as_me:-configure}:5376: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5377
5378                 ;;
5379         (x*:*:*)
5380                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5381                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5382
5383 echo "${as_me:-configure}:5383: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5384
5385                 ;;
5386         (*)
5387                 { echo "$as_me:5387: WARNING: unexpected VERSION value: $VERSION" >&5
5388 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5389                 ;;
5390         esac
5391 fi
5392
5393 LIBTOOL=
5394
5395 # common library maintenance symbols that are convenient for libtool scripts:
5396 LIB_CREATE='${AR} -cr'
5397 LIB_OBJECT='${OBJECTS}'
5398 LIB_SUFFIX=.a
5399 LIB_PREP="$RANLIB"
5400
5401 # symbols used to prop libtool up to enable it to determine what it should be
5402 # doing:
5403 LIB_CLEAN=
5404 LIB_COMPILE=
5405 LIB_LINK='${CC}'
5406 LIB_INSTALL=
5407 LIB_UNINSTALL=
5408
5409 echo "$as_me:5409: checking if you want to build libraries with libtool" >&5
5410 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5411
5412 # Check whether --with-libtool or --without-libtool was given.
5413 if test "${with_libtool+set}" = set; then
5414   withval="$with_libtool"
5415   with_libtool=$withval
5416 else
5417   with_libtool=no
5418 fi;
5419 echo "$as_me:5419: result: $with_libtool" >&5
5420 echo "${ECHO_T}$with_libtool" >&6
5421 if test "$with_libtool" != "no"; then
5422
5423         if test "$with_libtool" != "yes" ; then
5424
5425 if test "x$prefix" != xNONE; then
5426         cf_path_syntax="$prefix"
5427 else
5428         cf_path_syntax="$ac_default_prefix"
5429 fi
5430
5431 case ".$with_libtool" in
5432 (.\$\(*\)*|.\'*\'*)
5433         ;;
5434 (..|./*|.\\*)
5435         ;;
5436 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5437         ;;
5438 (.\$\{*prefix\}*|.\$\{*dir\}*)
5439         eval with_libtool="$with_libtool"
5440         case ".$with_libtool" in
5441         (.NONE/*)
5442                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5443                 ;;
5444         esac
5445         ;;
5446 (.no|.NONE/*)
5447         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5448         ;;
5449 (*)
5450         { { echo "$as_me:5450: error: expected a pathname, not \"$with_libtool\"" >&5
5451 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5452    { (exit 1); exit 1; }; }
5453         ;;
5454 esac
5455
5456                 LIBTOOL=$with_libtool
5457         else
5458                 if test -n "$ac_tool_prefix"; then
5459   for ac_prog in libtool glibtool
5460   do
5461     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5462 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5463 echo "$as_me:5463: checking for $ac_word" >&5
5464 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5465 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5466   echo $ECHO_N "(cached) $ECHO_C" >&6
5467 else
5468   if test -n "$LIBTOOL"; then
5469   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5470 else
5471   ac_save_IFS=$IFS; IFS=$ac_path_separator
5472 ac_dummy="$PATH"
5473 for ac_dir in $ac_dummy; do
5474   IFS=$ac_save_IFS
5475   test -z "$ac_dir" && ac_dir=.
5476   $as_executable_p "$ac_dir/$ac_word" || continue
5477 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5478 echo "$as_me:5478: found $ac_dir/$ac_word" >&5
5479 break
5480 done
5481
5482 fi
5483 fi
5484 LIBTOOL=$ac_cv_prog_LIBTOOL
5485 if test -n "$LIBTOOL"; then
5486   echo "$as_me:5486: result: $LIBTOOL" >&5
5487 echo "${ECHO_T}$LIBTOOL" >&6
5488 else
5489   echo "$as_me:5489: result: no" >&5
5490 echo "${ECHO_T}no" >&6
5491 fi
5492
5493     test -n "$LIBTOOL" && break
5494   done
5495 fi
5496 if test -z "$LIBTOOL"; then
5497   ac_ct_LIBTOOL=$LIBTOOL
5498   for ac_prog in libtool glibtool
5499 do
5500   # Extract the first word of "$ac_prog", so it can be a program name with args.
5501 set dummy $ac_prog; ac_word=$2
5502 echo "$as_me:5502: checking for $ac_word" >&5
5503 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5504 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5505   echo $ECHO_N "(cached) $ECHO_C" >&6
5506 else
5507   if test -n "$ac_ct_LIBTOOL"; then
5508   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5509 else
5510   ac_save_IFS=$IFS; IFS=$ac_path_separator
5511 ac_dummy="$PATH"
5512 for ac_dir in $ac_dummy; do
5513   IFS=$ac_save_IFS
5514   test -z "$ac_dir" && ac_dir=.
5515   $as_executable_p "$ac_dir/$ac_word" || continue
5516 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5517 echo "$as_me:5517: found $ac_dir/$ac_word" >&5
5518 break
5519 done
5520
5521 fi
5522 fi
5523 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5524 if test -n "$ac_ct_LIBTOOL"; then
5525   echo "$as_me:5525: result: $ac_ct_LIBTOOL" >&5
5526 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5527 else
5528   echo "$as_me:5528: result: no" >&5
5529 echo "${ECHO_T}no" >&6
5530 fi
5531
5532   test -n "$ac_ct_LIBTOOL" && break
5533 done
5534 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5535
5536   LIBTOOL=$ac_ct_LIBTOOL
5537 fi
5538
5539 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5540 then
5541         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.].*//'`
5542 else
5543         cf_cv_libtool_version=
5544 fi
5545 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5546
5547                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5548                 then
5549
5550 unset ac_cv_prog_ac_ct_LIBTOOL
5551 unset ac_ct_LIBTOOL
5552 unset LIBTOOL
5553
5554                         if test -n "$ac_tool_prefix"; then
5555   for ac_prog in glibtool
5556   do
5557     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5558 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5559 echo "$as_me:5559: checking for $ac_word" >&5
5560 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5561 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5562   echo $ECHO_N "(cached) $ECHO_C" >&6
5563 else
5564   if test -n "$LIBTOOL"; then
5565   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5566 else
5567   ac_save_IFS=$IFS; IFS=$ac_path_separator
5568 ac_dummy="$PATH"
5569 for ac_dir in $ac_dummy; do
5570   IFS=$ac_save_IFS
5571   test -z "$ac_dir" && ac_dir=.
5572   $as_executable_p "$ac_dir/$ac_word" || continue
5573 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5574 echo "$as_me:5574: found $ac_dir/$ac_word" >&5
5575 break
5576 done
5577
5578 fi
5579 fi
5580 LIBTOOL=$ac_cv_prog_LIBTOOL
5581 if test -n "$LIBTOOL"; then
5582   echo "$as_me:5582: result: $LIBTOOL" >&5
5583 echo "${ECHO_T}$LIBTOOL" >&6
5584 else
5585   echo "$as_me:5585: result: no" >&5
5586 echo "${ECHO_T}no" >&6
5587 fi
5588
5589     test -n "$LIBTOOL" && break
5590   done
5591 fi
5592 if test -z "$LIBTOOL"; then
5593   ac_ct_LIBTOOL=$LIBTOOL
5594   for ac_prog in glibtool
5595 do
5596   # Extract the first word of "$ac_prog", so it can be a program name with args.
5597 set dummy $ac_prog; ac_word=$2
5598 echo "$as_me:5598: checking for $ac_word" >&5
5599 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5600 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5601   echo $ECHO_N "(cached) $ECHO_C" >&6
5602 else
5603   if test -n "$ac_ct_LIBTOOL"; then
5604   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5605 else
5606   ac_save_IFS=$IFS; IFS=$ac_path_separator
5607 ac_dummy="$PATH"
5608 for ac_dir in $ac_dummy; do
5609   IFS=$ac_save_IFS
5610   test -z "$ac_dir" && ac_dir=.
5611   $as_executable_p "$ac_dir/$ac_word" || continue
5612 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5613 echo "$as_me:5613: found $ac_dir/$ac_word" >&5
5614 break
5615 done
5616
5617 fi
5618 fi
5619 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5620 if test -n "$ac_ct_LIBTOOL"; then
5621   echo "$as_me:5621: result: $ac_ct_LIBTOOL" >&5
5622 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5623 else
5624   echo "$as_me:5624: result: no" >&5
5625 echo "${ECHO_T}no" >&6
5626 fi
5627
5628   test -n "$ac_ct_LIBTOOL" && break
5629 done
5630 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5631
5632   LIBTOOL=$ac_ct_LIBTOOL
5633 fi
5634
5635 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5636 then
5637         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.].*//'`
5638 else
5639         cf_cv_libtool_version=
5640 fi
5641 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5642
5643                 fi
5644         fi
5645         if test -z "$LIBTOOL" ; then
5646                 { { echo "$as_me:5646: error: Cannot find libtool" >&5
5647 echo "$as_me: error: Cannot find libtool" >&2;}
5648    { (exit 1); exit 1; }; }
5649         fi
5650         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5651         LIB_OBJECT='${OBJECTS:.o=.lo}'
5652         LIB_SUFFIX=.la
5653         LIB_CLEAN='${LIBTOOL} --mode=clean'
5654         LIB_COMPILE='${LIBTOOL} --mode=compile'
5655         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5656         LIB_INSTALL='${LIBTOOL} --mode=install'
5657         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5658         LIB_PREP=:
5659
5660 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5661 then
5662         echo "$as_me:5662: checking version of $LIBTOOL" >&5
5663 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5664
5665 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5666 then
5667         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.].*//'`
5668 else
5669         cf_cv_libtool_version=
5670 fi
5671 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5672
5673         echo "$as_me:5673: result: $cf_cv_libtool_version" >&5
5674 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5675         if test -n "$cf_cv_libtool_version"
5676         then
5677                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5678                 case "x$cf_check_libtool_version" in
5679                 (*...GNU-libtool...*)
5680                         ;;
5681                 (*)
5682                         { { echo "$as_me:5682: error: This is not GNU libtool" >&5
5683 echo "$as_me: error: This is not GNU libtool" >&2;}
5684    { (exit 1); exit 1; }; }
5685                         ;;
5686                 esac
5687         else
5688                 { { echo "$as_me:5688: error: No version found for $LIBTOOL" >&5
5689 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5690    { (exit 1); exit 1; }; }
5691         fi
5692 else
5693         { { echo "$as_me:5693: error: GNU libtool has not been found" >&5
5694 echo "$as_me: error: GNU libtool has not been found" >&2;}
5695    { (exit 1); exit 1; }; }
5696 fi
5697
5698         # special hack to add -no-undefined (which libtool should do for itself)
5699         LT_UNDEF=
5700         case "$cf_cv_system_name" in
5701         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5702                 LT_UNDEF=-no-undefined
5703                 ;;
5704         esac
5705
5706         # special hack to add --tag option for C++ compiler
5707         case "$cf_cv_libtool_version" in
5708         (1.[5-9]*|[2-9].[0-9.a-z]*)
5709                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5710                 LIBTOOL="$LIBTOOL --tag=CC"
5711                 ;;
5712         (*)
5713                 LIBTOOL_CXX="$LIBTOOL"
5714                 ;;
5715         esac
5716 else
5717         LIBTOOL=""
5718         LIBTOOL_CXX=""
5719 fi
5720
5721 test -z "$LIBTOOL" && ECHO_LT=
5722
5723 if test "$with_libtool" != "no" ; then
5724
5725 cf_list_models="$cf_list_models libtool"
5726
5727 else
5728
5729 echo "$as_me:5729: checking if you want to build shared libraries" >&5
5730 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5731
5732 # Check whether --with-shared or --without-shared was given.
5733 if test "${with_shared+set}" = set; then
5734   withval="$with_shared"
5735   with_shared=$withval
5736 else
5737   with_shared=no
5738 fi;
5739 echo "$as_me:5739: result: $with_shared" >&5
5740 echo "${ECHO_T}$with_shared" >&6
5741 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5742
5743 echo "$as_me:5743: checking if you want to build static libraries" >&5
5744 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5745
5746 # Check whether --with-normal or --without-normal was given.
5747 if test "${with_normal+set}" = set; then
5748   withval="$with_normal"
5749   with_normal=$withval
5750 else
5751   with_normal=yes
5752 fi;
5753 echo "$as_me:5753: result: $with_normal" >&5
5754 echo "${ECHO_T}$with_normal" >&6
5755 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5756
5757 echo "$as_me:5757: checking if you want to build debug libraries" >&5
5758 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5759
5760 # Check whether --with-debug or --without-debug was given.
5761 if test "${with_debug+set}" = set; then
5762   withval="$with_debug"
5763   with_debug=$withval
5764 else
5765   with_debug=yes
5766 fi;
5767 echo "$as_me:5767: result: $with_debug" >&5
5768 echo "${ECHO_T}$with_debug" >&6
5769 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5770
5771 echo "$as_me:5771: checking if you want to build profiling libraries" >&5
5772 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5773
5774 # Check whether --with-profile or --without-profile was given.
5775 if test "${with_profile+set}" = set; then
5776   withval="$with_profile"
5777   with_profile=$withval
5778 else
5779   with_profile=no
5780 fi;
5781 echo "$as_me:5781: result: $with_profile" >&5
5782 echo "${ECHO_T}$with_profile" >&6
5783 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5784
5785 fi
5786
5787 if test "X$cf_with_cxx_binding" != Xno; then
5788 if test "x$with_shared" = "xyes"; then
5789 echo "$as_me:5789: checking if you want to build C++ shared libraries" >&5
5790 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5791
5792 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5793 if test "${with_cxx_shared+set}" = set; then
5794   withval="$with_cxx_shared"
5795   with_shared_cxx=$withval
5796 else
5797   with_shared_cxx=no
5798 fi;
5799 echo "$as_me:5799: result: $with_shared_cxx" >&5
5800 echo "${ECHO_T}$with_shared_cxx" >&6
5801 fi
5802 fi
5803
5804 ###############################################################################
5805
5806 echo "$as_me:5806: checking for specified models" >&5
5807 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5808 test -z "$cf_list_models" && cf_list_models=normal
5809 test "$with_libtool" != "no" && cf_list_models=libtool
5810 echo "$as_me:5810: result: $cf_list_models" >&5
5811 echo "${ECHO_T}$cf_list_models" >&6
5812
5813 ### Use the first model as the default, and save its suffix for use in building
5814 ### up test-applications.
5815 echo "$as_me:5815: checking for default model" >&5
5816 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5817 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5818 echo "$as_me:5818: result: $DFT_LWR_MODEL" >&5
5819 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5820
5821 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5822
5823 TICS_NAME=tic
5824
5825 TINFO_NAME=tinfo
5826
5827 LIB_NAME=ncurses
5828
5829 LIB_DIR=../lib
5830 LIB_2ND=../../lib
5831
5832 echo "$as_me:5832: checking if you want to have a library-prefix" >&5
5833 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5834
5835 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5836 if test "${with_lib_prefix+set}" = set; then
5837   withval="$with_lib_prefix"
5838   with_lib_prefix=$withval
5839 else
5840   with_lib_prefix=auto
5841 fi;
5842 echo "$as_me:5842: result: $with_lib_prefix" >&5
5843 echo "${ECHO_T}$with_lib_prefix" >&6
5844
5845 if test "$with_lib_prefix" = auto
5846 then
5847
5848         case "$cf_cv_system_name" in
5849         (OS/2*|os2*)
5850                 if test "$DFT_LWR_MODEL" = libtool; then
5851                         LIB_PREFIX='lib'
5852                 else
5853                         LIB_PREFIX=''
5854                 fi
5855                 ;;
5856         (*-msvc*)
5857                 LIB_PREFIX=''
5858                 ;;
5859         (*)     LIB_PREFIX='lib'
5860                 ;;
5861         esac
5862 cf_prefix=$LIB_PREFIX
5863
5864 elif test "$with_lib_prefix" = no
5865 then
5866         LIB_PREFIX=
5867 else
5868         LIB_PREFIX=$with_lib_prefix
5869 fi
5870
5871 LIB_SUFFIX=
5872
5873         echo "$as_me:5873: checking for PATH separator" >&5
5874 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5875         case "$cf_cv_system_name" in
5876         (os2*)  PATH_SEPARATOR=';'  ;;
5877         (*)     ${PATH_SEPARATOR:=':'}  ;;
5878         esac
5879
5880         echo "$as_me:5880: result: $PATH_SEPARATOR" >&5
5881 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5882
5883 ###############################################################################
5884
5885 echo "$as_me:5885: checking if you want to build a separate terminfo library" >&5
5886 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5887
5888 # Check whether --with-termlib or --without-termlib was given.
5889 if test "${with_termlib+set}" = set; then
5890   withval="$with_termlib"
5891   with_termlib=$withval
5892 else
5893   with_termlib=no
5894 fi;
5895 echo "$as_me:5895: result: $with_termlib" >&5
5896 echo "${ECHO_T}$with_termlib" >&6
5897
5898 echo "$as_me:5898: checking if you want to build a separate tic library" >&5
5899 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5900
5901 # Check whether --with-ticlib or --without-ticlib was given.
5902 if test "${with_ticlib+set}" = set; then
5903   withval="$with_ticlib"
5904   with_ticlib=$withval
5905 else
5906   with_ticlib=no
5907 fi;
5908 echo "$as_me:5908: result: $with_ticlib" >&5
5909 echo "${ECHO_T}$with_ticlib" >&6
5910
5911 if test X"$CC_G_OPT" = X"" ; then
5912         CC_G_OPT='-g'
5913         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5914 fi
5915
5916 if test X"$CXX_G_OPT" = X"" ; then
5917         CXX_G_OPT='-g'
5918         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5919 fi
5920
5921 echo "$as_me:5921: checking for default loader flags" >&5
5922 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5923 case "$DFT_LWR_MODEL" in
5924 (libtool) LD_MODEL=''   ;;
5925 (normal)  LD_MODEL=''   ;;
5926 (debug)   LD_MODEL=$CC_G_OPT ;;
5927 (profile) LD_MODEL='-pg';;
5928 (shared)  LD_MODEL=''   ;;
5929 esac
5930 echo "$as_me:5930: result: $LD_MODEL" >&5
5931 echo "${ECHO_T}$LD_MODEL" >&6
5932
5933 case "$DFT_LWR_MODEL" in
5934 (shared)
5935
5936 echo "$as_me:5936: checking if rpath option should be used" >&5
5937 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5938
5939 # Check whether --enable-rpath or --disable-rpath was given.
5940 if test "${enable_rpath+set}" = set; then
5941   enableval="$enable_rpath"
5942   cf_cv_enable_rpath=$enableval
5943 else
5944   cf_cv_enable_rpath=no
5945 fi;
5946 echo "$as_me:5946: result: $cf_cv_enable_rpath" >&5
5947 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5948
5949 echo "$as_me:5949: checking if shared libraries should be relinked during install" >&5
5950 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5951
5952 # Check whether --enable-relink or --disable-relink was given.
5953 if test "${enable_relink+set}" = set; then
5954   enableval="$enable_relink"
5955   cf_cv_do_relink=$enableval
5956 else
5957   cf_cv_do_relink=yes
5958 fi;
5959 echo "$as_me:5959: result: $cf_cv_do_relink" >&5
5960 echo "${ECHO_T}$cf_cv_do_relink" >&6
5961         ;;
5962 esac
5963
5964 # we will build libraries one-level down.
5965 rel_builddir=..
5966
5967 LD_RPATH_OPT=
5968 if test "x$cf_cv_enable_rpath" != xno
5969 then
5970         echo "$as_me:5970: checking for an rpath option" >&5
5971 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5972         case "$cf_cv_system_name" in
5973         (irix*)
5974                 if test "$GCC" = yes; then
5975                         LD_RPATH_OPT="-Wl,-rpath,"
5976                 else
5977                         LD_RPATH_OPT="-rpath "
5978                 fi
5979                 ;;
5980         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5981                 LD_RPATH_OPT="-Wl,-rpath,"
5982                 ;;
5983         (openbsd[2-9].*|mirbsd*)
5984                 LD_RPATH_OPT="-Wl,-rpath,"
5985                 ;;
5986         (dragonfly*)
5987                 LD_RPATH_OPT="-rpath "
5988                 ;;
5989         (netbsd*)
5990                 LD_RPATH_OPT="-Wl,-rpath,"
5991                 ;;
5992         (osf*|mls+*)
5993                 LD_RPATH_OPT="-rpath "
5994                 ;;
5995         (solaris2*)
5996                 LD_RPATH_OPT="-R"
5997                 ;;
5998         (*)
5999                 ;;
6000         esac
6001         echo "$as_me:6001: result: $LD_RPATH_OPT" >&5
6002 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6003
6004         case "x$LD_RPATH_OPT" in
6005         (x-R*)
6006                 echo "$as_me:6006: checking if we need a space after rpath option" >&5
6007 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6008                 cf_save_LIBS="$LIBS"
6009
6010 cf_add_libs="$LIBS"
6011 # reverse order
6012 cf_add_0lib=
6013 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6014 # filter duplicates
6015 for cf_add_1lib in $cf_add_0lib; do
6016         for cf_add_2lib in $cf_add_libs; do
6017                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6018                         cf_add_1lib=
6019                         break
6020                 fi
6021         done
6022         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6023 done
6024 LIBS="$cf_add_libs"
6025
6026                 cat >"conftest.$ac_ext" <<_ACEOF
6027 #line 6027 "configure"
6028 #include "confdefs.h"
6029
6030 int
6031 main (void)
6032 {
6033
6034   ;
6035   return 0;
6036 }
6037 _ACEOF
6038 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6039 if { (eval echo "$as_me:6039: \"$ac_link\"") >&5
6040   (eval $ac_link) 2>&5
6041   ac_status=$?
6042   echo "$as_me:6042: \$? = $ac_status" >&5
6043   (exit "$ac_status"); } &&
6044          { ac_try='test -s "conftest$ac_exeext"'
6045   { (eval echo "$as_me:6045: \"$ac_try\"") >&5
6046   (eval $ac_try) 2>&5
6047   ac_status=$?
6048   echo "$as_me:6048: \$? = $ac_status" >&5
6049   (exit "$ac_status"); }; }; then
6050   cf_rpath_space=no
6051 else
6052   echo "$as_me: failed program was:" >&5
6053 cat "conftest.$ac_ext" >&5
6054 cf_rpath_space=yes
6055 fi
6056 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6057                 LIBS="$cf_save_LIBS"
6058                 echo "$as_me:6058: result: $cf_rpath_space" >&5
6059 echo "${ECHO_T}$cf_rpath_space" >&6
6060                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6061                 ;;
6062         esac
6063 fi
6064
6065         RM_SHARED_OPTS=
6066         LOCAL_LDFLAGS=
6067         LOCAL_LDFLAGS2=
6068         LD_SHARED_OPTS=
6069         INSTALL_LIB="-m 644"
6070         : ${rel_builddir:=.}
6071
6072         shlibdir=$libdir
6073
6074         MAKE_DLLS="#"
6075
6076         cf_cv_do_symlinks=no
6077         cf_ld_rpath_opt=
6078         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6079
6080         echo "$as_me:6080: checking if release/abi version should be used for shared libs" >&5
6081 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6082
6083 # Check whether --with-shlib-version or --without-shlib-version was given.
6084 if test "${with_shlib_version+set}" = set; then
6085   withval="$with_shlib_version"
6086   test -z "$withval" && withval=auto
6087         case "$withval" in
6088         (yes)
6089                 cf_cv_shlib_version=auto
6090                 ;;
6091         (rel|abi|auto)
6092                 cf_cv_shlib_version=$withval
6093                 ;;
6094         (*)
6095                 echo "$as_me:6095: result: $withval" >&5
6096 echo "${ECHO_T}$withval" >&6
6097                 { { echo "$as_me:6097: error: option value must be one of: rel, abi, or auto" >&5
6098 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6099    { (exit 1); exit 1; }; }
6100                 ;;
6101         esac
6102
6103 else
6104   cf_cv_shlib_version=auto
6105 fi;
6106         echo "$as_me:6106: result: $cf_cv_shlib_version" >&5
6107 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6108
6109         cf_cv_rm_so_locs=no
6110         cf_try_cflags=
6111
6112         # Some less-capable ports of gcc support only -fpic
6113         CC_SHARED_OPTS=
6114
6115         cf_try_fPIC=no
6116         if test "$GCC" = yes
6117         then
6118                 cf_try_fPIC=yes
6119         else
6120                 case "$cf_cv_system_name" in
6121                 (*linux*)       # e.g., PGI compiler
6122                         cf_try_fPIC=yes
6123                         ;;
6124                 esac
6125         fi
6126
6127         if test "$cf_try_fPIC" = yes
6128         then
6129                 echo "$as_me:6129: checking which $CC option to use" >&5
6130 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6131                 cf_save_CFLAGS="$CFLAGS"
6132                 for CC_SHARED_OPTS in -fPIC -fpic ''
6133                 do
6134                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6135                         cat >"conftest.$ac_ext" <<_ACEOF
6136 #line 6136 "configure"
6137 #include "confdefs.h"
6138 #include <stdio.h>
6139 int
6140 main (void)
6141 {
6142 int x = 1
6143   ;
6144   return 0;
6145 }
6146 _ACEOF
6147 rm -f "conftest.$ac_objext"
6148 if { (eval echo "$as_me:6148: \"$ac_compile\"") >&5
6149   (eval $ac_compile) 2>&5
6150   ac_status=$?
6151   echo "$as_me:6151: \$? = $ac_status" >&5
6152   (exit "$ac_status"); } &&
6153          { ac_try='test -s "conftest.$ac_objext"'
6154   { (eval echo "$as_me:6154: \"$ac_try\"") >&5
6155   (eval $ac_try) 2>&5
6156   ac_status=$?
6157   echo "$as_me:6157: \$? = $ac_status" >&5
6158   (exit "$ac_status"); }; }; then
6159   break
6160 else
6161   echo "$as_me: failed program was:" >&5
6162 cat "conftest.$ac_ext" >&5
6163 fi
6164 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6165                 done
6166                 echo "$as_me:6166: result: $CC_SHARED_OPTS" >&5
6167 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6168                 CFLAGS="$cf_save_CFLAGS"
6169         fi
6170
6171         cf_cv_shlib_version_infix=no
6172
6173         case "$cf_cv_system_name" in
6174         (aix4.3-9*|aix[5-7]*)
6175                 if test "$GCC" = yes; then
6176                         CC_SHARED_OPTS='-Wl,-brtl'
6177                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6178                 else
6179                         CC_SHARED_OPTS='-brtl'
6180                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6181                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6182                 fi
6183                 ;;
6184         (beos*)
6185                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6186                 ;;
6187         (cygwin*)
6188                 CC_SHARED_OPTS=
6189                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6190                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6191                 cf_cv_shlib_version=cygdll
6192                 cf_cv_shlib_version_infix=cygdll
6193                 shlibdir=$bindir
6194                 MAKE_DLLS=
6195                 cat >mk_shared_lib.sh <<-CF_EOF
6196                 #!$SHELL
6197                 SHARED_LIB=\$1
6198                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6199                 shift
6200                 cat <<-EOF
6201                 Linking shared library
6202                 ** SHARED_LIB \$SHARED_LIB
6203                 ** IMPORT_LIB \$IMPORT_LIB
6204 EOF
6205                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6206 CF_EOF
6207                 chmod +x mk_shared_lib.sh
6208                 ;;
6209         (msys*)
6210                 CC_SHARED_OPTS=
6211                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6212                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6213                 cf_cv_shlib_version=msysdll
6214                 cf_cv_shlib_version_infix=msysdll
6215                 shlibdir=$bindir
6216                 MAKE_DLLS=
6217                 cat >mk_shared_lib.sh <<-CF_EOF
6218                 #!$SHELL
6219                 SHARED_LIB=\$1
6220                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6221                 shift
6222                 cat <<-EOF
6223                 Linking shared library
6224                 ** SHARED_LIB \$SHARED_LIB
6225                 ** IMPORT_LIB \$IMPORT_LIB
6226 EOF
6227                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6228 CF_EOF
6229                 chmod +x mk_shared_lib.sh
6230                 ;;
6231         (darwin*)
6232                 cf_try_cflags="no-cpp-precomp"
6233                 CC_SHARED_OPTS="-dynamic"
6234                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6235                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6236                 cf_cv_shlib_version_infix=yes
6237                 echo "$as_me:6237: checking if ld -search_paths_first works" >&5
6238 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6239 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6240   echo $ECHO_N "(cached) $ECHO_C" >&6
6241 else
6242
6243                         cf_save_LDFLAGS=$LDFLAGS
6244                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6245                         cat >"conftest.$ac_ext" <<_ACEOF
6246 #line 6246 "configure"
6247 #include "confdefs.h"
6248
6249 int
6250 main (void)
6251 {
6252 int i;
6253   ;
6254   return 0;
6255 }
6256 _ACEOF
6257 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6258 if { (eval echo "$as_me:6258: \"$ac_link\"") >&5
6259   (eval $ac_link) 2>&5
6260   ac_status=$?
6261   echo "$as_me:6261: \$? = $ac_status" >&5
6262   (exit "$ac_status"); } &&
6263          { ac_try='test -s "conftest$ac_exeext"'
6264   { (eval echo "$as_me:6264: \"$ac_try\"") >&5
6265   (eval $ac_try) 2>&5
6266   ac_status=$?
6267   echo "$as_me:6267: \$? = $ac_status" >&5
6268   (exit "$ac_status"); }; }; then
6269   cf_cv_ldflags_search_paths_first=yes
6270 else
6271   echo "$as_me: failed program was:" >&5
6272 cat "conftest.$ac_ext" >&5
6273 cf_cv_ldflags_search_paths_first=no
6274 fi
6275 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6276                                 LDFLAGS=$cf_save_LDFLAGS
6277 fi
6278 echo "$as_me:6278: result: $cf_cv_ldflags_search_paths_first" >&5
6279 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6280                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6281                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6282                 fi
6283                 ;;
6284         (haiku*)
6285
6286         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6287         if test "$cf_cv_shlib_version" = rel; then
6288                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6289         else
6290                 cf_cv_shared_soname='`basename $@`'
6291         fi
6292
6293                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6294                 ;;
6295         (hpux[7-8]*)
6296                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6297                 if test "$GCC" != yes; then
6298                         CC_SHARED_OPTS='+Z'
6299                 fi
6300                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6301                 INSTALL_LIB="-m 555"
6302                 ;;
6303         (hpux*)
6304                 # (tested with gcc 2.7.2 -- I don't have c89)
6305                 if test "$GCC" = yes; then
6306                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6307                 else
6308                         CC_SHARED_OPTS='+Z'
6309                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6310                 fi
6311                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6312                 # HP-UX shared libraries must be executable, and should be
6313                 # readonly to exploit a quirk in the memory manager.
6314                 INSTALL_LIB="-m 555"
6315                 ;;
6316         (interix*)
6317                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6318                 if test "$cf_cv_shlib_version" = rel; then
6319                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6320                 else
6321                         cf_shared_soname='`basename $@`'
6322                 fi
6323                 CC_SHARED_OPTS=
6324                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6325                 ;;
6326         (irix*)
6327                 if test "$cf_cv_enable_rpath" = yes ; then
6328                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6329                 fi
6330                 # tested with IRIX 5.2 and 'cc'.
6331                 if test "$GCC" != yes; then
6332                         CC_SHARED_OPTS='-KPIC'
6333                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6334                 else
6335                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6336                 fi
6337                 cf_cv_rm_so_locs=yes
6338                 ;;
6339         (linux*|gnu*|k*bsd*-gnu)
6340                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6341                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6342                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6343                 fi
6344                 if test "$cf_cv_enable_rpath" = yes ; then
6345                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6346                 fi
6347
6348         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6349         if test "$cf_cv_shlib_version" = rel; then
6350                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6351         else
6352                 cf_cv_shared_soname='`basename $@`'
6353         fi
6354
6355                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6356                 ;;
6357         (mingw*msvc*)
6358                 cf_cv_shlib_version=msvcdll
6359                 cf_cv_shlib_version_infix=msvcdll
6360                 shlibdir=$bindir
6361                 MAKE_DLLS=
6362                 if test "$DFT_LWR_MODEL" = "shared" ; then
6363                         LOCAL_LDFLAGS="-link -dll"
6364                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6365                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6366                 fi
6367                 CC_SHARED_OPTS=
6368                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6369                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6370                 cat >mk_shared_lib.sh <<-CF_EOF
6371                 #!$SHELL
6372                 SHARED_LIB=\$1
6373                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6374                 shift
6375                 my_ld=\$1
6376                 shift
6377                 cat <<-EOF
6378                 Linking shared library
6379                 ** SHARED LIB \$SHARED_LIB
6380                 ** IMPORT_LIB \$IMPORT_LIB
6381 EOF
6382                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6383                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6384                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6385 CF_EOF
6386                 chmod +x mk_shared_lib.sh
6387                 cat >mk_prog.sh <<-CF_EOF
6388                 #!$SHELL
6389                 shift
6390                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6391                 LD="$LD"
6392                 clopts=()
6393                 ldopts=("/subsystem:console")
6394                 libs=()
6395                 isdll=0
6396                 while test \$# -gt 0; do
6397                         case "\$1" in
6398                                 -link)
6399                                         # ignore -link argument
6400                                         ;;
6401                                 -M[TD] | -M[TD]d)
6402                                         # ignore runtime-library option
6403                                         ;;
6404                                 -dll)
6405                                         isdll=1
6406                                         ;;
6407                                 -W* | -w*)
6408                                         # ignore warnings
6409                                         ;;
6410                                 -D*)
6411                                         clopts+=("\$1")
6412                                         ;;
6413                                 -I*)
6414                                         clopts+=("\$1")
6415                                         ;;
6416                                 -l*)
6417                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6418                                         ;;
6419                                 -L*)
6420                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6421                                         ;;
6422                                 *.obj | *.o)
6423                                         ldopts+=("\$1")
6424                                         ;;
6425                                 -Wl,*)
6426                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6427                                                 ldopts+=("\${linkarg}")
6428                                         done
6429                                         ;;
6430                                 *.lib)
6431                                         ldopts+=("\$1")
6432                                         ;;
6433                                 -o)
6434                                         shift
6435                                         ldopts+=("-out:\$1")
6436                                         ;;
6437                                 *)
6438                                         clopts+=("\$1")
6439                                         ldopts+=("\$1")
6440                                         ;;
6441                         esac
6442                         shift
6443                 done
6444                 if [ "\$isdll" -ne 0 ]; then
6445                         for lib in \${libs[*]}; do
6446                                 ldopts+=("\$lib.dll.lib")
6447                         done
6448                 else
6449                         for lib in \${libs[*]}; do
6450                                 ldopts+=("\$lib.lib")
6451                         done
6452                 fi
6453                 cat <<-EOF
6454                 Creating program
6455                 ** ld options:   "\${ldopts[@]}"
6456 EOF
6457                 exec \$LD \${ldopts[@]}
6458 CF_EOF
6459                 chmod +x mk_prog.sh
6460                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6461                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6462                 ;;
6463         (mingw*)
6464                 cf_cv_shlib_version=mingw
6465                 cf_cv_shlib_version_infix=mingw
6466                 shlibdir=$bindir
6467                 MAKE_DLLS=
6468                 if test "$DFT_LWR_MODEL" = "shared" ; then
6469                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6470                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6471                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6472                 fi
6473                 CC_SHARED_OPTS=
6474                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6475                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6476                 cat >mk_shared_lib.sh <<-CF_EOF
6477                 #!$SHELL
6478                 SHARED_LIB=\$1
6479                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6480                 shift
6481                 cat <<-EOF
6482                 Linking shared library
6483                 ** SHARED_LIB \$SHARED_LIB
6484                 ** IMPORT_LIB \$IMPORT_LIB
6485 EOF
6486                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6487 CF_EOF
6488                 chmod +x mk_shared_lib.sh
6489                 ;;
6490         (openbsd[2-9].*|mirbsd*)
6491                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6492                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6493                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6494                 fi
6495                 if test "$cf_cv_enable_rpath" = yes ; then
6496                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6497                 fi
6498                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6499
6500         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6501         if test "$cf_cv_shlib_version" = rel; then
6502                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6503         else
6504                 cf_cv_shared_soname='`basename $@`'
6505         fi
6506
6507                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6508                 ;;
6509         (nskJ*)
6510                 CC_SHARED_OPTS=
6511                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6512                 ;;
6513         (nskL*)
6514                 CC_SHARED_OPTS=
6515                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6516                 ;;
6517         (nto-qnx*|openbsd*|freebsd[12].*)
6518                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6519                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6520                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6521                 ;;
6522         (dragonfly*|freebsd*)
6523                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6524                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6525                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6526                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6527                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6528                 fi
6529
6530         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6531         if test "$cf_cv_shlib_version" = rel; then
6532                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6533         else
6534                 cf_cv_shared_soname='`basename $@`'
6535         fi
6536
6537                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6538                 ;;
6539         (netbsd*)
6540                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6541                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6542                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6543                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6544                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6545                         if test "$cf_cv_shlib_version" = auto; then
6546                         if test -f /usr/libexec/ld.elf_so; then
6547                                 cf_cv_shlib_version=abi
6548                         else
6549                                 cf_cv_shlib_version=rel
6550                         fi
6551                         fi
6552
6553         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6554         if test "$cf_cv_shlib_version" = rel; then
6555                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6556         else
6557                 cf_cv_shared_soname='`basename $@`'
6558         fi
6559
6560                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6561                 else
6562                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6563                 fi
6564                 ;;
6565         (osf*|mls+*)
6566                 # tested with OSF/1 V3.2 and 'cc'
6567                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6568                 # link with shared libs).
6569                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6570                 case "$host_os" in
6571                 (osf4*)
6572                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6573                         ;;
6574                 esac
6575                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6576                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6577                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6578                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6579                 fi
6580                 cf_cv_rm_so_locs=yes
6581                 ;;
6582         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6583                 # tested with osr5.0.5
6584                 if test "$GCC" != yes; then
6585                         CC_SHARED_OPTS='-belf -KPIC'
6586                 fi
6587                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6588                 if test "$cf_cv_enable_rpath" = yes ; then
6589                         # only way is to set LD_RUN_PATH but no switch for it
6590                         RUN_PATH=$libdir
6591                 fi
6592                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6593                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6594                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6595                 ;;
6596         (sunos4*)
6597                 # tested with SunOS 4.1.1 and gcc 2.7.0
6598                 if test "$GCC" != yes; then
6599                         CC_SHARED_OPTS='-KPIC'
6600                 fi
6601                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6602                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6603                 ;;
6604         (solaris2*)
6605                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6606                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6607                 if test "$DFT_LWR_MODEL" = "shared" ; then
6608                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6609                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6610                 fi
6611                 if test "$cf_cv_enable_rpath" = yes ; then
6612                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6613                 fi
6614
6615         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6616         if test "$cf_cv_shlib_version" = rel; then
6617                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6618         else
6619                 cf_cv_shared_soname='`basename $@`'
6620         fi
6621
6622                 if test "$GCC" != yes; then
6623                         cf_save_CFLAGS="$CFLAGS"
6624                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6625                         do
6626                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6627                                 cat >"conftest.$ac_ext" <<_ACEOF
6628 #line 6628 "configure"
6629 #include "confdefs.h"
6630 #include <stdio.h>
6631 int
6632 main (void)
6633 {
6634 printf("Hello\\n");
6635   ;
6636   return 0;
6637 }
6638 _ACEOF
6639 rm -f "conftest.$ac_objext"
6640 if { (eval echo "$as_me:6640: \"$ac_compile\"") >&5
6641   (eval $ac_compile) 2>&5
6642   ac_status=$?
6643   echo "$as_me:6643: \$? = $ac_status" >&5
6644   (exit "$ac_status"); } &&
6645          { ac_try='test -s "conftest.$ac_objext"'
6646   { (eval echo "$as_me:6646: \"$ac_try\"") >&5
6647   (eval $ac_try) 2>&5
6648   ac_status=$?
6649   echo "$as_me:6649: \$? = $ac_status" >&5
6650   (exit "$ac_status"); }; }; then
6651   break
6652 else
6653   echo "$as_me: failed program was:" >&5
6654 cat "conftest.$ac_ext" >&5
6655 fi
6656 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6657                         done
6658                         CFLAGS="$cf_save_CFLAGS"
6659                         CC_SHARED_OPTS=$cf_shared_opts
6660                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6661                 else
6662                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6663                 fi
6664                 ;;
6665         (sysv5uw7*|unix_sv*)
6666                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6667                 if test "$GCC" != yes; then
6668                         CC_SHARED_OPTS='-KPIC'
6669                 fi
6670                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6671                 ;;
6672         (*)
6673                 CC_SHARED_OPTS='unknown'
6674                 MK_SHARED_LIB='echo unknown'
6675                 ;;
6676         esac
6677
6678         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6679         case "$cf_cv_shlib_version" in
6680         (rel|abi)
6681                 case "$MK_SHARED_LIB" in
6682                 (*'-o $@')
6683                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6684                         ;;
6685                 (*)
6686                         { echo "$as_me:6686: WARNING: ignored --with-shlib-version" >&5
6687 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6688                         ;;
6689                 esac
6690                 ;;
6691         esac
6692
6693         if test -n "$cf_try_cflags"
6694         then
6695 cat > conftest.$ac_ext <<EOF
6696 #line 6696 "${as_me:-configure}"
6697 #include <stdio.h>
6698 int main(int argc, char *argv[])
6699 {
6700         printf("hello\\n");
6701         return (argv[argc-1] == 0) ;
6702 }
6703 EOF
6704                 cf_save_CFLAGS="$CFLAGS"
6705                 for cf_opt in $cf_try_cflags
6706                 do
6707                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6708                         echo "$as_me:6708: checking if CFLAGS option -$cf_opt works" >&5
6709 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6710                         if { (eval echo "$as_me:6710: \"$ac_compile\"") >&5
6711   (eval $ac_compile) 2>&5
6712   ac_status=$?
6713   echo "$as_me:6713: \$? = $ac_status" >&5
6714   (exit "$ac_status"); }; then
6715                                 echo "$as_me:6715: result: yes" >&5
6716 echo "${ECHO_T}yes" >&6
6717                                 cf_save_CFLAGS="$CFLAGS"
6718                         else
6719                                 echo "$as_me:6719: result: no" >&5
6720 echo "${ECHO_T}no" >&6
6721                         fi
6722                 done
6723                 CFLAGS="$cf_save_CFLAGS"
6724         fi
6725
6726         # RPATH_LIST is a colon-separated list of directories
6727         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6728         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6729
6730         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6731
6732         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6733
6734 echo "${as_me:-configure}:6734: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6735
6736         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6737
6738 echo "${as_me:-configure}:6738: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6739
6740 for model in $cf_list_models ; do
6741         case "$model" in
6742         (libtool)
6743
6744 echo "$as_me:6744: checking for additional libtool options" >&5
6745 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6746
6747 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6748 if test "${with_libtool_opts+set}" = set; then
6749   withval="$with_libtool_opts"
6750   with_libtool_opts=$withval
6751 else
6752   with_libtool_opts=no
6753 fi;
6754 echo "$as_me:6754: result: $with_libtool_opts" >&5
6755 echo "${ECHO_T}$with_libtool_opts" >&6
6756
6757 case .$with_libtool_opts in
6758 (.yes|.no|.)
6759         ;;
6760 (*)
6761         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6762         ;;
6763 esac
6764
6765 echo "$as_me:6765: checking if exported-symbols file should be used" >&5
6766 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6767
6768 # Check whether --with-export-syms or --without-export-syms was given.
6769 if test "${with_export_syms+set}" = set; then
6770   withval="$with_export_syms"
6771   with_export_syms=$withval
6772 else
6773   with_export_syms=no
6774 fi;
6775 if test "x$with_export_syms" = xyes
6776 then
6777         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6778
6779 fi
6780 echo "$as_me:6780: result: $with_export_syms" >&5
6781 echo "${ECHO_T}$with_export_syms" >&6
6782 if test "x$with_export_syms" != xno
6783 then
6784         EXPORT_SYMS="-export-symbols $with_export_syms"
6785
6786 fi
6787
6788                 ;;
6789         (shared)
6790                 if test "$CC_SHARED_OPTS" = "unknown"; then
6791                         { { echo "$as_me:6791: error: Shared libraries are not supported in this version" >&5
6792 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6793    { (exit 1); exit 1; }; }
6794                 fi
6795                 # workaround for inept transition to PIE vs PIC...
6796                 echo "$as_me:6796: checking if current CFLAGS link properly" >&5
6797 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6798                 cat >"conftest.$ac_ext" <<_ACEOF
6799 #line 6799 "configure"
6800 #include "confdefs.h"
6801 #include <stdio.h>
6802 int
6803 main (void)
6804 {
6805 printf("Hello work\\n");
6806   ;
6807   return 0;
6808 }
6809 _ACEOF
6810 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6811 if { (eval echo "$as_me:6811: \"$ac_link\"") >&5
6812   (eval $ac_link) 2>&5
6813   ac_status=$?
6814   echo "$as_me:6814: \$? = $ac_status" >&5
6815   (exit "$ac_status"); } &&
6816          { ac_try='test -s "conftest$ac_exeext"'
6817   { (eval echo "$as_me:6817: \"$ac_try\"") >&5
6818   (eval $ac_try) 2>&5
6819   ac_status=$?
6820   echo "$as_me:6820: \$? = $ac_status" >&5
6821   (exit "$ac_status"); }; }; then
6822   cf_cflags_work=yes
6823 else
6824   echo "$as_me: failed program was:" >&5
6825 cat "conftest.$ac_ext" >&5
6826 cf_cflags_work=no
6827 fi
6828 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6829                 echo "$as_me:6829: result: $cf_cflags_work" >&5
6830 echo "${ECHO_T}$cf_cflags_work" >&6
6831                 if test "$cf_cflags_work" = no
6832                 then
6833                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6834
6835 echo "${as_me:-configure}:6835: testing try to work around by appending shared-options ..." 1>&5
6836
6837                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6838                 fi
6839
6840 echo "$as_me:6840: checking if versioned-symbols file should be used" >&5
6841 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6842
6843 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6844 if test "${with_versioned_syms+set}" = set; then
6845   withval="$with_versioned_syms"
6846   with_versioned_syms=$withval
6847 else
6848   with_versioned_syms=no
6849 fi;
6850 case "x$with_versioned_syms" in
6851 (xyes)
6852         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6853
6854         ;;
6855 (xno)
6856         ;;
6857 (x/*)
6858         test -f "$with_versioned_syms" || { { echo "$as_me:6858: error: expected a filename: $with_versioned_syms" >&5
6859 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6860    { (exit 1); exit 1; }; }
6861         ;;
6862 (*)
6863         test -f "$with_versioned_syms" || { { echo "$as_me:6863: error: expected a filename: $with_versioned_syms" >&5
6864 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6865    { (exit 1); exit 1; }; }
6866         with_versioned_syms=`pwd`/"$with_versioned_syms"
6867         ;;
6868 esac
6869 echo "$as_me:6869: result: $with_versioned_syms" >&5
6870 echo "${ECHO_T}$with_versioned_syms" >&6
6871
6872 RESULTING_SYMS=
6873 VERSIONED_SYMS=
6874 WILDCARD_SYMS=
6875
6876 if test "x$with_versioned_syms" != xno
6877 then
6878         RESULTING_SYMS=$with_versioned_syms
6879         case "x$MK_SHARED_LIB" in
6880         (*-Wl,*)
6881                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6882                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6883                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6884
6885 echo "${as_me:-configure}:6885: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6886
6887                 ;;
6888         (*-dy\ *)
6889                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6890                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6891                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6892
6893 echo "${as_me:-configure}:6893: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6894
6895                 ;;
6896         (*)
6897                 { echo "$as_me:6897: WARNING: this system does not support versioned-symbols" >&5
6898 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6899                 ;;
6900         esac
6901
6902         # Linux ld can selectively override scope, e.g., of symbols beginning with
6903         # "_" by first declaring some as global, and then using a wildcard to
6904         # declare the others as local.  Some other loaders cannot do this.  Check
6905         # by constructing a (very) simple shared library and inspecting its
6906         # symbols.
6907         if test "x$VERSIONED_SYMS" != "x"
6908         then
6909                 echo "$as_me:6909: checking if wildcards can be used to selectively omit symbols" >&5
6910 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6911                 WILDCARD_SYMS=no
6912
6913                 # make sources
6914                 rm -f conftest.*
6915
6916                 cat >conftest.ver <<EOF
6917 module_1.0 {
6918 global:
6919         globalf1;
6920 local:
6921         localf1;
6922 };
6923 module_2.0 {
6924 global:
6925         globalf2;
6926 local:
6927         localf2;
6928         _*;
6929 } module_1.0;
6930 submodule_1.0 {
6931 global:
6932         subglobalf1;
6933         _ismissing;
6934 local:
6935         sublocalf1;
6936 };
6937 submodule_2.0 {
6938 global:
6939         subglobalf2;
6940 local:
6941         sublocalf2;
6942         _*;
6943 } submodule_1.0;
6944 EOF
6945                 cat >conftest.$ac_ext <<EOF
6946 #line 6946 "configure"
6947 int     _ismissing(void) { return 1; }
6948 int     _localf1(void) { return 1; }
6949 int     _localf2(void) { return 2; }
6950 int     globalf1(void) { return 1; }
6951 int     globalf2(void) { return 2; }
6952 int     _sublocalf1(void) { return 1; }
6953 int     _sublocalf2(void) { return 2; }
6954 int     subglobalf1(void) { return 1; }
6955 int     subglobalf2(void) { return 2; }
6956 EOF
6957                 cat >conftest.mk <<EOF
6958 CC=${CC}
6959 CFLAGS=${CFLAGS}
6960 CPPFLAGS=${CPPFLAGS}
6961 LDFLAGS=${LDFLAGS}
6962 LIBS=${LIBS}
6963 VERSIONED_SYMS=${VERSIONED_SYMS}
6964 RESULTING_SYMS=conftest.ver
6965 MK_SHARED_LIB=${MK_SHARED_LIB}
6966 conftest.so: conftest.$ac_cv_objext
6967                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6968 EOF
6969
6970                 # compile source, make library
6971                 if make -f conftest.mk 2>&5 >/dev/null
6972                 then
6973                         # test for missing symbol in either Data or Text section
6974                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6975                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6976                 fi
6977                 echo "$as_me:6977: result: $WILDCARD_SYMS" >&5
6978 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6979                 rm -f conftest.*
6980         fi
6981 fi
6982
6983                 ;;
6984         esac
6985 done
6986
6987 ### Checks for special libraries, must be done up-front.
6988 SHLIB_LIST=""
6989
6990 echo "$as_me:6990: checking if you want to link with the GPM mouse library" >&5
6991 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6992
6993 # Check whether --with-gpm or --without-gpm was given.
6994 if test "${with_gpm+set}" = set; then
6995   withval="$with_gpm"
6996   with_gpm=$withval
6997 else
6998   with_gpm=maybe
6999 fi;
7000 echo "$as_me:7000: result: $with_gpm" >&5
7001 echo "${ECHO_T}$with_gpm" >&6
7002
7003 if test "$with_gpm" != no ; then
7004         echo "$as_me:7004: checking for gpm.h" >&5
7005 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7006 if test "${ac_cv_header_gpm_h+set}" = set; then
7007   echo $ECHO_N "(cached) $ECHO_C" >&6
7008 else
7009   cat >"conftest.$ac_ext" <<_ACEOF
7010 #line 7010 "configure"
7011 #include "confdefs.h"
7012 #include <gpm.h>
7013 _ACEOF
7014 if { (eval echo "$as_me:7014: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7015   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7016   ac_status=$?
7017   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7018   rm -f conftest.er1
7019   cat conftest.err >&5
7020   echo "$as_me:7020: \$? = $ac_status" >&5
7021   (exit "$ac_status"); } >/dev/null; then
7022   if test -s conftest.err; then
7023     ac_cpp_err=$ac_c_preproc_warn_flag
7024   else
7025     ac_cpp_err=
7026   fi
7027 else
7028   ac_cpp_err=yes
7029 fi
7030 if test -z "$ac_cpp_err"; then
7031   ac_cv_header_gpm_h=yes
7032 else
7033   echo "$as_me: failed program was:" >&5
7034   cat "conftest.$ac_ext" >&5
7035   ac_cv_header_gpm_h=no
7036 fi
7037 rm -f conftest.err "conftest.$ac_ext"
7038 fi
7039 echo "$as_me:7039: result: $ac_cv_header_gpm_h" >&5
7040 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7041 if test "$ac_cv_header_gpm_h" = yes; then
7042
7043 cat >>confdefs.h <<\EOF
7044 #define HAVE_GPM_H 1
7045 EOF
7046
7047                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7048                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7049
7050 echo "${as_me:-configure}:7050: testing assuming we really have GPM library ..." 1>&5
7051
7052 cat >>confdefs.h <<\EOF
7053 #define HAVE_LIBGPM 1
7054 EOF
7055
7056                         with_gpm=yes
7057                 else
7058                         echo "$as_me:7058: checking for Gpm_Open in -lgpm" >&5
7059 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7060 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7061   echo $ECHO_N "(cached) $ECHO_C" >&6
7062 else
7063   ac_check_lib_save_LIBS=$LIBS
7064 LIBS="-lgpm  $LIBS"
7065 cat >"conftest.$ac_ext" <<_ACEOF
7066 #line 7066 "configure"
7067 #include "confdefs.h"
7068
7069 /* Override any gcc2 internal prototype to avoid an error.  */
7070 #ifdef __cplusplus
7071 extern "C"
7072 #endif
7073 /* We use char because int might match the return type of a gcc2
7074    builtin and then its argument prototype would still apply.  */
7075 char Gpm_Open ();
7076 int
7077 main (void)
7078 {
7079 Gpm_Open ();
7080   ;
7081   return 0;
7082 }
7083 _ACEOF
7084 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7085 if { (eval echo "$as_me:7085: \"$ac_link\"") >&5
7086   (eval $ac_link) 2>&5
7087   ac_status=$?
7088   echo "$as_me:7088: \$? = $ac_status" >&5
7089   (exit "$ac_status"); } &&
7090          { ac_try='test -s "conftest$ac_exeext"'
7091   { (eval echo "$as_me:7091: \"$ac_try\"") >&5
7092   (eval $ac_try) 2>&5
7093   ac_status=$?
7094   echo "$as_me:7094: \$? = $ac_status" >&5
7095   (exit "$ac_status"); }; }; then
7096   ac_cv_lib_gpm_Gpm_Open=yes
7097 else
7098   echo "$as_me: failed program was:" >&5
7099 cat "conftest.$ac_ext" >&5
7100 ac_cv_lib_gpm_Gpm_Open=no
7101 fi
7102 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7103 LIBS=$ac_check_lib_save_LIBS
7104 fi
7105 echo "$as_me:7105: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7106 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7107 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7108   with_gpm=yes
7109 else
7110
7111                                 if test "$with_gpm" = maybe; then
7112                                         { echo "$as_me:7112: WARNING: Cannot link with GPM library" >&5
7113 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7114                                         with_gpm=no
7115                                 else
7116                                         { { echo "$as_me:7116: error: Cannot link with GPM library" >&5
7117 echo "$as_me: error: Cannot link with GPM library" >&2;}
7118    { (exit 1); exit 1; }; }
7119                                 fi
7120
7121 fi
7122
7123                 fi
7124
7125 else
7126
7127                 test "$with_gpm" != maybe && { echo "$as_me:7127: WARNING: Cannot find GPM header" >&5
7128 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7129                 with_gpm=no
7130
7131 fi
7132
7133 fi
7134
7135 if test "$with_gpm" != no ; then
7136         echo "$as_me:7136: checking if you want to load GPM dynamically" >&5
7137 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7138
7139 # Check whether --with-dlsym or --without-dlsym was given.
7140 if test "${with_dlsym+set}" = set; then
7141   withval="$with_dlsym"
7142   with_dlsym=$withval
7143 else
7144   with_dlsym=yes
7145 fi;
7146         echo "$as_me:7146: result: $with_dlsym" >&5
7147 echo "${ECHO_T}$with_dlsym" >&6
7148         if test "x$with_dlsym" = xyes ; then
7149
7150 cf_have_dlsym=no
7151 echo "$as_me:7151: checking for dlsym" >&5
7152 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7153 if test "${ac_cv_func_dlsym+set}" = set; then
7154   echo $ECHO_N "(cached) $ECHO_C" >&6
7155 else
7156   cat >"conftest.$ac_ext" <<_ACEOF
7157 #line 7157 "configure"
7158 #include "confdefs.h"
7159 #define dlsym autoconf_temporary
7160 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7161 #undef dlsym
7162
7163 #ifdef __cplusplus
7164 extern "C"
7165 #endif
7166
7167 /* We use char because int might match the return type of a gcc2
7168    builtin and then its argument prototype would still apply.  */
7169 char dlsym (void);
7170
7171 int
7172 main (void)
7173 {
7174
7175 /* The GNU C library defines stubs for functions which it implements
7176     to always fail with ENOSYS.  Some functions are actually named
7177     something starting with __ and the normal name is an alias.  */
7178 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7179 #error found stub for dlsym
7180 #endif
7181
7182         return dlsym ();
7183   ;
7184   return 0;
7185 }
7186 _ACEOF
7187 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7188 if { (eval echo "$as_me:7188: \"$ac_link\"") >&5
7189   (eval $ac_link) 2>&5
7190   ac_status=$?
7191   echo "$as_me:7191: \$? = $ac_status" >&5
7192   (exit "$ac_status"); } &&
7193          { ac_try='test -s "conftest$ac_exeext"'
7194   { (eval echo "$as_me:7194: \"$ac_try\"") >&5
7195   (eval $ac_try) 2>&5
7196   ac_status=$?
7197   echo "$as_me:7197: \$? = $ac_status" >&5
7198   (exit "$ac_status"); }; }; then
7199   ac_cv_func_dlsym=yes
7200 else
7201   echo "$as_me: failed program was:" >&5
7202 cat "conftest.$ac_ext" >&5
7203 ac_cv_func_dlsym=no
7204 fi
7205 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7206 fi
7207 echo "$as_me:7207: result: $ac_cv_func_dlsym" >&5
7208 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7209 if test "$ac_cv_func_dlsym" = yes; then
7210   cf_have_dlsym=yes
7211 else
7212
7213 cf_have_libdl=no
7214 echo "$as_me:7214: checking for dlsym in -ldl" >&5
7215 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7216 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7217   echo $ECHO_N "(cached) $ECHO_C" >&6
7218 else
7219   ac_check_lib_save_LIBS=$LIBS
7220 LIBS="-ldl  $LIBS"
7221 cat >"conftest.$ac_ext" <<_ACEOF
7222 #line 7222 "configure"
7223 #include "confdefs.h"
7224
7225 /* Override any gcc2 internal prototype to avoid an error.  */
7226 #ifdef __cplusplus
7227 extern "C"
7228 #endif
7229 /* We use char because int might match the return type of a gcc2
7230    builtin and then its argument prototype would still apply.  */
7231 char dlsym ();
7232 int
7233 main (void)
7234 {
7235 dlsym ();
7236   ;
7237   return 0;
7238 }
7239 _ACEOF
7240 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7241 if { (eval echo "$as_me:7241: \"$ac_link\"") >&5
7242   (eval $ac_link) 2>&5
7243   ac_status=$?
7244   echo "$as_me:7244: \$? = $ac_status" >&5
7245   (exit "$ac_status"); } &&
7246          { ac_try='test -s "conftest$ac_exeext"'
7247   { (eval echo "$as_me:7247: \"$ac_try\"") >&5
7248   (eval $ac_try) 2>&5
7249   ac_status=$?
7250   echo "$as_me:7250: \$? = $ac_status" >&5
7251   (exit "$ac_status"); }; }; then
7252   ac_cv_lib_dl_dlsym=yes
7253 else
7254   echo "$as_me: failed program was:" >&5
7255 cat "conftest.$ac_ext" >&5
7256 ac_cv_lib_dl_dlsym=no
7257 fi
7258 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7259 LIBS=$ac_check_lib_save_LIBS
7260 fi
7261 echo "$as_me:7261: result: $ac_cv_lib_dl_dlsym" >&5
7262 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7263 if test "$ac_cv_lib_dl_dlsym" = yes; then
7264
7265         cf_have_dlsym=yes
7266         cf_have_libdl=yes
7267 fi
7268
7269 fi
7270
7271 if test "$cf_have_dlsym" = yes ; then
7272         test "$cf_have_libdl" = yes && {
7273 cf_add_libs="$LIBS"
7274 # reverse order
7275 cf_add_0lib=
7276 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7277 # filter duplicates
7278 for cf_add_1lib in $cf_add_0lib; do
7279         for cf_add_2lib in $cf_add_libs; do
7280                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7281                         cf_add_1lib=
7282                         break
7283                 fi
7284         done
7285         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7286 done
7287 LIBS="$cf_add_libs"
7288  }
7289
7290         echo "$as_me:7290: checking whether able to link to dl*() functions" >&5
7291 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7292         cat >"conftest.$ac_ext" <<_ACEOF
7293 #line 7293 "configure"
7294 #include "confdefs.h"
7295 #include <dlfcn.h>
7296 int
7297 main (void)
7298 {
7299
7300                 void *obj;
7301                 if ((obj = dlopen("filename", 0)) != 0) {
7302                         if (dlsym(obj, "symbolname") == 0) {
7303                         dlclose(obj);
7304                         }
7305                 }
7306   ;
7307   return 0;
7308 }
7309 _ACEOF
7310 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7311 if { (eval echo "$as_me:7311: \"$ac_link\"") >&5
7312   (eval $ac_link) 2>&5
7313   ac_status=$?
7314   echo "$as_me:7314: \$? = $ac_status" >&5
7315   (exit "$ac_status"); } &&
7316          { ac_try='test -s "conftest$ac_exeext"'
7317   { (eval echo "$as_me:7317: \"$ac_try\"") >&5
7318   (eval $ac_try) 2>&5
7319   ac_status=$?
7320   echo "$as_me:7320: \$? = $ac_status" >&5
7321   (exit "$ac_status"); }; }; then
7322
7323 cat >>confdefs.h <<\EOF
7324 #define HAVE_LIBDL 1
7325 EOF
7326
7327 else
7328   echo "$as_me: failed program was:" >&5
7329 cat "conftest.$ac_ext" >&5
7330
7331                 { { echo "$as_me:7331: error: Cannot link test program for libdl" >&5
7332 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7333    { (exit 1); exit 1; }; }
7334 fi
7335 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7336         echo "$as_me:7336: result: ok" >&5
7337 echo "${ECHO_T}ok" >&6
7338 else
7339         { { echo "$as_me:7339: error: Cannot find dlsym function" >&5
7340 echo "$as_me: error: Cannot find dlsym function" >&2;}
7341    { (exit 1); exit 1; }; }
7342 fi
7343
7344                 if test "x$with_gpm" != xyes ; then
7345                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7346
7347 echo "${as_me:-configure}:7347: testing assuming soname for gpm is $with_gpm ..." 1>&5
7348
7349                         cf_cv_gpm_soname="$with_gpm"
7350                 else
7351
7352 echo "$as_me:7352: checking for soname of gpm library" >&5
7353 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7354 if test "${cf_cv_gpm_soname+set}" = set; then
7355   echo $ECHO_N "(cached) $ECHO_C" >&6
7356 else
7357
7358 cf_cv_gpm_soname=unknown
7359 if test "$cross_compiling" != yes ; then
7360 cat >conftest.$ac_ext <<CF_EOF
7361 #include <gpm.h>
7362 int main(void)
7363 {
7364 if (Gpm_Open(0,0)) Gpm_Close();
7365         ${cf_cv_main_return:-return}(0);
7366 }
7367 CF_EOF
7368 cf_save_LIBS="$LIBS"
7369
7370 cf_add_libs="$LIBS"
7371 # reverse order
7372 cf_add_0lib=
7373 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7374 # filter duplicates
7375 for cf_add_1lib in $cf_add_0lib; do
7376         for cf_add_2lib in $cf_add_libs; do
7377                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7378                         cf_add_1lib=
7379                         break
7380                 fi
7381         done
7382         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7383 done
7384 LIBS="$cf_add_libs"
7385
7386         if { (eval echo "$as_me:7386: \"$ac_compile\"") >&5
7387   (eval $ac_compile) 2>&5
7388   ac_status=$?
7389   echo "$as_me:7389: \$? = $ac_status" >&5
7390   (exit "$ac_status"); } ; then
7391                 if { (eval echo "$as_me:7391: \"$ac_link\"") >&5
7392   (eval $ac_link) 2>&5
7393   ac_status=$?
7394   echo "$as_me:7394: \$? = $ac_status" >&5
7395   (exit "$ac_status"); } ; then
7396                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7397                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7398                 fi
7399         fi
7400 rm -rf ./conftest*
7401 LIBS="$cf_save_LIBS"
7402 fi
7403
7404 fi
7405 echo "$as_me:7405: result: $cf_cv_gpm_soname" >&5
7406 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7407
7408                 fi
7409                 test "$cf_cv_gpm_soname" != "unknown" &&
7410 cat >>confdefs.h <<EOF
7411 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7412 EOF
7413
7414                 SHLIB_LIST="-ldl $SHLIB_LIST"
7415
7416 cf_add_libs="$PRIVATE_LIBS"
7417 # reverse order
7418 cf_add_0lib=
7419 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7420 # filter duplicates
7421 for cf_add_1lib in $cf_add_0lib; do
7422         for cf_add_2lib in $cf_add_libs; do
7423                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7424                         cf_add_1lib=
7425                         break
7426                 fi
7427         done
7428         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7429 done
7430 PRIVATE_LIBS="$cf_add_libs"
7431
7432         else
7433                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7434
7435 cf_add_libs="$TEST_LIBS"
7436 # reverse order
7437 cf_add_0lib=
7438 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7439 # filter duplicates
7440 for cf_add_1lib in $cf_add_0lib; do
7441         for cf_add_2lib in $cf_add_libs; do
7442                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7443                         cf_add_1lib=
7444                         break
7445                 fi
7446         done
7447         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7448 done
7449 TEST_LIBS="$cf_add_libs"
7450
7451 cf_add_libs="$PRIVATE_LIBS"
7452 # reverse order
7453 cf_add_0lib=
7454 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7455 # filter duplicates
7456 for cf_add_1lib in $cf_add_0lib; do
7457         for cf_add_2lib in $cf_add_libs; do
7458                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7459                         cf_add_1lib=
7460                         break
7461                 fi
7462         done
7463         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7464 done
7465 PRIVATE_LIBS="$cf_add_libs"
7466
7467         fi
7468
7469 cat >>confdefs.h <<\EOF
7470 #define HAVE_LIBGPM 1
7471 EOF
7472
7473 echo "$as_me:7473: checking for Gpm_Wgetch in -lgpm" >&5
7474 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7475 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7476   echo $ECHO_N "(cached) $ECHO_C" >&6
7477 else
7478   ac_check_lib_save_LIBS=$LIBS
7479 LIBS="-lgpm  $LIBS"
7480 cat >"conftest.$ac_ext" <<_ACEOF
7481 #line 7481 "configure"
7482 #include "confdefs.h"
7483
7484 /* Override any gcc2 internal prototype to avoid an error.  */
7485 #ifdef __cplusplus
7486 extern "C"
7487 #endif
7488 /* We use char because int might match the return type of a gcc2
7489    builtin and then its argument prototype would still apply.  */
7490 char Gpm_Wgetch ();
7491 int
7492 main (void)
7493 {
7494 Gpm_Wgetch ();
7495   ;
7496   return 0;
7497 }
7498 _ACEOF
7499 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7500 if { (eval echo "$as_me:7500: \"$ac_link\"") >&5
7501   (eval $ac_link) 2>&5
7502   ac_status=$?
7503   echo "$as_me:7503: \$? = $ac_status" >&5
7504   (exit "$ac_status"); } &&
7505          { ac_try='test -s "conftest$ac_exeext"'
7506   { (eval echo "$as_me:7506: \"$ac_try\"") >&5
7507   (eval $ac_try) 2>&5
7508   ac_status=$?
7509   echo "$as_me:7509: \$? = $ac_status" >&5
7510   (exit "$ac_status"); }; }; then
7511   ac_cv_lib_gpm_Gpm_Wgetch=yes
7512 else
7513   echo "$as_me: failed program was:" >&5
7514 cat "conftest.$ac_ext" >&5
7515 ac_cv_lib_gpm_Gpm_Wgetch=no
7516 fi
7517 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7518 LIBS=$ac_check_lib_save_LIBS
7519 fi
7520 echo "$as_me:7520: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7521 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7522 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7523
7524 echo "$as_me:7524: checking if GPM is weakly bound to curses library" >&5
7525 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7526 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7527   echo $ECHO_N "(cached) $ECHO_C" >&6
7528 else
7529
7530 cf_cv_check_gpm_wgetch=unknown
7531 if test "$cross_compiling" != yes ; then
7532
7533 cat >conftest.$ac_ext <<CF_EOF
7534 #include <gpm.h>
7535 int main(void)
7536 {
7537         Gpm_Wgetch();
7538         ${cf_cv_main_return:-return}(0);
7539 }
7540 CF_EOF
7541
7542         cf_save_LIBS="$LIBS"
7543         # This only works if we can look at the symbol table.  If a shared
7544         # library is stripped for install, we cannot use that.  So we're forced
7545         # to rely on the static library, noting that some packagers may not
7546         # include it.
7547         LIBS="-static -lgpm -dynamic $LIBS"
7548         if { (eval echo "$as_me:7548: \"$ac_compile\"") >&5
7549   (eval $ac_compile) 2>&5
7550   ac_status=$?
7551   echo "$as_me:7551: \$? = $ac_status" >&5
7552   (exit "$ac_status"); } ; then
7553                 if { (eval echo "$as_me:7553: \"$ac_link\"") >&5
7554   (eval $ac_link) 2>&5
7555   ac_status=$?
7556   echo "$as_me:7556: \$? = $ac_status" >&5
7557   (exit "$ac_status"); } ; then
7558                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7559                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7560                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7561                 fi
7562         fi
7563         rm -rf ./conftest*
7564         LIBS="$cf_save_LIBS"
7565 fi
7566
7567 fi
7568 echo "$as_me:7568: result: $cf_cv_check_gpm_wgetch" >&5
7569 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7570
7571 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7572         { echo "$as_me:7572: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7573 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7574 fi
7575
7576 fi
7577
7578 fi
7579
7580 echo "$as_me:7580: checking if you want to use PCRE2 for regular-expressions" >&5
7581 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7582
7583 # Check whether --with-pcre2 or --without-pcre2 was given.
7584 if test "${with_pcre2+set}" = set; then
7585   withval="$with_pcre2"
7586
7587 fi;
7588 test -z "$with_pcre2" && with_pcre2=no
7589 echo "$as_me:7589: result: $with_pcre2" >&5
7590 echo "${ECHO_T}$with_pcre2" >&6
7591
7592 if test "x$with_pcre2" != xno ; then
7593         cf_with_pcre2_ok=no
7594         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7595         do
7596
7597 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7598         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7599
7600 echo "${as_me:-configure}:7600: testing found package $cf_with_pcre2 ..." 1>&5
7601
7602         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7603         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7604         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7605
7606 echo "${as_me:-configure}:7606: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7607
7608         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7609
7610 echo "${as_me:-configure}:7610: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7611
7612 cf_fix_cppflags=no
7613 cf_new_cflags=
7614 cf_new_cppflags=
7615 cf_new_extra_cppflags=
7616
7617 for cf_add_cflags in $cf_pkgconfig_incs
7618 do
7619 case "$cf_fix_cppflags" in
7620 (no)
7621         case "$cf_add_cflags" in
7622         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7623                 case "$cf_add_cflags" in
7624                 (-D*)
7625                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7626
7627                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7628                                 && test -z "${cf_tst_cflags}" \
7629                                 && cf_fix_cppflags=yes
7630
7631                         if test "$cf_fix_cppflags" = yes ; then
7632
7633         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7634         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7635
7636                                 continue
7637                         elif test "${cf_tst_cflags}" = "\"'" ; then
7638
7639         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7640         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7641
7642                                 continue
7643                         fi
7644                         ;;
7645                 esac
7646                 case "$CPPFLAGS" in
7647                 (*$cf_add_cflags)
7648                         ;;
7649                 (*)
7650                         case "$cf_add_cflags" in
7651                         (-D*)
7652                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7653
7654 CPPFLAGS=`echo "$CPPFLAGS" | \
7655         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7656                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7657
7658                                 ;;
7659                         esac
7660
7661         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7662         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7663
7664                         ;;
7665                 esac
7666                 ;;
7667         (*)
7668
7669         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7670         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7671
7672                 ;;
7673         esac
7674         ;;
7675 (yes)
7676
7677         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7678         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7679
7680         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7681
7682         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7683                 && test -z "${cf_tst_cflags}" \
7684                 && cf_fix_cppflags=no
7685         ;;
7686 esac
7687 done
7688
7689 if test -n "$cf_new_cflags" ; then
7690
7691         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7692         CFLAGS="${CFLAGS}$cf_new_cflags"
7693
7694 fi
7695
7696 if test -n "$cf_new_cppflags" ; then
7697
7698         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7699         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7700
7701 fi
7702
7703 if test -n "$cf_new_extra_cppflags" ; then
7704
7705         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7706         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7707
7708 fi
7709
7710 cf_add_libs="$LIBS"
7711 # reverse order
7712 cf_add_0lib=
7713 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7714 # filter duplicates
7715 for cf_add_1lib in $cf_add_0lib; do
7716         for cf_add_2lib in $cf_add_libs; do
7717                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7718                         cf_add_1lib=
7719                         break
7720                 fi
7721         done
7722         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7723 done
7724 LIBS="$cf_add_libs"
7725
7726         cf_with_pcre2_ok=yes; break
7727 else
7728         cf_pkgconfig_incs=
7729         cf_pkgconfig_libs=
7730         :
7731 fi
7732
7733         done
7734         cf_with_pcre2_ok=yes || { { echo "$as_me:7734: error: Cannot find PCRE2 library" >&5
7735 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7736    { (exit 1); exit 1; }; }
7737
7738 cat >>confdefs.h <<\EOF
7739 #define HAVE_LIB_PCRE2 1
7740 EOF
7741
7742         # if pkgconfig gave no results, look for the libraries directly
7743         case "$LIBS" in
7744         (*pcre2-posix*|*pcreposix*)
7745                 ;;
7746         (*)
7747                 echo "$as_me:7747: checking for regcomp in -lpcre2-posix" >&5
7748 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7749 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7750   echo $ECHO_N "(cached) $ECHO_C" >&6
7751 else
7752   ac_check_lib_save_LIBS=$LIBS
7753 LIBS="-lpcre2-posix  $LIBS"
7754 cat >"conftest.$ac_ext" <<_ACEOF
7755 #line 7755 "configure"
7756 #include "confdefs.h"
7757
7758 /* Override any gcc2 internal prototype to avoid an error.  */
7759 #ifdef __cplusplus
7760 extern "C"
7761 #endif
7762 /* We use char because int might match the return type of a gcc2
7763    builtin and then its argument prototype would still apply.  */
7764 char regcomp ();
7765 int
7766 main (void)
7767 {
7768 regcomp ();
7769   ;
7770   return 0;
7771 }
7772 _ACEOF
7773 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7774 if { (eval echo "$as_me:7774: \"$ac_link\"") >&5
7775   (eval $ac_link) 2>&5
7776   ac_status=$?
7777   echo "$as_me:7777: \$? = $ac_status" >&5
7778   (exit "$ac_status"); } &&
7779          { ac_try='test -s "conftest$ac_exeext"'
7780   { (eval echo "$as_me:7780: \"$ac_try\"") >&5
7781   (eval $ac_try) 2>&5
7782   ac_status=$?
7783   echo "$as_me:7783: \$? = $ac_status" >&5
7784   (exit "$ac_status"); }; }; then
7785   ac_cv_lib_pcre2_posix_regcomp=yes
7786 else
7787   echo "$as_me: failed program was:" >&5
7788 cat "conftest.$ac_ext" >&5
7789 ac_cv_lib_pcre2_posix_regcomp=no
7790 fi
7791 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7792 LIBS=$ac_check_lib_save_LIBS
7793 fi
7794 echo "$as_me:7794: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7795 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7796 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7797
7798 cf_add_libs="$LIBS"
7799 # reverse order
7800 cf_add_0lib=
7801 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7802 # filter duplicates
7803 for cf_add_1lib in $cf_add_0lib; do
7804         for cf_add_2lib in $cf_add_libs; do
7805                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7806                         cf_add_1lib=
7807                         break
7808                 fi
7809         done
7810         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7811 done
7812 LIBS="$cf_add_libs"
7813
7814 else
7815   echo "$as_me:7815: checking for regcomp in -lpcreposix" >&5
7816 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7817 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7818   echo $ECHO_N "(cached) $ECHO_C" >&6
7819 else
7820   ac_check_lib_save_LIBS=$LIBS
7821 LIBS="-lpcreposix  $LIBS"
7822 cat >"conftest.$ac_ext" <<_ACEOF
7823 #line 7823 "configure"
7824 #include "confdefs.h"
7825
7826 /* Override any gcc2 internal prototype to avoid an error.  */
7827 #ifdef __cplusplus
7828 extern "C"
7829 #endif
7830 /* We use char because int might match the return type of a gcc2
7831    builtin and then its argument prototype would still apply.  */
7832 char regcomp ();
7833 int
7834 main (void)
7835 {
7836 regcomp ();
7837   ;
7838   return 0;
7839 }
7840 _ACEOF
7841 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7842 if { (eval echo "$as_me:7842: \"$ac_link\"") >&5
7843   (eval $ac_link) 2>&5
7844   ac_status=$?
7845   echo "$as_me:7845: \$? = $ac_status" >&5
7846   (exit "$ac_status"); } &&
7847          { ac_try='test -s "conftest$ac_exeext"'
7848   { (eval echo "$as_me:7848: \"$ac_try\"") >&5
7849   (eval $ac_try) 2>&5
7850   ac_status=$?
7851   echo "$as_me:7851: \$? = $ac_status" >&5
7852   (exit "$ac_status"); }; }; then
7853   ac_cv_lib_pcreposix_regcomp=yes
7854 else
7855   echo "$as_me: failed program was:" >&5
7856 cat "conftest.$ac_ext" >&5
7857 ac_cv_lib_pcreposix_regcomp=no
7858 fi
7859 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7860 LIBS=$ac_check_lib_save_LIBS
7861 fi
7862 echo "$as_me:7862: result: $ac_cv_lib_pcreposix_regcomp" >&5
7863 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7864 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7865
7866 cf_add_libs="$LIBS"
7867 # reverse order
7868 cf_add_0lib=
7869 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7870 # filter duplicates
7871 for cf_add_1lib in $cf_add_0lib; do
7872         for cf_add_2lib in $cf_add_libs; do
7873                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7874                         cf_add_1lib=
7875                         break
7876                 fi
7877         done
7878         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7879 done
7880 LIBS="$cf_add_libs"
7881
7882 else
7883   { { echo "$as_me:7883: error: Cannot find PCRE2 POSIX library" >&5
7884 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7885    { (exit 1); exit 1; }; }
7886 fi
7887
7888 fi
7889
7890                 ;;
7891         esac
7892
7893         # either way, check for the library header files
7894
7895 for ac_header in pcre2posix.h pcreposix.h
7896 do
7897 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7898 echo "$as_me:7898: checking for $ac_header" >&5
7899 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7900 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7901   echo $ECHO_N "(cached) $ECHO_C" >&6
7902 else
7903   cat >"conftest.$ac_ext" <<_ACEOF
7904 #line 7904 "configure"
7905 #include "confdefs.h"
7906 #include <$ac_header>
7907 _ACEOF
7908 if { (eval echo "$as_me:7908: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7909   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7910   ac_status=$?
7911   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7912   rm -f conftest.er1
7913   cat conftest.err >&5
7914   echo "$as_me:7914: \$? = $ac_status" >&5
7915   (exit "$ac_status"); } >/dev/null; then
7916   if test -s conftest.err; then
7917     ac_cpp_err=$ac_c_preproc_warn_flag
7918   else
7919     ac_cpp_err=
7920   fi
7921 else
7922   ac_cpp_err=yes
7923 fi
7924 if test -z "$ac_cpp_err"; then
7925   eval "$as_ac_Header=yes"
7926 else
7927   echo "$as_me: failed program was:" >&5
7928   cat "conftest.$ac_ext" >&5
7929   eval "$as_ac_Header=no"
7930 fi
7931 rm -f conftest.err "conftest.$ac_ext"
7932 fi
7933 echo "$as_me:7933: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7934 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7935 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7936   cat >>confdefs.h <<EOF
7937 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7938 EOF
7939
7940 fi
7941 done
7942
7943 for ac_func in PCRE2regcomp
7944 do
7945 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7946 echo "$as_me:7946: checking for $ac_func" >&5
7947 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7948 if eval "test \"\${$as_ac_var+set}\" = set"; then
7949   echo $ECHO_N "(cached) $ECHO_C" >&6
7950 else
7951   cat >"conftest.$ac_ext" <<_ACEOF
7952 #line 7952 "configure"
7953 #include "confdefs.h"
7954 #define $ac_func autoconf_temporary
7955 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7956 #undef $ac_func
7957
7958 #ifdef __cplusplus
7959 extern "C"
7960 #endif
7961
7962 /* We use char because int might match the return type of a gcc2
7963    builtin and then its argument prototype would still apply.  */
7964 char $ac_func (void);
7965
7966 int
7967 main (void)
7968 {
7969
7970 /* The GNU C library defines stubs for functions which it implements
7971     to always fail with ENOSYS.  Some functions are actually named
7972     something starting with __ and the normal name is an alias.  */
7973 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7974 #error found stub for $ac_func
7975 #endif
7976
7977         return $ac_func ();
7978   ;
7979   return 0;
7980 }
7981 _ACEOF
7982 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7983 if { (eval echo "$as_me:7983: \"$ac_link\"") >&5
7984   (eval $ac_link) 2>&5
7985   ac_status=$?
7986   echo "$as_me:7986: \$? = $ac_status" >&5
7987   (exit "$ac_status"); } &&
7988          { ac_try='test -s "conftest$ac_exeext"'
7989   { (eval echo "$as_me:7989: \"$ac_try\"") >&5
7990   (eval $ac_try) 2>&5
7991   ac_status=$?
7992   echo "$as_me:7992: \$? = $ac_status" >&5
7993   (exit "$ac_status"); }; }; then
7994   eval "$as_ac_var=yes"
7995 else
7996   echo "$as_me: failed program was:" >&5
7997 cat "conftest.$ac_ext" >&5
7998 eval "$as_ac_var=no"
7999 fi
8000 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8001 fi
8002 echo "$as_me:8002: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8003 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8004 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8005   cat >>confdefs.h <<EOF
8006 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8007 EOF
8008
8009 fi
8010 done
8011
8012 fi
8013
8014 # not everyone has "test -c"
8015 if test -c /dev/sysmouse 2>/dev/null ; then
8016 echo "$as_me:8016: checking if you want to use sysmouse" >&5
8017 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8018
8019 # Check whether --with-sysmouse or --without-sysmouse was given.
8020 if test "${with_sysmouse+set}" = set; then
8021   withval="$with_sysmouse"
8022   cf_with_sysmouse=$withval
8023 else
8024   cf_with_sysmouse=maybe
8025 fi;
8026         if test "$cf_with_sysmouse" != no ; then
8027         cat >"conftest.$ac_ext" <<_ACEOF
8028 #line 8028 "configure"
8029 #include "confdefs.h"
8030
8031 #include <osreldate.h>
8032 #if (__FreeBSD_version >= 400017)
8033 #include <sys/consio.h>
8034 #include <sys/fbio.h>
8035 #else
8036 #include <machine/console.h>
8037 #endif
8038
8039 int
8040 main (void)
8041 {
8042
8043         struct mouse_info the_mouse;
8044         ioctl(0, CONS_MOUSECTL, &the_mouse);
8045
8046   ;
8047   return 0;
8048 }
8049 _ACEOF
8050 rm -f "conftest.$ac_objext"
8051 if { (eval echo "$as_me:8051: \"$ac_compile\"") >&5
8052   (eval $ac_compile) 2>&5
8053   ac_status=$?
8054   echo "$as_me:8054: \$? = $ac_status" >&5
8055   (exit "$ac_status"); } &&
8056          { ac_try='test -s "conftest.$ac_objext"'
8057   { (eval echo "$as_me:8057: \"$ac_try\"") >&5
8058   (eval $ac_try) 2>&5
8059   ac_status=$?
8060   echo "$as_me:8060: \$? = $ac_status" >&5
8061   (exit "$ac_status"); }; }; then
8062   cf_with_sysmouse=yes
8063 else
8064   echo "$as_me: failed program was:" >&5
8065 cat "conftest.$ac_ext" >&5
8066 cf_with_sysmouse=no
8067 fi
8068 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8069         fi
8070 echo "$as_me:8070: result: $cf_with_sysmouse" >&5
8071 echo "${ECHO_T}$cf_with_sysmouse" >&6
8072 test "$cf_with_sysmouse" = yes &&
8073 cat >>confdefs.h <<\EOF
8074 #define USE_SYSMOUSE 1
8075 EOF
8076
8077 fi
8078
8079 # pretend that ncurses==ncursesw==ncursest
8080 echo "$as_me:8080: checking if you want to disable library suffixes" >&5
8081 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8082
8083 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8084 if test "${enable_lib_suffixes+set}" = set; then
8085   enableval="$enable_lib_suffixes"
8086   test "$enableval" != no && enableval=yes
8087         if test "$enableval" != "yes" ; then
8088     disable_lib_suffixes=yes
8089         else
8090                 disable_lib_suffixes=no
8091         fi
8092 else
8093   enableval=yes
8094         disable_lib_suffixes=no
8095
8096 fi;
8097 echo "$as_me:8097: result: $disable_lib_suffixes" >&5
8098 echo "${ECHO_T}$disable_lib_suffixes" >&6
8099
8100 ### If we're building with rpath, try to link non-standard libs that way too.
8101 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8102
8103 echo "$as_me:8103: checking if rpath-hack should be disabled" >&5
8104 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8105
8106 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8107 if test "${enable_rpath_hack+set}" = set; then
8108   enableval="$enable_rpath_hack"
8109   test "$enableval" != no && enableval=yes
8110         if test "$enableval" != "yes" ; then
8111     enable_rpath_hack=no
8112         else
8113                 enable_rpath_hack=yes
8114         fi
8115 else
8116   enableval=yes
8117         enable_rpath_hack=yes
8118
8119 fi;
8120 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8121 echo "$as_me:8121: result: $cf_disable_rpath_hack" >&5
8122 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8123
8124 if test "$enable_rpath_hack" = yes ; then
8125
8126 echo "$as_me:8126: checking for updated LDFLAGS" >&5
8127 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8128 if test -n "$LD_RPATH_OPT" ; then
8129         echo "$as_me:8129: result: maybe" >&5
8130 echo "${ECHO_T}maybe" >&6
8131
8132         for ac_prog in ldd
8133 do
8134   # Extract the first word of "$ac_prog", so it can be a program name with args.
8135 set dummy $ac_prog; ac_word=$2
8136 echo "$as_me:8136: checking for $ac_word" >&5
8137 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8138 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8139   echo $ECHO_N "(cached) $ECHO_C" >&6
8140 else
8141   if test -n "$cf_ldd_prog"; then
8142   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8143 else
8144   ac_save_IFS=$IFS; IFS=$ac_path_separator
8145 ac_dummy="$PATH"
8146 for ac_dir in $ac_dummy; do
8147   IFS=$ac_save_IFS
8148   test -z "$ac_dir" && ac_dir=.
8149   $as_executable_p "$ac_dir/$ac_word" || continue
8150 ac_cv_prog_cf_ldd_prog="$ac_prog"
8151 echo "$as_me:8151: found $ac_dir/$ac_word" >&5
8152 break
8153 done
8154
8155 fi
8156 fi
8157 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8158 if test -n "$cf_ldd_prog"; then
8159   echo "$as_me:8159: result: $cf_ldd_prog" >&5
8160 echo "${ECHO_T}$cf_ldd_prog" >&6
8161 else
8162   echo "$as_me:8162: result: no" >&5
8163 echo "${ECHO_T}no" >&6
8164 fi
8165
8166   test -n "$cf_ldd_prog" && break
8167 done
8168 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8169
8170         cf_rpath_list="/usr/lib /lib"
8171         if test "$cf_ldd_prog" != no
8172         then
8173                 cf_rpath_oops=
8174
8175 cat >"conftest.$ac_ext" <<_ACEOF
8176 #line 8176 "configure"
8177 #include "confdefs.h"
8178 #include <stdio.h>
8179 int
8180 main (void)
8181 {
8182 printf("Hello");
8183   ;
8184   return 0;
8185 }
8186 _ACEOF
8187 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8188 if { (eval echo "$as_me:8188: \"$ac_link\"") >&5
8189   (eval $ac_link) 2>&5
8190   ac_status=$?
8191   echo "$as_me:8191: \$? = $ac_status" >&5
8192   (exit "$ac_status"); } &&
8193          { ac_try='test -s "conftest$ac_exeext"'
8194   { (eval echo "$as_me:8194: \"$ac_try\"") >&5
8195   (eval $ac_try) 2>&5
8196   ac_status=$?
8197   echo "$as_me:8197: \$? = $ac_status" >&5
8198   (exit "$ac_status"); }; }; then
8199   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8200                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8201 else
8202   echo "$as_me: failed program was:" >&5
8203 cat "conftest.$ac_ext" >&5
8204 fi
8205 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8206
8207                 # If we passed the link-test, but get a "not found" on a given library,
8208                 # this could be due to inept reconfiguration of gcc to make it only
8209                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8210                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8211                 # /usr/local libraries.
8212                 if test -n "$cf_rpath_oops"
8213                 then
8214                         for cf_rpath_src in $cf_rpath_oops
8215                         do
8216                                 for cf_rpath_dir in \
8217                                         /usr/local \
8218                                         /usr/pkg \
8219                                         /opt/sfw
8220                                 do
8221                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8222                                         then
8223                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8224
8225 echo "${as_me:-configure}:8225: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8226
8227                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8228                                                 break
8229                                         fi
8230                                 done
8231                         done
8232                 fi
8233         fi
8234
8235         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8236
8237 echo "${as_me:-configure}:8237: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8238
8239 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8240
8241 echo "${as_me:-configure}:8241: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8242
8243 cf_rpath_dst=
8244 for cf_rpath_src in $LDFLAGS
8245 do
8246         case "$cf_rpath_src" in
8247         (-L*)
8248
8249                 # check if this refers to a directory which we will ignore
8250                 cf_rpath_skip=no
8251                 if test -n "$cf_rpath_list"
8252                 then
8253                         for cf_rpath_item in $cf_rpath_list
8254                         do
8255                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8256                                 then
8257                                         cf_rpath_skip=yes
8258                                         break
8259                                 fi
8260                         done
8261                 fi
8262
8263                 if test "$cf_rpath_skip" = no
8264                 then
8265                         # transform the option
8266                         if test "$LD_RPATH_OPT" = "-R " ; then
8267                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8268                         else
8269                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8270                         fi
8271
8272                         # if we have not already added this, add it now
8273                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8274                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8275                         then
8276                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8277
8278 echo "${as_me:-configure}:8278: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8279
8280                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8281                         fi
8282                 fi
8283                 ;;
8284         esac
8285         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8286 done
8287 LDFLAGS=$cf_rpath_dst
8288
8289 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8290
8291 echo "${as_me:-configure}:8291: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8292
8293 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8294
8295 echo "${as_me:-configure}:8295: testing ...checking LIBS $LIBS ..." 1>&5
8296
8297 cf_rpath_dst=
8298 for cf_rpath_src in $LIBS
8299 do
8300         case "$cf_rpath_src" in
8301         (-L*)
8302
8303                 # check if this refers to a directory which we will ignore
8304                 cf_rpath_skip=no
8305                 if test -n "$cf_rpath_list"
8306                 then
8307                         for cf_rpath_item in $cf_rpath_list
8308                         do
8309                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8310                                 then
8311                                         cf_rpath_skip=yes
8312                                         break
8313                                 fi
8314                         done
8315                 fi
8316
8317                 if test "$cf_rpath_skip" = no
8318                 then
8319                         # transform the option
8320                         if test "$LD_RPATH_OPT" = "-R " ; then
8321                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8322                         else
8323                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8324                         fi
8325
8326                         # if we have not already added this, add it now
8327                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8328                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8329                         then
8330                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8331
8332 echo "${as_me:-configure}:8332: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8333
8334                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8335                         fi
8336                 fi
8337                 ;;
8338         esac
8339         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8340 done
8341 LIBS=$cf_rpath_dst
8342
8343 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8344
8345 echo "${as_me:-configure}:8345: testing ...checked LIBS $LIBS ..." 1>&5
8346
8347         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8348
8349 echo "${as_me:-configure}:8349: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8350
8351 else
8352         echo "$as_me:8352: result: no" >&5
8353 echo "${ECHO_T}no" >&6
8354 fi
8355
8356 fi
8357
8358 fi
8359
8360 ### Depending on the system, someone may use rpath to build ncurses but not
8361 # want users of the package to rely upon that feature.  Give those people an
8362 # option to suppress that detail from EXTRA_LDFLAGS.
8363 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8364 if test -n "$EXTRA_PKG_LDFLAGS"
8365 then
8366         echo "$as_me:8366: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8367 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8368
8369 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8370 if test "${enable_pkg_ldflags+set}" = set; then
8371   enableval="$enable_pkg_ldflags"
8372   test "$enableval" != no && enableval=yes
8373         if test "$enableval" != "yes" ; then
8374     disable_pkg_ldflags=yes
8375         else
8376                 disable_pkg_ldflags=no
8377         fi
8378 else
8379   enableval=yes
8380         disable_pkg_ldflags=no
8381
8382 fi;
8383         echo "$as_me:8383: result: $disable_pkg_ldflags" >&5
8384 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8385         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8386 fi
8387
8388 ###############################################################################
8389
8390 ###     use option --with-extra-suffix to append suffix to headers and libraries
8391 echo "$as_me:8391: checking if you wish to append extra suffix to header/library paths" >&5
8392 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8393 EXTRA_SUFFIX=
8394
8395 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8396 if test "${with_extra_suffix+set}" = set; then
8397   withval="$with_extra_suffix"
8398   case x$withval in
8399         (xno)
8400                 ;;
8401         (xyes|x)
8402                 EXTRA_SUFFIX=$cf_cv_abi_version
8403                 ;;
8404         (*)
8405                 EXTRA_SUFFIX=$withval
8406                 ;;
8407         esac
8408
8409 fi;
8410 echo "$as_me:8410: result: $EXTRA_SUFFIX" >&5
8411 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8412
8413 ###     use option --disable-overwrite to leave out the link to -lcurses
8414 echo "$as_me:8414: checking if you wish to install ncurses overwriting curses" >&5
8415 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8416
8417 # Check whether --enable-overwrite or --disable-overwrite was given.
8418 if test "${enable_overwrite+set}" = set; then
8419   enableval="$enable_overwrite"
8420   with_overwrite=$enableval
8421 else
8422   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8423 fi;
8424 echo "$as_me:8424: result: $with_overwrite" >&5
8425 echo "${ECHO_T}$with_overwrite" >&6
8426
8427 echo "$as_me:8427: checking if external terminfo-database is used" >&5
8428 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8429
8430 # Check whether --enable-database or --disable-database was given.
8431 if test "${enable_database+set}" = set; then
8432   enableval="$enable_database"
8433   use_database=$enableval
8434 else
8435   use_database=yes
8436 fi;
8437 echo "$as_me:8437: result: $use_database" >&5
8438 echo "${ECHO_T}$use_database" >&6
8439
8440 case "$host_os" in
8441 (os2*)
8442         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8443         ;;
8444 (*)
8445         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8446         ;;
8447 esac
8448
8449 NCURSES_USE_DATABASE=0
8450 if test "$use_database" != no ; then
8451         NCURSES_USE_DATABASE=1
8452
8453         echo "$as_me:8453: checking which terminfo source-file will be installed" >&5
8454 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8455
8456 # Check whether --with-database or --without-database was given.
8457 if test "${with_database+set}" = set; then
8458   withval="$with_database"
8459   TERMINFO_SRC=$withval
8460 fi;
8461         echo "$as_me:8461: result: $TERMINFO_SRC" >&5
8462 echo "${ECHO_T}$TERMINFO_SRC" >&6
8463
8464         echo "$as_me:8464: checking whether to use hashed database instead of directory/tree" >&5
8465 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8466
8467 # Check whether --with-hashed-db or --without-hashed-db was given.
8468 if test "${with_hashed_db+set}" = set; then
8469   withval="$with_hashed_db"
8470
8471 else
8472   with_hashed_db=no
8473 fi;
8474         echo "$as_me:8474: result: $with_hashed_db" >&5
8475 echo "${ECHO_T}$with_hashed_db" >&6
8476 else
8477         with_hashed_db=no
8478 fi
8479
8480 echo "$as_me:8480: checking for list of fallback descriptions" >&5
8481 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8482
8483 # Check whether --with-fallbacks or --without-fallbacks was given.
8484 if test "${with_fallbacks+set}" = set; then
8485   withval="$with_fallbacks"
8486   with_fallback=$withval
8487 else
8488   with_fallback=
8489 fi;
8490 echo "$as_me:8490: result: $with_fallback" >&5
8491 echo "${ECHO_T}$with_fallback" >&6
8492
8493 case ".$with_fallback" in
8494 (.|.no)
8495         FALLBACK_LIST=
8496         ;;
8497 (.yes)
8498         { echo "$as_me:8498: WARNING: expected a list of terminal descriptions" >&5
8499 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8500         ;;
8501 (*)
8502         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8503         ;;
8504 esac
8505
8506 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8507 # tree for generating the terminal descriptions that will be compiled into the
8508 # library.  If your toolchain is old, it may not handle current terminal
8509 # databases.  Use configure-options to point to the tools which will be used,
8510 # rather than the first ones found on the $PATH.
8511 if test -n "$ac_tool_prefix"; then
8512   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8513 set dummy ${ac_tool_prefix}tic; ac_word=$2
8514 echo "$as_me:8514: checking for $ac_word" >&5
8515 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8516 if test "${ac_cv_prog_TIC+set}" = set; then
8517   echo $ECHO_N "(cached) $ECHO_C" >&6
8518 else
8519   if test -n "$TIC"; then
8520   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8521 else
8522   ac_save_IFS=$IFS; IFS=$ac_path_separator
8523 ac_dummy="$PATH"
8524 for ac_dir in $ac_dummy; do
8525   IFS=$ac_save_IFS
8526   test -z "$ac_dir" && ac_dir=.
8527   $as_executable_p "$ac_dir/$ac_word" || continue
8528 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8529 echo "$as_me:8529: found $ac_dir/$ac_word" >&5
8530 break
8531 done
8532
8533 fi
8534 fi
8535 TIC=$ac_cv_prog_TIC
8536 if test -n "$TIC"; then
8537   echo "$as_me:8537: result: $TIC" >&5
8538 echo "${ECHO_T}$TIC" >&6
8539 else
8540   echo "$as_me:8540: result: no" >&5
8541 echo "${ECHO_T}no" >&6
8542 fi
8543
8544 fi
8545 if test -z "$ac_cv_prog_TIC"; then
8546   ac_ct_TIC=$TIC
8547   # Extract the first word of "tic", so it can be a program name with args.
8548 set dummy tic; ac_word=$2
8549 echo "$as_me:8549: checking for $ac_word" >&5
8550 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8551 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8552   echo $ECHO_N "(cached) $ECHO_C" >&6
8553 else
8554   if test -n "$ac_ct_TIC"; then
8555   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8556 else
8557   ac_save_IFS=$IFS; IFS=$ac_path_separator
8558 ac_dummy="$PATH"
8559 for ac_dir in $ac_dummy; do
8560   IFS=$ac_save_IFS
8561   test -z "$ac_dir" && ac_dir=.
8562   $as_executable_p "$ac_dir/$ac_word" || continue
8563 ac_cv_prog_ac_ct_TIC="tic"
8564 echo "$as_me:8564: found $ac_dir/$ac_word" >&5
8565 break
8566 done
8567
8568 fi
8569 fi
8570 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8571 if test -n "$ac_ct_TIC"; then
8572   echo "$as_me:8572: result: $ac_ct_TIC" >&5
8573 echo "${ECHO_T}$ac_ct_TIC" >&6
8574 else
8575   echo "$as_me:8575: result: no" >&5
8576 echo "${ECHO_T}no" >&6
8577 fi
8578
8579   TIC=$ac_ct_TIC
8580 else
8581   TIC="$ac_cv_prog_TIC"
8582 fi
8583
8584 if test -n "$ac_tool_prefix"; then
8585   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8586 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8587 echo "$as_me:8587: checking for $ac_word" >&5
8588 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8589 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8590   echo $ECHO_N "(cached) $ECHO_C" >&6
8591 else
8592   if test -n "$INFOCMP"; then
8593   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8594 else
8595   ac_save_IFS=$IFS; IFS=$ac_path_separator
8596 ac_dummy="$PATH"
8597 for ac_dir in $ac_dummy; do
8598   IFS=$ac_save_IFS
8599   test -z "$ac_dir" && ac_dir=.
8600   $as_executable_p "$ac_dir/$ac_word" || continue
8601 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8602 echo "$as_me:8602: found $ac_dir/$ac_word" >&5
8603 break
8604 done
8605
8606 fi
8607 fi
8608 INFOCMP=$ac_cv_prog_INFOCMP
8609 if test -n "$INFOCMP"; then
8610   echo "$as_me:8610: result: $INFOCMP" >&5
8611 echo "${ECHO_T}$INFOCMP" >&6
8612 else
8613   echo "$as_me:8613: result: no" >&5
8614 echo "${ECHO_T}no" >&6
8615 fi
8616
8617 fi
8618 if test -z "$ac_cv_prog_INFOCMP"; then
8619   ac_ct_INFOCMP=$INFOCMP
8620   # Extract the first word of "infocmp", so it can be a program name with args.
8621 set dummy infocmp; ac_word=$2
8622 echo "$as_me:8622: checking for $ac_word" >&5
8623 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8624 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8625   echo $ECHO_N "(cached) $ECHO_C" >&6
8626 else
8627   if test -n "$ac_ct_INFOCMP"; then
8628   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8629 else
8630   ac_save_IFS=$IFS; IFS=$ac_path_separator
8631 ac_dummy="$PATH"
8632 for ac_dir in $ac_dummy; do
8633   IFS=$ac_save_IFS
8634   test -z "$ac_dir" && ac_dir=.
8635   $as_executable_p "$ac_dir/$ac_word" || continue
8636 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8637 echo "$as_me:8637: found $ac_dir/$ac_word" >&5
8638 break
8639 done
8640
8641 fi
8642 fi
8643 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8644 if test -n "$ac_ct_INFOCMP"; then
8645   echo "$as_me:8645: result: $ac_ct_INFOCMP" >&5
8646 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8647 else
8648   echo "$as_me:8648: result: no" >&5
8649 echo "${ECHO_T}no" >&6
8650 fi
8651
8652   INFOCMP=$ac_ct_INFOCMP
8653 else
8654   INFOCMP="$ac_cv_prog_INFOCMP"
8655 fi
8656
8657 if test -n "$FALLBACK_LIST"
8658 then
8659
8660 # Check whether --with-tic-path or --without-tic-path was given.
8661 if test "${with_tic_path+set}" = set; then
8662   withval="$with_tic_path"
8663   echo "$as_me:8663: checking for tic program for fallbacks" >&5
8664 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8665                 TIC=$withval
8666                 echo "$as_me:8666: result: $TIC" >&5
8667 echo "${ECHO_T}$TIC" >&6
8668
8669 if test "x$prefix" != xNONE; then
8670         cf_path_syntax="$prefix"
8671 else
8672         cf_path_syntax="$ac_default_prefix"
8673 fi
8674
8675 case ".$TIC" in
8676 (.\$\(*\)*|.\'*\'*)
8677         ;;
8678 (..|./*|.\\*)
8679         ;;
8680 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8681         ;;
8682 (.\$\{*prefix\}*|.\$\{*dir\}*)
8683         eval TIC="$TIC"
8684         case ".$TIC" in
8685         (.NONE/*)
8686                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8687                 ;;
8688         esac
8689         ;;
8690 (.no|.NONE/*)
8691         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8692         ;;
8693 (*)
8694         { { echo "$as_me:8694: error: expected a pathname, not \"$TIC\"" >&5
8695 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8696    { (exit 1); exit 1; }; }
8697         ;;
8698 esac
8699
8700 else
8701
8702 test -z "$TIC" && TIC="tic"
8703 for ac_prog in $TIC tic
8704 do
8705   # Extract the first word of "$ac_prog", so it can be a program name with args.
8706 set dummy $ac_prog; ac_word=$2
8707 echo "$as_me:8707: checking for $ac_word" >&5
8708 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8709 if test "${ac_cv_path_TIC+set}" = set; then
8710   echo $ECHO_N "(cached) $ECHO_C" >&6
8711 else
8712   case $TIC in
8713   [\\/]* | ?:[\\/]*)
8714   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8715   ;;
8716   *)
8717   ac_save_IFS=$IFS; IFS=$ac_path_separator
8718 ac_dummy="$PATH:/usr/local/ncurses/bin"
8719 for ac_dir in $ac_dummy; do
8720   IFS=$ac_save_IFS
8721   test -z "$ac_dir" && ac_dir=.
8722   if $as_executable_p "$ac_dir/$ac_word"; then
8723    ac_cv_path_TIC="$ac_dir/$ac_word"
8724    echo "$as_me:8724: found $ac_dir/$ac_word" >&5
8725    break
8726 fi
8727 done
8728
8729   ;;
8730 esac
8731 fi
8732 TIC=$ac_cv_path_TIC
8733
8734 if test -n "$TIC"; then
8735   echo "$as_me:8735: result: $TIC" >&5
8736 echo "${ECHO_T}$TIC" >&6
8737 else
8738   echo "$as_me:8738: result: no" >&5
8739 echo "${ECHO_T}no" >&6
8740 fi
8741
8742   test -n "$TIC" && break
8743 done
8744 test -n "$TIC" || TIC="$TIC"
8745
8746 cf_path_prog=""
8747 cf_path_args=""
8748 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8749 for cf_temp in $ac_cv_path_TIC
8750 do
8751         if test -z "$cf_path_prog" ; then
8752                 if test "$with_full_paths" = yes ; then
8753
8754 if test "x$prefix" != xNONE; then
8755         cf_path_syntax="$prefix"
8756 else
8757         cf_path_syntax="$ac_default_prefix"
8758 fi
8759
8760 case ".$cf_temp" in
8761 (.\$\(*\)*|.\'*\'*)
8762         ;;
8763 (..|./*|.\\*)
8764         ;;
8765 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8766         ;;
8767 (.\$\{*prefix\}*|.\$\{*dir\}*)
8768         eval cf_temp="$cf_temp"
8769         case ".$cf_temp" in
8770         (.NONE/*)
8771                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8772                 ;;
8773         esac
8774         ;;
8775 (.no|.NONE/*)
8776         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8777         ;;
8778 (*)
8779         break
8780         ;;
8781 esac
8782
8783                         cf_path_prog="$cf_temp"
8784                 else
8785                         cf_path_prog="`basename "$cf_temp"`"
8786                 fi
8787         elif test -z "$cf_path_args" ; then
8788                 cf_path_args="$cf_temp"
8789         else
8790                 cf_path_args="$cf_path_args $cf_temp"
8791         fi
8792 done
8793 IFS="$cf_save_ifs"
8794
8795 if test -n "$cf_path_prog" ; then
8796
8797 echo "${as_me:-configure}:8797: testing defining path for ${cf_path_prog} ..." 1>&5
8798
8799 cat >>confdefs.h <<EOF
8800 #define TIC_PATH "$cf_path_prog"
8801 EOF
8802
8803         test -n "$cf_path_args" &&
8804 cat >>confdefs.h <<EOF
8805 #define TIC_ARGS "$cf_path_args"
8806 EOF
8807
8808 fi
8809
8810                 if test -z "$TIC"
8811                 then
8812                         { echo "$as_me:8812: WARNING: no tic program found for fallbacks" >&5
8813 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8814                 fi
8815
8816 fi;
8817
8818 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8819 if test "${with_infocmp_path+set}" = set; then
8820   withval="$with_infocmp_path"
8821   echo "$as_me:8821: checking for infocmp program for fallbacks" >&5
8822 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8823                 INFOCMP=$withval
8824                 echo "$as_me:8824: result: $INFOCMP" >&5
8825 echo "${ECHO_T}$INFOCMP" >&6
8826
8827 if test "x$prefix" != xNONE; then
8828         cf_path_syntax="$prefix"
8829 else
8830         cf_path_syntax="$ac_default_prefix"
8831 fi
8832
8833 case ".$INFOCMP" in
8834 (.\$\(*\)*|.\'*\'*)
8835         ;;
8836 (..|./*|.\\*)
8837         ;;
8838 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8839         ;;
8840 (.\$\{*prefix\}*|.\$\{*dir\}*)
8841         eval INFOCMP="$INFOCMP"
8842         case ".$INFOCMP" in
8843         (.NONE/*)
8844                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8845                 ;;
8846         esac
8847         ;;
8848 (.no|.NONE/*)
8849         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8850         ;;
8851 (*)
8852         { { echo "$as_me:8852: error: expected a pathname, not \"$INFOCMP\"" >&5
8853 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8854    { (exit 1); exit 1; }; }
8855         ;;
8856 esac
8857
8858 else
8859
8860 test -z "$INFOCMP" && INFOCMP="infocmp"
8861 for ac_prog in $INFOCMP infocmp
8862 do
8863   # Extract the first word of "$ac_prog", so it can be a program name with args.
8864 set dummy $ac_prog; ac_word=$2
8865 echo "$as_me:8865: checking for $ac_word" >&5
8866 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8867 if test "${ac_cv_path_INFOCMP+set}" = set; then
8868   echo $ECHO_N "(cached) $ECHO_C" >&6
8869 else
8870   case $INFOCMP in
8871   [\\/]* | ?:[\\/]*)
8872   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8873   ;;
8874   *)
8875   ac_save_IFS=$IFS; IFS=$ac_path_separator
8876 ac_dummy="$PATH:/usr/local/ncurses/bin"
8877 for ac_dir in $ac_dummy; do
8878   IFS=$ac_save_IFS
8879   test -z "$ac_dir" && ac_dir=.
8880   if $as_executable_p "$ac_dir/$ac_word"; then
8881    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8882    echo "$as_me:8882: found $ac_dir/$ac_word" >&5
8883    break
8884 fi
8885 done
8886
8887   ;;
8888 esac
8889 fi
8890 INFOCMP=$ac_cv_path_INFOCMP
8891
8892 if test -n "$INFOCMP"; then
8893   echo "$as_me:8893: result: $INFOCMP" >&5
8894 echo "${ECHO_T}$INFOCMP" >&6
8895 else
8896   echo "$as_me:8896: result: no" >&5
8897 echo "${ECHO_T}no" >&6
8898 fi
8899
8900   test -n "$INFOCMP" && break
8901 done
8902 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8903
8904 cf_path_prog=""
8905 cf_path_args=""
8906 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8907 for cf_temp in $ac_cv_path_INFOCMP
8908 do
8909         if test -z "$cf_path_prog" ; then
8910                 if test "$with_full_paths" = yes ; then
8911
8912 if test "x$prefix" != xNONE; then
8913         cf_path_syntax="$prefix"
8914 else
8915         cf_path_syntax="$ac_default_prefix"
8916 fi
8917
8918 case ".$cf_temp" in
8919 (.\$\(*\)*|.\'*\'*)
8920         ;;
8921 (..|./*|.\\*)
8922         ;;
8923 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8924         ;;
8925 (.\$\{*prefix\}*|.\$\{*dir\}*)
8926         eval cf_temp="$cf_temp"
8927         case ".$cf_temp" in
8928         (.NONE/*)
8929                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8930                 ;;
8931         esac
8932         ;;
8933 (.no|.NONE/*)
8934         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8935         ;;
8936 (*)
8937         break
8938         ;;
8939 esac
8940
8941                         cf_path_prog="$cf_temp"
8942                 else
8943                         cf_path_prog="`basename "$cf_temp"`"
8944                 fi
8945         elif test -z "$cf_path_args" ; then
8946                 cf_path_args="$cf_temp"
8947         else
8948                 cf_path_args="$cf_path_args $cf_temp"
8949         fi
8950 done
8951 IFS="$cf_save_ifs"
8952
8953 if test -n "$cf_path_prog" ; then
8954
8955 echo "${as_me:-configure}:8955: testing defining path for ${cf_path_prog} ..." 1>&5
8956
8957 cat >>confdefs.h <<EOF
8958 #define INFOCMP_PATH "$cf_path_prog"
8959 EOF
8960
8961         test -n "$cf_path_args" &&
8962 cat >>confdefs.h <<EOF
8963 #define INFOCMP_ARGS "$cf_path_args"
8964 EOF
8965
8966 fi
8967
8968                 if test -z "$INFOCMP"
8969                 then
8970                         { echo "$as_me:8970: WARNING: no infocmp program found for fallbacks" >&5
8971 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8972                 fi
8973
8974 fi;
8975
8976         test -z "$TIC" && FALLBACK_LIST=
8977         test -z "$INFOCMP" && FALLBACK_LIST=
8978         if test -z "$FALLBACK_LIST"
8979         then
8980                 { echo "$as_me:8980: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8981 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8982         fi
8983 fi
8984
8985 USE_FALLBACKS=
8986 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8987
8988 echo "$as_me:8988: checking if you want modern xterm or antique" >&5
8989 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8990
8991 # Check whether --with-xterm-new or --without-xterm-new was given.
8992 if test "${with_xterm_new+set}" = set; then
8993   withval="$with_xterm_new"
8994   with_xterm_new=$withval
8995 else
8996   with_xterm_new=yes
8997 fi;
8998 case "$with_xterm_new" in
8999 (no) with_xterm_new=xterm-old;;
9000 (*)      with_xterm_new=xterm-new;;
9001 esac
9002 echo "$as_me:9002: result: $with_xterm_new" >&5
9003 echo "${ECHO_T}$with_xterm_new" >&6
9004 WHICH_XTERM=$with_xterm_new
9005
9006 case $host_os in
9007 (*linux-gnu|*cygwin|*mingw32|*msys)
9008         want_xterm_kbs=DEL
9009         ;;
9010 (*)
9011         want_xterm_kbs=BS
9012         ;;
9013 esac
9014
9015 echo "$as_me:9015: checking if xterm backspace sends BS or DEL" >&5
9016 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9017
9018 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9019 if test "${with_xterm_kbs+set}" = set; then
9020   withval="$with_xterm_kbs"
9021   with_xterm_kbs=$withval
9022 else
9023   with_xterm_kbs=BS
9024 fi;
9025 case x$with_xterm_kbs in
9026 (xyes|xno|xBS|xbs|x8)
9027         with_xterm_kbs=BS
9028         ;;
9029 (xDEL|xdel|x127)
9030         with_xterm_kbs=DEL
9031         ;;
9032 (*)
9033         with_xterm_kbs=$withval
9034         ;;
9035 esac
9036 echo "$as_me:9036: result: $with_xterm_kbs" >&5
9037 echo "${ECHO_T}$with_xterm_kbs" >&6
9038 XTERM_KBS=$with_xterm_kbs
9039
9040 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9041 then
9042         { echo "$as_me:9042: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&5
9043 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&2;}
9044 fi
9045
9046 MAKE_TERMINFO=
9047 if test "$use_database" = no ; then
9048         TERMINFO="${datadir}/terminfo"
9049         MAKE_TERMINFO="#"
9050 else
9051
9052 echo "$as_me:9052: checking for list of terminfo directories" >&5
9053 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9054
9055 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9056 if test "${with_terminfo_dirs+set}" = set; then
9057   withval="$with_terminfo_dirs"
9058
9059 else
9060   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9061 fi;
9062 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9063 cf_dst_path=
9064 for cf_src_path in $withval
9065 do
9066
9067 if test "x$prefix" != xNONE; then
9068         cf_path_syntax="$prefix"
9069 else
9070         cf_path_syntax="$ac_default_prefix"
9071 fi
9072
9073 case ".$cf_src_path" in
9074 (.\$\(*\)*|.\'*\'*)
9075         ;;
9076 (..|./*|.\\*)
9077         ;;
9078 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9079         ;;
9080 (.\$\{*prefix\}*|.\$\{*dir\}*)
9081         eval cf_src_path="$cf_src_path"
9082         case ".$cf_src_path" in
9083         (.NONE/*)
9084                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9085                 ;;
9086         esac
9087         ;;
9088 (.no|.NONE/*)
9089         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9090         ;;
9091 (*)
9092         { { echo "$as_me:9092: error: expected a pathname, not \"$cf_src_path\"" >&5
9093 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9094    { (exit 1); exit 1; }; }
9095         ;;
9096 esac
9097
9098   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9099   cf_dst_path="${cf_dst_path}${cf_src_path}"
9100 done
9101 IFS="$ac_save_ifs"
9102
9103 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9104 # so we have to check/work around.  We do prefer the result of "eval"...
9105 eval cf_dst_eval="$cf_dst_path"
9106 case "x$cf_dst_eval" in
9107 (xNONE*)
9108         TERMINFO_DIRS=$cf_dst_path
9109         ;;
9110 (*)
9111         TERMINFO_DIRS="$cf_dst_eval"
9112         ;;
9113 esac
9114
9115 echo "$as_me:9115: result: $TERMINFO_DIRS" >&5
9116 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9117 test -n "$TERMINFO_DIRS" &&
9118 cat >>confdefs.h <<EOF
9119 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9120 EOF
9121
9122 case "x$TERMINFO" in
9123 x???:*)
9124         { echo "$as_me:9124: WARNING: ignoring non-directory/file TERMINFO value" >&5
9125 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9126         unset TERMINFO
9127         ;;
9128 esac
9129
9130 echo "$as_me:9130: checking for default terminfo directory" >&5
9131 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9132
9133 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9134 if test "${with_default_terminfo_dir+set}" = set; then
9135   withval="$with_default_terminfo_dir"
9136
9137 else
9138   withval="${TERMINFO:-${datadir}/terminfo}"
9139 fi; if test -n "${datadir}/terminfo" ; then
9140
9141 if test "x$prefix" != xNONE; then
9142         cf_path_syntax="$prefix"
9143 else
9144         cf_path_syntax="$ac_default_prefix"
9145 fi
9146
9147 case ".$withval" in
9148 (.\$\(*\)*|.\'*\'*)
9149         ;;
9150 (..|./*|.\\*)
9151         ;;
9152 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9153         ;;
9154 (.\$\{*prefix\}*|.\$\{*dir\}*)
9155         eval withval="$withval"
9156         case ".$withval" in
9157         (.NONE/*)
9158                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9159                 ;;
9160         esac
9161         ;;
9162 (.no|.NONE/*)
9163         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9164         ;;
9165 (*)
9166         { { echo "$as_me:9166: error: expected a pathname, not \"$withval\"" >&5
9167 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9168    { (exit 1); exit 1; }; }
9169         ;;
9170 esac
9171
9172 fi
9173 eval TERMINFO="$withval"
9174
9175 echo "$as_me:9175: result: $TERMINFO" >&5
9176 echo "${ECHO_T}$TERMINFO" >&6
9177
9178 cat >>confdefs.h <<EOF
9179 #define TERMINFO "$TERMINFO"
9180 EOF
9181
9182 fi
9183
9184 ###     use option --disable-big-core to make tic run on small machines
9185 ###     We need 4Mb, check if we can allocate 50% more than that.
9186 echo "$as_me:9186: checking if big-core option selected" >&5
9187 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9188
9189 # Check whether --enable-big-core or --disable-big-core was given.
9190 if test "${enable_big_core+set}" = set; then
9191   enableval="$enable_big_core"
9192   with_big_core=$enableval
9193 else
9194   if test "$cross_compiling" = yes; then
9195   with_big_core=no
9196 else
9197   cat >"conftest.$ac_ext" <<_ACEOF
9198 #line 9198 "configure"
9199 #include "confdefs.h"
9200
9201 #include <stdlib.h>
9202 #include <string.h>
9203 int main() {
9204         unsigned long n = 6000000L;
9205         char *s = malloc(n);
9206         if (s != 0)
9207                 s[0] = s[n-1] = 0;
9208         ${cf_cv_main_return:-return}(s == 0);
9209 }
9210 _ACEOF
9211 rm -f "conftest$ac_exeext"
9212 if { (eval echo "$as_me:9212: \"$ac_link\"") >&5
9213   (eval $ac_link) 2>&5
9214   ac_status=$?
9215   echo "$as_me:9215: \$? = $ac_status" >&5
9216   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9217   { (eval echo "$as_me:9217: \"$ac_try\"") >&5
9218   (eval $ac_try) 2>&5
9219   ac_status=$?
9220   echo "$as_me:9220: \$? = $ac_status" >&5
9221   (exit "$ac_status"); }; }; then
9222   with_big_core=yes
9223 else
9224   echo "$as_me: program exited with status $ac_status" >&5
9225 echo "$as_me: failed program was:" >&5
9226 cat "conftest.$ac_ext" >&5
9227 with_big_core=no
9228 fi
9229 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9230 fi
9231 fi;
9232 echo "$as_me:9232: result: $with_big_core" >&5
9233 echo "${ECHO_T}$with_big_core" >&6
9234 test "x$with_big_core" = "xyes" &&
9235 cat >>confdefs.h <<\EOF
9236 #define HAVE_BIG_CORE 1
9237 EOF
9238
9239 ### ISO C only guarantees 512-char strings, we have tables which load faster
9240 ### when constructed using "big" strings.  More than the C compiler, the awk
9241 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9242 echo "$as_me:9242: checking if big-strings option selected" >&5
9243 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9244
9245 # Check whether --enable-big-strings or --disable-big-strings was given.
9246 if test "${enable_big_strings+set}" = set; then
9247   enableval="$enable_big_strings"
9248   with_big_strings=$enableval
9249 else
9250
9251         case x$AWK in
9252         (x)
9253                 eval with_big_strings=no
9254                 ;;
9255         (*)
9256                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9257                         | $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
9258                         eval with_big_strings=yes
9259                 else
9260                         eval with_big_strings=no
9261                 fi
9262                 ;;
9263         esac
9264
9265 fi;
9266 echo "$as_me:9266: result: $with_big_strings" >&5
9267 echo "${ECHO_T}$with_big_strings" >&6
9268
9269 USE_BIG_STRINGS=0
9270 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9271
9272 ###     use option --enable-termcap to compile in the termcap fallback support
9273 echo "$as_me:9273: checking if you want termcap-fallback support" >&5
9274 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9275
9276 # Check whether --enable-termcap or --disable-termcap was given.
9277 if test "${enable_termcap+set}" = set; then
9278   enableval="$enable_termcap"
9279   with_termcap=$enableval
9280 else
9281   with_termcap=no
9282 fi;
9283 echo "$as_me:9283: result: $with_termcap" >&5
9284 echo "${ECHO_T}$with_termcap" >&6
9285
9286 NCURSES_USE_TERMCAP=0
9287 if test "x$with_termcap" != "xyes" ; then
9288         if test "$use_database" = no ; then
9289                 if test -z "$with_fallback" ; then
9290                         { { echo "$as_me:9290: error: You have disabled the database w/o specifying fallbacks" >&5
9291 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9292    { (exit 1); exit 1; }; }
9293                 fi
9294         fi
9295
9296 cat >>confdefs.h <<\EOF
9297 #define PURE_TERMINFO 1
9298 EOF
9299
9300 else
9301
9302         if test "$with_ticlib" != no ; then
9303                 { { echo "$as_me:9303: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9304 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9305    { (exit 1); exit 1; }; }
9306         fi
9307
9308         NCURSES_USE_TERMCAP=1
9309         echo "$as_me:9309: checking for list of termcap files" >&5
9310 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9311
9312 # Check whether --with-termpath or --without-termpath was given.
9313 if test "${with_termpath+set}" = set; then
9314   withval="$with_termpath"
9315
9316 else
9317   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9318 fi;
9319 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9320 cf_dst_path=
9321 for cf_src_path in $withval
9322 do
9323
9324 if test "x$prefix" != xNONE; then
9325         cf_path_syntax="$prefix"
9326 else
9327         cf_path_syntax="$ac_default_prefix"
9328 fi
9329
9330 case ".$cf_src_path" in
9331 (.\$\(*\)*|.\'*\'*)
9332         ;;
9333 (..|./*|.\\*)
9334         ;;
9335 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9336         ;;
9337 (.\$\{*prefix\}*|.\$\{*dir\}*)
9338         eval cf_src_path="$cf_src_path"
9339         case ".$cf_src_path" in
9340         (.NONE/*)
9341                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9342                 ;;
9343         esac
9344         ;;
9345 (.no|.NONE/*)
9346         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9347         ;;
9348 (*)
9349         { { echo "$as_me:9349: error: expected a pathname, not \"$cf_src_path\"" >&5
9350 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9351    { (exit 1); exit 1; }; }
9352         ;;
9353 esac
9354
9355   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9356   cf_dst_path="${cf_dst_path}${cf_src_path}"
9357 done
9358 IFS="$ac_save_ifs"
9359
9360 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9361 # so we have to check/work around.  We do prefer the result of "eval"...
9362 eval cf_dst_eval="$cf_dst_path"
9363 case "x$cf_dst_eval" in
9364 (xNONE*)
9365         TERMPATH=$cf_dst_path
9366         ;;
9367 (*)
9368         TERMPATH="$cf_dst_eval"
9369         ;;
9370 esac
9371
9372         echo "$as_me:9372: result: $TERMPATH" >&5
9373 echo "${ECHO_T}$TERMPATH" >&6
9374         test -n "$TERMPATH" &&
9375 cat >>confdefs.h <<EOF
9376 #define TERMPATH "$TERMPATH"
9377 EOF
9378
9379         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9380         echo "$as_me:9380: checking if fast termcap-loader is needed" >&5
9381 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9382
9383 # Check whether --enable-getcap or --disable-getcap was given.
9384 if test "${enable_getcap+set}" = set; then
9385   enableval="$enable_getcap"
9386   with_getcap=$enableval
9387 else
9388   with_getcap=no
9389 fi;
9390         echo "$as_me:9390: result: $with_getcap" >&5
9391 echo "${ECHO_T}$with_getcap" >&6
9392         test "x$with_getcap" = "xyes" &&
9393 cat >>confdefs.h <<\EOF
9394 #define USE_GETCAP 1
9395 EOF
9396
9397         echo "$as_me:9397: checking if translated termcaps will be cached in ~/.terminfo" >&5
9398 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9399
9400 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9401 if test "${enable_getcap_cache+set}" = set; then
9402   enableval="$enable_getcap_cache"
9403   with_getcap_cache=$enableval
9404 else
9405   with_getcap_cache=no
9406 fi;
9407         echo "$as_me:9407: result: $with_getcap_cache" >&5
9408 echo "${ECHO_T}$with_getcap_cache" >&6
9409         test "x$with_getcap_cache" = "xyes" &&
9410 cat >>confdefs.h <<\EOF
9411 #define USE_GETCAP_CACHE 1
9412 EOF
9413
9414 fi
9415
9416 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9417 echo "$as_me:9417: checking if ~/.terminfo is wanted" >&5
9418 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9419
9420 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9421 if test "${enable_home_terminfo+set}" = set; then
9422   enableval="$enable_home_terminfo"
9423   with_home_terminfo=$enableval
9424 else
9425   with_home_terminfo=yes
9426 fi;
9427 echo "$as_me:9427: result: $with_home_terminfo" >&5
9428 echo "${ECHO_T}$with_home_terminfo" >&6
9429 test "x$with_home_terminfo" = "xyes" &&
9430 cat >>confdefs.h <<\EOF
9431 #define USE_HOME_TERMINFO 1
9432 EOF
9433
9434 echo "$as_me:9434: checking if you want to permit root to use ncurses environment variables" >&5
9435 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9436
9437 # Check whether --enable-root-environ or --disable-root-environ was given.
9438 if test "${enable_root_environ+set}" = set; then
9439   enableval="$enable_root_environ"
9440   with_root_environ=$enableval
9441 else
9442   with_root_environ=yes
9443 fi;
9444 echo "$as_me:9444: result: $with_root_environ" >&5
9445 echo "${ECHO_T}$with_root_environ" >&6
9446 test "x$with_root_environ" = xyes &&
9447 cat >>confdefs.h <<\EOF
9448 #define USE_ROOT_ENVIRON 1
9449 EOF
9450
9451 echo "$as_me:9451: checking if you want to permit setuid programs to access all files" >&5
9452 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9453
9454 # Check whether --enable-root-environ or --disable-root-environ was given.
9455 if test "${enable_root_environ+set}" = set; then
9456   enableval="$enable_root_environ"
9457   with_root_access=$enableval
9458 else
9459   with_root_access=yes
9460 fi;
9461 echo "$as_me:9461: result: $with_root_access" >&5
9462 echo "${ECHO_T}$with_root_access" >&6
9463 test "x$with_root_access" = xyes &&
9464 cat >>confdefs.h <<\EOF
9465 #define USE_ROOT_ACCESS 1
9466 EOF
9467
9468 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9469 ###   to reduce storage requirements for the terminfo database.
9470
9471 for ac_header in \
9472 unistd.h \
9473
9474 do
9475 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9476 echo "$as_me:9476: checking for $ac_header" >&5
9477 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9478 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9479   echo $ECHO_N "(cached) $ECHO_C" >&6
9480 else
9481   cat >"conftest.$ac_ext" <<_ACEOF
9482 #line 9482 "configure"
9483 #include "confdefs.h"
9484 #include <$ac_header>
9485 _ACEOF
9486 if { (eval echo "$as_me:9486: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9487   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9488   ac_status=$?
9489   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9490   rm -f conftest.er1
9491   cat conftest.err >&5
9492   echo "$as_me:9492: \$? = $ac_status" >&5
9493   (exit "$ac_status"); } >/dev/null; then
9494   if test -s conftest.err; then
9495     ac_cpp_err=$ac_c_preproc_warn_flag
9496   else
9497     ac_cpp_err=
9498   fi
9499 else
9500   ac_cpp_err=yes
9501 fi
9502 if test -z "$ac_cpp_err"; then
9503   eval "$as_ac_Header=yes"
9504 else
9505   echo "$as_me: failed program was:" >&5
9506   cat "conftest.$ac_ext" >&5
9507   eval "$as_ac_Header=no"
9508 fi
9509 rm -f conftest.err "conftest.$ac_ext"
9510 fi
9511 echo "$as_me:9511: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9512 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9513 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9514   cat >>confdefs.h <<EOF
9515 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9516 EOF
9517
9518 fi
9519 done
9520
9521 for ac_func in \
9522         remove \
9523         unlink
9524 do
9525 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9526 echo "$as_me:9526: checking for $ac_func" >&5
9527 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9528 if eval "test \"\${$as_ac_var+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 #define $ac_func autoconf_temporary
9535 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9536 #undef $ac_func
9537
9538 #ifdef __cplusplus
9539 extern "C"
9540 #endif
9541
9542 /* We use char because int might match the return type of a gcc2
9543    builtin and then its argument prototype would still apply.  */
9544 char $ac_func (void);
9545
9546 int
9547 main (void)
9548 {
9549
9550 /* The GNU C library defines stubs for functions which it implements
9551     to always fail with ENOSYS.  Some functions are actually named
9552     something starting with __ and the normal name is an alias.  */
9553 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9554 #error found stub for $ac_func
9555 #endif
9556
9557         return $ac_func ();
9558   ;
9559   return 0;
9560 }
9561 _ACEOF
9562 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9563 if { (eval echo "$as_me:9563: \"$ac_link\"") >&5
9564   (eval $ac_link) 2>&5
9565   ac_status=$?
9566   echo "$as_me:9566: \$? = $ac_status" >&5
9567   (exit "$ac_status"); } &&
9568          { ac_try='test -s "conftest$ac_exeext"'
9569   { (eval echo "$as_me:9569: \"$ac_try\"") >&5
9570   (eval $ac_try) 2>&5
9571   ac_status=$?
9572   echo "$as_me:9572: \$? = $ac_status" >&5
9573   (exit "$ac_status"); }; }; then
9574   eval "$as_ac_var=yes"
9575 else
9576   echo "$as_me: failed program was:" >&5
9577 cat "conftest.$ac_ext" >&5
9578 eval "$as_ac_var=no"
9579 fi
9580 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9581 fi
9582 echo "$as_me:9582: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9583 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9584 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9585   cat >>confdefs.h <<EOF
9586 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9587 EOF
9588
9589 fi
9590 done
9591
9592 if test "$cross_compiling" = yes ; then
9593
9594 for ac_func in \
9595                 link \
9596                 symlink
9597 do
9598 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9599 echo "$as_me:9599: checking for $ac_func" >&5
9600 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9601 if eval "test \"\${$as_ac_var+set}\" = set"; then
9602   echo $ECHO_N "(cached) $ECHO_C" >&6
9603 else
9604   cat >"conftest.$ac_ext" <<_ACEOF
9605 #line 9605 "configure"
9606 #include "confdefs.h"
9607 #define $ac_func autoconf_temporary
9608 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9609 #undef $ac_func
9610
9611 #ifdef __cplusplus
9612 extern "C"
9613 #endif
9614
9615 /* We use char because int might match the return type of a gcc2
9616    builtin and then its argument prototype would still apply.  */
9617 char $ac_func (void);
9618
9619 int
9620 main (void)
9621 {
9622
9623 /* The GNU C library defines stubs for functions which it implements
9624     to always fail with ENOSYS.  Some functions are actually named
9625     something starting with __ and the normal name is an alias.  */
9626 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9627 #error found stub for $ac_func
9628 #endif
9629
9630         return $ac_func ();
9631   ;
9632   return 0;
9633 }
9634 _ACEOF
9635 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9636 if { (eval echo "$as_me:9636: \"$ac_link\"") >&5
9637   (eval $ac_link) 2>&5
9638   ac_status=$?
9639   echo "$as_me:9639: \$? = $ac_status" >&5
9640   (exit "$ac_status"); } &&
9641          { ac_try='test -s "conftest$ac_exeext"'
9642   { (eval echo "$as_me:9642: \"$ac_try\"") >&5
9643   (eval $ac_try) 2>&5
9644   ac_status=$?
9645   echo "$as_me:9645: \$? = $ac_status" >&5
9646   (exit "$ac_status"); }; }; then
9647   eval "$as_ac_var=yes"
9648 else
9649   echo "$as_me: failed program was:" >&5
9650 cat "conftest.$ac_ext" >&5
9651 eval "$as_ac_var=no"
9652 fi
9653 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9654 fi
9655 echo "$as_me:9655: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9656 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9657 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9658   cat >>confdefs.h <<EOF
9659 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9660 EOF
9661
9662 fi
9663 done
9664
9665 else
9666         echo "$as_me:9666: checking if link/symlink functions work" >&5
9667 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9668 if test "${cf_cv_link_funcs+set}" = set; then
9669   echo $ECHO_N "(cached) $ECHO_C" >&6
9670 else
9671
9672                 cf_cv_link_funcs=
9673                 for cf_func in link symlink ; do
9674                         if test "$cross_compiling" = yes; then
9675
9676                         eval 'ac_cv_func_'$cf_func'=error'
9677 else
9678   cat >"conftest.$ac_ext" <<_ACEOF
9679 #line 9679 "configure"
9680 #include "confdefs.h"
9681
9682 #include <stdio.h>
9683 #include <sys/types.h>
9684 #include <sys/stat.h>
9685 #ifdef HAVE_UNISTD_H
9686 #include <unistd.h>
9687 #endif
9688 int main(void)
9689 {
9690         int fail = 0;
9691         char *src = "conftest.tmp";
9692         char *dst = "conftest.chk";
9693         struct stat src_sb, dst_sb;
9694         FILE *fp = fopen(src, "w");
9695         if (fp == 0) { fail = 3; } else {
9696                 fclose(fp); stat(src, &src_sb);
9697                 if ($cf_func(src, dst) < 0) {
9698                         fail = 1;
9699                 } else if (stat(dst, &dst_sb) < 0) {
9700                         fail = 2;
9701                 } else {
9702                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9703                         if (diff < 0) diff = -diff;
9704                         if (diff > 2) fail = 3;
9705                 }
9706         }
9707 #ifdef HAVE_UNLINK
9708         unlink(dst); unlink(src);
9709 #else
9710         remove(dst); remove(src);
9711 #endif
9712         ${cf_cv_main_return:-return} (fail);
9713 }
9714
9715 _ACEOF
9716 rm -f "conftest$ac_exeext"
9717 if { (eval echo "$as_me:9717: \"$ac_link\"") >&5
9718   (eval $ac_link) 2>&5
9719   ac_status=$?
9720   echo "$as_me:9720: \$? = $ac_status" >&5
9721   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9722   { (eval echo "$as_me:9722: \"$ac_try\"") >&5
9723   (eval $ac_try) 2>&5
9724   ac_status=$?
9725   echo "$as_me:9725: \$? = $ac_status" >&5
9726   (exit "$ac_status"); }; }; then
9727
9728                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9729                         eval 'ac_cv_func_'$cf_func'=yes'
9730 else
9731   echo "$as_me: program exited with status $ac_status" >&5
9732 echo "$as_me: failed program was:" >&5
9733 cat "conftest.$ac_ext" >&5
9734
9735                         eval 'ac_cv_func_'$cf_func'=no'
9736 fi
9737 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9738 fi
9739                 done
9740                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9741
9742 fi
9743 echo "$as_me:9743: result: $cf_cv_link_funcs" >&5
9744 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9745         test "$ac_cv_func_link"    = yes &&
9746 cat >>confdefs.h <<\EOF
9747 #define HAVE_LINK 1
9748 EOF
9749
9750         test "$ac_cv_func_symlink" = yes &&
9751 cat >>confdefs.h <<\EOF
9752 #define HAVE_SYMLINK 1
9753 EOF
9754
9755 fi
9756
9757 with_links=no
9758 with_symlinks=no
9759
9760 # soft links (symbolic links) are useful for some systems where hard links do
9761 # not work, or to make it simpler to copy terminfo trees around.
9762 if test "x$ac_cv_func_symlink" = xyes ; then
9763         echo "$as_me:9763: checking if tic should use symbolic links" >&5
9764 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9765
9766 # Check whether --enable-symlinks or --disable-symlinks was given.
9767 if test "${enable_symlinks+set}" = set; then
9768   enableval="$enable_symlinks"
9769   with_symlinks=$enableval
9770 else
9771   with_symlinks=no
9772 fi;
9773         echo "$as_me:9773: result: $with_symlinks" >&5
9774 echo "${ECHO_T}$with_symlinks" >&6
9775 fi
9776
9777 # If we have hard links and did not choose to use soft links instead, there is
9778 # no reason to make this choice optional - use the hard links.
9779 if test "$with_symlinks" = no ; then
9780         echo "$as_me:9780: checking if tic should use hard links" >&5
9781 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9782         if test "x$ac_cv_func_link" = xyes ; then
9783                 with_links=yes
9784         else
9785                 with_links=no
9786         fi
9787         echo "$as_me:9787: result: $with_links" >&5
9788 echo "${ECHO_T}$with_links" >&6
9789 fi
9790
9791 test "x$with_links" = xyes &&
9792 cat >>confdefs.h <<\EOF
9793 #define USE_LINKS 1
9794 EOF
9795
9796 test "x$with_symlinks" = xyes &&
9797 cat >>confdefs.h <<\EOF
9798 #define USE_SYMLINKS 1
9799 EOF
9800
9801 ###   use option --enable-broken-linker to force on use of broken-linker support
9802
9803 echo "$as_me:9803: checking if you want broken-linker support code" >&5
9804 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9805
9806 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9807 if test "${enable_broken_linker+set}" = set; then
9808   enableval="$enable_broken_linker"
9809   with_broken_linker=$enableval
9810 else
9811   with_broken_linker=no
9812 fi;
9813 echo "$as_me:9813: result: $with_broken_linker" >&5
9814 echo "${ECHO_T}$with_broken_linker" >&6
9815
9816 : "${BROKEN_LINKER:=0}"
9817 if test "x$with_broken_linker" = xyes ; then
9818
9819 cat >>confdefs.h <<\EOF
9820 #define BROKEN_LINKER 1
9821 EOF
9822
9823         BROKEN_LINKER=1
9824 fi
9825
9826 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9827 echo "$as_me:9827: checking if tputs should process BSD-style prefix padding" >&5
9828 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9829
9830 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9831 if test "${enable_bsdpad+set}" = set; then
9832   enableval="$enable_bsdpad"
9833   with_bsdpad=$enableval
9834 else
9835   with_bsdpad=no
9836 fi;
9837 echo "$as_me:9837: result: $with_bsdpad" >&5
9838 echo "${ECHO_T}$with_bsdpad" >&6
9839 test "x$with_bsdpad" = xyes &&
9840 cat >>confdefs.h <<\EOF
9841 #define BSD_TPUTS 1
9842 EOF
9843
9844 ###   use option --enable-widec to turn on use of wide-character support
9845 NCURSES_CH_T=chtype
9846 NCURSES_LIBUTF8=0
9847
9848 NEED_WCHAR_H=0
9849 NCURSES_MBSTATE_T=0
9850 NCURSES_WCHAR_T=0
9851 NCURSES_WINT_T=0
9852
9853 # Check to define _XOPEN_SOURCE "automatically"
9854 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9855
9856 echo "$as_me:9856: checking if the POSIX test-macros are already defined" >&5
9857 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9858 if test "${cf_cv_posix_visible+set}" = set; then
9859   echo $ECHO_N "(cached) $ECHO_C" >&6
9860 else
9861
9862 cat >"conftest.$ac_ext" <<_ACEOF
9863 #line 9863 "configure"
9864 #include "confdefs.h"
9865 #include <stdio.h>
9866 int
9867 main (void)
9868 {
9869
9870 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9871         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9872         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9873         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9874 #error conflicting symbols found
9875 #endif
9876
9877   ;
9878   return 0;
9879 }
9880 _ACEOF
9881 rm -f "conftest.$ac_objext"
9882 if { (eval echo "$as_me:9882: \"$ac_compile\"") >&5
9883   (eval $ac_compile) 2>&5
9884   ac_status=$?
9885   echo "$as_me:9885: \$? = $ac_status" >&5
9886   (exit "$ac_status"); } &&
9887          { ac_try='test -s "conftest.$ac_objext"'
9888   { (eval echo "$as_me:9888: \"$ac_try\"") >&5
9889   (eval $ac_try) 2>&5
9890   ac_status=$?
9891   echo "$as_me:9891: \$? = $ac_status" >&5
9892   (exit "$ac_status"); }; }; then
9893   cf_cv_posix_visible=no
9894 else
9895   echo "$as_me: failed program was:" >&5
9896 cat "conftest.$ac_ext" >&5
9897 cf_cv_posix_visible=yes
9898 fi
9899 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9900
9901 fi
9902 echo "$as_me:9902: result: $cf_cv_posix_visible" >&5
9903 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9904
9905 if test "$cf_cv_posix_visible" = no; then
9906
9907 cf_XOPEN_SOURCE=600
9908 cf_POSIX_C_SOURCE=199506L
9909 cf_xopen_source=
9910
9911 case "$host_os" in
9912 (aix[4-7]*)
9913         cf_xopen_source="-D_ALL_SOURCE"
9914         ;;
9915 (msys)
9916         cf_XOPEN_SOURCE=600
9917         ;;
9918 (darwin[0-8].*)
9919         cf_xopen_source="-D_APPLE_C_SOURCE"
9920         ;;
9921 (darwin*)
9922         cf_xopen_source="-D_DARWIN_C_SOURCE"
9923         cf_XOPEN_SOURCE=
9924         ;;
9925 (freebsd*|dragonfly*|midnightbsd*)
9926         # 5.x headers associate
9927         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9928         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9929         cf_POSIX_C_SOURCE=200112L
9930         cf_XOPEN_SOURCE=600
9931         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9932         ;;
9933 (hpux11*)
9934         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9935         ;;
9936 (hpux*)
9937         cf_xopen_source="-D_HPUX_SOURCE"
9938         ;;
9939 (irix[56].*)
9940         cf_xopen_source="-D_SGI_SOURCE"
9941         cf_XOPEN_SOURCE=
9942         ;;
9943 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9944
9945 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9946
9947 echo "$as_me:9947: checking if this is the GNU C library" >&5
9948 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9949 if test "${cf_cv_gnu_library+set}" = set; then
9950   echo $ECHO_N "(cached) $ECHO_C" >&6
9951 else
9952
9953 cat >"conftest.$ac_ext" <<_ACEOF
9954 #line 9954 "configure"
9955 #include "confdefs.h"
9956 #include <sys/types.h>
9957 int
9958 main (void)
9959 {
9960
9961         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9962                 return 0;
9963         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9964                 return 0;
9965         #else
9966         #       error not GNU C library
9967         #endif
9968   ;
9969   return 0;
9970 }
9971 _ACEOF
9972 rm -f "conftest.$ac_objext"
9973 if { (eval echo "$as_me:9973: \"$ac_compile\"") >&5
9974   (eval $ac_compile) 2>&5
9975   ac_status=$?
9976   echo "$as_me:9976: \$? = $ac_status" >&5
9977   (exit "$ac_status"); } &&
9978          { ac_try='test -s "conftest.$ac_objext"'
9979   { (eval echo "$as_me:9979: \"$ac_try\"") >&5
9980   (eval $ac_try) 2>&5
9981   ac_status=$?
9982   echo "$as_me:9982: \$? = $ac_status" >&5
9983   (exit "$ac_status"); }; }; then
9984   cf_cv_gnu_library=yes
9985 else
9986   echo "$as_me: failed program was:" >&5
9987 cat "conftest.$ac_ext" >&5
9988 cf_cv_gnu_library=no
9989 fi
9990 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9991
9992 fi
9993 echo "$as_me:9993: result: $cf_cv_gnu_library" >&5
9994 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9995
9996 if test x$cf_cv_gnu_library = xyes; then
9997
9998         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9999         # was changed to help a little.  newlib incorporated the change about 4
10000         # years later.
10001         echo "$as_me:10001: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10002 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10003 if test "${cf_cv_gnu_library_219+set}" = set; then
10004   echo $ECHO_N "(cached) $ECHO_C" >&6
10005 else
10006
10007                 cf_save="$CPPFLAGS"
10008
10009         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10010         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10011
10012                 cat >"conftest.$ac_ext" <<_ACEOF
10013 #line 10013 "configure"
10014 #include "confdefs.h"
10015 #include <sys/types.h>
10016 int
10017 main (void)
10018 {
10019
10020                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10021                                 return 0;
10022                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10023                                 return 0;
10024                         #else
10025                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10026                         #endif
10027   ;
10028   return 0;
10029 }
10030 _ACEOF
10031 rm -f "conftest.$ac_objext"
10032 if { (eval echo "$as_me:10032: \"$ac_compile\"") >&5
10033   (eval $ac_compile) 2>&5
10034   ac_status=$?
10035   echo "$as_me:10035: \$? = $ac_status" >&5
10036   (exit "$ac_status"); } &&
10037          { ac_try='test -s "conftest.$ac_objext"'
10038   { (eval echo "$as_me:10038: \"$ac_try\"") >&5
10039   (eval $ac_try) 2>&5
10040   ac_status=$?
10041   echo "$as_me:10041: \$? = $ac_status" >&5
10042   (exit "$ac_status"); }; }; then
10043   cf_cv_gnu_library_219=yes
10044 else
10045   echo "$as_me: failed program was:" >&5
10046 cat "conftest.$ac_ext" >&5
10047 cf_cv_gnu_library_219=no
10048 fi
10049 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10050                 CPPFLAGS="$cf_save"
10051
10052 fi
10053 echo "$as_me:10053: result: $cf_cv_gnu_library_219" >&5
10054 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10055
10056         if test "x$cf_cv_gnu_library_219" = xyes; then
10057                 cf_save="$CPPFLAGS"
10058                 echo "$as_me:10058: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10059 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10060 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10061   echo $ECHO_N "(cached) $ECHO_C" >&6
10062 else
10063
10064 cf_fix_cppflags=no
10065 cf_new_cflags=
10066 cf_new_cppflags=
10067 cf_new_extra_cppflags=
10068
10069 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10070 do
10071 case "$cf_fix_cppflags" in
10072 (no)
10073         case "$cf_add_cflags" in
10074         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10075                 case "$cf_add_cflags" in
10076                 (-D*)
10077                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10078
10079                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10080                                 && test -z "${cf_tst_cflags}" \
10081                                 && cf_fix_cppflags=yes
10082
10083                         if test "$cf_fix_cppflags" = yes ; then
10084
10085         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10086         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10087
10088                                 continue
10089                         elif test "${cf_tst_cflags}" = "\"'" ; then
10090
10091         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10092         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10093
10094                                 continue
10095                         fi
10096                         ;;
10097                 esac
10098                 case "$CPPFLAGS" in
10099                 (*$cf_add_cflags)
10100                         ;;
10101                 (*)
10102                         case "$cf_add_cflags" in
10103                         (-D*)
10104                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10105
10106 CPPFLAGS=`echo "$CPPFLAGS" | \
10107         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10108                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10109
10110                                 ;;
10111                         esac
10112
10113         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10114         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10115
10116                         ;;
10117                 esac
10118                 ;;
10119         (*)
10120
10121         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10122         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10123
10124                 ;;
10125         esac
10126         ;;
10127 (yes)
10128
10129         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10130         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10131
10132         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10133
10134         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10135                 && test -z "${cf_tst_cflags}" \
10136                 && cf_fix_cppflags=no
10137         ;;
10138 esac
10139 done
10140
10141 if test -n "$cf_new_cflags" ; then
10142
10143         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10144         CFLAGS="${CFLAGS}$cf_new_cflags"
10145
10146 fi
10147
10148 if test -n "$cf_new_cppflags" ; then
10149
10150         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10151         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10152
10153 fi
10154
10155 if test -n "$cf_new_extra_cppflags" ; then
10156
10157         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10158         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10159
10160 fi
10161
10162                         cat >"conftest.$ac_ext" <<_ACEOF
10163 #line 10163 "configure"
10164 #include "confdefs.h"
10165
10166                                 #include <limits.h>
10167                                 #include <sys/types.h>
10168
10169 int
10170 main (void)
10171 {
10172
10173                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10174                                         return 0;
10175                                 #else
10176                                 #       error GNU C library is too old
10177                                 #endif
10178   ;
10179   return 0;
10180 }
10181 _ACEOF
10182 rm -f "conftest.$ac_objext"
10183 if { (eval echo "$as_me:10183: \"$ac_compile\"") >&5
10184   (eval $ac_compile) 2>&5
10185   ac_status=$?
10186   echo "$as_me:10186: \$? = $ac_status" >&5
10187   (exit "$ac_status"); } &&
10188          { ac_try='test -s "conftest.$ac_objext"'
10189   { (eval echo "$as_me:10189: \"$ac_try\"") >&5
10190   (eval $ac_try) 2>&5
10191   ac_status=$?
10192   echo "$as_me:10192: \$? = $ac_status" >&5
10193   (exit "$ac_status"); }; }; then
10194   cf_cv_gnu_dftsrc_219=yes
10195 else
10196   echo "$as_me: failed program was:" >&5
10197 cat "conftest.$ac_ext" >&5
10198 cf_cv_gnu_dftsrc_219=no
10199 fi
10200 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10201
10202 fi
10203 echo "$as_me:10203: result: $cf_cv_gnu_dftsrc_219" >&5
10204 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10205                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10206         else
10207                 cf_cv_gnu_dftsrc_219=maybe
10208         fi
10209
10210         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10211
10212                 echo "$as_me:10212: checking if we must define _GNU_SOURCE" >&5
10213 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10214 if test "${cf_cv_gnu_source+set}" = set; then
10215   echo $ECHO_N "(cached) $ECHO_C" >&6
10216 else
10217
10218                 cat >"conftest.$ac_ext" <<_ACEOF
10219 #line 10219 "configure"
10220 #include "confdefs.h"
10221 #include <sys/types.h>
10222 int
10223 main (void)
10224 {
10225
10226                         #ifndef _XOPEN_SOURCE
10227                         #error  expected _XOPEN_SOURCE to be defined
10228                         #endif
10229   ;
10230   return 0;
10231 }
10232 _ACEOF
10233 rm -f "conftest.$ac_objext"
10234 if { (eval echo "$as_me:10234: \"$ac_compile\"") >&5
10235   (eval $ac_compile) 2>&5
10236   ac_status=$?
10237   echo "$as_me:10237: \$? = $ac_status" >&5
10238   (exit "$ac_status"); } &&
10239          { ac_try='test -s "conftest.$ac_objext"'
10240   { (eval echo "$as_me:10240: \"$ac_try\"") >&5
10241   (eval $ac_try) 2>&5
10242   ac_status=$?
10243   echo "$as_me:10243: \$? = $ac_status" >&5
10244   (exit "$ac_status"); }; }; then
10245   cf_cv_gnu_source=no
10246 else
10247   echo "$as_me: failed program was:" >&5
10248 cat "conftest.$ac_ext" >&5
10249 cf_save="$CPPFLAGS"
10250
10251 cf_fix_cppflags=no
10252 cf_new_cflags=
10253 cf_new_cppflags=
10254 cf_new_extra_cppflags=
10255
10256 for cf_add_cflags in -D_GNU_SOURCE
10257 do
10258 case "$cf_fix_cppflags" in
10259 (no)
10260         case "$cf_add_cflags" in
10261         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10262                 case "$cf_add_cflags" in
10263                 (-D*)
10264                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10265
10266                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10267                                 && test -z "${cf_tst_cflags}" \
10268                                 && cf_fix_cppflags=yes
10269
10270                         if test "$cf_fix_cppflags" = yes ; then
10271
10272         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10273         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10274
10275                                 continue
10276                         elif test "${cf_tst_cflags}" = "\"'" ; then
10277
10278         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10279         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10280
10281                                 continue
10282                         fi
10283                         ;;
10284                 esac
10285                 case "$CPPFLAGS" in
10286                 (*$cf_add_cflags)
10287                         ;;
10288                 (*)
10289                         case "$cf_add_cflags" in
10290                         (-D*)
10291                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10292
10293 CPPFLAGS=`echo "$CPPFLAGS" | \
10294         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10295                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10296
10297                                 ;;
10298                         esac
10299
10300         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10301         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10302
10303                         ;;
10304                 esac
10305                 ;;
10306         (*)
10307
10308         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10309         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10310
10311                 ;;
10312         esac
10313         ;;
10314 (yes)
10315
10316         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10317         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10318
10319         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10320
10321         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10322                 && test -z "${cf_tst_cflags}" \
10323                 && cf_fix_cppflags=no
10324         ;;
10325 esac
10326 done
10327
10328 if test -n "$cf_new_cflags" ; then
10329
10330         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10331         CFLAGS="${CFLAGS}$cf_new_cflags"
10332
10333 fi
10334
10335 if test -n "$cf_new_cppflags" ; then
10336
10337         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10338         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10339
10340 fi
10341
10342 if test -n "$cf_new_extra_cppflags" ; then
10343
10344         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10345         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10346
10347 fi
10348
10349                          cat >"conftest.$ac_ext" <<_ACEOF
10350 #line 10350 "configure"
10351 #include "confdefs.h"
10352 #include <sys/types.h>
10353 int
10354 main (void)
10355 {
10356
10357                                 #ifdef _XOPEN_SOURCE
10358                                 #error  expected _XOPEN_SOURCE to be undefined
10359                                 #endif
10360   ;
10361   return 0;
10362 }
10363 _ACEOF
10364 rm -f "conftest.$ac_objext"
10365 if { (eval echo "$as_me:10365: \"$ac_compile\"") >&5
10366   (eval $ac_compile) 2>&5
10367   ac_status=$?
10368   echo "$as_me:10368: \$? = $ac_status" >&5
10369   (exit "$ac_status"); } &&
10370          { ac_try='test -s "conftest.$ac_objext"'
10371   { (eval echo "$as_me:10371: \"$ac_try\"") >&5
10372   (eval $ac_try) 2>&5
10373   ac_status=$?
10374   echo "$as_me:10374: \$? = $ac_status" >&5
10375   (exit "$ac_status"); }; }; then
10376   cf_cv_gnu_source=no
10377 else
10378   echo "$as_me: failed program was:" >&5
10379 cat "conftest.$ac_ext" >&5
10380 cf_cv_gnu_source=yes
10381 fi
10382 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10383                         CPPFLAGS="$cf_save"
10384
10385 fi
10386 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10387
10388 fi
10389 echo "$as_me:10389: result: $cf_cv_gnu_source" >&5
10390 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10391
10392                 if test "$cf_cv_gnu_source" = yes
10393                 then
10394                 echo "$as_me:10394: checking if we should also define _DEFAULT_SOURCE" >&5
10395 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10396 if test "${cf_cv_default_source+set}" = set; then
10397   echo $ECHO_N "(cached) $ECHO_C" >&6
10398 else
10399
10400         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10401         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10402
10403                         cat >"conftest.$ac_ext" <<_ACEOF
10404 #line 10404 "configure"
10405 #include "confdefs.h"
10406 #include <sys/types.h>
10407 int
10408 main (void)
10409 {
10410
10411                                 #ifdef _DEFAULT_SOURCE
10412                                 #error  expected _DEFAULT_SOURCE to be undefined
10413                                 #endif
10414   ;
10415   return 0;
10416 }
10417 _ACEOF
10418 rm -f "conftest.$ac_objext"
10419 if { (eval echo "$as_me:10419: \"$ac_compile\"") >&5
10420   (eval $ac_compile) 2>&5
10421   ac_status=$?
10422   echo "$as_me:10422: \$? = $ac_status" >&5
10423   (exit "$ac_status"); } &&
10424          { ac_try='test -s "conftest.$ac_objext"'
10425   { (eval echo "$as_me:10425: \"$ac_try\"") >&5
10426   (eval $ac_try) 2>&5
10427   ac_status=$?
10428   echo "$as_me:10428: \$? = $ac_status" >&5
10429   (exit "$ac_status"); }; }; then
10430   cf_cv_default_source=no
10431 else
10432   echo "$as_me: failed program was:" >&5
10433 cat "conftest.$ac_ext" >&5
10434 cf_cv_default_source=yes
10435 fi
10436 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10437
10438 fi
10439 echo "$as_me:10439: result: $cf_cv_default_source" >&5
10440 echo "${ECHO_T}$cf_cv_default_source" >&6
10441                         if test "$cf_cv_default_source" = yes
10442                         then
10443
10444         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10445         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10446
10447                         fi
10448                 fi
10449         fi
10450
10451 fi
10452
10453         ;;
10454 (minix*)
10455         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10456         ;;
10457 (mirbsd*)
10458         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10459         cf_XOPEN_SOURCE=
10460
10461 if test "$cf_cv_posix_visible" = no; then
10462
10463 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10464
10465 cf_save_CFLAGS="$CFLAGS"
10466 cf_save_CPPFLAGS="$CPPFLAGS"
10467
10468 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10469         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10470                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10471
10472 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10473         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10474                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10475
10476 echo "$as_me:10476: checking if we should define _POSIX_C_SOURCE" >&5
10477 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10478 if test "${cf_cv_posix_c_source+set}" = set; then
10479   echo $ECHO_N "(cached) $ECHO_C" >&6
10480 else
10481
10482 echo "${as_me:-configure}:10482: testing if the symbol is already defined go no further ..." 1>&5
10483
10484         cat >"conftest.$ac_ext" <<_ACEOF
10485 #line 10485 "configure"
10486 #include "confdefs.h"
10487 #include <sys/types.h>
10488 int
10489 main (void)
10490 {
10491
10492 #ifndef _POSIX_C_SOURCE
10493 make an error
10494 #endif
10495   ;
10496   return 0;
10497 }
10498 _ACEOF
10499 rm -f "conftest.$ac_objext"
10500 if { (eval echo "$as_me:10500: \"$ac_compile\"") >&5
10501   (eval $ac_compile) 2>&5
10502   ac_status=$?
10503   echo "$as_me:10503: \$? = $ac_status" >&5
10504   (exit "$ac_status"); } &&
10505          { ac_try='test -s "conftest.$ac_objext"'
10506   { (eval echo "$as_me:10506: \"$ac_try\"") >&5
10507   (eval $ac_try) 2>&5
10508   ac_status=$?
10509   echo "$as_me:10509: \$? = $ac_status" >&5
10510   (exit "$ac_status"); }; }; then
10511   cf_cv_posix_c_source=no
10512 else
10513   echo "$as_me: failed program was:" >&5
10514 cat "conftest.$ac_ext" >&5
10515 cf_want_posix_source=no
10516          case .$cf_POSIX_C_SOURCE in
10517          (.[12]??*)
10518                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10519                 ;;
10520          (.2)
10521                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10522                 cf_want_posix_source=yes
10523                 ;;
10524          (.*)
10525                 cf_want_posix_source=yes
10526                 ;;
10527          esac
10528          if test "$cf_want_posix_source" = yes ; then
10529                 cat >"conftest.$ac_ext" <<_ACEOF
10530 #line 10530 "configure"
10531 #include "confdefs.h"
10532 #include <sys/types.h>
10533 int
10534 main (void)
10535 {
10536
10537 #ifdef _POSIX_SOURCE
10538 make an error
10539 #endif
10540   ;
10541   return 0;
10542 }
10543 _ACEOF
10544 rm -f "conftest.$ac_objext"
10545 if { (eval echo "$as_me:10545: \"$ac_compile\"") >&5
10546   (eval $ac_compile) 2>&5
10547   ac_status=$?
10548   echo "$as_me:10548: \$? = $ac_status" >&5
10549   (exit "$ac_status"); } &&
10550          { ac_try='test -s "conftest.$ac_objext"'
10551   { (eval echo "$as_me:10551: \"$ac_try\"") >&5
10552   (eval $ac_try) 2>&5
10553   ac_status=$?
10554   echo "$as_me:10554: \$? = $ac_status" >&5
10555   (exit "$ac_status"); }; }; then
10556   :
10557 else
10558   echo "$as_me: failed program was:" >&5
10559 cat "conftest.$ac_ext" >&5
10560 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10561 fi
10562 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10563          fi
10564
10565 echo "${as_me:-configure}:10565: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10566
10567          CFLAGS="$cf_trim_CFLAGS"
10568          CPPFLAGS="$cf_trim_CPPFLAGS"
10569
10570         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10571         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10572
10573 echo "${as_me:-configure}:10573: testing if the second compile does not leave our definition intact error ..." 1>&5
10574
10575          cat >"conftest.$ac_ext" <<_ACEOF
10576 #line 10576 "configure"
10577 #include "confdefs.h"
10578 #include <sys/types.h>
10579 int
10580 main (void)
10581 {
10582
10583 #ifndef _POSIX_C_SOURCE
10584 make an error
10585 #endif
10586   ;
10587   return 0;
10588 }
10589 _ACEOF
10590 rm -f "conftest.$ac_objext"
10591 if { (eval echo "$as_me:10591: \"$ac_compile\"") >&5
10592   (eval $ac_compile) 2>&5
10593   ac_status=$?
10594   echo "$as_me:10594: \$? = $ac_status" >&5
10595   (exit "$ac_status"); } &&
10596          { ac_try='test -s "conftest.$ac_objext"'
10597   { (eval echo "$as_me:10597: \"$ac_try\"") >&5
10598   (eval $ac_try) 2>&5
10599   ac_status=$?
10600   echo "$as_me:10600: \$? = $ac_status" >&5
10601   (exit "$ac_status"); }; }; then
10602   :
10603 else
10604   echo "$as_me: failed program was:" >&5
10605 cat "conftest.$ac_ext" >&5
10606 cf_cv_posix_c_source=no
10607 fi
10608 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10609          CFLAGS="$cf_save_CFLAGS"
10610          CPPFLAGS="$cf_save_CPPFLAGS"
10611
10612 fi
10613 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10614
10615 fi
10616 echo "$as_me:10616: result: $cf_cv_posix_c_source" >&5
10617 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10618
10619 if test "$cf_cv_posix_c_source" != no ; then
10620         CFLAGS="$cf_trim_CFLAGS"
10621         CPPFLAGS="$cf_trim_CPPFLAGS"
10622
10623 cf_fix_cppflags=no
10624 cf_new_cflags=
10625 cf_new_cppflags=
10626 cf_new_extra_cppflags=
10627
10628 for cf_add_cflags in $cf_cv_posix_c_source
10629 do
10630 case "$cf_fix_cppflags" in
10631 (no)
10632         case "$cf_add_cflags" in
10633         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10634                 case "$cf_add_cflags" in
10635                 (-D*)
10636                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10637
10638                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10639                                 && test -z "${cf_tst_cflags}" \
10640                                 && cf_fix_cppflags=yes
10641
10642                         if test "$cf_fix_cppflags" = yes ; then
10643
10644         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10645         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10646
10647                                 continue
10648                         elif test "${cf_tst_cflags}" = "\"'" ; then
10649
10650         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10651         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10652
10653                                 continue
10654                         fi
10655                         ;;
10656                 esac
10657                 case "$CPPFLAGS" in
10658                 (*$cf_add_cflags)
10659                         ;;
10660                 (*)
10661                         case "$cf_add_cflags" in
10662                         (-D*)
10663                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10664
10665 CPPFLAGS=`echo "$CPPFLAGS" | \
10666         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10667                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10668
10669                                 ;;
10670                         esac
10671
10672         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10673         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10674
10675                         ;;
10676                 esac
10677                 ;;
10678         (*)
10679
10680         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10681         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10682
10683                 ;;
10684         esac
10685         ;;
10686 (yes)
10687
10688         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10689         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10690
10691         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10692
10693         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10694                 && test -z "${cf_tst_cflags}" \
10695                 && cf_fix_cppflags=no
10696         ;;
10697 esac
10698 done
10699
10700 if test -n "$cf_new_cflags" ; then
10701
10702         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10703         CFLAGS="${CFLAGS}$cf_new_cflags"
10704
10705 fi
10706
10707 if test -n "$cf_new_cppflags" ; then
10708
10709         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10710         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10711
10712 fi
10713
10714 if test -n "$cf_new_extra_cppflags" ; then
10715
10716         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10717         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10718
10719 fi
10720
10721 fi
10722
10723 fi # cf_cv_posix_visible
10724
10725         ;;
10726 (netbsd*)
10727         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10728         ;;
10729 (openbsd[6-9]*)
10730         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10731         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10732         # Abusing the conformance level is a workaround.
10733         { echo "$as_me:10733: WARNING: this system does not provide usable locale support" >&5
10734 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10735         cf_xopen_source="-D_BSD_SOURCE"
10736         cf_XOPEN_SOURCE=700
10737         ;;
10738 (openbsd[4-5]*)
10739         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10740         cf_xopen_source="-D_BSD_SOURCE"
10741         cf_XOPEN_SOURCE=600
10742         ;;
10743 (openbsd*)
10744         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10745         ;;
10746 (osf[45]*)
10747         cf_xopen_source="-D_OSF_SOURCE"
10748         ;;
10749 (nto-qnx*)
10750         cf_xopen_source="-D_QNX_SOURCE"
10751         ;;
10752 (sco*)
10753         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10754         ;;
10755 (solaris2.*)
10756         cf_xopen_source="-D__EXTENSIONS__"
10757         cf_cv_xopen_source=broken
10758         ;;
10759 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10760         cf_XOPEN_SOURCE=
10761         cf_POSIX_C_SOURCE=
10762         ;;
10763 (*)
10764
10765 echo "$as_me:10765: checking if we should define _XOPEN_SOURCE" >&5
10766 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10767 if test "${cf_cv_xopen_source+set}" = set; then
10768   echo $ECHO_N "(cached) $ECHO_C" >&6
10769 else
10770
10771         cat >"conftest.$ac_ext" <<_ACEOF
10772 #line 10772 "configure"
10773 #include "confdefs.h"
10774
10775 #include <stdlib.h>
10776 #include <string.h>
10777 #include <sys/types.h>
10778
10779 int
10780 main (void)
10781 {
10782
10783 #ifndef _XOPEN_SOURCE
10784 make an error
10785 #endif
10786   ;
10787   return 0;
10788 }
10789 _ACEOF
10790 rm -f "conftest.$ac_objext"
10791 if { (eval echo "$as_me:10791: \"$ac_compile\"") >&5
10792   (eval $ac_compile) 2>&5
10793   ac_status=$?
10794   echo "$as_me:10794: \$? = $ac_status" >&5
10795   (exit "$ac_status"); } &&
10796          { ac_try='test -s "conftest.$ac_objext"'
10797   { (eval echo "$as_me:10797: \"$ac_try\"") >&5
10798   (eval $ac_try) 2>&5
10799   ac_status=$?
10800   echo "$as_me:10800: \$? = $ac_status" >&5
10801   (exit "$ac_status"); }; }; then
10802   cf_cv_xopen_source=no
10803 else
10804   echo "$as_me: failed program was:" >&5
10805 cat "conftest.$ac_ext" >&5
10806 cf_save="$CPPFLAGS"
10807
10808         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10809         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10810
10811          cat >"conftest.$ac_ext" <<_ACEOF
10812 #line 10812 "configure"
10813 #include "confdefs.h"
10814
10815 #include <stdlib.h>
10816 #include <string.h>
10817 #include <sys/types.h>
10818
10819 int
10820 main (void)
10821 {
10822
10823 #ifdef _XOPEN_SOURCE
10824 make an error
10825 #endif
10826   ;
10827   return 0;
10828 }
10829 _ACEOF
10830 rm -f "conftest.$ac_objext"
10831 if { (eval echo "$as_me:10831: \"$ac_compile\"") >&5
10832   (eval $ac_compile) 2>&5
10833   ac_status=$?
10834   echo "$as_me:10834: \$? = $ac_status" >&5
10835   (exit "$ac_status"); } &&
10836          { ac_try='test -s "conftest.$ac_objext"'
10837   { (eval echo "$as_me:10837: \"$ac_try\"") >&5
10838   (eval $ac_try) 2>&5
10839   ac_status=$?
10840   echo "$as_me:10840: \$? = $ac_status" >&5
10841   (exit "$ac_status"); }; }; then
10842   cf_cv_xopen_source=no
10843 else
10844   echo "$as_me: failed program was:" >&5
10845 cat "conftest.$ac_ext" >&5
10846 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10847 fi
10848 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10849         CPPFLAGS="$cf_save"
10850
10851 fi
10852 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10853
10854 fi
10855 echo "$as_me:10855: result: $cf_cv_xopen_source" >&5
10856 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10857
10858 if test "$cf_cv_xopen_source" != no ; then
10859
10860 CFLAGS=`echo "$CFLAGS" | \
10861         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10862                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10863
10864 CPPFLAGS=`echo "$CPPFLAGS" | \
10865         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10866                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10867
10868         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10869
10870 for cf_add_cflags in $cf_temp_xopen_source
10871 do
10872         case "x$cf_add_cflags" in
10873         (x-[DU]*)
10874
10875 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10876 while true
10877 do
10878         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'`
10879         test "$CFLAGS" != "$cf_old_cflag" || break
10880
10881         CFLAGS="$cf_old_cflag"
10882 done
10883
10884 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10885 while true
10886 do
10887         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'`
10888         test "$CPPFLAGS" != "$cf_old_cflag" || break
10889
10890         CPPFLAGS="$cf_old_cflag"
10891 done
10892
10893                 ;;
10894         esac
10895
10896 cf_fix_cppflags=no
10897 cf_new_cflags=
10898 cf_new_cppflags=
10899 cf_new_extra_cppflags=
10900
10901 for cf_add_cflags in $cf_add_cflags
10902 do
10903 case "$cf_fix_cppflags" in
10904 (no)
10905         case "$cf_add_cflags" in
10906         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10907                 case "$cf_add_cflags" in
10908                 (-D*)
10909                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10910
10911                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10912                                 && test -z "${cf_tst_cflags}" \
10913                                 && cf_fix_cppflags=yes
10914
10915                         if test "$cf_fix_cppflags" = yes ; then
10916
10917         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10918         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10919
10920                                 continue
10921                         elif test "${cf_tst_cflags}" = "\"'" ; then
10922
10923         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10924         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10925
10926                                 continue
10927                         fi
10928                         ;;
10929                 esac
10930                 case "$CPPFLAGS" in
10931                 (*$cf_add_cflags)
10932                         ;;
10933                 (*)
10934                         case "$cf_add_cflags" in
10935                         (-D*)
10936                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10937
10938 CPPFLAGS=`echo "$CPPFLAGS" | \
10939         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10940                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10941
10942                                 ;;
10943                         esac
10944
10945         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10946         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10947
10948                         ;;
10949                 esac
10950                 ;;
10951         (*)
10952
10953         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10954         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10955
10956                 ;;
10957         esac
10958         ;;
10959 (yes)
10960
10961         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10962         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10963
10964         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10965
10966         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10967                 && test -z "${cf_tst_cflags}" \
10968                 && cf_fix_cppflags=no
10969         ;;
10970 esac
10971 done
10972
10973 if test -n "$cf_new_cflags" ; then
10974
10975         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10976         CFLAGS="${CFLAGS}$cf_new_cflags"
10977
10978 fi
10979
10980 if test -n "$cf_new_cppflags" ; then
10981
10982         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10983         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10984
10985 fi
10986
10987 if test -n "$cf_new_extra_cppflags" ; then
10988
10989         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10990         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10991
10992 fi
10993
10994 done
10995
10996 fi
10997
10998 if test "$cf_cv_posix_visible" = no; then
10999
11000 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11001
11002 cf_save_CFLAGS="$CFLAGS"
11003 cf_save_CPPFLAGS="$CPPFLAGS"
11004
11005 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11006         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11007                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11008
11009 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11010         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11011                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11012
11013 echo "$as_me:11013: checking if we should define _POSIX_C_SOURCE" >&5
11014 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11015 if test "${cf_cv_posix_c_source+set}" = set; then
11016   echo $ECHO_N "(cached) $ECHO_C" >&6
11017 else
11018
11019 echo "${as_me:-configure}:11019: testing if the symbol is already defined go no further ..." 1>&5
11020
11021         cat >"conftest.$ac_ext" <<_ACEOF
11022 #line 11022 "configure"
11023 #include "confdefs.h"
11024 #include <sys/types.h>
11025 int
11026 main (void)
11027 {
11028
11029 #ifndef _POSIX_C_SOURCE
11030 make an error
11031 #endif
11032   ;
11033   return 0;
11034 }
11035 _ACEOF
11036 rm -f "conftest.$ac_objext"
11037 if { (eval echo "$as_me:11037: \"$ac_compile\"") >&5
11038   (eval $ac_compile) 2>&5
11039   ac_status=$?
11040   echo "$as_me:11040: \$? = $ac_status" >&5
11041   (exit "$ac_status"); } &&
11042          { ac_try='test -s "conftest.$ac_objext"'
11043   { (eval echo "$as_me:11043: \"$ac_try\"") >&5
11044   (eval $ac_try) 2>&5
11045   ac_status=$?
11046   echo "$as_me:11046: \$? = $ac_status" >&5
11047   (exit "$ac_status"); }; }; then
11048   cf_cv_posix_c_source=no
11049 else
11050   echo "$as_me: failed program was:" >&5
11051 cat "conftest.$ac_ext" >&5
11052 cf_want_posix_source=no
11053          case .$cf_POSIX_C_SOURCE in
11054          (.[12]??*)
11055                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11056                 ;;
11057          (.2)
11058                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11059                 cf_want_posix_source=yes
11060                 ;;
11061          (.*)
11062                 cf_want_posix_source=yes
11063                 ;;
11064          esac
11065          if test "$cf_want_posix_source" = yes ; then
11066                 cat >"conftest.$ac_ext" <<_ACEOF
11067 #line 11067 "configure"
11068 #include "confdefs.h"
11069 #include <sys/types.h>
11070 int
11071 main (void)
11072 {
11073
11074 #ifdef _POSIX_SOURCE
11075 make an error
11076 #endif
11077   ;
11078   return 0;
11079 }
11080 _ACEOF
11081 rm -f "conftest.$ac_objext"
11082 if { (eval echo "$as_me:11082: \"$ac_compile\"") >&5
11083   (eval $ac_compile) 2>&5
11084   ac_status=$?
11085   echo "$as_me:11085: \$? = $ac_status" >&5
11086   (exit "$ac_status"); } &&
11087          { ac_try='test -s "conftest.$ac_objext"'
11088   { (eval echo "$as_me:11088: \"$ac_try\"") >&5
11089   (eval $ac_try) 2>&5
11090   ac_status=$?
11091   echo "$as_me:11091: \$? = $ac_status" >&5
11092   (exit "$ac_status"); }; }; then
11093   :
11094 else
11095   echo "$as_me: failed program was:" >&5
11096 cat "conftest.$ac_ext" >&5
11097 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11098 fi
11099 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11100          fi
11101
11102 echo "${as_me:-configure}:11102: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11103
11104          CFLAGS="$cf_trim_CFLAGS"
11105          CPPFLAGS="$cf_trim_CPPFLAGS"
11106
11107         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11108         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11109
11110 echo "${as_me:-configure}:11110: testing if the second compile does not leave our definition intact error ..." 1>&5
11111
11112          cat >"conftest.$ac_ext" <<_ACEOF
11113 #line 11113 "configure"
11114 #include "confdefs.h"
11115 #include <sys/types.h>
11116 int
11117 main (void)
11118 {
11119
11120 #ifndef _POSIX_C_SOURCE
11121 make an error
11122 #endif
11123   ;
11124   return 0;
11125 }
11126 _ACEOF
11127 rm -f "conftest.$ac_objext"
11128 if { (eval echo "$as_me:11128: \"$ac_compile\"") >&5
11129   (eval $ac_compile) 2>&5
11130   ac_status=$?
11131   echo "$as_me:11131: \$? = $ac_status" >&5
11132   (exit "$ac_status"); } &&
11133          { ac_try='test -s "conftest.$ac_objext"'
11134   { (eval echo "$as_me:11134: \"$ac_try\"") >&5
11135   (eval $ac_try) 2>&5
11136   ac_status=$?
11137   echo "$as_me:11137: \$? = $ac_status" >&5
11138   (exit "$ac_status"); }; }; then
11139   :
11140 else
11141   echo "$as_me: failed program was:" >&5
11142 cat "conftest.$ac_ext" >&5
11143 cf_cv_posix_c_source=no
11144 fi
11145 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11146          CFLAGS="$cf_save_CFLAGS"
11147          CPPFLAGS="$cf_save_CPPFLAGS"
11148
11149 fi
11150 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11151
11152 fi
11153 echo "$as_me:11153: result: $cf_cv_posix_c_source" >&5
11154 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11155
11156 if test "$cf_cv_posix_c_source" != no ; then
11157         CFLAGS="$cf_trim_CFLAGS"
11158         CPPFLAGS="$cf_trim_CPPFLAGS"
11159
11160 cf_fix_cppflags=no
11161 cf_new_cflags=
11162 cf_new_cppflags=
11163 cf_new_extra_cppflags=
11164
11165 for cf_add_cflags in $cf_cv_posix_c_source
11166 do
11167 case "$cf_fix_cppflags" in
11168 (no)
11169         case "$cf_add_cflags" in
11170         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11171                 case "$cf_add_cflags" in
11172                 (-D*)
11173                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11174
11175                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11176                                 && test -z "${cf_tst_cflags}" \
11177                                 && cf_fix_cppflags=yes
11178
11179                         if test "$cf_fix_cppflags" = yes ; then
11180
11181         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11182         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11183
11184                                 continue
11185                         elif test "${cf_tst_cflags}" = "\"'" ; then
11186
11187         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11188         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11189
11190                                 continue
11191                         fi
11192                         ;;
11193                 esac
11194                 case "$CPPFLAGS" in
11195                 (*$cf_add_cflags)
11196                         ;;
11197                 (*)
11198                         case "$cf_add_cflags" in
11199                         (-D*)
11200                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11201
11202 CPPFLAGS=`echo "$CPPFLAGS" | \
11203         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11204                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11205
11206                                 ;;
11207                         esac
11208
11209         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11210         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11211
11212                         ;;
11213                 esac
11214                 ;;
11215         (*)
11216
11217         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11218         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11219
11220                 ;;
11221         esac
11222         ;;
11223 (yes)
11224
11225         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11226         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11227
11228         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11229
11230         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11231                 && test -z "${cf_tst_cflags}" \
11232                 && cf_fix_cppflags=no
11233         ;;
11234 esac
11235 done
11236
11237 if test -n "$cf_new_cflags" ; then
11238
11239         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11240         CFLAGS="${CFLAGS}$cf_new_cflags"
11241
11242 fi
11243
11244 if test -n "$cf_new_cppflags" ; then
11245
11246         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11247         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11248
11249 fi
11250
11251 if test -n "$cf_new_extra_cppflags" ; then
11252
11253         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11254         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11255
11256 fi
11257
11258 fi
11259
11260 fi # cf_cv_posix_visible
11261
11262         ;;
11263 esac
11264
11265 if test -n "$cf_xopen_source" ; then
11266
11267 for cf_add_cflags in $cf_xopen_source
11268 do
11269         case "x$cf_add_cflags" in
11270         (x-[DU]*)
11271
11272 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11273 while true
11274 do
11275         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'`
11276         test "$CFLAGS" != "$cf_old_cflag" || break
11277         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11278
11279 echo "${as_me:-configure}:11279: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11280
11281         CFLAGS="$cf_old_cflag"
11282 done
11283
11284 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11285 while true
11286 do
11287         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'`
11288         test "$CPPFLAGS" != "$cf_old_cflag" || break
11289         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11290
11291 echo "${as_me:-configure}:11291: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11292
11293         CPPFLAGS="$cf_old_cflag"
11294 done
11295
11296                 ;;
11297         esac
11298
11299 cf_fix_cppflags=no
11300 cf_new_cflags=
11301 cf_new_cppflags=
11302 cf_new_extra_cppflags=
11303
11304 for cf_add_cflags in $cf_add_cflags
11305 do
11306 case "$cf_fix_cppflags" in
11307 (no)
11308         case "$cf_add_cflags" in
11309         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11310                 case "$cf_add_cflags" in
11311                 (-D*)
11312                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11313
11314                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11315                                 && test -z "${cf_tst_cflags}" \
11316                                 && cf_fix_cppflags=yes
11317
11318                         if test "$cf_fix_cppflags" = yes ; then
11319
11320         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11321         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11322
11323                                 continue
11324                         elif test "${cf_tst_cflags}" = "\"'" ; then
11325
11326         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11327         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11328
11329                                 continue
11330                         fi
11331                         ;;
11332                 esac
11333                 case "$CPPFLAGS" in
11334                 (*$cf_add_cflags)
11335                         ;;
11336                 (*)
11337                         case "$cf_add_cflags" in
11338                         (-D*)
11339                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11340
11341 CPPFLAGS=`echo "$CPPFLAGS" | \
11342         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11343                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11344
11345                                 ;;
11346                         esac
11347
11348         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11349         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11350
11351                         ;;
11352                 esac
11353                 ;;
11354         (*)
11355
11356         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11357         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11358
11359                 ;;
11360         esac
11361         ;;
11362 (yes)
11363
11364         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11365         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11366
11367         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11368
11369         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11370                 && test -z "${cf_tst_cflags}" \
11371                 && cf_fix_cppflags=no
11372         ;;
11373 esac
11374 done
11375
11376 if test -n "$cf_new_cflags" ; then
11377         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11378
11379 echo "${as_me:-configure}:11379: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11380
11381         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11382         CFLAGS="${CFLAGS}$cf_new_cflags"
11383
11384 fi
11385
11386 if test -n "$cf_new_cppflags" ; then
11387         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11388
11389 echo "${as_me:-configure}:11389: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11390
11391         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11392         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11393
11394 fi
11395
11396 if test -n "$cf_new_extra_cppflags" ; then
11397         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11398
11399 echo "${as_me:-configure}:11399: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11400
11401         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11402         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11403
11404 fi
11405
11406 done
11407
11408 fi
11409
11410 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11411         echo "$as_me:11411: checking if _XOPEN_SOURCE really is set" >&5
11412 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11413         cat >"conftest.$ac_ext" <<_ACEOF
11414 #line 11414 "configure"
11415 #include "confdefs.h"
11416 #include <stdlib.h>
11417 int
11418 main (void)
11419 {
11420
11421 #ifndef _XOPEN_SOURCE
11422 make an error
11423 #endif
11424   ;
11425   return 0;
11426 }
11427 _ACEOF
11428 rm -f "conftest.$ac_objext"
11429 if { (eval echo "$as_me:11429: \"$ac_compile\"") >&5
11430   (eval $ac_compile) 2>&5
11431   ac_status=$?
11432   echo "$as_me:11432: \$? = $ac_status" >&5
11433   (exit "$ac_status"); } &&
11434          { ac_try='test -s "conftest.$ac_objext"'
11435   { (eval echo "$as_me:11435: \"$ac_try\"") >&5
11436   (eval $ac_try) 2>&5
11437   ac_status=$?
11438   echo "$as_me:11438: \$? = $ac_status" >&5
11439   (exit "$ac_status"); }; }; then
11440   cf_XOPEN_SOURCE_set=yes
11441 else
11442   echo "$as_me: failed program was:" >&5
11443 cat "conftest.$ac_ext" >&5
11444 cf_XOPEN_SOURCE_set=no
11445 fi
11446 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11447         echo "$as_me:11447: result: $cf_XOPEN_SOURCE_set" >&5
11448 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11449         if test "$cf_XOPEN_SOURCE_set" = yes
11450         then
11451                 cat >"conftest.$ac_ext" <<_ACEOF
11452 #line 11452 "configure"
11453 #include "confdefs.h"
11454 #include <stdlib.h>
11455 int
11456 main (void)
11457 {
11458
11459 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11460 make an error
11461 #endif
11462   ;
11463   return 0;
11464 }
11465 _ACEOF
11466 rm -f "conftest.$ac_objext"
11467 if { (eval echo "$as_me:11467: \"$ac_compile\"") >&5
11468   (eval $ac_compile) 2>&5
11469   ac_status=$?
11470   echo "$as_me:11470: \$? = $ac_status" >&5
11471   (exit "$ac_status"); } &&
11472          { ac_try='test -s "conftest.$ac_objext"'
11473   { (eval echo "$as_me:11473: \"$ac_try\"") >&5
11474   (eval $ac_try) 2>&5
11475   ac_status=$?
11476   echo "$as_me:11476: \$? = $ac_status" >&5
11477   (exit "$ac_status"); }; }; then
11478   cf_XOPEN_SOURCE_set_ok=yes
11479 else
11480   echo "$as_me: failed program was:" >&5
11481 cat "conftest.$ac_ext" >&5
11482 cf_XOPEN_SOURCE_set_ok=no
11483 fi
11484 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11485                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11486                 then
11487                         { echo "$as_me:11487: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11488 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11489                 fi
11490         else
11491
11492 echo "$as_me:11492: checking if we should define _XOPEN_SOURCE" >&5
11493 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11494 if test "${cf_cv_xopen_source+set}" = set; then
11495   echo $ECHO_N "(cached) $ECHO_C" >&6
11496 else
11497
11498         cat >"conftest.$ac_ext" <<_ACEOF
11499 #line 11499 "configure"
11500 #include "confdefs.h"
11501
11502 #include <stdlib.h>
11503 #include <string.h>
11504 #include <sys/types.h>
11505
11506 int
11507 main (void)
11508 {
11509
11510 #ifndef _XOPEN_SOURCE
11511 make an error
11512 #endif
11513   ;
11514   return 0;
11515 }
11516 _ACEOF
11517 rm -f "conftest.$ac_objext"
11518 if { (eval echo "$as_me:11518: \"$ac_compile\"") >&5
11519   (eval $ac_compile) 2>&5
11520   ac_status=$?
11521   echo "$as_me:11521: \$? = $ac_status" >&5
11522   (exit "$ac_status"); } &&
11523          { ac_try='test -s "conftest.$ac_objext"'
11524   { (eval echo "$as_me:11524: \"$ac_try\"") >&5
11525   (eval $ac_try) 2>&5
11526   ac_status=$?
11527   echo "$as_me:11527: \$? = $ac_status" >&5
11528   (exit "$ac_status"); }; }; then
11529   cf_cv_xopen_source=no
11530 else
11531   echo "$as_me: failed program was:" >&5
11532 cat "conftest.$ac_ext" >&5
11533 cf_save="$CPPFLAGS"
11534
11535         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11536         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11537
11538          cat >"conftest.$ac_ext" <<_ACEOF
11539 #line 11539 "configure"
11540 #include "confdefs.h"
11541
11542 #include <stdlib.h>
11543 #include <string.h>
11544 #include <sys/types.h>
11545
11546 int
11547 main (void)
11548 {
11549
11550 #ifdef _XOPEN_SOURCE
11551 make an error
11552 #endif
11553   ;
11554   return 0;
11555 }
11556 _ACEOF
11557 rm -f "conftest.$ac_objext"
11558 if { (eval echo "$as_me:11558: \"$ac_compile\"") >&5
11559   (eval $ac_compile) 2>&5
11560   ac_status=$?
11561   echo "$as_me:11561: \$? = $ac_status" >&5
11562   (exit "$ac_status"); } &&
11563          { ac_try='test -s "conftest.$ac_objext"'
11564   { (eval echo "$as_me:11564: \"$ac_try\"") >&5
11565   (eval $ac_try) 2>&5
11566   ac_status=$?
11567   echo "$as_me:11567: \$? = $ac_status" >&5
11568   (exit "$ac_status"); }; }; then
11569   cf_cv_xopen_source=no
11570 else
11571   echo "$as_me: failed program was:" >&5
11572 cat "conftest.$ac_ext" >&5
11573 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11574 fi
11575 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11576         CPPFLAGS="$cf_save"
11577
11578 fi
11579 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11580
11581 fi
11582 echo "$as_me:11582: result: $cf_cv_xopen_source" >&5
11583 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11584
11585 if test "$cf_cv_xopen_source" != no ; then
11586
11587 CFLAGS=`echo "$CFLAGS" | \
11588         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11589                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11590
11591 CPPFLAGS=`echo "$CPPFLAGS" | \
11592         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11593                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11594
11595         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11596
11597 for cf_add_cflags in $cf_temp_xopen_source
11598 do
11599         case "x$cf_add_cflags" in
11600         (x-[DU]*)
11601
11602 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11603 while true
11604 do
11605         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'`
11606         test "$CFLAGS" != "$cf_old_cflag" || break
11607
11608         CFLAGS="$cf_old_cflag"
11609 done
11610
11611 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11612 while true
11613 do
11614         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'`
11615         test "$CPPFLAGS" != "$cf_old_cflag" || break
11616
11617         CPPFLAGS="$cf_old_cflag"
11618 done
11619
11620                 ;;
11621         esac
11622
11623 cf_fix_cppflags=no
11624 cf_new_cflags=
11625 cf_new_cppflags=
11626 cf_new_extra_cppflags=
11627
11628 for cf_add_cflags in $cf_add_cflags
11629 do
11630 case "$cf_fix_cppflags" in
11631 (no)
11632         case "$cf_add_cflags" in
11633         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11634                 case "$cf_add_cflags" in
11635                 (-D*)
11636                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11637
11638                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11639                                 && test -z "${cf_tst_cflags}" \
11640                                 && cf_fix_cppflags=yes
11641
11642                         if test "$cf_fix_cppflags" = yes ; then
11643
11644         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11645         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11646
11647                                 continue
11648                         elif test "${cf_tst_cflags}" = "\"'" ; then
11649
11650         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11651         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11652
11653                                 continue
11654                         fi
11655                         ;;
11656                 esac
11657                 case "$CPPFLAGS" in
11658                 (*$cf_add_cflags)
11659                         ;;
11660                 (*)
11661                         case "$cf_add_cflags" in
11662                         (-D*)
11663                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11664
11665 CPPFLAGS=`echo "$CPPFLAGS" | \
11666         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11667                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11668
11669                                 ;;
11670                         esac
11671
11672         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11673         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11674
11675                         ;;
11676                 esac
11677                 ;;
11678         (*)
11679
11680         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11681         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11682
11683                 ;;
11684         esac
11685         ;;
11686 (yes)
11687
11688         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11689         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11690
11691         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11692
11693         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11694                 && test -z "${cf_tst_cflags}" \
11695                 && cf_fix_cppflags=no
11696         ;;
11697 esac
11698 done
11699
11700 if test -n "$cf_new_cflags" ; then
11701
11702         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11703         CFLAGS="${CFLAGS}$cf_new_cflags"
11704
11705 fi
11706
11707 if test -n "$cf_new_cppflags" ; then
11708
11709         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11710         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11711
11712 fi
11713
11714 if test -n "$cf_new_extra_cppflags" ; then
11715
11716         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11717         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11718
11719 fi
11720
11721 done
11722
11723 fi
11724
11725         fi
11726 fi
11727 fi # cf_cv_posix_visible
11728
11729 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11730
11731 # Work around breakage on OS X
11732
11733 echo "$as_me:11733: checking if SIGWINCH is defined" >&5
11734 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11735 if test "${cf_cv_define_sigwinch+set}" = set; then
11736   echo $ECHO_N "(cached) $ECHO_C" >&6
11737 else
11738
11739         cat >"conftest.$ac_ext" <<_ACEOF
11740 #line 11740 "configure"
11741 #include "confdefs.h"
11742
11743 #include <sys/types.h>
11744 #include <sys/signal.h>
11745
11746 int
11747 main (void)
11748 {
11749 int x = SIGWINCH; (void)x
11750   ;
11751   return 0;
11752 }
11753 _ACEOF
11754 rm -f "conftest.$ac_objext"
11755 if { (eval echo "$as_me:11755: \"$ac_compile\"") >&5
11756   (eval $ac_compile) 2>&5
11757   ac_status=$?
11758   echo "$as_me:11758: \$? = $ac_status" >&5
11759   (exit "$ac_status"); } &&
11760          { ac_try='test -s "conftest.$ac_objext"'
11761   { (eval echo "$as_me:11761: \"$ac_try\"") >&5
11762   (eval $ac_try) 2>&5
11763   ac_status=$?
11764   echo "$as_me:11764: \$? = $ac_status" >&5
11765   (exit "$ac_status"); }; }; then
11766   cf_cv_define_sigwinch=yes
11767 else
11768   echo "$as_me: failed program was:" >&5
11769 cat "conftest.$ac_ext" >&5
11770 cat >"conftest.$ac_ext" <<_ACEOF
11771 #line 11771 "configure"
11772 #include "confdefs.h"
11773
11774 #undef _XOPEN_SOURCE
11775 #undef _POSIX_SOURCE
11776 #undef _POSIX_C_SOURCE
11777 #include <sys/types.h>
11778 #include <sys/signal.h>
11779
11780 int
11781 main (void)
11782 {
11783 int x = SIGWINCH; (void)x
11784   ;
11785   return 0;
11786 }
11787 _ACEOF
11788 rm -f "conftest.$ac_objext"
11789 if { (eval echo "$as_me:11789: \"$ac_compile\"") >&5
11790   (eval $ac_compile) 2>&5
11791   ac_status=$?
11792   echo "$as_me:11792: \$? = $ac_status" >&5
11793   (exit "$ac_status"); } &&
11794          { ac_try='test -s "conftest.$ac_objext"'
11795   { (eval echo "$as_me:11795: \"$ac_try\"") >&5
11796   (eval $ac_try) 2>&5
11797   ac_status=$?
11798   echo "$as_me:11798: \$? = $ac_status" >&5
11799   (exit "$ac_status"); }; }; then
11800   cf_cv_define_sigwinch=maybe
11801 else
11802   echo "$as_me: failed program was:" >&5
11803 cat "conftest.$ac_ext" >&5
11804 cf_cv_define_sigwinch=no
11805 fi
11806 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11807
11808 fi
11809 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11810
11811 fi
11812 echo "$as_me:11812: result: $cf_cv_define_sigwinch" >&5
11813 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11814
11815 if test "$cf_cv_define_sigwinch" = maybe ; then
11816 echo "$as_me:11816: checking for actual SIGWINCH definition" >&5
11817 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11818 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11819   echo $ECHO_N "(cached) $ECHO_C" >&6
11820 else
11821
11822 cf_cv_fixup_sigwinch=unknown
11823 cf_sigwinch=32
11824 while test "$cf_sigwinch" != 1
11825 do
11826         cat >"conftest.$ac_ext" <<_ACEOF
11827 #line 11827 "configure"
11828 #include "confdefs.h"
11829
11830 #undef _XOPEN_SOURCE
11831 #undef _POSIX_SOURCE
11832 #undef _POSIX_C_SOURCE
11833 #include <sys/types.h>
11834 #include <sys/signal.h>
11835
11836 int
11837 main (void)
11838 {
11839
11840 #if SIGWINCH != $cf_sigwinch
11841 make an error
11842 #endif
11843 int x = SIGWINCH; (void)x
11844   ;
11845   return 0;
11846 }
11847 _ACEOF
11848 rm -f "conftest.$ac_objext"
11849 if { (eval echo "$as_me:11849: \"$ac_compile\"") >&5
11850   (eval $ac_compile) 2>&5
11851   ac_status=$?
11852   echo "$as_me:11852: \$? = $ac_status" >&5
11853   (exit "$ac_status"); } &&
11854          { ac_try='test -s "conftest.$ac_objext"'
11855   { (eval echo "$as_me:11855: \"$ac_try\"") >&5
11856   (eval $ac_try) 2>&5
11857   ac_status=$?
11858   echo "$as_me:11858: \$? = $ac_status" >&5
11859   (exit "$ac_status"); }; }; then
11860   cf_cv_fixup_sigwinch=$cf_sigwinch
11861          break
11862 else
11863   echo "$as_me: failed program was:" >&5
11864 cat "conftest.$ac_ext" >&5
11865 fi
11866 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11867
11868 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11869 done
11870
11871 fi
11872 echo "$as_me:11872: result: $cf_cv_fixup_sigwinch" >&5
11873 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11874
11875         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11876                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11877         fi
11878 fi
11879
11880 # Checks for CODESET support.
11881
11882 echo "$as_me:11882: checking for nl_langinfo and CODESET" >&5
11883 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11884 if test "${am_cv_langinfo_codeset+set}" = set; then
11885   echo $ECHO_N "(cached) $ECHO_C" >&6
11886 else
11887   cat >"conftest.$ac_ext" <<_ACEOF
11888 #line 11888 "configure"
11889 #include "confdefs.h"
11890 #include <langinfo.h>
11891 int
11892 main (void)
11893 {
11894 char* cs = nl_langinfo(CODESET); (void)cs
11895   ;
11896   return 0;
11897 }
11898 _ACEOF
11899 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11900 if { (eval echo "$as_me:11900: \"$ac_link\"") >&5
11901   (eval $ac_link) 2>&5
11902   ac_status=$?
11903   echo "$as_me:11903: \$? = $ac_status" >&5
11904   (exit "$ac_status"); } &&
11905          { ac_try='test -s "conftest$ac_exeext"'
11906   { (eval echo "$as_me:11906: \"$ac_try\"") >&5
11907   (eval $ac_try) 2>&5
11908   ac_status=$?
11909   echo "$as_me:11909: \$? = $ac_status" >&5
11910   (exit "$ac_status"); }; }; then
11911   am_cv_langinfo_codeset=yes
11912 else
11913   echo "$as_me: failed program was:" >&5
11914 cat "conftest.$ac_ext" >&5
11915 am_cv_langinfo_codeset=no
11916 fi
11917 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11918
11919 fi
11920 echo "$as_me:11920: result: $am_cv_langinfo_codeset" >&5
11921 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11922         if test "$am_cv_langinfo_codeset" = yes; then
11923
11924 cat >>confdefs.h <<\EOF
11925 #define HAVE_LANGINFO_CODESET 1
11926 EOF
11927
11928         fi
11929
11930 # use these variables to work around a defect in gcc's fixincludes.
11931 NCURSES_OK_WCHAR_T=
11932 NCURSES_OK_WINT_T=
11933
11934 echo "$as_me:11934: checking if you want wide-character code" >&5
11935 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11936
11937 # Check whether --enable-widec or --disable-widec was given.
11938 if test "${enable_widec+set}" = set; then
11939   enableval="$enable_widec"
11940   with_widec=$enableval
11941 else
11942   with_widec=no
11943 fi;
11944 echo "$as_me:11944: result: $with_widec" >&5
11945 echo "${ECHO_T}$with_widec" >&6
11946
11947 NCURSES_WCWIDTH_GRAPHICS=1
11948
11949 if test "x$with_widec" = xyes ; then
11950         if test "x$disable_lib_suffixes" = xno ; then
11951                 LIB_SUFFIX="w${LIB_SUFFIX}"
11952         fi
11953
11954 cat >>confdefs.h <<\EOF
11955 #define USE_WIDEC_SUPPORT 1
11956 EOF
11957
11958 cat >>confdefs.h <<\EOF
11959 #define NCURSES_WIDECHAR 1
11960 EOF
11961
11962 for ac_header in \
11963 wchar.h \
11964 wctype.h \
11965
11966 do
11967 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11968 echo "$as_me:11968: checking for $ac_header" >&5
11969 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11970 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11971   echo $ECHO_N "(cached) $ECHO_C" >&6
11972 else
11973   cat >"conftest.$ac_ext" <<_ACEOF
11974 #line 11974 "configure"
11975 #include "confdefs.h"
11976 #include <$ac_header>
11977 _ACEOF
11978 if { (eval echo "$as_me:11978: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11979   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11980   ac_status=$?
11981   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11982   rm -f conftest.er1
11983   cat conftest.err >&5
11984   echo "$as_me:11984: \$? = $ac_status" >&5
11985   (exit "$ac_status"); } >/dev/null; then
11986   if test -s conftest.err; then
11987     ac_cpp_err=$ac_c_preproc_warn_flag
11988   else
11989     ac_cpp_err=
11990   fi
11991 else
11992   ac_cpp_err=yes
11993 fi
11994 if test -z "$ac_cpp_err"; then
11995   eval "$as_ac_Header=yes"
11996 else
11997   echo "$as_me: failed program was:" >&5
11998   cat "conftest.$ac_ext" >&5
11999   eval "$as_ac_Header=no"
12000 fi
12001 rm -f conftest.err "conftest.$ac_ext"
12002 fi
12003 echo "$as_me:12003: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12004 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12005 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12006   cat >>confdefs.h <<EOF
12007 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12008 EOF
12009
12010 fi
12011 done
12012
12013 echo "$as_me:12013: checking if wchar.h can be used as is" >&5
12014 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12015 if test "${cf_cv_wchar_h_okay+set}" = set; then
12016   echo $ECHO_N "(cached) $ECHO_C" >&6
12017 else
12018
12019 cat >"conftest.$ac_ext" <<_ACEOF
12020 #line 12020 "configure"
12021 #include "confdefs.h"
12022
12023 #include <stdlib.h>
12024 #ifdef HAVE_WCHAR_H
12025 #include <wchar.h>
12026 #endif
12027 #ifdef HAVE_WCTYPE_H
12028 #include <wctype.h>
12029 #endif
12030
12031 int
12032 main (void)
12033 {
12034
12035         wint_t foo = 0;
12036         int bar = iswpunct(foo)
12037   ;
12038   return 0;
12039 }
12040 _ACEOF
12041 rm -f "conftest.$ac_objext"
12042 if { (eval echo "$as_me:12042: \"$ac_compile\"") >&5
12043   (eval $ac_compile) 2>&5
12044   ac_status=$?
12045   echo "$as_me:12045: \$? = $ac_status" >&5
12046   (exit "$ac_status"); } &&
12047          { ac_try='test -s "conftest.$ac_objext"'
12048   { (eval echo "$as_me:12048: \"$ac_try\"") >&5
12049   (eval $ac_try) 2>&5
12050   ac_status=$?
12051   echo "$as_me:12051: \$? = $ac_status" >&5
12052   (exit "$ac_status"); }; }; then
12053   cf_cv_wchar_h_okay=yes
12054 else
12055   echo "$as_me: failed program was:" >&5
12056 cat "conftest.$ac_ext" >&5
12057 cf_cv_wchar_h_okay=no
12058 fi
12059 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12060 fi
12061 echo "$as_me:12061: result: $cf_cv_wchar_h_okay" >&5
12062 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12063
12064 if test "$cf_cv_wchar_h_okay" = no
12065 then
12066
12067 echo "$as_me:12067: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12068 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12069 cat >"conftest.$ac_ext" <<_ACEOF
12070 #line 12070 "configure"
12071 #include "confdefs.h"
12072 #include <sys/types.h>
12073
12074 int
12075 main (void)
12076 {
12077
12078 #ifndef _XOPEN_SOURCE_EXTENDED
12079 make an error
12080 #endif
12081   ;
12082   return 0;
12083 }
12084 _ACEOF
12085 rm -f "conftest.$ac_objext"
12086 if { (eval echo "$as_me:12086: \"$ac_compile\"") >&5
12087   (eval $ac_compile) 2>&5
12088   ac_status=$?
12089   echo "$as_me:12089: \$? = $ac_status" >&5
12090   (exit "$ac_status"); } &&
12091          { ac_try='test -s "conftest.$ac_objext"'
12092   { (eval echo "$as_me:12092: \"$ac_try\"") >&5
12093   (eval $ac_try) 2>&5
12094   ac_status=$?
12095   echo "$as_me:12095: \$? = $ac_status" >&5
12096   (exit "$ac_status"); }; }; then
12097   cf_result=no
12098 else
12099   echo "$as_me: failed program was:" >&5
12100 cat "conftest.$ac_ext" >&5
12101 cf_result=yes
12102 fi
12103 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12104 echo "$as_me:12104: result: $cf_result" >&5
12105 echo "${ECHO_T}$cf_result" >&6
12106
12107 if test "$cf_result" = yes ; then
12108         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12109 elif test "x" != "x" ; then
12110         echo "$as_me:12110: checking checking for compatible value versus " >&5
12111 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12112         cat >"conftest.$ac_ext" <<_ACEOF
12113 #line 12113 "configure"
12114 #include "confdefs.h"
12115 #include <sys/types.h>
12116
12117 int
12118 main (void)
12119 {
12120
12121 #if _XOPEN_SOURCE_EXTENDED- < 0
12122 make an error
12123 #endif
12124   ;
12125   return 0;
12126 }
12127 _ACEOF
12128 rm -f "conftest.$ac_objext"
12129 if { (eval echo "$as_me:12129: \"$ac_compile\"") >&5
12130   (eval $ac_compile) 2>&5
12131   ac_status=$?
12132   echo "$as_me:12132: \$? = $ac_status" >&5
12133   (exit "$ac_status"); } &&
12134          { ac_try='test -s "conftest.$ac_objext"'
12135   { (eval echo "$as_me:12135: \"$ac_try\"") >&5
12136   (eval $ac_try) 2>&5
12137   ac_status=$?
12138   echo "$as_me:12138: \$? = $ac_status" >&5
12139   (exit "$ac_status"); }; }; then
12140   cf_result=yes
12141 else
12142   echo "$as_me: failed program was:" >&5
12143 cat "conftest.$ac_ext" >&5
12144 cf_result=no
12145 fi
12146 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12147         echo "$as_me:12147: result: $cf_result" >&5
12148 echo "${ECHO_T}$cf_result" >&6
12149         if test "$cf_result" = no ; then
12150                 # perhaps we can override it - try...
12151                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12152         fi
12153 fi
12154
12155 fi
12156
12157 echo "$as_me:12157: checking if wcwidth agrees graphics are single-width" >&5
12158 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12159 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12160   echo $ECHO_N "(cached) $ECHO_C" >&6
12161 else
12162
12163 cat >conftest.in <<CF_EOF
12164 -       VT100 symbols
12165 0x250c  upper left corner
12166 0x2514  lower left corner
12167 0x2510  upper right corner
12168 0x2518  lower right corner
12169 0x251c  tee pointing left
12170 0x2524  tee pointing right
12171 0x2534  tee pointing up
12172 0x252c  tee pointing down
12173 0x2500  horizontal line
12174 0x2502  vertical line
12175 0x253c  large plus or crossover
12176 0x23ba  scan line 1
12177 0x23bd  scan line 9
12178 0x25c6  diamond
12179 0x2592  checker board (stipple)
12180 0x00b0  degree symbol
12181 0x00b1  plus/minus
12182 0x00b7  bullet
12183 -       Teletype 5410v1 symbols
12184 0x2190  arrow pointing left
12185 0x2192  arrow pointing right
12186 0x2193  arrow pointing down
12187 0x2191  arrow pointing up
12188 0x2592  board of squares
12189 0x2603  lantern symbol
12190 0x25ae  solid square block
12191 -       these defaults were invented for ncurses
12192 0x23bb  scan line 3
12193 0x23bc  scan line 7
12194 0x2264  less-than-or-equal-to
12195 0x2265  greater-than-or-equal-to
12196 0x03c0  greek pi
12197 0x2260  not-equal
12198 0x00a3  pound-sterling symbol
12199 -       thick-line-drawing
12200 0x250f  upper left corner
12201 0x2517  lower left corner
12202 0x2513  upper right corner
12203 0x251b  lower right corner
12204 0x2523  tee pointing left
12205 0x252b  tee pointing right
12206 0x253b  tee pointing up
12207 0x2533  tee pointing down
12208 0x2501  horizontal line
12209 0x2503  vertical line
12210 0x254b  large plus or crossover
12211 -       double-line-drawing
12212 0x2554  upper left corner
12213 0x255a  lower left corner
12214 0x2557  upper right corner
12215 0x255d  lower right corner
12216 0x2563  tee pointing left
12217 0x2560  tee pointing right
12218 0x2569  tee pointing up
12219 0x2566  tee pointing down
12220 0x2550  horizontal line
12221 0x2551  vertical line
12222 0x256c  large plus or crossover
12223 CF_EOF
12224 if test "$cross_compiling" = yes; then
12225   cf_cv_wcwidth_graphics=unknown
12226 else
12227   cat >"conftest.$ac_ext" <<_ACEOF
12228 #line 12228 "configure"
12229 #include "confdefs.h"
12230
12231 #include <locale.h>
12232 #include <stdio.h>
12233 #include <wchar.h>
12234
12235 #define MY_LEN 80
12236
12237 int
12238 main(void)
12239 {
12240         FILE *fp;
12241         int value;
12242         char buffer[MY_LEN + 1];
12243         char notes[MY_LEN + 1];
12244         int totals = 0;
12245         int passed = 0;
12246
12247         if (setlocale(LC_ALL, "en_US.UTF8") ||
12248                 setlocale(LC_ALL, "en_US.UTF-8") ||
12249                 setlocale(LC_ALL, "en_US.utf8") ||
12250                 setlocale(LC_ALL, "en_US.utf-8")) {
12251                 if ((fp = fopen("conftest.in", "r")) != 0) {
12252                         while (fgets(buffer, MY_LEN, fp) != 0) {
12253                                 if (*buffer == '-') {
12254                                         fprintf(stderr, "\\t%s", buffer);
12255                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12256                                         ++totals;
12257                                         if (wcwidth(value) == 1)
12258                                                 ++passed;
12259                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12260                                 } else {
12261                                         fprintf(stderr, "?\\t%s", buffer);
12262                                 }
12263                         }
12264                 }
12265         }
12266         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12267         return (totals == passed) ? 0 : 1;
12268 }
12269
12270 _ACEOF
12271 rm -f "conftest$ac_exeext"
12272 if { (eval echo "$as_me:12272: \"$ac_link\"") >&5
12273   (eval $ac_link) 2>&5
12274   ac_status=$?
12275   echo "$as_me:12275: \$? = $ac_status" >&5
12276   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12277   { (eval echo "$as_me:12277: \"$ac_try\"") >&5
12278   (eval $ac_try) 2>&5
12279   ac_status=$?
12280   echo "$as_me:12280: \$? = $ac_status" >&5
12281   (exit "$ac_status"); }; }; then
12282   cf_cv_wcwidth_graphics=yes
12283 else
12284   echo "$as_me: program exited with status $ac_status" >&5
12285 echo "$as_me: failed program was:" >&5
12286 cat "conftest.$ac_ext" >&5
12287 cf_cv_wcwidth_graphics=no
12288 fi
12289 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12290 fi
12291
12292 fi
12293 echo "$as_me:12293: result: $cf_cv_wcwidth_graphics" >&5
12294 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12295
12296         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12297
12298         # with_overwrite=no
12299         NCURSES_CH_T=cchar_t
12300
12301 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12302 do
12303 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12304 echo "$as_me:12304: checking for $ac_func" >&5
12305 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12306 if eval "test \"\${$as_ac_var+set}\" = set"; then
12307   echo $ECHO_N "(cached) $ECHO_C" >&6
12308 else
12309   cat >"conftest.$ac_ext" <<_ACEOF
12310 #line 12310 "configure"
12311 #include "confdefs.h"
12312 #define $ac_func autoconf_temporary
12313 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12314 #undef $ac_func
12315
12316 #ifdef __cplusplus
12317 extern "C"
12318 #endif
12319
12320 /* We use char because int might match the return type of a gcc2
12321    builtin and then its argument prototype would still apply.  */
12322 char $ac_func (void);
12323
12324 int
12325 main (void)
12326 {
12327
12328 /* The GNU C library defines stubs for functions which it implements
12329     to always fail with ENOSYS.  Some functions are actually named
12330     something starting with __ and the normal name is an alias.  */
12331 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12332 #error found stub for $ac_func
12333 #endif
12334
12335         return $ac_func ();
12336   ;
12337   return 0;
12338 }
12339 _ACEOF
12340 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12341 if { (eval echo "$as_me:12341: \"$ac_link\"") >&5
12342   (eval $ac_link) 2>&5
12343   ac_status=$?
12344   echo "$as_me:12344: \$? = $ac_status" >&5
12345   (exit "$ac_status"); } &&
12346          { ac_try='test -s "conftest$ac_exeext"'
12347   { (eval echo "$as_me:12347: \"$ac_try\"") >&5
12348   (eval $ac_try) 2>&5
12349   ac_status=$?
12350   echo "$as_me:12350: \$? = $ac_status" >&5
12351   (exit "$ac_status"); }; }; then
12352   eval "$as_ac_var=yes"
12353 else
12354   echo "$as_me: failed program was:" >&5
12355 cat "conftest.$ac_ext" >&5
12356 eval "$as_ac_var=no"
12357 fi
12358 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12359 fi
12360 echo "$as_me:12360: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12361 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12362 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12363   cat >>confdefs.h <<EOF
12364 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12365 EOF
12366
12367 fi
12368 done
12369
12370         if test "x$ac_cv_func_putwc" != xyes ; then
12371
12372 for ac_header in wchar.h
12373 do
12374 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12375 echo "$as_me:12375: checking for $ac_header" >&5
12376 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12377 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12378   echo $ECHO_N "(cached) $ECHO_C" >&6
12379 else
12380   cat >"conftest.$ac_ext" <<_ACEOF
12381 #line 12381 "configure"
12382 #include "confdefs.h"
12383 #include <$ac_header>
12384 _ACEOF
12385 if { (eval echo "$as_me:12385: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12386   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12387   ac_status=$?
12388   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12389   rm -f conftest.er1
12390   cat conftest.err >&5
12391   echo "$as_me:12391: \$? = $ac_status" >&5
12392   (exit "$ac_status"); } >/dev/null; then
12393   if test -s conftest.err; then
12394     ac_cpp_err=$ac_c_preproc_warn_flag
12395   else
12396     ac_cpp_err=
12397   fi
12398 else
12399   ac_cpp_err=yes
12400 fi
12401 if test -z "$ac_cpp_err"; then
12402   eval "$as_ac_Header=yes"
12403 else
12404   echo "$as_me: failed program was:" >&5
12405   cat "conftest.$ac_ext" >&5
12406   eval "$as_ac_Header=no"
12407 fi
12408 rm -f conftest.err "conftest.$ac_ext"
12409 fi
12410 echo "$as_me:12410: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12411 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12412 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12413   cat >>confdefs.h <<EOF
12414 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12415 EOF
12416
12417 fi
12418 done
12419
12420 echo "$as_me:12420: checking for multibyte character support" >&5
12421 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12422 if test "${cf_cv_utf8_lib+set}" = set; then
12423   echo $ECHO_N "(cached) $ECHO_C" >&6
12424 else
12425
12426         cf_save_LIBS="$LIBS"
12427         cat >"conftest.$ac_ext" <<_ACEOF
12428 #line 12428 "configure"
12429 #include "confdefs.h"
12430
12431 #include <stdlib.h>
12432 #include <stdio.h>
12433 #ifdef HAVE_WCHAR_H
12434 #include <wchar.h>
12435 #endif
12436
12437 int
12438 main (void)
12439 {
12440 putwc(0,0);
12441   ;
12442   return 0;
12443 }
12444 _ACEOF
12445 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12446 if { (eval echo "$as_me:12446: \"$ac_link\"") >&5
12447   (eval $ac_link) 2>&5
12448   ac_status=$?
12449   echo "$as_me:12449: \$? = $ac_status" >&5
12450   (exit "$ac_status"); } &&
12451          { ac_try='test -s "conftest$ac_exeext"'
12452   { (eval echo "$as_me:12452: \"$ac_try\"") >&5
12453   (eval $ac_try) 2>&5
12454   ac_status=$?
12455   echo "$as_me:12455: \$? = $ac_status" >&5
12456   (exit "$ac_status"); }; }; then
12457   cf_cv_utf8_lib=yes
12458 else
12459   echo "$as_me: failed program was:" >&5
12460 cat "conftest.$ac_ext" >&5
12461
12462 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12463 # will be set on completion of the AC_TRY_LINK below.
12464 cf_cv_header_path_utf8=
12465 cf_cv_library_path_utf8=
12466
12467 echo "${as_me:-configure}:12467: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12468
12469 cf_save_LIBS="$LIBS"
12470
12471 cat >"conftest.$ac_ext" <<_ACEOF
12472 #line 12472 "configure"
12473 #include "confdefs.h"
12474
12475 #include <libutf8.h>
12476 int
12477 main (void)
12478 {
12479 putwc(0,0);
12480   ;
12481   return 0;
12482 }
12483 _ACEOF
12484 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12485 if { (eval echo "$as_me:12485: \"$ac_link\"") >&5
12486   (eval $ac_link) 2>&5
12487   ac_status=$?
12488   echo "$as_me:12488: \$? = $ac_status" >&5
12489   (exit "$ac_status"); } &&
12490          { ac_try='test -s "conftest$ac_exeext"'
12491   { (eval echo "$as_me:12491: \"$ac_try\"") >&5
12492   (eval $ac_try) 2>&5
12493   ac_status=$?
12494   echo "$as_me:12494: \$? = $ac_status" >&5
12495   (exit "$ac_status"); }; }; then
12496
12497         cf_cv_find_linkage_utf8=yes
12498         cf_cv_header_path_utf8=/usr/include
12499         cf_cv_library_path_utf8=/usr/lib
12500
12501 else
12502   echo "$as_me: failed program was:" >&5
12503 cat "conftest.$ac_ext" >&5
12504
12505 LIBS="-lutf8  $cf_save_LIBS"
12506
12507 cat >"conftest.$ac_ext" <<_ACEOF
12508 #line 12508 "configure"
12509 #include "confdefs.h"
12510
12511 #include <libutf8.h>
12512 int
12513 main (void)
12514 {
12515 putwc(0,0);
12516   ;
12517   return 0;
12518 }
12519 _ACEOF
12520 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12521 if { (eval echo "$as_me:12521: \"$ac_link\"") >&5
12522   (eval $ac_link) 2>&5
12523   ac_status=$?
12524   echo "$as_me:12524: \$? = $ac_status" >&5
12525   (exit "$ac_status"); } &&
12526          { ac_try='test -s "conftest$ac_exeext"'
12527   { (eval echo "$as_me:12527: \"$ac_try\"") >&5
12528   (eval $ac_try) 2>&5
12529   ac_status=$?
12530   echo "$as_me:12530: \$? = $ac_status" >&5
12531   (exit "$ac_status"); }; }; then
12532
12533         cf_cv_find_linkage_utf8=yes
12534         cf_cv_header_path_utf8=/usr/include
12535         cf_cv_library_path_utf8=/usr/lib
12536         cf_cv_library_file_utf8="-lutf8"
12537
12538 else
12539   echo "$as_me: failed program was:" >&5
12540 cat "conftest.$ac_ext" >&5
12541
12542         cf_cv_find_linkage_utf8=no
12543         LIBS="$cf_save_LIBS"
12544
12545         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12546
12547 echo "${as_me:-configure}:12547: testing find linkage for utf8 library ..." 1>&5
12548
12549 echo "${as_me:-configure}:12549: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12550
12551         cf_save_CPPFLAGS="$CPPFLAGS"
12552         cf_test_CPPFLAGS="$CPPFLAGS"
12553
12554 cf_search=
12555
12556 # collect the current set of include-directories from compiler flags
12557 cf_header_path_list=""
12558 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12559         for cf_header_path in $CPPFLAGS $CFLAGS
12560         do
12561                 case "$cf_header_path" in
12562                 (-I*)
12563                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12564
12565 test "x$cf_header_path" != "xNONE" && \
12566 test -d "$cf_header_path" && \
12567  {
12568         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12569         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12570         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12571         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12572         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12573         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12574 }
12575
12576                         cf_header_path_list="$cf_header_path_list $cf_search"
12577                         ;;
12578                 esac
12579         done
12580 fi
12581
12582 # add the variations for the package we are looking for
12583
12584 cf_search=
12585
12586 test "x$prefix" != "xNONE" && \
12587 test -d "$prefix" && \
12588  {
12589         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12590         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12591         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12592         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12593         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12594         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12595 }
12596
12597 for cf_subdir_prefix in \
12598         /usr \
12599         /usr/local \
12600         /usr/pkg \
12601         /opt \
12602         /opt/local \
12603         $HOME
12604 do
12605
12606 test "x$cf_subdir_prefix" != "x$prefix" && \
12607 test -d "$cf_subdir_prefix" && \
12608 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12609         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12610         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12611         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12612         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12613         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12614         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12615 }
12616
12617 done
12618
12619 test "$includedir" != NONE && \
12620 test "$includedir" != "/usr/include" && \
12621 test -d "$includedir" && {
12622         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12623         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12624 }
12625
12626 test "$oldincludedir" != NONE && \
12627 test "$oldincludedir" != "/usr/include" && \
12628 test -d "$oldincludedir" && {
12629         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12630         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12631 }
12632
12633 cf_search="$cf_search $cf_header_path_list"
12634
12635         for cf_cv_header_path_utf8 in $cf_search
12636         do
12637                 if test -d "$cf_cv_header_path_utf8" ; then
12638                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12639
12640 echo "${as_me:-configure}:12640: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12641
12642                         CPPFLAGS="$cf_save_CPPFLAGS"
12643
12644         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12645         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12646
12647                         cat >"conftest.$ac_ext" <<_ACEOF
12648 #line 12648 "configure"
12649 #include "confdefs.h"
12650
12651 #include <libutf8.h>
12652 int
12653 main (void)
12654 {
12655 putwc(0,0);
12656   ;
12657   return 0;
12658 }
12659 _ACEOF
12660 rm -f "conftest.$ac_objext"
12661 if { (eval echo "$as_me:12661: \"$ac_compile\"") >&5
12662   (eval $ac_compile) 2>&5
12663   ac_status=$?
12664   echo "$as_me:12664: \$? = $ac_status" >&5
12665   (exit "$ac_status"); } &&
12666          { ac_try='test -s "conftest.$ac_objext"'
12667   { (eval echo "$as_me:12667: \"$ac_try\"") >&5
12668   (eval $ac_try) 2>&5
12669   ac_status=$?
12670   echo "$as_me:12670: \$? = $ac_status" >&5
12671   (exit "$ac_status"); }; }; then
12672
12673                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12674
12675 echo "${as_me:-configure}:12675: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12676
12677                                 cf_cv_find_linkage_utf8=maybe
12678                                 cf_test_CPPFLAGS="$CPPFLAGS"
12679                                 break
12680 else
12681   echo "$as_me: failed program was:" >&5
12682 cat "conftest.$ac_ext" >&5
12683
12684                                 CPPFLAGS="$cf_save_CPPFLAGS"
12685
12686 fi
12687 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12688                 fi
12689         done
12690
12691         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12692
12693 echo "${as_me:-configure}:12693: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12694
12695                 cf_save_LIBS="$LIBS"
12696                 cf_save_LDFLAGS="$LDFLAGS"
12697
12698                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12699
12700 cf_search=
12701 cf_library_path_list=""
12702 if test -n "${LDFLAGS}${LIBS}" ; then
12703         for cf_library_path in $LDFLAGS $LIBS
12704         do
12705                 case "$cf_library_path" in
12706                 (-L*)
12707                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12708
12709 test "x$cf_library_path" != "xNONE" && \
12710 test -d "$cf_library_path" && \
12711  {
12712         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12713         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12714         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12715         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12716         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12717         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12718 }
12719
12720                         cf_library_path_list="$cf_library_path_list $cf_search"
12721                         ;;
12722                 esac
12723         done
12724 fi
12725
12726 cf_search=
12727
12728 test "x$prefix" != "xNONE" && \
12729 test -d "$prefix" && \
12730  {
12731         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12732         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12733         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12734         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12735         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12736         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12737 }
12738
12739 for cf_subdir_prefix in \
12740         /usr \
12741         /usr/local \
12742         /usr/pkg \
12743         /opt \
12744         /opt/local \
12745         $HOME
12746 do
12747
12748 test "x$cf_subdir_prefix" != "x$prefix" && \
12749 test -d "$cf_subdir_prefix" && \
12750 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12751         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12752         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12753         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12754         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12755         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12756         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12757 }
12758
12759 done
12760
12761 cf_search="$cf_library_path_list $cf_search"
12762
12763                         for cf_cv_library_path_utf8 in $cf_search
12764                         do
12765                                 if test -d "$cf_cv_library_path_utf8" ; then
12766                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12767
12768 echo "${as_me:-configure}:12768: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12769
12770                                         CPPFLAGS="$cf_test_CPPFLAGS"
12771                                         LIBS="-lutf8  $cf_save_LIBS"
12772                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12773                                         cat >"conftest.$ac_ext" <<_ACEOF
12774 #line 12774 "configure"
12775 #include "confdefs.h"
12776
12777 #include <libutf8.h>
12778 int
12779 main (void)
12780 {
12781 putwc(0,0);
12782   ;
12783   return 0;
12784 }
12785 _ACEOF
12786 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12787 if { (eval echo "$as_me:12787: \"$ac_link\"") >&5
12788   (eval $ac_link) 2>&5
12789   ac_status=$?
12790   echo "$as_me:12790: \$? = $ac_status" >&5
12791   (exit "$ac_status"); } &&
12792          { ac_try='test -s "conftest$ac_exeext"'
12793   { (eval echo "$as_me:12793: \"$ac_try\"") >&5
12794   (eval $ac_try) 2>&5
12795   ac_status=$?
12796   echo "$as_me:12796: \$? = $ac_status" >&5
12797   (exit "$ac_status"); }; }; then
12798
12799                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12800
12801 echo "${as_me:-configure}:12801: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12802
12803                                         cf_cv_find_linkage_utf8=yes
12804                                         cf_cv_library_file_utf8="-lutf8"
12805                                         break
12806 else
12807   echo "$as_me: failed program was:" >&5
12808 cat "conftest.$ac_ext" >&5
12809
12810                                         CPPFLAGS="$cf_save_CPPFLAGS"
12811                                         LIBS="$cf_save_LIBS"
12812                                         LDFLAGS="$cf_save_LDFLAGS"
12813
12814 fi
12815 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12816                                 fi
12817                         done
12818                         CPPFLAGS="$cf_save_CPPFLAGS"
12819                         LDFLAGS="$cf_save_LDFLAGS"
12820                 fi
12821
12822         else
12823                 cf_cv_find_linkage_utf8=no
12824         fi
12825
12826 fi
12827 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12828
12829 fi
12830 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12831
12832 LIBS="$cf_save_LIBS"
12833
12834 if test "$cf_cv_find_linkage_utf8" = yes ; then
12835 cf_cv_utf8_lib=add-on
12836 else
12837 cf_cv_utf8_lib=no
12838 fi
12839
12840 fi
12841 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12842 fi
12843 echo "$as_me:12843: result: $cf_cv_utf8_lib" >&5
12844 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12845
12846 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12847 # ncurses/ncursesw:
12848 if test "$cf_cv_utf8_lib" = "add-on" ; then
12849
12850 cat >>confdefs.h <<\EOF
12851 #define HAVE_LIBUTF8_H 1
12852 EOF
12853
12854 if test -n "$cf_cv_header_path_utf8" ; then
12855   for cf_add_incdir in $cf_cv_header_path_utf8
12856   do
12857         while test "$cf_add_incdir" != /usr/include
12858         do
12859           if test -d "$cf_add_incdir"
12860           then
12861                 cf_have_incdir=no
12862                 if test -n "$CFLAGS$CPPFLAGS" ; then
12863                   # a loop is needed to ensure we can add subdirs of existing dirs
12864                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12865                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12866                           cf_have_incdir=yes; break
12867                         fi
12868                   done
12869                 fi
12870
12871                 if test "$cf_have_incdir" = no ; then
12872                   if test "$cf_add_incdir" = /usr/local/include ; then
12873                         if test "$GCC" = yes
12874                         then
12875                           cf_save_CPPFLAGS=$CPPFLAGS
12876
12877         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12878         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12879
12880                           cat >"conftest.$ac_ext" <<_ACEOF
12881 #line 12881 "configure"
12882 #include "confdefs.h"
12883 #include <stdio.h>
12884 int
12885 main (void)
12886 {
12887 printf("Hello")
12888   ;
12889   return 0;
12890 }
12891 _ACEOF
12892 rm -f "conftest.$ac_objext"
12893 if { (eval echo "$as_me:12893: \"$ac_compile\"") >&5
12894   (eval $ac_compile) 2>&5
12895   ac_status=$?
12896   echo "$as_me:12896: \$? = $ac_status" >&5
12897   (exit "$ac_status"); } &&
12898          { ac_try='test -s "conftest.$ac_objext"'
12899   { (eval echo "$as_me:12899: \"$ac_try\"") >&5
12900   (eval $ac_try) 2>&5
12901   ac_status=$?
12902   echo "$as_me:12902: \$? = $ac_status" >&5
12903   (exit "$ac_status"); }; }; then
12904   :
12905 else
12906   echo "$as_me: failed program was:" >&5
12907 cat "conftest.$ac_ext" >&5
12908 cf_have_incdir=yes
12909 fi
12910 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12911                           CPPFLAGS=$cf_save_CPPFLAGS
12912                         fi
12913                   fi
12914                 fi
12915
12916                 if test "$cf_have_incdir" = no ; then
12917                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12918
12919 echo "${as_me:-configure}:12919: testing adding $cf_add_incdir to include-path ..." 1>&5
12920
12921                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12922
12923                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12924                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12925                   cf_add_incdir="$cf_top_incdir"
12926                 else
12927                   break
12928                 fi
12929           else
12930                 break
12931           fi
12932         done
12933   done
12934 fi
12935
12936 if test -n "$cf_cv_library_path_utf8" ; then
12937         for cf_add_libdir in $cf_cv_library_path_utf8
12938         do
12939                 if test "$cf_add_libdir" = /usr/lib ; then
12940                         :
12941                 elif test -d "$cf_add_libdir"
12942                 then
12943                         cf_have_libdir=no
12944                         if test -n "$LDFLAGS$LIBS" ; then
12945                                 # a loop is needed to ensure we can add subdirs of existing dirs
12946                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12947                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12948                                                 cf_have_libdir=yes; break
12949                                         fi
12950                                 done
12951                         fi
12952                         if test "$cf_have_libdir" = no ; then
12953                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12954
12955 echo "${as_me:-configure}:12955: testing adding $cf_add_libdir to library-path ..." 1>&5
12956
12957                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12958                         fi
12959                 fi
12960         done
12961 fi
12962
12963 cf_add_libs="$LIBS"
12964 # reverse order
12965 cf_add_0lib=
12966 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12967 # filter duplicates
12968 for cf_add_1lib in $cf_add_0lib; do
12969         for cf_add_2lib in $cf_add_libs; do
12970                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12971                         cf_add_1lib=
12972                         break
12973                 fi
12974         done
12975         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12976 done
12977 LIBS="$cf_add_libs"
12978
12979 fi
12980
12981                 if test "$cf_cv_utf8_lib" != no ; then
12982                         NCURSES_LIBUTF8=1
12983                 fi
12984         fi
12985
12986 # This is needed on Tru64 5.0 to declare mbstate_t
12987 echo "$as_me:12987: checking if we must include wchar.h to declare mbstate_t" >&5
12988 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12989 if test "${cf_cv_mbstate_t+set}" = set; then
12990   echo $ECHO_N "(cached) $ECHO_C" >&6
12991 else
12992
12993 cat >"conftest.$ac_ext" <<_ACEOF
12994 #line 12994 "configure"
12995 #include "confdefs.h"
12996
12997 #include <stdlib.h>
12998 #include <stdarg.h>
12999 #include <stdio.h>
13000 #ifdef HAVE_LIBUTF8_H
13001 #include <libutf8.h>
13002 #endif
13003 int
13004 main (void)
13005 {
13006 mbstate_t state
13007   ;
13008   return 0;
13009 }
13010 _ACEOF
13011 rm -f "conftest.$ac_objext"
13012 if { (eval echo "$as_me:13012: \"$ac_compile\"") >&5
13013   (eval $ac_compile) 2>&5
13014   ac_status=$?
13015   echo "$as_me:13015: \$? = $ac_status" >&5
13016   (exit "$ac_status"); } &&
13017          { ac_try='test -s "conftest.$ac_objext"'
13018   { (eval echo "$as_me:13018: \"$ac_try\"") >&5
13019   (eval $ac_try) 2>&5
13020   ac_status=$?
13021   echo "$as_me:13021: \$? = $ac_status" >&5
13022   (exit "$ac_status"); }; }; then
13023   cf_cv_mbstate_t=no
13024 else
13025   echo "$as_me: failed program was:" >&5
13026 cat "conftest.$ac_ext" >&5
13027 cat >"conftest.$ac_ext" <<_ACEOF
13028 #line 13028 "configure"
13029 #include "confdefs.h"
13030
13031 #include <stdlib.h>
13032 #include <stdarg.h>
13033 #include <stdio.h>
13034 #include <wchar.h>
13035 #ifdef HAVE_LIBUTF8_H
13036 #include <libutf8.h>
13037 #endif
13038 int
13039 main (void)
13040 {
13041 mbstate_t value
13042   ;
13043   return 0;
13044 }
13045 _ACEOF
13046 rm -f "conftest.$ac_objext"
13047 if { (eval echo "$as_me:13047: \"$ac_compile\"") >&5
13048   (eval $ac_compile) 2>&5
13049   ac_status=$?
13050   echo "$as_me:13050: \$? = $ac_status" >&5
13051   (exit "$ac_status"); } &&
13052          { ac_try='test -s "conftest.$ac_objext"'
13053   { (eval echo "$as_me:13053: \"$ac_try\"") >&5
13054   (eval $ac_try) 2>&5
13055   ac_status=$?
13056   echo "$as_me:13056: \$? = $ac_status" >&5
13057   (exit "$ac_status"); }; }; then
13058   cf_cv_mbstate_t=yes
13059 else
13060   echo "$as_me: failed program was:" >&5
13061 cat "conftest.$ac_ext" >&5
13062 cf_cv_mbstate_t=unknown
13063 fi
13064 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13065 fi
13066 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13067 fi
13068 echo "$as_me:13068: result: $cf_cv_mbstate_t" >&5
13069 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13070
13071 if test "$cf_cv_mbstate_t" = yes ; then
13072
13073 cat >>confdefs.h <<\EOF
13074 #define NEED_WCHAR_H 1
13075 EOF
13076
13077         NEED_WCHAR_H=1
13078 fi
13079
13080 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13081 if test "$cf_cv_mbstate_t" = unknown ; then
13082         NCURSES_MBSTATE_T=1
13083 fi
13084
13085 # This is needed on Tru64 5.0 to declare wchar_t
13086 echo "$as_me:13086: checking if we must include wchar.h to declare wchar_t" >&5
13087 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13088 if test "${cf_cv_wchar_t+set}" = set; then
13089   echo $ECHO_N "(cached) $ECHO_C" >&6
13090 else
13091
13092 cat >"conftest.$ac_ext" <<_ACEOF
13093 #line 13093 "configure"
13094 #include "confdefs.h"
13095
13096 #include <stdlib.h>
13097 #include <stdarg.h>
13098 #include <stdio.h>
13099 #ifdef HAVE_LIBUTF8_H
13100 #include <libutf8.h>
13101 #endif
13102 int
13103 main (void)
13104 {
13105 wchar_t state
13106   ;
13107   return 0;
13108 }
13109 _ACEOF
13110 rm -f "conftest.$ac_objext"
13111 if { (eval echo "$as_me:13111: \"$ac_compile\"") >&5
13112   (eval $ac_compile) 2>&5
13113   ac_status=$?
13114   echo "$as_me:13114: \$? = $ac_status" >&5
13115   (exit "$ac_status"); } &&
13116          { ac_try='test -s "conftest.$ac_objext"'
13117   { (eval echo "$as_me:13117: \"$ac_try\"") >&5
13118   (eval $ac_try) 2>&5
13119   ac_status=$?
13120   echo "$as_me:13120: \$? = $ac_status" >&5
13121   (exit "$ac_status"); }; }; then
13122   cf_cv_wchar_t=no
13123 else
13124   echo "$as_me: failed program was:" >&5
13125 cat "conftest.$ac_ext" >&5
13126 cat >"conftest.$ac_ext" <<_ACEOF
13127 #line 13127 "configure"
13128 #include "confdefs.h"
13129
13130 #include <stdlib.h>
13131 #include <stdarg.h>
13132 #include <stdio.h>
13133 #include <wchar.h>
13134 #ifdef HAVE_LIBUTF8_H
13135 #include <libutf8.h>
13136 #endif
13137 int
13138 main (void)
13139 {
13140 wchar_t value
13141   ;
13142   return 0;
13143 }
13144 _ACEOF
13145 rm -f "conftest.$ac_objext"
13146 if { (eval echo "$as_me:13146: \"$ac_compile\"") >&5
13147   (eval $ac_compile) 2>&5
13148   ac_status=$?
13149   echo "$as_me:13149: \$? = $ac_status" >&5
13150   (exit "$ac_status"); } &&
13151          { ac_try='test -s "conftest.$ac_objext"'
13152   { (eval echo "$as_me:13152: \"$ac_try\"") >&5
13153   (eval $ac_try) 2>&5
13154   ac_status=$?
13155   echo "$as_me:13155: \$? = $ac_status" >&5
13156   (exit "$ac_status"); }; }; then
13157   cf_cv_wchar_t=yes
13158 else
13159   echo "$as_me: failed program was:" >&5
13160 cat "conftest.$ac_ext" >&5
13161 cf_cv_wchar_t=unknown
13162 fi
13163 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13164 fi
13165 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13166 fi
13167 echo "$as_me:13167: result: $cf_cv_wchar_t" >&5
13168 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13169
13170 if test "$cf_cv_wchar_t" = yes ; then
13171
13172 cat >>confdefs.h <<\EOF
13173 #define NEED_WCHAR_H 1
13174 EOF
13175
13176         NEED_WCHAR_H=1
13177 fi
13178
13179 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13180 if test "$cf_cv_wchar_t" = unknown ; then
13181         NCURSES_WCHAR_T=1
13182 fi
13183
13184 # if we find wchar_t in either place, use substitution to provide a fallback.
13185 if test "$cf_cv_wchar_t" != unknown ; then
13186         NCURSES_OK_WCHAR_T=1
13187 fi
13188
13189 # This is needed on Tru64 5.0 to declare wint_t
13190 echo "$as_me:13190: checking if we must include wchar.h to declare wint_t" >&5
13191 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13192 if test "${cf_cv_wint_t+set}" = set; then
13193   echo $ECHO_N "(cached) $ECHO_C" >&6
13194 else
13195
13196 cat >"conftest.$ac_ext" <<_ACEOF
13197 #line 13197 "configure"
13198 #include "confdefs.h"
13199
13200 #include <stdlib.h>
13201 #include <stdarg.h>
13202 #include <stdio.h>
13203 #ifdef HAVE_LIBUTF8_H
13204 #include <libutf8.h>
13205 #endif
13206 int
13207 main (void)
13208 {
13209 wint_t state
13210   ;
13211   return 0;
13212 }
13213 _ACEOF
13214 rm -f "conftest.$ac_objext"
13215 if { (eval echo "$as_me:13215: \"$ac_compile\"") >&5
13216   (eval $ac_compile) 2>&5
13217   ac_status=$?
13218   echo "$as_me:13218: \$? = $ac_status" >&5
13219   (exit "$ac_status"); } &&
13220          { ac_try='test -s "conftest.$ac_objext"'
13221   { (eval echo "$as_me:13221: \"$ac_try\"") >&5
13222   (eval $ac_try) 2>&5
13223   ac_status=$?
13224   echo "$as_me:13224: \$? = $ac_status" >&5
13225   (exit "$ac_status"); }; }; then
13226   cf_cv_wint_t=no
13227 else
13228   echo "$as_me: failed program was:" >&5
13229 cat "conftest.$ac_ext" >&5
13230 cat >"conftest.$ac_ext" <<_ACEOF
13231 #line 13231 "configure"
13232 #include "confdefs.h"
13233
13234 #include <stdlib.h>
13235 #include <stdarg.h>
13236 #include <stdio.h>
13237 #include <wchar.h>
13238 #ifdef HAVE_LIBUTF8_H
13239 #include <libutf8.h>
13240 #endif
13241 int
13242 main (void)
13243 {
13244 wint_t value
13245   ;
13246   return 0;
13247 }
13248 _ACEOF
13249 rm -f "conftest.$ac_objext"
13250 if { (eval echo "$as_me:13250: \"$ac_compile\"") >&5
13251   (eval $ac_compile) 2>&5
13252   ac_status=$?
13253   echo "$as_me:13253: \$? = $ac_status" >&5
13254   (exit "$ac_status"); } &&
13255          { ac_try='test -s "conftest.$ac_objext"'
13256   { (eval echo "$as_me:13256: \"$ac_try\"") >&5
13257   (eval $ac_try) 2>&5
13258   ac_status=$?
13259   echo "$as_me:13259: \$? = $ac_status" >&5
13260   (exit "$ac_status"); }; }; then
13261   cf_cv_wint_t=yes
13262 else
13263   echo "$as_me: failed program was:" >&5
13264 cat "conftest.$ac_ext" >&5
13265 cf_cv_wint_t=unknown
13266 fi
13267 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13268 fi
13269 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13270 fi
13271 echo "$as_me:13271: result: $cf_cv_wint_t" >&5
13272 echo "${ECHO_T}$cf_cv_wint_t" >&6
13273
13274 if test "$cf_cv_wint_t" = yes ; then
13275
13276 cat >>confdefs.h <<\EOF
13277 #define NEED_WCHAR_H 1
13278 EOF
13279
13280         NEED_WCHAR_H=1
13281 fi
13282
13283 # if we do not find wint_t in either place, use substitution to provide a fallback.
13284 if test "$cf_cv_wint_t" = unknown ; then
13285         NCURSES_WINT_T=1
13286 fi
13287
13288 # if we find wint_t in either place, use substitution to provide a fallback.
13289 if test "$cf_cv_wint_t" != unknown ; then
13290         NCURSES_OK_WINT_T=1
13291 fi
13292
13293         if test "$NCURSES_MBSTATE_T" != 0; then
13294
13295 cat >>confdefs.h <<\EOF
13296 #define NEED_MBSTATE_T_DEF 1
13297 EOF
13298
13299         fi
13300 fi
13301
13302 ###   use option --disable-lp64 to allow long chtype
13303 echo "$as_me:13303: checking whether to enable _LP64 definition in curses.h" >&5
13304 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13305
13306 # Check whether --enable-lp64 or --disable-lp64 was given.
13307 if test "${enable_lp64+set}" = set; then
13308   enableval="$enable_lp64"
13309   with_lp64=$enableval
13310 else
13311   with_lp64=$cf_dft_with_lp64
13312 fi;
13313 echo "$as_me:13313: result: $with_lp64" >&5
13314 echo "${ECHO_T}$with_lp64" >&6
13315
13316 if test "x$with_lp64" = xyes ; then
13317         cf_cv_enable_lp64=1
13318 else
13319         cf_cv_enable_lp64=0
13320 fi
13321
13322 # Check whether --enable-largefile or --disable-largefile was given.
13323 if test "${enable_largefile+set}" = set; then
13324   enableval="$enable_largefile"
13325
13326 fi;
13327 if test "$enable_largefile" != no; then
13328
13329   echo "$as_me:13329: checking for special C compiler options needed for large files" >&5
13330 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13331 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13332   echo $ECHO_N "(cached) $ECHO_C" >&6
13333 else
13334   ac_cv_sys_largefile_CC=no
13335      if test "$GCC" != yes; then
13336        ac_save_CC=$CC
13337        while :; do
13338          # IRIX 6.2 and later do not support large files by default,
13339          # so use the C compiler's -n32 option if that helps.
13340          cat >"conftest.$ac_ext" <<_ACEOF
13341 #line 13341 "configure"
13342 #include "confdefs.h"
13343 #include <sys/types.h>
13344  /* Check that off_t can represent 2**63 - 1 correctly.
13345     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13346     since some C++ compilers masquerading as C compilers
13347     incorrectly reject 9223372036854775807.  */
13348 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13349   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13350                        && LARGE_OFF_T % 2147483647 == 1)
13351                       ? 1 : -1];
13352 int
13353 main (void)
13354 {
13355
13356   ;
13357   return 0;
13358 }
13359 _ACEOF
13360          rm -f "conftest.$ac_objext"
13361 if { (eval echo "$as_me:13361: \"$ac_compile\"") >&5
13362   (eval $ac_compile) 2>&5
13363   ac_status=$?
13364   echo "$as_me:13364: \$? = $ac_status" >&5
13365   (exit "$ac_status"); } &&
13366          { ac_try='test -s "conftest.$ac_objext"'
13367   { (eval echo "$as_me:13367: \"$ac_try\"") >&5
13368   (eval $ac_try) 2>&5
13369   ac_status=$?
13370   echo "$as_me:13370: \$? = $ac_status" >&5
13371   (exit "$ac_status"); }; }; then
13372   break
13373 else
13374   echo "$as_me: failed program was:" >&5
13375 cat "conftest.$ac_ext" >&5
13376 fi
13377 rm -f "conftest.$ac_objext"
13378          CC="$CC -n32"
13379          rm -f "conftest.$ac_objext"
13380 if { (eval echo "$as_me:13380: \"$ac_compile\"") >&5
13381   (eval $ac_compile) 2>&5
13382   ac_status=$?
13383   echo "$as_me:13383: \$? = $ac_status" >&5
13384   (exit "$ac_status"); } &&
13385          { ac_try='test -s "conftest.$ac_objext"'
13386   { (eval echo "$as_me:13386: \"$ac_try\"") >&5
13387   (eval $ac_try) 2>&5
13388   ac_status=$?
13389   echo "$as_me:13389: \$? = $ac_status" >&5
13390   (exit "$ac_status"); }; }; then
13391   ac_cv_sys_largefile_CC=' -n32'; break
13392 else
13393   echo "$as_me: failed program was:" >&5
13394 cat "conftest.$ac_ext" >&5
13395 fi
13396 rm -f "conftest.$ac_objext"
13397          break
13398        done
13399        CC=$ac_save_CC
13400        rm -f "conftest.$ac_ext"
13401     fi
13402 fi
13403 echo "$as_me:13403: result: $ac_cv_sys_largefile_CC" >&5
13404 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13405   if test "$ac_cv_sys_largefile_CC" != no; then
13406     CC=$CC$ac_cv_sys_largefile_CC
13407   fi
13408
13409   echo "$as_me:13409: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13410 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13411 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13412   echo $ECHO_N "(cached) $ECHO_C" >&6
13413 else
13414   while :; do
13415   ac_cv_sys_file_offset_bits=no
13416   cat >"conftest.$ac_ext" <<_ACEOF
13417 #line 13417 "configure"
13418 #include "confdefs.h"
13419 #include <sys/types.h>
13420  /* Check that off_t can represent 2**63 - 1 correctly.
13421     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13422     since some C++ compilers masquerading as C compilers
13423     incorrectly reject 9223372036854775807.  */
13424 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13425   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13426                        && LARGE_OFF_T % 2147483647 == 1)
13427                       ? 1 : -1];
13428 int
13429 main (void)
13430 {
13431
13432   ;
13433   return 0;
13434 }
13435 _ACEOF
13436 rm -f "conftest.$ac_objext"
13437 if { (eval echo "$as_me:13437: \"$ac_compile\"") >&5
13438   (eval $ac_compile) 2>&5
13439   ac_status=$?
13440   echo "$as_me:13440: \$? = $ac_status" >&5
13441   (exit "$ac_status"); } &&
13442          { ac_try='test -s "conftest.$ac_objext"'
13443   { (eval echo "$as_me:13443: \"$ac_try\"") >&5
13444   (eval $ac_try) 2>&5
13445   ac_status=$?
13446   echo "$as_me:13446: \$? = $ac_status" >&5
13447   (exit "$ac_status"); }; }; then
13448   break
13449 else
13450   echo "$as_me: failed program was:" >&5
13451 cat "conftest.$ac_ext" >&5
13452 fi
13453 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13454   cat >"conftest.$ac_ext" <<_ACEOF
13455 #line 13455 "configure"
13456 #include "confdefs.h"
13457 #define _FILE_OFFSET_BITS 64
13458 #include <sys/types.h>
13459  /* Check that off_t can represent 2**63 - 1 correctly.
13460     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13461     since some C++ compilers masquerading as C compilers
13462     incorrectly reject 9223372036854775807.  */
13463 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13464   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13465                        && LARGE_OFF_T % 2147483647 == 1)
13466                       ? 1 : -1];
13467 int
13468 main (void)
13469 {
13470
13471   ;
13472   return 0;
13473 }
13474 _ACEOF
13475 rm -f "conftest.$ac_objext"
13476 if { (eval echo "$as_me:13476: \"$ac_compile\"") >&5
13477   (eval $ac_compile) 2>&5
13478   ac_status=$?
13479   echo "$as_me:13479: \$? = $ac_status" >&5
13480   (exit "$ac_status"); } &&
13481          { ac_try='test -s "conftest.$ac_objext"'
13482   { (eval echo "$as_me:13482: \"$ac_try\"") >&5
13483   (eval $ac_try) 2>&5
13484   ac_status=$?
13485   echo "$as_me:13485: \$? = $ac_status" >&5
13486   (exit "$ac_status"); }; }; then
13487   ac_cv_sys_file_offset_bits=64; break
13488 else
13489   echo "$as_me: failed program was:" >&5
13490 cat "conftest.$ac_ext" >&5
13491 fi
13492 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13493   break
13494 done
13495 fi
13496 echo "$as_me:13496: result: $ac_cv_sys_file_offset_bits" >&5
13497 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13498 if test "$ac_cv_sys_file_offset_bits" != no; then
13499
13500 cat >>confdefs.h <<EOF
13501 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13502 EOF
13503
13504 fi
13505 rm -rf conftest*
13506   echo "$as_me:13506: checking for _LARGE_FILES value needed for large files" >&5
13507 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13508 if test "${ac_cv_sys_large_files+set}" = set; then
13509   echo $ECHO_N "(cached) $ECHO_C" >&6
13510 else
13511   while :; do
13512   ac_cv_sys_large_files=no
13513   cat >"conftest.$ac_ext" <<_ACEOF
13514 #line 13514 "configure"
13515 #include "confdefs.h"
13516 #include <sys/types.h>
13517  /* Check that off_t can represent 2**63 - 1 correctly.
13518     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13519     since some C++ compilers masquerading as C compilers
13520     incorrectly reject 9223372036854775807.  */
13521 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13522   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13523                        && LARGE_OFF_T % 2147483647 == 1)
13524                       ? 1 : -1];
13525 int
13526 main (void)
13527 {
13528
13529   ;
13530   return 0;
13531 }
13532 _ACEOF
13533 rm -f "conftest.$ac_objext"
13534 if { (eval echo "$as_me:13534: \"$ac_compile\"") >&5
13535   (eval $ac_compile) 2>&5
13536   ac_status=$?
13537   echo "$as_me:13537: \$? = $ac_status" >&5
13538   (exit "$ac_status"); } &&
13539          { ac_try='test -s "conftest.$ac_objext"'
13540   { (eval echo "$as_me:13540: \"$ac_try\"") >&5
13541   (eval $ac_try) 2>&5
13542   ac_status=$?
13543   echo "$as_me:13543: \$? = $ac_status" >&5
13544   (exit "$ac_status"); }; }; then
13545   break
13546 else
13547   echo "$as_me: failed program was:" >&5
13548 cat "conftest.$ac_ext" >&5
13549 fi
13550 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13551   cat >"conftest.$ac_ext" <<_ACEOF
13552 #line 13552 "configure"
13553 #include "confdefs.h"
13554 #define _LARGE_FILES 1
13555 #include <sys/types.h>
13556  /* Check that off_t can represent 2**63 - 1 correctly.
13557     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13558     since some C++ compilers masquerading as C compilers
13559     incorrectly reject 9223372036854775807.  */
13560 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13561   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13562                        && LARGE_OFF_T % 2147483647 == 1)
13563                       ? 1 : -1];
13564 int
13565 main (void)
13566 {
13567
13568   ;
13569   return 0;
13570 }
13571 _ACEOF
13572 rm -f "conftest.$ac_objext"
13573 if { (eval echo "$as_me:13573: \"$ac_compile\"") >&5
13574   (eval $ac_compile) 2>&5
13575   ac_status=$?
13576   echo "$as_me:13576: \$? = $ac_status" >&5
13577   (exit "$ac_status"); } &&
13578          { ac_try='test -s "conftest.$ac_objext"'
13579   { (eval echo "$as_me:13579: \"$ac_try\"") >&5
13580   (eval $ac_try) 2>&5
13581   ac_status=$?
13582   echo "$as_me:13582: \$? = $ac_status" >&5
13583   (exit "$ac_status"); }; }; then
13584   ac_cv_sys_large_files=1; break
13585 else
13586   echo "$as_me: failed program was:" >&5
13587 cat "conftest.$ac_ext" >&5
13588 fi
13589 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13590   break
13591 done
13592 fi
13593 echo "$as_me:13593: result: $ac_cv_sys_large_files" >&5
13594 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13595 if test "$ac_cv_sys_large_files" != no; then
13596
13597 cat >>confdefs.h <<EOF
13598 #define _LARGE_FILES $ac_cv_sys_large_files
13599 EOF
13600
13601 fi
13602 rm -rf conftest*
13603 fi
13604
13605         if test "$enable_largefile" != no ; then
13606         echo "$as_me:13606: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13607 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13608 if test "${ac_cv_sys_largefile_source+set}" = set; then
13609   echo $ECHO_N "(cached) $ECHO_C" >&6
13610 else
13611   while :; do
13612   ac_cv_sys_largefile_source=no
13613   cat >"conftest.$ac_ext" <<_ACEOF
13614 #line 13614 "configure"
13615 #include "confdefs.h"
13616 #include <stdio.h>
13617 int
13618 main (void)
13619 {
13620 return !fseeko;
13621   ;
13622   return 0;
13623 }
13624 _ACEOF
13625 rm -f "conftest.$ac_objext"
13626 if { (eval echo "$as_me:13626: \"$ac_compile\"") >&5
13627   (eval $ac_compile) 2>&5
13628   ac_status=$?
13629   echo "$as_me:13629: \$? = $ac_status" >&5
13630   (exit "$ac_status"); } &&
13631          { ac_try='test -s "conftest.$ac_objext"'
13632   { (eval echo "$as_me:13632: \"$ac_try\"") >&5
13633   (eval $ac_try) 2>&5
13634   ac_status=$?
13635   echo "$as_me:13635: \$? = $ac_status" >&5
13636   (exit "$ac_status"); }; }; then
13637   break
13638 else
13639   echo "$as_me: failed program was:" >&5
13640 cat "conftest.$ac_ext" >&5
13641 fi
13642 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13643   cat >"conftest.$ac_ext" <<_ACEOF
13644 #line 13644 "configure"
13645 #include "confdefs.h"
13646 #define _LARGEFILE_SOURCE 1
13647 #include <stdio.h>
13648 int
13649 main (void)
13650 {
13651 return !fseeko;
13652   ;
13653   return 0;
13654 }
13655 _ACEOF
13656 rm -f "conftest.$ac_objext"
13657 if { (eval echo "$as_me:13657: \"$ac_compile\"") >&5
13658   (eval $ac_compile) 2>&5
13659   ac_status=$?
13660   echo "$as_me:13660: \$? = $ac_status" >&5
13661   (exit "$ac_status"); } &&
13662          { ac_try='test -s "conftest.$ac_objext"'
13663   { (eval echo "$as_me:13663: \"$ac_try\"") >&5
13664   (eval $ac_try) 2>&5
13665   ac_status=$?
13666   echo "$as_me:13666: \$? = $ac_status" >&5
13667   (exit "$ac_status"); }; }; then
13668   ac_cv_sys_largefile_source=1; break
13669 else
13670   echo "$as_me: failed program was:" >&5
13671 cat "conftest.$ac_ext" >&5
13672 fi
13673 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13674   break
13675 done
13676 fi
13677 echo "$as_me:13677: result: $ac_cv_sys_largefile_source" >&5
13678 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13679 if test "$ac_cv_sys_largefile_source" != no; then
13680
13681 cat >>confdefs.h <<EOF
13682 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13683 EOF
13684
13685 fi
13686 rm -rf conftest*
13687
13688 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13689 # in glibc 2.1.3, but that breaks too many other things.
13690 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13691 echo "$as_me:13691: checking for fseeko" >&5
13692 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13693 if test "${ac_cv_func_fseeko+set}" = set; then
13694   echo $ECHO_N "(cached) $ECHO_C" >&6
13695 else
13696   cat >"conftest.$ac_ext" <<_ACEOF
13697 #line 13697 "configure"
13698 #include "confdefs.h"
13699 #include <stdio.h>
13700 int
13701 main (void)
13702 {
13703 return fseeko && fseeko (stdin, 0, 0);
13704   ;
13705   return 0;
13706 }
13707 _ACEOF
13708 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13709 if { (eval echo "$as_me:13709: \"$ac_link\"") >&5
13710   (eval $ac_link) 2>&5
13711   ac_status=$?
13712   echo "$as_me:13712: \$? = $ac_status" >&5
13713   (exit "$ac_status"); } &&
13714          { ac_try='test -s "conftest$ac_exeext"'
13715   { (eval echo "$as_me:13715: \"$ac_try\"") >&5
13716   (eval $ac_try) 2>&5
13717   ac_status=$?
13718   echo "$as_me:13718: \$? = $ac_status" >&5
13719   (exit "$ac_status"); }; }; then
13720   ac_cv_func_fseeko=yes
13721 else
13722   echo "$as_me: failed program was:" >&5
13723 cat "conftest.$ac_ext" >&5
13724 ac_cv_func_fseeko=no
13725 fi
13726 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13727 fi
13728 echo "$as_me:13728: result: $ac_cv_func_fseeko" >&5
13729 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13730 if test $ac_cv_func_fseeko = yes; then
13731
13732 cat >>confdefs.h <<\EOF
13733 #define HAVE_FSEEKO 1
13734 EOF
13735
13736 fi
13737
13738         # Normally we would collect these definitions in the config.h,
13739         # but (like _XOPEN_SOURCE), some environments rely on having these
13740         # defined before any of the system headers are included.  Another
13741         # case comes up with C++, e.g., on AIX the compiler compiles the
13742         # header files by themselves before looking at the body files it is
13743         # told to compile.  For ncurses, those header files do not include
13744         # the config.h
13745         if test "$ac_cv_sys_large_files" != no
13746         then
13747
13748         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13749         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13750
13751         fi
13752         if test "$ac_cv_sys_largefile_source" != no
13753         then
13754
13755         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13756         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13757
13758         fi
13759         if test "$ac_cv_sys_file_offset_bits" != no
13760         then
13761
13762         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13763         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13764
13765         fi
13766
13767         echo "$as_me:13767: checking whether to use struct dirent64" >&5
13768 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13769 if test "${cf_cv_struct_dirent64+set}" = set; then
13770   echo $ECHO_N "(cached) $ECHO_C" >&6
13771 else
13772
13773                 cat >"conftest.$ac_ext" <<_ACEOF
13774 #line 13774 "configure"
13775 #include "confdefs.h"
13776
13777 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13778 #include <sys/types.h>
13779 #include <dirent.h>
13780
13781 int
13782 main (void)
13783 {
13784
13785                 /* if transitional largefile support is setup, this is true */
13786                 extern struct dirent64 * readdir(DIR *);
13787                 struct dirent64 *x = readdir((DIR *)0);
13788                 struct dirent *y = readdir((DIR *)0);
13789                 int z = x - y;
13790                 (void)z;
13791
13792   ;
13793   return 0;
13794 }
13795 _ACEOF
13796 rm -f "conftest.$ac_objext"
13797 if { (eval echo "$as_me:13797: \"$ac_compile\"") >&5
13798   (eval $ac_compile) 2>&5
13799   ac_status=$?
13800   echo "$as_me:13800: \$? = $ac_status" >&5
13801   (exit "$ac_status"); } &&
13802          { ac_try='test -s "conftest.$ac_objext"'
13803   { (eval echo "$as_me:13803: \"$ac_try\"") >&5
13804   (eval $ac_try) 2>&5
13805   ac_status=$?
13806   echo "$as_me:13806: \$? = $ac_status" >&5
13807   (exit "$ac_status"); }; }; then
13808   cf_cv_struct_dirent64=yes
13809 else
13810   echo "$as_me: failed program was:" >&5
13811 cat "conftest.$ac_ext" >&5
13812 cf_cv_struct_dirent64=no
13813 fi
13814 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13815
13816 fi
13817 echo "$as_me:13817: result: $cf_cv_struct_dirent64" >&5
13818 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13819         test "$cf_cv_struct_dirent64" = yes &&
13820 cat >>confdefs.h <<\EOF
13821 #define HAVE_STRUCT_DIRENT64 1
13822 EOF
13823
13824         fi
13825
13826 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13827 echo "$as_me:13827: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13828 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13829
13830 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13831 if test "${enable_tparm_varargs+set}" = set; then
13832   enableval="$enable_tparm_varargs"
13833   with_tparm_varargs=$enableval
13834 else
13835   with_tparm_varargs=yes
13836 fi;
13837 echo "$as_me:13837: result: $with_tparm_varargs" >&5
13838 echo "${ECHO_T}$with_tparm_varargs" >&6
13839 NCURSES_TPARM_VARARGS=0
13840 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13841
13842 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13843 if test "$with_ticlib" != no ; then
13844 echo "$as_me:13844: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13845 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13846
13847 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13848 if test "${enable_tic_depends+set}" = set; then
13849   enableval="$enable_tic_depends"
13850   with_tic_depends=$enableval
13851 else
13852   with_tic_depends=yes
13853 fi;
13854 echo "$as_me:13854: result: $with_tic_depends" >&5
13855 echo "${ECHO_T}$with_tic_depends" >&6
13856 else
13857         with_tic_depends=no
13858 fi
13859
13860 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
13861 echo "$as_me:13861: checking if you want to enable wattr* macros" >&5
13862 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
13863
13864 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13865 if test "${enable_wattr_macros+set}" = set; then
13866   enableval="$enable_wattr_macros"
13867   with_wattr_macros=$enableval
13868 else
13869   with_wattr_macros=no
13870 fi;
13871 if [ "x$with_wattr_macros" != xyes ]; then
13872         NCURSES_WATTR_MACROS=0
13873         echo "$as_me:13873: result: no" >&5
13874 echo "${ECHO_T}no" >&6
13875 else
13876         NCURSES_WATTR_MACROS=1
13877         echo "$as_me:13877: result: yes" >&5
13878 echo "${ECHO_T}yes" >&6
13879 fi
13880
13881 echo "$as_me:13881: checking for X11 rgb file" >&5
13882 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13883
13884 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13885 if test "${with_x11_rgb+set}" = set; then
13886   withval="$with_x11_rgb"
13887   RGB_PATH=$withval
13888 else
13889   RGB_PATH=auto
13890 fi;
13891
13892 if test "x$RGB_PATH" = xauto
13893 then
13894         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13895         for cf_path in \
13896                 /opt/local/share/X11/rgb.txt \
13897                 /opt/X11/share/X11/rgb.txt \
13898                 /usr/share/X11/rgb.txt \
13899                 /usr/X11/share/X11/rgb.txt \
13900                 /usr/X11/lib/X11/rgb.txt \
13901                 /usr/lib/X11/rgb.txt \
13902                 /etc/X11/rgb.txt \
13903                 /usr/pkg/lib/X11/rgb.txt \
13904                 /usr/X11R7/lib/X11/rgb.txt \
13905                 /usr/X11R6/lib/X11/rgb.txt \
13906                 /usr/X11R5/lib/X11/rgb.txt \
13907                 /usr/X11R4/lib/X11/rgb.txt \
13908                 /usr/local/lib/X11/rgb.txt \
13909                 /usr/local/share/X11/rgb.txt \
13910                 /usr/lib64/X11/rgb.txt
13911         do
13912                 if test -f "$cf_path" ; then
13913                         RGB_PATH="$cf_path"
13914                         break
13915                 fi
13916         done
13917 else
13918         cf_path=$RGB_PATH
13919
13920 if test "x$prefix" != xNONE; then
13921         cf_path_syntax="$prefix"
13922 else
13923         cf_path_syntax="$ac_default_prefix"
13924 fi
13925
13926 case ".$cf_path" in
13927 (.\$\(*\)*|.\'*\'*)
13928         ;;
13929 (..|./*|.\\*)
13930         ;;
13931 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13932         ;;
13933 (.\$\{*prefix\}*|.\$\{*dir\}*)
13934         eval cf_path="$cf_path"
13935         case ".$cf_path" in
13936         (.NONE/*)
13937                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13938                 ;;
13939         esac
13940         ;;
13941 (.no|.NONE/*)
13942         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13943         ;;
13944 (*)
13945         { { echo "$as_me:13945: error: expected a pathname, not \"$cf_path\"" >&5
13946 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13947    { (exit 1); exit 1; }; }
13948         ;;
13949 esac
13950
13951 fi
13952
13953 echo "$as_me:13953: result: $RGB_PATH" >&5
13954 echo "${ECHO_T}$RGB_PATH" >&6
13955
13956 cat >>confdefs.h <<EOF
13957 #define RGB_PATH "$cf_path"
13958 EOF
13959
13960 no_x11_rgb=
13961 if test "$RGB_PATH" = no
13962 then
13963         no_x11_rgb="#"
13964 fi
13965
13966 ###   use option --with-bool to override bool's type
13967 echo "$as_me:13967: checking for type of bool" >&5
13968 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13969
13970 # Check whether --with-bool or --without-bool was given.
13971 if test "${with_bool+set}" = set; then
13972   withval="$with_bool"
13973   NCURSES_BOOL="$withval"
13974 else
13975   NCURSES_BOOL=auto
13976 fi;
13977 echo "$as_me:13977: result: $NCURSES_BOOL" >&5
13978 echo "${ECHO_T}$NCURSES_BOOL" >&6
13979
13980 echo "$as_me:13980: checking for alternate terminal capabilities file" >&5
13981 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13982
13983 # Check whether --with-caps or --without-caps was given.
13984 if test "${with_caps+set}" = set; then
13985   withval="$with_caps"
13986   TERMINFO_CAPS=Caps.$withval
13987 else
13988   TERMINFO_CAPS=Caps
13989 fi;
13990 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
13991 then
13992         { echo "$as_me:13992: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
13993 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
13994         TERMINFO_CAPS=Caps
13995 fi
13996 echo "$as_me:13996: result: $TERMINFO_CAPS" >&5
13997 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13998
13999 ###   use option --with-chtype to override chtype's type
14000 echo "$as_me:14000: checking for type of chtype" >&5
14001 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14002
14003 # Check whether --with-chtype or --without-chtype was given.
14004 if test "${with_chtype+set}" = set; then
14005   withval="$with_chtype"
14006   NCURSES_CHTYPE="$withval"
14007 else
14008   NCURSES_CHTYPE=$cf_dft_chtype
14009 fi;
14010 echo "$as_me:14010: result: $NCURSES_CHTYPE" >&5
14011 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14012
14013 ###   use option --with-ospeed to override ospeed's type
14014 echo "$as_me:14014: checking for type of ospeed" >&5
14015 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14016
14017 # Check whether --with-ospeed or --without-ospeed was given.
14018 if test "${with_ospeed+set}" = set; then
14019   withval="$with_ospeed"
14020   NCURSES_OSPEED="$withval"
14021 else
14022   NCURSES_OSPEED=short
14023 fi;
14024 echo "$as_me:14024: result: $NCURSES_OSPEED" >&5
14025 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14026
14027 ###   use option --with-mmask-t to override mmask_t's type
14028 echo "$as_me:14028: checking for type of mmask_t" >&5
14029 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14030
14031 # Check whether --with-mmask-t or --without-mmask-t was given.
14032 if test "${with_mmask_t+set}" = set; then
14033   withval="$with_mmask_t"
14034   NCURSES_MMASK_T="$withval"
14035 else
14036   NCURSES_MMASK_T=$cf_dft_mmask_t
14037 fi;
14038 echo "$as_me:14038: result: $NCURSES_MMASK_T" >&5
14039 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14040
14041 ###   use option --with-ccharw-max to override CCHARW_MAX size
14042 echo "$as_me:14042: checking for size CCHARW_MAX" >&5
14043 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14044
14045 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14046 if test "${with_ccharw_max+set}" = set; then
14047   withval="$with_ccharw_max"
14048   NCURSES_CCHARW_MAX="$withval"
14049 else
14050   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14051 fi;
14052 echo "$as_me:14052: result: $NCURSES_CCHARW_MAX" >&5
14053 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14054
14055 echo "$as_me:14055: checking for ANSI C header files" >&5
14056 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14057 if test "${ac_cv_header_stdc+set}" = set; then
14058   echo $ECHO_N "(cached) $ECHO_C" >&6
14059 else
14060   cat >"conftest.$ac_ext" <<_ACEOF
14061 #line 14061 "configure"
14062 #include "confdefs.h"
14063 #include <stdlib.h>
14064 #include <stdarg.h>
14065 #include <string.h>
14066 #include <float.h>
14067
14068 _ACEOF
14069 if { (eval echo "$as_me:14069: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14070   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14071   ac_status=$?
14072   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14073   rm -f conftest.er1
14074   cat conftest.err >&5
14075   echo "$as_me:14075: \$? = $ac_status" >&5
14076   (exit "$ac_status"); } >/dev/null; then
14077   if test -s conftest.err; then
14078     ac_cpp_err=$ac_c_preproc_warn_flag
14079   else
14080     ac_cpp_err=
14081   fi
14082 else
14083   ac_cpp_err=yes
14084 fi
14085 if test -z "$ac_cpp_err"; then
14086   ac_cv_header_stdc=yes
14087 else
14088   echo "$as_me: failed program was:" >&5
14089   cat "conftest.$ac_ext" >&5
14090   ac_cv_header_stdc=no
14091 fi
14092 rm -f conftest.err "conftest.$ac_ext"
14093
14094 if test $ac_cv_header_stdc = yes; then
14095   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14096   cat >"conftest.$ac_ext" <<_ACEOF
14097 #line 14097 "configure"
14098 #include "confdefs.h"
14099 #include <string.h>
14100
14101 _ACEOF
14102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14103   $EGREP "memchr" >/dev/null 2>&1; then
14104   :
14105 else
14106   ac_cv_header_stdc=no
14107 fi
14108 rm -rf conftest*
14109
14110 fi
14111
14112 if test $ac_cv_header_stdc = yes; then
14113   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14114   cat >"conftest.$ac_ext" <<_ACEOF
14115 #line 14115 "configure"
14116 #include "confdefs.h"
14117 #include <stdlib.h>
14118
14119 _ACEOF
14120 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14121   $EGREP "free" >/dev/null 2>&1; then
14122   :
14123 else
14124   ac_cv_header_stdc=no
14125 fi
14126 rm -rf conftest*
14127
14128 fi
14129
14130 if test $ac_cv_header_stdc = yes; then
14131   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14132   if test "$cross_compiling" = yes; then
14133   :
14134 else
14135   cat >"conftest.$ac_ext" <<_ACEOF
14136 #line 14136 "configure"
14137 #include "confdefs.h"
14138 #include <ctype.h>
14139 #if ((' ' & 0x0FF) == 0x020)
14140 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14141 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14142 #else
14143 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14144                      || ('j' <= (c) && (c) <= 'r') \
14145                      || ('s' <= (c) && (c) <= 'z'))
14146 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14147 #endif
14148
14149 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14150 int
14151 main (void)
14152 {
14153   int i;
14154   for (i = 0; i < 256; i++)
14155     if (XOR (islower (i), ISLOWER (i))
14156         || toupper (i) != TOUPPER (i))
14157       $ac_main_return(2);
14158   $ac_main_return (0);
14159 }
14160 _ACEOF
14161 rm -f "conftest$ac_exeext"
14162 if { (eval echo "$as_me:14162: \"$ac_link\"") >&5
14163   (eval $ac_link) 2>&5
14164   ac_status=$?
14165   echo "$as_me:14165: \$? = $ac_status" >&5
14166   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14167   { (eval echo "$as_me:14167: \"$ac_try\"") >&5
14168   (eval $ac_try) 2>&5
14169   ac_status=$?
14170   echo "$as_me:14170: \$? = $ac_status" >&5
14171   (exit "$ac_status"); }; }; then
14172   :
14173 else
14174   echo "$as_me: program exited with status $ac_status" >&5
14175 echo "$as_me: failed program was:" >&5
14176 cat "conftest.$ac_ext" >&5
14177 ac_cv_header_stdc=no
14178 fi
14179 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14180 fi
14181 fi
14182 fi
14183 echo "$as_me:14183: result: $ac_cv_header_stdc" >&5
14184 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14185 if test $ac_cv_header_stdc = yes; then
14186
14187 cat >>confdefs.h <<\EOF
14188 #define STDC_HEADERS 1
14189 EOF
14190
14191 fi
14192
14193 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14194
14195 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14196                   inttypes.h stdint.h unistd.h
14197 do
14198 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14199 echo "$as_me:14199: checking for $ac_header" >&5
14200 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14201 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14202   echo $ECHO_N "(cached) $ECHO_C" >&6
14203 else
14204   cat >"conftest.$ac_ext" <<_ACEOF
14205 #line 14205 "configure"
14206 #include "confdefs.h"
14207 $ac_includes_default
14208 #include <$ac_header>
14209 _ACEOF
14210 rm -f "conftest.$ac_objext"
14211 if { (eval echo "$as_me:14211: \"$ac_compile\"") >&5
14212   (eval $ac_compile) 2>&5
14213   ac_status=$?
14214   echo "$as_me:14214: \$? = $ac_status" >&5
14215   (exit "$ac_status"); } &&
14216          { ac_try='test -s "conftest.$ac_objext"'
14217   { (eval echo "$as_me:14217: \"$ac_try\"") >&5
14218   (eval $ac_try) 2>&5
14219   ac_status=$?
14220   echo "$as_me:14220: \$? = $ac_status" >&5
14221   (exit "$ac_status"); }; }; then
14222   eval "$as_ac_Header=yes"
14223 else
14224   echo "$as_me: failed program was:" >&5
14225 cat "conftest.$ac_ext" >&5
14226 eval "$as_ac_Header=no"
14227 fi
14228 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14229 fi
14230 echo "$as_me:14230: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14231 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14232 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14233   cat >>confdefs.h <<EOF
14234 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14235 EOF
14236
14237 fi
14238 done
14239
14240 echo "$as_me:14240: checking for signed char" >&5
14241 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14242 if test "${ac_cv_type_signed_char+set}" = set; then
14243   echo $ECHO_N "(cached) $ECHO_C" >&6
14244 else
14245   cat >"conftest.$ac_ext" <<_ACEOF
14246 #line 14246 "configure"
14247 #include "confdefs.h"
14248 $ac_includes_default
14249 int
14250 main (void)
14251 {
14252 if ((signed char *) 0)
14253   return 0;
14254 if (sizeof (signed char))
14255   return 0;
14256   ;
14257   return 0;
14258 }
14259 _ACEOF
14260 rm -f "conftest.$ac_objext"
14261 if { (eval echo "$as_me:14261: \"$ac_compile\"") >&5
14262   (eval $ac_compile) 2>&5
14263   ac_status=$?
14264   echo "$as_me:14264: \$? = $ac_status" >&5
14265   (exit "$ac_status"); } &&
14266          { ac_try='test -s "conftest.$ac_objext"'
14267   { (eval echo "$as_me:14267: \"$ac_try\"") >&5
14268   (eval $ac_try) 2>&5
14269   ac_status=$?
14270   echo "$as_me:14270: \$? = $ac_status" >&5
14271   (exit "$ac_status"); }; }; then
14272   ac_cv_type_signed_char=yes
14273 else
14274   echo "$as_me: failed program was:" >&5
14275 cat "conftest.$ac_ext" >&5
14276 ac_cv_type_signed_char=no
14277 fi
14278 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14279 fi
14280 echo "$as_me:14280: result: $ac_cv_type_signed_char" >&5
14281 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14282
14283 echo "$as_me:14283: checking size of signed char" >&5
14284 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14285 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14286   echo $ECHO_N "(cached) $ECHO_C" >&6
14287 else
14288   if test "$ac_cv_type_signed_char" = yes; then
14289   if test "$cross_compiling" = yes; then
14290   # Depending upon the size, compute the lo and hi bounds.
14291 cat >"conftest.$ac_ext" <<_ACEOF
14292 #line 14292 "configure"
14293 #include "confdefs.h"
14294 $ac_includes_default
14295 int
14296 main (void)
14297 {
14298 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14299   ;
14300   return 0;
14301 }
14302 _ACEOF
14303 rm -f "conftest.$ac_objext"
14304 if { (eval echo "$as_me:14304: \"$ac_compile\"") >&5
14305   (eval $ac_compile) 2>&5
14306   ac_status=$?
14307   echo "$as_me:14307: \$? = $ac_status" >&5
14308   (exit "$ac_status"); } &&
14309          { ac_try='test -s "conftest.$ac_objext"'
14310   { (eval echo "$as_me:14310: \"$ac_try\"") >&5
14311   (eval $ac_try) 2>&5
14312   ac_status=$?
14313   echo "$as_me:14313: \$? = $ac_status" >&5
14314   (exit "$ac_status"); }; }; then
14315   ac_lo=0 ac_mid=0
14316   while :; do
14317     cat >"conftest.$ac_ext" <<_ACEOF
14318 #line 14318 "configure"
14319 #include "confdefs.h"
14320 $ac_includes_default
14321 int
14322 main (void)
14323 {
14324 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14325   ;
14326   return 0;
14327 }
14328 _ACEOF
14329 rm -f "conftest.$ac_objext"
14330 if { (eval echo "$as_me:14330: \"$ac_compile\"") >&5
14331   (eval $ac_compile) 2>&5
14332   ac_status=$?
14333   echo "$as_me:14333: \$? = $ac_status" >&5
14334   (exit "$ac_status"); } &&
14335          { ac_try='test -s "conftest.$ac_objext"'
14336   { (eval echo "$as_me:14336: \"$ac_try\"") >&5
14337   (eval $ac_try) 2>&5
14338   ac_status=$?
14339   echo "$as_me:14339: \$? = $ac_status" >&5
14340   (exit "$ac_status"); }; }; then
14341   ac_hi=$ac_mid; break
14342 else
14343   echo "$as_me: failed program was:" >&5
14344 cat "conftest.$ac_ext" >&5
14345 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14346 fi
14347 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14348   done
14349 else
14350   echo "$as_me: failed program was:" >&5
14351 cat "conftest.$ac_ext" >&5
14352 ac_hi=-1 ac_mid=-1
14353   while :; do
14354     cat >"conftest.$ac_ext" <<_ACEOF
14355 #line 14355 "configure"
14356 #include "confdefs.h"
14357 $ac_includes_default
14358 int
14359 main (void)
14360 {
14361 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14362   ;
14363   return 0;
14364 }
14365 _ACEOF
14366 rm -f "conftest.$ac_objext"
14367 if { (eval echo "$as_me:14367: \"$ac_compile\"") >&5
14368   (eval $ac_compile) 2>&5
14369   ac_status=$?
14370   echo "$as_me:14370: \$? = $ac_status" >&5
14371   (exit "$ac_status"); } &&
14372          { ac_try='test -s "conftest.$ac_objext"'
14373   { (eval echo "$as_me:14373: \"$ac_try\"") >&5
14374   (eval $ac_try) 2>&5
14375   ac_status=$?
14376   echo "$as_me:14376: \$? = $ac_status" >&5
14377   (exit "$ac_status"); }; }; then
14378   ac_lo=$ac_mid; break
14379 else
14380   echo "$as_me: failed program was:" >&5
14381 cat "conftest.$ac_ext" >&5
14382 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14383 fi
14384 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14385   done
14386 fi
14387 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14388 # Binary search between lo and hi bounds.
14389 while test "x$ac_lo" != "x$ac_hi"; do
14390   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14391   cat >"conftest.$ac_ext" <<_ACEOF
14392 #line 14392 "configure"
14393 #include "confdefs.h"
14394 $ac_includes_default
14395 int
14396 main (void)
14397 {
14398 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14399   ;
14400   return 0;
14401 }
14402 _ACEOF
14403 rm -f "conftest.$ac_objext"
14404 if { (eval echo "$as_me:14404: \"$ac_compile\"") >&5
14405   (eval $ac_compile) 2>&5
14406   ac_status=$?
14407   echo "$as_me:14407: \$? = $ac_status" >&5
14408   (exit "$ac_status"); } &&
14409          { ac_try='test -s "conftest.$ac_objext"'
14410   { (eval echo "$as_me:14410: \"$ac_try\"") >&5
14411   (eval $ac_try) 2>&5
14412   ac_status=$?
14413   echo "$as_me:14413: \$? = $ac_status" >&5
14414   (exit "$ac_status"); }; }; then
14415   ac_hi=$ac_mid
14416 else
14417   echo "$as_me: failed program was:" >&5
14418 cat "conftest.$ac_ext" >&5
14419 ac_lo=`expr "$ac_mid" + 1`
14420 fi
14421 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14422 done
14423 ac_cv_sizeof_signed_char=$ac_lo
14424 else
14425   if test "$cross_compiling" = yes; then
14426   { { echo "$as_me:14426: error: cannot run test program while cross compiling" >&5
14427 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14428    { (exit 1); exit 1; }; }
14429 else
14430   cat >"conftest.$ac_ext" <<_ACEOF
14431 #line 14431 "configure"
14432 #include "confdefs.h"
14433 $ac_includes_default
14434 int
14435 main (void)
14436 {
14437 FILE *f = fopen ("conftest.val", "w");
14438 if (!f)
14439   $ac_main_return (1);
14440 fprintf (f, "%ld", (long)(sizeof (signed char)));
14441 fclose (f);
14442   ;
14443   return 0;
14444 }
14445 _ACEOF
14446 rm -f "conftest$ac_exeext"
14447 if { (eval echo "$as_me:14447: \"$ac_link\"") >&5
14448   (eval $ac_link) 2>&5
14449   ac_status=$?
14450   echo "$as_me:14450: \$? = $ac_status" >&5
14451   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14452   { (eval echo "$as_me:14452: \"$ac_try\"") >&5
14453   (eval $ac_try) 2>&5
14454   ac_status=$?
14455   echo "$as_me:14455: \$? = $ac_status" >&5
14456   (exit "$ac_status"); }; }; then
14457   ac_cv_sizeof_signed_char=`cat conftest.val`
14458 else
14459   echo "$as_me: program exited with status $ac_status" >&5
14460 echo "$as_me: failed program was:" >&5
14461 cat "conftest.$ac_ext" >&5
14462 fi
14463 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14464 fi
14465 fi
14466 rm -f conftest.val
14467 else
14468   ac_cv_sizeof_signed_char=0
14469 fi
14470 fi
14471 echo "$as_me:14471: result: $ac_cv_sizeof_signed_char" >&5
14472 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14473 cat >>confdefs.h <<EOF
14474 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14475 EOF
14476
14477 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14478         NCURSES_SBOOL="signed char"
14479 else
14480         NCURSES_SBOOL="char"
14481 fi
14482 echo "$as_me:14482: checking if you want to use signed Boolean array in term.h" >&5
14483 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14484
14485 # Check whether --enable-signed-char or --disable-signed-char was given.
14486 if test "${enable_signed_char+set}" = set; then
14487   enableval="$enable_signed_char"
14488   with_signed_char=$enableval
14489 else
14490   with_signed_char=$cf_dft_signed_char
14491 fi;
14492 echo "$as_me:14492: result: $with_signed_char" >&5
14493 echo "${ECHO_T}$with_signed_char" >&6
14494 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14495
14496 ###   use option --with-tparm-arg to override tparm's argument type
14497 echo "$as_me:14497: checking for type of tparm args" >&5
14498 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14499
14500 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14501 if test "${with_tparm_arg+set}" = set; then
14502   withval="$with_tparm_arg"
14503   NCURSES_TPARM_ARG="$withval"
14504 else
14505   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14506 fi;
14507 echo "$as_me:14507: result: $NCURSES_TPARM_ARG" >&5
14508 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14509
14510 ### Enable compiling-in rcs id's
14511 echo "$as_me:14511: checking if RCS identifiers should be compiled-in" >&5
14512 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14513
14514 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14515 if test "${with_rcs_ids+set}" = set; then
14516   withval="$with_rcs_ids"
14517   with_rcs_ids=$withval
14518 else
14519   with_rcs_ids=no
14520 fi;
14521 echo "$as_me:14521: result: $with_rcs_ids" >&5
14522 echo "${ECHO_T}$with_rcs_ids" >&6
14523 test "x$with_rcs_ids" = xyes &&
14524 cat >>confdefs.h <<\EOF
14525 #define USE_RCS_IDS 1
14526 EOF
14527
14528 ###############################################################################
14529
14530 echo "$as_me:14530: checking format of man-pages" >&5
14531 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14532
14533 # Check whether --with-manpage-format or --without-manpage-format was given.
14534 if test "${with_manpage_format+set}" = set; then
14535   withval="$with_manpage_format"
14536   MANPAGE_FORMAT=$withval
14537 else
14538   MANPAGE_FORMAT=unknown
14539 fi;
14540
14541 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14542 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14543
14544 cf_unknown=
14545
14546 case "$MANPAGE_FORMAT" in
14547 (unknown)
14548         if test -z "$MANPATH" ; then
14549                 MANPATH="/usr/man:/usr/share/man"
14550         fi
14551
14552         # look for the 'date' man-page (it is most likely to be installed!)
14553         MANPAGE_FORMAT=
14554         cf_preform="no"
14555         cf_catonly="yes"
14556         cf_example="date"
14557
14558         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14559         for cf_dir in $MANPATH; do
14560                 test -z "$cf_dir" && cf_dir=/usr/man
14561                 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
14562                 do
14563                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14564                         if test "x$cf_test" = "x$cf_name" ; then
14565
14566                                 case "$cf_name" in
14567                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14568                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14569                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14570                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14571                                 esac
14572
14573                                 case "$cf_name" in
14574                                 ($cf_dir/man*)
14575                                         cf_catonly=no
14576                                         ;;
14577                                 ($cf_dir/cat*)
14578                                         cf_preform=yes
14579                                         ;;
14580                                 esac
14581                                 break
14582                         fi
14583
14584                         # if we found a match in either man* or cat*, stop looking
14585                         if test -n "$MANPAGE_FORMAT" ; then
14586                                 cf_found=no
14587                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14588                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14589                                 case "$cf_name" in
14590                                 ($cf_dir/cat*)
14591                                         cf_found=yes
14592                                         ;;
14593                                 esac
14594                                 test "$cf_found" = yes && break
14595                         fi
14596                 done
14597                 # only check the first directory in $MANPATH where we find manpages
14598                 if test -n "$MANPAGE_FORMAT" ; then
14599                         break
14600                 fi
14601         done
14602         # if we did not find the example, just assume it is normal
14603         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14604         IFS="$ac_save_ifs"
14605         ;;
14606 (*)
14607         for cf_option in $MANPAGE_FORMAT; do
14608         case "$cf_option" in
14609         (gzip|compress|BSDI|normal|formatted|catonly)
14610                 ;;
14611         (*)
14612                 cf_unknown="$cf_unknown $cf_option"
14613                 ;;
14614         esac
14615         done
14616         ;;
14617 esac
14618
14619 echo "$as_me:14619: result: $MANPAGE_FORMAT" >&5
14620 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14621 if test -n "$cf_unknown" ; then
14622         { echo "$as_me:14622: WARNING: Unexpected manpage-format $cf_unknown" >&5
14623 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14624 fi
14625
14626 echo "$as_me:14626: checking for manpage renaming" >&5
14627 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14628
14629 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14630 if test "${with_manpage_renames+set}" = set; then
14631   withval="$with_manpage_renames"
14632   MANPAGE_RENAMES=$withval
14633 else
14634   MANPAGE_RENAMES=yes
14635 fi;
14636
14637 case ".$MANPAGE_RENAMES" in
14638 (.no)
14639         ;;
14640 (.|.yes)
14641         # Debian 'man' program?
14642         if test -f /etc/debian_version ; then
14643                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14644         else
14645                 MANPAGE_RENAMES=no
14646         fi
14647         ;;
14648 esac
14649
14650 if test "$MANPAGE_RENAMES" != no ; then
14651         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14652                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14653         elif test ! -f "$MANPAGE_RENAMES" ; then
14654                 { { echo "$as_me:14654: error: not a filename: $MANPAGE_RENAMES" >&5
14655 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14656    { (exit 1); exit 1; }; }
14657         fi
14658
14659         test ! -d man && mkdir man
14660
14661         # Construct a sed-script to perform renaming within man-pages
14662         if test -n "$MANPAGE_RENAMES" ; then
14663                 test ! -d man && mkdir man
14664                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14665         fi
14666 fi
14667
14668 echo "$as_me:14668: result: $MANPAGE_RENAMES" >&5
14669 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14670
14671 echo "$as_me:14671: checking if manpage aliases will be installed" >&5
14672 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14673
14674 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14675 if test "${with_manpage_aliases+set}" = set; then
14676   withval="$with_manpage_aliases"
14677   MANPAGE_ALIASES=$withval
14678 else
14679   MANPAGE_ALIASES=yes
14680 fi;
14681
14682 echo "$as_me:14682: result: $MANPAGE_ALIASES" >&5
14683 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14684
14685 case "x$LN_S" in
14686 (xln*)
14687         cf_use_symlinks=yes
14688         ;;
14689 (*)
14690         cf_use_symlinks=no
14691         ;;
14692 esac
14693
14694 MANPAGE_SYMLINKS=no
14695 if test "$MANPAGE_ALIASES" = yes ; then
14696 echo "$as_me:14696: checking if manpage symlinks should be used" >&5
14697 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14698
14699 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14700 if test "${with_manpage_symlinks+set}" = set; then
14701   withval="$with_manpage_symlinks"
14702   MANPAGE_SYMLINKS=$withval
14703 else
14704   MANPAGE_SYMLINKS=$cf_use_symlinks
14705 fi;
14706
14707 if test "$$cf_use_symlinks" = no; then
14708 if test "$MANPAGE_SYMLINKS" = yes ; then
14709         { echo "$as_me:14709: WARNING: cannot make symlinks" >&5
14710 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14711         MANPAGE_SYMLINKS=no
14712 fi
14713 fi
14714
14715 echo "$as_me:14715: result: $MANPAGE_SYMLINKS" >&5
14716 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14717 fi
14718
14719 echo "$as_me:14719: checking for manpage tbl" >&5
14720 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14721
14722 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14723 if test "${with_manpage_tbl+set}" = set; then
14724   withval="$with_manpage_tbl"
14725   MANPAGE_TBL=$withval
14726 else
14727   MANPAGE_TBL=no
14728 fi;
14729
14730 echo "$as_me:14730: result: $MANPAGE_TBL" >&5
14731 echo "${ECHO_T}$MANPAGE_TBL" >&6
14732
14733 if test "$prefix" = "NONE" ; then
14734         cf_prefix="$ac_default_prefix"
14735 else
14736         cf_prefix="$prefix"
14737 fi
14738
14739 case "$MANPAGE_FORMAT" in
14740 (*catonly*)
14741         cf_format=yes
14742         cf_inboth=no
14743         ;;
14744 (*formatted*)
14745         cf_format=yes
14746         cf_inboth=yes
14747         ;;
14748 (*)
14749         cf_format=no
14750         cf_inboth=no
14751         ;;
14752 esac
14753
14754 test ! -d man && mkdir man
14755
14756 cf_so_strip=
14757 cf_compress=
14758 case "$MANPAGE_FORMAT" in
14759 (*compress*)
14760         cf_so_strip="Z"
14761         cf_compress=compress
14762         ;;
14763 (*gzip*)
14764         cf_so_strip="gz"
14765         cf_compress=gzip
14766         ;;
14767 esac
14768
14769 cf_edit_man=./edit_man.sh
14770 cf_man_alias=`pwd`/man_alias.sed
14771
14772 cat >$cf_edit_man <<CF_EOF
14773 #! $SHELL
14774 # this script is generated by the configure-script CF_MAN_PAGES macro.
14775
14776 prefix="$cf_prefix"
14777 datarootdir="$datarootdir"
14778 datadir="$datadir"
14779
14780 NCURSES_MAJOR="$NCURSES_MAJOR"
14781 NCURSES_MINOR="$NCURSES_MINOR"
14782 NCURSES_PATCH="$NCURSES_PATCH"
14783
14784 NCURSES_OSPEED="$NCURSES_OSPEED"
14785 TERMINFO="$TERMINFO"
14786
14787 INSTALL="$INSTALL"
14788 INSTALL_DATA="$INSTALL_DATA"
14789
14790 transform="$program_transform_name"
14791
14792 TMP=\${TMPDIR:=/tmp}/man\$\$
14793 trap "rm -f \$TMP; exit 1" 1 2 3 15
14794 trap "rm -f \$TMP" 0
14795
14796 form=\$1
14797 shift || exit 1
14798
14799 verb=\$1
14800 shift || exit 1
14801
14802 mandir=\$1
14803 shift || exit 1
14804
14805 srcdir=\$1
14806 top_srcdir=\$srcdir/..
14807 shift || exit 1
14808
14809 if test "\$form" = normal ; then
14810         if test "$cf_format" = yes ; then
14811         if test "$cf_inboth" = no ; then
14812                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14813                 exit $?
14814         fi
14815         fi
14816         cf_subdir=\$mandir/man
14817         cf_tables=$MANPAGE_TBL
14818 else
14819         cf_subdir=\$mandir/cat
14820         cf_tables=yes
14821 fi
14822
14823 # process the list of source-files
14824 for i in "\$@" ; do
14825 case \$i in
14826 (*.orig|*.rej) ;;
14827 (*.[0-9]*)
14828         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14829         if test "\$verb" = installing ; then
14830         if test ! -d "\$cf_subdir\${section}" ; then
14831                 mkdir -p "\$cf_subdir\$section"
14832         fi
14833         fi
14834
14835         # replace variables in man page
14836         if test ! -f "$cf_man_alias" ; then
14837 cat >>$cf_man_alias <<-CF_EOF2
14838                 s,@DATADIR@,\$datadir,g
14839                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14840                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14841                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14842                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14843                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14844                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14845 CF_EOF
14846
14847         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14848         do
14849                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14850                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14851 cat >>$cf_edit_man <<-CF_EOF
14852                 s,@$cf_NAME@,$cf_name,g
14853 CF_EOF
14854         done
14855
14856 cat >>$cf_edit_man <<CF_EOF
14857 CF_EOF2
14858                 echo "...made $cf_man_alias"
14859         fi
14860
14861         aliases=
14862         cf_source=\`basename "\$i"\`
14863         inalias=\$cf_source
14864         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14865         if test ! -f "\$inalias" ; then
14866                 echo ".. skipped \$cf_source"
14867                 continue
14868         fi
14869 CF_EOF
14870
14871 if test "$MANPAGE_ALIASES" != no ; then
14872 cat >>$cf_edit_man <<CF_EOF
14873         nCurses=ignore.3x
14874         test "$with_curses_h" = yes && nCurses=ncurses.3x
14875         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14876 CF_EOF
14877 fi
14878
14879 if test "$MANPAGE_RENAMES" = no ; then
14880 cat >>$cf_edit_man <<CF_EOF
14881         # perform program transformations for section 1 man pages
14882         if test \$section = 1 ; then
14883                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14884         else
14885                 cf_target=\$cf_subdir\${section}/\$cf_source
14886         fi
14887 CF_EOF
14888 else
14889 cat >>$cf_edit_man <<CF_EOF
14890         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14891         if test -z "\$cf_target" ; then
14892                 echo "? missing rename for \$cf_source"
14893                 cf_target="\$cf_source"
14894         fi
14895         cf_target="\$cf_subdir\${section}/\${cf_target}"
14896
14897 CF_EOF
14898 fi
14899
14900 cat >>$cf_edit_man <<CF_EOF
14901         sed     -f "$cf_man_alias" \\
14902 CF_EOF
14903
14904 if test -f "$MANPAGE_RENAMES" ; then
14905 cat >>$cf_edit_man <<CF_EOF
14906                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14907 CF_EOF
14908 else
14909 cat >>$cf_edit_man <<CF_EOF
14910                 < "\$i" >\$TMP
14911 CF_EOF
14912 fi
14913
14914 cat >>$cf_edit_man <<CF_EOF
14915 if test \$cf_tables = yes ; then
14916         tbl \$TMP >\$TMP.out
14917         mv \$TMP.out \$TMP
14918 fi
14919 CF_EOF
14920
14921 if test "$with_overwrite" != yes ; then
14922 cat >>$cf_edit_man <<CF_EOF
14923         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14924         mv \$TMP.out \$TMP
14925 CF_EOF
14926 fi
14927
14928 if test "$with_curses_h" != yes ; then
14929 cat >>$cf_edit_man <<CF_EOF
14930         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14931         mv \$TMP.out \$TMP
14932 CF_EOF
14933 fi
14934
14935 cat >>$cf_edit_man <<CF_EOF
14936         if test "\$form" = format ; then
14937                 nroff -man \$TMP >\$TMP.out
14938                 mv \$TMP.out \$TMP
14939         fi
14940 CF_EOF
14941
14942 if test -n "$cf_compress" ; then
14943 cat >>$cf_edit_man <<CF_EOF
14944         if test "\$verb" = installing ; then
14945         if ( "$cf_compress" -f \$TMP )
14946         then
14947                 mv \$TMP.$cf_so_strip \$TMP
14948         fi
14949         fi
14950         cf_target="\$cf_target.$cf_so_strip"
14951 CF_EOF
14952 fi
14953
14954 case "$MANPAGE_FORMAT" in
14955 (*BSDI*)
14956 cat >>$cf_edit_man <<CF_EOF
14957         if test "\$form" = format ; then
14958                 # BSDI installs only .0 suffixes in the cat directories
14959                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14960         fi
14961 CF_EOF
14962   ;;
14963 esac
14964
14965 cat >>$cf_edit_man <<CF_EOF
14966         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14967         if test "\$verb" = installing ; then
14968                 echo "\$verb \$cf_target"
14969                 \$INSTALL_DATA \$TMP "\$cf_target"
14970                 test -d "\$cf_subdir\${section}" &&
14971                 test -n "\$aliases" && (
14972                         cd "\$cf_subdir\${section}" && (
14973                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14974                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14975                                 cf_target=\`basename "\$cf_target"\`
14976                                 for cf_alias in \$aliases
14977                                 do
14978                                         if test "\$section" = 1 ; then
14979                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14980                                         fi
14981
14982                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14983                                                 if test -f "\$cf_alias\${suffix}" ; then
14984                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14985                                                         then
14986                                                                 continue
14987                                                         fi
14988                                                 fi
14989                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14990 CF_EOF
14991 case "x$LN_S" in
14992 (*-f)
14993 cat >>$cf_edit_man <<CF_EOF
14994                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14995 CF_EOF
14996         ;;
14997 (*)
14998 cat >>$cf_edit_man <<CF_EOF
14999                                                 rm -f "\$cf_alias\${suffix}"
15000                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15001 CF_EOF
15002         ;;
15003 esac
15004 cat >>$cf_edit_man <<CF_EOF
15005                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15006                                                 echo ".so \$cf_source" >\$TMP
15007 CF_EOF
15008 if test -n "$cf_compress" ; then
15009 cat >>$cf_edit_man <<CF_EOF
15010                                                 if test -n "$cf_so_strip" ; then
15011                                                         "$cf_compress" -f \$TMP
15012                                                         mv \$TMP.$cf_so_strip \$TMP
15013                                                 fi
15014 CF_EOF
15015 fi
15016 cat >>$cf_edit_man <<CF_EOF
15017                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15018                                                 rm -f "\$cf_alias\${suffix}"
15019                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15020                                         fi
15021                                 done
15022                         )
15023                 )
15024         elif test "\$verb" = removing ; then
15025                 test -f "\$cf_target" && (
15026                         echo "\$verb \$cf_target"
15027                         rm -f "\$cf_target"
15028                 )
15029                 test -d "\$cf_subdir\${section}" &&
15030                 test -n "\$aliases" && (
15031                         cd "\$cf_subdir\${section}" && (
15032                                 for cf_alias in \$aliases
15033                                 do
15034                                         if test "\$section" = 1 ; then
15035                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15036                                         fi
15037
15038                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15039                                         rm -f "\$cf_alias\${suffix}"
15040                                 done
15041                         )
15042                 )
15043         else
15044 #               echo ".hy 0"
15045                 cat \$TMP
15046         fi
15047         ;;
15048 esac
15049 done
15050
15051 if test "$cf_inboth" = yes ; then
15052 if test "\$form" != format ; then
15053         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15054 fi
15055 fi
15056
15057 exit 0
15058 CF_EOF
15059 chmod 755 "$cf_edit_man"
15060
15061 ###############################################################################
15062
15063 ### Note that some functions (such as const) are normally disabled anyway.
15064 echo "$as_me:15064: checking if you want to build with function extensions" >&5
15065 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15066
15067 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15068 if test "${enable_ext_funcs+set}" = set; then
15069   enableval="$enable_ext_funcs"
15070   with_ext_funcs=$enableval
15071 else
15072   with_ext_funcs=yes
15073 fi;
15074 echo "$as_me:15074: result: $with_ext_funcs" >&5
15075 echo "${ECHO_T}$with_ext_funcs" >&6
15076 if test "x$with_ext_funcs" = xyes ; then
15077         NCURSES_EXT_FUNCS=1
15078
15079 cat >>confdefs.h <<\EOF
15080 #define NCURSES_EXT_FUNCS 1
15081 EOF
15082
15083 cat >>confdefs.h <<\EOF
15084 #define HAVE_ASSUME_DEFAULT_COLORS 1
15085 EOF
15086
15087 cat >>confdefs.h <<\EOF
15088 #define HAVE_CURSES_VERSION 1
15089 EOF
15090
15091 cat >>confdefs.h <<\EOF
15092 #define HAVE_HAS_KEY 1
15093 EOF
15094
15095 cat >>confdefs.h <<\EOF
15096 #define HAVE_RESIZETERM 1
15097 EOF
15098
15099 cat >>confdefs.h <<\EOF
15100 #define HAVE_RESIZE_TERM 1
15101 EOF
15102
15103 cat >>confdefs.h <<\EOF
15104 #define HAVE_TERM_ENTRY_H 1
15105 EOF
15106
15107 cat >>confdefs.h <<\EOF
15108 #define HAVE_USE_DEFAULT_COLORS 1
15109 EOF
15110
15111 cat >>confdefs.h <<\EOF
15112 #define HAVE_USE_EXTENDED_NAMES 1
15113 EOF
15114
15115 cat >>confdefs.h <<\EOF
15116 #define HAVE_USE_SCREEN 1
15117 EOF
15118
15119 cat >>confdefs.h <<\EOF
15120 #define HAVE_USE_WINDOW 1
15121 EOF
15122
15123 cat >>confdefs.h <<\EOF
15124 #define HAVE_WRESIZE 1
15125 EOF
15126
15127         GENERATED_EXT_FUNCS=generated
15128         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15129 else
15130         NCURSES_EXT_FUNCS=0
15131         GENERATED_EXT_FUNCS=
15132 fi
15133
15134 echo "$as_me:15134: checking if you want to build with SCREEN extensions" >&5
15135 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15136
15137 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15138 if test "${enable_sp_funcs+set}" = set; then
15139   enableval="$enable_sp_funcs"
15140   with_sp_funcs=$enableval
15141 else
15142   with_sp_funcs=$cf_dft_ext_spfuncs
15143 fi;
15144 echo "$as_me:15144: result: $with_sp_funcs" >&5
15145 echo "${ECHO_T}$with_sp_funcs" >&6
15146 if test "x$with_sp_funcs" = xyes ; then
15147         NCURSES_SP_FUNCS=1
15148
15149 cat >>confdefs.h <<\EOF
15150 #define NCURSES_SP_FUNCS 1
15151 EOF
15152
15153 cat >>confdefs.h <<\EOF
15154 #define HAVE_TPUTS_SP 1
15155 EOF
15156
15157         GENERATED_SP_FUNCS=generated
15158 else
15159         NCURSES_SP_FUNCS=0
15160         GENERATED_SP_FUNCS=
15161 fi
15162
15163 echo "$as_me:15163: checking if you want to build with terminal-driver" >&5
15164 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15165
15166 # Check whether --enable-term-driver or --disable-term-driver was given.
15167 if test "${enable_term_driver+set}" = set; then
15168   enableval="$enable_term_driver"
15169   with_term_driver=$enableval
15170 else
15171   with_term_driver=no
15172 fi;
15173 echo "$as_me:15173: result: $with_term_driver" >&5
15174 echo "${ECHO_T}$with_term_driver" >&6
15175 if test "x$with_term_driver" = xyes ; then
15176
15177 cat >>confdefs.h <<\EOF
15178 #define USE_TERM_DRIVER 1
15179 EOF
15180
15181         if test "x$with_termlib" != xno ; then
15182                 { { echo "$as_me:15182: error: The term-driver option conflicts with the termlib option" >&5
15183 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15184    { (exit 1); exit 1; }; }
15185         fi
15186         if test "x$with_sp_funcs" != xyes ; then
15187                 { { echo "$as_me:15187: error: The term-driver option relies upon sp-funcs" >&5
15188 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15189    { (exit 1); exit 1; }; }
15190         fi
15191 fi
15192
15193 ###   use option --enable-const to turn on use of const beyond that in XSI.
15194 echo "$as_me:15194: checking for extended use of const keyword" >&5
15195 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15196
15197 # Check whether --enable-const or --disable-const was given.
15198 if test "${enable_const+set}" = set; then
15199   enableval="$enable_const"
15200   with_ext_const=$enableval
15201 else
15202   with_ext_const=$cf_dft_ext_const
15203 fi;
15204 echo "$as_me:15204: result: $with_ext_const" >&5
15205 echo "${ECHO_T}$with_ext_const" >&6
15206 NCURSES_CONST='/*nothing*/'
15207 if test "x$with_ext_const" = xyes ; then
15208         NCURSES_CONST=const
15209 fi
15210
15211 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15212 echo "$as_me:15212: checking if you want to use extended colors" >&5
15213 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15214
15215 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15216 if test "${enable_ext_colors+set}" = set; then
15217   enableval="$enable_ext_colors"
15218   with_ext_colors=$enableval
15219 else
15220   with_ext_colors=$cf_dft_ext_colors
15221 fi;
15222 echo "$as_me:15222: result: $with_ext_colors" >&5
15223 echo "${ECHO_T}$with_ext_colors" >&6
15224 NCURSES_EXT_COLORS=0
15225 if test "x$with_ext_colors" = xyes ; then
15226         if test "x$with_widec" != xyes ; then
15227                 { echo "$as_me:15227: WARNING: This option applies only to wide-character library" >&5
15228 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15229         else
15230                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15231
15232 if test "${with_abi_version+set}" != set; then
15233         case "$cf_cv_rel_version" in
15234         (5.*)
15235                 cf_cv_rel_version=6.0
15236                 cf_cv_abi_version=6
15237                 { echo "$as_me:15237: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15238 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15239                 ;;
15240         esac
15241 fi
15242
15243                 NCURSES_EXT_COLORS=1
15244
15245 cat >>confdefs.h <<\EOF
15246 #define NCURSES_EXT_COLORS 1
15247 EOF
15248
15249 cat >>confdefs.h <<\EOF
15250 #define HAVE_ALLOC_PAIR 1
15251 EOF
15252
15253 cat >>confdefs.h <<\EOF
15254 #define HAVE_INIT_EXTENDED_COLOR 1
15255 EOF
15256
15257 cat >>confdefs.h <<\EOF
15258 #define HAVE_RESET_COLOR_PAIRS 1
15259 EOF
15260
15261         fi
15262 fi
15263
15264 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15265 echo "$as_me:15265: checking if you want to use extended mouse encoding" >&5
15266 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15267
15268 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15269 if test "${enable_ext_mouse+set}" = set; then
15270   enableval="$enable_ext_mouse"
15271   with_ext_mouse=$enableval
15272 else
15273   with_ext_mouse=$cf_dft_ext_mouse
15274 fi;
15275 echo "$as_me:15275: result: $with_ext_mouse" >&5
15276 echo "${ECHO_T}$with_ext_mouse" >&6
15277 if test "x$with_ext_mouse" = xyes ; then
15278
15279 if test "${with_abi_version+set}" != set; then
15280         case "$cf_cv_rel_version" in
15281         (5.*)
15282                 cf_cv_rel_version=6.0
15283                 cf_cv_abi_version=6
15284                 { echo "$as_me:15284: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15285 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15286                 ;;
15287         esac
15288 fi
15289
15290 fi
15291
15292 case $cf_cv_abi_version in
15293 (5)
15294         NCURSES_MOUSE_VERSION=1
15295         ;;
15296 (6)
15297         NCURSES_MOUSE_VERSION=2
15298         ;;
15299 (789)
15300         NCURSES_MOUSE_VERSION=3
15301         ;;
15302 esac
15303
15304 ###   use option --enable-ext-putwin to turn on extended screendumps
15305 echo "$as_me:15305: checking if you want to use extended putwin/screendump" >&5
15306 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15307
15308 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15309 if test "${enable_ext_putwin+set}" = set; then
15310   enableval="$enable_ext_putwin"
15311   with_ext_putwin=$enableval
15312 else
15313   with_ext_putwin=$cf_dft_ext_putwin
15314 fi;
15315 echo "$as_me:15315: result: $with_ext_putwin" >&5
15316 echo "${ECHO_T}$with_ext_putwin" >&6
15317 if test "x$with_ext_putwin" = xyes ; then
15318
15319 cat >>confdefs.h <<\EOF
15320 #define NCURSES_EXT_PUTWIN 1
15321 EOF
15322
15323 fi
15324
15325 echo "$as_me:15325: checking if you want \$NCURSES_NO_PADDING code" >&5
15326 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15327
15328 # Check whether --enable-no-padding or --disable-no-padding was given.
15329 if test "${enable_no_padding+set}" = set; then
15330   enableval="$enable_no_padding"
15331   with_no_padding=$enableval
15332 else
15333   with_no_padding=$with_ext_funcs
15334 fi;
15335 echo "$as_me:15335: result: $with_no_padding" >&5
15336 echo "${ECHO_T}$with_no_padding" >&6
15337 test "x$with_no_padding" = xyes &&
15338 cat >>confdefs.h <<\EOF
15339 #define NCURSES_NO_PADDING 1
15340 EOF
15341
15342 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15343 echo "$as_me:15343: checking if you want SIGWINCH handler" >&5
15344 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15345
15346 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15347 if test "${enable_sigwinch+set}" = set; then
15348   enableval="$enable_sigwinch"
15349   with_sigwinch=$enableval
15350 else
15351   with_sigwinch=$with_ext_funcs
15352 fi;
15353 echo "$as_me:15353: result: $with_sigwinch" >&5
15354 echo "${ECHO_T}$with_sigwinch" >&6
15355 test "x$with_sigwinch" = xyes &&
15356 cat >>confdefs.h <<\EOF
15357 #define USE_SIGWINCH 1
15358 EOF
15359
15360 ###   use option --enable-tcap-names to allow user to define new capabilities
15361 echo "$as_me:15361: checking if you want user-definable terminal capabilities like termcap" >&5
15362 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15363
15364 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15365 if test "${enable_tcap_names+set}" = set; then
15366   enableval="$enable_tcap_names"
15367   with_tcap_names=$enableval
15368 else
15369   with_tcap_names=$with_ext_funcs
15370 fi;
15371 echo "$as_me:15371: result: $with_tcap_names" >&5
15372 echo "${ECHO_T}$with_tcap_names" >&6
15373 NCURSES_XNAMES=0
15374 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15375
15376 ##############################################################################
15377
15378 echo "$as_me:15378: checking if you want to link with the pthread library" >&5
15379 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15380
15381 # Check whether --with-pthread or --without-pthread was given.
15382 if test "${with_pthread+set}" = set; then
15383   withval="$with_pthread"
15384   with_pthread=$withval
15385 else
15386   with_pthread=no
15387 fi;
15388 echo "$as_me:15388: result: $with_pthread" >&5
15389 echo "${ECHO_T}$with_pthread" >&6
15390
15391 if test "$with_pthread" != no ; then
15392         echo "$as_me:15392: checking for pthread.h" >&5
15393 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15394 if test "${ac_cv_header_pthread_h+set}" = set; then
15395   echo $ECHO_N "(cached) $ECHO_C" >&6
15396 else
15397   cat >"conftest.$ac_ext" <<_ACEOF
15398 #line 15398 "configure"
15399 #include "confdefs.h"
15400 #include <pthread.h>
15401 _ACEOF
15402 if { (eval echo "$as_me:15402: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15403   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15404   ac_status=$?
15405   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15406   rm -f conftest.er1
15407   cat conftest.err >&5
15408   echo "$as_me:15408: \$? = $ac_status" >&5
15409   (exit "$ac_status"); } >/dev/null; then
15410   if test -s conftest.err; then
15411     ac_cpp_err=$ac_c_preproc_warn_flag
15412   else
15413     ac_cpp_err=
15414   fi
15415 else
15416   ac_cpp_err=yes
15417 fi
15418 if test -z "$ac_cpp_err"; then
15419   ac_cv_header_pthread_h=yes
15420 else
15421   echo "$as_me: failed program was:" >&5
15422   cat "conftest.$ac_ext" >&5
15423   ac_cv_header_pthread_h=no
15424 fi
15425 rm -f conftest.err "conftest.$ac_ext"
15426 fi
15427 echo "$as_me:15427: result: $ac_cv_header_pthread_h" >&5
15428 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15429 if test "$ac_cv_header_pthread_h" = yes; then
15430
15431 cat >>confdefs.h <<\EOF
15432 #define HAVE_PTHREADS_H 1
15433 EOF
15434
15435         for cf_lib_pthread in pthread c_r
15436         do
15437             echo "$as_me:15437: checking if we can link with the $cf_lib_pthread library" >&5
15438 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15439             cf_save_LIBS="$LIBS"
15440
15441 cf_add_libs="$LIBS"
15442 # reverse order
15443 cf_add_0lib=
15444 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15445 # filter duplicates
15446 for cf_add_1lib in $cf_add_0lib; do
15447         for cf_add_2lib in $cf_add_libs; do
15448                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15449                         cf_add_1lib=
15450                         break
15451                 fi
15452         done
15453         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15454 done
15455 LIBS="$cf_add_libs"
15456
15457             cat >"conftest.$ac_ext" <<_ACEOF
15458 #line 15458 "configure"
15459 #include "confdefs.h"
15460
15461 #include <pthread.h>
15462
15463 int
15464 main (void)
15465 {
15466
15467                 int rc = pthread_create(0,0,0,0);
15468                 int r2 = pthread_mutexattr_settype(0, 0);
15469
15470   ;
15471   return 0;
15472 }
15473 _ACEOF
15474 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15475 if { (eval echo "$as_me:15475: \"$ac_link\"") >&5
15476   (eval $ac_link) 2>&5
15477   ac_status=$?
15478   echo "$as_me:15478: \$? = $ac_status" >&5
15479   (exit "$ac_status"); } &&
15480          { ac_try='test -s "conftest$ac_exeext"'
15481   { (eval echo "$as_me:15481: \"$ac_try\"") >&5
15482   (eval $ac_try) 2>&5
15483   ac_status=$?
15484   echo "$as_me:15484: \$? = $ac_status" >&5
15485   (exit "$ac_status"); }; }; then
15486   with_pthread=yes
15487 else
15488   echo "$as_me: failed program was:" >&5
15489 cat "conftest.$ac_ext" >&5
15490 with_pthread=no
15491 fi
15492 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15493             LIBS="$cf_save_LIBS"
15494             echo "$as_me:15494: result: $with_pthread" >&5
15495 echo "${ECHO_T}$with_pthread" >&6
15496             test "$with_pthread" = yes && break
15497         done
15498
15499         if test "$with_pthread" = yes ; then
15500
15501 cf_add_libs="$LIBS"
15502 # reverse order
15503 cf_add_0lib=
15504 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15505 # filter duplicates
15506 for cf_add_1lib in $cf_add_0lib; do
15507         for cf_add_2lib in $cf_add_libs; do
15508                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15509                         cf_add_1lib=
15510                         break
15511                 fi
15512         done
15513         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15514 done
15515 LIBS="$cf_add_libs"
15516
15517 cat >>confdefs.h <<\EOF
15518 #define HAVE_LIBPTHREADS 1
15519 EOF
15520
15521         else
15522             { { echo "$as_me:15522: error: Cannot link with pthread library" >&5
15523 echo "$as_me: error: Cannot link with pthread library" >&2;}
15524    { (exit 1); exit 1; }; }
15525         fi
15526
15527 fi
15528
15529 fi
15530
15531 if test "x$with_pthread" != xno; then
15532         echo "$as_me:15532: checking for pthread_kill" >&5
15533 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15534 if test "${ac_cv_func_pthread_kill+set}" = set; then
15535   echo $ECHO_N "(cached) $ECHO_C" >&6
15536 else
15537   cat >"conftest.$ac_ext" <<_ACEOF
15538 #line 15538 "configure"
15539 #include "confdefs.h"
15540 #define pthread_kill autoconf_temporary
15541 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15542 #undef pthread_kill
15543
15544 #ifdef __cplusplus
15545 extern "C"
15546 #endif
15547
15548 /* We use char because int might match the return type of a gcc2
15549    builtin and then its argument prototype would still apply.  */
15550 char pthread_kill (void);
15551
15552 int
15553 main (void)
15554 {
15555
15556 /* The GNU C library defines stubs for functions which it implements
15557     to always fail with ENOSYS.  Some functions are actually named
15558     something starting with __ and the normal name is an alias.  */
15559 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15560 #error found stub for pthread_kill
15561 #endif
15562
15563         return pthread_kill ();
15564   ;
15565   return 0;
15566 }
15567 _ACEOF
15568 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15569 if { (eval echo "$as_me:15569: \"$ac_link\"") >&5
15570   (eval $ac_link) 2>&5
15571   ac_status=$?
15572   echo "$as_me:15572: \$? = $ac_status" >&5
15573   (exit "$ac_status"); } &&
15574          { ac_try='test -s "conftest$ac_exeext"'
15575   { (eval echo "$as_me:15575: \"$ac_try\"") >&5
15576   (eval $ac_try) 2>&5
15577   ac_status=$?
15578   echo "$as_me:15578: \$? = $ac_status" >&5
15579   (exit "$ac_status"); }; }; then
15580   ac_cv_func_pthread_kill=yes
15581 else
15582   echo "$as_me: failed program was:" >&5
15583 cat "conftest.$ac_ext" >&5
15584 ac_cv_func_pthread_kill=no
15585 fi
15586 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15587 fi
15588 echo "$as_me:15588: result: $ac_cv_func_pthread_kill" >&5
15589 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15590 if test "$ac_cv_func_pthread_kill" = yes; then
15591
15592                 echo "$as_me:15592: checking if you want to allow EINTR in wgetch with pthreads" >&5
15593 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15594
15595 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15596 if test "${enable_pthreads_eintr+set}" = set; then
15597   enableval="$enable_pthreads_eintr"
15598   use_pthreads_eintr=$enableval
15599 else
15600   use_pthreads_eintr=no
15601 fi;
15602                 echo "$as_me:15602: result: $use_pthreads_eintr" >&5
15603 echo "${ECHO_T}$use_pthreads_eintr" >&6
15604                 if test "x$use_pthreads_eintr" = xyes ; then
15605
15606 cat >>confdefs.h <<\EOF
15607 #define USE_PTHREADS_EINTR 1
15608 EOF
15609
15610                 fi
15611 fi
15612
15613         echo "$as_me:15613: checking if you want to use weak-symbols for pthreads" >&5
15614 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15615
15616 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15617 if test "${enable_weak_symbols+set}" = set; then
15618   enableval="$enable_weak_symbols"
15619   use_weak_symbols=$enableval
15620 else
15621   use_weak_symbols=no
15622 fi;
15623         echo "$as_me:15623: result: $use_weak_symbols" >&5
15624 echo "${ECHO_T}$use_weak_symbols" >&6
15625         if test "x$use_weak_symbols" = xyes ; then
15626
15627 echo "$as_me:15627: checking if $CC supports weak symbols" >&5
15628 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15629 if test "${cf_cv_weak_symbols+set}" = set; then
15630   echo $ECHO_N "(cached) $ECHO_C" >&6
15631 else
15632
15633 cat >"conftest.$ac_ext" <<_ACEOF
15634 #line 15634 "configure"
15635 #include "confdefs.h"
15636
15637 #include <stdio.h>
15638 int
15639 main (void)
15640 {
15641
15642 #if defined(__GNUC__)
15643 #  if defined __USE_ISOC99
15644 #    define _cat_pragma(exp)    _Pragma(#exp)
15645 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15646 #  else
15647 #    define _weak_pragma(exp)
15648 #  endif
15649 #  define _declare(name)        __extension__ extern __typeof__(name) name
15650 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15651 #endif
15652
15653 weak_symbol(fopen);
15654
15655   ;
15656   return 0;
15657 }
15658 _ACEOF
15659 rm -f "conftest.$ac_objext"
15660 if { (eval echo "$as_me:15660: \"$ac_compile\"") >&5
15661   (eval $ac_compile) 2>&5
15662   ac_status=$?
15663   echo "$as_me:15663: \$? = $ac_status" >&5
15664   (exit "$ac_status"); } &&
15665          { ac_try='test -s "conftest.$ac_objext"'
15666   { (eval echo "$as_me:15666: \"$ac_try\"") >&5
15667   (eval $ac_try) 2>&5
15668   ac_status=$?
15669   echo "$as_me:15669: \$? = $ac_status" >&5
15670   (exit "$ac_status"); }; }; then
15671   cf_cv_weak_symbols=yes
15672 else
15673   echo "$as_me: failed program was:" >&5
15674 cat "conftest.$ac_ext" >&5
15675 cf_cv_weak_symbols=no
15676 fi
15677 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15678
15679 fi
15680 echo "$as_me:15680: result: $cf_cv_weak_symbols" >&5
15681 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15682
15683         else
15684                 cf_cv_weak_symbols=no
15685         fi
15686
15687         if test "x$cf_cv_weak_symbols" = xyes ; then
15688
15689 cat >>confdefs.h <<\EOF
15690 #define USE_WEAK_SYMBOLS 1
15691 EOF
15692
15693         fi
15694 fi
15695
15696 PTHREAD=
15697 if test "x$with_pthread" = "xyes" ; then
15698
15699 cat >>confdefs.h <<\EOF
15700 #define USE_PTHREADS 1
15701 EOF
15702
15703         enable_reentrant=yes
15704         if test "x$cf_cv_weak_symbols" = xyes ; then
15705                 PTHREAD=-lpthread
15706
15707 cf_add_libs="$PRIVATE_LIBS"
15708 # reverse order
15709 cf_add_0lib=
15710 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15711 # filter duplicates
15712 for cf_add_1lib in $cf_add_0lib; do
15713         for cf_add_2lib in $cf_add_libs; do
15714                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15715                         cf_add_1lib=
15716                         break
15717                 fi
15718         done
15719         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15720 done
15721 PRIVATE_LIBS="$cf_add_libs"
15722
15723         fi
15724 fi
15725
15726 # Reentrant code has to be opaque; there's little advantage to making ncurses
15727 # opaque outside of that, so there is no --enable-opaque option.  We can use
15728 # this option without --with-pthreads, but this will be always set for
15729 # pthreads.
15730 echo "$as_me:15730: checking if you want reentrant code" >&5
15731 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15732
15733 # Check whether --enable-reentrant or --disable-reentrant was given.
15734 if test "${enable_reentrant+set}" = set; then
15735   enableval="$enable_reentrant"
15736   with_reentrant=$enableval
15737 else
15738   with_reentrant=no
15739 fi;
15740 echo "$as_me:15740: result: $with_reentrant" >&5
15741 echo "${ECHO_T}$with_reentrant" >&6
15742 if test "x$with_reentrant" = xyes ; then
15743         cf_cv_enable_reentrant=1
15744         cf_cv_enable_opaque="NCURSES_INTERNALS"
15745         NCURSES_SIZE_T=int
15746         if test "x$cf_cv_weak_symbols" = xyes ; then
15747
15748 # remove pthread library from $LIBS
15749 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15750
15751 cf_add_libs="$TEST_LIBS"
15752 # reverse order
15753 cf_add_0lib=
15754 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15755 # filter duplicates
15756 for cf_add_1lib in $cf_add_0lib; do
15757         for cf_add_2lib in $cf_add_libs; do
15758                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15759                         cf_add_1lib=
15760                         break
15761                 fi
15762         done
15763         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15764 done
15765 TEST_LIBS="$cf_add_libs"
15766
15767 cf_add_libs="$TEST_LIBS2"
15768 # reverse order
15769 cf_add_0lib=
15770 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15771 # filter duplicates
15772 for cf_add_1lib in $cf_add_0lib; do
15773         for cf_add_2lib in $cf_add_libs; do
15774                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15775                         cf_add_1lib=
15776                         break
15777                 fi
15778         done
15779         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15780 done
15781 TEST_LIBS2="$cf_add_libs"
15782
15783 cf_add_libs="$PRIVATE_LIBS"
15784 # reverse order
15785 cf_add_0lib=
15786 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15787 # filter duplicates
15788 for cf_add_1lib in $cf_add_0lib; do
15789         for cf_add_2lib in $cf_add_libs; do
15790                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15791                         cf_add_1lib=
15792                         break
15793                 fi
15794         done
15795         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15796 done
15797 PRIVATE_LIBS="$cf_add_libs"
15798
15799         else
15800                 # when not using weak symbols but with_reentrant,
15801                 # add 't' to the library suffix on all platforms
15802                 # except cygwin, where we only do that if ALSO
15803                 # compiling with full thread support.
15804                 case "$host" in
15805                 (*cygwin* | *msys*)
15806                         if test "$with_pthread" = "yes" ; then
15807                                 if test "x$disable_lib_suffixes" = "xno" ; then
15808                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15809                                 fi
15810                         fi ;;
15811                 (*)
15812                         if test "x$disable_lib_suffixes" = "xno" ; then
15813                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15814                         fi
15815                         ;;
15816                 esac
15817         fi
15818
15819 cat >>confdefs.h <<\EOF
15820 #define USE_REENTRANT 1
15821 EOF
15822
15823 if test "${with_abi_version+set}" != set; then
15824         case "$cf_cv_rel_version" in
15825         (5.*)
15826                 cf_cv_rel_version=6.0
15827                 cf_cv_abi_version=6
15828                 { echo "$as_me:15828: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15829 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15830                 ;;
15831         esac
15832 fi
15833
15834 else
15835         cf_cv_enable_reentrant=0
15836         cf_cv_enable_opaque="NCURSES_OPAQUE"
15837         NCURSES_SIZE_T=$cf_dft_ordinate_type
15838 fi
15839
15840 echo "$as_me:15840: checking if you want opaque curses-library structures" >&5
15841 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15842
15843 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15844 if test "${enable_opaque_curses+set}" = set; then
15845   enableval="$enable_opaque_curses"
15846   test "$enableval" != yes && enableval=no
15847         if test "$enableval" != "no" ; then
15848     enable_opaque_curses=yes
15849         else
15850
15851          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15852          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
15853
15854         fi
15855 else
15856   enableval=no
15857
15858          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15859          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
15860
15861 fi;
15862 echo "$as_me:15862: result: $enable_opaque_curses" >&5
15863 echo "${ECHO_T}$enable_opaque_curses" >&6
15864
15865 test "$cf_cv_enable_reentrant" = 1 && \
15866 test "$enable_opaque_curses" = no && \
15867 { { echo "$as_me:15867: error: reentrant configuration requires opaque library" >&5
15868 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15869    { (exit 1); exit 1; }; }
15870
15871 echo "$as_me:15871: checking if you want opaque form-library structures" >&5
15872 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15873
15874 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15875 if test "${enable_opaque_form+set}" = set; then
15876   enableval="$enable_opaque_form"
15877   enable_opaque_form=yes
15878 else
15879   enable_opaque_form=no
15880 fi;
15881 echo "$as_me:15881: result: $enable_opaque_form" >&5
15882 echo "${ECHO_T}$enable_opaque_form" >&6
15883
15884 echo "$as_me:15884: checking if you want opaque menu-library structures" >&5
15885 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15886
15887 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15888 if test "${enable_opaque_menu+set}" = set; then
15889   enableval="$enable_opaque_menu"
15890   enable_opaque_menu=yes
15891 else
15892   enable_opaque_menu=no
15893 fi;
15894 echo "$as_me:15894: result: $enable_opaque_menu" >&5
15895 echo "${ECHO_T}$enable_opaque_menu" >&6
15896
15897 echo "$as_me:15897: checking if you want opaque panel-library structures" >&5
15898 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15899
15900 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15901 if test "${enable_opaque_panel+set}" = set; then
15902   enableval="$enable_opaque_panel"
15903   enable_opaque_panel=yes
15904 else
15905   enable_opaque_panel=no
15906 fi;
15907 echo "$as_me:15907: result: $enable_opaque_panel" >&5
15908 echo "${ECHO_T}$enable_opaque_panel" >&6
15909
15910 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15911 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15912 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15913 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15914
15915 ### Allow using a different wrap-prefix
15916 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15917         echo "$as_me:15917: checking for prefix used to wrap public variables" >&5
15918 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15919
15920 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15921 if test "${with_wrap_prefix+set}" = set; then
15922   withval="$with_wrap_prefix"
15923   NCURSES_WRAP_PREFIX=$withval
15924 else
15925   NCURSES_WRAP_PREFIX=_nc_
15926 fi;
15927         echo "$as_me:15927: result: $NCURSES_WRAP_PREFIX" >&5
15928 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15929 else
15930         NCURSES_WRAP_PREFIX=_nc_
15931 fi
15932
15933 cat >>confdefs.h <<EOF
15934 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15935 EOF
15936
15937 ###############################################################################
15938 # These options are relatively safe to experiment with.
15939
15940 echo "$as_me:15940: checking if you want all development code" >&5
15941 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15942
15943 # Check whether --with-develop or --without-develop was given.
15944 if test "${with_develop+set}" = set; then
15945   withval="$with_develop"
15946   with_develop=$withval
15947 else
15948   with_develop=no
15949 fi;
15950 echo "$as_me:15950: result: $with_develop" >&5
15951 echo "${ECHO_T}$with_develop" >&6
15952
15953 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15954 echo "$as_me:15954: checking if you want hard-tabs code" >&5
15955 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15956
15957 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15958 if test "${enable_hard_tabs+set}" = set; then
15959   enableval="$enable_hard_tabs"
15960
15961 else
15962   enable_hard_tabs=$with_develop
15963 fi;
15964 echo "$as_me:15964: result: $enable_hard_tabs" >&5
15965 echo "${ECHO_T}$enable_hard_tabs" >&6
15966 test "x$enable_hard_tabs" = xyes &&
15967 cat >>confdefs.h <<\EOF
15968 #define USE_HARD_TABS 1
15969 EOF
15970
15971 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15972 echo "$as_me:15972: checking if you want limited support for xmc" >&5
15973 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15974
15975 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15976 if test "${enable_xmc_glitch+set}" = set; then
15977   enableval="$enable_xmc_glitch"
15978
15979 else
15980   enable_xmc_glitch=$with_develop
15981 fi;
15982 echo "$as_me:15982: result: $enable_xmc_glitch" >&5
15983 echo "${ECHO_T}$enable_xmc_glitch" >&6
15984 test "x$enable_xmc_glitch" = xyes &&
15985 cat >>confdefs.h <<\EOF
15986 #define USE_XMC_SUPPORT 1
15987 EOF
15988
15989 ###############################################################################
15990 # These are just experimental, probably should not be in a package:
15991
15992 echo "$as_me:15992: checking if you do not want to assume colors are white-on-black" >&5
15993 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15994
15995 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15996 if test "${enable_assumed_color+set}" = set; then
15997   enableval="$enable_assumed_color"
15998   with_assumed_color=$enableval
15999 else
16000   with_assumed_color=yes
16001 fi;
16002 echo "$as_me:16002: result: $with_assumed_color" >&5
16003 echo "${ECHO_T}$with_assumed_color" >&6
16004 test "x$with_assumed_color" = xyes &&
16005 cat >>confdefs.h <<\EOF
16006 #define USE_ASSUMED_COLOR 1
16007 EOF
16008
16009 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16010 echo "$as_me:16010: checking if you want hashmap scrolling-optimization code" >&5
16011 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16012
16013 # Check whether --enable-hashmap or --disable-hashmap was given.
16014 if test "${enable_hashmap+set}" = set; then
16015   enableval="$enable_hashmap"
16016   with_hashmap=$enableval
16017 else
16018   with_hashmap=yes
16019 fi;
16020 echo "$as_me:16020: result: $with_hashmap" >&5
16021 echo "${ECHO_T}$with_hashmap" >&6
16022 test "x$with_hashmap" = xyes &&
16023 cat >>confdefs.h <<\EOF
16024 #define USE_HASHMAP 1
16025 EOF
16026
16027 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16028 echo "$as_me:16028: checking if you want colorfgbg code" >&5
16029 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16030
16031 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16032 if test "${enable_colorfgbg+set}" = set; then
16033   enableval="$enable_colorfgbg"
16034   with_colorfgbg=$enableval
16035 else
16036   with_colorfgbg=no
16037 fi;
16038 echo "$as_me:16038: result: $with_colorfgbg" >&5
16039 echo "${ECHO_T}$with_colorfgbg" >&6
16040 test "x$with_colorfgbg" = xyes &&
16041 cat >>confdefs.h <<\EOF
16042 #define USE_COLORFGBG 1
16043 EOF
16044
16045 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16046 echo "$as_me:16046: checking if you want to use gcc -fvisibility option" >&5
16047 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16048
16049 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16050 if test "${enable_fvisibility+set}" = set; then
16051   enableval="$enable_fvisibility"
16052   cf_with_fvisibility=$enableval
16053 else
16054   cf_with_fvisibility=no
16055 fi;
16056 echo "$as_me:16056: result: $cf_with_fvisibility" >&5
16057 echo "${ECHO_T}$cf_with_fvisibility" >&6
16058
16059 NCURSES_IMPEXP=
16060 NCURSES_CXX_IMPEXP=
16061 if test "x$cf_with_fvisibility" = xyes; then
16062
16063 echo "$as_me:16063: checking if $CC -fvisibility=hidden option works" >&5
16064 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16065 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16066   echo $ECHO_N "(cached) $ECHO_C" >&6
16067 else
16068
16069     cf_save_cflags="$CFLAGS"
16070     CFLAGS="$CFLAGS -fvisibility=hidden"
16071     cat >"conftest.$ac_ext" <<_ACEOF
16072 #line 16072 "configure"
16073 #include "confdefs.h"
16074
16075 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16076
16077 int
16078 main (void)
16079 {
16080
16081         if (somefunc()) return 1;
16082
16083   ;
16084   return 0;
16085 }
16086 _ACEOF
16087 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16088 if { (eval echo "$as_me:16088: \"$ac_link\"") >&5
16089   (eval $ac_link) 2>&5
16090   ac_status=$?
16091   echo "$as_me:16091: \$? = $ac_status" >&5
16092   (exit "$ac_status"); } &&
16093          { ac_try='test -s "conftest$ac_exeext"'
16094   { (eval echo "$as_me:16094: \"$ac_try\"") >&5
16095   (eval $ac_try) 2>&5
16096   ac_status=$?
16097   echo "$as_me:16097: \$? = $ac_status" >&5
16098   (exit "$ac_status"); }; }; then
16099   cf_cv_fvisibility_hidden=yes
16100 else
16101   echo "$as_me: failed program was:" >&5
16102 cat "conftest.$ac_ext" >&5
16103 cf_cv_fvisibility_hidden=no
16104 fi
16105 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16106     CFLAGS=$cf_save_cflags
16107
16108 fi
16109 echo "$as_me:16109: result: $cf_cv_fvisibility_hidden" >&5
16110 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16111
16112         if test "x$cf_cv_fvisibility_hidden" = xyes
16113         then
16114
16115 cf_fix_cppflags=no
16116 cf_new_cflags=
16117 cf_new_cppflags=
16118 cf_new_extra_cppflags=
16119
16120 for cf_add_cflags in -fvisibility=hidden
16121 do
16122 case "$cf_fix_cppflags" in
16123 (no)
16124         case "$cf_add_cflags" in
16125         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16126                 case "$cf_add_cflags" in
16127                 (-D*)
16128                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16129
16130                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16131                                 && test -z "${cf_tst_cflags}" \
16132                                 && cf_fix_cppflags=yes
16133
16134                         if test "$cf_fix_cppflags" = yes ; then
16135
16136         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16137         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16138
16139                                 continue
16140                         elif test "${cf_tst_cflags}" = "\"'" ; then
16141
16142         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16143         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16144
16145                                 continue
16146                         fi
16147                         ;;
16148                 esac
16149                 case "$CPPFLAGS" in
16150                 (*$cf_add_cflags)
16151                         ;;
16152                 (*)
16153                         case "$cf_add_cflags" in
16154                         (-D*)
16155                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16156
16157 CPPFLAGS=`echo "$CPPFLAGS" | \
16158         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16159                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16160
16161                                 ;;
16162                         esac
16163
16164         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16165         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16166
16167                         ;;
16168                 esac
16169                 ;;
16170         (*)
16171
16172         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16173         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16174
16175                 ;;
16176         esac
16177         ;;
16178 (yes)
16179
16180         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16181         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16182
16183         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16184
16185         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16186                 && test -z "${cf_tst_cflags}" \
16187                 && cf_fix_cppflags=no
16188         ;;
16189 esac
16190 done
16191
16192 if test -n "$cf_new_cflags" ; then
16193
16194         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16195         CFLAGS="${CFLAGS}$cf_new_cflags"
16196
16197 fi
16198
16199 if test -n "$cf_new_cppflags" ; then
16200
16201         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16202         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16203
16204 fi
16205
16206 if test -n "$cf_new_extra_cppflags" ; then
16207
16208         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16209         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16210
16211 fi
16212
16213                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16214         fi
16215         if test -n "$CXX"
16216         then
16217                 ac_ext=cc
16218 ac_cpp='$CXXCPP $CPPFLAGS'
16219 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16220 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16221 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16222 ac_main_return="return"
16223
16224 echo "$as_me:16224: checking if $CXX -fvisibility=hidden option works" >&5
16225 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16226 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16227   echo $ECHO_N "(cached) $ECHO_C" >&6
16228 else
16229
16230     cf_save_cflags="$CXXFLAGS"
16231     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16232     cat >"conftest.$ac_ext" <<_ACEOF
16233 #line 16233 "configure"
16234 #include "confdefs.h"
16235
16236 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16237
16238 int
16239 main (void)
16240 {
16241
16242         if (somefunc()) return 1;
16243
16244   ;
16245   return 0;
16246 }
16247 _ACEOF
16248 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16249 if { (eval echo "$as_me:16249: \"$ac_link\"") >&5
16250   (eval $ac_link) 2>&5
16251   ac_status=$?
16252   echo "$as_me:16252: \$? = $ac_status" >&5
16253   (exit "$ac_status"); } &&
16254          { ac_try='test -s "conftest$ac_exeext"'
16255   { (eval echo "$as_me:16255: \"$ac_try\"") >&5
16256   (eval $ac_try) 2>&5
16257   ac_status=$?
16258   echo "$as_me:16258: \$? = $ac_status" >&5
16259   (exit "$ac_status"); }; }; then
16260   cf_cv_fvisibility_hidden2=yes
16261 else
16262   echo "$as_me: failed program was:" >&5
16263 cat "conftest.$ac_ext" >&5
16264 cf_cv_fvisibility_hidden2=no
16265 fi
16266 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16267     CXXFLAGS=$cf_save_cflags
16268
16269 fi
16270 echo "$as_me:16270: result: $cf_cv_fvisibility_hidden2" >&5
16271 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16272
16273                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16274                 then
16275
16276 cf_save_CXXFLAGS="$CFLAGS"
16277 CFLAGS="$CXXFLAGS"
16278
16279 cf_fix_cppflags=no
16280 cf_new_cflags=
16281 cf_new_cppflags=
16282 cf_new_extra_cppflags=
16283
16284 for cf_add_cflags in -fvisibility=hidden
16285 do
16286 case "$cf_fix_cppflags" in
16287 (no)
16288         case "$cf_add_cflags" in
16289         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16290                 case "$cf_add_cflags" in
16291                 (-D*)
16292                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16293
16294                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16295                                 && test -z "${cf_tst_cflags}" \
16296                                 && cf_fix_cppflags=yes
16297
16298                         if test "$cf_fix_cppflags" = yes ; then
16299
16300         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16301         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16302
16303                                 continue
16304                         elif test "${cf_tst_cflags}" = "\"'" ; then
16305
16306         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16307         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16308
16309                                 continue
16310                         fi
16311                         ;;
16312                 esac
16313                 case "$CPPFLAGS" in
16314                 (*$cf_add_cflags)
16315                         ;;
16316                 (*)
16317                         case "$cf_add_cflags" in
16318                         (-D*)
16319                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16320
16321 CPPFLAGS=`echo "$CPPFLAGS" | \
16322         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16323                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16324
16325                                 ;;
16326                         esac
16327
16328         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16329         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16330
16331                         ;;
16332                 esac
16333                 ;;
16334         (*)
16335
16336         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16337         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16338
16339                 ;;
16340         esac
16341         ;;
16342 (yes)
16343
16344         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16345         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16346
16347         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16348
16349         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16350                 && test -z "${cf_tst_cflags}" \
16351                 && cf_fix_cppflags=no
16352         ;;
16353 esac
16354 done
16355
16356 if test -n "$cf_new_cflags" ; then
16357
16358         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16359         CFLAGS="${CFLAGS}$cf_new_cflags"
16360
16361 fi
16362
16363 if test -n "$cf_new_cppflags" ; then
16364
16365         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16366         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16367
16368 fi
16369
16370 if test -n "$cf_new_extra_cppflags" ; then
16371
16372         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16373         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16374
16375 fi
16376
16377 CXXFLAGS="$CFLAGS"
16378 CFLAGS="$cf_save_CXXFLAGS"
16379
16380                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16381                 fi
16382                 ac_ext=c
16383 ac_cpp='$CPP $CPPFLAGS'
16384 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16385 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16386 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16387 ac_main_return="return"
16388
16389         fi
16390 fi
16391
16392 ###   use option --enable-interop to turn on use of bindings used for interop
16393 echo "$as_me:16393: checking if you want interop bindings" >&5
16394 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16395
16396 # Check whether --enable-interop or --disable-interop was given.
16397 if test "${enable_interop+set}" = set; then
16398   enableval="$enable_interop"
16399   with_exp_interop=$enableval
16400 else
16401   with_exp_interop=$cf_dft_interop
16402 fi;
16403 echo "$as_me:16403: result: $with_exp_interop" >&5
16404 echo "${ECHO_T}$with_exp_interop" >&6
16405
16406 NCURSES_INTEROP_FUNCS=0
16407 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16408
16409 echo "$as_me:16409: checking if you want experimental safe-sprintf code" >&5
16410 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16411
16412 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16413 if test "${enable_safe_sprintf+set}" = set; then
16414   enableval="$enable_safe_sprintf"
16415   with_safe_sprintf=$enableval
16416 else
16417   with_safe_sprintf=no
16418 fi;
16419 echo "$as_me:16419: result: $with_safe_sprintf" >&5
16420 echo "${ECHO_T}$with_safe_sprintf" >&6
16421
16422 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16423 # when hashmap is used scroll hints are useless
16424 if test "$with_hashmap" = no ; then
16425 echo "$as_me:16425: checking if you want to experiment without scrolling-hints code" >&5
16426 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16427
16428 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16429 if test "${enable_scroll_hints+set}" = set; then
16430   enableval="$enable_scroll_hints"
16431   with_scroll_hints=$enableval
16432 else
16433   with_scroll_hints=yes
16434 fi;
16435 echo "$as_me:16435: result: $with_scroll_hints" >&5
16436 echo "${ECHO_T}$with_scroll_hints" >&6
16437 test "x$with_scroll_hints" = xyes &&
16438 cat >>confdefs.h <<\EOF
16439 #define USE_SCROLL_HINTS 1
16440 EOF
16441
16442 fi
16443
16444 echo "$as_me:16444: checking if you want wgetch-events code" >&5
16445 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16446
16447 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16448 if test "${enable_wgetch_events+set}" = set; then
16449   enableval="$enable_wgetch_events"
16450   with_wgetch_events=$enableval
16451 else
16452   with_wgetch_events=no
16453 fi;
16454 echo "$as_me:16454: result: $with_wgetch_events" >&5
16455 echo "${ECHO_T}$with_wgetch_events" >&6
16456 if test "x$with_wgetch_events" = xyes ; then
16457
16458 cat >>confdefs.h <<\EOF
16459 #define NCURSES_WGETCH_EVENTS 1
16460 EOF
16461
16462         NCURSES_WGETCH_EVENTS=1
16463 else
16464         NCURSES_WGETCH_EVENTS=0
16465 fi
16466
16467 case "$cf_cv_system_name" in
16468 (*mingw32*|*mingw64*|*-msvc*)
16469         echo "$as_me:16469: checking if you want experimental-Windows driver" >&5
16470 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16471
16472 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16473 if test "${enable_exp_win32+set}" = set; then
16474   enableval="$enable_exp_win32"
16475   with_exp_win32=$enableval
16476 else
16477   with_exp_win32=no
16478 fi;
16479         echo "$as_me:16479: result: $with_exp_win32" >&5
16480 echo "${ECHO_T}$with_exp_win32" >&6
16481         if test "x$with_exp_win32" = xyes
16482         then
16483
16484 cat >>confdefs.h <<\EOF
16485 #define EXP_WIN32_DRIVER 1
16486 EOF
16487
16488                 EXP_WIN32_DRIVER=1
16489                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16490         else
16491                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16492                 EXP_WIN32_DRIVER=0
16493         fi
16494         ;;
16495 (*)
16496         EXP_WIN32_DRIVER=0
16497         INTERNALS_HDR=
16498         ;;
16499 esac
16500
16501 ###############################################################################
16502
16503 ###     use option --disable-echo to suppress full display compiling commands
16504
16505 echo "$as_me:16505: checking if you want to see long compiling messages" >&5
16506 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16507
16508 # Check whether --enable-echo or --disable-echo was given.
16509 if test "${enable_echo+set}" = set; then
16510   enableval="$enable_echo"
16511   test "$enableval" != no && enableval=yes
16512         if test "$enableval" != "yes" ; then
16513
16514         ECHO_LT='--silent'
16515         ECHO_LD='@echo linking $@;'
16516         RULE_CC='@echo compiling $<'
16517         SHOW_CC='@echo compiling $@'
16518         ECHO_CC='@'
16519
16520         else
16521
16522         ECHO_LT=''
16523         ECHO_LD=''
16524         RULE_CC=''
16525         SHOW_CC=''
16526         ECHO_CC=''
16527
16528         fi
16529 else
16530   enableval=yes
16531
16532         ECHO_LT=''
16533         ECHO_LD=''
16534         RULE_CC=''
16535         SHOW_CC=''
16536         ECHO_CC=''
16537
16538 fi;
16539 echo "$as_me:16539: result: $enableval" >&5
16540 echo "${ECHO_T}$enableval" >&6
16541
16542 if test "x$enable_echo" = xyes; then
16543         ECHO_LINK=
16544 else
16545         ECHO_LINK='@ echo linking $@ ... ;'
16546         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16547         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16548 fi
16549
16550 # --disable-stripping is used for debugging
16551
16552 echo "$as_me:16552: checking if you want to install stripped executables" >&5
16553 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16554
16555 # Check whether --enable-stripping or --disable-stripping was given.
16556 if test "${enable_stripping+set}" = set; then
16557   enableval="$enable_stripping"
16558   test "$enableval" != no && enableval=yes
16559         if test "$enableval" != "yes" ; then
16560     enable_stripping=no
16561         else
16562                 enable_stripping=yes
16563         fi
16564 else
16565   enableval=yes
16566         enable_stripping=yes
16567
16568 fi;
16569 echo "$as_me:16569: result: $enable_stripping" >&5
16570 echo "${ECHO_T}$enable_stripping" >&6
16571
16572 if test "$enable_stripping" = yes
16573 then
16574         INSTALL_OPT_S="-s"
16575 else
16576         INSTALL_OPT_S=
16577 fi
16578
16579 : "${INSTALL:=install}"
16580 echo "$as_me:16580: checking if install accepts -p option" >&5
16581 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16582 if test "${cf_cv_install_p+set}" = set; then
16583   echo $ECHO_N "(cached) $ECHO_C" >&6
16584 else
16585
16586         rm -rf ./conftest*
16587         date >conftest.in
16588         mkdir conftest.out
16589         sleep 3
16590         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16591         then
16592                 if test -f conftest.out/conftest.in
16593                 then
16594                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16595                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16596                         if test -s conftest.err
16597                         then
16598                                 cf_cv_install_p=no
16599                         else
16600                                 cf_cv_install_p=yes
16601                         fi
16602                 else
16603                         cf_cv_install_p=no
16604                 fi
16605         else
16606                 cf_cv_install_p=no
16607         fi
16608         rm -rf ./conftest*
16609
16610 fi
16611 echo "$as_me:16611: result: $cf_cv_install_p" >&5
16612 echo "${ECHO_T}$cf_cv_install_p" >&6
16613
16614 echo "$as_me:16614: checking if install needs to be told about ownership" >&5
16615 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16616 case `$ac_config_guess` in
16617 (*minix)
16618         with_install_o=yes
16619         ;;
16620 (*)
16621         with_install_o=no
16622         ;;
16623 esac
16624
16625 echo "$as_me:16625: result: $with_install_o" >&5
16626 echo "${ECHO_T}$with_install_o" >&6
16627 if test "x$with_install_o" = xyes
16628 then
16629         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'`"
16630 else
16631         INSTALL_OPT_O=
16632 fi
16633
16634 # If we're avoiding relinking of shared libraries during install, that is to
16635 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16636 # the install program has "-p" (for preserving timestamps).
16637 cf_cv_do_reranlib=yes
16638 if test "x$cf_cv_install_p" = xyes
16639 then
16640         if test "x$cf_cv_do_relink" != xyes
16641         then
16642                 cf_cv_do_reranlib=no
16643                 INSTALL_OPT_P="-p"
16644                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16645         fi
16646 fi
16647
16648 ###     use option --enable-warnings to turn on all gcc warnings
16649
16650 echo "$as_me:16650: checking if you want to use C11 _Noreturn feature" >&5
16651 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16652
16653 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16654 if test "${enable_stdnoreturn+set}" = set; then
16655   enableval="$enable_stdnoreturn"
16656   test "$enableval" != yes && enableval=no
16657         if test "$enableval" != "no" ; then
16658     enable_stdnoreturn=yes
16659         else
16660                 enable_stdnoreturn=no
16661         fi
16662 else
16663   enableval=no
16664         enable_stdnoreturn=no
16665
16666 fi;
16667 echo "$as_me:16667: result: $enable_stdnoreturn" >&5
16668 echo "${ECHO_T}$enable_stdnoreturn" >&6
16669
16670 if test $enable_stdnoreturn = yes; then
16671 echo "$as_me:16671: checking for C11 _Noreturn feature" >&5
16672 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16673 if test "${cf_cv_c11_noreturn+set}" = set; then
16674   echo $ECHO_N "(cached) $ECHO_C" >&6
16675 else
16676   cat >"conftest.$ac_ext" <<_ACEOF
16677 #line 16677 "configure"
16678 #include "confdefs.h"
16679
16680 #include <stdio.h>
16681 #include <stdlib.h>
16682 #include <stdnoreturn.h>
16683 static _Noreturn void giveup(void) { exit(0); }
16684
16685 int
16686 main (void)
16687 {
16688 if (feof(stdin)) giveup()
16689   ;
16690   return 0;
16691 }
16692 _ACEOF
16693 rm -f "conftest.$ac_objext"
16694 if { (eval echo "$as_me:16694: \"$ac_compile\"") >&5
16695   (eval $ac_compile) 2>&5
16696   ac_status=$?
16697   echo "$as_me:16697: \$? = $ac_status" >&5
16698   (exit "$ac_status"); } &&
16699          { ac_try='test -s "conftest.$ac_objext"'
16700   { (eval echo "$as_me:16700: \"$ac_try\"") >&5
16701   (eval $ac_try) 2>&5
16702   ac_status=$?
16703   echo "$as_me:16703: \$? = $ac_status" >&5
16704   (exit "$ac_status"); }; }; then
16705   cf_cv_c11_noreturn=yes
16706 else
16707   echo "$as_me: failed program was:" >&5
16708 cat "conftest.$ac_ext" >&5
16709 cf_cv_c11_noreturn=no
16710 fi
16711 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16712
16713 fi
16714 echo "$as_me:16714: result: $cf_cv_c11_noreturn" >&5
16715 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16716 else
16717         cf_cv_c11_noreturn=no,
16718 fi
16719
16720 if test "$cf_cv_c11_noreturn" = yes; then
16721
16722 cat >>confdefs.h <<\EOF
16723 #define HAVE_STDNORETURN_H 1
16724 EOF
16725
16726 cat >>confdefs.h <<EOF
16727 #define STDC_NORETURN _Noreturn
16728 EOF
16729
16730         HAVE_STDNORETURN_H=1
16731 else
16732         HAVE_STDNORETURN_H=0
16733 fi
16734
16735 if test "$GCC" = yes || test "$GXX" = yes
16736 then
16737
16738 if test "$GCC" = yes || test "$GXX" = yes
16739 then
16740         case $CFLAGS in
16741         (*-Werror=*)
16742                 cf_temp_flags=
16743                 for cf_temp_scan in $CFLAGS
16744                 do
16745                         case "x$cf_temp_scan" in
16746                         (x-Werror=format*)
16747
16748         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16749         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16750
16751                                 ;;
16752                         (x-Werror=*)
16753
16754         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16755         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16756
16757                                 ;;
16758                         (*)
16759
16760         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16761         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16762
16763                                 ;;
16764                         esac
16765                 done
16766                 if test "x$CFLAGS" != "x$cf_temp_flags"
16767                 then
16768                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16769
16770 echo "${as_me:-configure}:16770: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16771
16772                         CFLAGS="$cf_temp_flags"
16773                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16774
16775 echo "${as_me:-configure}:16775: testing ... fixed $CFLAGS ..." 1>&5
16776
16777                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16778
16779 echo "${as_me:-configure}:16779: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16780
16781                 fi
16782                 ;;
16783         esac
16784 fi
16785
16786 if test "$GCC" = yes || test "$GXX" = yes
16787 then
16788         case $CPPFLAGS in
16789         (*-Werror=*)
16790                 cf_temp_flags=
16791                 for cf_temp_scan in $CPPFLAGS
16792                 do
16793                         case "x$cf_temp_scan" in
16794                         (x-Werror=format*)
16795
16796         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16797         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16798
16799                                 ;;
16800                         (x-Werror=*)
16801
16802         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16803         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16804
16805                                 ;;
16806                         (*)
16807
16808         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16809         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16810
16811                                 ;;
16812                         esac
16813                 done
16814                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
16815                 then
16816                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16817
16818 echo "${as_me:-configure}:16818: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16819
16820                         CPPFLAGS="$cf_temp_flags"
16821                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16822
16823 echo "${as_me:-configure}:16823: testing ... fixed $CPPFLAGS ..." 1>&5
16824
16825                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16826
16827 echo "${as_me:-configure}:16827: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16828
16829                 fi
16830                 ;;
16831         esac
16832 fi
16833
16834 if test "$GCC" = yes || test "$GXX" = yes
16835 then
16836         case $LDFLAGS in
16837         (*-Werror=*)
16838                 cf_temp_flags=
16839                 for cf_temp_scan in $LDFLAGS
16840                 do
16841                         case "x$cf_temp_scan" in
16842                         (x-Werror=format*)
16843
16844         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16845         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16846
16847                                 ;;
16848                         (x-Werror=*)
16849
16850         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16851         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16852
16853                                 ;;
16854                         (*)
16855
16856         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16857         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16858
16859                                 ;;
16860                         esac
16861                 done
16862                 if test "x$LDFLAGS" != "x$cf_temp_flags"
16863                 then
16864                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16865
16866 echo "${as_me:-configure}:16866: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16867
16868                         LDFLAGS="$cf_temp_flags"
16869                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16870
16871 echo "${as_me:-configure}:16871: testing ... fixed $LDFLAGS ..." 1>&5
16872
16873                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16874
16875 echo "${as_me:-configure}:16875: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16876
16877                 fi
16878                 ;;
16879         esac
16880 fi
16881
16882 echo "$as_me:16882: checking if you want to turn on gcc warnings" >&5
16883 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16884
16885 # Check whether --enable-warnings or --disable-warnings was given.
16886 if test "${enable_warnings+set}" = set; then
16887   enableval="$enable_warnings"
16888   test "$enableval" != yes && enableval=no
16889         if test "$enableval" != "no" ; then
16890     enable_warnings=yes
16891         else
16892                 enable_warnings=no
16893         fi
16894 else
16895   enableval=no
16896         enable_warnings=no
16897
16898 fi;
16899 echo "$as_me:16899: result: $enable_warnings" >&5
16900 echo "${ECHO_T}$enable_warnings" >&6
16901 if test "$enable_warnings" = "yes"
16902 then
16903
16904 if test "x$have_x" = xyes; then
16905
16906 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16907 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16908 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16909 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16910 for cf_X_CFLAGS in $X_CFLAGS
16911 do
16912         case "x$cf_X_CFLAGS" in
16913         x-[IUD]*)
16914                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16915                 ;;
16916         *)
16917                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16918                 ;;
16919         esac
16920 done
16921
16922 cat >"conftest.$ac_ext" <<_ACEOF
16923 #line 16923 "configure"
16924 #include "confdefs.h"
16925
16926 #include <stdlib.h>
16927 #include <X11/Intrinsic.h>
16928
16929 int
16930 main (void)
16931 {
16932 String foo = malloc(1); free((void*)foo)
16933   ;
16934   return 0;
16935 }
16936 _ACEOF
16937 rm -f "conftest.$ac_objext"
16938 if { (eval echo "$as_me:16938: \"$ac_compile\"") >&5
16939   (eval $ac_compile) 2>&5
16940   ac_status=$?
16941   echo "$as_me:16941: \$? = $ac_status" >&5
16942   (exit "$ac_status"); } &&
16943          { ac_try='test -s "conftest.$ac_objext"'
16944   { (eval echo "$as_me:16944: \"$ac_try\"") >&5
16945   (eval $ac_try) 2>&5
16946   ac_status=$?
16947   echo "$as_me:16947: \$? = $ac_status" >&5
16948   (exit "$ac_status"); }; }; then
16949
16950 echo "$as_me:16950: checking for X11/Xt const-feature" >&5
16951 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16952 if test "${cf_cv_const_x_string+set}" = set; then
16953   echo $ECHO_N "(cached) $ECHO_C" >&6
16954 else
16955
16956         cat >"conftest.$ac_ext" <<_ACEOF
16957 #line 16957 "configure"
16958 #include "confdefs.h"
16959
16960 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16961 #undef  XTSTRINGDEFINES /* X11R5 and later */
16962 #include <stdlib.h>
16963 #include <X11/Intrinsic.h>
16964
16965 int
16966 main (void)
16967 {
16968 String foo = malloc(1); *foo = 0
16969   ;
16970   return 0;
16971 }
16972 _ACEOF
16973 rm -f "conftest.$ac_objext"
16974 if { (eval echo "$as_me:16974: \"$ac_compile\"") >&5
16975   (eval $ac_compile) 2>&5
16976   ac_status=$?
16977   echo "$as_me:16977: \$? = $ac_status" >&5
16978   (exit "$ac_status"); } &&
16979          { ac_try='test -s "conftest.$ac_objext"'
16980   { (eval echo "$as_me:16980: \"$ac_try\"") >&5
16981   (eval $ac_try) 2>&5
16982   ac_status=$?
16983   echo "$as_me:16983: \$? = $ac_status" >&5
16984   (exit "$ac_status"); }; }; then
16985
16986                         cf_cv_const_x_string=no
16987
16988 else
16989   echo "$as_me: failed program was:" >&5
16990 cat "conftest.$ac_ext" >&5
16991
16992                         cf_cv_const_x_string=yes
16993
16994 fi
16995 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16996
16997 fi
16998 echo "$as_me:16998: result: $cf_cv_const_x_string" >&5
16999 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17000
17001 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17002 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17003 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17004
17005 case "$cf_cv_const_x_string" in
17006 (no)
17007
17008         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17009         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17010
17011         ;;
17012 (*)
17013
17014         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17015         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17016
17017         ;;
17018 esac
17019
17020 else
17021   echo "$as_me: failed program was:" >&5
17022 cat "conftest.$ac_ext" >&5
17023 fi
17024 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17025  fi
17026 cat > "conftest.$ac_ext" <<EOF
17027 #line 17027 "${as_me:-configure}"
17028 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17029 EOF
17030 if test "$INTEL_COMPILER" = yes
17031 then
17032 # The "-wdXXX" options suppress warnings:
17033 # remark #1419: external declaration in primary source file
17034 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17035 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17036 # remark #193: zero used for undefined preprocessing identifier
17037 # remark #593: variable "curs_sb_left_arrow" was set but never used
17038 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17039 # remark #869: parameter "tw" was never referenced
17040 # remark #981: operands are evaluated in unspecified order
17041 # warning #279: controlling expression is constant
17042
17043         { echo "$as_me:17043: checking for $CC warning options..." >&5
17044 echo "$as_me: checking for $CC warning options..." >&6;}
17045         cf_save_CFLAGS="$CFLAGS"
17046         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17047         for cf_opt in \
17048                 wd1419 \
17049                 wd1683 \
17050                 wd1684 \
17051                 wd193 \
17052                 wd593 \
17053                 wd279 \
17054                 wd810 \
17055                 wd869 \
17056                 wd981
17057         do
17058                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17059                 if { (eval echo "$as_me:17059: \"$ac_compile\"") >&5
17060   (eval $ac_compile) 2>&5
17061   ac_status=$?
17062   echo "$as_me:17062: \$? = $ac_status" >&5
17063   (exit "$ac_status"); }; then
17064                         test -n "$verbose" && echo "$as_me:17064: result: ... -$cf_opt" >&5
17065 echo "${ECHO_T}... -$cf_opt" >&6
17066                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17067                 fi
17068         done
17069         CFLAGS="$cf_save_CFLAGS"
17070 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17071 then
17072         { echo "$as_me:17072: checking for $CC warning options..." >&5
17073 echo "$as_me: checking for $CC warning options..." >&6;}
17074         cf_save_CFLAGS="$CFLAGS"
17075         cf_warn_CONST=""
17076         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17077         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17078         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17079         for cf_opt in W Wall \
17080                 Wbad-function-cast \
17081                 Wcast-align \
17082                 Wcast-qual \
17083                 Wdeclaration-after-statement \
17084                 Wextra \
17085                 Winline \
17086                 Wmissing-declarations \
17087                 Wmissing-prototypes \
17088                 Wnested-externs \
17089                 Wpointer-arith \
17090                 Wshadow \
17091                 Wstrict-prototypes \
17092                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17093         do
17094                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17095                 if { (eval echo "$as_me:17095: \"$ac_compile\"") >&5
17096   (eval $ac_compile) 2>&5
17097   ac_status=$?
17098   echo "$as_me:17098: \$? = $ac_status" >&5
17099   (exit "$ac_status"); }; then
17100                         test -n "$verbose" && echo "$as_me:17100: result: ... -$cf_opt" >&5
17101 echo "${ECHO_T}... -$cf_opt" >&6
17102                         case "$cf_opt" in
17103                         (Winline)
17104                                 case "$GCC_VERSION" in
17105                                 ([34].*)
17106                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17107
17108 echo "${as_me:-configure}:17108: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17109
17110                                         continue;;
17111                                 esac
17112                                 ;;
17113                         (Wpointer-arith)
17114                                 case "$GCC_VERSION" in
17115                                 ([12].*)
17116                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17117
17118 echo "${as_me:-configure}:17118: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17119
17120                                         continue;;
17121                                 esac
17122                                 ;;
17123                         esac
17124                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17125                 fi
17126         done
17127         CFLAGS="$cf_save_CFLAGS"
17128 fi
17129 rm -rf ./conftest*
17130
17131 fi
17132
17133 if test "$GCC" = yes || test "$GXX" = yes
17134 then
17135 cat > conftest.i <<EOF
17136 #ifndef GCC_PRINTF
17137 #define GCC_PRINTF 0
17138 #endif
17139 #ifndef GCC_SCANF
17140 #define GCC_SCANF 0
17141 #endif
17142 #ifndef GCC_NORETURN
17143 #define GCC_NORETURN /* nothing */
17144 #endif
17145 #ifndef GCC_UNUSED
17146 #define GCC_UNUSED /* nothing */
17147 #endif
17148 EOF
17149 if test "$GCC" = yes
17150 then
17151         { echo "$as_me:17151: checking for $CC __attribute__ directives..." >&5
17152 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17153 cat > "conftest.$ac_ext" <<EOF
17154 #line 17154 "${as_me:-configure}"
17155 #include "confdefs.h"
17156 #include "conftest.h"
17157 #include "conftest.i"
17158 #if     GCC_PRINTF
17159 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17160 #else
17161 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17162 #endif
17163 #if     GCC_SCANF
17164 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17165 #else
17166 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17167 #endif
17168 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17169 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17170 extern GCC_NORETURN void foo(void);
17171 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17172 EOF
17173         cf_printf_attribute=no
17174         cf_scanf_attribute=no
17175         for cf_attribute in scanf printf unused noreturn
17176         do
17177
17178 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17179
17180                 cf_directive="__attribute__(($cf_attribute))"
17181                 echo "checking for $CC $cf_directive" 1>&5
17182
17183                 case "$cf_attribute" in
17184                 (printf)
17185                         cf_printf_attribute=yes
17186                         cat >conftest.h <<EOF
17187 #define GCC_$cf_ATTRIBUTE 1
17188 EOF
17189                         ;;
17190                 (scanf)
17191                         cf_scanf_attribute=yes
17192                         cat >conftest.h <<EOF
17193 #define GCC_$cf_ATTRIBUTE 1
17194 EOF
17195                         ;;
17196                 (*)
17197                         cat >conftest.h <<EOF
17198 #define GCC_$cf_ATTRIBUTE $cf_directive
17199 EOF
17200                         ;;
17201                 esac
17202
17203                 if { (eval echo "$as_me:17203: \"$ac_compile\"") >&5
17204   (eval $ac_compile) 2>&5
17205   ac_status=$?
17206   echo "$as_me:17206: \$? = $ac_status" >&5
17207   (exit "$ac_status"); }; then
17208                         test -n "$verbose" && echo "$as_me:17208: result: ... $cf_attribute" >&5
17209 echo "${ECHO_T}... $cf_attribute" >&6
17210                         cat conftest.h >>confdefs.h
17211                         case "$cf_attribute" in
17212                         (noreturn)
17213
17214 cat >>confdefs.h <<EOF
17215 #define GCC_NORETURN $cf_directive
17216 EOF
17217
17218                                 ;;
17219                         (printf)
17220                                 cf_value='/* nothing */'
17221                                 if test "$cf_printf_attribute" != no ; then
17222                                         cf_value='__attribute__((format(printf,fmt,var)))'
17223
17224 cat >>confdefs.h <<\EOF
17225 #define GCC_PRINTF 1
17226 EOF
17227
17228                                 fi
17229
17230 cat >>confdefs.h <<EOF
17231 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17232 EOF
17233
17234                                 ;;
17235                         (scanf)
17236                                 cf_value='/* nothing */'
17237                                 if test "$cf_scanf_attribute" != no ; then
17238                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17239
17240 cat >>confdefs.h <<\EOF
17241 #define GCC_SCANF 1
17242 EOF
17243
17244                                 fi
17245
17246 cat >>confdefs.h <<EOF
17247 #define GCC_SCANFLIKE(fmt,var) $cf_value
17248 EOF
17249
17250                                 ;;
17251                         (unused)
17252
17253 cat >>confdefs.h <<EOF
17254 #define GCC_UNUSED $cf_directive
17255 EOF
17256
17257                                 ;;
17258                         esac
17259                 fi
17260         done
17261 else
17262         ${FGREP-fgrep} define conftest.i >>confdefs.h
17263 fi
17264 rm -rf ./conftest*
17265 fi
17266
17267 fi
17268
17269 if test "x$enable_warnings" = "xyes"; then
17270
17271         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17272
17273         if test "x$cf_with_cxx" = xyes ; then
17274
17275 INTEL_CPLUSPLUS=no
17276
17277 if test "$GCC" = yes ; then
17278         case "$host_os" in
17279         (linux*|gnu*)
17280                 echo "$as_me:17280: checking if this is really Intel C++ compiler" >&5
17281 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17282                 cf_save_CFLAGS="$CXXFLAGS"
17283                 CXXFLAGS="$CXXFLAGS -no-gcc"
17284                 cat >"conftest.$ac_ext" <<_ACEOF
17285 #line 17285 "configure"
17286 #include "confdefs.h"
17287
17288 int
17289 main (void)
17290 {
17291
17292 #ifdef __INTEL_COMPILER
17293 #else
17294 make an error
17295 #endif
17296
17297   ;
17298   return 0;
17299 }
17300 _ACEOF
17301 rm -f "conftest.$ac_objext"
17302 if { (eval echo "$as_me:17302: \"$ac_compile\"") >&5
17303   (eval $ac_compile) 2>&5
17304   ac_status=$?
17305   echo "$as_me:17305: \$? = $ac_status" >&5
17306   (exit "$ac_status"); } &&
17307          { ac_try='test -s "conftest.$ac_objext"'
17308   { (eval echo "$as_me:17308: \"$ac_try\"") >&5
17309   (eval $ac_try) 2>&5
17310   ac_status=$?
17311   echo "$as_me:17311: \$? = $ac_status" >&5
17312   (exit "$ac_status"); }; }; then
17313   INTEL_CPLUSPLUS=yes
17314 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17315
17316 else
17317   echo "$as_me: failed program was:" >&5
17318 cat "conftest.$ac_ext" >&5
17319 fi
17320 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17321                 CXXFLAGS="$cf_save_CFLAGS"
17322                 echo "$as_me:17322: result: $INTEL_CPLUSPLUS" >&5
17323 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17324                 ;;
17325         esac
17326 fi
17327
17328 CLANG_CPLUSPLUS=no
17329
17330 if test "$GCC" = yes ; then
17331         echo "$as_me:17331: checking if this is really Clang C++ compiler" >&5
17332 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17333         cf_save_CFLAGS="$CXXFLAGS"
17334         cat >"conftest.$ac_ext" <<_ACEOF
17335 #line 17335 "configure"
17336 #include "confdefs.h"
17337
17338 int
17339 main (void)
17340 {
17341
17342 #ifdef __clang__
17343 #else
17344 make an error
17345 #endif
17346
17347   ;
17348   return 0;
17349 }
17350 _ACEOF
17351 rm -f "conftest.$ac_objext"
17352 if { (eval echo "$as_me:17352: \"$ac_compile\"") >&5
17353   (eval $ac_compile) 2>&5
17354   ac_status=$?
17355   echo "$as_me:17355: \$? = $ac_status" >&5
17356   (exit "$ac_status"); } &&
17357          { ac_try='test -s "conftest.$ac_objext"'
17358   { (eval echo "$as_me:17358: \"$ac_try\"") >&5
17359   (eval $ac_try) 2>&5
17360   ac_status=$?
17361   echo "$as_me:17361: \$? = $ac_status" >&5
17362   (exit "$ac_status"); }; }; then
17363   CLANG_CPLUSPLUS=yes
17364
17365 else
17366   echo "$as_me: failed program was:" >&5
17367 cat "conftest.$ac_ext" >&5
17368 fi
17369 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17370         CXXFLAGS="$cf_save_CFLAGS"
17371         echo "$as_me:17371: result: $CLANG_CPLUSPLUS" >&5
17372 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17373 fi
17374
17375 CLANG_VERSION=none
17376
17377 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17378         case "$CC" in
17379         (c[1-9][0-9]|*/c[1-9][0-9])
17380                 { echo "$as_me:17380: WARNING: replacing broken compiler alias $CC" >&5
17381 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17382                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17383                 CC=clang
17384                 ;;
17385         esac
17386
17387         echo "$as_me:17387: checking version of $CC" >&5
17388 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17389         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.].*//'`"
17390         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17391         echo "$as_me:17391: result: $CLANG_VERSION" >&5
17392 echo "${ECHO_T}$CLANG_VERSION" >&6
17393
17394         for cf_clang_opt in \
17395                 -Qunused-arguments \
17396                 -Wno-error=implicit-function-declaration
17397         do
17398                 echo "$as_me:17398: checking if option $cf_clang_opt works" >&5
17399 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17400                 cf_save_CFLAGS="$CFLAGS"
17401                 CFLAGS="$CFLAGS $cf_clang_opt"
17402                 cat >"conftest.$ac_ext" <<_ACEOF
17403 #line 17403 "configure"
17404 #include "confdefs.h"
17405
17406                         #include <stdio.h>
17407 int
17408 main (void)
17409 {
17410
17411                         printf("hello!\\n");
17412   ;
17413   return 0;
17414 }
17415 _ACEOF
17416 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17417 if { (eval echo "$as_me:17417: \"$ac_link\"") >&5
17418   (eval $ac_link) 2>&5
17419   ac_status=$?
17420   echo "$as_me:17420: \$? = $ac_status" >&5
17421   (exit "$ac_status"); } &&
17422          { ac_try='test -s "conftest$ac_exeext"'
17423   { (eval echo "$as_me:17423: \"$ac_try\"") >&5
17424   (eval $ac_try) 2>&5
17425   ac_status=$?
17426   echo "$as_me:17426: \$? = $ac_status" >&5
17427   (exit "$ac_status"); }; }; then
17428
17429                         cf_clang_optok=yes
17430 else
17431   echo "$as_me: failed program was:" >&5
17432 cat "conftest.$ac_ext" >&5
17433
17434                         cf_clang_optok=no
17435 fi
17436 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17437                 echo "$as_me:17437: result: $cf_clang_optok" >&5
17438 echo "${ECHO_T}$cf_clang_optok" >&6
17439                 CFLAGS="$cf_save_CFLAGS"
17440                 if test "$cf_clang_optok" = yes; then
17441                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17442
17443 echo "${as_me:-configure}:17443: testing adding option $cf_clang_opt ..." 1>&5
17444
17445         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17446         CFLAGS="${CFLAGS}$cf_clang_opt"
17447
17448                 fi
17449         done
17450 fi
17451
17452 ac_ext=cc
17453 ac_cpp='$CXXCPP $CPPFLAGS'
17454 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17455 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17456 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17457 ac_main_return="return"
17458
17459 cat > conftest.$ac_ext <<EOF
17460 #line 17460 "configure"
17461 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17462 EOF
17463
17464 if test "$INTEL_CPLUSPLUS" = yes
17465 then
17466 # The "-wdXXX" options suppress warnings:
17467 # remark #1419: external declaration in primary source file
17468 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17469 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17470 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17471 # remark #193: zero used for undefined preprocessing identifier
17472 # remark #593: variable "curs_sb_left_arrow" was set but never used
17473 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17474 # remark #869: parameter "tw" was never referenced
17475 # remark #981: operands are evaluated in unspecified order
17476 # warning #269: invalid format string conversion
17477
17478         { echo "$as_me:17478: checking for $CC warning options..." >&5
17479 echo "$as_me: checking for $CC warning options..." >&6;}
17480         cf_save_CXXFLAGS="$CXXFLAGS"
17481         EXTRA_CXXFLAGS="-Wall"
17482         for cf_opt in \
17483                 wd1419 \
17484                 wd1682 \
17485                 wd1683 \
17486                 wd1684 \
17487                 wd193 \
17488                 wd279 \
17489                 wd593 \
17490                 wd810 \
17491                 wd869 \
17492                 wd981
17493         do
17494                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17495                 if { (eval echo "$as_me:17495: \"$ac_compile\"") >&5
17496   (eval $ac_compile) 2>&5
17497   ac_status=$?
17498   echo "$as_me:17498: \$? = $ac_status" >&5
17499   (exit "$ac_status"); }; then
17500                         test -n "$verbose" && echo "$as_me:17500: result: ... -$cf_opt" >&5
17501 echo "${ECHO_T}... -$cf_opt" >&6
17502                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17503                 fi
17504         done
17505         CXXFLAGS="$cf_save_CXXFLAGS"
17506
17507 elif test "$GXX" = yes
17508 then
17509         { echo "$as_me:17509: checking for $CXX warning options..." >&5
17510 echo "$as_me: checking for $CXX warning options..." >&6;}
17511         cf_save_CXXFLAGS="$CXXFLAGS"
17512         EXTRA_CXXFLAGS="-W -Wall"
17513         cf_gxx_extra_warnings=""
17514         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17515         case "$GXX_VERSION" in
17516         ([1-2].*)
17517                 ;;
17518         (*)
17519                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17520                 ;;
17521         esac
17522         for cf_opt in \
17523                 Wabi \
17524                 fabi-version=0 \
17525                 Wextra \
17526                 Wignored-qualifiers \
17527                 Wlogical-op \
17528                 Woverloaded-virtual \
17529                 Wsign-promo \
17530                 Wsynth \
17531                 Wold-style-cast \
17532                 Wcast-align \
17533                 Wcast-qual \
17534                 Wpointer-arith \
17535                 Wshadow \
17536                 Wundef $cf_gxx_extra_warnings Wno-unused
17537         do
17538                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17539                 if { (eval echo "$as_me:17539: \"$ac_compile\"") >&5
17540   (eval $ac_compile) 2>&5
17541   ac_status=$?
17542   echo "$as_me:17542: \$? = $ac_status" >&5
17543   (exit "$ac_status"); }; then
17544                         test -n "$verbose" && echo "$as_me:17544: result: ... -$cf_opt" >&5
17545 echo "${ECHO_T}... -$cf_opt" >&6
17546                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17547                 else
17548                         test -n "$verbose" && echo "$as_me:17548: result: ... no -$cf_opt" >&5
17549 echo "${ECHO_T}... no -$cf_opt" >&6
17550                 fi
17551         done
17552         CXXFLAGS="$cf_save_CXXFLAGS"
17553 fi
17554
17555 rm -rf ./conftest*
17556 ac_ext=c
17557 ac_cpp='$CPP $CPPFLAGS'
17558 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17559 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17560 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17561 ac_main_return="return"
17562
17563         fi
17564 fi
17565
17566 echo "$as_me:17566: checking if you want to work around bogus compiler/loader warnings" >&5
17567 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17568
17569 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17570 if test "${enable_string_hacks+set}" = set; then
17571   enableval="$enable_string_hacks"
17572   enable_string_hacks=$enableval
17573 else
17574   enable_string_hacks=no
17575 fi;
17576 echo "$as_me:17576: result: $enable_string_hacks" >&5
17577 echo "${ECHO_T}$enable_string_hacks" >&6
17578
17579 if test "x$enable_string_hacks" = "xyes"; then
17580
17581 cat >>confdefs.h <<\EOF
17582 #define USE_STRING_HACKS 1
17583 EOF
17584
17585         { echo "$as_me:17585: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17586 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17587         echo "$as_me:17587: checking for strlcat" >&5
17588 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17589 if test "${ac_cv_func_strlcat+set}" = set; then
17590   echo $ECHO_N "(cached) $ECHO_C" >&6
17591 else
17592   cat >"conftest.$ac_ext" <<_ACEOF
17593 #line 17593 "configure"
17594 #include "confdefs.h"
17595 #define strlcat autoconf_temporary
17596 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17597 #undef strlcat
17598
17599 #ifdef __cplusplus
17600 extern "C"
17601 #endif
17602
17603 /* We use char because int might match the return type of a gcc2
17604    builtin and then its argument prototype would still apply.  */
17605 char strlcat (void);
17606
17607 int
17608 main (void)
17609 {
17610
17611 /* The GNU C library defines stubs for functions which it implements
17612     to always fail with ENOSYS.  Some functions are actually named
17613     something starting with __ and the normal name is an alias.  */
17614 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17615 #error found stub for strlcat
17616 #endif
17617
17618         return strlcat ();
17619   ;
17620   return 0;
17621 }
17622 _ACEOF
17623 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17624 if { (eval echo "$as_me:17624: \"$ac_link\"") >&5
17625   (eval $ac_link) 2>&5
17626   ac_status=$?
17627   echo "$as_me:17627: \$? = $ac_status" >&5
17628   (exit "$ac_status"); } &&
17629          { ac_try='test -s "conftest$ac_exeext"'
17630   { (eval echo "$as_me:17630: \"$ac_try\"") >&5
17631   (eval $ac_try) 2>&5
17632   ac_status=$?
17633   echo "$as_me:17633: \$? = $ac_status" >&5
17634   (exit "$ac_status"); }; }; then
17635   ac_cv_func_strlcat=yes
17636 else
17637   echo "$as_me: failed program was:" >&5
17638 cat "conftest.$ac_ext" >&5
17639 ac_cv_func_strlcat=no
17640 fi
17641 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17642 fi
17643 echo "$as_me:17643: result: $ac_cv_func_strlcat" >&5
17644 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17645 if test "$ac_cv_func_strlcat" = yes; then
17646
17647 cat >>confdefs.h <<\EOF
17648 #define HAVE_STRLCAT 1
17649 EOF
17650
17651 else
17652
17653                 echo "$as_me:17653: checking for strlcat in -lbsd" >&5
17654 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17655 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17656   echo $ECHO_N "(cached) $ECHO_C" >&6
17657 else
17658   ac_check_lib_save_LIBS=$LIBS
17659 LIBS="-lbsd  $LIBS"
17660 cat >"conftest.$ac_ext" <<_ACEOF
17661 #line 17661 "configure"
17662 #include "confdefs.h"
17663
17664 /* Override any gcc2 internal prototype to avoid an error.  */
17665 #ifdef __cplusplus
17666 extern "C"
17667 #endif
17668 /* We use char because int might match the return type of a gcc2
17669    builtin and then its argument prototype would still apply.  */
17670 char strlcat ();
17671 int
17672 main (void)
17673 {
17674 strlcat ();
17675   ;
17676   return 0;
17677 }
17678 _ACEOF
17679 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17680 if { (eval echo "$as_me:17680: \"$ac_link\"") >&5
17681   (eval $ac_link) 2>&5
17682   ac_status=$?
17683   echo "$as_me:17683: \$? = $ac_status" >&5
17684   (exit "$ac_status"); } &&
17685          { ac_try='test -s "conftest$ac_exeext"'
17686   { (eval echo "$as_me:17686: \"$ac_try\"") >&5
17687   (eval $ac_try) 2>&5
17688   ac_status=$?
17689   echo "$as_me:17689: \$? = $ac_status" >&5
17690   (exit "$ac_status"); }; }; then
17691   ac_cv_lib_bsd_strlcat=yes
17692 else
17693   echo "$as_me: failed program was:" >&5
17694 cat "conftest.$ac_ext" >&5
17695 ac_cv_lib_bsd_strlcat=no
17696 fi
17697 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17698 LIBS=$ac_check_lib_save_LIBS
17699 fi
17700 echo "$as_me:17700: result: $ac_cv_lib_bsd_strlcat" >&5
17701 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17702 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17703
17704 cf_add_libs="$LIBS"
17705 # reverse order
17706 cf_add_0lib=
17707 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17708 # filter duplicates
17709 for cf_add_1lib in $cf_add_0lib; do
17710         for cf_add_2lib in $cf_add_libs; do
17711                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17712                         cf_add_1lib=
17713                         break
17714                 fi
17715         done
17716         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17717 done
17718 LIBS="$cf_add_libs"
17719
17720 for ac_header in bsd/string.h
17721 do
17722 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17723 echo "$as_me:17723: checking for $ac_header" >&5
17724 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17725 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17726   echo $ECHO_N "(cached) $ECHO_C" >&6
17727 else
17728   cat >"conftest.$ac_ext" <<_ACEOF
17729 #line 17729 "configure"
17730 #include "confdefs.h"
17731 #include <$ac_header>
17732 _ACEOF
17733 if { (eval echo "$as_me:17733: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17734   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17735   ac_status=$?
17736   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17737   rm -f conftest.er1
17738   cat conftest.err >&5
17739   echo "$as_me:17739: \$? = $ac_status" >&5
17740   (exit "$ac_status"); } >/dev/null; then
17741   if test -s conftest.err; then
17742     ac_cpp_err=$ac_c_preproc_warn_flag
17743   else
17744     ac_cpp_err=
17745   fi
17746 else
17747   ac_cpp_err=yes
17748 fi
17749 if test -z "$ac_cpp_err"; then
17750   eval "$as_ac_Header=yes"
17751 else
17752   echo "$as_me: failed program was:" >&5
17753   cat "conftest.$ac_ext" >&5
17754   eval "$as_ac_Header=no"
17755 fi
17756 rm -f conftest.err "conftest.$ac_ext"
17757 fi
17758 echo "$as_me:17758: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17759 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17760 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17761   cat >>confdefs.h <<EOF
17762 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17763 EOF
17764
17765 fi
17766 done
17767
17768 cat >>confdefs.h <<\EOF
17769 #define HAVE_STRLCAT 1
17770 EOF
17771
17772 fi
17773
17774 fi
17775
17776 for ac_func in strlcpy snprintf
17777 do
17778 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17779 echo "$as_me:17779: checking for $ac_func" >&5
17780 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17781 if eval "test \"\${$as_ac_var+set}\" = set"; then
17782   echo $ECHO_N "(cached) $ECHO_C" >&6
17783 else
17784   cat >"conftest.$ac_ext" <<_ACEOF
17785 #line 17785 "configure"
17786 #include "confdefs.h"
17787 #define $ac_func autoconf_temporary
17788 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17789 #undef $ac_func
17790
17791 #ifdef __cplusplus
17792 extern "C"
17793 #endif
17794
17795 /* We use char because int might match the return type of a gcc2
17796    builtin and then its argument prototype would still apply.  */
17797 char $ac_func (void);
17798
17799 int
17800 main (void)
17801 {
17802
17803 /* The GNU C library defines stubs for functions which it implements
17804     to always fail with ENOSYS.  Some functions are actually named
17805     something starting with __ and the normal name is an alias.  */
17806 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17807 #error found stub for $ac_func
17808 #endif
17809
17810         return $ac_func ();
17811   ;
17812   return 0;
17813 }
17814 _ACEOF
17815 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17816 if { (eval echo "$as_me:17816: \"$ac_link\"") >&5
17817   (eval $ac_link) 2>&5
17818   ac_status=$?
17819   echo "$as_me:17819: \$? = $ac_status" >&5
17820   (exit "$ac_status"); } &&
17821          { ac_try='test -s "conftest$ac_exeext"'
17822   { (eval echo "$as_me:17822: \"$ac_try\"") >&5
17823   (eval $ac_try) 2>&5
17824   ac_status=$?
17825   echo "$as_me:17825: \$? = $ac_status" >&5
17826   (exit "$ac_status"); }; }; then
17827   eval "$as_ac_var=yes"
17828 else
17829   echo "$as_me: failed program was:" >&5
17830 cat "conftest.$ac_ext" >&5
17831 eval "$as_ac_var=no"
17832 fi
17833 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17834 fi
17835 echo "$as_me:17835: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17836 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17837 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17838   cat >>confdefs.h <<EOF
17839 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17840 EOF
17841
17842 fi
17843 done
17844
17845 fi
17846
17847 ###     use option --enable-assertions to turn on generation of assertion code
17848 echo "$as_me:17848: checking if you want to enable runtime assertions" >&5
17849 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17850
17851 # Check whether --enable-assertions or --disable-assertions was given.
17852 if test "${enable_assertions+set}" = set; then
17853   enableval="$enable_assertions"
17854   with_assertions=$enableval
17855 else
17856   with_assertions=no
17857 fi;
17858 echo "$as_me:17858: result: $with_assertions" >&5
17859 echo "${ECHO_T}$with_assertions" >&6
17860 if test -n "$GCC"
17861 then
17862         if test "$with_assertions" = no
17863         then
17864                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17865         else
17866
17867         ADAFLAGS="$ADAFLAGS -gnata"
17868
17869         fi
17870 fi
17871
17872 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17873
17874 echo "$as_me:17874: checking if you want to use dmalloc for testing" >&5
17875 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17876
17877 # Check whether --with-dmalloc or --without-dmalloc was given.
17878 if test "${with_dmalloc+set}" = set; then
17879   withval="$with_dmalloc"
17880   case "x$withval" in
17881         (x|xno) ;;
17882         (*)
17883                 : "${with_cflags:=-g}"
17884                 : "${enable_leaks:=no}"
17885                 with_dmalloc=yes
17886
17887 cat >>confdefs.h <<EOF
17888 #define USE_DMALLOC 1
17889 EOF
17890
17891                 ;;
17892         esac
17893 else
17894   with_dmalloc=
17895 fi;
17896 echo "$as_me:17896: result: ${with_dmalloc:-no}" >&5
17897 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17898
17899 case ".$with_cflags" in
17900 (.*-g*)
17901         case .$CFLAGS in
17902         (.*-g*)
17903                 ;;
17904         (*)
17905
17906 cf_fix_cppflags=no
17907 cf_new_cflags=
17908 cf_new_cppflags=
17909 cf_new_extra_cppflags=
17910
17911 for cf_add_cflags in -g
17912 do
17913 case "$cf_fix_cppflags" in
17914 (no)
17915         case "$cf_add_cflags" in
17916         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17917                 case "$cf_add_cflags" in
17918                 (-D*)
17919                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17920
17921                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17922                                 && test -z "${cf_tst_cflags}" \
17923                                 && cf_fix_cppflags=yes
17924
17925                         if test "$cf_fix_cppflags" = yes ; then
17926
17927         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17928         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17929
17930                                 continue
17931                         elif test "${cf_tst_cflags}" = "\"'" ; then
17932
17933         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17934         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17935
17936                                 continue
17937                         fi
17938                         ;;
17939                 esac
17940                 case "$CPPFLAGS" in
17941                 (*$cf_add_cflags)
17942                         ;;
17943                 (*)
17944                         case "$cf_add_cflags" in
17945                         (-D*)
17946                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17947
17948 CPPFLAGS=`echo "$CPPFLAGS" | \
17949         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17950                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17951
17952                                 ;;
17953                         esac
17954
17955         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17956         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17957
17958                         ;;
17959                 esac
17960                 ;;
17961         (*)
17962
17963         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17964         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17965
17966                 ;;
17967         esac
17968         ;;
17969 (yes)
17970
17971         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17972         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17973
17974         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17975
17976         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17977                 && test -z "${cf_tst_cflags}" \
17978                 && cf_fix_cppflags=no
17979         ;;
17980 esac
17981 done
17982
17983 if test -n "$cf_new_cflags" ; then
17984
17985         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17986         CFLAGS="${CFLAGS}$cf_new_cflags"
17987
17988 fi
17989
17990 if test -n "$cf_new_cppflags" ; then
17991
17992         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17993         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17994
17995 fi
17996
17997 if test -n "$cf_new_extra_cppflags" ; then
17998
17999         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18000         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18001
18002 fi
18003
18004                 ;;
18005         esac
18006         ;;
18007 esac
18008
18009 if test "$with_dmalloc" = yes ; then
18010         echo "$as_me:18010: checking for dmalloc.h" >&5
18011 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18012 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18013   echo $ECHO_N "(cached) $ECHO_C" >&6
18014 else
18015   cat >"conftest.$ac_ext" <<_ACEOF
18016 #line 18016 "configure"
18017 #include "confdefs.h"
18018 #include <dmalloc.h>
18019 _ACEOF
18020 if { (eval echo "$as_me:18020: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18021   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18022   ac_status=$?
18023   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18024   rm -f conftest.er1
18025   cat conftest.err >&5
18026   echo "$as_me:18026: \$? = $ac_status" >&5
18027   (exit "$ac_status"); } >/dev/null; then
18028   if test -s conftest.err; then
18029     ac_cpp_err=$ac_c_preproc_warn_flag
18030   else
18031     ac_cpp_err=
18032   fi
18033 else
18034   ac_cpp_err=yes
18035 fi
18036 if test -z "$ac_cpp_err"; then
18037   ac_cv_header_dmalloc_h=yes
18038 else
18039   echo "$as_me: failed program was:" >&5
18040   cat "conftest.$ac_ext" >&5
18041   ac_cv_header_dmalloc_h=no
18042 fi
18043 rm -f conftest.err "conftest.$ac_ext"
18044 fi
18045 echo "$as_me:18045: result: $ac_cv_header_dmalloc_h" >&5
18046 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18047 if test "$ac_cv_header_dmalloc_h" = yes; then
18048
18049 echo "$as_me:18049: checking for dmalloc_debug in -ldmalloc" >&5
18050 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18051 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18052   echo $ECHO_N "(cached) $ECHO_C" >&6
18053 else
18054   ac_check_lib_save_LIBS=$LIBS
18055 LIBS="-ldmalloc  $LIBS"
18056 cat >"conftest.$ac_ext" <<_ACEOF
18057 #line 18057 "configure"
18058 #include "confdefs.h"
18059
18060 /* Override any gcc2 internal prototype to avoid an error.  */
18061 #ifdef __cplusplus
18062 extern "C"
18063 #endif
18064 /* We use char because int might match the return type of a gcc2
18065    builtin and then its argument prototype would still apply.  */
18066 char dmalloc_debug ();
18067 int
18068 main (void)
18069 {
18070 dmalloc_debug ();
18071   ;
18072   return 0;
18073 }
18074 _ACEOF
18075 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18076 if { (eval echo "$as_me:18076: \"$ac_link\"") >&5
18077   (eval $ac_link) 2>&5
18078   ac_status=$?
18079   echo "$as_me:18079: \$? = $ac_status" >&5
18080   (exit "$ac_status"); } &&
18081          { ac_try='test -s "conftest$ac_exeext"'
18082   { (eval echo "$as_me:18082: \"$ac_try\"") >&5
18083   (eval $ac_try) 2>&5
18084   ac_status=$?
18085   echo "$as_me:18085: \$? = $ac_status" >&5
18086   (exit "$ac_status"); }; }; then
18087   ac_cv_lib_dmalloc_dmalloc_debug=yes
18088 else
18089   echo "$as_me: failed program was:" >&5
18090 cat "conftest.$ac_ext" >&5
18091 ac_cv_lib_dmalloc_dmalloc_debug=no
18092 fi
18093 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18094 LIBS=$ac_check_lib_save_LIBS
18095 fi
18096 echo "$as_me:18096: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18097 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18098 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18099   cat >>confdefs.h <<EOF
18100 #define HAVE_LIBDMALLOC 1
18101 EOF
18102
18103   LIBS="-ldmalloc $LIBS"
18104
18105 fi
18106
18107 fi
18108
18109 fi
18110
18111 echo "$as_me:18111: checking if you want to use dbmalloc for testing" >&5
18112 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18113
18114 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18115 if test "${with_dbmalloc+set}" = set; then
18116   withval="$with_dbmalloc"
18117   case "x$withval" in
18118         (x|xno) ;;
18119         (*)
18120                 : "${with_cflags:=-g}"
18121                 : "${enable_leaks:=no}"
18122                 with_dbmalloc=yes
18123
18124 cat >>confdefs.h <<EOF
18125 #define USE_DBMALLOC 1
18126 EOF
18127
18128                 ;;
18129         esac
18130 else
18131   with_dbmalloc=
18132 fi;
18133 echo "$as_me:18133: result: ${with_dbmalloc:-no}" >&5
18134 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18135
18136 case ".$with_cflags" in
18137 (.*-g*)
18138         case .$CFLAGS in
18139         (.*-g*)
18140                 ;;
18141         (*)
18142
18143 cf_fix_cppflags=no
18144 cf_new_cflags=
18145 cf_new_cppflags=
18146 cf_new_extra_cppflags=
18147
18148 for cf_add_cflags in -g
18149 do
18150 case "$cf_fix_cppflags" in
18151 (no)
18152         case "$cf_add_cflags" in
18153         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18154                 case "$cf_add_cflags" in
18155                 (-D*)
18156                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18157
18158                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18159                                 && test -z "${cf_tst_cflags}" \
18160                                 && cf_fix_cppflags=yes
18161
18162                         if test "$cf_fix_cppflags" = yes ; then
18163
18164         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18165         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18166
18167                                 continue
18168                         elif test "${cf_tst_cflags}" = "\"'" ; then
18169
18170         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18171         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18172
18173                                 continue
18174                         fi
18175                         ;;
18176                 esac
18177                 case "$CPPFLAGS" in
18178                 (*$cf_add_cflags)
18179                         ;;
18180                 (*)
18181                         case "$cf_add_cflags" in
18182                         (-D*)
18183                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18184
18185 CPPFLAGS=`echo "$CPPFLAGS" | \
18186         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18187                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18188
18189                                 ;;
18190                         esac
18191
18192         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18193         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18194
18195                         ;;
18196                 esac
18197                 ;;
18198         (*)
18199
18200         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18201         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18202
18203                 ;;
18204         esac
18205         ;;
18206 (yes)
18207
18208         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18209         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18210
18211         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18212
18213         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18214                 && test -z "${cf_tst_cflags}" \
18215                 && cf_fix_cppflags=no
18216         ;;
18217 esac
18218 done
18219
18220 if test -n "$cf_new_cflags" ; then
18221
18222         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18223         CFLAGS="${CFLAGS}$cf_new_cflags"
18224
18225 fi
18226
18227 if test -n "$cf_new_cppflags" ; then
18228
18229         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18230         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18231
18232 fi
18233
18234 if test -n "$cf_new_extra_cppflags" ; then
18235
18236         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18237         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18238
18239 fi
18240
18241                 ;;
18242         esac
18243         ;;
18244 esac
18245
18246 if test "$with_dbmalloc" = yes ; then
18247         echo "$as_me:18247: checking for dbmalloc.h" >&5
18248 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18249 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18250   echo $ECHO_N "(cached) $ECHO_C" >&6
18251 else
18252   cat >"conftest.$ac_ext" <<_ACEOF
18253 #line 18253 "configure"
18254 #include "confdefs.h"
18255 #include <dbmalloc.h>
18256 _ACEOF
18257 if { (eval echo "$as_me:18257: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18258   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18259   ac_status=$?
18260   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18261   rm -f conftest.er1
18262   cat conftest.err >&5
18263   echo "$as_me:18263: \$? = $ac_status" >&5
18264   (exit "$ac_status"); } >/dev/null; then
18265   if test -s conftest.err; then
18266     ac_cpp_err=$ac_c_preproc_warn_flag
18267   else
18268     ac_cpp_err=
18269   fi
18270 else
18271   ac_cpp_err=yes
18272 fi
18273 if test -z "$ac_cpp_err"; then
18274   ac_cv_header_dbmalloc_h=yes
18275 else
18276   echo "$as_me: failed program was:" >&5
18277   cat "conftest.$ac_ext" >&5
18278   ac_cv_header_dbmalloc_h=no
18279 fi
18280 rm -f conftest.err "conftest.$ac_ext"
18281 fi
18282 echo "$as_me:18282: result: $ac_cv_header_dbmalloc_h" >&5
18283 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18284 if test "$ac_cv_header_dbmalloc_h" = yes; then
18285
18286 echo "$as_me:18286: checking for debug_malloc in -ldbmalloc" >&5
18287 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18288 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18289   echo $ECHO_N "(cached) $ECHO_C" >&6
18290 else
18291   ac_check_lib_save_LIBS=$LIBS
18292 LIBS="-ldbmalloc  $LIBS"
18293 cat >"conftest.$ac_ext" <<_ACEOF
18294 #line 18294 "configure"
18295 #include "confdefs.h"
18296
18297 /* Override any gcc2 internal prototype to avoid an error.  */
18298 #ifdef __cplusplus
18299 extern "C"
18300 #endif
18301 /* We use char because int might match the return type of a gcc2
18302    builtin and then its argument prototype would still apply.  */
18303 char debug_malloc ();
18304 int
18305 main (void)
18306 {
18307 debug_malloc ();
18308   ;
18309   return 0;
18310 }
18311 _ACEOF
18312 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18313 if { (eval echo "$as_me:18313: \"$ac_link\"") >&5
18314   (eval $ac_link) 2>&5
18315   ac_status=$?
18316   echo "$as_me:18316: \$? = $ac_status" >&5
18317   (exit "$ac_status"); } &&
18318          { ac_try='test -s "conftest$ac_exeext"'
18319   { (eval echo "$as_me:18319: \"$ac_try\"") >&5
18320   (eval $ac_try) 2>&5
18321   ac_status=$?
18322   echo "$as_me:18322: \$? = $ac_status" >&5
18323   (exit "$ac_status"); }; }; then
18324   ac_cv_lib_dbmalloc_debug_malloc=yes
18325 else
18326   echo "$as_me: failed program was:" >&5
18327 cat "conftest.$ac_ext" >&5
18328 ac_cv_lib_dbmalloc_debug_malloc=no
18329 fi
18330 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18331 LIBS=$ac_check_lib_save_LIBS
18332 fi
18333 echo "$as_me:18333: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18334 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18335 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18336   cat >>confdefs.h <<EOF
18337 #define HAVE_LIBDBMALLOC 1
18338 EOF
18339
18340   LIBS="-ldbmalloc $LIBS"
18341
18342 fi
18343
18344 fi
18345
18346 fi
18347
18348 echo "$as_me:18348: checking if you want to use valgrind for testing" >&5
18349 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18350
18351 # Check whether --with-valgrind or --without-valgrind was given.
18352 if test "${with_valgrind+set}" = set; then
18353   withval="$with_valgrind"
18354   case "x$withval" in
18355         (x|xno) ;;
18356         (*)
18357                 : "${with_cflags:=-g}"
18358                 : "${enable_leaks:=no}"
18359                 with_valgrind=yes
18360
18361 cat >>confdefs.h <<EOF
18362 #define USE_VALGRIND 1
18363 EOF
18364
18365                 ;;
18366         esac
18367 else
18368   with_valgrind=
18369 fi;
18370 echo "$as_me:18370: result: ${with_valgrind:-no}" >&5
18371 echo "${ECHO_T}${with_valgrind:-no}" >&6
18372
18373 case ".$with_cflags" in
18374 (.*-g*)
18375         case .$CFLAGS in
18376         (.*-g*)
18377                 ;;
18378         (*)
18379
18380 cf_fix_cppflags=no
18381 cf_new_cflags=
18382 cf_new_cppflags=
18383 cf_new_extra_cppflags=
18384
18385 for cf_add_cflags in -g
18386 do
18387 case "$cf_fix_cppflags" in
18388 (no)
18389         case "$cf_add_cflags" in
18390         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18391                 case "$cf_add_cflags" in
18392                 (-D*)
18393                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18394
18395                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18396                                 && test -z "${cf_tst_cflags}" \
18397                                 && cf_fix_cppflags=yes
18398
18399                         if test "$cf_fix_cppflags" = yes ; then
18400
18401         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18402         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18403
18404                                 continue
18405                         elif test "${cf_tst_cflags}" = "\"'" ; then
18406
18407         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18408         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18409
18410                                 continue
18411                         fi
18412                         ;;
18413                 esac
18414                 case "$CPPFLAGS" in
18415                 (*$cf_add_cflags)
18416                         ;;
18417                 (*)
18418                         case "$cf_add_cflags" in
18419                         (-D*)
18420                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18421
18422 CPPFLAGS=`echo "$CPPFLAGS" | \
18423         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18424                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18425
18426                                 ;;
18427                         esac
18428
18429         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18430         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18431
18432                         ;;
18433                 esac
18434                 ;;
18435         (*)
18436
18437         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18438         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18439
18440                 ;;
18441         esac
18442         ;;
18443 (yes)
18444
18445         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18446         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18447
18448         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18449
18450         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18451                 && test -z "${cf_tst_cflags}" \
18452                 && cf_fix_cppflags=no
18453         ;;
18454 esac
18455 done
18456
18457 if test -n "$cf_new_cflags" ; then
18458
18459         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18460         CFLAGS="${CFLAGS}$cf_new_cflags"
18461
18462 fi
18463
18464 if test -n "$cf_new_cppflags" ; then
18465
18466         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18467         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18468
18469 fi
18470
18471 if test -n "$cf_new_extra_cppflags" ; then
18472
18473         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18474         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18475
18476 fi
18477
18478                 ;;
18479         esac
18480         ;;
18481 esac
18482
18483 echo "$as_me:18483: checking if you want to perform memory-leak testing" >&5
18484 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18485
18486 # Check whether --enable-leaks or --disable-leaks was given.
18487 if test "${enable_leaks+set}" = set; then
18488   enableval="$enable_leaks"
18489   enable_leaks=$enableval
18490 else
18491   enable_leaks=yes
18492 fi;
18493 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18494 echo "$as_me:18494: result: $with_no_leaks" >&5
18495 echo "${ECHO_T}$with_no_leaks" >&6
18496
18497 if test "$enable_leaks" = no ; then
18498
18499 cat >>confdefs.h <<\EOF
18500 #define NO_LEAKS 1
18501 EOF
18502
18503 cat >>confdefs.h <<\EOF
18504 #define YY_NO_LEAKS 1
18505 EOF
18506
18507 fi
18508
18509 cat >>confdefs.h <<\EOF
18510 #define HAVE_NC_ALLOC_H 1
18511 EOF
18512
18513 ###     use option --enable-expanded to generate certain macros as functions
18514
18515 # Check whether --enable-expanded or --disable-expanded was given.
18516 if test "${enable_expanded+set}" = set; then
18517   enableval="$enable_expanded"
18518   test "x$enableval" = xyes &&
18519 cat >>confdefs.h <<\EOF
18520 #define NCURSES_EXPANDED 1
18521 EOF
18522
18523 fi;
18524
18525 ###     use option --disable-macros to suppress macros in favor of functions
18526
18527 # Check whether --enable-macros or --disable-macros was given.
18528 if test "${enable_macros+set}" = set; then
18529   enableval="$enable_macros"
18530   test "$enableval" = no &&
18531 cat >>confdefs.h <<\EOF
18532 #define NCURSES_NOMACROS 1
18533 EOF
18534
18535 fi;
18536
18537 # Normally we only add trace() to the debug-library.  Allow this to be
18538 # extended to all models of the ncurses library:
18539 cf_all_traces=no
18540 case "$CFLAGS $CPPFLAGS" in
18541 (*-DTRACE*)
18542         cf_all_traces=yes
18543         ;;
18544 esac
18545
18546 echo "$as_me:18546: checking whether to add trace feature to all models" >&5
18547 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18548
18549 # Check whether --with-trace or --without-trace was given.
18550 if test "${with_trace+set}" = set; then
18551   withval="$with_trace"
18552   cf_with_trace=$withval
18553 else
18554   cf_with_trace=$cf_all_traces
18555 fi;
18556 echo "$as_me:18556: result: $cf_with_trace" >&5
18557 echo "${ECHO_T}$cf_with_trace" >&6
18558
18559 if test "x$cf_with_trace" = xyes ; then
18560         LIB_TRACING=all
18561         ADA_TRACE=TRUE
18562
18563 cf_fix_cppflags=no
18564 cf_new_cflags=
18565 cf_new_cppflags=
18566 cf_new_extra_cppflags=
18567
18568 for cf_add_cflags in -DTRACE
18569 do
18570 case "$cf_fix_cppflags" in
18571 (no)
18572         case "$cf_add_cflags" in
18573         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18574                 case "$cf_add_cflags" in
18575                 (-D*)
18576                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18577
18578                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18579                                 && test -z "${cf_tst_cflags}" \
18580                                 && cf_fix_cppflags=yes
18581
18582                         if test "$cf_fix_cppflags" = yes ; then
18583
18584         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18585         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18586
18587                                 continue
18588                         elif test "${cf_tst_cflags}" = "\"'" ; then
18589
18590         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18591         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18592
18593                                 continue
18594                         fi
18595                         ;;
18596                 esac
18597                 case "$CPPFLAGS" in
18598                 (*$cf_add_cflags)
18599                         ;;
18600                 (*)
18601                         case "$cf_add_cflags" in
18602                         (-D*)
18603                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18604
18605 CPPFLAGS=`echo "$CPPFLAGS" | \
18606         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18607                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18608
18609                                 ;;
18610                         esac
18611
18612         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18613         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18614
18615                         ;;
18616                 esac
18617                 ;;
18618         (*)
18619
18620         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18621         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18622
18623                 ;;
18624         esac
18625         ;;
18626 (yes)
18627
18628         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18629         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18630
18631         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18632
18633         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18634                 && test -z "${cf_tst_cflags}" \
18635                 && cf_fix_cppflags=no
18636         ;;
18637 esac
18638 done
18639
18640 if test -n "$cf_new_cflags" ; then
18641
18642         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18643         CFLAGS="${CFLAGS}$cf_new_cflags"
18644
18645 fi
18646
18647 if test -n "$cf_new_cppflags" ; then
18648
18649         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18650         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18651
18652 fi
18653
18654 if test -n "$cf_new_extra_cppflags" ; then
18655
18656         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18657         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18658
18659 fi
18660
18661 cat >>confdefs.h <<\EOF
18662 #define HAVE__TRACEF 1
18663 EOF
18664
18665 else
18666         LIB_TRACING=DEBUG
18667         ADA_TRACE=FALSE
18668 fi
18669
18670 echo "$as_me:18670: checking if we want to use GNAT projects" >&5
18671 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18672
18673 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18674 if test "${enable_gnat_projects+set}" = set; then
18675   enableval="$enable_gnat_projects"
18676   test "$enableval" != no && enableval=yes
18677         if test "$enableval" != "yes" ; then
18678     enable_gnat_projects=no
18679         else
18680                 enable_gnat_projects=yes
18681         fi
18682 else
18683   enableval=yes
18684         enable_gnat_projects=yes
18685
18686 fi;
18687 echo "$as_me:18687: result: $enable_gnat_projects" >&5
18688 echo "${ECHO_T}$enable_gnat_projects" >&6
18689
18690 ###     Checks for libraries.
18691 case "$cf_cv_system_name" in
18692 (*mingw32*|*mingw64*)
18693         # Note: WINVER may be a problem with Windows 10
18694         if test "x$with_exp_win32" = xyes ; then
18695                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18696         else
18697                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18698         fi
18699
18700 echo "$as_me:18700: checking if ssp library is needed" >&5
18701 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
18702 if test "${cf_cv_need_libssp+set}" = set; then
18703   echo $ECHO_N "(cached) $ECHO_C" >&6
18704 else
18705
18706 cat >"conftest.$ac_ext" <<_ACEOF
18707 #line 18707 "configure"
18708 #include "confdefs.h"
18709
18710 #include <sys/types.h>
18711 #include <dirent.h>
18712
18713 int
18714 main (void)
18715 {
18716
18717        DIR *dp = opendir(".");
18718
18719   ;
18720   return 0;
18721 }
18722 _ACEOF
18723 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18724 if { (eval echo "$as_me:18724: \"$ac_link\"") >&5
18725   (eval $ac_link) 2>&5
18726   ac_status=$?
18727   echo "$as_me:18727: \$? = $ac_status" >&5
18728   (exit "$ac_status"); } &&
18729          { ac_try='test -s "conftest$ac_exeext"'
18730   { (eval echo "$as_me:18730: \"$ac_try\"") >&5
18731   (eval $ac_try) 2>&5
18732   ac_status=$?
18733   echo "$as_me:18733: \$? = $ac_status" >&5
18734   (exit "$ac_status"); }; }; then
18735   cf_cv_need_libssp=no
18736 else
18737   echo "$as_me: failed program was:" >&5
18738 cat "conftest.$ac_ext" >&5
18739
18740         cf_save_LIBS="$LIBS"
18741         LIBS="$LIBS -lssp"
18742         cat >"conftest.$ac_ext" <<_ACEOF
18743 #line 18743 "configure"
18744 #include "confdefs.h"
18745
18746 #include <sys/types.h>
18747 #include <dirent.h>
18748
18749 int
18750 main (void)
18751 {
18752
18753                    DIR *dp = opendir(".");
18754
18755   ;
18756   return 0;
18757 }
18758 _ACEOF
18759 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18760 if { (eval echo "$as_me:18760: \"$ac_link\"") >&5
18761   (eval $ac_link) 2>&5
18762   ac_status=$?
18763   echo "$as_me:18763: \$? = $ac_status" >&5
18764   (exit "$ac_status"); } &&
18765          { ac_try='test -s "conftest$ac_exeext"'
18766   { (eval echo "$as_me:18766: \"$ac_try\"") >&5
18767   (eval $ac_try) 2>&5
18768   ac_status=$?
18769   echo "$as_me:18769: \$? = $ac_status" >&5
18770   (exit "$ac_status"); }; }; then
18771   cf_cv_need_libssp=yes
18772 else
18773   echo "$as_me: failed program was:" >&5
18774 cat "conftest.$ac_ext" >&5
18775 cf_cv_need_libssp=maybe
18776 fi
18777 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18778         LIBS="$cf_save_LIBS"
18779
18780 fi
18781 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18782 fi
18783 echo "$as_me:18783: result: $cf_cv_need_libssp" >&5
18784 echo "${ECHO_T}$cf_cv_need_libssp" >&6
18785
18786 if test "x$cf_cv_need_libssp" = xyes
18787 then
18788
18789 cf_add_libs="$LIBS"
18790 # reverse order
18791 cf_add_0lib=
18792 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18793 # filter duplicates
18794 for cf_add_1lib in $cf_add_0lib; do
18795         for cf_add_2lib in $cf_add_libs; do
18796                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18797                         cf_add_1lib=
18798                         break
18799                 fi
18800         done
18801         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18802 done
18803 LIBS="$cf_add_libs"
18804
18805 fi
18806
18807         ;;
18808 (*)
18809 echo "$as_me:18809: checking for gettimeofday" >&5
18810 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18811 if test "${ac_cv_func_gettimeofday+set}" = set; then
18812   echo $ECHO_N "(cached) $ECHO_C" >&6
18813 else
18814   cat >"conftest.$ac_ext" <<_ACEOF
18815 #line 18815 "configure"
18816 #include "confdefs.h"
18817 #define gettimeofday autoconf_temporary
18818 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18819 #undef gettimeofday
18820
18821 #ifdef __cplusplus
18822 extern "C"
18823 #endif
18824
18825 /* We use char because int might match the return type of a gcc2
18826    builtin and then its argument prototype would still apply.  */
18827 char gettimeofday (void);
18828
18829 int
18830 main (void)
18831 {
18832
18833 /* The GNU C library defines stubs for functions which it implements
18834     to always fail with ENOSYS.  Some functions are actually named
18835     something starting with __ and the normal name is an alias.  */
18836 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18837 #error found stub for gettimeofday
18838 #endif
18839
18840         return gettimeofday ();
18841   ;
18842   return 0;
18843 }
18844 _ACEOF
18845 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18846 if { (eval echo "$as_me:18846: \"$ac_link\"") >&5
18847   (eval $ac_link) 2>&5
18848   ac_status=$?
18849   echo "$as_me:18849: \$? = $ac_status" >&5
18850   (exit "$ac_status"); } &&
18851          { ac_try='test -s "conftest$ac_exeext"'
18852   { (eval echo "$as_me:18852: \"$ac_try\"") >&5
18853   (eval $ac_try) 2>&5
18854   ac_status=$?
18855   echo "$as_me:18855: \$? = $ac_status" >&5
18856   (exit "$ac_status"); }; }; then
18857   ac_cv_func_gettimeofday=yes
18858 else
18859   echo "$as_me: failed program was:" >&5
18860 cat "conftest.$ac_ext" >&5
18861 ac_cv_func_gettimeofday=no
18862 fi
18863 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18864 fi
18865 echo "$as_me:18865: result: $ac_cv_func_gettimeofday" >&5
18866 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18867 if test "$ac_cv_func_gettimeofday" = yes; then
18868
18869 cat >>confdefs.h <<\EOF
18870 #define HAVE_GETTIMEOFDAY 1
18871 EOF
18872
18873 else
18874
18875 echo "$as_me:18875: checking for gettimeofday in -lbsd" >&5
18876 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18877 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18878   echo $ECHO_N "(cached) $ECHO_C" >&6
18879 else
18880   ac_check_lib_save_LIBS=$LIBS
18881 LIBS="-lbsd  $LIBS"
18882 cat >"conftest.$ac_ext" <<_ACEOF
18883 #line 18883 "configure"
18884 #include "confdefs.h"
18885
18886 /* Override any gcc2 internal prototype to avoid an error.  */
18887 #ifdef __cplusplus
18888 extern "C"
18889 #endif
18890 /* We use char because int might match the return type of a gcc2
18891    builtin and then its argument prototype would still apply.  */
18892 char gettimeofday ();
18893 int
18894 main (void)
18895 {
18896 gettimeofday ();
18897   ;
18898   return 0;
18899 }
18900 _ACEOF
18901 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18902 if { (eval echo "$as_me:18902: \"$ac_link\"") >&5
18903   (eval $ac_link) 2>&5
18904   ac_status=$?
18905   echo "$as_me:18905: \$? = $ac_status" >&5
18906   (exit "$ac_status"); } &&
18907          { ac_try='test -s "conftest$ac_exeext"'
18908   { (eval echo "$as_me:18908: \"$ac_try\"") >&5
18909   (eval $ac_try) 2>&5
18910   ac_status=$?
18911   echo "$as_me:18911: \$? = $ac_status" >&5
18912   (exit "$ac_status"); }; }; then
18913   ac_cv_lib_bsd_gettimeofday=yes
18914 else
18915   echo "$as_me: failed program was:" >&5
18916 cat "conftest.$ac_ext" >&5
18917 ac_cv_lib_bsd_gettimeofday=no
18918 fi
18919 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18920 LIBS=$ac_check_lib_save_LIBS
18921 fi
18922 echo "$as_me:18922: result: $ac_cv_lib_bsd_gettimeofday" >&5
18923 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18924 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18925
18926 cat >>confdefs.h <<\EOF
18927 #define HAVE_GETTIMEOFDAY 1
18928 EOF
18929
18930 cf_add_libs="$LIBS"
18931 # reverse order
18932 cf_add_0lib=
18933 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18934 # filter duplicates
18935 for cf_add_1lib in $cf_add_0lib; do
18936         for cf_add_2lib in $cf_add_libs; do
18937                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18938                         cf_add_1lib=
18939                         break
18940                 fi
18941         done
18942         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18943 done
18944 LIBS="$cf_add_libs"
18945
18946 fi
18947
18948 fi
18949         ;;
18950 esac
18951
18952 echo "$as_me:18952: checking if -lm needed for math functions" >&5
18953 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18954 if test "${cf_cv_need_libm+set}" = set; then
18955   echo $ECHO_N "(cached) $ECHO_C" >&6
18956 else
18957
18958         cat >"conftest.$ac_ext" <<_ACEOF
18959 #line 18959 "configure"
18960 #include "confdefs.h"
18961
18962                 #include <stdio.h>
18963                 #include <stdlib.h>
18964                 #include <math.h>
18965
18966 int
18967 main (void)
18968 {
18969 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18970   ;
18971   return 0;
18972 }
18973 _ACEOF
18974 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18975 if { (eval echo "$as_me:18975: \"$ac_link\"") >&5
18976   (eval $ac_link) 2>&5
18977   ac_status=$?
18978   echo "$as_me:18978: \$? = $ac_status" >&5
18979   (exit "$ac_status"); } &&
18980          { ac_try='test -s "conftest$ac_exeext"'
18981   { (eval echo "$as_me:18981: \"$ac_try\"") >&5
18982   (eval $ac_try) 2>&5
18983   ac_status=$?
18984   echo "$as_me:18984: \$? = $ac_status" >&5
18985   (exit "$ac_status"); }; }; then
18986   cf_cv_need_libm=no
18987 else
18988   echo "$as_me: failed program was:" >&5
18989 cat "conftest.$ac_ext" >&5
18990 cf_cv_need_libm=yes
18991 fi
18992 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18993 fi
18994 echo "$as_me:18994: result: $cf_cv_need_libm" >&5
18995 echo "${ECHO_T}$cf_cv_need_libm" >&6
18996
18997 if test "$cf_cv_need_libm" = yes
18998 then
18999
19000         cf_save_LIBS="$LIBS"
19001         LIBS="$LIBS -lm"
19002         echo "$as_me:19002: checking if -lm is available for math functions" >&5
19003 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19004 if test "${cf_cv_have_libm+set}" = set; then
19005   echo $ECHO_N "(cached) $ECHO_C" >&6
19006 else
19007
19008         cat >"conftest.$ac_ext" <<_ACEOF
19009 #line 19009 "configure"
19010 #include "confdefs.h"
19011
19012                 #include <stdio.h>
19013                 #include <stdlib.h>
19014                 #include <math.h>
19015
19016 int
19017 main (void)
19018 {
19019 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19020   ;
19021   return 0;
19022 }
19023 _ACEOF
19024 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19025 if { (eval echo "$as_me:19025: \"$ac_link\"") >&5
19026   (eval $ac_link) 2>&5
19027   ac_status=$?
19028   echo "$as_me:19028: \$? = $ac_status" >&5
19029   (exit "$ac_status"); } &&
19030          { ac_try='test -s "conftest$ac_exeext"'
19031   { (eval echo "$as_me:19031: \"$ac_try\"") >&5
19032   (eval $ac_try) 2>&5
19033   ac_status=$?
19034   echo "$as_me:19034: \$? = $ac_status" >&5
19035   (exit "$ac_status"); }; }; then
19036   cf_cv_have_libm=yes
19037 else
19038   echo "$as_me: failed program was:" >&5
19039 cat "conftest.$ac_ext" >&5
19040 cf_cv_have_libm=no
19041 fi
19042 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19043 fi
19044 echo "$as_me:19044: result: $cf_cv_have_libm" >&5
19045 echo "${ECHO_T}$cf_cv_have_libm" >&6
19046         LIBS="$cf_save_LIBS"
19047
19048         if test "$cf_cv_have_libm" = yes
19049         then
19050                 MATH_LIB=-lm
19051         fi
19052 else
19053         cf_cv_have_libm=yes
19054 fi
19055
19056 if test "$cf_cv_have_libm" = yes
19057 then
19058
19059 cat >>confdefs.h <<\EOF
19060 #define HAVE_MATH_FUNCS 1
19061 EOF
19062
19063 fi
19064
19065 ###     Checks for header files.
19066 echo "$as_me:19066: checking for ANSI C header files" >&5
19067 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
19068 if test "${ac_cv_header_stdc+set}" = set; then
19069   echo $ECHO_N "(cached) $ECHO_C" >&6
19070 else
19071   cat >"conftest.$ac_ext" <<_ACEOF
19072 #line 19072 "configure"
19073 #include "confdefs.h"
19074 #include <stdlib.h>
19075 #include <stdarg.h>
19076 #include <string.h>
19077 #include <float.h>
19078
19079 _ACEOF
19080 if { (eval echo "$as_me:19080: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19081   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19082   ac_status=$?
19083   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19084   rm -f conftest.er1
19085   cat conftest.err >&5
19086   echo "$as_me:19086: \$? = $ac_status" >&5
19087   (exit "$ac_status"); } >/dev/null; then
19088   if test -s conftest.err; then
19089     ac_cpp_err=$ac_c_preproc_warn_flag
19090   else
19091     ac_cpp_err=
19092   fi
19093 else
19094   ac_cpp_err=yes
19095 fi
19096 if test -z "$ac_cpp_err"; then
19097   ac_cv_header_stdc=yes
19098 else
19099   echo "$as_me: failed program was:" >&5
19100   cat "conftest.$ac_ext" >&5
19101   ac_cv_header_stdc=no
19102 fi
19103 rm -f conftest.err "conftest.$ac_ext"
19104
19105 if test $ac_cv_header_stdc = yes; then
19106   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
19107   cat >"conftest.$ac_ext" <<_ACEOF
19108 #line 19108 "configure"
19109 #include "confdefs.h"
19110 #include <string.h>
19111
19112 _ACEOF
19113 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19114   $EGREP "memchr" >/dev/null 2>&1; then
19115   :
19116 else
19117   ac_cv_header_stdc=no
19118 fi
19119 rm -rf conftest*
19120
19121 fi
19122
19123 if test $ac_cv_header_stdc = yes; then
19124   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
19125   cat >"conftest.$ac_ext" <<_ACEOF
19126 #line 19126 "configure"
19127 #include "confdefs.h"
19128 #include <stdlib.h>
19129
19130 _ACEOF
19131 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19132   $EGREP "free" >/dev/null 2>&1; then
19133   :
19134 else
19135   ac_cv_header_stdc=no
19136 fi
19137 rm -rf conftest*
19138
19139 fi
19140
19141 if test $ac_cv_header_stdc = yes; then
19142   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
19143   if test "$cross_compiling" = yes; then
19144   :
19145 else
19146   cat >"conftest.$ac_ext" <<_ACEOF
19147 #line 19147 "configure"
19148 #include "confdefs.h"
19149 #include <ctype.h>
19150 #if ((' ' & 0x0FF) == 0x020)
19151 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
19152 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
19153 #else
19154 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
19155                      || ('j' <= (c) && (c) <= 'r') \
19156                      || ('s' <= (c) && (c) <= 'z'))
19157 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
19158 #endif
19159
19160 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
19161 int
19162 main (void)
19163 {
19164   int i;
19165   for (i = 0; i < 256; i++)
19166     if (XOR (islower (i), ISLOWER (i))
19167         || toupper (i) != TOUPPER (i))
19168       $ac_main_return(2);
19169   $ac_main_return (0);
19170 }
19171 _ACEOF
19172 rm -f "conftest$ac_exeext"
19173 if { (eval echo "$as_me:19173: \"$ac_link\"") >&5
19174   (eval $ac_link) 2>&5
19175   ac_status=$?
19176   echo "$as_me:19176: \$? = $ac_status" >&5
19177   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19178   { (eval echo "$as_me:19178: \"$ac_try\"") >&5
19179   (eval $ac_try) 2>&5
19180   ac_status=$?
19181   echo "$as_me:19181: \$? = $ac_status" >&5
19182   (exit "$ac_status"); }; }; then
19183   :
19184 else
19185   echo "$as_me: program exited with status $ac_status" >&5
19186 echo "$as_me: failed program was:" >&5
19187 cat "conftest.$ac_ext" >&5
19188 ac_cv_header_stdc=no
19189 fi
19190 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19191 fi
19192 fi
19193 fi
19194 echo "$as_me:19194: result: $ac_cv_header_stdc" >&5
19195 echo "${ECHO_T}$ac_cv_header_stdc" >&6
19196 if test $ac_cv_header_stdc = yes; then
19197
19198 cat >>confdefs.h <<\EOF
19199 #define STDC_HEADERS 1
19200 EOF
19201
19202 fi
19203
19204 ac_header_dirent=no
19205 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
19206   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
19207 echo "$as_me:19207: checking for $ac_hdr that defines DIR" >&5
19208 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
19209 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19210   echo $ECHO_N "(cached) $ECHO_C" >&6
19211 else
19212   cat >"conftest.$ac_ext" <<_ACEOF
19213 #line 19213 "configure"
19214 #include "confdefs.h"
19215 #include <sys/types.h>
19216 #include <$ac_hdr>
19217
19218 int
19219 main (void)
19220 {
19221 if ((DIR *) 0)
19222 return 0;
19223   ;
19224   return 0;
19225 }
19226 _ACEOF
19227 rm -f "conftest.$ac_objext"
19228 if { (eval echo "$as_me:19228: \"$ac_compile\"") >&5
19229   (eval $ac_compile) 2>&5
19230   ac_status=$?
19231   echo "$as_me:19231: \$? = $ac_status" >&5
19232   (exit "$ac_status"); } &&
19233          { ac_try='test -s "conftest.$ac_objext"'
19234   { (eval echo "$as_me:19234: \"$ac_try\"") >&5
19235   (eval $ac_try) 2>&5
19236   ac_status=$?
19237   echo "$as_me:19237: \$? = $ac_status" >&5
19238   (exit "$ac_status"); }; }; then
19239   eval "$as_ac_Header=yes"
19240 else
19241   echo "$as_me: failed program was:" >&5
19242 cat "conftest.$ac_ext" >&5
19243 eval "$as_ac_Header=no"
19244 fi
19245 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19246 fi
19247 echo "$as_me:19247: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19248 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19249 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19250   cat >>confdefs.h <<EOF
19251 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
19252 EOF
19253
19254 ac_header_dirent=$ac_hdr; break
19255 fi
19256
19257 done
19258 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
19259 if test $ac_header_dirent = dirent.h; then
19260   echo "$as_me:19260: checking for opendir in -ldir" >&5
19261 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
19262 if test "${ac_cv_lib_dir_opendir+set}" = set; then
19263   echo $ECHO_N "(cached) $ECHO_C" >&6
19264 else
19265   ac_check_lib_save_LIBS=$LIBS
19266 LIBS="-ldir  $LIBS"
19267 cat >"conftest.$ac_ext" <<_ACEOF
19268 #line 19268 "configure"
19269 #include "confdefs.h"
19270
19271 /* Override any gcc2 internal prototype to avoid an error.  */
19272 #ifdef __cplusplus
19273 extern "C"
19274 #endif
19275 /* We use char because int might match the return type of a gcc2
19276    builtin and then its argument prototype would still apply.  */
19277 char opendir ();
19278 int
19279 main (void)
19280 {
19281 opendir ();
19282   ;
19283   return 0;
19284 }
19285 _ACEOF
19286 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19287 if { (eval echo "$as_me:19287: \"$ac_link\"") >&5
19288   (eval $ac_link) 2>&5
19289   ac_status=$?
19290   echo "$as_me:19290: \$? = $ac_status" >&5
19291   (exit "$ac_status"); } &&
19292          { ac_try='test -s "conftest$ac_exeext"'
19293   { (eval echo "$as_me:19293: \"$ac_try\"") >&5
19294   (eval $ac_try) 2>&5
19295   ac_status=$?
19296   echo "$as_me:19296: \$? = $ac_status" >&5
19297   (exit "$ac_status"); }; }; then
19298   ac_cv_lib_dir_opendir=yes
19299 else
19300   echo "$as_me: failed program was:" >&5
19301 cat "conftest.$ac_ext" >&5
19302 ac_cv_lib_dir_opendir=no
19303 fi
19304 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19305 LIBS=$ac_check_lib_save_LIBS
19306 fi
19307 echo "$as_me:19307: result: $ac_cv_lib_dir_opendir" >&5
19308 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
19309 if test "$ac_cv_lib_dir_opendir" = yes; then
19310   LIBS="$LIBS -ldir"
19311 fi
19312
19313 else
19314   echo "$as_me:19314: checking for opendir in -lx" >&5
19315 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
19316 if test "${ac_cv_lib_x_opendir+set}" = set; then
19317   echo $ECHO_N "(cached) $ECHO_C" >&6
19318 else
19319   ac_check_lib_save_LIBS=$LIBS
19320 LIBS="-lx  $LIBS"
19321 cat >"conftest.$ac_ext" <<_ACEOF
19322 #line 19322 "configure"
19323 #include "confdefs.h"
19324
19325 /* Override any gcc2 internal prototype to avoid an error.  */
19326 #ifdef __cplusplus
19327 extern "C"
19328 #endif
19329 /* We use char because int might match the return type of a gcc2
19330    builtin and then its argument prototype would still apply.  */
19331 char opendir ();
19332 int
19333 main (void)
19334 {
19335 opendir ();
19336   ;
19337   return 0;
19338 }
19339 _ACEOF
19340 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19341 if { (eval echo "$as_me:19341: \"$ac_link\"") >&5
19342   (eval $ac_link) 2>&5
19343   ac_status=$?
19344   echo "$as_me:19344: \$? = $ac_status" >&5
19345   (exit "$ac_status"); } &&
19346          { ac_try='test -s "conftest$ac_exeext"'
19347   { (eval echo "$as_me:19347: \"$ac_try\"") >&5
19348   (eval $ac_try) 2>&5
19349   ac_status=$?
19350   echo "$as_me:19350: \$? = $ac_status" >&5
19351   (exit "$ac_status"); }; }; then
19352   ac_cv_lib_x_opendir=yes
19353 else
19354   echo "$as_me: failed program was:" >&5
19355 cat "conftest.$ac_ext" >&5
19356 ac_cv_lib_x_opendir=no
19357 fi
19358 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19359 LIBS=$ac_check_lib_save_LIBS
19360 fi
19361 echo "$as_me:19361: result: $ac_cv_lib_x_opendir" >&5
19362 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
19363 if test "$ac_cv_lib_x_opendir" = yes; then
19364   LIBS="$LIBS -lx"
19365 fi
19366
19367 fi
19368
19369 echo "$as_me:19369: checking whether time.h and sys/time.h may both be included" >&5
19370 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19371 if test "${ac_cv_header_time+set}" = set; then
19372   echo $ECHO_N "(cached) $ECHO_C" >&6
19373 else
19374   cat >"conftest.$ac_ext" <<_ACEOF
19375 #line 19375 "configure"
19376 #include "confdefs.h"
19377 #include <sys/types.h>
19378 #include <sys/time.h>
19379 #include <time.h>
19380
19381 int
19382 main (void)
19383 {
19384 if ((struct tm *) 0)
19385 return 0;
19386   ;
19387   return 0;
19388 }
19389 _ACEOF
19390 rm -f "conftest.$ac_objext"
19391 if { (eval echo "$as_me:19391: \"$ac_compile\"") >&5
19392   (eval $ac_compile) 2>&5
19393   ac_status=$?
19394   echo "$as_me:19394: \$? = $ac_status" >&5
19395   (exit "$ac_status"); } &&
19396          { ac_try='test -s "conftest.$ac_objext"'
19397   { (eval echo "$as_me:19397: \"$ac_try\"") >&5
19398   (eval $ac_try) 2>&5
19399   ac_status=$?
19400   echo "$as_me:19400: \$? = $ac_status" >&5
19401   (exit "$ac_status"); }; }; then
19402   ac_cv_header_time=yes
19403 else
19404   echo "$as_me: failed program was:" >&5
19405 cat "conftest.$ac_ext" >&5
19406 ac_cv_header_time=no
19407 fi
19408 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19409 fi
19410 echo "$as_me:19410: result: $ac_cv_header_time" >&5
19411 echo "${ECHO_T}$ac_cv_header_time" >&6
19412 if test $ac_cv_header_time = yes; then
19413
19414 cat >>confdefs.h <<\EOF
19415 #define TIME_WITH_SYS_TIME 1
19416 EOF
19417
19418 fi
19419
19420 cf_regex_func=no
19421 cf_regex_libs=
19422 case "$host_os" in
19423 (mingw*)
19424         # -lsystre -ltre -lintl -liconv
19425         echo "$as_me:19425: checking for regcomp in -lsystre" >&5
19426 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19427 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19428   echo $ECHO_N "(cached) $ECHO_C" >&6
19429 else
19430   ac_check_lib_save_LIBS=$LIBS
19431 LIBS="-lsystre  $LIBS"
19432 cat >"conftest.$ac_ext" <<_ACEOF
19433 #line 19433 "configure"
19434 #include "confdefs.h"
19435
19436 /* Override any gcc2 internal prototype to avoid an error.  */
19437 #ifdef __cplusplus
19438 extern "C"
19439 #endif
19440 /* We use char because int might match the return type of a gcc2
19441    builtin and then its argument prototype would still apply.  */
19442 char regcomp ();
19443 int
19444 main (void)
19445 {
19446 regcomp ();
19447   ;
19448   return 0;
19449 }
19450 _ACEOF
19451 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19452 if { (eval echo "$as_me:19452: \"$ac_link\"") >&5
19453   (eval $ac_link) 2>&5
19454   ac_status=$?
19455   echo "$as_me:19455: \$? = $ac_status" >&5
19456   (exit "$ac_status"); } &&
19457          { ac_try='test -s "conftest$ac_exeext"'
19458   { (eval echo "$as_me:19458: \"$ac_try\"") >&5
19459   (eval $ac_try) 2>&5
19460   ac_status=$?
19461   echo "$as_me:19461: \$? = $ac_status" >&5
19462   (exit "$ac_status"); }; }; then
19463   ac_cv_lib_systre_regcomp=yes
19464 else
19465   echo "$as_me: failed program was:" >&5
19466 cat "conftest.$ac_ext" >&5
19467 ac_cv_lib_systre_regcomp=no
19468 fi
19469 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19470 LIBS=$ac_check_lib_save_LIBS
19471 fi
19472 echo "$as_me:19472: result: $ac_cv_lib_systre_regcomp" >&5
19473 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19474 if test "$ac_cv_lib_systre_regcomp" = yes; then
19475
19476                 echo "$as_me:19476: checking for libiconv_open in -liconv" >&5
19477 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19478 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19479   echo $ECHO_N "(cached) $ECHO_C" >&6
19480 else
19481   ac_check_lib_save_LIBS=$LIBS
19482 LIBS="-liconv  $LIBS"
19483 cat >"conftest.$ac_ext" <<_ACEOF
19484 #line 19484 "configure"
19485 #include "confdefs.h"
19486
19487 /* Override any gcc2 internal prototype to avoid an error.  */
19488 #ifdef __cplusplus
19489 extern "C"
19490 #endif
19491 /* We use char because int might match the return type of a gcc2
19492    builtin and then its argument prototype would still apply.  */
19493 char libiconv_open ();
19494 int
19495 main (void)
19496 {
19497 libiconv_open ();
19498   ;
19499   return 0;
19500 }
19501 _ACEOF
19502 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19503 if { (eval echo "$as_me:19503: \"$ac_link\"") >&5
19504   (eval $ac_link) 2>&5
19505   ac_status=$?
19506   echo "$as_me:19506: \$? = $ac_status" >&5
19507   (exit "$ac_status"); } &&
19508          { ac_try='test -s "conftest$ac_exeext"'
19509   { (eval echo "$as_me:19509: \"$ac_try\"") >&5
19510   (eval $ac_try) 2>&5
19511   ac_status=$?
19512   echo "$as_me:19512: \$? = $ac_status" >&5
19513   (exit "$ac_status"); }; }; then
19514   ac_cv_lib_iconv_libiconv_open=yes
19515 else
19516   echo "$as_me: failed program was:" >&5
19517 cat "conftest.$ac_ext" >&5
19518 ac_cv_lib_iconv_libiconv_open=no
19519 fi
19520 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19521 LIBS=$ac_check_lib_save_LIBS
19522 fi
19523 echo "$as_me:19523: result: $ac_cv_lib_iconv_libiconv_open" >&5
19524 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19525 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19526
19527 cf_add_libs="$LIBS"
19528 # reverse order
19529 cf_add_0lib=
19530 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19531 # filter duplicates
19532 for cf_add_1lib in $cf_add_0lib; do
19533         for cf_add_2lib in $cf_add_libs; do
19534                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19535                         cf_add_1lib=
19536                         break
19537                 fi
19538         done
19539         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19540 done
19541 LIBS="$cf_add_libs"
19542
19543 fi
19544
19545                 echo "$as_me:19545: checking for libintl_gettext in -lintl" >&5
19546 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19547 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19548   echo $ECHO_N "(cached) $ECHO_C" >&6
19549 else
19550   ac_check_lib_save_LIBS=$LIBS
19551 LIBS="-lintl  $LIBS"
19552 cat >"conftest.$ac_ext" <<_ACEOF
19553 #line 19553 "configure"
19554 #include "confdefs.h"
19555
19556 /* Override any gcc2 internal prototype to avoid an error.  */
19557 #ifdef __cplusplus
19558 extern "C"
19559 #endif
19560 /* We use char because int might match the return type of a gcc2
19561    builtin and then its argument prototype would still apply.  */
19562 char libintl_gettext ();
19563 int
19564 main (void)
19565 {
19566 libintl_gettext ();
19567   ;
19568   return 0;
19569 }
19570 _ACEOF
19571 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19572 if { (eval echo "$as_me:19572: \"$ac_link\"") >&5
19573   (eval $ac_link) 2>&5
19574   ac_status=$?
19575   echo "$as_me:19575: \$? = $ac_status" >&5
19576   (exit "$ac_status"); } &&
19577          { ac_try='test -s "conftest$ac_exeext"'
19578   { (eval echo "$as_me:19578: \"$ac_try\"") >&5
19579   (eval $ac_try) 2>&5
19580   ac_status=$?
19581   echo "$as_me:19581: \$? = $ac_status" >&5
19582   (exit "$ac_status"); }; }; then
19583   ac_cv_lib_intl_libintl_gettext=yes
19584 else
19585   echo "$as_me: failed program was:" >&5
19586 cat "conftest.$ac_ext" >&5
19587 ac_cv_lib_intl_libintl_gettext=no
19588 fi
19589 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19590 LIBS=$ac_check_lib_save_LIBS
19591 fi
19592 echo "$as_me:19592: result: $ac_cv_lib_intl_libintl_gettext" >&5
19593 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19594 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19595
19596 cf_add_libs="$LIBS"
19597 # reverse order
19598 cf_add_0lib=
19599 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19600 # filter duplicates
19601 for cf_add_1lib in $cf_add_0lib; do
19602         for cf_add_2lib in $cf_add_libs; do
19603                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19604                         cf_add_1lib=
19605                         break
19606                 fi
19607         done
19608         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19609 done
19610 LIBS="$cf_add_libs"
19611
19612 fi
19613
19614                 echo "$as_me:19614: checking for tre_regcomp in -ltre" >&5
19615 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19616 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19617   echo $ECHO_N "(cached) $ECHO_C" >&6
19618 else
19619   ac_check_lib_save_LIBS=$LIBS
19620 LIBS="-ltre  $LIBS"
19621 cat >"conftest.$ac_ext" <<_ACEOF
19622 #line 19622 "configure"
19623 #include "confdefs.h"
19624
19625 /* Override any gcc2 internal prototype to avoid an error.  */
19626 #ifdef __cplusplus
19627 extern "C"
19628 #endif
19629 /* We use char because int might match the return type of a gcc2
19630    builtin and then its argument prototype would still apply.  */
19631 char tre_regcomp ();
19632 int
19633 main (void)
19634 {
19635 tre_regcomp ();
19636   ;
19637   return 0;
19638 }
19639 _ACEOF
19640 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19641 if { (eval echo "$as_me:19641: \"$ac_link\"") >&5
19642   (eval $ac_link) 2>&5
19643   ac_status=$?
19644   echo "$as_me:19644: \$? = $ac_status" >&5
19645   (exit "$ac_status"); } &&
19646          { ac_try='test -s "conftest$ac_exeext"'
19647   { (eval echo "$as_me:19647: \"$ac_try\"") >&5
19648   (eval $ac_try) 2>&5
19649   ac_status=$?
19650   echo "$as_me:19650: \$? = $ac_status" >&5
19651   (exit "$ac_status"); }; }; then
19652   ac_cv_lib_tre_tre_regcomp=yes
19653 else
19654   echo "$as_me: failed program was:" >&5
19655 cat "conftest.$ac_ext" >&5
19656 ac_cv_lib_tre_tre_regcomp=no
19657 fi
19658 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19659 LIBS=$ac_check_lib_save_LIBS
19660 fi
19661 echo "$as_me:19661: result: $ac_cv_lib_tre_tre_regcomp" >&5
19662 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19663 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19664
19665 cf_add_libs="$LIBS"
19666 # reverse order
19667 cf_add_0lib=
19668 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19669 # filter duplicates
19670 for cf_add_1lib in $cf_add_0lib; do
19671         for cf_add_2lib in $cf_add_libs; do
19672                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19673                         cf_add_1lib=
19674                         break
19675                 fi
19676         done
19677         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19678 done
19679 LIBS="$cf_add_libs"
19680
19681 fi
19682
19683 cf_add_libs="$LIBS"
19684 # reverse order
19685 cf_add_0lib=
19686 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19687 # filter duplicates
19688 for cf_add_1lib in $cf_add_0lib; do
19689         for cf_add_2lib in $cf_add_libs; do
19690                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19691                         cf_add_1lib=
19692                         break
19693                 fi
19694         done
19695         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19696 done
19697 LIBS="$cf_add_libs"
19698
19699                 cf_regex_func=regcomp
19700
19701 else
19702
19703                 echo "$as_me:19703: checking for regcomp in -lgnurx" >&5
19704 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19705 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19706   echo $ECHO_N "(cached) $ECHO_C" >&6
19707 else
19708   ac_check_lib_save_LIBS=$LIBS
19709 LIBS="-lgnurx  $LIBS"
19710 cat >"conftest.$ac_ext" <<_ACEOF
19711 #line 19711 "configure"
19712 #include "confdefs.h"
19713
19714 /* Override any gcc2 internal prototype to avoid an error.  */
19715 #ifdef __cplusplus
19716 extern "C"
19717 #endif
19718 /* We use char because int might match the return type of a gcc2
19719    builtin and then its argument prototype would still apply.  */
19720 char regcomp ();
19721 int
19722 main (void)
19723 {
19724 regcomp ();
19725   ;
19726   return 0;
19727 }
19728 _ACEOF
19729 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19730 if { (eval echo "$as_me:19730: \"$ac_link\"") >&5
19731   (eval $ac_link) 2>&5
19732   ac_status=$?
19733   echo "$as_me:19733: \$? = $ac_status" >&5
19734   (exit "$ac_status"); } &&
19735          { ac_try='test -s "conftest$ac_exeext"'
19736   { (eval echo "$as_me:19736: \"$ac_try\"") >&5
19737   (eval $ac_try) 2>&5
19738   ac_status=$?
19739   echo "$as_me:19739: \$? = $ac_status" >&5
19740   (exit "$ac_status"); }; }; then
19741   ac_cv_lib_gnurx_regcomp=yes
19742 else
19743   echo "$as_me: failed program was:" >&5
19744 cat "conftest.$ac_ext" >&5
19745 ac_cv_lib_gnurx_regcomp=no
19746 fi
19747 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19748 LIBS=$ac_check_lib_save_LIBS
19749 fi
19750 echo "$as_me:19750: result: $ac_cv_lib_gnurx_regcomp" >&5
19751 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19752 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19753
19754 cf_add_libs="$LIBS"
19755 # reverse order
19756 cf_add_0lib=
19757 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19758 # filter duplicates
19759 for cf_add_1lib in $cf_add_0lib; do
19760         for cf_add_2lib in $cf_add_libs; do
19761                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19762                         cf_add_1lib=
19763                         break
19764                 fi
19765         done
19766         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19767 done
19768 LIBS="$cf_add_libs"
19769
19770                         cf_regex_func=regcomp
19771 fi
19772
19773 fi
19774
19775         ;;
19776 (*)
19777         cf_regex_libs="regex re"
19778         echo "$as_me:19778: checking for regcomp" >&5
19779 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19780 if test "${ac_cv_func_regcomp+set}" = set; then
19781   echo $ECHO_N "(cached) $ECHO_C" >&6
19782 else
19783   cat >"conftest.$ac_ext" <<_ACEOF
19784 #line 19784 "configure"
19785 #include "confdefs.h"
19786 #define regcomp autoconf_temporary
19787 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19788 #undef regcomp
19789
19790 #ifdef __cplusplus
19791 extern "C"
19792 #endif
19793
19794 /* We use char because int might match the return type of a gcc2
19795    builtin and then its argument prototype would still apply.  */
19796 char regcomp (void);
19797
19798 int
19799 main (void)
19800 {
19801
19802 /* The GNU C library defines stubs for functions which it implements
19803     to always fail with ENOSYS.  Some functions are actually named
19804     something starting with __ and the normal name is an alias.  */
19805 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19806 #error found stub for regcomp
19807 #endif
19808
19809         return regcomp ();
19810   ;
19811   return 0;
19812 }
19813 _ACEOF
19814 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19815 if { (eval echo "$as_me:19815: \"$ac_link\"") >&5
19816   (eval $ac_link) 2>&5
19817   ac_status=$?
19818   echo "$as_me:19818: \$? = $ac_status" >&5
19819   (exit "$ac_status"); } &&
19820          { ac_try='test -s "conftest$ac_exeext"'
19821   { (eval echo "$as_me:19821: \"$ac_try\"") >&5
19822   (eval $ac_try) 2>&5
19823   ac_status=$?
19824   echo "$as_me:19824: \$? = $ac_status" >&5
19825   (exit "$ac_status"); }; }; then
19826   ac_cv_func_regcomp=yes
19827 else
19828   echo "$as_me: failed program was:" >&5
19829 cat "conftest.$ac_ext" >&5
19830 ac_cv_func_regcomp=no
19831 fi
19832 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19833 fi
19834 echo "$as_me:19834: result: $ac_cv_func_regcomp" >&5
19835 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19836 if test "$ac_cv_func_regcomp" = yes; then
19837   cf_regex_func=regcomp
19838 else
19839
19840                 for cf_regex_lib in $cf_regex_libs
19841                 do
19842                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19843 echo "$as_me:19843: checking for regcomp in -l$cf_regex_lib" >&5
19844 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19845 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19846   echo $ECHO_N "(cached) $ECHO_C" >&6
19847 else
19848   ac_check_lib_save_LIBS=$LIBS
19849 LIBS="-l$cf_regex_lib  $LIBS"
19850 cat >"conftest.$ac_ext" <<_ACEOF
19851 #line 19851 "configure"
19852 #include "confdefs.h"
19853
19854 /* Override any gcc2 internal prototype to avoid an error.  */
19855 #ifdef __cplusplus
19856 extern "C"
19857 #endif
19858 /* We use char because int might match the return type of a gcc2
19859    builtin and then its argument prototype would still apply.  */
19860 char regcomp ();
19861 int
19862 main (void)
19863 {
19864 regcomp ();
19865   ;
19866   return 0;
19867 }
19868 _ACEOF
19869 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19870 if { (eval echo "$as_me:19870: \"$ac_link\"") >&5
19871   (eval $ac_link) 2>&5
19872   ac_status=$?
19873   echo "$as_me:19873: \$? = $ac_status" >&5
19874   (exit "$ac_status"); } &&
19875          { ac_try='test -s "conftest$ac_exeext"'
19876   { (eval echo "$as_me:19876: \"$ac_try\"") >&5
19877   (eval $ac_try) 2>&5
19878   ac_status=$?
19879   echo "$as_me:19879: \$? = $ac_status" >&5
19880   (exit "$ac_status"); }; }; then
19881   eval "$as_ac_Lib=yes"
19882 else
19883   echo "$as_me: failed program was:" >&5
19884 cat "conftest.$ac_ext" >&5
19885 eval "$as_ac_Lib=no"
19886 fi
19887 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19888 LIBS=$ac_check_lib_save_LIBS
19889 fi
19890 echo "$as_me:19890: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19891 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19892 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19893
19894 cf_add_libs="$LIBS"
19895 # reverse order
19896 cf_add_0lib=
19897 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19898 # filter duplicates
19899 for cf_add_1lib in $cf_add_0lib; do
19900         for cf_add_2lib in $cf_add_libs; do
19901                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19902                         cf_add_1lib=
19903                         break
19904                 fi
19905         done
19906         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19907 done
19908 LIBS="$cf_add_libs"
19909
19910                                         cf_regex_func=regcomp
19911                                         break
19912 fi
19913
19914                 done
19915
19916 fi
19917
19918         ;;
19919 esac
19920
19921 if test "$cf_regex_func" = no ; then
19922         echo "$as_me:19922: checking for compile" >&5
19923 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19924 if test "${ac_cv_func_compile+set}" = set; then
19925   echo $ECHO_N "(cached) $ECHO_C" >&6
19926 else
19927   cat >"conftest.$ac_ext" <<_ACEOF
19928 #line 19928 "configure"
19929 #include "confdefs.h"
19930 #define compile autoconf_temporary
19931 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19932 #undef compile
19933
19934 #ifdef __cplusplus
19935 extern "C"
19936 #endif
19937
19938 /* We use char because int might match the return type of a gcc2
19939    builtin and then its argument prototype would still apply.  */
19940 char compile (void);
19941
19942 int
19943 main (void)
19944 {
19945
19946 /* The GNU C library defines stubs for functions which it implements
19947     to always fail with ENOSYS.  Some functions are actually named
19948     something starting with __ and the normal name is an alias.  */
19949 #if defined (__stub_compile) || defined (__stub___compile)
19950 #error found stub for compile
19951 #endif
19952
19953         return compile ();
19954   ;
19955   return 0;
19956 }
19957 _ACEOF
19958 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19959 if { (eval echo "$as_me:19959: \"$ac_link\"") >&5
19960   (eval $ac_link) 2>&5
19961   ac_status=$?
19962   echo "$as_me:19962: \$? = $ac_status" >&5
19963   (exit "$ac_status"); } &&
19964          { ac_try='test -s "conftest$ac_exeext"'
19965   { (eval echo "$as_me:19965: \"$ac_try\"") >&5
19966   (eval $ac_try) 2>&5
19967   ac_status=$?
19968   echo "$as_me:19968: \$? = $ac_status" >&5
19969   (exit "$ac_status"); }; }; then
19970   ac_cv_func_compile=yes
19971 else
19972   echo "$as_me: failed program was:" >&5
19973 cat "conftest.$ac_ext" >&5
19974 ac_cv_func_compile=no
19975 fi
19976 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19977 fi
19978 echo "$as_me:19978: result: $ac_cv_func_compile" >&5
19979 echo "${ECHO_T}$ac_cv_func_compile" >&6
19980 if test "$ac_cv_func_compile" = yes; then
19981   cf_regex_func=compile
19982 else
19983
19984                 echo "$as_me:19984: checking for compile in -lgen" >&5
19985 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19986 if test "${ac_cv_lib_gen_compile+set}" = set; then
19987   echo $ECHO_N "(cached) $ECHO_C" >&6
19988 else
19989   ac_check_lib_save_LIBS=$LIBS
19990 LIBS="-lgen  $LIBS"
19991 cat >"conftest.$ac_ext" <<_ACEOF
19992 #line 19992 "configure"
19993 #include "confdefs.h"
19994
19995 /* Override any gcc2 internal prototype to avoid an error.  */
19996 #ifdef __cplusplus
19997 extern "C"
19998 #endif
19999 /* We use char because int might match the return type of a gcc2
20000    builtin and then its argument prototype would still apply.  */
20001 char compile ();
20002 int
20003 main (void)
20004 {
20005 compile ();
20006   ;
20007   return 0;
20008 }
20009 _ACEOF
20010 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20011 if { (eval echo "$as_me:20011: \"$ac_link\"") >&5
20012   (eval $ac_link) 2>&5
20013   ac_status=$?
20014   echo "$as_me:20014: \$? = $ac_status" >&5
20015   (exit "$ac_status"); } &&
20016          { ac_try='test -s "conftest$ac_exeext"'
20017   { (eval echo "$as_me:20017: \"$ac_try\"") >&5
20018   (eval $ac_try) 2>&5
20019   ac_status=$?
20020   echo "$as_me:20020: \$? = $ac_status" >&5
20021   (exit "$ac_status"); }; }; then
20022   ac_cv_lib_gen_compile=yes
20023 else
20024   echo "$as_me: failed program was:" >&5
20025 cat "conftest.$ac_ext" >&5
20026 ac_cv_lib_gen_compile=no
20027 fi
20028 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20029 LIBS=$ac_check_lib_save_LIBS
20030 fi
20031 echo "$as_me:20031: result: $ac_cv_lib_gen_compile" >&5
20032 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
20033 if test "$ac_cv_lib_gen_compile" = yes; then
20034
20035 cf_add_libs="$LIBS"
20036 # reverse order
20037 cf_add_0lib=
20038 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20039 # filter duplicates
20040 for cf_add_1lib in $cf_add_0lib; do
20041         for cf_add_2lib in $cf_add_libs; do
20042                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20043                         cf_add_1lib=
20044                         break
20045                 fi
20046         done
20047         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20048 done
20049 LIBS="$cf_add_libs"
20050
20051                                 cf_regex_func=compile
20052 fi
20053
20054 fi
20055
20056 fi
20057
20058 if test "$cf_regex_func" = no ; then
20059         { echo "$as_me:20059: WARNING: cannot find regular expression library" >&5
20060 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20061 fi
20062
20063 echo "$as_me:20063: checking for regular-expression headers" >&5
20064 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20065 if test "${cf_cv_regex_hdrs+set}" = set; then
20066   echo $ECHO_N "(cached) $ECHO_C" >&6
20067 else
20068
20069 cf_cv_regex_hdrs=no
20070 case "$cf_regex_func" in
20071 (compile)
20072         for cf_regex_hdr in regexp.h regexpr.h
20073         do
20074                 cat >"conftest.$ac_ext" <<_ACEOF
20075 #line 20075 "configure"
20076 #include "confdefs.h"
20077 #include <$cf_regex_hdr>
20078 int
20079 main (void)
20080 {
20081
20082                         char *p = compile("", "", "", 0);
20083                         int x = step("", "");
20084                         (void)p;
20085                         (void)x;
20086
20087   ;
20088   return 0;
20089 }
20090 _ACEOF
20091 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20092 if { (eval echo "$as_me:20092: \"$ac_link\"") >&5
20093   (eval $ac_link) 2>&5
20094   ac_status=$?
20095   echo "$as_me:20095: \$? = $ac_status" >&5
20096   (exit "$ac_status"); } &&
20097          { ac_try='test -s "conftest$ac_exeext"'
20098   { (eval echo "$as_me:20098: \"$ac_try\"") >&5
20099   (eval $ac_try) 2>&5
20100   ac_status=$?
20101   echo "$as_me:20101: \$? = $ac_status" >&5
20102   (exit "$ac_status"); }; }; then
20103
20104                         cf_cv_regex_hdrs=$cf_regex_hdr
20105                         break
20106
20107 else
20108   echo "$as_me: failed program was:" >&5
20109 cat "conftest.$ac_ext" >&5
20110 fi
20111 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20112         done
20113         ;;
20114 (*)
20115         for cf_regex_hdr in regex.h
20116         do
20117                 cat >"conftest.$ac_ext" <<_ACEOF
20118 #line 20118 "configure"
20119 #include "confdefs.h"
20120 #include <sys/types.h>
20121 #include <$cf_regex_hdr>
20122 int
20123 main (void)
20124 {
20125
20126                         regex_t *p = 0;
20127                         int x = regcomp(p, "", 0);
20128                         int y = regexec(p, "", 0, 0, 0);
20129                         (void)x;
20130                         (void)y;
20131                         regfree(p);
20132
20133   ;
20134   return 0;
20135 }
20136 _ACEOF
20137 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20138 if { (eval echo "$as_me:20138: \"$ac_link\"") >&5
20139   (eval $ac_link) 2>&5
20140   ac_status=$?
20141   echo "$as_me:20141: \$? = $ac_status" >&5
20142   (exit "$ac_status"); } &&
20143          { ac_try='test -s "conftest$ac_exeext"'
20144   { (eval echo "$as_me:20144: \"$ac_try\"") >&5
20145   (eval $ac_try) 2>&5
20146   ac_status=$?
20147   echo "$as_me:20147: \$? = $ac_status" >&5
20148   (exit "$ac_status"); }; }; then
20149
20150                         cf_cv_regex_hdrs=$cf_regex_hdr
20151                         break
20152
20153 else
20154   echo "$as_me: failed program was:" >&5
20155 cat "conftest.$ac_ext" >&5
20156 fi
20157 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20158         done
20159         ;;
20160 esac
20161
20162 fi
20163 echo "$as_me:20163: result: $cf_cv_regex_hdrs" >&5
20164 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20165
20166 case "$cf_cv_regex_hdrs" in
20167         (no)            { echo "$as_me:20167: WARNING: no regular expression header found" >&5
20168 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20169         (regex.h)
20170 cat >>confdefs.h <<\EOF
20171 #define HAVE_REGEX_H_FUNCS 1
20172 EOF
20173  ;;
20174         (regexp.h)
20175 cat >>confdefs.h <<\EOF
20176 #define HAVE_REGEXP_H_FUNCS 1
20177 EOF
20178  ;;
20179         (regexpr.h)
20180 cat >>confdefs.h <<\EOF
20181 #define HAVE_REGEXPR_H_FUNCS 1
20182 EOF
20183  ;;
20184 esac
20185
20186 for ac_header in \
20187 fcntl.h \
20188 getopt.h \
20189 limits.h \
20190 locale.h \
20191 math.h \
20192 poll.h \
20193 sys/ioctl.h \
20194 sys/param.h \
20195 sys/poll.h \
20196 sys/select.h \
20197 sys/time.h \
20198 sys/times.h \
20199 unistd.h \
20200 wctype.h \
20201
20202 do
20203 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20204 echo "$as_me:20204: checking for $ac_header" >&5
20205 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20206 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20207   echo $ECHO_N "(cached) $ECHO_C" >&6
20208 else
20209   cat >"conftest.$ac_ext" <<_ACEOF
20210 #line 20210 "configure"
20211 #include "confdefs.h"
20212 #include <$ac_header>
20213 _ACEOF
20214 if { (eval echo "$as_me:20214: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20215   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20216   ac_status=$?
20217   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20218   rm -f conftest.er1
20219   cat conftest.err >&5
20220   echo "$as_me:20220: \$? = $ac_status" >&5
20221   (exit "$ac_status"); } >/dev/null; then
20222   if test -s conftest.err; then
20223     ac_cpp_err=$ac_c_preproc_warn_flag
20224   else
20225     ac_cpp_err=
20226   fi
20227 else
20228   ac_cpp_err=yes
20229 fi
20230 if test -z "$ac_cpp_err"; then
20231   eval "$as_ac_Header=yes"
20232 else
20233   echo "$as_me: failed program was:" >&5
20234   cat "conftest.$ac_ext" >&5
20235   eval "$as_ac_Header=no"
20236 fi
20237 rm -f conftest.err "conftest.$ac_ext"
20238 fi
20239 echo "$as_me:20239: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20240 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20241 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20242   cat >>confdefs.h <<EOF
20243 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20244 EOF
20245
20246 fi
20247 done
20248
20249 for ac_header in unistd.h getopt.h
20250 do
20251 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20252 echo "$as_me:20252: checking for $ac_header" >&5
20253 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20254 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20255   echo $ECHO_N "(cached) $ECHO_C" >&6
20256 else
20257   cat >"conftest.$ac_ext" <<_ACEOF
20258 #line 20258 "configure"
20259 #include "confdefs.h"
20260 #include <$ac_header>
20261 _ACEOF
20262 if { (eval echo "$as_me:20262: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20263   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20264   ac_status=$?
20265   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20266   rm -f conftest.er1
20267   cat conftest.err >&5
20268   echo "$as_me:20268: \$? = $ac_status" >&5
20269   (exit "$ac_status"); } >/dev/null; then
20270   if test -s conftest.err; then
20271     ac_cpp_err=$ac_c_preproc_warn_flag
20272   else
20273     ac_cpp_err=
20274   fi
20275 else
20276   ac_cpp_err=yes
20277 fi
20278 if test -z "$ac_cpp_err"; then
20279   eval "$as_ac_Header=yes"
20280 else
20281   echo "$as_me: failed program was:" >&5
20282   cat "conftest.$ac_ext" >&5
20283   eval "$as_ac_Header=no"
20284 fi
20285 rm -f conftest.err "conftest.$ac_ext"
20286 fi
20287 echo "$as_me:20287: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20288 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20289 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20290   cat >>confdefs.h <<EOF
20291 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20292 EOF
20293
20294 fi
20295 done
20296
20297 echo "$as_me:20297: checking for header declaring getopt variables" >&5
20298 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20299 if test "${cf_cv_getopt_header+set}" = set; then
20300   echo $ECHO_N "(cached) $ECHO_C" >&6
20301 else
20302
20303 cf_cv_getopt_header=none
20304 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20305 do
20306 cat >"conftest.$ac_ext" <<_ACEOF
20307 #line 20307 "configure"
20308 #include "confdefs.h"
20309
20310 #include <$cf_header>
20311 int
20312 main (void)
20313 {
20314 int x = optind; char *y = optarg; (void)x; (void)y
20315   ;
20316   return 0;
20317 }
20318 _ACEOF
20319 rm -f "conftest.$ac_objext"
20320 if { (eval echo "$as_me:20320: \"$ac_compile\"") >&5
20321   (eval $ac_compile) 2>&5
20322   ac_status=$?
20323   echo "$as_me:20323: \$? = $ac_status" >&5
20324   (exit "$ac_status"); } &&
20325          { ac_try='test -s "conftest.$ac_objext"'
20326   { (eval echo "$as_me:20326: \"$ac_try\"") >&5
20327   (eval $ac_try) 2>&5
20328   ac_status=$?
20329   echo "$as_me:20329: \$? = $ac_status" >&5
20330   (exit "$ac_status"); }; }; then
20331   cf_cv_getopt_header=$cf_header
20332  break
20333 else
20334   echo "$as_me: failed program was:" >&5
20335 cat "conftest.$ac_ext" >&5
20336 fi
20337 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20338 done
20339
20340 fi
20341 echo "$as_me:20341: result: $cf_cv_getopt_header" >&5
20342 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20343 if test "$cf_cv_getopt_header" != none ; then
20344
20345 cat >>confdefs.h <<\EOF
20346 #define HAVE_GETOPT_HEADER 1
20347 EOF
20348
20349 fi
20350 if test "$cf_cv_getopt_header" = getopt.h ; then
20351
20352 cat >>confdefs.h <<\EOF
20353 #define NEED_GETOPT_H 1
20354 EOF
20355
20356 fi
20357
20358 echo "$as_me:20358: checking if external environ is declared" >&5
20359 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20360 if test "${cf_cv_dcl_environ+set}" = set; then
20361   echo $ECHO_N "(cached) $ECHO_C" >&6
20362 else
20363
20364     cat >"conftest.$ac_ext" <<_ACEOF
20365 #line 20365 "configure"
20366 #include "confdefs.h"
20367
20368 #ifdef HAVE_STDLIB_H
20369 #include <stdlib.h>
20370 #endif
20371 #include <unistd.h>
20372 int
20373 main (void)
20374 {
20375 int x = (int) environ
20376   ;
20377   return 0;
20378 }
20379 _ACEOF
20380 rm -f "conftest.$ac_objext"
20381 if { (eval echo "$as_me:20381: \"$ac_compile\"") >&5
20382   (eval $ac_compile) 2>&5
20383   ac_status=$?
20384   echo "$as_me:20384: \$? = $ac_status" >&5
20385   (exit "$ac_status"); } &&
20386          { ac_try='test -s "conftest.$ac_objext"'
20387   { (eval echo "$as_me:20387: \"$ac_try\"") >&5
20388   (eval $ac_try) 2>&5
20389   ac_status=$?
20390   echo "$as_me:20390: \$? = $ac_status" >&5
20391   (exit "$ac_status"); }; }; then
20392   cf_cv_dcl_environ=yes
20393 else
20394   echo "$as_me: failed program was:" >&5
20395 cat "conftest.$ac_ext" >&5
20396 cf_cv_dcl_environ=no
20397 fi
20398 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20399
20400 fi
20401 echo "$as_me:20401: result: $cf_cv_dcl_environ" >&5
20402 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20403
20404 if test "$cf_cv_dcl_environ" = no ; then
20405
20406 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20407
20408     cat >>confdefs.h <<EOF
20409 #define $cf_result 1
20410 EOF
20411
20412 fi
20413
20414 # It's possible (for near-UNIX clones) that the data doesn't exist
20415
20416 echo "$as_me:20416: checking if external environ exists" >&5
20417 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20418 if test "${cf_cv_have_environ+set}" = set; then
20419   echo $ECHO_N "(cached) $ECHO_C" >&6
20420 else
20421
20422         cat >"conftest.$ac_ext" <<_ACEOF
20423 #line 20423 "configure"
20424 #include "confdefs.h"
20425
20426 #undef environ
20427 extern int environ;
20428
20429 int
20430 main (void)
20431 {
20432 environ = 2
20433   ;
20434   return 0;
20435 }
20436 _ACEOF
20437 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20438 if { (eval echo "$as_me:20438: \"$ac_link\"") >&5
20439   (eval $ac_link) 2>&5
20440   ac_status=$?
20441   echo "$as_me:20441: \$? = $ac_status" >&5
20442   (exit "$ac_status"); } &&
20443          { ac_try='test -s "conftest$ac_exeext"'
20444   { (eval echo "$as_me:20444: \"$ac_try\"") >&5
20445   (eval $ac_try) 2>&5
20446   ac_status=$?
20447   echo "$as_me:20447: \$? = $ac_status" >&5
20448   (exit "$ac_status"); }; }; then
20449   cf_cv_have_environ=yes
20450 else
20451   echo "$as_me: failed program was:" >&5
20452 cat "conftest.$ac_ext" >&5
20453 cf_cv_have_environ=no
20454 fi
20455 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20456
20457 fi
20458 echo "$as_me:20458: result: $cf_cv_have_environ" >&5
20459 echo "${ECHO_T}$cf_cv_have_environ" >&6
20460
20461 if test "$cf_cv_have_environ" = yes ; then
20462
20463 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20464
20465         cat >>confdefs.h <<EOF
20466 #define $cf_result 1
20467 EOF
20468
20469 fi
20470
20471 echo "$as_me:20471: checking for getenv" >&5
20472 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20473 if test "${ac_cv_func_getenv+set}" = set; then
20474   echo $ECHO_N "(cached) $ECHO_C" >&6
20475 else
20476   cat >"conftest.$ac_ext" <<_ACEOF
20477 #line 20477 "configure"
20478 #include "confdefs.h"
20479 #define getenv autoconf_temporary
20480 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20481 #undef getenv
20482
20483 #ifdef __cplusplus
20484 extern "C"
20485 #endif
20486
20487 /* We use char because int might match the return type of a gcc2
20488    builtin and then its argument prototype would still apply.  */
20489 char getenv (void);
20490
20491 int
20492 main (void)
20493 {
20494
20495 /* The GNU C library defines stubs for functions which it implements
20496     to always fail with ENOSYS.  Some functions are actually named
20497     something starting with __ and the normal name is an alias.  */
20498 #if defined (__stub_getenv) || defined (__stub___getenv)
20499 #error found stub for getenv
20500 #endif
20501
20502         return getenv ();
20503   ;
20504   return 0;
20505 }
20506 _ACEOF
20507 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20508 if { (eval echo "$as_me:20508: \"$ac_link\"") >&5
20509   (eval $ac_link) 2>&5
20510   ac_status=$?
20511   echo "$as_me:20511: \$? = $ac_status" >&5
20512   (exit "$ac_status"); } &&
20513          { ac_try='test -s "conftest$ac_exeext"'
20514   { (eval echo "$as_me:20514: \"$ac_try\"") >&5
20515   (eval $ac_try) 2>&5
20516   ac_status=$?
20517   echo "$as_me:20517: \$? = $ac_status" >&5
20518   (exit "$ac_status"); }; }; then
20519   ac_cv_func_getenv=yes
20520 else
20521   echo "$as_me: failed program was:" >&5
20522 cat "conftest.$ac_ext" >&5
20523 ac_cv_func_getenv=no
20524 fi
20525 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20526 fi
20527 echo "$as_me:20527: result: $ac_cv_func_getenv" >&5
20528 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20529
20530 for ac_func in putenv setenv strdup
20531 do
20532 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20533 echo "$as_me:20533: checking for $ac_func" >&5
20534 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20535 if eval "test \"\${$as_ac_var+set}\" = set"; then
20536   echo $ECHO_N "(cached) $ECHO_C" >&6
20537 else
20538   cat >"conftest.$ac_ext" <<_ACEOF
20539 #line 20539 "configure"
20540 #include "confdefs.h"
20541 #define $ac_func autoconf_temporary
20542 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20543 #undef $ac_func
20544
20545 #ifdef __cplusplus
20546 extern "C"
20547 #endif
20548
20549 /* We use char because int might match the return type of a gcc2
20550    builtin and then its argument prototype would still apply.  */
20551 char $ac_func (void);
20552
20553 int
20554 main (void)
20555 {
20556
20557 /* The GNU C library defines stubs for functions which it implements
20558     to always fail with ENOSYS.  Some functions are actually named
20559     something starting with __ and the normal name is an alias.  */
20560 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20561 #error found stub for $ac_func
20562 #endif
20563
20564         return $ac_func ();
20565   ;
20566   return 0;
20567 }
20568 _ACEOF
20569 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20570 if { (eval echo "$as_me:20570: \"$ac_link\"") >&5
20571   (eval $ac_link) 2>&5
20572   ac_status=$?
20573   echo "$as_me:20573: \$? = $ac_status" >&5
20574   (exit "$ac_status"); } &&
20575          { ac_try='test -s "conftest$ac_exeext"'
20576   { (eval echo "$as_me:20576: \"$ac_try\"") >&5
20577   (eval $ac_try) 2>&5
20578   ac_status=$?
20579   echo "$as_me:20579: \$? = $ac_status" >&5
20580   (exit "$ac_status"); }; }; then
20581   eval "$as_ac_var=yes"
20582 else
20583   echo "$as_me: failed program was:" >&5
20584 cat "conftest.$ac_ext" >&5
20585 eval "$as_ac_var=no"
20586 fi
20587 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20588 fi
20589 echo "$as_me:20589: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20590 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20591 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20592   cat >>confdefs.h <<EOF
20593 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20594 EOF
20595
20596 fi
20597 done
20598
20599 echo "$as_me:20599: checking if getenv returns consistent values" >&5
20600 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20601 if test "${cf_cv_consistent_getenv+set}" = set; then
20602   echo $ECHO_N "(cached) $ECHO_C" >&6
20603 else
20604
20605 if test "$cross_compiling" = yes; then
20606   cf_cv_consistent_getenv=unknown
20607 else
20608   cat >"conftest.$ac_ext" <<_ACEOF
20609 #line 20609 "configure"
20610 #include "confdefs.h"
20611
20612 #include <stdlib.h>
20613 #include <unistd.h>
20614 #include <stdio.h>
20615 #include <string.h>
20616 #include <sys/types.h>
20617
20618 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20619 extern char **environ;  /* POSIX, but some systems are not... */
20620 #endif
20621
20622 #if defined(HAVE_STRDUP)
20623 #define str_alloc(s) strdup(s)
20624 #else
20625 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20626 #endif
20627
20628 static void set_value(const char *name, const char *value)
20629 {
20630 #if defined(HAVE_SETENV)
20631         setenv(name, value, 1);
20632 #elif defined(HAVE_PUTENV)
20633         char buffer[1024];
20634         sprintf(buffer, "%s=%s", name, value);
20635         putenv(str_alloc(buffer));
20636 #else
20637 #error neither putenv/setenv found
20638 #endif
20639 }
20640 int main(void)
20641 {
20642         int pass;
20643         size_t numenv, limit, j;
20644         char **mynames;
20645         char **myvalues;
20646         char **mypointer;
20647         char *equals;
20648         for (numenv = 0; environ[numenv]; ++numenv) ;
20649         limit = numenv + 10;
20650         mynames = (char **) calloc(limit + 1, sizeof(char *));
20651         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20652         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20653 #if defined(HAVE_ENVIRON)
20654         for (j = 0; environ[j]; ++j) {
20655                 mynames[j] = str_alloc(environ[j]);
20656                 equals = strchr(mynames[j], '=');
20657                 if (equals != 0) {
20658                         *equals++ = '\\0';
20659                         myvalues[j] = str_alloc(equals);
20660                 } else {
20661                         myvalues[j] = str_alloc("");
20662                 }
20663         }
20664 #endif
20665         for (j = numenv; j < limit; ++j) {
20666                 char name[80];
20667                 char value[80];
20668                 size_t found;
20669                 size_t k = 0;
20670                 do {
20671                         size_t jk;
20672                         found = 0;
20673                         sprintf(name, "TERM%lu", (unsigned long) k);
20674                         for (jk = 0; jk < j; ++jk) {
20675                                 if (!strcmp(name, mynames[jk])) {
20676                                         found = 1;
20677                                         ++k;
20678                                         break;
20679                                 }
20680                         }
20681                 } while (found);
20682                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20683                 set_value(name, value);
20684                 mynames[j] = str_alloc(name);
20685                 myvalues[j] = str_alloc(value);
20686         }
20687         for (pass = 0; pass < 3; ++pass) {
20688                 for (j = 0; j < limit; ++j) {
20689                         char *value = getenv(mynames[j]);
20690                         if (pass) {
20691                                 if (value == 0) {
20692                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20693                                         ${cf_cv_main_return:-return}(1);
20694                                 } else if (value != mypointer[j]) {
20695                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20696                                         ${cf_cv_main_return:-return}(1);
20697                                 } else if (strcmp(value, myvalues[j])) {
20698                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20699                                         ${cf_cv_main_return:-return}(1);
20700                                 }
20701                         } else {
20702                                 size_t k;
20703                                 mypointer[j] = value;
20704                                 for (k = 0; k < j; ++k) {
20705                                         if (mypointer[j] == mypointer[k]) {
20706                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20707                                                 ${cf_cv_main_return:-return}(1);
20708                                         }
20709                                 }
20710                         }
20711                 }
20712         }
20713         ${cf_cv_main_return:-return}(0);
20714 }
20715
20716 _ACEOF
20717 rm -f "conftest$ac_exeext"
20718 if { (eval echo "$as_me:20718: \"$ac_link\"") >&5
20719   (eval $ac_link) 2>&5
20720   ac_status=$?
20721   echo "$as_me:20721: \$? = $ac_status" >&5
20722   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20723   { (eval echo "$as_me:20723: \"$ac_try\"") >&5
20724   (eval $ac_try) 2>&5
20725   ac_status=$?
20726   echo "$as_me:20726: \$? = $ac_status" >&5
20727   (exit "$ac_status"); }; }; then
20728   cf_cv_consistent_getenv=yes
20729 else
20730   echo "$as_me: program exited with status $ac_status" >&5
20731 echo "$as_me: failed program was:" >&5
20732 cat "conftest.$ac_ext" >&5
20733 cf_cv_consistent_getenv=no
20734 fi
20735 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20736 fi
20737
20738 fi
20739 echo "$as_me:20739: result: $cf_cv_consistent_getenv" >&5
20740 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20741
20742 if test "x$cf_cv_consistent_getenv" = xno
20743 then
20744
20745 cat >>confdefs.h <<\EOF
20746 #define HAVE_CONSISTENT_GETENV 1
20747 EOF
20748
20749 fi
20750
20751 if test "x$cf_cv_consistent_getenv" = xno && \
20752         test "x$cf_with_trace" = xyes
20753 then
20754         { echo "$as_me:20754: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20755 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20756 fi
20757
20758 echo "$as_me:20758: checking if sys/time.h works with sys/select.h" >&5
20759 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20760 if test "${cf_cv_sys_time_select+set}" = set; then
20761   echo $ECHO_N "(cached) $ECHO_C" >&6
20762 else
20763
20764 cat >"conftest.$ac_ext" <<_ACEOF
20765 #line 20765 "configure"
20766 #include "confdefs.h"
20767
20768 #include <sys/types.h>
20769 #ifdef HAVE_SYS_TIME_H
20770 #include <sys/time.h>
20771 #endif
20772 #ifdef HAVE_SYS_SELECT_H
20773 #include <sys/select.h>
20774 #endif
20775
20776 int
20777 main (void)
20778 {
20779
20780   ;
20781   return 0;
20782 }
20783 _ACEOF
20784 rm -f "conftest.$ac_objext"
20785 if { (eval echo "$as_me:20785: \"$ac_compile\"") >&5
20786   (eval $ac_compile) 2>&5
20787   ac_status=$?
20788   echo "$as_me:20788: \$? = $ac_status" >&5
20789   (exit "$ac_status"); } &&
20790          { ac_try='test -s "conftest.$ac_objext"'
20791   { (eval echo "$as_me:20791: \"$ac_try\"") >&5
20792   (eval $ac_try) 2>&5
20793   ac_status=$?
20794   echo "$as_me:20794: \$? = $ac_status" >&5
20795   (exit "$ac_status"); }; }; then
20796   cf_cv_sys_time_select=yes
20797 else
20798   echo "$as_me: failed program was:" >&5
20799 cat "conftest.$ac_ext" >&5
20800 cf_cv_sys_time_select=no
20801 fi
20802 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20803
20804 fi
20805
20806 echo "$as_me:20806: result: $cf_cv_sys_time_select" >&5
20807 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20808 test "$cf_cv_sys_time_select" = yes &&
20809 cat >>confdefs.h <<\EOF
20810 #define HAVE_SYS_TIME_SELECT 1
20811 EOF
20812
20813 ###     checks for compiler characteristics
20814 ac_ext=c
20815 ac_cpp='$CPP $CPPFLAGS'
20816 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20817 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20818 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20819 ac_main_return="return"
20820
20821 echo "$as_me:20821: checking for an ANSI C-conforming const" >&5
20822 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20823 if test "${ac_cv_c_const+set}" = set; then
20824   echo $ECHO_N "(cached) $ECHO_C" >&6
20825 else
20826   cat >"conftest.$ac_ext" <<_ACEOF
20827 #line 20827 "configure"
20828 #include "confdefs.h"
20829
20830 int
20831 main (void)
20832 {
20833 /* FIXME: Include the comments suggested by Paul. */
20834 #ifndef __cplusplus
20835   /* Ultrix mips cc rejects this.  */
20836   typedef int charset[2];
20837   const charset x;
20838   /* SunOS 4.1.1 cc rejects this.  */
20839   char const *const *ccp;
20840   char **p;
20841   /* NEC SVR4.0.2 mips cc rejects this.  */
20842   struct point {int x, y;};
20843   static struct point const zero = {0,0};
20844   /* AIX XL C 1.02.0.0 rejects this.
20845      It does not let you subtract one const X* pointer from another in
20846      an arm of an if-expression whose if-part is not a constant
20847      expression */
20848   const char *g = "string";
20849   ccp = &g + (g ? g-g : 0);
20850   /* HPUX 7.0 cc rejects these. */
20851   ++ccp;
20852   p = (char**) ccp;
20853   ccp = (char const *const *) p;
20854   { /* SCO 3.2v4 cc rejects this.  */
20855     char *t;
20856     char const *s = 0 ? (char *) 0 : (char const *) 0;
20857
20858     *t++ = 0;
20859   }
20860   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20861     int x[] = {25, 17};
20862     const int *foo = &x[0];
20863     ++foo;
20864   }
20865   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20866     typedef const int *iptr;
20867     iptr p = 0;
20868     ++p;
20869   }
20870   { /* AIX XL C 1.02.0.0 rejects this saying
20871        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20872     struct s { int j; const int *ap[3]; };
20873     struct s *b; b->j = 5;
20874   }
20875   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20876     const int foo = 10;
20877   }
20878 #endif
20879
20880   ;
20881   return 0;
20882 }
20883 _ACEOF
20884 rm -f "conftest.$ac_objext"
20885 if { (eval echo "$as_me:20885: \"$ac_compile\"") >&5
20886   (eval $ac_compile) 2>&5
20887   ac_status=$?
20888   echo "$as_me:20888: \$? = $ac_status" >&5
20889   (exit "$ac_status"); } &&
20890          { ac_try='test -s "conftest.$ac_objext"'
20891   { (eval echo "$as_me:20891: \"$ac_try\"") >&5
20892   (eval $ac_try) 2>&5
20893   ac_status=$?
20894   echo "$as_me:20894: \$? = $ac_status" >&5
20895   (exit "$ac_status"); }; }; then
20896   ac_cv_c_const=yes
20897 else
20898   echo "$as_me: failed program was:" >&5
20899 cat "conftest.$ac_ext" >&5
20900 ac_cv_c_const=no
20901 fi
20902 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20903 fi
20904 echo "$as_me:20904: result: $ac_cv_c_const" >&5
20905 echo "${ECHO_T}$ac_cv_c_const" >&6
20906 if test $ac_cv_c_const = no; then
20907
20908 cat >>confdefs.h <<\EOF
20909 #define const
20910 EOF
20911
20912 fi
20913
20914 echo "$as_me:20914: checking for inline" >&5
20915 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20916 if test "${ac_cv_c_inline+set}" = set; then
20917   echo $ECHO_N "(cached) $ECHO_C" >&6
20918 else
20919   ac_cv_c_inline=no
20920 for ac_kw in inline __inline__ __inline; do
20921   cat >"conftest.$ac_ext" <<_ACEOF
20922 #line 20922 "configure"
20923 #include "confdefs.h"
20924 #ifndef __cplusplus
20925 static $ac_kw int static_foo () {return 0; }
20926 $ac_kw int foo () {return 0; }
20927 #endif
20928
20929 _ACEOF
20930 rm -f "conftest.$ac_objext"
20931 if { (eval echo "$as_me:20931: \"$ac_compile\"") >&5
20932   (eval $ac_compile) 2>&5
20933   ac_status=$?
20934   echo "$as_me:20934: \$? = $ac_status" >&5
20935   (exit "$ac_status"); } &&
20936          { ac_try='test -s "conftest.$ac_objext"'
20937   { (eval echo "$as_me:20937: \"$ac_try\"") >&5
20938   (eval $ac_try) 2>&5
20939   ac_status=$?
20940   echo "$as_me:20940: \$? = $ac_status" >&5
20941   (exit "$ac_status"); }; }; then
20942   ac_cv_c_inline=$ac_kw; break
20943 else
20944   echo "$as_me: failed program was:" >&5
20945 cat "conftest.$ac_ext" >&5
20946 fi
20947 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20948 done
20949
20950 fi
20951 echo "$as_me:20951: result: $ac_cv_c_inline" >&5
20952 echo "${ECHO_T}$ac_cv_c_inline" >&6
20953 case $ac_cv_c_inline in
20954   inline | yes) ;;
20955   no)
20956 cat >>confdefs.h <<\EOF
20957 #define inline
20958 EOF
20959  ;;
20960   *)  cat >>confdefs.h <<EOF
20961 #define inline $ac_cv_c_inline
20962 EOF
20963  ;;
20964 esac
20965
20966 NCURSES_INLINE=
20967 if test "$ac_cv_c_inline" != no ; then
20968         NCURSES_INLINE=inline
20969         if test "$INTEL_COMPILER" = yes
20970         then
20971                 :
20972         elif test "$CLANG_COMPILER" = yes
20973         then
20974                 :
20975         elif test "$GCC" = yes
20976         then
20977                 echo "$as_me:20977: checking if $CC supports options to tune inlining" >&5
20978 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20979 if test "${cf_cv_gcc_inline+set}" = set; then
20980   echo $ECHO_N "(cached) $ECHO_C" >&6
20981 else
20982
20983                 cf_save_CFLAGS=$CFLAGS
20984                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20985                 cat >"conftest.$ac_ext" <<_ACEOF
20986 #line 20986 "configure"
20987 #include "confdefs.h"
20988 inline int foo(void) { return 1; }
20989 int
20990 main (void)
20991 {
20992 ${cf_cv_main_return:-return} foo()
20993   ;
20994   return 0;
20995 }
20996 _ACEOF
20997 rm -f "conftest.$ac_objext"
20998 if { (eval echo "$as_me:20998: \"$ac_compile\"") >&5
20999   (eval $ac_compile) 2>&5
21000   ac_status=$?
21001   echo "$as_me:21001: \$? = $ac_status" >&5
21002   (exit "$ac_status"); } &&
21003          { ac_try='test -s "conftest.$ac_objext"'
21004   { (eval echo "$as_me:21004: \"$ac_try\"") >&5
21005   (eval $ac_try) 2>&5
21006   ac_status=$?
21007   echo "$as_me:21007: \$? = $ac_status" >&5
21008   (exit "$ac_status"); }; }; then
21009   cf_cv_gcc_inline=yes
21010 else
21011   echo "$as_me: failed program was:" >&5
21012 cat "conftest.$ac_ext" >&5
21013 cf_cv_gcc_inline=no
21014 fi
21015 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21016                 CFLAGS=$cf_save_CFLAGS
21017
21018 fi
21019 echo "$as_me:21019: result: $cf_cv_gcc_inline" >&5
21020 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
21021                 if test "$cf_cv_gcc_inline" = yes ; then
21022
21023 cf_fix_cppflags=no
21024 cf_new_cflags=
21025 cf_new_cppflags=
21026 cf_new_extra_cppflags=
21027
21028 for cf_add_cflags in --param max-inline-insns-single=1200
21029 do
21030 case "$cf_fix_cppflags" in
21031 (no)
21032         case "$cf_add_cflags" in
21033         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21034                 case "$cf_add_cflags" in
21035                 (-D*)
21036                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21037
21038                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21039                                 && test -z "${cf_tst_cflags}" \
21040                                 && cf_fix_cppflags=yes
21041
21042                         if test "$cf_fix_cppflags" = yes ; then
21043
21044         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21045         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21046
21047                                 continue
21048                         elif test "${cf_tst_cflags}" = "\"'" ; then
21049
21050         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21051         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21052
21053                                 continue
21054                         fi
21055                         ;;
21056                 esac
21057                 case "$CPPFLAGS" in
21058                 (*$cf_add_cflags)
21059                         ;;
21060                 (*)
21061                         case "$cf_add_cflags" in
21062                         (-D*)
21063                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21064
21065 CPPFLAGS=`echo "$CPPFLAGS" | \
21066         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21067                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21068
21069                                 ;;
21070                         esac
21071
21072         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21073         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21074
21075                         ;;
21076                 esac
21077                 ;;
21078         (*)
21079
21080         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21081         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21082
21083                 ;;
21084         esac
21085         ;;
21086 (yes)
21087
21088         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21089         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21090
21091         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21092
21093         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21094                 && test -z "${cf_tst_cflags}" \
21095                 && cf_fix_cppflags=no
21096         ;;
21097 esac
21098 done
21099
21100 if test -n "$cf_new_cflags" ; then
21101
21102         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21103         CFLAGS="${CFLAGS}$cf_new_cflags"
21104
21105 fi
21106
21107 if test -n "$cf_new_cppflags" ; then
21108
21109         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21110         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21111
21112 fi
21113
21114 if test -n "$cf_new_extra_cppflags" ; then
21115
21116         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21117         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21118
21119 fi
21120
21121                 fi
21122         fi
21123 fi
21124
21125 echo "$as_me:21125: checking for signal global datatype" >&5
21126 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21127 if test "${cf_cv_sig_atomic_t+set}" = set; then
21128   echo $ECHO_N "(cached) $ECHO_C" >&6
21129 else
21130
21131         for cf_type in \
21132                 "volatile sig_atomic_t" \
21133                 "sig_atomic_t" \
21134                 "int"
21135         do
21136         cat >"conftest.$ac_ext" <<_ACEOF
21137 #line 21137 "configure"
21138 #include "confdefs.h"
21139
21140 #include <sys/types.h>
21141 #include <signal.h>
21142 #include <stdio.h>
21143
21144 extern $cf_type x;
21145 $cf_type x;
21146 static void handler(int sig)
21147 {
21148         (void)sig;
21149         x = 5;
21150 }
21151 int
21152 main (void)
21153 {
21154 signal(SIGINT, handler);
21155                  x = 1
21156   ;
21157   return 0;
21158 }
21159 _ACEOF
21160 rm -f "conftest.$ac_objext"
21161 if { (eval echo "$as_me:21161: \"$ac_compile\"") >&5
21162   (eval $ac_compile) 2>&5
21163   ac_status=$?
21164   echo "$as_me:21164: \$? = $ac_status" >&5
21165   (exit "$ac_status"); } &&
21166          { ac_try='test -s "conftest.$ac_objext"'
21167   { (eval echo "$as_me:21167: \"$ac_try\"") >&5
21168   (eval $ac_try) 2>&5
21169   ac_status=$?
21170   echo "$as_me:21170: \$? = $ac_status" >&5
21171   (exit "$ac_status"); }; }; then
21172   cf_cv_sig_atomic_t=$cf_type
21173 else
21174   echo "$as_me: failed program was:" >&5
21175 cat "conftest.$ac_ext" >&5
21176 cf_cv_sig_atomic_t=no
21177 fi
21178 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21179                 test "$cf_cv_sig_atomic_t" != no && break
21180         done
21181
21182 fi
21183
21184 echo "$as_me:21184: result: $cf_cv_sig_atomic_t" >&5
21185 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21186 test "$cf_cv_sig_atomic_t" != no &&
21187 cat >>confdefs.h <<EOF
21188 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21189 EOF
21190
21191 if test "$NCURSES_CHTYPE" = auto ; then
21192
21193 echo "$as_me:21193: checking for type of chtype" >&5
21194 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21195 if test "${cf_cv_typeof_chtype+set}" = set; then
21196   echo $ECHO_N "(cached) $ECHO_C" >&6
21197 else
21198
21199                 if test "$cross_compiling" = yes; then
21200   cf_cv_typeof_chtype=long
21201 else
21202   cat >"conftest.$ac_ext" <<_ACEOF
21203 #line 21203 "configure"
21204 #include "confdefs.h"
21205
21206 #define WANT_BITS 31
21207 #include <stdio.h>
21208 int main(void)
21209 {
21210         FILE *fp = fopen("cf_test.out", "w");
21211         if (fp != 0) {
21212                 char *result = "long";
21213                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21214                         int n;
21215                         unsigned int x, y;
21216                         for (n = 0; n < WANT_BITS; n++) {
21217                                 x = (1 << n);
21218                                 y = (x >> n);
21219                                 if (y != 1 || x == 0) {
21220                                         x = 0;
21221                                         break;
21222                                 }
21223                         }
21224                         /*
21225                          * If x is nonzero, an int is big enough for the bits
21226                          * that we want.
21227                          */
21228                         result = (x != 0) ? "int" : "long";
21229                 }
21230                 fputs(result, fp);
21231                 fclose(fp);
21232         }
21233         ${cf_cv_main_return:-return}(0);
21234 }
21235
21236 _ACEOF
21237 rm -f "conftest$ac_exeext"
21238 if { (eval echo "$as_me:21238: \"$ac_link\"") >&5
21239   (eval $ac_link) 2>&5
21240   ac_status=$?
21241   echo "$as_me:21241: \$? = $ac_status" >&5
21242   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21243   { (eval echo "$as_me:21243: \"$ac_try\"") >&5
21244   (eval $ac_try) 2>&5
21245   ac_status=$?
21246   echo "$as_me:21246: \$? = $ac_status" >&5
21247   (exit "$ac_status"); }; }; then
21248   cf_cv_typeof_chtype=`cat cf_test.out`
21249 else
21250   echo "$as_me: program exited with status $ac_status" >&5
21251 echo "$as_me: failed program was:" >&5
21252 cat "conftest.$ac_ext" >&5
21253 cf_cv_typeof_chtype=long
21254 fi
21255 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21256 fi
21257                 rm -f cf_test.out
21258
21259 fi
21260
21261 echo "$as_me:21261: result: $cf_cv_typeof_chtype" >&5
21262 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21263
21264 cat >>confdefs.h <<EOF
21265 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21266 EOF
21267
21268 else
21269         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21270 fi
21271 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21272
21273 echo "$as_me:21273: checking if unsigned literals are legal" >&5
21274 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21275 if test "${cf_cv_unsigned_literals+set}" = set; then
21276   echo $ECHO_N "(cached) $ECHO_C" >&6
21277 else
21278
21279         cat >"conftest.$ac_ext" <<_ACEOF
21280 #line 21280 "configure"
21281 #include "confdefs.h"
21282
21283 int
21284 main (void)
21285 {
21286 long x = 1L + 1UL + 1U + 1
21287   ;
21288   return 0;
21289 }
21290 _ACEOF
21291 rm -f "conftest.$ac_objext"
21292 if { (eval echo "$as_me:21292: \"$ac_compile\"") >&5
21293   (eval $ac_compile) 2>&5
21294   ac_status=$?
21295   echo "$as_me:21295: \$? = $ac_status" >&5
21296   (exit "$ac_status"); } &&
21297          { ac_try='test -s "conftest.$ac_objext"'
21298   { (eval echo "$as_me:21298: \"$ac_try\"") >&5
21299   (eval $ac_try) 2>&5
21300   ac_status=$?
21301   echo "$as_me:21301: \$? = $ac_status" >&5
21302   (exit "$ac_status"); }; }; then
21303   cf_cv_unsigned_literals=yes
21304 else
21305   echo "$as_me: failed program was:" >&5
21306 cat "conftest.$ac_ext" >&5
21307 cf_cv_unsigned_literals=no
21308 fi
21309 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21310
21311 fi
21312
21313 echo "$as_me:21313: result: $cf_cv_unsigned_literals" >&5
21314 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21315
21316 cf_cv_1UL="1"
21317 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21318 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21319
21320 if test "$NCURSES_MMASK_T" = auto ; then
21321         cf_cv_typeof_mmask_t=long
21322 else
21323         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21324 fi
21325 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21326
21327 ###     Checks for external-data
21328
21329 echo "$as_me:21329: checking if external errno is declared" >&5
21330 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21331 if test "${cf_cv_dcl_errno+set}" = set; then
21332   echo $ECHO_N "(cached) $ECHO_C" >&6
21333 else
21334
21335         cat >"conftest.$ac_ext" <<_ACEOF
21336 #line 21336 "configure"
21337 #include "confdefs.h"
21338
21339 #ifdef HAVE_STDLIB_H
21340 #include <stdlib.h>
21341 #endif
21342 #include <stdio.h>
21343 #include <sys/types.h>
21344 #include <errno.h>
21345 int
21346 main (void)
21347 {
21348 int x = (int) errno; (void)x
21349   ;
21350   return 0;
21351 }
21352 _ACEOF
21353 rm -f "conftest.$ac_objext"
21354 if { (eval echo "$as_me:21354: \"$ac_compile\"") >&5
21355   (eval $ac_compile) 2>&5
21356   ac_status=$?
21357   echo "$as_me:21357: \$? = $ac_status" >&5
21358   (exit "$ac_status"); } &&
21359          { ac_try='test -s "conftest.$ac_objext"'
21360   { (eval echo "$as_me:21360: \"$ac_try\"") >&5
21361   (eval $ac_try) 2>&5
21362   ac_status=$?
21363   echo "$as_me:21363: \$? = $ac_status" >&5
21364   (exit "$ac_status"); }; }; then
21365   cf_cv_dcl_errno=yes
21366 else
21367   echo "$as_me: failed program was:" >&5
21368 cat "conftest.$ac_ext" >&5
21369 cf_cv_dcl_errno=no
21370 fi
21371 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21372
21373 fi
21374 echo "$as_me:21374: result: $cf_cv_dcl_errno" >&5
21375 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21376
21377 if test "$cf_cv_dcl_errno" = no ; then
21378
21379 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21380
21381         cat >>confdefs.h <<EOF
21382 #define $cf_result 1
21383 EOF
21384
21385 fi
21386
21387 # It's possible (for near-UNIX clones) that the data doesn't exist
21388
21389 echo "$as_me:21389: checking if external errno exists" >&5
21390 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21391 if test "${cf_cv_have_errno+set}" = set; then
21392   echo $ECHO_N "(cached) $ECHO_C" >&6
21393 else
21394
21395         cat >"conftest.$ac_ext" <<_ACEOF
21396 #line 21396 "configure"
21397 #include "confdefs.h"
21398
21399 #undef errno
21400 extern int errno;
21401
21402 int
21403 main (void)
21404 {
21405 errno = 2
21406   ;
21407   return 0;
21408 }
21409 _ACEOF
21410 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21411 if { (eval echo "$as_me:21411: \"$ac_link\"") >&5
21412   (eval $ac_link) 2>&5
21413   ac_status=$?
21414   echo "$as_me:21414: \$? = $ac_status" >&5
21415   (exit "$ac_status"); } &&
21416          { ac_try='test -s "conftest$ac_exeext"'
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_have_errno=yes
21423 else
21424   echo "$as_me: failed program was:" >&5
21425 cat "conftest.$ac_ext" >&5
21426 cf_cv_have_errno=no
21427 fi
21428 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21429
21430 fi
21431 echo "$as_me:21431: result: $cf_cv_have_errno" >&5
21432 echo "${ECHO_T}$cf_cv_have_errno" >&6
21433
21434 if test "$cf_cv_have_errno" = yes ; then
21435
21436 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21437
21438         cat >>confdefs.h <<EOF
21439 #define $cf_result 1
21440 EOF
21441
21442 fi
21443
21444 echo "$as_me:21444: checking if data-only library module links" >&5
21445 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21446 if test "${cf_cv_link_dataonly+set}" = set; then
21447   echo $ECHO_N "(cached) $ECHO_C" >&6
21448 else
21449
21450         rm -f conftest.a
21451         cat >conftest.$ac_ext <<EOF
21452 #line 21452 "configure"
21453 int     testdata[3] = { 123, 456, 789 };
21454 EOF
21455         if { (eval echo "$as_me:21455: \"$ac_compile\"") >&5
21456   (eval $ac_compile) 2>&5
21457   ac_status=$?
21458   echo "$as_me:21458: \$? = $ac_status" >&5
21459   (exit "$ac_status"); } ; then
21460                 mv conftest.o data.o && \
21461                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21462         fi
21463         rm -f conftest.$ac_ext data.o
21464         cat >conftest.$ac_ext <<EOF
21465 #line 21465 "configure"
21466 int     testfunc(void)
21467 {
21468 #if defined(NeXT)
21469         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21470 #else
21471         extern int testdata[3];
21472         return testdata[0] == 123
21473            &&  testdata[1] == 456
21474            &&  testdata[2] == 789;
21475 #endif
21476 }
21477 EOF
21478         if { (eval echo "$as_me:21478: \"$ac_compile\"") >&5
21479   (eval $ac_compile) 2>&5
21480   ac_status=$?
21481   echo "$as_me:21481: \$? = $ac_status" >&5
21482   (exit "$ac_status"); }; then
21483                 mv conftest.o func.o && \
21484                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21485         fi
21486         rm -f conftest.$ac_ext func.o
21487         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21488         cf_saveLIBS="$LIBS"
21489         LIBS="conftest.a $LIBS"
21490         if test "$cross_compiling" = yes; then
21491   cf_cv_link_dataonly=unknown
21492 else
21493   cat >"conftest.$ac_ext" <<_ACEOF
21494 #line 21494 "configure"
21495 #include "confdefs.h"
21496
21497         int main(void)
21498         {
21499                 extern int testfunc();
21500                 ${cf_cv_main_return:-return} (!testfunc());
21501         }
21502
21503 _ACEOF
21504 rm -f "conftest$ac_exeext"
21505 if { (eval echo "$as_me:21505: \"$ac_link\"") >&5
21506   (eval $ac_link) 2>&5
21507   ac_status=$?
21508   echo "$as_me:21508: \$? = $ac_status" >&5
21509   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21510   { (eval echo "$as_me:21510: \"$ac_try\"") >&5
21511   (eval $ac_try) 2>&5
21512   ac_status=$?
21513   echo "$as_me:21513: \$? = $ac_status" >&5
21514   (exit "$ac_status"); }; }; then
21515   cf_cv_link_dataonly=yes
21516 else
21517   echo "$as_me: program exited with status $ac_status" >&5
21518 echo "$as_me: failed program was:" >&5
21519 cat "conftest.$ac_ext" >&5
21520 cf_cv_link_dataonly=no
21521 fi
21522 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21523 fi
21524         LIBS="$cf_saveLIBS"
21525
21526 fi
21527
21528 echo "$as_me:21528: result: $cf_cv_link_dataonly" >&5
21529 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21530
21531 if test "$cf_cv_link_dataonly" = no ; then
21532
21533 cat >>confdefs.h <<\EOF
21534 #define BROKEN_LINKER 1
21535 EOF
21536
21537         BROKEN_LINKER=1
21538 fi
21539
21540 ###     Checks for library functions.
21541
21542 for ac_func in \
21543 fpathconf \
21544 getcwd \
21545 getegid \
21546 geteuid \
21547 getopt \
21548 issetugid \
21549 localeconv \
21550 poll \
21551 putenv \
21552 remove \
21553 select \
21554 setbuf \
21555 setbuffer \
21556 setenv \
21557 setfsuid \
21558 setvbuf \
21559 sigaction \
21560 sigvec \
21561 snprintf \
21562 strdup \
21563 strstr \
21564 sysconf \
21565 tcgetpgrp \
21566 times \
21567 tsearch \
21568 vsnprintf \
21569
21570 do
21571 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21572 echo "$as_me:21572: checking for $ac_func" >&5
21573 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21574 if eval "test \"\${$as_ac_var+set}\" = set"; then
21575   echo $ECHO_N "(cached) $ECHO_C" >&6
21576 else
21577   cat >"conftest.$ac_ext" <<_ACEOF
21578 #line 21578 "configure"
21579 #include "confdefs.h"
21580 #define $ac_func autoconf_temporary
21581 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21582 #undef $ac_func
21583
21584 #ifdef __cplusplus
21585 extern "C"
21586 #endif
21587
21588 /* We use char because int might match the return type of a gcc2
21589    builtin and then its argument prototype would still apply.  */
21590 char $ac_func (void);
21591
21592 int
21593 main (void)
21594 {
21595
21596 /* The GNU C library defines stubs for functions which it implements
21597     to always fail with ENOSYS.  Some functions are actually named
21598     something starting with __ and the normal name is an alias.  */
21599 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21600 #error found stub for $ac_func
21601 #endif
21602
21603         return $ac_func ();
21604   ;
21605   return 0;
21606 }
21607 _ACEOF
21608 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21609 if { (eval echo "$as_me:21609: \"$ac_link\"") >&5
21610   (eval $ac_link) 2>&5
21611   ac_status=$?
21612   echo "$as_me:21612: \$? = $ac_status" >&5
21613   (exit "$ac_status"); } &&
21614          { ac_try='test -s "conftest$ac_exeext"'
21615   { (eval echo "$as_me:21615: \"$ac_try\"") >&5
21616   (eval $ac_try) 2>&5
21617   ac_status=$?
21618   echo "$as_me:21618: \$? = $ac_status" >&5
21619   (exit "$ac_status"); }; }; then
21620   eval "$as_ac_var=yes"
21621 else
21622   echo "$as_me: failed program was:" >&5
21623 cat "conftest.$ac_ext" >&5
21624 eval "$as_ac_var=no"
21625 fi
21626 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21627 fi
21628 echo "$as_me:21628: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21629 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21630 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21631   cat >>confdefs.h <<EOF
21632 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21633 EOF
21634
21635 fi
21636 done
21637
21638 echo "$as_me:21638: checking if _PATH_TTYS is defined in ttyent.h" >&5
21639 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21640 if test "${cf_cv_PATH_TTYS+set}" = set; then
21641   echo $ECHO_N "(cached) $ECHO_C" >&6
21642 else
21643
21644 cat >"conftest.$ac_ext" <<_ACEOF
21645 #line 21645 "configure"
21646 #include "confdefs.h"
21647
21648 #include <stdio.h>
21649 #include <ttyent.h>
21650 int
21651 main (void)
21652 {
21653
21654 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21655   ;
21656   return 0;
21657 }
21658 _ACEOF
21659 rm -f "conftest.$ac_objext"
21660 if { (eval echo "$as_me:21660: \"$ac_compile\"") >&5
21661   (eval $ac_compile) 2>&5
21662   ac_status=$?
21663   echo "$as_me:21663: \$? = $ac_status" >&5
21664   (exit "$ac_status"); } &&
21665          { ac_try='test -s "conftest.$ac_objext"'
21666   { (eval echo "$as_me:21666: \"$ac_try\"") >&5
21667   (eval $ac_try) 2>&5
21668   ac_status=$?
21669   echo "$as_me:21669: \$? = $ac_status" >&5
21670   (exit "$ac_status"); }; }; then
21671   cf_cv_PATH_TTYS=yes
21672 else
21673   echo "$as_me: failed program was:" >&5
21674 cat "conftest.$ac_ext" >&5
21675 cf_cv_PATH_TTYS=no
21676 fi
21677 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21678 fi
21679 echo "$as_me:21679: result: $cf_cv_PATH_TTYS" >&5
21680 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21681
21682 if test $cf_cv_PATH_TTYS = no
21683 then
21684         for cf_ttys in /etc/ttytype /etc/ttys
21685         do
21686                 if test -f $cf_ttys
21687                 then
21688                         cf_cv_PATH_TTYS=maybe
21689
21690 cat >>confdefs.h <<\EOF
21691 #define _PATH_TTYS $cf_ttys
21692 EOF
21693
21694                         break
21695                 fi
21696         done
21697 fi
21698
21699 if test $cf_cv_PATH_TTYS != no
21700 then
21701         echo "$as_me:21701: checking if _PATH_TTYS file exists" >&5
21702 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21703 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21704   echo $ECHO_N "(cached) $ECHO_C" >&6
21705 else
21706
21707                 if test "$cross_compiling" = yes; then
21708   cf_cv_have_PATH_TTYS=unknown
21709 else
21710   cat >"conftest.$ac_ext" <<_ACEOF
21711 #line 21711 "configure"
21712 #include "confdefs.h"
21713
21714 #include <stdio.h>
21715 #include <ttyent.h>
21716 int main(void) {
21717         FILE *fp = fopen(_PATH_TTYS, "r");
21718         ${cf_cv_main_return:-return} (fp == 0);
21719 }
21720 _ACEOF
21721 rm -f "conftest$ac_exeext"
21722 if { (eval echo "$as_me:21722: \"$ac_link\"") >&5
21723   (eval $ac_link) 2>&5
21724   ac_status=$?
21725   echo "$as_me:21725: \$? = $ac_status" >&5
21726   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21727   { (eval echo "$as_me:21727: \"$ac_try\"") >&5
21728   (eval $ac_try) 2>&5
21729   ac_status=$?
21730   echo "$as_me:21730: \$? = $ac_status" >&5
21731   (exit "$ac_status"); }; }; then
21732   cf_cv_have_PATH_TTYS=yes
21733 else
21734   echo "$as_me: program exited with status $ac_status" >&5
21735 echo "$as_me: failed program was:" >&5
21736 cat "conftest.$ac_ext" >&5
21737 cf_cv_have_PATH_TTYS=no
21738 fi
21739 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21740 fi
21741 fi
21742 echo "$as_me:21742: result: $cf_cv_have_PATH_TTYS" >&5
21743 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21744         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21745 fi
21746
21747 if test $cf_cv_PATH_TTYS != no
21748 then
21749
21750 cat >>confdefs.h <<\EOF
21751 #define HAVE_PATH_TTYS 1
21752 EOF
21753
21754         echo "$as_me:21754: checking for getttynam" >&5
21755 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21756 if test "${cf_cv_func_getttynam+set}" = set; then
21757   echo $ECHO_N "(cached) $ECHO_C" >&6
21758 else
21759
21760                 cat >"conftest.$ac_ext" <<_ACEOF
21761 #line 21761 "configure"
21762 #include "confdefs.h"
21763 #include <ttyent.h>
21764 int
21765 main (void)
21766 {
21767 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21768   ;
21769   return 0;
21770 }
21771 _ACEOF
21772 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21773 if { (eval echo "$as_me:21773: \"$ac_link\"") >&5
21774   (eval $ac_link) 2>&5
21775   ac_status=$?
21776   echo "$as_me:21776: \$? = $ac_status" >&5
21777   (exit "$ac_status"); } &&
21778          { ac_try='test -s "conftest$ac_exeext"'
21779   { (eval echo "$as_me:21779: \"$ac_try\"") >&5
21780   (eval $ac_try) 2>&5
21781   ac_status=$?
21782   echo "$as_me:21782: \$? = $ac_status" >&5
21783   (exit "$ac_status"); }; }; then
21784   cf_cv_func_getttynam=yes
21785 else
21786   echo "$as_me: failed program was:" >&5
21787 cat "conftest.$ac_ext" >&5
21788 cf_cv_func_getttynam=no
21789 fi
21790 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21791 fi
21792 echo "$as_me:21792: result: $cf_cv_func_getttynam" >&5
21793 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21794         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21795 #define HAVE_GETTTYNAM 1
21796 EOF
21797
21798 fi
21799
21800 if test "x$ac_cv_func_getopt" = xno && \
21801    test "x$cf_with_progs$cf_with_tests" != xnono; then
21802         { { echo "$as_me:21802: error: getopt is required for building programs" >&5
21803 echo "$as_me: error: getopt is required for building programs" >&2;}
21804    { (exit 1); exit 1; }; }
21805 fi
21806
21807 if test "x$with_safe_sprintf" = xyes
21808 then
21809         if test "x$ac_cv_func_vsnprintf" = xyes
21810         then
21811                 { echo "$as_me:21811: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21812 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21813         else
21814
21815 cat >>confdefs.h <<\EOF
21816 #define USE_SAFE_SPRINTF 1
21817 EOF
21818
21819         fi
21820 fi
21821
21822 if test "x$with_getcap" = "xyes" ; then
21823
21824 echo "$as_me:21824: checking for terminal-capability database functions" >&5
21825 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21826 if test "${cf_cv_cgetent+set}" = set; then
21827   echo $ECHO_N "(cached) $ECHO_C" >&6
21828 else
21829
21830 cat >"conftest.$ac_ext" <<_ACEOF
21831 #line 21831 "configure"
21832 #include "confdefs.h"
21833
21834 #include <stdlib.h>
21835 int
21836 main (void)
21837 {
21838
21839         char temp[128];
21840         char *buf = temp;
21841         char *db_array = temp;
21842         cgetent(&buf, &db_array, "vt100");
21843         cgetcap(buf, "tc", '=');
21844         cgetmatch(buf, "tc");
21845
21846   ;
21847   return 0;
21848 }
21849 _ACEOF
21850 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21851 if { (eval echo "$as_me:21851: \"$ac_link\"") >&5
21852   (eval $ac_link) 2>&5
21853   ac_status=$?
21854   echo "$as_me:21854: \$? = $ac_status" >&5
21855   (exit "$ac_status"); } &&
21856          { ac_try='test -s "conftest$ac_exeext"'
21857   { (eval echo "$as_me:21857: \"$ac_try\"") >&5
21858   (eval $ac_try) 2>&5
21859   ac_status=$?
21860   echo "$as_me:21860: \$? = $ac_status" >&5
21861   (exit "$ac_status"); }; }; then
21862   cf_cv_cgetent=yes
21863 else
21864   echo "$as_me: failed program was:" >&5
21865 cat "conftest.$ac_ext" >&5
21866 cf_cv_cgetent=no
21867 fi
21868 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21869
21870 fi
21871 echo "$as_me:21871: result: $cf_cv_cgetent" >&5
21872 echo "${ECHO_T}$cf_cv_cgetent" >&6
21873
21874 if test "$cf_cv_cgetent" = yes
21875 then
21876
21877 cat >>confdefs.h <<\EOF
21878 #define HAVE_BSD_CGETENT 1
21879 EOF
21880
21881 echo "$as_me:21881: checking if cgetent uses const parameter" >&5
21882 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21883 if test "${cf_cv_cgetent_const+set}" = set; then
21884   echo $ECHO_N "(cached) $ECHO_C" >&6
21885 else
21886
21887 cat >"conftest.$ac_ext" <<_ACEOF
21888 #line 21888 "configure"
21889 #include "confdefs.h"
21890
21891 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21892 #include <stdlib.h>
21893 int
21894 main (void)
21895 {
21896
21897         char temp[128];
21898         char *buf = temp;
21899 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21900         const char *db_array = temp;
21901         cgetent(&buf, &db_array, "vt100");
21902 #endif
21903         cgetcap(buf, "tc", '=');
21904         cgetmatch(buf, "tc");
21905
21906   ;
21907   return 0;
21908 }
21909 _ACEOF
21910 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21911 if { (eval echo "$as_me:21911: \"$ac_link\"") >&5
21912   (eval $ac_link) 2>&5
21913   ac_status=$?
21914   echo "$as_me:21914: \$? = $ac_status" >&5
21915   (exit "$ac_status"); } &&
21916          { ac_try='test -s "conftest$ac_exeext"'
21917   { (eval echo "$as_me:21917: \"$ac_try\"") >&5
21918   (eval $ac_try) 2>&5
21919   ac_status=$?
21920   echo "$as_me:21920: \$? = $ac_status" >&5
21921   (exit "$ac_status"); }; }; then
21922   cf_cv_cgetent_const=yes
21923 else
21924   echo "$as_me: failed program was:" >&5
21925 cat "conftest.$ac_ext" >&5
21926 cf_cv_cgetent_const=no
21927 fi
21928 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21929
21930 fi
21931 echo "$as_me:21931: result: $cf_cv_cgetent_const" >&5
21932 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21933         if test "$cf_cv_cgetent_const" = yes
21934         then
21935
21936 cat >>confdefs.h <<EOF
21937 #define CGETENT_CONST const
21938 EOF
21939
21940         fi
21941 fi
21942
21943 fi
21944
21945 echo "$as_me:21945: checking for isascii" >&5
21946 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21947 if test "${cf_cv_have_isascii+set}" = set; then
21948   echo $ECHO_N "(cached) $ECHO_C" >&6
21949 else
21950
21951         cat >"conftest.$ac_ext" <<_ACEOF
21952 #line 21952 "configure"
21953 #include "confdefs.h"
21954 #include <ctype.h>
21955 int
21956 main (void)
21957 {
21958 int x = isascii(' ')
21959   ;
21960   return 0;
21961 }
21962 _ACEOF
21963 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21964 if { (eval echo "$as_me:21964: \"$ac_link\"") >&5
21965   (eval $ac_link) 2>&5
21966   ac_status=$?
21967   echo "$as_me:21967: \$? = $ac_status" >&5
21968   (exit "$ac_status"); } &&
21969          { ac_try='test -s "conftest$ac_exeext"'
21970   { (eval echo "$as_me:21970: \"$ac_try\"") >&5
21971   (eval $ac_try) 2>&5
21972   ac_status=$?
21973   echo "$as_me:21973: \$? = $ac_status" >&5
21974   (exit "$ac_status"); }; }; then
21975   cf_cv_have_isascii=yes
21976 else
21977   echo "$as_me: failed program was:" >&5
21978 cat "conftest.$ac_ext" >&5
21979 cf_cv_have_isascii=no
21980 fi
21981 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21982
21983 fi
21984 echo "$as_me:21984: result: $cf_cv_have_isascii" >&5
21985 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21986 test "$cf_cv_have_isascii" = yes &&
21987 cat >>confdefs.h <<\EOF
21988 #define HAVE_ISASCII 1
21989 EOF
21990
21991 if test "$ac_cv_func_sigaction" = yes; then
21992 echo "$as_me:21992: checking whether sigaction needs _POSIX_SOURCE" >&5
21993 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21994 cat >"conftest.$ac_ext" <<_ACEOF
21995 #line 21995 "configure"
21996 #include "confdefs.h"
21997
21998 #include <sys/types.h>
21999 #include <signal.h>
22000 int
22001 main (void)
22002 {
22003 struct sigaction act
22004   ;
22005   return 0;
22006 }
22007 _ACEOF
22008 rm -f "conftest.$ac_objext"
22009 if { (eval echo "$as_me:22009: \"$ac_compile\"") >&5
22010   (eval $ac_compile) 2>&5
22011   ac_status=$?
22012   echo "$as_me:22012: \$? = $ac_status" >&5
22013   (exit "$ac_status"); } &&
22014          { ac_try='test -s "conftest.$ac_objext"'
22015   { (eval echo "$as_me:22015: \"$ac_try\"") >&5
22016   (eval $ac_try) 2>&5
22017   ac_status=$?
22018   echo "$as_me:22018: \$? = $ac_status" >&5
22019   (exit "$ac_status"); }; }; then
22020   sigact_bad=no
22021 else
22022   echo "$as_me: failed program was:" >&5
22023 cat "conftest.$ac_ext" >&5
22024
22025 cat >"conftest.$ac_ext" <<_ACEOF
22026 #line 22026 "configure"
22027 #include "confdefs.h"
22028
22029 #define _POSIX_SOURCE
22030 #include <sys/types.h>
22031 #include <signal.h>
22032 int
22033 main (void)
22034 {
22035 struct sigaction act
22036   ;
22037   return 0;
22038 }
22039 _ACEOF
22040 rm -f "conftest.$ac_objext"
22041 if { (eval echo "$as_me:22041: \"$ac_compile\"") >&5
22042   (eval $ac_compile) 2>&5
22043   ac_status=$?
22044   echo "$as_me:22044: \$? = $ac_status" >&5
22045   (exit "$ac_status"); } &&
22046          { ac_try='test -s "conftest.$ac_objext"'
22047   { (eval echo "$as_me:22047: \"$ac_try\"") >&5
22048   (eval $ac_try) 2>&5
22049   ac_status=$?
22050   echo "$as_me:22050: \$? = $ac_status" >&5
22051   (exit "$ac_status"); }; }; then
22052   sigact_bad=yes
22053
22054 cat >>confdefs.h <<\EOF
22055 #define _POSIX_SOURCE 1
22056 EOF
22057
22058 else
22059   echo "$as_me: failed program was:" >&5
22060 cat "conftest.$ac_ext" >&5
22061 sigact_bad=unknown
22062 fi
22063 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22064 fi
22065 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22066 echo "$as_me:22066: result: $sigact_bad" >&5
22067 echo "${ECHO_T}$sigact_bad" >&6
22068 fi
22069
22070 echo "$as_me:22070: checking if nanosleep really works" >&5
22071 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22072 if test "${cf_cv_func_nanosleep+set}" = set; then
22073   echo $ECHO_N "(cached) $ECHO_C" >&6
22074 else
22075
22076 if test "$cross_compiling" = yes; then
22077   cf_cv_func_nanosleep=unknown
22078 else
22079   cat >"conftest.$ac_ext" <<_ACEOF
22080 #line 22080 "configure"
22081 #include "confdefs.h"
22082
22083 #include <stdio.h>
22084 #include <errno.h>
22085 #include <time.h>
22086
22087 #ifdef HAVE_SYS_TIME_H
22088 #include <sys/time.h>
22089 #endif
22090
22091 int main(void) {
22092         struct timespec ts1, ts2;
22093         int code;
22094         ts1.tv_sec  = 0;
22095         ts1.tv_nsec = 750000000;
22096         ts2.tv_sec  = 0;
22097         ts2.tv_nsec = 0;
22098         errno = 0;
22099         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22100         ${cf_cv_main_return:-return}(code != 0);
22101 }
22102
22103 _ACEOF
22104 rm -f "conftest$ac_exeext"
22105 if { (eval echo "$as_me:22105: \"$ac_link\"") >&5
22106   (eval $ac_link) 2>&5
22107   ac_status=$?
22108   echo "$as_me:22108: \$? = $ac_status" >&5
22109   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22110   { (eval echo "$as_me:22110: \"$ac_try\"") >&5
22111   (eval $ac_try) 2>&5
22112   ac_status=$?
22113   echo "$as_me:22113: \$? = $ac_status" >&5
22114   (exit "$ac_status"); }; }; then
22115   cf_cv_func_nanosleep=yes
22116 else
22117   echo "$as_me: program exited with status $ac_status" >&5
22118 echo "$as_me: failed program was:" >&5
22119 cat "conftest.$ac_ext" >&5
22120 cf_cv_func_nanosleep=no
22121 fi
22122 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22123 fi
22124 fi
22125 echo "$as_me:22125: result: $cf_cv_func_nanosleep" >&5
22126 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22127
22128 test "$cf_cv_func_nanosleep" = "yes" &&
22129 cat >>confdefs.h <<\EOF
22130 #define HAVE_NANOSLEEP 1
22131 EOF
22132
22133 for ac_header in \
22134 termio.h \
22135 termios.h \
22136 unistd.h \
22137 sys/ioctl.h \
22138 sys/termio.h \
22139
22140 do
22141 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22142 echo "$as_me:22142: checking for $ac_header" >&5
22143 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22144 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22145   echo $ECHO_N "(cached) $ECHO_C" >&6
22146 else
22147   cat >"conftest.$ac_ext" <<_ACEOF
22148 #line 22148 "configure"
22149 #include "confdefs.h"
22150 #include <$ac_header>
22151 _ACEOF
22152 if { (eval echo "$as_me:22152: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22153   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22154   ac_status=$?
22155   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22156   rm -f conftest.er1
22157   cat conftest.err >&5
22158   echo "$as_me:22158: \$? = $ac_status" >&5
22159   (exit "$ac_status"); } >/dev/null; then
22160   if test -s conftest.err; then
22161     ac_cpp_err=$ac_c_preproc_warn_flag
22162   else
22163     ac_cpp_err=
22164   fi
22165 else
22166   ac_cpp_err=yes
22167 fi
22168 if test -z "$ac_cpp_err"; then
22169   eval "$as_ac_Header=yes"
22170 else
22171   echo "$as_me: failed program was:" >&5
22172   cat "conftest.$ac_ext" >&5
22173   eval "$as_ac_Header=no"
22174 fi
22175 rm -f conftest.err "conftest.$ac_ext"
22176 fi
22177 echo "$as_me:22177: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22178 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22179 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22180   cat >>confdefs.h <<EOF
22181 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22182 EOF
22183
22184 fi
22185 done
22186
22187 if test "$ac_cv_header_termios_h" = yes ; then
22188         case "$CFLAGS $CPPFLAGS" in
22189         (*-D_POSIX_SOURCE*)
22190                 termios_bad=dunno ;;
22191         (*)     termios_bad=maybe ;;
22192         esac
22193         if test "$termios_bad" = maybe ; then
22194         echo "$as_me:22194: checking whether termios.h needs _POSIX_SOURCE" >&5
22195 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22196         cat >"conftest.$ac_ext" <<_ACEOF
22197 #line 22197 "configure"
22198 #include "confdefs.h"
22199 #include <termios.h>
22200 int
22201 main (void)
22202 {
22203 struct termios foo; int x = foo.c_iflag = 1; (void)x
22204   ;
22205   return 0;
22206 }
22207 _ACEOF
22208 rm -f "conftest.$ac_objext"
22209 if { (eval echo "$as_me:22209: \"$ac_compile\"") >&5
22210   (eval $ac_compile) 2>&5
22211   ac_status=$?
22212   echo "$as_me:22212: \$? = $ac_status" >&5
22213   (exit "$ac_status"); } &&
22214          { ac_try='test -s "conftest.$ac_objext"'
22215   { (eval echo "$as_me:22215: \"$ac_try\"") >&5
22216   (eval $ac_try) 2>&5
22217   ac_status=$?
22218   echo "$as_me:22218: \$? = $ac_status" >&5
22219   (exit "$ac_status"); }; }; then
22220   termios_bad=no
22221 else
22222   echo "$as_me: failed program was:" >&5
22223 cat "conftest.$ac_ext" >&5
22224
22225                 cat >"conftest.$ac_ext" <<_ACEOF
22226 #line 22226 "configure"
22227 #include "confdefs.h"
22228
22229 #define _POSIX_SOURCE
22230 #include <termios.h>
22231 int
22232 main (void)
22233 {
22234 struct termios foo; int x = foo.c_iflag = 2; (void)x
22235   ;
22236   return 0;
22237 }
22238 _ACEOF
22239 rm -f "conftest.$ac_objext"
22240 if { (eval echo "$as_me:22240: \"$ac_compile\"") >&5
22241   (eval $ac_compile) 2>&5
22242   ac_status=$?
22243   echo "$as_me:22243: \$? = $ac_status" >&5
22244   (exit "$ac_status"); } &&
22245          { ac_try='test -s "conftest.$ac_objext"'
22246   { (eval echo "$as_me:22246: \"$ac_try\"") >&5
22247   (eval $ac_try) 2>&5
22248   ac_status=$?
22249   echo "$as_me:22249: \$? = $ac_status" >&5
22250   (exit "$ac_status"); }; }; then
22251   termios_bad=unknown
22252 else
22253   echo "$as_me: failed program was:" >&5
22254 cat "conftest.$ac_ext" >&5
22255 termios_bad=yes
22256 cat >>confdefs.h <<\EOF
22257 #define _POSIX_SOURCE 1
22258 EOF
22259
22260 fi
22261 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22262
22263 fi
22264 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22265         echo "$as_me:22265: result: $termios_bad" >&5
22266 echo "${ECHO_T}$termios_bad" >&6
22267         fi
22268 fi
22269
22270 echo "$as_me:22270: checking for tcgetattr" >&5
22271 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22272 if test "${cf_cv_have_tcgetattr+set}" = set; then
22273   echo $ECHO_N "(cached) $ECHO_C" >&6
22274 else
22275
22276 cat >"conftest.$ac_ext" <<_ACEOF
22277 #line 22277 "configure"
22278 #include "confdefs.h"
22279
22280 #include <sys/types.h>
22281 #ifdef HAVE_UNISTD_H
22282 #include <unistd.h>
22283 #endif
22284 #ifdef HAVE_TERMIOS_H
22285 #include <termios.h>
22286 #define TTY struct termios
22287 #else
22288 #ifdef HAVE_TERMIO_H
22289 #include <termio.h>
22290 #define TTY struct termio
22291 #endif
22292 #endif
22293
22294 int
22295 main (void)
22296 {
22297
22298 TTY foo;
22299 tcgetattr(1, &foo);
22300   ;
22301   return 0;
22302 }
22303 _ACEOF
22304 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22305 if { (eval echo "$as_me:22305: \"$ac_link\"") >&5
22306   (eval $ac_link) 2>&5
22307   ac_status=$?
22308   echo "$as_me:22308: \$? = $ac_status" >&5
22309   (exit "$ac_status"); } &&
22310          { ac_try='test -s "conftest$ac_exeext"'
22311   { (eval echo "$as_me:22311: \"$ac_try\"") >&5
22312   (eval $ac_try) 2>&5
22313   ac_status=$?
22314   echo "$as_me:22314: \$? = $ac_status" >&5
22315   (exit "$ac_status"); }; }; then
22316   cf_cv_have_tcgetattr=yes
22317 else
22318   echo "$as_me: failed program was:" >&5
22319 cat "conftest.$ac_ext" >&5
22320 cf_cv_have_tcgetattr=no
22321 fi
22322 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22323 fi
22324 echo "$as_me:22324: result: $cf_cv_have_tcgetattr" >&5
22325 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22326 test "$cf_cv_have_tcgetattr" = yes &&
22327 cat >>confdefs.h <<\EOF
22328 #define HAVE_TCGETATTR 1
22329 EOF
22330
22331 echo "$as_me:22331: checking for vsscanf function or workaround" >&5
22332 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22333 if test "${cf_cv_func_vsscanf+set}" = set; then
22334   echo $ECHO_N "(cached) $ECHO_C" >&6
22335 else
22336
22337 cat >"conftest.$ac_ext" <<_ACEOF
22338 #line 22338 "configure"
22339 #include "confdefs.h"
22340
22341 #include <stdarg.h>
22342 #include <stdio.h>
22343 int
22344 main (void)
22345 {
22346
22347         va_list ap;
22348         vsscanf("from", "%d", ap)
22349   ;
22350   return 0;
22351 }
22352 _ACEOF
22353 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22354 if { (eval echo "$as_me:22354: \"$ac_link\"") >&5
22355   (eval $ac_link) 2>&5
22356   ac_status=$?
22357   echo "$as_me:22357: \$? = $ac_status" >&5
22358   (exit "$ac_status"); } &&
22359          { ac_try='test -s "conftest$ac_exeext"'
22360   { (eval echo "$as_me:22360: \"$ac_try\"") >&5
22361   (eval $ac_try) 2>&5
22362   ac_status=$?
22363   echo "$as_me:22363: \$? = $ac_status" >&5
22364   (exit "$ac_status"); }; }; then
22365   cf_cv_func_vsscanf=vsscanf
22366 else
22367   echo "$as_me: failed program was:" >&5
22368 cat "conftest.$ac_ext" >&5
22369
22370 cat >"conftest.$ac_ext" <<_ACEOF
22371 #line 22371 "configure"
22372 #include "confdefs.h"
22373
22374 #include <stdarg.h>
22375 #include <stdio.h>
22376 int
22377 main (void)
22378 {
22379
22380         FILE strbuf;
22381         char *str = "from";
22382
22383         strbuf._flag = _IOREAD;
22384         strbuf._ptr = strbuf._base = (unsigned char *) str;
22385         strbuf._cnt = strlen(str);
22386         strbuf._file = _NFILE;
22387         return (vfscanf(&strbuf, "%d", ap))
22388   ;
22389   return 0;
22390 }
22391 _ACEOF
22392 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22393 if { (eval echo "$as_me:22393: \"$ac_link\"") >&5
22394   (eval $ac_link) 2>&5
22395   ac_status=$?
22396   echo "$as_me:22396: \$? = $ac_status" >&5
22397   (exit "$ac_status"); } &&
22398          { ac_try='test -s "conftest$ac_exeext"'
22399   { (eval echo "$as_me:22399: \"$ac_try\"") >&5
22400   (eval $ac_try) 2>&5
22401   ac_status=$?
22402   echo "$as_me:22402: \$? = $ac_status" >&5
22403   (exit "$ac_status"); }; }; then
22404   cf_cv_func_vsscanf=vfscanf
22405 else
22406   echo "$as_me: failed program was:" >&5
22407 cat "conftest.$ac_ext" >&5
22408
22409 cat >"conftest.$ac_ext" <<_ACEOF
22410 #line 22410 "configure"
22411 #include "confdefs.h"
22412
22413 #include <stdarg.h>
22414 #include <stdio.h>
22415 int
22416 main (void)
22417 {
22418
22419         FILE strbuf;
22420         char *str = "from";
22421
22422         strbuf._flag = _IOREAD;
22423         strbuf._ptr = strbuf._base = (unsigned char *) str;
22424         strbuf._cnt = strlen(str);
22425         strbuf._file = _NFILE;
22426         return (_doscan(&strbuf, "%d", ap))
22427   ;
22428   return 0;
22429 }
22430 _ACEOF
22431 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22432 if { (eval echo "$as_me:22432: \"$ac_link\"") >&5
22433   (eval $ac_link) 2>&5
22434   ac_status=$?
22435   echo "$as_me:22435: \$? = $ac_status" >&5
22436   (exit "$ac_status"); } &&
22437          { ac_try='test -s "conftest$ac_exeext"'
22438   { (eval echo "$as_me:22438: \"$ac_try\"") >&5
22439   (eval $ac_try) 2>&5
22440   ac_status=$?
22441   echo "$as_me:22441: \$? = $ac_status" >&5
22442   (exit "$ac_status"); }; }; then
22443   cf_cv_func_vsscanf=_doscan
22444 else
22445   echo "$as_me: failed program was:" >&5
22446 cat "conftest.$ac_ext" >&5
22447
22448 cf_cv_func_vsscanf=no
22449 fi
22450 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22451 fi
22452 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22453 fi
22454 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22455 fi
22456 echo "$as_me:22456: result: $cf_cv_func_vsscanf" >&5
22457 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22458
22459 case "$cf_cv_func_vsscanf" in
22460 (vsscanf)
22461 cat >>confdefs.h <<\EOF
22462 #define HAVE_VSSCANF 1
22463 EOF
22464 ;;
22465 (vfscanf)
22466 cat >>confdefs.h <<\EOF
22467 #define HAVE_VFSCANF 1
22468 EOF
22469 ;;
22470 (_doscan)
22471 cat >>confdefs.h <<\EOF
22472 #define HAVE__DOSCAN 1
22473 EOF
22474 ;;
22475 esac
22476
22477 for ac_header in \
22478 unistd.h \
22479
22480 do
22481 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22482 echo "$as_me:22482: checking for $ac_header" >&5
22483 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22484 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22485   echo $ECHO_N "(cached) $ECHO_C" >&6
22486 else
22487   cat >"conftest.$ac_ext" <<_ACEOF
22488 #line 22488 "configure"
22489 #include "confdefs.h"
22490 #include <$ac_header>
22491 _ACEOF
22492 if { (eval echo "$as_me:22492: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22493   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22494   ac_status=$?
22495   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22496   rm -f conftest.er1
22497   cat conftest.err >&5
22498   echo "$as_me:22498: \$? = $ac_status" >&5
22499   (exit "$ac_status"); } >/dev/null; then
22500   if test -s conftest.err; then
22501     ac_cpp_err=$ac_c_preproc_warn_flag
22502   else
22503     ac_cpp_err=
22504   fi
22505 else
22506   ac_cpp_err=yes
22507 fi
22508 if test -z "$ac_cpp_err"; then
22509   eval "$as_ac_Header=yes"
22510 else
22511   echo "$as_me: failed program was:" >&5
22512   cat "conftest.$ac_ext" >&5
22513   eval "$as_ac_Header=no"
22514 fi
22515 rm -f conftest.err "conftest.$ac_ext"
22516 fi
22517 echo "$as_me:22517: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22518 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22519 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22520   cat >>confdefs.h <<EOF
22521 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22522 EOF
22523
22524 fi
22525 done
22526
22527 echo "$as_me:22527: checking for working mkstemp" >&5
22528 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22529 if test "${cf_cv_func_mkstemp+set}" = set; then
22530   echo $ECHO_N "(cached) $ECHO_C" >&6
22531 else
22532
22533 rm -rf ./conftest*
22534 if test "$cross_compiling" = yes; then
22535   cf_cv_func_mkstemp=maybe
22536 else
22537   cat >"conftest.$ac_ext" <<_ACEOF
22538 #line 22538 "configure"
22539 #include "confdefs.h"
22540
22541 #include <sys/types.h>
22542 #ifdef HAVE_UNISTD_H
22543 #include <unistd.h>
22544 #endif
22545 #include <stdlib.h>
22546 #include <stdio.h>
22547 #include <string.h>
22548 #include <sys/stat.h>
22549 int main(void)
22550 {
22551         char *tmpl = "conftestXXXXXX";
22552         char name[2][80];
22553         int n;
22554         int result = 0;
22555         int fd;
22556         struct stat sb;
22557
22558         umask(077);
22559         for (n = 0; n < 2; ++n) {
22560                 strcpy(name[n], tmpl);
22561                 if ((fd = mkstemp(name[n])) >= 0) {
22562                         if (!strcmp(name[n], tmpl)
22563                          || stat(name[n], &sb) != 0
22564                          || (sb.st_mode & S_IFMT) != S_IFREG
22565                          || (sb.st_mode & 077) != 0) {
22566                                 result = 1;
22567                         }
22568                         close(fd);
22569                 }
22570         }
22571         if (result == 0
22572          && !strcmp(name[0], name[1]))
22573                 result = 1;
22574         ${cf_cv_main_return:-return}(result);
22575 }
22576
22577 _ACEOF
22578 rm -f "conftest$ac_exeext"
22579 if { (eval echo "$as_me:22579: \"$ac_link\"") >&5
22580   (eval $ac_link) 2>&5
22581   ac_status=$?
22582   echo "$as_me:22582: \$? = $ac_status" >&5
22583   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22584   { (eval echo "$as_me:22584: \"$ac_try\"") >&5
22585   (eval $ac_try) 2>&5
22586   ac_status=$?
22587   echo "$as_me:22587: \$? = $ac_status" >&5
22588   (exit "$ac_status"); }; }; then
22589   cf_cv_func_mkstemp=yes
22590
22591 else
22592   echo "$as_me: program exited with status $ac_status" >&5
22593 echo "$as_me: failed program was:" >&5
22594 cat "conftest.$ac_ext" >&5
22595 cf_cv_func_mkstemp=no
22596
22597 fi
22598 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22599 fi
22600
22601 fi
22602 echo "$as_me:22602: result: $cf_cv_func_mkstemp" >&5
22603 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22604 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22605         echo "$as_me:22605: checking for mkstemp" >&5
22606 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22607 if test "${ac_cv_func_mkstemp+set}" = set; then
22608   echo $ECHO_N "(cached) $ECHO_C" >&6
22609 else
22610   cat >"conftest.$ac_ext" <<_ACEOF
22611 #line 22611 "configure"
22612 #include "confdefs.h"
22613 #define mkstemp autoconf_temporary
22614 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22615 #undef mkstemp
22616
22617 #ifdef __cplusplus
22618 extern "C"
22619 #endif
22620
22621 /* We use char because int might match the return type of a gcc2
22622    builtin and then its argument prototype would still apply.  */
22623 char mkstemp (void);
22624
22625 int
22626 main (void)
22627 {
22628
22629 /* The GNU C library defines stubs for functions which it implements
22630     to always fail with ENOSYS.  Some functions are actually named
22631     something starting with __ and the normal name is an alias.  */
22632 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22633 #error found stub for mkstemp
22634 #endif
22635
22636         return mkstemp ();
22637   ;
22638   return 0;
22639 }
22640 _ACEOF
22641 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22642 if { (eval echo "$as_me:22642: \"$ac_link\"") >&5
22643   (eval $ac_link) 2>&5
22644   ac_status=$?
22645   echo "$as_me:22645: \$? = $ac_status" >&5
22646   (exit "$ac_status"); } &&
22647          { ac_try='test -s "conftest$ac_exeext"'
22648   { (eval echo "$as_me:22648: \"$ac_try\"") >&5
22649   (eval $ac_try) 2>&5
22650   ac_status=$?
22651   echo "$as_me:22651: \$? = $ac_status" >&5
22652   (exit "$ac_status"); }; }; then
22653   ac_cv_func_mkstemp=yes
22654 else
22655   echo "$as_me: failed program was:" >&5
22656 cat "conftest.$ac_ext" >&5
22657 ac_cv_func_mkstemp=no
22658 fi
22659 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22660 fi
22661 echo "$as_me:22661: result: $ac_cv_func_mkstemp" >&5
22662 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22663
22664 fi
22665 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22666
22667 cat >>confdefs.h <<\EOF
22668 #define HAVE_MKSTEMP 1
22669 EOF
22670
22671 fi
22672
22673 # setup for prototype of fallback for vsscanf()
22674
22675 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22676         HAVE_VSSCANF=1
22677 else
22678         HAVE_VSSCANF=0
22679 fi
22680
22681 if test "x$cross_compiling" = xyes ; then
22682         { echo "$as_me:22682: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22683 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22684 else
22685         echo "$as_me:22685: checking whether setvbuf arguments are reversed" >&5
22686 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22687 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22688   echo $ECHO_N "(cached) $ECHO_C" >&6
22689 else
22690   if test "$cross_compiling" = yes; then
22691   { { echo "$as_me:22691: error: cannot run test program while cross compiling" >&5
22692 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22693    { (exit 1); exit 1; }; }
22694 else
22695   cat >"conftest.$ac_ext" <<_ACEOF
22696 #line 22696 "configure"
22697 #include "confdefs.h"
22698 #include <stdio.h>
22699 /* If setvbuf has the reversed format, exit 0. */
22700 int
22701 main (void)
22702 {
22703   /* This call has the arguments reversed.
22704      A reversed system may check and see that the address of main
22705      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22706   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22707     $ac_main_return(1);
22708   putc('\r', stdout);
22709   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22710 }
22711 _ACEOF
22712 rm -f "conftest$ac_exeext"
22713 if { (eval echo "$as_me:22713: \"$ac_link\"") >&5
22714   (eval $ac_link) 2>&5
22715   ac_status=$?
22716   echo "$as_me:22716: \$? = $ac_status" >&5
22717   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22718   { (eval echo "$as_me:22718: \"$ac_try\"") >&5
22719   (eval $ac_try) 2>&5
22720   ac_status=$?
22721   echo "$as_me:22721: \$? = $ac_status" >&5
22722   (exit "$ac_status"); }; }; then
22723   ac_cv_func_setvbuf_reversed=yes
22724 else
22725   echo "$as_me: program exited with status $ac_status" >&5
22726 echo "$as_me: failed program was:" >&5
22727 cat "conftest.$ac_ext" >&5
22728 ac_cv_func_setvbuf_reversed=no
22729 fi
22730 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22731 fi
22732 rm -f core ./core.* ./*.core
22733 fi
22734 echo "$as_me:22734: result: $ac_cv_func_setvbuf_reversed" >&5
22735 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22736 if test $ac_cv_func_setvbuf_reversed = yes; then
22737
22738 cat >>confdefs.h <<\EOF
22739 #define SETVBUF_REVERSED 1
22740 EOF
22741
22742 fi
22743
22744 fi
22745 echo "$as_me:22745: checking for intptr_t" >&5
22746 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22747 if test "${ac_cv_type_intptr_t+set}" = set; then
22748   echo $ECHO_N "(cached) $ECHO_C" >&6
22749 else
22750   cat >"conftest.$ac_ext" <<_ACEOF
22751 #line 22751 "configure"
22752 #include "confdefs.h"
22753 $ac_includes_default
22754 int
22755 main (void)
22756 {
22757 if ((intptr_t *) 0)
22758   return 0;
22759 if (sizeof (intptr_t))
22760   return 0;
22761   ;
22762   return 0;
22763 }
22764 _ACEOF
22765 rm -f "conftest.$ac_objext"
22766 if { (eval echo "$as_me:22766: \"$ac_compile\"") >&5
22767   (eval $ac_compile) 2>&5
22768   ac_status=$?
22769   echo "$as_me:22769: \$? = $ac_status" >&5
22770   (exit "$ac_status"); } &&
22771          { ac_try='test -s "conftest.$ac_objext"'
22772   { (eval echo "$as_me:22772: \"$ac_try\"") >&5
22773   (eval $ac_try) 2>&5
22774   ac_status=$?
22775   echo "$as_me:22775: \$? = $ac_status" >&5
22776   (exit "$ac_status"); }; }; then
22777   ac_cv_type_intptr_t=yes
22778 else
22779   echo "$as_me: failed program was:" >&5
22780 cat "conftest.$ac_ext" >&5
22781 ac_cv_type_intptr_t=no
22782 fi
22783 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22784 fi
22785 echo "$as_me:22785: result: $ac_cv_type_intptr_t" >&5
22786 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22787 if test "$ac_cv_type_intptr_t" = yes; then
22788   :
22789 else
22790
22791 cat >>confdefs.h <<EOF
22792 #define intptr_t long
22793 EOF
22794
22795 fi
22796
22797 echo "$as_me:22797: checking for ssize_t" >&5
22798 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22799 if test "${ac_cv_type_ssize_t+set}" = set; then
22800   echo $ECHO_N "(cached) $ECHO_C" >&6
22801 else
22802   cat >"conftest.$ac_ext" <<_ACEOF
22803 #line 22803 "configure"
22804 #include "confdefs.h"
22805 $ac_includes_default
22806 int
22807 main (void)
22808 {
22809 if ((ssize_t *) 0)
22810   return 0;
22811 if (sizeof (ssize_t))
22812   return 0;
22813   ;
22814   return 0;
22815 }
22816 _ACEOF
22817 rm -f "conftest.$ac_objext"
22818 if { (eval echo "$as_me:22818: \"$ac_compile\"") >&5
22819   (eval $ac_compile) 2>&5
22820   ac_status=$?
22821   echo "$as_me:22821: \$? = $ac_status" >&5
22822   (exit "$ac_status"); } &&
22823          { ac_try='test -s "conftest.$ac_objext"'
22824   { (eval echo "$as_me:22824: \"$ac_try\"") >&5
22825   (eval $ac_try) 2>&5
22826   ac_status=$?
22827   echo "$as_me:22827: \$? = $ac_status" >&5
22828   (exit "$ac_status"); }; }; then
22829   ac_cv_type_ssize_t=yes
22830 else
22831   echo "$as_me: failed program was:" >&5
22832 cat "conftest.$ac_ext" >&5
22833 ac_cv_type_ssize_t=no
22834 fi
22835 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22836 fi
22837 echo "$as_me:22837: result: $ac_cv_type_ssize_t" >&5
22838 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22839 if test "$ac_cv_type_ssize_t" = yes; then
22840   :
22841 else
22842
22843 cat >>confdefs.h <<EOF
22844 #define ssize_t int
22845 EOF
22846
22847 fi
22848
22849 echo "$as_me:22849: checking for type sigaction_t" >&5
22850 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22851 if test "${cf_cv_type_sigaction+set}" = set; then
22852   echo $ECHO_N "(cached) $ECHO_C" >&6
22853 else
22854
22855         cat >"conftest.$ac_ext" <<_ACEOF
22856 #line 22856 "configure"
22857 #include "confdefs.h"
22858
22859 #include <signal.h>
22860 int
22861 main (void)
22862 {
22863 sigaction_t x
22864   ;
22865   return 0;
22866 }
22867 _ACEOF
22868 rm -f "conftest.$ac_objext"
22869 if { (eval echo "$as_me:22869: \"$ac_compile\"") >&5
22870   (eval $ac_compile) 2>&5
22871   ac_status=$?
22872   echo "$as_me:22872: \$? = $ac_status" >&5
22873   (exit "$ac_status"); } &&
22874          { ac_try='test -s "conftest.$ac_objext"'
22875   { (eval echo "$as_me:22875: \"$ac_try\"") >&5
22876   (eval $ac_try) 2>&5
22877   ac_status=$?
22878   echo "$as_me:22878: \$? = $ac_status" >&5
22879   (exit "$ac_status"); }; }; then
22880   cf_cv_type_sigaction=yes
22881 else
22882   echo "$as_me: failed program was:" >&5
22883 cat "conftest.$ac_ext" >&5
22884 cf_cv_type_sigaction=no
22885 fi
22886 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22887 fi
22888
22889 echo "$as_me:22889: result: $cf_cv_type_sigaction" >&5
22890 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22891 test "$cf_cv_type_sigaction" = yes &&
22892 cat >>confdefs.h <<\EOF
22893 #define HAVE_TYPE_SIGACTION 1
22894 EOF
22895
22896 echo "$as_me:22896: checking declaration of size-change" >&5
22897 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22898 if test "${cf_cv_sizechange+set}" = set; then
22899   echo $ECHO_N "(cached) $ECHO_C" >&6
22900 else
22901
22902         cf_cv_sizechange=unknown
22903         cf_save_CPPFLAGS="$CPPFLAGS"
22904
22905 for cf_opts in "" "NEED_PTEM_H"
22906 do
22907
22908         CPPFLAGS="$cf_save_CPPFLAGS"
22909         if test -n "$cf_opts"
22910         then
22911
22912         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22913         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22914
22915         fi
22916         cat >"conftest.$ac_ext" <<_ACEOF
22917 #line 22917 "configure"
22918 #include "confdefs.h"
22919 #include <sys/types.h>
22920 #ifdef HAVE_TERMIOS_H
22921 #include <termios.h>
22922 #else
22923 #ifdef HAVE_TERMIO_H
22924 #include <termio.h>
22925 #endif
22926 #endif
22927
22928 #ifdef NEED_PTEM_H
22929 /* This is a workaround for SCO:  they neglected to define struct winsize in
22930  * termios.h -- it is only in termio.h and ptem.h
22931  */
22932 #include <sys/stream.h>
22933 #include <sys/ptem.h>
22934 #endif
22935
22936 #ifdef HAVE_SYS_IOCTL_H
22937 #include <sys/ioctl.h>
22938 #endif
22939
22940 int
22941 main (void)
22942 {
22943
22944 #ifdef TIOCGSIZE
22945         struct ttysize win;     /* SunOS 3.0... */
22946         int y = win.ts_lines = 2;
22947         int x = win.ts_cols = 1;
22948         (void)y;
22949         (void)x;
22950 #else
22951 #ifdef TIOCGWINSZ
22952         struct winsize win;     /* everything else */
22953         int y = win.ws_row = 2;
22954         int x = win.ws_col = 1;
22955         (void)y;
22956         (void)x;
22957 #else
22958         no TIOCGSIZE or TIOCGWINSZ
22959 #endif /* TIOCGWINSZ */
22960 #endif /* TIOCGSIZE */
22961
22962   ;
22963   return 0;
22964 }
22965 _ACEOF
22966 rm -f "conftest.$ac_objext"
22967 if { (eval echo "$as_me:22967: \"$ac_compile\"") >&5
22968   (eval $ac_compile) 2>&5
22969   ac_status=$?
22970   echo "$as_me:22970: \$? = $ac_status" >&5
22971   (exit "$ac_status"); } &&
22972          { ac_try='test -s "conftest.$ac_objext"'
22973   { (eval echo "$as_me:22973: \"$ac_try\"") >&5
22974   (eval $ac_try) 2>&5
22975   ac_status=$?
22976   echo "$as_me:22976: \$? = $ac_status" >&5
22977   (exit "$ac_status"); }; }; then
22978   cf_cv_sizechange=yes
22979 else
22980   echo "$as_me: failed program was:" >&5
22981 cat "conftest.$ac_ext" >&5
22982 cf_cv_sizechange=no
22983 fi
22984 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22985
22986         CPPFLAGS="$cf_save_CPPFLAGS"
22987         if test "$cf_cv_sizechange" = yes ; then
22988                 echo "size-change succeeded ($cf_opts)" >&5
22989                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22990                 break
22991         fi
22992 done
22993
22994 fi
22995 echo "$as_me:22995: result: $cf_cv_sizechange" >&5
22996 echo "${ECHO_T}$cf_cv_sizechange" >&6
22997 if test "$cf_cv_sizechange" != no ; then
22998
22999 cat >>confdefs.h <<\EOF
23000 #define HAVE_SIZECHANGE 1
23001 EOF
23002
23003         case "$cf_cv_sizechange" in
23004         (NEED*)
23005                 cat >>confdefs.h <<EOF
23006 #define $cf_cv_sizechange  1
23007 EOF
23008
23009                 ;;
23010         esac
23011 fi
23012
23013 echo "$as_me:23013: checking for memmove" >&5
23014 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23015 if test "${ac_cv_func_memmove+set}" = set; then
23016   echo $ECHO_N "(cached) $ECHO_C" >&6
23017 else
23018   cat >"conftest.$ac_ext" <<_ACEOF
23019 #line 23019 "configure"
23020 #include "confdefs.h"
23021 #define memmove autoconf_temporary
23022 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23023 #undef memmove
23024
23025 #ifdef __cplusplus
23026 extern "C"
23027 #endif
23028
23029 /* We use char because int might match the return type of a gcc2
23030    builtin and then its argument prototype would still apply.  */
23031 char memmove (void);
23032
23033 int
23034 main (void)
23035 {
23036
23037 /* The GNU C library defines stubs for functions which it implements
23038     to always fail with ENOSYS.  Some functions are actually named
23039     something starting with __ and the normal name is an alias.  */
23040 #if defined (__stub_memmove) || defined (__stub___memmove)
23041 #error found stub for memmove
23042 #endif
23043
23044         return memmove ();
23045   ;
23046   return 0;
23047 }
23048 _ACEOF
23049 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23050 if { (eval echo "$as_me:23050: \"$ac_link\"") >&5
23051   (eval $ac_link) 2>&5
23052   ac_status=$?
23053   echo "$as_me:23053: \$? = $ac_status" >&5
23054   (exit "$ac_status"); } &&
23055          { ac_try='test -s "conftest$ac_exeext"'
23056   { (eval echo "$as_me:23056: \"$ac_try\"") >&5
23057   (eval $ac_try) 2>&5
23058   ac_status=$?
23059   echo "$as_me:23059: \$? = $ac_status" >&5
23060   (exit "$ac_status"); }; }; then
23061   ac_cv_func_memmove=yes
23062 else
23063   echo "$as_me: failed program was:" >&5
23064 cat "conftest.$ac_ext" >&5
23065 ac_cv_func_memmove=no
23066 fi
23067 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23068 fi
23069 echo "$as_me:23069: result: $ac_cv_func_memmove" >&5
23070 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23071 if test "$ac_cv_func_memmove" = yes; then
23072   :
23073 else
23074
23075 echo "$as_me:23075: checking for bcopy" >&5
23076 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23077 if test "${ac_cv_func_bcopy+set}" = set; then
23078   echo $ECHO_N "(cached) $ECHO_C" >&6
23079 else
23080   cat >"conftest.$ac_ext" <<_ACEOF
23081 #line 23081 "configure"
23082 #include "confdefs.h"
23083 #define bcopy autoconf_temporary
23084 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23085 #undef bcopy
23086
23087 #ifdef __cplusplus
23088 extern "C"
23089 #endif
23090
23091 /* We use char because int might match the return type of a gcc2
23092    builtin and then its argument prototype would still apply.  */
23093 char bcopy (void);
23094
23095 int
23096 main (void)
23097 {
23098
23099 /* The GNU C library defines stubs for functions which it implements
23100     to always fail with ENOSYS.  Some functions are actually named
23101     something starting with __ and the normal name is an alias.  */
23102 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23103 #error found stub for bcopy
23104 #endif
23105
23106         return bcopy ();
23107   ;
23108   return 0;
23109 }
23110 _ACEOF
23111 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23112 if { (eval echo "$as_me:23112: \"$ac_link\"") >&5
23113   (eval $ac_link) 2>&5
23114   ac_status=$?
23115   echo "$as_me:23115: \$? = $ac_status" >&5
23116   (exit "$ac_status"); } &&
23117          { ac_try='test -s "conftest$ac_exeext"'
23118   { (eval echo "$as_me:23118: \"$ac_try\"") >&5
23119   (eval $ac_try) 2>&5
23120   ac_status=$?
23121   echo "$as_me:23121: \$? = $ac_status" >&5
23122   (exit "$ac_status"); }; }; then
23123   ac_cv_func_bcopy=yes
23124 else
23125   echo "$as_me: failed program was:" >&5
23126 cat "conftest.$ac_ext" >&5
23127 ac_cv_func_bcopy=no
23128 fi
23129 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23130 fi
23131 echo "$as_me:23131: result: $ac_cv_func_bcopy" >&5
23132 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23133 if test "$ac_cv_func_bcopy" = yes; then
23134
23135         echo "$as_me:23135: checking if bcopy does overlapping moves" >&5
23136 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23137 if test "${cf_cv_good_bcopy+set}" = set; then
23138   echo $ECHO_N "(cached) $ECHO_C" >&6
23139 else
23140
23141                 if test "$cross_compiling" = yes; then
23142   cf_cv_good_bcopy=unknown
23143 else
23144   cat >"conftest.$ac_ext" <<_ACEOF
23145 #line 23145 "configure"
23146 #include "confdefs.h"
23147
23148 int main(void) {
23149         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23150         char temp[40];
23151         bcopy(data, temp, sizeof(data));
23152         bcopy(temp+10, temp, 15);
23153         bcopy(temp+5, temp+15, 10);
23154         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23155 }
23156
23157 _ACEOF
23158 rm -f "conftest$ac_exeext"
23159 if { (eval echo "$as_me:23159: \"$ac_link\"") >&5
23160   (eval $ac_link) 2>&5
23161   ac_status=$?
23162   echo "$as_me:23162: \$? = $ac_status" >&5
23163   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23164   { (eval echo "$as_me:23164: \"$ac_try\"") >&5
23165   (eval $ac_try) 2>&5
23166   ac_status=$?
23167   echo "$as_me:23167: \$? = $ac_status" >&5
23168   (exit "$ac_status"); }; }; then
23169   cf_cv_good_bcopy=yes
23170 else
23171   echo "$as_me: program exited with status $ac_status" >&5
23172 echo "$as_me: failed program was:" >&5
23173 cat "conftest.$ac_ext" >&5
23174 cf_cv_good_bcopy=no
23175 fi
23176 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23177 fi
23178
23179 fi
23180 echo "$as_me:23180: result: $cf_cv_good_bcopy" >&5
23181 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23182
23183 else
23184   cf_cv_good_bcopy=no
23185 fi
23186
23187         if test "$cf_cv_good_bcopy" = yes ; then
23188
23189 cat >>confdefs.h <<\EOF
23190 #define USE_OK_BCOPY 1
23191 EOF
23192
23193         else
23194
23195 cat >>confdefs.h <<\EOF
23196 #define USE_MY_MEMMOVE 1
23197 EOF
23198
23199         fi
23200
23201 fi
23202
23203 tty >/dev/null 2>&1 || {
23204 for ac_func in posix_openpt
23205 do
23206 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23207 echo "$as_me:23207: checking for $ac_func" >&5
23208 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23209 if eval "test \"\${$as_ac_var+set}\" = set"; then
23210   echo $ECHO_N "(cached) $ECHO_C" >&6
23211 else
23212   cat >"conftest.$ac_ext" <<_ACEOF
23213 #line 23213 "configure"
23214 #include "confdefs.h"
23215 #define $ac_func autoconf_temporary
23216 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23217 #undef $ac_func
23218
23219 #ifdef __cplusplus
23220 extern "C"
23221 #endif
23222
23223 /* We use char because int might match the return type of a gcc2
23224    builtin and then its argument prototype would still apply.  */
23225 char $ac_func (void);
23226
23227 int
23228 main (void)
23229 {
23230
23231 /* The GNU C library defines stubs for functions which it implements
23232     to always fail with ENOSYS.  Some functions are actually named
23233     something starting with __ and the normal name is an alias.  */
23234 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23235 #error found stub for $ac_func
23236 #endif
23237
23238         return $ac_func ();
23239   ;
23240   return 0;
23241 }
23242 _ACEOF
23243 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23244 if { (eval echo "$as_me:23244: \"$ac_link\"") >&5
23245   (eval $ac_link) 2>&5
23246   ac_status=$?
23247   echo "$as_me:23247: \$? = $ac_status" >&5
23248   (exit "$ac_status"); } &&
23249          { ac_try='test -s "conftest$ac_exeext"'
23250   { (eval echo "$as_me:23250: \"$ac_try\"") >&5
23251   (eval $ac_try) 2>&5
23252   ac_status=$?
23253   echo "$as_me:23253: \$? = $ac_status" >&5
23254   (exit "$ac_status"); }; }; then
23255   eval "$as_ac_var=yes"
23256 else
23257   echo "$as_me: failed program was:" >&5
23258 cat "conftest.$ac_ext" >&5
23259 eval "$as_ac_var=no"
23260 fi
23261 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23262 fi
23263 echo "$as_me:23263: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23264 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23265 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23266   cat >>confdefs.h <<EOF
23267 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23268 EOF
23269
23270 fi
23271 done
23272  }
23273 echo "$as_me:23273: checking if poll really works" >&5
23274 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23275 if test "${cf_cv_working_poll+set}" = set; then
23276   echo $ECHO_N "(cached) $ECHO_C" >&6
23277 else
23278
23279 if test "$cross_compiling" = yes; then
23280   cf_cv_working_poll=unknown
23281 else
23282   cat >"conftest.$ac_ext" <<_ACEOF
23283 #line 23283 "configure"
23284 #include "confdefs.h"
23285
23286 #include <stdlib.h>
23287 #include <stdio.h>
23288 #include <unistd.h>
23289 #include <fcntl.h>
23290 #ifdef HAVE_POLL_H
23291 #include <poll.h>
23292 #else
23293 #include <sys/poll.h>
23294 #endif
23295 int main(void) {
23296         struct pollfd myfds;
23297         int ret;
23298
23299         /* check for Darwin bug with respect to "devices" */
23300         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23301         if (myfds.fd < 0)
23302                 myfds.fd = 0;
23303         myfds.events = POLLIN;
23304         myfds.revents = 0;
23305
23306         ret = poll(&myfds, 1, 100);
23307
23308         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23309                 ret = -1;
23310         } else {
23311                 int fd = 0;
23312                 if (!isatty(fd)) {
23313                         fd = open("/dev/tty", 2);       /* O_RDWR */
23314                 }
23315 #ifdef HAVE_POSIX_OPENPT
23316                 if (fd < 0) {
23317                         fd = posix_openpt(O_RDWR);
23318                 }
23319 #endif
23320
23321                 if (fd >= 0) {
23322                         /* also check with standard input */
23323                         myfds.fd = fd;
23324                         myfds.events = POLLIN;
23325                         myfds.revents = 0;
23326                         ret = poll(&myfds, 1, 100);
23327                 } else {
23328                         ret = -1;
23329                 }
23330         }
23331         ${cf_cv_main_return:-return}(ret < 0);
23332 }
23333 _ACEOF
23334 rm -f "conftest$ac_exeext"
23335 if { (eval echo "$as_me:23335: \"$ac_link\"") >&5
23336   (eval $ac_link) 2>&5
23337   ac_status=$?
23338   echo "$as_me:23338: \$? = $ac_status" >&5
23339   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23340   { (eval echo "$as_me:23340: \"$ac_try\"") >&5
23341   (eval $ac_try) 2>&5
23342   ac_status=$?
23343   echo "$as_me:23343: \$? = $ac_status" >&5
23344   (exit "$ac_status"); }; }; then
23345   cf_cv_working_poll=yes
23346 else
23347   echo "$as_me: program exited with status $ac_status" >&5
23348 echo "$as_me: failed program was:" >&5
23349 cat "conftest.$ac_ext" >&5
23350 cf_cv_working_poll=no
23351 fi
23352 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23353 fi
23354 fi
23355 echo "$as_me:23355: result: $cf_cv_working_poll" >&5
23356 echo "${ECHO_T}$cf_cv_working_poll" >&6
23357 test "$cf_cv_working_poll" = "yes" &&
23358 cat >>confdefs.h <<\EOF
23359 #define HAVE_WORKING_POLL 1
23360 EOF
23361
23362 echo "$as_me:23362: checking for va_copy" >&5
23363 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23364 if test "${cf_cv_have_va_copy+set}" = set; then
23365   echo $ECHO_N "(cached) $ECHO_C" >&6
23366 else
23367
23368 cat >"conftest.$ac_ext" <<_ACEOF
23369 #line 23369 "configure"
23370 #include "confdefs.h"
23371
23372 #include <stdarg.h>
23373
23374 int
23375 main (void)
23376 {
23377
23378         static va_list dst;
23379         static va_list src;
23380         va_copy(dst, src)
23381   ;
23382   return 0;
23383 }
23384 _ACEOF
23385 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23386 if { (eval echo "$as_me:23386: \"$ac_link\"") >&5
23387   (eval $ac_link) 2>&5
23388   ac_status=$?
23389   echo "$as_me:23389: \$? = $ac_status" >&5
23390   (exit "$ac_status"); } &&
23391          { ac_try='test -s "conftest$ac_exeext"'
23392   { (eval echo "$as_me:23392: \"$ac_try\"") >&5
23393   (eval $ac_try) 2>&5
23394   ac_status=$?
23395   echo "$as_me:23395: \$? = $ac_status" >&5
23396   (exit "$ac_status"); }; }; then
23397   cf_cv_have_va_copy=yes
23398 else
23399   echo "$as_me: failed program was:" >&5
23400 cat "conftest.$ac_ext" >&5
23401 cf_cv_have_va_copy=no
23402 fi
23403 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23404 fi
23405 echo "$as_me:23405: result: $cf_cv_have_va_copy" >&5
23406 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23407
23408 if test "$cf_cv_have_va_copy" = yes;
23409 then
23410
23411 cat >>confdefs.h <<\EOF
23412 #define HAVE_VA_COPY 1
23413 EOF
23414
23415 else # !cf_cv_have_va_copy
23416
23417 echo "$as_me:23417: checking for __va_copy" >&5
23418 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23419 if test "${cf_cv_have___va_copy+set}" = set; then
23420   echo $ECHO_N "(cached) $ECHO_C" >&6
23421 else
23422
23423 cat >"conftest.$ac_ext" <<_ACEOF
23424 #line 23424 "configure"
23425 #include "confdefs.h"
23426
23427 #include <stdarg.h>
23428
23429 int
23430 main (void)
23431 {
23432
23433         static va_list dst;
23434         static va_list src;
23435         __va_copy(dst, src)
23436   ;
23437   return 0;
23438 }
23439 _ACEOF
23440 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23441 if { (eval echo "$as_me:23441: \"$ac_link\"") >&5
23442   (eval $ac_link) 2>&5
23443   ac_status=$?
23444   echo "$as_me:23444: \$? = $ac_status" >&5
23445   (exit "$ac_status"); } &&
23446          { ac_try='test -s "conftest$ac_exeext"'
23447   { (eval echo "$as_me:23447: \"$ac_try\"") >&5
23448   (eval $ac_try) 2>&5
23449   ac_status=$?
23450   echo "$as_me:23450: \$? = $ac_status" >&5
23451   (exit "$ac_status"); }; }; then
23452   cf_cv_have___va_copy=yes
23453 else
23454   echo "$as_me: failed program was:" >&5
23455 cat "conftest.$ac_ext" >&5
23456 cf_cv_have___va_copy=no
23457 fi
23458 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23459 fi
23460 echo "$as_me:23460: result: $cf_cv_have___va_copy" >&5
23461 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23462
23463 if test "$cf_cv_have___va_copy" = yes
23464 then
23465
23466 cat >>confdefs.h <<\EOF
23467 #define HAVE___VA_COPY 1
23468 EOF
23469
23470 else # !cf_cv_have___va_copy
23471
23472 echo "$as_me:23472: checking for __builtin_va_copy" >&5
23473 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23474 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23475   echo $ECHO_N "(cached) $ECHO_C" >&6
23476 else
23477
23478 cat >"conftest.$ac_ext" <<_ACEOF
23479 #line 23479 "configure"
23480 #include "confdefs.h"
23481
23482 #include <stdarg.h>
23483
23484 int
23485 main (void)
23486 {
23487
23488         static va_list dst;
23489         static va_list src;
23490         __builtin_va_copy(dst, src)
23491   ;
23492   return 0;
23493 }
23494 _ACEOF
23495 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23496 if { (eval echo "$as_me:23496: \"$ac_link\"") >&5
23497   (eval $ac_link) 2>&5
23498   ac_status=$?
23499   echo "$as_me:23499: \$? = $ac_status" >&5
23500   (exit "$ac_status"); } &&
23501          { ac_try='test -s "conftest$ac_exeext"'
23502   { (eval echo "$as_me:23502: \"$ac_try\"") >&5
23503   (eval $ac_try) 2>&5
23504   ac_status=$?
23505   echo "$as_me:23505: \$? = $ac_status" >&5
23506   (exit "$ac_status"); }; }; then
23507   cf_cv_have___builtin_va_copy=yes
23508 else
23509   echo "$as_me: failed program was:" >&5
23510 cat "conftest.$ac_ext" >&5
23511 cf_cv_have___builtin_va_copy=no
23512 fi
23513 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23514 fi
23515 echo "$as_me:23515: result: $cf_cv_have___builtin_va_copy" >&5
23516 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23517
23518 test "$cf_cv_have___builtin_va_copy" = yes &&
23519
23520 cat >>confdefs.h <<\EOF
23521 #define HAVE___BUILTIN_VA_COPY 1
23522 EOF
23523
23524 fi # cf_cv_have___va_copy
23525
23526 fi # cf_cv_have_va_copy
23527
23528 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23529 (*yes*)
23530         ;;
23531
23532 (*)
23533         echo "$as_me:23533: checking if we can simply copy va_list" >&5
23534 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23535 if test "${cf_cv_pointer_va_list+set}" = set; then
23536   echo $ECHO_N "(cached) $ECHO_C" >&6
23537 else
23538
23539 cat >"conftest.$ac_ext" <<_ACEOF
23540 #line 23540 "configure"
23541 #include "confdefs.h"
23542
23543 #include <stdarg.h>
23544
23545 int
23546 main (void)
23547 {
23548
23549         va_list dst;
23550         va_list src;
23551         dst = src
23552   ;
23553   return 0;
23554 }
23555 _ACEOF
23556 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23557 if { (eval echo "$as_me:23557: \"$ac_link\"") >&5
23558   (eval $ac_link) 2>&5
23559   ac_status=$?
23560   echo "$as_me:23560: \$? = $ac_status" >&5
23561   (exit "$ac_status"); } &&
23562          { ac_try='test -s "conftest$ac_exeext"'
23563   { (eval echo "$as_me:23563: \"$ac_try\"") >&5
23564   (eval $ac_try) 2>&5
23565   ac_status=$?
23566   echo "$as_me:23566: \$? = $ac_status" >&5
23567   (exit "$ac_status"); }; }; then
23568   cf_cv_pointer_va_list=yes
23569 else
23570   echo "$as_me: failed program was:" >&5
23571 cat "conftest.$ac_ext" >&5
23572 cf_cv_pointer_va_list=no
23573 fi
23574 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23575 fi
23576 echo "$as_me:23576: result: $cf_cv_pointer_va_list" >&5
23577 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23578
23579         if test "$cf_cv_pointer_va_list" = no
23580         then
23581                 echo "$as_me:23581: checking if we can copy va_list indirectly" >&5
23582 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23583 if test "${cf_cv_array_va_list+set}" = set; then
23584   echo $ECHO_N "(cached) $ECHO_C" >&6
23585 else
23586
23587 cat >"conftest.$ac_ext" <<_ACEOF
23588 #line 23588 "configure"
23589 #include "confdefs.h"
23590
23591 #include <stdarg.h>
23592
23593 int
23594 main (void)
23595 {
23596
23597         va_list dst;
23598         va_list src;
23599         *dst = *src
23600   ;
23601   return 0;
23602 }
23603 _ACEOF
23604 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23605 if { (eval echo "$as_me:23605: \"$ac_link\"") >&5
23606   (eval $ac_link) 2>&5
23607   ac_status=$?
23608   echo "$as_me:23608: \$? = $ac_status" >&5
23609   (exit "$ac_status"); } &&
23610          { ac_try='test -s "conftest$ac_exeext"'
23611   { (eval echo "$as_me:23611: \"$ac_try\"") >&5
23612   (eval $ac_try) 2>&5
23613   ac_status=$?
23614   echo "$as_me:23614: \$? = $ac_status" >&5
23615   (exit "$ac_status"); }; }; then
23616   cf_cv_array_va_list=yes
23617 else
23618   echo "$as_me: failed program was:" >&5
23619 cat "conftest.$ac_ext" >&5
23620 cf_cv_array_va_list=no
23621 fi
23622 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23623 fi
23624 echo "$as_me:23624: result: $cf_cv_array_va_list" >&5
23625 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23626                 test "$cf_cv_array_va_list" = yes &&
23627 cat >>confdefs.h <<\EOF
23628 #define ARRAY_VA_LIST 1
23629 EOF
23630
23631         fi
23632         ;;
23633 esac
23634
23635 echo "$as_me:23635: checking for pid_t" >&5
23636 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23637 if test "${ac_cv_type_pid_t+set}" = set; then
23638   echo $ECHO_N "(cached) $ECHO_C" >&6
23639 else
23640   cat >"conftest.$ac_ext" <<_ACEOF
23641 #line 23641 "configure"
23642 #include "confdefs.h"
23643 $ac_includes_default
23644 int
23645 main (void)
23646 {
23647 if ((pid_t *) 0)
23648   return 0;
23649 if (sizeof (pid_t))
23650   return 0;
23651   ;
23652   return 0;
23653 }
23654 _ACEOF
23655 rm -f "conftest.$ac_objext"
23656 if { (eval echo "$as_me:23656: \"$ac_compile\"") >&5
23657   (eval $ac_compile) 2>&5
23658   ac_status=$?
23659   echo "$as_me:23659: \$? = $ac_status" >&5
23660   (exit "$ac_status"); } &&
23661          { ac_try='test -s "conftest.$ac_objext"'
23662   { (eval echo "$as_me:23662: \"$ac_try\"") >&5
23663   (eval $ac_try) 2>&5
23664   ac_status=$?
23665   echo "$as_me:23665: \$? = $ac_status" >&5
23666   (exit "$ac_status"); }; }; then
23667   ac_cv_type_pid_t=yes
23668 else
23669   echo "$as_me: failed program was:" >&5
23670 cat "conftest.$ac_ext" >&5
23671 ac_cv_type_pid_t=no
23672 fi
23673 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23674 fi
23675 echo "$as_me:23675: result: $ac_cv_type_pid_t" >&5
23676 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23677 if test "$ac_cv_type_pid_t" = yes; then
23678   :
23679 else
23680
23681 cat >>confdefs.h <<EOF
23682 #define pid_t int
23683 EOF
23684
23685 fi
23686
23687 for ac_header in unistd.h vfork.h
23688 do
23689 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23690 echo "$as_me:23690: checking for $ac_header" >&5
23691 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23692 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23693   echo $ECHO_N "(cached) $ECHO_C" >&6
23694 else
23695   cat >"conftest.$ac_ext" <<_ACEOF
23696 #line 23696 "configure"
23697 #include "confdefs.h"
23698 #include <$ac_header>
23699 _ACEOF
23700 if { (eval echo "$as_me:23700: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23701   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23702   ac_status=$?
23703   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23704   rm -f conftest.er1
23705   cat conftest.err >&5
23706   echo "$as_me:23706: \$? = $ac_status" >&5
23707   (exit "$ac_status"); } >/dev/null; then
23708   if test -s conftest.err; then
23709     ac_cpp_err=$ac_c_preproc_warn_flag
23710   else
23711     ac_cpp_err=
23712   fi
23713 else
23714   ac_cpp_err=yes
23715 fi
23716 if test -z "$ac_cpp_err"; then
23717   eval "$as_ac_Header=yes"
23718 else
23719   echo "$as_me: failed program was:" >&5
23720   cat "conftest.$ac_ext" >&5
23721   eval "$as_ac_Header=no"
23722 fi
23723 rm -f conftest.err "conftest.$ac_ext"
23724 fi
23725 echo "$as_me:23725: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23726 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23727 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23728   cat >>confdefs.h <<EOF
23729 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23730 EOF
23731
23732 fi
23733 done
23734
23735 for ac_func in fork vfork
23736 do
23737 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23738 echo "$as_me:23738: checking for $ac_func" >&5
23739 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23740 if eval "test \"\${$as_ac_var+set}\" = set"; then
23741   echo $ECHO_N "(cached) $ECHO_C" >&6
23742 else
23743   cat >"conftest.$ac_ext" <<_ACEOF
23744 #line 23744 "configure"
23745 #include "confdefs.h"
23746 #define $ac_func autoconf_temporary
23747 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23748 #undef $ac_func
23749
23750 #ifdef __cplusplus
23751 extern "C"
23752 #endif
23753
23754 /* We use char because int might match the return type of a gcc2
23755    builtin and then its argument prototype would still apply.  */
23756 char $ac_func (void);
23757
23758 int
23759 main (void)
23760 {
23761
23762 /* The GNU C library defines stubs for functions which it implements
23763     to always fail with ENOSYS.  Some functions are actually named
23764     something starting with __ and the normal name is an alias.  */
23765 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23766 #error found stub for $ac_func
23767 #endif
23768
23769         return $ac_func ();
23770   ;
23771   return 0;
23772 }
23773 _ACEOF
23774 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23775 if { (eval echo "$as_me:23775: \"$ac_link\"") >&5
23776   (eval $ac_link) 2>&5
23777   ac_status=$?
23778   echo "$as_me:23778: \$? = $ac_status" >&5
23779   (exit "$ac_status"); } &&
23780          { ac_try='test -s "conftest$ac_exeext"'
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   eval "$as_ac_var=yes"
23787 else
23788   echo "$as_me: failed program was:" >&5
23789 cat "conftest.$ac_ext" >&5
23790 eval "$as_ac_var=no"
23791 fi
23792 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23793 fi
23794 echo "$as_me:23794: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23795 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23796 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23797   cat >>confdefs.h <<EOF
23798 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23799 EOF
23800
23801 fi
23802 done
23803
23804 ac_cv_func_fork_works=$ac_cv_func_fork
23805 if test "x$ac_cv_func_fork" = xyes; then
23806   echo "$as_me:23806: checking for working fork" >&5
23807 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23808 if test "${ac_cv_func_fork_works+set}" = set; then
23809   echo $ECHO_N "(cached) $ECHO_C" >&6
23810 else
23811   if test "$cross_compiling" = yes; then
23812   ac_cv_func_fork_works=cross
23813 else
23814   cat >"conftest.$ac_ext" <<_ACEOF
23815 /* By Rüdiger Kuhlmann. */
23816       #include <sys/types.h>
23817       #if HAVE_UNISTD_H
23818       # include <unistd.h>
23819       #endif
23820       /* Some systems only have a dummy stub for fork() */
23821       int main (void)
23822       {
23823         if (fork() < 0)
23824           $ac_main_return (1);
23825         $ac_main_return (0);
23826       }
23827 _ACEOF
23828 rm -f "conftest$ac_exeext"
23829 if { (eval echo "$as_me:23829: \"$ac_link\"") >&5
23830   (eval $ac_link) 2>&5
23831   ac_status=$?
23832   echo "$as_me:23832: \$? = $ac_status" >&5
23833   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23834   { (eval echo "$as_me:23834: \"$ac_try\"") >&5
23835   (eval $ac_try) 2>&5
23836   ac_status=$?
23837   echo "$as_me:23837: \$? = $ac_status" >&5
23838   (exit "$ac_status"); }; }; then
23839   ac_cv_func_fork_works=yes
23840 else
23841   echo "$as_me: program exited with status $ac_status" >&5
23842 echo "$as_me: failed program was:" >&5
23843 cat "conftest.$ac_ext" >&5
23844 ac_cv_func_fork_works=no
23845 fi
23846 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23847 fi
23848 fi
23849 echo "$as_me:23849: result: $ac_cv_func_fork_works" >&5
23850 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23851
23852 fi
23853 if test "x$ac_cv_func_fork_works" = xcross; then
23854   case $host in
23855     *-*-amigaos* | *-*-msdosdjgpp*)
23856       # Override, as these systems have only a dummy fork() stub
23857       ac_cv_func_fork_works=no
23858       ;;
23859     *)
23860       ac_cv_func_fork_works=yes
23861       ;;
23862   esac
23863   { echo "$as_me:23863: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23864 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23865 fi
23866 ac_cv_func_vfork_works=$ac_cv_func_vfork
23867 if test "x$ac_cv_func_vfork" = xyes; then
23868   echo "$as_me:23868: checking for working vfork" >&5
23869 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23870 if test "${ac_cv_func_vfork_works+set}" = set; then
23871   echo $ECHO_N "(cached) $ECHO_C" >&6
23872 else
23873   if test "$cross_compiling" = yes; then
23874   ac_cv_func_vfork_works=cross
23875 else
23876   cat >"conftest.$ac_ext" <<_ACEOF
23877 #line 23877 "configure"
23878 #include "confdefs.h"
23879 /* Thanks to Paul Eggert for this test.  */
23880 #include <stdio.h>
23881 #include <sys/types.h>
23882 #include <sys/stat.h>
23883 #if HAVE_UNISTD_H
23884 # include <unistd.h>
23885 #endif
23886 #if HAVE_VFORK_H
23887 # include <vfork.h>
23888 #endif
23889 /* On some sparc systems, changes by the child to local and incoming
23890    argument registers are propagated back to the parent.  The compiler
23891    is told about this with #include <vfork.h>, but some compilers
23892    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23893    static variable whose address is put into a register that is
23894    clobbered by the vfork.  */
23895 static
23896 #ifdef __cplusplus
23897 sparc_address_test (int arg)
23898 # else
23899 sparc_address_test (arg) int arg;
23900 #endif
23901 {
23902   static pid_t child;
23903   if (!child) {
23904     child = vfork ();
23905     if (child < 0) {
23906       perror ("vfork");
23907       _exit(2);
23908     }
23909     if (!child) {
23910       arg = getpid();
23911       write(-1, "", 0);
23912       _exit (arg);
23913     }
23914   }
23915 }
23916
23917 int
23918 main (void)
23919 {
23920   pid_t parent = getpid ();
23921   pid_t child;
23922
23923   sparc_address_test ();
23924
23925   child = vfork ();
23926
23927   if (child == 0) {
23928     /* Here is another test for sparc vfork register problems.  This
23929        test uses lots of local variables, at least as many local
23930        variables as main has allocated so far including compiler
23931        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23932        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23933        reuse the register of parent for one of the local variables,
23934        since it will think that parent can't possibly be used any more
23935        in this routine.  Assigning to the local variable will thus
23936        munge parent in the parent process.  */
23937     pid_t
23938       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23939       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23940     /* Convince the compiler that p..p7 are live; otherwise, it might
23941        use the same hardware register for all 8 local variables.  */
23942     if (p != p1 || p != p2 || p != p3 || p != p4
23943         || p != p5 || p != p6 || p != p7)
23944       _exit(1);
23945
23946     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23947        from child file descriptors.  If the child closes a descriptor
23948        before it execs or exits, this munges the parent's descriptor
23949        as well.  Test for this by closing stdout in the child.  */
23950     _exit(close(fileno(stdout)) != 0);
23951   } else {
23952     int status;
23953     struct stat st;
23954
23955     while (wait(&status) != child)
23956       ;
23957     $ac_main_return(
23958          /* Was there some problem with vforking?  */
23959          child < 0
23960
23961          /* Did the child fail?  (This shouldn't happen.)  */
23962          || status
23963
23964          /* Did the vfork/compiler bug occur?  */
23965          || parent != getpid()
23966
23967          /* Did the file descriptor bug occur?  */
23968          || fstat(fileno(stdout), &st) != 0
23969          );
23970   }
23971 }
23972 _ACEOF
23973 rm -f "conftest$ac_exeext"
23974 if { (eval echo "$as_me:23974: \"$ac_link\"") >&5
23975   (eval $ac_link) 2>&5
23976   ac_status=$?
23977   echo "$as_me:23977: \$? = $ac_status" >&5
23978   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23979   { (eval echo "$as_me:23979: \"$ac_try\"") >&5
23980   (eval $ac_try) 2>&5
23981   ac_status=$?
23982   echo "$as_me:23982: \$? = $ac_status" >&5
23983   (exit "$ac_status"); }; }; then
23984   ac_cv_func_vfork_works=yes
23985 else
23986   echo "$as_me: program exited with status $ac_status" >&5
23987 echo "$as_me: failed program was:" >&5
23988 cat "conftest.$ac_ext" >&5
23989 ac_cv_func_vfork_works=no
23990 fi
23991 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23992 fi
23993 fi
23994 echo "$as_me:23994: result: $ac_cv_func_vfork_works" >&5
23995 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23996
23997 fi;
23998 if test "x$ac_cv_func_fork_works" = xcross; then
23999   ac_cv_func_vfork_works=ac_cv_func_vfork
24000   { echo "$as_me:24000: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24001 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24002 fi
24003
24004 if test "x$ac_cv_func_vfork_works" = xyes; then
24005
24006 cat >>confdefs.h <<\EOF
24007 #define HAVE_WORKING_VFORK 1
24008 EOF
24009
24010 else
24011
24012 cat >>confdefs.h <<\EOF
24013 #define vfork fork
24014 EOF
24015
24016 fi
24017 if test "x$ac_cv_func_fork_works" = xyes; then
24018
24019 cat >>confdefs.h <<\EOF
24020 #define HAVE_WORKING_FORK 1
24021 EOF
24022
24023 fi
24024
24025 echo "$as_me:24025: checking if fopen accepts explicit binary mode" >&5
24026 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24027 if test "${cf_cv_fopen_bin_r+set}" = set; then
24028   echo $ECHO_N "(cached) $ECHO_C" >&6
24029 else
24030
24031         if test "$cross_compiling" = yes; then
24032   cf_cv_fopen_bin_r=unknown
24033 else
24034   cat >"conftest.$ac_ext" <<_ACEOF
24035 #line 24035 "configure"
24036 #include "confdefs.h"
24037
24038 #include <stdio.h>
24039 int main(void) {
24040         FILE *fp = fopen("conftest.tmp", "wb");
24041         int rc = 0;
24042         if (fp != 0) {
24043                 int p, q;
24044                 for (p = 0; p < 256; ++p) {
24045                         fputc(p, fp);
24046                 }
24047                 fclose(fp);
24048                 fp = fopen("conftest.tmp", "rb");
24049                 if (fp != 0) {
24050                         for (p = 0; p < 256; ++p) {
24051                                 q = fgetc(fp);
24052                                 if (q != p) {
24053                                         rc = 1;
24054                                         break;
24055                                 }
24056                         }
24057                 } else {
24058                         rc = 1;
24059                 }
24060         } else {
24061                 rc = 1;
24062         }
24063         ${cf_cv_main_return:-return} (rc);
24064 }
24065
24066 _ACEOF
24067 rm -f "conftest$ac_exeext"
24068 if { (eval echo "$as_me:24068: \"$ac_link\"") >&5
24069   (eval $ac_link) 2>&5
24070   ac_status=$?
24071   echo "$as_me:24071: \$? = $ac_status" >&5
24072   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24073   { (eval echo "$as_me:24073: \"$ac_try\"") >&5
24074   (eval $ac_try) 2>&5
24075   ac_status=$?
24076   echo "$as_me:24076: \$? = $ac_status" >&5
24077   (exit "$ac_status"); }; }; then
24078   cf_cv_fopen_bin_r=yes
24079 else
24080   echo "$as_me: program exited with status $ac_status" >&5
24081 echo "$as_me: failed program was:" >&5
24082 cat "conftest.$ac_ext" >&5
24083 cf_cv_fopen_bin_r=no
24084 fi
24085 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24086 fi
24087
24088 fi
24089 echo "$as_me:24089: result: $cf_cv_fopen_bin_r" >&5
24090 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24091 test "x$cf_cv_fopen_bin_r" != xno &&
24092 cat >>confdefs.h <<\EOF
24093 #define USE_FOPEN_BIN_R 1
24094 EOF
24095
24096 # special check for test/ditto.c
24097
24098 echo "$as_me:24098: checking for openpty in -lutil" >&5
24099 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24100 if test "${ac_cv_lib_util_openpty+set}" = set; then
24101   echo $ECHO_N "(cached) $ECHO_C" >&6
24102 else
24103   ac_check_lib_save_LIBS=$LIBS
24104 LIBS="-lutil  $LIBS"
24105 cat >"conftest.$ac_ext" <<_ACEOF
24106 #line 24106 "configure"
24107 #include "confdefs.h"
24108
24109 /* Override any gcc2 internal prototype to avoid an error.  */
24110 #ifdef __cplusplus
24111 extern "C"
24112 #endif
24113 /* We use char because int might match the return type of a gcc2
24114    builtin and then its argument prototype would still apply.  */
24115 char openpty ();
24116 int
24117 main (void)
24118 {
24119 openpty ();
24120   ;
24121   return 0;
24122 }
24123 _ACEOF
24124 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24125 if { (eval echo "$as_me:24125: \"$ac_link\"") >&5
24126   (eval $ac_link) 2>&5
24127   ac_status=$?
24128   echo "$as_me:24128: \$? = $ac_status" >&5
24129   (exit "$ac_status"); } &&
24130          { ac_try='test -s "conftest$ac_exeext"'
24131   { (eval echo "$as_me:24131: \"$ac_try\"") >&5
24132   (eval $ac_try) 2>&5
24133   ac_status=$?
24134   echo "$as_me:24134: \$? = $ac_status" >&5
24135   (exit "$ac_status"); }; }; then
24136   ac_cv_lib_util_openpty=yes
24137 else
24138   echo "$as_me: failed program was:" >&5
24139 cat "conftest.$ac_ext" >&5
24140 ac_cv_lib_util_openpty=no
24141 fi
24142 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24143 LIBS=$ac_check_lib_save_LIBS
24144 fi
24145 echo "$as_me:24145: result: $ac_cv_lib_util_openpty" >&5
24146 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24147 if test "$ac_cv_lib_util_openpty" = yes; then
24148   cf_cv_lib_util=yes
24149 else
24150   cf_cv_lib_util=no
24151 fi
24152
24153 echo "$as_me:24153: checking for openpty header" >&5
24154 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24155 if test "${cf_cv_func_openpty+set}" = set; then
24156   echo $ECHO_N "(cached) $ECHO_C" >&6
24157 else
24158
24159         cf_save_LIBS="$LIBS"
24160         test "$cf_cv_lib_util" = yes && {
24161 cf_add_libs="$LIBS"
24162 # reverse order
24163 cf_add_0lib=
24164 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24165 # filter duplicates
24166 for cf_add_1lib in $cf_add_0lib; do
24167         for cf_add_2lib in $cf_add_libs; do
24168                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24169                         cf_add_1lib=
24170                         break
24171                 fi
24172         done
24173         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24174 done
24175 LIBS="$cf_add_libs"
24176  }
24177         for cf_header in pty.h libutil.h util.h
24178         do
24179         cat >"conftest.$ac_ext" <<_ACEOF
24180 #line 24180 "configure"
24181 #include "confdefs.h"
24182
24183 #include <$cf_header>
24184
24185 int
24186 main (void)
24187 {
24188
24189         int x = openpty((int *)0, (int *)0, (char *)0,
24190                                    (struct termios *)0, (struct winsize *)0);
24191
24192   ;
24193   return 0;
24194 }
24195 _ACEOF
24196 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24197 if { (eval echo "$as_me:24197: \"$ac_link\"") >&5
24198   (eval $ac_link) 2>&5
24199   ac_status=$?
24200   echo "$as_me:24200: \$? = $ac_status" >&5
24201   (exit "$ac_status"); } &&
24202          { ac_try='test -s "conftest$ac_exeext"'
24203   { (eval echo "$as_me:24203: \"$ac_try\"") >&5
24204   (eval $ac_try) 2>&5
24205   ac_status=$?
24206   echo "$as_me:24206: \$? = $ac_status" >&5
24207   (exit "$ac_status"); }; }; then
24208
24209                 cf_cv_func_openpty=$cf_header
24210                 break
24211
24212 else
24213   echo "$as_me: failed program was:" >&5
24214 cat "conftest.$ac_ext" >&5
24215
24216                 cf_cv_func_openpty=no
24217
24218 fi
24219 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24220         done
24221         LIBS="$cf_save_LIBS"
24222
24223 fi
24224 echo "$as_me:24224: result: $cf_cv_func_openpty" >&5
24225 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24226
24227 if test "$cf_cv_func_openpty" != no ; then
24228
24229 cat >>confdefs.h <<EOF
24230 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24231 EOF
24232
24233 cat >>confdefs.h <<\EOF
24234 #define USE_XTERM_PTY 1
24235 EOF
24236
24237         if test "x$cf_cv_lib_util" = xyes ; then
24238
24239 cf_add_libs="$TEST_LIBS"
24240 # reverse order
24241 cf_add_0lib=
24242 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24243 # filter duplicates
24244 for cf_add_1lib in $cf_add_0lib; do
24245         for cf_add_2lib in $cf_add_libs; do
24246                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24247                         cf_add_1lib=
24248                         break
24249                 fi
24250         done
24251         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24252 done
24253 TEST_LIBS="$cf_add_libs"
24254
24255         fi
24256 fi
24257
24258 if test "$with_hashed_db" != no ; then
24259
24260 cat >>confdefs.h <<\EOF
24261 #define USE_HASHED_DB 1
24262 EOF
24263
24264 case $with_hashed_db in
24265 (yes|*able*)
24266         ;;
24267 (*)
24268         if test -d "$with_hashed_db" ; then
24269
24270 if test -n "$with_hashed_db/include" ; then
24271   for cf_add_incdir in $with_hashed_db/include
24272   do
24273         while test "$cf_add_incdir" != /usr/include
24274         do
24275           if test -d "$cf_add_incdir"
24276           then
24277                 cf_have_incdir=no
24278                 if test -n "$CFLAGS$CPPFLAGS" ; then
24279                   # a loop is needed to ensure we can add subdirs of existing dirs
24280                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24281                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24282                           cf_have_incdir=yes; break
24283                         fi
24284                   done
24285                 fi
24286
24287                 if test "$cf_have_incdir" = no ; then
24288                   if test "$cf_add_incdir" = /usr/local/include ; then
24289                         if test "$GCC" = yes
24290                         then
24291                           cf_save_CPPFLAGS=$CPPFLAGS
24292
24293         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24294         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24295
24296                           cat >"conftest.$ac_ext" <<_ACEOF
24297 #line 24297 "configure"
24298 #include "confdefs.h"
24299 #include <stdio.h>
24300 int
24301 main (void)
24302 {
24303 printf("Hello")
24304   ;
24305   return 0;
24306 }
24307 _ACEOF
24308 rm -f "conftest.$ac_objext"
24309 if { (eval echo "$as_me:24309: \"$ac_compile\"") >&5
24310   (eval $ac_compile) 2>&5
24311   ac_status=$?
24312   echo "$as_me:24312: \$? = $ac_status" >&5
24313   (exit "$ac_status"); } &&
24314          { ac_try='test -s "conftest.$ac_objext"'
24315   { (eval echo "$as_me:24315: \"$ac_try\"") >&5
24316   (eval $ac_try) 2>&5
24317   ac_status=$?
24318   echo "$as_me:24318: \$? = $ac_status" >&5
24319   (exit "$ac_status"); }; }; then
24320   :
24321 else
24322   echo "$as_me: failed program was:" >&5
24323 cat "conftest.$ac_ext" >&5
24324 cf_have_incdir=yes
24325 fi
24326 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24327                           CPPFLAGS=$cf_save_CPPFLAGS
24328                         fi
24329                   fi
24330                 fi
24331
24332                 if test "$cf_have_incdir" = no ; then
24333                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24334
24335 echo "${as_me:-configure}:24335: testing adding $cf_add_incdir to include-path ..." 1>&5
24336
24337                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24338
24339                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24340                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24341                   cf_add_incdir="$cf_top_incdir"
24342                 else
24343                   break
24344                 fi
24345           else
24346                 break
24347           fi
24348         done
24349   done
24350 fi
24351
24352 if test -n "$with_hashed_db/lib" ; then
24353         for cf_add_libdir in $with_hashed_db/lib
24354         do
24355                 if test "$cf_add_libdir" = /usr/lib ; then
24356                         :
24357                 elif test -d "$cf_add_libdir"
24358                 then
24359                         cf_have_libdir=no
24360                         if test -n "$LDFLAGS$LIBS" ; then
24361                                 # a loop is needed to ensure we can add subdirs of existing dirs
24362                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24363                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24364                                                 cf_have_libdir=yes; break
24365                                         fi
24366                                 done
24367                         fi
24368                         if test "$cf_have_libdir" = no ; then
24369                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24370
24371 echo "${as_me:-configure}:24371: testing adding $cf_add_libdir to library-path ..." 1>&5
24372
24373                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24374                         fi
24375                 fi
24376         done
24377 fi
24378
24379         else
24380                 case "$with_hashed_db" in
24381                 (./*|../*|/*)
24382                         { echo "$as_me:24382: WARNING: no such directory $with_hashed_db" >&5
24383 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24384                         ;;
24385                 (*)
24386
24387 cf_search=
24388
24389 test "x$prefix" != "xNONE" && \
24390 test -d "$prefix" && \
24391  {
24392         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24393         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24394         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24395         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24396         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24397         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24398 }
24399
24400 for cf_subdir_prefix in \
24401         /usr \
24402         /usr/local \
24403         /usr/pkg \
24404         /opt \
24405         /opt/local \
24406         $HOME
24407 do
24408
24409 test "x$cf_subdir_prefix" != "x$prefix" && \
24410 test -d "$cf_subdir_prefix" && \
24411 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24412         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24413         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24414         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24415         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24416         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24417         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"
24418 }
24419
24420 done
24421
24422         for cf_item in $cf_search
24423         do
24424                 case "$cf_item" in
24425                 (*/$with_hashed_db)
24426
24427 if test -n "$cf_item" ; then
24428   for cf_add_incdir in $cf_item
24429   do
24430         while test "$cf_add_incdir" != /usr/include
24431         do
24432           if test -d "$cf_add_incdir"
24433           then
24434                 cf_have_incdir=no
24435                 if test -n "$CFLAGS$CPPFLAGS" ; then
24436                   # a loop is needed to ensure we can add subdirs of existing dirs
24437                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24438                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24439                           cf_have_incdir=yes; break
24440                         fi
24441                   done
24442                 fi
24443
24444                 if test "$cf_have_incdir" = no ; then
24445                   if test "$cf_add_incdir" = /usr/local/include ; then
24446                         if test "$GCC" = yes
24447                         then
24448                           cf_save_CPPFLAGS=$CPPFLAGS
24449
24450         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24451         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24452
24453                           cat >"conftest.$ac_ext" <<_ACEOF
24454 #line 24454 "configure"
24455 #include "confdefs.h"
24456 #include <stdio.h>
24457 int
24458 main (void)
24459 {
24460 printf("Hello")
24461   ;
24462   return 0;
24463 }
24464 _ACEOF
24465 rm -f "conftest.$ac_objext"
24466 if { (eval echo "$as_me:24466: \"$ac_compile\"") >&5
24467   (eval $ac_compile) 2>&5
24468   ac_status=$?
24469   echo "$as_me:24469: \$? = $ac_status" >&5
24470   (exit "$ac_status"); } &&
24471          { ac_try='test -s "conftest.$ac_objext"'
24472   { (eval echo "$as_me:24472: \"$ac_try\"") >&5
24473   (eval $ac_try) 2>&5
24474   ac_status=$?
24475   echo "$as_me:24475: \$? = $ac_status" >&5
24476   (exit "$ac_status"); }; }; then
24477   :
24478 else
24479   echo "$as_me: failed program was:" >&5
24480 cat "conftest.$ac_ext" >&5
24481 cf_have_incdir=yes
24482 fi
24483 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24484                           CPPFLAGS=$cf_save_CPPFLAGS
24485                         fi
24486                   fi
24487                 fi
24488
24489                 if test "$cf_have_incdir" = no ; then
24490                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24491
24492 echo "${as_me:-configure}:24492: testing adding $cf_add_incdir to include-path ..." 1>&5
24493
24494                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24495
24496                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24497                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24498                   cf_add_incdir="$cf_top_incdir"
24499                 else
24500                   break
24501                 fi
24502           else
24503                 break
24504           fi
24505         done
24506   done
24507 fi
24508
24509                         ;;
24510                 esac
24511         done
24512
24513 cf_search=
24514
24515 test "x$prefix" != "xNONE" && \
24516 test -d "$prefix" && \
24517  {
24518         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24519         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24520         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24521         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24522         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24523         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24524 }
24525
24526 for cf_subdir_prefix in \
24527         /usr \
24528         /usr/local \
24529         /usr/pkg \
24530         /opt \
24531         /opt/local \
24532         $HOME
24533 do
24534
24535 test "x$cf_subdir_prefix" != "x$prefix" && \
24536 test -d "$cf_subdir_prefix" && \
24537 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24538         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24539         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24540         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24541         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24542         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24543         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"
24544 }
24545
24546 done
24547
24548         for cf_item in $cf_search
24549         do
24550                 case "$cf_item" in
24551                 (*/$with_hashed_db)
24552
24553 if test -n "$cf_item" ; then
24554         for cf_add_libdir in $cf_item
24555         do
24556                 if test "$cf_add_libdir" = /usr/lib ; then
24557                         :
24558                 elif test -d "$cf_add_libdir"
24559                 then
24560                         cf_have_libdir=no
24561                         if test -n "$LDFLAGS$LIBS" ; then
24562                                 # a loop is needed to ensure we can add subdirs of existing dirs
24563                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24564                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24565                                                 cf_have_libdir=yes; break
24566                                         fi
24567                                 done
24568                         fi
24569                         if test "$cf_have_libdir" = no ; then
24570                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24571
24572 echo "${as_me:-configure}:24572: testing adding $cf_add_libdir to library-path ..." 1>&5
24573
24574                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24575                         fi
24576                 fi
24577         done
24578 fi
24579
24580                         ;;
24581                 esac
24582         done
24583
24584                         ;;
24585                 esac
24586         fi
24587 esac
24588
24589 echo "$as_me:24589: checking for db.h" >&5
24590 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24591 if test "${ac_cv_header_db_h+set}" = set; then
24592   echo $ECHO_N "(cached) $ECHO_C" >&6
24593 else
24594   cat >"conftest.$ac_ext" <<_ACEOF
24595 #line 24595 "configure"
24596 #include "confdefs.h"
24597 #include <db.h>
24598 _ACEOF
24599 if { (eval echo "$as_me:24599: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24600   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24601   ac_status=$?
24602   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24603   rm -f conftest.er1
24604   cat conftest.err >&5
24605   echo "$as_me:24605: \$? = $ac_status" >&5
24606   (exit "$ac_status"); } >/dev/null; then
24607   if test -s conftest.err; then
24608     ac_cpp_err=$ac_c_preproc_warn_flag
24609   else
24610     ac_cpp_err=
24611   fi
24612 else
24613   ac_cpp_err=yes
24614 fi
24615 if test -z "$ac_cpp_err"; then
24616   ac_cv_header_db_h=yes
24617 else
24618   echo "$as_me: failed program was:" >&5
24619   cat "conftest.$ac_ext" >&5
24620   ac_cv_header_db_h=no
24621 fi
24622 rm -f conftest.err "conftest.$ac_ext"
24623 fi
24624 echo "$as_me:24624: result: $ac_cv_header_db_h" >&5
24625 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24626 if test "$ac_cv_header_db_h" = yes; then
24627
24628 echo "$as_me:24628: checking for version of db" >&5
24629 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24630 if test "${cf_cv_hashed_db_version+set}" = set; then
24631   echo $ECHO_N "(cached) $ECHO_C" >&6
24632 else
24633
24634 cf_cv_hashed_db_version=unknown
24635
24636 for cf_db_version in 1 2 3 4 5 6
24637 do
24638
24639 echo "${as_me:-configure}:24639: testing checking for db version $cf_db_version ..." 1>&5
24640
24641         cat >"conftest.$ac_ext" <<_ACEOF
24642 #line 24642 "configure"
24643 #include "confdefs.h"
24644
24645 $ac_includes_default
24646 #include <db.h>
24647
24648 #ifdef DB_VERSION_MAJOR
24649         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24650 #if $cf_db_version == DB_VERSION_MAJOR
24651         /* ok */
24652 #else
24653         make an error
24654 #endif
24655 #else
24656 #if $cf_db_version == 1
24657         /* ok: assuming this is DB 1.8.5 */
24658 #else
24659         make an error
24660 #endif
24661 #endif
24662
24663 int
24664 main (void)
24665 {
24666 DBT *foo = 0
24667   ;
24668   return 0;
24669 }
24670 _ACEOF
24671 rm -f "conftest.$ac_objext"
24672 if { (eval echo "$as_me:24672: \"$ac_compile\"") >&5
24673   (eval $ac_compile) 2>&5
24674   ac_status=$?
24675   echo "$as_me:24675: \$? = $ac_status" >&5
24676   (exit "$ac_status"); } &&
24677          { ac_try='test -s "conftest.$ac_objext"'
24678   { (eval echo "$as_me:24678: \"$ac_try\"") >&5
24679   (eval $ac_try) 2>&5
24680   ac_status=$?
24681   echo "$as_me:24681: \$? = $ac_status" >&5
24682   (exit "$ac_status"); }; }; then
24683
24684         cf_cv_hashed_db_version=$cf_db_version
24685         break
24686
24687 else
24688   echo "$as_me: failed program was:" >&5
24689 cat "conftest.$ac_ext" >&5
24690 fi
24691 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24692 done
24693
24694 fi
24695 echo "$as_me:24695: result: $cf_cv_hashed_db_version" >&5
24696 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24697
24698 if test "$cf_cv_hashed_db_version" = unknown ; then
24699         { { echo "$as_me:24699: error: Cannot determine version of db" >&5
24700 echo "$as_me: error: Cannot determine version of db" >&2;}
24701    { (exit 1); exit 1; }; }
24702 else
24703
24704 echo "$as_me:24704: checking for db libraries" >&5
24705 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24706 if test "${cf_cv_hashed_db_libs+set}" = set; then
24707   echo $ECHO_N "(cached) $ECHO_C" >&6
24708 else
24709
24710 cf_cv_hashed_db_libs=unknown
24711 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24712 do
24713         cf_save_libs="$LIBS"
24714         if test -n "$cf_db_libs"; then
24715
24716 cf_add_libs="$LIBS"
24717 # reverse order
24718 cf_add_0lib=
24719 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24720 # filter duplicates
24721 for cf_add_1lib in $cf_add_0lib; do
24722         for cf_add_2lib in $cf_add_libs; do
24723                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24724                         cf_add_1lib=
24725                         break
24726                 fi
24727         done
24728         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24729 done
24730 LIBS="$cf_add_libs"
24731
24732         fi
24733
24734 echo "${as_me:-configure}:24734: testing checking for library $cf_db_libs ..." 1>&5
24735
24736         cat >"conftest.$ac_ext" <<_ACEOF
24737 #line 24737 "configure"
24738 #include "confdefs.h"
24739
24740 $ac_includes_default
24741 #include <db.h>
24742
24743 int
24744 main (void)
24745 {
24746
24747         char *path = "/tmp/foo";
24748 #ifdef DB_VERSION_MAJOR
24749 #if DB_VERSION_MAJOR >= 4
24750         DB *result = 0;
24751         db_create(&result, NULL, 0);
24752         result->open(result,
24753                 NULL,
24754                 path,
24755                 path,
24756                 DB_HASH,
24757                 DB_CREATE,
24758                 0644);
24759 #elif DB_VERSION_MAJOR >= 3
24760         DB *result = 0;
24761         db_create(&result, NULL, 0);
24762         result->open(result,
24763                 path,
24764                 path,
24765                 DB_HASH,
24766                 DB_CREATE,
24767                 0644);
24768 #elif DB_VERSION_MAJOR >= 2
24769         DB *result = 0;
24770         db_open(path,
24771                 DB_HASH,
24772                 DB_CREATE,
24773                 0644,
24774                 (DB_ENV *) 0,
24775                 (DB_INFO *) 0,
24776                 &result);
24777 #endif /* DB_VERSION_MAJOR */
24778 #else
24779         DB *result = dbopen(path,
24780                      2,
24781                      0644,
24782                      DB_HASH,
24783                      0);
24784 #endif
24785         ${cf_cv_main_return:-return}(result != 0)
24786
24787   ;
24788   return 0;
24789 }
24790 _ACEOF
24791 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24792 if { (eval echo "$as_me:24792: \"$ac_link\"") >&5
24793   (eval $ac_link) 2>&5
24794   ac_status=$?
24795   echo "$as_me:24795: \$? = $ac_status" >&5
24796   (exit "$ac_status"); } &&
24797          { ac_try='test -s "conftest$ac_exeext"'
24798   { (eval echo "$as_me:24798: \"$ac_try\"") >&5
24799   (eval $ac_try) 2>&5
24800   ac_status=$?
24801   echo "$as_me:24801: \$? = $ac_status" >&5
24802   (exit "$ac_status"); }; }; then
24803
24804         if test -n "$cf_db_libs" ; then
24805                 cf_cv_hashed_db_libs=$cf_db_libs
24806         else
24807                 cf_cv_hashed_db_libs=default
24808         fi
24809         LIBS="$cf_save_libs"
24810         break
24811
24812 else
24813   echo "$as_me: failed program was:" >&5
24814 cat "conftest.$ac_ext" >&5
24815 fi
24816 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24817         LIBS="$cf_save_libs"
24818 done
24819
24820 fi
24821 echo "$as_me:24821: result: $cf_cv_hashed_db_libs" >&5
24822 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24823
24824         if test "$cf_cv_hashed_db_libs" = unknown ; then
24825                 { { echo "$as_me:24825: error: Cannot determine library for db" >&5
24826 echo "$as_me: error: Cannot determine library for db" >&2;}
24827    { (exit 1); exit 1; }; }
24828         elif test "$cf_cv_hashed_db_libs" != default ; then
24829
24830 cf_add_libs="$LIBS"
24831 # reverse order
24832 cf_add_0lib=
24833 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24834 # filter duplicates
24835 for cf_add_1lib in $cf_add_0lib; do
24836         for cf_add_2lib in $cf_add_libs; do
24837                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24838                         cf_add_1lib=
24839                         break
24840                 fi
24841         done
24842         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24843 done
24844 LIBS="$cf_add_libs"
24845
24846         fi
24847 fi
24848
24849 else
24850
24851         { { echo "$as_me:24851: error: Cannot find db.h" >&5
24852 echo "$as_me: error: Cannot find db.h" >&2;}
24853    { (exit 1); exit 1; }; }
24854
24855 fi
24856
24857 fi
24858
24859 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24860         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24861         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24862 fi
24863
24864 # Just in case, check if the C compiler has a bool type.
24865
24866 echo "$as_me:24866: checking if we should include stdbool.h" >&5
24867 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24868
24869 if test "${cf_cv_header_stdbool_h+set}" = set; then
24870   echo $ECHO_N "(cached) $ECHO_C" >&6
24871 else
24872
24873         cat >"conftest.$ac_ext" <<_ACEOF
24874 #line 24874 "configure"
24875 #include "confdefs.h"
24876
24877 int
24878 main (void)
24879 {
24880 bool foo = false
24881   ;
24882   return 0;
24883 }
24884 _ACEOF
24885 rm -f "conftest.$ac_objext"
24886 if { (eval echo "$as_me:24886: \"$ac_compile\"") >&5
24887   (eval $ac_compile) 2>&5
24888   ac_status=$?
24889   echo "$as_me:24889: \$? = $ac_status" >&5
24890   (exit "$ac_status"); } &&
24891          { ac_try='test -s "conftest.$ac_objext"'
24892   { (eval echo "$as_me:24892: \"$ac_try\"") >&5
24893   (eval $ac_try) 2>&5
24894   ac_status=$?
24895   echo "$as_me:24895: \$? = $ac_status" >&5
24896   (exit "$ac_status"); }; }; then
24897   cf_cv_header_stdbool_h=0
24898 else
24899   echo "$as_me: failed program was:" >&5
24900 cat "conftest.$ac_ext" >&5
24901 cat >"conftest.$ac_ext" <<_ACEOF
24902 #line 24902 "configure"
24903 #include "confdefs.h"
24904
24905 #ifndef __BEOS__
24906 #include <stdbool.h>
24907 #endif
24908
24909 int
24910 main (void)
24911 {
24912 bool foo = false
24913   ;
24914   return 0;
24915 }
24916 _ACEOF
24917 rm -f "conftest.$ac_objext"
24918 if { (eval echo "$as_me:24918: \"$ac_compile\"") >&5
24919   (eval $ac_compile) 2>&5
24920   ac_status=$?
24921   echo "$as_me:24921: \$? = $ac_status" >&5
24922   (exit "$ac_status"); } &&
24923          { ac_try='test -s "conftest.$ac_objext"'
24924   { (eval echo "$as_me:24924: \"$ac_try\"") >&5
24925   (eval $ac_try) 2>&5
24926   ac_status=$?
24927   echo "$as_me:24927: \$? = $ac_status" >&5
24928   (exit "$ac_status"); }; }; then
24929   cf_cv_header_stdbool_h=1
24930 else
24931   echo "$as_me: failed program was:" >&5
24932 cat "conftest.$ac_ext" >&5
24933 cf_cv_header_stdbool_h=0
24934 fi
24935 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24936 fi
24937 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24938 fi
24939
24940 if test "$cf_cv_header_stdbool_h" = 1
24941 then    echo "$as_me:24941: result: yes" >&5
24942 echo "${ECHO_T}yes" >&6
24943 else    echo "$as_me:24943: result: no" >&5
24944 echo "${ECHO_T}no" >&6
24945 fi
24946
24947 echo "$as_me:24947: checking for builtin bool type" >&5
24948 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24949
24950 if test "${cf_cv_cc_bool_type+set}" = set; then
24951   echo $ECHO_N "(cached) $ECHO_C" >&6
24952 else
24953
24954         cat >"conftest.$ac_ext" <<_ACEOF
24955 #line 24955 "configure"
24956 #include "confdefs.h"
24957
24958 #include <stdio.h>
24959 #include <sys/types.h>
24960
24961 int
24962 main (void)
24963 {
24964 bool x = false
24965   ;
24966   return 0;
24967 }
24968 _ACEOF
24969 rm -f "conftest.$ac_objext"
24970 if { (eval echo "$as_me:24970: \"$ac_compile\"") >&5
24971   (eval $ac_compile) 2>&5
24972   ac_status=$?
24973   echo "$as_me:24973: \$? = $ac_status" >&5
24974   (exit "$ac_status"); } &&
24975          { ac_try='test -s "conftest.$ac_objext"'
24976   { (eval echo "$as_me:24976: \"$ac_try\"") >&5
24977   (eval $ac_try) 2>&5
24978   ac_status=$?
24979   echo "$as_me:24979: \$? = $ac_status" >&5
24980   (exit "$ac_status"); }; }; then
24981   cf_cv_cc_bool_type=1
24982 else
24983   echo "$as_me: failed program was:" >&5
24984 cat "conftest.$ac_ext" >&5
24985 cf_cv_cc_bool_type=0
24986 fi
24987 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24988
24989 fi
24990
24991 if test "$cf_cv_cc_bool_type" = 1
24992 then    echo "$as_me:24992: result: yes" >&5
24993 echo "${ECHO_T}yes" >&6
24994 else    echo "$as_me:24994: result: no" >&5
24995 echo "${ECHO_T}no" >&6
24996 fi
24997
24998 # Check for C++ compiler characteristics (and ensure that it's there!)
24999 if test -n "$CXX" ; then
25000         ac_ext=cc
25001 ac_cpp='$CXXCPP $CPPFLAGS'
25002 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25003 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25004 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25005 ac_main_return="return"
25006
25007 if test -n "$GXX" ; then
25008
25009         cf_save="$LIBS"
25010         LIBS="$LIBS $CXXLIBS"
25011         echo "$as_me:25011: checking if we already have C++ library" >&5
25012 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25013         cat >"conftest.$ac_ext" <<_ACEOF
25014 #line 25014 "configure"
25015 #include "confdefs.h"
25016
25017                         #include <iostream>
25018 int
25019 main (void)
25020 {
25021
25022                         std::cout << "Hello World!" << std::endl;
25023   ;
25024   return 0;
25025 }
25026 _ACEOF
25027 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25028 if { (eval echo "$as_me:25028: \"$ac_link\"") >&5
25029   (eval $ac_link) 2>&5
25030   ac_status=$?
25031   echo "$as_me:25031: \$? = $ac_status" >&5
25032   (exit "$ac_status"); } &&
25033          { ac_try='test -s "conftest$ac_exeext"'
25034   { (eval echo "$as_me:25034: \"$ac_try\"") >&5
25035   (eval $ac_try) 2>&5
25036   ac_status=$?
25037   echo "$as_me:25037: \$? = $ac_status" >&5
25038   (exit "$ac_status"); }; }; then
25039   cf_have_libstdcpp=yes
25040 else
25041   echo "$as_me: failed program was:" >&5
25042 cat "conftest.$ac_ext" >&5
25043 cf_have_libstdcpp=no
25044 fi
25045 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25046         echo "$as_me:25046: result: $cf_have_libstdcpp" >&5
25047 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25048         LIBS="$cf_save"
25049
25050         if test "$cf_have_libstdcpp" != yes
25051         then
25052                 case "$cf_cv_system_name" in
25053                 (os2*)
25054                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25055                                 cf_stdcpp_libname=stdcpp
25056                         else
25057                                 cf_stdcpp_libname=stdc++
25058                         fi
25059                         ;;
25060                 (*)
25061                         cf_stdcpp_libname=stdc++
25062                         ;;
25063                 esac
25064
25065                 echo "$as_me:25065: checking for library $cf_stdcpp_libname" >&5
25066 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25067 if test "${cf_cv_libstdcpp+set}" = set; then
25068   echo $ECHO_N "(cached) $ECHO_C" >&6
25069 else
25070
25071                         cf_save="$LIBS"
25072                         LIBS="$LIBS $CXXLIBS"
25073
25074 cf_add_libs="$LIBS"
25075 # reverse order
25076 cf_add_0lib=
25077 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25078 # filter duplicates
25079 for cf_add_1lib in $cf_add_0lib; do
25080         for cf_add_2lib in $cf_add_libs; do
25081                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25082                         cf_add_1lib=
25083                         break
25084                 fi
25085         done
25086         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25087 done
25088 LIBS="$cf_add_libs"
25089
25090                 cat >"conftest.$ac_ext" <<_ACEOF
25091 #line 25091 "configure"
25092 #include "confdefs.h"
25093
25094                                 #include <iostream>
25095 int
25096 main (void)
25097 {
25098
25099                                 std::cout << "Hello World!" << std::endl;
25100   ;
25101   return 0;
25102 }
25103 _ACEOF
25104 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25105 if { (eval echo "$as_me:25105: \"$ac_link\"") >&5
25106   (eval $ac_link) 2>&5
25107   ac_status=$?
25108   echo "$as_me:25108: \$? = $ac_status" >&5
25109   (exit "$ac_status"); } &&
25110          { ac_try='test -s "conftest$ac_exeext"'
25111   { (eval echo "$as_me:25111: \"$ac_try\"") >&5
25112   (eval $ac_try) 2>&5
25113   ac_status=$?
25114   echo "$as_me:25114: \$? = $ac_status" >&5
25115   (exit "$ac_status"); }; }; then
25116   cf_cv_libstdcpp=yes
25117 else
25118   echo "$as_me: failed program was:" >&5
25119 cat "conftest.$ac_ext" >&5
25120 cf_cv_libstdcpp=no
25121 fi
25122 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25123                         LIBS="$cf_save"
25124
25125 fi
25126 echo "$as_me:25126: result: $cf_cv_libstdcpp" >&5
25127 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25128                 test "$cf_cv_libstdcpp" = yes && {
25129 cf_add_libs="$CXXLIBS"
25130 # reverse order
25131 cf_add_0lib=
25132 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25133 # filter duplicates
25134 for cf_add_1lib in $cf_add_0lib; do
25135         for cf_add_2lib in $cf_add_libs; do
25136                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25137                         cf_add_1lib=
25138                         break
25139                 fi
25140         done
25141         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25142 done
25143 CXXLIBS="$cf_add_libs"
25144  }
25145         fi
25146 fi
25147
25148         echo "$as_me:25148: checking whether $CXX understands -c and -o together" >&5
25149 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25150 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25151   echo $ECHO_N "(cached) $ECHO_C" >&6
25152 else
25153
25154 cat > conftest.$ac_ext <<CF_EOF
25155 int main(void)
25156 {
25157         ${cf_cv_main_return:-return}(0);
25158 }
25159 CF_EOF
25160 # We do the test twice because some compilers refuse to overwrite an
25161 # existing .o file with -o, though they will create one.
25162 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25163 if { (eval echo "$as_me:25163: \"$ac_try\"") >&5
25164   (eval $ac_try) 2>&5
25165   ac_status=$?
25166   echo "$as_me:25166: \$? = $ac_status" >&5
25167   (exit "$ac_status"); } &&
25168   test -f conftest2.$ac_objext && { (eval echo "$as_me:25168: \"$ac_try\"") >&5
25169   (eval $ac_try) 2>&5
25170   ac_status=$?
25171   echo "$as_me:25171: \$? = $ac_status" >&5
25172   (exit "$ac_status"); };
25173 then
25174   eval cf_cv_prog_CXX_c_o=yes
25175 else
25176   eval cf_cv_prog_CXX_c_o=no
25177 fi
25178 rm -rf ./conftest*
25179
25180 fi
25181 if test "$cf_cv_prog_CXX_c_o" = yes; then
25182   echo "$as_me:25182: result: yes" >&5
25183 echo "${ECHO_T}yes" >&6
25184 else
25185   echo "$as_me:25185: result: no" >&5
25186 echo "${ECHO_T}no" >&6
25187 fi
25188
25189         case "$GXX_VERSION" in
25190         (1.*|2.[0-6]*|[1-9][0-9].*)
25191                 cf_cxx_library=yes
25192                 ;;
25193         (*-2.7*|2.7*)
25194
25195 cf_cxx_library=unknown
25196 case "$cf_cv_system_name" in
25197 (os2*)
25198         cf_gpp_libname=gpp
25199         ;;
25200 (*)
25201         cf_gpp_libname=g++
25202         ;;
25203 esac
25204 if test "$GXX" = yes; then
25205         echo "$as_me:25205: checking for lib$cf_gpp_libname" >&5
25206 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25207         cf_save="$LIBS"
25208
25209 cf_add_libs="$LIBS"
25210 # reverse order
25211 cf_add_0lib=
25212 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25213 # filter duplicates
25214 for cf_add_1lib in $cf_add_0lib; do
25215         for cf_add_2lib in $cf_add_libs; do
25216                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25217                         cf_add_1lib=
25218                         break
25219                 fi
25220         done
25221         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25222 done
25223 LIBS="$cf_add_libs"
25224
25225         cat >"conftest.$ac_ext" <<_ACEOF
25226 #line 25226 "configure"
25227 #include "confdefs.h"
25228
25229 #include <$cf_gpp_libname/builtin.h>
25230
25231 int
25232 main (void)
25233 {
25234 two_arg_error_handler_t foo2 = lib_error_handler
25235   ;
25236   return 0;
25237 }
25238 _ACEOF
25239 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25240 if { (eval echo "$as_me:25240: \"$ac_link\"") >&5
25241   (eval $ac_link) 2>&5
25242   ac_status=$?
25243   echo "$as_me:25243: \$? = $ac_status" >&5
25244   (exit "$ac_status"); } &&
25245          { ac_try='test -s "conftest$ac_exeext"'
25246   { (eval echo "$as_me:25246: \"$ac_try\"") >&5
25247   (eval $ac_try) 2>&5
25248   ac_status=$?
25249   echo "$as_me:25249: \$? = $ac_status" >&5
25250   (exit "$ac_status"); }; }; then
25251   cf_cxx_library=yes
25252
25253 cf_add_libs="$CXXLIBS"
25254 # reverse order
25255 cf_add_0lib=
25256 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25257 # filter duplicates
25258 for cf_add_1lib in $cf_add_0lib; do
25259         for cf_add_2lib in $cf_add_libs; do
25260                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25261                         cf_add_1lib=
25262                         break
25263                 fi
25264         done
25265         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25266 done
25267 CXXLIBS="$cf_add_libs"
25268
25269          if test "$cf_gpp_libname" = cpp ; then
25270
25271 cat >>confdefs.h <<\EOF
25272 #define HAVE_GPP_BUILTIN_H 1
25273 EOF
25274
25275          else
25276
25277 cat >>confdefs.h <<\EOF
25278 #define HAVE_GXX_BUILTIN_H 1
25279 EOF
25280
25281          fi
25282 else
25283   echo "$as_me: failed program was:" >&5
25284 cat "conftest.$ac_ext" >&5
25285 cat >"conftest.$ac_ext" <<_ACEOF
25286 #line 25286 "configure"
25287 #include "confdefs.h"
25288
25289 #include <builtin.h>
25290
25291 int
25292 main (void)
25293 {
25294 two_arg_error_handler_t foo2 = lib_error_handler
25295   ;
25296   return 0;
25297 }
25298 _ACEOF
25299 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25300 if { (eval echo "$as_me:25300: \"$ac_link\"") >&5
25301   (eval $ac_link) 2>&5
25302   ac_status=$?
25303   echo "$as_me:25303: \$? = $ac_status" >&5
25304   (exit "$ac_status"); } &&
25305          { ac_try='test -s "conftest$ac_exeext"'
25306   { (eval echo "$as_me:25306: \"$ac_try\"") >&5
25307   (eval $ac_try) 2>&5
25308   ac_status=$?
25309   echo "$as_me:25309: \$? = $ac_status" >&5
25310   (exit "$ac_status"); }; }; then
25311   cf_cxx_library=yes
25312
25313 cf_add_libs="$CXXLIBS"
25314 # reverse order
25315 cf_add_0lib=
25316 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25317 # filter duplicates
25318 for cf_add_1lib in $cf_add_0lib; do
25319         for cf_add_2lib in $cf_add_libs; do
25320                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25321                         cf_add_1lib=
25322                         break
25323                 fi
25324         done
25325         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25326 done
25327 CXXLIBS="$cf_add_libs"
25328
25329 cat >>confdefs.h <<\EOF
25330 #define HAVE_BUILTIN_H 1
25331 EOF
25332
25333 else
25334   echo "$as_me: failed program was:" >&5
25335 cat "conftest.$ac_ext" >&5
25336 cf_cxx_library=no
25337 fi
25338 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25339 fi
25340 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25341         LIBS="$cf_save"
25342         echo "$as_me:25342: result: $cf_cxx_library" >&5
25343 echo "${ECHO_T}$cf_cxx_library" >&6
25344 fi
25345
25346                 ;;
25347         (*)
25348                 cf_cxx_library=no
25349                 ;;
25350         esac
25351
25352         ac_ext=cc
25353 ac_cpp='$CXXCPP $CPPFLAGS'
25354 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25355 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25356 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25357 ac_main_return="return"
25358 echo "$as_me:25358: checking how to run the C++ preprocessor" >&5
25359 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25360 if test -z "$CXXCPP"; then
25361   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25362   echo $ECHO_N "(cached) $ECHO_C" >&6
25363 else
25364       # Double quotes because CXXCPP needs to be expanded
25365     for CXXCPP in "$CXX -E" "/lib/cpp"
25366     do
25367       ac_preproc_ok=false
25368 for ac_cxx_preproc_warn_flag in '' yes
25369 do
25370   # Use a header file that comes with gcc, so configuring glibc
25371   # with a fresh cross-compiler works.
25372   # On the NeXT, cc -E runs the code through the compiler's parser,
25373   # not just through cpp. "Syntax error" is here to catch this case.
25374   cat >"conftest.$ac_ext" <<_ACEOF
25375 #line 25375 "configure"
25376 #include "confdefs.h"
25377 #include <assert.h>
25378                      Syntax error
25379 _ACEOF
25380 if { (eval echo "$as_me:25380: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25381   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25382   ac_status=$?
25383   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25384   rm -f conftest.er1
25385   cat conftest.err >&5
25386   echo "$as_me:25386: \$? = $ac_status" >&5
25387   (exit "$ac_status"); } >/dev/null; then
25388   if test -s conftest.err; then
25389     ac_cpp_err=$ac_cxx_preproc_warn_flag
25390   else
25391     ac_cpp_err=
25392   fi
25393 else
25394   ac_cpp_err=yes
25395 fi
25396 if test -z "$ac_cpp_err"; then
25397   :
25398 else
25399   echo "$as_me: failed program was:" >&5
25400   cat "conftest.$ac_ext" >&5
25401   # Broken: fails on valid input.
25402 continue
25403 fi
25404 rm -f conftest.err "conftest.$ac_ext"
25405
25406   # OK, works on sane cases.  Now check whether non-existent headers
25407   # can be detected and how.
25408   cat >"conftest.$ac_ext" <<_ACEOF
25409 #line 25409 "configure"
25410 #include "confdefs.h"
25411 #include <ac_nonexistent.h>
25412 _ACEOF
25413 if { (eval echo "$as_me:25413: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25414   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25415   ac_status=$?
25416   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25417   rm -f conftest.er1
25418   cat conftest.err >&5
25419   echo "$as_me:25419: \$? = $ac_status" >&5
25420   (exit "$ac_status"); } >/dev/null; then
25421   if test -s conftest.err; then
25422     ac_cpp_err=$ac_cxx_preproc_warn_flag
25423   else
25424     ac_cpp_err=
25425   fi
25426 else
25427   ac_cpp_err=yes
25428 fi
25429 if test -z "$ac_cpp_err"; then
25430   # Broken: success on invalid input.
25431 continue
25432 else
25433   echo "$as_me: failed program was:" >&5
25434   cat "conftest.$ac_ext" >&5
25435   # Passes both tests.
25436 ac_preproc_ok=:
25437 break
25438 fi
25439 rm -f conftest.err "conftest.$ac_ext"
25440
25441 done
25442 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25443 rm -f conftest.err "conftest.$ac_ext"
25444 if $ac_preproc_ok; then
25445   break
25446 fi
25447
25448     done
25449     ac_cv_prog_CXXCPP=$CXXCPP
25450
25451 fi
25452   CXXCPP=$ac_cv_prog_CXXCPP
25453 else
25454   ac_cv_prog_CXXCPP=$CXXCPP
25455 fi
25456 echo "$as_me:25456: result: $CXXCPP" >&5
25457 echo "${ECHO_T}$CXXCPP" >&6
25458 ac_preproc_ok=false
25459 for ac_cxx_preproc_warn_flag in '' yes
25460 do
25461   # Use a header file that comes with gcc, so configuring glibc
25462   # with a fresh cross-compiler works.
25463   # On the NeXT, cc -E runs the code through the compiler's parser,
25464   # not just through cpp. "Syntax error" is here to catch this case.
25465   cat >"conftest.$ac_ext" <<_ACEOF
25466 #line 25466 "configure"
25467 #include "confdefs.h"
25468 #include <assert.h>
25469                      Syntax error
25470 _ACEOF
25471 if { (eval echo "$as_me:25471: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25472   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25473   ac_status=$?
25474   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25475   rm -f conftest.er1
25476   cat conftest.err >&5
25477   echo "$as_me:25477: \$? = $ac_status" >&5
25478   (exit "$ac_status"); } >/dev/null; then
25479   if test -s conftest.err; then
25480     ac_cpp_err=$ac_cxx_preproc_warn_flag
25481   else
25482     ac_cpp_err=
25483   fi
25484 else
25485   ac_cpp_err=yes
25486 fi
25487 if test -z "$ac_cpp_err"; then
25488   :
25489 else
25490   echo "$as_me: failed program was:" >&5
25491   cat "conftest.$ac_ext" >&5
25492   # Broken: fails on valid input.
25493 continue
25494 fi
25495 rm -f conftest.err "conftest.$ac_ext"
25496
25497   # OK, works on sane cases.  Now check whether non-existent headers
25498   # can be detected and how.
25499   cat >"conftest.$ac_ext" <<_ACEOF
25500 #line 25500 "configure"
25501 #include "confdefs.h"
25502 #include <ac_nonexistent.h>
25503 _ACEOF
25504 if { (eval echo "$as_me:25504: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25505   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25506   ac_status=$?
25507   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25508   rm -f conftest.er1
25509   cat conftest.err >&5
25510   echo "$as_me:25510: \$? = $ac_status" >&5
25511   (exit "$ac_status"); } >/dev/null; then
25512   if test -s conftest.err; then
25513     ac_cpp_err=$ac_cxx_preproc_warn_flag
25514   else
25515     ac_cpp_err=
25516   fi
25517 else
25518   ac_cpp_err=yes
25519 fi
25520 if test -z "$ac_cpp_err"; then
25521   # Broken: success on invalid input.
25522 continue
25523 else
25524   echo "$as_me: failed program was:" >&5
25525   cat "conftest.$ac_ext" >&5
25526   # Passes both tests.
25527 ac_preproc_ok=:
25528 break
25529 fi
25530 rm -f conftest.err "conftest.$ac_ext"
25531
25532 done
25533 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25534 rm -f conftest.err "conftest.$ac_ext"
25535 if $ac_preproc_ok; then
25536   :
25537 else
25538   { { echo "$as_me:25538: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25539 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25540    { (exit 1); exit 1; }; }
25541 fi
25542
25543 ac_ext=cc
25544 ac_cpp='$CXXCPP $CPPFLAGS'
25545 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25546 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25547 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25548 ac_main_return="return"
25549
25550 for ac_header in typeinfo
25551 do
25552 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25553 echo "$as_me:25553: checking for $ac_header" >&5
25554 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25555 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25556   echo $ECHO_N "(cached) $ECHO_C" >&6
25557 else
25558   cat >"conftest.$ac_ext" <<_ACEOF
25559 #line 25559 "configure"
25560 #include "confdefs.h"
25561 #include <$ac_header>
25562 _ACEOF
25563 if { (eval echo "$as_me:25563: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25564   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25565   ac_status=$?
25566   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25567   rm -f conftest.er1
25568   cat conftest.err >&5
25569   echo "$as_me:25569: \$? = $ac_status" >&5
25570   (exit "$ac_status"); } >/dev/null; then
25571   if test -s conftest.err; then
25572     ac_cpp_err=$ac_cxx_preproc_warn_flag
25573   else
25574     ac_cpp_err=
25575   fi
25576 else
25577   ac_cpp_err=yes
25578 fi
25579 if test -z "$ac_cpp_err"; then
25580   eval "$as_ac_Header=yes"
25581 else
25582   echo "$as_me: failed program was:" >&5
25583   cat "conftest.$ac_ext" >&5
25584   eval "$as_ac_Header=no"
25585 fi
25586 rm -f conftest.err "conftest.$ac_ext"
25587 fi
25588 echo "$as_me:25588: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25589 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25590 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25591   cat >>confdefs.h <<EOF
25592 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25593 EOF
25594
25595 fi
25596 done
25597
25598 for ac_header in iostream
25599 do
25600 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25601 echo "$as_me:25601: checking for $ac_header" >&5
25602 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25603 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25604   echo $ECHO_N "(cached) $ECHO_C" >&6
25605 else
25606   cat >"conftest.$ac_ext" <<_ACEOF
25607 #line 25607 "configure"
25608 #include "confdefs.h"
25609 #include <$ac_header>
25610 _ACEOF
25611 if { (eval echo "$as_me:25611: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25612   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25613   ac_status=$?
25614   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25615   rm -f conftest.er1
25616   cat conftest.err >&5
25617   echo "$as_me:25617: \$? = $ac_status" >&5
25618   (exit "$ac_status"); } >/dev/null; then
25619   if test -s conftest.err; then
25620     ac_cpp_err=$ac_cxx_preproc_warn_flag
25621   else
25622     ac_cpp_err=
25623   fi
25624 else
25625   ac_cpp_err=yes
25626 fi
25627 if test -z "$ac_cpp_err"; then
25628   eval "$as_ac_Header=yes"
25629 else
25630   echo "$as_me: failed program was:" >&5
25631   cat "conftest.$ac_ext" >&5
25632   eval "$as_ac_Header=no"
25633 fi
25634 rm -f conftest.err "conftest.$ac_ext"
25635 fi
25636 echo "$as_me:25636: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25637 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25638 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25639   cat >>confdefs.h <<EOF
25640 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25641 EOF
25642
25643 fi
25644 done
25645
25646 if test x"$ac_cv_header_iostream" = xyes ; then
25647         echo "$as_me:25647: checking if iostream uses std-namespace" >&5
25648 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25649         cat >"conftest.$ac_ext" <<_ACEOF
25650 #line 25650 "configure"
25651 #include "confdefs.h"
25652
25653 #include <iostream>
25654 using std::endl;
25655 using std::cerr;
25656 int
25657 main (void)
25658 {
25659
25660 cerr << "testing" << endl;
25661
25662   ;
25663   return 0;
25664 }
25665 _ACEOF
25666 rm -f "conftest.$ac_objext"
25667 if { (eval echo "$as_me:25667: \"$ac_compile\"") >&5
25668   (eval $ac_compile) 2>&5
25669   ac_status=$?
25670   echo "$as_me:25670: \$? = $ac_status" >&5
25671   (exit "$ac_status"); } &&
25672          { ac_try='test -s "conftest.$ac_objext"'
25673   { (eval echo "$as_me:25673: \"$ac_try\"") >&5
25674   (eval $ac_try) 2>&5
25675   ac_status=$?
25676   echo "$as_me:25676: \$? = $ac_status" >&5
25677   (exit "$ac_status"); }; }; then
25678   cf_iostream_namespace=yes
25679 else
25680   echo "$as_me: failed program was:" >&5
25681 cat "conftest.$ac_ext" >&5
25682 cf_iostream_namespace=no
25683 fi
25684 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25685         echo "$as_me:25685: result: $cf_iostream_namespace" >&5
25686 echo "${ECHO_T}$cf_iostream_namespace" >&6
25687         if test "$cf_iostream_namespace" = yes ; then
25688
25689 cat >>confdefs.h <<\EOF
25690 #define IOSTREAM_NAMESPACE 1
25691 EOF
25692
25693         fi
25694 fi
25695
25696 echo "$as_me:25696: checking if we should include stdbool.h" >&5
25697 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25698
25699 if test "${cf_cv_header_stdbool_h+set}" = set; then
25700   echo $ECHO_N "(cached) $ECHO_C" >&6
25701 else
25702
25703         cat >"conftest.$ac_ext" <<_ACEOF
25704 #line 25704 "configure"
25705 #include "confdefs.h"
25706
25707 int
25708 main (void)
25709 {
25710 bool foo = false
25711   ;
25712   return 0;
25713 }
25714 _ACEOF
25715 rm -f "conftest.$ac_objext"
25716 if { (eval echo "$as_me:25716: \"$ac_compile\"") >&5
25717   (eval $ac_compile) 2>&5
25718   ac_status=$?
25719   echo "$as_me:25719: \$? = $ac_status" >&5
25720   (exit "$ac_status"); } &&
25721          { ac_try='test -s "conftest.$ac_objext"'
25722   { (eval echo "$as_me:25722: \"$ac_try\"") >&5
25723   (eval $ac_try) 2>&5
25724   ac_status=$?
25725   echo "$as_me:25725: \$? = $ac_status" >&5
25726   (exit "$ac_status"); }; }; then
25727   cf_cv_header_stdbool_h=0
25728 else
25729   echo "$as_me: failed program was:" >&5
25730 cat "conftest.$ac_ext" >&5
25731 cat >"conftest.$ac_ext" <<_ACEOF
25732 #line 25732 "configure"
25733 #include "confdefs.h"
25734
25735 #ifndef __BEOS__
25736 #include <stdbool.h>
25737 #endif
25738
25739 int
25740 main (void)
25741 {
25742 bool foo = false
25743   ;
25744   return 0;
25745 }
25746 _ACEOF
25747 rm -f "conftest.$ac_objext"
25748 if { (eval echo "$as_me:25748: \"$ac_compile\"") >&5
25749   (eval $ac_compile) 2>&5
25750   ac_status=$?
25751   echo "$as_me:25751: \$? = $ac_status" >&5
25752   (exit "$ac_status"); } &&
25753          { ac_try='test -s "conftest.$ac_objext"'
25754   { (eval echo "$as_me:25754: \"$ac_try\"") >&5
25755   (eval $ac_try) 2>&5
25756   ac_status=$?
25757   echo "$as_me:25757: \$? = $ac_status" >&5
25758   (exit "$ac_status"); }; }; then
25759   cf_cv_header_stdbool_h=1
25760 else
25761   echo "$as_me: failed program was:" >&5
25762 cat "conftest.$ac_ext" >&5
25763 cf_cv_header_stdbool_h=0
25764 fi
25765 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25766 fi
25767 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25768 fi
25769
25770 if test "$cf_cv_header_stdbool_h" = 1
25771 then    echo "$as_me:25771: result: yes" >&5
25772 echo "${ECHO_T}yes" >&6
25773 else    echo "$as_me:25773: result: no" >&5
25774 echo "${ECHO_T}no" >&6
25775 fi
25776
25777 echo "$as_me:25777: checking for builtin bool type" >&5
25778 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25779
25780 if test "${cf_cv_builtin_bool+set}" = set; then
25781   echo $ECHO_N "(cached) $ECHO_C" >&6
25782 else
25783
25784         cat >"conftest.$ac_ext" <<_ACEOF
25785 #line 25785 "configure"
25786 #include "confdefs.h"
25787
25788 #include <stdio.h>
25789 #include <sys/types.h>
25790
25791 int
25792 main (void)
25793 {
25794 bool x = false
25795   ;
25796   return 0;
25797 }
25798 _ACEOF
25799 rm -f "conftest.$ac_objext"
25800 if { (eval echo "$as_me:25800: \"$ac_compile\"") >&5
25801   (eval $ac_compile) 2>&5
25802   ac_status=$?
25803   echo "$as_me:25803: \$? = $ac_status" >&5
25804   (exit "$ac_status"); } &&
25805          { ac_try='test -s "conftest.$ac_objext"'
25806   { (eval echo "$as_me:25806: \"$ac_try\"") >&5
25807   (eval $ac_try) 2>&5
25808   ac_status=$?
25809   echo "$as_me:25809: \$? = $ac_status" >&5
25810   (exit "$ac_status"); }; }; then
25811   cf_cv_builtin_bool=1
25812 else
25813   echo "$as_me: failed program was:" >&5
25814 cat "conftest.$ac_ext" >&5
25815 cf_cv_builtin_bool=0
25816 fi
25817 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25818
25819 fi
25820
25821 if test "$cf_cv_builtin_bool" = 1
25822 then    echo "$as_me:25822: result: yes" >&5
25823 echo "${ECHO_T}yes" >&6
25824 else    echo "$as_me:25824: result: no" >&5
25825 echo "${ECHO_T}no" >&6
25826 fi
25827
25828 echo "$as_me:25828: checking for bool" >&5
25829 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25830 if test "${ac_cv_type_bool+set}" = set; then
25831   echo $ECHO_N "(cached) $ECHO_C" >&6
25832 else
25833   cat >"conftest.$ac_ext" <<_ACEOF
25834 #line 25834 "configure"
25835 #include "confdefs.h"
25836
25837 #include <stdlib.h>
25838 #include <stdio.h>
25839
25840 #if defined(__cplusplus)
25841
25842 #ifdef HAVE_GXX_BUILTIN_H
25843 #include <g++/builtin.h>
25844 #elif HAVE_GPP_BUILTIN_H
25845 #include <gpp/builtin.h>
25846 #elif HAVE_BUILTIN_H
25847 #include <builtin.h>
25848 #endif
25849
25850 #else
25851
25852 #if $cf_cv_header_stdbool_h
25853 #include <stdbool.h>
25854 #endif
25855
25856 #endif
25857
25858 int
25859 main (void)
25860 {
25861 if ((bool *) 0)
25862   return 0;
25863 if (sizeof (bool))
25864   return 0;
25865   ;
25866   return 0;
25867 }
25868 _ACEOF
25869 rm -f "conftest.$ac_objext"
25870 if { (eval echo "$as_me:25870: \"$ac_compile\"") >&5
25871   (eval $ac_compile) 2>&5
25872   ac_status=$?
25873   echo "$as_me:25873: \$? = $ac_status" >&5
25874   (exit "$ac_status"); } &&
25875          { ac_try='test -s "conftest.$ac_objext"'
25876   { (eval echo "$as_me:25876: \"$ac_try\"") >&5
25877   (eval $ac_try) 2>&5
25878   ac_status=$?
25879   echo "$as_me:25879: \$? = $ac_status" >&5
25880   (exit "$ac_status"); }; }; then
25881   ac_cv_type_bool=yes
25882 else
25883   echo "$as_me: failed program was:" >&5
25884 cat "conftest.$ac_ext" >&5
25885 ac_cv_type_bool=no
25886 fi
25887 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25888 fi
25889 echo "$as_me:25889: result: $ac_cv_type_bool" >&5
25890 echo "${ECHO_T}$ac_cv_type_bool" >&6
25891
25892 echo "$as_me:25892: checking size of bool" >&5
25893 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25894 if test "${ac_cv_sizeof_bool+set}" = set; then
25895   echo $ECHO_N "(cached) $ECHO_C" >&6
25896 else
25897   if test "$ac_cv_type_bool" = yes; then
25898   if test "$cross_compiling" = yes; then
25899   # Depending upon the size, compute the lo and hi bounds.
25900 cat >"conftest.$ac_ext" <<_ACEOF
25901 #line 25901 "configure"
25902 #include "confdefs.h"
25903
25904 #include <stdlib.h>
25905 #include <stdio.h>
25906
25907 #if defined(__cplusplus)
25908
25909 #ifdef HAVE_GXX_BUILTIN_H
25910 #include <g++/builtin.h>
25911 #elif HAVE_GPP_BUILTIN_H
25912 #include <gpp/builtin.h>
25913 #elif HAVE_BUILTIN_H
25914 #include <builtin.h>
25915 #endif
25916
25917 #else
25918
25919 #if $cf_cv_header_stdbool_h
25920 #include <stdbool.h>
25921 #endif
25922
25923 #endif
25924
25925 int
25926 main (void)
25927 {
25928 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25929   ;
25930   return 0;
25931 }
25932 _ACEOF
25933 rm -f "conftest.$ac_objext"
25934 if { (eval echo "$as_me:25934: \"$ac_compile\"") >&5
25935   (eval $ac_compile) 2>&5
25936   ac_status=$?
25937   echo "$as_me:25937: \$? = $ac_status" >&5
25938   (exit "$ac_status"); } &&
25939          { ac_try='test -s "conftest.$ac_objext"'
25940   { (eval echo "$as_me:25940: \"$ac_try\"") >&5
25941   (eval $ac_try) 2>&5
25942   ac_status=$?
25943   echo "$as_me:25943: \$? = $ac_status" >&5
25944   (exit "$ac_status"); }; }; then
25945   ac_lo=0 ac_mid=0
25946   while :; do
25947     cat >"conftest.$ac_ext" <<_ACEOF
25948 #line 25948 "configure"
25949 #include "confdefs.h"
25950
25951 #include <stdlib.h>
25952 #include <stdio.h>
25953
25954 #if defined(__cplusplus)
25955
25956 #ifdef HAVE_GXX_BUILTIN_H
25957 #include <g++/builtin.h>
25958 #elif HAVE_GPP_BUILTIN_H
25959 #include <gpp/builtin.h>
25960 #elif HAVE_BUILTIN_H
25961 #include <builtin.h>
25962 #endif
25963
25964 #else
25965
25966 #if $cf_cv_header_stdbool_h
25967 #include <stdbool.h>
25968 #endif
25969
25970 #endif
25971
25972 int
25973 main (void)
25974 {
25975 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25976   ;
25977   return 0;
25978 }
25979 _ACEOF
25980 rm -f "conftest.$ac_objext"
25981 if { (eval echo "$as_me:25981: \"$ac_compile\"") >&5
25982   (eval $ac_compile) 2>&5
25983   ac_status=$?
25984   echo "$as_me:25984: \$? = $ac_status" >&5
25985   (exit "$ac_status"); } &&
25986          { ac_try='test -s "conftest.$ac_objext"'
25987   { (eval echo "$as_me:25987: \"$ac_try\"") >&5
25988   (eval $ac_try) 2>&5
25989   ac_status=$?
25990   echo "$as_me:25990: \$? = $ac_status" >&5
25991   (exit "$ac_status"); }; }; then
25992   ac_hi=$ac_mid; break
25993 else
25994   echo "$as_me: failed program was:" >&5
25995 cat "conftest.$ac_ext" >&5
25996 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25997 fi
25998 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25999   done
26000 else
26001   echo "$as_me: failed program was:" >&5
26002 cat "conftest.$ac_ext" >&5
26003 ac_hi=-1 ac_mid=-1
26004   while :; do
26005     cat >"conftest.$ac_ext" <<_ACEOF
26006 #line 26006 "configure"
26007 #include "confdefs.h"
26008
26009 #include <stdlib.h>
26010 #include <stdio.h>
26011
26012 #if defined(__cplusplus)
26013
26014 #ifdef HAVE_GXX_BUILTIN_H
26015 #include <g++/builtin.h>
26016 #elif HAVE_GPP_BUILTIN_H
26017 #include <gpp/builtin.h>
26018 #elif HAVE_BUILTIN_H
26019 #include <builtin.h>
26020 #endif
26021
26022 #else
26023
26024 #if $cf_cv_header_stdbool_h
26025 #include <stdbool.h>
26026 #endif
26027
26028 #endif
26029
26030 int
26031 main (void)
26032 {
26033 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26034   ;
26035   return 0;
26036 }
26037 _ACEOF
26038 rm -f "conftest.$ac_objext"
26039 if { (eval echo "$as_me:26039: \"$ac_compile\"") >&5
26040   (eval $ac_compile) 2>&5
26041   ac_status=$?
26042   echo "$as_me:26042: \$? = $ac_status" >&5
26043   (exit "$ac_status"); } &&
26044          { ac_try='test -s "conftest.$ac_objext"'
26045   { (eval echo "$as_me:26045: \"$ac_try\"") >&5
26046   (eval $ac_try) 2>&5
26047   ac_status=$?
26048   echo "$as_me:26048: \$? = $ac_status" >&5
26049   (exit "$ac_status"); }; }; then
26050   ac_lo=$ac_mid; break
26051 else
26052   echo "$as_me: failed program was:" >&5
26053 cat "conftest.$ac_ext" >&5
26054 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26055 fi
26056 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26057   done
26058 fi
26059 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26060 # Binary search between lo and hi bounds.
26061 while test "x$ac_lo" != "x$ac_hi"; do
26062   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26063   cat >"conftest.$ac_ext" <<_ACEOF
26064 #line 26064 "configure"
26065 #include "confdefs.h"
26066
26067 #include <stdlib.h>
26068 #include <stdio.h>
26069
26070 #if defined(__cplusplus)
26071
26072 #ifdef HAVE_GXX_BUILTIN_H
26073 #include <g++/builtin.h>
26074 #elif HAVE_GPP_BUILTIN_H
26075 #include <gpp/builtin.h>
26076 #elif HAVE_BUILTIN_H
26077 #include <builtin.h>
26078 #endif
26079
26080 #else
26081
26082 #if $cf_cv_header_stdbool_h
26083 #include <stdbool.h>
26084 #endif
26085
26086 #endif
26087
26088 int
26089 main (void)
26090 {
26091 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26092   ;
26093   return 0;
26094 }
26095 _ACEOF
26096 rm -f "conftest.$ac_objext"
26097 if { (eval echo "$as_me:26097: \"$ac_compile\"") >&5
26098   (eval $ac_compile) 2>&5
26099   ac_status=$?
26100   echo "$as_me:26100: \$? = $ac_status" >&5
26101   (exit "$ac_status"); } &&
26102          { ac_try='test -s "conftest.$ac_objext"'
26103   { (eval echo "$as_me:26103: \"$ac_try\"") >&5
26104   (eval $ac_try) 2>&5
26105   ac_status=$?
26106   echo "$as_me:26106: \$? = $ac_status" >&5
26107   (exit "$ac_status"); }; }; then
26108   ac_hi=$ac_mid
26109 else
26110   echo "$as_me: failed program was:" >&5
26111 cat "conftest.$ac_ext" >&5
26112 ac_lo=`expr "$ac_mid" + 1`
26113 fi
26114 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26115 done
26116 ac_cv_sizeof_bool=$ac_lo
26117 else
26118   if test "$cross_compiling" = yes; then
26119   { { echo "$as_me:26119: error: cannot run test program while cross compiling" >&5
26120 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26121    { (exit 1); exit 1; }; }
26122 else
26123   cat >"conftest.$ac_ext" <<_ACEOF
26124 #line 26124 "configure"
26125 #include "confdefs.h"
26126
26127 #include <stdlib.h>
26128 #include <stdio.h>
26129
26130 #if defined(__cplusplus)
26131
26132 #ifdef HAVE_GXX_BUILTIN_H
26133 #include <g++/builtin.h>
26134 #elif HAVE_GPP_BUILTIN_H
26135 #include <gpp/builtin.h>
26136 #elif HAVE_BUILTIN_H
26137 #include <builtin.h>
26138 #endif
26139
26140 #else
26141
26142 #if $cf_cv_header_stdbool_h
26143 #include <stdbool.h>
26144 #endif
26145
26146 #endif
26147
26148 int
26149 main (void)
26150 {
26151 FILE *f = fopen ("conftest.val", "w");
26152 if (!f)
26153   $ac_main_return (1);
26154 fprintf (f, "%ld", (long)(sizeof (bool)));
26155 fclose (f);
26156   ;
26157   return 0;
26158 }
26159 _ACEOF
26160 rm -f "conftest$ac_exeext"
26161 if { (eval echo "$as_me:26161: \"$ac_link\"") >&5
26162   (eval $ac_link) 2>&5
26163   ac_status=$?
26164   echo "$as_me:26164: \$? = $ac_status" >&5
26165   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26166   { (eval echo "$as_me:26166: \"$ac_try\"") >&5
26167   (eval $ac_try) 2>&5
26168   ac_status=$?
26169   echo "$as_me:26169: \$? = $ac_status" >&5
26170   (exit "$ac_status"); }; }; then
26171   ac_cv_sizeof_bool=`cat conftest.val`
26172 else
26173   echo "$as_me: program exited with status $ac_status" >&5
26174 echo "$as_me: failed program was:" >&5
26175 cat "conftest.$ac_ext" >&5
26176 fi
26177 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26178 fi
26179 fi
26180 rm -f conftest.val
26181 else
26182   ac_cv_sizeof_bool=0
26183 fi
26184 fi
26185 echo "$as_me:26185: result: $ac_cv_sizeof_bool" >&5
26186 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26187 cat >>confdefs.h <<EOF
26188 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26189 EOF
26190
26191 echo "$as_me:26191: checking for type of bool" >&5
26192 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26193 if test "${cf_cv_type_of_bool+set}" = set; then
26194   echo $ECHO_N "(cached) $ECHO_C" >&6
26195 else
26196
26197         rm -f cf_test.out
26198         if test "$cross_compiling" = yes; then
26199
26200                 case x$ac_cv_sizeof_bool in
26201                 (x1) cf_cv_type_of_bool="unsigned char";;
26202                 (x2) cf_cv_type_of_bool="unsigned short";;
26203                 (x4) cf_cv_type_of_bool="unsigned int";;
26204                 (x8) cf_cv_type_of_bool="unsigned long";;
26205                 (*)  cf_cv_type_of_bool=unknown;;
26206                 esac
26207
26208 else
26209   cat >"conftest.$ac_ext" <<_ACEOF
26210 #line 26210 "configure"
26211 #include "confdefs.h"
26212
26213 #include <stdlib.h>
26214 #include <stdio.h>
26215
26216 #if defined(__cplusplus)
26217
26218 #ifdef HAVE_GXX_BUILTIN_H
26219 #include <g++/builtin.h>
26220 #elif HAVE_GPP_BUILTIN_H
26221 #include <gpp/builtin.h>
26222 #elif HAVE_BUILTIN_H
26223 #include <builtin.h>
26224 #endif
26225
26226 #else
26227
26228 #if $cf_cv_header_stdbool_h
26229 #include <stdbool.h>
26230 #endif
26231
26232 #endif
26233
26234 int main(void)
26235 {
26236         FILE *fp = fopen("cf_test.out", "w");
26237         if (fp != 0) {
26238                 bool x = true;
26239                 if ((bool)(-x) >= 0)
26240                         fputs("unsigned ", fp);
26241                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26242                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26243                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26244                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26245                 fclose(fp);
26246         }
26247         ${cf_cv_main_return:-return}(0);
26248 }
26249
26250 _ACEOF
26251 rm -f "conftest$ac_exeext"
26252 if { (eval echo "$as_me:26252: \"$ac_link\"") >&5
26253   (eval $ac_link) 2>&5
26254   ac_status=$?
26255   echo "$as_me:26255: \$? = $ac_status" >&5
26256   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26257   { (eval echo "$as_me:26257: \"$ac_try\"") >&5
26258   (eval $ac_try) 2>&5
26259   ac_status=$?
26260   echo "$as_me:26260: \$? = $ac_status" >&5
26261   (exit "$ac_status"); }; }; then
26262   cf_cv_type_of_bool=`cat cf_test.out`
26263                  if test -z "$cf_cv_type_of_bool"; then
26264                    cf_cv_type_of_bool=unknown
26265                  fi
26266 else
26267   echo "$as_me: program exited with status $ac_status" >&5
26268 echo "$as_me: failed program was:" >&5
26269 cat "conftest.$ac_ext" >&5
26270 cf_cv_type_of_bool=unknown
26271 fi
26272 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26273 fi
26274         rm -f cf_test.out
26275
26276 fi
26277 echo "$as_me:26277: result: $cf_cv_type_of_bool" >&5
26278 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26279
26280 if test "$cf_cv_type_of_bool" = unknown ; then
26281         case .$NCURSES_BOOL in
26282         (.auto|.) NCURSES_BOOL=unsigned;;
26283         esac
26284         { echo "$as_me:26284: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26285 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26286         cf_cv_type_of_bool=$NCURSES_BOOL
26287 fi
26288
26289 echo "$as_me:26289: checking for special defines needed for etip.h" >&5
26290 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26291 cf_save_CXXFLAGS="$CXXFLAGS"
26292 cf_result="none"
26293
26294 # etip.h includes ncurses.h which includes ncurses_dll.h
26295 # But ncurses_dll.h is generated - fix here.
26296 test -d include || mkdir include
26297 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
26298
26299 for cf_math in "" MATH_H
26300 do
26301 for cf_excp in "" MATH_EXCEPTION
26302 do
26303         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26304         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26305         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26306 cat >"conftest.$ac_ext" <<_ACEOF
26307 #line 26307 "configure"
26308 #include "confdefs.h"
26309
26310 #include <etip.h.in>
26311
26312 int
26313 main (void)
26314 {
26315
26316   ;
26317   return 0;
26318 }
26319 _ACEOF
26320 rm -f "conftest.$ac_objext"
26321 if { (eval echo "$as_me:26321: \"$ac_compile\"") >&5
26322   (eval $ac_compile) 2>&5
26323   ac_status=$?
26324   echo "$as_me:26324: \$? = $ac_status" >&5
26325   (exit "$ac_status"); } &&
26326          { ac_try='test -s "conftest.$ac_objext"'
26327   { (eval echo "$as_me:26327: \"$ac_try\"") >&5
26328   (eval $ac_try) 2>&5
26329   ac_status=$?
26330   echo "$as_me:26330: \$? = $ac_status" >&5
26331   (exit "$ac_status"); }; }; then
26332
26333         test -n "$cf_math" && cat >>confdefs.h <<EOF
26334 #define ETIP_NEEDS_${cf_math} 1
26335 EOF
26336
26337         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26338 #define ETIP_NEEDS_${cf_excp} 1
26339 EOF
26340
26341         cf_result="$cf_math $cf_excp"
26342         break 2
26343
26344 else
26345   echo "$as_me: failed program was:" >&5
26346 cat "conftest.$ac_ext" >&5
26347 fi
26348 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26349 done
26350 done
26351 echo "$as_me:26351: result: $cf_result" >&5
26352 echo "${ECHO_T}$cf_result" >&6
26353 CXXFLAGS="$cf_save_CXXFLAGS"
26354
26355 if test -n "$CXX"; then
26356 echo "$as_me:26356: checking if $CXX accepts override keyword" >&5
26357 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26358 if test "${cf_cv_cpp_override+set}" = set; then
26359   echo $ECHO_N "(cached) $ECHO_C" >&6
26360 else
26361
26362         ac_ext=cc
26363 ac_cpp='$CXXCPP $CPPFLAGS'
26364 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26365 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26366 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26367 ac_main_return="return"
26368
26369         if test "$cross_compiling" = yes; then
26370   cf_cv_cpp_override=unknown
26371 else
26372   cat >"conftest.$ac_ext" <<_ACEOF
26373 #line 26373 "configure"
26374 #include "confdefs.h"
26375
26376 class base
26377 {
26378 public:
26379         virtual int foo(float x) = 0;
26380 };
26381
26382 class derived: public base
26383 {
26384 public:
26385         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26386 };
26387
26388 int main(void) { }
26389
26390 _ACEOF
26391 rm -f "conftest$ac_exeext"
26392 if { (eval echo "$as_me:26392: \"$ac_link\"") >&5
26393   (eval $ac_link) 2>&5
26394   ac_status=$?
26395   echo "$as_me:26395: \$? = $ac_status" >&5
26396   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26397   { (eval echo "$as_me:26397: \"$ac_try\"") >&5
26398   (eval $ac_try) 2>&5
26399   ac_status=$?
26400   echo "$as_me:26400: \$? = $ac_status" >&5
26401   (exit "$ac_status"); }; }; then
26402   cf_cv_cpp_override=yes
26403 else
26404   echo "$as_me: program exited with status $ac_status" >&5
26405 echo "$as_me: failed program was:" >&5
26406 cat "conftest.$ac_ext" >&5
26407 cf_cv_cpp_override=no
26408 fi
26409 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26410 fi
26411         ac_ext=cc
26412 ac_cpp='$CXXCPP $CPPFLAGS'
26413 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26414 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26415 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26416 ac_main_return="return"
26417
26418 fi
26419 echo "$as_me:26419: result: $cf_cv_cpp_override" >&5
26420 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26421 fi
26422 test "$cf_cv_cpp_override" = yes &&
26423 cat >>confdefs.h <<\EOF
26424 #define CPP_HAS_OVERRIDE 1
26425 EOF
26426
26427 if test -n "$CXX"; then
26428 echo "$as_me:26428: checking if $CXX accepts parameter initialization" >&5
26429 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26430 if test "${cf_cv_cpp_param_init+set}" = set; then
26431   echo $ECHO_N "(cached) $ECHO_C" >&6
26432 else
26433
26434         ac_ext=cc
26435 ac_cpp='$CXXCPP $CPPFLAGS'
26436 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26437 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26438 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26439 ac_main_return="return"
26440
26441         if test "$cross_compiling" = yes; then
26442   cf_cv_cpp_param_init=unknown
26443 else
26444   cat >"conftest.$ac_ext" <<_ACEOF
26445 #line 26445 "configure"
26446 #include "confdefs.h"
26447
26448 class TEST {
26449 private:
26450         int value;
26451 public:
26452         TEST(int x = 1);
26453         ~TEST();
26454 };
26455
26456 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26457 {
26458         value = x;
26459 }
26460 int main(void) { }
26461
26462 _ACEOF
26463 rm -f "conftest$ac_exeext"
26464 if { (eval echo "$as_me:26464: \"$ac_link\"") >&5
26465   (eval $ac_link) 2>&5
26466   ac_status=$?
26467   echo "$as_me:26467: \$? = $ac_status" >&5
26468   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26469   { (eval echo "$as_me:26469: \"$ac_try\"") >&5
26470   (eval $ac_try) 2>&5
26471   ac_status=$?
26472   echo "$as_me:26472: \$? = $ac_status" >&5
26473   (exit "$ac_status"); }; }; then
26474   cf_cv_cpp_param_init=yes
26475 else
26476   echo "$as_me: program exited with status $ac_status" >&5
26477 echo "$as_me: failed program was:" >&5
26478 cat "conftest.$ac_ext" >&5
26479 cf_cv_cpp_param_init=no
26480 fi
26481 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26482 fi
26483         ac_ext=cc
26484 ac_cpp='$CXXCPP $CPPFLAGS'
26485 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26486 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26487 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26488 ac_main_return="return"
26489
26490 fi
26491 echo "$as_me:26491: result: $cf_cv_cpp_param_init" >&5
26492 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26493 fi
26494 test "$cf_cv_cpp_param_init" = yes &&
26495 cat >>confdefs.h <<\EOF
26496 #define CPP_HAS_PARAM_INIT 1
26497 EOF
26498
26499 if test -n "$CXX"; then
26500
26501 echo "$as_me:26501: checking if $CXX accepts static_cast" >&5
26502 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26503 if test "${cf_cv_cpp_static_cast+set}" = set; then
26504   echo $ECHO_N "(cached) $ECHO_C" >&6
26505 else
26506
26507         ac_ext=cc
26508 ac_cpp='$CXXCPP $CPPFLAGS'
26509 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26510 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26511 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26512 ac_main_return="return"
26513
26514         cat >"conftest.$ac_ext" <<_ACEOF
26515 #line 26515 "configure"
26516 #include "confdefs.h"
26517
26518 class NCursesPanel
26519 {
26520 public:
26521   NCursesPanel(int nlines,
26522                int ncols,
26523                int begin_y = 0,
26524                int begin_x = 0)
26525   {
26526   }
26527   NCursesPanel();
26528   ~NCursesPanel();
26529 };
26530
26531 template<class T> class NCursesUserPanel : public NCursesPanel
26532 {
26533 public:
26534   NCursesUserPanel (int nlines,
26535                     int ncols,
26536                     int begin_y = 0,
26537                     int begin_x = 0,
26538                     const T* p_UserData = static_cast<T*>(0))
26539     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26540   {
26541   };
26542   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26543   {
26544   };
26545
26546   virtual ~NCursesUserPanel() {};
26547 };
26548
26549 int
26550 main (void)
26551 {
26552
26553         const char* p_UserData = static_cast<char*>(0)
26554   ;
26555   return 0;
26556 }
26557 _ACEOF
26558 rm -f "conftest.$ac_objext"
26559 if { (eval echo "$as_me:26559: \"$ac_compile\"") >&5
26560   (eval $ac_compile) 2>&5
26561   ac_status=$?
26562   echo "$as_me:26562: \$? = $ac_status" >&5
26563   (exit "$ac_status"); } &&
26564          { ac_try='test -s "conftest.$ac_objext"'
26565   { (eval echo "$as_me:26565: \"$ac_try\"") >&5
26566   (eval $ac_try) 2>&5
26567   ac_status=$?
26568   echo "$as_me:26568: \$? = $ac_status" >&5
26569   (exit "$ac_status"); }; }; then
26570   cf_cv_cpp_static_cast=yes
26571 else
26572   echo "$as_me: failed program was:" >&5
26573 cat "conftest.$ac_ext" >&5
26574 cf_cv_cpp_static_cast=no
26575 fi
26576 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26577
26578         ac_ext=cc
26579 ac_cpp='$CXXCPP $CPPFLAGS'
26580 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26581 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26582 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26583 ac_main_return="return"
26584
26585 fi
26586 echo "$as_me:26586: result: $cf_cv_cpp_static_cast" >&5
26587 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26588
26589 fi
26590
26591 test "$cf_cv_cpp_static_cast" = yes &&
26592 cat >>confdefs.h <<\EOF
26593 #define CPP_HAS_STATIC_CAST 1
26594 EOF
26595
26596         CXX_AR='$(AR)'
26597         CXX_ARFLAGS='$(ARFLAGS)'
26598         case "$cf_cv_system_name" in
26599         (irix*)
26600             if test "$GXX" != yes ; then
26601                 CXX_AR='$(CXX)'
26602                 CXX_ARFLAGS='-ar -o'
26603             fi
26604             ;;
26605         (sco3.2v5*)
26606             CXXLDFLAGS="-u main"
26607             ;;
26608         (solaris2*)
26609             if test "$GXX" != yes ; then
26610                 CXX_AR='$(CXX)'
26611                 CXX_ARFLAGS='-xar -o'
26612             fi
26613             ;;
26614         esac
26615
26616 else
26617         cf_cxx_library=no
26618         cf_cv_builtin_bool=1
26619
26620         # Just because we are not configuring against C++ right now does not
26621         # mean that a user will not want to use C++.  Some distributors disable
26622         # the C++ portion of this configuration as a shortcut (or just to avoid
26623         # compiling the demo in the c++ directory).  So we need a reasonable
26624         # default for the 'bool' type.
26625         #
26626         # Caveat: since the storage of the bool type is not standardized, it
26627         # may change.
26628
26629         if test "$NCURSES_BOOL" != auto ; then
26630                 cf_cv_type_of_bool=$NCURSES_BOOL
26631                 cf_cv_header_stdbool_h=0
26632         else
26633                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26634
26635 echo "$as_me:26635: checking for bool" >&5
26636 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26637 if test "${ac_cv_type_bool+set}" = set; then
26638   echo $ECHO_N "(cached) $ECHO_C" >&6
26639 else
26640   cat >"conftest.$ac_ext" <<_ACEOF
26641 #line 26641 "configure"
26642 #include "confdefs.h"
26643
26644 #include <stdlib.h>
26645 #include <stdio.h>
26646
26647 #if defined(__cplusplus)
26648
26649 #ifdef HAVE_GXX_BUILTIN_H
26650 #include <g++/builtin.h>
26651 #elif HAVE_GPP_BUILTIN_H
26652 #include <gpp/builtin.h>
26653 #elif HAVE_BUILTIN_H
26654 #include <builtin.h>
26655 #endif
26656
26657 #else
26658
26659 #if $cf_cv_header_stdbool_h
26660 #include <stdbool.h>
26661 #endif
26662
26663 #endif
26664
26665 int
26666 main (void)
26667 {
26668 if ((bool *) 0)
26669   return 0;
26670 if (sizeof (bool))
26671   return 0;
26672   ;
26673   return 0;
26674 }
26675 _ACEOF
26676 rm -f "conftest.$ac_objext"
26677 if { (eval echo "$as_me:26677: \"$ac_compile\"") >&5
26678   (eval $ac_compile) 2>&5
26679   ac_status=$?
26680   echo "$as_me:26680: \$? = $ac_status" >&5
26681   (exit "$ac_status"); } &&
26682          { ac_try='test -s "conftest.$ac_objext"'
26683   { (eval echo "$as_me:26683: \"$ac_try\"") >&5
26684   (eval $ac_try) 2>&5
26685   ac_status=$?
26686   echo "$as_me:26686: \$? = $ac_status" >&5
26687   (exit "$ac_status"); }; }; then
26688   ac_cv_type_bool=yes
26689 else
26690   echo "$as_me: failed program was:" >&5
26691 cat "conftest.$ac_ext" >&5
26692 ac_cv_type_bool=no
26693 fi
26694 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26695 fi
26696 echo "$as_me:26696: result: $ac_cv_type_bool" >&5
26697 echo "${ECHO_T}$ac_cv_type_bool" >&6
26698
26699 echo "$as_me:26699: checking size of bool" >&5
26700 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26701 if test "${ac_cv_sizeof_bool+set}" = set; then
26702   echo $ECHO_N "(cached) $ECHO_C" >&6
26703 else
26704   if test "$ac_cv_type_bool" = yes; then
26705   if test "$cross_compiling" = yes; then
26706   # Depending upon the size, compute the lo and hi bounds.
26707 cat >"conftest.$ac_ext" <<_ACEOF
26708 #line 26708 "configure"
26709 #include "confdefs.h"
26710
26711 #include <stdlib.h>
26712 #include <stdio.h>
26713
26714 #if defined(__cplusplus)
26715
26716 #ifdef HAVE_GXX_BUILTIN_H
26717 #include <g++/builtin.h>
26718 #elif HAVE_GPP_BUILTIN_H
26719 #include <gpp/builtin.h>
26720 #elif HAVE_BUILTIN_H
26721 #include <builtin.h>
26722 #endif
26723
26724 #else
26725
26726 #if $cf_cv_header_stdbool_h
26727 #include <stdbool.h>
26728 #endif
26729
26730 #endif
26731
26732 int
26733 main (void)
26734 {
26735 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26736   ;
26737   return 0;
26738 }
26739 _ACEOF
26740 rm -f "conftest.$ac_objext"
26741 if { (eval echo "$as_me:26741: \"$ac_compile\"") >&5
26742   (eval $ac_compile) 2>&5
26743   ac_status=$?
26744   echo "$as_me:26744: \$? = $ac_status" >&5
26745   (exit "$ac_status"); } &&
26746          { ac_try='test -s "conftest.$ac_objext"'
26747   { (eval echo "$as_me:26747: \"$ac_try\"") >&5
26748   (eval $ac_try) 2>&5
26749   ac_status=$?
26750   echo "$as_me:26750: \$? = $ac_status" >&5
26751   (exit "$ac_status"); }; }; then
26752   ac_lo=0 ac_mid=0
26753   while :; do
26754     cat >"conftest.$ac_ext" <<_ACEOF
26755 #line 26755 "configure"
26756 #include "confdefs.h"
26757
26758 #include <stdlib.h>
26759 #include <stdio.h>
26760
26761 #if defined(__cplusplus)
26762
26763 #ifdef HAVE_GXX_BUILTIN_H
26764 #include <g++/builtin.h>
26765 #elif HAVE_GPP_BUILTIN_H
26766 #include <gpp/builtin.h>
26767 #elif HAVE_BUILTIN_H
26768 #include <builtin.h>
26769 #endif
26770
26771 #else
26772
26773 #if $cf_cv_header_stdbool_h
26774 #include <stdbool.h>
26775 #endif
26776
26777 #endif
26778
26779 int
26780 main (void)
26781 {
26782 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26783   ;
26784   return 0;
26785 }
26786 _ACEOF
26787 rm -f "conftest.$ac_objext"
26788 if { (eval echo "$as_me:26788: \"$ac_compile\"") >&5
26789   (eval $ac_compile) 2>&5
26790   ac_status=$?
26791   echo "$as_me:26791: \$? = $ac_status" >&5
26792   (exit "$ac_status"); } &&
26793          { ac_try='test -s "conftest.$ac_objext"'
26794   { (eval echo "$as_me:26794: \"$ac_try\"") >&5
26795   (eval $ac_try) 2>&5
26796   ac_status=$?
26797   echo "$as_me:26797: \$? = $ac_status" >&5
26798   (exit "$ac_status"); }; }; then
26799   ac_hi=$ac_mid; break
26800 else
26801   echo "$as_me: failed program was:" >&5
26802 cat "conftest.$ac_ext" >&5
26803 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26804 fi
26805 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26806   done
26807 else
26808   echo "$as_me: failed program was:" >&5
26809 cat "conftest.$ac_ext" >&5
26810 ac_hi=-1 ac_mid=-1
26811   while :; do
26812     cat >"conftest.$ac_ext" <<_ACEOF
26813 #line 26813 "configure"
26814 #include "confdefs.h"
26815
26816 #include <stdlib.h>
26817 #include <stdio.h>
26818
26819 #if defined(__cplusplus)
26820
26821 #ifdef HAVE_GXX_BUILTIN_H
26822 #include <g++/builtin.h>
26823 #elif HAVE_GPP_BUILTIN_H
26824 #include <gpp/builtin.h>
26825 #elif HAVE_BUILTIN_H
26826 #include <builtin.h>
26827 #endif
26828
26829 #else
26830
26831 #if $cf_cv_header_stdbool_h
26832 #include <stdbool.h>
26833 #endif
26834
26835 #endif
26836
26837 int
26838 main (void)
26839 {
26840 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26841   ;
26842   return 0;
26843 }
26844 _ACEOF
26845 rm -f "conftest.$ac_objext"
26846 if { (eval echo "$as_me:26846: \"$ac_compile\"") >&5
26847   (eval $ac_compile) 2>&5
26848   ac_status=$?
26849   echo "$as_me:26849: \$? = $ac_status" >&5
26850   (exit "$ac_status"); } &&
26851          { ac_try='test -s "conftest.$ac_objext"'
26852   { (eval echo "$as_me:26852: \"$ac_try\"") >&5
26853   (eval $ac_try) 2>&5
26854   ac_status=$?
26855   echo "$as_me:26855: \$? = $ac_status" >&5
26856   (exit "$ac_status"); }; }; then
26857   ac_lo=$ac_mid; break
26858 else
26859   echo "$as_me: failed program was:" >&5
26860 cat "conftest.$ac_ext" >&5
26861 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26862 fi
26863 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26864   done
26865 fi
26866 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26867 # Binary search between lo and hi bounds.
26868 while test "x$ac_lo" != "x$ac_hi"; do
26869   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26870   cat >"conftest.$ac_ext" <<_ACEOF
26871 #line 26871 "configure"
26872 #include "confdefs.h"
26873
26874 #include <stdlib.h>
26875 #include <stdio.h>
26876
26877 #if defined(__cplusplus)
26878
26879 #ifdef HAVE_GXX_BUILTIN_H
26880 #include <g++/builtin.h>
26881 #elif HAVE_GPP_BUILTIN_H
26882 #include <gpp/builtin.h>
26883 #elif HAVE_BUILTIN_H
26884 #include <builtin.h>
26885 #endif
26886
26887 #else
26888
26889 #if $cf_cv_header_stdbool_h
26890 #include <stdbool.h>
26891 #endif
26892
26893 #endif
26894
26895 int
26896 main (void)
26897 {
26898 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26899   ;
26900   return 0;
26901 }
26902 _ACEOF
26903 rm -f "conftest.$ac_objext"
26904 if { (eval echo "$as_me:26904: \"$ac_compile\"") >&5
26905   (eval $ac_compile) 2>&5
26906   ac_status=$?
26907   echo "$as_me:26907: \$? = $ac_status" >&5
26908   (exit "$ac_status"); } &&
26909          { ac_try='test -s "conftest.$ac_objext"'
26910   { (eval echo "$as_me:26910: \"$ac_try\"") >&5
26911   (eval $ac_try) 2>&5
26912   ac_status=$?
26913   echo "$as_me:26913: \$? = $ac_status" >&5
26914   (exit "$ac_status"); }; }; then
26915   ac_hi=$ac_mid
26916 else
26917   echo "$as_me: failed program was:" >&5
26918 cat "conftest.$ac_ext" >&5
26919 ac_lo=`expr "$ac_mid" + 1`
26920 fi
26921 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26922 done
26923 ac_cv_sizeof_bool=$ac_lo
26924 else
26925   if test "$cross_compiling" = yes; then
26926   { { echo "$as_me:26926: error: cannot run test program while cross compiling" >&5
26927 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26928    { (exit 1); exit 1; }; }
26929 else
26930   cat >"conftest.$ac_ext" <<_ACEOF
26931 #line 26931 "configure"
26932 #include "confdefs.h"
26933
26934 #include <stdlib.h>
26935 #include <stdio.h>
26936
26937 #if defined(__cplusplus)
26938
26939 #ifdef HAVE_GXX_BUILTIN_H
26940 #include <g++/builtin.h>
26941 #elif HAVE_GPP_BUILTIN_H
26942 #include <gpp/builtin.h>
26943 #elif HAVE_BUILTIN_H
26944 #include <builtin.h>
26945 #endif
26946
26947 #else
26948
26949 #if $cf_cv_header_stdbool_h
26950 #include <stdbool.h>
26951 #endif
26952
26953 #endif
26954
26955 int
26956 main (void)
26957 {
26958 FILE *f = fopen ("conftest.val", "w");
26959 if (!f)
26960   $ac_main_return (1);
26961 fprintf (f, "%ld", (long)(sizeof (bool)));
26962 fclose (f);
26963   ;
26964   return 0;
26965 }
26966 _ACEOF
26967 rm -f "conftest$ac_exeext"
26968 if { (eval echo "$as_me:26968: \"$ac_link\"") >&5
26969   (eval $ac_link) 2>&5
26970   ac_status=$?
26971   echo "$as_me:26971: \$? = $ac_status" >&5
26972   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26973   { (eval echo "$as_me:26973: \"$ac_try\"") >&5
26974   (eval $ac_try) 2>&5
26975   ac_status=$?
26976   echo "$as_me:26976: \$? = $ac_status" >&5
26977   (exit "$ac_status"); }; }; then
26978   ac_cv_sizeof_bool=`cat conftest.val`
26979 else
26980   echo "$as_me: program exited with status $ac_status" >&5
26981 echo "$as_me: failed program was:" >&5
26982 cat "conftest.$ac_ext" >&5
26983 fi
26984 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26985 fi
26986 fi
26987 rm -f conftest.val
26988 else
26989   ac_cv_sizeof_bool=0
26990 fi
26991 fi
26992 echo "$as_me:26992: result: $ac_cv_sizeof_bool" >&5
26993 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26994 cat >>confdefs.h <<EOF
26995 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26996 EOF
26997
26998 echo "$as_me:26998: checking for type of bool" >&5
26999 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27000 if test "${cf_cv_type_of_bool+set}" = set; then
27001   echo $ECHO_N "(cached) $ECHO_C" >&6
27002 else
27003
27004         rm -f cf_test.out
27005         if test "$cross_compiling" = yes; then
27006
27007                 case x$ac_cv_sizeof_bool in
27008                 (x1) cf_cv_type_of_bool="unsigned char";;
27009                 (x2) cf_cv_type_of_bool="unsigned short";;
27010                 (x4) cf_cv_type_of_bool="unsigned int";;
27011                 (x8) cf_cv_type_of_bool="unsigned long";;
27012                 (*)  cf_cv_type_of_bool=unknown;;
27013                 esac
27014
27015 else
27016   cat >"conftest.$ac_ext" <<_ACEOF
27017 #line 27017 "configure"
27018 #include "confdefs.h"
27019
27020 #include <stdlib.h>
27021 #include <stdio.h>
27022
27023 #if defined(__cplusplus)
27024
27025 #ifdef HAVE_GXX_BUILTIN_H
27026 #include <g++/builtin.h>
27027 #elif HAVE_GPP_BUILTIN_H
27028 #include <gpp/builtin.h>
27029 #elif HAVE_BUILTIN_H
27030 #include <builtin.h>
27031 #endif
27032
27033 #else
27034
27035 #if $cf_cv_header_stdbool_h
27036 #include <stdbool.h>
27037 #endif
27038
27039 #endif
27040
27041 int main(void)
27042 {
27043         FILE *fp = fopen("cf_test.out", "w");
27044         if (fp != 0) {
27045                 bool x = true;
27046                 if ((bool)(-x) >= 0)
27047                         fputs("unsigned ", fp);
27048                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27049                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27050                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27051                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27052                 fclose(fp);
27053         }
27054         ${cf_cv_main_return:-return}(0);
27055 }
27056
27057 _ACEOF
27058 rm -f "conftest$ac_exeext"
27059 if { (eval echo "$as_me:27059: \"$ac_link\"") >&5
27060   (eval $ac_link) 2>&5
27061   ac_status=$?
27062   echo "$as_me:27062: \$? = $ac_status" >&5
27063   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27064   { (eval echo "$as_me:27064: \"$ac_try\"") >&5
27065   (eval $ac_try) 2>&5
27066   ac_status=$?
27067   echo "$as_me:27067: \$? = $ac_status" >&5
27068   (exit "$ac_status"); }; }; then
27069   cf_cv_type_of_bool=`cat cf_test.out`
27070                  if test -z "$cf_cv_type_of_bool"; then
27071                    cf_cv_type_of_bool=unknown
27072                  fi
27073 else
27074   echo "$as_me: program exited with status $ac_status" >&5
27075 echo "$as_me: failed program was:" >&5
27076 cat "conftest.$ac_ext" >&5
27077 cf_cv_type_of_bool=unknown
27078 fi
27079 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27080 fi
27081         rm -f cf_test.out
27082
27083 fi
27084 echo "$as_me:27084: result: $cf_cv_type_of_bool" >&5
27085 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27086
27087 if test "$cf_cv_type_of_bool" = unknown ; then
27088         case .$NCURSES_BOOL in
27089         (.auto|.) NCURSES_BOOL=unsigned;;
27090         esac
27091         { echo "$as_me:27091: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27092 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27093         cf_cv_type_of_bool=$NCURSES_BOOL
27094 fi
27095
27096                 else
27097                         echo "$as_me:27097: checking for fallback type of bool" >&5
27098 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27099                         case "$host_cpu" in
27100                         (i?86)  cf_cv_type_of_bool=char ;;
27101                         (*)     cf_cv_type_of_bool=int  ;;
27102                         esac
27103                         echo "$as_me:27103: result: $cf_cv_type_of_bool" >&5
27104 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27105                 fi
27106         fi
27107 fi
27108
27109 # If the C compiler did not declare bool, and we did not determine that the C++
27110 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27111 # ncurses library use the same type as C++ bool.  Note that this allows one to
27112 # specify the type of bool in a configure-script option and postpone
27113 # integration with the C++ compiler provided that the types are compatible.
27114 USE_CXX_BOOL=1
27115 if test "$cf_cv_cc_bool_type" = 1
27116 then
27117         # oops: C has a bool.  Unlikely, but C++ could differ.
27118         USE_CXX_BOOL=0
27119 elif test "$cf_cv_builtin_bool" = 0
27120 then
27121         # C++ has no bool
27122         USE_CXX_BOOL=0
27123 else
27124         # this is the normal case
27125         USE_CXX_BOOL='defined(__cplusplus)'
27126 fi
27127
27128 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27129
27130         if test "$cf_with_ada" != "no" ; then
27131                 if test "$with_libtool" != "no"; then
27132                         { echo "$as_me:27132: WARNING: libtool does not support Ada - disabling feature" >&5
27133 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27134                         cf_with_ada=no
27135                 fi
27136         fi
27137
27138         if test "$cf_with_ada" != "no" ; then
27139
27140 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27141 do
27142
27143 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27144
27145         unset ac_cv_path_cf_TEMP_gnat
27146         unset cf_TEMP_gnat
27147         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27148 set dummy $cf_prog_gnat; ac_word=$2
27149 echo "$as_me:27149: checking for $ac_word" >&5
27150 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27151 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27152   echo $ECHO_N "(cached) $ECHO_C" >&6
27153 else
27154   case $cf_TEMP_gnat in
27155   [\\/]* | ?:[\\/]*)
27156   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27157   ;;
27158   *)
27159   ac_save_IFS=$IFS; IFS=$ac_path_separator
27160 ac_dummy="$PATH"
27161 for ac_dir in $ac_dummy; do
27162   IFS=$ac_save_IFS
27163   test -z "$ac_dir" && ac_dir=.
27164   if $as_executable_p "$ac_dir/$ac_word"; then
27165    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27166    echo "$as_me:27166: found $ac_dir/$ac_word" >&5
27167    break
27168 fi
27169 done
27170
27171   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27172   ;;
27173 esac
27174 fi
27175 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27176
27177 if test -n "$cf_TEMP_gnat"; then
27178   echo "$as_me:27178: result: $cf_TEMP_gnat" >&5
27179 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27180 else
27181   echo "$as_me:27181: result: no" >&5
27182 echo "${ECHO_T}no" >&6
27183 fi
27184
27185         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27186
27187         if test "x$cf_TEMP_gnat" != xno; then
27188                 unset cf_cv_gnat_version
27189                 unset cf_TEMP_gnat
27190
27191 echo "$as_me:27191: checking for $cf_prog_gnat version" >&5
27192 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27193 if test "${cf_cv_gnat_version+set}" = set; then
27194   echo $ECHO_N "(cached) $ECHO_C" >&6
27195 else
27196
27197 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27198         grep '[0-9].[0-9][0-9]*' |\
27199         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27200
27201 fi
27202 echo "$as_me:27202: result: $cf_cv_gnat_version" >&5
27203 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27204 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27205 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27206
27207         fi
27208         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27209
27210         unset cf_TEMP_gnat
27211         unset cf_cv_gnat_version
27212         unset ac_cv_path_cf_TEMP_gnat
27213 done
27214
27215 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27216         cf_ada_make=
27217         cf_cv_prog_gnat_correct=no
27218 else
27219         cf_ada_make=gnatmake
27220         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27221                 # gprconfig is newer than gnatmake; we can continue...
27222                 cf_ada_config="##"
27223         else
27224                 rm -rf ./conftest* ./*~conftest*
27225                 if mkdir conftest.src
27226                 then
27227                         cf_ada_config=""
27228                         cd conftest.src
27229                         for cf_gprconfig in Ada C
27230                         do
27231                                 echo "$as_me:27231: checking for gprconfig name for $cf_gprconfig" >&5
27232 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27233                                 if test "$cf_gprconfig" = C
27234                                 then
27235                                         for cf_gprconfig_param in \
27236                                                 "$cf_gprconfig,,,,GNATGCC" \
27237                                                 "$cf_gprconfig,,,,GCC" \
27238                                                 "$cf_gprconfig"
27239                                         do
27240                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27241                                                 test -n "$cf_gprconfig_value" && break
27242                                         done
27243                                 else
27244                                         cf_gprconfig_param=$cf_gprconfig
27245                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27246                                 fi
27247                                 if test -n "$cf_gprconfig_value"
27248                                 then
27249                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27250                                         echo "$as_me:27250: result: $cf_gprconfig_value" >&5
27251 echo "${ECHO_T}$cf_gprconfig_value" >&6
27252                                 else
27253                                         echo "$as_me:27253: result: missing" >&5
27254 echo "${ECHO_T}missing" >&6
27255                                         cf_ada_config="#"
27256                                         break
27257                                 fi
27258                         done
27259                         cd ..
27260                         rm -rf ./conftest* ./*~conftest*
27261                 fi
27262         fi
27263         if test "x$cf_ada_config" != "x#"
27264         then
27265
27266 echo "$as_me:27266: checking for gnat version" >&5
27267 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27268 if test "${cf_cv_gnat_version+set}" = set; then
27269   echo $ECHO_N "(cached) $ECHO_C" >&6
27270 else
27271
27272 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27273         grep '[0-9].[0-9][0-9]*' |\
27274         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27275
27276 fi
27277 echo "$as_me:27277: result: $cf_cv_gnat_version" >&5
27278 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27279 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27280
27281 case "$cf_cv_gnat_version" in
27282 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27283         cf_cv_prog_gnat_correct=yes
27284         ;;
27285 (*)
27286         { echo "$as_me:27286: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27287 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27288         cf_cv_prog_gnat_correct=no
27289         ;;
27290 esac
27291
27292                 # Extract the first word of "m4", so it can be a program name with args.
27293 set dummy m4; ac_word=$2
27294 echo "$as_me:27294: checking for $ac_word" >&5
27295 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27296 if test "${ac_cv_prog_M4_exists+set}" = set; then
27297   echo $ECHO_N "(cached) $ECHO_C" >&6
27298 else
27299   if test -n "$M4_exists"; then
27300   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27301 else
27302   ac_save_IFS=$IFS; IFS=$ac_path_separator
27303 ac_dummy="$PATH"
27304 for ac_dir in $ac_dummy; do
27305   IFS=$ac_save_IFS
27306   test -z "$ac_dir" && ac_dir=.
27307   $as_executable_p "$ac_dir/$ac_word" || continue
27308 ac_cv_prog_M4_exists="yes"
27309 echo "$as_me:27309: found $ac_dir/$ac_word" >&5
27310 break
27311 done
27312
27313   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27314 fi
27315 fi
27316 M4_exists=$ac_cv_prog_M4_exists
27317 if test -n "$M4_exists"; then
27318   echo "$as_me:27318: result: $M4_exists" >&5
27319 echo "${ECHO_T}$M4_exists" >&6
27320 else
27321   echo "$as_me:27321: result: no" >&5
27322 echo "${ECHO_T}no" >&6
27323 fi
27324
27325                 if test "$ac_cv_prog_M4_exists" = no; then
27326                         cf_cv_prog_gnat_correct=no
27327                         { echo "$as_me:27327: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27328 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27329                 fi
27330                 if test "$cf_cv_prog_gnat_correct" = yes; then
27331                         echo "$as_me:27331: checking if GNAT works" >&5
27332 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27333
27334 rm -rf ./conftest* ./*~conftest*
27335 cat >>conftest.ads <<CF_EOF
27336 procedure conftest;
27337 CF_EOF
27338 cat >>conftest.adb <<CF_EOF
27339 with Text_IO;
27340 with GNAT.OS_Lib;
27341 procedure conftest is
27342 begin
27343    Text_IO.Put ("Hello World");
27344    Text_IO.New_Line;
27345    GNAT.OS_Lib.OS_Exit (0);
27346 end conftest;
27347 CF_EOF
27348 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27349    if ( ./conftest 1>&5 2>&1 ) ; then
27350       cf_cv_prog_gnat_correct=yes
27351    else
27352       cf_cv_prog_gnat_correct=no
27353    fi
27354 else
27355    cf_cv_prog_gnat_correct=no
27356 fi
27357 rm -rf ./conftest* ./*~conftest*
27358
27359                         echo "$as_me:27359: result: $cf_cv_prog_gnat_correct" >&5
27360 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27361                 fi
27362         else
27363                 cf_cv_prog_gnat_correct=no
27364         fi
27365 fi
27366
27367                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27368
27369         ADAFLAGS="$ADAFLAGS -gnatpn"
27370
27371         echo "$as_me:27371: checking optimization options for ADAFLAGS" >&5
27372 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27373         case "$CFLAGS" in
27374         (*-g*)
27375
27376         ADAFLAGS="$ADAFLAGS -g"
27377
27378                 ;;
27379         esac
27380         case "$CFLAGS" in
27381         (*-O*)
27382                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27383
27384         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27385
27386                 ;;
27387         esac
27388         echo "$as_me:27388: result: $ADAFLAGS" >&5
27389 echo "${ECHO_T}$ADAFLAGS" >&6
27390
27391 echo "$as_me:27391: checking if GNATPREP supports -T option" >&5
27392 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27393 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27394   echo $ECHO_N "(cached) $ECHO_C" >&6
27395 else
27396
27397 cf_cv_gnatprep_opt_t=no
27398 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27399
27400 fi
27401 echo "$as_me:27401: result: $cf_cv_gnatprep_opt_t" >&5
27402 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27403 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27404
27405 echo "$as_me:27405: checking if GNAT supports generics" >&5
27406 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27407 case "$cf_cv_gnat_version" in
27408 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27409         cf_gnat_generics=yes
27410         ;;
27411 (*)
27412         cf_gnat_generics=no
27413         ;;
27414 esac
27415 echo "$as_me:27415: result: $cf_gnat_generics" >&5
27416 echo "${ECHO_T}$cf_gnat_generics" >&6
27417
27418 if test "$cf_gnat_generics" = yes
27419 then
27420         cf_compile_generics=generics
27421         cf_generic_objects="\${GENOBJS}"
27422 else
27423         cf_compile_generics=
27424         cf_generic_objects=
27425 fi
27426
27427 echo "$as_me:27427: checking if GNAT supports SIGINT" >&5
27428 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27429 if test "${cf_cv_gnat_sigint+set}" = set; then
27430   echo $ECHO_N "(cached) $ECHO_C" >&6
27431 else
27432
27433 rm -rf ./conftest* ./*~conftest*
27434 cat >>conftest.ads <<CF_EOF
27435 with Ada.Interrupts.Names;
27436
27437 package ConfTest is
27438
27439    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27440    pragma Unreserve_All_Interrupts;
27441    pragma Warnings (On);
27442
27443    protected Process is
27444       procedure Stop;
27445       function Continue return Boolean;
27446       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27447    private
27448       Done : Boolean := False;
27449    end Process;
27450
27451 end ConfTest;
27452 CF_EOF
27453 cat >>conftest.adb <<CF_EOF
27454 package body ConfTest is
27455    protected body Process is
27456       procedure Stop is
27457       begin
27458          Done := True;
27459       end Stop;
27460       function Continue return Boolean is
27461       begin
27462          return not Done;
27463       end Continue;
27464    end Process;
27465 end ConfTest;
27466 CF_EOF
27467 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27468       cf_cv_gnat_sigint=yes
27469 else
27470    cf_cv_gnat_sigint=no
27471 fi
27472 rm -rf ./conftest* ./*~conftest*
27473
27474 fi
27475 echo "$as_me:27475: result: $cf_cv_gnat_sigint" >&5
27476 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27477
27478 if test "$cf_cv_gnat_sigint" = yes ; then
27479         USE_GNAT_SIGINT=""
27480 else
27481         USE_GNAT_SIGINT="#"
27482 fi
27483
27484 cf_gnat_libraries=no
27485 cf_gnat_projects=no
27486
27487 if test "$enable_gnat_projects" != no ; then
27488 echo "$as_me:27488: checking if GNAT supports project files" >&5
27489 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27490 case "$cf_cv_gnat_version" in
27491 (3.[0-9]*)
27492         ;;
27493 (*)
27494         case "$cf_cv_system_name" in
27495         (cygwin*|msys*)
27496                 ;;
27497         (*)
27498                 rm -rf ./conftest* ./*~conftest*
27499                 if mkdir conftest.src conftest.bin conftest.lib
27500                 then
27501                         cd conftest.src
27502                         rm -rf ./conftest* ./*~conftest*
27503                         cat >>library.gpr <<CF_EOF
27504 project Library is
27505   Kind := External ("LIB_KIND");
27506   for Library_Name use "ConfTest";
27507   for Object_Dir use ".";
27508   for Library_ALI_Dir use External("LIBRARY_DIR");
27509   for Library_Version use External ("SONAME");
27510   for Library_Kind use Kind;
27511   for Library_Dir use External("BUILD_DIR");
27512   Source_Dir := External ("SOURCE_DIR");
27513   for Source_Dirs use (Source_Dir);
27514 end Library;
27515 CF_EOF
27516                         cat >>confpackage.ads <<CF_EOF
27517 package ConfPackage is
27518    procedure conftest;
27519 end ConfPackage;
27520 CF_EOF
27521                         cat >>confpackage.adb <<CF_EOF
27522 with Text_IO;
27523 package body ConfPackage is
27524    procedure conftest is
27525    begin
27526       Text_IO.Put ("Hello World");
27527       Text_IO.New_Line;
27528    end conftest;
27529 end ConfPackage;
27530 CF_EOF
27531                         if ( "$cf_ada_make" $ADAFLAGS \
27532                                         -Plibrary.gpr \
27533                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27534                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27535                                         -XSOURCE_DIR="`pwd`" \
27536                                         -XSONAME=libConfTest.so.1 \
27537                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27538                                 cf_gnat_projects=yes
27539                         fi
27540                         cd ..
27541                 fi
27542                 if test -f conftest.lib/confpackage.ali
27543                 then
27544                         cf_gnat_libraries=yes
27545                 fi
27546                 rm -rf ./conftest* ./*~conftest*
27547                 ;;
27548         esac
27549         ;;
27550 esac
27551 echo "$as_me:27551: result: $cf_gnat_projects" >&5
27552 echo "${ECHO_T}$cf_gnat_projects" >&6
27553 fi # enable_gnat_projects
27554
27555 if test "$cf_gnat_projects" = yes
27556 then
27557         echo "$as_me:27557: checking if GNAT supports libraries" >&5
27558 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27559         echo "$as_me:27559: result: $cf_gnat_libraries" >&5
27560 echo "${ECHO_T}$cf_gnat_libraries" >&6
27561 fi
27562
27563 USE_OLD_MAKERULES=""
27564 USE_GNAT_PROJECTS="#"
27565 USE_GNAT_MAKE_GPR="#"
27566 USE_GNAT_GPRBUILD="#"
27567
27568 if test "$cf_gnat_projects" = yes
27569 then
27570         USE_OLD_MAKERULES="#"
27571         USE_GNAT_PROJECTS=""
27572         if test "$cf_cv_VERSION_GPRBUILD" != no
27573         then
27574                 USE_GNAT_GPRBUILD=""
27575         elif test "$cf_cv_VERSION_GNATMAKE" != no
27576         then
27577                 USE_GNAT_MAKE_GPR=""
27578         else
27579                 { echo "$as_me:27579: WARNING: use old makefile rules since tools are missing" >&5
27580 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27581         fi
27582 fi
27583
27584 if test "$cf_gnat_libraries" = yes
27585 then
27586         USE_GNAT_LIBRARIES=""
27587 else
27588         USE_GNAT_LIBRARIES="#"
27589 fi
27590
27591 echo "$as_me:27591: checking for ada-compiler" >&5
27592 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27593
27594 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27595 if test "${with_ada_compiler+set}" = set; then
27596   withval="$with_ada_compiler"
27597   cf_ada_compiler=$withval
27598 else
27599   cf_ada_compiler=gnatmake
27600 fi;
27601
27602 echo "$as_me:27602: result: $cf_ada_compiler" >&5
27603 echo "${ECHO_T}$cf_ada_compiler" >&6
27604
27605                         cf_ada_package=terminal_interface
27606
27607 echo "$as_me:27607: checking for ada-include" >&5
27608 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27609
27610 # Check whether --with-ada-include or --without-ada-include was given.
27611 if test "${with_ada_include+set}" = set; then
27612   withval="$with_ada_include"
27613
27614 else
27615   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27616 fi; if test -n "$prefix/share/ada/adainclude" ; then
27617
27618 if test "x$prefix" != xNONE; then
27619         cf_path_syntax="$prefix"
27620 else
27621         cf_path_syntax="$ac_default_prefix"
27622 fi
27623
27624 case ".$withval" in
27625 (.\$\(*\)*|.\'*\'*)
27626         ;;
27627 (..|./*|.\\*)
27628         ;;
27629 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27630         ;;
27631 (.\$\{*prefix\}*|.\$\{*dir\}*)
27632         eval withval="$withval"
27633         case ".$withval" in
27634         (.NONE/*)
27635                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27636                 ;;
27637         esac
27638         ;;
27639 (.no|.NONE/*)
27640         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27641         ;;
27642 (*)
27643         { { echo "$as_me:27643: error: expected a pathname, not \"$withval\"" >&5
27644 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27645    { (exit 1); exit 1; }; }
27646         ;;
27647 esac
27648
27649 fi
27650 eval ADA_INCLUDE="$withval"
27651
27652 echo "$as_me:27652: result: $ADA_INCLUDE" >&5
27653 echo "${ECHO_T}$ADA_INCLUDE" >&6
27654
27655 echo "$as_me:27655: checking for ada-objects" >&5
27656 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27657
27658 # Check whether --with-ada-objects or --without-ada-objects was given.
27659 if test "${with_ada_objects+set}" = set; then
27660   withval="$with_ada_objects"
27661
27662 else
27663   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27664 fi; if test -n "$prefix/lib/ada/adalib" ; then
27665
27666 if test "x$prefix" != xNONE; then
27667         cf_path_syntax="$prefix"
27668 else
27669         cf_path_syntax="$ac_default_prefix"
27670 fi
27671
27672 case ".$withval" in
27673 (.\$\(*\)*|.\'*\'*)
27674         ;;
27675 (..|./*|.\\*)
27676         ;;
27677 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27678         ;;
27679 (.\$\{*prefix\}*|.\$\{*dir\}*)
27680         eval withval="$withval"
27681         case ".$withval" in
27682         (.NONE/*)
27683                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27684                 ;;
27685         esac
27686         ;;
27687 (.no|.NONE/*)
27688         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27689         ;;
27690 (*)
27691         { { echo "$as_me:27691: error: expected a pathname, not \"$withval\"" >&5
27692 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27693    { (exit 1); exit 1; }; }
27694         ;;
27695 esac
27696
27697 fi
27698 eval ADA_OBJECTS="$withval"
27699
27700 echo "$as_me:27700: result: $ADA_OBJECTS" >&5
27701 echo "${ECHO_T}$ADA_OBJECTS" >&6
27702
27703 echo "$as_me:27703: checking if an Ada95 shared-library should be built" >&5
27704 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27705
27706 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27707 if test "${with_ada_sharedlib+set}" = set; then
27708   withval="$with_ada_sharedlib"
27709   with_ada_sharedlib=$withval
27710 else
27711   with_ada_sharedlib=no
27712 fi;
27713 echo "$as_me:27713: result: $with_ada_sharedlib" >&5
27714 echo "${ECHO_T}$with_ada_sharedlib" >&6
27715
27716 if test "x$with_ada_sharedlib" != xno
27717 then
27718         if test "x$cf_gnat_projects" != xyes
27719         then
27720                 { echo "$as_me:27720: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27721 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27722                 with_ada_sharedlib=no
27723         fi
27724 fi
27725
27726 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27727 MAKE_ADA_SHAREDLIB="#"
27728
27729 if test "x$with_ada_sharedlib" != xno
27730 then
27731         MAKE_ADA_SHAREDLIB=
27732         if test "x$with_ada_sharedlib" != xyes
27733         then
27734                 ADA_SHAREDLIB="$with_ada_sharedlib"
27735         fi
27736 fi
27737
27738                         # allow the Ada binding to be renamed
27739
27740 echo "$as_me:27740: checking for ada-libname" >&5
27741 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27742
27743 # Check whether --with-ada-libname or --without-ada-libname was given.
27744 if test "${with_ada_libname+set}" = set; then
27745   withval="$with_ada_libname"
27746   ADA_LIBNAME=$withval
27747 else
27748   ADA_LIBNAME=AdaCurses
27749 fi;
27750 case "x$ADA_LIBNAME" in
27751 (x|xyes|xno)
27752         ADA_LIBNAME=AdaCurses
27753         ;;
27754 esac
27755
27756 echo "$as_me:27756: result: $ADA_LIBNAME" >&5
27757 echo "${ECHO_T}$ADA_LIBNAME" >&6
27758
27759                 fi
27760         fi
27761 else
27762         cf_with_ada=no
27763 fi
27764
27765 # do this "late" to avoid conflict with header-checks
27766 if test "x$with_widec" = xyes ; then
27767         echo "$as_me:27767: checking for wchar_t" >&5
27768 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27769 if test "${ac_cv_type_wchar_t+set}" = set; then
27770   echo $ECHO_N "(cached) $ECHO_C" >&6
27771 else
27772   cat >"conftest.$ac_ext" <<_ACEOF
27773 #line 27773 "configure"
27774 #include "confdefs.h"
27775 $ac_includes_default
27776 int
27777 main (void)
27778 {
27779 if ((wchar_t *) 0)
27780   return 0;
27781 if (sizeof (wchar_t))
27782   return 0;
27783   ;
27784   return 0;
27785 }
27786 _ACEOF
27787 rm -f "conftest.$ac_objext"
27788 if { (eval echo "$as_me:27788: \"$ac_compile\"") >&5
27789   (eval $ac_compile) 2>&5
27790   ac_status=$?
27791   echo "$as_me:27791: \$? = $ac_status" >&5
27792   (exit "$ac_status"); } &&
27793          { ac_try='test -s "conftest.$ac_objext"'
27794   { (eval echo "$as_me:27794: \"$ac_try\"") >&5
27795   (eval $ac_try) 2>&5
27796   ac_status=$?
27797   echo "$as_me:27797: \$? = $ac_status" >&5
27798   (exit "$ac_status"); }; }; then
27799   ac_cv_type_wchar_t=yes
27800 else
27801   echo "$as_me: failed program was:" >&5
27802 cat "conftest.$ac_ext" >&5
27803 ac_cv_type_wchar_t=no
27804 fi
27805 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27806 fi
27807 echo "$as_me:27807: result: $ac_cv_type_wchar_t" >&5
27808 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27809
27810 echo "$as_me:27810: checking size of wchar_t" >&5
27811 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27812 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27813   echo $ECHO_N "(cached) $ECHO_C" >&6
27814 else
27815   if test "$ac_cv_type_wchar_t" = yes; then
27816   if test "$cross_compiling" = yes; then
27817   # Depending upon the size, compute the lo and hi bounds.
27818 cat >"conftest.$ac_ext" <<_ACEOF
27819 #line 27819 "configure"
27820 #include "confdefs.h"
27821 $ac_includes_default
27822 int
27823 main (void)
27824 {
27825 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27826   ;
27827   return 0;
27828 }
27829 _ACEOF
27830 rm -f "conftest.$ac_objext"
27831 if { (eval echo "$as_me:27831: \"$ac_compile\"") >&5
27832   (eval $ac_compile) 2>&5
27833   ac_status=$?
27834   echo "$as_me:27834: \$? = $ac_status" >&5
27835   (exit "$ac_status"); } &&
27836          { ac_try='test -s "conftest.$ac_objext"'
27837   { (eval echo "$as_me:27837: \"$ac_try\"") >&5
27838   (eval $ac_try) 2>&5
27839   ac_status=$?
27840   echo "$as_me:27840: \$? = $ac_status" >&5
27841   (exit "$ac_status"); }; }; then
27842   ac_lo=0 ac_mid=0
27843   while :; do
27844     cat >"conftest.$ac_ext" <<_ACEOF
27845 #line 27845 "configure"
27846 #include "confdefs.h"
27847 $ac_includes_default
27848 int
27849 main (void)
27850 {
27851 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27852   ;
27853   return 0;
27854 }
27855 _ACEOF
27856 rm -f "conftest.$ac_objext"
27857 if { (eval echo "$as_me:27857: \"$ac_compile\"") >&5
27858   (eval $ac_compile) 2>&5
27859   ac_status=$?
27860   echo "$as_me:27860: \$? = $ac_status" >&5
27861   (exit "$ac_status"); } &&
27862          { ac_try='test -s "conftest.$ac_objext"'
27863   { (eval echo "$as_me:27863: \"$ac_try\"") >&5
27864   (eval $ac_try) 2>&5
27865   ac_status=$?
27866   echo "$as_me:27866: \$? = $ac_status" >&5
27867   (exit "$ac_status"); }; }; then
27868   ac_hi=$ac_mid; break
27869 else
27870   echo "$as_me: failed program was:" >&5
27871 cat "conftest.$ac_ext" >&5
27872 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27873 fi
27874 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27875   done
27876 else
27877   echo "$as_me: failed program was:" >&5
27878 cat "conftest.$ac_ext" >&5
27879 ac_hi=-1 ac_mid=-1
27880   while :; do
27881     cat >"conftest.$ac_ext" <<_ACEOF
27882 #line 27882 "configure"
27883 #include "confdefs.h"
27884 $ac_includes_default
27885 int
27886 main (void)
27887 {
27888 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27889   ;
27890   return 0;
27891 }
27892 _ACEOF
27893 rm -f "conftest.$ac_objext"
27894 if { (eval echo "$as_me:27894: \"$ac_compile\"") >&5
27895   (eval $ac_compile) 2>&5
27896   ac_status=$?
27897   echo "$as_me:27897: \$? = $ac_status" >&5
27898   (exit "$ac_status"); } &&
27899          { ac_try='test -s "conftest.$ac_objext"'
27900   { (eval echo "$as_me:27900: \"$ac_try\"") >&5
27901   (eval $ac_try) 2>&5
27902   ac_status=$?
27903   echo "$as_me:27903: \$? = $ac_status" >&5
27904   (exit "$ac_status"); }; }; then
27905   ac_lo=$ac_mid; break
27906 else
27907   echo "$as_me: failed program was:" >&5
27908 cat "conftest.$ac_ext" >&5
27909 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27910 fi
27911 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27912   done
27913 fi
27914 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27915 # Binary search between lo and hi bounds.
27916 while test "x$ac_lo" != "x$ac_hi"; do
27917   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27918   cat >"conftest.$ac_ext" <<_ACEOF
27919 #line 27919 "configure"
27920 #include "confdefs.h"
27921 $ac_includes_default
27922 int
27923 main (void)
27924 {
27925 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27926   ;
27927   return 0;
27928 }
27929 _ACEOF
27930 rm -f "conftest.$ac_objext"
27931 if { (eval echo "$as_me:27931: \"$ac_compile\"") >&5
27932   (eval $ac_compile) 2>&5
27933   ac_status=$?
27934   echo "$as_me:27934: \$? = $ac_status" >&5
27935   (exit "$ac_status"); } &&
27936          { ac_try='test -s "conftest.$ac_objext"'
27937   { (eval echo "$as_me:27937: \"$ac_try\"") >&5
27938   (eval $ac_try) 2>&5
27939   ac_status=$?
27940   echo "$as_me:27940: \$? = $ac_status" >&5
27941   (exit "$ac_status"); }; }; then
27942   ac_hi=$ac_mid
27943 else
27944   echo "$as_me: failed program was:" >&5
27945 cat "conftest.$ac_ext" >&5
27946 ac_lo=`expr "$ac_mid" + 1`
27947 fi
27948 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27949 done
27950 ac_cv_sizeof_wchar_t=$ac_lo
27951 else
27952   if test "$cross_compiling" = yes; then
27953   { { echo "$as_me:27953: error: cannot run test program while cross compiling" >&5
27954 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27955    { (exit 1); exit 1; }; }
27956 else
27957   cat >"conftest.$ac_ext" <<_ACEOF
27958 #line 27958 "configure"
27959 #include "confdefs.h"
27960 $ac_includes_default
27961 int
27962 main (void)
27963 {
27964 FILE *f = fopen ("conftest.val", "w");
27965 if (!f)
27966   $ac_main_return (1);
27967 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
27968 fclose (f);
27969   ;
27970   return 0;
27971 }
27972 _ACEOF
27973 rm -f "conftest$ac_exeext"
27974 if { (eval echo "$as_me:27974: \"$ac_link\"") >&5
27975   (eval $ac_link) 2>&5
27976   ac_status=$?
27977   echo "$as_me:27977: \$? = $ac_status" >&5
27978   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27979   { (eval echo "$as_me:27979: \"$ac_try\"") >&5
27980   (eval $ac_try) 2>&5
27981   ac_status=$?
27982   echo "$as_me:27982: \$? = $ac_status" >&5
27983   (exit "$ac_status"); }; }; then
27984   ac_cv_sizeof_wchar_t=`cat conftest.val`
27985 else
27986   echo "$as_me: program exited with status $ac_status" >&5
27987 echo "$as_me: failed program was:" >&5
27988 cat "conftest.$ac_ext" >&5
27989 fi
27990 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27991 fi
27992 fi
27993 rm -f conftest.val
27994 else
27995   ac_cv_sizeof_wchar_t=0
27996 fi
27997 fi
27998 echo "$as_me:27998: result: $ac_cv_sizeof_wchar_t" >&5
27999 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28000 cat >>confdefs.h <<EOF
28001 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28002 EOF
28003
28004         # cross-compiling to mingw can run into the problem that attempting to
28005         # link with the regex library fails, causing the test to not set this to
28006         # a number.  "recent" autoconf does not address this problem either -TD
28007         if test -z "$ac_cv_sizeof_wchar_t"
28008         then
28009                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28010
28011 echo "${as_me:-configure}:28011: testing test failed (assume 2) ..." 1>&5
28012
28013                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28014                 mv confdefs.tmp confdefs.h
28015                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28016         fi
28017 fi
28018
28019 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28020 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28021 ###
28022 ### ticlib modules may be a separate library, otherwise contained in termlib.
28023 ### termlib modules may be a separate library, otherwise contained in ncurses.
28024 ###
28025 ### The of "+" or " " between the tokens controls the way the script
28026 ### chooses to split module lists into libraries.
28027 ###
28028 ### (see CF_LIB_RULES).
28029 echo "$as_me:28029: checking for library subsets" >&5
28030 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28031 LIB_SUBSETS=
28032
28033 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28034         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28035         if test "$with_ticlib" != no ; then
28036                 LIB_SUBSETS="${LIB_SUBSETS} "
28037         else
28038                 LIB_SUBSETS="${LIB_SUBSETS}+"
28039         fi
28040 fi
28041
28042 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28043 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28044
28045 if test "$with_termlib" != no ; then
28046         LIB_SUBSETS="${LIB_SUBSETS} "
28047 else
28048         LIB_SUBSETS="${LIB_SUBSETS}+"
28049 fi
28050
28051 LIB_SUBSETS="${LIB_SUBSETS}base"
28052
28053 # Most term-driver calls are to tinfo, but some like init_pair are to the
28054 # base library (so it resides in base).
28055 if test "$with_term_driver" != no ; then
28056         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28057         case "$cf_cv_system_name" in
28058         (*mingw32*|*mingw64*)
28059                 if test "x$with_exp_win32" = xyes ; then
28060                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28061                 else
28062                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28063                 fi
28064                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28065                 ;;
28066         (*)
28067                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28068                 ;;
28069         esac
28070 elif test "x$with_exp_win32" = xyes ; then
28071         case "$cf_cv_system_name" in
28072         (*mingw32*|*mingw64*)
28073                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28074                 ;;
28075         (*)
28076                 ;;
28077         esac
28078 fi
28079
28080 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28081 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28082
28083 echo "$as_me:28083: result: $LIB_SUBSETS" >&5
28084 echo "${ECHO_T}$LIB_SUBSETS" >&6
28085
28086 ### Construct the list of include-directories to be generated
28087
28088 if test "$srcdir" != "."; then
28089         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28090 fi
28091 CPPFLAGS="-I../include $CPPFLAGS"
28092 if test "$srcdir" != "."; then
28093         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28094 fi
28095 CPPFLAGS="-I. $CPPFLAGS"
28096
28097 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28098 if test "$srcdir" != "."; then
28099         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28100 fi
28101 if test "$GCC" != yes; then
28102         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28103 elif test "$includedir" != "/usr/include"; then
28104         if test "$includedir" = '${prefix}/include' ; then
28105                 if test x$prefix != x/usr ; then
28106                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28107                 fi
28108         else
28109                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28110         fi
28111 fi
28112
28113 ### Build up pieces for makefile rules
28114 echo "$as_me:28114: checking default library suffix" >&5
28115 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28116
28117         case $DFT_LWR_MODEL in
28118         (libtool) DFT_ARG_SUFFIX=''   ;;
28119         (normal)  DFT_ARG_SUFFIX=''   ;;
28120         (debug)   DFT_ARG_SUFFIX='_g' ;;
28121         (profile) DFT_ARG_SUFFIX='_p' ;;
28122         (shared)  DFT_ARG_SUFFIX=''   ;;
28123         esac
28124         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28125 echo "$as_me:28125: result: $DFT_ARG_SUFFIX" >&5
28126 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28127
28128 echo "$as_me:28128: checking default library-dependency suffix" >&5
28129 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28130
28131         case X$DFT_LWR_MODEL in
28132         (Xlibtool)
28133                 DFT_LIB_SUFFIX='.la'
28134                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28135                 ;;
28136         (Xdebug)
28137                 case "$cf_cv_system_name" in
28138                 (*-msvc*)
28139                         DFT_LIB_SUFFIX='_g.lib'
28140                         ;;
28141                 (*)
28142                         DFT_LIB_SUFFIX='_g.a'
28143                         ;;
28144                 esac
28145                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28146                 ;;
28147         (Xprofile)
28148                 case "$cf_cv_system_name" in
28149                 (*-msvc*)
28150                         DFT_LIB_SUFFIX='_p.lib'
28151                         ;;
28152                 (*)
28153                         DFT_LIB_SUFFIX='_p.a'
28154                         ;;
28155                 esac
28156                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28157                 ;;
28158         (Xshared)
28159                 case "$cf_cv_system_name" in
28160                 (aix[5-7]*)
28161                         DFT_LIB_SUFFIX='.so'
28162                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28163                         ;;
28164                 (*-msvc*)
28165                         DFT_LIB_SUFFIX='.dll'
28166                         DFT_DEP_SUFFIX='.dll.lib'
28167                         ;;
28168                 (cygwin*|msys*|mingw*)
28169                         DFT_LIB_SUFFIX='.dll'
28170                         DFT_DEP_SUFFIX='.dll.a'
28171                         ;;
28172                 (darwin*)
28173                         DFT_LIB_SUFFIX='.dylib'
28174                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28175                         ;;
28176                 (hpux*)
28177                         case "$target" in
28178                         (ia64*)
28179                                 DFT_LIB_SUFFIX='.so'
28180                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28181                                 ;;
28182                         (*)
28183                                 DFT_LIB_SUFFIX='.sl'
28184                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28185                                 ;;
28186                         esac
28187                         ;;
28188                 (*)
28189                         DFT_LIB_SUFFIX='.so'
28190                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28191                         ;;
28192                 esac
28193                 ;;
28194         (*)
28195                 case "$target" in
28196                 (*-msvc*)
28197                         DFT_LIB_SUFFIX='.lib'
28198                         ;;
28199                 (*)
28200                         DFT_LIB_SUFFIX='.a'
28201                         ;;
28202                 esac
28203                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28204                 ;;
28205         esac
28206         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28207         then
28208                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28209                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28210         fi
28211 echo "$as_me:28211: result: $DFT_DEP_SUFFIX" >&5
28212 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28213
28214 echo "$as_me:28214: checking default object directory" >&5
28215 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28216
28217         case $DFT_LWR_MODEL in
28218         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28219         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28220         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28221         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28222         (shared)
28223                 case "$cf_cv_system_name" in
28224                 (cygwin|msys)
28225                         DFT_OBJ_SUBDIR='objects' ;;
28226                 (*)
28227                         DFT_OBJ_SUBDIR='obj_s' ;;
28228                 esac
28229         esac
28230 echo "$as_me:28230: result: $DFT_OBJ_SUBDIR" >&5
28231 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28232
28233 if test "x$cf_with_cxx" = xyes ; then
28234 echo "$as_me:28234: checking c++ library-dependency suffix" >&5
28235 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28236 if test "$with_libtool" != "no"; then
28237         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28238         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28239 elif test "$with_shared_cxx" != "no"; then
28240         # also for g++ users...
28241         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28242 else
28243         # we normally make a static library because C/C++ library rules differ
28244
28245         case Xnormal in
28246         (Xlibtool)
28247                 CXX_LIB_SUFFIX='.la'
28248                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28249                 ;;
28250         (Xdebug)
28251                 case "$cf_cv_system_name" in
28252                 (*-msvc*)
28253                         CXX_LIB_SUFFIX='_g.lib'
28254                         ;;
28255                 (*)
28256                         CXX_LIB_SUFFIX='_g.a'
28257                         ;;
28258                 esac
28259                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28260                 ;;
28261         (Xprofile)
28262                 case "$cf_cv_system_name" in
28263                 (*-msvc*)
28264                         CXX_LIB_SUFFIX='_p.lib'
28265                         ;;
28266                 (*)
28267                         CXX_LIB_SUFFIX='_p.a'
28268                         ;;
28269                 esac
28270                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28271                 ;;
28272         (Xshared)
28273                 case "$cf_cv_system_name" in
28274                 (aix[5-7]*)
28275                         CXX_LIB_SUFFIX='.so'
28276                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28277                         ;;
28278                 (*-msvc*)
28279                         CXX_LIB_SUFFIX='.dll'
28280                         CXX_DEP_SUFFIX='.dll.lib'
28281                         ;;
28282                 (cygwin*|msys*|mingw*)
28283                         CXX_LIB_SUFFIX='.dll'
28284                         CXX_DEP_SUFFIX='.dll.a'
28285                         ;;
28286                 (darwin*)
28287                         CXX_LIB_SUFFIX='.dylib'
28288                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28289                         ;;
28290                 (hpux*)
28291                         case "$target" in
28292                         (ia64*)
28293                                 CXX_LIB_SUFFIX='.so'
28294                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28295                                 ;;
28296                         (*)
28297                                 CXX_LIB_SUFFIX='.sl'
28298                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28299                                 ;;
28300                         esac
28301                         ;;
28302                 (*)
28303                         CXX_LIB_SUFFIX='.so'
28304                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28305                         ;;
28306                 esac
28307                 ;;
28308         (*)
28309                 case "$target" in
28310                 (*-msvc*)
28311                         CXX_LIB_SUFFIX='.lib'
28312                         ;;
28313                 (*)
28314                         CXX_LIB_SUFFIX='.a'
28315                         ;;
28316                 esac
28317                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28318                 ;;
28319         esac
28320         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28321         then
28322                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28323                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28324         fi
28325
28326 fi
28327 echo "$as_me:28327: result: $CXX_LIB_SUFFIX" >&5
28328 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28329
28330 fi
28331
28332 # do not want -ldl in build except as needed for -lncurses dependency
28333 if test "x$with_dlsym" = xyes ; then
28334 if test "$DFT_LWR_MODEL" = shared || \
28335    test "$DFT_LWR_MODEL" = libtool ; then
28336
28337 # remove dl library from $LIBS
28338 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28339
28340 fi
28341 fi
28342 ### Set up low-level terminfo dependencies for makefiles.
28343
28344 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28345 # do not need libdl
28346 TICS_LIST=
28347 if test "x$with_dlsym" = xyes ; then
28348
28349 # remove dl library from $SHLIB_LIST
28350 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28351
28352 fi
28353
28354 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28355 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28356 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28357 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28358 then
28359         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28360 fi
28361
28362 if test "$with_ticlib" != no ; then
28363
28364         if test "x$with_ticlib" != xyes ; then
28365                 TICS_NAME=$with_ticlib
28366                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28367                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28368                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28369                 TICS_LIB_SUFFIX="${with_ticlib}"
28370         else
28371                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28372                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28373                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28374                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28375         fi
28376         TICS_LDFLAGS="-L${LIB_DIR}"
28377         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28378 else
28379         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28380         TICS_LDFLAGS="-L${LIB_DIR}"
28381         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28382 fi
28383
28384 if test "$with_termlib" != no ; then
28385
28386         if test "x$with_termlib" != xyes ; then
28387                 TINFO_NAME=$with_termlib
28388                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28389                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28390                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28391                 TINFO_LIB_SUFFIX="${with_termlib}"
28392         else
28393                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28394                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28395                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28396                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28397         fi
28398
28399         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28400         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28401         if test "$DFT_LWR_MODEL" = "libtool"; then
28402                 TEST_ARGS="${TEST_DEPS}"
28403                 TEST_ARG2="${TEST_DEP2}"
28404                 TINFO_LDFLAGS="-L${LIB_DIR}"
28405                 TINFO_LIBS="$TEST_ARGS"
28406                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28407                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28408         else
28409                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28410                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28411                 if test "x$with_term_driver" != xno ; then
28412                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28413                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28414                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28415                 else
28416                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28417                         TINFO_LIBS="$TEST_ARGS"
28418                 fi
28419                 TINFO_LDFLAGS="-L${LIB_DIR}"
28420                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28421         fi
28422 else
28423         # the next lines are needed for linking libtic over libncurses
28424         TINFO_NAME=${LIB_NAME}
28425         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28426         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28427         if test "x$with_tic_depends" = xyes ; then
28428                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28429         else
28430                 TICS_LIST="$SHLIB_LIST"
28431         fi
28432
28433         TINFO_LDFLAGS="-L${LIB_DIR}"
28434         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28435 fi
28436
28437 if test "$DFT_LWR_MODEL" = shared ; then
28438         case "$cf_cv_system_name" in
28439         (cygwin*|msys*)
28440                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28441                 TINFO_SUFFIX=.dll
28442                 ;;
28443         esac
28444 fi
28445
28446 if test "x$with_dlsym" = xyes ; then
28447
28448 # remove dl library from $TICS_LIST
28449 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28450
28451 fi
28452
28453 if test "$DFT_LWR_MODEL" = "libtool"; then
28454         OBJEXT=lo
28455 fi
28456
28457 # needed for Ada95
28458 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28459
28460 case "$DFT_LWR_MODEL" in
28461 (normal|debug|profile)
28462
28463 if test "$GCC" = yes ; then
28464         case "$cf_cv_system_name" in
28465         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28466                 LDFLAGS_STATIC=
28467                 LDFLAGS_SHARED=
28468                 ;;
28469         (*)     # normally, except when broken
28470                 LDFLAGS_STATIC=-static
28471                 LDFLAGS_SHARED=-dynamic
28472                 ;;
28473         esac
28474 else
28475         case "$cf_cv_system_name" in
28476         (aix[4-7]*)     # from ld manpage
28477                 LDFLAGS_STATIC=-bstatic
28478                 LDFLAGS_SHARED=-bdynamic
28479                 ;;
28480         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28481                 # We could also use just "archive" and "shared".
28482                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28483                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28484                 ;;
28485         (irix*)         # from ld manpage IRIX64
28486                 LDFLAGS_STATIC=-Bstatic
28487                 LDFLAGS_SHARED=-Bdynamic
28488                 ;;
28489         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28490                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28491                 LDFLAGS_STATIC=-noso
28492                 LDFLAGS_SHARED=-so_archive
28493                 ;;
28494         (solaris2*)
28495                 LDFLAGS_STATIC=-Bstatic
28496                 LDFLAGS_SHARED=-Bdynamic
28497                 ;;
28498         esac
28499 fi
28500
28501 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28502 then
28503         echo "$as_me:28503: checking if linker supports switching between static/dynamic" >&5
28504 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28505
28506         rm -f libconftest.a
28507         cat >conftest.$ac_ext <<EOF
28508 #line 28508 "configure"
28509 #include <stdio.h>
28510 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28511 EOF
28512         if { (eval echo "$as_me:28512: \"$ac_compile\"") >&5
28513   (eval $ac_compile) 2>&5
28514   ac_status=$?
28515   echo "$as_me:28515: \$? = $ac_status" >&5
28516   (exit "$ac_status"); } ; then
28517                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28518                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28519         fi
28520         rm -f conftest.*
28521
28522         cf_save_LIBS="$LIBS"
28523
28524         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28525         cat >"conftest.$ac_ext" <<_ACEOF
28526 #line 28526 "configure"
28527 #include "confdefs.h"
28528
28529 #line 28529 "configure"
28530 #include <stdio.h>
28531 int cf_ldflags_static(FILE *fp);
28532
28533 int
28534 main (void)
28535 {
28536
28537         return cf_ldflags_static(stdin);
28538
28539   ;
28540   return 0;
28541 }
28542 _ACEOF
28543 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28544 if { (eval echo "$as_me:28544: \"$ac_link\"") >&5
28545   (eval $ac_link) 2>&5
28546   ac_status=$?
28547   echo "$as_me:28547: \$? = $ac_status" >&5
28548   (exit "$ac_status"); } &&
28549          { ac_try='test -s "conftest$ac_exeext"'
28550   { (eval echo "$as_me:28550: \"$ac_try\"") >&5
28551   (eval $ac_try) 2>&5
28552   ac_status=$?
28553   echo "$as_me:28553: \$? = $ac_status" >&5
28554   (exit "$ac_status"); }; }; then
28555
28556         # some linkers simply ignore the -dynamic
28557         case x`file "conftest$ac_exeext" 2>/dev/null` in
28558         (*static*)
28559                 cf_ldflags_static=no
28560                 ;;
28561         (*)
28562                 cf_ldflags_static=yes
28563                 ;;
28564         esac
28565
28566 else
28567   echo "$as_me: failed program was:" >&5
28568 cat "conftest.$ac_ext" >&5
28569 cf_ldflags_static=no
28570 fi
28571 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28572
28573         rm -f libconftest.*
28574         LIBS="$cf_save_LIBS"
28575
28576         echo "$as_me:28576: result: $cf_ldflags_static" >&5
28577 echo "${ECHO_T}$cf_ldflags_static" >&6
28578
28579         if test "$cf_ldflags_static" != yes
28580         then
28581                 LDFLAGS_STATIC=
28582                 LDFLAGS_SHARED=
28583         fi
28584 else
28585         LDFLAGS_STATIC=
28586         LDFLAGS_SHARED=
28587 fi
28588
28589         ;;
28590 esac
28591
28592 echo "$as_me:28592: checking where we will install curses.h" >&5
28593 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28594
28595 includesubdir=
28596 if test "$with_overwrite" = no && \
28597  { test "x$includedir" = 'x${prefix}/include' || \
28598    test "x$includedir" = "x${prefix}/include"; }
28599 then
28600         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28601 fi
28602 echo "$as_me:28602: result: ${includedir}${includesubdir}" >&5
28603 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28604
28605 ### Resolve a conflict between normal and wide-curses by forcing applications
28606 ### that will need libutf8 to add it to their configure script.
28607 if test "$with_overwrite" != no ; then
28608 if test "$NCURSES_LIBUTF8" = 1 ; then
28609         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28610         { echo "$as_me:28610: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28611 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28612 fi
28613 fi
28614 WITH_OVERWRITE=$with_overwrite
28615
28616 ### At least on MinGW a shared library build without libtool
28617 ### requires adding the additional libs to the link list.
28618 case "$cf_cv_system_name" in
28619 (*mingw32*|*mingw64*)
28620         if test "$DFT_LWR_MODEL" != "libtool"; then
28621            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28622         fi
28623         ;;
28624 *)      ;;
28625 esac
28626
28627 # used to separate tack out of the tree
28628 NCURSES_TREE=
28629
28630 ### predefined stuff for the test programs
28631
28632 cat >>confdefs.h <<\EOF
28633 #define HAVE_SLK_COLOR 1
28634 EOF
28635
28636 # pkgsrc uses these
28637
28638 echo "$as_me:28638: checking for desired basename for form library" >&5
28639 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28640
28641 # Check whether --with-form-libname or --without-form-libname was given.
28642 if test "${with_form_libname+set}" = set; then
28643   withval="$with_form_libname"
28644   with_lib_basename=$withval
28645 else
28646   with_lib_basename=form
28647 fi;
28648 FORM_NAME="$with_lib_basename"
28649
28650 case "x$FORM_NAME" in
28651 (x|xno|xnone|xyes)
28652         FORM_NAME=form
28653         ;;
28654 (*)
28655         ;;
28656 esac
28657
28658 echo "$as_me:28658: result: $FORM_NAME" >&5
28659 echo "${ECHO_T}$FORM_NAME" >&6
28660
28661 echo "$as_me:28661: checking for desired basename for menu library" >&5
28662 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28663
28664 # Check whether --with-menu-libname or --without-menu-libname was given.
28665 if test "${with_menu_libname+set}" = set; then
28666   withval="$with_menu_libname"
28667   with_lib_basename=$withval
28668 else
28669   with_lib_basename=menu
28670 fi;
28671 MENU_NAME="$with_lib_basename"
28672
28673 case "x$MENU_NAME" in
28674 (x|xno|xnone|xyes)
28675         MENU_NAME=menu
28676         ;;
28677 (*)
28678         ;;
28679 esac
28680
28681 echo "$as_me:28681: result: $MENU_NAME" >&5
28682 echo "${ECHO_T}$MENU_NAME" >&6
28683
28684 echo "$as_me:28684: checking for desired basename for panel library" >&5
28685 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28686
28687 # Check whether --with-panel-libname or --without-panel-libname was given.
28688 if test "${with_panel_libname+set}" = set; then
28689   withval="$with_panel_libname"
28690   with_lib_basename=$withval
28691 else
28692   with_lib_basename=panel
28693 fi;
28694 PANEL_NAME="$with_lib_basename"
28695
28696 case "x$PANEL_NAME" in
28697 (x|xno|xnone|xyes)
28698         PANEL_NAME=panel
28699         ;;
28700 (*)
28701         ;;
28702 esac
28703
28704 echo "$as_me:28704: result: $PANEL_NAME" >&5
28705 echo "${ECHO_T}$PANEL_NAME" >&6
28706
28707 echo "$as_me:28707: checking for desired basename for cxx library" >&5
28708 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28709
28710 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28711 if test "${with_cxx_libname+set}" = set; then
28712   withval="$with_cxx_libname"
28713   with_lib_basename=$withval
28714 else
28715   with_lib_basename=ncurses++
28716 fi;
28717 CXX_NAME="$with_lib_basename"
28718
28719 case "x$CXX_NAME" in
28720 (x|xno|xnone|xyes)
28721         CXX_NAME=ncurses++
28722         ;;
28723 (*)
28724         ;;
28725 esac
28726
28727 echo "$as_me:28727: result: $CXX_NAME" >&5
28728 echo "${ECHO_T}$CXX_NAME" >&6
28729
28730 ### Construct the list of subdirectories for which we'll customize makefiles
28731 ### with the appropriate compile-rules.
28732
28733 echo "$as_me:28733: checking for src modules" >&5
28734 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28735
28736 # dependencies and linker-arguments for test-programs
28737 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28738 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28739 if test "$DFT_LWR_MODEL" = "libtool"; then
28740         TEST_ARGS="${TEST_DEPS}"
28741         TEST_ARG2="${TEST_DEP2}"
28742 else
28743         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28744         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28745 fi
28746
28747 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28748 cf_cv_src_modules=
28749 for cf_dir in $modules_to_build
28750 do
28751         if test -f "$srcdir/$cf_dir/modules" ; then
28752
28753                 # We may/may not have tack in the distribution, though the
28754                 # makefile is.
28755                 if test "$cf_dir" = tack ; then
28756                         if test "x$cf_with_tack" != "xyes"; then
28757                                 continue
28758                         fi
28759                 fi
28760
28761                 if test -z "$cf_cv_src_modules"; then
28762                         cf_cv_src_modules=$cf_dir
28763                 else
28764                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28765                 fi
28766
28767                 # Make the ncurses_cfg.h file record the library interface files as
28768                 # well.  These are header files that are the same name as their
28769                 # directory.  Ncurses is the only library that does not follow
28770                 # that pattern.
28771                 if test "$cf_dir" = tack ; then
28772                         continue
28773                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28774
28775 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28776
28777                         cat >>confdefs.h <<EOF
28778 #define HAVE_${cf_have_include}_H 1
28779 EOF
28780
28781                         cat >>confdefs.h <<EOF
28782 #define HAVE_LIB${cf_have_include} 1
28783 EOF
28784
28785 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28786
28787 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28788
28789                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28790                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28791                         if test "$DFT_LWR_MODEL" = "libtool"; then
28792                                 TEST_ARGS="${TEST_DEPS}"
28793                                 TEST_ARG2="${TEST_DEP2}"
28794                         else
28795                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28796                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28797                         fi
28798                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28799                 fi
28800         fi
28801 done
28802 echo "$as_me:28802: result: $cf_cv_src_modules" >&5
28803 echo "${ECHO_T}$cf_cv_src_modules" >&6
28804
28805 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28806 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28807
28808 SRC_SUBDIRS=
28809 if test "x$cf_with_manpages" != xno ; then
28810         SRC_SUBDIRS="$SRC_SUBDIRS man"
28811 fi
28812 SRC_SUBDIRS="$SRC_SUBDIRS include"
28813 for cf_dir in $cf_cv_src_modules
28814 do
28815         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28816 done
28817 if test "x$cf_with_tests" != "xno" ; then
28818         SRC_SUBDIRS="$SRC_SUBDIRS test"
28819 fi
28820 # always make this, to install the ncurses-config script
28821 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28822 if test "$cf_with_cxx_binding" != no; then
28823         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28824         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28825 fi
28826
28827 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28828 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28829
28830 ADA_SUBDIRS=
28831 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28832         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28833         ADA_SUBDIRS="gen src"
28834         if test "x$cf_with_tests" != "xno" ; then
28835                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28836         fi
28837 fi
28838
28839 SUB_MAKEFILES=
28840 for cf_dir in $SRC_SUBDIRS
28841 do
28842         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28843 done
28844
28845 if test -n "$ADA_SUBDIRS"; then
28846         for cf_dir in $ADA_SUBDIRS
28847         do
28848                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28849         done
28850
28851 fi
28852
28853 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28854    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28855    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28856    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28857 fi
28858
28859 DIRS_TO_MAKE="lib"
28860 for cf_item in $cf_list_models
28861 do
28862
28863         case $cf_item in
28864         (libtool) cf_subdir='obj_lo'  ;;
28865         (normal)  cf_subdir='objects' ;;
28866         (debug)   cf_subdir='obj_g' ;;
28867         (profile) cf_subdir='obj_p' ;;
28868         (shared)
28869                 case "$cf_cv_system_name" in
28870                 (cygwin|msys)
28871                         cf_subdir='objects' ;;
28872                 (*)
28873                         cf_subdir='obj_s' ;;
28874                 esac
28875         esac
28876
28877         for cf_item2 in $DIRS_TO_MAKE
28878         do
28879                 test "$cf_item2" = "$cf_subdir" && break
28880         done
28881         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28882 done
28883 for cf_dir in $DIRS_TO_MAKE
28884 do
28885         test ! -d "$cf_dir" && mkdir "$cf_dir"
28886 done
28887
28888 # symbols that differ when compiling Ada95 by itself.
28889 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28890
28891 # values to use as strings
28892
28893 cat >>confdefs.h <<EOF
28894 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28895 EOF
28896
28897 cat >>confdefs.h <<EOF
28898 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28899 EOF
28900
28901 ### Define substitutions for header files to avoid name-pollution
28902
28903 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28904         HAVE_TCGETATTR=1
28905 else
28906         HAVE_TCGETATTR=0
28907 fi
28908
28909 if test "x$ac_cv_header_stdint_h" = xyes ; then
28910         HAVE_STDINT_H=1
28911 else
28912         HAVE_STDINT_H=0
28913 fi
28914
28915 if test "x$ac_cv_header_termio_h" = xyes ; then
28916         HAVE_TERMIO_H=1
28917 else
28918         HAVE_TERMIO_H=0
28919 fi
28920
28921 if test "x$ac_cv_header_termios_h" = xyes ; then
28922         HAVE_TERMIOS_H=1
28923 else
28924         HAVE_TERMIOS_H=0
28925 fi
28926
28927 ################################################################################
28928 test "x$use_database" = xyes && \
28929 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28930
28931 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28932 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28933
28934 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28935 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28936 fi
28937
28938 if test "x$cf_with_tests" != xno ; then
28939         MAKE_TESTS=
28940 else
28941         MAKE_TESTS="#"
28942 fi
28943
28944 ADAHTML_DIR=../../doc/html/ada
28945
28946 # workaround for OS/2 (20151017)
28947 case "$cf_cv_system_name" in
28948 (os2*)
28949         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28950         ;;
28951 (*)
28952         LIBTOOL_OPTS_CXX=
28953         ;;
28954 esac
28955
28956 # workaround for g++ versus Solaris (20131116)
28957 case "$cf_cv_system_name" in
28958 (solaris2*)
28959         case "x$CPPFLAGS" in
28960         (*-D_XOPEN_SOURCE_EXTENDED*)
28961                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28962
28963 echo "${as_me:-configure}:28963: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28964
28965                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28966                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28967                 ;;
28968         esac
28969         ;;
28970 esac
28971
28972 # Help to automatically enable the extended curses features when using either
28973 # the *-config or the ".pc" files by adding defines.
28974 echo "$as_me:28974: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28975 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28976 PKG_CFLAGS=
28977 for cf_loop1 in $CPPFLAGS_after_XOPEN
28978 do
28979         cf_found=no
28980         for cf_loop2 in $CPPFLAGS_before_XOPEN
28981         do
28982                 if test "x$cf_loop1" = "x$cf_loop2"
28983                 then
28984                         cf_found=yes
28985                         break
28986                 fi
28987         done
28988         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28989 done
28990 echo "$as_me:28990: result: $PKG_CFLAGS" >&5
28991 echo "${ECHO_T}$PKG_CFLAGS" >&6
28992
28993 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28994 case "x$NCURSES_OSPEED" in
28995 (*short*)
28996         cf_compatible=1
28997         ;;
28998 (*)
28999         cf_compatible=0
29000         ;;
29001 esac
29002
29003 cat >>confdefs.h <<EOF
29004 #define NCURSES_OSPEED_COMPAT $cf_compatible
29005 EOF
29006
29007 case "x$cf_cv_typeof_chtype" in
29008 (xshort|xint|xlong)
29009         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29010         ;;
29011 esac
29012
29013 case "x$cf_cv_typeof_mmask_t" in
29014 (xshort|xint|xlong)
29015         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29016         ;;
29017 esac
29018
29019 # substitute into misc/Makefile to suppress
29020 # (un)install.data from the
29021 # (un)install rules.
29022 if test "x$cf_with_db_install" = "xno"; then
29023         MISC_INSTALL_DATA=
29024         MISC_UNINSTALL_DATA=
29025 else
29026         MISC_INSTALL_DATA=install.data
29027         MISC_UNINSTALL_DATA=uninstall.data
29028 fi
29029
29030 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29031         MAKE_DATABASE="#"
29032 else
29033         MAKE_DATABASE="$MAKE_TERMINFO"
29034 fi
29035
29036 if test -n "$PACKAGE"
29037 then
29038         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29039         export PACKAGE
29040         echo "package: $PACKAGE"
29041 fi
29042
29043 UNALTERED_SYMS=
29044 cf_filter_syms=no
29045
29046 if test -n "$RESULTING_SYMS"
29047 then
29048         cf_filter_syms=$cf_dft_filter_syms
29049         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
29050
29051 echo "${as_me:-configure}:29051: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
29052
29053 fi
29054
29055 if test "x$WILDCARD_SYMS" = xno
29056 then
29057         cf_filter_syms=yes
29058 fi
29059
29060 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29061
29062 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29063 if test "$cf_filter_syms" = yes
29064 then
29065         RESULTING_SYMS=resulting.map
29066 fi
29067
29068 if test "x$cross_compiling" = xyes ; then
29069         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29070         CHECK_BUILD="#"
29071 else
29072         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29073         CHECK_BUILD=
29074 fi
29075
29076 # This is used for the *-config script and *.pc data files.
29077
29078 echo "$as_me:29078: checking for linker search path" >&5
29079 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29080 if test "${cf_cv_ld_searchpath+set}" = set; then
29081   echo $ECHO_N "(cached) $ECHO_C" >&6
29082 else
29083
29084 if test "$cross_compiling" != yes ; then
29085
29086 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29087 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29088
29089 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29090 # update the cache, which makes it run faster.
29091 test -z "$cf_pathlist" && \
29092         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29093
29094 test -z "$cf_pathlist" &&
29095         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29096
29097 # This works with OpenBSD 6.5, which lists only filenames
29098 test -z "$cf_pathlist" &&
29099         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29100
29101 if test -z "$cf_pathlist"
29102 then
29103         # dyld default path with MacOS
29104         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29105         then
29106                 # do this to bypass check
29107                 cf_cv_ld_searchpath='$HOME/lib'
29108                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29109         fi
29110 fi
29111
29112 if test -z "$cf_pathlist"
29113 then
29114         # Solaris is "SunOS"
29115         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29116         then
29117                 case x`(isainfo -b)` in
29118                 (x64)
29119                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29120                         ;;
29121                 (x32)
29122                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29123                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29124                         ;;
29125                 (*)
29126                         { echo "$as_me:29126: WARNING: problem with Solaris architecture" >&5
29127 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29128                         ;;
29129                 esac
29130         fi
29131 fi
29132
29133 if test -z "$cf_pathlist"
29134 then
29135         # HP-UX
29136         if test x"`uname -s`" = xHP-UX
29137         then
29138                 case x`getconf LONG_BIT` in
29139                 (x64)
29140                         cf_pathlist="/usr/lib/hpux64"
29141                         ;;
29142                 (x*)
29143                         cf_pathlist="/usr/lib/hpux32"
29144                         ;;
29145                 esac
29146         fi
29147 fi
29148
29149 fi
29150
29151 # If nothing else, assume it is conventional
29152 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29153
29154 # Finally, check that this is only directories
29155 for cf_path in $0 $cf_pathlist
29156 do
29157         if test -d "$cf_path"; then
29158                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29159                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29160         fi
29161 done
29162
29163 # Ensure that it is nonempty
29164 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29165
29166 fi
29167 echo "$as_me:29167: result: $cf_cv_ld_searchpath" >&5
29168 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29169
29170 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29171
29172 cat >>confdefs.h <<\EOF
29173 #define HAVE_CURSES_DATA_BOOLNAMES 1
29174 EOF
29175
29176 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
29177 ac_config_commands="$ac_config_commands default"
29178 cat >confcache <<\_ACEOF
29179 # This file is a shell script that caches the results of configure
29180 # tests run on this system so they can be shared between configure
29181 # scripts and configure runs, see configure's option --config-cache.
29182 # It is not useful on other systems.  If it contains results you don't
29183 # want to keep, you may remove or edit it.
29184 #
29185 # config.status only pays attention to the cache file if you give it
29186 # the --recheck option to rerun configure.
29187 #
29188 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29189 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29190 # following values.
29191
29192 _ACEOF
29193
29194 # The following way of writing the cache mishandles newlines in values,
29195 # but we know of no workaround that is simple, portable, and efficient.
29196 # So, don't put newlines in cache variables' values.
29197 # Ultrix sh set writes to stderr and can't be redirected directly,
29198 # and sets the high bit in the cache file unless we assign to the vars.
29199 {
29200   (set) 2>&1 |
29201     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29202     *ac_space=\ *)
29203       # `set' does not quote correctly, so add quotes (double-quote
29204       # substitution turns \\\\ into \\, and sed turns \\ into \).
29205       sed -n \
29206         "s/'/'\\\\''/g;
29207           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29208       ;;
29209     *)
29210       # `set' quotes correctly as required by POSIX, so do not add quotes.
29211       sed -n \
29212         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29213       ;;
29214     esac;
29215 } |
29216   sed '
29217      t clear
29218      : clear
29219      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29220      t end
29221      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29222      : end' >>confcache
29223 if cmp -s $cache_file confcache; then :; else
29224   if test -w $cache_file; then
29225     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29226     cat confcache >$cache_file
29227   else
29228     echo "not updating unwritable cache $cache_file"
29229   fi
29230 fi
29231 rm -f confcache
29232
29233 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29234 # Let make expand exec_prefix.
29235 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29236
29237 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29238 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29239 # trailing colons and then remove the whole line if VPATH becomes empty
29240 # (actually we leave an empty line to preserve line numbers).
29241 if test "x$srcdir" = x.; then
29242   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29243 s/:*\$(srcdir):*/:/;
29244 s/:*\${srcdir}:*/:/;
29245 s/:*@srcdir@:*/:/;
29246 s/^\([^=]*=[    ]*\):*/\1/;
29247 s/:*$//;
29248 s/^[^=]*=[      ]*$//;
29249 }'
29250 fi
29251
29252 DEFS=-DHAVE_CONFIG_H
29253
29254 : "${CONFIG_STATUS=./config.status}"
29255 ac_clean_files_save=$ac_clean_files
29256 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29257 { echo "$as_me:29257: creating $CONFIG_STATUS" >&5
29258 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29259 cat >"$CONFIG_STATUS" <<_ACEOF
29260 #! $SHELL
29261 # Generated automatically by configure.
29262 # Run this file to recreate the current configuration.
29263 # Compiler output produced by configure, useful for debugging
29264 # configure, is in config.log if it exists.
29265
29266 debug=false
29267 SHELL=\${CONFIG_SHELL-$SHELL}
29268 ac_cs_invocation="\$0 \$@"
29269
29270 CLICOLOR_FORCE= GREP_OPTIONS=
29271 unset CLICOLOR_FORCE GREP_OPTIONS
29272 _ACEOF
29273
29274 cat >>"$CONFIG_STATUS" <<\_ACEOF
29275 # Be Bourne compatible
29276 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29277   emulate sh
29278   NULLCMD=:
29279 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29280   set -o posix
29281 fi
29282
29283 # Name of the executable.
29284 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29285
29286 if expr a : '\(a\)' >/dev/null 2>&1; then
29287   as_expr=expr
29288 else
29289   as_expr=false
29290 fi
29291
29292 rm -f conf$$ conf$$.exe conf$$.file
29293 echo >conf$$.file
29294 if ln -s conf$$.file conf$$ 2>/dev/null; then
29295   # We could just check for DJGPP; but this test a) works b) is more generic
29296   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29297   if test -f conf$$.exe; then
29298     # Don't use ln at all; we don't have any links
29299     as_ln_s='cp -p'
29300   else
29301     as_ln_s='ln -s'
29302   fi
29303 elif ln conf$$.file conf$$ 2>/dev/null; then
29304   as_ln_s=ln
29305 else
29306   as_ln_s='cp -p'
29307 fi
29308 rm -f conf$$ conf$$.exe conf$$.file
29309
29310 as_executable_p="test -f"
29311
29312 # Support unset when possible.
29313 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29314   as_unset="unset"
29315 else
29316   as_unset="false"
29317 fi
29318
29319 # NLS nuisances.
29320 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29321 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29322 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29323 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29324 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29325 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29326 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29327 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29328
29329 # IFS
29330 # We need space, tab and new line, in precisely that order.
29331 as_nl='
29332 '
29333 IFS="   $as_nl"
29334
29335 # CDPATH.
29336 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29337
29338 exec 6>&1
29339
29340 _ACEOF
29341
29342 # Files that config.status was made for.
29343 if test -n "$ac_config_files"; then
29344   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29345 fi
29346
29347 if test -n "$ac_config_headers"; then
29348   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29349 fi
29350
29351 if test -n "$ac_config_links"; then
29352   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29353 fi
29354
29355 if test -n "$ac_config_commands"; then
29356   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29357 fi
29358
29359 cat >>"$CONFIG_STATUS" <<\EOF
29360
29361 ac_cs_usage="\
29362 \`$as_me' instantiates files from templates according to the
29363 current configuration.
29364
29365 Usage: $0 [OPTIONS] [FILE]...
29366
29367   -h, --help       print this help, then exit
29368   -V, --version    print version number, then exit
29369   -d, --debug      don't remove temporary files
29370       --recheck    update $as_me by reconfiguring in the same conditions
29371   --file=FILE[:TEMPLATE]
29372                    instantiate the configuration file FILE
29373   --header=FILE[:TEMPLATE]
29374                    instantiate the configuration header FILE
29375
29376 Configuration files:
29377 $config_files
29378
29379 Configuration headers:
29380 $config_headers
29381
29382 Configuration commands:
29383 $config_commands
29384
29385 Report bugs to <dickey@invisible-island.net>."
29386 EOF
29387
29388 cat >>"$CONFIG_STATUS" <<EOF
29389 ac_cs_version="\\
29390 config.status
29391 configured by $0, generated by GNU Autoconf 2.52.20210509,
29392   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29393
29394 Copyright 2003-2020,2021        Thomas E. Dickey
29395 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29396 Free Software Foundation, Inc.
29397 This config.status script is free software; the Free Software Foundation
29398 gives unlimited permission to copy, distribute and modify it."
29399 srcdir="$srcdir"
29400 INSTALL="$INSTALL"
29401 EOF
29402
29403 cat >>"$CONFIG_STATUS" <<\EOF
29404 # If no file are specified by the user, then we need to provide default
29405 # value.  By we need to know if files were specified by the user.
29406 ac_need_defaults=:
29407 while test $# != 0
29408 do
29409   case $1 in
29410   --*=*)
29411     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29412     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29413     shift
29414     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29415     shift
29416     ;;
29417   -*);;
29418   *) # This is not an option, so the user has probably given explicit
29419      # arguments.
29420      ac_need_defaults=false;;
29421   esac
29422
29423   case $1 in
29424   # Handling of the options.
29425 EOF
29426 cat >>"$CONFIG_STATUS" <<EOF
29427   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29428     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29429     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29430 EOF
29431 cat >>"$CONFIG_STATUS" <<\EOF
29432   --version | --vers* | -V )
29433     echo "$ac_cs_version"; exit 0 ;;
29434   --he | --h)
29435     # Conflict between --help and --header
29436     { { echo "$as_me:29436: error: ambiguous option: $1
29437 Try \`$0 --help' for more information." >&5
29438 echo "$as_me: error: ambiguous option: $1
29439 Try \`$0 --help' for more information." >&2;}
29440    { (exit 1); exit 1; }; };;
29441   --help | --hel | -h )
29442     echo "$ac_cs_usage"; exit 0 ;;
29443   --debug | --d* | -d )
29444     debug=: ;;
29445   --file | --fil | --fi | --f )
29446     shift
29447     CONFIG_FILES="$CONFIG_FILES $1"
29448     ac_need_defaults=false;;
29449   --header | --heade | --head | --hea )
29450     shift
29451     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29452     ac_need_defaults=false;;
29453
29454   # This is an error.
29455   -*) { { echo "$as_me:29455: error: unrecognized option: $1
29456 Try \`$0 --help' for more information." >&5
29457 echo "$as_me: error: unrecognized option: $1
29458 Try \`$0 --help' for more information." >&2;}
29459    { (exit 1); exit 1; }; } ;;
29460
29461   *) ac_config_targets="$ac_config_targets $1" ;;
29462
29463   esac
29464   shift
29465 done
29466
29467 exec 5>>config.log
29468 cat >&5 << _ACEOF
29469
29470 ## ----------------------- ##
29471 ## Running config.status.  ##
29472 ## ----------------------- ##
29473
29474 This file was extended by $as_me 2.52.20210509, executed with
29475   CONFIG_FILES    = $CONFIG_FILES
29476   CONFIG_HEADERS  = $CONFIG_HEADERS
29477   CONFIG_LINKS    = $CONFIG_LINKS
29478   CONFIG_COMMANDS = $CONFIG_COMMANDS
29479   > "$ac_cs_invocation"
29480 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29481
29482 _ACEOF
29483 EOF
29484
29485 cat >>"$CONFIG_STATUS" <<EOF
29486 #
29487 # INIT-COMMANDS section.
29488 #
29489
29490 ### Special initialization commands, used to pass information from the
29491 ### configuration-run into config.status
29492
29493 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29494 AWK="$AWK"
29495 CXX_NAME="$CXX_NAME"
29496 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29497 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29498 ECHO_LD="$ECHO_LD"
29499 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29500 FORM_NAME="$FORM_NAME"
29501 LDCONFIG="$LDCONFIG"
29502 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29503 LIB_NAME="$LIB_NAME"
29504 LIB_PREFIX="$LIB_PREFIX"
29505 LIB_SUBSETS="$LIB_SUBSETS"
29506 LIB_SUFFIX="$LIB_SUFFIX"
29507 LIB_TRACING="$LIB_TRACING"
29508 LN_S="$LN_S"
29509 MAKE_TERMINFO="$MAKE_TERMINFO"
29510 MENU_NAME="$MENU_NAME"
29511 NCURSES_MAJOR="$NCURSES_MAJOR"
29512 NCURSES_MINOR="$NCURSES_MINOR"
29513 NCURSES_OSPEED="$NCURSES_OSPEED"
29514 NCURSES_PATCH="$NCURSES_PATCH"
29515 PANEL_NAME="$PANEL_NAME"
29516 SRC_SUBDIRS="$SRC_SUBDIRS"
29517 TERMINFO="$TERMINFO"
29518 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29519 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29520 TICS_NAME="$TICS_NAME"
29521 TICS_SUFFIX="$TICS_SUFFIX"
29522 TIC_PATH="$TIC_PATH"
29523 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29524 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29525 TINFO_NAME="$TINFO_NAME"
29526 TINFO_SUFFIX="$TINFO_SUFFIX"
29527 UNALTERED_SYMS="$UNALTERED_SYMS"
29528 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29529 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29530 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29531 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29532 WILDCARD_SYMS="$WILDCARD_SYMS"
29533 WITH_CURSES_H="$with_curses_h"
29534 WITH_ECHO="${enable_echo:=yes}"
29535 WITH_OVERWRITE="$with_overwrite"
29536 cf_LIST_MODELS="$cf_list_models"
29537 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29538 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29539 cf_cv_abi_version="$cf_cv_abi_version"
29540 cf_cv_do_relink="$cf_cv_do_relink"
29541 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29542 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29543 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29544 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29545 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29546 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29547 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29548 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29549 cf_cv_rel_version="$cf_cv_rel_version"
29550 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29551 cf_cv_shared_soname='$cf_cv_shared_soname'
29552 cf_cv_shlib_version="$cf_cv_shlib_version"
29553 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29554 cf_cv_system_name="$cf_cv_system_name"
29555 cf_cv_term_driver="$with_term_driver"
29556 cf_with_ada="$cf_with_ada"
29557 cf_with_cxx_binding="$cf_with_cxx_binding"
29558 cf_with_db_install="$cf_with_db_install"
29559 cf_with_manpages="$cf_with_manpages"
29560 cf_with_tests="$cf_with_tests"
29561 host="$host"
29562 target="$target"
29563 with_shared_cxx="$with_shared_cxx"
29564
29565 EOF
29566
29567 cat >>"$CONFIG_STATUS" <<\EOF
29568 for ac_config_target in $ac_config_targets
29569 do
29570   case "$ac_config_target" in
29571   # Handling of arguments.
29572   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29573   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29574   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29575   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29576   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29577   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29578   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29579   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29580   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29581   *) { { echo "$as_me:29581: error: invalid argument: $ac_config_target" >&5
29582 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29583    { (exit 1); exit 1; }; };;
29584   esac
29585 done
29586
29587 # If the user did not use the arguments to specify the items to instantiate,
29588 # then the envvar interface is used.  Set only those that are not.
29589 # We use the long form for the default assignment because of an extremely
29590 # bizarre bug on SunOS 4.1.3.
29591 if "$ac_need_defaults"; then
29592   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29593   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29594   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29595 fi
29596
29597 # Create a temporary directory, and hook for its removal unless debugging.
29598 $debug ||
29599 {
29600   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29601   trap '{ (exit 1); exit 1; }' 1 2 13 15
29602 }
29603
29604 # Create a (secure) tmp directory for tmp files.
29605 : ${TMPDIR=/tmp}
29606 {
29607   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29608   test -n "$tmp" && test -d "$tmp"
29609 }  ||
29610 {
29611   tmp=$TMPDIR/cs$$-$RANDOM
29612   (umask 077 && mkdir $tmp)
29613 } ||
29614 {
29615    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29616    { (exit 1); exit 1; }
29617 }
29618
29619 EOF
29620
29621 cat >>"$CONFIG_STATUS" <<EOF
29622
29623 #
29624 # CONFIG_FILES section.
29625 #
29626
29627 # No need to generate the scripts if there are no CONFIG_FILES.
29628 # This happens for instance when ./config.status config.h
29629 if test -n "\$CONFIG_FILES"; then
29630   # Protect against being on the right side of a sed subst in config.status.
29631   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29632    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
29633 s,@SHELL@,$SHELL,;t t
29634 s,@exec_prefix@,$exec_prefix,;t t
29635 s,@prefix@,$prefix,;t t
29636 s,@program_transform_name@,$program_transform_name,;t t
29637 s,@bindir@,$bindir,;t t
29638 s,@sbindir@,$sbindir,;t t
29639 s,@libexecdir@,$libexecdir,;t t
29640 s,@datarootdir@,$datarootdir,;t t
29641 s,@datadir@,$datadir,;t t
29642 s,@sysconfdir@,$sysconfdir,;t t
29643 s,@sharedstatedir@,$sharedstatedir,;t t
29644 s,@localstatedir@,$localstatedir,;t t
29645 s,@runstatedir@,$runstatedir,;t t
29646 s,@libdir@,$libdir,;t t
29647 s,@includedir@,$includedir,;t t
29648 s,@oldincludedir@,$oldincludedir,;t t
29649 s,@infodir@,$infodir,;t t
29650 s,@mandir@,$mandir,;t t
29651 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29652 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29653 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29654 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29655 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29656 s,@build_alias@,$build_alias,;t t
29657 s,@host_alias@,$host_alias,;t t
29658 s,@target_alias@,$target_alias,;t t
29659 s,@ECHO_C@,$ECHO_C,;t t
29660 s,@ECHO_N@,$ECHO_N,;t t
29661 s,@ECHO_T@,$ECHO_T,;t t
29662 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29663 s,@DEFS@,$DEFS,;t t
29664 s,@LIBS@,$LIBS,;t t
29665 s,@top_builddir@,$top_builddir,;t t
29666 s,@GREP@,$GREP,;t t
29667 s,@EGREP@,$EGREP,;t t
29668 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29669 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29670 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29671 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29672 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29673 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29674 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29675 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29676 s,@VERSION@,$VERSION,;t t
29677 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29678 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29679 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29680 s,@PACKAGE@,$PACKAGE,;t t
29681 s,@build@,$build,;t t
29682 s,@build_cpu@,$build_cpu,;t t
29683 s,@build_vendor@,$build_vendor,;t t
29684 s,@build_os@,$build_os,;t t
29685 s,@host@,$host,;t t
29686 s,@host_cpu@,$host_cpu,;t t
29687 s,@host_vendor@,$host_vendor,;t t
29688 s,@host_os@,$host_os,;t t
29689 s,@target@,$target,;t t
29690 s,@target_cpu@,$target_cpu,;t t
29691 s,@target_vendor@,$target_vendor,;t t
29692 s,@target_os@,$target_os,;t t
29693 s,@FGREP@,$FGREP,;t t
29694 s,@CC@,$CC,;t t
29695 s,@CFLAGS@,$CFLAGS,;t t
29696 s,@LDFLAGS@,$LDFLAGS,;t t
29697 s,@CPPFLAGS@,$CPPFLAGS,;t t
29698 s,@ac_ct_CC@,$ac_ct_CC,;t t
29699 s,@EXEEXT@,$EXEEXT,;t t
29700 s,@OBJEXT@,$OBJEXT,;t t
29701 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29702 s,@CPP@,$CPP,;t t
29703 s,@LDCONFIG@,$LDCONFIG,;t t
29704 s,@CXX@,$CXX,;t t
29705 s,@CXXFLAGS@,$CXXFLAGS,;t t
29706 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29707 s,@AWK@,$AWK,;t t
29708 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29709 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29710 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29711 s,@LINT@,$LINT,;t t
29712 s,@LINT_OPTS@,$LINT_OPTS,;t t
29713 s,@LINT_LIBS@,$LINT_LIBS,;t t
29714 s,@LN_S@,$LN_S,;t t
29715 s,@cf_config_suffix@,$cf_config_suffix,;t t
29716 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29717 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29718 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29719 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29720 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29721 s,@SET_MAKE@,$SET_MAKE,;t t
29722 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29723 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29724 s,@CTAGS@,$CTAGS,;t t
29725 s,@ETAGS@,$ETAGS,;t t
29726 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29727 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29728 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29729 s,@RANLIB@,$RANLIB,;t t
29730 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29731 s,@LD@,$LD,;t t
29732 s,@ac_ct_LD@,$ac_ct_LD,;t t
29733 s,@AR@,$AR,;t t
29734 s,@ac_ct_AR@,$ac_ct_AR,;t t
29735 s,@NM@,$NM,;t t
29736 s,@ac_ct_NM@,$ac_ct_NM,;t t
29737 s,@ARFLAGS@,$ARFLAGS,;t t
29738 s,@DESTDIR@,$DESTDIR,;t t
29739 s,@BUILD_CC@,$BUILD_CC,;t t
29740 s,@BUILD_CPP@,$BUILD_CPP,;t t
29741 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29742 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29743 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29744 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29745 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29746 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29747 s,@cf_list_models@,$cf_list_models,;t t
29748 s,@ABI_VERSION@,$ABI_VERSION,;t t
29749 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29750 s,@LIBTOOL@,$LIBTOOL,;t t
29751 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29752 s,@LT_UNDEF@,$LT_UNDEF,;t t
29753 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29754 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29755 s,@LIB_CREATE@,$LIB_CREATE,;t t
29756 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29757 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29758 s,@LIB_PREP@,$LIB_PREP,;t t
29759 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29760 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29761 s,@LIB_LINK@,$LIB_LINK,;t t
29762 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29763 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29764 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29765 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29766 s,@TICS_NAME@,$TICS_NAME,;t t
29767 s,@TINFO_NAME@,$TINFO_NAME,;t t
29768 s,@LIB_NAME@,$LIB_NAME,;t t
29769 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29770 s,@CC_G_OPT@,$CC_G_OPT,;t t
29771 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29772 s,@LD_MODEL@,$LD_MODEL,;t t
29773 s,@shlibdir@,$shlibdir,;t t
29774 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29775 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29776 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29777 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29778 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29779 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29780 s,@LINK_PROGS@,$LINK_PROGS,;t t
29781 s,@LINK_TESTS@,$LINK_TESTS,;t t
29782 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29783 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29784 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29785 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29786 s,@RPATH_LIST@,$RPATH_LIST,;t t
29787 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29788 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29789 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29790 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29791 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29792 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29793 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29794 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29795 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29796 s,@TIC@,$TIC,;t t
29797 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29798 s,@INFOCMP@,$INFOCMP,;t t
29799 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29800 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29801 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29802 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29803 s,@XTERM_KBS@,$XTERM_KBS,;t t
29804 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29805 s,@TERMINFO@,$TERMINFO,;t t
29806 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29807 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29808 s,@TERMPATH@,$TERMPATH,;t t
29809 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29810 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29811 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29812 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29813 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29814 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29815 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29816 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29817 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29818 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29819 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29820 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29821 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29822 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29823 s,@RGB_PATH@,$RGB_PATH,;t t
29824 s,@no_x11_rgb@,$no_x11_rgb,;t t
29825 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29826 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29827 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29828 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29829 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29830 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29831 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29832 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29833 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29834 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29835 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29836 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29837 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29838 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29839 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29840 s,@PTHREAD@,$PTHREAD,;t t
29841 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29842 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29843 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29844 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29845 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29846 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29847 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29848 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29849 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29850 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29851 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29852 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29853 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29854 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29855 s,@ECHO_LT@,$ECHO_LT,;t t
29856 s,@ECHO_LD@,$ECHO_LD,;t t
29857 s,@RULE_CC@,$RULE_CC,;t t
29858 s,@SHOW_CC@,$SHOW_CC,;t t
29859 s,@ECHO_CC@,$ECHO_CC,;t t
29860 s,@ECHO_LINK@,$ECHO_LINK,;t t
29861 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29862 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29863 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29864 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29865 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29866 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29867 s,@ADAFLAGS@,$ADAFLAGS,;t t
29868 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29869 s,@ADA_TRACE@,$ADA_TRACE,;t t
29870 s,@MATH_LIB@,$MATH_LIB,;t t
29871 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29872 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29873 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29874 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29875 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29876 s,@TEST_LIBS@,$TEST_LIBS,;t t
29877 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29878 s,@CXXCPP@,$CXXCPP,;t t
29879 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29880 s,@CXX_AR@,$CXX_AR,;t t
29881 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29882 s,@CXXLIBS@,$CXXLIBS,;t t
29883 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29884 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29885 s,@M4_exists@,$M4_exists,;t t
29886 s,@cf_ada_make@,$cf_ada_make,;t t
29887 s,@cf_ada_config@,$cf_ada_config,;t t
29888 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29889 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29890 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29891 s,@cf_compile_generics@,$cf_compile_generics,;t t
29892 s,@cf_generic_objects@,$cf_generic_objects,;t t
29893 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29894 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29895 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29896 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29897 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29898 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29899 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29900 s,@cf_ada_package@,$cf_ada_package,;t t
29901 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29902 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29903 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29904 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29905 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29906 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29907 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29908 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29909 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29910 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29911 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29912 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29913 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29914 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29915 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29916 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29917 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29918 s,@TICS_LIBS@,$TICS_LIBS,;t t
29919 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29920 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29921 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29922 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29923 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29924 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29925 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29926 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29927 s,@includesubdir@,$includesubdir,;t t
29928 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29929 s,@TICS_LIST@,$TICS_LIST,;t t
29930 s,@TINFO_LIST@,$TINFO_LIST,;t t
29931 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29932 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29933 s,@FORM_NAME@,$FORM_NAME,;t t
29934 s,@MENU_NAME@,$MENU_NAME,;t t
29935 s,@PANEL_NAME@,$PANEL_NAME,;t t
29936 s,@CXX_NAME@,$CXX_NAME,;t t
29937 s,@TEST_ARGS@,$TEST_ARGS,;t t
29938 s,@TEST_DEPS@,$TEST_DEPS,;t t
29939 s,@TEST_ARG2@,$TEST_ARG2,;t t
29940 s,@TEST_DEP2@,$TEST_DEP2,;t t
29941 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29942 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29943 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29944 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29945 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29946 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29947 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29948 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29949 s,@cross_compiling@,$cross_compiling,;t t
29950 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29951 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29952 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29953 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29954 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29955 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29956 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29957 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29958 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29959 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29960 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29961 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29962 CEOF
29963
29964 EOF
29965
29966   cat >>"$CONFIG_STATUS" <<\EOF
29967   # Split the substitutions into bite-sized pieces for seds with
29968   # small command number limits, like on Digital OSF/1 and HP-UX.
29969   ac_max_sed_lines=48
29970   ac_sed_frag=1 # Number of current file.
29971   ac_beg=1 # First line for current file.
29972   ac_end=$ac_max_sed_lines # Line after last line for current file.
29973   ac_more_lines=:
29974   ac_sed_cmds=
29975   while "$ac_more_lines"; do
29976     if test "$ac_beg" -gt 1; then
29977       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29978     else
29979       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29980     fi
29981     if test ! -s $tmp/subs.frag; then
29982       ac_more_lines=false
29983     else
29984       # The purpose of the label and of the branching condition is to
29985       # speed up the sed processing (if there are no `@' at all, there
29986       # is no need to browse any of the substitutions).
29987       # These are the two extra sed commands mentioned above.
29988       (echo ':t
29989   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29990       # It is possible to make a multiline substitution using escaped newlines.
29991       # Ensure that we do not split the substitution between script fragments.
29992       ac_BEG=$ac_end
29993       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29994       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29995       if test -s $tmp/subs.next; then
29996         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29997         if test ! -s $tmp/subs.edit; then
29998           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29999           if test ! -s $tmp/subs.edit; then
30000             if test "$ac_beg" -gt 1; then
30001               ac_end=`expr "$ac_end" - 1`
30002               continue
30003             fi
30004           fi
30005         fi
30006       fi
30007
30008       if test -z "$ac_sed_cmds"; then
30009         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
30010       else
30011         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
30012       fi
30013       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30014       ac_beg=$ac_end
30015       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30016     fi
30017   done
30018   if test -z "$ac_sed_cmds"; then
30019     ac_sed_cmds=cat
30020   fi
30021 fi # test -n "$CONFIG_FILES"
30022
30023 EOF
30024 cat >>"$CONFIG_STATUS" <<\EOF
30025 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30026   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30027   case "$ac_file" in
30028   - | *:- | *:-:* ) # input from stdin
30029         cat >$tmp/stdin
30030         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30031         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30032   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30033         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30034   * )   ac_file_in=$ac_file.in ;;
30035   esac
30036
30037   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30038   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30039          X"$ac_file" : 'X\(//\)[^/]' \| \
30040          X"$ac_file" : 'X\(//\)$' \| \
30041          X"$ac_file" : 'X\(/\)' \| \
30042          .     : '\(.\)' 2>/dev/null ||
30043 echo X"$ac_file" |
30044     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30045           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30046           /^X\(\/\/\)$/{ s//\1/; q; }
30047           /^X\(\/\).*/{ s//\1/; q; }
30048           s/.*/./; q'`
30049   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30050     { case "$ac_dir" in
30051   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30052   *)                      as_incr_dir=.;;
30053 esac
30054 as_dummy="$ac_dir"
30055 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30056   case $as_mkdir_dir in
30057     # Skip DOS drivespec
30058     ?:) as_incr_dir=$as_mkdir_dir ;;
30059     *)
30060       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30061       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30062     ;;
30063   esac
30064 done; }
30065
30066     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
30067     # A "../" for each directory in $ac_dir_suffix.
30068     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30069   else
30070     ac_dir_suffix= ac_dots=
30071   fi
30072
30073   case "$srcdir" in
30074   .)  ac_srcdir=.
30075       if test -z "$ac_dots"; then
30076          ac_top_srcdir=.
30077       else
30078          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30079       fi ;;
30080   [\\/]* | ?:[\\/]* )
30081       ac_srcdir="$srcdir$ac_dir_suffix";
30082       ac_top_srcdir="$srcdir" ;;
30083   *) # Relative path.
30084     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30085     ac_top_srcdir="$ac_dots$srcdir" ;;
30086   esac
30087
30088   case $INSTALL in
30089   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30090   *) ac_INSTALL=$ac_dots$INSTALL ;;
30091   esac
30092
30093   if test x"$ac_file" != x-; then
30094     { echo "$as_me:30094: creating $ac_file" >&5
30095 echo "$as_me: creating $ac_file" >&6;}
30096     rm -f "$ac_file"
30097   fi
30098   # Let's still pretend it is `configure' which instantiates (i.e., don't
30099   # use $as_me), people would be surprised to read:
30100   #    /* config.h.  Generated automatically by config.status.  */
30101   configure_input="Generated automatically from `echo $ac_file_in |
30102                                                  sed 's,.*/,,'` by configure."
30103
30104   # First look for the input files in the build tree, otherwise in the
30105   # src tree.
30106   ac_file_inputs=`IFS=:
30107     for f in $ac_file_in; do
30108       case $f in
30109       -) echo $tmp/stdin ;;
30110       [\\/$]*)
30111          # Absolute (can't be DOS-style, as IFS=:)
30112          test -f "$f" || { { echo "$as_me:30112: error: cannot find input file: $f" >&5
30113 echo "$as_me: error: cannot find input file: $f" >&2;}
30114    { (exit 1); exit 1; }; }
30115          echo $f;;
30116       *) # Relative
30117          if test -f "$f"; then
30118            # Build tree
30119            echo $f
30120          elif test -f "$srcdir/$f"; then
30121            # Source tree
30122            echo "$srcdir/$f"
30123          else
30124            # /dev/null tree
30125            { { echo "$as_me:30125: error: cannot find input file: $f" >&5
30126 echo "$as_me: error: cannot find input file: $f" >&2;}
30127    { (exit 1); exit 1; }; }
30128          fi;;
30129       esac
30130     done` || { (exit 1); exit 1; }
30131 EOF
30132 cat >>"$CONFIG_STATUS" <<\EOF
30133   ac_warn_datarootdir=no
30134   if test x"$ac_file" != x-; then
30135     for ac_item in $ac_file_inputs
30136     do
30137       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30138       if test -n "$ac_seen"; then
30139         ac_used=`grep '@datarootdir@' "$ac_item"`
30140         if test -z "$ac_used"; then
30141           { echo "$as_me:30141: WARNING: datarootdir was used implicitly but not set:
30142 $ac_seen" >&5
30143 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30144 $ac_seen" >&2;}
30145           ac_warn_datarootdir=yes
30146         fi
30147       fi
30148       ac_seen=`grep '${datarootdir}' "$ac_item"`
30149       if test -n "$ac_seen"; then
30150         { echo "$as_me:30150: WARNING: datarootdir was used explicitly but not set:
30151 $ac_seen" >&5
30152 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30153 $ac_seen" >&2;}
30154         ac_warn_datarootdir=yes
30155       fi
30156     done
30157   fi
30158
30159 if test "x$ac_warn_datarootdir" = xyes; then
30160   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30161 fi
30162
30163 EOF
30164 cat >>"$CONFIG_STATUS" <<EOF
30165   sed "$ac_vpsub
30166 $extrasub
30167 EOF
30168 cat >>"$CONFIG_STATUS" <<\EOF
30169 :t
30170 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30171 s,@configure_input@,$configure_input,;t t
30172 s,@srcdir@,$ac_srcdir,;t t
30173 s,@top_srcdir@,$ac_top_srcdir,;t t
30174 s,@INSTALL@,$ac_INSTALL,;t t
30175 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
30176   rm -f $tmp/stdin
30177   if test x"$ac_file" != x-; then
30178     cp "$tmp/out" "$ac_file"
30179
30180     for ac_name in prefix exec_prefix datarootdir
30181     do
30182         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
30183         if test -n "$ac_seen"; then
30184             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30185             if test -z "$ac_init"; then
30186               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
30187               { echo "$as_me:30187: WARNING: Variable $ac_name is used but was not set:
30188 $ac_seen" >&5
30189 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30190 $ac_seen" >&2;}
30191             fi
30192         fi
30193     done
30194     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
30195     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
30196     if test -s $tmp/out; then
30197       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
30198       { echo "$as_me:30198: WARNING: Some variables may not be substituted:
30199 $ac_seen" >&5
30200 echo "$as_me: WARNING: Some variables may not be substituted:
30201 $ac_seen" >&2;}
30202     fi
30203   else
30204     cat $tmp/out
30205   fi
30206   rm -f $tmp/out
30207
30208 done
30209 EOF
30210 cat >>"$CONFIG_STATUS" <<\EOF
30211
30212 #
30213 # CONFIG_HEADER section.
30214 #
30215
30216 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30217 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30218 #
30219 # ac_d sets the value in "#define NAME VALUE" lines.
30220 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30221 ac_dB='[        ].*$,\1#\2'
30222 ac_dC=' '
30223 ac_dD=',;t'
30224 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30225 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30226 ac_iB='\([      ]\),\1#\2define\3'
30227 ac_iC=' '
30228 ac_iD='\4,;t'
30229 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30230 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30231 ac_uB='$,\1#\2define\3'
30232 ac_uC=' '
30233 ac_uD=',;t'
30234
30235 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30236   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30237   case "$ac_file" in
30238   - | *:- | *:-:* ) # input from stdin
30239         cat >$tmp/stdin
30240         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30241         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30242   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30243         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30244   * )   ac_file_in=$ac_file.in ;;
30245   esac
30246
30247   test x"$ac_file" != x- && { echo "$as_me:30247: creating $ac_file" >&5
30248 echo "$as_me: creating $ac_file" >&6;}
30249
30250   # First look for the input files in the build tree, otherwise in the
30251   # src tree.
30252   ac_file_inputs=`IFS=:
30253     for f in $ac_file_in; do
30254       case $f in
30255       -) echo $tmp/stdin ;;
30256       [\\/$]*)
30257          # Absolute (can't be DOS-style, as IFS=:)
30258          test -f "$f" || { { echo "$as_me:30258: error: cannot find input file: $f" >&5
30259 echo "$as_me: error: cannot find input file: $f" >&2;}
30260    { (exit 1); exit 1; }; }
30261          echo $f;;
30262       *) # Relative
30263          if test -f "$f"; then
30264            # Build tree
30265            echo $f
30266          elif test -f "$srcdir/$f"; then
30267            # Source tree
30268            echo "$srcdir/$f"
30269          else
30270            # /dev/null tree
30271            { { echo "$as_me:30271: error: cannot find input file: $f" >&5
30272 echo "$as_me: error: cannot find input file: $f" >&2;}
30273    { (exit 1); exit 1; }; }
30274          fi;;
30275       esac
30276     done` || { (exit 1); exit 1; }
30277   # Remove the trailing spaces.
30278   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
30279
30280 EOF
30281
30282 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30283 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30284 # be either 'cat' or 'sort'.
30285 cat confdefs.h | uniq >conftest.vals
30286
30287 # Break up conftest.vals because some shells have a limit on
30288 # the size of here documents, and old seds have small limits too.
30289
30290 rm -f conftest.tail
30291 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30292 while grep . conftest.vals >/dev/null
30293 do
30294   # Write chunks of a limited-size here document to conftest.frag.
30295   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30296   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30297   echo 'CEOF' >> "$CONFIG_STATUS"
30298   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30299   rm -f conftest.vals
30300   mv conftest.tail conftest.vals
30301 done
30302 rm -f conftest.vals
30303
30304 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30305 # marker @DEFS@.
30306 echo '  cat >> conftest.edit <<CEOF
30307 /@DEFS@/r conftest.frag
30308 /@DEFS@/d
30309 CEOF
30310 sed -f conftest.edit $tmp/in > $tmp/out
30311 rm -f $tmp/in
30312 mv $tmp/out $tmp/in
30313 rm -f conftest.edit conftest.frag
30314 ' >> "$CONFIG_STATUS"
30315
30316 cat >>"$CONFIG_STATUS" <<\EOF
30317   # Let's still pretend it is `configure' which instantiates (i.e., don't
30318   # use $as_me), people would be surprised to read:
30319   #    /* config.h.  Generated automatically by config.status.  */
30320   if test x"$ac_file" = x-; then
30321     echo "/* Generated automatically by configure.  */" >$tmp/config.h
30322   else
30323     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
30324   fi
30325   cat $tmp/in >>$tmp/config.h
30326   rm -f $tmp/in
30327   if test x"$ac_file" != x-; then
30328     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30329       { echo "$as_me:30329: $ac_file is unchanged" >&5
30330 echo "$as_me: $ac_file is unchanged" >&6;}
30331     else
30332       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30333          X"$ac_file" : 'X\(//\)[^/]' \| \
30334          X"$ac_file" : 'X\(//\)$' \| \
30335          X"$ac_file" : 'X\(/\)' \| \
30336          .     : '\(.\)' 2>/dev/null ||
30337 echo X"$ac_file" |
30338     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30339           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30340           /^X\(\/\/\)$/{ s//\1/; q; }
30341           /^X\(\/\).*/{ s//\1/; q; }
30342           s/.*/./; q'`
30343       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30344         { case "$ac_dir" in
30345   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30346   *)                      as_incr_dir=.;;
30347 esac
30348 as_dummy="$ac_dir"
30349 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30350   case $as_mkdir_dir in
30351     # Skip DOS drivespec
30352     ?:) as_incr_dir=$as_mkdir_dir ;;
30353     *)
30354       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30355       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30356     ;;
30357   esac
30358 done; }
30359
30360       fi
30361       rm -f "$ac_file"
30362       mv "$tmp/config.h" "$ac_file"
30363     fi
30364   else
30365     cat $tmp/config.h
30366     rm -f $tmp/config.h
30367   fi
30368 done
30369 EOF
30370 cat >>"$CONFIG_STATUS" <<\EOF
30371 #
30372 # CONFIG_COMMANDS section.
30373 #
30374 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30375   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30376   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30377
30378   case "$ac_dest" in
30379     default )
30380 if test "x$cf_with_tests" != xno ; then
30381
30382 for cf_dir in test
30383 do
30384         if test ! -d "$srcdir/$cf_dir" ; then
30385                 continue
30386         elif test -f "$srcdir/$cf_dir/programs" ; then
30387                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30388         fi
30389 done
30390
30391 fi
30392
30393 cf_prefix=$LIB_PREFIX
30394
30395 case "$cf_cv_shlib_version" in
30396 (cygdll|msysdll|mingw|msvcdll)
30397         TINFO_NAME=$TINFO_ARG_SUFFIX
30398         TINFO_SUFFIX=.dll
30399         ;;
30400 esac
30401
30402 if test -n "$TINFO_SUFFIX" ; then
30403         case "$TINFO_SUFFIX" in
30404         (tw*)
30405                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30406                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30407                 ;;
30408         (t*)
30409                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30410                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30411                 ;;
30412         (w*)
30413                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30414                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30415                 ;;
30416         esac
30417 fi
30418
30419 for cf_dir in $SRC_SUBDIRS
30420 do
30421         if test ! -d "$srcdir/$cf_dir" ; then
30422                 continue
30423         elif test -f "$srcdir/$cf_dir/modules" ; then
30424
30425                 SHARED_LIB=
30426                 Libs_To_Make=
30427                 cf_awk_program=
30428                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
30429                 then
30430                         cf_awk_program="$cf_awk_program\
30431 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
30432 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
30433 "
30434                 fi
30435
30436                 if test "x$WILDCARD_SYMS" = xno
30437                 then
30438                         cf_awk_program="$cf_awk_program\
30439 /[      ]_\\*;/ { skip=1; next; }\
30440 "
30441                 fi
30442
30443                 if test "x$cf_awk_program" != "x"
30444                 then
30445                         cat >>$cf_dir/Makefile <<CF_EOF
30446
30447 # Generated by CF_LIB_RULES
30448 resulting.map: $UNALTERED_SYMS
30449         $AWK 'BEGIN { skip = 1; last=""; } \
30450 $cf_awk_program \
30451 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30452  skip = 0; last = \$\$0; } \
30453 END { print last; }' < "$UNALTERED_SYMS" >\$@
30454
30455 distclean::
30456         rm -f resulting.map
30457 CF_EOF
30458                 fi
30459
30460                 for cf_item in $cf_LIST_MODELS
30461                 do
30462
30463         case X$cf_item in
30464         (Xlibtool)
30465                 cf_suffix='.la'
30466                 cf_depsuf=$cf_suffix
30467                 ;;
30468         (Xdebug)
30469                 case "$cf_cv_system_name" in
30470                 (*-msvc*)
30471                         cf_suffix='_g.lib'
30472                         ;;
30473                 (*)
30474                         cf_suffix='_g.a'
30475                         ;;
30476                 esac
30477                 cf_depsuf=$cf_suffix
30478                 ;;
30479         (Xprofile)
30480                 case "$cf_cv_system_name" in
30481                 (*-msvc*)
30482                         cf_suffix='_p.lib'
30483                         ;;
30484                 (*)
30485                         cf_suffix='_p.a'
30486                         ;;
30487                 esac
30488                 cf_depsuf=$cf_suffix
30489                 ;;
30490         (Xshared)
30491                 case "$cf_cv_system_name" in
30492                 (aix[5-7]*)
30493                         cf_suffix='.so'
30494                         cf_depsuf=$cf_suffix
30495                         ;;
30496                 (*-msvc*)
30497                         cf_suffix='.dll'
30498                         cf_depsuf='.dll.lib'
30499                         ;;
30500                 (cygwin*|msys*|mingw*)
30501                         cf_suffix='.dll'
30502                         cf_depsuf='.dll.a'
30503                         ;;
30504                 (darwin*)
30505                         cf_suffix='.dylib'
30506                         cf_depsuf=$cf_suffix
30507                         ;;
30508                 (hpux*)
30509                         case "$target" in
30510                         (ia64*)
30511                                 cf_suffix='.so'
30512                                 cf_depsuf=$cf_suffix
30513                                 ;;
30514                         (*)
30515                                 cf_suffix='.sl'
30516                                 cf_depsuf=$cf_suffix
30517                                 ;;
30518                         esac
30519                         ;;
30520                 (*)
30521                         cf_suffix='.so'
30522                         cf_depsuf=$cf_suffix
30523                         ;;
30524                 esac
30525                 ;;
30526         (*)
30527                 case "$target" in
30528                 (*-msvc*)
30529                         cf_suffix='.lib'
30530                         ;;
30531                 (*)
30532                         cf_suffix='.a'
30533                         ;;
30534                 esac
30535                 cf_depsuf=$cf_suffix
30536                 ;;
30537         esac
30538         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30539         then
30540                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30541                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30542         fi
30543
30544                         if test "$cf_dir" = "c++"
30545                         then
30546
30547 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30548
30549 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30550
30551                         else
30552
30553 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30554
30555 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30556
30557                         fi
30558                         test -z "$cf_libname" && cf_libname="$cf_dir"
30559                         if test "$cf_item" = shared ; then
30560                                 if test -n "${LIB_SUFFIX}"
30561                                 then
30562                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30563                                 else
30564                                         cf_shared_suffix="$cf_suffix"
30565                                 fi
30566                                 if test "$cf_cv_do_symlinks" = yes ; then
30567                                         cf_version_name=
30568
30569                                         case "$cf_cv_shlib_version" in
30570                                         (rel)
30571                                                 cf_version_name=REL_VERSION
30572                                                 ;;
30573                                         (abi)
30574                                                 cf_version_name=ABI_VERSION
30575                                                 ;;
30576                                         esac
30577
30578                                         if test -n "$cf_version_name"
30579                                         then
30580                                                 case "$cf_cv_system_name" in
30581                                                 (darwin*)
30582                                                         # "w", etc?
30583                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30584                                                         ;;
30585                                                 (*)
30586                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30587                                                         ;;
30588                                                 esac
30589                                         fi
30590                                         if test -n "${USE_LIB_SUFFIX}"
30591                                         then
30592                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30593                                         else
30594                                                 cf_shared_suffix="$cf_suffix"
30595                                         fi
30596                                 fi
30597                                 # cygwin needs import library, and has unique naming convention
30598                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30599                                 # use 'cyg' prefix for shared lib.
30600                                 case "$cf_cv_shlib_version" in
30601                                 (cygdll)
30602                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30603                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30604                                         ;;
30605                                 (msysdll)
30606                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30607                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30608                                         ;;
30609                                 (mingw)
30610                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30611                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30612                                         ;;
30613                                 (msvcdll)
30614                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30615                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30616                                         ;;
30617                                 (*)
30618                                         cf_add_lib=
30619                                         ;;
30620                                 esac
30621                                 if test -n "$cf_add_lib"
30622                                 then
30623                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30624                                         continue
30625                                 fi
30626                         fi
30627                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30628                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30629                 done
30630
30631                 if test "$cf_dir" = ncurses ; then
30632                         cf_subsets="$LIB_SUBSETS"
30633                         cf_r_parts="$cf_subsets"
30634                         cf_liblist="$Libs_To_Make"
30635
30636                         while test -n "$cf_r_parts"
30637                         do
30638                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30639                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30640                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30641                                         cf_add_lib=
30642                                         case "$cf_l_parts" in
30643                                         (*termlib*)
30644                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30645                                                 ;;
30646                                         (*ticlib*)
30647                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30648                                                 ;;
30649                                         (*)
30650                                                 break
30651                                                 ;;
30652                                         esac
30653                                         if test -n "$cf_add_lib"; then
30654                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30655                                         fi
30656                                 else
30657                                         break
30658                                 fi
30659                         done
30660                 else
30661                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30662                 fi
30663
30664                 if test "$cf_dir" = c++; then
30665                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30666                                 cf_list=
30667                                 for cf_item in $Libs_To_Make
30668                                 do
30669                                         case "$cf_item" in
30670                                         (*.a)
30671                                                 ;;
30672                                         (*)
30673                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30674                                                 ;;
30675                                         esac
30676                                         for cf_test in $cf_list
30677                                         do
30678                                                 if test "$cf_test" = "$cf_item"
30679                                                 then
30680                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30681                                                         cf_item=
30682                                                         break
30683                                                 fi
30684                                         done
30685                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30686                                 done
30687                                 Libs_To_Make="$cf_list"
30688                         fi
30689                 fi
30690
30691                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30692                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30693                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30694                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30695
30696                 $AWK -f "$srcdir/mk-0th.awk" \
30697                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30698                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30699
30700                 for cf_subset in $cf_subsets
30701                 do
30702                         cf_subdirs=
30703                         for cf_item in $cf_LIST_MODELS
30704                         do
30705
30706                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30707
30708 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30709
30710                         CXX_MODEL=$cf_ITEM
30711                         if test "$CXX_MODEL" = SHARED; then
30712                                 case "$cf_cv_shlib_version" in
30713                                 (cygdll|msysdll|mingw|msvcdll)
30714                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30715
30716 echo "${as_me:-configure}:30716: testing overriding CXX_MODEL to SHARED ..." 1>&5
30717
30718                                         with_shared_cxx=yes
30719                                         ;;
30720                                 (*)
30721                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30722                                         ;;
30723                                 esac
30724                         fi
30725
30726         case X$cf_item in
30727         (Xlibtool)
30728                 cf_suffix='.la'
30729                 cf_depsuf=$cf_suffix
30730                 ;;
30731         (Xdebug)
30732                 case "$cf_cv_system_name" in
30733                 (*-msvc*)
30734                         cf_suffix='_g.lib'
30735                         ;;
30736                 (*)
30737                         cf_suffix='_g.a'
30738                         ;;
30739                 esac
30740                 cf_depsuf=$cf_suffix
30741                 ;;
30742         (Xprofile)
30743                 case "$cf_cv_system_name" in
30744                 (*-msvc*)
30745                         cf_suffix='_p.lib'
30746                         ;;
30747                 (*)
30748                         cf_suffix='_p.a'
30749                         ;;
30750                 esac
30751                 cf_depsuf=$cf_suffix
30752                 ;;
30753         (Xshared)
30754                 case "$cf_cv_system_name" in
30755                 (aix[5-7]*)
30756                         cf_suffix='.so'
30757                         cf_depsuf=$cf_suffix
30758                         ;;
30759                 (*-msvc*)
30760                         cf_suffix='.dll'
30761                         cf_depsuf='.dll.lib'
30762                         ;;
30763                 (cygwin*|msys*|mingw*)
30764                         cf_suffix='.dll'
30765                         cf_depsuf='.dll.a'
30766                         ;;
30767                 (darwin*)
30768                         cf_suffix='.dylib'
30769                         cf_depsuf=$cf_suffix
30770                         ;;
30771                 (hpux*)
30772                         case "$target" in
30773                         (ia64*)
30774                                 cf_suffix='.so'
30775                                 cf_depsuf=$cf_suffix
30776                                 ;;
30777                         (*)
30778                                 cf_suffix='.sl'
30779                                 cf_depsuf=$cf_suffix
30780                                 ;;
30781                         esac
30782                         ;;
30783                 (*)
30784                         cf_suffix='.so'
30785                         cf_depsuf=$cf_suffix
30786                         ;;
30787                 esac
30788                 ;;
30789         (*)
30790                 case "$target" in
30791                 (*-msvc*)
30792                         cf_suffix='.lib'
30793                         ;;
30794                 (*)
30795                         cf_suffix='.a'
30796                         ;;
30797                 esac
30798                 cf_depsuf=$cf_suffix
30799                 ;;
30800         esac
30801         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30802         then
30803                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30804                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30805         fi
30806
30807         case $cf_item in
30808         (libtool) cf_subdir='obj_lo'  ;;
30809         (normal)  cf_subdir='objects' ;;
30810         (debug)   cf_subdir='obj_g' ;;
30811         (profile) cf_subdir='obj_p' ;;
30812         (shared)
30813                 case "$cf_cv_system_name" in
30814                 (cygwin|msys)
30815                         cf_subdir='objects' ;;
30816                 (*)
30817                         cf_subdir='obj_s' ;;
30818                 esac
30819         esac
30820
30821                         # Test for case where we build libtinfo with a different name.
30822                         cf_libname=$cf_dir
30823                         if test "$cf_dir" = ncurses ; then
30824                                 case "$cf_subset" in
30825                                 (*base*)
30826                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30827                                         ;;
30828                                 (*termlib*)
30829                                         cf_libname=$TINFO_LIB_SUFFIX
30830                                         ;;
30831                                 (ticlib*)
30832                                         cf_libname=$TICS_LIB_SUFFIX
30833                                         ;;
30834                                 esac
30835                         elif test "$cf_dir" = c++ ; then
30836
30837 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30838
30839 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30840
30841                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30842                         else
30843
30844 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30845
30846 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30847
30848                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30849                         fi
30850                         if test -n "${USE_ARG_SUFFIX}" ; then
30851                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30852                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30853                         fi
30854
30855                         # These dependencies really are for development, not
30856                         # builds, but they are useful in porting, too.
30857                         cf_depend="../include/ncurses_cfg.h"
30858                         if test "$srcdir" = "."; then
30859                                 cf_reldir="."
30860                         else
30861                                 cf_reldir="\${srcdir}"
30862                         fi
30863
30864                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30865                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30866                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30867                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30868                         fi
30869
30870                         cf_dir_suffix=
30871                         old_cf_suffix="$cf_suffix"
30872                         if test "$cf_cv_shlib_version_infix" = yes ; then
30873                         if test -n "$USE_LIB_SUFFIX" ; then
30874                                 case "$USE_LIB_SUFFIX" in
30875                                 (tw*)
30876                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30877                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30878                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30879                                         ;;
30880                                 (t*)
30881                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30882                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30883                                         cf_dir_suffix=t$EXTRA_SUFFIX
30884                                         ;;
30885                                 (w*)
30886                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30887                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30888                                         cf_dir_suffix=w$EXTRA_SUFFIX
30889                                         ;;
30890                                 (*)
30891                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30892                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30893                                         cf_dir_suffix=$EXTRA_SUFFIX
30894                                         ;;
30895                                 esac
30896                         fi
30897                         fi
30898
30899                         $AWK -f "$srcdir/mk-1st.awk" \
30900                                 name=${cf_libname}${cf_dir_suffix} \
30901                                 traces=$LIB_TRACING \
30902                                 MODEL=$cf_ITEM \
30903                                 CXX_MODEL=$CXX_MODEL \
30904                                 LIB_SUFFIX=$LIB_SUFFIX \
30905                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30906                                 make_phony="${cf_cv_make_PHONY:-no}" \
30907                                 model=$cf_subdir \
30908                                 prefix=$cf_prefix \
30909                                 suffix=$cf_suffix \
30910                                 subset=$cf_subset \
30911                                 driver=$cf_cv_term_driver \
30912                                 SymLink="$LN_S" \
30913                                 TermlibRoot=$TINFO_NAME \
30914                                 TermlibSuffix=$TINFO_SUFFIX \
30915                                 ShlibVer=$cf_cv_shlib_version \
30916                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30917                                 ReLink=${cf_cv_do_relink:-no} \
30918                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30919                                 DoLinks=$cf_cv_do_symlinks \
30920                                 rmSoLocs=$cf_cv_rm_so_locs \
30921                                 ldconfig="$LDCONFIG" \
30922                                 overwrite=$WITH_OVERWRITE \
30923                                 depend="$cf_depend" \
30924                                 host="$host" \
30925                                 libtool_version="$LIBTOOL_VERSION" \
30926                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30927
30928                         cf_suffix="$old_cf_suffix"
30929
30930                         for cf_subdir2 in $cf_subdirs lib
30931                         do
30932                                 test "$cf_subdir" = "$cf_subdir2" && break
30933                         done
30934                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30935                         $AWK -f "$srcdir/mk-2nd.awk" \
30936                                 name=$cf_dir \
30937                                 traces=$LIB_TRACING \
30938                                 MODEL=$cf_ITEM \
30939                                 model=$cf_subdir \
30940                                 subset=$cf_subset \
30941                                 srcdir=$srcdir \
30942                                 echo=$WITH_ECHO \
30943                                 crenames=$cf_cv_prog_CC_c_o \
30944                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30945                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30946                         cf_subdirs="$cf_subdirs $cf_subdir"
30947                         done
30948                 done
30949         fi
30950
30951         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30952 done
30953
30954 echo >> Makefile
30955 echo '# generated by CF_LIB_RULES' >> Makefile
30956
30957 if test "x$cf_cv_make_PHONY" = xyes ; then
30958         cat >> Makefile <<-CF_EOF
30959
30960         .PHONY :        libs
30961         .PHONY :        lintlib
30962         .PHONY :        install.includes
30963         .PHONY :        uninstall.includes
30964         .PHONY :        install.libs
30965         .PHONY :        uninstall.libs
30966 CF_EOF
30967 fi
30968
30969 for cf_dir in $SRC_SUBDIRS
30970 do
30971         if test ! -d "$srcdir/$cf_dir" ; then
30972                 continue
30973         fi
30974
30975         if test -f "$cf_dir/Makefile" ; then
30976                 case "$cf_dir" in
30977                 (Ada95)
30978                         echo 'libs \' >> Makefile
30979                         echo 'install.libs \' >> Makefile
30980                         echo 'uninstall.libs ::' >> Makefile
30981                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30982                         ;;
30983                 esac
30984         fi
30985
30986         if test -f "$srcdir/$cf_dir/modules" ; then
30987
30988                 if test "x$cf_cv_make_PHONY" = xyes ; then
30989                         cat >> Makefile <<-CF_EOF
30990
30991                         .PHONY :        install.$cf_dir
30992                         .PHONY :        uninstall.$cf_dir
30993 CF_EOF
30994                 fi
30995
30996                 echo >> Makefile
30997                 if test -f "$srcdir/$cf_dir/headers" ; then
30998 cat >> Makefile <<CF_EOF
30999 install.includes \\
31000 uninstall.includes \\
31001 CF_EOF
31002                 fi
31003
31004 cat >> Makefile <<CF_EOF
31005 lint \\
31006 libs \\
31007 lintlib \\
31008 install.libs \\
31009 uninstall.libs \\
31010 install.$cf_dir \\
31011 uninstall.$cf_dir ::
31012         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31013 CF_EOF
31014         elif test -f "$srcdir/$cf_dir/headers" ; then
31015 cat >> Makefile <<CF_EOF
31016
31017 libs \\
31018 install.libs \\
31019 uninstall.libs \\
31020 install.includes \\
31021 uninstall.includes ::
31022         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31023 CF_EOF
31024 fi
31025 done
31026
31027 if test "x$cf_cv_make_PHONY" = xyes ; then
31028         cat >> Makefile <<-CF_EOF
31029
31030         .PHONY :        install.data
31031         .PHONY :        uninstall.data
31032 CF_EOF
31033 fi
31034
31035 if test "x$cf_with_db_install" = xyes; then
31036 cat >> Makefile <<CF_EOF
31037
31038 install.libs uninstall.libs \\
31039 install.data uninstall.data ::
31040 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31041 CF_EOF
31042 else
31043 cat >> Makefile <<CF_EOF
31044
31045 install.libs uninstall.libs ::
31046         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31047 CF_EOF
31048 fi
31049
31050 if test "x$cf_with_manpages" = xyes; then
31051
31052 if test "x$cf_cv_make_PHONY" = xyes ; then
31053         cat >> Makefile <<-CF_EOF
31054
31055         .PHONY :        install.man
31056         .PHONY :        uninstall.man
31057 CF_EOF
31058 fi
31059
31060 cat >> Makefile <<CF_EOF
31061
31062 install.man \\
31063 uninstall.man ::
31064         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31065 CF_EOF
31066 fi
31067
31068 cat >> Makefile <<CF_EOF
31069
31070 distclean ::
31071         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31072         rm -f headers.sh headers.sed mk_shared_lib.sh
31073         rm -f edit_man.* man_alias.*
31074         rm -rf \${DIRS_TO_MAKE}
31075 CF_EOF
31076
31077 # Special case: tack's manpage lives in its own directory.
31078 if test "x$cf_with_manpages" = xyes; then
31079 if test "x$cf_with_tack" = "xyes"; then
31080 cat >> Makefile <<CF_EOF
31081
31082 install.man \\
31083 uninstall.man ::
31084         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
31085 CF_EOF
31086 fi
31087 fi
31088
31089 rm -f headers.sed headers.sh
31090
31091 echo creating headers.sh
31092 cat >headers.sh <<CF_EOF
31093 #! $SHELL
31094 # This shell script is generated by the 'configure' script.  It is invoked in a
31095 # subdirectory of the build tree.  It generates a sed-script in the parent
31096 # directory that is used to adjust includes for header files that reside in a
31097 # subdirectory of /usr/include, etc.
31098 PRG=""
31099 while test \$# != 3
31100 do
31101 PRG="\$PRG \$1"; shift
31102 done
31103 DST=\$1
31104 REF=\$2
31105 SRC=\$3
31106 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31107 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31108 echo installing \$SRC in \$DST
31109 CF_EOF
31110
31111 if test "$WITH_CURSES_H" = yes; then
31112         cat >>headers.sh <<CF_EOF
31113 case \$DST in
31114 (/*/include/*)
31115         END=\`basename \$DST\`
31116         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31117         do
31118                 NAME=\`basename \$i\`
31119                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31120         done
31121         ;;
31122 (*)
31123         echo "" >> \$TMPSED
31124         ;;
31125 esac
31126 CF_EOF
31127
31128 else
31129         cat >>headers.sh <<CF_EOF
31130 case \$DST in
31131 (/*/include/*)
31132         END=\`basename \$DST\`
31133         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31134         do
31135                 NAME=\`basename \$i\`
31136                 if test "\$NAME" = "curses.h"
31137                 then
31138                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31139                         NAME=ncurses.h
31140                 fi
31141                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31142         done
31143         ;;
31144 (*)
31145         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31146         ;;
31147 esac
31148 CF_EOF
31149 fi
31150 cat >>headers.sh <<CF_EOF
31151 rm -f \$TMPSRC
31152 sed -f \$TMPSED \$SRC > \$TMPSRC
31153 NAME=\`basename \$SRC\`
31154 CF_EOF
31155 if test "$WITH_CURSES_H" != yes; then
31156         cat >>headers.sh <<CF_EOF
31157 test "\$NAME" = "curses.h" && NAME=ncurses.h
31158 CF_EOF
31159 fi
31160 cat >>headers.sh <<CF_EOF
31161 # Just in case someone gzip'd manpages, remove the conflicting copy.
31162 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31163
31164 eval \$PRG \$TMPSRC \$DST/\$NAME
31165 rm -f \$TMPSRC \$TMPSED
31166 CF_EOF
31167
31168 chmod 0755 headers.sh
31169
31170 for cf_dir in $SRC_SUBDIRS
31171 do
31172         if test ! -d "$srcdir/$cf_dir" ; then
31173                 continue
31174         fi
31175
31176         if test -f "$srcdir/$cf_dir/headers" ; then
31177                 $AWK -f "$srcdir/mk-hdr.awk" \
31178                         subset="$LIB_SUBSETS" \
31179                         compat="$WITH_CURSES_H" \
31180                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31181         fi
31182
31183         if test -f "$srcdir/$cf_dir/modules" ; then
31184                 if test "$cf_dir" != "c++" ; then
31185                         if test "x$cf_cv_make_PHONY" = xyes ; then
31186                                 cat >> $cf_dir/Makefile <<-CF_EOF
31187
31188                                 .PHONY :        depend
31189 CF_EOF
31190                         fi
31191
31192                         cat >>$cf_dir/Makefile <<"CF_EOF"
31193 depend : ${AUTO_SRC}
31194         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31195
31196 # DO NOT DELETE THIS LINE -- make depend depends on it.
31197 CF_EOF
31198                 fi
31199         fi
31200 done
31201
31202 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31203 if test -z "$USE_OLD_MAKERULES" ; then
31204         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31205 fi
31206 fi
31207  ;;
31208   esac
31209 done
31210 EOF
31211
31212 cat >>"$CONFIG_STATUS" <<\EOF
31213
31214 { (exit 0); exit 0; }
31215 EOF
31216 chmod +x "$CONFIG_STATUS"
31217 ac_clean_files=$ac_clean_files_save
31218
31219 # configure is writing to config.log, and then calls config.status.
31220 # config.status does its own redirection, appending to config.log.
31221 # Unfortunately, on DOS this fails, as config.log is still kept open
31222 # by configure, so config.status won't be able to write to it; its
31223 # output is simply discarded.  So we exec the FD to /dev/null,
31224 # effectively closing config.log, so it can be properly (re)opened and
31225 # appended to by config.status.  When coming back to configure, we
31226 # need to make the FD available again.
31227 if test "$no_create" != yes; then
31228   ac_cs_success=:
31229   exec 5>/dev/null
31230   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31231   exec 5>>config.log
31232   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31233   # would make configure fail if this is the last instruction.
31234   "$ac_cs_success" || { (exit 1); exit 1; }
31235 fi
31236 ${MAKE:-make} preinstall