]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.2 - patch 20210327
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.729 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210105.
5 #
6 # Copyright 2003-2020,2021      Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27   emulate sh
28   NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36 if expr a : '\(a\)' >/dev/null 2>&1; then
37   as_expr=expr
38 else
39   as_expr=false
40 fi
41
42 rm -f conf$$ conf$$.exe conf$$.file
43 echo >conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45   # We could just check for DJGPP; but this test a) works b) is more generic
46   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47   if test -f conf$$.exe; then
48     # Don't use ln at all; we don't have any links
49     as_ln_s='cp -p'
50   else
51     as_ln_s='ln -s'
52   fi
53 elif ln conf$$.file conf$$ 2>/dev/null; then
54   as_ln_s=ln
55 else
56   as_ln_s='cp -p'
57 fi
58 rm -f conf$$ conf$$.exe conf$$.file
59
60 as_executable_p="test -f"
61
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64   as_unset="unset"
65 else
66   as_unset="false"
67 fi
68
69 # NLS nuisances.
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79 # IFS
80 # We need space, tab and new line, in precisely that order.
81 as_nl='
82 '
83 IFS="   $as_nl"
84
85 # CDPATH.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88 # Name of the host.
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93 exec 6>&1
94
95 #
96 # Initializations.
97 #
98 ac_default_prefix=/usr/local
99 cross_compiling=no
100 subdirs=
101 MFLAGS=
102 MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete.  It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
109
110 ac_unique_file="ncurses/base/lib_initscr.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
113 #include <stdio.h>
114 #if HAVE_SYS_TYPES_H
115 # include <sys/types.h>
116 #endif
117 #if HAVE_SYS_STAT_H
118 # include <sys/stat.h>
119 #endif
120 #if STDC_HEADERS
121 # include <stdlib.h>
122 # include <stddef.h>
123 #else
124 # if HAVE_STDLIB_H
125 #  include <stdlib.h>
126 # endif
127 #endif
128 #if HAVE_STRING_H
129 # if !STDC_HEADERS && HAVE_MEMORY_H
130 #  include <memory.h>
131 # endif
132 # include <string.h>
133 #endif
134 #if HAVE_STRINGS_H
135 # include <strings.h>
136 #endif
137 #if HAVE_INTTYPES_H
138 # include <inttypes.h>
139 #else
140 # if HAVE_STDINT_H
141 #  include <stdint.h>
142 # endif
143 #endif
144 #if HAVE_UNISTD_H
145 # include <unistd.h>
146 #endif"
147
148 # Initialize some variables set by options.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
187
188 # Identity of this package.
189 PACKAGE_NAME=
190 PACKAGE_TARNAME=
191 PACKAGE_VERSION=
192 PACKAGE_STRING=
193 PACKAGE_BUGREPORT=
194
195 ac_prev=
196 for ac_option
197 do
198   # If the previous option needs an argument, assign it.
199   if test -n "$ac_prev"; then
200     eval "$ac_prev=\$ac_option"
201     ac_prev=
202     continue
203   fi
204
205   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207   # Accept the important Cygnus configure options, so we can diagnose typos.
208
209   case "$ac_option" in
210
211   -bindir | --bindir | --bindi | --bind | --bin | --bi)
212     ac_prev=bindir ;;
213   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214     bindir=$ac_optarg ;;
215
216   -build | --build | --buil | --bui | --bu)
217     ac_prev=build_alias ;;
218   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219     build_alias=$ac_optarg ;;
220
221   -cache-file | --cache-file | --cache-fil | --cache-fi \
222   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223     ac_prev=cache_file ;;
224   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226     cache_file=$ac_optarg ;;
227
228   --config-cache | -C)
229     cache_file=config.cache ;;
230
231   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232     ac_prev=datadir ;;
233   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234   | --da=*)
235     datadir=$ac_optarg ;;
236
237   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238   | --dataroo | --dataro | --datar)
239     ac_prev=datarootdir ;;
240   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242     datarootdir=$ac_optarg ;;
243
244   -disable-* | --disable-*)
245     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246     # Reject names that are not valid shell variable names.
247     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249    { (exit 1); exit 1; }; }
250     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251     eval "enable_$ac_feature=no" ;;
252
253   -enable-* | --enable-*)
254     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255     # Reject names that are not valid shell variable names.
256     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258    { (exit 1); exit 1; }; }
259     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260     case "$ac_option" in
261       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262       *) ac_optarg=yes ;;
263     esac
264     eval "enable_$ac_feature='$ac_optarg'" ;;
265
266   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268   | --exec | --exe | --ex)
269     ac_prev=exec_prefix ;;
270   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272   | --exec=* | --exe=* | --ex=*)
273     exec_prefix=$ac_optarg ;;
274
275   -gas | --gas | --ga | --g)
276     # Obsolete; use --with-gas.
277     with_gas=yes ;;
278
279   -help | --help | --hel | --he | -h)
280     ac_init_help=long ;;
281   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282     ac_init_help=recursive ;;
283   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284     ac_init_help=short ;;
285
286   -host | --host | --hos | --ho)
287     ac_prev=host_alias ;;
288   -host=* | --host=* | --hos=* | --ho=*)
289     host_alias=$ac_optarg ;;
290
291   -includedir | --includedir | --includedi | --included | --include \
292   | --includ | --inclu | --incl | --inc)
293     ac_prev=includedir ;;
294   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295   | --includ=* | --inclu=* | --incl=* | --inc=*)
296     includedir=$ac_optarg ;;
297
298   -infodir | --infodir | --infodi | --infod | --info | --inf)
299     ac_prev=infodir ;;
300   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301     infodir=$ac_optarg ;;
302
303   -libdir | --libdir | --libdi | --libd)
304     ac_prev=libdir ;;
305   -libdir=* | --libdir=* | --libdi=* | --libd=*)
306     libdir=$ac_optarg ;;
307
308   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309   | --libexe | --libex | --libe)
310     ac_prev=libexecdir ;;
311   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312   | --libexe=* | --libex=* | --libe=*)
313     libexecdir=$ac_optarg ;;
314
315   -localstatedir | --localstatedir | --localstatedi | --localstated \
316   | --localstate | --localstat | --localsta | --localst \
317   | --locals | --local | --loca | --loc | --lo)
318     ac_prev=localstatedir ;;
319   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322     localstatedir=$ac_optarg ;;
323
324   -runstatedir | --runstatedir | --runstatedi | --runstated \
325   | --runstate | --runstat | --runsta | --runst \
326   | --runs | --run | --ru)
327     ac_prev=runstatedir ;;
328   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330   | --runs=* | --run=* | --ru=*)
331     runstatedir=$ac_optarg ;;
332
333   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334     ac_prev=mandir ;;
335   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336     mandir=$ac_optarg ;;
337
338   -nfp | --nfp | --nf)
339     # Obsolete; use --without-fp.
340     with_fp=no ;;
341
342   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343   | --no-cr | --no-c)
344     no_create=yes ;;
345
346   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348     no_recursion=yes ;;
349
350   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352   | --oldin | --oldi | --old | --ol | --o)
353     ac_prev=oldincludedir ;;
354   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357     oldincludedir=$ac_optarg ;;
358
359   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360     ac_prev=prefix ;;
361   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362     prefix=$ac_optarg ;;
363
364   -program-prefix | --program-prefix | --program-prefi | --program-pref \
365   | --program-pre | --program-pr | --program-p)
366     ac_prev=program_prefix ;;
367   -program-prefix=* | --program-prefix=* | --program-prefi=* \
368   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369     program_prefix=$ac_optarg ;;
370
371   -program-suffix | --program-suffix | --program-suffi | --program-suff \
372   | --program-suf | --program-su | --program-s)
373     ac_prev=program_suffix ;;
374   -program-suffix=* | --program-suffix=* | --program-suffi=* \
375   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376     program_suffix=$ac_optarg ;;
377
378   -program-transform-name | --program-transform-name \
379   | --program-transform-nam | --program-transform-na \
380   | --program-transform-n | --program-transform- \
381   | --program-transform | --program-transfor \
382   | --program-transfo | --program-transf \
383   | --program-trans | --program-tran \
384   | --progr-tra | --program-tr | --program-t)
385     ac_prev=program_transform_name ;;
386   -program-transform-name=* | --program-transform-name=* \
387   | --program-transform-nam=* | --program-transform-na=* \
388   | --program-transform-n=* | --program-transform-=* \
389   | --program-transform=* | --program-transfor=* \
390   | --program-transfo=* | --program-transf=* \
391   | --program-trans=* | --program-tran=* \
392   | --progr-tra=* | --program-tr=* | --program-t=*)
393     program_transform_name=$ac_optarg ;;
394
395   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396   | -silent | --silent | --silen | --sile | --sil)
397     silent=yes ;;
398
399   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400     ac_prev=sbindir ;;
401   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402   | --sbi=* | --sb=*)
403     sbindir=$ac_optarg ;;
404
405   -sharedstatedir | --sharedstatedir | --sharedstatedi \
406   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407   | --sharedst | --shareds | --shared | --share | --shar \
408   | --sha | --sh)
409     ac_prev=sharedstatedir ;;
410   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413   | --sha=* | --sh=*)
414     sharedstatedir=$ac_optarg ;;
415
416   -site | --site | --sit)
417     ac_prev=site ;;
418   -site=* | --site=* | --sit=*)
419     site=$ac_optarg ;;
420
421   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422     ac_prev=srcdir ;;
423   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424     srcdir=$ac_optarg ;;
425
426   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427   | --syscon | --sysco | --sysc | --sys | --sy)
428     ac_prev=sysconfdir ;;
429   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431     sysconfdir=$ac_optarg ;;
432
433   -target | --target | --targe | --targ | --tar | --ta | --t)
434     ac_prev=target_alias ;;
435   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436     target_alias=$ac_optarg ;;
437
438   -v | -verbose | --verbose | --verbos | --verbo | --verb)
439     verbose=yes ;;
440
441   -version | --version | --versio | --versi | --vers | -V)
442     ac_init_version=: ;;
443
444   -with-* | --with-*)
445     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446     # Reject names that are not valid shell variable names.
447     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448       { echo "$as_me: error: invalid package name: $ac_package" >&2
449    { (exit 1); exit 1; }; }
450     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451     case "$ac_option" in
452       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453       *) ac_optarg=yes ;;
454     esac
455     eval "with_$ac_package='$ac_optarg'" ;;
456
457   -without-* | --without-*)
458     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459     # Reject names that are not valid shell variable names.
460     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461       { echo "$as_me: error: invalid package name: $ac_package" >&2
462    { (exit 1); exit 1; }; }
463     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464     eval "with_$ac_package=no" ;;
465
466   --x)
467     # Obsolete; use --with-x.
468     with_x=yes ;;
469
470   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471   | --x-incl | --x-inc | --x-in | --x-i)
472     ac_prev=x_includes ;;
473   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475     x_includes=$ac_optarg ;;
476
477   -x-libraries | --x-libraries | --x-librarie | --x-librari \
478   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479     ac_prev=x_libraries ;;
480   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482     x_libraries=$ac_optarg ;;
483
484   -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486    { (exit 1); exit 1; }; }
487     ;;
488
489   *=*)
490     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491     # Reject names that are not valid shell variable names.
492     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494    { (exit 1); exit 1; }; }
495     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496     eval "$ac_envvar='$ac_optarg'"
497     export "$ac_envvar" ;;
498
499   *)
500     # FIXME: should be removed in autoconf 3.0.
501     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504     : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512   { echo "$as_me: error: missing argument to $ac_option" >&2
513    { (exit 1); exit 1; }; }
514 fi
515
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
518 do
519   eval ac_val=$`echo "$ac_var"`
520   case "$ac_val" in
521     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529               localstatedir libdir includedir oldincludedir infodir mandir
530 do
531   eval ac_val=$`echo "$ac_var"`
532   case "$ac_val" in
533     [\\/$]* | ?:[\\/]* ) ;;
534     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535    { (exit 1); exit 1; }; };;
536   esac
537 done
538
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
541 build=$build_alias
542 host=$host_alias
543 target=$target_alias
544
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547   if test "x$build_alias" = x; then
548     cross_compiling=maybe
549     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550     If a cross compiler is detected then cross compile mode will be used." >&2
551   elif test "x$build_alias" != "x$host_alias"; then
552     cross_compiling=yes
553   fi
554 fi
555
556 ac_tool_prefix=
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
558
559 test "$silent" = yes && exec 6>/dev/null
560
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563   ac_srcdir_defaulted=yes
564   # Try the directory containing this script, then its parent.
565   ac_prog=$0
566   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568   srcdir=$ac_confdir
569   if test ! -r "$srcdir/$ac_unique_file"; then
570     srcdir=..
571   fi
572 else
573   ac_srcdir_defaulted=no
574 fi
575 if test ! -r "$srcdir/$ac_unique_file"; then
576   if test "$ac_srcdir_defaulted" = yes; then
577     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578    { (exit 1); exit 1; }; }
579   else
580     { echo "$as_me: error: cannot find sources in $srcdir" >&2
581    { (exit 1); exit 1; }; }
582   fi
583 fi
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
598 ac_env_CC_value=$CC
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
617 ac_env_CXX_set=${CXX+set}
618 ac_env_CXX_value=$CXX
619 ac_cv_env_CXX_set=${CXX+set}
620 ac_cv_env_CXX_value=$CXX
621 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_env_CXXFLAGS_value=$CXXFLAGS
623 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
624 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
625 ac_env_CXXCPP_set=${CXXCPP+set}
626 ac_env_CXXCPP_value=$CXXCPP
627 ac_cv_env_CXXCPP_set=${CXXCPP+set}
628 ac_cv_env_CXXCPP_value=$CXXCPP
629
630 #
631 # Report the --help message.
632 #
633 if test "$ac_init_help" = "long"; then
634   # Omit some internal or obsolete options to make the list less imposing.
635   # This message is too long to be a string in the A/UX 3.1 sh.
636   cat <<EOF
637 \`configure' configures this package to adapt to many kinds of systems.
638
639 Usage: $0 [OPTION]... [VAR=VALUE]...
640
641 To assign environment variables (e.g., CC, CFLAGS...), specify them as
642 VAR=VALUE.  See below for descriptions of some of the useful variables.
643
644 Defaults for the options are specified in brackets.
645
646 Configuration:
647   -h, --help              display this help and exit
648       --help=short        display options specific to this package
649       --help=recursive    display the short help of all the included packages
650   -V, --version           display version information and exit
651   -q, --quiet, --silent   do not print \`checking...' messages
652       --cache-file=FILE   cache test results in FILE [disabled]
653   -C, --config-cache      alias for \`--cache-file=config.cache'
654   -n, --no-create         do not create output files
655       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
656
657 EOF
658
659   cat <<EOF
660 Installation directories:
661   --prefix=PREFIX         install architecture-independent files in PREFIX
662                           [$ac_default_prefix]
663   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
664                           [PREFIX]
665
666 By default, \`make install' will install all the files in
667 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
668 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
669 for instance \`--prefix=\$HOME'.
670
671 For better control, use the options below.
672
673 Fine tuning of the installation directories:
674   --bindir=DIR            user executables [EPREFIX/bin]
675   --sbindir=DIR           system admin executables [EPREFIX/sbin]
676   --libexecdir=DIR        program executables [EPREFIX/libexec]
677   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
678   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
682   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
683   --libdir=DIR            object code libraries [EPREFIX/lib]
684   --includedir=DIR        C header files [PREFIX/include]
685   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
686   --infodir=DIR           info documentation [DATAROOTDIR/info]
687   --mandir=DIR            man documentation [DATAROOTDIR/man]
688 EOF
689
690   cat <<\EOF
691
692 Program names:
693   --program-prefix=PREFIX            prepend PREFIX to installed program names
694   --program-suffix=SUFFIX            append SUFFIX to installed program names
695   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
696
697 System types:
698   --build=BUILD           configure for building on BUILD [guessed]
699   --host=HOST       build programs to run on HOST [BUILD]
700   --target=TARGET   configure for building compilers for TARGET [HOST]
701 EOF
702 fi
703
704 if test -n "$ac_init_help"; then
705
706   cat <<\EOF
707
708 Optional Packages:
709   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
710   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
711
712 Optional Features:
713   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
714   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
715
716   --with-rel-version=XXX  override derived release version
717   --with-abi-version=XXX  override derived ABI version
718   --with-system-type=XXX  test: override derived host system-type
719   --without-ada           suppress check for Ada compiler, don't build demo
720   --without-cxx           do not adjust ncurses bool to match C++
721   --without-cxx-binding   do not build C++ binding and demo
722   --disable-db-install    suppress install of terminal database
723   --without-manpages      suppress install of manpages
724   --without-progs         suppress build/install with programs (e.g., tic)
725   --without-tack          suppress build/install with tack program
726   --without-tests         suppress build/install with test-programs
727   --without-curses-h      install curses.h as ncurses.h only
728   --with-config-suffix=X  suffixes ncursesXX-config file
729   --with-pkg-config{=path} enable/disable use of pkg-config
730   --with-pkg-config-libdir=XXX use given directory for installing pc-files
731   --enable-pc-files       generate and install .pc files for pkg-config
732   --with-pc-suffix        suffixes pc-files
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix   prefixes actual install-location ($DESTDIR)
735 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
737   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
738   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
742 Options to Specify the Libraries Built/Used:
743   --disable-libtool-version  enable to use libtool's incompatible naming scheme
744   --with-libtool          generate libraries with libtool
745   --with-shared           generate shared-libraries
746   --with-normal           generate normal-libraries (default)
747   --with-debug            generate debug-libraries (default)
748   --with-profile          generate profile-libraries
749   --with-cxx-shared       generate C++ shared-libraries
750   --with-lib-prefix       override library-prefix
751   --with-termlib          generate separate terminfo library
752   --with-ticlib           generate separate tic library
753   --enable-rpath          use rpath option when generating shared libraries
754   --disable-relink        relink shared libraries during install
755   --with-shlib-version=X  Specify rel or abi version for shared libs
756   --with-libtool-opts=XXX specify additional libtool options
757   --with-export-syms=XXX  limit exported symbols using libtool
758   --with-versioned-syms=X markup versioned symbols using ld
759   --with-gpm              use Alessandro Rubini's GPM library
760   --without-dlsym         do not use dlsym() to load GPM dynamically
761   --with-pcre2            use PCRE2 for regular-expressions
762   --with-sysmouse         use sysmouse (FreeBSD console)
763   --disable-lib-suffixes  disable library suffixes
764   --disable-rpath-hack    don't add rpath options for additional libraries
765   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
766 Fine-Tuning Your Configuration:
767   --with-extra-suffix=X   append extra suffix to header/library paths
768   --disable-overwrite     put headers in subdir, omit link to -lcurses
769   --disable-database      do not use terminfo, only fallbacks/termcap
770   --with-database=XXX     specify terminfo source to install
771   --with-hashed-db        specify hashed-database library
772   --with-fallbacks=XXX    specify list of fallback terminal descriptions
773   --with-tic-path=XXX     specify path of tic for fallbacks
774   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
775   --without-xterm-new     specify if xterm terminfo should be old version
776   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
777   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779   --disable-big-core      assume machine has little memory
780   --disable-big-strings   assume compiler has only standard-size strings
781   --enable-termcap        compile in termcap fallback support
782   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783   --enable-getcap         fast termcap load, no xrefs to terminfo
784   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
785   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
786   --disable-root-environ  restrict environment when running as root
787   --enable-symlinks       make tic use symbolic links not hard links
788   --enable-broken_linker  compile with broken-linker support code
789   --enable-bsdpad         recognize BSD-style prefix padding
790   --enable-widec          compile with wide-char/UTF-8 code
791   --disable-lp64          allow chtype to be long (ignore _LP64)
792   --disable-largefile     omit support for large files
793   --disable-tparm-varargs compile tparm() without varargs interface
794   --disable-tic-depends   link tic library without explicit dependency on ncurses library
795   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
796   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
797   --with-bool=TYPE        override fallback type of bool variable
798   --with-caps=alt         compile with alternate Caps file
799   --with-chtype=TYPE      override type of chtype
800   --with-ospeed=TYPE      override type of ospeed variable
801   --with-mmask-t=TYPE     override type of mmask_t
802   --with-ccharw-max=XXX   override size CCHARW_MAX
803   --enable-signed-char    compile using signed Boolean's in term.h
804   --with-tparm-arg=TYPE   override parameter type of tparm
805   --with-rcs-ids          compile-in RCS identifiers
806 Options to Specify How Manpages are Installed:
807   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
808                           optionally formatted/catonly, e.g., gzip,formatted
809   --with-manpage-renames  specify manpage-renaming
810   --with-manpage-aliases  specify manpage-aliases using .so
811   --with-manpage-symlinks specify manpage-aliases using symlinks
812   --with-manpage-tbl      specify manpage processing with tbl
813 Extensions:
814   --disable-ext-funcs     disable function-extensions
815   --enable-sp-funcs       enable SCREEN-extensions
816   --enable-term-driver    enable terminal-driver
817   --enable-const          compile with extra/non-standard const
818   --enable-ext-colors     compile for 256-color support
819   --enable-ext-mouse      compile for extended mouse-encoding
820   --enable-ext-putwin     compile with extended putwin/screendump
821   --enable-no-padding     compile with $NCURSES_NO_PADDING code
822   --enable-sigwinch       compile with SIGWINCH handler
823   --enable-tcap-names     compile with user-definable terminal capabilities
824 Reentrant Code:
825   --with-pthread          use POSIX thread library
826   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
827   --enable-weak-symbols   enable weak-symbols for pthreads
828   --enable-reentrant      compile with reentrant code
829   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
830   --enable-opaque-form    make form-library structures "opaque"
831   --enable-opaque-menu    make menu-library structures "opaque"
832   --enable-opaque-panel   make panel-library structures "opaque"
833   --with-wrap-prefix=XXX  override prefix used for public variables
834 Development Code:
835   --without-develop       disable development options
836   --enable-hard-tabs      compile with hard-tabs code
837   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
838 Experimental Code:
839   --disable-assumed-color do not assume anything about default-colors
840   --disable-hashmap       compile without hashmap scrolling-optimization
841   --enable-colorfgbg      compile-in experimental $COLORFGBG code
842   --enable-fvisibility    compile with -fvisibility=hidden
843   --enable-interop        compile-in interop bindings
844   --enable-safe-sprintf   compile with experimental safe-sprintf code
845   --disable-scroll-hints  compile without scroll-hints code
846   --enable-wgetch-events  compile with wgetch-events code
847   --enable-exp-win32      compile with experimental-Windows driver
848 Testing/development Options:
849   --disable-echo          do not display "compiling" commands
850   --disable-stripping     do not strip (debug info) installed executables
851   --enable-warnings       test: turn on gcc compiler warnings
852   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
853   --enable-string-hacks   work around bogus compiler/loader warnings
854   --enable-assertions     test: turn on generation of assertion code
855   --with-dmalloc          test: use Gray Watson's dmalloc library
856   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
857   --with-valgrind         test: use valgrind
858   --disable-leaks         test: free permanent memory, analyze leaks
859   --enable-expanded       test: generate functions for certain macros
860   --disable-macros        test: use functions rather than macros
861   --with-trace            test: add trace() function to all models of ncurses
862   --disable-gnat-projects test: disable GNAT projects even if usable
863 Ada Binding Options:
864   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
865   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
866   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
867   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
868   --with-ada-libname=XXX  override default Ada library-name
869   --with-form-libname=XXX override form basename of library
870   --with-menu-libname=XXX override menu basename of library
871   --with-panel-libname=XXX override panel basename of library
872   --with-cxx-libname=XXX override ncurses++ basename of library
873
874 Some influential environment variables:
875   CC          C compiler command
876   CFLAGS      C compiler flags
877   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
878               nonstandard directory <lib dir>
879   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
880               headers in a nonstandard directory <include dir>
881   CPP         C preprocessor
882   CXX         C++ compiler command
883   CXXFLAGS    C++ compiler flags
884   CXXCPP      C++ preprocessor
885
886 Use these variables to override the choices made by `configure' or to help
887 it to find libraries and programs with nonstandard names/locations.
888
889 EOF
890 fi
891
892 if test "$ac_init_help" = "recursive"; then
893   # If there are subdirs, report their specific --help.
894   ac_popdir=`pwd`
895   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
896     cd "$ac_subdir"
897     # A "../" for each directory in /$ac_subdir.
898     ac_dots=`echo "$ac_subdir" |
899              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
900
901     case "$srcdir" in
902     .) # No --srcdir option.  We are building in place.
903       ac_sub_srcdir="$srcdir" ;;
904     [\\/]* | ?:[\\/]* ) # Absolute path.
905       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
906     *) # Relative path.
907       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
908     esac
909
910     # Check for guested configure; otherwise get Cygnus style configure.
911     if test -f "$ac_sub_srcdir/configure.gnu"; then
912       echo
913       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
914     elif test -f "$ac_sub_srcdir/configure"; then
915       echo
916       $SHELL "$ac_sub_srcdir/configure" --help=recursive
917     elif test -f "$ac_sub_srcdir/configure.ac" ||
918            test -f "$ac_sub_srcdir/configure.in"; then
919       echo
920       "$ac_configure" --help
921     else
922       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
923     fi
924     cd "$ac_popdir"
925   done
926 fi
927
928 test -n "$ac_init_help" && exit 0
929 if "$ac_init_version"; then
930   cat <<\EOF
931
932 Copyright 2003-2020,2021        Thomas E. Dickey
933 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
934 Free Software Foundation, Inc.
935 This configure script is free software; the Free Software Foundation
936 gives unlimited permission to copy, distribute and modify it.
937 EOF
938   exit 0
939 fi
940 exec 5>config.log
941 cat >&5 <<EOF
942 This file contains any messages produced by compilers while
943 running configure, to aid debugging if configure makes a mistake.
944
945 It was created by $as_me, which was
946 generated by GNU Autoconf 2.52.20210105.  Invocation command line was
947
948   $ $0 $@
949
950 EOF
951 {
952 cat <<_ASUNAME
953 ## ---------- ##
954 ## Platform.  ##
955 ## ---------- ##
956
957 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
958 uname -m = `(uname -m) 2>/dev/null || echo unknown`
959 uname -r = `(uname -r) 2>/dev/null || echo unknown`
960 uname -s = `(uname -s) 2>/dev/null || echo unknown`
961 uname -v = `(uname -v) 2>/dev/null || echo unknown`
962
963 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
964 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
965
966 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
967 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
968 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
969 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
970 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
971 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
972 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
973
974 PATH = $PATH
975
976 _ASUNAME
977 } >&5
978
979 cat >&5 <<EOF
980 ## ------------ ##
981 ## Core tests.  ##
982 ## ------------ ##
983
984 EOF
985
986 # Keep a trace of the command line.
987 # Strip out --no-create and --no-recursion so they do not pile up.
988 # Also quote any args containing shell meta-characters.
989 ac_configure_args=
990 ac_sep=
991 for ac_arg
992 do
993   case "$ac_arg" in
994   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
995   | --no-cr | --no-c) ;;
996   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
997   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
998   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
999     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1000     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1001     ac_sep=" " ;;
1002   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1003      ac_sep=" " ;;
1004   esac
1005   # Get rid of the leading space.
1006 done
1007
1008 # When interrupted or exit'd, cleanup temporary files, and complete
1009 # config.log.  We remove comments because anyway the quotes in there
1010 # would cause problems or look ugly.
1011 trap 'exit_status=$?
1012   # Save into config.log some information that might help in debugging.
1013   echo >&5
1014   echo "## ----------------- ##" >&5
1015   echo "## Cache variables.  ##" >&5
1016   echo "## ----------------- ##" >&5
1017   echo >&5
1018   # The following way of writing the cache mishandles newlines in values,
1019 {
1020   (set) 2>&1 |
1021     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1022     *ac_space=\ *)
1023       sed -n \
1024         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1025           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1026       ;;
1027     *)
1028       sed -n \
1029         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1030       ;;
1031     esac;
1032 } >&5
1033   sed "/^$/d" confdefs.h >conftest.log
1034   if test -s conftest.log; then
1035     echo >&5
1036     echo "## ------------ ##" >&5
1037     echo "## confdefs.h.  ##" >&5
1038     echo "## ------------ ##" >&5
1039     echo >&5
1040     cat conftest.log >&5
1041   fi
1042   (echo; echo) >&5
1043   test "$ac_signal" != 0 &&
1044     echo "$as_me: caught signal $ac_signal" >&5
1045   echo "$as_me: exit $exit_status" >&5
1046   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1047     exit $exit_status
1048      ' 0
1049 for ac_signal in 1 2 13 15; do
1050   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1051 done
1052 ac_signal=0
1053
1054 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1055 rm -rf conftest* confdefs.h
1056 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1057 echo >confdefs.h
1058
1059 # Let the site file select an alternate cache file if it wants to.
1060 # Prefer explicitly selected file to automatically selected ones.
1061 if test -z "$CONFIG_SITE"; then
1062   if test "x$prefix" != xNONE; then
1063     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1064   else
1065     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1066   fi
1067 fi
1068 for ac_site_file in $CONFIG_SITE; do
1069   if test -r "$ac_site_file"; then
1070     { echo "$as_me:1070: loading site script $ac_site_file" >&5
1071 echo "$as_me: loading site script $ac_site_file" >&6;}
1072     cat "$ac_site_file" >&5
1073     . "$ac_site_file"
1074   fi
1075 done
1076
1077 if test -r "$cache_file"; then
1078   # Some versions of bash will fail to source /dev/null (special
1079   # files actually), so we avoid doing that.
1080   if test -f "$cache_file"; then
1081     { echo "$as_me:1081: loading cache $cache_file" >&5
1082 echo "$as_me: loading cache $cache_file" >&6;}
1083     case $cache_file in
1084       [\\/]* | ?:[\\/]* ) . $cache_file;;
1085       *)                      . ./$cache_file;;
1086     esac
1087   fi
1088 else
1089   { echo "$as_me:1089: creating cache $cache_file" >&5
1090 echo "$as_me: creating cache $cache_file" >&6;}
1091   >$cache_file
1092 fi
1093
1094 # Check that the precious variables saved in the cache have kept the same
1095 # value.
1096 ac_cache_corrupted=false
1097 for ac_var in `(set) 2>&1 |
1098                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1099   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1100   eval ac_new_set=\$ac_env_${ac_var}_set
1101   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1102   eval ac_new_val="\$ac_env_${ac_var}_value"
1103   case "$ac_old_set,$ac_new_set" in
1104     set,)
1105       { echo "$as_me:1105: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1106 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1107       ac_cache_corrupted=: ;;
1108     ,set)
1109       { echo "$as_me:1109: error: \`$ac_var' was not set in the previous run" >&5
1110 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1111       ac_cache_corrupted=: ;;
1112     ,);;
1113     *)
1114       if test "x$ac_old_val" != "x$ac_new_val"; then
1115         { echo "$as_me:1115: error: \`$ac_var' has changed since the previous run:" >&5
1116 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1117         { echo "$as_me:1117:   former value:  $ac_old_val" >&5
1118 echo "$as_me:   former value:  $ac_old_val" >&2;}
1119         { echo "$as_me:1119:   current value: $ac_new_val" >&5
1120 echo "$as_me:   current value: $ac_new_val" >&2;}
1121         ac_cache_corrupted=:
1122       fi;;
1123   esac
1124   # Pass precious variables to config.status.  It doesn't matter if
1125   # we pass some twice (in addition to the command line arguments).
1126   if test "$ac_new_set" = set; then
1127     case "$ac_new_val" in
1128     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1129       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1130       ac_configure_args="$ac_configure_args '$ac_arg'"
1131       ;;
1132     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1133        ;;
1134     esac
1135   fi
1136 done
1137 if "$ac_cache_corrupted"; then
1138   { echo "$as_me:1138: error: changes in the environment can compromise the build" >&5
1139 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1140   { { echo "$as_me:1140: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1141 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1142    { (exit 1); exit 1; }; }
1143 fi
1144
1145 ac_ext=c
1146 ac_cpp='$CPP $CPPFLAGS'
1147 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1148 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1149 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1150 ac_main_return="return"
1151
1152 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1153   *c*,-n*) ECHO_N=
1154            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1155            ECHO_T='     '
1156            ;;
1157   *c*,*  ) ECHO_N=-n
1158            ECHO_C=
1159            ECHO_T=
1160            ;;
1161   *)       ECHO_N=
1162            ECHO_C='\c'
1163            ECHO_T=
1164            ;;
1165 esac
1166 echo "#! $SHELL" >conftest.sh
1167 echo  "exit 0"   >>conftest.sh
1168 chmod +x conftest.sh
1169 if { (echo "$as_me:1169: PATH=\".;.\"; conftest.sh") >&5
1170   (PATH=".;."; conftest.sh) 2>&5
1171   ac_status=$?
1172   echo "$as_me:1172: \$? = $ac_status" >&5
1173   (exit "$ac_status"); }; then
1174   ac_path_separator=';'
1175 else
1176   ac_path_separator=:
1177 fi
1178 PATH_SEPARATOR="$ac_path_separator"
1179 rm -f conftest.sh
1180
1181 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1182
1183 top_builddir=`pwd`
1184
1185 for ac_prog in ggrep grep
1186 do
1187   # Extract the first word of "$ac_prog", so it can be a program name with args.
1188 set dummy $ac_prog; ac_word=$2
1189 echo "$as_me:1189: checking for $ac_word" >&5
1190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1191 if test "${ac_cv_prog_GREP+set}" = set; then
1192   echo $ECHO_N "(cached) $ECHO_C" >&6
1193 else
1194   if test -n "$GREP"; then
1195   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1196 else
1197   ac_save_IFS=$IFS; IFS=$ac_path_separator
1198 ac_dummy="$PATH"
1199 for ac_dir in $ac_dummy; do
1200   IFS=$ac_save_IFS
1201   test -z "$ac_dir" && ac_dir=.
1202   $as_executable_p "$ac_dir/$ac_word" || continue
1203 ac_cv_prog_GREP="$ac_prog"
1204 echo "$as_me:1204: found $ac_dir/$ac_word" >&5
1205 break
1206 done
1207
1208 fi
1209 fi
1210 GREP=$ac_cv_prog_GREP
1211 if test -n "$GREP"; then
1212   echo "$as_me:1212: result: $GREP" >&5
1213 echo "${ECHO_T}$GREP" >&6
1214 else
1215   echo "$as_me:1215: result: no" >&5
1216 echo "${ECHO_T}no" >&6
1217 fi
1218
1219   test -n "$GREP" && break
1220 done
1221 test -n "$GREP" || GREP=": "
1222
1223 echo "$as_me:1223: checking for egrep" >&5
1224 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1225 if test "${ac_cv_path_EGREP+set}" = set; then
1226   echo $ECHO_N "(cached) $ECHO_C" >&6
1227 else
1228   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1229    then ac_cv_path_EGREP="$GREP -E"
1230    else
1231      for ac_prog in gegrep egrep
1232 do
1233   # Extract the first word of "$ac_prog", so it can be a program name with args.
1234 set dummy $ac_prog; ac_word=$2
1235 echo "$as_me:1235: checking for $ac_word" >&5
1236 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1237 if test "${ac_cv_path_EGREP+set}" = set; then
1238   echo $ECHO_N "(cached) $ECHO_C" >&6
1239 else
1240   case $EGREP in
1241   [\\/]* | ?:[\\/]*)
1242   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1243   ;;
1244   *)
1245   ac_save_IFS=$IFS; IFS=$ac_path_separator
1246 ac_dummy="$PATH"
1247 for ac_dir in $ac_dummy; do
1248   IFS=$ac_save_IFS
1249   test -z "$ac_dir" && ac_dir=.
1250   if $as_executable_p "$ac_dir/$ac_word"; then
1251    ac_cv_path_EGREP="$ac_dir/$ac_word"
1252    echo "$as_me:1252: found $ac_dir/$ac_word" >&5
1253    break
1254 fi
1255 done
1256
1257   ;;
1258 esac
1259 fi
1260 EGREP=$ac_cv_path_EGREP
1261
1262 if test -n "$EGREP"; then
1263   echo "$as_me:1263: result: $EGREP" >&5
1264 echo "${ECHO_T}$EGREP" >&6
1265 else
1266   echo "$as_me:1266: result: no" >&5
1267 echo "${ECHO_T}no" >&6
1268 fi
1269
1270   test -n "$EGREP" && break
1271 done
1272 test -n "$EGREP" || EGREP=": "
1273
1274      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1274: error: cannot find workable egrep" >&5
1275 echo "$as_me: error: cannot find workable egrep" >&2;}
1276    { (exit 1); exit 1; }; }
1277    fi
1278 fi
1279 echo "$as_me:1279: result: $ac_cv_path_EGREP" >&5
1280 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1281  EGREP="$ac_cv_path_EGREP"
1282
1283 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1284 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1285 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1286 cf_cv_abi_version=${NCURSES_MAJOR}
1287 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1288 cf_cv_timestamp=`date`
1289 echo "$as_me:1289: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1290 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1291
1292 if test -f "$srcdir/VERSION" ; then
1293         echo "$as_me:1293: checking for package version" >&5
1294 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1295
1296         # if there are not enough fields, cut returns the last one...
1297         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1298         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1299         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1300
1301         # this is how CF_BUNDLED_INTL uses $VERSION:
1302         VERSION="$cf_field1"
1303
1304         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1305         test -z "$VERSION_MAJOR" && { { echo "$as_me:1305: error: missing major-version" >&5
1306 echo "$as_me: error: missing major-version" >&2;}
1307    { (exit 1); exit 1; }; }
1308
1309         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1310         test -z "$VERSION_MINOR" && { { echo "$as_me:1310: error: missing minor-version" >&5
1311 echo "$as_me: error: missing minor-version" >&2;}
1312    { (exit 1); exit 1; }; }
1313
1314         echo "$as_me:1314: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1315 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1316
1317         echo "$as_me:1317: checking for package patch date" >&5
1318 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1319         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1320         case .$VERSION_PATCH in
1321         (.)
1322                 { { echo "$as_me:1322: error: missing patch-date $VERSION_PATCH" >&5
1323 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1324    { (exit 1); exit 1; }; }
1325                 ;;
1326         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1327                 ;;
1328         (*)
1329                 { { echo "$as_me:1329: error: illegal patch-date $VERSION_PATCH" >&5
1330 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1331    { (exit 1); exit 1; }; }
1332                 ;;
1333         esac
1334         echo "$as_me:1334: result: $VERSION_PATCH" >&5
1335 echo "${ECHO_T}$VERSION_PATCH" >&6
1336 else
1337         { { echo "$as_me:1337: error: did not find $srcdir/VERSION" >&5
1338 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1339    { (exit 1); exit 1; }; }
1340 fi
1341
1342 # show the actual data that we have for versions:
1343 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1344
1345 echo "${as_me:-configure}:1345: testing ABI VERSION $VERSION ..." 1>&5
1346
1347 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1348
1349 echo "${as_me:-configure}:1349: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1350
1351 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1352
1353 echo "${as_me:-configure}:1353: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1354
1355 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1356
1357 echo "${as_me:-configure}:1357: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1358
1359         cf_PACKAGE=NCURSES
1360         PACKAGE=ncurses
1361
1362 cat >>confdefs.h <<EOF
1363 #define PACKAGE "$PACKAGE"
1364 EOF
1365
1366 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1367
1368         cat >>confdefs.h <<EOF
1369 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1370 EOF
1371
1372         cat >>confdefs.h <<EOF
1373 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1374 EOF
1375
1376 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1377
1378 # Check whether --with-rel-version or --without-rel-version was given.
1379 if test "${with_rel_version+set}" = set; then
1380   withval="$with_rel_version"
1381   { echo "$as_me:1381: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1382 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1383  cf_cv_rel_version=$withval
1384 fi;
1385
1386  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1387  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1388
1389 if test -n "$NCURSES_MAJOR" ; then
1390   case $NCURSES_MAJOR in
1391   ([0-9]*)
1392         ;;
1393   (*)
1394         { { echo "$as_me:1394: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1395 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1396    { (exit 1); exit 1; }; }
1397         ;;
1398   esac
1399 else
1400   { { echo "$as_me:1400: error: Release major-version value is empty" >&5
1401 echo "$as_me: error: Release major-version value is empty" >&2;}
1402    { (exit 1); exit 1; }; }
1403 fi
1404
1405 if test -n "$NCURSES_MINOR" ; then
1406   case $NCURSES_MINOR in
1407   ([0-9]*)
1408         ;;
1409   (*)
1410         { { echo "$as_me:1410: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1411 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1412    { (exit 1); exit 1; }; }
1413         ;;
1414   esac
1415 else
1416   { { echo "$as_me:1416: error: Release minor-version value is empty" >&5
1417 echo "$as_me: error: Release minor-version value is empty" >&2;}
1418    { (exit 1); exit 1; }; }
1419 fi
1420
1421 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1422
1423 # Check whether --with-abi-version or --without-abi-version was given.
1424 if test "${with_abi_version+set}" = set; then
1425   withval="$with_abi_version"
1426
1427         if test "x$cf_cv_abi_version" != "x$withval"
1428         then
1429                 { echo "$as_me:1429: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1430 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1431                 case "$cf_cv_rel_version" in
1432                 (5.*)
1433                         cf_cv_rel_version=$withval.0
1434                         ;;
1435                 (6.*)
1436                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1437                         ;;
1438                 esac
1439         fi
1440         cf_cv_abi_version=$withval
1441 fi;
1442
1443 if test -n "$cf_cv_abi_version" ; then
1444   case $cf_cv_abi_version in
1445   ([0-9]*)
1446         ;;
1447   (*)
1448         { { echo "$as_me:1448: error: ABI version is not a number: $cf_cv_abi_version" >&5
1449 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1450    { (exit 1); exit 1; }; }
1451         ;;
1452   esac
1453 else
1454   { { echo "$as_me:1454: error: ABI version value is empty" >&5
1455 echo "$as_me: error: ABI version value is empty" >&2;}
1456    { (exit 1); exit 1; }; }
1457 fi
1458
1459 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1460 then
1461         case "$cf_cv_rel_version" in
1462         (5.*)
1463                 cf_cv_rel_version=$with_abi_version.0
1464                 ;;
1465         esac
1466 fi
1467
1468 ac_aux_dir=
1469 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1470   if test -f "$ac_dir/install-sh"; then
1471     ac_aux_dir=$ac_dir
1472     ac_install_sh="$ac_aux_dir/install-sh -c"
1473     break
1474   elif test -f "$ac_dir/install.sh"; then
1475     ac_aux_dir=$ac_dir
1476     ac_install_sh="$ac_aux_dir/install.sh -c"
1477     break
1478   elif test -f "$ac_dir/shtool"; then
1479     ac_aux_dir=$ac_dir
1480     ac_install_sh="$ac_aux_dir/shtool install -c"
1481     break
1482   fi
1483 done
1484 if test -z "$ac_aux_dir"; then
1485   { { echo "$as_me:1485: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1486 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1487    { (exit 1); exit 1; }; }
1488 fi
1489 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1490 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1491 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1492
1493 # Make sure we can run config.sub.
1494 $ac_config_sub sun4 >/dev/null 2>&1 ||
1495   { { echo "$as_me:1495: error: cannot run $ac_config_sub" >&5
1496 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1497    { (exit 1); exit 1; }; }
1498
1499 echo "$as_me:1499: checking build system type" >&5
1500 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1501 if test "${ac_cv_build+set}" = set; then
1502   echo $ECHO_N "(cached) $ECHO_C" >&6
1503 else
1504   ac_cv_build_alias=$build_alias
1505 test -z "$ac_cv_build_alias" &&
1506   ac_cv_build_alias=`$ac_config_guess`
1507 test -z "$ac_cv_build_alias" &&
1508   { { echo "$as_me:1508: error: cannot guess build type; you must specify one" >&5
1509 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1510    { (exit 1); exit 1; }; }
1511 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1512   { { echo "$as_me:1512: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1513 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1514    { (exit 1); exit 1; }; }
1515
1516 fi
1517 echo "$as_me:1517: result: $ac_cv_build" >&5
1518 echo "${ECHO_T}$ac_cv_build" >&6
1519 build=$ac_cv_build
1520 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1521 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1522 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1523
1524 echo "$as_me:1524: checking host system type" >&5
1525 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1526 if test "${ac_cv_host+set}" = set; then
1527   echo $ECHO_N "(cached) $ECHO_C" >&6
1528 else
1529   ac_cv_host_alias=$host_alias
1530 test -z "$ac_cv_host_alias" &&
1531   ac_cv_host_alias=$ac_cv_build_alias
1532 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1533   { { echo "$as_me:1533: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1534 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1535    { (exit 1); exit 1; }; }
1536
1537 fi
1538 echo "$as_me:1538: result: $ac_cv_host" >&5
1539 echo "${ECHO_T}$ac_cv_host" >&6
1540 host=$ac_cv_host
1541 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1542 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1543 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1544
1545 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1546         echo "$as_me:1546: checking target system type" >&5
1547 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1548 if test "${ac_cv_target+set}" = set; then
1549   echo $ECHO_N "(cached) $ECHO_C" >&6
1550 else
1551   ac_cv_target_alias=$target_alias
1552 test "x$ac_cv_target_alias" = "x" &&
1553   ac_cv_target_alias=$ac_cv_host_alias
1554 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1555   { { echo "$as_me:1555: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1556 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1557    { (exit 1); exit 1; }; }
1558
1559 fi
1560 echo "$as_me:1560: result: $ac_cv_target" >&5
1561 echo "${ECHO_T}$ac_cv_target" >&6
1562 target=$ac_cv_target
1563 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1564 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1565 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1566
1567 # The aliases save the names the user supplied, while $host etc.
1568 # will get canonicalized.
1569 test -n "$target_alias" &&
1570   test "$program_prefix$program_suffix$program_transform_name" = \
1571     NONENONEs,x,x, &&
1572   program_prefix=${target_alias}-
1573         system_name="$host_os"
1574 else
1575         system_name="`(uname -s -r) 2>/dev/null`"
1576         if test -z "$system_name" ; then
1577                 system_name="`(hostname) 2>/dev/null`"
1578         fi
1579 fi
1580 test -n "$system_name" &&
1581 cat >>confdefs.h <<EOF
1582 #define SYSTEM_NAME "$system_name"
1583 EOF
1584
1585 if test "${cf_cv_system_name+set}" = set; then
1586   echo $ECHO_N "(cached) $ECHO_C" >&6
1587 else
1588   cf_cv_system_name="$system_name"
1589 fi
1590
1591 test -z "$system_name" && system_name="$cf_cv_system_name"
1592 test -n "$cf_cv_system_name" && echo "$as_me:1592: result: Configuring for $cf_cv_system_name" >&5
1593 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1594
1595 if test ".$system_name" != ".$cf_cv_system_name" ; then
1596         echo "$as_me:1596: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1597 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1598         { { echo "$as_me:1598: error: \"Please remove config.cache and try again.\"" >&5
1599 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1600    { (exit 1); exit 1; }; }
1601 fi
1602
1603 # Check whether --with-system-type or --without-system-type was given.
1604 if test "${with_system_type+set}" = set; then
1605   withval="$with_system_type"
1606   { echo "$as_me:1606: WARNING: overriding system type to $withval" >&5
1607 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1608         cf_cv_system_name=$withval
1609         host_os=$withval
1610
1611 fi;
1612
1613 ###     Save the given $CFLAGS to allow user-override.
1614 cf_user_CFLAGS="$CFLAGS"
1615
1616 ###     Default install-location
1617 echo "$as_me:1617: checking for fgrep" >&5
1618 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1619 if test "${ac_cv_path_FGREP+set}" = set; then
1620   echo $ECHO_N "(cached) $ECHO_C" >&6
1621 else
1622   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1623    then ac_cv_path_FGREP="$GREP -F"
1624    else
1625      for ac_prog in gfgrep fgrep
1626 do
1627   # Extract the first word of "$ac_prog", so it can be a program name with args.
1628 set dummy $ac_prog; ac_word=$2
1629 echo "$as_me:1629: checking for $ac_word" >&5
1630 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1631 if test "${ac_cv_path_FGREP+set}" = set; then
1632   echo $ECHO_N "(cached) $ECHO_C" >&6
1633 else
1634   case $FGREP in
1635   [\\/]* | ?:[\\/]*)
1636   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1637   ;;
1638   *)
1639   ac_save_IFS=$IFS; IFS=$ac_path_separator
1640 ac_dummy="$PATH"
1641 for ac_dir in $ac_dummy; do
1642   IFS=$ac_save_IFS
1643   test -z "$ac_dir" && ac_dir=.
1644   if $as_executable_p "$ac_dir/$ac_word"; then
1645    ac_cv_path_FGREP="$ac_dir/$ac_word"
1646    echo "$as_me:1646: found $ac_dir/$ac_word" >&5
1647    break
1648 fi
1649 done
1650
1651   ;;
1652 esac
1653 fi
1654 FGREP=$ac_cv_path_FGREP
1655
1656 if test -n "$FGREP"; then
1657   echo "$as_me:1657: result: $FGREP" >&5
1658 echo "${ECHO_T}$FGREP" >&6
1659 else
1660   echo "$as_me:1660: result: no" >&5
1661 echo "${ECHO_T}no" >&6
1662 fi
1663
1664   test -n "$FGREP" && break
1665 done
1666 test -n "$FGREP" || FGREP=": "
1667
1668      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1668: error: cannot find workable fgrep" >&5
1669 echo "$as_me: error: cannot find workable fgrep" >&2;}
1670    { (exit 1); exit 1; }; }
1671    fi
1672 fi
1673 echo "$as_me:1673: result: $ac_cv_path_FGREP" >&5
1674 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1675  FGREP="$ac_cv_path_FGREP"
1676
1677 echo "$as_me:1677: checking for prefix" >&5
1678 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1679 if test "x$prefix" = "xNONE" ; then
1680         case "$cf_cv_system_name" in
1681                 # non-vendor systems don't have a conflict
1682         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1683                 prefix=/usr
1684                 ;;
1685         (*)     prefix=$ac_default_prefix
1686                 ;;
1687         esac
1688 fi
1689 echo "$as_me:1689: result: $prefix" >&5
1690 echo "${ECHO_T}$prefix" >&6
1691
1692 if test "x$prefix" = "xNONE" ; then
1693 echo "$as_me:1693: checking for default include-directory" >&5
1694 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1695 test -n "$verbose" && echo 1>&6
1696 for cf_symbol in \
1697         "$includedir" \
1698         "$includedir/ncurses" \
1699         "$prefix/include" \
1700         "$prefix/include/ncurses" \
1701         /usr/local/include \
1702         /usr/local/include/ncurses \
1703         /usr/include \
1704         /usr/include/ncurses
1705 do
1706         cf_dir=`eval echo "$cf_symbol"`
1707         if test -f "$cf_dir/curses.h" ; then
1708         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1709                 includedir="$cf_symbol"
1710                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1711                 break
1712         fi
1713         fi
1714         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1715 done
1716 echo "$as_me:1716: result: $includedir" >&5
1717 echo "${ECHO_T}$includedir" >&6
1718 fi
1719
1720 ### Defaults for ncurses ABI
1721
1722 case x$cf_cv_abi_version in
1723 (x[6789])
1724         cf_dft_ext_colors=yes
1725         cf_dft_ext_const=yes
1726         cf_dft_ext_mouse=yes
1727         cf_dft_ext_putwin=yes
1728         cf_dft_ext_spfuncs=yes
1729         cf_dft_filter_syms=yes
1730         cf_dft_chtype=uint32_t
1731         cf_dft_mmask_t=uint32_t
1732         cf_dft_interop=yes
1733         cf_dft_tparm_arg=intptr_t
1734         cf_dft_with_lp64=yes
1735         ;;
1736 (*)
1737         cf_dft_ext_colors=no
1738         cf_dft_ext_const=no
1739         cf_dft_ext_mouse=no
1740         cf_dft_ext_putwin=no
1741         cf_dft_ext_spfuncs=no
1742         cf_dft_filter_syms=no
1743         cf_dft_chtype=auto
1744         cf_dft_mmask_t=auto
1745         cf_dft_interop=no
1746         cf_dft_tparm_arg=long
1747         cf_dft_with_lp64=no
1748         ;;
1749 esac
1750
1751 ###     Checks for programs.
1752
1753 # Check whether --with-ada or --without-ada was given.
1754 if test "${with_ada+set}" = set; then
1755   withval="$with_ada"
1756   cf_with_ada=$withval
1757 else
1758   cf_with_ada=yes
1759 fi;
1760
1761 if test "x$cf_with_ada" = xyes
1762 then
1763         cf_prog_cc="gnatgcc gcc cc"
1764 else
1765         cf_prog_cc="gcc cc"
1766 fi
1767
1768 ac_ext=c
1769 ac_cpp='$CPP $CPPFLAGS'
1770 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1771 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1772 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1773 ac_main_return="return"
1774 if test -n "$ac_tool_prefix"; then
1775   for ac_prog in $cf_prog_cc
1776   do
1777     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1778 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1779 echo "$as_me:1779: checking for $ac_word" >&5
1780 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1781 if test "${ac_cv_prog_CC+set}" = set; then
1782   echo $ECHO_N "(cached) $ECHO_C" >&6
1783 else
1784   if test -n "$CC"; then
1785   ac_cv_prog_CC="$CC" # Let the user override the test.
1786 else
1787   ac_save_IFS=$IFS; IFS=$ac_path_separator
1788 ac_dummy="$PATH"
1789 for ac_dir in $ac_dummy; do
1790   IFS=$ac_save_IFS
1791   test -z "$ac_dir" && ac_dir=.
1792   $as_executable_p "$ac_dir/$ac_word" || continue
1793 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1794 echo "$as_me:1794: found $ac_dir/$ac_word" >&5
1795 break
1796 done
1797
1798 fi
1799 fi
1800 CC=$ac_cv_prog_CC
1801 if test -n "$CC"; then
1802   echo "$as_me:1802: result: $CC" >&5
1803 echo "${ECHO_T}$CC" >&6
1804 else
1805   echo "$as_me:1805: result: no" >&5
1806 echo "${ECHO_T}no" >&6
1807 fi
1808
1809     test -n "$CC" && break
1810   done
1811 fi
1812 if test -z "$CC"; then
1813   ac_ct_CC=$CC
1814   for ac_prog in $cf_prog_cc
1815 do
1816   # Extract the first word of "$ac_prog", so it can be a program name with args.
1817 set dummy $ac_prog; ac_word=$2
1818 echo "$as_me:1818: checking for $ac_word" >&5
1819 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1820 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1821   echo $ECHO_N "(cached) $ECHO_C" >&6
1822 else
1823   if test -n "$ac_ct_CC"; then
1824   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1825 else
1826   ac_save_IFS=$IFS; IFS=$ac_path_separator
1827 ac_dummy="$PATH"
1828 for ac_dir in $ac_dummy; do
1829   IFS=$ac_save_IFS
1830   test -z "$ac_dir" && ac_dir=.
1831   $as_executable_p "$ac_dir/$ac_word" || continue
1832 ac_cv_prog_ac_ct_CC="$ac_prog"
1833 echo "$as_me:1833: found $ac_dir/$ac_word" >&5
1834 break
1835 done
1836
1837 fi
1838 fi
1839 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1840 if test -n "$ac_ct_CC"; then
1841   echo "$as_me:1841: result: $ac_ct_CC" >&5
1842 echo "${ECHO_T}$ac_ct_CC" >&6
1843 else
1844   echo "$as_me:1844: result: no" >&5
1845 echo "${ECHO_T}no" >&6
1846 fi
1847
1848   test -n "$ac_ct_CC" && break
1849 done
1850
1851   CC=$ac_ct_CC
1852 fi
1853
1854 test -z "$CC" && { { echo "$as_me:1854: error: no acceptable cc found in \$PATH" >&5
1855 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1856    { (exit 1); exit 1; }; }
1857
1858 # Provide some information about the compiler.
1859 echo "$as_me:1859:" \
1860      "checking for C compiler version" >&5
1861 ac_compiler=`set X $ac_compile; echo "$2"`
1862 { (eval echo "$as_me:1862: \"$ac_compiler --version </dev/null >&5\"") >&5
1863   (eval $ac_compiler --version </dev/null >&5) 2>&5
1864   ac_status=$?
1865   echo "$as_me:1865: \$? = $ac_status" >&5
1866   (exit "$ac_status"); }
1867 { (eval echo "$as_me:1867: \"$ac_compiler -v </dev/null >&5\"") >&5
1868   (eval $ac_compiler -v </dev/null >&5) 2>&5
1869   ac_status=$?
1870   echo "$as_me:1870: \$? = $ac_status" >&5
1871   (exit "$ac_status"); }
1872 { (eval echo "$as_me:1872: \"$ac_compiler -V </dev/null >&5\"") >&5
1873   (eval $ac_compiler -V </dev/null >&5) 2>&5
1874   ac_status=$?
1875   echo "$as_me:1875: \$? = $ac_status" >&5
1876   (exit "$ac_status"); }
1877
1878 cat >"conftest.$ac_ext" <<_ACEOF
1879 #line 1879 "configure"
1880 #include "confdefs.h"
1881
1882 int
1883 main (void)
1884 {
1885
1886   ;
1887   return 0;
1888 }
1889 _ACEOF
1890 ac_clean_files_save=$ac_clean_files
1891 ac_clean_files="$ac_clean_files a.out a.exe"
1892 # Try to create an executable without -o first, disregard a.out.
1893 # It will help us diagnose broken compilers, and finding out an intuition
1894 # of exeext.
1895 echo "$as_me:1895: checking for C compiler default output" >&5
1896 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1897 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1898 if { (eval echo "$as_me:1898: \"$ac_link_default\"") >&5
1899   (eval $ac_link_default) 2>&5
1900   ac_status=$?
1901   echo "$as_me:1901: \$? = $ac_status" >&5
1902   (exit "$ac_status"); }; then
1903   # Find the output, starting from the most likely.  This scheme is
1904 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1905 # resort.
1906 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1907                 ls a.out conftest 2>/dev/null;
1908                 ls a.* conftest.* 2>/dev/null`; do
1909   case $ac_file in
1910     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1911     a.out ) # We found the default executable, but exeext='' is most
1912             # certainly right.
1913             break;;
1914     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1915           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1916           export ac_cv_exeext
1917           break;;
1918     * ) break;;
1919   esac
1920 done
1921 else
1922   echo "$as_me: failed program was:" >&5
1923 cat "conftest.$ac_ext" >&5
1924 { { echo "$as_me:1924: error: C compiler cannot create executables" >&5
1925 echo "$as_me: error: C compiler cannot create executables" >&2;}
1926    { (exit 77); exit 77; }; }
1927 fi
1928
1929 ac_exeext=$ac_cv_exeext
1930 echo "$as_me:1930: result: $ac_file" >&5
1931 echo "${ECHO_T}$ac_file" >&6
1932
1933 # Check the compiler produces executables we can run.  If not, either
1934 # the compiler is broken, or we cross compile.
1935 echo "$as_me:1935: checking whether the C compiler works" >&5
1936 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1937 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1938 # If not cross compiling, check that we can run a simple program.
1939 if test "$cross_compiling" != yes; then
1940   if { ac_try='./$ac_file'
1941   { (eval echo "$as_me:1941: \"$ac_try\"") >&5
1942   (eval $ac_try) 2>&5
1943   ac_status=$?
1944   echo "$as_me:1944: \$? = $ac_status" >&5
1945   (exit "$ac_status"); }; }; then
1946     cross_compiling=no
1947   else
1948     if test "$cross_compiling" = maybe; then
1949         cross_compiling=yes
1950     else
1951         { { echo "$as_me:1951: error: cannot run C compiled programs.
1952 If you meant to cross compile, use \`--host'." >&5
1953 echo "$as_me: error: cannot run C compiled programs.
1954 If you meant to cross compile, use \`--host'." >&2;}
1955    { (exit 1); exit 1; }; }
1956     fi
1957   fi
1958 fi
1959 echo "$as_me:1959: result: yes" >&5
1960 echo "${ECHO_T}yes" >&6
1961
1962 rm -f a.out a.exe "conftest$ac_cv_exeext"
1963 ac_clean_files=$ac_clean_files_save
1964 # Check the compiler produces executables we can run.  If not, either
1965 # the compiler is broken, or we cross compile.
1966 echo "$as_me:1966: checking whether we are cross compiling" >&5
1967 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1968 echo "$as_me:1968: result: $cross_compiling" >&5
1969 echo "${ECHO_T}$cross_compiling" >&6
1970
1971 echo "$as_me:1971: checking for executable suffix" >&5
1972 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1973 if { (eval echo "$as_me:1973: \"$ac_link\"") >&5
1974   (eval $ac_link) 2>&5
1975   ac_status=$?
1976   echo "$as_me:1976: \$? = $ac_status" >&5
1977   (exit "$ac_status"); }; then
1978   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1979 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1980 # work properly (i.e., refer to `conftest.exe'), while it won't with
1981 # `rm'.
1982 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1983   case $ac_file in
1984     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1985     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1986           export ac_cv_exeext
1987           break;;
1988     * ) break;;
1989   esac
1990 done
1991 else
1992   { { echo "$as_me:1992: error: cannot compute EXEEXT: cannot compile and link" >&5
1993 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1994    { (exit 1); exit 1; }; }
1995 fi
1996
1997 rm -f "conftest$ac_cv_exeext"
1998 echo "$as_me:1998: result: $ac_cv_exeext" >&5
1999 echo "${ECHO_T}$ac_cv_exeext" >&6
2000
2001 rm -f "conftest.$ac_ext"
2002 EXEEXT=$ac_cv_exeext
2003 ac_exeext=$EXEEXT
2004 echo "$as_me:2004: checking for object suffix" >&5
2005 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2006 if test "${ac_cv_objext+set}" = set; then
2007   echo $ECHO_N "(cached) $ECHO_C" >&6
2008 else
2009   cat >"conftest.$ac_ext" <<_ACEOF
2010 #line 2010 "configure"
2011 #include "confdefs.h"
2012
2013 int
2014 main (void)
2015 {
2016
2017   ;
2018   return 0;
2019 }
2020 _ACEOF
2021 rm -f conftest.o conftest.obj
2022 if { (eval echo "$as_me:2022: \"$ac_compile\"") >&5
2023   (eval $ac_compile) 2>&5
2024   ac_status=$?
2025   echo "$as_me:2025: \$? = $ac_status" >&5
2026   (exit "$ac_status"); }; then
2027   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2028   case $ac_file in
2029     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2030     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2031        break;;
2032   esac
2033 done
2034 else
2035   echo "$as_me: failed program was:" >&5
2036 cat "conftest.$ac_ext" >&5
2037 { { echo "$as_me:2037: error: cannot compute OBJEXT: cannot compile" >&5
2038 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2039    { (exit 1); exit 1; }; }
2040 fi
2041
2042 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2043 fi
2044 echo "$as_me:2044: result: $ac_cv_objext" >&5
2045 echo "${ECHO_T}$ac_cv_objext" >&6
2046 OBJEXT=$ac_cv_objext
2047 ac_objext=$OBJEXT
2048 echo "$as_me:2048: checking whether we are using the GNU C compiler" >&5
2049 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2050 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2051   echo $ECHO_N "(cached) $ECHO_C" >&6
2052 else
2053   cat >"conftest.$ac_ext" <<_ACEOF
2054 #line 2054 "configure"
2055 #include "confdefs.h"
2056
2057 int
2058 main (void)
2059 {
2060 #ifndef __GNUC__
2061        choke me
2062 #endif
2063
2064   ;
2065   return 0;
2066 }
2067 _ACEOF
2068 rm -f "conftest.$ac_objext"
2069 if { (eval echo "$as_me:2069: \"$ac_compile\"") >&5
2070   (eval $ac_compile) 2>&5
2071   ac_status=$?
2072   echo "$as_me:2072: \$? = $ac_status" >&5
2073   (exit "$ac_status"); } &&
2074          { ac_try='test -s "conftest.$ac_objext"'
2075   { (eval echo "$as_me:2075: \"$ac_try\"") >&5
2076   (eval $ac_try) 2>&5
2077   ac_status=$?
2078   echo "$as_me:2078: \$? = $ac_status" >&5
2079   (exit "$ac_status"); }; }; then
2080   ac_compiler_gnu=yes
2081 else
2082   echo "$as_me: failed program was:" >&5
2083 cat "conftest.$ac_ext" >&5
2084 ac_compiler_gnu=no
2085 fi
2086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2087 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2088
2089 fi
2090 echo "$as_me:2090: result: $ac_cv_c_compiler_gnu" >&5
2091 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2092 GCC=`test $ac_compiler_gnu = yes && echo yes`
2093 ac_test_CFLAGS=${CFLAGS+set}
2094 ac_save_CFLAGS=$CFLAGS
2095 CFLAGS="-g"
2096 echo "$as_me:2096: checking whether $CC accepts -g" >&5
2097 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2098 if test "${ac_cv_prog_cc_g+set}" = set; then
2099   echo $ECHO_N "(cached) $ECHO_C" >&6
2100 else
2101   cat >"conftest.$ac_ext" <<_ACEOF
2102 #line 2102 "configure"
2103 #include "confdefs.h"
2104
2105 int
2106 main (void)
2107 {
2108
2109   ;
2110   return 0;
2111 }
2112 _ACEOF
2113 rm -f "conftest.$ac_objext"
2114 if { (eval echo "$as_me:2114: \"$ac_compile\"") >&5
2115   (eval $ac_compile) 2>&5
2116   ac_status=$?
2117   echo "$as_me:2117: \$? = $ac_status" >&5
2118   (exit "$ac_status"); } &&
2119          { ac_try='test -s "conftest.$ac_objext"'
2120   { (eval echo "$as_me:2120: \"$ac_try\"") >&5
2121   (eval $ac_try) 2>&5
2122   ac_status=$?
2123   echo "$as_me:2123: \$? = $ac_status" >&5
2124   (exit "$ac_status"); }; }; then
2125   ac_cv_prog_cc_g=yes
2126 else
2127   echo "$as_me: failed program was:" >&5
2128 cat "conftest.$ac_ext" >&5
2129 ac_cv_prog_cc_g=no
2130 fi
2131 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2132 fi
2133 echo "$as_me:2133: result: $ac_cv_prog_cc_g" >&5
2134 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2135 if test "$ac_test_CFLAGS" = set; then
2136   CFLAGS=$ac_save_CFLAGS
2137 elif test $ac_cv_prog_cc_g = yes; then
2138   if test "$GCC" = yes; then
2139     CFLAGS="-g -O2"
2140   else
2141     CFLAGS="-g"
2142   fi
2143 else
2144   if test "$GCC" = yes; then
2145     CFLAGS="-O2"
2146   else
2147     CFLAGS=
2148   fi
2149 fi
2150 # Some people use a C++ compiler to compile C.  Since we use `exit',
2151 # in C++ we need to declare it.  In case someone uses the same compiler
2152 # for both compiling C and C++ we need to have the C++ compiler decide
2153 # the declaration of exit, since it's the most demanding environment.
2154 cat >"conftest.$ac_ext" <<_ACEOF
2155 #ifndef __cplusplus
2156   choke me
2157 #endif
2158 _ACEOF
2159 rm -f "conftest.$ac_objext"
2160 if { (eval echo "$as_me:2160: \"$ac_compile\"") >&5
2161   (eval $ac_compile) 2>&5
2162   ac_status=$?
2163   echo "$as_me:2163: \$? = $ac_status" >&5
2164   (exit "$ac_status"); } &&
2165          { ac_try='test -s "conftest.$ac_objext"'
2166   { (eval echo "$as_me:2166: \"$ac_try\"") >&5
2167   (eval $ac_try) 2>&5
2168   ac_status=$?
2169   echo "$as_me:2169: \$? = $ac_status" >&5
2170   (exit "$ac_status"); }; }; then
2171   for ac_declaration in \
2172    ''\
2173    '#include <stdlib.h>' \
2174    'extern "C" void std::exit (int) throw (); using std::exit;' \
2175    'extern "C" void std::exit (int); using std::exit;' \
2176    'extern "C" void exit (int) throw ();' \
2177    'extern "C" void exit (int);' \
2178    'void exit (int);'
2179 do
2180   cat >"conftest.$ac_ext" <<_ACEOF
2181 #line 2181 "configure"
2182 #include "confdefs.h"
2183 #include <stdlib.h>
2184 $ac_declaration
2185 int
2186 main (void)
2187 {
2188 exit (42);
2189   ;
2190   return 0;
2191 }
2192 _ACEOF
2193 rm -f "conftest.$ac_objext"
2194 if { (eval echo "$as_me:2194: \"$ac_compile\"") >&5
2195   (eval $ac_compile) 2>&5
2196   ac_status=$?
2197   echo "$as_me:2197: \$? = $ac_status" >&5
2198   (exit "$ac_status"); } &&
2199          { ac_try='test -s "conftest.$ac_objext"'
2200   { (eval echo "$as_me:2200: \"$ac_try\"") >&5
2201   (eval $ac_try) 2>&5
2202   ac_status=$?
2203   echo "$as_me:2203: \$? = $ac_status" >&5
2204   (exit "$ac_status"); }; }; then
2205   :
2206 else
2207   echo "$as_me: failed program was:" >&5
2208 cat "conftest.$ac_ext" >&5
2209 continue
2210 fi
2211 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2212   cat >"conftest.$ac_ext" <<_ACEOF
2213 #line 2213 "configure"
2214 #include "confdefs.h"
2215 $ac_declaration
2216 int
2217 main (void)
2218 {
2219 exit (42);
2220   ;
2221   return 0;
2222 }
2223 _ACEOF
2224 rm -f "conftest.$ac_objext"
2225 if { (eval echo "$as_me:2225: \"$ac_compile\"") >&5
2226   (eval $ac_compile) 2>&5
2227   ac_status=$?
2228   echo "$as_me:2228: \$? = $ac_status" >&5
2229   (exit "$ac_status"); } &&
2230          { ac_try='test -s "conftest.$ac_objext"'
2231   { (eval echo "$as_me:2231: \"$ac_try\"") >&5
2232   (eval $ac_try) 2>&5
2233   ac_status=$?
2234   echo "$as_me:2234: \$? = $ac_status" >&5
2235   (exit "$ac_status"); }; }; then
2236   break
2237 else
2238   echo "$as_me: failed program was:" >&5
2239 cat "conftest.$ac_ext" >&5
2240 fi
2241 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2242 done
2243 rm -rf conftest*
2244 if test -n "$ac_declaration"; then
2245   echo '#ifdef __cplusplus' >>confdefs.h
2246   echo "$ac_declaration"    >>confdefs.h
2247   echo '#endif'             >>confdefs.h
2248 fi
2249
2250 else
2251   echo "$as_me: failed program was:" >&5
2252 cat "conftest.$ac_ext" >&5
2253 fi
2254 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2255 ac_ext=c
2256 ac_cpp='$CPP $CPPFLAGS'
2257 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2258 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2259 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2260 ac_main_return="return"
2261
2262 GCC_VERSION=none
2263 if test "$GCC" = yes ; then
2264         echo "$as_me:2264: checking version of $CC" >&5
2265 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2266         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2267         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2268         echo "$as_me:2268: result: $GCC_VERSION" >&5
2269 echo "${ECHO_T}$GCC_VERSION" >&6
2270 fi
2271
2272 INTEL_COMPILER=no
2273
2274 if test "$GCC" = yes ; then
2275         case "$host_os" in
2276         (linux*|gnu*)
2277                 echo "$as_me:2277: checking if this is really Intel C compiler" >&5
2278 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2279                 cf_save_CFLAGS="$CFLAGS"
2280                 CFLAGS="$CFLAGS -no-gcc"
2281                 cat >"conftest.$ac_ext" <<_ACEOF
2282 #line 2282 "configure"
2283 #include "confdefs.h"
2284
2285 int
2286 main (void)
2287 {
2288
2289 #ifdef __INTEL_COMPILER
2290 #else
2291 make an error
2292 #endif
2293
2294   ;
2295   return 0;
2296 }
2297 _ACEOF
2298 rm -f "conftest.$ac_objext"
2299 if { (eval echo "$as_me:2299: \"$ac_compile\"") >&5
2300   (eval $ac_compile) 2>&5
2301   ac_status=$?
2302   echo "$as_me:2302: \$? = $ac_status" >&5
2303   (exit "$ac_status"); } &&
2304          { ac_try='test -s "conftest.$ac_objext"'
2305   { (eval echo "$as_me:2305: \"$ac_try\"") >&5
2306   (eval $ac_try) 2>&5
2307   ac_status=$?
2308   echo "$as_me:2308: \$? = $ac_status" >&5
2309   (exit "$ac_status"); }; }; then
2310   INTEL_COMPILER=yes
2311 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2312
2313 else
2314   echo "$as_me: failed program was:" >&5
2315 cat "conftest.$ac_ext" >&5
2316 fi
2317 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2318                 CFLAGS="$cf_save_CFLAGS"
2319                 echo "$as_me:2319: result: $INTEL_COMPILER" >&5
2320 echo "${ECHO_T}$INTEL_COMPILER" >&6
2321                 ;;
2322         esac
2323 fi
2324
2325 CLANG_COMPILER=no
2326
2327 if test "$GCC" = yes ; then
2328         echo "$as_me:2328: checking if this is really Clang C compiler" >&5
2329 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2330         cf_save_CFLAGS="$CFLAGS"
2331         cat >"conftest.$ac_ext" <<_ACEOF
2332 #line 2332 "configure"
2333 #include "confdefs.h"
2334
2335 int
2336 main (void)
2337 {
2338
2339 #ifdef __clang__
2340 #else
2341 make an error
2342 #endif
2343
2344   ;
2345   return 0;
2346 }
2347 _ACEOF
2348 rm -f "conftest.$ac_objext"
2349 if { (eval echo "$as_me:2349: \"$ac_compile\"") >&5
2350   (eval $ac_compile) 2>&5
2351   ac_status=$?
2352   echo "$as_me:2352: \$? = $ac_status" >&5
2353   (exit "$ac_status"); } &&
2354          { ac_try='test -s "conftest.$ac_objext"'
2355   { (eval echo "$as_me:2355: \"$ac_try\"") >&5
2356   (eval $ac_try) 2>&5
2357   ac_status=$?
2358   echo "$as_me:2358: \$? = $ac_status" >&5
2359   (exit "$ac_status"); }; }; then
2360   CLANG_COMPILER=yes
2361
2362 else
2363   echo "$as_me: failed program was:" >&5
2364 cat "conftest.$ac_ext" >&5
2365 fi
2366 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2367         CFLAGS="$cf_save_CFLAGS"
2368         echo "$as_me:2368: result: $CLANG_COMPILER" >&5
2369 echo "${ECHO_T}$CLANG_COMPILER" >&6
2370 fi
2371
2372 CLANG_VERSION=none
2373
2374 if test "x$CLANG_COMPILER" = "xyes" ; then
2375         case "$CC" in
2376         (c[1-9][0-9]|*/c[1-9][0-9])
2377                 { echo "$as_me:2377: WARNING: replacing broken compiler alias $CC" >&5
2378 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2379                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2380                 CC=clang
2381                 ;;
2382         esac
2383
2384         echo "$as_me:2384: checking version of $CC" >&5
2385 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2386         CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2387         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2388         echo "$as_me:2388: result: $CLANG_VERSION" >&5
2389 echo "${ECHO_T}$CLANG_VERSION" >&6
2390
2391         for cf_clang_opt in \
2392                 -Qunused-arguments \
2393                 -Wno-error=implicit-function-declaration
2394         do
2395                 echo "$as_me:2395: checking if option $cf_clang_opt works" >&5
2396 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2397                 cf_save_CFLAGS="$CFLAGS"
2398                 CFLAGS="$CFLAGS $cf_clang_opt"
2399                 cat >"conftest.$ac_ext" <<_ACEOF
2400 #line 2400 "configure"
2401 #include "confdefs.h"
2402
2403                         #include <stdio.h>
2404 int
2405 main (void)
2406 {
2407
2408                         printf("hello!\\n");
2409   ;
2410   return 0;
2411 }
2412 _ACEOF
2413 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2414 if { (eval echo "$as_me:2414: \"$ac_link\"") >&5
2415   (eval $ac_link) 2>&5
2416   ac_status=$?
2417   echo "$as_me:2417: \$? = $ac_status" >&5
2418   (exit "$ac_status"); } &&
2419          { ac_try='test -s "conftest$ac_exeext"'
2420   { (eval echo "$as_me:2420: \"$ac_try\"") >&5
2421   (eval $ac_try) 2>&5
2422   ac_status=$?
2423   echo "$as_me:2423: \$? = $ac_status" >&5
2424   (exit "$ac_status"); }; }; then
2425
2426                         cf_clang_optok=yes
2427 else
2428   echo "$as_me: failed program was:" >&5
2429 cat "conftest.$ac_ext" >&5
2430
2431                         cf_clang_optok=no
2432 fi
2433 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2434                 echo "$as_me:2434: result: $cf_clang_optok" >&5
2435 echo "${ECHO_T}$cf_clang_optok" >&6
2436                 CFLAGS="$cf_save_CFLAGS"
2437                 if test "$cf_clang_optok" = yes; then
2438                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2439
2440 echo "${as_me:-configure}:2440: testing adding option $cf_clang_opt ..." 1>&5
2441
2442         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2443         CFLAGS="${CFLAGS}$cf_clang_opt"
2444
2445                 fi
2446         done
2447 fi
2448
2449 echo "$as_me:2449: checking for $CC option to accept ANSI C" >&5
2450 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2451 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2452   echo $ECHO_N "(cached) $ECHO_C" >&6
2453 else
2454   ac_cv_prog_cc_stdc=no
2455 ac_save_CC=$CC
2456 cat >"conftest.$ac_ext" <<_ACEOF
2457 #line 2457 "configure"
2458 #include "confdefs.h"
2459 #include <stdarg.h>
2460 #include <stdio.h>
2461 #include <sys/types.h>
2462 #include <sys/stat.h>
2463 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2464 struct buf { int x; };
2465 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2466 static char *e (p, i)
2467      char **p;
2468      int i;
2469 {
2470   return p[i];
2471 }
2472 static char *f (char * (*g) (char **, int), char **p, ...)
2473 {
2474   char *s;
2475   va_list v;
2476   va_start (v,p);
2477   s = g (p, va_arg (v,int));
2478   va_end (v);
2479   return s;
2480 }
2481 int test (int i, double x);
2482 struct s1 {int (*f) (int a);};
2483 struct s2 {int (*f) (double a);};
2484 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2485 int argc;
2486 char **argv;
2487 int
2488 main (void)
2489 {
2490 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2491   ;
2492   return 0;
2493 }
2494 _ACEOF
2495 # Don't try gcc -ansi; that turns off useful extensions and
2496 # breaks some systems' header files.
2497 # AIX                   -qlanglvl=ansi
2498 # Ultrix and OSF/1      -std1
2499 # HP-UX 10.20 and later -Ae
2500 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2501 # SVR4                  -Xc -D__EXTENSIONS__
2502 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2503 do
2504   CC="$ac_save_CC $ac_arg"
2505   rm -f "conftest.$ac_objext"
2506 if { (eval echo "$as_me:2506: \"$ac_compile\"") >&5
2507   (eval $ac_compile) 2>&5
2508   ac_status=$?
2509   echo "$as_me:2509: \$? = $ac_status" >&5
2510   (exit "$ac_status"); } &&
2511          { ac_try='test -s "conftest.$ac_objext"'
2512   { (eval echo "$as_me:2512: \"$ac_try\"") >&5
2513   (eval $ac_try) 2>&5
2514   ac_status=$?
2515   echo "$as_me:2515: \$? = $ac_status" >&5
2516   (exit "$ac_status"); }; }; then
2517   ac_cv_prog_cc_stdc=$ac_arg
2518 break
2519 else
2520   echo "$as_me: failed program was:" >&5
2521 cat "conftest.$ac_ext" >&5
2522 fi
2523 rm -f "conftest.$ac_objext"
2524 done
2525 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2526 CC=$ac_save_CC
2527
2528 fi
2529
2530 case "x$ac_cv_prog_cc_stdc" in
2531   x|xno)
2532     echo "$as_me:2532: result: none needed" >&5
2533 echo "${ECHO_T}none needed" >&6 ;;
2534   *)
2535     echo "$as_me:2535: result: $ac_cv_prog_cc_stdc" >&5
2536 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2537     CC="$CC $ac_cv_prog_cc_stdc" ;;
2538 esac
2539
2540 # This should have been defined by AC_PROG_CC
2541 : "${CC:=cc}"
2542
2543 echo "$as_me:2543: checking \$CFLAGS variable" >&5
2544 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2545 case "x$CFLAGS" in
2546 (*-[IUD]*)
2547         echo "$as_me:2547: result: broken" >&5
2548 echo "${ECHO_T}broken" >&6
2549         { echo "$as_me:2549: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2550 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2551         cf_flags="$CFLAGS"
2552         CFLAGS=
2553         for cf_arg in $cf_flags
2554         do
2555
2556 cf_fix_cppflags=no
2557 cf_new_cflags=
2558 cf_new_cppflags=
2559 cf_new_extra_cppflags=
2560
2561 for cf_add_cflags in $cf_arg
2562 do
2563 case "$cf_fix_cppflags" in
2564 (no)
2565         case "$cf_add_cflags" in
2566         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2567                 case "$cf_add_cflags" in
2568                 (-D*)
2569                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2570
2571                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2572                                 && test -z "${cf_tst_cflags}" \
2573                                 && cf_fix_cppflags=yes
2574
2575                         if test "$cf_fix_cppflags" = yes ; then
2576
2577         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2578         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2579
2580                                 continue
2581                         elif test "${cf_tst_cflags}" = "\"'" ; then
2582
2583         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2584         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2585
2586                                 continue
2587                         fi
2588                         ;;
2589                 esac
2590                 case "$CPPFLAGS" in
2591                 (*$cf_add_cflags)
2592                         ;;
2593                 (*)
2594                         case "$cf_add_cflags" in
2595                         (-D*)
2596                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2597
2598 CPPFLAGS=`echo "$CPPFLAGS" | \
2599         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2600                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2601
2602                                 ;;
2603                         esac
2604
2605         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2606         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2607
2608                         ;;
2609                 esac
2610                 ;;
2611         (*)
2612
2613         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2614         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2615
2616                 ;;
2617         esac
2618         ;;
2619 (yes)
2620
2621         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2622         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2623
2624         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2625
2626         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2627                 && test -z "${cf_tst_cflags}" \
2628                 && cf_fix_cppflags=no
2629         ;;
2630 esac
2631 done
2632
2633 if test -n "$cf_new_cflags" ; then
2634
2635         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2636         CFLAGS="${CFLAGS}$cf_new_cflags"
2637
2638 fi
2639
2640 if test -n "$cf_new_cppflags" ; then
2641
2642         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2643         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2644
2645 fi
2646
2647 if test -n "$cf_new_extra_cppflags" ; then
2648
2649         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2650         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2651
2652 fi
2653
2654         done
2655         ;;
2656 (*)
2657         echo "$as_me:2657: result: ok" >&5
2658 echo "${ECHO_T}ok" >&6
2659         ;;
2660 esac
2661
2662 echo "$as_me:2662: checking \$CC variable" >&5
2663 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2664 case "$CC" in
2665 (*[\ \  ]-*)
2666         echo "$as_me:2666: result: broken" >&5
2667 echo "${ECHO_T}broken" >&6
2668         { echo "$as_me:2668: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2669 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2670         # humor him...
2671         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2672         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2673         CC="$cf_prog"
2674         for cf_arg in $cf_flags
2675         do
2676                 case "x$cf_arg" in
2677                 (x-[IUDfgOW]*)
2678
2679 cf_fix_cppflags=no
2680 cf_new_cflags=
2681 cf_new_cppflags=
2682 cf_new_extra_cppflags=
2683
2684 for cf_add_cflags in $cf_arg
2685 do
2686 case "$cf_fix_cppflags" in
2687 (no)
2688         case "$cf_add_cflags" in
2689         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2690                 case "$cf_add_cflags" in
2691                 (-D*)
2692                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2693
2694                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2695                                 && test -z "${cf_tst_cflags}" \
2696                                 && cf_fix_cppflags=yes
2697
2698                         if test "$cf_fix_cppflags" = yes ; then
2699
2700         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2701         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2702
2703                                 continue
2704                         elif test "${cf_tst_cflags}" = "\"'" ; then
2705
2706         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2707         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2708
2709                                 continue
2710                         fi
2711                         ;;
2712                 esac
2713                 case "$CPPFLAGS" in
2714                 (*$cf_add_cflags)
2715                         ;;
2716                 (*)
2717                         case "$cf_add_cflags" in
2718                         (-D*)
2719                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2720
2721 CPPFLAGS=`echo "$CPPFLAGS" | \
2722         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2723                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2724
2725                                 ;;
2726                         esac
2727
2728         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2729         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2730
2731                         ;;
2732                 esac
2733                 ;;
2734         (*)
2735
2736         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2737         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2738
2739                 ;;
2740         esac
2741         ;;
2742 (yes)
2743
2744         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2745         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2746
2747         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2748
2749         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2750                 && test -z "${cf_tst_cflags}" \
2751                 && cf_fix_cppflags=no
2752         ;;
2753 esac
2754 done
2755
2756 if test -n "$cf_new_cflags" ; then
2757
2758         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2759         CFLAGS="${CFLAGS}$cf_new_cflags"
2760
2761 fi
2762
2763 if test -n "$cf_new_cppflags" ; then
2764
2765         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2766         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2767
2768 fi
2769
2770 if test -n "$cf_new_extra_cppflags" ; then
2771
2772         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2773         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2774
2775 fi
2776
2777                         ;;
2778                 (*)
2779                         CC="$CC $cf_arg"
2780                         ;;
2781                 esac
2782         done
2783         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2784
2785 echo "${as_me:-configure}:2785: testing resulting CC: '$CC' ..." 1>&5
2786
2787         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2788
2789 echo "${as_me:-configure}:2789: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2790
2791         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2792
2793 echo "${as_me:-configure}:2793: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2794
2795         ;;
2796 (*)
2797         echo "$as_me:2797: result: ok" >&5
2798 echo "${ECHO_T}ok" >&6
2799         ;;
2800 esac
2801
2802 ac_ext=c
2803 ac_cpp='$CPP $CPPFLAGS'
2804 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2805 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2806 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2807 ac_main_return="return"
2808 echo "$as_me:2808: checking how to run the C preprocessor" >&5
2809 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2810 # On Suns, sometimes $CPP names a directory.
2811 if test -n "$CPP" && test -d "$CPP"; then
2812   CPP=
2813 fi
2814 if test -z "$CPP"; then
2815   if test "${ac_cv_prog_CPP+set}" = set; then
2816   echo $ECHO_N "(cached) $ECHO_C" >&6
2817 else
2818       # Double quotes because CPP needs to be expanded
2819     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2820     do
2821       ac_preproc_ok=false
2822 for ac_c_preproc_warn_flag in '' yes
2823 do
2824   # Use a header file that comes with gcc, so configuring glibc
2825   # with a fresh cross-compiler works.
2826   # On the NeXT, cc -E runs the code through the compiler's parser,
2827   # not just through cpp. "Syntax error" is here to catch this case.
2828   cat >"conftest.$ac_ext" <<_ACEOF
2829 #line 2829 "configure"
2830 #include "confdefs.h"
2831 #include <assert.h>
2832                      Syntax error
2833 _ACEOF
2834 if { (eval echo "$as_me:2834: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2835   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2836   ac_status=$?
2837   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2838   rm -f conftest.er1
2839   cat conftest.err >&5
2840   echo "$as_me:2840: \$? = $ac_status" >&5
2841   (exit "$ac_status"); } >/dev/null; then
2842   if test -s conftest.err; then
2843     ac_cpp_err=$ac_c_preproc_warn_flag
2844   else
2845     ac_cpp_err=
2846   fi
2847 else
2848   ac_cpp_err=yes
2849 fi
2850 if test -z "$ac_cpp_err"; then
2851   :
2852 else
2853   echo "$as_me: failed program was:" >&5
2854   cat "conftest.$ac_ext" >&5
2855   # Broken: fails on valid input.
2856 continue
2857 fi
2858 rm -f conftest.err "conftest.$ac_ext"
2859
2860   # OK, works on sane cases.  Now check whether non-existent headers
2861   # can be detected and how.
2862   cat >"conftest.$ac_ext" <<_ACEOF
2863 #line 2863 "configure"
2864 #include "confdefs.h"
2865 #include <ac_nonexistent.h>
2866 _ACEOF
2867 if { (eval echo "$as_me:2867: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2868   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2869   ac_status=$?
2870   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2871   rm -f conftest.er1
2872   cat conftest.err >&5
2873   echo "$as_me:2873: \$? = $ac_status" >&5
2874   (exit "$ac_status"); } >/dev/null; then
2875   if test -s conftest.err; then
2876     ac_cpp_err=$ac_c_preproc_warn_flag
2877   else
2878     ac_cpp_err=
2879   fi
2880 else
2881   ac_cpp_err=yes
2882 fi
2883 if test -z "$ac_cpp_err"; then
2884   # Broken: success on invalid input.
2885 continue
2886 else
2887   echo "$as_me: failed program was:" >&5
2888   cat "conftest.$ac_ext" >&5
2889   # Passes both tests.
2890 ac_preproc_ok=:
2891 break
2892 fi
2893 rm -f conftest.err "conftest.$ac_ext"
2894
2895 done
2896 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2897 rm -f conftest.err "conftest.$ac_ext"
2898 if $ac_preproc_ok; then
2899   break
2900 fi
2901
2902     done
2903     ac_cv_prog_CPP=$CPP
2904
2905 fi
2906   CPP=$ac_cv_prog_CPP
2907 else
2908   ac_cv_prog_CPP=$CPP
2909 fi
2910 echo "$as_me:2910: result: $CPP" >&5
2911 echo "${ECHO_T}$CPP" >&6
2912 ac_preproc_ok=false
2913 for ac_c_preproc_warn_flag in '' yes
2914 do
2915   # Use a header file that comes with gcc, so configuring glibc
2916   # with a fresh cross-compiler works.
2917   # On the NeXT, cc -E runs the code through the compiler's parser,
2918   # not just through cpp. "Syntax error" is here to catch this case.
2919   cat >"conftest.$ac_ext" <<_ACEOF
2920 #line 2920 "configure"
2921 #include "confdefs.h"
2922 #include <assert.h>
2923                      Syntax error
2924 _ACEOF
2925 if { (eval echo "$as_me:2925: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2926   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2927   ac_status=$?
2928   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2929   rm -f conftest.er1
2930   cat conftest.err >&5
2931   echo "$as_me:2931: \$? = $ac_status" >&5
2932   (exit "$ac_status"); } >/dev/null; then
2933   if test -s conftest.err; then
2934     ac_cpp_err=$ac_c_preproc_warn_flag
2935   else
2936     ac_cpp_err=
2937   fi
2938 else
2939   ac_cpp_err=yes
2940 fi
2941 if test -z "$ac_cpp_err"; then
2942   :
2943 else
2944   echo "$as_me: failed program was:" >&5
2945   cat "conftest.$ac_ext" >&5
2946   # Broken: fails on valid input.
2947 continue
2948 fi
2949 rm -f conftest.err "conftest.$ac_ext"
2950
2951   # OK, works on sane cases.  Now check whether non-existent headers
2952   # can be detected and how.
2953   cat >"conftest.$ac_ext" <<_ACEOF
2954 #line 2954 "configure"
2955 #include "confdefs.h"
2956 #include <ac_nonexistent.h>
2957 _ACEOF
2958 if { (eval echo "$as_me:2958: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2959   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2960   ac_status=$?
2961   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2962   rm -f conftest.er1
2963   cat conftest.err >&5
2964   echo "$as_me:2964: \$? = $ac_status" >&5
2965   (exit "$ac_status"); } >/dev/null; then
2966   if test -s conftest.err; then
2967     ac_cpp_err=$ac_c_preproc_warn_flag
2968   else
2969     ac_cpp_err=
2970   fi
2971 else
2972   ac_cpp_err=yes
2973 fi
2974 if test -z "$ac_cpp_err"; then
2975   # Broken: success on invalid input.
2976 continue
2977 else
2978   echo "$as_me: failed program was:" >&5
2979   cat "conftest.$ac_ext" >&5
2980   # Passes both tests.
2981 ac_preproc_ok=:
2982 break
2983 fi
2984 rm -f conftest.err "conftest.$ac_ext"
2985
2986 done
2987 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2988 rm -f conftest.err "conftest.$ac_ext"
2989 if $ac_preproc_ok; then
2990   :
2991 else
2992   { { echo "$as_me:2992: error: C preprocessor \"$CPP\" fails sanity check" >&5
2993 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2994    { (exit 1); exit 1; }; }
2995 fi
2996
2997 ac_ext=c
2998 ac_cpp='$CPP $CPPFLAGS'
2999 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3000 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3001 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3002 ac_main_return="return"
3003
3004 if test $ac_cv_c_compiler_gnu = yes; then
3005     echo "$as_me:3005: checking whether $CC needs -traditional" >&5
3006 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3007 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3008   echo $ECHO_N "(cached) $ECHO_C" >&6
3009 else
3010     ac_pattern="Autoconf.*'x'"
3011   cat >"conftest.$ac_ext" <<_ACEOF
3012 #line 3012 "configure"
3013 #include "confdefs.h"
3014 #include <sgtty.h>
3015 int Autoconf = TIOCGETP;
3016 _ACEOF
3017 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3018   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3019   ac_cv_prog_gcc_traditional=yes
3020 else
3021   ac_cv_prog_gcc_traditional=no
3022 fi
3023 rm -rf conftest*
3024
3025   if test $ac_cv_prog_gcc_traditional = no; then
3026     cat >"conftest.$ac_ext" <<_ACEOF
3027 #line 3027 "configure"
3028 #include "confdefs.h"
3029 #include <termio.h>
3030 int Autoconf = TCGETA;
3031 _ACEOF
3032 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3033   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3034   ac_cv_prog_gcc_traditional=yes
3035 fi
3036 rm -rf conftest*
3037
3038   fi
3039 fi
3040 echo "$as_me:3040: result: $ac_cv_prog_gcc_traditional" >&5
3041 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3042   if test $ac_cv_prog_gcc_traditional = yes; then
3043     CC="$CC -traditional"
3044   fi
3045 fi
3046
3047 echo "$as_me:3047: checking whether $CC understands -c and -o together" >&5
3048 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3049 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3050   echo $ECHO_N "(cached) $ECHO_C" >&6
3051 else
3052
3053 cat > conftest.$ac_ext <<CF_EOF
3054 int main(void)
3055 {
3056         ${cf_cv_main_return:-return}(0);
3057 }
3058 CF_EOF
3059 # We do the test twice because some compilers refuse to overwrite an
3060 # existing .o file with -o, though they will create one.
3061 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3062 if { (eval echo "$as_me:3062: \"$ac_try\"") >&5
3063   (eval $ac_try) 2>&5
3064   ac_status=$?
3065   echo "$as_me:3065: \$? = $ac_status" >&5
3066   (exit "$ac_status"); } &&
3067   test -f conftest2.$ac_objext && { (eval echo "$as_me:3067: \"$ac_try\"") >&5
3068   (eval $ac_try) 2>&5
3069   ac_status=$?
3070   echo "$as_me:3070: \$? = $ac_status" >&5
3071   (exit "$ac_status"); };
3072 then
3073   eval cf_cv_prog_CC_c_o=yes
3074 else
3075   eval cf_cv_prog_CC_c_o=no
3076 fi
3077 rm -rf ./conftest*
3078
3079 fi
3080 if test "$cf_cv_prog_CC_c_o" = yes; then
3081   echo "$as_me:3081: result: yes" >&5
3082 echo "${ECHO_T}yes" >&6
3083 else
3084   echo "$as_me:3084: result: no" >&5
3085 echo "${ECHO_T}no" >&6
3086 fi
3087
3088 if test "$cross_compiling" = yes ; then
3089         LDCONFIG=:
3090 else
3091         case "$cf_cv_system_name" in
3092         (dragonfly*|mirbsd*|freebsd*)
3093                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3094                 ;;
3095         (*) LDPATH=$PATH:/sbin:/usr/sbin
3096                 # Extract the first word of "ldconfig", so it can be a program name with args.
3097 set dummy ldconfig; ac_word=$2
3098 echo "$as_me:3098: checking for $ac_word" >&5
3099 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3100 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3101   echo $ECHO_N "(cached) $ECHO_C" >&6
3102 else
3103   case $LDCONFIG in
3104   [\\/]* | ?:[\\/]*)
3105   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3106   ;;
3107   *)
3108   ac_save_IFS=$IFS; IFS=$ac_path_separator
3109 ac_dummy="$LDPATH"
3110 for ac_dir in $ac_dummy; do
3111   IFS=$ac_save_IFS
3112   test -z "$ac_dir" && ac_dir=.
3113   if $as_executable_p "$ac_dir/$ac_word"; then
3114    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3115    echo "$as_me:3115: found $ac_dir/$ac_word" >&5
3116    break
3117 fi
3118 done
3119
3120   ;;
3121 esac
3122 fi
3123 LDCONFIG=$ac_cv_path_LDCONFIG
3124
3125 if test -n "$LDCONFIG"; then
3126   echo "$as_me:3126: result: $LDCONFIG" >&5
3127 echo "${ECHO_T}$LDCONFIG" >&6
3128 else
3129   echo "$as_me:3129: result: no" >&5
3130 echo "${ECHO_T}no" >&6
3131 fi
3132
3133                 ;;
3134         esac
3135 fi
3136
3137 echo "$as_me:3137: checking if you want to ensure bool is consistent with C++" >&5
3138 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3139
3140 # Check whether --with-cxx or --without-cxx was given.
3141 if test "${with_cxx+set}" = set; then
3142   withval="$with_cxx"
3143   cf_with_cxx=$withval
3144 else
3145   cf_with_cxx=yes
3146 fi;
3147 echo "$as_me:3147: result: $cf_with_cxx" >&5
3148 echo "${ECHO_T}$cf_with_cxx" >&6
3149 if test "X$cf_with_cxx" = Xno ; then
3150         CXX=""
3151         GXX=""
3152 else
3153         # with autoconf 2.13, we can change the error to a warning:
3154                 ac_ext=cc
3155 ac_cpp='$CXXCPP $CPPFLAGS'
3156 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3157 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3158 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3159 ac_main_return="return"
3160 if test -n "$ac_tool_prefix"; then
3161   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3162   do
3163     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3164 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3165 echo "$as_me:3165: checking for $ac_word" >&5
3166 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3167 if test "${ac_cv_prog_CXX+set}" = set; then
3168   echo $ECHO_N "(cached) $ECHO_C" >&6
3169 else
3170   if test -n "$CXX"; then
3171   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3172 else
3173   ac_save_IFS=$IFS; IFS=$ac_path_separator
3174 ac_dummy="$PATH"
3175 for ac_dir in $ac_dummy; do
3176   IFS=$ac_save_IFS
3177   test -z "$ac_dir" && ac_dir=.
3178   $as_executable_p "$ac_dir/$ac_word" || continue
3179 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3180 echo "$as_me:3180: found $ac_dir/$ac_word" >&5
3181 break
3182 done
3183
3184 fi
3185 fi
3186 CXX=$ac_cv_prog_CXX
3187 if test -n "$CXX"; then
3188   echo "$as_me:3188: result: $CXX" >&5
3189 echo "${ECHO_T}$CXX" >&6
3190 else
3191   echo "$as_me:3191: result: no" >&5
3192 echo "${ECHO_T}no" >&6
3193 fi
3194
3195     test -n "$CXX" && break
3196   done
3197 fi
3198 if test -z "$CXX"; then
3199   ac_ct_CXX=$CXX
3200   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3201 do
3202   # Extract the first word of "$ac_prog", so it can be a program name with args.
3203 set dummy $ac_prog; ac_word=$2
3204 echo "$as_me:3204: checking for $ac_word" >&5
3205 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3206 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3207   echo $ECHO_N "(cached) $ECHO_C" >&6
3208 else
3209   if test -n "$ac_ct_CXX"; then
3210   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3211 else
3212   ac_save_IFS=$IFS; IFS=$ac_path_separator
3213 ac_dummy="$PATH"
3214 for ac_dir in $ac_dummy; do
3215   IFS=$ac_save_IFS
3216   test -z "$ac_dir" && ac_dir=.
3217   $as_executable_p "$ac_dir/$ac_word" || continue
3218 ac_cv_prog_ac_ct_CXX="$ac_prog"
3219 echo "$as_me:3219: found $ac_dir/$ac_word" >&5
3220 break
3221 done
3222
3223 fi
3224 fi
3225 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3226 if test -n "$ac_ct_CXX"; then
3227   echo "$as_me:3227: result: $ac_ct_CXX" >&5
3228 echo "${ECHO_T}$ac_ct_CXX" >&6
3229 else
3230   echo "$as_me:3230: result: no" >&5
3231 echo "${ECHO_T}no" >&6
3232 fi
3233
3234   test -n "$ac_ct_CXX" && break
3235 done
3236 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3237
3238   CXX=$ac_ct_CXX
3239 fi
3240
3241 # Provide some information about the compiler.
3242 echo "$as_me:3242:" \
3243      "checking for C++ compiler version" >&5
3244 ac_compiler=`set X $ac_compile; echo $2`
3245 { (eval echo "$as_me:3245: \"$ac_compiler --version </dev/null >&5\"") >&5
3246   (eval $ac_compiler --version </dev/null >&5) 2>&5
3247   ac_status=$?
3248   echo "$as_me:3248: \$? = $ac_status" >&5
3249   (exit "$ac_status"); }
3250 { (eval echo "$as_me:3250: \"$ac_compiler -v </dev/null >&5\"") >&5
3251   (eval $ac_compiler -v </dev/null >&5) 2>&5
3252   ac_status=$?
3253   echo "$as_me:3253: \$? = $ac_status" >&5
3254   (exit "$ac_status"); }
3255 { (eval echo "$as_me:3255: \"$ac_compiler -V </dev/null >&5\"") >&5
3256   (eval $ac_compiler -V </dev/null >&5) 2>&5
3257   ac_status=$?
3258   echo "$as_me:3258: \$? = $ac_status" >&5
3259   (exit "$ac_status"); }
3260
3261 echo "$as_me:3261: checking whether we are using the GNU C++ compiler" >&5
3262 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3263 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3264   echo $ECHO_N "(cached) $ECHO_C" >&6
3265 else
3266   cat >"conftest.$ac_ext" <<_ACEOF
3267 #line 3267 "configure"
3268 #include "confdefs.h"
3269
3270 int
3271 main (void)
3272 {
3273 #ifndef __GNUC__
3274        choke me
3275 #endif
3276
3277   ;
3278   return 0;
3279 }
3280 _ACEOF
3281 rm -f "conftest.$ac_objext"
3282 if { (eval echo "$as_me:3282: \"$ac_compile\"") >&5
3283   (eval $ac_compile) 2>&5
3284   ac_status=$?
3285   echo "$as_me:3285: \$? = $ac_status" >&5
3286   (exit "$ac_status"); } &&
3287          { ac_try='test -s "conftest.$ac_objext"'
3288   { (eval echo "$as_me:3288: \"$ac_try\"") >&5
3289   (eval $ac_try) 2>&5
3290   ac_status=$?
3291   echo "$as_me:3291: \$? = $ac_status" >&5
3292   (exit "$ac_status"); }; }; then
3293   ac_compiler_gnu=yes
3294 else
3295   echo "$as_me: failed program was:" >&5
3296 cat "conftest.$ac_ext" >&5
3297 ac_compiler_gnu=no
3298 fi
3299 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3300 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3301
3302 fi
3303 echo "$as_me:3303: result: $ac_cv_cxx_compiler_gnu" >&5
3304 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3305 GXX=`test $ac_compiler_gnu = yes && echo yes`
3306 ac_test_CXXFLAGS=${CXXFLAGS+set}
3307 ac_save_CXXFLAGS=$CXXFLAGS
3308 CXXFLAGS="-g"
3309 echo "$as_me:3309: checking whether $CXX accepts -g" >&5
3310 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3311 if test "${ac_cv_prog_cxx_g+set}" = set; then
3312   echo $ECHO_N "(cached) $ECHO_C" >&6
3313 else
3314   cat >"conftest.$ac_ext" <<_ACEOF
3315 #line 3315 "configure"
3316 #include "confdefs.h"
3317
3318 int
3319 main (void)
3320 {
3321
3322   ;
3323   return 0;
3324 }
3325 _ACEOF
3326 rm -f "conftest.$ac_objext"
3327 if { (eval echo "$as_me:3327: \"$ac_compile\"") >&5
3328   (eval $ac_compile) 2>&5
3329   ac_status=$?
3330   echo "$as_me:3330: \$? = $ac_status" >&5
3331   (exit "$ac_status"); } &&
3332          { ac_try='test -s "conftest.$ac_objext"'
3333   { (eval echo "$as_me:3333: \"$ac_try\"") >&5
3334   (eval $ac_try) 2>&5
3335   ac_status=$?
3336   echo "$as_me:3336: \$? = $ac_status" >&5
3337   (exit "$ac_status"); }; }; then
3338   ac_cv_prog_cxx_g=yes
3339 else
3340   echo "$as_me: failed program was:" >&5
3341 cat "conftest.$ac_ext" >&5
3342 ac_cv_prog_cxx_g=no
3343 fi
3344 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3345 fi
3346 echo "$as_me:3346: result: $ac_cv_prog_cxx_g" >&5
3347 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3348 if test "$ac_test_CXXFLAGS" = set; then
3349   CXXFLAGS=$ac_save_CXXFLAGS
3350 elif test $ac_cv_prog_cxx_g = yes; then
3351   if test "$GXX" = yes; then
3352     CXXFLAGS="-g -O2"
3353   else
3354     CXXFLAGS="-g"
3355   fi
3356 else
3357   if test "$GXX" = yes; then
3358     CXXFLAGS="-O2"
3359   else
3360     CXXFLAGS=
3361   fi
3362 fi
3363 for ac_declaration in \
3364    ''\
3365    '#include <stdlib.h>' \
3366    'extern "C" void std::exit (int) throw (); using std::exit;' \
3367    'extern "C" void std::exit (int); using std::exit;' \
3368    'extern "C" void exit (int) throw ();' \
3369    'extern "C" void exit (int);' \
3370    'void exit (int);'
3371 do
3372   cat >"conftest.$ac_ext" <<_ACEOF
3373 #line 3373 "configure"
3374 #include "confdefs.h"
3375 #include <stdlib.h>
3376 $ac_declaration
3377 int
3378 main (void)
3379 {
3380 exit (42);
3381   ;
3382   return 0;
3383 }
3384 _ACEOF
3385 rm -f "conftest.$ac_objext"
3386 if { (eval echo "$as_me:3386: \"$ac_compile\"") >&5
3387   (eval $ac_compile) 2>&5
3388   ac_status=$?
3389   echo "$as_me:3389: \$? = $ac_status" >&5
3390   (exit "$ac_status"); } &&
3391          { ac_try='test -s "conftest.$ac_objext"'
3392   { (eval echo "$as_me:3392: \"$ac_try\"") >&5
3393   (eval $ac_try) 2>&5
3394   ac_status=$?
3395   echo "$as_me:3395: \$? = $ac_status" >&5
3396   (exit "$ac_status"); }; }; then
3397   :
3398 else
3399   echo "$as_me: failed program was:" >&5
3400 cat "conftest.$ac_ext" >&5
3401 continue
3402 fi
3403 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3404   cat >"conftest.$ac_ext" <<_ACEOF
3405 #line 3405 "configure"
3406 #include "confdefs.h"
3407 $ac_declaration
3408 int
3409 main (void)
3410 {
3411 exit (42);
3412   ;
3413   return 0;
3414 }
3415 _ACEOF
3416 rm -f "conftest.$ac_objext"
3417 if { (eval echo "$as_me:3417: \"$ac_compile\"") >&5
3418   (eval $ac_compile) 2>&5
3419   ac_status=$?
3420   echo "$as_me:3420: \$? = $ac_status" >&5
3421   (exit "$ac_status"); } &&
3422          { ac_try='test -s "conftest.$ac_objext"'
3423   { (eval echo "$as_me:3423: \"$ac_try\"") >&5
3424   (eval $ac_try) 2>&5
3425   ac_status=$?
3426   echo "$as_me:3426: \$? = $ac_status" >&5
3427   (exit "$ac_status"); }; }; then
3428   break
3429 else
3430   echo "$as_me: failed program was:" >&5
3431 cat "conftest.$ac_ext" >&5
3432 fi
3433 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3434 done
3435 rm -rf conftest*
3436 if test -n "$ac_declaration"; then
3437   echo '#ifdef __cplusplus' >>confdefs.h
3438   echo "$ac_declaration"    >>confdefs.h
3439   echo '#endif'             >>confdefs.h
3440 fi
3441
3442 ac_ext=c
3443 ac_cpp='$CPP $CPPFLAGS'
3444 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3445 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3446 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3447 ac_main_return="return"
3448
3449         ac_ext=cc
3450 ac_cpp='$CXXCPP $CPPFLAGS'
3451 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3452 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3453 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3454 ac_main_return="return"
3455
3456         if test "x$cf_with_cxx" != xno
3457         then
3458                 # Several of the C++ configurations do not work, particularly when
3459                 # cross-compiling (20140913 -TD)
3460                 echo "$as_me:3460: checking if $CXX works" >&5
3461 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3462
3463                 save_CPPFLAGS="$CPPFLAGS"
3464                 eval cf_includedir=${includedir}
3465                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3466
3467 cat >"conftest.$ac_ext" <<_ACEOF
3468 #line 3468 "configure"
3469 #include "confdefs.h"
3470
3471 #include <stdlib.h>
3472 #include <stdio.h>
3473
3474 int
3475 main (void)
3476 {
3477
3478                 printf("Hello world!\n")
3479
3480   ;
3481   return 0;
3482 }
3483 _ACEOF
3484 rm -f "conftest.$ac_objext"
3485 if { (eval echo "$as_me:3485: \"$ac_compile\"") >&5
3486   (eval $ac_compile) 2>&5
3487   ac_status=$?
3488   echo "$as_me:3488: \$? = $ac_status" >&5
3489   (exit "$ac_status"); } &&
3490          { ac_try='test -s "conftest.$ac_objext"'
3491   { (eval echo "$as_me:3491: \"$ac_try\"") >&5
3492   (eval $ac_try) 2>&5
3493   ac_status=$?
3494   echo "$as_me:3494: \$? = $ac_status" >&5
3495   (exit "$ac_status"); }; }; then
3496   cf_cxx_works=yes
3497 else
3498   echo "$as_me: failed program was:" >&5
3499 cat "conftest.$ac_ext" >&5
3500 cf_cxx_works=no
3501 fi
3502 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3503                 CPPFLAGS="$save_CPPFLAGS"
3504
3505                 echo "$as_me:3505: result: $cf_cxx_works" >&5
3506 echo "${ECHO_T}$cf_cxx_works" >&6
3507                 if test "x$cf_cxx_works" = xno
3508                 then
3509                         { echo "$as_me:3509: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3510 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3511                         cf_with_cxx=no; CXX=""; GXX="";
3512                 fi
3513         fi
3514         ac_ext=c
3515 ac_cpp='$CPP $CPPFLAGS'
3516 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3517 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3518 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3519 ac_main_return="return"
3520
3521         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3522         if test "$CXX" = "g++" ; then
3523                 # Extract the first word of "g++", so it can be a program name with args.
3524 set dummy g++; ac_word=$2
3525 echo "$as_me:3525: checking for $ac_word" >&5
3526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3527 if test "${ac_cv_path_CXX+set}" = set; then
3528   echo $ECHO_N "(cached) $ECHO_C" >&6
3529 else
3530   case $CXX in
3531   [\\/]* | ?:[\\/]*)
3532   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3533   ;;
3534   *)
3535   ac_save_IFS=$IFS; IFS=$ac_path_separator
3536 ac_dummy="$PATH"
3537 for ac_dir in $ac_dummy; do
3538   IFS=$ac_save_IFS
3539   test -z "$ac_dir" && ac_dir=.
3540   if $as_executable_p "$ac_dir/$ac_word"; then
3541    ac_cv_path_CXX="$ac_dir/$ac_word"
3542    echo "$as_me:3542: found $ac_dir/$ac_word" >&5
3543    break
3544 fi
3545 done
3546
3547   ;;
3548 esac
3549 fi
3550 CXX=$ac_cv_path_CXX
3551
3552 if test -n "$CXX"; then
3553   echo "$as_me:3553: result: $CXX" >&5
3554 echo "${ECHO_T}$CXX" >&6
3555 else
3556   echo "$as_me:3556: result: no" >&5
3557 echo "${ECHO_T}no" >&6
3558 fi
3559
3560         fi
3561         case "x$CXX" in
3562         (x|xg++)
3563                 { echo "$as_me:3563: WARNING: You don't have any C++ compiler, too bad" >&5
3564 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3565                 cf_with_cxx=no; CXX=""; GXX="";
3566                 ;;
3567         esac
3568 fi
3569
3570 GXX_VERSION=none
3571 if test "$GXX" = yes; then
3572         echo "$as_me:3572: checking version of ${CXX:-g++}" >&5
3573 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3574         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3575         if test -z "$GXX_VERSION"
3576         then
3577                 GXX_VERSION=unknown
3578                 GXX=no
3579         fi
3580         echo "$as_me:3580: result: $GXX_VERSION" >&5
3581 echo "${ECHO_T}$GXX_VERSION" >&6
3582 fi
3583
3584 case "$GXX_VERSION" in
3585 ([1-9][0-9].*)
3586         ;;
3587 (1.*|2.[0-6]*)
3588         { echo "$as_me:3588: WARNING: templates do not work" >&5
3589 echo "$as_me: WARNING: templates do not work" >&2;}
3590         ;;
3591 esac
3592
3593 echo "$as_me:3593: checking if you want to build C++ binding and demo" >&5
3594 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3595
3596 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3597 if test "${with_cxx_binding+set}" = set; then
3598   withval="$with_cxx_binding"
3599   cf_with_cxx_binding=$withval
3600 else
3601   cf_with_cxx_binding=$cf_with_cxx
3602 fi;
3603 echo "$as_me:3603: result: $cf_with_cxx_binding" >&5
3604 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3605
3606 echo "$as_me:3606: checking if you want to build with Ada" >&5
3607 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3608 echo "$as_me:3608: result: $cf_with_ada" >&5
3609 echo "${ECHO_T}$cf_with_ada" >&6
3610
3611 echo "$as_me:3611: checking if you want to install terminal database" >&5
3612 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3613
3614 # Check whether --enable-db-install or --disable-db-install was given.
3615 if test "${enable_db_install+set}" = set; then
3616   enableval="$enable_db_install"
3617   cf_with_db_install=$enableval
3618 else
3619   cf_with_db_install=yes
3620 fi;
3621 echo "$as_me:3621: result: $cf_with_db_install" >&5
3622 echo "${ECHO_T}$cf_with_db_install" >&6
3623
3624 echo "$as_me:3624: checking if you want to install manpages" >&5
3625 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3626
3627 # Check whether --with-manpages or --without-manpages was given.
3628 if test "${with_manpages+set}" = set; then
3629   withval="$with_manpages"
3630   cf_with_manpages=$withval
3631 else
3632   cf_with_manpages=yes
3633 fi;
3634 echo "$as_me:3634: result: $cf_with_manpages" >&5
3635 echo "${ECHO_T}$cf_with_manpages" >&6
3636
3637 echo "$as_me:3637: checking if you want to build programs such as tic" >&5
3638 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3639
3640 # Check whether --with-progs or --without-progs was given.
3641 if test "${with_progs+set}" = set; then
3642   withval="$with_progs"
3643   cf_with_progs=$withval
3644 else
3645   cf_with_progs=yes
3646 fi;
3647 echo "$as_me:3647: result: $cf_with_progs" >&5
3648 echo "${ECHO_T}$cf_with_progs" >&6
3649
3650 if test -f "$srcdir/tack/tack.h" ; then
3651         if test "x$cross_compiling" = xyes ; then
3652                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3653
3654 echo "${as_me:-configure}:3654: testing ignoring tack because we are cross-compiling ..." 1>&5
3655
3656                 cf_with_tack=no
3657         else
3658                 echo "$as_me:3658: checking if you want to build the tack program" >&5
3659 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3660
3661 # Check whether --with-tack or --without-tack was given.
3662 if test "${with_tack+set}" = set; then
3663   withval="$with_tack"
3664   cf_with_tack=$withval
3665 else
3666   cf_with_tack=$cf_with_progs
3667 fi;
3668                 echo "$as_me:3668: result: $cf_with_tack" >&5
3669 echo "${ECHO_T}$cf_with_tack" >&6
3670         fi
3671 else
3672         cf_with_tack=no
3673 fi
3674
3675 echo "$as_me:3675: checking if you want to build test-programs" >&5
3676 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3677
3678 # Check whether --with-tests or --without-tests was given.
3679 if test "${with_tests+set}" = set; then
3680   withval="$with_tests"
3681   cf_with_tests=$withval
3682 else
3683   cf_with_tests=yes
3684 fi;
3685 echo "$as_me:3685: result: $cf_with_tests" >&5
3686 echo "${ECHO_T}$cf_with_tests" >&6
3687
3688 echo "$as_me:3688: checking if you wish to install curses.h" >&5
3689 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3690
3691 # Check whether --with-curses-h or --without-curses-h was given.
3692 if test "${with_curses_h+set}" = set; then
3693   withval="$with_curses_h"
3694   with_curses_h=$withval
3695 else
3696   with_curses_h=yes
3697 fi;
3698 echo "$as_me:3698: result: $with_curses_h" >&5
3699 echo "${ECHO_T}$with_curses_h" >&6
3700
3701 modules_to_build="ncurses"
3702 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3703 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3704 modules_to_build="$modules_to_build panel menu form"
3705
3706 test "$program_prefix" != NONE &&
3707   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3708 # Use a double $ so make ignores it.
3709 test "$program_suffix" != NONE &&
3710   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3711 # Double any \ or $.  echo might interpret backslashes.
3712 # By default was `s,x,x', remove it if useless.
3713 cat <<\_ACEOF >conftest.sed
3714 s/[\\$]/&&/g;s/;s,x,x,$//
3715 _ACEOF
3716 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3717 rm conftest.sed
3718
3719 for ac_prog in mawk gawk nawk awk
3720 do
3721   # Extract the first word of "$ac_prog", so it can be a program name with args.
3722 set dummy $ac_prog; ac_word=$2
3723 echo "$as_me:3723: checking for $ac_word" >&5
3724 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3725 if test "${ac_cv_prog_AWK+set}" = set; then
3726   echo $ECHO_N "(cached) $ECHO_C" >&6
3727 else
3728   if test -n "$AWK"; then
3729   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3730 else
3731   ac_save_IFS=$IFS; IFS=$ac_path_separator
3732 ac_dummy="$PATH"
3733 for ac_dir in $ac_dummy; do
3734   IFS=$ac_save_IFS
3735   test -z "$ac_dir" && ac_dir=.
3736   $as_executable_p "$ac_dir/$ac_word" || continue
3737 ac_cv_prog_AWK="$ac_prog"
3738 echo "$as_me:3738: found $ac_dir/$ac_word" >&5
3739 break
3740 done
3741
3742 fi
3743 fi
3744 AWK=$ac_cv_prog_AWK
3745 if test -n "$AWK"; then
3746   echo "$as_me:3746: result: $AWK" >&5
3747 echo "${ECHO_T}$AWK" >&6
3748 else
3749   echo "$as_me:3749: result: no" >&5
3750 echo "${ECHO_T}no" >&6
3751 fi
3752
3753   test -n "$AWK" && break
3754 done
3755
3756 test -z "$AWK" && { { echo "$as_me:3756: error: No awk program found" >&5
3757 echo "$as_me: error: No awk program found" >&2;}
3758    { (exit 1); exit 1; }; }
3759
3760 # Find a good install program.  We prefer a C program (faster),
3761 # so one script is as good as another.  But avoid the broken or
3762 # incompatible versions:
3763 # SysV /etc/install, /usr/sbin/install
3764 # SunOS /usr/etc/install
3765 # IRIX /sbin/install
3766 # AIX /bin/install
3767 # AmigaOS /C/install, which installs bootblocks on floppy discs
3768 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3769 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3770 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3771 # ./install, which can be erroneously created by make from ./install.sh.
3772 echo "$as_me:3772: checking for a BSD compatible install" >&5
3773 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3774 if test -z "$INSTALL"; then
3775 if test "${ac_cv_path_install+set}" = set; then
3776   echo $ECHO_N "(cached) $ECHO_C" >&6
3777 else
3778     ac_save_IFS=$IFS; IFS=$ac_path_separator
3779   for ac_dir in $PATH; do
3780     IFS=$ac_save_IFS
3781     # Account for people who put trailing slashes in PATH elements.
3782     case $ac_dir/ in
3783     / | ./ | .// | /cC/* \
3784     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3785     | /usr/ucb/* ) ;;
3786     *)
3787       # OSF1 and SCO ODT 3.0 have their own names for install.
3788       # Don't use installbsd from OSF since it installs stuff as root
3789       # by default.
3790       for ac_prog in ginstall scoinst install; do
3791         if $as_executable_p "$ac_dir/$ac_prog"; then
3792           if test $ac_prog = install &&
3793             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3794             # AIX install.  It has an incompatible calling convention.
3795             :
3796           elif test $ac_prog = install &&
3797             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3798             # program-specific install script used by HP pwplus--don't use.
3799             :
3800           else
3801             ac_cv_path_install="$ac_dir/$ac_prog -c"
3802             break 2
3803           fi
3804         fi
3805       done
3806       ;;
3807     esac
3808   done
3809
3810 fi
3811   if test "${ac_cv_path_install+set}" = set; then
3812     INSTALL=$ac_cv_path_install
3813   else
3814     # As a last resort, use the slow shell script.  We don't cache a
3815     # path for INSTALL within a source directory, because that will
3816     # break other packages using the cache if that directory is
3817     # removed, or if the path is relative.
3818     INSTALL=$ac_install_sh
3819   fi
3820 fi
3821 echo "$as_me:3821: result: $INSTALL" >&5
3822 echo "${ECHO_T}$INSTALL" >&6
3823
3824 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3825 # It thinks the first close brace ends the variable substitution.
3826 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3827
3828 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3829
3830 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3831
3832 case $INSTALL in
3833 (/*)
3834         ;;
3835 (*)
3836         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3837         test -z "$cf_dir" && cf_dir=.
3838         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3839         ;;
3840 esac
3841
3842 for ac_prog in lint cppcheck splint
3843 do
3844   # Extract the first word of "$ac_prog", so it can be a program name with args.
3845 set dummy $ac_prog; ac_word=$2
3846 echo "$as_me:3846: checking for $ac_word" >&5
3847 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3848 if test "${ac_cv_prog_LINT+set}" = set; then
3849   echo $ECHO_N "(cached) $ECHO_C" >&6
3850 else
3851   if test -n "$LINT"; then
3852   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3853 else
3854   ac_save_IFS=$IFS; IFS=$ac_path_separator
3855 ac_dummy="$PATH"
3856 for ac_dir in $ac_dummy; do
3857   IFS=$ac_save_IFS
3858   test -z "$ac_dir" && ac_dir=.
3859   $as_executable_p "$ac_dir/$ac_word" || continue
3860 ac_cv_prog_LINT="$ac_prog"
3861 echo "$as_me:3861: found $ac_dir/$ac_word" >&5
3862 break
3863 done
3864
3865 fi
3866 fi
3867 LINT=$ac_cv_prog_LINT
3868 if test -n "$LINT"; then
3869   echo "$as_me:3869: result: $LINT" >&5
3870 echo "${ECHO_T}$LINT" >&6
3871 else
3872   echo "$as_me:3872: result: no" >&5
3873 echo "${ECHO_T}no" >&6
3874 fi
3875
3876   test -n "$LINT" && break
3877 done
3878
3879 case "x$LINT" in
3880 (xcppcheck|x*/cppcheck)
3881         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3882         ;;
3883 esac
3884
3885 echo "$as_me:3885: checking whether ln -s works" >&5
3886 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3887 LN_S=$as_ln_s
3888 if test "$LN_S" = "ln -s"; then
3889   echo "$as_me:3889: result: yes" >&5
3890 echo "${ECHO_T}yes" >&6
3891 else
3892   echo "$as_me:3892: result: no, using $LN_S" >&5
3893 echo "${ECHO_T}no, using $LN_S" >&6
3894 fi
3895
3896 echo "$as_me:3896: checking if $LN_S -f options work" >&5
3897 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3898
3899 rm -f conf$$.src conf$$dst
3900 echo >conf$$.dst
3901 echo first >conf$$.src
3902 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3903         cf_prog_ln_sf=yes
3904 else
3905         cf_prog_ln_sf=no
3906 fi
3907 rm -f conf$$.dst conf$$src
3908 echo "$as_me:3908: result: $cf_prog_ln_sf" >&5
3909 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3910
3911 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3912
3913 echo "$as_me:3913: checking for long file names" >&5
3914 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3915 if test "${ac_cv_sys_long_file_names+set}" = set; then
3916   echo $ECHO_N "(cached) $ECHO_C" >&6
3917 else
3918   ac_cv_sys_long_file_names=yes
3919 # Test for long file names in all the places we know might matter:
3920 #      .                the current directory, where building will happen
3921 #      $prefix/lib      where we will be installing things
3922 #      $exec_prefix/lib likewise
3923 # eval it to expand exec_prefix.
3924 #      $TMPDIR          if set, where it might want to write temporary files
3925 # if $TMPDIR is not set:
3926 #      /tmp             where it might want to write temporary files
3927 #      /var/tmp         likewise
3928 #      /usr/tmp         likewise
3929 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3930   ac_tmpdirs=$TMPDIR
3931 else
3932   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3933 fi
3934 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3935   test -d "$ac_dir" || continue
3936   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3937   ac_xdir=$ac_dir/cf$$
3938   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3939   ac_tf1=$ac_xdir/conftest9012345
3940   ac_tf2=$ac_xdir/conftest9012346
3941   (echo 1 >"$ac_tf1") 2>/dev/null
3942   (echo 2 >"$ac_tf2") 2>/dev/null
3943   ac_val=`cat "$ac_tf1" 2>/dev/null`
3944   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3945     ac_cv_sys_long_file_names=no
3946     rm -rf "$ac_xdir" 2>/dev/null
3947     break
3948   fi
3949   rm -rf "$ac_xdir" 2>/dev/null
3950 done
3951 fi
3952 echo "$as_me:3952: result: $ac_cv_sys_long_file_names" >&5
3953 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3954 if test "$ac_cv_sys_long_file_names" = yes; then
3955
3956 cat >>confdefs.h <<\EOF
3957 #define HAVE_LONG_FILE_NAMES 1
3958 EOF
3959
3960 fi
3961
3962 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3963 # of package conflict.
3964 cf_config_suffix=
3965
3966 # Check whether --with-config-suffix or --without-config-suffix was given.
3967 if test "${with_config_suffix+set}" = set; then
3968   withval="$with_config_suffix"
3969   case "x$withval" in
3970         (xyes|xno)
3971                 { echo "$as_me:3971: WARNING: expected a value for config-suffix option" >&5
3972 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3973                 ;;
3974         (*)     cf_config_suffix="$withval"
3975                 ;;
3976         esac
3977 fi;
3978
3979 # If we find pkg-config, check if we should install the ".pc" files.
3980
3981 echo "$as_me:3981: checking if you want to use pkg-config" >&5
3982 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3983
3984 # Check whether --with-pkg-config or --without-pkg-config was given.
3985 if test "${with_pkg_config+set}" = set; then
3986   withval="$with_pkg_config"
3987   cf_pkg_config=$withval
3988 else
3989   cf_pkg_config=yes
3990 fi;
3991 echo "$as_me:3991: result: $cf_pkg_config" >&5
3992 echo "${ECHO_T}$cf_pkg_config" >&6
3993
3994 case "$cf_pkg_config" in
3995 (no)
3996         PKG_CONFIG=none
3997         ;;
3998 (yes)
3999
4000 if test -n "$ac_tool_prefix"; then
4001   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4002 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4003 echo "$as_me:4003: checking for $ac_word" >&5
4004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4005 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4006   echo $ECHO_N "(cached) $ECHO_C" >&6
4007 else
4008   case $PKG_CONFIG in
4009   [\\/]* | ?:[\\/]*)
4010   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4011   ;;
4012   *)
4013   ac_save_IFS=$IFS; IFS=$ac_path_separator
4014 ac_dummy="$PATH"
4015 for ac_dir in $ac_dummy; do
4016   IFS=$ac_save_IFS
4017   test -z "$ac_dir" && ac_dir=.
4018   if $as_executable_p "$ac_dir/$ac_word"; then
4019    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4020    echo "$as_me:4020: found $ac_dir/$ac_word" >&5
4021    break
4022 fi
4023 done
4024
4025   ;;
4026 esac
4027 fi
4028 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4029
4030 if test -n "$PKG_CONFIG"; then
4031   echo "$as_me:4031: result: $PKG_CONFIG" >&5
4032 echo "${ECHO_T}$PKG_CONFIG" >&6
4033 else
4034   echo "$as_me:4034: result: no" >&5
4035 echo "${ECHO_T}no" >&6
4036 fi
4037
4038 fi
4039 if test -z "$ac_cv_path_PKG_CONFIG"; then
4040   ac_pt_PKG_CONFIG=$PKG_CONFIG
4041   # Extract the first word of "pkg-config", so it can be a program name with args.
4042 set dummy pkg-config; ac_word=$2
4043 echo "$as_me:4043: checking for $ac_word" >&5
4044 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4045 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4046   echo $ECHO_N "(cached) $ECHO_C" >&6
4047 else
4048   case $ac_pt_PKG_CONFIG in
4049   [\\/]* | ?:[\\/]*)
4050   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4051   ;;
4052   *)
4053   ac_save_IFS=$IFS; IFS=$ac_path_separator
4054 ac_dummy="$PATH"
4055 for ac_dir in $ac_dummy; do
4056   IFS=$ac_save_IFS
4057   test -z "$ac_dir" && ac_dir=.
4058   if $as_executable_p "$ac_dir/$ac_word"; then
4059    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4060    echo "$as_me:4060: found $ac_dir/$ac_word" >&5
4061    break
4062 fi
4063 done
4064
4065   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4066   ;;
4067 esac
4068 fi
4069 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4070
4071 if test -n "$ac_pt_PKG_CONFIG"; then
4072   echo "$as_me:4072: result: $ac_pt_PKG_CONFIG" >&5
4073 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4074 else
4075   echo "$as_me:4075: result: no" >&5
4076 echo "${ECHO_T}no" >&6
4077 fi
4078
4079   PKG_CONFIG=$ac_pt_PKG_CONFIG
4080 else
4081   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4082 fi
4083
4084         ;;
4085 (*)
4086         PKG_CONFIG=$withval
4087         ;;
4088 esac
4089
4090 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4091 if test "$PKG_CONFIG" != none ; then
4092
4093 if test "x$prefix" != xNONE; then
4094         cf_path_syntax="$prefix"
4095 else
4096         cf_path_syntax="$ac_default_prefix"
4097 fi
4098
4099 case ".$PKG_CONFIG" in
4100 (.\$\(*\)*|.\'*\'*)
4101         ;;
4102 (..|./*|.\\*)
4103         ;;
4104 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4105         ;;
4106 (.\$\{*prefix\}*|.\$\{*dir\}*)
4107         eval PKG_CONFIG="$PKG_CONFIG"
4108         case ".$PKG_CONFIG" in
4109         (.NONE/*)
4110                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4111                 ;;
4112         esac
4113         ;;
4114 (.no|.NONE/*)
4115         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4116         ;;
4117 (*)
4118         { { echo "$as_me:4118: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4119 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4120    { (exit 1); exit 1; }; }
4121         ;;
4122 esac
4123
4124 elif test "x$cf_pkg_config" != xno ; then
4125         { echo "$as_me:4125: WARNING: pkg-config is not installed" >&5
4126 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4127 fi
4128
4129 case "$PKG_CONFIG" in
4130 (no|none|yes)
4131         echo "$as_me:4131: checking for pkg-config library directory" >&5
4132 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4133         ;;
4134 (*)
4135         echo "$as_me:4135: checking for $PKG_CONFIG library directory" >&5
4136 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4137         ;;
4138 esac
4139
4140 PKG_CONFIG_LIBDIR=no
4141
4142 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4143 if test "${with_pkg_config_libdir+set}" = set; then
4144   withval="$with_pkg_config_libdir"
4145   PKG_CONFIG_LIBDIR=$withval
4146 else
4147   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
4148 fi;
4149
4150 case x$PKG_CONFIG_LIBDIR in
4151 (x/*)
4152         ;;
4153 (xyes)
4154         # Look for the library directory using the same prefix as the executable
4155         if test "x$PKG_CONFIG" = xnone
4156         then
4157                 cf_path=$prefix
4158         else
4159                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
4160         fi
4161
4162         # If you don't like using the default architecture, you have to specify the
4163         # intended library directory and corresponding compiler/linker options.
4164         #
4165         # This case allows for Debian's 2014-flavor of multiarch, along with the
4166         # most common variations before that point.  Some other variants spell the
4167         # directory differently, e.g., "pkg-config", and put it in unusual places.
4168         # pkg-config has always been poorly standardized, which is ironic...
4169         case x`(arch) 2>/dev/null` in
4170         (*64)
4171                 cf_search_path="\
4172                         $cf_path/lib/*64-linux-gnu \
4173                         $cf_path/share \
4174                         $cf_path/lib64 \
4175                         $cf_path/lib32 \
4176                         $cf_path/lib"
4177                 ;;
4178         (*)
4179                 cf_search_path="\
4180                         $cf_path/lib/*-linux-gnu \
4181                         $cf_path/share \
4182                         $cf_path/lib32 \
4183                         $cf_path/lib \
4184                         $cf_path/libdata"
4185                 ;;
4186         esac
4187
4188         test -n "$verbose" && echo "    list..." 1>&6
4189
4190 echo "${as_me:-configure}:4190: testing list... ..." 1>&5
4191
4192         for cf_config in $cf_search_path
4193         do
4194                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
4195
4196 echo "${as_me:-configure}:4196: testing checking $cf_config/pkgconfig ..." 1>&5
4197
4198                 if test -d "$cf_config/pkgconfig"
4199                 then
4200                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
4201                         echo "$as_me:4201: checking done" >&5
4202 echo $ECHO_N "checking done... $ECHO_C" >&6
4203                         break
4204                 fi
4205         done
4206         ;;
4207 (*)
4208         ;;
4209 esac
4210
4211 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4212         echo "$as_me:4212: result: $PKG_CONFIG_LIBDIR" >&5
4213 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4214 fi
4215
4216 if test "x$PKG_CONFIG" != xnone
4217 then
4218         echo "$as_me:4218: checking if we should install .pc files for $PKG_CONFIG" >&5
4219 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4220 else
4221         echo "$as_me:4221: checking if we should install .pc files" >&5
4222 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4223 fi
4224
4225 # Check whether --enable-pc-files or --disable-pc-files was given.
4226 if test "${enable_pc_files+set}" = set; then
4227   enableval="$enable_pc_files"
4228   enable_pc_files=$enableval
4229 else
4230   enable_pc_files=no
4231 fi;
4232 echo "$as_me:4232: result: $enable_pc_files" >&5
4233 echo "${ECHO_T}$enable_pc_files" >&6
4234
4235 if test "x$enable_pc_files" != xno
4236 then
4237         MAKE_PC_FILES=
4238         case "x$PKG_CONFIG_LIBDIR" in
4239         (xno|xyes)
4240                 { echo "$as_me:4240: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4241 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4242                 ;;
4243         (*)
4244
4245 if test "x$prefix" != xNONE; then
4246         cf_path_syntax="$prefix"
4247 else
4248         cf_path_syntax="$ac_default_prefix"
4249 fi
4250
4251 case ".$PKG_CONFIG_LIBDIR" in
4252 (.\$\(*\)*|.\'*\'*)
4253         ;;
4254 (..|./*|.\\*)
4255         ;;
4256 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4257         ;;
4258 (.\$\{*prefix\}*|.\$\{*dir\}*)
4259         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4260         case ".$PKG_CONFIG_LIBDIR" in
4261         (.NONE/*)
4262                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4263                 ;;
4264         esac
4265         ;;
4266 (.no|.NONE/*)
4267         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4268         ;;
4269 (*)
4270         { { echo "$as_me:4270: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4271 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4272    { (exit 1); exit 1; }; }
4273         ;;
4274 esac
4275
4276                 ;;
4277         esac
4278 else
4279         MAKE_PC_FILES="#"
4280 fi
4281
4282 if test -z "$MAKE_PC_FILES"
4283 then
4284         echo "$as_me:4284: checking for suffix to add to pc-files" >&5
4285 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4286
4287 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4288 if test "${with_pc_suffix+set}" = set; then
4289   withval="$with_pc_suffix"
4290   case "x$withval" in
4291         (xyes|xno)
4292                 PC_MODULE_SUFFIX=
4293                 ;;
4294         (*)     PC_MODULE_SUFFIX="$withval"
4295                 ;;
4296         esac
4297 fi;
4298         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4299         echo "$as_me:4299: result: $PC_MODULE_SUFFIX" >&5
4300 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4301         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4302
4303 fi
4304
4305 echo "$as_me:4305: checking if we should assume mixed-case filenames" >&5
4306 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4307
4308 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4309 if test "${enable_mixed_case+set}" = set; then
4310   enableval="$enable_mixed_case"
4311   enable_mixedcase=$enableval
4312 else
4313   enable_mixedcase=auto
4314 fi;
4315 echo "$as_me:4315: result: $enable_mixedcase" >&5
4316 echo "${ECHO_T}$enable_mixedcase" >&6
4317 if test "$enable_mixedcase" = "auto" ; then
4318
4319 echo "$as_me:4319: checking if filesystem supports mixed-case filenames" >&5
4320 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4321 if test "${cf_cv_mixedcase+set}" = set; then
4322   echo $ECHO_N "(cached) $ECHO_C" >&6
4323 else
4324
4325 if test "$cross_compiling" = yes ; then
4326         case "$target_alias" in
4327         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4328                 cf_cv_mixedcase=no
4329                 ;;
4330         (*)
4331                 cf_cv_mixedcase=yes
4332                 ;;
4333         esac
4334 else
4335         rm -f conftest CONFTEST
4336         echo test >conftest
4337         if test -f CONFTEST ; then
4338                 cf_cv_mixedcase=no
4339         else
4340                 cf_cv_mixedcase=yes
4341         fi
4342         rm -f conftest CONFTEST
4343 fi
4344
4345 fi
4346 echo "$as_me:4346: result: $cf_cv_mixedcase" >&5
4347 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4348 test "$cf_cv_mixedcase" = yes &&
4349 cat >>confdefs.h <<\EOF
4350 #define MIXEDCASE_FILENAMES 1
4351 EOF
4352
4353 else
4354         cf_cv_mixedcase=$enable_mixedcase
4355         if test "x$enable_mixedcase" = "xyes" ; then
4356
4357 cat >>confdefs.h <<\EOF
4358 #define MIXEDCASE_FILENAMES 1
4359 EOF
4360
4361         fi
4362 fi
4363
4364 # do this after mixed-case option (tags/TAGS is not as important as tic).
4365 echo "$as_me:4365: checking whether ${MAKE-make} sets \${MAKE}" >&5
4366 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4367 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4368 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4369   echo $ECHO_N "(cached) $ECHO_C" >&6
4370 else
4371   cat >conftest.make <<\EOF
4372 all:
4373         @echo 'ac_maketemp="${MAKE}"'
4374 EOF
4375 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4376 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4377 if test -n "$ac_maketemp"; then
4378   eval ac_cv_prog_make_${ac_make}_set=yes
4379 else
4380   eval ac_cv_prog_make_${ac_make}_set=no
4381 fi
4382 rm -f conftest.make
4383 fi
4384 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4385   echo "$as_me:4385: result: yes" >&5
4386 echo "${ECHO_T}yes" >&6
4387   SET_MAKE=
4388 else
4389   echo "$as_me:4389: result: no" >&5
4390 echo "${ECHO_T}no" >&6
4391   SET_MAKE="MAKE=${MAKE-make}"
4392 fi
4393
4394 for ac_prog in exctags ctags
4395 do
4396   # Extract the first word of "$ac_prog", so it can be a program name with args.
4397 set dummy $ac_prog; ac_word=$2
4398 echo "$as_me:4398: checking for $ac_word" >&5
4399 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4400 if test "${ac_cv_prog_CTAGS+set}" = set; then
4401   echo $ECHO_N "(cached) $ECHO_C" >&6
4402 else
4403   if test -n "$CTAGS"; then
4404   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4405 else
4406   ac_save_IFS=$IFS; IFS=$ac_path_separator
4407 ac_dummy="$PATH"
4408 for ac_dir in $ac_dummy; do
4409   IFS=$ac_save_IFS
4410   test -z "$ac_dir" && ac_dir=.
4411   $as_executable_p "$ac_dir/$ac_word" || continue
4412 ac_cv_prog_CTAGS="$ac_prog"
4413 echo "$as_me:4413: found $ac_dir/$ac_word" >&5
4414 break
4415 done
4416
4417 fi
4418 fi
4419 CTAGS=$ac_cv_prog_CTAGS
4420 if test -n "$CTAGS"; then
4421   echo "$as_me:4421: result: $CTAGS" >&5
4422 echo "${ECHO_T}$CTAGS" >&6
4423 else
4424   echo "$as_me:4424: result: no" >&5
4425 echo "${ECHO_T}no" >&6
4426 fi
4427
4428   test -n "$CTAGS" && break
4429 done
4430
4431 for ac_prog in exetags etags
4432 do
4433   # Extract the first word of "$ac_prog", so it can be a program name with args.
4434 set dummy $ac_prog; ac_word=$2
4435 echo "$as_me:4435: checking for $ac_word" >&5
4436 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4437 if test "${ac_cv_prog_ETAGS+set}" = set; then
4438   echo $ECHO_N "(cached) $ECHO_C" >&6
4439 else
4440   if test -n "$ETAGS"; then
4441   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4442 else
4443   ac_save_IFS=$IFS; IFS=$ac_path_separator
4444 ac_dummy="$PATH"
4445 for ac_dir in $ac_dummy; do
4446   IFS=$ac_save_IFS
4447   test -z "$ac_dir" && ac_dir=.
4448   $as_executable_p "$ac_dir/$ac_word" || continue
4449 ac_cv_prog_ETAGS="$ac_prog"
4450 echo "$as_me:4450: found $ac_dir/$ac_word" >&5
4451 break
4452 done
4453
4454 fi
4455 fi
4456 ETAGS=$ac_cv_prog_ETAGS
4457 if test -n "$ETAGS"; then
4458   echo "$as_me:4458: result: $ETAGS" >&5
4459 echo "${ECHO_T}$ETAGS" >&6
4460 else
4461   echo "$as_me:4461: result: no" >&5
4462 echo "${ECHO_T}no" >&6
4463 fi
4464
4465   test -n "$ETAGS" && break
4466 done
4467
4468 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4469 set dummy ${CTAGS:-ctags}; ac_word=$2
4470 echo "$as_me:4470: checking for $ac_word" >&5
4471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4472 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4473   echo $ECHO_N "(cached) $ECHO_C" >&6
4474 else
4475   if test -n "$MAKE_LOWER_TAGS"; then
4476   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4477 else
4478   ac_save_IFS=$IFS; IFS=$ac_path_separator
4479 ac_dummy="$PATH"
4480 for ac_dir in $ac_dummy; do
4481   IFS=$ac_save_IFS
4482   test -z "$ac_dir" && ac_dir=.
4483   $as_executable_p "$ac_dir/$ac_word" || continue
4484 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4485 echo "$as_me:4485: found $ac_dir/$ac_word" >&5
4486 break
4487 done
4488
4489   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4490 fi
4491 fi
4492 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4493 if test -n "$MAKE_LOWER_TAGS"; then
4494   echo "$as_me:4494: result: $MAKE_LOWER_TAGS" >&5
4495 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4496 else
4497   echo "$as_me:4497: result: no" >&5
4498 echo "${ECHO_T}no" >&6
4499 fi
4500
4501 if test "$cf_cv_mixedcase" = yes ; then
4502         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4503 set dummy ${ETAGS:-etags}; ac_word=$2
4504 echo "$as_me:4504: checking for $ac_word" >&5
4505 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4506 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4507   echo $ECHO_N "(cached) $ECHO_C" >&6
4508 else
4509   if test -n "$MAKE_UPPER_TAGS"; then
4510   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4511 else
4512   ac_save_IFS=$IFS; IFS=$ac_path_separator
4513 ac_dummy="$PATH"
4514 for ac_dir in $ac_dummy; do
4515   IFS=$ac_save_IFS
4516   test -z "$ac_dir" && ac_dir=.
4517   $as_executable_p "$ac_dir/$ac_word" || continue
4518 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4519 echo "$as_me:4519: found $ac_dir/$ac_word" >&5
4520 break
4521 done
4522
4523   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4524 fi
4525 fi
4526 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4527 if test -n "$MAKE_UPPER_TAGS"; then
4528   echo "$as_me:4528: result: $MAKE_UPPER_TAGS" >&5
4529 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4530 else
4531   echo "$as_me:4531: result: no" >&5
4532 echo "${ECHO_T}no" >&6
4533 fi
4534
4535 else
4536         MAKE_UPPER_TAGS=no
4537 fi
4538
4539 if test "$MAKE_UPPER_TAGS" = yes ; then
4540         MAKE_UPPER_TAGS=
4541 else
4542         MAKE_UPPER_TAGS="#"
4543 fi
4544
4545 if test "$MAKE_LOWER_TAGS" = yes ; then
4546         MAKE_LOWER_TAGS=
4547 else
4548         MAKE_LOWER_TAGS="#"
4549 fi
4550
4551 echo "$as_me:4551: checking for makeflags variable" >&5
4552 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4553 if test "${cf_cv_makeflags+set}" = set; then
4554   echo $ECHO_N "(cached) $ECHO_C" >&6
4555 else
4556
4557         cf_cv_makeflags=''
4558         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4559         do
4560                 cat >cf_makeflags.tmp <<CF_EOF
4561 SHELL = $SHELL
4562 all :
4563         @ echo '.$cf_option'
4564 CF_EOF
4565                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4566                 case "$cf_result" in
4567                 (.*k|.*kw)
4568                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4569                         case "$cf_result" in
4570                         (.*CC=*)        cf_cv_makeflags=
4571                                 ;;
4572                         (*)     cf_cv_makeflags=$cf_option
4573                                 ;;
4574                         esac
4575                         break
4576                         ;;
4577                 (.-)
4578                         ;;
4579                 (*)
4580
4581 echo "${as_me:-configure}:4581: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4582
4583                         ;;
4584                 esac
4585         done
4586         rm -f cf_makeflags.tmp
4587
4588 fi
4589 echo "$as_me:4589: result: $cf_cv_makeflags" >&5
4590 echo "${ECHO_T}$cf_cv_makeflags" >&6
4591
4592 if test -n "$ac_tool_prefix"; then
4593   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4594 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4595 echo "$as_me:4595: checking for $ac_word" >&5
4596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4597 if test "${ac_cv_prog_RANLIB+set}" = set; then
4598   echo $ECHO_N "(cached) $ECHO_C" >&6
4599 else
4600   if test -n "$RANLIB"; then
4601   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4602 else
4603   ac_save_IFS=$IFS; IFS=$ac_path_separator
4604 ac_dummy="$PATH"
4605 for ac_dir in $ac_dummy; do
4606   IFS=$ac_save_IFS
4607   test -z "$ac_dir" && ac_dir=.
4608   $as_executable_p "$ac_dir/$ac_word" || continue
4609 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4610 echo "$as_me:4610: found $ac_dir/$ac_word" >&5
4611 break
4612 done
4613
4614 fi
4615 fi
4616 RANLIB=$ac_cv_prog_RANLIB
4617 if test -n "$RANLIB"; then
4618   echo "$as_me:4618: result: $RANLIB" >&5
4619 echo "${ECHO_T}$RANLIB" >&6
4620 else
4621   echo "$as_me:4621: result: no" >&5
4622 echo "${ECHO_T}no" >&6
4623 fi
4624
4625 fi
4626 if test -z "$ac_cv_prog_RANLIB"; then
4627   ac_ct_RANLIB=$RANLIB
4628   # Extract the first word of "ranlib", so it can be a program name with args.
4629 set dummy ranlib; ac_word=$2
4630 echo "$as_me:4630: checking for $ac_word" >&5
4631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4632 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4633   echo $ECHO_N "(cached) $ECHO_C" >&6
4634 else
4635   if test -n "$ac_ct_RANLIB"; then
4636   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4637 else
4638   ac_save_IFS=$IFS; IFS=$ac_path_separator
4639 ac_dummy="$PATH"
4640 for ac_dir in $ac_dummy; do
4641   IFS=$ac_save_IFS
4642   test -z "$ac_dir" && ac_dir=.
4643   $as_executable_p "$ac_dir/$ac_word" || continue
4644 ac_cv_prog_ac_ct_RANLIB="ranlib"
4645 echo "$as_me:4645: found $ac_dir/$ac_word" >&5
4646 break
4647 done
4648
4649   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4650 fi
4651 fi
4652 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4653 if test -n "$ac_ct_RANLIB"; then
4654   echo "$as_me:4654: result: $ac_ct_RANLIB" >&5
4655 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4656 else
4657   echo "$as_me:4657: result: no" >&5
4658 echo "${ECHO_T}no" >&6
4659 fi
4660
4661   RANLIB=$ac_ct_RANLIB
4662 else
4663   RANLIB="$ac_cv_prog_RANLIB"
4664 fi
4665
4666 if test -n "$ac_tool_prefix"; then
4667   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4668 set dummy ${ac_tool_prefix}ld; ac_word=$2
4669 echo "$as_me:4669: checking for $ac_word" >&5
4670 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4671 if test "${ac_cv_prog_LD+set}" = set; then
4672   echo $ECHO_N "(cached) $ECHO_C" >&6
4673 else
4674   if test -n "$LD"; then
4675   ac_cv_prog_LD="$LD" # Let the user override the test.
4676 else
4677   ac_save_IFS=$IFS; IFS=$ac_path_separator
4678 ac_dummy="$PATH"
4679 for ac_dir in $ac_dummy; do
4680   IFS=$ac_save_IFS
4681   test -z "$ac_dir" && ac_dir=.
4682   $as_executable_p "$ac_dir/$ac_word" || continue
4683 ac_cv_prog_LD="${ac_tool_prefix}ld"
4684 echo "$as_me:4684: found $ac_dir/$ac_word" >&5
4685 break
4686 done
4687
4688 fi
4689 fi
4690 LD=$ac_cv_prog_LD
4691 if test -n "$LD"; then
4692   echo "$as_me:4692: result: $LD" >&5
4693 echo "${ECHO_T}$LD" >&6
4694 else
4695   echo "$as_me:4695: result: no" >&5
4696 echo "${ECHO_T}no" >&6
4697 fi
4698
4699 fi
4700 if test -z "$ac_cv_prog_LD"; then
4701   ac_ct_LD=$LD
4702   # Extract the first word of "ld", so it can be a program name with args.
4703 set dummy ld; ac_word=$2
4704 echo "$as_me:4704: checking for $ac_word" >&5
4705 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4706 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4707   echo $ECHO_N "(cached) $ECHO_C" >&6
4708 else
4709   if test -n "$ac_ct_LD"; then
4710   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4711 else
4712   ac_save_IFS=$IFS; IFS=$ac_path_separator
4713 ac_dummy="$PATH"
4714 for ac_dir in $ac_dummy; do
4715   IFS=$ac_save_IFS
4716   test -z "$ac_dir" && ac_dir=.
4717   $as_executable_p "$ac_dir/$ac_word" || continue
4718 ac_cv_prog_ac_ct_LD="ld"
4719 echo "$as_me:4719: found $ac_dir/$ac_word" >&5
4720 break
4721 done
4722
4723   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4724 fi
4725 fi
4726 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4727 if test -n "$ac_ct_LD"; then
4728   echo "$as_me:4728: result: $ac_ct_LD" >&5
4729 echo "${ECHO_T}$ac_ct_LD" >&6
4730 else
4731   echo "$as_me:4731: result: no" >&5
4732 echo "${ECHO_T}no" >&6
4733 fi
4734
4735   LD=$ac_ct_LD
4736 else
4737   LD="$ac_cv_prog_LD"
4738 fi
4739
4740 if test -n "$ac_tool_prefix"; then
4741   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4742 set dummy ${ac_tool_prefix}ar; ac_word=$2
4743 echo "$as_me:4743: checking for $ac_word" >&5
4744 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4745 if test "${ac_cv_prog_AR+set}" = set; then
4746   echo $ECHO_N "(cached) $ECHO_C" >&6
4747 else
4748   if test -n "$AR"; then
4749   ac_cv_prog_AR="$AR" # Let the user override the test.
4750 else
4751   ac_save_IFS=$IFS; IFS=$ac_path_separator
4752 ac_dummy="$PATH"
4753 for ac_dir in $ac_dummy; do
4754   IFS=$ac_save_IFS
4755   test -z "$ac_dir" && ac_dir=.
4756   $as_executable_p "$ac_dir/$ac_word" || continue
4757 ac_cv_prog_AR="${ac_tool_prefix}ar"
4758 echo "$as_me:4758: found $ac_dir/$ac_word" >&5
4759 break
4760 done
4761
4762 fi
4763 fi
4764 AR=$ac_cv_prog_AR
4765 if test -n "$AR"; then
4766   echo "$as_me:4766: result: $AR" >&5
4767 echo "${ECHO_T}$AR" >&6
4768 else
4769   echo "$as_me:4769: result: no" >&5
4770 echo "${ECHO_T}no" >&6
4771 fi
4772
4773 fi
4774 if test -z "$ac_cv_prog_AR"; then
4775   ac_ct_AR=$AR
4776   # Extract the first word of "ar", so it can be a program name with args.
4777 set dummy ar; ac_word=$2
4778 echo "$as_me:4778: checking for $ac_word" >&5
4779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4780 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4781   echo $ECHO_N "(cached) $ECHO_C" >&6
4782 else
4783   if test -n "$ac_ct_AR"; then
4784   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4785 else
4786   ac_save_IFS=$IFS; IFS=$ac_path_separator
4787 ac_dummy="$PATH"
4788 for ac_dir in $ac_dummy; do
4789   IFS=$ac_save_IFS
4790   test -z "$ac_dir" && ac_dir=.
4791   $as_executable_p "$ac_dir/$ac_word" || continue
4792 ac_cv_prog_ac_ct_AR="ar"
4793 echo "$as_me:4793: found $ac_dir/$ac_word" >&5
4794 break
4795 done
4796
4797   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4798 fi
4799 fi
4800 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4801 if test -n "$ac_ct_AR"; then
4802   echo "$as_me:4802: result: $ac_ct_AR" >&5
4803 echo "${ECHO_T}$ac_ct_AR" >&6
4804 else
4805   echo "$as_me:4805: result: no" >&5
4806 echo "${ECHO_T}no" >&6
4807 fi
4808
4809   AR=$ac_ct_AR
4810 else
4811   AR="$ac_cv_prog_AR"
4812 fi
4813
4814 if test -n "$ac_tool_prefix"; then
4815   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4816 set dummy ${ac_tool_prefix}nm; ac_word=$2
4817 echo "$as_me:4817: checking for $ac_word" >&5
4818 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4819 if test "${ac_cv_prog_NM+set}" = set; then
4820   echo $ECHO_N "(cached) $ECHO_C" >&6
4821 else
4822   if test -n "$NM"; then
4823   ac_cv_prog_NM="$NM" # Let the user override the test.
4824 else
4825   ac_save_IFS=$IFS; IFS=$ac_path_separator
4826 ac_dummy="$PATH"
4827 for ac_dir in $ac_dummy; do
4828   IFS=$ac_save_IFS
4829   test -z "$ac_dir" && ac_dir=.
4830   $as_executable_p "$ac_dir/$ac_word" || continue
4831 ac_cv_prog_NM="${ac_tool_prefix}nm"
4832 echo "$as_me:4832: found $ac_dir/$ac_word" >&5
4833 break
4834 done
4835
4836 fi
4837 fi
4838 NM=$ac_cv_prog_NM
4839 if test -n "$NM"; then
4840   echo "$as_me:4840: result: $NM" >&5
4841 echo "${ECHO_T}$NM" >&6
4842 else
4843   echo "$as_me:4843: result: no" >&5
4844 echo "${ECHO_T}no" >&6
4845 fi
4846
4847 fi
4848 if test -z "$ac_cv_prog_NM"; then
4849   ac_ct_NM=$NM
4850   # Extract the first word of "nm", so it can be a program name with args.
4851 set dummy nm; ac_word=$2
4852 echo "$as_me:4852: checking for $ac_word" >&5
4853 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4854 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4855   echo $ECHO_N "(cached) $ECHO_C" >&6
4856 else
4857   if test -n "$ac_ct_NM"; then
4858   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4859 else
4860   ac_save_IFS=$IFS; IFS=$ac_path_separator
4861 ac_dummy="$PATH"
4862 for ac_dir in $ac_dummy; do
4863   IFS=$ac_save_IFS
4864   test -z "$ac_dir" && ac_dir=.
4865   $as_executable_p "$ac_dir/$ac_word" || continue
4866 ac_cv_prog_ac_ct_NM="nm"
4867 echo "$as_me:4867: found $ac_dir/$ac_word" >&5
4868 break
4869 done
4870
4871   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4872 fi
4873 fi
4874 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4875 if test -n "$ac_ct_NM"; then
4876   echo "$as_me:4876: result: $ac_ct_NM" >&5
4877 echo "${ECHO_T}$ac_ct_NM" >&6
4878 else
4879   echo "$as_me:4879: result: no" >&5
4880 echo "${ECHO_T}no" >&6
4881 fi
4882
4883   NM=$ac_ct_NM
4884 else
4885   NM="$ac_cv_prog_NM"
4886 fi
4887
4888 if test -n "$ac_tool_prefix"; then
4889   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4890 set dummy ${ac_tool_prefix}ar; ac_word=$2
4891 echo "$as_me:4891: checking for $ac_word" >&5
4892 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4893 if test "${ac_cv_prog_AR+set}" = set; then
4894   echo $ECHO_N "(cached) $ECHO_C" >&6
4895 else
4896   if test -n "$AR"; then
4897   ac_cv_prog_AR="$AR" # Let the user override the test.
4898 else
4899   ac_save_IFS=$IFS; IFS=$ac_path_separator
4900 ac_dummy="$PATH"
4901 for ac_dir in $ac_dummy; do
4902   IFS=$ac_save_IFS
4903   test -z "$ac_dir" && ac_dir=.
4904   $as_executable_p "$ac_dir/$ac_word" || continue
4905 ac_cv_prog_AR="${ac_tool_prefix}ar"
4906 echo "$as_me:4906: found $ac_dir/$ac_word" >&5
4907 break
4908 done
4909
4910 fi
4911 fi
4912 AR=$ac_cv_prog_AR
4913 if test -n "$AR"; then
4914   echo "$as_me:4914: result: $AR" >&5
4915 echo "${ECHO_T}$AR" >&6
4916 else
4917   echo "$as_me:4917: result: no" >&5
4918 echo "${ECHO_T}no" >&6
4919 fi
4920
4921 fi
4922 if test -z "$ac_cv_prog_AR"; then
4923   ac_ct_AR=$AR
4924   # Extract the first word of "ar", so it can be a program name with args.
4925 set dummy ar; ac_word=$2
4926 echo "$as_me:4926: checking for $ac_word" >&5
4927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4928 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4929   echo $ECHO_N "(cached) $ECHO_C" >&6
4930 else
4931   if test -n "$ac_ct_AR"; then
4932   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4933 else
4934   ac_save_IFS=$IFS; IFS=$ac_path_separator
4935 ac_dummy="$PATH"
4936 for ac_dir in $ac_dummy; do
4937   IFS=$ac_save_IFS
4938   test -z "$ac_dir" && ac_dir=.
4939   $as_executable_p "$ac_dir/$ac_word" || continue
4940 ac_cv_prog_ac_ct_AR="ar"
4941 echo "$as_me:4941: found $ac_dir/$ac_word" >&5
4942 break
4943 done
4944
4945   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4946 fi
4947 fi
4948 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4949 if test -n "$ac_ct_AR"; then
4950   echo "$as_me:4950: result: $ac_ct_AR" >&5
4951 echo "${ECHO_T}$ac_ct_AR" >&6
4952 else
4953   echo "$as_me:4953: result: no" >&5
4954 echo "${ECHO_T}no" >&6
4955 fi
4956
4957   AR=$ac_ct_AR
4958 else
4959   AR="$ac_cv_prog_AR"
4960 fi
4961
4962 echo "$as_me:4962: checking for options to update archives" >&5
4963 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4964 if test "${cf_cv_ar_flags+set}" = set; then
4965   echo $ECHO_N "(cached) $ECHO_C" >&6
4966 else
4967
4968         case "$cf_cv_system_name" in
4969         (*-msvc*)
4970                 cf_cv_ar_flags=''
4971                 cat >mk_static_lib.sh <<-EOF
4972                 #!$SHELL
4973                 MSVC_BIN="$AR"
4974                 out="\$1"
4975                 shift
4976                 exec \$MSVC_BIN -out:"\$out" \$@
4977                 EOF
4978                 chmod +x mk_static_lib.sh
4979                 AR=`pwd`/mk_static_lib.sh
4980                 ;;
4981         (*)
4982                 cf_cv_ar_flags=unknown
4983                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4984                 do
4985
4986                         # check if $ARFLAGS already contains this choice
4987                         if test "x$ARFLAGS" != "x" ; then
4988                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4989                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4990                                         cf_cv_ar_flags=
4991                                         break
4992                                 fi
4993                         fi
4994
4995                         rm -f "conftest.$ac_cv_objext"
4996                         rm -f conftest.a
4997
4998                         cat >"conftest.$ac_ext" <<EOF
4999 #line 4999 "configure"
5000 int     testdata[3] = { 123, 456, 789 };
5001 EOF
5002                         if { (eval echo "$as_me:5002: \"$ac_compile\"") >&5
5003   (eval $ac_compile) 2>&5
5004   ac_status=$?
5005   echo "$as_me:5005: \$? = $ac_status" >&5
5006   (exit "$ac_status"); } ; then
5007                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5008                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5009                                 if test -f conftest.a ; then
5010                                         cf_cv_ar_flags="$cf_ar_flags"
5011                                         break
5012                                 fi
5013                         else
5014                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5015
5016 echo "${as_me:-configure}:5016: testing cannot compile test-program ..." 1>&5
5017
5018                                 break
5019                         fi
5020                 done
5021                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5022                 ;;
5023         esac
5024
5025 fi
5026 echo "$as_me:5026: result: $cf_cv_ar_flags" >&5
5027 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5028
5029 if test -n "$ARFLAGS" ; then
5030         if test -n "$cf_cv_ar_flags" ; then
5031                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5032         fi
5033 else
5034         ARFLAGS=$cf_cv_ar_flags
5035 fi
5036
5037 echo "$as_me:5037: checking if you have specified an install-prefix" >&5
5038 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5039
5040 # Check whether --with-install-prefix or --without-install-prefix was given.
5041 if test "${with_install_prefix+set}" = set; then
5042   withval="$with_install_prefix"
5043   case "x$withval" in
5044         (xyes|xno)
5045                 ;;
5046         (*)     DESTDIR="$withval"
5047                 ;;
5048         esac
5049 fi;
5050 echo "$as_me:5050: result: $DESTDIR" >&5
5051 echo "${ECHO_T}$DESTDIR" >&6
5052
5053 ###############################################################################
5054
5055 # If we're cross-compiling, allow the user to override the tools and their
5056 # options.  The configure script is oriented toward identifying the host
5057 # compiler, etc., but we need a build compiler to generate parts of the source.
5058
5059 case "$cf_cv_system_name" in
5060 (*-msvc*)
5061         LDFLAGS="$LDFLAGS user32.lib"
5062         export LDFLAGS
5063         ;;
5064 esac
5065
5066 if test "$cross_compiling" = yes ; then
5067
5068         # defaults that we might want to override
5069         : ${BUILD_CFLAGS:=''}
5070         : ${BUILD_CPPFLAGS:=''}
5071         : ${BUILD_LDFLAGS:=''}
5072         : ${BUILD_LIBS:=''}
5073         : ${BUILD_EXEEXT:='$x'}
5074         : ${BUILD_OBJEXT:='o'}
5075
5076 # Check whether --with-build-cc or --without-build-cc was given.
5077 if test "${with_build_cc+set}" = set; then
5078   withval="$with_build_cc"
5079   BUILD_CC="$withval"
5080 else
5081   for ac_prog in gcc clang c99 c89 cc cl
5082 do
5083   # Extract the first word of "$ac_prog", so it can be a program name with args.
5084 set dummy $ac_prog; ac_word=$2
5085 echo "$as_me:5085: checking for $ac_word" >&5
5086 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5087 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5088   echo $ECHO_N "(cached) $ECHO_C" >&6
5089 else
5090   if test -n "$BUILD_CC"; then
5091   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5092 else
5093   ac_save_IFS=$IFS; IFS=$ac_path_separator
5094 ac_dummy="$PATH"
5095 for ac_dir in $ac_dummy; do
5096   IFS=$ac_save_IFS
5097   test -z "$ac_dir" && ac_dir=.
5098   $as_executable_p "$ac_dir/$ac_word" || continue
5099 ac_cv_prog_BUILD_CC="$ac_prog"
5100 echo "$as_me:5100: found $ac_dir/$ac_word" >&5
5101 break
5102 done
5103
5104 fi
5105 fi
5106 BUILD_CC=$ac_cv_prog_BUILD_CC
5107 if test -n "$BUILD_CC"; then
5108   echo "$as_me:5108: result: $BUILD_CC" >&5
5109 echo "${ECHO_T}$BUILD_CC" >&6
5110 else
5111   echo "$as_me:5111: result: no" >&5
5112 echo "${ECHO_T}no" >&6
5113 fi
5114
5115   test -n "$BUILD_CC" && break
5116 done
5117 test -n "$BUILD_CC" || BUILD_CC="none"
5118
5119 fi;
5120         echo "$as_me:5120: checking for native build C compiler" >&5
5121 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5122         echo "$as_me:5122: result: $BUILD_CC" >&5
5123 echo "${ECHO_T}$BUILD_CC" >&6
5124
5125         echo "$as_me:5125: checking for native build C preprocessor" >&5
5126 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5127
5128 # Check whether --with-build-cpp or --without-build-cpp was given.
5129 if test "${with_build_cpp+set}" = set; then
5130   withval="$with_build_cpp"
5131   BUILD_CPP="$withval"
5132 else
5133   BUILD_CPP='${BUILD_CC} -E'
5134 fi;
5135         echo "$as_me:5135: result: $BUILD_CPP" >&5
5136 echo "${ECHO_T}$BUILD_CPP" >&6
5137
5138         echo "$as_me:5138: checking for native build C flags" >&5
5139 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5140
5141 # Check whether --with-build-cflags or --without-build-cflags was given.
5142 if test "${with_build_cflags+set}" = set; then
5143   withval="$with_build_cflags"
5144   BUILD_CFLAGS="$withval"
5145 fi;
5146         echo "$as_me:5146: result: $BUILD_CFLAGS" >&5
5147 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5148
5149         echo "$as_me:5149: checking for native build C preprocessor-flags" >&5
5150 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5151
5152 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5153 if test "${with_build_cppflags+set}" = set; then
5154   withval="$with_build_cppflags"
5155   BUILD_CPPFLAGS="$withval"
5156 fi;
5157         echo "$as_me:5157: result: $BUILD_CPPFLAGS" >&5
5158 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5159
5160         echo "$as_me:5160: checking for native build linker-flags" >&5
5161 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5162
5163 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5164 if test "${with_build_ldflags+set}" = set; then
5165   withval="$with_build_ldflags"
5166   BUILD_LDFLAGS="$withval"
5167 fi;
5168         echo "$as_me:5168: result: $BUILD_LDFLAGS" >&5
5169 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5170
5171         echo "$as_me:5171: checking for native build linker-libraries" >&5
5172 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5173
5174 # Check whether --with-build-libs or --without-build-libs was given.
5175 if test "${with_build_libs+set}" = set; then
5176   withval="$with_build_libs"
5177   BUILD_LIBS="$withval"
5178 fi;
5179         echo "$as_me:5179: result: $BUILD_LIBS" >&5
5180 echo "${ECHO_T}$BUILD_LIBS" >&6
5181
5182         # this assumes we're on Unix.
5183         BUILD_EXEEXT=
5184         BUILD_OBJEXT=o
5185
5186         : ${BUILD_CC:='${CC}'}
5187
5188         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5189                 { { echo "$as_me:5189: error: Cross-build requires two compilers.
5190 Use --with-build-cc to specify the native compiler." >&5
5191 echo "$as_me: error: Cross-build requires two compilers.
5192 Use --with-build-cc to specify the native compiler." >&2;}
5193    { (exit 1); exit 1; }; }
5194         fi
5195
5196 else
5197         : ${BUILD_CC:='${CC}'}
5198         : ${BUILD_CPP:='${CPP}'}
5199         : ${BUILD_CFLAGS:='${CFLAGS}'}
5200         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5201         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5202         : ${BUILD_LIBS:='${LIBS}'}
5203         : ${BUILD_EXEEXT:='$x'}
5204         : ${BUILD_OBJEXT:='o'}
5205 fi
5206
5207 ###############################################################################
5208
5209 ### Options to allow the user to specify the set of libraries which are used.
5210 ### Use "--without-normal --with-shared" to allow the default model to be
5211 ### shared, for example.
5212 cf_list_models=""
5213
5214 echo "$as_me:5214: checking if libtool -version-number should be used" >&5
5215 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5216
5217 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5218 if test "${enable_libtool_version+set}" = set; then
5219   enableval="$enable_libtool_version"
5220   test "$enableval" != no && enableval=yes
5221         if test "$enableval" != "yes" ; then
5222     cf_libtool_version=no
5223         else
5224                 cf_libtool_version=yes
5225         fi
5226 else
5227   enableval=yes
5228         cf_libtool_version=yes
5229
5230 fi;
5231 echo "$as_me:5231: result: $cf_libtool_version" >&5
5232 echo "${ECHO_T}$cf_libtool_version" >&6
5233
5234 if test "$cf_libtool_version" = yes ; then
5235         LIBTOOL_VERSION="-version-number"
5236 else
5237         LIBTOOL_VERSION="-version-info"
5238         case "x$VERSION" in
5239         (x)
5240                 { echo "$as_me:5240: WARNING: VERSION was not set" >&5
5241 echo "$as_me: WARNING: VERSION was not set" >&2;}
5242                 ;;
5243         (x*.*.*)
5244                 ABI_VERSION="$VERSION"
5245                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5246
5247 echo "${as_me:-configure}:5247: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5248
5249                 ;;
5250         (x*:*:*)
5251                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5252                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5253
5254 echo "${as_me:-configure}:5254: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5255
5256                 ;;
5257         (*)
5258                 { echo "$as_me:5258: WARNING: unexpected VERSION value: $VERSION" >&5
5259 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5260                 ;;
5261         esac
5262 fi
5263
5264 LIBTOOL=
5265
5266 # common library maintenance symbols that are convenient for libtool scripts:
5267 LIB_CREATE='${AR} -cr'
5268 LIB_OBJECT='${OBJECTS}'
5269 LIB_SUFFIX=.a
5270 LIB_PREP="$RANLIB"
5271
5272 # symbols used to prop libtool up to enable it to determine what it should be
5273 # doing:
5274 LIB_CLEAN=
5275 LIB_COMPILE=
5276 LIB_LINK='${CC}'
5277 LIB_INSTALL=
5278 LIB_UNINSTALL=
5279
5280 echo "$as_me:5280: checking if you want to build libraries with libtool" >&5
5281 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5282
5283 # Check whether --with-libtool or --without-libtool was given.
5284 if test "${with_libtool+set}" = set; then
5285   withval="$with_libtool"
5286   with_libtool=$withval
5287 else
5288   with_libtool=no
5289 fi;
5290 echo "$as_me:5290: result: $with_libtool" >&5
5291 echo "${ECHO_T}$with_libtool" >&6
5292 if test "$with_libtool" != "no"; then
5293
5294         if test "$with_libtool" != "yes" ; then
5295
5296 if test "x$prefix" != xNONE; then
5297         cf_path_syntax="$prefix"
5298 else
5299         cf_path_syntax="$ac_default_prefix"
5300 fi
5301
5302 case ".$with_libtool" in
5303 (.\$\(*\)*|.\'*\'*)
5304         ;;
5305 (..|./*|.\\*)
5306         ;;
5307 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5308         ;;
5309 (.\$\{*prefix\}*|.\$\{*dir\}*)
5310         eval with_libtool="$with_libtool"
5311         case ".$with_libtool" in
5312         (.NONE/*)
5313                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5314                 ;;
5315         esac
5316         ;;
5317 (.no|.NONE/*)
5318         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5319         ;;
5320 (*)
5321         { { echo "$as_me:5321: error: expected a pathname, not \"$with_libtool\"" >&5
5322 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5323    { (exit 1); exit 1; }; }
5324         ;;
5325 esac
5326
5327                 LIBTOOL=$with_libtool
5328         else
5329                 if test -n "$ac_tool_prefix"; then
5330   for ac_prog in libtool glibtool
5331   do
5332     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5333 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5334 echo "$as_me:5334: checking for $ac_word" >&5
5335 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5336 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5337   echo $ECHO_N "(cached) $ECHO_C" >&6
5338 else
5339   if test -n "$LIBTOOL"; then
5340   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5341 else
5342   ac_save_IFS=$IFS; IFS=$ac_path_separator
5343 ac_dummy="$PATH"
5344 for ac_dir in $ac_dummy; do
5345   IFS=$ac_save_IFS
5346   test -z "$ac_dir" && ac_dir=.
5347   $as_executable_p "$ac_dir/$ac_word" || continue
5348 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5349 echo "$as_me:5349: found $ac_dir/$ac_word" >&5
5350 break
5351 done
5352
5353 fi
5354 fi
5355 LIBTOOL=$ac_cv_prog_LIBTOOL
5356 if test -n "$LIBTOOL"; then
5357   echo "$as_me:5357: result: $LIBTOOL" >&5
5358 echo "${ECHO_T}$LIBTOOL" >&6
5359 else
5360   echo "$as_me:5360: result: no" >&5
5361 echo "${ECHO_T}no" >&6
5362 fi
5363
5364     test -n "$LIBTOOL" && break
5365   done
5366 fi
5367 if test -z "$LIBTOOL"; then
5368   ac_ct_LIBTOOL=$LIBTOOL
5369   for ac_prog in libtool glibtool
5370 do
5371   # Extract the first word of "$ac_prog", so it can be a program name with args.
5372 set dummy $ac_prog; ac_word=$2
5373 echo "$as_me:5373: checking for $ac_word" >&5
5374 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5375 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5376   echo $ECHO_N "(cached) $ECHO_C" >&6
5377 else
5378   if test -n "$ac_ct_LIBTOOL"; then
5379   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5380 else
5381   ac_save_IFS=$IFS; IFS=$ac_path_separator
5382 ac_dummy="$PATH"
5383 for ac_dir in $ac_dummy; do
5384   IFS=$ac_save_IFS
5385   test -z "$ac_dir" && ac_dir=.
5386   $as_executable_p "$ac_dir/$ac_word" || continue
5387 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5388 echo "$as_me:5388: found $ac_dir/$ac_word" >&5
5389 break
5390 done
5391
5392 fi
5393 fi
5394 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5395 if test -n "$ac_ct_LIBTOOL"; then
5396   echo "$as_me:5396: result: $ac_ct_LIBTOOL" >&5
5397 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5398 else
5399   echo "$as_me:5399: result: no" >&5
5400 echo "${ECHO_T}no" >&6
5401 fi
5402
5403   test -n "$ac_ct_LIBTOOL" && break
5404 done
5405 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5406
5407   LIBTOOL=$ac_ct_LIBTOOL
5408 fi
5409
5410 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5411 then
5412         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
5413 else
5414         cf_cv_libtool_version=
5415 fi
5416 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5417
5418                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5419                 then
5420
5421 unset ac_cv_prog_ac_ct_LIBTOOL
5422 unset ac_ct_LIBTOOL
5423 unset LIBTOOL
5424
5425                         if test -n "$ac_tool_prefix"; then
5426   for ac_prog in glibtool
5427   do
5428     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5429 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5430 echo "$as_me:5430: checking for $ac_word" >&5
5431 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5432 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5433   echo $ECHO_N "(cached) $ECHO_C" >&6
5434 else
5435   if test -n "$LIBTOOL"; then
5436   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5437 else
5438   ac_save_IFS=$IFS; IFS=$ac_path_separator
5439 ac_dummy="$PATH"
5440 for ac_dir in $ac_dummy; do
5441   IFS=$ac_save_IFS
5442   test -z "$ac_dir" && ac_dir=.
5443   $as_executable_p "$ac_dir/$ac_word" || continue
5444 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5445 echo "$as_me:5445: found $ac_dir/$ac_word" >&5
5446 break
5447 done
5448
5449 fi
5450 fi
5451 LIBTOOL=$ac_cv_prog_LIBTOOL
5452 if test -n "$LIBTOOL"; then
5453   echo "$as_me:5453: result: $LIBTOOL" >&5
5454 echo "${ECHO_T}$LIBTOOL" >&6
5455 else
5456   echo "$as_me:5456: result: no" >&5
5457 echo "${ECHO_T}no" >&6
5458 fi
5459
5460     test -n "$LIBTOOL" && break
5461   done
5462 fi
5463 if test -z "$LIBTOOL"; then
5464   ac_ct_LIBTOOL=$LIBTOOL
5465   for ac_prog in glibtool
5466 do
5467   # Extract the first word of "$ac_prog", so it can be a program name with args.
5468 set dummy $ac_prog; ac_word=$2
5469 echo "$as_me:5469: checking for $ac_word" >&5
5470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5471 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5472   echo $ECHO_N "(cached) $ECHO_C" >&6
5473 else
5474   if test -n "$ac_ct_LIBTOOL"; then
5475   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5476 else
5477   ac_save_IFS=$IFS; IFS=$ac_path_separator
5478 ac_dummy="$PATH"
5479 for ac_dir in $ac_dummy; do
5480   IFS=$ac_save_IFS
5481   test -z "$ac_dir" && ac_dir=.
5482   $as_executable_p "$ac_dir/$ac_word" || continue
5483 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5484 echo "$as_me:5484: found $ac_dir/$ac_word" >&5
5485 break
5486 done
5487
5488 fi
5489 fi
5490 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5491 if test -n "$ac_ct_LIBTOOL"; then
5492   echo "$as_me:5492: result: $ac_ct_LIBTOOL" >&5
5493 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5494 else
5495   echo "$as_me:5495: result: no" >&5
5496 echo "${ECHO_T}no" >&6
5497 fi
5498
5499   test -n "$ac_ct_LIBTOOL" && break
5500 done
5501 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5502
5503   LIBTOOL=$ac_ct_LIBTOOL
5504 fi
5505
5506 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5507 then
5508         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
5509 else
5510         cf_cv_libtool_version=
5511 fi
5512 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5513
5514                 fi
5515         fi
5516         if test -z "$LIBTOOL" ; then
5517                 { { echo "$as_me:5517: error: Cannot find libtool" >&5
5518 echo "$as_me: error: Cannot find libtool" >&2;}
5519    { (exit 1); exit 1; }; }
5520         fi
5521         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5522         LIB_OBJECT='${OBJECTS:.o=.lo}'
5523         LIB_SUFFIX=.la
5524         LIB_CLEAN='${LIBTOOL} --mode=clean'
5525         LIB_COMPILE='${LIBTOOL} --mode=compile'
5526         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5527         LIB_INSTALL='${LIBTOOL} --mode=install'
5528         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5529         LIB_PREP=:
5530
5531 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5532 then
5533         echo "$as_me:5533: checking version of $LIBTOOL" >&5
5534 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5535
5536 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5537 then
5538         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
5539 else
5540         cf_cv_libtool_version=
5541 fi
5542 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5543
5544         echo "$as_me:5544: result: $cf_cv_libtool_version" >&5
5545 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5546         if test -z "$cf_cv_libtool_version" ; then
5547                 { { echo "$as_me:5547: error: This is not GNU libtool" >&5
5548 echo "$as_me: error: This is not GNU libtool" >&2;}
5549    { (exit 1); exit 1; }; }
5550         fi
5551 else
5552         { { echo "$as_me:5552: error: GNU libtool has not been found" >&5
5553 echo "$as_me: error: GNU libtool has not been found" >&2;}
5554    { (exit 1); exit 1; }; }
5555 fi
5556
5557         # special hack to add -no-undefined (which libtool should do for itself)
5558         LT_UNDEF=
5559         case "$cf_cv_system_name" in
5560         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5561                 LT_UNDEF=-no-undefined
5562                 ;;
5563         esac
5564
5565         # special hack to add --tag option for C++ compiler
5566         case "$cf_cv_libtool_version" in
5567         (1.[5-9]*|[2-9].[0-9.a-z]*)
5568                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5569                 LIBTOOL="$LIBTOOL --tag=CC"
5570                 ;;
5571         (*)
5572                 LIBTOOL_CXX="$LIBTOOL"
5573                 ;;
5574         esac
5575 else
5576         LIBTOOL=""
5577         LIBTOOL_CXX=""
5578 fi
5579
5580 test -z "$LIBTOOL" && ECHO_LT=
5581
5582 if test "$with_libtool" != "no" ; then
5583
5584 cf_list_models="$cf_list_models libtool"
5585
5586 else
5587
5588 echo "$as_me:5588: checking if you want to build shared libraries" >&5
5589 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5590
5591 # Check whether --with-shared or --without-shared was given.
5592 if test "${with_shared+set}" = set; then
5593   withval="$with_shared"
5594   with_shared=$withval
5595 else
5596   with_shared=no
5597 fi;
5598 echo "$as_me:5598: result: $with_shared" >&5
5599 echo "${ECHO_T}$with_shared" >&6
5600 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5601
5602 echo "$as_me:5602: checking if you want to build static libraries" >&5
5603 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5604
5605 # Check whether --with-normal or --without-normal was given.
5606 if test "${with_normal+set}" = set; then
5607   withval="$with_normal"
5608   with_normal=$withval
5609 else
5610   with_normal=yes
5611 fi;
5612 echo "$as_me:5612: result: $with_normal" >&5
5613 echo "${ECHO_T}$with_normal" >&6
5614 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5615
5616 echo "$as_me:5616: checking if you want to build debug libraries" >&5
5617 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5618
5619 # Check whether --with-debug or --without-debug was given.
5620 if test "${with_debug+set}" = set; then
5621   withval="$with_debug"
5622   with_debug=$withval
5623 else
5624   with_debug=yes
5625 fi;
5626 echo "$as_me:5626: result: $with_debug" >&5
5627 echo "${ECHO_T}$with_debug" >&6
5628 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5629
5630 echo "$as_me:5630: checking if you want to build profiling libraries" >&5
5631 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5632
5633 # Check whether --with-profile or --without-profile was given.
5634 if test "${with_profile+set}" = set; then
5635   withval="$with_profile"
5636   with_profile=$withval
5637 else
5638   with_profile=no
5639 fi;
5640 echo "$as_me:5640: result: $with_profile" >&5
5641 echo "${ECHO_T}$with_profile" >&6
5642 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5643
5644 fi
5645
5646 if test "X$cf_with_cxx_binding" != Xno; then
5647 if test "x$with_shared" = "xyes"; then
5648 echo "$as_me:5648: checking if you want to build C++ shared libraries" >&5
5649 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5650
5651 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5652 if test "${with_cxx_shared+set}" = set; then
5653   withval="$with_cxx_shared"
5654   with_shared_cxx=$withval
5655 else
5656   with_shared_cxx=no
5657 fi;
5658 echo "$as_me:5658: result: $with_shared_cxx" >&5
5659 echo "${ECHO_T}$with_shared_cxx" >&6
5660 fi
5661 fi
5662
5663 ###############################################################################
5664
5665 echo "$as_me:5665: checking for specified models" >&5
5666 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5667 test -z "$cf_list_models" && cf_list_models=normal
5668 test "$with_libtool" != "no" && cf_list_models=libtool
5669 echo "$as_me:5669: result: $cf_list_models" >&5
5670 echo "${ECHO_T}$cf_list_models" >&6
5671
5672 ### Use the first model as the default, and save its suffix for use in building
5673 ### up test-applications.
5674 echo "$as_me:5674: checking for default model" >&5
5675 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5676 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5677 echo "$as_me:5677: result: $DFT_LWR_MODEL" >&5
5678 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5679
5680 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5681
5682 TICS_NAME=tic
5683
5684 TINFO_NAME=tinfo
5685
5686 LIB_NAME=ncurses
5687
5688 LIB_DIR=../lib
5689 LIB_2ND=../../lib
5690
5691 echo "$as_me:5691: checking if you want to have a library-prefix" >&5
5692 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5693
5694 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5695 if test "${with_lib_prefix+set}" = set; then
5696   withval="$with_lib_prefix"
5697   with_lib_prefix=$withval
5698 else
5699   with_lib_prefix=auto
5700 fi;
5701 echo "$as_me:5701: result: $with_lib_prefix" >&5
5702 echo "${ECHO_T}$with_lib_prefix" >&6
5703
5704 if test "$with_lib_prefix" = auto
5705 then
5706
5707         case "$cf_cv_system_name" in
5708         (OS/2*|os2*)
5709                 if test "$DFT_LWR_MODEL" = libtool; then
5710                         LIB_PREFIX='lib'
5711                 else
5712                         LIB_PREFIX=''
5713                 fi
5714                 ;;
5715         (*-msvc*)
5716                 LIB_PREFIX=''
5717                 ;;
5718         (*)     LIB_PREFIX='lib'
5719                 ;;
5720         esac
5721 cf_prefix=$LIB_PREFIX
5722
5723 elif test "$with_lib_prefix" = no
5724 then
5725         LIB_PREFIX=
5726 else
5727         LIB_PREFIX=$with_lib_prefix
5728 fi
5729
5730 LIB_SUFFIX=
5731
5732         echo "$as_me:5732: checking for PATH separator" >&5
5733 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5734         case "$cf_cv_system_name" in
5735         (os2*)  PATH_SEPARATOR=';'  ;;
5736         (*)     ${PATH_SEPARATOR:=':'}  ;;
5737         esac
5738
5739         echo "$as_me:5739: result: $PATH_SEPARATOR" >&5
5740 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5741
5742 ###############################################################################
5743
5744 echo "$as_me:5744: checking if you want to build a separate terminfo library" >&5
5745 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5746
5747 # Check whether --with-termlib or --without-termlib was given.
5748 if test "${with_termlib+set}" = set; then
5749   withval="$with_termlib"
5750   with_termlib=$withval
5751 else
5752   with_termlib=no
5753 fi;
5754 echo "$as_me:5754: result: $with_termlib" >&5
5755 echo "${ECHO_T}$with_termlib" >&6
5756
5757 echo "$as_me:5757: checking if you want to build a separate tic library" >&5
5758 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5759
5760 # Check whether --with-ticlib or --without-ticlib was given.
5761 if test "${with_ticlib+set}" = set; then
5762   withval="$with_ticlib"
5763   with_ticlib=$withval
5764 else
5765   with_ticlib=no
5766 fi;
5767 echo "$as_me:5767: result: $with_ticlib" >&5
5768 echo "${ECHO_T}$with_ticlib" >&6
5769
5770 if test X"$CC_G_OPT" = X"" ; then
5771         CC_G_OPT='-g'
5772         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5773 fi
5774
5775 if test X"$CXX_G_OPT" = X"" ; then
5776         CXX_G_OPT='-g'
5777         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5778 fi
5779
5780 echo "$as_me:5780: checking for default loader flags" >&5
5781 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5782 case "$DFT_LWR_MODEL" in
5783 (libtool) LD_MODEL=''   ;;
5784 (normal)  LD_MODEL=''   ;;
5785 (debug)   LD_MODEL=$CC_G_OPT ;;
5786 (profile) LD_MODEL='-pg';;
5787 (shared)  LD_MODEL=''   ;;
5788 esac
5789 echo "$as_me:5789: result: $LD_MODEL" >&5
5790 echo "${ECHO_T}$LD_MODEL" >&6
5791
5792 case "$DFT_LWR_MODEL" in
5793 (shared)
5794
5795 echo "$as_me:5795: checking if rpath option should be used" >&5
5796 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5797
5798 # Check whether --enable-rpath or --disable-rpath was given.
5799 if test "${enable_rpath+set}" = set; then
5800   enableval="$enable_rpath"
5801   cf_cv_enable_rpath=$enableval
5802 else
5803   cf_cv_enable_rpath=no
5804 fi;
5805 echo "$as_me:5805: result: $cf_cv_enable_rpath" >&5
5806 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5807
5808 echo "$as_me:5808: checking if shared libraries should be relinked during install" >&5
5809 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5810
5811 # Check whether --enable-relink or --disable-relink was given.
5812 if test "${enable_relink+set}" = set; then
5813   enableval="$enable_relink"
5814   cf_cv_do_relink=$enableval
5815 else
5816   cf_cv_do_relink=yes
5817 fi;
5818 echo "$as_me:5818: result: $cf_cv_do_relink" >&5
5819 echo "${ECHO_T}$cf_cv_do_relink" >&6
5820         ;;
5821 esac
5822
5823 # we will build libraries one-level down.
5824 rel_builddir=..
5825
5826 LD_RPATH_OPT=
5827 if test "x$cf_cv_enable_rpath" != xno
5828 then
5829         echo "$as_me:5829: checking for an rpath option" >&5
5830 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5831         case "$cf_cv_system_name" in
5832         (irix*)
5833                 if test "$GCC" = yes; then
5834                         LD_RPATH_OPT="-Wl,-rpath,"
5835                 else
5836                         LD_RPATH_OPT="-rpath "
5837                 fi
5838                 ;;
5839         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5840                 LD_RPATH_OPT="-Wl,-rpath,"
5841                 ;;
5842         (openbsd[2-9].*|mirbsd*)
5843                 LD_RPATH_OPT="-Wl,-rpath,"
5844                 ;;
5845         (dragonfly*)
5846                 LD_RPATH_OPT="-rpath "
5847                 ;;
5848         (netbsd*)
5849                 LD_RPATH_OPT="-Wl,-rpath,"
5850                 ;;
5851         (osf*|mls+*)
5852                 LD_RPATH_OPT="-rpath "
5853                 ;;
5854         (solaris2*)
5855                 LD_RPATH_OPT="-R"
5856                 ;;
5857         (*)
5858                 ;;
5859         esac
5860         echo "$as_me:5860: result: $LD_RPATH_OPT" >&5
5861 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5862
5863         case "x$LD_RPATH_OPT" in
5864         (x-R*)
5865                 echo "$as_me:5865: checking if we need a space after rpath option" >&5
5866 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5867                 cf_save_LIBS="$LIBS"
5868
5869 cf_add_libs="$LIBS"
5870 # reverse order
5871 cf_add_0lib=
5872 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5873 # filter duplicates
5874 for cf_add_1lib in $cf_add_0lib; do
5875         for cf_add_2lib in $cf_add_libs; do
5876                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5877                         cf_add_1lib=
5878                         break
5879                 fi
5880         done
5881         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5882 done
5883 LIBS="$cf_add_libs"
5884
5885                 cat >"conftest.$ac_ext" <<_ACEOF
5886 #line 5886 "configure"
5887 #include "confdefs.h"
5888
5889 int
5890 main (void)
5891 {
5892
5893   ;
5894   return 0;
5895 }
5896 _ACEOF
5897 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5898 if { (eval echo "$as_me:5898: \"$ac_link\"") >&5
5899   (eval $ac_link) 2>&5
5900   ac_status=$?
5901   echo "$as_me:5901: \$? = $ac_status" >&5
5902   (exit "$ac_status"); } &&
5903          { ac_try='test -s "conftest$ac_exeext"'
5904   { (eval echo "$as_me:5904: \"$ac_try\"") >&5
5905   (eval $ac_try) 2>&5
5906   ac_status=$?
5907   echo "$as_me:5907: \$? = $ac_status" >&5
5908   (exit "$ac_status"); }; }; then
5909   cf_rpath_space=no
5910 else
5911   echo "$as_me: failed program was:" >&5
5912 cat "conftest.$ac_ext" >&5
5913 cf_rpath_space=yes
5914 fi
5915 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5916                 LIBS="$cf_save_LIBS"
5917                 echo "$as_me:5917: result: $cf_rpath_space" >&5
5918 echo "${ECHO_T}$cf_rpath_space" >&6
5919                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5920                 ;;
5921         esac
5922 fi
5923
5924         RM_SHARED_OPTS=
5925         LOCAL_LDFLAGS=
5926         LOCAL_LDFLAGS2=
5927         LD_SHARED_OPTS=
5928         INSTALL_LIB="-m 644"
5929         : ${rel_builddir:=.}
5930
5931         shlibdir=$libdir
5932
5933         MAKE_DLLS="#"
5934
5935         cf_cv_do_symlinks=no
5936         cf_ld_rpath_opt=
5937         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5938
5939         echo "$as_me:5939: checking if release/abi version should be used for shared libs" >&5
5940 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5941
5942 # Check whether --with-shlib-version or --without-shlib-version was given.
5943 if test "${with_shlib_version+set}" = set; then
5944   withval="$with_shlib_version"
5945   test -z "$withval" && withval=auto
5946         case "$withval" in
5947         (yes)
5948                 cf_cv_shlib_version=auto
5949                 ;;
5950         (rel|abi|auto)
5951                 cf_cv_shlib_version=$withval
5952                 ;;
5953         (*)
5954                 echo "$as_me:5954: result: $withval" >&5
5955 echo "${ECHO_T}$withval" >&6
5956                 { { echo "$as_me:5956: error: option value must be one of: rel, abi, or auto" >&5
5957 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5958    { (exit 1); exit 1; }; }
5959                 ;;
5960         esac
5961
5962 else
5963   cf_cv_shlib_version=auto
5964 fi;
5965         echo "$as_me:5965: result: $cf_cv_shlib_version" >&5
5966 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5967
5968         cf_cv_rm_so_locs=no
5969         cf_try_cflags=
5970
5971         # Some less-capable ports of gcc support only -fpic
5972         CC_SHARED_OPTS=
5973
5974         cf_try_fPIC=no
5975         if test "$GCC" = yes
5976         then
5977                 cf_try_fPIC=yes
5978         else
5979                 case "$cf_cv_system_name" in
5980                 (*linux*)       # e.g., PGI compiler
5981                         cf_try_fPIC=yes
5982                         ;;
5983                 esac
5984         fi
5985
5986         if test "$cf_try_fPIC" = yes
5987         then
5988                 echo "$as_me:5988: checking which $CC option to use" >&5
5989 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5990                 cf_save_CFLAGS="$CFLAGS"
5991                 for CC_SHARED_OPTS in -fPIC -fpic ''
5992                 do
5993                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5994                         cat >"conftest.$ac_ext" <<_ACEOF
5995 #line 5995 "configure"
5996 #include "confdefs.h"
5997 #include <stdio.h>
5998 int
5999 main (void)
6000 {
6001 int x = 1
6002   ;
6003   return 0;
6004 }
6005 _ACEOF
6006 rm -f "conftest.$ac_objext"
6007 if { (eval echo "$as_me:6007: \"$ac_compile\"") >&5
6008   (eval $ac_compile) 2>&5
6009   ac_status=$?
6010   echo "$as_me:6010: \$? = $ac_status" >&5
6011   (exit "$ac_status"); } &&
6012          { ac_try='test -s "conftest.$ac_objext"'
6013   { (eval echo "$as_me:6013: \"$ac_try\"") >&5
6014   (eval $ac_try) 2>&5
6015   ac_status=$?
6016   echo "$as_me:6016: \$? = $ac_status" >&5
6017   (exit "$ac_status"); }; }; then
6018   break
6019 else
6020   echo "$as_me: failed program was:" >&5
6021 cat "conftest.$ac_ext" >&5
6022 fi
6023 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6024                 done
6025                 echo "$as_me:6025: result: $CC_SHARED_OPTS" >&5
6026 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6027                 CFLAGS="$cf_save_CFLAGS"
6028         fi
6029
6030         cf_cv_shlib_version_infix=no
6031
6032         case "$cf_cv_system_name" in
6033         (aix4.3-9*|aix[5-7]*)
6034                 if test "$GCC" = yes; then
6035                         CC_SHARED_OPTS='-Wl,-brtl'
6036                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6037                 else
6038                         CC_SHARED_OPTS='-brtl'
6039                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6040                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6041                 fi
6042                 ;;
6043         (beos*)
6044                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6045                 ;;
6046         (cygwin*)
6047                 CC_SHARED_OPTS=
6048                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6049                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6050                 cf_cv_shlib_version=cygdll
6051                 cf_cv_shlib_version_infix=cygdll
6052                 shlibdir=$bindir
6053                 MAKE_DLLS=
6054                 cat >mk_shared_lib.sh <<-CF_EOF
6055                 #!$SHELL
6056                 SHARED_LIB=\$1
6057                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6058                 shift
6059                 cat <<-EOF
6060                 Linking shared library
6061                 ** SHARED_LIB \$SHARED_LIB
6062                 ** IMPORT_LIB \$IMPORT_LIB
6063 EOF
6064                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6065 CF_EOF
6066                 chmod +x mk_shared_lib.sh
6067                 ;;
6068         (msys*)
6069                 CC_SHARED_OPTS=
6070                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6071                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6072                 cf_cv_shlib_version=msysdll
6073                 cf_cv_shlib_version_infix=msysdll
6074                 shlibdir=$bindir
6075                 MAKE_DLLS=
6076                 cat >mk_shared_lib.sh <<-CF_EOF
6077                 #!$SHELL
6078                 SHARED_LIB=\$1
6079                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6080                 shift
6081                 cat <<-EOF
6082                 Linking shared library
6083                 ** SHARED_LIB \$SHARED_LIB
6084                 ** IMPORT_LIB \$IMPORT_LIB
6085 EOF
6086                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6087 CF_EOF
6088                 chmod +x mk_shared_lib.sh
6089                 ;;
6090         (darwin*)
6091                 cf_try_cflags="no-cpp-precomp"
6092                 CC_SHARED_OPTS="-dynamic"
6093                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6094                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6095                 cf_cv_shlib_version_infix=yes
6096                 echo "$as_me:6096: checking if ld -search_paths_first works" >&5
6097 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6098 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6099   echo $ECHO_N "(cached) $ECHO_C" >&6
6100 else
6101
6102                         cf_save_LDFLAGS=$LDFLAGS
6103                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6104                         cat >"conftest.$ac_ext" <<_ACEOF
6105 #line 6105 "configure"
6106 #include "confdefs.h"
6107
6108 int
6109 main (void)
6110 {
6111 int i;
6112   ;
6113   return 0;
6114 }
6115 _ACEOF
6116 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6117 if { (eval echo "$as_me:6117: \"$ac_link\"") >&5
6118   (eval $ac_link) 2>&5
6119   ac_status=$?
6120   echo "$as_me:6120: \$? = $ac_status" >&5
6121   (exit "$ac_status"); } &&
6122          { ac_try='test -s "conftest$ac_exeext"'
6123   { (eval echo "$as_me:6123: \"$ac_try\"") >&5
6124   (eval $ac_try) 2>&5
6125   ac_status=$?
6126   echo "$as_me:6126: \$? = $ac_status" >&5
6127   (exit "$ac_status"); }; }; then
6128   cf_cv_ldflags_search_paths_first=yes
6129 else
6130   echo "$as_me: failed program was:" >&5
6131 cat "conftest.$ac_ext" >&5
6132 cf_cv_ldflags_search_paths_first=no
6133 fi
6134 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6135                                 LDFLAGS=$cf_save_LDFLAGS
6136 fi
6137 echo "$as_me:6137: result: $cf_cv_ldflags_search_paths_first" >&5
6138 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6139                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6140                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6141                 fi
6142                 ;;
6143         (hpux[7-8]*)
6144                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6145                 if test "$GCC" != yes; then
6146                         CC_SHARED_OPTS='+Z'
6147                 fi
6148                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6149                 INSTALL_LIB="-m 555"
6150                 ;;
6151         (hpux*)
6152                 # (tested with gcc 2.7.2 -- I don't have c89)
6153                 if test "$GCC" = yes; then
6154                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6155                 else
6156                         CC_SHARED_OPTS='+Z'
6157                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6158                 fi
6159                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6160                 # HP-UX shared libraries must be executable, and should be
6161                 # readonly to exploit a quirk in the memory manager.
6162                 INSTALL_LIB="-m 555"
6163                 ;;
6164         (interix*)
6165                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6166                 if test "$cf_cv_shlib_version" = rel; then
6167                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6168                 else
6169                         cf_shared_soname='`basename $@`'
6170                 fi
6171                 CC_SHARED_OPTS=
6172                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6173                 ;;
6174         (irix*)
6175                 if test "$cf_cv_enable_rpath" = yes ; then
6176                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6177                 fi
6178                 # tested with IRIX 5.2 and 'cc'.
6179                 if test "$GCC" != yes; then
6180                         CC_SHARED_OPTS='-KPIC'
6181                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6182                 else
6183                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6184                 fi
6185                 cf_cv_rm_so_locs=yes
6186                 ;;
6187         (linux*|gnu*|k*bsd*-gnu)
6188                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6189                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6190                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6191                 fi
6192                 if test "$cf_cv_enable_rpath" = yes ; then
6193                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6194                 fi
6195
6196         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6197         if test "$cf_cv_shlib_version" = rel; then
6198                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6199         else
6200                 cf_cv_shared_soname='`basename $@`'
6201         fi
6202
6203                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6204                 ;;
6205         (mingw*msvc*)
6206                 cf_cv_shlib_version=msvcdll
6207                 cf_cv_shlib_version_infix=msvcdll
6208                 shlibdir=$bindir
6209                 MAKE_DLLS=
6210                 if test "$DFT_LWR_MODEL" = "shared" ; then
6211                         LOCAL_LDFLAGS="-link -dll"
6212                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6213                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6214                 fi
6215                 CC_SHARED_OPTS=
6216                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6217                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6218                 cat >mk_shared_lib.sh <<-CF_EOF
6219                 #!$SHELL
6220                 SHARED_LIB=\$1
6221                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6222                 shift
6223                 my_ld=\$1
6224                 shift
6225                 cat <<-EOF
6226                 Linking shared library
6227                 ** SHARED LIB \$SHARED_LIB
6228                 ** IMPORT_LIB \$IMPORT_LIB
6229 EOF
6230                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6231                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6232                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6233 CF_EOF
6234                 chmod +x mk_shared_lib.sh
6235                 cat >mk_prog.sh <<-CF_EOF
6236                 #!$SHELL
6237                 shift
6238                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6239                 LD="$LD"
6240                 clopts=()
6241                 ldopts=("/subsystem:console")
6242                 libs=()
6243                 isdll=0
6244                 while test \$# -gt 0; do
6245                         case "\$1" in
6246                                 -link)
6247                                         # ignore -link argument
6248                                         ;;
6249                                 -M[TD] | -M[TD]d)
6250                                         # ignore runtime-library option
6251                                         ;;
6252                                 -dll)
6253                                         isdll=1
6254                                         ;;
6255                                 -W* | -w*)
6256                                         # ignore warnings
6257                                         ;;
6258                                 -D*)
6259                                         clopts+=("\$1")
6260                                         ;;
6261                                 -I*)
6262                                         clopts+=("\$1")
6263                                         ;;
6264                                 -l*)
6265                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6266                                         ;;
6267                                 -L*)
6268                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6269                                         ;;
6270                                 *.obj | *.o)
6271                                         ldopts+=("\$1")
6272                                         ;;
6273                                 -Wl,*)
6274                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6275                                                 ldopts+=("\${linkarg}")
6276                                         done
6277                                         ;;
6278                                 *.lib)
6279                                         ldopts+=("\$1")
6280                                         ;;
6281                                 -o)
6282                                         shift
6283                                         ldopts+=("-out:\$1")
6284                                         ;;
6285                                 *)
6286                                         clopts+=("\$1")
6287                                         ldopts+=("\$1")
6288                                         ;;
6289                         esac
6290                         shift
6291                 done
6292                 if [ "\$isdll" -ne 0 ]; then
6293                         for lib in \${libs[*]}; do
6294                                 ldopts+=("\$lib.dll.lib")
6295                         done
6296                 else
6297                         for lib in \${libs[*]}; do
6298                                 ldopts+=("\$lib.lib")
6299                         done
6300                 fi
6301                 cat <<-EOF
6302                 Creating program
6303                 ** ld options:   "\${ldopts[@]}"
6304 EOF
6305                 exec \$LD \${ldopts[@]}
6306 CF_EOF
6307                 chmod +x mk_prog.sh
6308                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6309                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6310                 ;;
6311         (mingw*)
6312                 cf_cv_shlib_version=mingw
6313                 cf_cv_shlib_version_infix=mingw
6314                 shlibdir=$bindir
6315                 MAKE_DLLS=
6316                 if test "$DFT_LWR_MODEL" = "shared" ; then
6317                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6318                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6319                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6320                 fi
6321                 CC_SHARED_OPTS=
6322                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6323                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6324                 cat >mk_shared_lib.sh <<-CF_EOF
6325                 #!$SHELL
6326                 SHARED_LIB=\$1
6327                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6328                 shift
6329                 cat <<-EOF
6330                 Linking shared library
6331                 ** SHARED_LIB \$SHARED_LIB
6332                 ** IMPORT_LIB \$IMPORT_LIB
6333 EOF
6334                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6335 CF_EOF
6336                 chmod +x mk_shared_lib.sh
6337                 ;;
6338         (openbsd[2-9].*|mirbsd*)
6339                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6340                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6341                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6342                 fi
6343                 if test "$cf_cv_enable_rpath" = yes ; then
6344                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6345                 fi
6346                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
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,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6356                 ;;
6357         (nskJ*)
6358                 CC_SHARED_OPTS=
6359                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6360                 ;;
6361         (nskL*)
6362                 CC_SHARED_OPTS=
6363                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6364                 ;;
6365         (nto-qnx*|openbsd*|freebsd[12].*)
6366                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6367                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6368                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6369                 ;;
6370         (dragonfly*|freebsd*)
6371                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6372                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6373                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6374                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6375                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6376                 fi
6377
6378         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6379         if test "$cf_cv_shlib_version" = rel; then
6380                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6381         else
6382                 cf_cv_shared_soname='`basename $@`'
6383         fi
6384
6385                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6386                 ;;
6387         (netbsd*)
6388                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6389                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6390                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6391                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6392                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6393                         if test "$cf_cv_shlib_version" = auto; then
6394                         if test -f /usr/libexec/ld.elf_so; then
6395                                 cf_cv_shlib_version=abi
6396                         else
6397                                 cf_cv_shlib_version=rel
6398                         fi
6399                         fi
6400
6401         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6402         if test "$cf_cv_shlib_version" = rel; then
6403                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6404         else
6405                 cf_cv_shared_soname='`basename $@`'
6406         fi
6407
6408                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6409                 else
6410                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6411                 fi
6412                 ;;
6413         (osf*|mls+*)
6414                 # tested with OSF/1 V3.2 and 'cc'
6415                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6416                 # link with shared libs).
6417                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6418                 case "$host_os" in
6419                 (osf4*)
6420                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6421                         ;;
6422                 esac
6423                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6424                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6425                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6426                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6427                 fi
6428                 cf_cv_rm_so_locs=yes
6429                 ;;
6430         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6431                 # tested with osr5.0.5
6432                 if test "$GCC" != yes; then
6433                         CC_SHARED_OPTS='-belf -KPIC'
6434                 fi
6435                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6436                 if test "$cf_cv_enable_rpath" = yes ; then
6437                         # only way is to set LD_RUN_PATH but no switch for it
6438                         RUN_PATH=$libdir
6439                 fi
6440                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6441                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6442                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6443                 ;;
6444         (sunos4*)
6445                 # tested with SunOS 4.1.1 and gcc 2.7.0
6446                 if test "$GCC" != yes; then
6447                         CC_SHARED_OPTS='-KPIC'
6448                 fi
6449                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6450                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6451                 ;;
6452         (solaris2*)
6453                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6454                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6455                 if test "$DFT_LWR_MODEL" = "shared" ; then
6456                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6457                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6458                 fi
6459                 if test "$cf_cv_enable_rpath" = yes ; then
6460                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6461                 fi
6462
6463         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6464         if test "$cf_cv_shlib_version" = rel; then
6465                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6466         else
6467                 cf_cv_shared_soname='`basename $@`'
6468         fi
6469
6470                 if test "$GCC" != yes; then
6471                         cf_save_CFLAGS="$CFLAGS"
6472                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6473                         do
6474                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6475                                 cat >"conftest.$ac_ext" <<_ACEOF
6476 #line 6476 "configure"
6477 #include "confdefs.h"
6478 #include <stdio.h>
6479 int
6480 main (void)
6481 {
6482 printf("Hello\\n");
6483   ;
6484   return 0;
6485 }
6486 _ACEOF
6487 rm -f "conftest.$ac_objext"
6488 if { (eval echo "$as_me:6488: \"$ac_compile\"") >&5
6489   (eval $ac_compile) 2>&5
6490   ac_status=$?
6491   echo "$as_me:6491: \$? = $ac_status" >&5
6492   (exit "$ac_status"); } &&
6493          { ac_try='test -s "conftest.$ac_objext"'
6494   { (eval echo "$as_me:6494: \"$ac_try\"") >&5
6495   (eval $ac_try) 2>&5
6496   ac_status=$?
6497   echo "$as_me:6497: \$? = $ac_status" >&5
6498   (exit "$ac_status"); }; }; then
6499   break
6500 else
6501   echo "$as_me: failed program was:" >&5
6502 cat "conftest.$ac_ext" >&5
6503 fi
6504 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6505                         done
6506                         CFLAGS="$cf_save_CFLAGS"
6507                         CC_SHARED_OPTS=$cf_shared_opts
6508                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6509                 else
6510                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6511                 fi
6512                 ;;
6513         (sysv5uw7*|unix_sv*)
6514                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6515                 if test "$GCC" != yes; then
6516                         CC_SHARED_OPTS='-KPIC'
6517                 fi
6518                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6519                 ;;
6520         (*)
6521                 CC_SHARED_OPTS='unknown'
6522                 MK_SHARED_LIB='echo unknown'
6523                 ;;
6524         esac
6525
6526         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6527         case "$cf_cv_shlib_version" in
6528         (rel|abi)
6529                 case "$MK_SHARED_LIB" in
6530                 (*'-o $@')
6531                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6532                         ;;
6533                 (*)
6534                         { echo "$as_me:6534: WARNING: ignored --with-shlib-version" >&5
6535 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6536                         ;;
6537                 esac
6538                 ;;
6539         esac
6540
6541         if test -n "$cf_try_cflags"
6542         then
6543 cat > conftest.$ac_ext <<EOF
6544 #line 6544 "${as_me:-configure}"
6545 #include <stdio.h>
6546 int main(int argc, char *argv[])
6547 {
6548         printf("hello\\n");
6549         return (argv[argc-1] == 0) ;
6550 }
6551 EOF
6552                 cf_save_CFLAGS="$CFLAGS"
6553                 for cf_opt in $cf_try_cflags
6554                 do
6555                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6556                         echo "$as_me:6556: checking if CFLAGS option -$cf_opt works" >&5
6557 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6558                         if { (eval echo "$as_me:6558: \"$ac_compile\"") >&5
6559   (eval $ac_compile) 2>&5
6560   ac_status=$?
6561   echo "$as_me:6561: \$? = $ac_status" >&5
6562   (exit "$ac_status"); }; then
6563                                 echo "$as_me:6563: result: yes" >&5
6564 echo "${ECHO_T}yes" >&6
6565                                 cf_save_CFLAGS="$CFLAGS"
6566                         else
6567                                 echo "$as_me:6567: result: no" >&5
6568 echo "${ECHO_T}no" >&6
6569                         fi
6570                 done
6571                 CFLAGS="$cf_save_CFLAGS"
6572         fi
6573
6574         # RPATH_LIST is a colon-separated list of directories
6575         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6576         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6577
6578         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6579
6580         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6581
6582 echo "${as_me:-configure}:6582: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6583
6584         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6585
6586 echo "${as_me:-configure}:6586: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6587
6588 for model in $cf_list_models ; do
6589         case "$model" in
6590         (libtool)
6591
6592 echo "$as_me:6592: checking for additional libtool options" >&5
6593 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6594
6595 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6596 if test "${with_libtool_opts+set}" = set; then
6597   withval="$with_libtool_opts"
6598   with_libtool_opts=$withval
6599 else
6600   with_libtool_opts=no
6601 fi;
6602 echo "$as_me:6602: result: $with_libtool_opts" >&5
6603 echo "${ECHO_T}$with_libtool_opts" >&6
6604
6605 case .$with_libtool_opts in
6606 (.yes|.no|.)
6607         ;;
6608 (*)
6609         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6610         ;;
6611 esac
6612
6613 echo "$as_me:6613: checking if exported-symbols file should be used" >&5
6614 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6615
6616 # Check whether --with-export-syms or --without-export-syms was given.
6617 if test "${with_export_syms+set}" = set; then
6618   withval="$with_export_syms"
6619   with_export_syms=$withval
6620 else
6621   with_export_syms=no
6622 fi;
6623 if test "x$with_export_syms" = xyes
6624 then
6625         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6626
6627 fi
6628 echo "$as_me:6628: result: $with_export_syms" >&5
6629 echo "${ECHO_T}$with_export_syms" >&6
6630 if test "x$with_export_syms" != xno
6631 then
6632         EXPORT_SYMS="-export-symbols $with_export_syms"
6633
6634 fi
6635
6636                 ;;
6637         (shared)
6638                 if test "$CC_SHARED_OPTS" = "unknown"; then
6639                         { { echo "$as_me:6639: error: Shared libraries are not supported in this version" >&5
6640 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6641    { (exit 1); exit 1; }; }
6642                 fi
6643                 # workaround for inept transition to PIE vs PIC...
6644                 echo "$as_me:6644: checking if current CFLAGS link properly" >&5
6645 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6646                 cat >"conftest.$ac_ext" <<_ACEOF
6647 #line 6647 "configure"
6648 #include "confdefs.h"
6649 #include <stdio.h>
6650 int
6651 main (void)
6652 {
6653 printf("Hello work\\n");
6654   ;
6655   return 0;
6656 }
6657 _ACEOF
6658 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6659 if { (eval echo "$as_me:6659: \"$ac_link\"") >&5
6660   (eval $ac_link) 2>&5
6661   ac_status=$?
6662   echo "$as_me:6662: \$? = $ac_status" >&5
6663   (exit "$ac_status"); } &&
6664          { ac_try='test -s "conftest$ac_exeext"'
6665   { (eval echo "$as_me:6665: \"$ac_try\"") >&5
6666   (eval $ac_try) 2>&5
6667   ac_status=$?
6668   echo "$as_me:6668: \$? = $ac_status" >&5
6669   (exit "$ac_status"); }; }; then
6670   cf_cflags_work=yes
6671 else
6672   echo "$as_me: failed program was:" >&5
6673 cat "conftest.$ac_ext" >&5
6674 cf_cflags_work=no
6675 fi
6676 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6677                 echo "$as_me:6677: result: $cf_cflags_work" >&5
6678 echo "${ECHO_T}$cf_cflags_work" >&6
6679                 if test "$cf_cflags_work" = no
6680                 then
6681                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6682
6683 echo "${as_me:-configure}:6683: testing try to work around by appending shared-options ..." 1>&5
6684
6685                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6686                 fi
6687
6688 echo "$as_me:6688: checking if versioned-symbols file should be used" >&5
6689 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6690
6691 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6692 if test "${with_versioned_syms+set}" = set; then
6693   withval="$with_versioned_syms"
6694   with_versioned_syms=$withval
6695 else
6696   with_versioned_syms=no
6697 fi;
6698 case "x$with_versioned_syms" in
6699 (xyes)
6700         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6701
6702         ;;
6703 (xno)
6704         ;;
6705 (x/*)
6706         test -f "$with_versioned_syms" || { { echo "$as_me:6706: error: expected a filename: $with_versioned_syms" >&5
6707 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6708    { (exit 1); exit 1; }; }
6709         ;;
6710 (*)
6711         test -f "$with_versioned_syms" || { { echo "$as_me:6711: error: expected a filename: $with_versioned_syms" >&5
6712 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6713    { (exit 1); exit 1; }; }
6714         with_versioned_syms=`pwd`/"$with_versioned_syms"
6715         ;;
6716 esac
6717 echo "$as_me:6717: result: $with_versioned_syms" >&5
6718 echo "${ECHO_T}$with_versioned_syms" >&6
6719
6720 RESULTING_SYMS=
6721 VERSIONED_SYMS=
6722 WILDCARD_SYMS=
6723
6724 if test "x$with_versioned_syms" != xno
6725 then
6726         RESULTING_SYMS=$with_versioned_syms
6727         case "x$MK_SHARED_LIB" in
6728         (*-Wl,*)
6729                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6730                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6731                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6732
6733 echo "${as_me:-configure}:6733: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6734
6735                 ;;
6736         (*-dy\ *)
6737                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6738                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6739                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6740
6741 echo "${as_me:-configure}:6741: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6742
6743                 ;;
6744         (*)
6745                 { echo "$as_me:6745: WARNING: this system does not support versioned-symbols" >&5
6746 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6747                 ;;
6748         esac
6749
6750         # Linux ld can selectively override scope, e.g., of symbols beginning with
6751         # "_" by first declaring some as global, and then using a wildcard to
6752         # declare the others as local.  Some other loaders cannot do this.  Check
6753         # by constructing a (very) simple shared library and inspecting its
6754         # symbols.
6755         if test "x$VERSIONED_SYMS" != "x"
6756         then
6757                 echo "$as_me:6757: checking if wildcards can be used to selectively omit symbols" >&5
6758 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6759                 WILDCARD_SYMS=no
6760
6761                 # make sources
6762                 rm -f conftest.*
6763
6764                 cat >conftest.ver <<EOF
6765 module_1.0 {
6766 global:
6767         globalf1;
6768 local:
6769         localf1;
6770 };
6771 module_2.0 {
6772 global:
6773         globalf2;
6774 local:
6775         localf2;
6776         _*;
6777 } module_1.0;
6778 submodule_1.0 {
6779 global:
6780         subglobalf1;
6781         _ismissing;
6782 local:
6783         sublocalf1;
6784 };
6785 submodule_2.0 {
6786 global:
6787         subglobalf2;
6788 local:
6789         sublocalf2;
6790         _*;
6791 } submodule_1.0;
6792 EOF
6793                 cat >conftest.$ac_ext <<EOF
6794 #line 6794 "configure"
6795 int     _ismissing(void) { return 1; }
6796 int     _localf1(void) { return 1; }
6797 int     _localf2(void) { return 2; }
6798 int     globalf1(void) { return 1; }
6799 int     globalf2(void) { return 2; }
6800 int     _sublocalf1(void) { return 1; }
6801 int     _sublocalf2(void) { return 2; }
6802 int     subglobalf1(void) { return 1; }
6803 int     subglobalf2(void) { return 2; }
6804 EOF
6805                 cat >conftest.mk <<EOF
6806 CC=${CC}
6807 CFLAGS=${CFLAGS}
6808 CPPFLAGS=${CPPFLAGS}
6809 LDFLAGS=${LDFLAGS}
6810 LIBS=${LIBS}
6811 VERSIONED_SYMS=${VERSIONED_SYMS}
6812 RESULTING_SYMS=conftest.ver
6813 MK_SHARED_LIB=${MK_SHARED_LIB}
6814 conftest.so: conftest.$ac_cv_objext
6815                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6816 EOF
6817
6818                 # compile source, make library
6819                 if make -f conftest.mk 2>&5 >/dev/null
6820                 then
6821                         # test for missing symbol in either Data or Text section
6822                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6823                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6824                 fi
6825                 echo "$as_me:6825: result: $WILDCARD_SYMS" >&5
6826 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6827                 rm -f conftest.*
6828         fi
6829 fi
6830
6831                 ;;
6832         esac
6833 done
6834
6835 ### Checks for special libraries, must be done up-front.
6836 SHLIB_LIST=""
6837
6838 echo "$as_me:6838: checking if you want to link with the GPM mouse library" >&5
6839 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6840
6841 # Check whether --with-gpm or --without-gpm was given.
6842 if test "${with_gpm+set}" = set; then
6843   withval="$with_gpm"
6844   with_gpm=$withval
6845 else
6846   with_gpm=maybe
6847 fi;
6848 echo "$as_me:6848: result: $with_gpm" >&5
6849 echo "${ECHO_T}$with_gpm" >&6
6850
6851 if test "$with_gpm" != no ; then
6852         echo "$as_me:6852: checking for gpm.h" >&5
6853 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6854 if test "${ac_cv_header_gpm_h+set}" = set; then
6855   echo $ECHO_N "(cached) $ECHO_C" >&6
6856 else
6857   cat >"conftest.$ac_ext" <<_ACEOF
6858 #line 6858 "configure"
6859 #include "confdefs.h"
6860 #include <gpm.h>
6861 _ACEOF
6862 if { (eval echo "$as_me:6862: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6863   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6864   ac_status=$?
6865   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6866   rm -f conftest.er1
6867   cat conftest.err >&5
6868   echo "$as_me:6868: \$? = $ac_status" >&5
6869   (exit "$ac_status"); } >/dev/null; then
6870   if test -s conftest.err; then
6871     ac_cpp_err=$ac_c_preproc_warn_flag
6872   else
6873     ac_cpp_err=
6874   fi
6875 else
6876   ac_cpp_err=yes
6877 fi
6878 if test -z "$ac_cpp_err"; then
6879   ac_cv_header_gpm_h=yes
6880 else
6881   echo "$as_me: failed program was:" >&5
6882   cat "conftest.$ac_ext" >&5
6883   ac_cv_header_gpm_h=no
6884 fi
6885 rm -f conftest.err "conftest.$ac_ext"
6886 fi
6887 echo "$as_me:6887: result: $ac_cv_header_gpm_h" >&5
6888 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6889 if test "$ac_cv_header_gpm_h" = yes; then
6890
6891 cat >>confdefs.h <<\EOF
6892 #define HAVE_GPM_H 1
6893 EOF
6894
6895                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6896                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6897
6898 echo "${as_me:-configure}:6898: testing assuming we really have GPM library ..." 1>&5
6899
6900 cat >>confdefs.h <<\EOF
6901 #define HAVE_LIBGPM 1
6902 EOF
6903
6904                         with_gpm=yes
6905                 else
6906                         echo "$as_me:6906: checking for Gpm_Open in -lgpm" >&5
6907 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6908 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6909   echo $ECHO_N "(cached) $ECHO_C" >&6
6910 else
6911   ac_check_lib_save_LIBS=$LIBS
6912 LIBS="-lgpm  $LIBS"
6913 cat >"conftest.$ac_ext" <<_ACEOF
6914 #line 6914 "configure"
6915 #include "confdefs.h"
6916
6917 /* Override any gcc2 internal prototype to avoid an error.  */
6918 #ifdef __cplusplus
6919 extern "C"
6920 #endif
6921 /* We use char because int might match the return type of a gcc2
6922    builtin and then its argument prototype would still apply.  */
6923 char Gpm_Open ();
6924 int
6925 main (void)
6926 {
6927 Gpm_Open ();
6928   ;
6929   return 0;
6930 }
6931 _ACEOF
6932 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6933 if { (eval echo "$as_me:6933: \"$ac_link\"") >&5
6934   (eval $ac_link) 2>&5
6935   ac_status=$?
6936   echo "$as_me:6936: \$? = $ac_status" >&5
6937   (exit "$ac_status"); } &&
6938          { ac_try='test -s "conftest$ac_exeext"'
6939   { (eval echo "$as_me:6939: \"$ac_try\"") >&5
6940   (eval $ac_try) 2>&5
6941   ac_status=$?
6942   echo "$as_me:6942: \$? = $ac_status" >&5
6943   (exit "$ac_status"); }; }; then
6944   ac_cv_lib_gpm_Gpm_Open=yes
6945 else
6946   echo "$as_me: failed program was:" >&5
6947 cat "conftest.$ac_ext" >&5
6948 ac_cv_lib_gpm_Gpm_Open=no
6949 fi
6950 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6951 LIBS=$ac_check_lib_save_LIBS
6952 fi
6953 echo "$as_me:6953: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6954 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6955 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6956   with_gpm=yes
6957 else
6958
6959                                 if test "$with_gpm" = maybe; then
6960                                         { echo "$as_me:6960: WARNING: Cannot link with GPM library" >&5
6961 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6962                                         with_gpm=no
6963                                 else
6964                                         { { echo "$as_me:6964: error: Cannot link with GPM library" >&5
6965 echo "$as_me: error: Cannot link with GPM library" >&2;}
6966    { (exit 1); exit 1; }; }
6967                                 fi
6968
6969 fi
6970
6971                 fi
6972
6973 else
6974
6975                 test "$with_gpm" != maybe && { echo "$as_me:6975: WARNING: Cannot find GPM header" >&5
6976 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6977                 with_gpm=no
6978
6979 fi
6980
6981 fi
6982
6983 if test "$with_gpm" != no ; then
6984         echo "$as_me:6984: checking if you want to load GPM dynamically" >&5
6985 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6986
6987 # Check whether --with-dlsym or --without-dlsym was given.
6988 if test "${with_dlsym+set}" = set; then
6989   withval="$with_dlsym"
6990   with_dlsym=$withval
6991 else
6992   with_dlsym=yes
6993 fi;
6994         echo "$as_me:6994: result: $with_dlsym" >&5
6995 echo "${ECHO_T}$with_dlsym" >&6
6996         if test "x$with_dlsym" = xyes ; then
6997
6998 cf_have_dlsym=no
6999 echo "$as_me:6999: checking for dlsym" >&5
7000 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7001 if test "${ac_cv_func_dlsym+set}" = set; then
7002   echo $ECHO_N "(cached) $ECHO_C" >&6
7003 else
7004   cat >"conftest.$ac_ext" <<_ACEOF
7005 #line 7005 "configure"
7006 #include "confdefs.h"
7007 #define dlsym autoconf_temporary
7008 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7009 #undef dlsym
7010
7011 #ifdef __cplusplus
7012 extern "C"
7013 #endif
7014
7015 /* We use char because int might match the return type of a gcc2
7016    builtin and then its argument prototype would still apply.  */
7017 char dlsym (void);
7018
7019 int
7020 main (void)
7021 {
7022
7023 /* The GNU C library defines stubs for functions which it implements
7024     to always fail with ENOSYS.  Some functions are actually named
7025     something starting with __ and the normal name is an alias.  */
7026 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7027 #error found stub for dlsym
7028 #endif
7029
7030         return dlsym ();
7031   ;
7032   return 0;
7033 }
7034 _ACEOF
7035 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7036 if { (eval echo "$as_me:7036: \"$ac_link\"") >&5
7037   (eval $ac_link) 2>&5
7038   ac_status=$?
7039   echo "$as_me:7039: \$? = $ac_status" >&5
7040   (exit "$ac_status"); } &&
7041          { ac_try='test -s "conftest$ac_exeext"'
7042   { (eval echo "$as_me:7042: \"$ac_try\"") >&5
7043   (eval $ac_try) 2>&5
7044   ac_status=$?
7045   echo "$as_me:7045: \$? = $ac_status" >&5
7046   (exit "$ac_status"); }; }; then
7047   ac_cv_func_dlsym=yes
7048 else
7049   echo "$as_me: failed program was:" >&5
7050 cat "conftest.$ac_ext" >&5
7051 ac_cv_func_dlsym=no
7052 fi
7053 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7054 fi
7055 echo "$as_me:7055: result: $ac_cv_func_dlsym" >&5
7056 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7057 if test "$ac_cv_func_dlsym" = yes; then
7058   cf_have_dlsym=yes
7059 else
7060
7061 cf_have_libdl=no
7062 echo "$as_me:7062: checking for dlsym in -ldl" >&5
7063 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7064 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7065   echo $ECHO_N "(cached) $ECHO_C" >&6
7066 else
7067   ac_check_lib_save_LIBS=$LIBS
7068 LIBS="-ldl  $LIBS"
7069 cat >"conftest.$ac_ext" <<_ACEOF
7070 #line 7070 "configure"
7071 #include "confdefs.h"
7072
7073 /* Override any gcc2 internal prototype to avoid an error.  */
7074 #ifdef __cplusplus
7075 extern "C"
7076 #endif
7077 /* We use char because int might match the return type of a gcc2
7078    builtin and then its argument prototype would still apply.  */
7079 char dlsym ();
7080 int
7081 main (void)
7082 {
7083 dlsym ();
7084   ;
7085   return 0;
7086 }
7087 _ACEOF
7088 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7089 if { (eval echo "$as_me:7089: \"$ac_link\"") >&5
7090   (eval $ac_link) 2>&5
7091   ac_status=$?
7092   echo "$as_me:7092: \$? = $ac_status" >&5
7093   (exit "$ac_status"); } &&
7094          { ac_try='test -s "conftest$ac_exeext"'
7095   { (eval echo "$as_me:7095: \"$ac_try\"") >&5
7096   (eval $ac_try) 2>&5
7097   ac_status=$?
7098   echo "$as_me:7098: \$? = $ac_status" >&5
7099   (exit "$ac_status"); }; }; then
7100   ac_cv_lib_dl_dlsym=yes
7101 else
7102   echo "$as_me: failed program was:" >&5
7103 cat "conftest.$ac_ext" >&5
7104 ac_cv_lib_dl_dlsym=no
7105 fi
7106 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7107 LIBS=$ac_check_lib_save_LIBS
7108 fi
7109 echo "$as_me:7109: result: $ac_cv_lib_dl_dlsym" >&5
7110 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7111 if test "$ac_cv_lib_dl_dlsym" = yes; then
7112
7113         cf_have_dlsym=yes
7114         cf_have_libdl=yes
7115 fi
7116
7117 fi
7118
7119 if test "$cf_have_dlsym" = yes ; then
7120         test "$cf_have_libdl" = yes && {
7121 cf_add_libs="$LIBS"
7122 # reverse order
7123 cf_add_0lib=
7124 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7125 # filter duplicates
7126 for cf_add_1lib in $cf_add_0lib; do
7127         for cf_add_2lib in $cf_add_libs; do
7128                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7129                         cf_add_1lib=
7130                         break
7131                 fi
7132         done
7133         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7134 done
7135 LIBS="$cf_add_libs"
7136  }
7137
7138         echo "$as_me:7138: checking whether able to link to dl*() functions" >&5
7139 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7140         cat >"conftest.$ac_ext" <<_ACEOF
7141 #line 7141 "configure"
7142 #include "confdefs.h"
7143 #include <dlfcn.h>
7144 int
7145 main (void)
7146 {
7147
7148                 void *obj;
7149                 if ((obj = dlopen("filename", 0)) != 0) {
7150                         if (dlsym(obj, "symbolname") == 0) {
7151                         dlclose(obj);
7152                         }
7153                 }
7154   ;
7155   return 0;
7156 }
7157 _ACEOF
7158 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7159 if { (eval echo "$as_me:7159: \"$ac_link\"") >&5
7160   (eval $ac_link) 2>&5
7161   ac_status=$?
7162   echo "$as_me:7162: \$? = $ac_status" >&5
7163   (exit "$ac_status"); } &&
7164          { ac_try='test -s "conftest$ac_exeext"'
7165   { (eval echo "$as_me:7165: \"$ac_try\"") >&5
7166   (eval $ac_try) 2>&5
7167   ac_status=$?
7168   echo "$as_me:7168: \$? = $ac_status" >&5
7169   (exit "$ac_status"); }; }; then
7170
7171 cat >>confdefs.h <<\EOF
7172 #define HAVE_LIBDL 1
7173 EOF
7174
7175 else
7176   echo "$as_me: failed program was:" >&5
7177 cat "conftest.$ac_ext" >&5
7178
7179                 { { echo "$as_me:7179: error: Cannot link test program for libdl" >&5
7180 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7181    { (exit 1); exit 1; }; }
7182 fi
7183 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7184         echo "$as_me:7184: result: ok" >&5
7185 echo "${ECHO_T}ok" >&6
7186 else
7187         { { echo "$as_me:7187: error: Cannot find dlsym function" >&5
7188 echo "$as_me: error: Cannot find dlsym function" >&2;}
7189    { (exit 1); exit 1; }; }
7190 fi
7191
7192                 if test "x$with_gpm" != xyes ; then
7193                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7194
7195 echo "${as_me:-configure}:7195: testing assuming soname for gpm is $with_gpm ..." 1>&5
7196
7197                         cf_cv_gpm_soname="$with_gpm"
7198                 else
7199
7200 echo "$as_me:7200: checking for soname of gpm library" >&5
7201 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7202 if test "${cf_cv_gpm_soname+set}" = set; then
7203   echo $ECHO_N "(cached) $ECHO_C" >&6
7204 else
7205
7206 cf_cv_gpm_soname=unknown
7207 if test "$cross_compiling" != yes ; then
7208 cat >conftest.$ac_ext <<CF_EOF
7209 #include <gpm.h>
7210 int main(void)
7211 {
7212 if (Gpm_Open(0,0)) Gpm_Close();
7213         ${cf_cv_main_return:-return}(0);
7214 }
7215 CF_EOF
7216 cf_save_LIBS="$LIBS"
7217
7218 cf_add_libs="$LIBS"
7219 # reverse order
7220 cf_add_0lib=
7221 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7222 # filter duplicates
7223 for cf_add_1lib in $cf_add_0lib; do
7224         for cf_add_2lib in $cf_add_libs; do
7225                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7226                         cf_add_1lib=
7227                         break
7228                 fi
7229         done
7230         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7231 done
7232 LIBS="$cf_add_libs"
7233
7234         if { (eval echo "$as_me:7234: \"$ac_compile\"") >&5
7235   (eval $ac_compile) 2>&5
7236   ac_status=$?
7237   echo "$as_me:7237: \$? = $ac_status" >&5
7238   (exit "$ac_status"); } ; then
7239                 if { (eval echo "$as_me:7239: \"$ac_link\"") >&5
7240   (eval $ac_link) 2>&5
7241   ac_status=$?
7242   echo "$as_me:7242: \$? = $ac_status" >&5
7243   (exit "$ac_status"); } ; then
7244                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7245                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7246                 fi
7247         fi
7248 rm -rf ./conftest*
7249 LIBS="$cf_save_LIBS"
7250 fi
7251
7252 fi
7253 echo "$as_me:7253: result: $cf_cv_gpm_soname" >&5
7254 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7255
7256                 fi
7257                 test "$cf_cv_gpm_soname" != "unknown" &&
7258 cat >>confdefs.h <<EOF
7259 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7260 EOF
7261
7262                 SHLIB_LIST="-ldl $SHLIB_LIST"
7263
7264 cf_add_libs="$PRIVATE_LIBS"
7265 # reverse order
7266 cf_add_0lib=
7267 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7268 # filter duplicates
7269 for cf_add_1lib in $cf_add_0lib; do
7270         for cf_add_2lib in $cf_add_libs; do
7271                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7272                         cf_add_1lib=
7273                         break
7274                 fi
7275         done
7276         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7277 done
7278 PRIVATE_LIBS="$cf_add_libs"
7279
7280         else
7281                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7282
7283 cf_add_libs="$TEST_LIBS"
7284 # reverse order
7285 cf_add_0lib=
7286 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7287 # filter duplicates
7288 for cf_add_1lib in $cf_add_0lib; do
7289         for cf_add_2lib in $cf_add_libs; do
7290                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7291                         cf_add_1lib=
7292                         break
7293                 fi
7294         done
7295         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7296 done
7297 TEST_LIBS="$cf_add_libs"
7298
7299 cf_add_libs="$PRIVATE_LIBS"
7300 # reverse order
7301 cf_add_0lib=
7302 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7303 # filter duplicates
7304 for cf_add_1lib in $cf_add_0lib; do
7305         for cf_add_2lib in $cf_add_libs; do
7306                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7307                         cf_add_1lib=
7308                         break
7309                 fi
7310         done
7311         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7312 done
7313 PRIVATE_LIBS="$cf_add_libs"
7314
7315         fi
7316
7317 cat >>confdefs.h <<\EOF
7318 #define HAVE_LIBGPM 1
7319 EOF
7320
7321 echo "$as_me:7321: checking for Gpm_Wgetch in -lgpm" >&5
7322 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7323 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7324   echo $ECHO_N "(cached) $ECHO_C" >&6
7325 else
7326   ac_check_lib_save_LIBS=$LIBS
7327 LIBS="-lgpm  $LIBS"
7328 cat >"conftest.$ac_ext" <<_ACEOF
7329 #line 7329 "configure"
7330 #include "confdefs.h"
7331
7332 /* Override any gcc2 internal prototype to avoid an error.  */
7333 #ifdef __cplusplus
7334 extern "C"
7335 #endif
7336 /* We use char because int might match the return type of a gcc2
7337    builtin and then its argument prototype would still apply.  */
7338 char Gpm_Wgetch ();
7339 int
7340 main (void)
7341 {
7342 Gpm_Wgetch ();
7343   ;
7344   return 0;
7345 }
7346 _ACEOF
7347 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7348 if { (eval echo "$as_me:7348: \"$ac_link\"") >&5
7349   (eval $ac_link) 2>&5
7350   ac_status=$?
7351   echo "$as_me:7351: \$? = $ac_status" >&5
7352   (exit "$ac_status"); } &&
7353          { ac_try='test -s "conftest$ac_exeext"'
7354   { (eval echo "$as_me:7354: \"$ac_try\"") >&5
7355   (eval $ac_try) 2>&5
7356   ac_status=$?
7357   echo "$as_me:7357: \$? = $ac_status" >&5
7358   (exit "$ac_status"); }; }; then
7359   ac_cv_lib_gpm_Gpm_Wgetch=yes
7360 else
7361   echo "$as_me: failed program was:" >&5
7362 cat "conftest.$ac_ext" >&5
7363 ac_cv_lib_gpm_Gpm_Wgetch=no
7364 fi
7365 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7366 LIBS=$ac_check_lib_save_LIBS
7367 fi
7368 echo "$as_me:7368: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7369 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7370 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7371
7372 echo "$as_me:7372: checking if GPM is weakly bound to curses library" >&5
7373 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7374 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7375   echo $ECHO_N "(cached) $ECHO_C" >&6
7376 else
7377
7378 cf_cv_check_gpm_wgetch=unknown
7379 if test "$cross_compiling" != yes ; then
7380
7381 cat >conftest.$ac_ext <<CF_EOF
7382 #include <gpm.h>
7383 int main(void)
7384 {
7385         Gpm_Wgetch();
7386         ${cf_cv_main_return:-return}(0);
7387 }
7388 CF_EOF
7389
7390         cf_save_LIBS="$LIBS"
7391         # This only works if we can look at the symbol table.  If a shared
7392         # library is stripped for install, we cannot use that.  So we're forced
7393         # to rely on the static library, noting that some packagers may not
7394         # include it.
7395         LIBS="-static -lgpm -dynamic $LIBS"
7396         if { (eval echo "$as_me:7396: \"$ac_compile\"") >&5
7397   (eval $ac_compile) 2>&5
7398   ac_status=$?
7399   echo "$as_me:7399: \$? = $ac_status" >&5
7400   (exit "$ac_status"); } ; then
7401                 if { (eval echo "$as_me:7401: \"$ac_link\"") >&5
7402   (eval $ac_link) 2>&5
7403   ac_status=$?
7404   echo "$as_me:7404: \$? = $ac_status" >&5
7405   (exit "$ac_status"); } ; then
7406                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7407                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7408                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7409                 fi
7410         fi
7411         rm -rf ./conftest*
7412         LIBS="$cf_save_LIBS"
7413 fi
7414
7415 fi
7416 echo "$as_me:7416: result: $cf_cv_check_gpm_wgetch" >&5
7417 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7418
7419 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7420         { echo "$as_me:7420: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7421 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7422 fi
7423
7424 fi
7425
7426 fi
7427
7428 echo "$as_me:7428: checking if you want to use PCRE2 for regular-expressions" >&5
7429 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7430
7431 # Check whether --with-pcre2 or --without-pcre2 was given.
7432 if test "${with_pcre2+set}" = set; then
7433   withval="$with_pcre2"
7434
7435 fi;
7436 test -z "$with_pcre2" && with_pcre2=no
7437 echo "$as_me:7437: result: $with_pcre2" >&5
7438 echo "${ECHO_T}$with_pcre2" >&6
7439
7440 if test "x$with_pcre2" != xno ; then
7441         cf_with_pcre2_ok=no
7442         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7443         do
7444
7445 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7446         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7447
7448 echo "${as_me:-configure}:7448: testing found package $cf_with_pcre2 ..." 1>&5
7449
7450         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7451         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7452         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7453
7454 echo "${as_me:-configure}:7454: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7455
7456         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7457
7458 echo "${as_me:-configure}:7458: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7459
7460 cf_fix_cppflags=no
7461 cf_new_cflags=
7462 cf_new_cppflags=
7463 cf_new_extra_cppflags=
7464
7465 for cf_add_cflags in $cf_pkgconfig_incs
7466 do
7467 case "$cf_fix_cppflags" in
7468 (no)
7469         case "$cf_add_cflags" in
7470         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7471                 case "$cf_add_cflags" in
7472                 (-D*)
7473                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7474
7475                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7476                                 && test -z "${cf_tst_cflags}" \
7477                                 && cf_fix_cppflags=yes
7478
7479                         if test "$cf_fix_cppflags" = yes ; then
7480
7481         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7482         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7483
7484                                 continue
7485                         elif test "${cf_tst_cflags}" = "\"'" ; then
7486
7487         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7488         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7489
7490                                 continue
7491                         fi
7492                         ;;
7493                 esac
7494                 case "$CPPFLAGS" in
7495                 (*$cf_add_cflags)
7496                         ;;
7497                 (*)
7498                         case "$cf_add_cflags" in
7499                         (-D*)
7500                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7501
7502 CPPFLAGS=`echo "$CPPFLAGS" | \
7503         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7504                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7505
7506                                 ;;
7507                         esac
7508
7509         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7510         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7511
7512                         ;;
7513                 esac
7514                 ;;
7515         (*)
7516
7517         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7518         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7519
7520                 ;;
7521         esac
7522         ;;
7523 (yes)
7524
7525         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7526         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7527
7528         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7529
7530         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7531                 && test -z "${cf_tst_cflags}" \
7532                 && cf_fix_cppflags=no
7533         ;;
7534 esac
7535 done
7536
7537 if test -n "$cf_new_cflags" ; then
7538
7539         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7540         CFLAGS="${CFLAGS}$cf_new_cflags"
7541
7542 fi
7543
7544 if test -n "$cf_new_cppflags" ; then
7545
7546         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7547         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7548
7549 fi
7550
7551 if test -n "$cf_new_extra_cppflags" ; then
7552
7553         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7554         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7555
7556 fi
7557
7558 cf_add_libs="$LIBS"
7559 # reverse order
7560 cf_add_0lib=
7561 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7562 # filter duplicates
7563 for cf_add_1lib in $cf_add_0lib; do
7564         for cf_add_2lib in $cf_add_libs; do
7565                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7566                         cf_add_1lib=
7567                         break
7568                 fi
7569         done
7570         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7571 done
7572 LIBS="$cf_add_libs"
7573
7574         cf_with_pcre2_ok=yes; break
7575 else
7576         cf_pkgconfig_incs=
7577         cf_pkgconfig_libs=
7578         :
7579 fi
7580
7581         done
7582         cf_with_pcre2_ok=yes || { { echo "$as_me:7582: error: Cannot find PCRE2 library" >&5
7583 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7584    { (exit 1); exit 1; }; }
7585
7586 cat >>confdefs.h <<\EOF
7587 #define HAVE_LIB_PCRE2 1
7588 EOF
7589
7590         # if pkgconfig gave no results, look for the libraries directly
7591         case "$LIBS" in
7592         (*pcre2-posix*|*pcreposix*)
7593                 ;;
7594         (*)
7595                 echo "$as_me:7595: checking for regcomp in -lpcre2-posix" >&5
7596 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7597 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7598   echo $ECHO_N "(cached) $ECHO_C" >&6
7599 else
7600   ac_check_lib_save_LIBS=$LIBS
7601 LIBS="-lpcre2-posix  $LIBS"
7602 cat >"conftest.$ac_ext" <<_ACEOF
7603 #line 7603 "configure"
7604 #include "confdefs.h"
7605
7606 /* Override any gcc2 internal prototype to avoid an error.  */
7607 #ifdef __cplusplus
7608 extern "C"
7609 #endif
7610 /* We use char because int might match the return type of a gcc2
7611    builtin and then its argument prototype would still apply.  */
7612 char regcomp ();
7613 int
7614 main (void)
7615 {
7616 regcomp ();
7617   ;
7618   return 0;
7619 }
7620 _ACEOF
7621 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7622 if { (eval echo "$as_me:7622: \"$ac_link\"") >&5
7623   (eval $ac_link) 2>&5
7624   ac_status=$?
7625   echo "$as_me:7625: \$? = $ac_status" >&5
7626   (exit "$ac_status"); } &&
7627          { ac_try='test -s "conftest$ac_exeext"'
7628   { (eval echo "$as_me:7628: \"$ac_try\"") >&5
7629   (eval $ac_try) 2>&5
7630   ac_status=$?
7631   echo "$as_me:7631: \$? = $ac_status" >&5
7632   (exit "$ac_status"); }; }; then
7633   ac_cv_lib_pcre2_posix_regcomp=yes
7634 else
7635   echo "$as_me: failed program was:" >&5
7636 cat "conftest.$ac_ext" >&5
7637 ac_cv_lib_pcre2_posix_regcomp=no
7638 fi
7639 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7640 LIBS=$ac_check_lib_save_LIBS
7641 fi
7642 echo "$as_me:7642: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7643 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7644 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7645
7646 cf_add_libs="$LIBS"
7647 # reverse order
7648 cf_add_0lib=
7649 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7650 # filter duplicates
7651 for cf_add_1lib in $cf_add_0lib; do
7652         for cf_add_2lib in $cf_add_libs; do
7653                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7654                         cf_add_1lib=
7655                         break
7656                 fi
7657         done
7658         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7659 done
7660 LIBS="$cf_add_libs"
7661
7662 else
7663   echo "$as_me:7663: checking for regcomp in -lpcreposix" >&5
7664 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7665 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7666   echo $ECHO_N "(cached) $ECHO_C" >&6
7667 else
7668   ac_check_lib_save_LIBS=$LIBS
7669 LIBS="-lpcreposix  $LIBS"
7670 cat >"conftest.$ac_ext" <<_ACEOF
7671 #line 7671 "configure"
7672 #include "confdefs.h"
7673
7674 /* Override any gcc2 internal prototype to avoid an error.  */
7675 #ifdef __cplusplus
7676 extern "C"
7677 #endif
7678 /* We use char because int might match the return type of a gcc2
7679    builtin and then its argument prototype would still apply.  */
7680 char regcomp ();
7681 int
7682 main (void)
7683 {
7684 regcomp ();
7685   ;
7686   return 0;
7687 }
7688 _ACEOF
7689 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7690 if { (eval echo "$as_me:7690: \"$ac_link\"") >&5
7691   (eval $ac_link) 2>&5
7692   ac_status=$?
7693   echo "$as_me:7693: \$? = $ac_status" >&5
7694   (exit "$ac_status"); } &&
7695          { ac_try='test -s "conftest$ac_exeext"'
7696   { (eval echo "$as_me:7696: \"$ac_try\"") >&5
7697   (eval $ac_try) 2>&5
7698   ac_status=$?
7699   echo "$as_me:7699: \$? = $ac_status" >&5
7700   (exit "$ac_status"); }; }; then
7701   ac_cv_lib_pcreposix_regcomp=yes
7702 else
7703   echo "$as_me: failed program was:" >&5
7704 cat "conftest.$ac_ext" >&5
7705 ac_cv_lib_pcreposix_regcomp=no
7706 fi
7707 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7708 LIBS=$ac_check_lib_save_LIBS
7709 fi
7710 echo "$as_me:7710: result: $ac_cv_lib_pcreposix_regcomp" >&5
7711 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7712 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7713
7714 cf_add_libs="$LIBS"
7715 # reverse order
7716 cf_add_0lib=
7717 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7718 # filter duplicates
7719 for cf_add_1lib in $cf_add_0lib; do
7720         for cf_add_2lib in $cf_add_libs; do
7721                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7722                         cf_add_1lib=
7723                         break
7724                 fi
7725         done
7726         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7727 done
7728 LIBS="$cf_add_libs"
7729
7730 else
7731   { { echo "$as_me:7731: error: Cannot find PCRE2 POSIX library" >&5
7732 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7733    { (exit 1); exit 1; }; }
7734 fi
7735
7736 fi
7737
7738                 ;;
7739         esac
7740
7741         # either way, check for the library header files
7742
7743 for ac_header in pcre2posix.h pcreposix.h
7744 do
7745 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7746 echo "$as_me:7746: checking for $ac_header" >&5
7747 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7748 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7749   echo $ECHO_N "(cached) $ECHO_C" >&6
7750 else
7751   cat >"conftest.$ac_ext" <<_ACEOF
7752 #line 7752 "configure"
7753 #include "confdefs.h"
7754 #include <$ac_header>
7755 _ACEOF
7756 if { (eval echo "$as_me:7756: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7757   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7758   ac_status=$?
7759   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7760   rm -f conftest.er1
7761   cat conftest.err >&5
7762   echo "$as_me:7762: \$? = $ac_status" >&5
7763   (exit "$ac_status"); } >/dev/null; then
7764   if test -s conftest.err; then
7765     ac_cpp_err=$ac_c_preproc_warn_flag
7766   else
7767     ac_cpp_err=
7768   fi
7769 else
7770   ac_cpp_err=yes
7771 fi
7772 if test -z "$ac_cpp_err"; then
7773   eval "$as_ac_Header=yes"
7774 else
7775   echo "$as_me: failed program was:" >&5
7776   cat "conftest.$ac_ext" >&5
7777   eval "$as_ac_Header=no"
7778 fi
7779 rm -f conftest.err "conftest.$ac_ext"
7780 fi
7781 echo "$as_me:7781: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7782 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7783 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7784   cat >>confdefs.h <<EOF
7785 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7786 EOF
7787
7788 fi
7789 done
7790
7791 fi
7792
7793 # not everyone has "test -c"
7794 if test -c /dev/sysmouse 2>/dev/null ; then
7795 echo "$as_me:7795: checking if you want to use sysmouse" >&5
7796 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7797
7798 # Check whether --with-sysmouse or --without-sysmouse was given.
7799 if test "${with_sysmouse+set}" = set; then
7800   withval="$with_sysmouse"
7801   cf_with_sysmouse=$withval
7802 else
7803   cf_with_sysmouse=maybe
7804 fi;
7805         if test "$cf_with_sysmouse" != no ; then
7806         cat >"conftest.$ac_ext" <<_ACEOF
7807 #line 7807 "configure"
7808 #include "confdefs.h"
7809
7810 #include <osreldate.h>
7811 #if (__FreeBSD_version >= 400017)
7812 #include <sys/consio.h>
7813 #include <sys/fbio.h>
7814 #else
7815 #include <machine/console.h>
7816 #endif
7817
7818 int
7819 main (void)
7820 {
7821
7822         struct mouse_info the_mouse;
7823         ioctl(0, CONS_MOUSECTL, &the_mouse);
7824
7825   ;
7826   return 0;
7827 }
7828 _ACEOF
7829 rm -f "conftest.$ac_objext"
7830 if { (eval echo "$as_me:7830: \"$ac_compile\"") >&5
7831   (eval $ac_compile) 2>&5
7832   ac_status=$?
7833   echo "$as_me:7833: \$? = $ac_status" >&5
7834   (exit "$ac_status"); } &&
7835          { ac_try='test -s "conftest.$ac_objext"'
7836   { (eval echo "$as_me:7836: \"$ac_try\"") >&5
7837   (eval $ac_try) 2>&5
7838   ac_status=$?
7839   echo "$as_me:7839: \$? = $ac_status" >&5
7840   (exit "$ac_status"); }; }; then
7841   cf_with_sysmouse=yes
7842 else
7843   echo "$as_me: failed program was:" >&5
7844 cat "conftest.$ac_ext" >&5
7845 cf_with_sysmouse=no
7846 fi
7847 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7848         fi
7849 echo "$as_me:7849: result: $cf_with_sysmouse" >&5
7850 echo "${ECHO_T}$cf_with_sysmouse" >&6
7851 test "$cf_with_sysmouse" = yes &&
7852 cat >>confdefs.h <<\EOF
7853 #define USE_SYSMOUSE 1
7854 EOF
7855
7856 fi
7857
7858 # pretend that ncurses==ncursesw==ncursest
7859 echo "$as_me:7859: checking if you want to disable library suffixes" >&5
7860 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7861
7862 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7863 if test "${enable_lib_suffixes+set}" = set; then
7864   enableval="$enable_lib_suffixes"
7865   test "$enableval" != no && enableval=yes
7866         if test "$enableval" != "yes" ; then
7867     disable_lib_suffixes=yes
7868         else
7869                 disable_lib_suffixes=no
7870         fi
7871 else
7872   enableval=yes
7873         disable_lib_suffixes=no
7874
7875 fi;
7876 echo "$as_me:7876: result: $disable_lib_suffixes" >&5
7877 echo "${ECHO_T}$disable_lib_suffixes" >&6
7878
7879 ### If we're building with rpath, try to link non-standard libs that way too.
7880 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7881
7882 echo "$as_me:7882: checking if rpath-hack should be disabled" >&5
7883 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7884
7885 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7886 if test "${enable_rpath_hack+set}" = set; then
7887   enableval="$enable_rpath_hack"
7888   test "$enableval" != no && enableval=yes
7889         if test "$enableval" != "yes" ; then
7890     enable_rpath_hack=no
7891         else
7892                 enable_rpath_hack=yes
7893         fi
7894 else
7895   enableval=yes
7896         enable_rpath_hack=yes
7897
7898 fi;
7899 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
7900 echo "$as_me:7900: result: $cf_disable_rpath_hack" >&5
7901 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7902
7903 if test "$enable_rpath_hack" = yes ; then
7904
7905 echo "$as_me:7905: checking for updated LDFLAGS" >&5
7906 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7907 if test -n "$LD_RPATH_OPT" ; then
7908         echo "$as_me:7908: result: maybe" >&5
7909 echo "${ECHO_T}maybe" >&6
7910
7911         for ac_prog in ldd
7912 do
7913   # Extract the first word of "$ac_prog", so it can be a program name with args.
7914 set dummy $ac_prog; ac_word=$2
7915 echo "$as_me:7915: checking for $ac_word" >&5
7916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7917 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7918   echo $ECHO_N "(cached) $ECHO_C" >&6
7919 else
7920   if test -n "$cf_ldd_prog"; then
7921   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7922 else
7923   ac_save_IFS=$IFS; IFS=$ac_path_separator
7924 ac_dummy="$PATH"
7925 for ac_dir in $ac_dummy; do
7926   IFS=$ac_save_IFS
7927   test -z "$ac_dir" && ac_dir=.
7928   $as_executable_p "$ac_dir/$ac_word" || continue
7929 ac_cv_prog_cf_ldd_prog="$ac_prog"
7930 echo "$as_me:7930: found $ac_dir/$ac_word" >&5
7931 break
7932 done
7933
7934 fi
7935 fi
7936 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7937 if test -n "$cf_ldd_prog"; then
7938   echo "$as_me:7938: result: $cf_ldd_prog" >&5
7939 echo "${ECHO_T}$cf_ldd_prog" >&6
7940 else
7941   echo "$as_me:7941: result: no" >&5
7942 echo "${ECHO_T}no" >&6
7943 fi
7944
7945   test -n "$cf_ldd_prog" && break
7946 done
7947 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7948
7949         cf_rpath_list="/usr/lib /lib"
7950         if test "$cf_ldd_prog" != no
7951         then
7952                 cf_rpath_oops=
7953
7954 cat >"conftest.$ac_ext" <<_ACEOF
7955 #line 7955 "configure"
7956 #include "confdefs.h"
7957 #include <stdio.h>
7958 int
7959 main (void)
7960 {
7961 printf("Hello");
7962   ;
7963   return 0;
7964 }
7965 _ACEOF
7966 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7967 if { (eval echo "$as_me:7967: \"$ac_link\"") >&5
7968   (eval $ac_link) 2>&5
7969   ac_status=$?
7970   echo "$as_me:7970: \$? = $ac_status" >&5
7971   (exit "$ac_status"); } &&
7972          { ac_try='test -s "conftest$ac_exeext"'
7973   { (eval echo "$as_me:7973: \"$ac_try\"") >&5
7974   (eval $ac_try) 2>&5
7975   ac_status=$?
7976   echo "$as_me:7976: \$? = $ac_status" >&5
7977   (exit "$ac_status"); }; }; then
7978   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7979                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7980 else
7981   echo "$as_me: failed program was:" >&5
7982 cat "conftest.$ac_ext" >&5
7983 fi
7984 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7985
7986                 # If we passed the link-test, but get a "not found" on a given library,
7987                 # this could be due to inept reconfiguration of gcc to make it only
7988                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7989                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7990                 # /usr/local libraries.
7991                 if test -n "$cf_rpath_oops"
7992                 then
7993                         for cf_rpath_src in $cf_rpath_oops
7994                         do
7995                                 for cf_rpath_dir in \
7996                                         /usr/local \
7997                                         /usr/pkg \
7998                                         /opt/sfw
7999                                 do
8000                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8001                                         then
8002                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8003
8004 echo "${as_me:-configure}:8004: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8005
8006                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8007                                                 break
8008                                         fi
8009                                 done
8010                         done
8011                 fi
8012         fi
8013
8014         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8015
8016 echo "${as_me:-configure}:8016: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8017
8018 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8019
8020 echo "${as_me:-configure}:8020: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8021
8022 cf_rpath_dst=
8023 for cf_rpath_src in $LDFLAGS
8024 do
8025         case "$cf_rpath_src" in
8026         (-L*)
8027
8028                 # check if this refers to a directory which we will ignore
8029                 cf_rpath_skip=no
8030                 if test -n "$cf_rpath_list"
8031                 then
8032                         for cf_rpath_item in $cf_rpath_list
8033                         do
8034                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8035                                 then
8036                                         cf_rpath_skip=yes
8037                                         break
8038                                 fi
8039                         done
8040                 fi
8041
8042                 if test "$cf_rpath_skip" = no
8043                 then
8044                         # transform the option
8045                         if test "$LD_RPATH_OPT" = "-R " ; then
8046                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8047                         else
8048                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8049                         fi
8050
8051                         # if we have not already added this, add it now
8052                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8053                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8054                         then
8055                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8056
8057 echo "${as_me:-configure}:8057: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8058
8059                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8060                         fi
8061                 fi
8062                 ;;
8063         esac
8064         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8065 done
8066 LDFLAGS=$cf_rpath_dst
8067
8068 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8069
8070 echo "${as_me:-configure}:8070: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8071
8072 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8073
8074 echo "${as_me:-configure}:8074: testing ...checking LIBS $LIBS ..." 1>&5
8075
8076 cf_rpath_dst=
8077 for cf_rpath_src in $LIBS
8078 do
8079         case "$cf_rpath_src" in
8080         (-L*)
8081
8082                 # check if this refers to a directory which we will ignore
8083                 cf_rpath_skip=no
8084                 if test -n "$cf_rpath_list"
8085                 then
8086                         for cf_rpath_item in $cf_rpath_list
8087                         do
8088                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8089                                 then
8090                                         cf_rpath_skip=yes
8091                                         break
8092                                 fi
8093                         done
8094                 fi
8095
8096                 if test "$cf_rpath_skip" = no
8097                 then
8098                         # transform the option
8099                         if test "$LD_RPATH_OPT" = "-R " ; then
8100                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8101                         else
8102                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8103                         fi
8104
8105                         # if we have not already added this, add it now
8106                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8107                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8108                         then
8109                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8110
8111 echo "${as_me:-configure}:8111: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8112
8113                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8114                         fi
8115                 fi
8116                 ;;
8117         esac
8118         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8119 done
8120 LIBS=$cf_rpath_dst
8121
8122 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8123
8124 echo "${as_me:-configure}:8124: testing ...checked LIBS $LIBS ..." 1>&5
8125
8126         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8127
8128 echo "${as_me:-configure}:8128: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8129
8130 else
8131         echo "$as_me:8131: result: no" >&5
8132 echo "${ECHO_T}no" >&6
8133 fi
8134
8135 fi
8136
8137 fi
8138
8139 ### Depending on the system, someone may use rpath to build ncurses but not
8140 # want users of the package to rely upon that feature.  Give those people an
8141 # option to suppress that detail from EXTRA_LDFLAGS.
8142 EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
8143 if test -n "$EXTRA_PKG_LDFLAGS"
8144 then
8145         echo "$as_me:8145: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8146 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8147
8148 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8149 if test "${enable_pkg_ldflags+set}" = set; then
8150   enableval="$enable_pkg_ldflags"
8151   test "$enableval" != no && enableval=yes
8152         if test "$enableval" != "yes" ; then
8153     disable_pkg_ldflags=yes
8154         else
8155                 disable_pkg_ldflags=no
8156         fi
8157 else
8158   enableval=yes
8159         disable_pkg_ldflags=no
8160
8161 fi;
8162         echo "$as_me:8162: result: $disable_pkg_ldflags" >&5
8163 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8164         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8165 fi
8166
8167 ###############################################################################
8168
8169 ###     use option --with-extra-suffix to append suffix to headers and libraries
8170 echo "$as_me:8170: checking if you wish to append extra suffix to header/library paths" >&5
8171 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8172 EXTRA_SUFFIX=
8173
8174 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8175 if test "${with_extra_suffix+set}" = set; then
8176   withval="$with_extra_suffix"
8177   case x$withval in
8178         (xno)
8179                 ;;
8180         (xyes|x)
8181                 EXTRA_SUFFIX=$cf_cv_abi_version
8182                 ;;
8183         (*)
8184                 EXTRA_SUFFIX=$withval
8185                 ;;
8186         esac
8187
8188 fi;
8189 echo "$as_me:8189: result: $EXTRA_SUFFIX" >&5
8190 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8191
8192 ###     use option --disable-overwrite to leave out the link to -lcurses
8193 echo "$as_me:8193: checking if you wish to install ncurses overwriting curses" >&5
8194 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8195
8196 # Check whether --enable-overwrite or --disable-overwrite was given.
8197 if test "${enable_overwrite+set}" = set; then
8198   enableval="$enable_overwrite"
8199   with_overwrite=$enableval
8200 else
8201   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8202 fi;
8203 echo "$as_me:8203: result: $with_overwrite" >&5
8204 echo "${ECHO_T}$with_overwrite" >&6
8205
8206 echo "$as_me:8206: checking if external terminfo-database is used" >&5
8207 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8208
8209 # Check whether --enable-database or --disable-database was given.
8210 if test "${enable_database+set}" = set; then
8211   enableval="$enable_database"
8212   use_database=$enableval
8213 else
8214   use_database=yes
8215 fi;
8216 echo "$as_me:8216: result: $use_database" >&5
8217 echo "${ECHO_T}$use_database" >&6
8218
8219 case "$host_os" in
8220 (os2*)
8221         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8222         ;;
8223 (*)
8224         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8225         ;;
8226 esac
8227
8228 NCURSES_USE_DATABASE=0
8229 if test "$use_database" != no ; then
8230         NCURSES_USE_DATABASE=1
8231
8232         echo "$as_me:8232: checking which terminfo source-file will be installed" >&5
8233 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8234
8235 # Check whether --with-database or --without-database was given.
8236 if test "${with_database+set}" = set; then
8237   withval="$with_database"
8238   TERMINFO_SRC=$withval
8239 fi;
8240         echo "$as_me:8240: result: $TERMINFO_SRC" >&5
8241 echo "${ECHO_T}$TERMINFO_SRC" >&6
8242
8243         echo "$as_me:8243: checking whether to use hashed database instead of directory/tree" >&5
8244 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8245
8246 # Check whether --with-hashed-db or --without-hashed-db was given.
8247 if test "${with_hashed_db+set}" = set; then
8248   withval="$with_hashed_db"
8249
8250 else
8251   with_hashed_db=no
8252 fi;
8253         echo "$as_me:8253: result: $with_hashed_db" >&5
8254 echo "${ECHO_T}$with_hashed_db" >&6
8255 else
8256         with_hashed_db=no
8257 fi
8258
8259 echo "$as_me:8259: checking for list of fallback descriptions" >&5
8260 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8261
8262 # Check whether --with-fallbacks or --without-fallbacks was given.
8263 if test "${with_fallbacks+set}" = set; then
8264   withval="$with_fallbacks"
8265   with_fallback=$withval
8266 else
8267   with_fallback=
8268 fi;
8269 echo "$as_me:8269: result: $with_fallback" >&5
8270 echo "${ECHO_T}$with_fallback" >&6
8271
8272 case ".$with_fallback" in
8273 (.|.no)
8274         FALLBACK_LIST=
8275         ;;
8276 (.yes)
8277         { echo "$as_me:8277: WARNING: expected a list of terminal descriptions" >&5
8278 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8279         ;;
8280 (*)
8281         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8282         ;;
8283 esac
8284
8285 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8286 # tree for generating the terminal descriptions that will be compiled into the
8287 # library.  If your toolchain is old, it may not handle current terminal
8288 # databases.  Use configure-options to point to the tools which will be used,
8289 # rather than the first ones found on the $PATH.
8290 if test -n "$ac_tool_prefix"; then
8291   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8292 set dummy ${ac_tool_prefix}tic; ac_word=$2
8293 echo "$as_me:8293: checking for $ac_word" >&5
8294 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8295 if test "${ac_cv_prog_TIC+set}" = set; then
8296   echo $ECHO_N "(cached) $ECHO_C" >&6
8297 else
8298   if test -n "$TIC"; then
8299   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8300 else
8301   ac_save_IFS=$IFS; IFS=$ac_path_separator
8302 ac_dummy="$PATH"
8303 for ac_dir in $ac_dummy; do
8304   IFS=$ac_save_IFS
8305   test -z "$ac_dir" && ac_dir=.
8306   $as_executable_p "$ac_dir/$ac_word" || continue
8307 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8308 echo "$as_me:8308: found $ac_dir/$ac_word" >&5
8309 break
8310 done
8311
8312 fi
8313 fi
8314 TIC=$ac_cv_prog_TIC
8315 if test -n "$TIC"; then
8316   echo "$as_me:8316: result: $TIC" >&5
8317 echo "${ECHO_T}$TIC" >&6
8318 else
8319   echo "$as_me:8319: result: no" >&5
8320 echo "${ECHO_T}no" >&6
8321 fi
8322
8323 fi
8324 if test -z "$ac_cv_prog_TIC"; then
8325   ac_ct_TIC=$TIC
8326   # Extract the first word of "tic", so it can be a program name with args.
8327 set dummy tic; ac_word=$2
8328 echo "$as_me:8328: checking for $ac_word" >&5
8329 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8330 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8331   echo $ECHO_N "(cached) $ECHO_C" >&6
8332 else
8333   if test -n "$ac_ct_TIC"; then
8334   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8335 else
8336   ac_save_IFS=$IFS; IFS=$ac_path_separator
8337 ac_dummy="$PATH"
8338 for ac_dir in $ac_dummy; do
8339   IFS=$ac_save_IFS
8340   test -z "$ac_dir" && ac_dir=.
8341   $as_executable_p "$ac_dir/$ac_word" || continue
8342 ac_cv_prog_ac_ct_TIC="tic"
8343 echo "$as_me:8343: found $ac_dir/$ac_word" >&5
8344 break
8345 done
8346
8347 fi
8348 fi
8349 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8350 if test -n "$ac_ct_TIC"; then
8351   echo "$as_me:8351: result: $ac_ct_TIC" >&5
8352 echo "${ECHO_T}$ac_ct_TIC" >&6
8353 else
8354   echo "$as_me:8354: result: no" >&5
8355 echo "${ECHO_T}no" >&6
8356 fi
8357
8358   TIC=$ac_ct_TIC
8359 else
8360   TIC="$ac_cv_prog_TIC"
8361 fi
8362
8363 if test -n "$ac_tool_prefix"; then
8364   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8365 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8366 echo "$as_me:8366: checking for $ac_word" >&5
8367 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8368 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8369   echo $ECHO_N "(cached) $ECHO_C" >&6
8370 else
8371   if test -n "$INFOCMP"; then
8372   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8373 else
8374   ac_save_IFS=$IFS; IFS=$ac_path_separator
8375 ac_dummy="$PATH"
8376 for ac_dir in $ac_dummy; do
8377   IFS=$ac_save_IFS
8378   test -z "$ac_dir" && ac_dir=.
8379   $as_executable_p "$ac_dir/$ac_word" || continue
8380 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8381 echo "$as_me:8381: found $ac_dir/$ac_word" >&5
8382 break
8383 done
8384
8385 fi
8386 fi
8387 INFOCMP=$ac_cv_prog_INFOCMP
8388 if test -n "$INFOCMP"; then
8389   echo "$as_me:8389: result: $INFOCMP" >&5
8390 echo "${ECHO_T}$INFOCMP" >&6
8391 else
8392   echo "$as_me:8392: result: no" >&5
8393 echo "${ECHO_T}no" >&6
8394 fi
8395
8396 fi
8397 if test -z "$ac_cv_prog_INFOCMP"; then
8398   ac_ct_INFOCMP=$INFOCMP
8399   # Extract the first word of "infocmp", so it can be a program name with args.
8400 set dummy infocmp; ac_word=$2
8401 echo "$as_me:8401: checking for $ac_word" >&5
8402 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8403 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8404   echo $ECHO_N "(cached) $ECHO_C" >&6
8405 else
8406   if test -n "$ac_ct_INFOCMP"; then
8407   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8408 else
8409   ac_save_IFS=$IFS; IFS=$ac_path_separator
8410 ac_dummy="$PATH"
8411 for ac_dir in $ac_dummy; do
8412   IFS=$ac_save_IFS
8413   test -z "$ac_dir" && ac_dir=.
8414   $as_executable_p "$ac_dir/$ac_word" || continue
8415 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8416 echo "$as_me:8416: found $ac_dir/$ac_word" >&5
8417 break
8418 done
8419
8420 fi
8421 fi
8422 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8423 if test -n "$ac_ct_INFOCMP"; then
8424   echo "$as_me:8424: result: $ac_ct_INFOCMP" >&5
8425 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8426 else
8427   echo "$as_me:8427: result: no" >&5
8428 echo "${ECHO_T}no" >&6
8429 fi
8430
8431   INFOCMP=$ac_ct_INFOCMP
8432 else
8433   INFOCMP="$ac_cv_prog_INFOCMP"
8434 fi
8435
8436 if test -n "$FALLBACK_LIST"
8437 then
8438
8439 # Check whether --with-tic-path or --without-tic-path was given.
8440 if test "${with_tic_path+set}" = set; then
8441   withval="$with_tic_path"
8442   echo "$as_me:8442: checking for tic program for fallbacks" >&5
8443 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8444                 TIC=$withval
8445                 echo "$as_me:8445: result: $TIC" >&5
8446 echo "${ECHO_T}$TIC" >&6
8447
8448 if test "x$prefix" != xNONE; then
8449         cf_path_syntax="$prefix"
8450 else
8451         cf_path_syntax="$ac_default_prefix"
8452 fi
8453
8454 case ".$TIC" in
8455 (.\$\(*\)*|.\'*\'*)
8456         ;;
8457 (..|./*|.\\*)
8458         ;;
8459 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8460         ;;
8461 (.\$\{*prefix\}*|.\$\{*dir\}*)
8462         eval TIC="$TIC"
8463         case ".$TIC" in
8464         (.NONE/*)
8465                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8466                 ;;
8467         esac
8468         ;;
8469 (.no|.NONE/*)
8470         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8471         ;;
8472 (*)
8473         { { echo "$as_me:8473: error: expected a pathname, not \"$TIC\"" >&5
8474 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8475    { (exit 1); exit 1; }; }
8476         ;;
8477 esac
8478
8479 else
8480
8481 test -z "$TIC" && TIC="tic"
8482 for ac_prog in $TIC tic
8483 do
8484   # Extract the first word of "$ac_prog", so it can be a program name with args.
8485 set dummy $ac_prog; ac_word=$2
8486 echo "$as_me:8486: checking for $ac_word" >&5
8487 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8488 if test "${ac_cv_path_TIC+set}" = set; then
8489   echo $ECHO_N "(cached) $ECHO_C" >&6
8490 else
8491   case $TIC in
8492   [\\/]* | ?:[\\/]*)
8493   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8494   ;;
8495   *)
8496   ac_save_IFS=$IFS; IFS=$ac_path_separator
8497 ac_dummy="$PATH:/usr/local/ncurses/bin"
8498 for ac_dir in $ac_dummy; do
8499   IFS=$ac_save_IFS
8500   test -z "$ac_dir" && ac_dir=.
8501   if $as_executable_p "$ac_dir/$ac_word"; then
8502    ac_cv_path_TIC="$ac_dir/$ac_word"
8503    echo "$as_me:8503: found $ac_dir/$ac_word" >&5
8504    break
8505 fi
8506 done
8507
8508   ;;
8509 esac
8510 fi
8511 TIC=$ac_cv_path_TIC
8512
8513 if test -n "$TIC"; then
8514   echo "$as_me:8514: result: $TIC" >&5
8515 echo "${ECHO_T}$TIC" >&6
8516 else
8517   echo "$as_me:8517: result: no" >&5
8518 echo "${ECHO_T}no" >&6
8519 fi
8520
8521   test -n "$TIC" && break
8522 done
8523 test -n "$TIC" || TIC="$TIC"
8524
8525 cf_path_prog=""
8526 cf_path_args=""
8527 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8528 for cf_temp in $ac_cv_path_TIC
8529 do
8530         if test -z "$cf_path_prog" ; then
8531                 if test "$with_full_paths" = yes ; then
8532
8533 if test "x$prefix" != xNONE; then
8534         cf_path_syntax="$prefix"
8535 else
8536         cf_path_syntax="$ac_default_prefix"
8537 fi
8538
8539 case ".$cf_temp" in
8540 (.\$\(*\)*|.\'*\'*)
8541         ;;
8542 (..|./*|.\\*)
8543         ;;
8544 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8545         ;;
8546 (.\$\{*prefix\}*|.\$\{*dir\}*)
8547         eval cf_temp="$cf_temp"
8548         case ".$cf_temp" in
8549         (.NONE/*)
8550                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8551                 ;;
8552         esac
8553         ;;
8554 (.no|.NONE/*)
8555         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8556         ;;
8557 (*)
8558         break
8559         ;;
8560 esac
8561
8562                         cf_path_prog="$cf_temp"
8563                 else
8564                         cf_path_prog="`basename "$cf_temp"`"
8565                 fi
8566         elif test -z "$cf_path_args" ; then
8567                 cf_path_args="$cf_temp"
8568         else
8569                 cf_path_args="$cf_path_args $cf_temp"
8570         fi
8571 done
8572 IFS="$cf_save_ifs"
8573
8574 if test -n "$cf_path_prog" ; then
8575
8576 echo "${as_me:-configure}:8576: testing defining path for ${cf_path_prog} ..." 1>&5
8577
8578 cat >>confdefs.h <<EOF
8579 #define TIC_PATH "$cf_path_prog"
8580 EOF
8581
8582         test -n "$cf_path_args" &&
8583 cat >>confdefs.h <<EOF
8584 #define TIC_ARGS "$cf_path_args"
8585 EOF
8586
8587 fi
8588
8589                 if test -z "$TIC"
8590                 then
8591                         { echo "$as_me:8591: WARNING: no tic program found for fallbacks" >&5
8592 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8593                 fi
8594
8595 fi;
8596
8597 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8598 if test "${with_infocmp_path+set}" = set; then
8599   withval="$with_infocmp_path"
8600   echo "$as_me:8600: checking for infocmp program for fallbacks" >&5
8601 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8602                 INFOCMP=$withval
8603                 echo "$as_me:8603: result: $INFOCMP" >&5
8604 echo "${ECHO_T}$INFOCMP" >&6
8605
8606 if test "x$prefix" != xNONE; then
8607         cf_path_syntax="$prefix"
8608 else
8609         cf_path_syntax="$ac_default_prefix"
8610 fi
8611
8612 case ".$INFOCMP" in
8613 (.\$\(*\)*|.\'*\'*)
8614         ;;
8615 (..|./*|.\\*)
8616         ;;
8617 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8618         ;;
8619 (.\$\{*prefix\}*|.\$\{*dir\}*)
8620         eval INFOCMP="$INFOCMP"
8621         case ".$INFOCMP" in
8622         (.NONE/*)
8623                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8624                 ;;
8625         esac
8626         ;;
8627 (.no|.NONE/*)
8628         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8629         ;;
8630 (*)
8631         { { echo "$as_me:8631: error: expected a pathname, not \"$INFOCMP\"" >&5
8632 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8633    { (exit 1); exit 1; }; }
8634         ;;
8635 esac
8636
8637 else
8638
8639 test -z "$INFOCMP" && INFOCMP="infocmp"
8640 for ac_prog in $INFOCMP infocmp
8641 do
8642   # Extract the first word of "$ac_prog", so it can be a program name with args.
8643 set dummy $ac_prog; ac_word=$2
8644 echo "$as_me:8644: checking for $ac_word" >&5
8645 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8646 if test "${ac_cv_path_INFOCMP+set}" = set; then
8647   echo $ECHO_N "(cached) $ECHO_C" >&6
8648 else
8649   case $INFOCMP in
8650   [\\/]* | ?:[\\/]*)
8651   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8652   ;;
8653   *)
8654   ac_save_IFS=$IFS; IFS=$ac_path_separator
8655 ac_dummy="$PATH:/usr/local/ncurses/bin"
8656 for ac_dir in $ac_dummy; do
8657   IFS=$ac_save_IFS
8658   test -z "$ac_dir" && ac_dir=.
8659   if $as_executable_p "$ac_dir/$ac_word"; then
8660    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8661    echo "$as_me:8661: found $ac_dir/$ac_word" >&5
8662    break
8663 fi
8664 done
8665
8666   ;;
8667 esac
8668 fi
8669 INFOCMP=$ac_cv_path_INFOCMP
8670
8671 if test -n "$INFOCMP"; then
8672   echo "$as_me:8672: result: $INFOCMP" >&5
8673 echo "${ECHO_T}$INFOCMP" >&6
8674 else
8675   echo "$as_me:8675: result: no" >&5
8676 echo "${ECHO_T}no" >&6
8677 fi
8678
8679   test -n "$INFOCMP" && break
8680 done
8681 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8682
8683 cf_path_prog=""
8684 cf_path_args=""
8685 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8686 for cf_temp in $ac_cv_path_INFOCMP
8687 do
8688         if test -z "$cf_path_prog" ; then
8689                 if test "$with_full_paths" = yes ; then
8690
8691 if test "x$prefix" != xNONE; then
8692         cf_path_syntax="$prefix"
8693 else
8694         cf_path_syntax="$ac_default_prefix"
8695 fi
8696
8697 case ".$cf_temp" in
8698 (.\$\(*\)*|.\'*\'*)
8699         ;;
8700 (..|./*|.\\*)
8701         ;;
8702 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8703         ;;
8704 (.\$\{*prefix\}*|.\$\{*dir\}*)
8705         eval cf_temp="$cf_temp"
8706         case ".$cf_temp" in
8707         (.NONE/*)
8708                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8709                 ;;
8710         esac
8711         ;;
8712 (.no|.NONE/*)
8713         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8714         ;;
8715 (*)
8716         break
8717         ;;
8718 esac
8719
8720                         cf_path_prog="$cf_temp"
8721                 else
8722                         cf_path_prog="`basename "$cf_temp"`"
8723                 fi
8724         elif test -z "$cf_path_args" ; then
8725                 cf_path_args="$cf_temp"
8726         else
8727                 cf_path_args="$cf_path_args $cf_temp"
8728         fi
8729 done
8730 IFS="$cf_save_ifs"
8731
8732 if test -n "$cf_path_prog" ; then
8733
8734 echo "${as_me:-configure}:8734: testing defining path for ${cf_path_prog} ..." 1>&5
8735
8736 cat >>confdefs.h <<EOF
8737 #define INFOCMP_PATH "$cf_path_prog"
8738 EOF
8739
8740         test -n "$cf_path_args" &&
8741 cat >>confdefs.h <<EOF
8742 #define INFOCMP_ARGS "$cf_path_args"
8743 EOF
8744
8745 fi
8746
8747                 if test -z "$INFOCMP"
8748                 then
8749                         { echo "$as_me:8749: WARNING: no infocmp program found for fallbacks" >&5
8750 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8751                 fi
8752
8753 fi;
8754
8755         test -z "$TIC" && FALLBACK_LIST=
8756         test -z "$INFOCMP" && FALLBACK_LIST=
8757         if test -z "$FALLBACK_LIST"
8758         then
8759                 { echo "$as_me:8759: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8760 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8761         fi
8762 fi
8763
8764 USE_FALLBACKS=
8765 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8766
8767 echo "$as_me:8767: checking if you want modern xterm or antique" >&5
8768 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8769
8770 # Check whether --with-xterm-new or --without-xterm-new was given.
8771 if test "${with_xterm_new+set}" = set; then
8772   withval="$with_xterm_new"
8773   with_xterm_new=$withval
8774 else
8775   with_xterm_new=yes
8776 fi;
8777 case "$with_xterm_new" in
8778 (no) with_xterm_new=xterm-old;;
8779 (*)      with_xterm_new=xterm-new;;
8780 esac
8781 echo "$as_me:8781: result: $with_xterm_new" >&5
8782 echo "${ECHO_T}$with_xterm_new" >&6
8783 WHICH_XTERM=$with_xterm_new
8784
8785 echo "$as_me:8785: checking if xterm backspace sends BS or DEL" >&5
8786 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8787
8788 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8789 if test "${with_xterm_kbs+set}" = set; then
8790   withval="$with_xterm_kbs"
8791   with_xterm_kbs=$withval
8792 else
8793   with_xterm_kbs=BS
8794 fi;
8795 case x$with_xterm_kbs in
8796 (xyes|xno|xBS|xbs|x8)
8797         with_xterm_kbs=BS
8798         ;;
8799 (xDEL|xdel|x127)
8800         with_xterm_kbs=DEL
8801         ;;
8802 (*)
8803         with_xterm_kbs=$withval
8804         ;;
8805 esac
8806 echo "$as_me:8806: result: $with_xterm_kbs" >&5
8807 echo "${ECHO_T}$with_xterm_kbs" >&6
8808 XTERM_KBS=$with_xterm_kbs
8809
8810 MAKE_TERMINFO=
8811 if test "$use_database" = no ; then
8812         TERMINFO="${datadir}/terminfo"
8813         MAKE_TERMINFO="#"
8814 else
8815
8816 echo "$as_me:8816: checking for list of terminfo directories" >&5
8817 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8818
8819 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8820 if test "${with_terminfo_dirs+set}" = set; then
8821   withval="$with_terminfo_dirs"
8822
8823 else
8824   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8825 fi;
8826 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8827 cf_dst_path=
8828 for cf_src_path in $withval
8829 do
8830
8831 if test "x$prefix" != xNONE; then
8832         cf_path_syntax="$prefix"
8833 else
8834         cf_path_syntax="$ac_default_prefix"
8835 fi
8836
8837 case ".$cf_src_path" in
8838 (.\$\(*\)*|.\'*\'*)
8839         ;;
8840 (..|./*|.\\*)
8841         ;;
8842 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8843         ;;
8844 (.\$\{*prefix\}*|.\$\{*dir\}*)
8845         eval cf_src_path="$cf_src_path"
8846         case ".$cf_src_path" in
8847         (.NONE/*)
8848                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8849                 ;;
8850         esac
8851         ;;
8852 (.no|.NONE/*)
8853         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8854         ;;
8855 (*)
8856         { { echo "$as_me:8856: error: expected a pathname, not \"$cf_src_path\"" >&5
8857 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8858    { (exit 1); exit 1; }; }
8859         ;;
8860 esac
8861
8862   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8863   cf_dst_path="${cf_dst_path}${cf_src_path}"
8864 done
8865 IFS="$ac_save_ifs"
8866
8867 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8868 # so we have to check/work around.  We do prefer the result of "eval"...
8869 eval cf_dst_eval="$cf_dst_path"
8870 case "x$cf_dst_eval" in
8871 (xNONE*)
8872         TERMINFO_DIRS=$cf_dst_path
8873         ;;
8874 (*)
8875         TERMINFO_DIRS="$cf_dst_eval"
8876         ;;
8877 esac
8878
8879 echo "$as_me:8879: result: $TERMINFO_DIRS" >&5
8880 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8881 test -n "$TERMINFO_DIRS" &&
8882 cat >>confdefs.h <<EOF
8883 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8884 EOF
8885
8886 case "x$TERMINFO" in
8887 x???:*)
8888         { echo "$as_me:8888: WARNING: ignoring non-directory/file TERMINFO value" >&5
8889 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8890         unset TERMINFO
8891         ;;
8892 esac
8893
8894 echo "$as_me:8894: checking for default terminfo directory" >&5
8895 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8896
8897 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8898 if test "${with_default_terminfo_dir+set}" = set; then
8899   withval="$with_default_terminfo_dir"
8900
8901 else
8902   withval="${TERMINFO:-${datadir}/terminfo}"
8903 fi; if test -n "${datadir}/terminfo" ; then
8904
8905 if test "x$prefix" != xNONE; then
8906         cf_path_syntax="$prefix"
8907 else
8908         cf_path_syntax="$ac_default_prefix"
8909 fi
8910
8911 case ".$withval" in
8912 (.\$\(*\)*|.\'*\'*)
8913         ;;
8914 (..|./*|.\\*)
8915         ;;
8916 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8917         ;;
8918 (.\$\{*prefix\}*|.\$\{*dir\}*)
8919         eval withval="$withval"
8920         case ".$withval" in
8921         (.NONE/*)
8922                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
8923                 ;;
8924         esac
8925         ;;
8926 (.no|.NONE/*)
8927         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
8928         ;;
8929 (*)
8930         { { echo "$as_me:8930: error: expected a pathname, not \"$withval\"" >&5
8931 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8932    { (exit 1); exit 1; }; }
8933         ;;
8934 esac
8935
8936 fi
8937 eval TERMINFO="$withval"
8938
8939 echo "$as_me:8939: result: $TERMINFO" >&5
8940 echo "${ECHO_T}$TERMINFO" >&6
8941
8942 cat >>confdefs.h <<EOF
8943 #define TERMINFO "$TERMINFO"
8944 EOF
8945
8946 fi
8947
8948 ###     use option --disable-big-core to make tic run on small machines
8949 ###     We need 4Mb, check if we can allocate 50% more than that.
8950 echo "$as_me:8950: checking if big-core option selected" >&5
8951 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8952
8953 # Check whether --enable-big-core or --disable-big-core was given.
8954 if test "${enable_big_core+set}" = set; then
8955   enableval="$enable_big_core"
8956   with_big_core=$enableval
8957 else
8958   if test "$cross_compiling" = yes; then
8959   with_big_core=no
8960 else
8961   cat >"conftest.$ac_ext" <<_ACEOF
8962 #line 8962 "configure"
8963 #include "confdefs.h"
8964
8965 #include <stdlib.h>
8966 #include <string.h>
8967 int main() {
8968         unsigned long n = 6000000L;
8969         char *s = malloc(n);
8970         if (s != 0)
8971                 s[0] = s[n-1] = 0;
8972         ${cf_cv_main_return:-return}(s == 0);
8973 }
8974 _ACEOF
8975 rm -f "conftest$ac_exeext"
8976 if { (eval echo "$as_me:8976: \"$ac_link\"") >&5
8977   (eval $ac_link) 2>&5
8978   ac_status=$?
8979   echo "$as_me:8979: \$? = $ac_status" >&5
8980   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8981   { (eval echo "$as_me:8981: \"$ac_try\"") >&5
8982   (eval $ac_try) 2>&5
8983   ac_status=$?
8984   echo "$as_me:8984: \$? = $ac_status" >&5
8985   (exit "$ac_status"); }; }; then
8986   with_big_core=yes
8987 else
8988   echo "$as_me: program exited with status $ac_status" >&5
8989 echo "$as_me: failed program was:" >&5
8990 cat "conftest.$ac_ext" >&5
8991 with_big_core=no
8992 fi
8993 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8994 fi
8995 fi;
8996 echo "$as_me:8996: result: $with_big_core" >&5
8997 echo "${ECHO_T}$with_big_core" >&6
8998 test "x$with_big_core" = "xyes" &&
8999 cat >>confdefs.h <<\EOF
9000 #define HAVE_BIG_CORE 1
9001 EOF
9002
9003 ### ISO C only guarantees 512-char strings, we have tables which load faster
9004 ### when constructed using "big" strings.  More than the C compiler, the awk
9005 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9006 echo "$as_me:9006: checking if big-strings option selected" >&5
9007 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9008
9009 # Check whether --enable-big-strings or --disable-big-strings was given.
9010 if test "${enable_big_strings+set}" = set; then
9011   enableval="$enable_big_strings"
9012   with_big_strings=$enableval
9013 else
9014
9015         case x$AWK in
9016         (x)
9017                 eval with_big_strings=no
9018                 ;;
9019         (*)
9020                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9021                         | $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
9022                         eval with_big_strings=yes
9023                 else
9024                         eval with_big_strings=no
9025                 fi
9026                 ;;
9027         esac
9028
9029 fi;
9030 echo "$as_me:9030: result: $with_big_strings" >&5
9031 echo "${ECHO_T}$with_big_strings" >&6
9032
9033 USE_BIG_STRINGS=0
9034 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9035
9036 ###     use option --enable-termcap to compile in the termcap fallback support
9037 echo "$as_me:9037: checking if you want termcap-fallback support" >&5
9038 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9039
9040 # Check whether --enable-termcap or --disable-termcap was given.
9041 if test "${enable_termcap+set}" = set; then
9042   enableval="$enable_termcap"
9043   with_termcap=$enableval
9044 else
9045   with_termcap=no
9046 fi;
9047 echo "$as_me:9047: result: $with_termcap" >&5
9048 echo "${ECHO_T}$with_termcap" >&6
9049
9050 NCURSES_USE_TERMCAP=0
9051 if test "x$with_termcap" != "xyes" ; then
9052         if test "$use_database" = no ; then
9053                 if test -z "$with_fallback" ; then
9054                         { { echo "$as_me:9054: error: You have disabled the database w/o specifying fallbacks" >&5
9055 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9056    { (exit 1); exit 1; }; }
9057                 fi
9058         fi
9059
9060 cat >>confdefs.h <<\EOF
9061 #define PURE_TERMINFO 1
9062 EOF
9063
9064 else
9065
9066         if test "$with_ticlib" != no ; then
9067                 { { echo "$as_me:9067: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9068 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9069    { (exit 1); exit 1; }; }
9070         fi
9071
9072         NCURSES_USE_TERMCAP=1
9073         echo "$as_me:9073: checking for list of termcap files" >&5
9074 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9075
9076 # Check whether --with-termpath or --without-termpath was given.
9077 if test "${with_termpath+set}" = set; then
9078   withval="$with_termpath"
9079
9080 else
9081   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9082 fi;
9083 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9084 cf_dst_path=
9085 for cf_src_path in $withval
9086 do
9087
9088 if test "x$prefix" != xNONE; then
9089         cf_path_syntax="$prefix"
9090 else
9091         cf_path_syntax="$ac_default_prefix"
9092 fi
9093
9094 case ".$cf_src_path" in
9095 (.\$\(*\)*|.\'*\'*)
9096         ;;
9097 (..|./*|.\\*)
9098         ;;
9099 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9100         ;;
9101 (.\$\{*prefix\}*|.\$\{*dir\}*)
9102         eval cf_src_path="$cf_src_path"
9103         case ".$cf_src_path" in
9104         (.NONE/*)
9105                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9106                 ;;
9107         esac
9108         ;;
9109 (.no|.NONE/*)
9110         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9111         ;;
9112 (*)
9113         { { echo "$as_me:9113: error: expected a pathname, not \"$cf_src_path\"" >&5
9114 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9115    { (exit 1); exit 1; }; }
9116         ;;
9117 esac
9118
9119   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9120   cf_dst_path="${cf_dst_path}${cf_src_path}"
9121 done
9122 IFS="$ac_save_ifs"
9123
9124 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9125 # so we have to check/work around.  We do prefer the result of "eval"...
9126 eval cf_dst_eval="$cf_dst_path"
9127 case "x$cf_dst_eval" in
9128 (xNONE*)
9129         TERMPATH=$cf_dst_path
9130         ;;
9131 (*)
9132         TERMPATH="$cf_dst_eval"
9133         ;;
9134 esac
9135
9136         echo "$as_me:9136: result: $TERMPATH" >&5
9137 echo "${ECHO_T}$TERMPATH" >&6
9138         test -n "$TERMPATH" &&
9139 cat >>confdefs.h <<EOF
9140 #define TERMPATH "$TERMPATH"
9141 EOF
9142
9143         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9144         echo "$as_me:9144: checking if fast termcap-loader is needed" >&5
9145 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9146
9147 # Check whether --enable-getcap or --disable-getcap was given.
9148 if test "${enable_getcap+set}" = set; then
9149   enableval="$enable_getcap"
9150   with_getcap=$enableval
9151 else
9152   with_getcap=no
9153 fi;
9154         echo "$as_me:9154: result: $with_getcap" >&5
9155 echo "${ECHO_T}$with_getcap" >&6
9156         test "x$with_getcap" = "xyes" &&
9157 cat >>confdefs.h <<\EOF
9158 #define USE_GETCAP 1
9159 EOF
9160
9161         echo "$as_me:9161: checking if translated termcaps will be cached in ~/.terminfo" >&5
9162 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9163
9164 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9165 if test "${enable_getcap_cache+set}" = set; then
9166   enableval="$enable_getcap_cache"
9167   with_getcap_cache=$enableval
9168 else
9169   with_getcap_cache=no
9170 fi;
9171         echo "$as_me:9171: result: $with_getcap_cache" >&5
9172 echo "${ECHO_T}$with_getcap_cache" >&6
9173         test "x$with_getcap_cache" = "xyes" &&
9174 cat >>confdefs.h <<\EOF
9175 #define USE_GETCAP_CACHE 1
9176 EOF
9177
9178 fi
9179
9180 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9181 echo "$as_me:9181: checking if ~/.terminfo is wanted" >&5
9182 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9183
9184 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9185 if test "${enable_home_terminfo+set}" = set; then
9186   enableval="$enable_home_terminfo"
9187   with_home_terminfo=$enableval
9188 else
9189   with_home_terminfo=yes
9190 fi;
9191 echo "$as_me:9191: result: $with_home_terminfo" >&5
9192 echo "${ECHO_T}$with_home_terminfo" >&6
9193 test "x$with_home_terminfo" = "xyes" &&
9194 cat >>confdefs.h <<\EOF
9195 #define USE_HOME_TERMINFO 1
9196 EOF
9197
9198 echo "$as_me:9198: checking if you want to use restricted environment when running as root" >&5
9199 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
9200
9201 # Check whether --enable-root-environ or --disable-root-environ was given.
9202 if test "${enable_root_environ+set}" = set; then
9203   enableval="$enable_root_environ"
9204   with_root_environ=$enableval
9205 else
9206   with_root_environ=yes
9207 fi;
9208 echo "$as_me:9208: result: $with_root_environ" >&5
9209 echo "${ECHO_T}$with_root_environ" >&6
9210 test "x$with_root_environ" = xyes &&
9211 cat >>confdefs.h <<\EOF
9212 #define USE_ROOT_ENVIRON 1
9213 EOF
9214
9215 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9216 ###   to reduce storage requirements for the terminfo database.
9217
9218 for ac_header in \
9219 unistd.h \
9220
9221 do
9222 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9223 echo "$as_me:9223: checking for $ac_header" >&5
9224 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9225 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9226   echo $ECHO_N "(cached) $ECHO_C" >&6
9227 else
9228   cat >"conftest.$ac_ext" <<_ACEOF
9229 #line 9229 "configure"
9230 #include "confdefs.h"
9231 #include <$ac_header>
9232 _ACEOF
9233 if { (eval echo "$as_me:9233: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9234   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9235   ac_status=$?
9236   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9237   rm -f conftest.er1
9238   cat conftest.err >&5
9239   echo "$as_me:9239: \$? = $ac_status" >&5
9240   (exit "$ac_status"); } >/dev/null; then
9241   if test -s conftest.err; then
9242     ac_cpp_err=$ac_c_preproc_warn_flag
9243   else
9244     ac_cpp_err=
9245   fi
9246 else
9247   ac_cpp_err=yes
9248 fi
9249 if test -z "$ac_cpp_err"; then
9250   eval "$as_ac_Header=yes"
9251 else
9252   echo "$as_me: failed program was:" >&5
9253   cat "conftest.$ac_ext" >&5
9254   eval "$as_ac_Header=no"
9255 fi
9256 rm -f conftest.err "conftest.$ac_ext"
9257 fi
9258 echo "$as_me:9258: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9259 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9260 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9261   cat >>confdefs.h <<EOF
9262 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9263 EOF
9264
9265 fi
9266 done
9267
9268 for ac_func in \
9269         remove \
9270         unlink
9271 do
9272 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9273 echo "$as_me:9273: checking for $ac_func" >&5
9274 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9275 if eval "test \"\${$as_ac_var+set}\" = set"; then
9276   echo $ECHO_N "(cached) $ECHO_C" >&6
9277 else
9278   cat >"conftest.$ac_ext" <<_ACEOF
9279 #line 9279 "configure"
9280 #include "confdefs.h"
9281 #define $ac_func autoconf_temporary
9282 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9283 #undef $ac_func
9284
9285 #ifdef __cplusplus
9286 extern "C"
9287 #endif
9288
9289 /* We use char because int might match the return type of a gcc2
9290    builtin and then its argument prototype would still apply.  */
9291 char $ac_func (void);
9292
9293 int
9294 main (void)
9295 {
9296
9297 /* The GNU C library defines stubs for functions which it implements
9298     to always fail with ENOSYS.  Some functions are actually named
9299     something starting with __ and the normal name is an alias.  */
9300 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9301 #error found stub for $ac_func
9302 #endif
9303
9304         return $ac_func ();
9305   ;
9306   return 0;
9307 }
9308 _ACEOF
9309 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9310 if { (eval echo "$as_me:9310: \"$ac_link\"") >&5
9311   (eval $ac_link) 2>&5
9312   ac_status=$?
9313   echo "$as_me:9313: \$? = $ac_status" >&5
9314   (exit "$ac_status"); } &&
9315          { ac_try='test -s "conftest$ac_exeext"'
9316   { (eval echo "$as_me:9316: \"$ac_try\"") >&5
9317   (eval $ac_try) 2>&5
9318   ac_status=$?
9319   echo "$as_me:9319: \$? = $ac_status" >&5
9320   (exit "$ac_status"); }; }; then
9321   eval "$as_ac_var=yes"
9322 else
9323   echo "$as_me: failed program was:" >&5
9324 cat "conftest.$ac_ext" >&5
9325 eval "$as_ac_var=no"
9326 fi
9327 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9328 fi
9329 echo "$as_me:9329: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9330 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9331 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9332   cat >>confdefs.h <<EOF
9333 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9334 EOF
9335
9336 fi
9337 done
9338
9339 if test "$cross_compiling" = yes ; then
9340
9341 for ac_func in \
9342                 link \
9343                 symlink
9344 do
9345 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9346 echo "$as_me:9346: checking for $ac_func" >&5
9347 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9348 if eval "test \"\${$as_ac_var+set}\" = set"; then
9349   echo $ECHO_N "(cached) $ECHO_C" >&6
9350 else
9351   cat >"conftest.$ac_ext" <<_ACEOF
9352 #line 9352 "configure"
9353 #include "confdefs.h"
9354 #define $ac_func autoconf_temporary
9355 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9356 #undef $ac_func
9357
9358 #ifdef __cplusplus
9359 extern "C"
9360 #endif
9361
9362 /* We use char because int might match the return type of a gcc2
9363    builtin and then its argument prototype would still apply.  */
9364 char $ac_func (void);
9365
9366 int
9367 main (void)
9368 {
9369
9370 /* The GNU C library defines stubs for functions which it implements
9371     to always fail with ENOSYS.  Some functions are actually named
9372     something starting with __ and the normal name is an alias.  */
9373 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9374 #error found stub for $ac_func
9375 #endif
9376
9377         return $ac_func ();
9378   ;
9379   return 0;
9380 }
9381 _ACEOF
9382 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9383 if { (eval echo "$as_me:9383: \"$ac_link\"") >&5
9384   (eval $ac_link) 2>&5
9385   ac_status=$?
9386   echo "$as_me:9386: \$? = $ac_status" >&5
9387   (exit "$ac_status"); } &&
9388          { ac_try='test -s "conftest$ac_exeext"'
9389   { (eval echo "$as_me:9389: \"$ac_try\"") >&5
9390   (eval $ac_try) 2>&5
9391   ac_status=$?
9392   echo "$as_me:9392: \$? = $ac_status" >&5
9393   (exit "$ac_status"); }; }; then
9394   eval "$as_ac_var=yes"
9395 else
9396   echo "$as_me: failed program was:" >&5
9397 cat "conftest.$ac_ext" >&5
9398 eval "$as_ac_var=no"
9399 fi
9400 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9401 fi
9402 echo "$as_me:9402: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9403 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9404 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9405   cat >>confdefs.h <<EOF
9406 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9407 EOF
9408
9409 fi
9410 done
9411
9412 else
9413         echo "$as_me:9413: checking if link/symlink functions work" >&5
9414 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9415 if test "${cf_cv_link_funcs+set}" = set; then
9416   echo $ECHO_N "(cached) $ECHO_C" >&6
9417 else
9418
9419                 cf_cv_link_funcs=
9420                 for cf_func in link symlink ; do
9421                         if test "$cross_compiling" = yes; then
9422
9423                         eval 'ac_cv_func_'$cf_func'=error'
9424 else
9425   cat >"conftest.$ac_ext" <<_ACEOF
9426 #line 9426 "configure"
9427 #include "confdefs.h"
9428
9429 #include <sys/types.h>
9430 #include <sys/stat.h>
9431 #ifdef HAVE_UNISTD_H
9432 #include <unistd.h>
9433 #endif
9434 int main(void)
9435 {
9436         int fail = 0;
9437         char *src = "config.log";
9438         char *dst = "conftest.chk";
9439         struct stat src_sb;
9440         struct stat dst_sb;
9441
9442         stat(src, &src_sb);
9443         fail = ($cf_func("config.log", "conftest.chk") < 0)
9444             || (stat(dst, &dst_sb) < 0)
9445             || (dst_sb.st_mtime != src_sb.st_mtime);
9446 #ifdef HAVE_UNLINK
9447         unlink(dst);
9448 #else
9449         remove(dst);
9450 #endif
9451         ${cf_cv_main_return:-return} (fail);
9452 }
9453
9454 _ACEOF
9455 rm -f "conftest$ac_exeext"
9456 if { (eval echo "$as_me:9456: \"$ac_link\"") >&5
9457   (eval $ac_link) 2>&5
9458   ac_status=$?
9459   echo "$as_me:9459: \$? = $ac_status" >&5
9460   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9461   { (eval echo "$as_me:9461: \"$ac_try\"") >&5
9462   (eval $ac_try) 2>&5
9463   ac_status=$?
9464   echo "$as_me:9464: \$? = $ac_status" >&5
9465   (exit "$ac_status"); }; }; then
9466
9467                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9468                         eval 'ac_cv_func_'$cf_func'=yes'
9469 else
9470   echo "$as_me: program exited with status $ac_status" >&5
9471 echo "$as_me: failed program was:" >&5
9472 cat "conftest.$ac_ext" >&5
9473
9474                         eval 'ac_cv_func_'$cf_func'=no'
9475 fi
9476 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9477 fi
9478                 done
9479                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9480
9481 fi
9482 echo "$as_me:9482: result: $cf_cv_link_funcs" >&5
9483 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9484         test "$ac_cv_func_link"    = yes &&
9485 cat >>confdefs.h <<\EOF
9486 #define HAVE_LINK 1
9487 EOF
9488
9489         test "$ac_cv_func_symlink" = yes &&
9490 cat >>confdefs.h <<\EOF
9491 #define HAVE_SYMLINK 1
9492 EOF
9493
9494 fi
9495
9496 with_links=no
9497 with_symlinks=no
9498
9499 # soft links (symbolic links) are useful for some systems where hard links do
9500 # not work, or to make it simpler to copy terminfo trees around.
9501 if test "x$ac_cv_func_symlink" = xyes ; then
9502         echo "$as_me:9502: checking if tic should use symbolic links" >&5
9503 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9504
9505 # Check whether --enable-symlinks or --disable-symlinks was given.
9506 if test "${enable_symlinks+set}" = set; then
9507   enableval="$enable_symlinks"
9508   with_symlinks=$enableval
9509 else
9510   with_symlinks=no
9511 fi;
9512         echo "$as_me:9512: result: $with_symlinks" >&5
9513 echo "${ECHO_T}$with_symlinks" >&6
9514 fi
9515
9516 # If we have hard links and did not choose to use soft links instead, there is
9517 # no reason to make this choice optional - use the hard links.
9518 if test "$with_symlinks" = no ; then
9519         echo "$as_me:9519: checking if tic should use hard links" >&5
9520 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9521         if test "x$ac_cv_func_link" = xyes ; then
9522                 with_links=yes
9523         else
9524                 with_links=no
9525         fi
9526         echo "$as_me:9526: result: $with_links" >&5
9527 echo "${ECHO_T}$with_links" >&6
9528 fi
9529
9530 test "x$with_links" = xyes &&
9531 cat >>confdefs.h <<\EOF
9532 #define USE_LINKS 1
9533 EOF
9534
9535 test "x$with_symlinks" = xyes &&
9536 cat >>confdefs.h <<\EOF
9537 #define USE_SYMLINKS 1
9538 EOF
9539
9540 ###   use option --enable-broken-linker to force on use of broken-linker support
9541
9542 echo "$as_me:9542: checking if you want broken-linker support code" >&5
9543 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9544
9545 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9546 if test "${enable_broken_linker+set}" = set; then
9547   enableval="$enable_broken_linker"
9548   with_broken_linker=$enableval
9549 else
9550   with_broken_linker=no
9551 fi;
9552 echo "$as_me:9552: result: $with_broken_linker" >&5
9553 echo "${ECHO_T}$with_broken_linker" >&6
9554
9555 : "${BROKEN_LINKER:=0}"
9556 if test "x$with_broken_linker" = xyes ; then
9557
9558 cat >>confdefs.h <<\EOF
9559 #define BROKEN_LINKER 1
9560 EOF
9561
9562         BROKEN_LINKER=1
9563 fi
9564
9565 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9566 echo "$as_me:9566: checking if tputs should process BSD-style prefix padding" >&5
9567 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9568
9569 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9570 if test "${enable_bsdpad+set}" = set; then
9571   enableval="$enable_bsdpad"
9572   with_bsdpad=$enableval
9573 else
9574   with_bsdpad=no
9575 fi;
9576 echo "$as_me:9576: result: $with_bsdpad" >&5
9577 echo "${ECHO_T}$with_bsdpad" >&6
9578 test "x$with_bsdpad" = xyes &&
9579 cat >>confdefs.h <<\EOF
9580 #define BSD_TPUTS 1
9581 EOF
9582
9583 ###   use option --enable-widec to turn on use of wide-character support
9584 NCURSES_CH_T=chtype
9585 NCURSES_LIBUTF8=0
9586
9587 NEED_WCHAR_H=0
9588 NCURSES_MBSTATE_T=0
9589 NCURSES_WCHAR_T=0
9590 NCURSES_WINT_T=0
9591
9592 # Check to define _XOPEN_SOURCE "automatically"
9593 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9594
9595 echo "$as_me:9595: checking if the POSIX test-macros are already defined" >&5
9596 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9597 if test "${cf_cv_posix_visible+set}" = set; then
9598   echo $ECHO_N "(cached) $ECHO_C" >&6
9599 else
9600
9601 cat >"conftest.$ac_ext" <<_ACEOF
9602 #line 9602 "configure"
9603 #include "confdefs.h"
9604 #include <stdio.h>
9605 int
9606 main (void)
9607 {
9608
9609 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9610         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9611         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9612         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9613 #error conflicting symbols found
9614 #endif
9615
9616   ;
9617   return 0;
9618 }
9619 _ACEOF
9620 rm -f "conftest.$ac_objext"
9621 if { (eval echo "$as_me:9621: \"$ac_compile\"") >&5
9622   (eval $ac_compile) 2>&5
9623   ac_status=$?
9624   echo "$as_me:9624: \$? = $ac_status" >&5
9625   (exit "$ac_status"); } &&
9626          { ac_try='test -s "conftest.$ac_objext"'
9627   { (eval echo "$as_me:9627: \"$ac_try\"") >&5
9628   (eval $ac_try) 2>&5
9629   ac_status=$?
9630   echo "$as_me:9630: \$? = $ac_status" >&5
9631   (exit "$ac_status"); }; }; then
9632   cf_cv_posix_visible=no
9633 else
9634   echo "$as_me: failed program was:" >&5
9635 cat "conftest.$ac_ext" >&5
9636 cf_cv_posix_visible=yes
9637 fi
9638 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9639
9640 fi
9641 echo "$as_me:9641: result: $cf_cv_posix_visible" >&5
9642 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9643
9644 if test "$cf_cv_posix_visible" = no; then
9645
9646 cf_XOPEN_SOURCE=600
9647 cf_POSIX_C_SOURCE=199506L
9648 cf_xopen_source=
9649
9650 case "$host_os" in
9651 (aix[4-7]*)
9652         cf_xopen_source="-D_ALL_SOURCE"
9653         ;;
9654 (msys)
9655         cf_XOPEN_SOURCE=600
9656         ;;
9657 (darwin[0-8].*)
9658         cf_xopen_source="-D_APPLE_C_SOURCE"
9659         ;;
9660 (darwin*)
9661         cf_xopen_source="-D_DARWIN_C_SOURCE"
9662         cf_XOPEN_SOURCE=
9663         ;;
9664 (freebsd*|dragonfly*|midnightbsd*)
9665         # 5.x headers associate
9666         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9667         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9668         cf_POSIX_C_SOURCE=200112L
9669         cf_XOPEN_SOURCE=600
9670         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9671         ;;
9672 (hpux11*)
9673         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9674         ;;
9675 (hpux*)
9676         cf_xopen_source="-D_HPUX_SOURCE"
9677         ;;
9678 (irix[56].*)
9679         cf_xopen_source="-D_SGI_SOURCE"
9680         cf_XOPEN_SOURCE=
9681         ;;
9682 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9683
9684 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9685
9686 echo "$as_me:9686: checking if this is the GNU C library" >&5
9687 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9688 if test "${cf_cv_gnu_library+set}" = set; then
9689   echo $ECHO_N "(cached) $ECHO_C" >&6
9690 else
9691
9692 cat >"conftest.$ac_ext" <<_ACEOF
9693 #line 9693 "configure"
9694 #include "confdefs.h"
9695 #include <sys/types.h>
9696 int
9697 main (void)
9698 {
9699
9700         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9701                 return 0;
9702         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9703                 return 0;
9704         #else
9705         #       error not GNU C library
9706         #endif
9707   ;
9708   return 0;
9709 }
9710 _ACEOF
9711 rm -f "conftest.$ac_objext"
9712 if { (eval echo "$as_me:9712: \"$ac_compile\"") >&5
9713   (eval $ac_compile) 2>&5
9714   ac_status=$?
9715   echo "$as_me:9715: \$? = $ac_status" >&5
9716   (exit "$ac_status"); } &&
9717          { ac_try='test -s "conftest.$ac_objext"'
9718   { (eval echo "$as_me:9718: \"$ac_try\"") >&5
9719   (eval $ac_try) 2>&5
9720   ac_status=$?
9721   echo "$as_me:9721: \$? = $ac_status" >&5
9722   (exit "$ac_status"); }; }; then
9723   cf_cv_gnu_library=yes
9724 else
9725   echo "$as_me: failed program was:" >&5
9726 cat "conftest.$ac_ext" >&5
9727 cf_cv_gnu_library=no
9728 fi
9729 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9730
9731 fi
9732 echo "$as_me:9732: result: $cf_cv_gnu_library" >&5
9733 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9734
9735 if test x$cf_cv_gnu_library = xyes; then
9736
9737         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9738         # was changed to help a little.  newlib incorporated the change about 4
9739         # years later.
9740         echo "$as_me:9740: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9741 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9742 if test "${cf_cv_gnu_library_219+set}" = set; then
9743   echo $ECHO_N "(cached) $ECHO_C" >&6
9744 else
9745
9746                 cf_save="$CPPFLAGS"
9747
9748         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9749         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9750
9751                 cat >"conftest.$ac_ext" <<_ACEOF
9752 #line 9752 "configure"
9753 #include "confdefs.h"
9754 #include <sys/types.h>
9755 int
9756 main (void)
9757 {
9758
9759                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9760                                 return 0;
9761                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9762                                 return 0;
9763                         #else
9764                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9765                         #endif
9766   ;
9767   return 0;
9768 }
9769 _ACEOF
9770 rm -f "conftest.$ac_objext"
9771 if { (eval echo "$as_me:9771: \"$ac_compile\"") >&5
9772   (eval $ac_compile) 2>&5
9773   ac_status=$?
9774   echo "$as_me:9774: \$? = $ac_status" >&5
9775   (exit "$ac_status"); } &&
9776          { ac_try='test -s "conftest.$ac_objext"'
9777   { (eval echo "$as_me:9777: \"$ac_try\"") >&5
9778   (eval $ac_try) 2>&5
9779   ac_status=$?
9780   echo "$as_me:9780: \$? = $ac_status" >&5
9781   (exit "$ac_status"); }; }; then
9782   cf_cv_gnu_library_219=yes
9783 else
9784   echo "$as_me: failed program was:" >&5
9785 cat "conftest.$ac_ext" >&5
9786 cf_cv_gnu_library_219=no
9787 fi
9788 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9789                 CPPFLAGS="$cf_save"
9790
9791 fi
9792 echo "$as_me:9792: result: $cf_cv_gnu_library_219" >&5
9793 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9794
9795         if test "x$cf_cv_gnu_library_219" = xyes; then
9796                 cf_save="$CPPFLAGS"
9797                 echo "$as_me:9797: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9798 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9799 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9800   echo $ECHO_N "(cached) $ECHO_C" >&6
9801 else
9802
9803 cf_fix_cppflags=no
9804 cf_new_cflags=
9805 cf_new_cppflags=
9806 cf_new_extra_cppflags=
9807
9808 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9809 do
9810 case "$cf_fix_cppflags" in
9811 (no)
9812         case "$cf_add_cflags" in
9813         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9814                 case "$cf_add_cflags" in
9815                 (-D*)
9816                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9817
9818                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9819                                 && test -z "${cf_tst_cflags}" \
9820                                 && cf_fix_cppflags=yes
9821
9822                         if test "$cf_fix_cppflags" = yes ; then
9823
9824         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9825         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9826
9827                                 continue
9828                         elif test "${cf_tst_cflags}" = "\"'" ; then
9829
9830         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9831         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9832
9833                                 continue
9834                         fi
9835                         ;;
9836                 esac
9837                 case "$CPPFLAGS" in
9838                 (*$cf_add_cflags)
9839                         ;;
9840                 (*)
9841                         case "$cf_add_cflags" in
9842                         (-D*)
9843                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9844
9845 CPPFLAGS=`echo "$CPPFLAGS" | \
9846         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9847                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9848
9849                                 ;;
9850                         esac
9851
9852         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9853         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9854
9855                         ;;
9856                 esac
9857                 ;;
9858         (*)
9859
9860         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9861         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9862
9863                 ;;
9864         esac
9865         ;;
9866 (yes)
9867
9868         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9869         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9870
9871         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9872
9873         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9874                 && test -z "${cf_tst_cflags}" \
9875                 && cf_fix_cppflags=no
9876         ;;
9877 esac
9878 done
9879
9880 if test -n "$cf_new_cflags" ; then
9881
9882         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9883         CFLAGS="${CFLAGS}$cf_new_cflags"
9884
9885 fi
9886
9887 if test -n "$cf_new_cppflags" ; then
9888
9889         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9890         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9891
9892 fi
9893
9894 if test -n "$cf_new_extra_cppflags" ; then
9895
9896         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9897         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9898
9899 fi
9900
9901                         cat >"conftest.$ac_ext" <<_ACEOF
9902 #line 9902 "configure"
9903 #include "confdefs.h"
9904
9905                                 #include <limits.h>
9906                                 #include <sys/types.h>
9907
9908 int
9909 main (void)
9910 {
9911
9912                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9913                                         return 0;
9914                                 #else
9915                                 #       error GNU C library is too old
9916                                 #endif
9917   ;
9918   return 0;
9919 }
9920 _ACEOF
9921 rm -f "conftest.$ac_objext"
9922 if { (eval echo "$as_me:9922: \"$ac_compile\"") >&5
9923   (eval $ac_compile) 2>&5
9924   ac_status=$?
9925   echo "$as_me:9925: \$? = $ac_status" >&5
9926   (exit "$ac_status"); } &&
9927          { ac_try='test -s "conftest.$ac_objext"'
9928   { (eval echo "$as_me:9928: \"$ac_try\"") >&5
9929   (eval $ac_try) 2>&5
9930   ac_status=$?
9931   echo "$as_me:9931: \$? = $ac_status" >&5
9932   (exit "$ac_status"); }; }; then
9933   cf_cv_gnu_dftsrc_219=yes
9934 else
9935   echo "$as_me: failed program was:" >&5
9936 cat "conftest.$ac_ext" >&5
9937 cf_cv_gnu_dftsrc_219=no
9938 fi
9939 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9940
9941 fi
9942 echo "$as_me:9942: result: $cf_cv_gnu_dftsrc_219" >&5
9943 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9944                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9945         else
9946                 cf_cv_gnu_dftsrc_219=maybe
9947         fi
9948
9949         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9950
9951                 echo "$as_me:9951: checking if we must define _GNU_SOURCE" >&5
9952 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9953 if test "${cf_cv_gnu_source+set}" = set; then
9954   echo $ECHO_N "(cached) $ECHO_C" >&6
9955 else
9956
9957                 cat >"conftest.$ac_ext" <<_ACEOF
9958 #line 9958 "configure"
9959 #include "confdefs.h"
9960 #include <sys/types.h>
9961 int
9962 main (void)
9963 {
9964
9965                         #ifndef _XOPEN_SOURCE
9966                         #error  expected _XOPEN_SOURCE to be defined
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_source=no
9985 else
9986   echo "$as_me: failed program was:" >&5
9987 cat "conftest.$ac_ext" >&5
9988 cf_save="$CPPFLAGS"
9989
9990 cf_fix_cppflags=no
9991 cf_new_cflags=
9992 cf_new_cppflags=
9993 cf_new_extra_cppflags=
9994
9995 for cf_add_cflags in -D_GNU_SOURCE
9996 do
9997 case "$cf_fix_cppflags" in
9998 (no)
9999         case "$cf_add_cflags" in
10000         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10001                 case "$cf_add_cflags" in
10002                 (-D*)
10003                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10004
10005                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10006                                 && test -z "${cf_tst_cflags}" \
10007                                 && cf_fix_cppflags=yes
10008
10009                         if test "$cf_fix_cppflags" = yes ; then
10010
10011         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10012         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10013
10014                                 continue
10015                         elif test "${cf_tst_cflags}" = "\"'" ; then
10016
10017         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10018         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10019
10020                                 continue
10021                         fi
10022                         ;;
10023                 esac
10024                 case "$CPPFLAGS" in
10025                 (*$cf_add_cflags)
10026                         ;;
10027                 (*)
10028                         case "$cf_add_cflags" in
10029                         (-D*)
10030                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10031
10032 CPPFLAGS=`echo "$CPPFLAGS" | \
10033         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10034                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10035
10036                                 ;;
10037                         esac
10038
10039         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10040         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10041
10042                         ;;
10043                 esac
10044                 ;;
10045         (*)
10046
10047         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10048         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10049
10050                 ;;
10051         esac
10052         ;;
10053 (yes)
10054
10055         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10056         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10057
10058         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10059
10060         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10061                 && test -z "${cf_tst_cflags}" \
10062                 && cf_fix_cppflags=no
10063         ;;
10064 esac
10065 done
10066
10067 if test -n "$cf_new_cflags" ; then
10068
10069         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10070         CFLAGS="${CFLAGS}$cf_new_cflags"
10071
10072 fi
10073
10074 if test -n "$cf_new_cppflags" ; then
10075
10076         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10077         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10078
10079 fi
10080
10081 if test -n "$cf_new_extra_cppflags" ; then
10082
10083         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10084         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10085
10086 fi
10087
10088                          cat >"conftest.$ac_ext" <<_ACEOF
10089 #line 10089 "configure"
10090 #include "confdefs.h"
10091 #include <sys/types.h>
10092 int
10093 main (void)
10094 {
10095
10096                                 #ifdef _XOPEN_SOURCE
10097                                 #error  expected _XOPEN_SOURCE to be undefined
10098                                 #endif
10099   ;
10100   return 0;
10101 }
10102 _ACEOF
10103 rm -f "conftest.$ac_objext"
10104 if { (eval echo "$as_me:10104: \"$ac_compile\"") >&5
10105   (eval $ac_compile) 2>&5
10106   ac_status=$?
10107   echo "$as_me:10107: \$? = $ac_status" >&5
10108   (exit "$ac_status"); } &&
10109          { ac_try='test -s "conftest.$ac_objext"'
10110   { (eval echo "$as_me:10110: \"$ac_try\"") >&5
10111   (eval $ac_try) 2>&5
10112   ac_status=$?
10113   echo "$as_me:10113: \$? = $ac_status" >&5
10114   (exit "$ac_status"); }; }; then
10115   cf_cv_gnu_source=no
10116 else
10117   echo "$as_me: failed program was:" >&5
10118 cat "conftest.$ac_ext" >&5
10119 cf_cv_gnu_source=yes
10120 fi
10121 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10122                         CPPFLAGS="$cf_save"
10123
10124 fi
10125 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10126
10127 fi
10128 echo "$as_me:10128: result: $cf_cv_gnu_source" >&5
10129 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10130
10131                 if test "$cf_cv_gnu_source" = yes
10132                 then
10133                 echo "$as_me:10133: checking if we should also define _DEFAULT_SOURCE" >&5
10134 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10135 if test "${cf_cv_default_source+set}" = set; then
10136   echo $ECHO_N "(cached) $ECHO_C" >&6
10137 else
10138
10139         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10140         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10141
10142                         cat >"conftest.$ac_ext" <<_ACEOF
10143 #line 10143 "configure"
10144 #include "confdefs.h"
10145 #include <sys/types.h>
10146 int
10147 main (void)
10148 {
10149
10150                                 #ifdef _DEFAULT_SOURCE
10151                                 #error  expected _DEFAULT_SOURCE to be undefined
10152                                 #endif
10153   ;
10154   return 0;
10155 }
10156 _ACEOF
10157 rm -f "conftest.$ac_objext"
10158 if { (eval echo "$as_me:10158: \"$ac_compile\"") >&5
10159   (eval $ac_compile) 2>&5
10160   ac_status=$?
10161   echo "$as_me:10161: \$? = $ac_status" >&5
10162   (exit "$ac_status"); } &&
10163          { ac_try='test -s "conftest.$ac_objext"'
10164   { (eval echo "$as_me:10164: \"$ac_try\"") >&5
10165   (eval $ac_try) 2>&5
10166   ac_status=$?
10167   echo "$as_me:10167: \$? = $ac_status" >&5
10168   (exit "$ac_status"); }; }; then
10169   cf_cv_default_source=no
10170 else
10171   echo "$as_me: failed program was:" >&5
10172 cat "conftest.$ac_ext" >&5
10173 cf_cv_default_source=yes
10174 fi
10175 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10176
10177 fi
10178 echo "$as_me:10178: result: $cf_cv_default_source" >&5
10179 echo "${ECHO_T}$cf_cv_default_source" >&6
10180                         if test "$cf_cv_default_source" = yes
10181                         then
10182
10183         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10184         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10185
10186                         fi
10187                 fi
10188         fi
10189
10190 fi
10191
10192         ;;
10193 (minix*)
10194         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10195         ;;
10196 (mirbsd*)
10197         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10198         cf_XOPEN_SOURCE=
10199
10200 if test "$cf_cv_posix_visible" = no; then
10201
10202 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10203
10204 cf_save_CFLAGS="$CFLAGS"
10205 cf_save_CPPFLAGS="$CPPFLAGS"
10206
10207 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10208         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10209                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10210
10211 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10212         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10213                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10214
10215 echo "$as_me:10215: checking if we should define _POSIX_C_SOURCE" >&5
10216 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10217 if test "${cf_cv_posix_c_source+set}" = set; then
10218   echo $ECHO_N "(cached) $ECHO_C" >&6
10219 else
10220
10221 echo "${as_me:-configure}:10221: testing if the symbol is already defined go no further ..." 1>&5
10222
10223         cat >"conftest.$ac_ext" <<_ACEOF
10224 #line 10224 "configure"
10225 #include "confdefs.h"
10226 #include <sys/types.h>
10227 int
10228 main (void)
10229 {
10230
10231 #ifndef _POSIX_C_SOURCE
10232 make an error
10233 #endif
10234   ;
10235   return 0;
10236 }
10237 _ACEOF
10238 rm -f "conftest.$ac_objext"
10239 if { (eval echo "$as_me:10239: \"$ac_compile\"") >&5
10240   (eval $ac_compile) 2>&5
10241   ac_status=$?
10242   echo "$as_me:10242: \$? = $ac_status" >&5
10243   (exit "$ac_status"); } &&
10244          { ac_try='test -s "conftest.$ac_objext"'
10245   { (eval echo "$as_me:10245: \"$ac_try\"") >&5
10246   (eval $ac_try) 2>&5
10247   ac_status=$?
10248   echo "$as_me:10248: \$? = $ac_status" >&5
10249   (exit "$ac_status"); }; }; then
10250   cf_cv_posix_c_source=no
10251 else
10252   echo "$as_me: failed program was:" >&5
10253 cat "conftest.$ac_ext" >&5
10254 cf_want_posix_source=no
10255          case .$cf_POSIX_C_SOURCE in
10256          (.[12]??*)
10257                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10258                 ;;
10259          (.2)
10260                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10261                 cf_want_posix_source=yes
10262                 ;;
10263          (.*)
10264                 cf_want_posix_source=yes
10265                 ;;
10266          esac
10267          if test "$cf_want_posix_source" = yes ; then
10268                 cat >"conftest.$ac_ext" <<_ACEOF
10269 #line 10269 "configure"
10270 #include "confdefs.h"
10271 #include <sys/types.h>
10272 int
10273 main (void)
10274 {
10275
10276 #ifdef _POSIX_SOURCE
10277 make an error
10278 #endif
10279   ;
10280   return 0;
10281 }
10282 _ACEOF
10283 rm -f "conftest.$ac_objext"
10284 if { (eval echo "$as_me:10284: \"$ac_compile\"") >&5
10285   (eval $ac_compile) 2>&5
10286   ac_status=$?
10287   echo "$as_me:10287: \$? = $ac_status" >&5
10288   (exit "$ac_status"); } &&
10289          { ac_try='test -s "conftest.$ac_objext"'
10290   { (eval echo "$as_me:10290: \"$ac_try\"") >&5
10291   (eval $ac_try) 2>&5
10292   ac_status=$?
10293   echo "$as_me:10293: \$? = $ac_status" >&5
10294   (exit "$ac_status"); }; }; then
10295   :
10296 else
10297   echo "$as_me: failed program was:" >&5
10298 cat "conftest.$ac_ext" >&5
10299 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10300 fi
10301 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10302          fi
10303
10304 echo "${as_me:-configure}:10304: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10305
10306          CFLAGS="$cf_trim_CFLAGS"
10307          CPPFLAGS="$cf_trim_CPPFLAGS"
10308
10309         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10310         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10311
10312 echo "${as_me:-configure}:10312: testing if the second compile does not leave our definition intact error ..." 1>&5
10313
10314          cat >"conftest.$ac_ext" <<_ACEOF
10315 #line 10315 "configure"
10316 #include "confdefs.h"
10317 #include <sys/types.h>
10318 int
10319 main (void)
10320 {
10321
10322 #ifndef _POSIX_C_SOURCE
10323 make an error
10324 #endif
10325   ;
10326   return 0;
10327 }
10328 _ACEOF
10329 rm -f "conftest.$ac_objext"
10330 if { (eval echo "$as_me:10330: \"$ac_compile\"") >&5
10331   (eval $ac_compile) 2>&5
10332   ac_status=$?
10333   echo "$as_me:10333: \$? = $ac_status" >&5
10334   (exit "$ac_status"); } &&
10335          { ac_try='test -s "conftest.$ac_objext"'
10336   { (eval echo "$as_me:10336: \"$ac_try\"") >&5
10337   (eval $ac_try) 2>&5
10338   ac_status=$?
10339   echo "$as_me:10339: \$? = $ac_status" >&5
10340   (exit "$ac_status"); }; }; then
10341   :
10342 else
10343   echo "$as_me: failed program was:" >&5
10344 cat "conftest.$ac_ext" >&5
10345 cf_cv_posix_c_source=no
10346 fi
10347 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10348          CFLAGS="$cf_save_CFLAGS"
10349          CPPFLAGS="$cf_save_CPPFLAGS"
10350
10351 fi
10352 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10353
10354 fi
10355 echo "$as_me:10355: result: $cf_cv_posix_c_source" >&5
10356 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10357
10358 if test "$cf_cv_posix_c_source" != no ; then
10359         CFLAGS="$cf_trim_CFLAGS"
10360         CPPFLAGS="$cf_trim_CPPFLAGS"
10361
10362 cf_fix_cppflags=no
10363 cf_new_cflags=
10364 cf_new_cppflags=
10365 cf_new_extra_cppflags=
10366
10367 for cf_add_cflags in $cf_cv_posix_c_source
10368 do
10369 case "$cf_fix_cppflags" in
10370 (no)
10371         case "$cf_add_cflags" in
10372         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10373                 case "$cf_add_cflags" in
10374                 (-D*)
10375                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10376
10377                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10378                                 && test -z "${cf_tst_cflags}" \
10379                                 && cf_fix_cppflags=yes
10380
10381                         if test "$cf_fix_cppflags" = yes ; then
10382
10383         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10384         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10385
10386                                 continue
10387                         elif test "${cf_tst_cflags}" = "\"'" ; then
10388
10389         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10390         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10391
10392                                 continue
10393                         fi
10394                         ;;
10395                 esac
10396                 case "$CPPFLAGS" in
10397                 (*$cf_add_cflags)
10398                         ;;
10399                 (*)
10400                         case "$cf_add_cflags" in
10401                         (-D*)
10402                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10403
10404 CPPFLAGS=`echo "$CPPFLAGS" | \
10405         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10406                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10407
10408                                 ;;
10409                         esac
10410
10411         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10412         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10413
10414                         ;;
10415                 esac
10416                 ;;
10417         (*)
10418
10419         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10420         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10421
10422                 ;;
10423         esac
10424         ;;
10425 (yes)
10426
10427         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10428         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10429
10430         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10431
10432         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10433                 && test -z "${cf_tst_cflags}" \
10434                 && cf_fix_cppflags=no
10435         ;;
10436 esac
10437 done
10438
10439 if test -n "$cf_new_cflags" ; then
10440
10441         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10442         CFLAGS="${CFLAGS}$cf_new_cflags"
10443
10444 fi
10445
10446 if test -n "$cf_new_cppflags" ; then
10447
10448         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10449         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10450
10451 fi
10452
10453 if test -n "$cf_new_extra_cppflags" ; then
10454
10455         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10456         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10457
10458 fi
10459
10460 fi
10461
10462 fi # cf_cv_posix_visible
10463
10464         ;;
10465 (netbsd*)
10466         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10467         ;;
10468 (openbsd[4-9]*)
10469         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10470         cf_xopen_source="-D_BSD_SOURCE"
10471         cf_XOPEN_SOURCE=600
10472         ;;
10473 (openbsd*)
10474         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10475         ;;
10476 (osf[45]*)
10477         cf_xopen_source="-D_OSF_SOURCE"
10478         ;;
10479 (nto-qnx*)
10480         cf_xopen_source="-D_QNX_SOURCE"
10481         ;;
10482 (sco*)
10483         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10484         ;;
10485 (solaris2.*)
10486         cf_xopen_source="-D__EXTENSIONS__"
10487         cf_cv_xopen_source=broken
10488         ;;
10489 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10490         cf_XOPEN_SOURCE=
10491         cf_POSIX_C_SOURCE=
10492         ;;
10493 (*)
10494
10495 echo "$as_me:10495: checking if we should define _XOPEN_SOURCE" >&5
10496 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10497 if test "${cf_cv_xopen_source+set}" = set; then
10498   echo $ECHO_N "(cached) $ECHO_C" >&6
10499 else
10500
10501         cat >"conftest.$ac_ext" <<_ACEOF
10502 #line 10502 "configure"
10503 #include "confdefs.h"
10504
10505 #include <stdlib.h>
10506 #include <string.h>
10507 #include <sys/types.h>
10508
10509 int
10510 main (void)
10511 {
10512
10513 #ifndef _XOPEN_SOURCE
10514 make an error
10515 #endif
10516   ;
10517   return 0;
10518 }
10519 _ACEOF
10520 rm -f "conftest.$ac_objext"
10521 if { (eval echo "$as_me:10521: \"$ac_compile\"") >&5
10522   (eval $ac_compile) 2>&5
10523   ac_status=$?
10524   echo "$as_me:10524: \$? = $ac_status" >&5
10525   (exit "$ac_status"); } &&
10526          { ac_try='test -s "conftest.$ac_objext"'
10527   { (eval echo "$as_me:10527: \"$ac_try\"") >&5
10528   (eval $ac_try) 2>&5
10529   ac_status=$?
10530   echo "$as_me:10530: \$? = $ac_status" >&5
10531   (exit "$ac_status"); }; }; then
10532   cf_cv_xopen_source=no
10533 else
10534   echo "$as_me: failed program was:" >&5
10535 cat "conftest.$ac_ext" >&5
10536 cf_save="$CPPFLAGS"
10537
10538         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10539         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10540
10541          cat >"conftest.$ac_ext" <<_ACEOF
10542 #line 10542 "configure"
10543 #include "confdefs.h"
10544
10545 #include <stdlib.h>
10546 #include <string.h>
10547 #include <sys/types.h>
10548
10549 int
10550 main (void)
10551 {
10552
10553 #ifdef _XOPEN_SOURCE
10554 make an error
10555 #endif
10556   ;
10557   return 0;
10558 }
10559 _ACEOF
10560 rm -f "conftest.$ac_objext"
10561 if { (eval echo "$as_me:10561: \"$ac_compile\"") >&5
10562   (eval $ac_compile) 2>&5
10563   ac_status=$?
10564   echo "$as_me:10564: \$? = $ac_status" >&5
10565   (exit "$ac_status"); } &&
10566          { ac_try='test -s "conftest.$ac_objext"'
10567   { (eval echo "$as_me:10567: \"$ac_try\"") >&5
10568   (eval $ac_try) 2>&5
10569   ac_status=$?
10570   echo "$as_me:10570: \$? = $ac_status" >&5
10571   (exit "$ac_status"); }; }; then
10572   cf_cv_xopen_source=no
10573 else
10574   echo "$as_me: failed program was:" >&5
10575 cat "conftest.$ac_ext" >&5
10576 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10577 fi
10578 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10579         CPPFLAGS="$cf_save"
10580
10581 fi
10582 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10583
10584 fi
10585 echo "$as_me:10585: result: $cf_cv_xopen_source" >&5
10586 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10587
10588 if test "$cf_cv_xopen_source" != no ; then
10589
10590 CFLAGS=`echo "$CFLAGS" | \
10591         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10592                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10593
10594 CPPFLAGS=`echo "$CPPFLAGS" | \
10595         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10596                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10597
10598         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10599
10600 cf_fix_cppflags=no
10601 cf_new_cflags=
10602 cf_new_cppflags=
10603 cf_new_extra_cppflags=
10604
10605 for cf_add_cflags in $cf_temp_xopen_source
10606 do
10607 case "$cf_fix_cppflags" in
10608 (no)
10609         case "$cf_add_cflags" in
10610         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10611                 case "$cf_add_cflags" in
10612                 (-D*)
10613                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10614
10615                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10616                                 && test -z "${cf_tst_cflags}" \
10617                                 && cf_fix_cppflags=yes
10618
10619                         if test "$cf_fix_cppflags" = yes ; then
10620
10621         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10622         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10623
10624                                 continue
10625                         elif test "${cf_tst_cflags}" = "\"'" ; then
10626
10627         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10628         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10629
10630                                 continue
10631                         fi
10632                         ;;
10633                 esac
10634                 case "$CPPFLAGS" in
10635                 (*$cf_add_cflags)
10636                         ;;
10637                 (*)
10638                         case "$cf_add_cflags" in
10639                         (-D*)
10640                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10641
10642 CPPFLAGS=`echo "$CPPFLAGS" | \
10643         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10644                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10645
10646                                 ;;
10647                         esac
10648
10649         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10650         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10651
10652                         ;;
10653                 esac
10654                 ;;
10655         (*)
10656
10657         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10658         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10659
10660                 ;;
10661         esac
10662         ;;
10663 (yes)
10664
10665         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10666         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10667
10668         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10669
10670         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10671                 && test -z "${cf_tst_cflags}" \
10672                 && cf_fix_cppflags=no
10673         ;;
10674 esac
10675 done
10676
10677 if test -n "$cf_new_cflags" ; then
10678
10679         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10680         CFLAGS="${CFLAGS}$cf_new_cflags"
10681
10682 fi
10683
10684 if test -n "$cf_new_cppflags" ; then
10685
10686         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10687         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10688
10689 fi
10690
10691 if test -n "$cf_new_extra_cppflags" ; then
10692
10693         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10694         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10695
10696 fi
10697
10698 fi
10699
10700 if test "$cf_cv_posix_visible" = no; then
10701
10702 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10703
10704 cf_save_CFLAGS="$CFLAGS"
10705 cf_save_CPPFLAGS="$CPPFLAGS"
10706
10707 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10708         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10709                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10710
10711 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10712         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10713                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10714
10715 echo "$as_me:10715: checking if we should define _POSIX_C_SOURCE" >&5
10716 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10717 if test "${cf_cv_posix_c_source+set}" = set; then
10718   echo $ECHO_N "(cached) $ECHO_C" >&6
10719 else
10720
10721 echo "${as_me:-configure}:10721: testing if the symbol is already defined go no further ..." 1>&5
10722
10723         cat >"conftest.$ac_ext" <<_ACEOF
10724 #line 10724 "configure"
10725 #include "confdefs.h"
10726 #include <sys/types.h>
10727 int
10728 main (void)
10729 {
10730
10731 #ifndef _POSIX_C_SOURCE
10732 make an error
10733 #endif
10734   ;
10735   return 0;
10736 }
10737 _ACEOF
10738 rm -f "conftest.$ac_objext"
10739 if { (eval echo "$as_me:10739: \"$ac_compile\"") >&5
10740   (eval $ac_compile) 2>&5
10741   ac_status=$?
10742   echo "$as_me:10742: \$? = $ac_status" >&5
10743   (exit "$ac_status"); } &&
10744          { ac_try='test -s "conftest.$ac_objext"'
10745   { (eval echo "$as_me:10745: \"$ac_try\"") >&5
10746   (eval $ac_try) 2>&5
10747   ac_status=$?
10748   echo "$as_me:10748: \$? = $ac_status" >&5
10749   (exit "$ac_status"); }; }; then
10750   cf_cv_posix_c_source=no
10751 else
10752   echo "$as_me: failed program was:" >&5
10753 cat "conftest.$ac_ext" >&5
10754 cf_want_posix_source=no
10755          case .$cf_POSIX_C_SOURCE in
10756          (.[12]??*)
10757                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10758                 ;;
10759          (.2)
10760                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10761                 cf_want_posix_source=yes
10762                 ;;
10763          (.*)
10764                 cf_want_posix_source=yes
10765                 ;;
10766          esac
10767          if test "$cf_want_posix_source" = yes ; then
10768                 cat >"conftest.$ac_ext" <<_ACEOF
10769 #line 10769 "configure"
10770 #include "confdefs.h"
10771 #include <sys/types.h>
10772 int
10773 main (void)
10774 {
10775
10776 #ifdef _POSIX_SOURCE
10777 make an error
10778 #endif
10779   ;
10780   return 0;
10781 }
10782 _ACEOF
10783 rm -f "conftest.$ac_objext"
10784 if { (eval echo "$as_me:10784: \"$ac_compile\"") >&5
10785   (eval $ac_compile) 2>&5
10786   ac_status=$?
10787   echo "$as_me:10787: \$? = $ac_status" >&5
10788   (exit "$ac_status"); } &&
10789          { ac_try='test -s "conftest.$ac_objext"'
10790   { (eval echo "$as_me:10790: \"$ac_try\"") >&5
10791   (eval $ac_try) 2>&5
10792   ac_status=$?
10793   echo "$as_me:10793: \$? = $ac_status" >&5
10794   (exit "$ac_status"); }; }; then
10795   :
10796 else
10797   echo "$as_me: failed program was:" >&5
10798 cat "conftest.$ac_ext" >&5
10799 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10800 fi
10801 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10802          fi
10803
10804 echo "${as_me:-configure}:10804: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10805
10806          CFLAGS="$cf_trim_CFLAGS"
10807          CPPFLAGS="$cf_trim_CPPFLAGS"
10808
10809         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10810         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10811
10812 echo "${as_me:-configure}:10812: testing if the second compile does not leave our definition intact error ..." 1>&5
10813
10814          cat >"conftest.$ac_ext" <<_ACEOF
10815 #line 10815 "configure"
10816 #include "confdefs.h"
10817 #include <sys/types.h>
10818 int
10819 main (void)
10820 {
10821
10822 #ifndef _POSIX_C_SOURCE
10823 make an error
10824 #endif
10825   ;
10826   return 0;
10827 }
10828 _ACEOF
10829 rm -f "conftest.$ac_objext"
10830 if { (eval echo "$as_me:10830: \"$ac_compile\"") >&5
10831   (eval $ac_compile) 2>&5
10832   ac_status=$?
10833   echo "$as_me:10833: \$? = $ac_status" >&5
10834   (exit "$ac_status"); } &&
10835          { ac_try='test -s "conftest.$ac_objext"'
10836   { (eval echo "$as_me:10836: \"$ac_try\"") >&5
10837   (eval $ac_try) 2>&5
10838   ac_status=$?
10839   echo "$as_me:10839: \$? = $ac_status" >&5
10840   (exit "$ac_status"); }; }; then
10841   :
10842 else
10843   echo "$as_me: failed program was:" >&5
10844 cat "conftest.$ac_ext" >&5
10845 cf_cv_posix_c_source=no
10846 fi
10847 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10848          CFLAGS="$cf_save_CFLAGS"
10849          CPPFLAGS="$cf_save_CPPFLAGS"
10850
10851 fi
10852 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10853
10854 fi
10855 echo "$as_me:10855: result: $cf_cv_posix_c_source" >&5
10856 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10857
10858 if test "$cf_cv_posix_c_source" != no ; then
10859         CFLAGS="$cf_trim_CFLAGS"
10860         CPPFLAGS="$cf_trim_CPPFLAGS"
10861
10862 cf_fix_cppflags=no
10863 cf_new_cflags=
10864 cf_new_cppflags=
10865 cf_new_extra_cppflags=
10866
10867 for cf_add_cflags in $cf_cv_posix_c_source
10868 do
10869 case "$cf_fix_cppflags" in
10870 (no)
10871         case "$cf_add_cflags" in
10872         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10873                 case "$cf_add_cflags" in
10874                 (-D*)
10875                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10876
10877                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10878                                 && test -z "${cf_tst_cflags}" \
10879                                 && cf_fix_cppflags=yes
10880
10881                         if test "$cf_fix_cppflags" = yes ; then
10882
10883         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10884         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10885
10886                                 continue
10887                         elif test "${cf_tst_cflags}" = "\"'" ; then
10888
10889         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10890         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10891
10892                                 continue
10893                         fi
10894                         ;;
10895                 esac
10896                 case "$CPPFLAGS" in
10897                 (*$cf_add_cflags)
10898                         ;;
10899                 (*)
10900                         case "$cf_add_cflags" in
10901                         (-D*)
10902                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10903
10904 CPPFLAGS=`echo "$CPPFLAGS" | \
10905         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10906                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10907
10908                                 ;;
10909                         esac
10910
10911         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10912         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10913
10914                         ;;
10915                 esac
10916                 ;;
10917         (*)
10918
10919         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10920         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10921
10922                 ;;
10923         esac
10924         ;;
10925 (yes)
10926
10927         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10928         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10929
10930         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10931
10932         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10933                 && test -z "${cf_tst_cflags}" \
10934                 && cf_fix_cppflags=no
10935         ;;
10936 esac
10937 done
10938
10939 if test -n "$cf_new_cflags" ; then
10940
10941         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10942         CFLAGS="${CFLAGS}$cf_new_cflags"
10943
10944 fi
10945
10946 if test -n "$cf_new_cppflags" ; then
10947
10948         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10949         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10950
10951 fi
10952
10953 if test -n "$cf_new_extra_cppflags" ; then
10954
10955         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10956         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10957
10958 fi
10959
10960 fi
10961
10962 fi # cf_cv_posix_visible
10963
10964         ;;
10965 esac
10966
10967 if test -n "$cf_xopen_source" ; then
10968
10969 cf_fix_cppflags=no
10970 cf_new_cflags=
10971 cf_new_cppflags=
10972 cf_new_extra_cppflags=
10973
10974 for cf_add_cflags in $cf_xopen_source
10975 do
10976 case "$cf_fix_cppflags" in
10977 (no)
10978         case "$cf_add_cflags" in
10979         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10980                 case "$cf_add_cflags" in
10981                 (-D*)
10982                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10983
10984                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10985                                 && test -z "${cf_tst_cflags}" \
10986                                 && cf_fix_cppflags=yes
10987
10988                         if test "$cf_fix_cppflags" = yes ; then
10989
10990         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10991         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10992
10993                                 continue
10994                         elif test "${cf_tst_cflags}" = "\"'" ; then
10995
10996         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10997         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10998
10999                                 continue
11000                         fi
11001                         ;;
11002                 esac
11003                 case "$CPPFLAGS" in
11004                 (*$cf_add_cflags)
11005                         ;;
11006                 (*)
11007                         case "$cf_add_cflags" in
11008                         (-D*)
11009                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11010
11011 CPPFLAGS=`echo "$CPPFLAGS" | \
11012         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11013                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11014
11015                                 ;;
11016                         esac
11017
11018         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11019         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11020
11021                         ;;
11022                 esac
11023                 ;;
11024         (*)
11025
11026         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11027         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11028
11029                 ;;
11030         esac
11031         ;;
11032 (yes)
11033
11034         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11035         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11036
11037         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11038
11039         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11040                 && test -z "${cf_tst_cflags}" \
11041                 && cf_fix_cppflags=no
11042         ;;
11043 esac
11044 done
11045
11046 if test -n "$cf_new_cflags" ; then
11047         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11048
11049 echo "${as_me:-configure}:11049: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11050
11051         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11052         CFLAGS="${CFLAGS}$cf_new_cflags"
11053
11054 fi
11055
11056 if test -n "$cf_new_cppflags" ; then
11057         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11058
11059 echo "${as_me:-configure}:11059: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11060
11061         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11062         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11063
11064 fi
11065
11066 if test -n "$cf_new_extra_cppflags" ; then
11067         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11068
11069 echo "${as_me:-configure}:11069: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11070
11071         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11072         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11073
11074 fi
11075
11076 fi
11077
11078 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11079         echo "$as_me:11079: checking if _XOPEN_SOURCE really is set" >&5
11080 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11081         cat >"conftest.$ac_ext" <<_ACEOF
11082 #line 11082 "configure"
11083 #include "confdefs.h"
11084 #include <stdlib.h>
11085 int
11086 main (void)
11087 {
11088
11089 #ifndef _XOPEN_SOURCE
11090 make an error
11091 #endif
11092   ;
11093   return 0;
11094 }
11095 _ACEOF
11096 rm -f "conftest.$ac_objext"
11097 if { (eval echo "$as_me:11097: \"$ac_compile\"") >&5
11098   (eval $ac_compile) 2>&5
11099   ac_status=$?
11100   echo "$as_me:11100: \$? = $ac_status" >&5
11101   (exit "$ac_status"); } &&
11102          { ac_try='test -s "conftest.$ac_objext"'
11103   { (eval echo "$as_me:11103: \"$ac_try\"") >&5
11104   (eval $ac_try) 2>&5
11105   ac_status=$?
11106   echo "$as_me:11106: \$? = $ac_status" >&5
11107   (exit "$ac_status"); }; }; then
11108   cf_XOPEN_SOURCE_set=yes
11109 else
11110   echo "$as_me: failed program was:" >&5
11111 cat "conftest.$ac_ext" >&5
11112 cf_XOPEN_SOURCE_set=no
11113 fi
11114 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11115         echo "$as_me:11115: result: $cf_XOPEN_SOURCE_set" >&5
11116 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11117         if test "$cf_XOPEN_SOURCE_set" = yes
11118         then
11119                 cat >"conftest.$ac_ext" <<_ACEOF
11120 #line 11120 "configure"
11121 #include "confdefs.h"
11122 #include <stdlib.h>
11123 int
11124 main (void)
11125 {
11126
11127 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11128 make an error
11129 #endif
11130   ;
11131   return 0;
11132 }
11133 _ACEOF
11134 rm -f "conftest.$ac_objext"
11135 if { (eval echo "$as_me:11135: \"$ac_compile\"") >&5
11136   (eval $ac_compile) 2>&5
11137   ac_status=$?
11138   echo "$as_me:11138: \$? = $ac_status" >&5
11139   (exit "$ac_status"); } &&
11140          { ac_try='test -s "conftest.$ac_objext"'
11141   { (eval echo "$as_me:11141: \"$ac_try\"") >&5
11142   (eval $ac_try) 2>&5
11143   ac_status=$?
11144   echo "$as_me:11144: \$? = $ac_status" >&5
11145   (exit "$ac_status"); }; }; then
11146   cf_XOPEN_SOURCE_set_ok=yes
11147 else
11148   echo "$as_me: failed program was:" >&5
11149 cat "conftest.$ac_ext" >&5
11150 cf_XOPEN_SOURCE_set_ok=no
11151 fi
11152 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11153                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11154                 then
11155                         { echo "$as_me:11155: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11156 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11157                 fi
11158         else
11159
11160 echo "$as_me:11160: checking if we should define _XOPEN_SOURCE" >&5
11161 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11162 if test "${cf_cv_xopen_source+set}" = set; then
11163   echo $ECHO_N "(cached) $ECHO_C" >&6
11164 else
11165
11166         cat >"conftest.$ac_ext" <<_ACEOF
11167 #line 11167 "configure"
11168 #include "confdefs.h"
11169
11170 #include <stdlib.h>
11171 #include <string.h>
11172 #include <sys/types.h>
11173
11174 int
11175 main (void)
11176 {
11177
11178 #ifndef _XOPEN_SOURCE
11179 make an error
11180 #endif
11181   ;
11182   return 0;
11183 }
11184 _ACEOF
11185 rm -f "conftest.$ac_objext"
11186 if { (eval echo "$as_me:11186: \"$ac_compile\"") >&5
11187   (eval $ac_compile) 2>&5
11188   ac_status=$?
11189   echo "$as_me:11189: \$? = $ac_status" >&5
11190   (exit "$ac_status"); } &&
11191          { ac_try='test -s "conftest.$ac_objext"'
11192   { (eval echo "$as_me:11192: \"$ac_try\"") >&5
11193   (eval $ac_try) 2>&5
11194   ac_status=$?
11195   echo "$as_me:11195: \$? = $ac_status" >&5
11196   (exit "$ac_status"); }; }; then
11197   cf_cv_xopen_source=no
11198 else
11199   echo "$as_me: failed program was:" >&5
11200 cat "conftest.$ac_ext" >&5
11201 cf_save="$CPPFLAGS"
11202
11203         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11204         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11205
11206          cat >"conftest.$ac_ext" <<_ACEOF
11207 #line 11207 "configure"
11208 #include "confdefs.h"
11209
11210 #include <stdlib.h>
11211 #include <string.h>
11212 #include <sys/types.h>
11213
11214 int
11215 main (void)
11216 {
11217
11218 #ifdef _XOPEN_SOURCE
11219 make an error
11220 #endif
11221   ;
11222   return 0;
11223 }
11224 _ACEOF
11225 rm -f "conftest.$ac_objext"
11226 if { (eval echo "$as_me:11226: \"$ac_compile\"") >&5
11227   (eval $ac_compile) 2>&5
11228   ac_status=$?
11229   echo "$as_me:11229: \$? = $ac_status" >&5
11230   (exit "$ac_status"); } &&
11231          { ac_try='test -s "conftest.$ac_objext"'
11232   { (eval echo "$as_me:11232: \"$ac_try\"") >&5
11233   (eval $ac_try) 2>&5
11234   ac_status=$?
11235   echo "$as_me:11235: \$? = $ac_status" >&5
11236   (exit "$ac_status"); }; }; then
11237   cf_cv_xopen_source=no
11238 else
11239   echo "$as_me: failed program was:" >&5
11240 cat "conftest.$ac_ext" >&5
11241 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11242 fi
11243 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11244         CPPFLAGS="$cf_save"
11245
11246 fi
11247 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11248
11249 fi
11250 echo "$as_me:11250: result: $cf_cv_xopen_source" >&5
11251 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11252
11253 if test "$cf_cv_xopen_source" != no ; then
11254
11255 CFLAGS=`echo "$CFLAGS" | \
11256         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11257                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11258
11259 CPPFLAGS=`echo "$CPPFLAGS" | \
11260         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11261                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11262
11263         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11264
11265 cf_fix_cppflags=no
11266 cf_new_cflags=
11267 cf_new_cppflags=
11268 cf_new_extra_cppflags=
11269
11270 for cf_add_cflags in $cf_temp_xopen_source
11271 do
11272 case "$cf_fix_cppflags" in
11273 (no)
11274         case "$cf_add_cflags" in
11275         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11276                 case "$cf_add_cflags" in
11277                 (-D*)
11278                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11279
11280                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11281                                 && test -z "${cf_tst_cflags}" \
11282                                 && cf_fix_cppflags=yes
11283
11284                         if test "$cf_fix_cppflags" = yes ; then
11285
11286         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11287         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11288
11289                                 continue
11290                         elif test "${cf_tst_cflags}" = "\"'" ; then
11291
11292         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11293         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11294
11295                                 continue
11296                         fi
11297                         ;;
11298                 esac
11299                 case "$CPPFLAGS" in
11300                 (*$cf_add_cflags)
11301                         ;;
11302                 (*)
11303                         case "$cf_add_cflags" in
11304                         (-D*)
11305                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11306
11307 CPPFLAGS=`echo "$CPPFLAGS" | \
11308         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11309                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11310
11311                                 ;;
11312                         esac
11313
11314         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11315         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11316
11317                         ;;
11318                 esac
11319                 ;;
11320         (*)
11321
11322         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11323         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11324
11325                 ;;
11326         esac
11327         ;;
11328 (yes)
11329
11330         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11331         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11332
11333         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11334
11335         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11336                 && test -z "${cf_tst_cflags}" \
11337                 && cf_fix_cppflags=no
11338         ;;
11339 esac
11340 done
11341
11342 if test -n "$cf_new_cflags" ; then
11343
11344         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11345         CFLAGS="${CFLAGS}$cf_new_cflags"
11346
11347 fi
11348
11349 if test -n "$cf_new_cppflags" ; then
11350
11351         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11352         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11353
11354 fi
11355
11356 if test -n "$cf_new_extra_cppflags" ; then
11357
11358         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11359         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11360
11361 fi
11362
11363 fi
11364
11365         fi
11366 fi
11367 fi # cf_cv_posix_visible
11368
11369 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11370
11371 # Work around breakage on OS X
11372
11373 echo "$as_me:11373: checking if SIGWINCH is defined" >&5
11374 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11375 if test "${cf_cv_define_sigwinch+set}" = set; then
11376   echo $ECHO_N "(cached) $ECHO_C" >&6
11377 else
11378
11379         cat >"conftest.$ac_ext" <<_ACEOF
11380 #line 11380 "configure"
11381 #include "confdefs.h"
11382
11383 #include <sys/types.h>
11384 #include <sys/signal.h>
11385
11386 int
11387 main (void)
11388 {
11389 int x = SIGWINCH; (void)x
11390   ;
11391   return 0;
11392 }
11393 _ACEOF
11394 rm -f "conftest.$ac_objext"
11395 if { (eval echo "$as_me:11395: \"$ac_compile\"") >&5
11396   (eval $ac_compile) 2>&5
11397   ac_status=$?
11398   echo "$as_me:11398: \$? = $ac_status" >&5
11399   (exit "$ac_status"); } &&
11400          { ac_try='test -s "conftest.$ac_objext"'
11401   { (eval echo "$as_me:11401: \"$ac_try\"") >&5
11402   (eval $ac_try) 2>&5
11403   ac_status=$?
11404   echo "$as_me:11404: \$? = $ac_status" >&5
11405   (exit "$ac_status"); }; }; then
11406   cf_cv_define_sigwinch=yes
11407 else
11408   echo "$as_me: failed program was:" >&5
11409 cat "conftest.$ac_ext" >&5
11410 cat >"conftest.$ac_ext" <<_ACEOF
11411 #line 11411 "configure"
11412 #include "confdefs.h"
11413
11414 #undef _XOPEN_SOURCE
11415 #undef _POSIX_SOURCE
11416 #undef _POSIX_C_SOURCE
11417 #include <sys/types.h>
11418 #include <sys/signal.h>
11419
11420 int
11421 main (void)
11422 {
11423 int x = SIGWINCH; (void)x
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_cv_define_sigwinch=maybe
11441 else
11442   echo "$as_me: failed program was:" >&5
11443 cat "conftest.$ac_ext" >&5
11444 cf_cv_define_sigwinch=no
11445 fi
11446 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11447
11448 fi
11449 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11450
11451 fi
11452 echo "$as_me:11452: result: $cf_cv_define_sigwinch" >&5
11453 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11454
11455 if test "$cf_cv_define_sigwinch" = maybe ; then
11456 echo "$as_me:11456: checking for actual SIGWINCH definition" >&5
11457 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11458 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11459   echo $ECHO_N "(cached) $ECHO_C" >&6
11460 else
11461
11462 cf_cv_fixup_sigwinch=unknown
11463 cf_sigwinch=32
11464 while test "$cf_sigwinch" != 1
11465 do
11466         cat >"conftest.$ac_ext" <<_ACEOF
11467 #line 11467 "configure"
11468 #include "confdefs.h"
11469
11470 #undef _XOPEN_SOURCE
11471 #undef _POSIX_SOURCE
11472 #undef _POSIX_C_SOURCE
11473 #include <sys/types.h>
11474 #include <sys/signal.h>
11475
11476 int
11477 main (void)
11478 {
11479
11480 #if SIGWINCH != $cf_sigwinch
11481 make an error
11482 #endif
11483 int x = SIGWINCH; (void)x
11484   ;
11485   return 0;
11486 }
11487 _ACEOF
11488 rm -f "conftest.$ac_objext"
11489 if { (eval echo "$as_me:11489: \"$ac_compile\"") >&5
11490   (eval $ac_compile) 2>&5
11491   ac_status=$?
11492   echo "$as_me:11492: \$? = $ac_status" >&5
11493   (exit "$ac_status"); } &&
11494          { ac_try='test -s "conftest.$ac_objext"'
11495   { (eval echo "$as_me:11495: \"$ac_try\"") >&5
11496   (eval $ac_try) 2>&5
11497   ac_status=$?
11498   echo "$as_me:11498: \$? = $ac_status" >&5
11499   (exit "$ac_status"); }; }; then
11500   cf_cv_fixup_sigwinch=$cf_sigwinch
11501          break
11502 else
11503   echo "$as_me: failed program was:" >&5
11504 cat "conftest.$ac_ext" >&5
11505 fi
11506 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11507
11508 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11509 done
11510
11511 fi
11512 echo "$as_me:11512: result: $cf_cv_fixup_sigwinch" >&5
11513 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11514
11515         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11516                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11517         fi
11518 fi
11519
11520 # Checks for CODESET support.
11521
11522 echo "$as_me:11522: checking for nl_langinfo and CODESET" >&5
11523 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11524 if test "${am_cv_langinfo_codeset+set}" = set; then
11525   echo $ECHO_N "(cached) $ECHO_C" >&6
11526 else
11527   cat >"conftest.$ac_ext" <<_ACEOF
11528 #line 11528 "configure"
11529 #include "confdefs.h"
11530 #include <langinfo.h>
11531 int
11532 main (void)
11533 {
11534 char* cs = nl_langinfo(CODESET); (void)cs
11535   ;
11536   return 0;
11537 }
11538 _ACEOF
11539 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11540 if { (eval echo "$as_me:11540: \"$ac_link\"") >&5
11541   (eval $ac_link) 2>&5
11542   ac_status=$?
11543   echo "$as_me:11543: \$? = $ac_status" >&5
11544   (exit "$ac_status"); } &&
11545          { ac_try='test -s "conftest$ac_exeext"'
11546   { (eval echo "$as_me:11546: \"$ac_try\"") >&5
11547   (eval $ac_try) 2>&5
11548   ac_status=$?
11549   echo "$as_me:11549: \$? = $ac_status" >&5
11550   (exit "$ac_status"); }; }; then
11551   am_cv_langinfo_codeset=yes
11552 else
11553   echo "$as_me: failed program was:" >&5
11554 cat "conftest.$ac_ext" >&5
11555 am_cv_langinfo_codeset=no
11556 fi
11557 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11558
11559 fi
11560 echo "$as_me:11560: result: $am_cv_langinfo_codeset" >&5
11561 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11562         if test "$am_cv_langinfo_codeset" = yes; then
11563
11564 cat >>confdefs.h <<\EOF
11565 #define HAVE_LANGINFO_CODESET 1
11566 EOF
11567
11568         fi
11569
11570 # use these variables to work around a defect in gcc's fixincludes.
11571 NCURSES_OK_WCHAR_T=
11572 NCURSES_OK_WINT_T=
11573
11574 echo "$as_me:11574: checking if you want wide-character code" >&5
11575 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11576
11577 # Check whether --enable-widec or --disable-widec was given.
11578 if test "${enable_widec+set}" = set; then
11579   enableval="$enable_widec"
11580   with_widec=$enableval
11581 else
11582   with_widec=no
11583 fi;
11584 echo "$as_me:11584: result: $with_widec" >&5
11585 echo "${ECHO_T}$with_widec" >&6
11586
11587 NCURSES_WCWIDTH_GRAPHICS=1
11588
11589 if test "x$with_widec" = xyes ; then
11590         if test "x$disable_lib_suffixes" = xno ; then
11591                 LIB_SUFFIX="w${LIB_SUFFIX}"
11592         fi
11593
11594 cat >>confdefs.h <<\EOF
11595 #define USE_WIDEC_SUPPORT 1
11596 EOF
11597
11598 cat >>confdefs.h <<\EOF
11599 #define NCURSES_WIDECHAR 1
11600 EOF
11601
11602 for ac_header in \
11603 wchar.h \
11604 wctype.h \
11605
11606 do
11607 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11608 echo "$as_me:11608: checking for $ac_header" >&5
11609 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11610 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11611   echo $ECHO_N "(cached) $ECHO_C" >&6
11612 else
11613   cat >"conftest.$ac_ext" <<_ACEOF
11614 #line 11614 "configure"
11615 #include "confdefs.h"
11616 #include <$ac_header>
11617 _ACEOF
11618 if { (eval echo "$as_me:11618: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11619   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11620   ac_status=$?
11621   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11622   rm -f conftest.er1
11623   cat conftest.err >&5
11624   echo "$as_me:11624: \$? = $ac_status" >&5
11625   (exit "$ac_status"); } >/dev/null; then
11626   if test -s conftest.err; then
11627     ac_cpp_err=$ac_c_preproc_warn_flag
11628   else
11629     ac_cpp_err=
11630   fi
11631 else
11632   ac_cpp_err=yes
11633 fi
11634 if test -z "$ac_cpp_err"; then
11635   eval "$as_ac_Header=yes"
11636 else
11637   echo "$as_me: failed program was:" >&5
11638   cat "conftest.$ac_ext" >&5
11639   eval "$as_ac_Header=no"
11640 fi
11641 rm -f conftest.err "conftest.$ac_ext"
11642 fi
11643 echo "$as_me:11643: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11644 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11645 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11646   cat >>confdefs.h <<EOF
11647 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11648 EOF
11649
11650 fi
11651 done
11652
11653 echo "$as_me:11653: checking if wchar.h can be used as is" >&5
11654 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11655 if test "${cf_cv_wchar_h_okay+set}" = set; then
11656   echo $ECHO_N "(cached) $ECHO_C" >&6
11657 else
11658
11659 cat >"conftest.$ac_ext" <<_ACEOF
11660 #line 11660 "configure"
11661 #include "confdefs.h"
11662
11663 #include <stdlib.h>
11664 #ifdef HAVE_WCHAR_H
11665 #include <wchar.h>
11666 #endif
11667 #ifdef HAVE_WCTYPE_H
11668 #include <wctype.h>
11669 #endif
11670
11671 int
11672 main (void)
11673 {
11674
11675         wint_t foo = 0;
11676         int bar = iswpunct(foo)
11677   ;
11678   return 0;
11679 }
11680 _ACEOF
11681 rm -f "conftest.$ac_objext"
11682 if { (eval echo "$as_me:11682: \"$ac_compile\"") >&5
11683   (eval $ac_compile) 2>&5
11684   ac_status=$?
11685   echo "$as_me:11685: \$? = $ac_status" >&5
11686   (exit "$ac_status"); } &&
11687          { ac_try='test -s "conftest.$ac_objext"'
11688   { (eval echo "$as_me:11688: \"$ac_try\"") >&5
11689   (eval $ac_try) 2>&5
11690   ac_status=$?
11691   echo "$as_me:11691: \$? = $ac_status" >&5
11692   (exit "$ac_status"); }; }; then
11693   cf_cv_wchar_h_okay=yes
11694 else
11695   echo "$as_me: failed program was:" >&5
11696 cat "conftest.$ac_ext" >&5
11697 cf_cv_wchar_h_okay=no
11698 fi
11699 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11700 fi
11701 echo "$as_me:11701: result: $cf_cv_wchar_h_okay" >&5
11702 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11703
11704 if test "$cf_cv_wchar_h_okay" = no
11705 then
11706
11707 echo "$as_me:11707: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11708 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11709 cat >"conftest.$ac_ext" <<_ACEOF
11710 #line 11710 "configure"
11711 #include "confdefs.h"
11712 #include <sys/types.h>
11713
11714 int
11715 main (void)
11716 {
11717
11718 #ifndef _XOPEN_SOURCE_EXTENDED
11719 make an error
11720 #endif
11721   ;
11722   return 0;
11723 }
11724 _ACEOF
11725 rm -f "conftest.$ac_objext"
11726 if { (eval echo "$as_me:11726: \"$ac_compile\"") >&5
11727   (eval $ac_compile) 2>&5
11728   ac_status=$?
11729   echo "$as_me:11729: \$? = $ac_status" >&5
11730   (exit "$ac_status"); } &&
11731          { ac_try='test -s "conftest.$ac_objext"'
11732   { (eval echo "$as_me:11732: \"$ac_try\"") >&5
11733   (eval $ac_try) 2>&5
11734   ac_status=$?
11735   echo "$as_me:11735: \$? = $ac_status" >&5
11736   (exit "$ac_status"); }; }; then
11737   cf_result=no
11738 else
11739   echo "$as_me: failed program was:" >&5
11740 cat "conftest.$ac_ext" >&5
11741 cf_result=yes
11742 fi
11743 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11744 echo "$as_me:11744: result: $cf_result" >&5
11745 echo "${ECHO_T}$cf_result" >&6
11746
11747 if test "$cf_result" = yes ; then
11748         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11749 elif test "x" != "x" ; then
11750         echo "$as_me:11750: checking checking for compatible value versus " >&5
11751 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11752         cat >"conftest.$ac_ext" <<_ACEOF
11753 #line 11753 "configure"
11754 #include "confdefs.h"
11755 #include <sys/types.h>
11756
11757 int
11758 main (void)
11759 {
11760
11761 #if _XOPEN_SOURCE_EXTENDED- < 0
11762 make an error
11763 #endif
11764   ;
11765   return 0;
11766 }
11767 _ACEOF
11768 rm -f "conftest.$ac_objext"
11769 if { (eval echo "$as_me:11769: \"$ac_compile\"") >&5
11770   (eval $ac_compile) 2>&5
11771   ac_status=$?
11772   echo "$as_me:11772: \$? = $ac_status" >&5
11773   (exit "$ac_status"); } &&
11774          { ac_try='test -s "conftest.$ac_objext"'
11775   { (eval echo "$as_me:11775: \"$ac_try\"") >&5
11776   (eval $ac_try) 2>&5
11777   ac_status=$?
11778   echo "$as_me:11778: \$? = $ac_status" >&5
11779   (exit "$ac_status"); }; }; then
11780   cf_result=yes
11781 else
11782   echo "$as_me: failed program was:" >&5
11783 cat "conftest.$ac_ext" >&5
11784 cf_result=no
11785 fi
11786 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11787         echo "$as_me:11787: result: $cf_result" >&5
11788 echo "${ECHO_T}$cf_result" >&6
11789         if test "$cf_result" = no ; then
11790                 # perhaps we can override it - try...
11791                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11792         fi
11793 fi
11794
11795 fi
11796
11797 echo "$as_me:11797: checking if wcwidth agrees graphics are single-width" >&5
11798 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11799 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11800   echo $ECHO_N "(cached) $ECHO_C" >&6
11801 else
11802
11803 cat >conftest.in <<CF_EOF
11804 -       VT100 symbols
11805 0x250c  upper left corner
11806 0x2514  lower left corner
11807 0x2510  upper right corner
11808 0x2518  lower right corner
11809 0x251c  tee pointing left
11810 0x2524  tee pointing right
11811 0x2534  tee pointing up
11812 0x252c  tee pointing down
11813 0x2500  horizontal line
11814 0x2502  vertical line
11815 0x253c  large plus or crossover
11816 0x23ba  scan line 1
11817 0x23bd  scan line 9
11818 0x25c6  diamond
11819 0x2592  checker board (stipple)
11820 0x00b0  degree symbol
11821 0x00b1  plus/minus
11822 0x00b7  bullet
11823 -       Teletype 5410v1 symbols
11824 0x2190  arrow pointing left
11825 0x2192  arrow pointing right
11826 0x2193  arrow pointing down
11827 0x2191  arrow pointing up
11828 0x2592  board of squares
11829 0x2603  lantern symbol
11830 0x25ae  solid square block
11831 -       these defaults were invented for ncurses
11832 0x23bb  scan line 3
11833 0x23bc  scan line 7
11834 0x2264  less-than-or-equal-to
11835 0x2265  greater-than-or-equal-to
11836 0x03c0  greek pi
11837 0x2260  not-equal
11838 0x00a3  pound-sterling symbol
11839 -       thick-line-drawing
11840 0x250f  upper left corner
11841 0x2517  lower left corner
11842 0x2513  upper right corner
11843 0x251b  lower right corner
11844 0x2523  tee pointing left
11845 0x252b  tee pointing right
11846 0x253b  tee pointing up
11847 0x2533  tee pointing down
11848 0x2501  horizontal line
11849 0x2503  vertical line
11850 0x254b  large plus or crossover
11851 -       double-line-drawing
11852 0x2554  upper left corner
11853 0x255a  lower left corner
11854 0x2557  upper right corner
11855 0x255d  lower right corner
11856 0x2563  tee pointing left
11857 0x2560  tee pointing right
11858 0x2569  tee pointing up
11859 0x2566  tee pointing down
11860 0x2550  horizontal line
11861 0x2551  vertical line
11862 0x256c  large plus or crossover
11863 CF_EOF
11864 if test "$cross_compiling" = yes; then
11865   cf_cv_wcwidth_graphics=unknown
11866 else
11867   cat >"conftest.$ac_ext" <<_ACEOF
11868 #line 11868 "configure"
11869 #include "confdefs.h"
11870
11871 #include <locale.h>
11872 #include <stdio.h>
11873 #include <wchar.h>
11874
11875 #define MY_LEN 80
11876
11877 int
11878 main(void)
11879 {
11880         FILE *fp;
11881         int value;
11882         char buffer[MY_LEN + 1];
11883         char notes[MY_LEN + 1];
11884         int totals = 0;
11885         int passed = 0;
11886
11887         if (setlocale(LC_ALL, "en_US.UTF8") ||
11888                 setlocale(LC_ALL, "en_US.UTF-8") ||
11889                 setlocale(LC_ALL, "en_US.utf8") ||
11890                 setlocale(LC_ALL, "en_US.utf-8")) {
11891                 if ((fp = fopen("conftest.in", "r")) != 0) {
11892                         while (fgets(buffer, MY_LEN, fp) != 0) {
11893                                 if (*buffer == '-') {
11894                                         fprintf(stderr, "\\t%s", buffer);
11895                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11896                                         ++totals;
11897                                         if (wcwidth(value) == 1)
11898                                                 ++passed;
11899                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
11900                                 } else {
11901                                         fprintf(stderr, "?\\t%s", buffer);
11902                                 }
11903                         }
11904                 }
11905         }
11906         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
11907         return (totals == passed) ? 0 : 1;
11908 }
11909
11910 _ACEOF
11911 rm -f "conftest$ac_exeext"
11912 if { (eval echo "$as_me:11912: \"$ac_link\"") >&5
11913   (eval $ac_link) 2>&5
11914   ac_status=$?
11915   echo "$as_me:11915: \$? = $ac_status" >&5
11916   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11917   { (eval echo "$as_me:11917: \"$ac_try\"") >&5
11918   (eval $ac_try) 2>&5
11919   ac_status=$?
11920   echo "$as_me:11920: \$? = $ac_status" >&5
11921   (exit "$ac_status"); }; }; then
11922   cf_cv_wcwidth_graphics=yes
11923 else
11924   echo "$as_me: program exited with status $ac_status" >&5
11925 echo "$as_me: failed program was:" >&5
11926 cat "conftest.$ac_ext" >&5
11927 cf_cv_wcwidth_graphics=no
11928 fi
11929 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11930 fi
11931
11932 fi
11933 echo "$as_me:11933: result: $cf_cv_wcwidth_graphics" >&5
11934 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11935
11936         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11937
11938         # with_overwrite=no
11939         NCURSES_CH_T=cchar_t
11940
11941 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11942 do
11943 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11944 echo "$as_me:11944: checking for $ac_func" >&5
11945 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11946 if eval "test \"\${$as_ac_var+set}\" = set"; then
11947   echo $ECHO_N "(cached) $ECHO_C" >&6
11948 else
11949   cat >"conftest.$ac_ext" <<_ACEOF
11950 #line 11950 "configure"
11951 #include "confdefs.h"
11952 #define $ac_func autoconf_temporary
11953 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11954 #undef $ac_func
11955
11956 #ifdef __cplusplus
11957 extern "C"
11958 #endif
11959
11960 /* We use char because int might match the return type of a gcc2
11961    builtin and then its argument prototype would still apply.  */
11962 char $ac_func (void);
11963
11964 int
11965 main (void)
11966 {
11967
11968 /* The GNU C library defines stubs for functions which it implements
11969     to always fail with ENOSYS.  Some functions are actually named
11970     something starting with __ and the normal name is an alias.  */
11971 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11972 #error found stub for $ac_func
11973 #endif
11974
11975         return $ac_func ();
11976   ;
11977   return 0;
11978 }
11979 _ACEOF
11980 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11981 if { (eval echo "$as_me:11981: \"$ac_link\"") >&5
11982   (eval $ac_link) 2>&5
11983   ac_status=$?
11984   echo "$as_me:11984: \$? = $ac_status" >&5
11985   (exit "$ac_status"); } &&
11986          { ac_try='test -s "conftest$ac_exeext"'
11987   { (eval echo "$as_me:11987: \"$ac_try\"") >&5
11988   (eval $ac_try) 2>&5
11989   ac_status=$?
11990   echo "$as_me:11990: \$? = $ac_status" >&5
11991   (exit "$ac_status"); }; }; then
11992   eval "$as_ac_var=yes"
11993 else
11994   echo "$as_me: failed program was:" >&5
11995 cat "conftest.$ac_ext" >&5
11996 eval "$as_ac_var=no"
11997 fi
11998 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11999 fi
12000 echo "$as_me:12000: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12001 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12002 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12003   cat >>confdefs.h <<EOF
12004 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12005 EOF
12006
12007 fi
12008 done
12009
12010         if test "x$ac_cv_func_putwc" != xyes ; then
12011
12012 echo "$as_me:12012: checking for multibyte character support" >&5
12013 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12014 if test "${cf_cv_utf8_lib+set}" = set; then
12015   echo $ECHO_N "(cached) $ECHO_C" >&6
12016 else
12017
12018         cf_save_LIBS="$LIBS"
12019         cat >"conftest.$ac_ext" <<_ACEOF
12020 #line 12020 "configure"
12021 #include "confdefs.h"
12022
12023 #include <stdlib.h>
12024 int
12025 main (void)
12026 {
12027 putwc(0,0);
12028   ;
12029   return 0;
12030 }
12031 _ACEOF
12032 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12033 if { (eval echo "$as_me:12033: \"$ac_link\"") >&5
12034   (eval $ac_link) 2>&5
12035   ac_status=$?
12036   echo "$as_me:12036: \$? = $ac_status" >&5
12037   (exit "$ac_status"); } &&
12038          { ac_try='test -s "conftest$ac_exeext"'
12039   { (eval echo "$as_me:12039: \"$ac_try\"") >&5
12040   (eval $ac_try) 2>&5
12041   ac_status=$?
12042   echo "$as_me:12042: \$? = $ac_status" >&5
12043   (exit "$ac_status"); }; }; then
12044   cf_cv_utf8_lib=yes
12045 else
12046   echo "$as_me: failed program was:" >&5
12047 cat "conftest.$ac_ext" >&5
12048
12049 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12050 # will be set on completion of the AC_TRY_LINK below.
12051 cf_cv_header_path_utf8=
12052 cf_cv_library_path_utf8=
12053
12054 echo "${as_me:-configure}:12054: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12055
12056 cf_save_LIBS="$LIBS"
12057
12058 cat >"conftest.$ac_ext" <<_ACEOF
12059 #line 12059 "configure"
12060 #include "confdefs.h"
12061
12062 #include <libutf8.h>
12063 int
12064 main (void)
12065 {
12066 putwc(0,0);
12067   ;
12068   return 0;
12069 }
12070 _ACEOF
12071 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12072 if { (eval echo "$as_me:12072: \"$ac_link\"") >&5
12073   (eval $ac_link) 2>&5
12074   ac_status=$?
12075   echo "$as_me:12075: \$? = $ac_status" >&5
12076   (exit "$ac_status"); } &&
12077          { ac_try='test -s "conftest$ac_exeext"'
12078   { (eval echo "$as_me:12078: \"$ac_try\"") >&5
12079   (eval $ac_try) 2>&5
12080   ac_status=$?
12081   echo "$as_me:12081: \$? = $ac_status" >&5
12082   (exit "$ac_status"); }; }; then
12083
12084         cf_cv_find_linkage_utf8=yes
12085         cf_cv_header_path_utf8=/usr/include
12086         cf_cv_library_path_utf8=/usr/lib
12087
12088 else
12089   echo "$as_me: failed program was:" >&5
12090 cat "conftest.$ac_ext" >&5
12091
12092 LIBS="-lutf8  $cf_save_LIBS"
12093
12094 cat >"conftest.$ac_ext" <<_ACEOF
12095 #line 12095 "configure"
12096 #include "confdefs.h"
12097
12098 #include <libutf8.h>
12099 int
12100 main (void)
12101 {
12102 putwc(0,0);
12103   ;
12104   return 0;
12105 }
12106 _ACEOF
12107 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12108 if { (eval echo "$as_me:12108: \"$ac_link\"") >&5
12109   (eval $ac_link) 2>&5
12110   ac_status=$?
12111   echo "$as_me:12111: \$? = $ac_status" >&5
12112   (exit "$ac_status"); } &&
12113          { ac_try='test -s "conftest$ac_exeext"'
12114   { (eval echo "$as_me:12114: \"$ac_try\"") >&5
12115   (eval $ac_try) 2>&5
12116   ac_status=$?
12117   echo "$as_me:12117: \$? = $ac_status" >&5
12118   (exit "$ac_status"); }; }; then
12119
12120         cf_cv_find_linkage_utf8=yes
12121         cf_cv_header_path_utf8=/usr/include
12122         cf_cv_library_path_utf8=/usr/lib
12123         cf_cv_library_file_utf8="-lutf8"
12124
12125 else
12126   echo "$as_me: failed program was:" >&5
12127 cat "conftest.$ac_ext" >&5
12128
12129         cf_cv_find_linkage_utf8=no
12130         LIBS="$cf_save_LIBS"
12131
12132         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12133
12134 echo "${as_me:-configure}:12134: testing find linkage for utf8 library ..." 1>&5
12135
12136 echo "${as_me:-configure}:12136: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12137
12138         cf_save_CPPFLAGS="$CPPFLAGS"
12139         cf_test_CPPFLAGS="$CPPFLAGS"
12140
12141 cf_search=
12142
12143 # collect the current set of include-directories from compiler flags
12144 cf_header_path_list=""
12145 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12146         for cf_header_path in $CPPFLAGS $CFLAGS
12147         do
12148                 case "$cf_header_path" in
12149                 (-I*)
12150                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12151
12152 test "x$cf_header_path" != "xNONE" && \
12153 test -d "$cf_header_path" && \
12154  {
12155         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12156         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12157         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12158         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12159         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12160         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12161 }
12162
12163                         cf_header_path_list="$cf_header_path_list $cf_search"
12164                         ;;
12165                 esac
12166         done
12167 fi
12168
12169 # add the variations for the package we are looking for
12170
12171 cf_search=
12172
12173 test "x$prefix" != "xNONE" && \
12174 test -d "$prefix" && \
12175  {
12176         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12177         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12178         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12179         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12180         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12181         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12182 }
12183
12184 for cf_subdir_prefix in \
12185         /usr \
12186         /usr/local \
12187         /usr/pkg \
12188         /opt \
12189         /opt/local \
12190         $HOME
12191 do
12192
12193 test "x$cf_subdir_prefix" != "x$prefix" && \
12194 test -d "$cf_subdir_prefix" && \
12195 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12196         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12197         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12198         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12199         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12200         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12201         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12202 }
12203
12204 done
12205
12206 test "$includedir" != NONE && \
12207 test "$includedir" != "/usr/include" && \
12208 test -d "$includedir" && {
12209         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12210         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12211 }
12212
12213 test "$oldincludedir" != NONE && \
12214 test "$oldincludedir" != "/usr/include" && \
12215 test -d "$oldincludedir" && {
12216         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12217         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12218 }
12219
12220 cf_search="$cf_search $cf_header_path_list"
12221
12222         for cf_cv_header_path_utf8 in $cf_search
12223         do
12224                 if test -d "$cf_cv_header_path_utf8" ; then
12225                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12226
12227 echo "${as_me:-configure}:12227: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12228
12229                         CPPFLAGS="$cf_save_CPPFLAGS"
12230
12231         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12232         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12233
12234                         cat >"conftest.$ac_ext" <<_ACEOF
12235 #line 12235 "configure"
12236 #include "confdefs.h"
12237
12238 #include <libutf8.h>
12239 int
12240 main (void)
12241 {
12242 putwc(0,0);
12243   ;
12244   return 0;
12245 }
12246 _ACEOF
12247 rm -f "conftest.$ac_objext"
12248 if { (eval echo "$as_me:12248: \"$ac_compile\"") >&5
12249   (eval $ac_compile) 2>&5
12250   ac_status=$?
12251   echo "$as_me:12251: \$? = $ac_status" >&5
12252   (exit "$ac_status"); } &&
12253          { ac_try='test -s "conftest.$ac_objext"'
12254   { (eval echo "$as_me:12254: \"$ac_try\"") >&5
12255   (eval $ac_try) 2>&5
12256   ac_status=$?
12257   echo "$as_me:12257: \$? = $ac_status" >&5
12258   (exit "$ac_status"); }; }; then
12259
12260                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12261
12262 echo "${as_me:-configure}:12262: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12263
12264                                 cf_cv_find_linkage_utf8=maybe
12265                                 cf_test_CPPFLAGS="$CPPFLAGS"
12266                                 break
12267 else
12268   echo "$as_me: failed program was:" >&5
12269 cat "conftest.$ac_ext" >&5
12270
12271                                 CPPFLAGS="$cf_save_CPPFLAGS"
12272
12273 fi
12274 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12275                 fi
12276         done
12277
12278         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12279
12280 echo "${as_me:-configure}:12280: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12281
12282                 cf_save_LIBS="$LIBS"
12283                 cf_save_LDFLAGS="$LDFLAGS"
12284
12285                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12286
12287 cf_search=
12288 cf_library_path_list=""
12289 if test -n "${LDFLAGS}${LIBS}" ; then
12290         for cf_library_path in $LDFLAGS $LIBS
12291         do
12292                 case "$cf_library_path" in
12293                 (-L*)
12294                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12295
12296 test "x$cf_library_path" != "xNONE" && \
12297 test -d "$cf_library_path" && \
12298  {
12299         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12300         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12301         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12302         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12303         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12304         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12305 }
12306
12307                         cf_library_path_list="$cf_library_path_list $cf_search"
12308                         ;;
12309                 esac
12310         done
12311 fi
12312
12313 cf_search=
12314
12315 test "x$prefix" != "xNONE" && \
12316 test -d "$prefix" && \
12317  {
12318         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12319         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12320         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12321         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12322         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12323         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12324 }
12325
12326 for cf_subdir_prefix in \
12327         /usr \
12328         /usr/local \
12329         /usr/pkg \
12330         /opt \
12331         /opt/local \
12332         $HOME
12333 do
12334
12335 test "x$cf_subdir_prefix" != "x$prefix" && \
12336 test -d "$cf_subdir_prefix" && \
12337 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12338         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12339         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12340         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12341         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12342         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12343         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12344 }
12345
12346 done
12347
12348 cf_search="$cf_library_path_list $cf_search"
12349
12350                         for cf_cv_library_path_utf8 in $cf_search
12351                         do
12352                                 if test -d "$cf_cv_library_path_utf8" ; then
12353                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12354
12355 echo "${as_me:-configure}:12355: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12356
12357                                         CPPFLAGS="$cf_test_CPPFLAGS"
12358                                         LIBS="-lutf8  $cf_save_LIBS"
12359                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12360                                         cat >"conftest.$ac_ext" <<_ACEOF
12361 #line 12361 "configure"
12362 #include "confdefs.h"
12363
12364 #include <libutf8.h>
12365 int
12366 main (void)
12367 {
12368 putwc(0,0);
12369   ;
12370   return 0;
12371 }
12372 _ACEOF
12373 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12374 if { (eval echo "$as_me:12374: \"$ac_link\"") >&5
12375   (eval $ac_link) 2>&5
12376   ac_status=$?
12377   echo "$as_me:12377: \$? = $ac_status" >&5
12378   (exit "$ac_status"); } &&
12379          { ac_try='test -s "conftest$ac_exeext"'
12380   { (eval echo "$as_me:12380: \"$ac_try\"") >&5
12381   (eval $ac_try) 2>&5
12382   ac_status=$?
12383   echo "$as_me:12383: \$? = $ac_status" >&5
12384   (exit "$ac_status"); }; }; then
12385
12386                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12387
12388 echo "${as_me:-configure}:12388: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12389
12390                                         cf_cv_find_linkage_utf8=yes
12391                                         cf_cv_library_file_utf8="-lutf8"
12392                                         break
12393 else
12394   echo "$as_me: failed program was:" >&5
12395 cat "conftest.$ac_ext" >&5
12396
12397                                         CPPFLAGS="$cf_save_CPPFLAGS"
12398                                         LIBS="$cf_save_LIBS"
12399                                         LDFLAGS="$cf_save_LDFLAGS"
12400
12401 fi
12402 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12403                                 fi
12404                         done
12405                         CPPFLAGS="$cf_save_CPPFLAGS"
12406                         LDFLAGS="$cf_save_LDFLAGS"
12407                 fi
12408
12409         else
12410                 cf_cv_find_linkage_utf8=no
12411         fi
12412
12413 fi
12414 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12415
12416 fi
12417 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12418
12419 LIBS="$cf_save_LIBS"
12420
12421 if test "$cf_cv_find_linkage_utf8" = yes ; then
12422 cf_cv_utf8_lib=add-on
12423 else
12424 cf_cv_utf8_lib=no
12425 fi
12426
12427 fi
12428 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12429 fi
12430 echo "$as_me:12430: result: $cf_cv_utf8_lib" >&5
12431 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12432
12433 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12434 # ncurses/ncursesw:
12435 if test "$cf_cv_utf8_lib" = "add-on" ; then
12436
12437 cat >>confdefs.h <<\EOF
12438 #define HAVE_LIBUTF8_H 1
12439 EOF
12440
12441 if test -n "$cf_cv_header_path_utf8" ; then
12442   for cf_add_incdir in $cf_cv_header_path_utf8
12443   do
12444         while test "$cf_add_incdir" != /usr/include
12445         do
12446           if test -d "$cf_add_incdir"
12447           then
12448                 cf_have_incdir=no
12449                 if test -n "$CFLAGS$CPPFLAGS" ; then
12450                   # a loop is needed to ensure we can add subdirs of existing dirs
12451                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12452                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12453                           cf_have_incdir=yes; break
12454                         fi
12455                   done
12456                 fi
12457
12458                 if test "$cf_have_incdir" = no ; then
12459                   if test "$cf_add_incdir" = /usr/local/include ; then
12460                         if test "$GCC" = yes
12461                         then
12462                           cf_save_CPPFLAGS=$CPPFLAGS
12463
12464         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12465         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12466
12467                           cat >"conftest.$ac_ext" <<_ACEOF
12468 #line 12468 "configure"
12469 #include "confdefs.h"
12470 #include <stdio.h>
12471 int
12472 main (void)
12473 {
12474 printf("Hello")
12475   ;
12476   return 0;
12477 }
12478 _ACEOF
12479 rm -f "conftest.$ac_objext"
12480 if { (eval echo "$as_me:12480: \"$ac_compile\"") >&5
12481   (eval $ac_compile) 2>&5
12482   ac_status=$?
12483   echo "$as_me:12483: \$? = $ac_status" >&5
12484   (exit "$ac_status"); } &&
12485          { ac_try='test -s "conftest.$ac_objext"'
12486   { (eval echo "$as_me:12486: \"$ac_try\"") >&5
12487   (eval $ac_try) 2>&5
12488   ac_status=$?
12489   echo "$as_me:12489: \$? = $ac_status" >&5
12490   (exit "$ac_status"); }; }; then
12491   :
12492 else
12493   echo "$as_me: failed program was:" >&5
12494 cat "conftest.$ac_ext" >&5
12495 cf_have_incdir=yes
12496 fi
12497 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12498                           CPPFLAGS=$cf_save_CPPFLAGS
12499                         fi
12500                   fi
12501                 fi
12502
12503                 if test "$cf_have_incdir" = no ; then
12504                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12505
12506 echo "${as_me:-configure}:12506: testing adding $cf_add_incdir to include-path ..." 1>&5
12507
12508                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12509
12510                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12511                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12512                   cf_add_incdir="$cf_top_incdir"
12513                 else
12514                   break
12515                 fi
12516           else
12517                 break
12518           fi
12519         done
12520   done
12521 fi
12522
12523 if test -n "$cf_cv_library_path_utf8" ; then
12524         for cf_add_libdir in $cf_cv_library_path_utf8
12525         do
12526                 if test "$cf_add_libdir" = /usr/lib ; then
12527                         :
12528                 elif test -d "$cf_add_libdir"
12529                 then
12530                         cf_have_libdir=no
12531                         if test -n "$LDFLAGS$LIBS" ; then
12532                                 # a loop is needed to ensure we can add subdirs of existing dirs
12533                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12534                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12535                                                 cf_have_libdir=yes; break
12536                                         fi
12537                                 done
12538                         fi
12539                         if test "$cf_have_libdir" = no ; then
12540                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12541
12542 echo "${as_me:-configure}:12542: testing adding $cf_add_libdir to library-path ..." 1>&5
12543
12544                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12545                         fi
12546                 fi
12547         done
12548 fi
12549
12550 cf_add_libs="$LIBS"
12551 # reverse order
12552 cf_add_0lib=
12553 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12554 # filter duplicates
12555 for cf_add_1lib in $cf_add_0lib; do
12556         for cf_add_2lib in $cf_add_libs; do
12557                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12558                         cf_add_1lib=
12559                         break
12560                 fi
12561         done
12562         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12563 done
12564 LIBS="$cf_add_libs"
12565
12566 fi
12567
12568                 if test "$cf_cv_utf8_lib" != no ; then
12569                         NCURSES_LIBUTF8=1
12570                 fi
12571         fi
12572
12573 # This is needed on Tru64 5.0 to declare mbstate_t
12574 echo "$as_me:12574: checking if we must include wchar.h to declare mbstate_t" >&5
12575 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12576 if test "${cf_cv_mbstate_t+set}" = set; then
12577   echo $ECHO_N "(cached) $ECHO_C" >&6
12578 else
12579
12580 cat >"conftest.$ac_ext" <<_ACEOF
12581 #line 12581 "configure"
12582 #include "confdefs.h"
12583
12584 #include <stdlib.h>
12585 #include <stdarg.h>
12586 #include <stdio.h>
12587 #ifdef HAVE_LIBUTF8_H
12588 #include <libutf8.h>
12589 #endif
12590 int
12591 main (void)
12592 {
12593 mbstate_t state
12594   ;
12595   return 0;
12596 }
12597 _ACEOF
12598 rm -f "conftest.$ac_objext"
12599 if { (eval echo "$as_me:12599: \"$ac_compile\"") >&5
12600   (eval $ac_compile) 2>&5
12601   ac_status=$?
12602   echo "$as_me:12602: \$? = $ac_status" >&5
12603   (exit "$ac_status"); } &&
12604          { ac_try='test -s "conftest.$ac_objext"'
12605   { (eval echo "$as_me:12605: \"$ac_try\"") >&5
12606   (eval $ac_try) 2>&5
12607   ac_status=$?
12608   echo "$as_me:12608: \$? = $ac_status" >&5
12609   (exit "$ac_status"); }; }; then
12610   cf_cv_mbstate_t=no
12611 else
12612   echo "$as_me: failed program was:" >&5
12613 cat "conftest.$ac_ext" >&5
12614 cat >"conftest.$ac_ext" <<_ACEOF
12615 #line 12615 "configure"
12616 #include "confdefs.h"
12617
12618 #include <stdlib.h>
12619 #include <stdarg.h>
12620 #include <stdio.h>
12621 #include <wchar.h>
12622 #ifdef HAVE_LIBUTF8_H
12623 #include <libutf8.h>
12624 #endif
12625 int
12626 main (void)
12627 {
12628 mbstate_t value
12629   ;
12630   return 0;
12631 }
12632 _ACEOF
12633 rm -f "conftest.$ac_objext"
12634 if { (eval echo "$as_me:12634: \"$ac_compile\"") >&5
12635   (eval $ac_compile) 2>&5
12636   ac_status=$?
12637   echo "$as_me:12637: \$? = $ac_status" >&5
12638   (exit "$ac_status"); } &&
12639          { ac_try='test -s "conftest.$ac_objext"'
12640   { (eval echo "$as_me:12640: \"$ac_try\"") >&5
12641   (eval $ac_try) 2>&5
12642   ac_status=$?
12643   echo "$as_me:12643: \$? = $ac_status" >&5
12644   (exit "$ac_status"); }; }; then
12645   cf_cv_mbstate_t=yes
12646 else
12647   echo "$as_me: failed program was:" >&5
12648 cat "conftest.$ac_ext" >&5
12649 cf_cv_mbstate_t=unknown
12650 fi
12651 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12652 fi
12653 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12654 fi
12655 echo "$as_me:12655: result: $cf_cv_mbstate_t" >&5
12656 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12657
12658 if test "$cf_cv_mbstate_t" = yes ; then
12659
12660 cat >>confdefs.h <<\EOF
12661 #define NEED_WCHAR_H 1
12662 EOF
12663
12664         NEED_WCHAR_H=1
12665 fi
12666
12667 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12668 if test "$cf_cv_mbstate_t" = unknown ; then
12669         NCURSES_MBSTATE_T=1
12670 fi
12671
12672 # This is needed on Tru64 5.0 to declare wchar_t
12673 echo "$as_me:12673: checking if we must include wchar.h to declare wchar_t" >&5
12674 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12675 if test "${cf_cv_wchar_t+set}" = set; then
12676   echo $ECHO_N "(cached) $ECHO_C" >&6
12677 else
12678
12679 cat >"conftest.$ac_ext" <<_ACEOF
12680 #line 12680 "configure"
12681 #include "confdefs.h"
12682
12683 #include <stdlib.h>
12684 #include <stdarg.h>
12685 #include <stdio.h>
12686 #ifdef HAVE_LIBUTF8_H
12687 #include <libutf8.h>
12688 #endif
12689 int
12690 main (void)
12691 {
12692 wchar_t state
12693   ;
12694   return 0;
12695 }
12696 _ACEOF
12697 rm -f "conftest.$ac_objext"
12698 if { (eval echo "$as_me:12698: \"$ac_compile\"") >&5
12699   (eval $ac_compile) 2>&5
12700   ac_status=$?
12701   echo "$as_me:12701: \$? = $ac_status" >&5
12702   (exit "$ac_status"); } &&
12703          { ac_try='test -s "conftest.$ac_objext"'
12704   { (eval echo "$as_me:12704: \"$ac_try\"") >&5
12705   (eval $ac_try) 2>&5
12706   ac_status=$?
12707   echo "$as_me:12707: \$? = $ac_status" >&5
12708   (exit "$ac_status"); }; }; then
12709   cf_cv_wchar_t=no
12710 else
12711   echo "$as_me: failed program was:" >&5
12712 cat "conftest.$ac_ext" >&5
12713 cat >"conftest.$ac_ext" <<_ACEOF
12714 #line 12714 "configure"
12715 #include "confdefs.h"
12716
12717 #include <stdlib.h>
12718 #include <stdarg.h>
12719 #include <stdio.h>
12720 #include <wchar.h>
12721 #ifdef HAVE_LIBUTF8_H
12722 #include <libutf8.h>
12723 #endif
12724 int
12725 main (void)
12726 {
12727 wchar_t value
12728   ;
12729   return 0;
12730 }
12731 _ACEOF
12732 rm -f "conftest.$ac_objext"
12733 if { (eval echo "$as_me:12733: \"$ac_compile\"") >&5
12734   (eval $ac_compile) 2>&5
12735   ac_status=$?
12736   echo "$as_me:12736: \$? = $ac_status" >&5
12737   (exit "$ac_status"); } &&
12738          { ac_try='test -s "conftest.$ac_objext"'
12739   { (eval echo "$as_me:12739: \"$ac_try\"") >&5
12740   (eval $ac_try) 2>&5
12741   ac_status=$?
12742   echo "$as_me:12742: \$? = $ac_status" >&5
12743   (exit "$ac_status"); }; }; then
12744   cf_cv_wchar_t=yes
12745 else
12746   echo "$as_me: failed program was:" >&5
12747 cat "conftest.$ac_ext" >&5
12748 cf_cv_wchar_t=unknown
12749 fi
12750 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12751 fi
12752 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12753 fi
12754 echo "$as_me:12754: result: $cf_cv_wchar_t" >&5
12755 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12756
12757 if test "$cf_cv_wchar_t" = yes ; then
12758
12759 cat >>confdefs.h <<\EOF
12760 #define NEED_WCHAR_H 1
12761 EOF
12762
12763         NEED_WCHAR_H=1
12764 fi
12765
12766 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12767 if test "$cf_cv_wchar_t" = unknown ; then
12768         NCURSES_WCHAR_T=1
12769 fi
12770
12771 # if we find wchar_t in either place, use substitution to provide a fallback.
12772 if test "$cf_cv_wchar_t" != unknown ; then
12773         NCURSES_OK_WCHAR_T=1
12774 fi
12775
12776 # This is needed on Tru64 5.0 to declare wint_t
12777 echo "$as_me:12777: checking if we must include wchar.h to declare wint_t" >&5
12778 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12779 if test "${cf_cv_wint_t+set}" = set; then
12780   echo $ECHO_N "(cached) $ECHO_C" >&6
12781 else
12782
12783 cat >"conftest.$ac_ext" <<_ACEOF
12784 #line 12784 "configure"
12785 #include "confdefs.h"
12786
12787 #include <stdlib.h>
12788 #include <stdarg.h>
12789 #include <stdio.h>
12790 #ifdef HAVE_LIBUTF8_H
12791 #include <libutf8.h>
12792 #endif
12793 int
12794 main (void)
12795 {
12796 wint_t state
12797   ;
12798   return 0;
12799 }
12800 _ACEOF
12801 rm -f "conftest.$ac_objext"
12802 if { (eval echo "$as_me:12802: \"$ac_compile\"") >&5
12803   (eval $ac_compile) 2>&5
12804   ac_status=$?
12805   echo "$as_me:12805: \$? = $ac_status" >&5
12806   (exit "$ac_status"); } &&
12807          { ac_try='test -s "conftest.$ac_objext"'
12808   { (eval echo "$as_me:12808: \"$ac_try\"") >&5
12809   (eval $ac_try) 2>&5
12810   ac_status=$?
12811   echo "$as_me:12811: \$? = $ac_status" >&5
12812   (exit "$ac_status"); }; }; then
12813   cf_cv_wint_t=no
12814 else
12815   echo "$as_me: failed program was:" >&5
12816 cat "conftest.$ac_ext" >&5
12817 cat >"conftest.$ac_ext" <<_ACEOF
12818 #line 12818 "configure"
12819 #include "confdefs.h"
12820
12821 #include <stdlib.h>
12822 #include <stdarg.h>
12823 #include <stdio.h>
12824 #include <wchar.h>
12825 #ifdef HAVE_LIBUTF8_H
12826 #include <libutf8.h>
12827 #endif
12828 int
12829 main (void)
12830 {
12831 wint_t value
12832   ;
12833   return 0;
12834 }
12835 _ACEOF
12836 rm -f "conftest.$ac_objext"
12837 if { (eval echo "$as_me:12837: \"$ac_compile\"") >&5
12838   (eval $ac_compile) 2>&5
12839   ac_status=$?
12840   echo "$as_me:12840: \$? = $ac_status" >&5
12841   (exit "$ac_status"); } &&
12842          { ac_try='test -s "conftest.$ac_objext"'
12843   { (eval echo "$as_me:12843: \"$ac_try\"") >&5
12844   (eval $ac_try) 2>&5
12845   ac_status=$?
12846   echo "$as_me:12846: \$? = $ac_status" >&5
12847   (exit "$ac_status"); }; }; then
12848   cf_cv_wint_t=yes
12849 else
12850   echo "$as_me: failed program was:" >&5
12851 cat "conftest.$ac_ext" >&5
12852 cf_cv_wint_t=unknown
12853 fi
12854 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12855 fi
12856 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12857 fi
12858 echo "$as_me:12858: result: $cf_cv_wint_t" >&5
12859 echo "${ECHO_T}$cf_cv_wint_t" >&6
12860
12861 if test "$cf_cv_wint_t" = yes ; then
12862
12863 cat >>confdefs.h <<\EOF
12864 #define NEED_WCHAR_H 1
12865 EOF
12866
12867         NEED_WCHAR_H=1
12868 fi
12869
12870 # if we do not find wint_t in either place, use substitution to provide a fallback.
12871 if test "$cf_cv_wint_t" = unknown ; then
12872         NCURSES_WINT_T=1
12873 fi
12874
12875 # if we find wint_t in either place, use substitution to provide a fallback.
12876 if test "$cf_cv_wint_t" != unknown ; then
12877         NCURSES_OK_WINT_T=1
12878 fi
12879
12880         if test "$NCURSES_MBSTATE_T" != 0; then
12881
12882 cat >>confdefs.h <<\EOF
12883 #define NEED_MBSTATE_T_DEF 1
12884 EOF
12885
12886         fi
12887 fi
12888
12889 ###   use option --disable-lp64 to allow long chtype
12890 echo "$as_me:12890: checking whether to enable _LP64 definition in curses.h" >&5
12891 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12892
12893 # Check whether --enable-lp64 or --disable-lp64 was given.
12894 if test "${enable_lp64+set}" = set; then
12895   enableval="$enable_lp64"
12896   with_lp64=$enableval
12897 else
12898   with_lp64=$cf_dft_with_lp64
12899 fi;
12900 echo "$as_me:12900: result: $with_lp64" >&5
12901 echo "${ECHO_T}$with_lp64" >&6
12902
12903 if test "x$with_lp64" = xyes ; then
12904         cf_cv_enable_lp64=1
12905 else
12906         cf_cv_enable_lp64=0
12907 fi
12908
12909 # Check whether --enable-largefile or --disable-largefile was given.
12910 if test "${enable_largefile+set}" = set; then
12911   enableval="$enable_largefile"
12912
12913 fi;
12914 if test "$enable_largefile" != no; then
12915
12916   echo "$as_me:12916: checking for special C compiler options needed for large files" >&5
12917 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12918 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12919   echo $ECHO_N "(cached) $ECHO_C" >&6
12920 else
12921   ac_cv_sys_largefile_CC=no
12922      if test "$GCC" != yes; then
12923        ac_save_CC=$CC
12924        while :; do
12925          # IRIX 6.2 and later do not support large files by default,
12926          # so use the C compiler's -n32 option if that helps.
12927          cat >"conftest.$ac_ext" <<_ACEOF
12928 #line 12928 "configure"
12929 #include "confdefs.h"
12930 #include <sys/types.h>
12931  /* Check that off_t can represent 2**63 - 1 correctly.
12932     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12933     since some C++ compilers masquerading as C compilers
12934     incorrectly reject 9223372036854775807.  */
12935 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12936   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12937                        && LARGE_OFF_T % 2147483647 == 1)
12938                       ? 1 : -1];
12939 int
12940 main (void)
12941 {
12942
12943   ;
12944   return 0;
12945 }
12946 _ACEOF
12947          rm -f "conftest.$ac_objext"
12948 if { (eval echo "$as_me:12948: \"$ac_compile\"") >&5
12949   (eval $ac_compile) 2>&5
12950   ac_status=$?
12951   echo "$as_me:12951: \$? = $ac_status" >&5
12952   (exit "$ac_status"); } &&
12953          { ac_try='test -s "conftest.$ac_objext"'
12954   { (eval echo "$as_me:12954: \"$ac_try\"") >&5
12955   (eval $ac_try) 2>&5
12956   ac_status=$?
12957   echo "$as_me:12957: \$? = $ac_status" >&5
12958   (exit "$ac_status"); }; }; then
12959   break
12960 else
12961   echo "$as_me: failed program was:" >&5
12962 cat "conftest.$ac_ext" >&5
12963 fi
12964 rm -f "conftest.$ac_objext"
12965          CC="$CC -n32"
12966          rm -f "conftest.$ac_objext"
12967 if { (eval echo "$as_me:12967: \"$ac_compile\"") >&5
12968   (eval $ac_compile) 2>&5
12969   ac_status=$?
12970   echo "$as_me:12970: \$? = $ac_status" >&5
12971   (exit "$ac_status"); } &&
12972          { ac_try='test -s "conftest.$ac_objext"'
12973   { (eval echo "$as_me:12973: \"$ac_try\"") >&5
12974   (eval $ac_try) 2>&5
12975   ac_status=$?
12976   echo "$as_me:12976: \$? = $ac_status" >&5
12977   (exit "$ac_status"); }; }; then
12978   ac_cv_sys_largefile_CC=' -n32'; break
12979 else
12980   echo "$as_me: failed program was:" >&5
12981 cat "conftest.$ac_ext" >&5
12982 fi
12983 rm -f "conftest.$ac_objext"
12984          break
12985        done
12986        CC=$ac_save_CC
12987        rm -f "conftest.$ac_ext"
12988     fi
12989 fi
12990 echo "$as_me:12990: result: $ac_cv_sys_largefile_CC" >&5
12991 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12992   if test "$ac_cv_sys_largefile_CC" != no; then
12993     CC=$CC$ac_cv_sys_largefile_CC
12994   fi
12995
12996   echo "$as_me:12996: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12997 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12998 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12999   echo $ECHO_N "(cached) $ECHO_C" >&6
13000 else
13001   while :; do
13002   ac_cv_sys_file_offset_bits=no
13003   cat >"conftest.$ac_ext" <<_ACEOF
13004 #line 13004 "configure"
13005 #include "confdefs.h"
13006 #include <sys/types.h>
13007  /* Check that off_t can represent 2**63 - 1 correctly.
13008     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13009     since some C++ compilers masquerading as C compilers
13010     incorrectly reject 9223372036854775807.  */
13011 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13012   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13013                        && LARGE_OFF_T % 2147483647 == 1)
13014                       ? 1 : -1];
13015 int
13016 main (void)
13017 {
13018
13019   ;
13020   return 0;
13021 }
13022 _ACEOF
13023 rm -f "conftest.$ac_objext"
13024 if { (eval echo "$as_me:13024: \"$ac_compile\"") >&5
13025   (eval $ac_compile) 2>&5
13026   ac_status=$?
13027   echo "$as_me:13027: \$? = $ac_status" >&5
13028   (exit "$ac_status"); } &&
13029          { ac_try='test -s "conftest.$ac_objext"'
13030   { (eval echo "$as_me:13030: \"$ac_try\"") >&5
13031   (eval $ac_try) 2>&5
13032   ac_status=$?
13033   echo "$as_me:13033: \$? = $ac_status" >&5
13034   (exit "$ac_status"); }; }; then
13035   break
13036 else
13037   echo "$as_me: failed program was:" >&5
13038 cat "conftest.$ac_ext" >&5
13039 fi
13040 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13041   cat >"conftest.$ac_ext" <<_ACEOF
13042 #line 13042 "configure"
13043 #include "confdefs.h"
13044 #define _FILE_OFFSET_BITS 64
13045 #include <sys/types.h>
13046  /* Check that off_t can represent 2**63 - 1 correctly.
13047     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13048     since some C++ compilers masquerading as C compilers
13049     incorrectly reject 9223372036854775807.  */
13050 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13051   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13052                        && LARGE_OFF_T % 2147483647 == 1)
13053                       ? 1 : -1];
13054 int
13055 main (void)
13056 {
13057
13058   ;
13059   return 0;
13060 }
13061 _ACEOF
13062 rm -f "conftest.$ac_objext"
13063 if { (eval echo "$as_me:13063: \"$ac_compile\"") >&5
13064   (eval $ac_compile) 2>&5
13065   ac_status=$?
13066   echo "$as_me:13066: \$? = $ac_status" >&5
13067   (exit "$ac_status"); } &&
13068          { ac_try='test -s "conftest.$ac_objext"'
13069   { (eval echo "$as_me:13069: \"$ac_try\"") >&5
13070   (eval $ac_try) 2>&5
13071   ac_status=$?
13072   echo "$as_me:13072: \$? = $ac_status" >&5
13073   (exit "$ac_status"); }; }; then
13074   ac_cv_sys_file_offset_bits=64; break
13075 else
13076   echo "$as_me: failed program was:" >&5
13077 cat "conftest.$ac_ext" >&5
13078 fi
13079 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13080   break
13081 done
13082 fi
13083 echo "$as_me:13083: result: $ac_cv_sys_file_offset_bits" >&5
13084 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13085 if test "$ac_cv_sys_file_offset_bits" != no; then
13086
13087 cat >>confdefs.h <<EOF
13088 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13089 EOF
13090
13091 fi
13092 rm -rf conftest*
13093   echo "$as_me:13093: checking for _LARGE_FILES value needed for large files" >&5
13094 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13095 if test "${ac_cv_sys_large_files+set}" = set; then
13096   echo $ECHO_N "(cached) $ECHO_C" >&6
13097 else
13098   while :; do
13099   ac_cv_sys_large_files=no
13100   cat >"conftest.$ac_ext" <<_ACEOF
13101 #line 13101 "configure"
13102 #include "confdefs.h"
13103 #include <sys/types.h>
13104  /* Check that off_t can represent 2**63 - 1 correctly.
13105     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13106     since some C++ compilers masquerading as C compilers
13107     incorrectly reject 9223372036854775807.  */
13108 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13109   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13110                        && LARGE_OFF_T % 2147483647 == 1)
13111                       ? 1 : -1];
13112 int
13113 main (void)
13114 {
13115
13116   ;
13117   return 0;
13118 }
13119 _ACEOF
13120 rm -f "conftest.$ac_objext"
13121 if { (eval echo "$as_me:13121: \"$ac_compile\"") >&5
13122   (eval $ac_compile) 2>&5
13123   ac_status=$?
13124   echo "$as_me:13124: \$? = $ac_status" >&5
13125   (exit "$ac_status"); } &&
13126          { ac_try='test -s "conftest.$ac_objext"'
13127   { (eval echo "$as_me:13127: \"$ac_try\"") >&5
13128   (eval $ac_try) 2>&5
13129   ac_status=$?
13130   echo "$as_me:13130: \$? = $ac_status" >&5
13131   (exit "$ac_status"); }; }; then
13132   break
13133 else
13134   echo "$as_me: failed program was:" >&5
13135 cat "conftest.$ac_ext" >&5
13136 fi
13137 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13138   cat >"conftest.$ac_ext" <<_ACEOF
13139 #line 13139 "configure"
13140 #include "confdefs.h"
13141 #define _LARGE_FILES 1
13142 #include <sys/types.h>
13143  /* Check that off_t can represent 2**63 - 1 correctly.
13144     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13145     since some C++ compilers masquerading as C compilers
13146     incorrectly reject 9223372036854775807.  */
13147 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13148   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13149                        && LARGE_OFF_T % 2147483647 == 1)
13150                       ? 1 : -1];
13151 int
13152 main (void)
13153 {
13154
13155   ;
13156   return 0;
13157 }
13158 _ACEOF
13159 rm -f "conftest.$ac_objext"
13160 if { (eval echo "$as_me:13160: \"$ac_compile\"") >&5
13161   (eval $ac_compile) 2>&5
13162   ac_status=$?
13163   echo "$as_me:13163: \$? = $ac_status" >&5
13164   (exit "$ac_status"); } &&
13165          { ac_try='test -s "conftest.$ac_objext"'
13166   { (eval echo "$as_me:13166: \"$ac_try\"") >&5
13167   (eval $ac_try) 2>&5
13168   ac_status=$?
13169   echo "$as_me:13169: \$? = $ac_status" >&5
13170   (exit "$ac_status"); }; }; then
13171   ac_cv_sys_large_files=1; break
13172 else
13173   echo "$as_me: failed program was:" >&5
13174 cat "conftest.$ac_ext" >&5
13175 fi
13176 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13177   break
13178 done
13179 fi
13180 echo "$as_me:13180: result: $ac_cv_sys_large_files" >&5
13181 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13182 if test "$ac_cv_sys_large_files" != no; then
13183
13184 cat >>confdefs.h <<EOF
13185 #define _LARGE_FILES $ac_cv_sys_large_files
13186 EOF
13187
13188 fi
13189 rm -rf conftest*
13190 fi
13191
13192         if test "$enable_largefile" != no ; then
13193         echo "$as_me:13193: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13194 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13195 if test "${ac_cv_sys_largefile_source+set}" = set; then
13196   echo $ECHO_N "(cached) $ECHO_C" >&6
13197 else
13198   while :; do
13199   ac_cv_sys_largefile_source=no
13200   cat >"conftest.$ac_ext" <<_ACEOF
13201 #line 13201 "configure"
13202 #include "confdefs.h"
13203 #include <stdio.h>
13204 int
13205 main (void)
13206 {
13207 return !fseeko;
13208   ;
13209   return 0;
13210 }
13211 _ACEOF
13212 rm -f "conftest.$ac_objext"
13213 if { (eval echo "$as_me:13213: \"$ac_compile\"") >&5
13214   (eval $ac_compile) 2>&5
13215   ac_status=$?
13216   echo "$as_me:13216: \$? = $ac_status" >&5
13217   (exit "$ac_status"); } &&
13218          { ac_try='test -s "conftest.$ac_objext"'
13219   { (eval echo "$as_me:13219: \"$ac_try\"") >&5
13220   (eval $ac_try) 2>&5
13221   ac_status=$?
13222   echo "$as_me:13222: \$? = $ac_status" >&5
13223   (exit "$ac_status"); }; }; then
13224   break
13225 else
13226   echo "$as_me: failed program was:" >&5
13227 cat "conftest.$ac_ext" >&5
13228 fi
13229 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13230   cat >"conftest.$ac_ext" <<_ACEOF
13231 #line 13231 "configure"
13232 #include "confdefs.h"
13233 #define _LARGEFILE_SOURCE 1
13234 #include <stdio.h>
13235 int
13236 main (void)
13237 {
13238 return !fseeko;
13239   ;
13240   return 0;
13241 }
13242 _ACEOF
13243 rm -f "conftest.$ac_objext"
13244 if { (eval echo "$as_me:13244: \"$ac_compile\"") >&5
13245   (eval $ac_compile) 2>&5
13246   ac_status=$?
13247   echo "$as_me:13247: \$? = $ac_status" >&5
13248   (exit "$ac_status"); } &&
13249          { ac_try='test -s "conftest.$ac_objext"'
13250   { (eval echo "$as_me:13250: \"$ac_try\"") >&5
13251   (eval $ac_try) 2>&5
13252   ac_status=$?
13253   echo "$as_me:13253: \$? = $ac_status" >&5
13254   (exit "$ac_status"); }; }; then
13255   ac_cv_sys_largefile_source=1; break
13256 else
13257   echo "$as_me: failed program was:" >&5
13258 cat "conftest.$ac_ext" >&5
13259 fi
13260 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13261   break
13262 done
13263 fi
13264 echo "$as_me:13264: result: $ac_cv_sys_largefile_source" >&5
13265 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13266 if test "$ac_cv_sys_largefile_source" != no; then
13267
13268 cat >>confdefs.h <<EOF
13269 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13270 EOF
13271
13272 fi
13273 rm -rf conftest*
13274
13275 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13276 # in glibc 2.1.3, but that breaks too many other things.
13277 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13278 echo "$as_me:13278: checking for fseeko" >&5
13279 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13280 if test "${ac_cv_func_fseeko+set}" = set; then
13281   echo $ECHO_N "(cached) $ECHO_C" >&6
13282 else
13283   cat >"conftest.$ac_ext" <<_ACEOF
13284 #line 13284 "configure"
13285 #include "confdefs.h"
13286 #include <stdio.h>
13287 int
13288 main (void)
13289 {
13290 return fseeko && fseeko (stdin, 0, 0);
13291   ;
13292   return 0;
13293 }
13294 _ACEOF
13295 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13296 if { (eval echo "$as_me:13296: \"$ac_link\"") >&5
13297   (eval $ac_link) 2>&5
13298   ac_status=$?
13299   echo "$as_me:13299: \$? = $ac_status" >&5
13300   (exit "$ac_status"); } &&
13301          { ac_try='test -s "conftest$ac_exeext"'
13302   { (eval echo "$as_me:13302: \"$ac_try\"") >&5
13303   (eval $ac_try) 2>&5
13304   ac_status=$?
13305   echo "$as_me:13305: \$? = $ac_status" >&5
13306   (exit "$ac_status"); }; }; then
13307   ac_cv_func_fseeko=yes
13308 else
13309   echo "$as_me: failed program was:" >&5
13310 cat "conftest.$ac_ext" >&5
13311 ac_cv_func_fseeko=no
13312 fi
13313 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13314 fi
13315 echo "$as_me:13315: result: $ac_cv_func_fseeko" >&5
13316 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13317 if test $ac_cv_func_fseeko = yes; then
13318
13319 cat >>confdefs.h <<\EOF
13320 #define HAVE_FSEEKO 1
13321 EOF
13322
13323 fi
13324
13325         # Normally we would collect these definitions in the config.h,
13326         # but (like _XOPEN_SOURCE), some environments rely on having these
13327         # defined before any of the system headers are included.  Another
13328         # case comes up with C++, e.g., on AIX the compiler compiles the
13329         # header files by themselves before looking at the body files it is
13330         # told to compile.  For ncurses, those header files do not include
13331         # the config.h
13332         if test "$ac_cv_sys_large_files" != no
13333         then
13334
13335         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13336         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13337
13338         fi
13339         if test "$ac_cv_sys_largefile_source" != no
13340         then
13341
13342         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13343         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13344
13345         fi
13346         if test "$ac_cv_sys_file_offset_bits" != no
13347         then
13348
13349         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13350         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13351
13352         fi
13353
13354         echo "$as_me:13354: checking whether to use struct dirent64" >&5
13355 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13356 if test "${cf_cv_struct_dirent64+set}" = set; then
13357   echo $ECHO_N "(cached) $ECHO_C" >&6
13358 else
13359
13360                 cat >"conftest.$ac_ext" <<_ACEOF
13361 #line 13361 "configure"
13362 #include "confdefs.h"
13363
13364 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13365 #include <sys/types.h>
13366 #include <dirent.h>
13367
13368 int
13369 main (void)
13370 {
13371
13372                 /* if transitional largefile support is setup, this is true */
13373                 extern struct dirent64 * readdir(DIR *);
13374                 struct dirent64 *x = readdir((DIR *)0);
13375                 struct dirent *y = readdir((DIR *)0);
13376                 int z = x - y;
13377                 (void)z;
13378
13379   ;
13380   return 0;
13381 }
13382 _ACEOF
13383 rm -f "conftest.$ac_objext"
13384 if { (eval echo "$as_me:13384: \"$ac_compile\"") >&5
13385   (eval $ac_compile) 2>&5
13386   ac_status=$?
13387   echo "$as_me:13387: \$? = $ac_status" >&5
13388   (exit "$ac_status"); } &&
13389          { ac_try='test -s "conftest.$ac_objext"'
13390   { (eval echo "$as_me:13390: \"$ac_try\"") >&5
13391   (eval $ac_try) 2>&5
13392   ac_status=$?
13393   echo "$as_me:13393: \$? = $ac_status" >&5
13394   (exit "$ac_status"); }; }; then
13395   cf_cv_struct_dirent64=yes
13396 else
13397   echo "$as_me: failed program was:" >&5
13398 cat "conftest.$ac_ext" >&5
13399 cf_cv_struct_dirent64=no
13400 fi
13401 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13402
13403 fi
13404 echo "$as_me:13404: result: $cf_cv_struct_dirent64" >&5
13405 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13406         test "$cf_cv_struct_dirent64" = yes &&
13407 cat >>confdefs.h <<\EOF
13408 #define HAVE_STRUCT_DIRENT64 1
13409 EOF
13410
13411         fi
13412
13413 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13414 echo "$as_me:13414: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13415 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13416
13417 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13418 if test "${enable_tparm_varargs+set}" = set; then
13419   enableval="$enable_tparm_varargs"
13420   with_tparm_varargs=$enableval
13421 else
13422   with_tparm_varargs=yes
13423 fi;
13424 echo "$as_me:13424: result: $with_tparm_varargs" >&5
13425 echo "${ECHO_T}$with_tparm_varargs" >&6
13426 NCURSES_TPARM_VARARGS=0
13427 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13428
13429 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13430 if test "$with_ticlib" != no ; then
13431 echo "$as_me:13431: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13432 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13433
13434 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13435 if test "${enable_tic_depends+set}" = set; then
13436   enableval="$enable_tic_depends"
13437   with_tic_depends=$enableval
13438 else
13439   with_tic_depends=yes
13440 fi;
13441 echo "$as_me:13441: result: $with_tic_depends" >&5
13442 echo "${ECHO_T}$with_tic_depends" >&6
13443 else
13444         with_tic_depends=no
13445 fi
13446
13447 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13448 echo "$as_me:13448: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13449 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13450
13451 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13452 if test "${enable_wattr_macros+set}" = set; then
13453   enableval="$enable_wattr_macros"
13454   with_wattr_macros=$enableval
13455 else
13456   with_wattr_macros=yes
13457 fi;
13458 if [ "x$with_wattr_macros" != xyes ]; then
13459         NCURSES_WATTR_MACROS=0
13460         echo "$as_me:13460: result: yes" >&5
13461 echo "${ECHO_T}yes" >&6
13462 else
13463         NCURSES_WATTR_MACROS=1
13464         echo "$as_me:13464: result: no" >&5
13465 echo "${ECHO_T}no" >&6
13466 fi
13467
13468 echo "$as_me:13468: checking for X11 rgb file" >&5
13469 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13470
13471 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13472 if test "${with_x11_rgb+set}" = set; then
13473   withval="$with_x11_rgb"
13474   RGB_PATH=$withval
13475 else
13476   RGB_PATH=auto
13477 fi;
13478
13479 if test "x$RGB_PATH" = xauto
13480 then
13481         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13482         for cf_path in \
13483                 /opt/local/share/X11/rgb.txt \
13484                 /opt/X11/share/X11/rgb.txt \
13485                 /usr/share/X11/rgb.txt \
13486                 /usr/X11/share/X11/rgb.txt \
13487                 /usr/X11/lib/X11/rgb.txt \
13488                 /usr/lib/X11/rgb.txt \
13489                 /etc/X11/rgb.txt \
13490                 /usr/pkg/lib/X11/rgb.txt \
13491                 /usr/X11R7/lib/X11/rgb.txt \
13492                 /usr/X11R6/lib/X11/rgb.txt \
13493                 /usr/X11R5/lib/X11/rgb.txt \
13494                 /usr/X11R4/lib/X11/rgb.txt \
13495                 /usr/local/lib/X11/rgb.txt \
13496                 /usr/local/share/X11/rgb.txt \
13497                 /usr/lib64/X11/rgb.txt
13498         do
13499                 if test -f "$cf_path" ; then
13500                         RGB_PATH="$cf_path"
13501                         break
13502                 fi
13503         done
13504 else
13505         cf_path=$RGB_PATH
13506
13507 if test "x$prefix" != xNONE; then
13508         cf_path_syntax="$prefix"
13509 else
13510         cf_path_syntax="$ac_default_prefix"
13511 fi
13512
13513 case ".$cf_path" in
13514 (.\$\(*\)*|.\'*\'*)
13515         ;;
13516 (..|./*|.\\*)
13517         ;;
13518 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13519         ;;
13520 (.\$\{*prefix\}*|.\$\{*dir\}*)
13521         eval cf_path="$cf_path"
13522         case ".$cf_path" in
13523         (.NONE/*)
13524                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13525                 ;;
13526         esac
13527         ;;
13528 (.no|.NONE/*)
13529         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13530         ;;
13531 (*)
13532         { { echo "$as_me:13532: error: expected a pathname, not \"$cf_path\"" >&5
13533 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13534    { (exit 1); exit 1; }; }
13535         ;;
13536 esac
13537
13538 fi
13539
13540 echo "$as_me:13540: result: $RGB_PATH" >&5
13541 echo "${ECHO_T}$RGB_PATH" >&6
13542
13543 cat >>confdefs.h <<EOF
13544 #define RGB_PATH "$cf_path"
13545 EOF
13546
13547 no_x11_rgb=
13548 if test "$RGB_PATH" = no
13549 then
13550         no_x11_rgb="#"
13551 fi
13552
13553 ###   use option --with-bool to override bool's type
13554 echo "$as_me:13554: checking for type of bool" >&5
13555 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13556
13557 # Check whether --with-bool or --without-bool was given.
13558 if test "${with_bool+set}" = set; then
13559   withval="$with_bool"
13560   NCURSES_BOOL="$withval"
13561 else
13562   NCURSES_BOOL=auto
13563 fi;
13564 echo "$as_me:13564: result: $NCURSES_BOOL" >&5
13565 echo "${ECHO_T}$NCURSES_BOOL" >&6
13566
13567 echo "$as_me:13567: checking for alternate terminal capabilities file" >&5
13568 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13569
13570 # Check whether --with-caps or --without-caps was given.
13571 if test "${with_caps+set}" = set; then
13572   withval="$with_caps"
13573   TERMINFO_CAPS=Caps.$withval
13574 else
13575   TERMINFO_CAPS=Caps
13576 fi;
13577 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13578 echo "$as_me:13578: result: $TERMINFO_CAPS" >&5
13579 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13580
13581 ###   use option --with-chtype to override chtype's type
13582 echo "$as_me:13582: checking for type of chtype" >&5
13583 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13584
13585 # Check whether --with-chtype or --without-chtype was given.
13586 if test "${with_chtype+set}" = set; then
13587   withval="$with_chtype"
13588   NCURSES_CHTYPE="$withval"
13589 else
13590   NCURSES_CHTYPE=$cf_dft_chtype
13591 fi;
13592 echo "$as_me:13592: result: $NCURSES_CHTYPE" >&5
13593 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13594
13595 ###   use option --with-ospeed to override ospeed's type
13596 echo "$as_me:13596: checking for type of ospeed" >&5
13597 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13598
13599 # Check whether --with-ospeed or --without-ospeed was given.
13600 if test "${with_ospeed+set}" = set; then
13601   withval="$with_ospeed"
13602   NCURSES_OSPEED="$withval"
13603 else
13604   NCURSES_OSPEED=short
13605 fi;
13606 echo "$as_me:13606: result: $NCURSES_OSPEED" >&5
13607 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13608
13609 ###   use option --with-mmask-t to override mmask_t's type
13610 echo "$as_me:13610: checking for type of mmask_t" >&5
13611 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13612
13613 # Check whether --with-mmask-t or --without-mmask-t was given.
13614 if test "${with_mmask_t+set}" = set; then
13615   withval="$with_mmask_t"
13616   NCURSES_MMASK_T="$withval"
13617 else
13618   NCURSES_MMASK_T=$cf_dft_mmask_t
13619 fi;
13620 echo "$as_me:13620: result: $NCURSES_MMASK_T" >&5
13621 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13622
13623 ###   use option --with-ccharw-max to override CCHARW_MAX size
13624 echo "$as_me:13624: checking for size CCHARW_MAX" >&5
13625 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13626
13627 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13628 if test "${with_ccharw_max+set}" = set; then
13629   withval="$with_ccharw_max"
13630   NCURSES_CCHARW_MAX="$withval"
13631 else
13632   NCURSES_CCHARW_MAX=5
13633 fi;
13634 echo "$as_me:13634: result: $NCURSES_CCHARW_MAX" >&5
13635 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13636
13637 echo "$as_me:13637: checking for ANSI C header files" >&5
13638 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13639 if test "${ac_cv_header_stdc+set}" = set; then
13640   echo $ECHO_N "(cached) $ECHO_C" >&6
13641 else
13642   cat >"conftest.$ac_ext" <<_ACEOF
13643 #line 13643 "configure"
13644 #include "confdefs.h"
13645 #include <stdlib.h>
13646 #include <stdarg.h>
13647 #include <string.h>
13648 #include <float.h>
13649
13650 _ACEOF
13651 if { (eval echo "$as_me:13651: \"$ac_cpp "conftest.$ac_ext"\"") >&5
13652   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
13653   ac_status=$?
13654   $EGREP -v '^ *\+' conftest.er1 >conftest.err
13655   rm -f conftest.er1
13656   cat conftest.err >&5
13657   echo "$as_me:13657: \$? = $ac_status" >&5
13658   (exit "$ac_status"); } >/dev/null; then
13659   if test -s conftest.err; then
13660     ac_cpp_err=$ac_c_preproc_warn_flag
13661   else
13662     ac_cpp_err=
13663   fi
13664 else
13665   ac_cpp_err=yes
13666 fi
13667 if test -z "$ac_cpp_err"; then
13668   ac_cv_header_stdc=yes
13669 else
13670   echo "$as_me: failed program was:" >&5
13671   cat "conftest.$ac_ext" >&5
13672   ac_cv_header_stdc=no
13673 fi
13674 rm -f conftest.err "conftest.$ac_ext"
13675
13676 if test $ac_cv_header_stdc = yes; then
13677   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13678   cat >"conftest.$ac_ext" <<_ACEOF
13679 #line 13679 "configure"
13680 #include "confdefs.h"
13681 #include <string.h>
13682
13683 _ACEOF
13684 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13685   $EGREP "memchr" >/dev/null 2>&1; then
13686   :
13687 else
13688   ac_cv_header_stdc=no
13689 fi
13690 rm -rf conftest*
13691
13692 fi
13693
13694 if test $ac_cv_header_stdc = yes; then
13695   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13696   cat >"conftest.$ac_ext" <<_ACEOF
13697 #line 13697 "configure"
13698 #include "confdefs.h"
13699 #include <stdlib.h>
13700
13701 _ACEOF
13702 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13703   $EGREP "free" >/dev/null 2>&1; then
13704   :
13705 else
13706   ac_cv_header_stdc=no
13707 fi
13708 rm -rf conftest*
13709
13710 fi
13711
13712 if test $ac_cv_header_stdc = yes; then
13713   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13714   if test "$cross_compiling" = yes; then
13715   :
13716 else
13717   cat >"conftest.$ac_ext" <<_ACEOF
13718 #line 13718 "configure"
13719 #include "confdefs.h"
13720 #include <ctype.h>
13721 #if ((' ' & 0x0FF) == 0x020)
13722 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13723 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13724 #else
13725 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13726                      || ('j' <= (c) && (c) <= 'r') \
13727                      || ('s' <= (c) && (c) <= 'z'))
13728 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13729 #endif
13730
13731 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13732 int
13733 main (void)
13734 {
13735   int i;
13736   for (i = 0; i < 256; i++)
13737     if (XOR (islower (i), ISLOWER (i))
13738         || toupper (i) != TOUPPER (i))
13739       $ac_main_return(2);
13740   $ac_main_return (0);
13741 }
13742 _ACEOF
13743 rm -f "conftest$ac_exeext"
13744 if { (eval echo "$as_me:13744: \"$ac_link\"") >&5
13745   (eval $ac_link) 2>&5
13746   ac_status=$?
13747   echo "$as_me:13747: \$? = $ac_status" >&5
13748   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
13749   { (eval echo "$as_me:13749: \"$ac_try\"") >&5
13750   (eval $ac_try) 2>&5
13751   ac_status=$?
13752   echo "$as_me:13752: \$? = $ac_status" >&5
13753   (exit "$ac_status"); }; }; then
13754   :
13755 else
13756   echo "$as_me: program exited with status $ac_status" >&5
13757 echo "$as_me: failed program was:" >&5
13758 cat "conftest.$ac_ext" >&5
13759 ac_cv_header_stdc=no
13760 fi
13761 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
13762 fi
13763 fi
13764 fi
13765 echo "$as_me:13765: result: $ac_cv_header_stdc" >&5
13766 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13767 if test $ac_cv_header_stdc = yes; then
13768
13769 cat >>confdefs.h <<\EOF
13770 #define STDC_HEADERS 1
13771 EOF
13772
13773 fi
13774
13775 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13776
13777 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13778                   inttypes.h stdint.h unistd.h
13779 do
13780 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13781 echo "$as_me:13781: checking for $ac_header" >&5
13782 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13783 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13784   echo $ECHO_N "(cached) $ECHO_C" >&6
13785 else
13786   cat >"conftest.$ac_ext" <<_ACEOF
13787 #line 13787 "configure"
13788 #include "confdefs.h"
13789 $ac_includes_default
13790 #include <$ac_header>
13791 _ACEOF
13792 rm -f "conftest.$ac_objext"
13793 if { (eval echo "$as_me:13793: \"$ac_compile\"") >&5
13794   (eval $ac_compile) 2>&5
13795   ac_status=$?
13796   echo "$as_me:13796: \$? = $ac_status" >&5
13797   (exit "$ac_status"); } &&
13798          { ac_try='test -s "conftest.$ac_objext"'
13799   { (eval echo "$as_me:13799: \"$ac_try\"") >&5
13800   (eval $ac_try) 2>&5
13801   ac_status=$?
13802   echo "$as_me:13802: \$? = $ac_status" >&5
13803   (exit "$ac_status"); }; }; then
13804   eval "$as_ac_Header=yes"
13805 else
13806   echo "$as_me: failed program was:" >&5
13807 cat "conftest.$ac_ext" >&5
13808 eval "$as_ac_Header=no"
13809 fi
13810 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13811 fi
13812 echo "$as_me:13812: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
13813 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
13814 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
13815   cat >>confdefs.h <<EOF
13816 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13817 EOF
13818
13819 fi
13820 done
13821
13822 echo "$as_me:13822: checking for signed char" >&5
13823 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13824 if test "${ac_cv_type_signed_char+set}" = set; then
13825   echo $ECHO_N "(cached) $ECHO_C" >&6
13826 else
13827   cat >"conftest.$ac_ext" <<_ACEOF
13828 #line 13828 "configure"
13829 #include "confdefs.h"
13830 $ac_includes_default
13831 int
13832 main (void)
13833 {
13834 if ((signed char *) 0)
13835   return 0;
13836 if (sizeof (signed char))
13837   return 0;
13838   ;
13839   return 0;
13840 }
13841 _ACEOF
13842 rm -f "conftest.$ac_objext"
13843 if { (eval echo "$as_me:13843: \"$ac_compile\"") >&5
13844   (eval $ac_compile) 2>&5
13845   ac_status=$?
13846   echo "$as_me:13846: \$? = $ac_status" >&5
13847   (exit "$ac_status"); } &&
13848          { ac_try='test -s "conftest.$ac_objext"'
13849   { (eval echo "$as_me:13849: \"$ac_try\"") >&5
13850   (eval $ac_try) 2>&5
13851   ac_status=$?
13852   echo "$as_me:13852: \$? = $ac_status" >&5
13853   (exit "$ac_status"); }; }; then
13854   ac_cv_type_signed_char=yes
13855 else
13856   echo "$as_me: failed program was:" >&5
13857 cat "conftest.$ac_ext" >&5
13858 ac_cv_type_signed_char=no
13859 fi
13860 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13861 fi
13862 echo "$as_me:13862: result: $ac_cv_type_signed_char" >&5
13863 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13864
13865 echo "$as_me:13865: checking size of signed char" >&5
13866 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13867 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13868   echo $ECHO_N "(cached) $ECHO_C" >&6
13869 else
13870   if test "$ac_cv_type_signed_char" = yes; then
13871   if test "$cross_compiling" = yes; then
13872   # Depending upon the size, compute the lo and hi bounds.
13873 cat >"conftest.$ac_ext" <<_ACEOF
13874 #line 13874 "configure"
13875 #include "confdefs.h"
13876 $ac_includes_default
13877 int
13878 main (void)
13879 {
13880 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13881   ;
13882   return 0;
13883 }
13884 _ACEOF
13885 rm -f "conftest.$ac_objext"
13886 if { (eval echo "$as_me:13886: \"$ac_compile\"") >&5
13887   (eval $ac_compile) 2>&5
13888   ac_status=$?
13889   echo "$as_me:13889: \$? = $ac_status" >&5
13890   (exit "$ac_status"); } &&
13891          { ac_try='test -s "conftest.$ac_objext"'
13892   { (eval echo "$as_me:13892: \"$ac_try\"") >&5
13893   (eval $ac_try) 2>&5
13894   ac_status=$?
13895   echo "$as_me:13895: \$? = $ac_status" >&5
13896   (exit "$ac_status"); }; }; then
13897   ac_lo=0 ac_mid=0
13898   while :; do
13899     cat >"conftest.$ac_ext" <<_ACEOF
13900 #line 13900 "configure"
13901 #include "confdefs.h"
13902 $ac_includes_default
13903 int
13904 main (void)
13905 {
13906 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13907   ;
13908   return 0;
13909 }
13910 _ACEOF
13911 rm -f "conftest.$ac_objext"
13912 if { (eval echo "$as_me:13912: \"$ac_compile\"") >&5
13913   (eval $ac_compile) 2>&5
13914   ac_status=$?
13915   echo "$as_me:13915: \$? = $ac_status" >&5
13916   (exit "$ac_status"); } &&
13917          { ac_try='test -s "conftest.$ac_objext"'
13918   { (eval echo "$as_me:13918: \"$ac_try\"") >&5
13919   (eval $ac_try) 2>&5
13920   ac_status=$?
13921   echo "$as_me:13921: \$? = $ac_status" >&5
13922   (exit "$ac_status"); }; }; then
13923   ac_hi=$ac_mid; break
13924 else
13925   echo "$as_me: failed program was:" >&5
13926 cat "conftest.$ac_ext" >&5
13927 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
13928 fi
13929 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13930   done
13931 else
13932   echo "$as_me: failed program was:" >&5
13933 cat "conftest.$ac_ext" >&5
13934 ac_hi=-1 ac_mid=-1
13935   while :; do
13936     cat >"conftest.$ac_ext" <<_ACEOF
13937 #line 13937 "configure"
13938 #include "confdefs.h"
13939 $ac_includes_default
13940 int
13941 main (void)
13942 {
13943 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13944   ;
13945   return 0;
13946 }
13947 _ACEOF
13948 rm -f "conftest.$ac_objext"
13949 if { (eval echo "$as_me:13949: \"$ac_compile\"") >&5
13950   (eval $ac_compile) 2>&5
13951   ac_status=$?
13952   echo "$as_me:13952: \$? = $ac_status" >&5
13953   (exit "$ac_status"); } &&
13954          { ac_try='test -s "conftest.$ac_objext"'
13955   { (eval echo "$as_me:13955: \"$ac_try\"") >&5
13956   (eval $ac_try) 2>&5
13957   ac_status=$?
13958   echo "$as_me:13958: \$? = $ac_status" >&5
13959   (exit "$ac_status"); }; }; then
13960   ac_lo=$ac_mid; break
13961 else
13962   echo "$as_me: failed program was:" >&5
13963 cat "conftest.$ac_ext" >&5
13964 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
13965 fi
13966 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13967   done
13968 fi
13969 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13970 # Binary search between lo and hi bounds.
13971 while test "x$ac_lo" != "x$ac_hi"; do
13972   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
13973   cat >"conftest.$ac_ext" <<_ACEOF
13974 #line 13974 "configure"
13975 #include "confdefs.h"
13976 $ac_includes_default
13977 int
13978 main (void)
13979 {
13980 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13981   ;
13982   return 0;
13983 }
13984 _ACEOF
13985 rm -f "conftest.$ac_objext"
13986 if { (eval echo "$as_me:13986: \"$ac_compile\"") >&5
13987   (eval $ac_compile) 2>&5
13988   ac_status=$?
13989   echo "$as_me:13989: \$? = $ac_status" >&5
13990   (exit "$ac_status"); } &&
13991          { ac_try='test -s "conftest.$ac_objext"'
13992   { (eval echo "$as_me:13992: \"$ac_try\"") >&5
13993   (eval $ac_try) 2>&5
13994   ac_status=$?
13995   echo "$as_me:13995: \$? = $ac_status" >&5
13996   (exit "$ac_status"); }; }; then
13997   ac_hi=$ac_mid
13998 else
13999   echo "$as_me: failed program was:" >&5
14000 cat "conftest.$ac_ext" >&5
14001 ac_lo=`expr "$ac_mid" + 1`
14002 fi
14003 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14004 done
14005 ac_cv_sizeof_signed_char=$ac_lo
14006 else
14007   if test "$cross_compiling" = yes; then
14008   { { echo "$as_me:14008: error: cannot run test program while cross compiling" >&5
14009 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14010    { (exit 1); exit 1; }; }
14011 else
14012   cat >"conftest.$ac_ext" <<_ACEOF
14013 #line 14013 "configure"
14014 #include "confdefs.h"
14015 $ac_includes_default
14016 int
14017 main (void)
14018 {
14019 FILE *f = fopen ("conftest.val", "w");
14020 if (!f)
14021   $ac_main_return (1);
14022 fprintf (f, "%d", (sizeof (signed char)));
14023 fclose (f);
14024   ;
14025   return 0;
14026 }
14027 _ACEOF
14028 rm -f "conftest$ac_exeext"
14029 if { (eval echo "$as_me:14029: \"$ac_link\"") >&5
14030   (eval $ac_link) 2>&5
14031   ac_status=$?
14032   echo "$as_me:14032: \$? = $ac_status" >&5
14033   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14034   { (eval echo "$as_me:14034: \"$ac_try\"") >&5
14035   (eval $ac_try) 2>&5
14036   ac_status=$?
14037   echo "$as_me:14037: \$? = $ac_status" >&5
14038   (exit "$ac_status"); }; }; then
14039   ac_cv_sizeof_signed_char=`cat conftest.val`
14040 else
14041   echo "$as_me: program exited with status $ac_status" >&5
14042 echo "$as_me: failed program was:" >&5
14043 cat "conftest.$ac_ext" >&5
14044 fi
14045 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14046 fi
14047 fi
14048 rm -f conftest.val
14049 else
14050   ac_cv_sizeof_signed_char=0
14051 fi
14052 fi
14053 echo "$as_me:14053: result: $ac_cv_sizeof_signed_char" >&5
14054 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14055 cat >>confdefs.h <<EOF
14056 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14057 EOF
14058
14059 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14060         NCURSES_SBOOL="signed char"
14061 else
14062         NCURSES_SBOOL="char"
14063 fi
14064 echo "$as_me:14064: checking if you want to use signed Boolean array in term.h" >&5
14065 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14066
14067 # Check whether --enable-signed-char or --disable-signed-char was given.
14068 if test "${enable_signed_char+set}" = set; then
14069   enableval="$enable_signed_char"
14070   with_signed_char=$enableval
14071 else
14072   with_signed_char=no
14073 fi;
14074 echo "$as_me:14074: result: $with_signed_char" >&5
14075 echo "${ECHO_T}$with_signed_char" >&6
14076 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14077
14078 ###   use option --with-tparm-arg to override tparm's argument type
14079 echo "$as_me:14079: checking for type of tparm args" >&5
14080 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14081
14082 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14083 if test "${with_tparm_arg+set}" = set; then
14084   withval="$with_tparm_arg"
14085   NCURSES_TPARM_ARG="$withval"
14086 else
14087   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14088 fi;
14089 echo "$as_me:14089: result: $NCURSES_TPARM_ARG" >&5
14090 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14091
14092 ### Enable compiling-in rcs id's
14093 echo "$as_me:14093: checking if RCS identifiers should be compiled-in" >&5
14094 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14095
14096 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14097 if test "${with_rcs_ids+set}" = set; then
14098   withval="$with_rcs_ids"
14099   with_rcs_ids=$withval
14100 else
14101   with_rcs_ids=no
14102 fi;
14103 echo "$as_me:14103: result: $with_rcs_ids" >&5
14104 echo "${ECHO_T}$with_rcs_ids" >&6
14105 test "x$with_rcs_ids" = xyes &&
14106 cat >>confdefs.h <<\EOF
14107 #define USE_RCS_IDS 1
14108 EOF
14109
14110 ###############################################################################
14111
14112 echo "$as_me:14112: checking format of man-pages" >&5
14113 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14114
14115 # Check whether --with-manpage-format or --without-manpage-format was given.
14116 if test "${with_manpage_format+set}" = set; then
14117   withval="$with_manpage_format"
14118   MANPAGE_FORMAT=$withval
14119 else
14120   MANPAGE_FORMAT=unknown
14121 fi;
14122
14123 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14124 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14125
14126 cf_unknown=
14127
14128 case "$MANPAGE_FORMAT" in
14129 (unknown)
14130         if test -z "$MANPATH" ; then
14131                 MANPATH="/usr/man:/usr/share/man"
14132         fi
14133
14134         # look for the 'date' man-page (it's most likely to be installed!)
14135         MANPAGE_FORMAT=
14136         cf_preform="no"
14137         cf_catonly="yes"
14138         cf_example="date"
14139
14140         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14141         for cf_dir in $MANPATH; do
14142                 test -z "$cf_dir" && cf_dir=/usr/man
14143                 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
14144                 do
14145                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14146                         if test "x$cf_test" = "x$cf_name" ; then
14147
14148                                 case "$cf_name" in
14149                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14150                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14151                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14152                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14153                                 esac
14154
14155                                 case "$cf_name" in
14156                                 ($cf_dir/man*)
14157                                         cf_catonly=no
14158                                         ;;
14159                                 ($cf_dir/cat*)
14160                                         cf_preform=yes
14161                                         ;;
14162                                 esac
14163                                 break
14164                         fi
14165
14166                         # if we found a match in either man* or cat*, stop looking
14167                         if test -n "$MANPAGE_FORMAT" ; then
14168                                 cf_found=no
14169                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14170                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14171                                 case "$cf_name" in
14172                                 ($cf_dir/cat*)
14173                                         cf_found=yes
14174                                         ;;
14175                                 esac
14176                                 test "$cf_found" = yes && break
14177                         fi
14178                 done
14179                 # only check the first directory in $MANPATH where we find manpages
14180                 if test -n "$MANPAGE_FORMAT" ; then
14181                         break
14182                 fi
14183         done
14184         # if we did not find the example, just assume it is normal
14185         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14186         IFS="$ac_save_ifs"
14187         ;;
14188 (*)
14189         for cf_option in $MANPAGE_FORMAT; do
14190         case "$cf_option" in
14191         (gzip|compress|BSDI|normal|formatted|catonly)
14192                 ;;
14193         (*)
14194                 cf_unknown="$cf_unknown $cf_option"
14195                 ;;
14196         esac
14197         done
14198         ;;
14199 esac
14200
14201 echo "$as_me:14201: result: $MANPAGE_FORMAT" >&5
14202 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14203 if test -n "$cf_unknown" ; then
14204         { echo "$as_me:14204: WARNING: Unexpected manpage-format $cf_unknown" >&5
14205 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14206 fi
14207
14208 echo "$as_me:14208: checking for manpage renaming" >&5
14209 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14210
14211 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14212 if test "${with_manpage_renames+set}" = set; then
14213   withval="$with_manpage_renames"
14214   MANPAGE_RENAMES=$withval
14215 else
14216   MANPAGE_RENAMES=yes
14217 fi;
14218
14219 case ".$MANPAGE_RENAMES" in
14220 (.no)
14221         ;;
14222 (.|.yes)
14223         # Debian 'man' program?
14224         if test -f /etc/debian_version ; then
14225                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14226         else
14227                 MANPAGE_RENAMES=no
14228         fi
14229         ;;
14230 esac
14231
14232 if test "$MANPAGE_RENAMES" != no ; then
14233         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14234                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14235         elif test ! -f "$MANPAGE_RENAMES" ; then
14236                 { { echo "$as_me:14236: error: not a filename: $MANPAGE_RENAMES" >&5
14237 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14238    { (exit 1); exit 1; }; }
14239         fi
14240
14241         test ! -d man && mkdir man
14242
14243         # Construct a sed-script to perform renaming within man-pages
14244         if test -n "$MANPAGE_RENAMES" ; then
14245                 test ! -d man && mkdir man
14246                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14247         fi
14248 fi
14249
14250 echo "$as_me:14250: result: $MANPAGE_RENAMES" >&5
14251 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14252
14253 echo "$as_me:14253: checking if manpage aliases will be installed" >&5
14254 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14255
14256 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14257 if test "${with_manpage_aliases+set}" = set; then
14258   withval="$with_manpage_aliases"
14259   MANPAGE_ALIASES=$withval
14260 else
14261   MANPAGE_ALIASES=yes
14262 fi;
14263
14264 echo "$as_me:14264: result: $MANPAGE_ALIASES" >&5
14265 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14266
14267 case "x$LN_S" in
14268 (xln*)
14269         cf_use_symlinks=yes
14270         ;;
14271 (*)
14272         cf_use_symlinks=no
14273         ;;
14274 esac
14275
14276 MANPAGE_SYMLINKS=no
14277 if test "$MANPAGE_ALIASES" = yes ; then
14278 echo "$as_me:14278: checking if manpage symlinks should be used" >&5
14279 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14280
14281 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14282 if test "${with_manpage_symlinks+set}" = set; then
14283   withval="$with_manpage_symlinks"
14284   MANPAGE_SYMLINKS=$withval
14285 else
14286   MANPAGE_SYMLINKS=$cf_use_symlinks
14287 fi;
14288
14289 if test "$$cf_use_symlinks" = no; then
14290 if test "$MANPAGE_SYMLINKS" = yes ; then
14291         { echo "$as_me:14291: WARNING: cannot make symlinks" >&5
14292 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14293         MANPAGE_SYMLINKS=no
14294 fi
14295 fi
14296
14297 echo "$as_me:14297: result: $MANPAGE_SYMLINKS" >&5
14298 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14299 fi
14300
14301 echo "$as_me:14301: checking for manpage tbl" >&5
14302 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14303
14304 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14305 if test "${with_manpage_tbl+set}" = set; then
14306   withval="$with_manpage_tbl"
14307   MANPAGE_TBL=$withval
14308 else
14309   MANPAGE_TBL=no
14310 fi;
14311
14312 echo "$as_me:14312: result: $MANPAGE_TBL" >&5
14313 echo "${ECHO_T}$MANPAGE_TBL" >&6
14314
14315 if test "$prefix" = "NONE" ; then
14316         cf_prefix="$ac_default_prefix"
14317 else
14318         cf_prefix="$prefix"
14319 fi
14320
14321 case "$MANPAGE_FORMAT" in
14322 (*catonly*)
14323         cf_format=yes
14324         cf_inboth=no
14325         ;;
14326 (*formatted*)
14327         cf_format=yes
14328         cf_inboth=yes
14329         ;;
14330 (*)
14331         cf_format=no
14332         cf_inboth=no
14333         ;;
14334 esac
14335
14336 test ! -d man && mkdir man
14337
14338 cf_so_strip=
14339 cf_compress=
14340 case "$MANPAGE_FORMAT" in
14341 (*compress*)
14342         cf_so_strip="Z"
14343         cf_compress=compress
14344         ;;
14345 (*gzip*)
14346         cf_so_strip="gz"
14347         cf_compress=gzip
14348         ;;
14349 esac
14350
14351 cf_edit_man=./edit_man.sh
14352 cf_man_alias=`pwd`/man_alias.sed
14353
14354 cat >$cf_edit_man <<CF_EOF
14355 #! $SHELL
14356 # this script is generated by the configure-script CF_MAN_PAGES macro.
14357
14358 prefix="$cf_prefix"
14359 datarootdir="$datarootdir"
14360 datadir="$datadir"
14361
14362 NCURSES_MAJOR="$NCURSES_MAJOR"
14363 NCURSES_MINOR="$NCURSES_MINOR"
14364 NCURSES_PATCH="$NCURSES_PATCH"
14365
14366 NCURSES_OSPEED="$NCURSES_OSPEED"
14367 TERMINFO="$TERMINFO"
14368
14369 INSTALL="$INSTALL"
14370 INSTALL_DATA="$INSTALL_DATA"
14371
14372 transform="$program_transform_name"
14373
14374 TMP=\${TMPDIR:=/tmp}/man\$\$
14375 trap "rm -f \$TMP" 0 1 2 3 15
14376
14377 form=\$1
14378 shift || exit 1
14379
14380 verb=\$1
14381 shift || exit 1
14382
14383 mandir=\$1
14384 shift || exit 1
14385
14386 srcdir=\$1
14387 top_srcdir=\$srcdir/..
14388 shift || exit 1
14389
14390 if test "\$form" = normal ; then
14391         if test "$cf_format" = yes ; then
14392         if test "$cf_inboth" = no ; then
14393                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14394                 exit $?
14395         fi
14396         fi
14397         cf_subdir=\$mandir/man
14398         cf_tables=$MANPAGE_TBL
14399 else
14400         cf_subdir=\$mandir/cat
14401         cf_tables=yes
14402 fi
14403
14404 # process the list of source-files
14405 for i in "\$@" ; do
14406 case \$i in
14407 (*.orig|*.rej) ;;
14408 (*.[0-9]*)
14409         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14410         if test "\$verb" = installing ; then
14411         if test ! -d "\$cf_subdir\${section}" ; then
14412                 mkdir -p "\$cf_subdir\$section"
14413         fi
14414         fi
14415
14416         # replace variables in man page
14417         if test ! -f "$cf_man_alias" ; then
14418 cat >>$cf_man_alias <<-CF_EOF2
14419                 s,@DATADIR@,\$datadir,g
14420                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14421                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14422                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14423                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14424                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14425                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14426 CF_EOF
14427
14428         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14429         do
14430                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14431                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14432 cat >>$cf_edit_man <<-CF_EOF
14433                 s,@$cf_NAME@,$cf_name,g
14434 CF_EOF
14435         done
14436
14437 cat >>$cf_edit_man <<CF_EOF
14438 CF_EOF2
14439                 echo "...made $cf_man_alias"
14440         fi
14441
14442         aliases=
14443         cf_source=\`basename "\$i"\`
14444         inalias=\$cf_source
14445         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14446         if test ! -f "\$inalias" ; then
14447                 echo ".. skipped \$cf_source"
14448                 continue
14449         fi
14450 CF_EOF
14451
14452 if test "$MANPAGE_ALIASES" != no ; then
14453 cat >>$cf_edit_man <<CF_EOF
14454         nCurses=ignore.3x
14455         test "$with_curses_h" = yes && nCurses=ncurses.3x
14456         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14457 CF_EOF
14458 fi
14459
14460 if test "$MANPAGE_RENAMES" = no ; then
14461 cat >>$cf_edit_man <<CF_EOF
14462         # perform program transformations for section 1 man pages
14463         if test \$section = 1 ; then
14464                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14465         else
14466                 cf_target=\$cf_subdir\${section}/\$cf_source
14467         fi
14468 CF_EOF
14469 else
14470 cat >>$cf_edit_man <<CF_EOF
14471         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14472         if test -z "\$cf_target" ; then
14473                 echo "? missing rename for \$cf_source"
14474                 cf_target="\$cf_source"
14475         fi
14476         cf_target="\$cf_subdir\${section}/\${cf_target}"
14477
14478 CF_EOF
14479 fi
14480
14481 cat >>$cf_edit_man <<CF_EOF
14482         sed     -f "$cf_man_alias" \\
14483 CF_EOF
14484
14485 if test -f "$MANPAGE_RENAMES" ; then
14486 cat >>$cf_edit_man <<CF_EOF
14487                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14488 CF_EOF
14489 else
14490 cat >>$cf_edit_man <<CF_EOF
14491                 < "\$i" >\$TMP
14492 CF_EOF
14493 fi
14494
14495 cat >>$cf_edit_man <<CF_EOF
14496 if test \$cf_tables = yes ; then
14497         tbl \$TMP >\$TMP.out
14498         mv \$TMP.out \$TMP
14499 fi
14500 CF_EOF
14501
14502 if test "$with_overwrite" != yes ; then
14503 cat >>$cf_edit_man <<CF_EOF
14504         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14505         mv \$TMP.out \$TMP
14506 CF_EOF
14507 fi
14508
14509 if test "$with_curses_h" != yes ; then
14510 cat >>$cf_edit_man <<CF_EOF
14511         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14512         mv \$TMP.out \$TMP
14513 CF_EOF
14514 fi
14515
14516 cat >>$cf_edit_man <<CF_EOF
14517         if test "\$form" = format ; then
14518                 nroff -man \$TMP >\$TMP.out
14519                 mv \$TMP.out \$TMP
14520         fi
14521 CF_EOF
14522
14523 if test -n "$cf_compress" ; then
14524 cat >>$cf_edit_man <<CF_EOF
14525         if test "\$verb" = installing ; then
14526         if ( "$cf_compress" -f \$TMP )
14527         then
14528                 mv \$TMP.$cf_so_strip \$TMP
14529         fi
14530         fi
14531         cf_target="\$cf_target.$cf_so_strip"
14532 CF_EOF
14533 fi
14534
14535 case "$MANPAGE_FORMAT" in
14536 (*BSDI*)
14537 cat >>$cf_edit_man <<CF_EOF
14538         if test "\$form" = format ; then
14539                 # BSDI installs only .0 suffixes in the cat directories
14540                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14541         fi
14542 CF_EOF
14543   ;;
14544 esac
14545
14546 cat >>$cf_edit_man <<CF_EOF
14547         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14548         if test "\$verb" = installing ; then
14549                 echo "\$verb \$cf_target"
14550                 \$INSTALL_DATA \$TMP "\$cf_target"
14551                 test -d "\$cf_subdir\${section}" &&
14552                 test -n "\$aliases" && (
14553                         cd "\$cf_subdir\${section}" && (
14554                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14555                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14556                                 cf_target=\`basename "\$cf_target"\`
14557                                 for cf_alias in \$aliases
14558                                 do
14559                                         if test "\$section" = 1 ; then
14560                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14561                                         fi
14562
14563                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14564                                                 if test -f "\$cf_alias\${suffix}" ; then
14565                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14566                                                         then
14567                                                                 continue
14568                                                         fi
14569                                                 fi
14570                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14571 CF_EOF
14572 case "x$LN_S" in
14573 (*-f)
14574 cat >>$cf_edit_man <<CF_EOF
14575                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14576 CF_EOF
14577         ;;
14578 (*)
14579 cat >>$cf_edit_man <<CF_EOF
14580                                                 rm -f "\$cf_alias\${suffix}"
14581                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14582 CF_EOF
14583         ;;
14584 esac
14585 cat >>$cf_edit_man <<CF_EOF
14586                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14587                                                 echo ".so \$cf_source" >\$TMP
14588 CF_EOF
14589 if test -n "$cf_compress" ; then
14590 cat >>$cf_edit_man <<CF_EOF
14591                                                 if test -n "$cf_so_strip" ; then
14592                                                         "$cf_compress" -f \$TMP
14593                                                         mv \$TMP.$cf_so_strip \$TMP
14594                                                 fi
14595 CF_EOF
14596 fi
14597 cat >>$cf_edit_man <<CF_EOF
14598                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14599                                                 rm -f "\$cf_alias\${suffix}"
14600                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
14601                                         fi
14602                                 done
14603                         )
14604                 )
14605         elif test "\$verb" = removing ; then
14606                 test -f "\$cf_target" && (
14607                         echo "\$verb \$cf_target"
14608                         rm -f "\$cf_target"
14609                 )
14610                 test -d "\$cf_subdir\${section}" &&
14611                 test -n "\$aliases" && (
14612                         cd "\$cf_subdir\${section}" && (
14613                                 for cf_alias in \$aliases
14614                                 do
14615                                         if test "\$section" = 1 ; then
14616                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14617                                         fi
14618
14619                                         echo ".. \$verb alias \$cf_alias\${suffix}"
14620                                         rm -f "\$cf_alias\${suffix}"
14621                                 done
14622                         )
14623                 )
14624         else
14625 #               echo ".hy 0"
14626                 cat \$TMP
14627         fi
14628         ;;
14629 esac
14630 done
14631
14632 if test "$cf_inboth" = yes ; then
14633 if test "\$form" != format ; then
14634         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14635 fi
14636 fi
14637
14638 exit 0
14639 CF_EOF
14640 chmod 755 "$cf_edit_man"
14641
14642 ###############################################################################
14643
14644 ### Note that some functions (such as const) are normally disabled anyway.
14645 echo "$as_me:14645: checking if you want to build with function extensions" >&5
14646 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14647
14648 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14649 if test "${enable_ext_funcs+set}" = set; then
14650   enableval="$enable_ext_funcs"
14651   with_ext_funcs=$enableval
14652 else
14653   with_ext_funcs=yes
14654 fi;
14655 echo "$as_me:14655: result: $with_ext_funcs" >&5
14656 echo "${ECHO_T}$with_ext_funcs" >&6
14657 if test "x$with_ext_funcs" = xyes ; then
14658         NCURSES_EXT_FUNCS=1
14659
14660 cat >>confdefs.h <<\EOF
14661 #define NCURSES_EXT_FUNCS 1
14662 EOF
14663
14664 cat >>confdefs.h <<\EOF
14665 #define HAVE_ASSUME_DEFAULT_COLORS 1
14666 EOF
14667
14668 cat >>confdefs.h <<\EOF
14669 #define HAVE_CURSES_VERSION 1
14670 EOF
14671
14672 cat >>confdefs.h <<\EOF
14673 #define HAVE_HAS_KEY 1
14674 EOF
14675
14676 cat >>confdefs.h <<\EOF
14677 #define HAVE_RESIZETERM 1
14678 EOF
14679
14680 cat >>confdefs.h <<\EOF
14681 #define HAVE_RESIZE_TERM 1
14682 EOF
14683
14684 cat >>confdefs.h <<\EOF
14685 #define HAVE_TERM_ENTRY_H 1
14686 EOF
14687
14688 cat >>confdefs.h <<\EOF
14689 #define HAVE_USE_DEFAULT_COLORS 1
14690 EOF
14691
14692 cat >>confdefs.h <<\EOF
14693 #define HAVE_USE_EXTENDED_NAMES 1
14694 EOF
14695
14696 cat >>confdefs.h <<\EOF
14697 #define HAVE_USE_SCREEN 1
14698 EOF
14699
14700 cat >>confdefs.h <<\EOF
14701 #define HAVE_USE_WINDOW 1
14702 EOF
14703
14704 cat >>confdefs.h <<\EOF
14705 #define HAVE_WRESIZE 1
14706 EOF
14707
14708         GENERATED_EXT_FUNCS=generated
14709         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14710 else
14711         NCURSES_EXT_FUNCS=0
14712         GENERATED_EXT_FUNCS=
14713 fi
14714
14715 echo "$as_me:14715: checking if you want to build with SCREEN extensions" >&5
14716 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14717
14718 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14719 if test "${enable_sp_funcs+set}" = set; then
14720   enableval="$enable_sp_funcs"
14721   with_sp_funcs=$enableval
14722 else
14723   with_sp_funcs=$cf_dft_ext_spfuncs
14724 fi;
14725 echo "$as_me:14725: result: $with_sp_funcs" >&5
14726 echo "${ECHO_T}$with_sp_funcs" >&6
14727 if test "x$with_sp_funcs" = xyes ; then
14728         NCURSES_SP_FUNCS=1
14729
14730 cat >>confdefs.h <<\EOF
14731 #define NCURSES_SP_FUNCS 1
14732 EOF
14733
14734 cat >>confdefs.h <<\EOF
14735 #define HAVE_TPUTS_SP 1
14736 EOF
14737
14738         GENERATED_SP_FUNCS=generated
14739 else
14740         NCURSES_SP_FUNCS=0
14741         GENERATED_SP_FUNCS=
14742 fi
14743
14744 echo "$as_me:14744: checking if you want to build with terminal-driver" >&5
14745 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14746
14747 # Check whether --enable-term-driver or --disable-term-driver was given.
14748 if test "${enable_term_driver+set}" = set; then
14749   enableval="$enable_term_driver"
14750   with_term_driver=$enableval
14751 else
14752   with_term_driver=no
14753 fi;
14754 echo "$as_me:14754: result: $with_term_driver" >&5
14755 echo "${ECHO_T}$with_term_driver" >&6
14756 if test "x$with_term_driver" = xyes ; then
14757
14758 cat >>confdefs.h <<\EOF
14759 #define USE_TERM_DRIVER 1
14760 EOF
14761
14762         if test "x$with_termlib" != xno ; then
14763                 { { echo "$as_me:14763: error: The term-driver option conflicts with the termlib option" >&5
14764 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14765    { (exit 1); exit 1; }; }
14766         fi
14767         if test "x$with_sp_funcs" != xyes ; then
14768                 { { echo "$as_me:14768: error: The term-driver option relies upon sp-funcs" >&5
14769 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14770    { (exit 1); exit 1; }; }
14771         fi
14772 fi
14773
14774 ###   use option --enable-const to turn on use of const beyond that in XSI.
14775 echo "$as_me:14775: checking for extended use of const keyword" >&5
14776 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14777
14778 # Check whether --enable-const or --disable-const was given.
14779 if test "${enable_const+set}" = set; then
14780   enableval="$enable_const"
14781   with_ext_const=$enableval
14782 else
14783   with_ext_const=$cf_dft_ext_const
14784 fi;
14785 echo "$as_me:14785: result: $with_ext_const" >&5
14786 echo "${ECHO_T}$with_ext_const" >&6
14787 NCURSES_CONST='/*nothing*/'
14788 if test "x$with_ext_const" = xyes ; then
14789         NCURSES_CONST=const
14790 fi
14791
14792 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14793 echo "$as_me:14793: checking if you want to use extended colors" >&5
14794 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14795
14796 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14797 if test "${enable_ext_colors+set}" = set; then
14798   enableval="$enable_ext_colors"
14799   with_ext_colors=$enableval
14800 else
14801   with_ext_colors=$cf_dft_ext_colors
14802 fi;
14803 echo "$as_me:14803: result: $with_ext_colors" >&5
14804 echo "${ECHO_T}$with_ext_colors" >&6
14805 NCURSES_EXT_COLORS=0
14806 if test "x$with_ext_colors" = xyes ; then
14807         if test "x$with_widec" != xyes ; then
14808                 { echo "$as_me:14808: WARNING: This option applies only to wide-character library" >&5
14809 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14810         else
14811                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14812
14813 if test "${with_abi_version+set}" != set; then
14814         case "$cf_cv_rel_version" in
14815         (5.*)
14816                 cf_cv_rel_version=6.0
14817                 cf_cv_abi_version=6
14818                 { echo "$as_me:14818: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14819 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14820                 ;;
14821         esac
14822 fi
14823
14824                 NCURSES_EXT_COLORS=1
14825
14826 cat >>confdefs.h <<\EOF
14827 #define NCURSES_EXT_COLORS 1
14828 EOF
14829
14830 cat >>confdefs.h <<\EOF
14831 #define HAVE_ALLOC_PAIR 1
14832 EOF
14833
14834 cat >>confdefs.h <<\EOF
14835 #define HAVE_INIT_EXTENDED_COLOR 1
14836 EOF
14837
14838 cat >>confdefs.h <<\EOF
14839 #define HAVE_RESET_COLOR_PAIRS 1
14840 EOF
14841
14842         fi
14843 fi
14844
14845 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14846 echo "$as_me:14846: checking if you want to use extended mouse encoding" >&5
14847 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14848
14849 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14850 if test "${enable_ext_mouse+set}" = set; then
14851   enableval="$enable_ext_mouse"
14852   with_ext_mouse=$enableval
14853 else
14854   with_ext_mouse=$cf_dft_ext_mouse
14855 fi;
14856 echo "$as_me:14856: result: $with_ext_mouse" >&5
14857 echo "${ECHO_T}$with_ext_mouse" >&6
14858 NCURSES_MOUSE_VERSION=1
14859 if test "x$with_ext_mouse" = xyes ; then
14860         NCURSES_MOUSE_VERSION=2
14861
14862 if test "${with_abi_version+set}" != set; then
14863         case "$cf_cv_rel_version" in
14864         (5.*)
14865                 cf_cv_rel_version=6.0
14866                 cf_cv_abi_version=6
14867                 { echo "$as_me:14867: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14868 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14869                 ;;
14870         esac
14871 fi
14872
14873 fi
14874
14875 ###   use option --enable-ext-putwin to turn on extended screendumps
14876 echo "$as_me:14876: checking if you want to use extended putwin/screendump" >&5
14877 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14878
14879 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14880 if test "${enable_ext_putwin+set}" = set; then
14881   enableval="$enable_ext_putwin"
14882   with_ext_putwin=$enableval
14883 else
14884   with_ext_putwin=$cf_dft_ext_putwin
14885 fi;
14886 echo "$as_me:14886: result: $with_ext_putwin" >&5
14887 echo "${ECHO_T}$with_ext_putwin" >&6
14888 if test "x$with_ext_putwin" = xyes ; then
14889
14890 cat >>confdefs.h <<\EOF
14891 #define NCURSES_EXT_PUTWIN 1
14892 EOF
14893
14894 fi
14895
14896 echo "$as_me:14896: checking if you want \$NCURSES_NO_PADDING code" >&5
14897 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14898
14899 # Check whether --enable-no-padding or --disable-no-padding was given.
14900 if test "${enable_no_padding+set}" = set; then
14901   enableval="$enable_no_padding"
14902   with_no_padding=$enableval
14903 else
14904   with_no_padding=$with_ext_funcs
14905 fi;
14906 echo "$as_me:14906: result: $with_no_padding" >&5
14907 echo "${ECHO_T}$with_no_padding" >&6
14908 test "x$with_no_padding" = xyes &&
14909 cat >>confdefs.h <<\EOF
14910 #define NCURSES_NO_PADDING 1
14911 EOF
14912
14913 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14914 echo "$as_me:14914: checking if you want SIGWINCH handler" >&5
14915 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14916
14917 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14918 if test "${enable_sigwinch+set}" = set; then
14919   enableval="$enable_sigwinch"
14920   with_sigwinch=$enableval
14921 else
14922   with_sigwinch=$with_ext_funcs
14923 fi;
14924 echo "$as_me:14924: result: $with_sigwinch" >&5
14925 echo "${ECHO_T}$with_sigwinch" >&6
14926 test "x$with_sigwinch" = xyes &&
14927 cat >>confdefs.h <<\EOF
14928 #define USE_SIGWINCH 1
14929 EOF
14930
14931 ###   use option --enable-tcap-names to allow user to define new capabilities
14932 echo "$as_me:14932: checking if you want user-definable terminal capabilities like termcap" >&5
14933 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14934
14935 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14936 if test "${enable_tcap_names+set}" = set; then
14937   enableval="$enable_tcap_names"
14938   with_tcap_names=$enableval
14939 else
14940   with_tcap_names=$with_ext_funcs
14941 fi;
14942 echo "$as_me:14942: result: $with_tcap_names" >&5
14943 echo "${ECHO_T}$with_tcap_names" >&6
14944 NCURSES_XNAMES=0
14945 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14946
14947 ##############################################################################
14948
14949 echo "$as_me:14949: checking if you want to link with the pthread library" >&5
14950 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14951
14952 # Check whether --with-pthread or --without-pthread was given.
14953 if test "${with_pthread+set}" = set; then
14954   withval="$with_pthread"
14955   with_pthread=$withval
14956 else
14957   with_pthread=no
14958 fi;
14959 echo "$as_me:14959: result: $with_pthread" >&5
14960 echo "${ECHO_T}$with_pthread" >&6
14961
14962 if test "$with_pthread" != no ; then
14963         echo "$as_me:14963: checking for pthread.h" >&5
14964 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14965 if test "${ac_cv_header_pthread_h+set}" = set; then
14966   echo $ECHO_N "(cached) $ECHO_C" >&6
14967 else
14968   cat >"conftest.$ac_ext" <<_ACEOF
14969 #line 14969 "configure"
14970 #include "confdefs.h"
14971 #include <pthread.h>
14972 _ACEOF
14973 if { (eval echo "$as_me:14973: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14974   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14975   ac_status=$?
14976   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14977   rm -f conftest.er1
14978   cat conftest.err >&5
14979   echo "$as_me:14979: \$? = $ac_status" >&5
14980   (exit "$ac_status"); } >/dev/null; then
14981   if test -s conftest.err; then
14982     ac_cpp_err=$ac_c_preproc_warn_flag
14983   else
14984     ac_cpp_err=
14985   fi
14986 else
14987   ac_cpp_err=yes
14988 fi
14989 if test -z "$ac_cpp_err"; then
14990   ac_cv_header_pthread_h=yes
14991 else
14992   echo "$as_me: failed program was:" >&5
14993   cat "conftest.$ac_ext" >&5
14994   ac_cv_header_pthread_h=no
14995 fi
14996 rm -f conftest.err "conftest.$ac_ext"
14997 fi
14998 echo "$as_me:14998: result: $ac_cv_header_pthread_h" >&5
14999 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15000 if test "$ac_cv_header_pthread_h" = yes; then
15001
15002 cat >>confdefs.h <<\EOF
15003 #define HAVE_PTHREADS_H 1
15004 EOF
15005
15006         for cf_lib_pthread in pthread c_r
15007         do
15008             echo "$as_me:15008: checking if we can link with the $cf_lib_pthread library" >&5
15009 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15010             cf_save_LIBS="$LIBS"
15011
15012 cf_add_libs="$LIBS"
15013 # reverse order
15014 cf_add_0lib=
15015 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15016 # filter duplicates
15017 for cf_add_1lib in $cf_add_0lib; do
15018         for cf_add_2lib in $cf_add_libs; do
15019                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15020                         cf_add_1lib=
15021                         break
15022                 fi
15023         done
15024         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15025 done
15026 LIBS="$cf_add_libs"
15027
15028             cat >"conftest.$ac_ext" <<_ACEOF
15029 #line 15029 "configure"
15030 #include "confdefs.h"
15031
15032 #include <pthread.h>
15033
15034 int
15035 main (void)
15036 {
15037
15038                 int rc = pthread_create(0,0,0,0);
15039                 int r2 = pthread_mutexattr_settype(0, 0);
15040
15041   ;
15042   return 0;
15043 }
15044 _ACEOF
15045 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15046 if { (eval echo "$as_me:15046: \"$ac_link\"") >&5
15047   (eval $ac_link) 2>&5
15048   ac_status=$?
15049   echo "$as_me:15049: \$? = $ac_status" >&5
15050   (exit "$ac_status"); } &&
15051          { ac_try='test -s "conftest$ac_exeext"'
15052   { (eval echo "$as_me:15052: \"$ac_try\"") >&5
15053   (eval $ac_try) 2>&5
15054   ac_status=$?
15055   echo "$as_me:15055: \$? = $ac_status" >&5
15056   (exit "$ac_status"); }; }; then
15057   with_pthread=yes
15058 else
15059   echo "$as_me: failed program was:" >&5
15060 cat "conftest.$ac_ext" >&5
15061 with_pthread=no
15062 fi
15063 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15064             LIBS="$cf_save_LIBS"
15065             echo "$as_me:15065: result: $with_pthread" >&5
15066 echo "${ECHO_T}$with_pthread" >&6
15067             test "$with_pthread" = yes && break
15068         done
15069
15070         if test "$with_pthread" = yes ; then
15071
15072 cf_add_libs="$LIBS"
15073 # reverse order
15074 cf_add_0lib=
15075 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15076 # filter duplicates
15077 for cf_add_1lib in $cf_add_0lib; do
15078         for cf_add_2lib in $cf_add_libs; do
15079                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15080                         cf_add_1lib=
15081                         break
15082                 fi
15083         done
15084         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15085 done
15086 LIBS="$cf_add_libs"
15087
15088 cat >>confdefs.h <<\EOF
15089 #define HAVE_LIBPTHREADS 1
15090 EOF
15091
15092         else
15093             { { echo "$as_me:15093: error: Cannot link with pthread library" >&5
15094 echo "$as_me: error: Cannot link with pthread library" >&2;}
15095    { (exit 1); exit 1; }; }
15096         fi
15097
15098 fi
15099
15100 fi
15101
15102 if test "x$with_pthread" != xno; then
15103         echo "$as_me:15103: checking for pthread_kill" >&5
15104 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15105 if test "${ac_cv_func_pthread_kill+set}" = set; then
15106   echo $ECHO_N "(cached) $ECHO_C" >&6
15107 else
15108   cat >"conftest.$ac_ext" <<_ACEOF
15109 #line 15109 "configure"
15110 #include "confdefs.h"
15111 #define pthread_kill autoconf_temporary
15112 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15113 #undef pthread_kill
15114
15115 #ifdef __cplusplus
15116 extern "C"
15117 #endif
15118
15119 /* We use char because int might match the return type of a gcc2
15120    builtin and then its argument prototype would still apply.  */
15121 char pthread_kill (void);
15122
15123 int
15124 main (void)
15125 {
15126
15127 /* The GNU C library defines stubs for functions which it implements
15128     to always fail with ENOSYS.  Some functions are actually named
15129     something starting with __ and the normal name is an alias.  */
15130 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15131 #error found stub for pthread_kill
15132 #endif
15133
15134         return pthread_kill ();
15135   ;
15136   return 0;
15137 }
15138 _ACEOF
15139 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15140 if { (eval echo "$as_me:15140: \"$ac_link\"") >&5
15141   (eval $ac_link) 2>&5
15142   ac_status=$?
15143   echo "$as_me:15143: \$? = $ac_status" >&5
15144   (exit "$ac_status"); } &&
15145          { ac_try='test -s "conftest$ac_exeext"'
15146   { (eval echo "$as_me:15146: \"$ac_try\"") >&5
15147   (eval $ac_try) 2>&5
15148   ac_status=$?
15149   echo "$as_me:15149: \$? = $ac_status" >&5
15150   (exit "$ac_status"); }; }; then
15151   ac_cv_func_pthread_kill=yes
15152 else
15153   echo "$as_me: failed program was:" >&5
15154 cat "conftest.$ac_ext" >&5
15155 ac_cv_func_pthread_kill=no
15156 fi
15157 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15158 fi
15159 echo "$as_me:15159: result: $ac_cv_func_pthread_kill" >&5
15160 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15161 if test "$ac_cv_func_pthread_kill" = yes; then
15162
15163                 echo "$as_me:15163: checking if you want to allow EINTR in wgetch with pthreads" >&5
15164 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15165
15166 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15167 if test "${enable_pthreads_eintr+set}" = set; then
15168   enableval="$enable_pthreads_eintr"
15169   use_pthreads_eintr=$enableval
15170 else
15171   use_pthreads_eintr=no
15172 fi;
15173                 echo "$as_me:15173: result: $use_pthreads_eintr" >&5
15174 echo "${ECHO_T}$use_pthreads_eintr" >&6
15175                 if test "x$use_pthreads_eintr" = xyes ; then
15176
15177 cat >>confdefs.h <<\EOF
15178 #define USE_PTHREADS_EINTR 1
15179 EOF
15180
15181                 fi
15182 fi
15183
15184         echo "$as_me:15184: checking if you want to use weak-symbols for pthreads" >&5
15185 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15186
15187 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15188 if test "${enable_weak_symbols+set}" = set; then
15189   enableval="$enable_weak_symbols"
15190   use_weak_symbols=$enableval
15191 else
15192   use_weak_symbols=no
15193 fi;
15194         echo "$as_me:15194: result: $use_weak_symbols" >&5
15195 echo "${ECHO_T}$use_weak_symbols" >&6
15196         if test "x$use_weak_symbols" = xyes ; then
15197
15198 echo "$as_me:15198: checking if $CC supports weak symbols" >&5
15199 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15200 if test "${cf_cv_weak_symbols+set}" = set; then
15201   echo $ECHO_N "(cached) $ECHO_C" >&6
15202 else
15203
15204 cat >"conftest.$ac_ext" <<_ACEOF
15205 #line 15205 "configure"
15206 #include "confdefs.h"
15207
15208 #include <stdio.h>
15209 int
15210 main (void)
15211 {
15212
15213 #if defined(__GNUC__)
15214 #  if defined __USE_ISOC99
15215 #    define _cat_pragma(exp)    _Pragma(#exp)
15216 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15217 #  else
15218 #    define _weak_pragma(exp)
15219 #  endif
15220 #  define _declare(name)        __extension__ extern __typeof__(name) name
15221 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15222 #endif
15223
15224 weak_symbol(fopen);
15225
15226   ;
15227   return 0;
15228 }
15229 _ACEOF
15230 rm -f "conftest.$ac_objext"
15231 if { (eval echo "$as_me:15231: \"$ac_compile\"") >&5
15232   (eval $ac_compile) 2>&5
15233   ac_status=$?
15234   echo "$as_me:15234: \$? = $ac_status" >&5
15235   (exit "$ac_status"); } &&
15236          { ac_try='test -s "conftest.$ac_objext"'
15237   { (eval echo "$as_me:15237: \"$ac_try\"") >&5
15238   (eval $ac_try) 2>&5
15239   ac_status=$?
15240   echo "$as_me:15240: \$? = $ac_status" >&5
15241   (exit "$ac_status"); }; }; then
15242   cf_cv_weak_symbols=yes
15243 else
15244   echo "$as_me: failed program was:" >&5
15245 cat "conftest.$ac_ext" >&5
15246 cf_cv_weak_symbols=no
15247 fi
15248 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15249
15250 fi
15251 echo "$as_me:15251: result: $cf_cv_weak_symbols" >&5
15252 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15253
15254         else
15255                 cf_cv_weak_symbols=no
15256         fi
15257
15258         if test "x$cf_cv_weak_symbols" = xyes ; then
15259
15260 cat >>confdefs.h <<\EOF
15261 #define USE_WEAK_SYMBOLS 1
15262 EOF
15263
15264         fi
15265 fi
15266
15267 PTHREAD=
15268 if test "x$with_pthread" = "xyes" ; then
15269
15270 cat >>confdefs.h <<\EOF
15271 #define USE_PTHREADS 1
15272 EOF
15273
15274         enable_reentrant=yes
15275         if test "x$cf_cv_weak_symbols" = xyes ; then
15276                 PTHREAD=-lpthread
15277
15278 cf_add_libs="$PRIVATE_LIBS"
15279 # reverse order
15280 cf_add_0lib=
15281 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15282 # filter duplicates
15283 for cf_add_1lib in $cf_add_0lib; do
15284         for cf_add_2lib in $cf_add_libs; do
15285                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15286                         cf_add_1lib=
15287                         break
15288                 fi
15289         done
15290         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15291 done
15292 PRIVATE_LIBS="$cf_add_libs"
15293
15294         fi
15295 fi
15296
15297 # Reentrant code has to be opaque; there's little advantage to making ncurses
15298 # opaque outside of that, so there is no --enable-opaque option.  We can use
15299 # this option without --with-pthreads, but this will be always set for
15300 # pthreads.
15301 echo "$as_me:15301: checking if you want reentrant code" >&5
15302 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15303
15304 # Check whether --enable-reentrant or --disable-reentrant was given.
15305 if test "${enable_reentrant+set}" = set; then
15306   enableval="$enable_reentrant"
15307   with_reentrant=$enableval
15308 else
15309   with_reentrant=no
15310 fi;
15311 echo "$as_me:15311: result: $with_reentrant" >&5
15312 echo "${ECHO_T}$with_reentrant" >&6
15313 if test "x$with_reentrant" = xyes ; then
15314         cf_cv_enable_reentrant=1
15315         cf_cv_enable_opaque="NCURSES_INTERNALS"
15316         NCURSES_SIZE_T=int
15317         if test "x$cf_cv_weak_symbols" = xyes ; then
15318
15319 # remove pthread library from $LIBS
15320 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15321
15322 cf_add_libs="$TEST_LIBS"
15323 # reverse order
15324 cf_add_0lib=
15325 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15326 # filter duplicates
15327 for cf_add_1lib in $cf_add_0lib; do
15328         for cf_add_2lib in $cf_add_libs; do
15329                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15330                         cf_add_1lib=
15331                         break
15332                 fi
15333         done
15334         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15335 done
15336 TEST_LIBS="$cf_add_libs"
15337
15338 cf_add_libs="$TEST_LIBS2"
15339 # reverse order
15340 cf_add_0lib=
15341 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15342 # filter duplicates
15343 for cf_add_1lib in $cf_add_0lib; do
15344         for cf_add_2lib in $cf_add_libs; do
15345                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15346                         cf_add_1lib=
15347                         break
15348                 fi
15349         done
15350         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15351 done
15352 TEST_LIBS2="$cf_add_libs"
15353
15354 cf_add_libs="$PRIVATE_LIBS"
15355 # reverse order
15356 cf_add_0lib=
15357 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15358 # filter duplicates
15359 for cf_add_1lib in $cf_add_0lib; do
15360         for cf_add_2lib in $cf_add_libs; do
15361                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15362                         cf_add_1lib=
15363                         break
15364                 fi
15365         done
15366         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15367 done
15368 PRIVATE_LIBS="$cf_add_libs"
15369
15370         else
15371                 # when not using weak symbols but with_reentrant,
15372                 # add 't' to the library suffix on all platforms
15373                 # except cygwin, where we only do that if ALSO
15374                 # compiling with full thread support.
15375                 case "$host" in
15376                 (*cygwin* | *msys*)
15377                         if test "$with_pthread" = "yes" ; then
15378                                 if test "x$disable_lib_suffixes" = "xno" ; then
15379                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15380                                 fi
15381                         fi ;;
15382                 (*)
15383                         if test "x$disable_lib_suffixes" = "xno" ; then
15384                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15385                         fi
15386                         ;;
15387                 esac
15388         fi
15389
15390 cat >>confdefs.h <<\EOF
15391 #define USE_REENTRANT 1
15392 EOF
15393
15394 if test "${with_abi_version+set}" != set; then
15395         case "$cf_cv_rel_version" in
15396         (5.*)
15397                 cf_cv_rel_version=6.0
15398                 cf_cv_abi_version=6
15399                 { echo "$as_me:15399: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15400 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15401                 ;;
15402         esac
15403 fi
15404
15405 else
15406         cf_cv_enable_reentrant=0
15407         cf_cv_enable_opaque="NCURSES_OPAQUE"
15408         NCURSES_SIZE_T=short
15409 fi
15410
15411 echo "$as_me:15411: checking if you want opaque curses-library structures" >&5
15412 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15413
15414 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15415 if test "${enable_opaque_curses+set}" = set; then
15416   enableval="$enable_opaque_curses"
15417   test "$enableval" != yes && enableval=no
15418         if test "$enableval" != "no" ; then
15419     enable_opaque_curses=yes
15420         else
15421
15422          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15423          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15424
15425         fi
15426 else
15427   enableval=no
15428
15429          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15430          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15431
15432 fi;
15433 echo "$as_me:15433: result: $enable_opaque_curses" >&5
15434 echo "${ECHO_T}$enable_opaque_curses" >&6
15435
15436 test "$cf_cv_enable_reentrant" = 1 && \
15437 test "$enable_opaque_curses" = no && \
15438 { { echo "$as_me:15438: error: reentrant configuration requires opaque library" >&5
15439 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15440    { (exit 1); exit 1; }; }
15441
15442 echo "$as_me:15442: checking if you want opaque form-library structures" >&5
15443 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15444
15445 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15446 if test "${enable_opaque_form+set}" = set; then
15447   enableval="$enable_opaque_form"
15448   enable_opaque_form=yes
15449 else
15450   enable_opaque_form=no
15451 fi;
15452 echo "$as_me:15452: result: $enable_opaque_form" >&5
15453 echo "${ECHO_T}$enable_opaque_form" >&6
15454
15455 echo "$as_me:15455: checking if you want opaque menu-library structures" >&5
15456 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15457
15458 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15459 if test "${enable_opaque_menu+set}" = set; then
15460   enableval="$enable_opaque_menu"
15461   enable_opaque_menu=yes
15462 else
15463   enable_opaque_menu=no
15464 fi;
15465 echo "$as_me:15465: result: $enable_opaque_menu" >&5
15466 echo "${ECHO_T}$enable_opaque_menu" >&6
15467
15468 echo "$as_me:15468: checking if you want opaque panel-library structures" >&5
15469 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15470
15471 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15472 if test "${enable_opaque_panel+set}" = set; then
15473   enableval="$enable_opaque_panel"
15474   enable_opaque_panel=yes
15475 else
15476   enable_opaque_panel=no
15477 fi;
15478 echo "$as_me:15478: result: $enable_opaque_panel" >&5
15479 echo "${ECHO_T}$enable_opaque_panel" >&6
15480
15481 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15482 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15483 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15484 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15485
15486 ### Allow using a different wrap-prefix
15487 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15488         echo "$as_me:15488: checking for prefix used to wrap public variables" >&5
15489 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15490
15491 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15492 if test "${with_wrap_prefix+set}" = set; then
15493   withval="$with_wrap_prefix"
15494   NCURSES_WRAP_PREFIX=$withval
15495 else
15496   NCURSES_WRAP_PREFIX=_nc_
15497 fi;
15498         echo "$as_me:15498: result: $NCURSES_WRAP_PREFIX" >&5
15499 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15500 else
15501         NCURSES_WRAP_PREFIX=_nc_
15502 fi
15503
15504 cat >>confdefs.h <<EOF
15505 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15506 EOF
15507
15508 ###############################################################################
15509 # These options are relatively safe to experiment with.
15510
15511 echo "$as_me:15511: checking if you want all development code" >&5
15512 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15513
15514 # Check whether --with-develop or --without-develop was given.
15515 if test "${with_develop+set}" = set; then
15516   withval="$with_develop"
15517   with_develop=$withval
15518 else
15519   with_develop=no
15520 fi;
15521 echo "$as_me:15521: result: $with_develop" >&5
15522 echo "${ECHO_T}$with_develop" >&6
15523
15524 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15525 echo "$as_me:15525: checking if you want hard-tabs code" >&5
15526 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15527
15528 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15529 if test "${enable_hard_tabs+set}" = set; then
15530   enableval="$enable_hard_tabs"
15531
15532 else
15533   enable_hard_tabs=$with_develop
15534 fi;
15535 echo "$as_me:15535: result: $enable_hard_tabs" >&5
15536 echo "${ECHO_T}$enable_hard_tabs" >&6
15537 test "x$enable_hard_tabs" = xyes &&
15538 cat >>confdefs.h <<\EOF
15539 #define USE_HARD_TABS 1
15540 EOF
15541
15542 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15543 echo "$as_me:15543: checking if you want limited support for xmc" >&5
15544 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15545
15546 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15547 if test "${enable_xmc_glitch+set}" = set; then
15548   enableval="$enable_xmc_glitch"
15549
15550 else
15551   enable_xmc_glitch=$with_develop
15552 fi;
15553 echo "$as_me:15553: result: $enable_xmc_glitch" >&5
15554 echo "${ECHO_T}$enable_xmc_glitch" >&6
15555 test "x$enable_xmc_glitch" = xyes &&
15556 cat >>confdefs.h <<\EOF
15557 #define USE_XMC_SUPPORT 1
15558 EOF
15559
15560 ###############################################################################
15561 # These are just experimental, probably should not be in a package:
15562
15563 echo "$as_me:15563: checking if you do not want to assume colors are white-on-black" >&5
15564 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15565
15566 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15567 if test "${enable_assumed_color+set}" = set; then
15568   enableval="$enable_assumed_color"
15569   with_assumed_color=$enableval
15570 else
15571   with_assumed_color=yes
15572 fi;
15573 echo "$as_me:15573: result: $with_assumed_color" >&5
15574 echo "${ECHO_T}$with_assumed_color" >&6
15575 test "x$with_assumed_color" = xyes &&
15576 cat >>confdefs.h <<\EOF
15577 #define USE_ASSUMED_COLOR 1
15578 EOF
15579
15580 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15581 echo "$as_me:15581: checking if you want hashmap scrolling-optimization code" >&5
15582 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15583
15584 # Check whether --enable-hashmap or --disable-hashmap was given.
15585 if test "${enable_hashmap+set}" = set; then
15586   enableval="$enable_hashmap"
15587   with_hashmap=$enableval
15588 else
15589   with_hashmap=yes
15590 fi;
15591 echo "$as_me:15591: result: $with_hashmap" >&5
15592 echo "${ECHO_T}$with_hashmap" >&6
15593 test "x$with_hashmap" = xyes &&
15594 cat >>confdefs.h <<\EOF
15595 #define USE_HASHMAP 1
15596 EOF
15597
15598 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15599 echo "$as_me:15599: checking if you want colorfgbg code" >&5
15600 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15601
15602 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15603 if test "${enable_colorfgbg+set}" = set; then
15604   enableval="$enable_colorfgbg"
15605   with_colorfgbg=$enableval
15606 else
15607   with_colorfgbg=no
15608 fi;
15609 echo "$as_me:15609: result: $with_colorfgbg" >&5
15610 echo "${ECHO_T}$with_colorfgbg" >&6
15611 test "x$with_colorfgbg" = xyes &&
15612 cat >>confdefs.h <<\EOF
15613 #define USE_COLORFGBG 1
15614 EOF
15615
15616 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15617 echo "$as_me:15617: checking if you want to use gcc -fvisibility option" >&5
15618 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15619
15620 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15621 if test "${enable_fvisibility+set}" = set; then
15622   enableval="$enable_fvisibility"
15623   cf_with_fvisibility=$enableval
15624 else
15625   cf_with_fvisibility=no
15626 fi;
15627 echo "$as_me:15627: result: $cf_with_fvisibility" >&5
15628 echo "${ECHO_T}$cf_with_fvisibility" >&6
15629
15630 NCURSES_IMPEXP=
15631 NCURSES_CXX_IMPEXP=
15632 if test "x$cf_with_fvisibility" = xyes; then
15633
15634 echo "$as_me:15634: checking if $CC -fvisibility=hidden option works" >&5
15635 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15636 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15637   echo $ECHO_N "(cached) $ECHO_C" >&6
15638 else
15639
15640     cf_save_cflags="$CFLAGS"
15641     CFLAGS="$CFLAGS -fvisibility=hidden"
15642     cat >"conftest.$ac_ext" <<_ACEOF
15643 #line 15643 "configure"
15644 #include "confdefs.h"
15645
15646 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15647
15648 int
15649 main (void)
15650 {
15651
15652         if (somefunc()) return 1;
15653
15654   ;
15655   return 0;
15656 }
15657 _ACEOF
15658 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15659 if { (eval echo "$as_me:15659: \"$ac_link\"") >&5
15660   (eval $ac_link) 2>&5
15661   ac_status=$?
15662   echo "$as_me:15662: \$? = $ac_status" >&5
15663   (exit "$ac_status"); } &&
15664          { ac_try='test -s "conftest$ac_exeext"'
15665   { (eval echo "$as_me:15665: \"$ac_try\"") >&5
15666   (eval $ac_try) 2>&5
15667   ac_status=$?
15668   echo "$as_me:15668: \$? = $ac_status" >&5
15669   (exit "$ac_status"); }; }; then
15670   cf_cv_fvisibility_hidden=yes
15671 else
15672   echo "$as_me: failed program was:" >&5
15673 cat "conftest.$ac_ext" >&5
15674 cf_cv_fvisibility_hidden=no
15675 fi
15676 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15677     CFLAGS=$cf_save_cflags
15678
15679 fi
15680 echo "$as_me:15680: result: $cf_cv_fvisibility_hidden" >&5
15681 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15682
15683         if test "x$cf_cv_fvisibility_hidden" = xyes
15684         then
15685
15686 cf_fix_cppflags=no
15687 cf_new_cflags=
15688 cf_new_cppflags=
15689 cf_new_extra_cppflags=
15690
15691 for cf_add_cflags in -fvisibility=hidden
15692 do
15693 case "$cf_fix_cppflags" in
15694 (no)
15695         case "$cf_add_cflags" in
15696         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15697                 case "$cf_add_cflags" in
15698                 (-D*)
15699                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15700
15701                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15702                                 && test -z "${cf_tst_cflags}" \
15703                                 && cf_fix_cppflags=yes
15704
15705                         if test "$cf_fix_cppflags" = yes ; then
15706
15707         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15708         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15709
15710                                 continue
15711                         elif test "${cf_tst_cflags}" = "\"'" ; then
15712
15713         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15714         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15715
15716                                 continue
15717                         fi
15718                         ;;
15719                 esac
15720                 case "$CPPFLAGS" in
15721                 (*$cf_add_cflags)
15722                         ;;
15723                 (*)
15724                         case "$cf_add_cflags" in
15725                         (-D*)
15726                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15727
15728 CPPFLAGS=`echo "$CPPFLAGS" | \
15729         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15730                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15731
15732                                 ;;
15733                         esac
15734
15735         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15736         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15737
15738                         ;;
15739                 esac
15740                 ;;
15741         (*)
15742
15743         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15744         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15745
15746                 ;;
15747         esac
15748         ;;
15749 (yes)
15750
15751         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15752         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15753
15754         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15755
15756         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15757                 && test -z "${cf_tst_cflags}" \
15758                 && cf_fix_cppflags=no
15759         ;;
15760 esac
15761 done
15762
15763 if test -n "$cf_new_cflags" ; then
15764
15765         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15766         CFLAGS="${CFLAGS}$cf_new_cflags"
15767
15768 fi
15769
15770 if test -n "$cf_new_cppflags" ; then
15771
15772         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15773         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15774
15775 fi
15776
15777 if test -n "$cf_new_extra_cppflags" ; then
15778
15779         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15780         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15781
15782 fi
15783
15784                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15785         fi
15786         if test -n "$CXX"
15787         then
15788                 ac_ext=cc
15789 ac_cpp='$CXXCPP $CPPFLAGS'
15790 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
15791 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
15792 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15793 ac_main_return="return"
15794
15795 echo "$as_me:15795: checking if $CXX -fvisibility=hidden option works" >&5
15796 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15797 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15798   echo $ECHO_N "(cached) $ECHO_C" >&6
15799 else
15800
15801     cf_save_cflags="$CXXFLAGS"
15802     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15803     cat >"conftest.$ac_ext" <<_ACEOF
15804 #line 15804 "configure"
15805 #include "confdefs.h"
15806
15807 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15808
15809 int
15810 main (void)
15811 {
15812
15813         if (somefunc()) return 1;
15814
15815   ;
15816   return 0;
15817 }
15818 _ACEOF
15819 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15820 if { (eval echo "$as_me:15820: \"$ac_link\"") >&5
15821   (eval $ac_link) 2>&5
15822   ac_status=$?
15823   echo "$as_me:15823: \$? = $ac_status" >&5
15824   (exit "$ac_status"); } &&
15825          { ac_try='test -s "conftest$ac_exeext"'
15826   { (eval echo "$as_me:15826: \"$ac_try\"") >&5
15827   (eval $ac_try) 2>&5
15828   ac_status=$?
15829   echo "$as_me:15829: \$? = $ac_status" >&5
15830   (exit "$ac_status"); }; }; then
15831   cf_cv_fvisibility_hidden2=yes
15832 else
15833   echo "$as_me: failed program was:" >&5
15834 cat "conftest.$ac_ext" >&5
15835 cf_cv_fvisibility_hidden2=no
15836 fi
15837 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15838     CXXFLAGS=$cf_save_cflags
15839
15840 fi
15841 echo "$as_me:15841: result: $cf_cv_fvisibility_hidden2" >&5
15842 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15843
15844                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15845                 then
15846
15847 cf_save_CXXFLAGS="$CFLAGS"
15848 CFLAGS="$CXXFLAGS"
15849
15850 cf_fix_cppflags=no
15851 cf_new_cflags=
15852 cf_new_cppflags=
15853 cf_new_extra_cppflags=
15854
15855 for cf_add_cflags in -fvisibility=hidden
15856 do
15857 case "$cf_fix_cppflags" in
15858 (no)
15859         case "$cf_add_cflags" in
15860         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15861                 case "$cf_add_cflags" in
15862                 (-D*)
15863                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15864
15865                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15866                                 && test -z "${cf_tst_cflags}" \
15867                                 && cf_fix_cppflags=yes
15868
15869                         if test "$cf_fix_cppflags" = yes ; then
15870
15871         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15872         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15873
15874                                 continue
15875                         elif test "${cf_tst_cflags}" = "\"'" ; then
15876
15877         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15878         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15879
15880                                 continue
15881                         fi
15882                         ;;
15883                 esac
15884                 case "$CPPFLAGS" in
15885                 (*$cf_add_cflags)
15886                         ;;
15887                 (*)
15888                         case "$cf_add_cflags" in
15889                         (-D*)
15890                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15891
15892 CPPFLAGS=`echo "$CPPFLAGS" | \
15893         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15894                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15895
15896                                 ;;
15897                         esac
15898
15899         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15900         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15901
15902                         ;;
15903                 esac
15904                 ;;
15905         (*)
15906
15907         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15908         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15909
15910                 ;;
15911         esac
15912         ;;
15913 (yes)
15914
15915         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15916         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15917
15918         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15919
15920         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15921                 && test -z "${cf_tst_cflags}" \
15922                 && cf_fix_cppflags=no
15923         ;;
15924 esac
15925 done
15926
15927 if test -n "$cf_new_cflags" ; then
15928
15929         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15930         CFLAGS="${CFLAGS}$cf_new_cflags"
15931
15932 fi
15933
15934 if test -n "$cf_new_cppflags" ; then
15935
15936         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15937         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15938
15939 fi
15940
15941 if test -n "$cf_new_extra_cppflags" ; then
15942
15943         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15944         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15945
15946 fi
15947
15948 CXXFLAGS="$CFLAGS"
15949 CFLAGS="$cf_save_CXXFLAGS"
15950
15951                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
15952                 fi
15953                 ac_ext=c
15954 ac_cpp='$CPP $CPPFLAGS'
15955 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
15956 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
15957 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15958 ac_main_return="return"
15959
15960         fi
15961 fi
15962
15963 ###   use option --enable-interop to turn on use of bindings used for interop
15964 echo "$as_me:15964: checking if you want interop bindings" >&5
15965 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15966
15967 # Check whether --enable-interop or --disable-interop was given.
15968 if test "${enable_interop+set}" = set; then
15969   enableval="$enable_interop"
15970   with_exp_interop=$enableval
15971 else
15972   with_exp_interop=$cf_dft_interop
15973 fi;
15974 echo "$as_me:15974: result: $with_exp_interop" >&5
15975 echo "${ECHO_T}$with_exp_interop" >&6
15976
15977 NCURSES_INTEROP_FUNCS=0
15978 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15979
15980 echo "$as_me:15980: checking if you want experimental safe-sprintf code" >&5
15981 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15982
15983 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15984 if test "${enable_safe_sprintf+set}" = set; then
15985   enableval="$enable_safe_sprintf"
15986   with_safe_sprintf=$enableval
15987 else
15988   with_safe_sprintf=no
15989 fi;
15990 echo "$as_me:15990: result: $with_safe_sprintf" >&5
15991 echo "${ECHO_T}$with_safe_sprintf" >&6
15992
15993 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15994 # when hashmap is used scroll hints are useless
15995 if test "$with_hashmap" = no ; then
15996 echo "$as_me:15996: checking if you want to experiment without scrolling-hints code" >&5
15997 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15998
15999 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16000 if test "${enable_scroll_hints+set}" = set; then
16001   enableval="$enable_scroll_hints"
16002   with_scroll_hints=$enableval
16003 else
16004   with_scroll_hints=yes
16005 fi;
16006 echo "$as_me:16006: result: $with_scroll_hints" >&5
16007 echo "${ECHO_T}$with_scroll_hints" >&6
16008 test "x$with_scroll_hints" = xyes &&
16009 cat >>confdefs.h <<\EOF
16010 #define USE_SCROLL_HINTS 1
16011 EOF
16012
16013 fi
16014
16015 echo "$as_me:16015: checking if you want wgetch-events code" >&5
16016 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16017
16018 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16019 if test "${enable_wgetch_events+set}" = set; then
16020   enableval="$enable_wgetch_events"
16021   with_wgetch_events=$enableval
16022 else
16023   with_wgetch_events=no
16024 fi;
16025 echo "$as_me:16025: result: $with_wgetch_events" >&5
16026 echo "${ECHO_T}$with_wgetch_events" >&6
16027 if test "x$with_wgetch_events" = xyes ; then
16028
16029 cat >>confdefs.h <<\EOF
16030 #define NCURSES_WGETCH_EVENTS 1
16031 EOF
16032
16033         NCURSES_WGETCH_EVENTS=1
16034 else
16035         NCURSES_WGETCH_EVENTS=0
16036 fi
16037
16038 case "$cf_cv_system_name" in
16039 (*mingw32*|*mingw64*|*-msvc*)
16040         echo "$as_me:16040: checking if you want experimental-Windows driver" >&5
16041 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16042
16043 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16044 if test "${enable_exp_win32+set}" = set; then
16045   enableval="$enable_exp_win32"
16046   with_exp_win32=$enableval
16047 else
16048   with_exp_win32=no
16049 fi;
16050         echo "$as_me:16050: result: $with_exp_win32" >&5
16051 echo "${ECHO_T}$with_exp_win32" >&6
16052         if test "x$with_exp_win32" = xyes
16053         then
16054
16055 cat >>confdefs.h <<\EOF
16056 #define EXP_WIN32_DRIVER 1
16057 EOF
16058
16059                 EXP_WIN32_DRIVER=1
16060                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16061         else
16062                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16063                 EXP_WIN32_DRIVER=0
16064         fi
16065         ;;
16066 (*)
16067         EXP_WIN32_DRIVER=0
16068         INTERNALS_HDR=
16069         ;;
16070 esac
16071
16072 ###############################################################################
16073
16074 ###     use option --disable-echo to suppress full display compiling commands
16075
16076 echo "$as_me:16076: checking if you want to see long compiling messages" >&5
16077 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16078
16079 # Check whether --enable-echo or --disable-echo was given.
16080 if test "${enable_echo+set}" = set; then
16081   enableval="$enable_echo"
16082   test "$enableval" != no && enableval=yes
16083         if test "$enableval" != "yes" ; then
16084
16085         ECHO_LT='--silent'
16086         ECHO_LD='@echo linking $@;'
16087         RULE_CC='@echo compiling $<'
16088         SHOW_CC='@echo compiling $@'
16089         ECHO_CC='@'
16090
16091         else
16092
16093         ECHO_LT=''
16094         ECHO_LD=''
16095         RULE_CC=''
16096         SHOW_CC=''
16097         ECHO_CC=''
16098
16099         fi
16100 else
16101   enableval=yes
16102
16103         ECHO_LT=''
16104         ECHO_LD=''
16105         RULE_CC=''
16106         SHOW_CC=''
16107         ECHO_CC=''
16108
16109 fi;
16110 echo "$as_me:16110: result: $enableval" >&5
16111 echo "${ECHO_T}$enableval" >&6
16112
16113 if test "x$enable_echo" = xyes; then
16114         ECHO_LINK=
16115 else
16116         ECHO_LINK='@ echo linking $@ ... ;'
16117         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16118         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16119 fi
16120
16121 # --disable-stripping is used for debugging
16122
16123 echo "$as_me:16123: checking if you want to install stripped executables" >&5
16124 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16125
16126 # Check whether --enable-stripping or --disable-stripping was given.
16127 if test "${enable_stripping+set}" = set; then
16128   enableval="$enable_stripping"
16129   test "$enableval" != no && enableval=yes
16130         if test "$enableval" != "yes" ; then
16131     enable_stripping=no
16132         else
16133                 enable_stripping=yes
16134         fi
16135 else
16136   enableval=yes
16137         enable_stripping=yes
16138
16139 fi;
16140 echo "$as_me:16140: result: $enable_stripping" >&5
16141 echo "${ECHO_T}$enable_stripping" >&6
16142
16143 if test "$enable_stripping" = yes
16144 then
16145         INSTALL_OPT_S="-s"
16146 else
16147         INSTALL_OPT_S=
16148 fi
16149
16150 : "${INSTALL:=install}"
16151 echo "$as_me:16151: checking if install accepts -p option" >&5
16152 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16153 if test "${cf_cv_install_p+set}" = set; then
16154   echo $ECHO_N "(cached) $ECHO_C" >&6
16155 else
16156
16157         rm -rf ./conftest*
16158         date >conftest.in
16159         mkdir conftest.out
16160         sleep 3
16161         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16162         then
16163                 if test -f conftest.out/conftest.in
16164                 then
16165                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16166                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16167                         if test -s conftest.err
16168                         then
16169                                 cf_cv_install_p=no
16170                         else
16171                                 cf_cv_install_p=yes
16172                         fi
16173                 else
16174                         cf_cv_install_p=no
16175                 fi
16176         else
16177                 cf_cv_install_p=no
16178         fi
16179         rm -rf ./conftest*
16180
16181 fi
16182 echo "$as_me:16182: result: $cf_cv_install_p" >&5
16183 echo "${ECHO_T}$cf_cv_install_p" >&6
16184
16185 echo "$as_me:16185: checking if install needs to be told about ownership" >&5
16186 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16187 case `$ac_config_guess` in
16188 (*minix)
16189         with_install_o=yes
16190         ;;
16191 (*)
16192         with_install_o=no
16193         ;;
16194 esac
16195
16196 echo "$as_me:16196: result: $with_install_o" >&5
16197 echo "${ECHO_T}$with_install_o" >&6
16198 if test "x$with_install_o" = xyes
16199 then
16200         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'`"
16201 else
16202         INSTALL_OPT_O=
16203 fi
16204
16205 # If we're avoiding relinking of shared libraries during install, that is to
16206 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16207 # the install program has "-p" (for preserving timestamps).
16208 cf_cv_do_reranlib=yes
16209 if test "x$cf_cv_install_p" = xyes
16210 then
16211         if test "x$cf_cv_do_relink" != xyes
16212         then
16213                 cf_cv_do_reranlib=no
16214                 INSTALL_OPT_P="-p"
16215                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16216         fi
16217 fi
16218
16219 ###     use option --enable-warnings to turn on all gcc warnings
16220
16221 echo "$as_me:16221: checking if you want to use C11 _Noreturn feature" >&5
16222 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16223
16224 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16225 if test "${enable_stdnoreturn+set}" = set; then
16226   enableval="$enable_stdnoreturn"
16227   test "$enableval" != yes && enableval=no
16228         if test "$enableval" != "no" ; then
16229     enable_stdnoreturn=yes
16230         else
16231                 enable_stdnoreturn=no
16232         fi
16233 else
16234   enableval=no
16235         enable_stdnoreturn=no
16236
16237 fi;
16238 echo "$as_me:16238: result: $enable_stdnoreturn" >&5
16239 echo "${ECHO_T}$enable_stdnoreturn" >&6
16240
16241 if test $enable_stdnoreturn = yes; then
16242 echo "$as_me:16242: checking for C11 _Noreturn feature" >&5
16243 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16244 if test "${cf_cv_c11_noreturn+set}" = set; then
16245   echo $ECHO_N "(cached) $ECHO_C" >&6
16246 else
16247   cat >"conftest.$ac_ext" <<_ACEOF
16248 #line 16248 "configure"
16249 #include "confdefs.h"
16250
16251 #include <stdio.h>
16252 #include <stdlib.h>
16253 #include <stdnoreturn.h>
16254 static void giveup(void) { exit(0); }
16255
16256 int
16257 main (void)
16258 {
16259 if (feof(stdin)) giveup()
16260   ;
16261   return 0;
16262 }
16263 _ACEOF
16264 rm -f "conftest.$ac_objext"
16265 if { (eval echo "$as_me:16265: \"$ac_compile\"") >&5
16266   (eval $ac_compile) 2>&5
16267   ac_status=$?
16268   echo "$as_me:16268: \$? = $ac_status" >&5
16269   (exit "$ac_status"); } &&
16270          { ac_try='test -s "conftest.$ac_objext"'
16271   { (eval echo "$as_me:16271: \"$ac_try\"") >&5
16272   (eval $ac_try) 2>&5
16273   ac_status=$?
16274   echo "$as_me:16274: \$? = $ac_status" >&5
16275   (exit "$ac_status"); }; }; then
16276   cf_cv_c11_noreturn=yes
16277 else
16278   echo "$as_me: failed program was:" >&5
16279 cat "conftest.$ac_ext" >&5
16280 cf_cv_c11_noreturn=no
16281 fi
16282 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16283
16284 fi
16285 echo "$as_me:16285: result: $cf_cv_c11_noreturn" >&5
16286 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16287 else
16288         cf_cv_c11_noreturn=no,
16289 fi
16290
16291 if test "$cf_cv_c11_noreturn" = yes; then
16292         cat >>confdefs.h <<\EOF
16293 #define HAVE_STDNORETURN_H 1
16294 EOF
16295
16296 cat >>confdefs.h <<EOF
16297 #define STDC_NORETURN _Noreturn
16298 EOF
16299
16300         HAVE_STDNORETURN_H=1
16301 else
16302         HAVE_STDNORETURN_H=0
16303 fi
16304
16305 if test "$GCC" = yes || test "$GXX" = yes
16306 then
16307
16308 if test "$GCC" = yes || test "$GXX" = yes
16309 then
16310         case $CFLAGS in
16311         (*-Werror=*)
16312                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16313
16314 echo "${as_me:-configure}:16314: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16315
16316                 cf_temp_flags=
16317                 for cf_temp_scan in $CFLAGS
16318                 do
16319                         case "x$cf_temp_scan" in
16320                         (x-Werror=*)
16321
16322         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16323         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16324
16325                                 ;;
16326                         (*)
16327
16328         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16329         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16330
16331                                 ;;
16332                         esac
16333                 done
16334                 CFLAGS="$cf_temp_flags"
16335                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16336
16337 echo "${as_me:-configure}:16337: testing ... fixed $CFLAGS ..." 1>&5
16338
16339                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16340
16341 echo "${as_me:-configure}:16341: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16342
16343                 ;;
16344         esac
16345 fi
16346
16347 if test "$GCC" = yes || test "$GXX" = yes
16348 then
16349         case $CPPFLAGS in
16350         (*-Werror=*)
16351                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16352
16353 echo "${as_me:-configure}:16353: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16354
16355                 cf_temp_flags=
16356                 for cf_temp_scan in $CPPFLAGS
16357                 do
16358                         case "x$cf_temp_scan" in
16359                         (x-Werror=*)
16360
16361         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16362         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16363
16364                                 ;;
16365                         (*)
16366
16367         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16368         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16369
16370                                 ;;
16371                         esac
16372                 done
16373                 CPPFLAGS="$cf_temp_flags"
16374                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16375
16376 echo "${as_me:-configure}:16376: testing ... fixed $CPPFLAGS ..." 1>&5
16377
16378                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16379
16380 echo "${as_me:-configure}:16380: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16381
16382                 ;;
16383         esac
16384 fi
16385
16386 if test "$GCC" = yes || test "$GXX" = yes
16387 then
16388         case $LDFLAGS in
16389         (*-Werror=*)
16390                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16391
16392 echo "${as_me:-configure}:16392: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16393
16394                 cf_temp_flags=
16395                 for cf_temp_scan in $LDFLAGS
16396                 do
16397                         case "x$cf_temp_scan" in
16398                         (x-Werror=*)
16399
16400         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16401         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16402
16403                                 ;;
16404                         (*)
16405
16406         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16407         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16408
16409                                 ;;
16410                         esac
16411                 done
16412                 LDFLAGS="$cf_temp_flags"
16413                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16414
16415 echo "${as_me:-configure}:16415: testing ... fixed $LDFLAGS ..." 1>&5
16416
16417                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16418
16419 echo "${as_me:-configure}:16419: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16420
16421                 ;;
16422         esac
16423 fi
16424
16425 echo "$as_me:16425: checking if you want to turn on gcc warnings" >&5
16426 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16427
16428 # Check whether --enable-warnings or --disable-warnings was given.
16429 if test "${enable_warnings+set}" = set; then
16430   enableval="$enable_warnings"
16431   test "$enableval" != yes && enableval=no
16432         if test "$enableval" != "no" ; then
16433     enable_warnings=yes
16434         else
16435                 enable_warnings=no
16436         fi
16437 else
16438   enableval=no
16439         enable_warnings=no
16440
16441 fi;
16442 echo "$as_me:16442: result: $enable_warnings" >&5
16443 echo "${ECHO_T}$enable_warnings" >&6
16444 if test "$enable_warnings" = "yes"
16445 then
16446
16447 if test "x$have_x" = xyes; then
16448
16449 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16450 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16451 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16452 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16453 for cf_X_CFLAGS in $X_CFLAGS
16454 do
16455         case "x$cf_X_CFLAGS" in
16456         x-[IUD]*)
16457                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16458                 ;;
16459         *)
16460                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16461                 ;;
16462         esac
16463 done
16464
16465 cat >"conftest.$ac_ext" <<_ACEOF
16466 #line 16466 "configure"
16467 #include "confdefs.h"
16468
16469 #include <stdlib.h>
16470 #include <X11/Intrinsic.h>
16471
16472 int
16473 main (void)
16474 {
16475 String foo = malloc(1); (void)foo
16476   ;
16477   return 0;
16478 }
16479 _ACEOF
16480 rm -f "conftest.$ac_objext"
16481 if { (eval echo "$as_me:16481: \"$ac_compile\"") >&5
16482   (eval $ac_compile) 2>&5
16483   ac_status=$?
16484   echo "$as_me:16484: \$? = $ac_status" >&5
16485   (exit "$ac_status"); } &&
16486          { ac_try='test -s "conftest.$ac_objext"'
16487   { (eval echo "$as_me:16487: \"$ac_try\"") >&5
16488   (eval $ac_try) 2>&5
16489   ac_status=$?
16490   echo "$as_me:16490: \$? = $ac_status" >&5
16491   (exit "$ac_status"); }; }; then
16492
16493 echo "$as_me:16493: checking for X11/Xt const-feature" >&5
16494 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16495 if test "${cf_cv_const_x_string+set}" = set; then
16496   echo $ECHO_N "(cached) $ECHO_C" >&6
16497 else
16498
16499         cat >"conftest.$ac_ext" <<_ACEOF
16500 #line 16500 "configure"
16501 #include "confdefs.h"
16502
16503 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16504 #undef  XTSTRINGDEFINES /* X11R5 and later */
16505 #include <stdlib.h>
16506 #include <X11/Intrinsic.h>
16507
16508 int
16509 main (void)
16510 {
16511 String foo = malloc(1); *foo = 0
16512   ;
16513   return 0;
16514 }
16515 _ACEOF
16516 rm -f "conftest.$ac_objext"
16517 if { (eval echo "$as_me:16517: \"$ac_compile\"") >&5
16518   (eval $ac_compile) 2>&5
16519   ac_status=$?
16520   echo "$as_me:16520: \$? = $ac_status" >&5
16521   (exit "$ac_status"); } &&
16522          { ac_try='test -s "conftest.$ac_objext"'
16523   { (eval echo "$as_me:16523: \"$ac_try\"") >&5
16524   (eval $ac_try) 2>&5
16525   ac_status=$?
16526   echo "$as_me:16526: \$? = $ac_status" >&5
16527   (exit "$ac_status"); }; }; then
16528
16529                         cf_cv_const_x_string=no
16530
16531 else
16532   echo "$as_me: failed program was:" >&5
16533 cat "conftest.$ac_ext" >&5
16534
16535                         cf_cv_const_x_string=yes
16536
16537 fi
16538 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16539
16540 fi
16541 echo "$as_me:16541: result: $cf_cv_const_x_string" >&5
16542 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16543
16544 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16545 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16546 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16547
16548 case "$cf_cv_const_x_string" in
16549 (no)
16550
16551         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16552         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16553
16554         ;;
16555 (*)
16556
16557         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16558         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16559
16560         ;;
16561 esac
16562
16563 else
16564   echo "$as_me: failed program was:" >&5
16565 cat "conftest.$ac_ext" >&5
16566 fi
16567 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16568  fi
16569 cat > "conftest.$ac_ext" <<EOF
16570 #line 16570 "${as_me:-configure}"
16571 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16572 EOF
16573 if test "$INTEL_COMPILER" = yes
16574 then
16575 # The "-wdXXX" options suppress warnings:
16576 # remark #1419: external declaration in primary source file
16577 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16578 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16579 # remark #193: zero used for undefined preprocessing identifier
16580 # remark #593: variable "curs_sb_left_arrow" was set but never used
16581 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16582 # remark #869: parameter "tw" was never referenced
16583 # remark #981: operands are evaluated in unspecified order
16584 # warning #279: controlling expression is constant
16585
16586         { echo "$as_me:16586: checking for $CC warning options..." >&5
16587 echo "$as_me: checking for $CC warning options..." >&6;}
16588         cf_save_CFLAGS="$CFLAGS"
16589         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16590         for cf_opt in \
16591                 wd1419 \
16592                 wd1683 \
16593                 wd1684 \
16594                 wd193 \
16595                 wd593 \
16596                 wd279 \
16597                 wd810 \
16598                 wd869 \
16599                 wd981
16600         do
16601                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16602                 if { (eval echo "$as_me:16602: \"$ac_compile\"") >&5
16603   (eval $ac_compile) 2>&5
16604   ac_status=$?
16605   echo "$as_me:16605: \$? = $ac_status" >&5
16606   (exit "$ac_status"); }; then
16607                         test -n "$verbose" && echo "$as_me:16607: result: ... -$cf_opt" >&5
16608 echo "${ECHO_T}... -$cf_opt" >&6
16609                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16610                 fi
16611         done
16612         CFLAGS="$cf_save_CFLAGS"
16613 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16614 then
16615         { echo "$as_me:16615: checking for $CC warning options..." >&5
16616 echo "$as_me: checking for $CC warning options..." >&6;}
16617         cf_save_CFLAGS="$CFLAGS"
16618         cf_warn_CONST=""
16619         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16620         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16621         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16622         for cf_opt in W Wall \
16623                 Wbad-function-cast \
16624                 Wcast-align \
16625                 Wcast-qual \
16626                 Wdeclaration-after-statement \
16627                 Wextra \
16628                 Winline \
16629                 Wmissing-declarations \
16630                 Wmissing-prototypes \
16631                 Wnested-externs \
16632                 Wpointer-arith \
16633                 Wshadow \
16634                 Wstrict-prototypes \
16635                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16636         do
16637                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16638                 if { (eval echo "$as_me:16638: \"$ac_compile\"") >&5
16639   (eval $ac_compile) 2>&5
16640   ac_status=$?
16641   echo "$as_me:16641: \$? = $ac_status" >&5
16642   (exit "$ac_status"); }; then
16643                         test -n "$verbose" && echo "$as_me:16643: result: ... -$cf_opt" >&5
16644 echo "${ECHO_T}... -$cf_opt" >&6
16645                         case "$cf_opt" in
16646                         (Winline)
16647                                 case "$GCC_VERSION" in
16648                                 ([34].*)
16649                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16650
16651 echo "${as_me:-configure}:16651: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16652
16653                                         continue;;
16654                                 esac
16655                                 ;;
16656                         (Wpointer-arith)
16657                                 case "$GCC_VERSION" in
16658                                 ([12].*)
16659                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16660
16661 echo "${as_me:-configure}:16661: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16662
16663                                         continue;;
16664                                 esac
16665                                 ;;
16666                         esac
16667                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16668                 fi
16669         done
16670         CFLAGS="$cf_save_CFLAGS"
16671 fi
16672 rm -rf ./conftest*
16673
16674 fi
16675
16676 if test "$GCC" = yes || test "$GXX" = yes
16677 then
16678 cat > conftest.i <<EOF
16679 #ifndef GCC_PRINTF
16680 #define GCC_PRINTF 0
16681 #endif
16682 #ifndef GCC_SCANF
16683 #define GCC_SCANF 0
16684 #endif
16685 #ifndef GCC_NORETURN
16686 #define GCC_NORETURN /* nothing */
16687 #endif
16688 #ifndef GCC_UNUSED
16689 #define GCC_UNUSED /* nothing */
16690 #endif
16691 EOF
16692 if test "$GCC" = yes
16693 then
16694         { echo "$as_me:16694: checking for $CC __attribute__ directives..." >&5
16695 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16696 cat > "conftest.$ac_ext" <<EOF
16697 #line 16697 "${as_me:-configure}"
16698 #include "confdefs.h"
16699 #include "conftest.h"
16700 #include "conftest.i"
16701 #if     GCC_PRINTF
16702 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16703 #else
16704 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16705 #endif
16706 #if     GCC_SCANF
16707 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16708 #else
16709 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16710 #endif
16711 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16712 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
16713 extern GCC_NORETURN void foo(void);
16714 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16715 EOF
16716         cf_printf_attribute=no
16717         cf_scanf_attribute=no
16718         for cf_attribute in scanf printf unused noreturn
16719         do
16720
16721 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16722
16723                 cf_directive="__attribute__(($cf_attribute))"
16724                 echo "checking for $CC $cf_directive" 1>&5
16725
16726                 case "$cf_attribute" in
16727                 (printf)
16728                         cf_printf_attribute=yes
16729                         cat >conftest.h <<EOF
16730 #define GCC_$cf_ATTRIBUTE 1
16731 EOF
16732                         ;;
16733                 (scanf)
16734                         cf_scanf_attribute=yes
16735                         cat >conftest.h <<EOF
16736 #define GCC_$cf_ATTRIBUTE 1
16737 EOF
16738                         ;;
16739                 (*)
16740                         cat >conftest.h <<EOF
16741 #define GCC_$cf_ATTRIBUTE $cf_directive
16742 EOF
16743                         ;;
16744                 esac
16745
16746                 if { (eval echo "$as_me:16746: \"$ac_compile\"") >&5
16747   (eval $ac_compile) 2>&5
16748   ac_status=$?
16749   echo "$as_me:16749: \$? = $ac_status" >&5
16750   (exit "$ac_status"); }; then
16751                         test -n "$verbose" && echo "$as_me:16751: result: ... $cf_attribute" >&5
16752 echo "${ECHO_T}... $cf_attribute" >&6
16753                         cat conftest.h >>confdefs.h
16754                         case "$cf_attribute" in
16755                         (noreturn)
16756
16757 cat >>confdefs.h <<EOF
16758 #define GCC_NORETURN $cf_directive
16759 EOF
16760
16761                                 ;;
16762                         (printf)
16763                                 cf_value='/* nothing */'
16764                                 if test "$cf_printf_attribute" != no ; then
16765                                         cf_value='__attribute__((format(printf,fmt,var)))'
16766
16767 cat >>confdefs.h <<\EOF
16768 #define GCC_PRINTF 1
16769 EOF
16770
16771                                 fi
16772
16773 cat >>confdefs.h <<EOF
16774 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16775 EOF
16776
16777                                 ;;
16778                         (scanf)
16779                                 cf_value='/* nothing */'
16780                                 if test "$cf_scanf_attribute" != no ; then
16781                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16782
16783 cat >>confdefs.h <<\EOF
16784 #define GCC_SCANF 1
16785 EOF
16786
16787                                 fi
16788
16789 cat >>confdefs.h <<EOF
16790 #define GCC_SCANFLIKE(fmt,var) $cf_value
16791 EOF
16792
16793                                 ;;
16794                         (unused)
16795
16796 cat >>confdefs.h <<EOF
16797 #define GCC_UNUSED $cf_directive
16798 EOF
16799
16800                                 ;;
16801                         esac
16802                 fi
16803         done
16804 else
16805         ${FGREP-fgrep} define conftest.i >>confdefs.h
16806 fi
16807 rm -rf ./conftest*
16808 fi
16809
16810 fi
16811
16812 if test "x$enable_warnings" = "xyes"; then
16813
16814         ADAFLAGS="$ADAFLAGS -gnatg"
16815
16816         if test "x$cf_with_cxx" = xyes ; then
16817
16818 INTEL_CPLUSPLUS=no
16819
16820 if test "$GCC" = yes ; then
16821         case "$host_os" in
16822         (linux*|gnu*)
16823                 echo "$as_me:16823: checking if this is really Intel C++ compiler" >&5
16824 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16825                 cf_save_CFLAGS="$CXXFLAGS"
16826                 CXXFLAGS="$CXXFLAGS -no-gcc"
16827                 cat >"conftest.$ac_ext" <<_ACEOF
16828 #line 16828 "configure"
16829 #include "confdefs.h"
16830
16831 int
16832 main (void)
16833 {
16834
16835 #ifdef __INTEL_COMPILER
16836 #else
16837 make an error
16838 #endif
16839
16840   ;
16841   return 0;
16842 }
16843 _ACEOF
16844 rm -f "conftest.$ac_objext"
16845 if { (eval echo "$as_me:16845: \"$ac_compile\"") >&5
16846   (eval $ac_compile) 2>&5
16847   ac_status=$?
16848   echo "$as_me:16848: \$? = $ac_status" >&5
16849   (exit "$ac_status"); } &&
16850          { ac_try='test -s "conftest.$ac_objext"'
16851   { (eval echo "$as_me:16851: \"$ac_try\"") >&5
16852   (eval $ac_try) 2>&5
16853   ac_status=$?
16854   echo "$as_me:16854: \$? = $ac_status" >&5
16855   (exit "$ac_status"); }; }; then
16856   INTEL_CPLUSPLUS=yes
16857 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16858
16859 else
16860   echo "$as_me: failed program was:" >&5
16861 cat "conftest.$ac_ext" >&5
16862 fi
16863 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16864                 CXXFLAGS="$cf_save_CFLAGS"
16865                 echo "$as_me:16865: result: $INTEL_CPLUSPLUS" >&5
16866 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16867                 ;;
16868         esac
16869 fi
16870
16871 CLANG_CPLUSPLUS=no
16872
16873 if test "$GCC" = yes ; then
16874         echo "$as_me:16874: checking if this is really Clang C++ compiler" >&5
16875 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16876         cf_save_CFLAGS="$CXXFLAGS"
16877         cat >"conftest.$ac_ext" <<_ACEOF
16878 #line 16878 "configure"
16879 #include "confdefs.h"
16880
16881 int
16882 main (void)
16883 {
16884
16885 #ifdef __clang__
16886 #else
16887 make an error
16888 #endif
16889
16890   ;
16891   return 0;
16892 }
16893 _ACEOF
16894 rm -f "conftest.$ac_objext"
16895 if { (eval echo "$as_me:16895: \"$ac_compile\"") >&5
16896   (eval $ac_compile) 2>&5
16897   ac_status=$?
16898   echo "$as_me:16898: \$? = $ac_status" >&5
16899   (exit "$ac_status"); } &&
16900          { ac_try='test -s "conftest.$ac_objext"'
16901   { (eval echo "$as_me:16901: \"$ac_try\"") >&5
16902   (eval $ac_try) 2>&5
16903   ac_status=$?
16904   echo "$as_me:16904: \$? = $ac_status" >&5
16905   (exit "$ac_status"); }; }; then
16906   CLANG_CPLUSPLUS=yes
16907
16908 else
16909   echo "$as_me: failed program was:" >&5
16910 cat "conftest.$ac_ext" >&5
16911 fi
16912 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16913         CXXFLAGS="$cf_save_CFLAGS"
16914         echo "$as_me:16914: result: $CLANG_CPLUSPLUS" >&5
16915 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16916 fi
16917
16918 CLANG_VERSION=none
16919
16920 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
16921         case "$CC" in
16922         (c[1-9][0-9]|*/c[1-9][0-9])
16923                 { echo "$as_me:16923: WARNING: replacing broken compiler alias $CC" >&5
16924 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
16925                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
16926                 CC=clang
16927                 ;;
16928         esac
16929
16930         echo "$as_me:16930: checking version of $CC" >&5
16931 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
16932         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.].*//'`"
16933         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
16934         echo "$as_me:16934: result: $CLANG_VERSION" >&5
16935 echo "${ECHO_T}$CLANG_VERSION" >&6
16936
16937         for cf_clang_opt in \
16938                 -Qunused-arguments \
16939                 -Wno-error=implicit-function-declaration
16940         do
16941                 echo "$as_me:16941: checking if option $cf_clang_opt works" >&5
16942 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
16943                 cf_save_CFLAGS="$CFLAGS"
16944                 CFLAGS="$CFLAGS $cf_clang_opt"
16945                 cat >"conftest.$ac_ext" <<_ACEOF
16946 #line 16946 "configure"
16947 #include "confdefs.h"
16948
16949                         #include <stdio.h>
16950 int
16951 main (void)
16952 {
16953
16954                         printf("hello!\\n");
16955   ;
16956   return 0;
16957 }
16958 _ACEOF
16959 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16960 if { (eval echo "$as_me:16960: \"$ac_link\"") >&5
16961   (eval $ac_link) 2>&5
16962   ac_status=$?
16963   echo "$as_me:16963: \$? = $ac_status" >&5
16964   (exit "$ac_status"); } &&
16965          { ac_try='test -s "conftest$ac_exeext"'
16966   { (eval echo "$as_me:16966: \"$ac_try\"") >&5
16967   (eval $ac_try) 2>&5
16968   ac_status=$?
16969   echo "$as_me:16969: \$? = $ac_status" >&5
16970   (exit "$ac_status"); }; }; then
16971
16972                         cf_clang_optok=yes
16973 else
16974   echo "$as_me: failed program was:" >&5
16975 cat "conftest.$ac_ext" >&5
16976
16977                         cf_clang_optok=no
16978 fi
16979 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16980                 echo "$as_me:16980: result: $cf_clang_optok" >&5
16981 echo "${ECHO_T}$cf_clang_optok" >&6
16982                 CFLAGS="$cf_save_CFLAGS"
16983                 if test "$cf_clang_optok" = yes; then
16984                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
16985
16986 echo "${as_me:-configure}:16986: testing adding option $cf_clang_opt ..." 1>&5
16987
16988         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16989         CFLAGS="${CFLAGS}$cf_clang_opt"
16990
16991                 fi
16992         done
16993 fi
16994
16995 ac_ext=cc
16996 ac_cpp='$CXXCPP $CPPFLAGS'
16997 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16998 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16999 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17000 ac_main_return="return"
17001
17002 cat > conftest.$ac_ext <<EOF
17003 #line 17003 "configure"
17004 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17005 EOF
17006
17007 if test "$INTEL_CPLUSPLUS" = yes
17008 then
17009 # The "-wdXXX" options suppress warnings:
17010 # remark #1419: external declaration in primary source file
17011 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17012 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17013 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17014 # remark #193: zero used for undefined preprocessing identifier
17015 # remark #593: variable "curs_sb_left_arrow" was set but never used
17016 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17017 # remark #869: parameter "tw" was never referenced
17018 # remark #981: operands are evaluated in unspecified order
17019 # warning #269: invalid format string conversion
17020
17021         { echo "$as_me:17021: checking for $CC warning options..." >&5
17022 echo "$as_me: checking for $CC warning options..." >&6;}
17023         cf_save_CXXFLAGS="$CXXFLAGS"
17024         EXTRA_CXXFLAGS="-Wall"
17025         for cf_opt in \
17026                 wd1419 \
17027                 wd1682 \
17028                 wd1683 \
17029                 wd1684 \
17030                 wd193 \
17031                 wd279 \
17032                 wd593 \
17033                 wd810 \
17034                 wd869 \
17035                 wd981
17036         do
17037                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17038                 if { (eval echo "$as_me:17038: \"$ac_compile\"") >&5
17039   (eval $ac_compile) 2>&5
17040   ac_status=$?
17041   echo "$as_me:17041: \$? = $ac_status" >&5
17042   (exit "$ac_status"); }; then
17043                         test -n "$verbose" && echo "$as_me:17043: result: ... -$cf_opt" >&5
17044 echo "${ECHO_T}... -$cf_opt" >&6
17045                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17046                 fi
17047         done
17048         CXXFLAGS="$cf_save_CXXFLAGS"
17049
17050 elif test "$GXX" = yes
17051 then
17052         { echo "$as_me:17052: checking for $CXX warning options..." >&5
17053 echo "$as_me: checking for $CXX warning options..." >&6;}
17054         cf_save_CXXFLAGS="$CXXFLAGS"
17055         EXTRA_CXXFLAGS="-W -Wall"
17056         cf_gxx_extra_warnings=""
17057         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17058         case "$GXX_VERSION" in
17059         ([1-2].*)
17060                 ;;
17061         (*)
17062                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17063                 ;;
17064         esac
17065         for cf_opt in \
17066                 Wabi \
17067                 fabi-version=0 \
17068                 Wextra \
17069                 Wignored-qualifiers \
17070                 Wlogical-op \
17071                 Woverloaded-virtual \
17072                 Wsign-promo \
17073                 Wsynth \
17074                 Wold-style-cast \
17075                 Wcast-align \
17076                 Wcast-qual \
17077                 Wpointer-arith \
17078                 Wshadow \
17079                 Wundef $cf_gxx_extra_warnings Wno-unused
17080         do
17081                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17082                 if { (eval echo "$as_me:17082: \"$ac_compile\"") >&5
17083   (eval $ac_compile) 2>&5
17084   ac_status=$?
17085   echo "$as_me:17085: \$? = $ac_status" >&5
17086   (exit "$ac_status"); }; then
17087                         test -n "$verbose" && echo "$as_me:17087: result: ... -$cf_opt" >&5
17088 echo "${ECHO_T}... -$cf_opt" >&6
17089                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17090                 else
17091                         test -n "$verbose" && echo "$as_me:17091: result: ... no -$cf_opt" >&5
17092 echo "${ECHO_T}... no -$cf_opt" >&6
17093                 fi
17094         done
17095         CXXFLAGS="$cf_save_CXXFLAGS"
17096 fi
17097
17098 rm -rf ./conftest*
17099 ac_ext=c
17100 ac_cpp='$CPP $CPPFLAGS'
17101 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17102 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17103 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17104 ac_main_return="return"
17105
17106         fi
17107 fi
17108
17109 echo "$as_me:17109: checking if you want to work around bogus compiler/loader warnings" >&5
17110 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17111
17112 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17113 if test "${enable_string_hacks+set}" = set; then
17114   enableval="$enable_string_hacks"
17115   enable_string_hacks=$enableval
17116 else
17117   enable_string_hacks=no
17118 fi;
17119 echo "$as_me:17119: result: $enable_string_hacks" >&5
17120 echo "${ECHO_T}$enable_string_hacks" >&6
17121
17122 if test "x$enable_string_hacks" = "xyes"; then
17123
17124 cat >>confdefs.h <<\EOF
17125 #define USE_STRING_HACKS 1
17126 EOF
17127
17128         { echo "$as_me:17128: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17129 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17130         echo "$as_me:17130: checking for strlcat" >&5
17131 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17132 if test "${ac_cv_func_strlcat+set}" = set; then
17133   echo $ECHO_N "(cached) $ECHO_C" >&6
17134 else
17135   cat >"conftest.$ac_ext" <<_ACEOF
17136 #line 17136 "configure"
17137 #include "confdefs.h"
17138 #define strlcat autoconf_temporary
17139 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17140 #undef strlcat
17141
17142 #ifdef __cplusplus
17143 extern "C"
17144 #endif
17145
17146 /* We use char because int might match the return type of a gcc2
17147    builtin and then its argument prototype would still apply.  */
17148 char strlcat (void);
17149
17150 int
17151 main (void)
17152 {
17153
17154 /* The GNU C library defines stubs for functions which it implements
17155     to always fail with ENOSYS.  Some functions are actually named
17156     something starting with __ and the normal name is an alias.  */
17157 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17158 #error found stub for strlcat
17159 #endif
17160
17161         return strlcat ();
17162   ;
17163   return 0;
17164 }
17165 _ACEOF
17166 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17167 if { (eval echo "$as_me:17167: \"$ac_link\"") >&5
17168   (eval $ac_link) 2>&5
17169   ac_status=$?
17170   echo "$as_me:17170: \$? = $ac_status" >&5
17171   (exit "$ac_status"); } &&
17172          { ac_try='test -s "conftest$ac_exeext"'
17173   { (eval echo "$as_me:17173: \"$ac_try\"") >&5
17174   (eval $ac_try) 2>&5
17175   ac_status=$?
17176   echo "$as_me:17176: \$? = $ac_status" >&5
17177   (exit "$ac_status"); }; }; then
17178   ac_cv_func_strlcat=yes
17179 else
17180   echo "$as_me: failed program was:" >&5
17181 cat "conftest.$ac_ext" >&5
17182 ac_cv_func_strlcat=no
17183 fi
17184 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17185 fi
17186 echo "$as_me:17186: result: $ac_cv_func_strlcat" >&5
17187 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17188 if test "$ac_cv_func_strlcat" = yes; then
17189
17190 cat >>confdefs.h <<\EOF
17191 #define HAVE_STRLCAT 1
17192 EOF
17193
17194 else
17195
17196                 echo "$as_me:17196: checking for strlcat in -lbsd" >&5
17197 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17198 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17199   echo $ECHO_N "(cached) $ECHO_C" >&6
17200 else
17201   ac_check_lib_save_LIBS=$LIBS
17202 LIBS="-lbsd  $LIBS"
17203 cat >"conftest.$ac_ext" <<_ACEOF
17204 #line 17204 "configure"
17205 #include "confdefs.h"
17206
17207 /* Override any gcc2 internal prototype to avoid an error.  */
17208 #ifdef __cplusplus
17209 extern "C"
17210 #endif
17211 /* We use char because int might match the return type of a gcc2
17212    builtin and then its argument prototype would still apply.  */
17213 char strlcat ();
17214 int
17215 main (void)
17216 {
17217 strlcat ();
17218   ;
17219   return 0;
17220 }
17221 _ACEOF
17222 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17223 if { (eval echo "$as_me:17223: \"$ac_link\"") >&5
17224   (eval $ac_link) 2>&5
17225   ac_status=$?
17226   echo "$as_me:17226: \$? = $ac_status" >&5
17227   (exit "$ac_status"); } &&
17228          { ac_try='test -s "conftest$ac_exeext"'
17229   { (eval echo "$as_me:17229: \"$ac_try\"") >&5
17230   (eval $ac_try) 2>&5
17231   ac_status=$?
17232   echo "$as_me:17232: \$? = $ac_status" >&5
17233   (exit "$ac_status"); }; }; then
17234   ac_cv_lib_bsd_strlcat=yes
17235 else
17236   echo "$as_me: failed program was:" >&5
17237 cat "conftest.$ac_ext" >&5
17238 ac_cv_lib_bsd_strlcat=no
17239 fi
17240 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17241 LIBS=$ac_check_lib_save_LIBS
17242 fi
17243 echo "$as_me:17243: result: $ac_cv_lib_bsd_strlcat" >&5
17244 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17245 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17246
17247 cf_add_libs="$LIBS"
17248 # reverse order
17249 cf_add_0lib=
17250 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17251 # filter duplicates
17252 for cf_add_1lib in $cf_add_0lib; do
17253         for cf_add_2lib in $cf_add_libs; do
17254                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17255                         cf_add_1lib=
17256                         break
17257                 fi
17258         done
17259         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17260 done
17261 LIBS="$cf_add_libs"
17262
17263 for ac_header in bsd/string.h
17264 do
17265 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17266 echo "$as_me:17266: checking for $ac_header" >&5
17267 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17268 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17269   echo $ECHO_N "(cached) $ECHO_C" >&6
17270 else
17271   cat >"conftest.$ac_ext" <<_ACEOF
17272 #line 17272 "configure"
17273 #include "confdefs.h"
17274 #include <$ac_header>
17275 _ACEOF
17276 if { (eval echo "$as_me:17276: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17277   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17278   ac_status=$?
17279   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17280   rm -f conftest.er1
17281   cat conftest.err >&5
17282   echo "$as_me:17282: \$? = $ac_status" >&5
17283   (exit "$ac_status"); } >/dev/null; then
17284   if test -s conftest.err; then
17285     ac_cpp_err=$ac_c_preproc_warn_flag
17286   else
17287     ac_cpp_err=
17288   fi
17289 else
17290   ac_cpp_err=yes
17291 fi
17292 if test -z "$ac_cpp_err"; then
17293   eval "$as_ac_Header=yes"
17294 else
17295   echo "$as_me: failed program was:" >&5
17296   cat "conftest.$ac_ext" >&5
17297   eval "$as_ac_Header=no"
17298 fi
17299 rm -f conftest.err "conftest.$ac_ext"
17300 fi
17301 echo "$as_me:17301: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17302 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17303 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17304   cat >>confdefs.h <<EOF
17305 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17306 EOF
17307
17308 fi
17309 done
17310
17311 cat >>confdefs.h <<\EOF
17312 #define HAVE_STRLCAT 1
17313 EOF
17314
17315 fi
17316
17317 fi
17318
17319 for ac_func in strlcpy snprintf
17320 do
17321 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17322 echo "$as_me:17322: checking for $ac_func" >&5
17323 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17324 if eval "test \"\${$as_ac_var+set}\" = set"; then
17325   echo $ECHO_N "(cached) $ECHO_C" >&6
17326 else
17327   cat >"conftest.$ac_ext" <<_ACEOF
17328 #line 17328 "configure"
17329 #include "confdefs.h"
17330 #define $ac_func autoconf_temporary
17331 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17332 #undef $ac_func
17333
17334 #ifdef __cplusplus
17335 extern "C"
17336 #endif
17337
17338 /* We use char because int might match the return type of a gcc2
17339    builtin and then its argument prototype would still apply.  */
17340 char $ac_func (void);
17341
17342 int
17343 main (void)
17344 {
17345
17346 /* The GNU C library defines stubs for functions which it implements
17347     to always fail with ENOSYS.  Some functions are actually named
17348     something starting with __ and the normal name is an alias.  */
17349 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17350 #error found stub for $ac_func
17351 #endif
17352
17353         return $ac_func ();
17354   ;
17355   return 0;
17356 }
17357 _ACEOF
17358 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17359 if { (eval echo "$as_me:17359: \"$ac_link\"") >&5
17360   (eval $ac_link) 2>&5
17361   ac_status=$?
17362   echo "$as_me:17362: \$? = $ac_status" >&5
17363   (exit "$ac_status"); } &&
17364          { ac_try='test -s "conftest$ac_exeext"'
17365   { (eval echo "$as_me:17365: \"$ac_try\"") >&5
17366   (eval $ac_try) 2>&5
17367   ac_status=$?
17368   echo "$as_me:17368: \$? = $ac_status" >&5
17369   (exit "$ac_status"); }; }; then
17370   eval "$as_ac_var=yes"
17371 else
17372   echo "$as_me: failed program was:" >&5
17373 cat "conftest.$ac_ext" >&5
17374 eval "$as_ac_var=no"
17375 fi
17376 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17377 fi
17378 echo "$as_me:17378: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17379 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17380 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17381   cat >>confdefs.h <<EOF
17382 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17383 EOF
17384
17385 fi
17386 done
17387
17388 fi
17389
17390 ###     use option --enable-assertions to turn on generation of assertion code
17391 echo "$as_me:17391: checking if you want to enable runtime assertions" >&5
17392 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17393
17394 # Check whether --enable-assertions or --disable-assertions was given.
17395 if test "${enable_assertions+set}" = set; then
17396   enableval="$enable_assertions"
17397   with_assertions=$enableval
17398 else
17399   with_assertions=no
17400 fi;
17401 echo "$as_me:17401: result: $with_assertions" >&5
17402 echo "${ECHO_T}$with_assertions" >&6
17403 if test -n "$GCC"
17404 then
17405         if test "$with_assertions" = no
17406         then
17407                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17408         else
17409
17410         ADAFLAGS="$ADAFLAGS -gnata"
17411
17412         fi
17413 fi
17414
17415 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17416
17417 echo "$as_me:17417: checking if you want to use dmalloc for testing" >&5
17418 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17419
17420 # Check whether --with-dmalloc or --without-dmalloc was given.
17421 if test "${with_dmalloc+set}" = set; then
17422   withval="$with_dmalloc"
17423
17424 cat >>confdefs.h <<EOF
17425 #define USE_DMALLOC 1
17426 EOF
17427
17428         : "${with_cflags:=-g}"
17429         : "${enable_leaks:=no}"
17430          with_dmalloc=yes
17431 else
17432   with_dmalloc=
17433 fi;
17434 echo "$as_me:17434: result: ${with_dmalloc:-no}" >&5
17435 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17436
17437 case ".$with_cflags" in
17438 (.*-g*)
17439         case .$CFLAGS in
17440         (.*-g*)
17441                 ;;
17442         (*)
17443
17444 cf_fix_cppflags=no
17445 cf_new_cflags=
17446 cf_new_cppflags=
17447 cf_new_extra_cppflags=
17448
17449 for cf_add_cflags in -g
17450 do
17451 case "$cf_fix_cppflags" in
17452 (no)
17453         case "$cf_add_cflags" in
17454         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17455                 case "$cf_add_cflags" in
17456                 (-D*)
17457                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17458
17459                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17460                                 && test -z "${cf_tst_cflags}" \
17461                                 && cf_fix_cppflags=yes
17462
17463                         if test "$cf_fix_cppflags" = yes ; then
17464
17465         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17466         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17467
17468                                 continue
17469                         elif test "${cf_tst_cflags}" = "\"'" ; then
17470
17471         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17472         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17473
17474                                 continue
17475                         fi
17476                         ;;
17477                 esac
17478                 case "$CPPFLAGS" in
17479                 (*$cf_add_cflags)
17480                         ;;
17481                 (*)
17482                         case "$cf_add_cflags" in
17483                         (-D*)
17484                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17485
17486 CPPFLAGS=`echo "$CPPFLAGS" | \
17487         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17488                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17489
17490                                 ;;
17491                         esac
17492
17493         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17494         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17495
17496                         ;;
17497                 esac
17498                 ;;
17499         (*)
17500
17501         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17502         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17503
17504                 ;;
17505         esac
17506         ;;
17507 (yes)
17508
17509         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17510         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17511
17512         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17513
17514         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17515                 && test -z "${cf_tst_cflags}" \
17516                 && cf_fix_cppflags=no
17517         ;;
17518 esac
17519 done
17520
17521 if test -n "$cf_new_cflags" ; then
17522
17523         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17524         CFLAGS="${CFLAGS}$cf_new_cflags"
17525
17526 fi
17527
17528 if test -n "$cf_new_cppflags" ; then
17529
17530         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17531         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17532
17533 fi
17534
17535 if test -n "$cf_new_extra_cppflags" ; then
17536
17537         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17538         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17539
17540 fi
17541
17542                 ;;
17543         esac
17544         ;;
17545 esac
17546
17547 if test "$with_dmalloc" = yes ; then
17548         echo "$as_me:17548: checking for dmalloc.h" >&5
17549 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17550 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17551   echo $ECHO_N "(cached) $ECHO_C" >&6
17552 else
17553   cat >"conftest.$ac_ext" <<_ACEOF
17554 #line 17554 "configure"
17555 #include "confdefs.h"
17556 #include <dmalloc.h>
17557 _ACEOF
17558 if { (eval echo "$as_me:17558: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17559   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17560   ac_status=$?
17561   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17562   rm -f conftest.er1
17563   cat conftest.err >&5
17564   echo "$as_me:17564: \$? = $ac_status" >&5
17565   (exit "$ac_status"); } >/dev/null; then
17566   if test -s conftest.err; then
17567     ac_cpp_err=$ac_c_preproc_warn_flag
17568   else
17569     ac_cpp_err=
17570   fi
17571 else
17572   ac_cpp_err=yes
17573 fi
17574 if test -z "$ac_cpp_err"; then
17575   ac_cv_header_dmalloc_h=yes
17576 else
17577   echo "$as_me: failed program was:" >&5
17578   cat "conftest.$ac_ext" >&5
17579   ac_cv_header_dmalloc_h=no
17580 fi
17581 rm -f conftest.err "conftest.$ac_ext"
17582 fi
17583 echo "$as_me:17583: result: $ac_cv_header_dmalloc_h" >&5
17584 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17585 if test "$ac_cv_header_dmalloc_h" = yes; then
17586
17587 echo "$as_me:17587: checking for dmalloc_debug in -ldmalloc" >&5
17588 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17589 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17590   echo $ECHO_N "(cached) $ECHO_C" >&6
17591 else
17592   ac_check_lib_save_LIBS=$LIBS
17593 LIBS="-ldmalloc  $LIBS"
17594 cat >"conftest.$ac_ext" <<_ACEOF
17595 #line 17595 "configure"
17596 #include "confdefs.h"
17597
17598 /* Override any gcc2 internal prototype to avoid an error.  */
17599 #ifdef __cplusplus
17600 extern "C"
17601 #endif
17602 /* We use char because int might match the return type of a gcc2
17603    builtin and then its argument prototype would still apply.  */
17604 char dmalloc_debug ();
17605 int
17606 main (void)
17607 {
17608 dmalloc_debug ();
17609   ;
17610   return 0;
17611 }
17612 _ACEOF
17613 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17614 if { (eval echo "$as_me:17614: \"$ac_link\"") >&5
17615   (eval $ac_link) 2>&5
17616   ac_status=$?
17617   echo "$as_me:17617: \$? = $ac_status" >&5
17618   (exit "$ac_status"); } &&
17619          { ac_try='test -s "conftest$ac_exeext"'
17620   { (eval echo "$as_me:17620: \"$ac_try\"") >&5
17621   (eval $ac_try) 2>&5
17622   ac_status=$?
17623   echo "$as_me:17623: \$? = $ac_status" >&5
17624   (exit "$ac_status"); }; }; then
17625   ac_cv_lib_dmalloc_dmalloc_debug=yes
17626 else
17627   echo "$as_me: failed program was:" >&5
17628 cat "conftest.$ac_ext" >&5
17629 ac_cv_lib_dmalloc_dmalloc_debug=no
17630 fi
17631 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17632 LIBS=$ac_check_lib_save_LIBS
17633 fi
17634 echo "$as_me:17634: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17635 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17636 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
17637   cat >>confdefs.h <<EOF
17638 #define HAVE_LIBDMALLOC 1
17639 EOF
17640
17641   LIBS="-ldmalloc $LIBS"
17642
17643 fi
17644
17645 fi
17646
17647 fi
17648
17649 echo "$as_me:17649: checking if you want to use dbmalloc for testing" >&5
17650 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17651
17652 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17653 if test "${with_dbmalloc+set}" = set; then
17654   withval="$with_dbmalloc"
17655
17656 cat >>confdefs.h <<EOF
17657 #define USE_DBMALLOC 1
17658 EOF
17659
17660         : "${with_cflags:=-g}"
17661         : "${enable_leaks:=no}"
17662          with_dbmalloc=yes
17663 else
17664   with_dbmalloc=
17665 fi;
17666 echo "$as_me:17666: result: ${with_dbmalloc:-no}" >&5
17667 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17668
17669 case ".$with_cflags" in
17670 (.*-g*)
17671         case .$CFLAGS in
17672         (.*-g*)
17673                 ;;
17674         (*)
17675
17676 cf_fix_cppflags=no
17677 cf_new_cflags=
17678 cf_new_cppflags=
17679 cf_new_extra_cppflags=
17680
17681 for cf_add_cflags in -g
17682 do
17683 case "$cf_fix_cppflags" in
17684 (no)
17685         case "$cf_add_cflags" in
17686         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17687                 case "$cf_add_cflags" in
17688                 (-D*)
17689                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17690
17691                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17692                                 && test -z "${cf_tst_cflags}" \
17693                                 && cf_fix_cppflags=yes
17694
17695                         if test "$cf_fix_cppflags" = yes ; then
17696
17697         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17698         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17699
17700                                 continue
17701                         elif test "${cf_tst_cflags}" = "\"'" ; then
17702
17703         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17704         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17705
17706                                 continue
17707                         fi
17708                         ;;
17709                 esac
17710                 case "$CPPFLAGS" in
17711                 (*$cf_add_cflags)
17712                         ;;
17713                 (*)
17714                         case "$cf_add_cflags" in
17715                         (-D*)
17716                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17717
17718 CPPFLAGS=`echo "$CPPFLAGS" | \
17719         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17720                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17721
17722                                 ;;
17723                         esac
17724
17725         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17726         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17727
17728                         ;;
17729                 esac
17730                 ;;
17731         (*)
17732
17733         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17734         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17735
17736                 ;;
17737         esac
17738         ;;
17739 (yes)
17740
17741         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17742         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17743
17744         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17745
17746         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17747                 && test -z "${cf_tst_cflags}" \
17748                 && cf_fix_cppflags=no
17749         ;;
17750 esac
17751 done
17752
17753 if test -n "$cf_new_cflags" ; then
17754
17755         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17756         CFLAGS="${CFLAGS}$cf_new_cflags"
17757
17758 fi
17759
17760 if test -n "$cf_new_cppflags" ; then
17761
17762         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17763         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17764
17765 fi
17766
17767 if test -n "$cf_new_extra_cppflags" ; then
17768
17769         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17770         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17771
17772 fi
17773
17774                 ;;
17775         esac
17776         ;;
17777 esac
17778
17779 if test "$with_dbmalloc" = yes ; then
17780         echo "$as_me:17780: checking for dbmalloc.h" >&5
17781 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17782 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17783   echo $ECHO_N "(cached) $ECHO_C" >&6
17784 else
17785   cat >"conftest.$ac_ext" <<_ACEOF
17786 #line 17786 "configure"
17787 #include "confdefs.h"
17788 #include <dbmalloc.h>
17789 _ACEOF
17790 if { (eval echo "$as_me:17790: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17791   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17792   ac_status=$?
17793   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17794   rm -f conftest.er1
17795   cat conftest.err >&5
17796   echo "$as_me:17796: \$? = $ac_status" >&5
17797   (exit "$ac_status"); } >/dev/null; then
17798   if test -s conftest.err; then
17799     ac_cpp_err=$ac_c_preproc_warn_flag
17800   else
17801     ac_cpp_err=
17802   fi
17803 else
17804   ac_cpp_err=yes
17805 fi
17806 if test -z "$ac_cpp_err"; then
17807   ac_cv_header_dbmalloc_h=yes
17808 else
17809   echo "$as_me: failed program was:" >&5
17810   cat "conftest.$ac_ext" >&5
17811   ac_cv_header_dbmalloc_h=no
17812 fi
17813 rm -f conftest.err "conftest.$ac_ext"
17814 fi
17815 echo "$as_me:17815: result: $ac_cv_header_dbmalloc_h" >&5
17816 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17817 if test "$ac_cv_header_dbmalloc_h" = yes; then
17818
17819 echo "$as_me:17819: checking for debug_malloc in -ldbmalloc" >&5
17820 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17821 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17822   echo $ECHO_N "(cached) $ECHO_C" >&6
17823 else
17824   ac_check_lib_save_LIBS=$LIBS
17825 LIBS="-ldbmalloc  $LIBS"
17826 cat >"conftest.$ac_ext" <<_ACEOF
17827 #line 17827 "configure"
17828 #include "confdefs.h"
17829
17830 /* Override any gcc2 internal prototype to avoid an error.  */
17831 #ifdef __cplusplus
17832 extern "C"
17833 #endif
17834 /* We use char because int might match the return type of a gcc2
17835    builtin and then its argument prototype would still apply.  */
17836 char debug_malloc ();
17837 int
17838 main (void)
17839 {
17840 debug_malloc ();
17841   ;
17842   return 0;
17843 }
17844 _ACEOF
17845 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17846 if { (eval echo "$as_me:17846: \"$ac_link\"") >&5
17847   (eval $ac_link) 2>&5
17848   ac_status=$?
17849   echo "$as_me:17849: \$? = $ac_status" >&5
17850   (exit "$ac_status"); } &&
17851          { ac_try='test -s "conftest$ac_exeext"'
17852   { (eval echo "$as_me:17852: \"$ac_try\"") >&5
17853   (eval $ac_try) 2>&5
17854   ac_status=$?
17855   echo "$as_me:17855: \$? = $ac_status" >&5
17856   (exit "$ac_status"); }; }; then
17857   ac_cv_lib_dbmalloc_debug_malloc=yes
17858 else
17859   echo "$as_me: failed program was:" >&5
17860 cat "conftest.$ac_ext" >&5
17861 ac_cv_lib_dbmalloc_debug_malloc=no
17862 fi
17863 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17864 LIBS=$ac_check_lib_save_LIBS
17865 fi
17866 echo "$as_me:17866: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17867 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17868 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
17869   cat >>confdefs.h <<EOF
17870 #define HAVE_LIBDBMALLOC 1
17871 EOF
17872
17873   LIBS="-ldbmalloc $LIBS"
17874
17875 fi
17876
17877 fi
17878
17879 fi
17880
17881 echo "$as_me:17881: checking if you want to use valgrind for testing" >&5
17882 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17883
17884 # Check whether --with-valgrind or --without-valgrind was given.
17885 if test "${with_valgrind+set}" = set; then
17886   withval="$with_valgrind"
17887
17888 cat >>confdefs.h <<EOF
17889 #define USE_VALGRIND 1
17890 EOF
17891
17892         : "${with_cflags:=-g}"
17893         : "${enable_leaks:=no}"
17894          with_valgrind=yes
17895 else
17896   with_valgrind=
17897 fi;
17898 echo "$as_me:17898: result: ${with_valgrind:-no}" >&5
17899 echo "${ECHO_T}${with_valgrind:-no}" >&6
17900
17901 case ".$with_cflags" in
17902 (.*-g*)
17903         case .$CFLAGS in
17904         (.*-g*)
17905                 ;;
17906         (*)
17907
17908 cf_fix_cppflags=no
17909 cf_new_cflags=
17910 cf_new_cppflags=
17911 cf_new_extra_cppflags=
17912
17913 for cf_add_cflags in -g
17914 do
17915 case "$cf_fix_cppflags" in
17916 (no)
17917         case "$cf_add_cflags" in
17918         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17919                 case "$cf_add_cflags" in
17920                 (-D*)
17921                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17922
17923                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17924                                 && test -z "${cf_tst_cflags}" \
17925                                 && cf_fix_cppflags=yes
17926
17927                         if test "$cf_fix_cppflags" = yes ; then
17928
17929         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17930         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17931
17932                                 continue
17933                         elif test "${cf_tst_cflags}" = "\"'" ; then
17934
17935         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17936         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17937
17938                                 continue
17939                         fi
17940                         ;;
17941                 esac
17942                 case "$CPPFLAGS" in
17943                 (*$cf_add_cflags)
17944                         ;;
17945                 (*)
17946                         case "$cf_add_cflags" in
17947                         (-D*)
17948                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17949
17950 CPPFLAGS=`echo "$CPPFLAGS" | \
17951         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17952                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17953
17954                                 ;;
17955                         esac
17956
17957         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17958         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17959
17960                         ;;
17961                 esac
17962                 ;;
17963         (*)
17964
17965         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17966         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17967
17968                 ;;
17969         esac
17970         ;;
17971 (yes)
17972
17973         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17974         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17975
17976         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17977
17978         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17979                 && test -z "${cf_tst_cflags}" \
17980                 && cf_fix_cppflags=no
17981         ;;
17982 esac
17983 done
17984
17985 if test -n "$cf_new_cflags" ; then
17986
17987         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17988         CFLAGS="${CFLAGS}$cf_new_cflags"
17989
17990 fi
17991
17992 if test -n "$cf_new_cppflags" ; then
17993
17994         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17995         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17996
17997 fi
17998
17999 if test -n "$cf_new_extra_cppflags" ; then
18000
18001         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18002         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18003
18004 fi
18005
18006                 ;;
18007         esac
18008         ;;
18009 esac
18010
18011 echo "$as_me:18011: checking if you want to perform memory-leak testing" >&5
18012 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18013
18014 # Check whether --enable-leaks or --disable-leaks was given.
18015 if test "${enable_leaks+set}" = set; then
18016   enableval="$enable_leaks"
18017   enable_leaks=no
18018 else
18019   enable_leaks=yes
18020 fi;
18021 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18022 echo "$as_me:18022: result: $with_no_leaks" >&5
18023 echo "${ECHO_T}$with_no_leaks" >&6
18024
18025 if test "$enable_leaks" = no ; then
18026
18027 cat >>confdefs.h <<\EOF
18028 #define NO_LEAKS 1
18029 EOF
18030
18031 cat >>confdefs.h <<\EOF
18032 #define YY_NO_LEAKS 1
18033 EOF
18034
18035 fi
18036
18037 cat >>confdefs.h <<\EOF
18038 #define HAVE_NC_ALLOC_H 1
18039 EOF
18040
18041 ###     use option --enable-expanded to generate certain macros as functions
18042
18043 # Check whether --enable-expanded or --disable-expanded was given.
18044 if test "${enable_expanded+set}" = set; then
18045   enableval="$enable_expanded"
18046   test "x$enableval" = xyes &&
18047 cat >>confdefs.h <<\EOF
18048 #define NCURSES_EXPANDED 1
18049 EOF
18050
18051 fi;
18052
18053 ###     use option --disable-macros to suppress macros in favor of functions
18054
18055 # Check whether --enable-macros or --disable-macros was given.
18056 if test "${enable_macros+set}" = set; then
18057   enableval="$enable_macros"
18058   test "$enableval" = no &&
18059 cat >>confdefs.h <<\EOF
18060 #define NCURSES_NOMACROS 1
18061 EOF
18062
18063 fi;
18064
18065 # Normally we only add trace() to the debug-library.  Allow this to be
18066 # extended to all models of the ncurses library:
18067 cf_all_traces=no
18068 case "$CFLAGS $CPPFLAGS" in
18069 (*-DTRACE*)
18070         cf_all_traces=yes
18071         ;;
18072 esac
18073
18074 echo "$as_me:18074: checking whether to add trace feature to all models" >&5
18075 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18076
18077 # Check whether --with-trace or --without-trace was given.
18078 if test "${with_trace+set}" = set; then
18079   withval="$with_trace"
18080   cf_with_trace=$withval
18081 else
18082   cf_with_trace=$cf_all_traces
18083 fi;
18084 echo "$as_me:18084: result: $cf_with_trace" >&5
18085 echo "${ECHO_T}$cf_with_trace" >&6
18086
18087 if test "x$cf_with_trace" = xyes ; then
18088         LIB_TRACING=all
18089         ADA_TRACE=TRUE
18090
18091 cf_fix_cppflags=no
18092 cf_new_cflags=
18093 cf_new_cppflags=
18094 cf_new_extra_cppflags=
18095
18096 for cf_add_cflags in -DTRACE
18097 do
18098 case "$cf_fix_cppflags" in
18099 (no)
18100         case "$cf_add_cflags" in
18101         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18102                 case "$cf_add_cflags" in
18103                 (-D*)
18104                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18105
18106                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18107                                 && test -z "${cf_tst_cflags}" \
18108                                 && cf_fix_cppflags=yes
18109
18110                         if test "$cf_fix_cppflags" = yes ; then
18111
18112         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18113         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18114
18115                                 continue
18116                         elif test "${cf_tst_cflags}" = "\"'" ; then
18117
18118         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18119         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18120
18121                                 continue
18122                         fi
18123                         ;;
18124                 esac
18125                 case "$CPPFLAGS" in
18126                 (*$cf_add_cflags)
18127                         ;;
18128                 (*)
18129                         case "$cf_add_cflags" in
18130                         (-D*)
18131                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18132
18133 CPPFLAGS=`echo "$CPPFLAGS" | \
18134         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18135                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18136
18137                                 ;;
18138                         esac
18139
18140         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18141         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18142
18143                         ;;
18144                 esac
18145                 ;;
18146         (*)
18147
18148         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18149         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18150
18151                 ;;
18152         esac
18153         ;;
18154 (yes)
18155
18156         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18157         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18158
18159         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18160
18161         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18162                 && test -z "${cf_tst_cflags}" \
18163                 && cf_fix_cppflags=no
18164         ;;
18165 esac
18166 done
18167
18168 if test -n "$cf_new_cflags" ; then
18169
18170         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18171         CFLAGS="${CFLAGS}$cf_new_cflags"
18172
18173 fi
18174
18175 if test -n "$cf_new_cppflags" ; then
18176
18177         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18178         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18179
18180 fi
18181
18182 if test -n "$cf_new_extra_cppflags" ; then
18183
18184         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18185         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18186
18187 fi
18188
18189 cat >>confdefs.h <<\EOF
18190 #define HAVE__TRACEF 1
18191 EOF
18192
18193 else
18194         LIB_TRACING=DEBUG
18195         ADA_TRACE=FALSE
18196 fi
18197
18198 echo "$as_me:18198: checking if we want to use GNAT projects" >&5
18199 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18200
18201 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18202 if test "${enable_gnat_projects+set}" = set; then
18203   enableval="$enable_gnat_projects"
18204   test "$enableval" != no && enableval=yes
18205         if test "$enableval" != "yes" ; then
18206     enable_gnat_projects=no
18207         else
18208                 enable_gnat_projects=yes
18209         fi
18210 else
18211   enableval=yes
18212         enable_gnat_projects=yes
18213
18214 fi;
18215 echo "$as_me:18215: result: $enable_gnat_projects" >&5
18216 echo "${ECHO_T}$enable_gnat_projects" >&6
18217
18218 ###     Checks for libraries.
18219 case "$cf_cv_system_name" in
18220 (*mingw32*|*mingw64*)
18221         if test "x$with_exp_win32" = xyes ; then
18222         CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18223         else
18224         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18225         fi
18226         # Note: WINVER may be a problem with Windows 10
18227         ;;
18228 (*)
18229 echo "$as_me:18229: checking for gettimeofday" >&5
18230 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18231 if test "${ac_cv_func_gettimeofday+set}" = set; then
18232   echo $ECHO_N "(cached) $ECHO_C" >&6
18233 else
18234   cat >"conftest.$ac_ext" <<_ACEOF
18235 #line 18235 "configure"
18236 #include "confdefs.h"
18237 #define gettimeofday autoconf_temporary
18238 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18239 #undef gettimeofday
18240
18241 #ifdef __cplusplus
18242 extern "C"
18243 #endif
18244
18245 /* We use char because int might match the return type of a gcc2
18246    builtin and then its argument prototype would still apply.  */
18247 char gettimeofday (void);
18248
18249 int
18250 main (void)
18251 {
18252
18253 /* The GNU C library defines stubs for functions which it implements
18254     to always fail with ENOSYS.  Some functions are actually named
18255     something starting with __ and the normal name is an alias.  */
18256 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18257 #error found stub for gettimeofday
18258 #endif
18259
18260         return gettimeofday ();
18261   ;
18262   return 0;
18263 }
18264 _ACEOF
18265 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18266 if { (eval echo "$as_me:18266: \"$ac_link\"") >&5
18267   (eval $ac_link) 2>&5
18268   ac_status=$?
18269   echo "$as_me:18269: \$? = $ac_status" >&5
18270   (exit "$ac_status"); } &&
18271          { ac_try='test -s "conftest$ac_exeext"'
18272   { (eval echo "$as_me:18272: \"$ac_try\"") >&5
18273   (eval $ac_try) 2>&5
18274   ac_status=$?
18275   echo "$as_me:18275: \$? = $ac_status" >&5
18276   (exit "$ac_status"); }; }; then
18277   ac_cv_func_gettimeofday=yes
18278 else
18279   echo "$as_me: failed program was:" >&5
18280 cat "conftest.$ac_ext" >&5
18281 ac_cv_func_gettimeofday=no
18282 fi
18283 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18284 fi
18285 echo "$as_me:18285: result: $ac_cv_func_gettimeofday" >&5
18286 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18287 if test "$ac_cv_func_gettimeofday" = yes; then
18288
18289 cat >>confdefs.h <<\EOF
18290 #define HAVE_GETTIMEOFDAY 1
18291 EOF
18292
18293 else
18294
18295 echo "$as_me:18295: checking for gettimeofday in -lbsd" >&5
18296 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18297 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18298   echo $ECHO_N "(cached) $ECHO_C" >&6
18299 else
18300   ac_check_lib_save_LIBS=$LIBS
18301 LIBS="-lbsd  $LIBS"
18302 cat >"conftest.$ac_ext" <<_ACEOF
18303 #line 18303 "configure"
18304 #include "confdefs.h"
18305
18306 /* Override any gcc2 internal prototype to avoid an error.  */
18307 #ifdef __cplusplus
18308 extern "C"
18309 #endif
18310 /* We use char because int might match the return type of a gcc2
18311    builtin and then its argument prototype would still apply.  */
18312 char gettimeofday ();
18313 int
18314 main (void)
18315 {
18316 gettimeofday ();
18317   ;
18318   return 0;
18319 }
18320 _ACEOF
18321 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18322 if { (eval echo "$as_me:18322: \"$ac_link\"") >&5
18323   (eval $ac_link) 2>&5
18324   ac_status=$?
18325   echo "$as_me:18325: \$? = $ac_status" >&5
18326   (exit "$ac_status"); } &&
18327          { ac_try='test -s "conftest$ac_exeext"'
18328   { (eval echo "$as_me:18328: \"$ac_try\"") >&5
18329   (eval $ac_try) 2>&5
18330   ac_status=$?
18331   echo "$as_me:18331: \$? = $ac_status" >&5
18332   (exit "$ac_status"); }; }; then
18333   ac_cv_lib_bsd_gettimeofday=yes
18334 else
18335   echo "$as_me: failed program was:" >&5
18336 cat "conftest.$ac_ext" >&5
18337 ac_cv_lib_bsd_gettimeofday=no
18338 fi
18339 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18340 LIBS=$ac_check_lib_save_LIBS
18341 fi
18342 echo "$as_me:18342: result: $ac_cv_lib_bsd_gettimeofday" >&5
18343 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18344 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18345
18346 cat >>confdefs.h <<\EOF
18347 #define HAVE_GETTIMEOFDAY 1
18348 EOF
18349
18350 cf_add_libs="$LIBS"
18351 # reverse order
18352 cf_add_0lib=
18353 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18354 # filter duplicates
18355 for cf_add_1lib in $cf_add_0lib; do
18356         for cf_add_2lib in $cf_add_libs; do
18357                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18358                         cf_add_1lib=
18359                         break
18360                 fi
18361         done
18362         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18363 done
18364 LIBS="$cf_add_libs"
18365
18366 fi
18367
18368 fi
18369         ;;
18370 esac
18371
18372 echo "$as_me:18372: checking if -lm needed for math functions" >&5
18373 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18374 if test "${cf_cv_need_libm+set}" = set; then
18375   echo $ECHO_N "(cached) $ECHO_C" >&6
18376 else
18377
18378         cat >"conftest.$ac_ext" <<_ACEOF
18379 #line 18379 "configure"
18380 #include "confdefs.h"
18381
18382         #include <stdio.h>
18383         #include <stdlib.h>
18384         #include <math.h>
18385
18386 int
18387 main (void)
18388 {
18389 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18390   ;
18391   return 0;
18392 }
18393 _ACEOF
18394 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18395 if { (eval echo "$as_me:18395: \"$ac_link\"") >&5
18396   (eval $ac_link) 2>&5
18397   ac_status=$?
18398   echo "$as_me:18398: \$? = $ac_status" >&5
18399   (exit "$ac_status"); } &&
18400          { ac_try='test -s "conftest$ac_exeext"'
18401   { (eval echo "$as_me:18401: \"$ac_try\"") >&5
18402   (eval $ac_try) 2>&5
18403   ac_status=$?
18404   echo "$as_me:18404: \$? = $ac_status" >&5
18405   (exit "$ac_status"); }; }; then
18406   cf_cv_need_libm=no
18407 else
18408   echo "$as_me: failed program was:" >&5
18409 cat "conftest.$ac_ext" >&5
18410 cf_cv_need_libm=yes
18411 fi
18412 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18413 fi
18414 echo "$as_me:18414: result: $cf_cv_need_libm" >&5
18415 echo "${ECHO_T}$cf_cv_need_libm" >&6
18416 if test "$cf_cv_need_libm" = yes
18417 then
18418 MATH_LIB=-lm
18419 fi
18420
18421 ###     Checks for header files.
18422 echo "$as_me:18422: checking for ANSI C header files" >&5
18423 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18424 if test "${ac_cv_header_stdc+set}" = set; then
18425   echo $ECHO_N "(cached) $ECHO_C" >&6
18426 else
18427   cat >"conftest.$ac_ext" <<_ACEOF
18428 #line 18428 "configure"
18429 #include "confdefs.h"
18430 #include <stdlib.h>
18431 #include <stdarg.h>
18432 #include <string.h>
18433 #include <float.h>
18434
18435 _ACEOF
18436 if { (eval echo "$as_me:18436: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18437   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18438   ac_status=$?
18439   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18440   rm -f conftest.er1
18441   cat conftest.err >&5
18442   echo "$as_me:18442: \$? = $ac_status" >&5
18443   (exit "$ac_status"); } >/dev/null; then
18444   if test -s conftest.err; then
18445     ac_cpp_err=$ac_c_preproc_warn_flag
18446   else
18447     ac_cpp_err=
18448   fi
18449 else
18450   ac_cpp_err=yes
18451 fi
18452 if test -z "$ac_cpp_err"; then
18453   ac_cv_header_stdc=yes
18454 else
18455   echo "$as_me: failed program was:" >&5
18456   cat "conftest.$ac_ext" >&5
18457   ac_cv_header_stdc=no
18458 fi
18459 rm -f conftest.err "conftest.$ac_ext"
18460
18461 if test $ac_cv_header_stdc = yes; then
18462   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18463   cat >"conftest.$ac_ext" <<_ACEOF
18464 #line 18464 "configure"
18465 #include "confdefs.h"
18466 #include <string.h>
18467
18468 _ACEOF
18469 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18470   $EGREP "memchr" >/dev/null 2>&1; then
18471   :
18472 else
18473   ac_cv_header_stdc=no
18474 fi
18475 rm -rf conftest*
18476
18477 fi
18478
18479 if test $ac_cv_header_stdc = yes; then
18480   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18481   cat >"conftest.$ac_ext" <<_ACEOF
18482 #line 18482 "configure"
18483 #include "confdefs.h"
18484 #include <stdlib.h>
18485
18486 _ACEOF
18487 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18488   $EGREP "free" >/dev/null 2>&1; then
18489   :
18490 else
18491   ac_cv_header_stdc=no
18492 fi
18493 rm -rf conftest*
18494
18495 fi
18496
18497 if test $ac_cv_header_stdc = yes; then
18498   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18499   if test "$cross_compiling" = yes; then
18500   :
18501 else
18502   cat >"conftest.$ac_ext" <<_ACEOF
18503 #line 18503 "configure"
18504 #include "confdefs.h"
18505 #include <ctype.h>
18506 #if ((' ' & 0x0FF) == 0x020)
18507 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18508 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18509 #else
18510 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18511                      || ('j' <= (c) && (c) <= 'r') \
18512                      || ('s' <= (c) && (c) <= 'z'))
18513 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18514 #endif
18515
18516 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18517 int
18518 main (void)
18519 {
18520   int i;
18521   for (i = 0; i < 256; i++)
18522     if (XOR (islower (i), ISLOWER (i))
18523         || toupper (i) != TOUPPER (i))
18524       $ac_main_return(2);
18525   $ac_main_return (0);
18526 }
18527 _ACEOF
18528 rm -f "conftest$ac_exeext"
18529 if { (eval echo "$as_me:18529: \"$ac_link\"") >&5
18530   (eval $ac_link) 2>&5
18531   ac_status=$?
18532   echo "$as_me:18532: \$? = $ac_status" >&5
18533   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18534   { (eval echo "$as_me:18534: \"$ac_try\"") >&5
18535   (eval $ac_try) 2>&5
18536   ac_status=$?
18537   echo "$as_me:18537: \$? = $ac_status" >&5
18538   (exit "$ac_status"); }; }; then
18539   :
18540 else
18541   echo "$as_me: program exited with status $ac_status" >&5
18542 echo "$as_me: failed program was:" >&5
18543 cat "conftest.$ac_ext" >&5
18544 ac_cv_header_stdc=no
18545 fi
18546 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18547 fi
18548 fi
18549 fi
18550 echo "$as_me:18550: result: $ac_cv_header_stdc" >&5
18551 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18552 if test $ac_cv_header_stdc = yes; then
18553
18554 cat >>confdefs.h <<\EOF
18555 #define STDC_HEADERS 1
18556 EOF
18557
18558 fi
18559
18560 ac_header_dirent=no
18561 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18562   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18563 echo "$as_me:18563: checking for $ac_hdr that defines DIR" >&5
18564 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18565 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18566   echo $ECHO_N "(cached) $ECHO_C" >&6
18567 else
18568   cat >"conftest.$ac_ext" <<_ACEOF
18569 #line 18569 "configure"
18570 #include "confdefs.h"
18571 #include <sys/types.h>
18572 #include <$ac_hdr>
18573
18574 int
18575 main (void)
18576 {
18577 if ((DIR *) 0)
18578 return 0;
18579   ;
18580   return 0;
18581 }
18582 _ACEOF
18583 rm -f "conftest.$ac_objext"
18584 if { (eval echo "$as_me:18584: \"$ac_compile\"") >&5
18585   (eval $ac_compile) 2>&5
18586   ac_status=$?
18587   echo "$as_me:18587: \$? = $ac_status" >&5
18588   (exit "$ac_status"); } &&
18589          { ac_try='test -s "conftest.$ac_objext"'
18590   { (eval echo "$as_me:18590: \"$ac_try\"") >&5
18591   (eval $ac_try) 2>&5
18592   ac_status=$?
18593   echo "$as_me:18593: \$? = $ac_status" >&5
18594   (exit "$ac_status"); }; }; then
18595   eval "$as_ac_Header=yes"
18596 else
18597   echo "$as_me: failed program was:" >&5
18598 cat "conftest.$ac_ext" >&5
18599 eval "$as_ac_Header=no"
18600 fi
18601 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18602 fi
18603 echo "$as_me:18603: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18604 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18605 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18606   cat >>confdefs.h <<EOF
18607 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18608 EOF
18609
18610 ac_header_dirent=$ac_hdr; break
18611 fi
18612
18613 done
18614 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18615 if test $ac_header_dirent = dirent.h; then
18616   echo "$as_me:18616: checking for opendir in -ldir" >&5
18617 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18618 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18619   echo $ECHO_N "(cached) $ECHO_C" >&6
18620 else
18621   ac_check_lib_save_LIBS=$LIBS
18622 LIBS="-ldir  $LIBS"
18623 cat >"conftest.$ac_ext" <<_ACEOF
18624 #line 18624 "configure"
18625 #include "confdefs.h"
18626
18627 /* Override any gcc2 internal prototype to avoid an error.  */
18628 #ifdef __cplusplus
18629 extern "C"
18630 #endif
18631 /* We use char because int might match the return type of a gcc2
18632    builtin and then its argument prototype would still apply.  */
18633 char opendir ();
18634 int
18635 main (void)
18636 {
18637 opendir ();
18638   ;
18639   return 0;
18640 }
18641 _ACEOF
18642 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18643 if { (eval echo "$as_me:18643: \"$ac_link\"") >&5
18644   (eval $ac_link) 2>&5
18645   ac_status=$?
18646   echo "$as_me:18646: \$? = $ac_status" >&5
18647   (exit "$ac_status"); } &&
18648          { ac_try='test -s "conftest$ac_exeext"'
18649   { (eval echo "$as_me:18649: \"$ac_try\"") >&5
18650   (eval $ac_try) 2>&5
18651   ac_status=$?
18652   echo "$as_me:18652: \$? = $ac_status" >&5
18653   (exit "$ac_status"); }; }; then
18654   ac_cv_lib_dir_opendir=yes
18655 else
18656   echo "$as_me: failed program was:" >&5
18657 cat "conftest.$ac_ext" >&5
18658 ac_cv_lib_dir_opendir=no
18659 fi
18660 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18661 LIBS=$ac_check_lib_save_LIBS
18662 fi
18663 echo "$as_me:18663: result: $ac_cv_lib_dir_opendir" >&5
18664 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18665 if test "$ac_cv_lib_dir_opendir" = yes; then
18666   LIBS="$LIBS -ldir"
18667 fi
18668
18669 else
18670   echo "$as_me:18670: checking for opendir in -lx" >&5
18671 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18672 if test "${ac_cv_lib_x_opendir+set}" = set; then
18673   echo $ECHO_N "(cached) $ECHO_C" >&6
18674 else
18675   ac_check_lib_save_LIBS=$LIBS
18676 LIBS="-lx  $LIBS"
18677 cat >"conftest.$ac_ext" <<_ACEOF
18678 #line 18678 "configure"
18679 #include "confdefs.h"
18680
18681 /* Override any gcc2 internal prototype to avoid an error.  */
18682 #ifdef __cplusplus
18683 extern "C"
18684 #endif
18685 /* We use char because int might match the return type of a gcc2
18686    builtin and then its argument prototype would still apply.  */
18687 char opendir ();
18688 int
18689 main (void)
18690 {
18691 opendir ();
18692   ;
18693   return 0;
18694 }
18695 _ACEOF
18696 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18697 if { (eval echo "$as_me:18697: \"$ac_link\"") >&5
18698   (eval $ac_link) 2>&5
18699   ac_status=$?
18700   echo "$as_me:18700: \$? = $ac_status" >&5
18701   (exit "$ac_status"); } &&
18702          { ac_try='test -s "conftest$ac_exeext"'
18703   { (eval echo "$as_me:18703: \"$ac_try\"") >&5
18704   (eval $ac_try) 2>&5
18705   ac_status=$?
18706   echo "$as_me:18706: \$? = $ac_status" >&5
18707   (exit "$ac_status"); }; }; then
18708   ac_cv_lib_x_opendir=yes
18709 else
18710   echo "$as_me: failed program was:" >&5
18711 cat "conftest.$ac_ext" >&5
18712 ac_cv_lib_x_opendir=no
18713 fi
18714 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18715 LIBS=$ac_check_lib_save_LIBS
18716 fi
18717 echo "$as_me:18717: result: $ac_cv_lib_x_opendir" >&5
18718 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18719 if test "$ac_cv_lib_x_opendir" = yes; then
18720   LIBS="$LIBS -lx"
18721 fi
18722
18723 fi
18724
18725 echo "$as_me:18725: checking whether time.h and sys/time.h may both be included" >&5
18726 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18727 if test "${ac_cv_header_time+set}" = set; then
18728   echo $ECHO_N "(cached) $ECHO_C" >&6
18729 else
18730   cat >"conftest.$ac_ext" <<_ACEOF
18731 #line 18731 "configure"
18732 #include "confdefs.h"
18733 #include <sys/types.h>
18734 #include <sys/time.h>
18735 #include <time.h>
18736
18737 int
18738 main (void)
18739 {
18740 if ((struct tm *) 0)
18741 return 0;
18742   ;
18743   return 0;
18744 }
18745 _ACEOF
18746 rm -f "conftest.$ac_objext"
18747 if { (eval echo "$as_me:18747: \"$ac_compile\"") >&5
18748   (eval $ac_compile) 2>&5
18749   ac_status=$?
18750   echo "$as_me:18750: \$? = $ac_status" >&5
18751   (exit "$ac_status"); } &&
18752          { ac_try='test -s "conftest.$ac_objext"'
18753   { (eval echo "$as_me:18753: \"$ac_try\"") >&5
18754   (eval $ac_try) 2>&5
18755   ac_status=$?
18756   echo "$as_me:18756: \$? = $ac_status" >&5
18757   (exit "$ac_status"); }; }; then
18758   ac_cv_header_time=yes
18759 else
18760   echo "$as_me: failed program was:" >&5
18761 cat "conftest.$ac_ext" >&5
18762 ac_cv_header_time=no
18763 fi
18764 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18765 fi
18766 echo "$as_me:18766: result: $ac_cv_header_time" >&5
18767 echo "${ECHO_T}$ac_cv_header_time" >&6
18768 if test $ac_cv_header_time = yes; then
18769
18770 cat >>confdefs.h <<\EOF
18771 #define TIME_WITH_SYS_TIME 1
18772 EOF
18773
18774 fi
18775
18776 cf_regex_func=no
18777 cf_regex_libs=
18778 case "$host_os" in
18779 (mingw*)
18780         # -lsystre -ltre -lintl -liconv
18781         echo "$as_me:18781: checking for regcomp in -lsystre" >&5
18782 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
18783 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
18784   echo $ECHO_N "(cached) $ECHO_C" >&6
18785 else
18786   ac_check_lib_save_LIBS=$LIBS
18787 LIBS="-lsystre  $LIBS"
18788 cat >"conftest.$ac_ext" <<_ACEOF
18789 #line 18789 "configure"
18790 #include "confdefs.h"
18791
18792 /* Override any gcc2 internal prototype to avoid an error.  */
18793 #ifdef __cplusplus
18794 extern "C"
18795 #endif
18796 /* We use char because int might match the return type of a gcc2
18797    builtin and then its argument prototype would still apply.  */
18798 char regcomp ();
18799 int
18800 main (void)
18801 {
18802 regcomp ();
18803   ;
18804   return 0;
18805 }
18806 _ACEOF
18807 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18808 if { (eval echo "$as_me:18808: \"$ac_link\"") >&5
18809   (eval $ac_link) 2>&5
18810   ac_status=$?
18811   echo "$as_me:18811: \$? = $ac_status" >&5
18812   (exit "$ac_status"); } &&
18813          { ac_try='test -s "conftest$ac_exeext"'
18814   { (eval echo "$as_me:18814: \"$ac_try\"") >&5
18815   (eval $ac_try) 2>&5
18816   ac_status=$?
18817   echo "$as_me:18817: \$? = $ac_status" >&5
18818   (exit "$ac_status"); }; }; then
18819   ac_cv_lib_systre_regcomp=yes
18820 else
18821   echo "$as_me: failed program was:" >&5
18822 cat "conftest.$ac_ext" >&5
18823 ac_cv_lib_systre_regcomp=no
18824 fi
18825 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18826 LIBS=$ac_check_lib_save_LIBS
18827 fi
18828 echo "$as_me:18828: result: $ac_cv_lib_systre_regcomp" >&5
18829 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
18830 if test "$ac_cv_lib_systre_regcomp" = yes; then
18831
18832                 echo "$as_me:18832: checking for libiconv_open in -liconv" >&5
18833 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
18834 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
18835   echo $ECHO_N "(cached) $ECHO_C" >&6
18836 else
18837   ac_check_lib_save_LIBS=$LIBS
18838 LIBS="-liconv  $LIBS"
18839 cat >"conftest.$ac_ext" <<_ACEOF
18840 #line 18840 "configure"
18841 #include "confdefs.h"
18842
18843 /* Override any gcc2 internal prototype to avoid an error.  */
18844 #ifdef __cplusplus
18845 extern "C"
18846 #endif
18847 /* We use char because int might match the return type of a gcc2
18848    builtin and then its argument prototype would still apply.  */
18849 char libiconv_open ();
18850 int
18851 main (void)
18852 {
18853 libiconv_open ();
18854   ;
18855   return 0;
18856 }
18857 _ACEOF
18858 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18859 if { (eval echo "$as_me:18859: \"$ac_link\"") >&5
18860   (eval $ac_link) 2>&5
18861   ac_status=$?
18862   echo "$as_me:18862: \$? = $ac_status" >&5
18863   (exit "$ac_status"); } &&
18864          { ac_try='test -s "conftest$ac_exeext"'
18865   { (eval echo "$as_me:18865: \"$ac_try\"") >&5
18866   (eval $ac_try) 2>&5
18867   ac_status=$?
18868   echo "$as_me:18868: \$? = $ac_status" >&5
18869   (exit "$ac_status"); }; }; then
18870   ac_cv_lib_iconv_libiconv_open=yes
18871 else
18872   echo "$as_me: failed program was:" >&5
18873 cat "conftest.$ac_ext" >&5
18874 ac_cv_lib_iconv_libiconv_open=no
18875 fi
18876 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18877 LIBS=$ac_check_lib_save_LIBS
18878 fi
18879 echo "$as_me:18879: result: $ac_cv_lib_iconv_libiconv_open" >&5
18880 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
18881 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
18882
18883 cf_add_libs="$LIBS"
18884 # reverse order
18885 cf_add_0lib=
18886 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18887 # filter duplicates
18888 for cf_add_1lib in $cf_add_0lib; do
18889         for cf_add_2lib in $cf_add_libs; do
18890                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18891                         cf_add_1lib=
18892                         break
18893                 fi
18894         done
18895         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18896 done
18897 LIBS="$cf_add_libs"
18898
18899 fi
18900
18901                 echo "$as_me:18901: checking for libintl_gettext in -lintl" >&5
18902 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
18903 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
18904   echo $ECHO_N "(cached) $ECHO_C" >&6
18905 else
18906   ac_check_lib_save_LIBS=$LIBS
18907 LIBS="-lintl  $LIBS"
18908 cat >"conftest.$ac_ext" <<_ACEOF
18909 #line 18909 "configure"
18910 #include "confdefs.h"
18911
18912 /* Override any gcc2 internal prototype to avoid an error.  */
18913 #ifdef __cplusplus
18914 extern "C"
18915 #endif
18916 /* We use char because int might match the return type of a gcc2
18917    builtin and then its argument prototype would still apply.  */
18918 char libintl_gettext ();
18919 int
18920 main (void)
18921 {
18922 libintl_gettext ();
18923   ;
18924   return 0;
18925 }
18926 _ACEOF
18927 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18928 if { (eval echo "$as_me:18928: \"$ac_link\"") >&5
18929   (eval $ac_link) 2>&5
18930   ac_status=$?
18931   echo "$as_me:18931: \$? = $ac_status" >&5
18932   (exit "$ac_status"); } &&
18933          { ac_try='test -s "conftest$ac_exeext"'
18934   { (eval echo "$as_me:18934: \"$ac_try\"") >&5
18935   (eval $ac_try) 2>&5
18936   ac_status=$?
18937   echo "$as_me:18937: \$? = $ac_status" >&5
18938   (exit "$ac_status"); }; }; then
18939   ac_cv_lib_intl_libintl_gettext=yes
18940 else
18941   echo "$as_me: failed program was:" >&5
18942 cat "conftest.$ac_ext" >&5
18943 ac_cv_lib_intl_libintl_gettext=no
18944 fi
18945 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18946 LIBS=$ac_check_lib_save_LIBS
18947 fi
18948 echo "$as_me:18948: result: $ac_cv_lib_intl_libintl_gettext" >&5
18949 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
18950 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
18951
18952 cf_add_libs="$LIBS"
18953 # reverse order
18954 cf_add_0lib=
18955 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18956 # filter duplicates
18957 for cf_add_1lib in $cf_add_0lib; do
18958         for cf_add_2lib in $cf_add_libs; do
18959                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18960                         cf_add_1lib=
18961                         break
18962                 fi
18963         done
18964         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18965 done
18966 LIBS="$cf_add_libs"
18967
18968 fi
18969
18970                 echo "$as_me:18970: checking for tre_regcomp in -ltre" >&5
18971 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
18972 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
18973   echo $ECHO_N "(cached) $ECHO_C" >&6
18974 else
18975   ac_check_lib_save_LIBS=$LIBS
18976 LIBS="-ltre  $LIBS"
18977 cat >"conftest.$ac_ext" <<_ACEOF
18978 #line 18978 "configure"
18979 #include "confdefs.h"
18980
18981 /* Override any gcc2 internal prototype to avoid an error.  */
18982 #ifdef __cplusplus
18983 extern "C"
18984 #endif
18985 /* We use char because int might match the return type of a gcc2
18986    builtin and then its argument prototype would still apply.  */
18987 char tre_regcomp ();
18988 int
18989 main (void)
18990 {
18991 tre_regcomp ();
18992   ;
18993   return 0;
18994 }
18995 _ACEOF
18996 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18997 if { (eval echo "$as_me:18997: \"$ac_link\"") >&5
18998   (eval $ac_link) 2>&5
18999   ac_status=$?
19000   echo "$as_me:19000: \$? = $ac_status" >&5
19001   (exit "$ac_status"); } &&
19002          { ac_try='test -s "conftest$ac_exeext"'
19003   { (eval echo "$as_me:19003: \"$ac_try\"") >&5
19004   (eval $ac_try) 2>&5
19005   ac_status=$?
19006   echo "$as_me:19006: \$? = $ac_status" >&5
19007   (exit "$ac_status"); }; }; then
19008   ac_cv_lib_tre_tre_regcomp=yes
19009 else
19010   echo "$as_me: failed program was:" >&5
19011 cat "conftest.$ac_ext" >&5
19012 ac_cv_lib_tre_tre_regcomp=no
19013 fi
19014 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19015 LIBS=$ac_check_lib_save_LIBS
19016 fi
19017 echo "$as_me:19017: result: $ac_cv_lib_tre_tre_regcomp" >&5
19018 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19019 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19020
19021 cf_add_libs="$LIBS"
19022 # reverse order
19023 cf_add_0lib=
19024 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19025 # filter duplicates
19026 for cf_add_1lib in $cf_add_0lib; do
19027         for cf_add_2lib in $cf_add_libs; do
19028                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19029                         cf_add_1lib=
19030                         break
19031                 fi
19032         done
19033         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19034 done
19035 LIBS="$cf_add_libs"
19036
19037 fi
19038
19039 cf_add_libs="$LIBS"
19040 # reverse order
19041 cf_add_0lib=
19042 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19043 # filter duplicates
19044 for cf_add_1lib in $cf_add_0lib; do
19045         for cf_add_2lib in $cf_add_libs; do
19046                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19047                         cf_add_1lib=
19048                         break
19049                 fi
19050         done
19051         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19052 done
19053 LIBS="$cf_add_libs"
19054
19055                 cf_regex_func=regcomp
19056
19057 else
19058
19059                 echo "$as_me:19059: checking for regcomp in -lgnurx" >&5
19060 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19061 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19062   echo $ECHO_N "(cached) $ECHO_C" >&6
19063 else
19064   ac_check_lib_save_LIBS=$LIBS
19065 LIBS="-lgnurx  $LIBS"
19066 cat >"conftest.$ac_ext" <<_ACEOF
19067 #line 19067 "configure"
19068 #include "confdefs.h"
19069
19070 /* Override any gcc2 internal prototype to avoid an error.  */
19071 #ifdef __cplusplus
19072 extern "C"
19073 #endif
19074 /* We use char because int might match the return type of a gcc2
19075    builtin and then its argument prototype would still apply.  */
19076 char regcomp ();
19077 int
19078 main (void)
19079 {
19080 regcomp ();
19081   ;
19082   return 0;
19083 }
19084 _ACEOF
19085 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19086 if { (eval echo "$as_me:19086: \"$ac_link\"") >&5
19087   (eval $ac_link) 2>&5
19088   ac_status=$?
19089   echo "$as_me:19089: \$? = $ac_status" >&5
19090   (exit "$ac_status"); } &&
19091          { ac_try='test -s "conftest$ac_exeext"'
19092   { (eval echo "$as_me:19092: \"$ac_try\"") >&5
19093   (eval $ac_try) 2>&5
19094   ac_status=$?
19095   echo "$as_me:19095: \$? = $ac_status" >&5
19096   (exit "$ac_status"); }; }; then
19097   ac_cv_lib_gnurx_regcomp=yes
19098 else
19099   echo "$as_me: failed program was:" >&5
19100 cat "conftest.$ac_ext" >&5
19101 ac_cv_lib_gnurx_regcomp=no
19102 fi
19103 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19104 LIBS=$ac_check_lib_save_LIBS
19105 fi
19106 echo "$as_me:19106: result: $ac_cv_lib_gnurx_regcomp" >&5
19107 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19108 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19109
19110 cf_add_libs="$LIBS"
19111 # reverse order
19112 cf_add_0lib=
19113 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19114 # filter duplicates
19115 for cf_add_1lib in $cf_add_0lib; do
19116         for cf_add_2lib in $cf_add_libs; do
19117                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19118                         cf_add_1lib=
19119                         break
19120                 fi
19121         done
19122         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19123 done
19124 LIBS="$cf_add_libs"
19125
19126                         cf_regex_func=regcomp
19127 fi
19128
19129 fi
19130
19131         ;;
19132 (*)
19133         cf_regex_libs="regex re"
19134         echo "$as_me:19134: checking for regcomp" >&5
19135 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19136 if test "${ac_cv_func_regcomp+set}" = set; then
19137   echo $ECHO_N "(cached) $ECHO_C" >&6
19138 else
19139   cat >"conftest.$ac_ext" <<_ACEOF
19140 #line 19140 "configure"
19141 #include "confdefs.h"
19142 #define regcomp autoconf_temporary
19143 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19144 #undef regcomp
19145
19146 #ifdef __cplusplus
19147 extern "C"
19148 #endif
19149
19150 /* We use char because int might match the return type of a gcc2
19151    builtin and then its argument prototype would still apply.  */
19152 char regcomp (void);
19153
19154 int
19155 main (void)
19156 {
19157
19158 /* The GNU C library defines stubs for functions which it implements
19159     to always fail with ENOSYS.  Some functions are actually named
19160     something starting with __ and the normal name is an alias.  */
19161 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19162 #error found stub for regcomp
19163 #endif
19164
19165         return regcomp ();
19166   ;
19167   return 0;
19168 }
19169 _ACEOF
19170 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19171 if { (eval echo "$as_me:19171: \"$ac_link\"") >&5
19172   (eval $ac_link) 2>&5
19173   ac_status=$?
19174   echo "$as_me:19174: \$? = $ac_status" >&5
19175   (exit "$ac_status"); } &&
19176          { ac_try='test -s "conftest$ac_exeext"'
19177   { (eval echo "$as_me:19177: \"$ac_try\"") >&5
19178   (eval $ac_try) 2>&5
19179   ac_status=$?
19180   echo "$as_me:19180: \$? = $ac_status" >&5
19181   (exit "$ac_status"); }; }; then
19182   ac_cv_func_regcomp=yes
19183 else
19184   echo "$as_me: failed program was:" >&5
19185 cat "conftest.$ac_ext" >&5
19186 ac_cv_func_regcomp=no
19187 fi
19188 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19189 fi
19190 echo "$as_me:19190: result: $ac_cv_func_regcomp" >&5
19191 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19192 if test "$ac_cv_func_regcomp" = yes; then
19193   cf_regex_func=regcomp
19194 else
19195
19196                 for cf_regex_lib in $cf_regex_libs
19197                 do
19198                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19199 echo "$as_me:19199: checking for regcomp in -l$cf_regex_lib" >&5
19200 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19201 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19202   echo $ECHO_N "(cached) $ECHO_C" >&6
19203 else
19204   ac_check_lib_save_LIBS=$LIBS
19205 LIBS="-l$cf_regex_lib  $LIBS"
19206 cat >"conftest.$ac_ext" <<_ACEOF
19207 #line 19207 "configure"
19208 #include "confdefs.h"
19209
19210 /* Override any gcc2 internal prototype to avoid an error.  */
19211 #ifdef __cplusplus
19212 extern "C"
19213 #endif
19214 /* We use char because int might match the return type of a gcc2
19215    builtin and then its argument prototype would still apply.  */
19216 char regcomp ();
19217 int
19218 main (void)
19219 {
19220 regcomp ();
19221   ;
19222   return 0;
19223 }
19224 _ACEOF
19225 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19226 if { (eval echo "$as_me:19226: \"$ac_link\"") >&5
19227   (eval $ac_link) 2>&5
19228   ac_status=$?
19229   echo "$as_me:19229: \$? = $ac_status" >&5
19230   (exit "$ac_status"); } &&
19231          { ac_try='test -s "conftest$ac_exeext"'
19232   { (eval echo "$as_me:19232: \"$ac_try\"") >&5
19233   (eval $ac_try) 2>&5
19234   ac_status=$?
19235   echo "$as_me:19235: \$? = $ac_status" >&5
19236   (exit "$ac_status"); }; }; then
19237   eval "$as_ac_Lib=yes"
19238 else
19239   echo "$as_me: failed program was:" >&5
19240 cat "conftest.$ac_ext" >&5
19241 eval "$as_ac_Lib=no"
19242 fi
19243 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19244 LIBS=$ac_check_lib_save_LIBS
19245 fi
19246 echo "$as_me:19246: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19247 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19248 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19249
19250 cf_add_libs="$LIBS"
19251 # reverse order
19252 cf_add_0lib=
19253 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19254 # filter duplicates
19255 for cf_add_1lib in $cf_add_0lib; do
19256         for cf_add_2lib in $cf_add_libs; do
19257                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19258                         cf_add_1lib=
19259                         break
19260                 fi
19261         done
19262         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19263 done
19264 LIBS="$cf_add_libs"
19265
19266                                         cf_regex_func=regcomp
19267                                         break
19268 fi
19269
19270                 done
19271
19272 fi
19273
19274         ;;
19275 esac
19276
19277 if test "$cf_regex_func" = no ; then
19278         echo "$as_me:19278: checking for compile" >&5
19279 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19280 if test "${ac_cv_func_compile+set}" = set; then
19281   echo $ECHO_N "(cached) $ECHO_C" >&6
19282 else
19283   cat >"conftest.$ac_ext" <<_ACEOF
19284 #line 19284 "configure"
19285 #include "confdefs.h"
19286 #define compile autoconf_temporary
19287 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19288 #undef compile
19289
19290 #ifdef __cplusplus
19291 extern "C"
19292 #endif
19293
19294 /* We use char because int might match the return type of a gcc2
19295    builtin and then its argument prototype would still apply.  */
19296 char compile (void);
19297
19298 int
19299 main (void)
19300 {
19301
19302 /* The GNU C library defines stubs for functions which it implements
19303     to always fail with ENOSYS.  Some functions are actually named
19304     something starting with __ and the normal name is an alias.  */
19305 #if defined (__stub_compile) || defined (__stub___compile)
19306 #error found stub for compile
19307 #endif
19308
19309         return compile ();
19310   ;
19311   return 0;
19312 }
19313 _ACEOF
19314 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19315 if { (eval echo "$as_me:19315: \"$ac_link\"") >&5
19316   (eval $ac_link) 2>&5
19317   ac_status=$?
19318   echo "$as_me:19318: \$? = $ac_status" >&5
19319   (exit "$ac_status"); } &&
19320          { ac_try='test -s "conftest$ac_exeext"'
19321   { (eval echo "$as_me:19321: \"$ac_try\"") >&5
19322   (eval $ac_try) 2>&5
19323   ac_status=$?
19324   echo "$as_me:19324: \$? = $ac_status" >&5
19325   (exit "$ac_status"); }; }; then
19326   ac_cv_func_compile=yes
19327 else
19328   echo "$as_me: failed program was:" >&5
19329 cat "conftest.$ac_ext" >&5
19330 ac_cv_func_compile=no
19331 fi
19332 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19333 fi
19334 echo "$as_me:19334: result: $ac_cv_func_compile" >&5
19335 echo "${ECHO_T}$ac_cv_func_compile" >&6
19336 if test "$ac_cv_func_compile" = yes; then
19337   cf_regex_func=compile
19338 else
19339
19340                 echo "$as_me:19340: checking for compile in -lgen" >&5
19341 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19342 if test "${ac_cv_lib_gen_compile+set}" = set; then
19343   echo $ECHO_N "(cached) $ECHO_C" >&6
19344 else
19345   ac_check_lib_save_LIBS=$LIBS
19346 LIBS="-lgen  $LIBS"
19347 cat >"conftest.$ac_ext" <<_ACEOF
19348 #line 19348 "configure"
19349 #include "confdefs.h"
19350
19351 /* Override any gcc2 internal prototype to avoid an error.  */
19352 #ifdef __cplusplus
19353 extern "C"
19354 #endif
19355 /* We use char because int might match the return type of a gcc2
19356    builtin and then its argument prototype would still apply.  */
19357 char compile ();
19358 int
19359 main (void)
19360 {
19361 compile ();
19362   ;
19363   return 0;
19364 }
19365 _ACEOF
19366 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19367 if { (eval echo "$as_me:19367: \"$ac_link\"") >&5
19368   (eval $ac_link) 2>&5
19369   ac_status=$?
19370   echo "$as_me:19370: \$? = $ac_status" >&5
19371   (exit "$ac_status"); } &&
19372          { ac_try='test -s "conftest$ac_exeext"'
19373   { (eval echo "$as_me:19373: \"$ac_try\"") >&5
19374   (eval $ac_try) 2>&5
19375   ac_status=$?
19376   echo "$as_me:19376: \$? = $ac_status" >&5
19377   (exit "$ac_status"); }; }; then
19378   ac_cv_lib_gen_compile=yes
19379 else
19380   echo "$as_me: failed program was:" >&5
19381 cat "conftest.$ac_ext" >&5
19382 ac_cv_lib_gen_compile=no
19383 fi
19384 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19385 LIBS=$ac_check_lib_save_LIBS
19386 fi
19387 echo "$as_me:19387: result: $ac_cv_lib_gen_compile" >&5
19388 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19389 if test "$ac_cv_lib_gen_compile" = yes; then
19390
19391 cf_add_libs="$LIBS"
19392 # reverse order
19393 cf_add_0lib=
19394 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19395 # filter duplicates
19396 for cf_add_1lib in $cf_add_0lib; do
19397         for cf_add_2lib in $cf_add_libs; do
19398                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19399                         cf_add_1lib=
19400                         break
19401                 fi
19402         done
19403         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19404 done
19405 LIBS="$cf_add_libs"
19406
19407                                 cf_regex_func=compile
19408 fi
19409
19410 fi
19411
19412 fi
19413
19414 if test "$cf_regex_func" = no ; then
19415         { echo "$as_me:19415: WARNING: cannot find regular expression library" >&5
19416 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19417 fi
19418
19419 echo "$as_me:19419: checking for regular-expression headers" >&5
19420 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19421 if test "${cf_cv_regex_hdrs+set}" = set; then
19422   echo $ECHO_N "(cached) $ECHO_C" >&6
19423 else
19424
19425 cf_cv_regex_hdrs=no
19426 case "$cf_regex_func" in
19427 (compile)
19428         for cf_regex_hdr in regexp.h regexpr.h
19429         do
19430                 cat >"conftest.$ac_ext" <<_ACEOF
19431 #line 19431 "configure"
19432 #include "confdefs.h"
19433 #include <$cf_regex_hdr>
19434 int
19435 main (void)
19436 {
19437
19438                         char *p = compile("", "", "", 0);
19439                         int x = step("", "");
19440                         (void)p;
19441                         (void)x;
19442
19443   ;
19444   return 0;
19445 }
19446 _ACEOF
19447 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19448 if { (eval echo "$as_me:19448: \"$ac_link\"") >&5
19449   (eval $ac_link) 2>&5
19450   ac_status=$?
19451   echo "$as_me:19451: \$? = $ac_status" >&5
19452   (exit "$ac_status"); } &&
19453          { ac_try='test -s "conftest$ac_exeext"'
19454   { (eval echo "$as_me:19454: \"$ac_try\"") >&5
19455   (eval $ac_try) 2>&5
19456   ac_status=$?
19457   echo "$as_me:19457: \$? = $ac_status" >&5
19458   (exit "$ac_status"); }; }; then
19459
19460                         cf_cv_regex_hdrs=$cf_regex_hdr
19461                         break
19462
19463 else
19464   echo "$as_me: failed program was:" >&5
19465 cat "conftest.$ac_ext" >&5
19466 fi
19467 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19468         done
19469         ;;
19470 (*)
19471         for cf_regex_hdr in regex.h
19472         do
19473                 cat >"conftest.$ac_ext" <<_ACEOF
19474 #line 19474 "configure"
19475 #include "confdefs.h"
19476 #include <sys/types.h>
19477 #include <$cf_regex_hdr>
19478 int
19479 main (void)
19480 {
19481
19482                         regex_t *p = 0;
19483                         int x = regcomp(p, "", 0);
19484                         int y = regexec(p, "", 0, 0, 0);
19485                         (void)x;
19486                         (void)y;
19487                         regfree(p);
19488
19489   ;
19490   return 0;
19491 }
19492 _ACEOF
19493 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19494 if { (eval echo "$as_me:19494: \"$ac_link\"") >&5
19495   (eval $ac_link) 2>&5
19496   ac_status=$?
19497   echo "$as_me:19497: \$? = $ac_status" >&5
19498   (exit "$ac_status"); } &&
19499          { ac_try='test -s "conftest$ac_exeext"'
19500   { (eval echo "$as_me:19500: \"$ac_try\"") >&5
19501   (eval $ac_try) 2>&5
19502   ac_status=$?
19503   echo "$as_me:19503: \$? = $ac_status" >&5
19504   (exit "$ac_status"); }; }; then
19505
19506                         cf_cv_regex_hdrs=$cf_regex_hdr
19507                         break
19508
19509 else
19510   echo "$as_me: failed program was:" >&5
19511 cat "conftest.$ac_ext" >&5
19512 fi
19513 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19514         done
19515         ;;
19516 esac
19517
19518 fi
19519 echo "$as_me:19519: result: $cf_cv_regex_hdrs" >&5
19520 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
19521
19522 case "$cf_cv_regex_hdrs" in
19523         (no)            { echo "$as_me:19523: WARNING: no regular expression header found" >&5
19524 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
19525         (regex.h)
19526 cat >>confdefs.h <<\EOF
19527 #define HAVE_REGEX_H_FUNCS 1
19528 EOF
19529  ;;
19530         (regexp.h)
19531 cat >>confdefs.h <<\EOF
19532 #define HAVE_REGEXP_H_FUNCS 1
19533 EOF
19534  ;;
19535         (regexpr.h)
19536 cat >>confdefs.h <<\EOF
19537 #define HAVE_REGEXPR_H_FUNCS 1
19538 EOF
19539  ;;
19540 esac
19541
19542 for ac_header in \
19543 fcntl.h \
19544 getopt.h \
19545 limits.h \
19546 locale.h \
19547 math.h \
19548 poll.h \
19549 sys/ioctl.h \
19550 sys/param.h \
19551 sys/poll.h \
19552 sys/select.h \
19553 sys/time.h \
19554 sys/times.h \
19555 ttyent.h \
19556 unistd.h \
19557 wctype.h \
19558
19559 do
19560 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19561 echo "$as_me:19561: checking for $ac_header" >&5
19562 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19563 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19564   echo $ECHO_N "(cached) $ECHO_C" >&6
19565 else
19566   cat >"conftest.$ac_ext" <<_ACEOF
19567 #line 19567 "configure"
19568 #include "confdefs.h"
19569 #include <$ac_header>
19570 _ACEOF
19571 if { (eval echo "$as_me:19571: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19572   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19573   ac_status=$?
19574   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19575   rm -f conftest.er1
19576   cat conftest.err >&5
19577   echo "$as_me:19577: \$? = $ac_status" >&5
19578   (exit "$ac_status"); } >/dev/null; then
19579   if test -s conftest.err; then
19580     ac_cpp_err=$ac_c_preproc_warn_flag
19581   else
19582     ac_cpp_err=
19583   fi
19584 else
19585   ac_cpp_err=yes
19586 fi
19587 if test -z "$ac_cpp_err"; then
19588   eval "$as_ac_Header=yes"
19589 else
19590   echo "$as_me: failed program was:" >&5
19591   cat "conftest.$ac_ext" >&5
19592   eval "$as_ac_Header=no"
19593 fi
19594 rm -f conftest.err "conftest.$ac_ext"
19595 fi
19596 echo "$as_me:19596: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19597 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19598 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19599   cat >>confdefs.h <<EOF
19600 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19601 EOF
19602
19603 fi
19604 done
19605
19606 for ac_header in unistd.h getopt.h
19607 do
19608 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19609 echo "$as_me:19609: checking for $ac_header" >&5
19610 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19611 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19612   echo $ECHO_N "(cached) $ECHO_C" >&6
19613 else
19614   cat >"conftest.$ac_ext" <<_ACEOF
19615 #line 19615 "configure"
19616 #include "confdefs.h"
19617 #include <$ac_header>
19618 _ACEOF
19619 if { (eval echo "$as_me:19619: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19620   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19621   ac_status=$?
19622   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19623   rm -f conftest.er1
19624   cat conftest.err >&5
19625   echo "$as_me:19625: \$? = $ac_status" >&5
19626   (exit "$ac_status"); } >/dev/null; then
19627   if test -s conftest.err; then
19628     ac_cpp_err=$ac_c_preproc_warn_flag
19629   else
19630     ac_cpp_err=
19631   fi
19632 else
19633   ac_cpp_err=yes
19634 fi
19635 if test -z "$ac_cpp_err"; then
19636   eval "$as_ac_Header=yes"
19637 else
19638   echo "$as_me: failed program was:" >&5
19639   cat "conftest.$ac_ext" >&5
19640   eval "$as_ac_Header=no"
19641 fi
19642 rm -f conftest.err "conftest.$ac_ext"
19643 fi
19644 echo "$as_me:19644: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19645 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19646 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19647   cat >>confdefs.h <<EOF
19648 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19649 EOF
19650
19651 fi
19652 done
19653
19654 echo "$as_me:19654: checking for header declaring getopt variables" >&5
19655 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
19656 if test "${cf_cv_getopt_header+set}" = set; then
19657   echo $ECHO_N "(cached) $ECHO_C" >&6
19658 else
19659
19660 cf_cv_getopt_header=none
19661 for cf_header in stdio.h stdlib.h unistd.h getopt.h
19662 do
19663 cat >"conftest.$ac_ext" <<_ACEOF
19664 #line 19664 "configure"
19665 #include "confdefs.h"
19666
19667 #include <$cf_header>
19668 int
19669 main (void)
19670 {
19671 int x = optind; char *y = optarg
19672   ;
19673   return 0;
19674 }
19675 _ACEOF
19676 rm -f "conftest.$ac_objext"
19677 if { (eval echo "$as_me:19677: \"$ac_compile\"") >&5
19678   (eval $ac_compile) 2>&5
19679   ac_status=$?
19680   echo "$as_me:19680: \$? = $ac_status" >&5
19681   (exit "$ac_status"); } &&
19682          { ac_try='test -s "conftest.$ac_objext"'
19683   { (eval echo "$as_me:19683: \"$ac_try\"") >&5
19684   (eval $ac_try) 2>&5
19685   ac_status=$?
19686   echo "$as_me:19686: \$? = $ac_status" >&5
19687   (exit "$ac_status"); }; }; then
19688   cf_cv_getopt_header=$cf_header
19689  break
19690 else
19691   echo "$as_me: failed program was:" >&5
19692 cat "conftest.$ac_ext" >&5
19693 fi
19694 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19695 done
19696
19697 fi
19698 echo "$as_me:19698: result: $cf_cv_getopt_header" >&5
19699 echo "${ECHO_T}$cf_cv_getopt_header" >&6
19700 if test "$cf_cv_getopt_header" != none ; then
19701
19702 cat >>confdefs.h <<\EOF
19703 #define HAVE_GETOPT_HEADER 1
19704 EOF
19705
19706 fi
19707 if test "$cf_cv_getopt_header" = getopt.h ; then
19708
19709 cat >>confdefs.h <<\EOF
19710 #define NEED_GETOPT_H 1
19711 EOF
19712
19713 fi
19714
19715 echo "$as_me:19715: checking if external environ is declared" >&5
19716 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
19717 if test "${cf_cv_dcl_environ+set}" = set; then
19718   echo $ECHO_N "(cached) $ECHO_C" >&6
19719 else
19720
19721     cat >"conftest.$ac_ext" <<_ACEOF
19722 #line 19722 "configure"
19723 #include "confdefs.h"
19724
19725 #ifdef HAVE_STDLIB_H
19726 #include <stdlib.h>
19727 #endif
19728 #include <unistd.h>
19729 int
19730 main (void)
19731 {
19732 int x = (int) environ
19733   ;
19734   return 0;
19735 }
19736 _ACEOF
19737 rm -f "conftest.$ac_objext"
19738 if { (eval echo "$as_me:19738: \"$ac_compile\"") >&5
19739   (eval $ac_compile) 2>&5
19740   ac_status=$?
19741   echo "$as_me:19741: \$? = $ac_status" >&5
19742   (exit "$ac_status"); } &&
19743          { ac_try='test -s "conftest.$ac_objext"'
19744   { (eval echo "$as_me:19744: \"$ac_try\"") >&5
19745   (eval $ac_try) 2>&5
19746   ac_status=$?
19747   echo "$as_me:19747: \$? = $ac_status" >&5
19748   (exit "$ac_status"); }; }; then
19749   cf_cv_dcl_environ=yes
19750 else
19751   echo "$as_me: failed program was:" >&5
19752 cat "conftest.$ac_ext" >&5
19753 cf_cv_dcl_environ=no
19754 fi
19755 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19756
19757 fi
19758 echo "$as_me:19758: result: $cf_cv_dcl_environ" >&5
19759 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
19760
19761 if test "$cf_cv_dcl_environ" = no ; then
19762
19763 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19764
19765     cat >>confdefs.h <<EOF
19766 #define $cf_result 1
19767 EOF
19768
19769 fi
19770
19771 # It's possible (for near-UNIX clones) that the data doesn't exist
19772
19773 echo "$as_me:19773: checking if external environ exists" >&5
19774 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
19775 if test "${cf_cv_have_environ+set}" = set; then
19776   echo $ECHO_N "(cached) $ECHO_C" >&6
19777 else
19778
19779         cat >"conftest.$ac_ext" <<_ACEOF
19780 #line 19780 "configure"
19781 #include "confdefs.h"
19782
19783 #undef environ
19784 extern int environ;
19785
19786 int
19787 main (void)
19788 {
19789 environ = 2
19790   ;
19791   return 0;
19792 }
19793 _ACEOF
19794 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19795 if { (eval echo "$as_me:19795: \"$ac_link\"") >&5
19796   (eval $ac_link) 2>&5
19797   ac_status=$?
19798   echo "$as_me:19798: \$? = $ac_status" >&5
19799   (exit "$ac_status"); } &&
19800          { ac_try='test -s "conftest$ac_exeext"'
19801   { (eval echo "$as_me:19801: \"$ac_try\"") >&5
19802   (eval $ac_try) 2>&5
19803   ac_status=$?
19804   echo "$as_me:19804: \$? = $ac_status" >&5
19805   (exit "$ac_status"); }; }; then
19806   cf_cv_have_environ=yes
19807 else
19808   echo "$as_me: failed program was:" >&5
19809 cat "conftest.$ac_ext" >&5
19810 cf_cv_have_environ=no
19811 fi
19812 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19813
19814 fi
19815 echo "$as_me:19815: result: $cf_cv_have_environ" >&5
19816 echo "${ECHO_T}$cf_cv_have_environ" >&6
19817
19818 if test "$cf_cv_have_environ" = yes ; then
19819
19820 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19821
19822         cat >>confdefs.h <<EOF
19823 #define $cf_result 1
19824 EOF
19825
19826 fi
19827
19828 echo "$as_me:19828: checking for getenv" >&5
19829 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
19830 if test "${ac_cv_func_getenv+set}" = set; then
19831   echo $ECHO_N "(cached) $ECHO_C" >&6
19832 else
19833   cat >"conftest.$ac_ext" <<_ACEOF
19834 #line 19834 "configure"
19835 #include "confdefs.h"
19836 #define getenv autoconf_temporary
19837 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19838 #undef getenv
19839
19840 #ifdef __cplusplus
19841 extern "C"
19842 #endif
19843
19844 /* We use char because int might match the return type of a gcc2
19845    builtin and then its argument prototype would still apply.  */
19846 char getenv (void);
19847
19848 int
19849 main (void)
19850 {
19851
19852 /* The GNU C library defines stubs for functions which it implements
19853     to always fail with ENOSYS.  Some functions are actually named
19854     something starting with __ and the normal name is an alias.  */
19855 #if defined (__stub_getenv) || defined (__stub___getenv)
19856 #error found stub for getenv
19857 #endif
19858
19859         return getenv ();
19860   ;
19861   return 0;
19862 }
19863 _ACEOF
19864 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19865 if { (eval echo "$as_me:19865: \"$ac_link\"") >&5
19866   (eval $ac_link) 2>&5
19867   ac_status=$?
19868   echo "$as_me:19868: \$? = $ac_status" >&5
19869   (exit "$ac_status"); } &&
19870          { ac_try='test -s "conftest$ac_exeext"'
19871   { (eval echo "$as_me:19871: \"$ac_try\"") >&5
19872   (eval $ac_try) 2>&5
19873   ac_status=$?
19874   echo "$as_me:19874: \$? = $ac_status" >&5
19875   (exit "$ac_status"); }; }; then
19876   ac_cv_func_getenv=yes
19877 else
19878   echo "$as_me: failed program was:" >&5
19879 cat "conftest.$ac_ext" >&5
19880 ac_cv_func_getenv=no
19881 fi
19882 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19883 fi
19884 echo "$as_me:19884: result: $ac_cv_func_getenv" >&5
19885 echo "${ECHO_T}$ac_cv_func_getenv" >&6
19886
19887 for ac_func in putenv setenv strdup
19888 do
19889 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19890 echo "$as_me:19890: checking for $ac_func" >&5
19891 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19892 if eval "test \"\${$as_ac_var+set}\" = set"; then
19893   echo $ECHO_N "(cached) $ECHO_C" >&6
19894 else
19895   cat >"conftest.$ac_ext" <<_ACEOF
19896 #line 19896 "configure"
19897 #include "confdefs.h"
19898 #define $ac_func autoconf_temporary
19899 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19900 #undef $ac_func
19901
19902 #ifdef __cplusplus
19903 extern "C"
19904 #endif
19905
19906 /* We use char because int might match the return type of a gcc2
19907    builtin and then its argument prototype would still apply.  */
19908 char $ac_func (void);
19909
19910 int
19911 main (void)
19912 {
19913
19914 /* The GNU C library defines stubs for functions which it implements
19915     to always fail with ENOSYS.  Some functions are actually named
19916     something starting with __ and the normal name is an alias.  */
19917 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19918 #error found stub for $ac_func
19919 #endif
19920
19921         return $ac_func ();
19922   ;
19923   return 0;
19924 }
19925 _ACEOF
19926 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19927 if { (eval echo "$as_me:19927: \"$ac_link\"") >&5
19928   (eval $ac_link) 2>&5
19929   ac_status=$?
19930   echo "$as_me:19930: \$? = $ac_status" >&5
19931   (exit "$ac_status"); } &&
19932          { ac_try='test -s "conftest$ac_exeext"'
19933   { (eval echo "$as_me:19933: \"$ac_try\"") >&5
19934   (eval $ac_try) 2>&5
19935   ac_status=$?
19936   echo "$as_me:19936: \$? = $ac_status" >&5
19937   (exit "$ac_status"); }; }; then
19938   eval "$as_ac_var=yes"
19939 else
19940   echo "$as_me: failed program was:" >&5
19941 cat "conftest.$ac_ext" >&5
19942 eval "$as_ac_var=no"
19943 fi
19944 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19945 fi
19946 echo "$as_me:19946: result: `eval echo '${'"$as_ac_var"'}'`" >&5
19947 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
19948 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
19949   cat >>confdefs.h <<EOF
19950 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19951 EOF
19952
19953 fi
19954 done
19955
19956 echo "$as_me:19956: checking if getenv returns consistent values" >&5
19957 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
19958 if test "${cf_cv_consistent_getenv+set}" = set; then
19959   echo $ECHO_N "(cached) $ECHO_C" >&6
19960 else
19961
19962 if test "$cross_compiling" = yes; then
19963   cf_cv_consistent_getenv=unknown
19964 else
19965   cat >"conftest.$ac_ext" <<_ACEOF
19966 #line 19966 "configure"
19967 #include "confdefs.h"
19968
19969 #include <stdlib.h>
19970 #include <unistd.h>
19971 #include <stdio.h>
19972 #include <string.h>
19973 #include <sys/types.h>
19974
19975 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
19976 extern char **environ;  /* POSIX, but some systems are not... */
19977 #endif
19978
19979 #if defined(HAVE_STRDUP)
19980 #define str_alloc(s) strdup(s)
19981 #else
19982 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
19983 #endif
19984
19985 static void set_value(const char *name, const char *value)
19986 {
19987 #if defined(HAVE_SETENV)
19988         setenv(name, value, 1);
19989 #elif defined(HAVE_PUTENV)
19990         char buffer[1024];
19991         sprintf(buffer, "%s=%s", name, value);
19992         putenv(str_alloc(buffer));
19993 #else
19994 #error neither putenv/setenv found
19995 #endif
19996 }
19997 int main(void)
19998 {
19999         int pass;
20000         size_t numenv, limit, j;
20001         char **mynames;
20002         char **myvalues;
20003         char **mypointer;
20004         char *equals;
20005         for (numenv = 0; environ[numenv]; ++numenv) ;
20006         limit = numenv + 10;
20007         mynames = (char **) calloc(limit + 1, sizeof(char *));
20008         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20009         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20010 #if defined(HAVE_ENVIRON)
20011         for (j = 0; environ[j]; ++j) {
20012                 mynames[j] = str_alloc(environ[j]);
20013                 equals = strchr(mynames[j], '=');
20014                 if (equals != 0) {
20015                         *equals++ = '\\0';
20016                         myvalues[j] = str_alloc(equals);
20017                 } else {
20018                         myvalues[j] = str_alloc("");
20019                 }
20020         }
20021 #endif
20022         for (j = numenv; j < limit; ++j) {
20023                 char name[80];
20024                 char value[80];
20025                 size_t found;
20026                 size_t k = 0;
20027                 do {
20028                         size_t jk;
20029                         found = 0;
20030                         sprintf(name, "TERM%lu", (unsigned long) k);
20031                         for (jk = 0; jk < j; ++jk) {
20032                                 if (!strcmp(name, mynames[jk])) {
20033                                         found = 1;
20034                                         ++k;
20035                                         break;
20036                                 }
20037                         }
20038                 } while (found);
20039                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20040                 set_value(name, value);
20041                 mynames[j] = str_alloc(name);
20042                 myvalues[j] = str_alloc(value);
20043         }
20044         for (pass = 0; pass < 3; ++pass) {
20045                 for (j = 0; j < limit; ++j) {
20046                         char *value = getenv(mynames[j]);
20047                         if (pass) {
20048                                 if (value == 0) {
20049                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20050                                         ${cf_cv_main_return:-return}(1);
20051                                 } else if (value != mypointer[j]) {
20052                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20053                                         ${cf_cv_main_return:-return}(1);
20054                                 } else if (strcmp(value, myvalues[j])) {
20055                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20056                                         ${cf_cv_main_return:-return}(1);
20057                                 }
20058                         } else {
20059                                 size_t k;
20060                                 mypointer[j] = value;
20061                                 for (k = 0; k < j; ++k) {
20062                                         if (mypointer[j] == mypointer[k]) {
20063                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20064                                                 ${cf_cv_main_return:-return}(1);
20065                                         }
20066                                 }
20067                         }
20068                 }
20069         }
20070         ${cf_cv_main_return:-return}(0);
20071 }
20072
20073 _ACEOF
20074 rm -f "conftest$ac_exeext"
20075 if { (eval echo "$as_me:20075: \"$ac_link\"") >&5
20076   (eval $ac_link) 2>&5
20077   ac_status=$?
20078   echo "$as_me:20078: \$? = $ac_status" >&5
20079   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20080   { (eval echo "$as_me:20080: \"$ac_try\"") >&5
20081   (eval $ac_try) 2>&5
20082   ac_status=$?
20083   echo "$as_me:20083: \$? = $ac_status" >&5
20084   (exit "$ac_status"); }; }; then
20085   cf_cv_consistent_getenv=yes
20086 else
20087   echo "$as_me: program exited with status $ac_status" >&5
20088 echo "$as_me: failed program was:" >&5
20089 cat "conftest.$ac_ext" >&5
20090 cf_cv_consistent_getenv=no
20091 fi
20092 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20093 fi
20094
20095 fi
20096 echo "$as_me:20096: result: $cf_cv_consistent_getenv" >&5
20097 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20098
20099 if test "x$cf_cv_consistent_getenv" = xno
20100 then
20101
20102 cat >>confdefs.h <<\EOF
20103 #define HAVE_CONSISTENT_GETENV 1
20104 EOF
20105
20106 fi
20107
20108 if test "x$cf_cv_consistent_getenv" = xno && \
20109         test "x$cf_with_trace" = xyes
20110 then
20111         { echo "$as_me:20111: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20112 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20113 fi
20114
20115 echo "$as_me:20115: checking if sys/time.h works with sys/select.h" >&5
20116 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20117 if test "${cf_cv_sys_time_select+set}" = set; then
20118   echo $ECHO_N "(cached) $ECHO_C" >&6
20119 else
20120
20121 cat >"conftest.$ac_ext" <<_ACEOF
20122 #line 20122 "configure"
20123 #include "confdefs.h"
20124
20125 #include <sys/types.h>
20126 #ifdef HAVE_SYS_TIME_H
20127 #include <sys/time.h>
20128 #endif
20129 #ifdef HAVE_SYS_SELECT_H
20130 #include <sys/select.h>
20131 #endif
20132
20133 int
20134 main (void)
20135 {
20136
20137   ;
20138   return 0;
20139 }
20140 _ACEOF
20141 rm -f "conftest.$ac_objext"
20142 if { (eval echo "$as_me:20142: \"$ac_compile\"") >&5
20143   (eval $ac_compile) 2>&5
20144   ac_status=$?
20145   echo "$as_me:20145: \$? = $ac_status" >&5
20146   (exit "$ac_status"); } &&
20147          { ac_try='test -s "conftest.$ac_objext"'
20148   { (eval echo "$as_me:20148: \"$ac_try\"") >&5
20149   (eval $ac_try) 2>&5
20150   ac_status=$?
20151   echo "$as_me:20151: \$? = $ac_status" >&5
20152   (exit "$ac_status"); }; }; then
20153   cf_cv_sys_time_select=yes
20154 else
20155   echo "$as_me: failed program was:" >&5
20156 cat "conftest.$ac_ext" >&5
20157 cf_cv_sys_time_select=no
20158 fi
20159 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20160
20161 fi
20162
20163 echo "$as_me:20163: result: $cf_cv_sys_time_select" >&5
20164 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20165 test "$cf_cv_sys_time_select" = yes &&
20166 cat >>confdefs.h <<\EOF
20167 #define HAVE_SYS_TIME_SELECT 1
20168 EOF
20169
20170 ###     checks for compiler characteristics
20171 ac_ext=c
20172 ac_cpp='$CPP $CPPFLAGS'
20173 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20174 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20175 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20176 ac_main_return="return"
20177
20178 echo "$as_me:20178: checking for an ANSI C-conforming const" >&5
20179 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20180 if test "${ac_cv_c_const+set}" = set; then
20181   echo $ECHO_N "(cached) $ECHO_C" >&6
20182 else
20183   cat >"conftest.$ac_ext" <<_ACEOF
20184 #line 20184 "configure"
20185 #include "confdefs.h"
20186
20187 int
20188 main (void)
20189 {
20190 /* FIXME: Include the comments suggested by Paul. */
20191 #ifndef __cplusplus
20192   /* Ultrix mips cc rejects this.  */
20193   typedef int charset[2];
20194   const charset x;
20195   /* SunOS 4.1.1 cc rejects this.  */
20196   char const *const *ccp;
20197   char **p;
20198   /* NEC SVR4.0.2 mips cc rejects this.  */
20199   struct point {int x, y;};
20200   static struct point const zero = {0,0};
20201   /* AIX XL C 1.02.0.0 rejects this.
20202      It does not let you subtract one const X* pointer from another in
20203      an arm of an if-expression whose if-part is not a constant
20204      expression */
20205   const char *g = "string";
20206   ccp = &g + (g ? g-g : 0);
20207   /* HPUX 7.0 cc rejects these. */
20208   ++ccp;
20209   p = (char**) ccp;
20210   ccp = (char const *const *) p;
20211   { /* SCO 3.2v4 cc rejects this.  */
20212     char *t;
20213     char const *s = 0 ? (char *) 0 : (char const *) 0;
20214
20215     *t++ = 0;
20216   }
20217   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20218     int x[] = {25, 17};
20219     const int *foo = &x[0];
20220     ++foo;
20221   }
20222   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20223     typedef const int *iptr;
20224     iptr p = 0;
20225     ++p;
20226   }
20227   { /* AIX XL C 1.02.0.0 rejects this saying
20228        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20229     struct s { int j; const int *ap[3]; };
20230     struct s *b; b->j = 5;
20231   }
20232   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20233     const int foo = 10;
20234   }
20235 #endif
20236
20237   ;
20238   return 0;
20239 }
20240 _ACEOF
20241 rm -f "conftest.$ac_objext"
20242 if { (eval echo "$as_me:20242: \"$ac_compile\"") >&5
20243   (eval $ac_compile) 2>&5
20244   ac_status=$?
20245   echo "$as_me:20245: \$? = $ac_status" >&5
20246   (exit "$ac_status"); } &&
20247          { ac_try='test -s "conftest.$ac_objext"'
20248   { (eval echo "$as_me:20248: \"$ac_try\"") >&5
20249   (eval $ac_try) 2>&5
20250   ac_status=$?
20251   echo "$as_me:20251: \$? = $ac_status" >&5
20252   (exit "$ac_status"); }; }; then
20253   ac_cv_c_const=yes
20254 else
20255   echo "$as_me: failed program was:" >&5
20256 cat "conftest.$ac_ext" >&5
20257 ac_cv_c_const=no
20258 fi
20259 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20260 fi
20261 echo "$as_me:20261: result: $ac_cv_c_const" >&5
20262 echo "${ECHO_T}$ac_cv_c_const" >&6
20263 if test $ac_cv_c_const = no; then
20264
20265 cat >>confdefs.h <<\EOF
20266 #define const
20267 EOF
20268
20269 fi
20270
20271 echo "$as_me:20271: checking for inline" >&5
20272 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20273 if test "${ac_cv_c_inline+set}" = set; then
20274   echo $ECHO_N "(cached) $ECHO_C" >&6
20275 else
20276   ac_cv_c_inline=no
20277 for ac_kw in inline __inline__ __inline; do
20278   cat >"conftest.$ac_ext" <<_ACEOF
20279 #line 20279 "configure"
20280 #include "confdefs.h"
20281 #ifndef __cplusplus
20282 static $ac_kw int static_foo () {return 0; }
20283 $ac_kw int foo () {return 0; }
20284 #endif
20285
20286 _ACEOF
20287 rm -f "conftest.$ac_objext"
20288 if { (eval echo "$as_me:20288: \"$ac_compile\"") >&5
20289   (eval $ac_compile) 2>&5
20290   ac_status=$?
20291   echo "$as_me:20291: \$? = $ac_status" >&5
20292   (exit "$ac_status"); } &&
20293          { ac_try='test -s "conftest.$ac_objext"'
20294   { (eval echo "$as_me:20294: \"$ac_try\"") >&5
20295   (eval $ac_try) 2>&5
20296   ac_status=$?
20297   echo "$as_me:20297: \$? = $ac_status" >&5
20298   (exit "$ac_status"); }; }; then
20299   ac_cv_c_inline=$ac_kw; break
20300 else
20301   echo "$as_me: failed program was:" >&5
20302 cat "conftest.$ac_ext" >&5
20303 fi
20304 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20305 done
20306
20307 fi
20308 echo "$as_me:20308: result: $ac_cv_c_inline" >&5
20309 echo "${ECHO_T}$ac_cv_c_inline" >&6
20310 case $ac_cv_c_inline in
20311   inline | yes) ;;
20312   no)
20313 cat >>confdefs.h <<\EOF
20314 #define inline
20315 EOF
20316  ;;
20317   *)  cat >>confdefs.h <<EOF
20318 #define inline $ac_cv_c_inline
20319 EOF
20320  ;;
20321 esac
20322
20323 NCURSES_INLINE=
20324 if test "$ac_cv_c_inline" != no ; then
20325         NCURSES_INLINE=inline
20326         if test "$INTEL_COMPILER" = yes
20327         then
20328                 :
20329         elif test "$CLANG_COMPILER" = yes
20330         then
20331                 :
20332         elif test "$GCC" = yes
20333         then
20334                 echo "$as_me:20334: checking if $CC supports options to tune inlining" >&5
20335 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20336 if test "${cf_cv_gcc_inline+set}" = set; then
20337   echo $ECHO_N "(cached) $ECHO_C" >&6
20338 else
20339
20340                 cf_save_CFLAGS=$CFLAGS
20341                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20342                 cat >"conftest.$ac_ext" <<_ACEOF
20343 #line 20343 "configure"
20344 #include "confdefs.h"
20345 inline int foo(void) { return 1; }
20346 int
20347 main (void)
20348 {
20349 ${cf_cv_main_return:-return} foo()
20350   ;
20351   return 0;
20352 }
20353 _ACEOF
20354 rm -f "conftest.$ac_objext"
20355 if { (eval echo "$as_me:20355: \"$ac_compile\"") >&5
20356   (eval $ac_compile) 2>&5
20357   ac_status=$?
20358   echo "$as_me:20358: \$? = $ac_status" >&5
20359   (exit "$ac_status"); } &&
20360          { ac_try='test -s "conftest.$ac_objext"'
20361   { (eval echo "$as_me:20361: \"$ac_try\"") >&5
20362   (eval $ac_try) 2>&5
20363   ac_status=$?
20364   echo "$as_me:20364: \$? = $ac_status" >&5
20365   (exit "$ac_status"); }; }; then
20366   cf_cv_gcc_inline=yes
20367 else
20368   echo "$as_me: failed program was:" >&5
20369 cat "conftest.$ac_ext" >&5
20370 cf_cv_gcc_inline=no
20371 fi
20372 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20373                 CFLAGS=$cf_save_CFLAGS
20374
20375 fi
20376 echo "$as_me:20376: result: $cf_cv_gcc_inline" >&5
20377 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20378                 if test "$cf_cv_gcc_inline" = yes ; then
20379
20380 cf_fix_cppflags=no
20381 cf_new_cflags=
20382 cf_new_cppflags=
20383 cf_new_extra_cppflags=
20384
20385 for cf_add_cflags in --param max-inline-insns-single=1200
20386 do
20387 case "$cf_fix_cppflags" in
20388 (no)
20389         case "$cf_add_cflags" in
20390         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20391                 case "$cf_add_cflags" in
20392                 (-D*)
20393                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20394
20395                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20396                                 && test -z "${cf_tst_cflags}" \
20397                                 && cf_fix_cppflags=yes
20398
20399                         if test "$cf_fix_cppflags" = yes ; then
20400
20401         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20402         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20403
20404                                 continue
20405                         elif test "${cf_tst_cflags}" = "\"'" ; then
20406
20407         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20408         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20409
20410                                 continue
20411                         fi
20412                         ;;
20413                 esac
20414                 case "$CPPFLAGS" in
20415                 (*$cf_add_cflags)
20416                         ;;
20417                 (*)
20418                         case "$cf_add_cflags" in
20419                         (-D*)
20420                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20421
20422 CPPFLAGS=`echo "$CPPFLAGS" | \
20423         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20424                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20425
20426                                 ;;
20427                         esac
20428
20429         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20430         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20431
20432                         ;;
20433                 esac
20434                 ;;
20435         (*)
20436
20437         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20438         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20439
20440                 ;;
20441         esac
20442         ;;
20443 (yes)
20444
20445         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20446         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20447
20448         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20449
20450         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20451                 && test -z "${cf_tst_cflags}" \
20452                 && cf_fix_cppflags=no
20453         ;;
20454 esac
20455 done
20456
20457 if test -n "$cf_new_cflags" ; then
20458
20459         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20460         CFLAGS="${CFLAGS}$cf_new_cflags"
20461
20462 fi
20463
20464 if test -n "$cf_new_cppflags" ; then
20465
20466         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20467         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20468
20469 fi
20470
20471 if test -n "$cf_new_extra_cppflags" ; then
20472
20473         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20474         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20475
20476 fi
20477
20478                 fi
20479         fi
20480 fi
20481
20482 echo "$as_me:20482: checking for signal global datatype" >&5
20483 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20484 if test "${cf_cv_sig_atomic_t+set}" = set; then
20485   echo $ECHO_N "(cached) $ECHO_C" >&6
20486 else
20487
20488         for cf_type in \
20489                 "volatile sig_atomic_t" \
20490                 "sig_atomic_t" \
20491                 "int"
20492         do
20493         cat >"conftest.$ac_ext" <<_ACEOF
20494 #line 20494 "configure"
20495 #include "confdefs.h"
20496
20497 #include <sys/types.h>
20498 #include <signal.h>
20499 #include <stdio.h>
20500
20501 extern $cf_type x;
20502 $cf_type x;
20503 static void handler(int sig)
20504 {
20505         (void)sig;
20506         x = 5;
20507 }
20508 int
20509 main (void)
20510 {
20511 signal(SIGINT, handler);
20512                  x = 1
20513   ;
20514   return 0;
20515 }
20516 _ACEOF
20517 rm -f "conftest.$ac_objext"
20518 if { (eval echo "$as_me:20518: \"$ac_compile\"") >&5
20519   (eval $ac_compile) 2>&5
20520   ac_status=$?
20521   echo "$as_me:20521: \$? = $ac_status" >&5
20522   (exit "$ac_status"); } &&
20523          { ac_try='test -s "conftest.$ac_objext"'
20524   { (eval echo "$as_me:20524: \"$ac_try\"") >&5
20525   (eval $ac_try) 2>&5
20526   ac_status=$?
20527   echo "$as_me:20527: \$? = $ac_status" >&5
20528   (exit "$ac_status"); }; }; then
20529   cf_cv_sig_atomic_t=$cf_type
20530 else
20531   echo "$as_me: failed program was:" >&5
20532 cat "conftest.$ac_ext" >&5
20533 cf_cv_sig_atomic_t=no
20534 fi
20535 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20536                 test "$cf_cv_sig_atomic_t" != no && break
20537         done
20538
20539 fi
20540
20541 echo "$as_me:20541: result: $cf_cv_sig_atomic_t" >&5
20542 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
20543 test "$cf_cv_sig_atomic_t" != no &&
20544 cat >>confdefs.h <<EOF
20545 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
20546 EOF
20547
20548 if test "$NCURSES_CHTYPE" = auto ; then
20549
20550 echo "$as_me:20550: checking for type of chtype" >&5
20551 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
20552 if test "${cf_cv_typeof_chtype+set}" = set; then
20553   echo $ECHO_N "(cached) $ECHO_C" >&6
20554 else
20555
20556                 if test "$cross_compiling" = yes; then
20557   cf_cv_typeof_chtype=long
20558 else
20559   cat >"conftest.$ac_ext" <<_ACEOF
20560 #line 20560 "configure"
20561 #include "confdefs.h"
20562
20563 #define WANT_BITS 31
20564 #include <stdio.h>
20565 int main(void)
20566 {
20567         FILE *fp = fopen("cf_test.out", "w");
20568         if (fp != 0) {
20569                 char *result = "long";
20570                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
20571                         int n;
20572                         unsigned int x, y;
20573                         for (n = 0; n < WANT_BITS; n++) {
20574                                 x = (1 << n);
20575                                 y = (x >> n);
20576                                 if (y != 1 || x == 0) {
20577                                         x = 0;
20578                                         break;
20579                                 }
20580                         }
20581                         /*
20582                          * If x is nonzero, an int is big enough for the bits
20583                          * that we want.
20584                          */
20585                         result = (x != 0) ? "int" : "long";
20586                 }
20587                 fputs(result, fp);
20588                 fclose(fp);
20589         }
20590         ${cf_cv_main_return:-return}(0);
20591 }
20592
20593 _ACEOF
20594 rm -f "conftest$ac_exeext"
20595 if { (eval echo "$as_me:20595: \"$ac_link\"") >&5
20596   (eval $ac_link) 2>&5
20597   ac_status=$?
20598   echo "$as_me:20598: \$? = $ac_status" >&5
20599   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20600   { (eval echo "$as_me:20600: \"$ac_try\"") >&5
20601   (eval $ac_try) 2>&5
20602   ac_status=$?
20603   echo "$as_me:20603: \$? = $ac_status" >&5
20604   (exit "$ac_status"); }; }; then
20605   cf_cv_typeof_chtype=`cat cf_test.out`
20606 else
20607   echo "$as_me: program exited with status $ac_status" >&5
20608 echo "$as_me: failed program was:" >&5
20609 cat "conftest.$ac_ext" >&5
20610 cf_cv_typeof_chtype=long
20611 fi
20612 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20613 fi
20614                 rm -f cf_test.out
20615
20616 fi
20617
20618 echo "$as_me:20618: result: $cf_cv_typeof_chtype" >&5
20619 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
20620
20621 cat >>confdefs.h <<EOF
20622 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
20623 EOF
20624
20625 else
20626         cf_cv_typeof_chtype=$NCURSES_CHTYPE
20627 fi
20628 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
20629
20630 echo "$as_me:20630: checking if unsigned literals are legal" >&5
20631 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
20632 if test "${cf_cv_unsigned_literals+set}" = set; then
20633   echo $ECHO_N "(cached) $ECHO_C" >&6
20634 else
20635
20636         cat >"conftest.$ac_ext" <<_ACEOF
20637 #line 20637 "configure"
20638 #include "confdefs.h"
20639
20640 int
20641 main (void)
20642 {
20643 long x = 1L + 1UL + 1U + 1
20644   ;
20645   return 0;
20646 }
20647 _ACEOF
20648 rm -f "conftest.$ac_objext"
20649 if { (eval echo "$as_me:20649: \"$ac_compile\"") >&5
20650   (eval $ac_compile) 2>&5
20651   ac_status=$?
20652   echo "$as_me:20652: \$? = $ac_status" >&5
20653   (exit "$ac_status"); } &&
20654          { ac_try='test -s "conftest.$ac_objext"'
20655   { (eval echo "$as_me:20655: \"$ac_try\"") >&5
20656   (eval $ac_try) 2>&5
20657   ac_status=$?
20658   echo "$as_me:20658: \$? = $ac_status" >&5
20659   (exit "$ac_status"); }; }; then
20660   cf_cv_unsigned_literals=yes
20661 else
20662   echo "$as_me: failed program was:" >&5
20663 cat "conftest.$ac_ext" >&5
20664 cf_cv_unsigned_literals=no
20665 fi
20666 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20667
20668 fi
20669
20670 echo "$as_me:20670: result: $cf_cv_unsigned_literals" >&5
20671 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
20672
20673 cf_cv_1UL="1"
20674 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
20675 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
20676
20677 if test "$NCURSES_MMASK_T" = auto ; then
20678         cf_cv_typeof_mmask_t=long
20679 else
20680         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
20681 fi
20682 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
20683
20684 ###     Checks for external-data
20685
20686 echo "$as_me:20686: checking if external errno is declared" >&5
20687 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
20688 if test "${cf_cv_dcl_errno+set}" = set; then
20689   echo $ECHO_N "(cached) $ECHO_C" >&6
20690 else
20691
20692         cat >"conftest.$ac_ext" <<_ACEOF
20693 #line 20693 "configure"
20694 #include "confdefs.h"
20695
20696 #ifdef HAVE_STDLIB_H
20697 #include <stdlib.h>
20698 #endif
20699 #include <stdio.h>
20700 #include <sys/types.h>
20701 #include <errno.h>
20702 int
20703 main (void)
20704 {
20705 int x = (int) errno; (void)x
20706   ;
20707   return 0;
20708 }
20709 _ACEOF
20710 rm -f "conftest.$ac_objext"
20711 if { (eval echo "$as_me:20711: \"$ac_compile\"") >&5
20712   (eval $ac_compile) 2>&5
20713   ac_status=$?
20714   echo "$as_me:20714: \$? = $ac_status" >&5
20715   (exit "$ac_status"); } &&
20716          { ac_try='test -s "conftest.$ac_objext"'
20717   { (eval echo "$as_me:20717: \"$ac_try\"") >&5
20718   (eval $ac_try) 2>&5
20719   ac_status=$?
20720   echo "$as_me:20720: \$? = $ac_status" >&5
20721   (exit "$ac_status"); }; }; then
20722   cf_cv_dcl_errno=yes
20723 else
20724   echo "$as_me: failed program was:" >&5
20725 cat "conftest.$ac_ext" >&5
20726 cf_cv_dcl_errno=no
20727 fi
20728 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20729
20730 fi
20731 echo "$as_me:20731: result: $cf_cv_dcl_errno" >&5
20732 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
20733
20734 if test "$cf_cv_dcl_errno" = no ; then
20735
20736 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20737
20738         cat >>confdefs.h <<EOF
20739 #define $cf_result 1
20740 EOF
20741
20742 fi
20743
20744 # It's possible (for near-UNIX clones) that the data doesn't exist
20745
20746 echo "$as_me:20746: checking if external errno exists" >&5
20747 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
20748 if test "${cf_cv_have_errno+set}" = set; then
20749   echo $ECHO_N "(cached) $ECHO_C" >&6
20750 else
20751
20752         cat >"conftest.$ac_ext" <<_ACEOF
20753 #line 20753 "configure"
20754 #include "confdefs.h"
20755
20756 #undef errno
20757 extern int errno;
20758
20759 int
20760 main (void)
20761 {
20762 errno = 2
20763   ;
20764   return 0;
20765 }
20766 _ACEOF
20767 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20768 if { (eval echo "$as_me:20768: \"$ac_link\"") >&5
20769   (eval $ac_link) 2>&5
20770   ac_status=$?
20771   echo "$as_me:20771: \$? = $ac_status" >&5
20772   (exit "$ac_status"); } &&
20773          { ac_try='test -s "conftest$ac_exeext"'
20774   { (eval echo "$as_me:20774: \"$ac_try\"") >&5
20775   (eval $ac_try) 2>&5
20776   ac_status=$?
20777   echo "$as_me:20777: \$? = $ac_status" >&5
20778   (exit "$ac_status"); }; }; then
20779   cf_cv_have_errno=yes
20780 else
20781   echo "$as_me: failed program was:" >&5
20782 cat "conftest.$ac_ext" >&5
20783 cf_cv_have_errno=no
20784 fi
20785 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20786
20787 fi
20788 echo "$as_me:20788: result: $cf_cv_have_errno" >&5
20789 echo "${ECHO_T}$cf_cv_have_errno" >&6
20790
20791 if test "$cf_cv_have_errno" = yes ; then
20792
20793 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20794
20795         cat >>confdefs.h <<EOF
20796 #define $cf_result 1
20797 EOF
20798
20799 fi
20800
20801 echo "$as_me:20801: checking if data-only library module links" >&5
20802 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
20803 if test "${cf_cv_link_dataonly+set}" = set; then
20804   echo $ECHO_N "(cached) $ECHO_C" >&6
20805 else
20806
20807         rm -f conftest.a
20808         cat >conftest.$ac_ext <<EOF
20809 #line 20809 "configure"
20810 int     testdata[3] = { 123, 456, 789 };
20811 EOF
20812         if { (eval echo "$as_me:20812: \"$ac_compile\"") >&5
20813   (eval $ac_compile) 2>&5
20814   ac_status=$?
20815   echo "$as_me:20815: \$? = $ac_status" >&5
20816   (exit "$ac_status"); } ; then
20817                 mv conftest.o data.o && \
20818                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20819         fi
20820         rm -f conftest.$ac_ext data.o
20821         cat >conftest.$ac_ext <<EOF
20822 #line 20822 "configure"
20823 int     testfunc(void)
20824 {
20825 #if defined(NeXT)
20826         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
20827 #else
20828         extern int testdata[3];
20829         return testdata[0] == 123
20830            &&  testdata[1] == 456
20831            &&  testdata[2] == 789;
20832 #endif
20833 }
20834 EOF
20835         if { (eval echo "$as_me:20835: \"$ac_compile\"") >&5
20836   (eval $ac_compile) 2>&5
20837   ac_status=$?
20838   echo "$as_me:20838: \$? = $ac_status" >&5
20839   (exit "$ac_status"); }; then
20840                 mv conftest.o func.o && \
20841                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
20842         fi
20843         rm -f conftest.$ac_ext func.o
20844         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
20845         cf_saveLIBS="$LIBS"
20846         LIBS="conftest.a $LIBS"
20847         if test "$cross_compiling" = yes; then
20848   cf_cv_link_dataonly=unknown
20849 else
20850   cat >"conftest.$ac_ext" <<_ACEOF
20851 #line 20851 "configure"
20852 #include "confdefs.h"
20853
20854         int main(void)
20855         {
20856                 extern int testfunc();
20857                 ${cf_cv_main_return:-return} (!testfunc());
20858         }
20859
20860 _ACEOF
20861 rm -f "conftest$ac_exeext"
20862 if { (eval echo "$as_me:20862: \"$ac_link\"") >&5
20863   (eval $ac_link) 2>&5
20864   ac_status=$?
20865   echo "$as_me:20865: \$? = $ac_status" >&5
20866   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20867   { (eval echo "$as_me:20867: \"$ac_try\"") >&5
20868   (eval $ac_try) 2>&5
20869   ac_status=$?
20870   echo "$as_me:20870: \$? = $ac_status" >&5
20871   (exit "$ac_status"); }; }; then
20872   cf_cv_link_dataonly=yes
20873 else
20874   echo "$as_me: program exited with status $ac_status" >&5
20875 echo "$as_me: failed program was:" >&5
20876 cat "conftest.$ac_ext" >&5
20877 cf_cv_link_dataonly=no
20878 fi
20879 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20880 fi
20881         LIBS="$cf_saveLIBS"
20882
20883 fi
20884
20885 echo "$as_me:20885: result: $cf_cv_link_dataonly" >&5
20886 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
20887
20888 if test "$cf_cv_link_dataonly" = no ; then
20889
20890 cat >>confdefs.h <<\EOF
20891 #define BROKEN_LINKER 1
20892 EOF
20893
20894         BROKEN_LINKER=1
20895 fi
20896
20897 ###     Checks for library functions.
20898
20899 for ac_func in \
20900 getcwd \
20901 getegid \
20902 geteuid \
20903 getopt \
20904 getttynam \
20905 issetugid \
20906 localeconv \
20907 poll \
20908 putenv \
20909 remove \
20910 select \
20911 setbuf \
20912 setbuffer \
20913 setenv \
20914 setvbuf \
20915 sigaction \
20916 sigvec \
20917 snprintf \
20918 strdup \
20919 strstr \
20920 sysconf \
20921 tcgetpgrp \
20922 times \
20923 tsearch \
20924 vsnprintf \
20925
20926 do
20927 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20928 echo "$as_me:20928: checking for $ac_func" >&5
20929 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20930 if eval "test \"\${$as_ac_var+set}\" = set"; then
20931   echo $ECHO_N "(cached) $ECHO_C" >&6
20932 else
20933   cat >"conftest.$ac_ext" <<_ACEOF
20934 #line 20934 "configure"
20935 #include "confdefs.h"
20936 #define $ac_func autoconf_temporary
20937 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20938 #undef $ac_func
20939
20940 #ifdef __cplusplus
20941 extern "C"
20942 #endif
20943
20944 /* We use char because int might match the return type of a gcc2
20945    builtin and then its argument prototype would still apply.  */
20946 char $ac_func (void);
20947
20948 int
20949 main (void)
20950 {
20951
20952 /* The GNU C library defines stubs for functions which it implements
20953     to always fail with ENOSYS.  Some functions are actually named
20954     something starting with __ and the normal name is an alias.  */
20955 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20956 #error found stub for $ac_func
20957 #endif
20958
20959         return $ac_func ();
20960   ;
20961   return 0;
20962 }
20963 _ACEOF
20964 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20965 if { (eval echo "$as_me:20965: \"$ac_link\"") >&5
20966   (eval $ac_link) 2>&5
20967   ac_status=$?
20968   echo "$as_me:20968: \$? = $ac_status" >&5
20969   (exit "$ac_status"); } &&
20970          { ac_try='test -s "conftest$ac_exeext"'
20971   { (eval echo "$as_me:20971: \"$ac_try\"") >&5
20972   (eval $ac_try) 2>&5
20973   ac_status=$?
20974   echo "$as_me:20974: \$? = $ac_status" >&5
20975   (exit "$ac_status"); }; }; then
20976   eval "$as_ac_var=yes"
20977 else
20978   echo "$as_me: failed program was:" >&5
20979 cat "conftest.$ac_ext" >&5
20980 eval "$as_ac_var=no"
20981 fi
20982 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20983 fi
20984 echo "$as_me:20984: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20985 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20986 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20987   cat >>confdefs.h <<EOF
20988 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20989 EOF
20990
20991 fi
20992 done
20993
20994 if test "x$ac_cv_func_getopt" = xno && \
20995    test "x$cf_with_progs$cf_with_tests" != xnono; then
20996         { { echo "$as_me:20996: error: getopt is required for building programs" >&5
20997 echo "$as_me: error: getopt is required for building programs" >&2;}
20998    { (exit 1); exit 1; }; }
20999 fi
21000
21001 if test "x$with_safe_sprintf" = xyes
21002 then
21003         if test "x$ac_cv_func_vsnprintf" = xyes
21004         then
21005                 { echo "$as_me:21005: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21006 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21007         else
21008
21009 cat >>confdefs.h <<\EOF
21010 #define USE_SAFE_SPRINTF 1
21011 EOF
21012
21013         fi
21014 fi
21015
21016 if test "x$with_getcap" = "xyes" ; then
21017
21018 echo "$as_me:21018: checking for terminal-capability database functions" >&5
21019 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21020 if test "${cf_cv_cgetent+set}" = set; then
21021   echo $ECHO_N "(cached) $ECHO_C" >&6
21022 else
21023
21024 cat >"conftest.$ac_ext" <<_ACEOF
21025 #line 21025 "configure"
21026 #include "confdefs.h"
21027
21028 #include <stdlib.h>
21029 int
21030 main (void)
21031 {
21032
21033         char temp[128];
21034         char *buf = temp;
21035         char *db_array = temp;
21036         cgetent(&buf, &db_array, "vt100");
21037         cgetcap(buf, "tc", '=');
21038         cgetmatch(buf, "tc");
21039
21040   ;
21041   return 0;
21042 }
21043 _ACEOF
21044 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21045 if { (eval echo "$as_me:21045: \"$ac_link\"") >&5
21046   (eval $ac_link) 2>&5
21047   ac_status=$?
21048   echo "$as_me:21048: \$? = $ac_status" >&5
21049   (exit "$ac_status"); } &&
21050          { ac_try='test -s "conftest$ac_exeext"'
21051   { (eval echo "$as_me:21051: \"$ac_try\"") >&5
21052   (eval $ac_try) 2>&5
21053   ac_status=$?
21054   echo "$as_me:21054: \$? = $ac_status" >&5
21055   (exit "$ac_status"); }; }; then
21056   cf_cv_cgetent=yes
21057 else
21058   echo "$as_me: failed program was:" >&5
21059 cat "conftest.$ac_ext" >&5
21060 cf_cv_cgetent=no
21061 fi
21062 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21063
21064 fi
21065 echo "$as_me:21065: result: $cf_cv_cgetent" >&5
21066 echo "${ECHO_T}$cf_cv_cgetent" >&6
21067
21068 if test "$cf_cv_cgetent" = yes
21069 then
21070
21071 cat >>confdefs.h <<\EOF
21072 #define HAVE_BSD_CGETENT 1
21073 EOF
21074
21075 echo "$as_me:21075: checking if cgetent uses const parameter" >&5
21076 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21077 if test "${cf_cv_cgetent_const+set}" = set; then
21078   echo $ECHO_N "(cached) $ECHO_C" >&6
21079 else
21080
21081 cat >"conftest.$ac_ext" <<_ACEOF
21082 #line 21082 "configure"
21083 #include "confdefs.h"
21084
21085 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21086 #include <stdlib.h>
21087 int
21088 main (void)
21089 {
21090
21091         char temp[128];
21092         char *buf = temp;
21093 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21094         const char *db_array = temp;
21095         cgetent(&buf, &db_array, "vt100");
21096 #endif
21097         cgetcap(buf, "tc", '=');
21098         cgetmatch(buf, "tc");
21099
21100   ;
21101   return 0;
21102 }
21103 _ACEOF
21104 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21105 if { (eval echo "$as_me:21105: \"$ac_link\"") >&5
21106   (eval $ac_link) 2>&5
21107   ac_status=$?
21108   echo "$as_me:21108: \$? = $ac_status" >&5
21109   (exit "$ac_status"); } &&
21110          { ac_try='test -s "conftest$ac_exeext"'
21111   { (eval echo "$as_me:21111: \"$ac_try\"") >&5
21112   (eval $ac_try) 2>&5
21113   ac_status=$?
21114   echo "$as_me:21114: \$? = $ac_status" >&5
21115   (exit "$ac_status"); }; }; then
21116   cf_cv_cgetent_const=yes
21117 else
21118   echo "$as_me: failed program was:" >&5
21119 cat "conftest.$ac_ext" >&5
21120 cf_cv_cgetent_const=no
21121 fi
21122 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21123
21124 fi
21125 echo "$as_me:21125: result: $cf_cv_cgetent_const" >&5
21126 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21127         if test "$cf_cv_cgetent_const" = yes
21128         then
21129
21130 cat >>confdefs.h <<EOF
21131 #define CGETENT_CONST const
21132 EOF
21133
21134         fi
21135 fi
21136
21137 fi
21138
21139 echo "$as_me:21139: checking for isascii" >&5
21140 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21141 if test "${cf_cv_have_isascii+set}" = set; then
21142   echo $ECHO_N "(cached) $ECHO_C" >&6
21143 else
21144
21145         cat >"conftest.$ac_ext" <<_ACEOF
21146 #line 21146 "configure"
21147 #include "confdefs.h"
21148 #include <ctype.h>
21149 int
21150 main (void)
21151 {
21152 int x = isascii(' ')
21153   ;
21154   return 0;
21155 }
21156 _ACEOF
21157 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21158 if { (eval echo "$as_me:21158: \"$ac_link\"") >&5
21159   (eval $ac_link) 2>&5
21160   ac_status=$?
21161   echo "$as_me:21161: \$? = $ac_status" >&5
21162   (exit "$ac_status"); } &&
21163          { ac_try='test -s "conftest$ac_exeext"'
21164   { (eval echo "$as_me:21164: \"$ac_try\"") >&5
21165   (eval $ac_try) 2>&5
21166   ac_status=$?
21167   echo "$as_me:21167: \$? = $ac_status" >&5
21168   (exit "$ac_status"); }; }; then
21169   cf_cv_have_isascii=yes
21170 else
21171   echo "$as_me: failed program was:" >&5
21172 cat "conftest.$ac_ext" >&5
21173 cf_cv_have_isascii=no
21174 fi
21175 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21176
21177 fi
21178 echo "$as_me:21178: result: $cf_cv_have_isascii" >&5
21179 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21180 test "$cf_cv_have_isascii" = yes &&
21181 cat >>confdefs.h <<\EOF
21182 #define HAVE_ISASCII 1
21183 EOF
21184
21185 if test "$ac_cv_func_sigaction" = yes; then
21186 echo "$as_me:21186: checking whether sigaction needs _POSIX_SOURCE" >&5
21187 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21188 cat >"conftest.$ac_ext" <<_ACEOF
21189 #line 21189 "configure"
21190 #include "confdefs.h"
21191
21192 #include <sys/types.h>
21193 #include <signal.h>
21194 int
21195 main (void)
21196 {
21197 struct sigaction act
21198   ;
21199   return 0;
21200 }
21201 _ACEOF
21202 rm -f "conftest.$ac_objext"
21203 if { (eval echo "$as_me:21203: \"$ac_compile\"") >&5
21204   (eval $ac_compile) 2>&5
21205   ac_status=$?
21206   echo "$as_me:21206: \$? = $ac_status" >&5
21207   (exit "$ac_status"); } &&
21208          { ac_try='test -s "conftest.$ac_objext"'
21209   { (eval echo "$as_me:21209: \"$ac_try\"") >&5
21210   (eval $ac_try) 2>&5
21211   ac_status=$?
21212   echo "$as_me:21212: \$? = $ac_status" >&5
21213   (exit "$ac_status"); }; }; then
21214   sigact_bad=no
21215 else
21216   echo "$as_me: failed program was:" >&5
21217 cat "conftest.$ac_ext" >&5
21218
21219 cat >"conftest.$ac_ext" <<_ACEOF
21220 #line 21220 "configure"
21221 #include "confdefs.h"
21222
21223 #define _POSIX_SOURCE
21224 #include <sys/types.h>
21225 #include <signal.h>
21226 int
21227 main (void)
21228 {
21229 struct sigaction act
21230   ;
21231   return 0;
21232 }
21233 _ACEOF
21234 rm -f "conftest.$ac_objext"
21235 if { (eval echo "$as_me:21235: \"$ac_compile\"") >&5
21236   (eval $ac_compile) 2>&5
21237   ac_status=$?
21238   echo "$as_me:21238: \$? = $ac_status" >&5
21239   (exit "$ac_status"); } &&
21240          { ac_try='test -s "conftest.$ac_objext"'
21241   { (eval echo "$as_me:21241: \"$ac_try\"") >&5
21242   (eval $ac_try) 2>&5
21243   ac_status=$?
21244   echo "$as_me:21244: \$? = $ac_status" >&5
21245   (exit "$ac_status"); }; }; then
21246   sigact_bad=yes
21247
21248 cat >>confdefs.h <<\EOF
21249 #define _POSIX_SOURCE 1
21250 EOF
21251
21252 else
21253   echo "$as_me: failed program was:" >&5
21254 cat "conftest.$ac_ext" >&5
21255 sigact_bad=unknown
21256 fi
21257 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21258 fi
21259 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21260 echo "$as_me:21260: result: $sigact_bad" >&5
21261 echo "${ECHO_T}$sigact_bad" >&6
21262 fi
21263
21264 echo "$as_me:21264: checking if nanosleep really works" >&5
21265 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21266 if test "${cf_cv_func_nanosleep+set}" = set; then
21267   echo $ECHO_N "(cached) $ECHO_C" >&6
21268 else
21269
21270 if test "$cross_compiling" = yes; then
21271   cf_cv_func_nanosleep=unknown
21272 else
21273   cat >"conftest.$ac_ext" <<_ACEOF
21274 #line 21274 "configure"
21275 #include "confdefs.h"
21276
21277 #include <stdio.h>
21278 #include <errno.h>
21279 #include <time.h>
21280
21281 #ifdef HAVE_SYS_TIME_H
21282 #include <sys/time.h>
21283 #endif
21284
21285 int main(void) {
21286         struct timespec ts1, ts2;
21287         int code;
21288         ts1.tv_sec  = 0;
21289         ts1.tv_nsec = 750000000;
21290         ts2.tv_sec  = 0;
21291         ts2.tv_nsec = 0;
21292         errno = 0;
21293         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21294         ${cf_cv_main_return:-return}(code != 0);
21295 }
21296
21297 _ACEOF
21298 rm -f "conftest$ac_exeext"
21299 if { (eval echo "$as_me:21299: \"$ac_link\"") >&5
21300   (eval $ac_link) 2>&5
21301   ac_status=$?
21302   echo "$as_me:21302: \$? = $ac_status" >&5
21303   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21304   { (eval echo "$as_me:21304: \"$ac_try\"") >&5
21305   (eval $ac_try) 2>&5
21306   ac_status=$?
21307   echo "$as_me:21307: \$? = $ac_status" >&5
21308   (exit "$ac_status"); }; }; then
21309   cf_cv_func_nanosleep=yes
21310 else
21311   echo "$as_me: program exited with status $ac_status" >&5
21312 echo "$as_me: failed program was:" >&5
21313 cat "conftest.$ac_ext" >&5
21314 cf_cv_func_nanosleep=no
21315 fi
21316 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21317 fi
21318 fi
21319 echo "$as_me:21319: result: $cf_cv_func_nanosleep" >&5
21320 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21321
21322 test "$cf_cv_func_nanosleep" = "yes" &&
21323 cat >>confdefs.h <<\EOF
21324 #define HAVE_NANOSLEEP 1
21325 EOF
21326
21327 for ac_header in \
21328 termio.h \
21329 termios.h \
21330 unistd.h \
21331 sys/ioctl.h \
21332 sys/termio.h \
21333
21334 do
21335 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21336 echo "$as_me:21336: checking for $ac_header" >&5
21337 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21338 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21339   echo $ECHO_N "(cached) $ECHO_C" >&6
21340 else
21341   cat >"conftest.$ac_ext" <<_ACEOF
21342 #line 21342 "configure"
21343 #include "confdefs.h"
21344 #include <$ac_header>
21345 _ACEOF
21346 if { (eval echo "$as_me:21346: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21347   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21348   ac_status=$?
21349   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21350   rm -f conftest.er1
21351   cat conftest.err >&5
21352   echo "$as_me:21352: \$? = $ac_status" >&5
21353   (exit "$ac_status"); } >/dev/null; then
21354   if test -s conftest.err; then
21355     ac_cpp_err=$ac_c_preproc_warn_flag
21356   else
21357     ac_cpp_err=
21358   fi
21359 else
21360   ac_cpp_err=yes
21361 fi
21362 if test -z "$ac_cpp_err"; then
21363   eval "$as_ac_Header=yes"
21364 else
21365   echo "$as_me: failed program was:" >&5
21366   cat "conftest.$ac_ext" >&5
21367   eval "$as_ac_Header=no"
21368 fi
21369 rm -f conftest.err "conftest.$ac_ext"
21370 fi
21371 echo "$as_me:21371: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21372 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21373 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21374   cat >>confdefs.h <<EOF
21375 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21376 EOF
21377
21378 fi
21379 done
21380
21381 if test "$ac_cv_header_termios_h" = yes ; then
21382         case "$CFLAGS $CPPFLAGS" in
21383         (*-D_POSIX_SOURCE*)
21384                 termios_bad=dunno ;;
21385         (*)     termios_bad=maybe ;;
21386         esac
21387         if test "$termios_bad" = maybe ; then
21388         echo "$as_me:21388: checking whether termios.h needs _POSIX_SOURCE" >&5
21389 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21390         cat >"conftest.$ac_ext" <<_ACEOF
21391 #line 21391 "configure"
21392 #include "confdefs.h"
21393 #include <termios.h>
21394 int
21395 main (void)
21396 {
21397 struct termios foo; int x = foo.c_iflag = 1; (void)x
21398   ;
21399   return 0;
21400 }
21401 _ACEOF
21402 rm -f "conftest.$ac_objext"
21403 if { (eval echo "$as_me:21403: \"$ac_compile\"") >&5
21404   (eval $ac_compile) 2>&5
21405   ac_status=$?
21406   echo "$as_me:21406: \$? = $ac_status" >&5
21407   (exit "$ac_status"); } &&
21408          { ac_try='test -s "conftest.$ac_objext"'
21409   { (eval echo "$as_me:21409: \"$ac_try\"") >&5
21410   (eval $ac_try) 2>&5
21411   ac_status=$?
21412   echo "$as_me:21412: \$? = $ac_status" >&5
21413   (exit "$ac_status"); }; }; then
21414   termios_bad=no
21415 else
21416   echo "$as_me: failed program was:" >&5
21417 cat "conftest.$ac_ext" >&5
21418
21419                 cat >"conftest.$ac_ext" <<_ACEOF
21420 #line 21420 "configure"
21421 #include "confdefs.h"
21422
21423 #define _POSIX_SOURCE
21424 #include <termios.h>
21425 int
21426 main (void)
21427 {
21428 struct termios foo; int x = foo.c_iflag = 2; (void)x
21429   ;
21430   return 0;
21431 }
21432 _ACEOF
21433 rm -f "conftest.$ac_objext"
21434 if { (eval echo "$as_me:21434: \"$ac_compile\"") >&5
21435   (eval $ac_compile) 2>&5
21436   ac_status=$?
21437   echo "$as_me:21437: \$? = $ac_status" >&5
21438   (exit "$ac_status"); } &&
21439          { ac_try='test -s "conftest.$ac_objext"'
21440   { (eval echo "$as_me:21440: \"$ac_try\"") >&5
21441   (eval $ac_try) 2>&5
21442   ac_status=$?
21443   echo "$as_me:21443: \$? = $ac_status" >&5
21444   (exit "$ac_status"); }; }; then
21445   termios_bad=unknown
21446 else
21447   echo "$as_me: failed program was:" >&5
21448 cat "conftest.$ac_ext" >&5
21449 termios_bad=yes
21450 cat >>confdefs.h <<\EOF
21451 #define _POSIX_SOURCE 1
21452 EOF
21453
21454 fi
21455 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21456
21457 fi
21458 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21459         echo "$as_me:21459: result: $termios_bad" >&5
21460 echo "${ECHO_T}$termios_bad" >&6
21461         fi
21462 fi
21463
21464 echo "$as_me:21464: checking for tcgetattr" >&5
21465 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21466 if test "${cf_cv_have_tcgetattr+set}" = set; then
21467   echo $ECHO_N "(cached) $ECHO_C" >&6
21468 else
21469
21470 cat >"conftest.$ac_ext" <<_ACEOF
21471 #line 21471 "configure"
21472 #include "confdefs.h"
21473
21474 #include <sys/types.h>
21475 #ifdef HAVE_UNISTD_H
21476 #include <unistd.h>
21477 #endif
21478 #ifdef HAVE_TERMIOS_H
21479 #include <termios.h>
21480 #define TTY struct termios
21481 #else
21482 #ifdef HAVE_TERMIO_H
21483 #include <termio.h>
21484 #define TTY struct termio
21485 #endif
21486 #endif
21487
21488 int
21489 main (void)
21490 {
21491
21492 TTY foo;
21493 tcgetattr(1, &foo);
21494   ;
21495   return 0;
21496 }
21497 _ACEOF
21498 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21499 if { (eval echo "$as_me:21499: \"$ac_link\"") >&5
21500   (eval $ac_link) 2>&5
21501   ac_status=$?
21502   echo "$as_me:21502: \$? = $ac_status" >&5
21503   (exit "$ac_status"); } &&
21504          { ac_try='test -s "conftest$ac_exeext"'
21505   { (eval echo "$as_me:21505: \"$ac_try\"") >&5
21506   (eval $ac_try) 2>&5
21507   ac_status=$?
21508   echo "$as_me:21508: \$? = $ac_status" >&5
21509   (exit "$ac_status"); }; }; then
21510   cf_cv_have_tcgetattr=yes
21511 else
21512   echo "$as_me: failed program was:" >&5
21513 cat "conftest.$ac_ext" >&5
21514 cf_cv_have_tcgetattr=no
21515 fi
21516 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21517 fi
21518 echo "$as_me:21518: result: $cf_cv_have_tcgetattr" >&5
21519 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
21520 test "$cf_cv_have_tcgetattr" = yes &&
21521 cat >>confdefs.h <<\EOF
21522 #define HAVE_TCGETATTR 1
21523 EOF
21524
21525 echo "$as_me:21525: checking for vsscanf function or workaround" >&5
21526 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
21527 if test "${cf_cv_func_vsscanf+set}" = set; then
21528   echo $ECHO_N "(cached) $ECHO_C" >&6
21529 else
21530
21531 cat >"conftest.$ac_ext" <<_ACEOF
21532 #line 21532 "configure"
21533 #include "confdefs.h"
21534
21535 #include <stdarg.h>
21536 #include <stdio.h>
21537 int
21538 main (void)
21539 {
21540
21541         va_list ap;
21542         vsscanf("from", "%d", ap)
21543   ;
21544   return 0;
21545 }
21546 _ACEOF
21547 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21548 if { (eval echo "$as_me:21548: \"$ac_link\"") >&5
21549   (eval $ac_link) 2>&5
21550   ac_status=$?
21551   echo "$as_me:21551: \$? = $ac_status" >&5
21552   (exit "$ac_status"); } &&
21553          { ac_try='test -s "conftest$ac_exeext"'
21554   { (eval echo "$as_me:21554: \"$ac_try\"") >&5
21555   (eval $ac_try) 2>&5
21556   ac_status=$?
21557   echo "$as_me:21557: \$? = $ac_status" >&5
21558   (exit "$ac_status"); }; }; then
21559   cf_cv_func_vsscanf=vsscanf
21560 else
21561   echo "$as_me: failed program was:" >&5
21562 cat "conftest.$ac_ext" >&5
21563
21564 cat >"conftest.$ac_ext" <<_ACEOF
21565 #line 21565 "configure"
21566 #include "confdefs.h"
21567
21568 #include <stdarg.h>
21569 #include <stdio.h>
21570 int
21571 main (void)
21572 {
21573
21574         FILE strbuf;
21575         char *str = "from";
21576
21577         strbuf._flag = _IOREAD;
21578         strbuf._ptr = strbuf._base = (unsigned char *) str;
21579         strbuf._cnt = strlen(str);
21580         strbuf._file = _NFILE;
21581         return (vfscanf(&strbuf, "%d", ap))
21582   ;
21583   return 0;
21584 }
21585 _ACEOF
21586 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21587 if { (eval echo "$as_me:21587: \"$ac_link\"") >&5
21588   (eval $ac_link) 2>&5
21589   ac_status=$?
21590   echo "$as_me:21590: \$? = $ac_status" >&5
21591   (exit "$ac_status"); } &&
21592          { ac_try='test -s "conftest$ac_exeext"'
21593   { (eval echo "$as_me:21593: \"$ac_try\"") >&5
21594   (eval $ac_try) 2>&5
21595   ac_status=$?
21596   echo "$as_me:21596: \$? = $ac_status" >&5
21597   (exit "$ac_status"); }; }; then
21598   cf_cv_func_vsscanf=vfscanf
21599 else
21600   echo "$as_me: failed program was:" >&5
21601 cat "conftest.$ac_ext" >&5
21602
21603 cat >"conftest.$ac_ext" <<_ACEOF
21604 #line 21604 "configure"
21605 #include "confdefs.h"
21606
21607 #include <stdarg.h>
21608 #include <stdio.h>
21609 int
21610 main (void)
21611 {
21612
21613         FILE strbuf;
21614         char *str = "from";
21615
21616         strbuf._flag = _IOREAD;
21617         strbuf._ptr = strbuf._base = (unsigned char *) str;
21618         strbuf._cnt = strlen(str);
21619         strbuf._file = _NFILE;
21620         return (_doscan(&strbuf, "%d", ap))
21621   ;
21622   return 0;
21623 }
21624 _ACEOF
21625 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21626 if { (eval echo "$as_me:21626: \"$ac_link\"") >&5
21627   (eval $ac_link) 2>&5
21628   ac_status=$?
21629   echo "$as_me:21629: \$? = $ac_status" >&5
21630   (exit "$ac_status"); } &&
21631          { ac_try='test -s "conftest$ac_exeext"'
21632   { (eval echo "$as_me:21632: \"$ac_try\"") >&5
21633   (eval $ac_try) 2>&5
21634   ac_status=$?
21635   echo "$as_me:21635: \$? = $ac_status" >&5
21636   (exit "$ac_status"); }; }; then
21637   cf_cv_func_vsscanf=_doscan
21638 else
21639   echo "$as_me: failed program was:" >&5
21640 cat "conftest.$ac_ext" >&5
21641
21642 cf_cv_func_vsscanf=no
21643 fi
21644 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21645 fi
21646 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21647 fi
21648 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21649 fi
21650 echo "$as_me:21650: result: $cf_cv_func_vsscanf" >&5
21651 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
21652
21653 case "$cf_cv_func_vsscanf" in
21654 (vsscanf)
21655 cat >>confdefs.h <<\EOF
21656 #define HAVE_VSSCANF 1
21657 EOF
21658 ;;
21659 (vfscanf)
21660 cat >>confdefs.h <<\EOF
21661 #define HAVE_VFSCANF 1
21662 EOF
21663 ;;
21664 (_doscan)
21665 cat >>confdefs.h <<\EOF
21666 #define HAVE__DOSCAN 1
21667 EOF
21668 ;;
21669 esac
21670
21671 for ac_header in \
21672 unistd.h \
21673
21674 do
21675 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21676 echo "$as_me:21676: checking for $ac_header" >&5
21677 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21678 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21679   echo $ECHO_N "(cached) $ECHO_C" >&6
21680 else
21681   cat >"conftest.$ac_ext" <<_ACEOF
21682 #line 21682 "configure"
21683 #include "confdefs.h"
21684 #include <$ac_header>
21685 _ACEOF
21686 if { (eval echo "$as_me:21686: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21687   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21688   ac_status=$?
21689   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21690   rm -f conftest.er1
21691   cat conftest.err >&5
21692   echo "$as_me:21692: \$? = $ac_status" >&5
21693   (exit "$ac_status"); } >/dev/null; then
21694   if test -s conftest.err; then
21695     ac_cpp_err=$ac_c_preproc_warn_flag
21696   else
21697     ac_cpp_err=
21698   fi
21699 else
21700   ac_cpp_err=yes
21701 fi
21702 if test -z "$ac_cpp_err"; then
21703   eval "$as_ac_Header=yes"
21704 else
21705   echo "$as_me: failed program was:" >&5
21706   cat "conftest.$ac_ext" >&5
21707   eval "$as_ac_Header=no"
21708 fi
21709 rm -f conftest.err "conftest.$ac_ext"
21710 fi
21711 echo "$as_me:21711: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21712 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21713 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21714   cat >>confdefs.h <<EOF
21715 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21716 EOF
21717
21718 fi
21719 done
21720
21721 echo "$as_me:21721: checking for working mkstemp" >&5
21722 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
21723 if test "${cf_cv_func_mkstemp+set}" = set; then
21724   echo $ECHO_N "(cached) $ECHO_C" >&6
21725 else
21726
21727 rm -rf ./conftest*
21728 if test "$cross_compiling" = yes; then
21729   cf_cv_func_mkstemp=maybe
21730 else
21731   cat >"conftest.$ac_ext" <<_ACEOF
21732 #line 21732 "configure"
21733 #include "confdefs.h"
21734
21735 #include <sys/types.h>
21736 #ifdef HAVE_UNISTD_H
21737 #include <unistd.h>
21738 #endif
21739 #include <stdlib.h>
21740 #include <stdio.h>
21741 #include <string.h>
21742 #include <sys/stat.h>
21743 int main(void)
21744 {
21745         char *tmpl = "conftestXXXXXX";
21746         char name[2][80];
21747         int n;
21748         int result = 0;
21749         int fd;
21750         struct stat sb;
21751
21752         umask(077);
21753         for (n = 0; n < 2; ++n) {
21754                 strcpy(name[n], tmpl);
21755                 if ((fd = mkstemp(name[n])) >= 0) {
21756                         if (!strcmp(name[n], tmpl)
21757                          || stat(name[n], &sb) != 0
21758                          || (sb.st_mode & S_IFMT) != S_IFREG
21759                          || (sb.st_mode & 077) != 0) {
21760                                 result = 1;
21761                         }
21762                         close(fd);
21763                 }
21764         }
21765         if (result == 0
21766          && !strcmp(name[0], name[1]))
21767                 result = 1;
21768         ${cf_cv_main_return:-return}(result);
21769 }
21770
21771 _ACEOF
21772 rm -f "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"); } && { ac_try='"./conftest$ac_exeext"'
21778   { (eval echo "$as_me:21778: \"$ac_try\"") >&5
21779   (eval $ac_try) 2>&5
21780   ac_status=$?
21781   echo "$as_me:21781: \$? = $ac_status" >&5
21782   (exit "$ac_status"); }; }; then
21783   cf_cv_func_mkstemp=yes
21784
21785 else
21786   echo "$as_me: program exited with status $ac_status" >&5
21787 echo "$as_me: failed program was:" >&5
21788 cat "conftest.$ac_ext" >&5
21789 cf_cv_func_mkstemp=no
21790
21791 fi
21792 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21793 fi
21794
21795 fi
21796 echo "$as_me:21796: result: $cf_cv_func_mkstemp" >&5
21797 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
21798 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
21799         echo "$as_me:21799: checking for mkstemp" >&5
21800 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
21801 if test "${ac_cv_func_mkstemp+set}" = set; then
21802   echo $ECHO_N "(cached) $ECHO_C" >&6
21803 else
21804   cat >"conftest.$ac_ext" <<_ACEOF
21805 #line 21805 "configure"
21806 #include "confdefs.h"
21807 #define mkstemp autoconf_temporary
21808 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21809 #undef mkstemp
21810
21811 #ifdef __cplusplus
21812 extern "C"
21813 #endif
21814
21815 /* We use char because int might match the return type of a gcc2
21816    builtin and then its argument prototype would still apply.  */
21817 char mkstemp (void);
21818
21819 int
21820 main (void)
21821 {
21822
21823 /* The GNU C library defines stubs for functions which it implements
21824     to always fail with ENOSYS.  Some functions are actually named
21825     something starting with __ and the normal name is an alias.  */
21826 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
21827 #error found stub for mkstemp
21828 #endif
21829
21830         return mkstemp ();
21831   ;
21832   return 0;
21833 }
21834 _ACEOF
21835 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21836 if { (eval echo "$as_me:21836: \"$ac_link\"") >&5
21837   (eval $ac_link) 2>&5
21838   ac_status=$?
21839   echo "$as_me:21839: \$? = $ac_status" >&5
21840   (exit "$ac_status"); } &&
21841          { ac_try='test -s "conftest$ac_exeext"'
21842   { (eval echo "$as_me:21842: \"$ac_try\"") >&5
21843   (eval $ac_try) 2>&5
21844   ac_status=$?
21845   echo "$as_me:21845: \$? = $ac_status" >&5
21846   (exit "$ac_status"); }; }; then
21847   ac_cv_func_mkstemp=yes
21848 else
21849   echo "$as_me: failed program was:" >&5
21850 cat "conftest.$ac_ext" >&5
21851 ac_cv_func_mkstemp=no
21852 fi
21853 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21854 fi
21855 echo "$as_me:21855: result: $ac_cv_func_mkstemp" >&5
21856 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
21857
21858 fi
21859 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
21860
21861 cat >>confdefs.h <<\EOF
21862 #define HAVE_MKSTEMP 1
21863 EOF
21864
21865 fi
21866
21867 # setup for prototype of fallback for vsscanf()
21868
21869 if test "$cf_cv_func_vsscanf" = vsscanf ; then
21870         HAVE_VSSCANF=1
21871 else
21872         HAVE_VSSCANF=0
21873 fi
21874
21875 if test "x$cross_compiling" = xyes ; then
21876         { echo "$as_me:21876: WARNING: cross compiling: assume setvbuf params not reversed" >&5
21877 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
21878 else
21879         echo "$as_me:21879: checking whether setvbuf arguments are reversed" >&5
21880 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
21881 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
21882   echo $ECHO_N "(cached) $ECHO_C" >&6
21883 else
21884   if test "$cross_compiling" = yes; then
21885   { { echo "$as_me:21885: error: cannot run test program while cross compiling" >&5
21886 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21887    { (exit 1); exit 1; }; }
21888 else
21889   cat >"conftest.$ac_ext" <<_ACEOF
21890 #line 21890 "configure"
21891 #include "confdefs.h"
21892 #include <stdio.h>
21893 /* If setvbuf has the reversed format, exit 0. */
21894 int
21895 main (void)
21896 {
21897   /* This call has the arguments reversed.
21898      A reversed system may check and see that the address of main
21899      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
21900   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
21901     $ac_main_return(1);
21902   putc('\r', stdout);
21903   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
21904 }
21905 _ACEOF
21906 rm -f "conftest$ac_exeext"
21907 if { (eval echo "$as_me:21907: \"$ac_link\"") >&5
21908   (eval $ac_link) 2>&5
21909   ac_status=$?
21910   echo "$as_me:21910: \$? = $ac_status" >&5
21911   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21912   { (eval echo "$as_me:21912: \"$ac_try\"") >&5
21913   (eval $ac_try) 2>&5
21914   ac_status=$?
21915   echo "$as_me:21915: \$? = $ac_status" >&5
21916   (exit "$ac_status"); }; }; then
21917   ac_cv_func_setvbuf_reversed=yes
21918 else
21919   echo "$as_me: program exited with status $ac_status" >&5
21920 echo "$as_me: failed program was:" >&5
21921 cat "conftest.$ac_ext" >&5
21922 ac_cv_func_setvbuf_reversed=no
21923 fi
21924 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21925 fi
21926 rm -f core ./core.* ./*.core
21927 fi
21928 echo "$as_me:21928: result: $ac_cv_func_setvbuf_reversed" >&5
21929 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
21930 if test $ac_cv_func_setvbuf_reversed = yes; then
21931
21932 cat >>confdefs.h <<\EOF
21933 #define SETVBUF_REVERSED 1
21934 EOF
21935
21936 fi
21937
21938 fi
21939 echo "$as_me:21939: checking for intptr_t" >&5
21940 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
21941 if test "${ac_cv_type_intptr_t+set}" = set; then
21942   echo $ECHO_N "(cached) $ECHO_C" >&6
21943 else
21944   cat >"conftest.$ac_ext" <<_ACEOF
21945 #line 21945 "configure"
21946 #include "confdefs.h"
21947 $ac_includes_default
21948 int
21949 main (void)
21950 {
21951 if ((intptr_t *) 0)
21952   return 0;
21953 if (sizeof (intptr_t))
21954   return 0;
21955   ;
21956   return 0;
21957 }
21958 _ACEOF
21959 rm -f "conftest.$ac_objext"
21960 if { (eval echo "$as_me:21960: \"$ac_compile\"") >&5
21961   (eval $ac_compile) 2>&5
21962   ac_status=$?
21963   echo "$as_me:21963: \$? = $ac_status" >&5
21964   (exit "$ac_status"); } &&
21965          { ac_try='test -s "conftest.$ac_objext"'
21966   { (eval echo "$as_me:21966: \"$ac_try\"") >&5
21967   (eval $ac_try) 2>&5
21968   ac_status=$?
21969   echo "$as_me:21969: \$? = $ac_status" >&5
21970   (exit "$ac_status"); }; }; then
21971   ac_cv_type_intptr_t=yes
21972 else
21973   echo "$as_me: failed program was:" >&5
21974 cat "conftest.$ac_ext" >&5
21975 ac_cv_type_intptr_t=no
21976 fi
21977 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21978 fi
21979 echo "$as_me:21979: result: $ac_cv_type_intptr_t" >&5
21980 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
21981 if test "$ac_cv_type_intptr_t" = yes; then
21982   :
21983 else
21984
21985 cat >>confdefs.h <<EOF
21986 #define intptr_t long
21987 EOF
21988
21989 fi
21990
21991 echo "$as_me:21991: checking for ssize_t" >&5
21992 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
21993 if test "${ac_cv_type_ssize_t+set}" = set; then
21994   echo $ECHO_N "(cached) $ECHO_C" >&6
21995 else
21996   cat >"conftest.$ac_ext" <<_ACEOF
21997 #line 21997 "configure"
21998 #include "confdefs.h"
21999 $ac_includes_default
22000 int
22001 main (void)
22002 {
22003 if ((ssize_t *) 0)
22004   return 0;
22005 if (sizeof (ssize_t))
22006   return 0;
22007   ;
22008   return 0;
22009 }
22010 _ACEOF
22011 rm -f "conftest.$ac_objext"
22012 if { (eval echo "$as_me:22012: \"$ac_compile\"") >&5
22013   (eval $ac_compile) 2>&5
22014   ac_status=$?
22015   echo "$as_me:22015: \$? = $ac_status" >&5
22016   (exit "$ac_status"); } &&
22017          { ac_try='test -s "conftest.$ac_objext"'
22018   { (eval echo "$as_me:22018: \"$ac_try\"") >&5
22019   (eval $ac_try) 2>&5
22020   ac_status=$?
22021   echo "$as_me:22021: \$? = $ac_status" >&5
22022   (exit "$ac_status"); }; }; then
22023   ac_cv_type_ssize_t=yes
22024 else
22025   echo "$as_me: failed program was:" >&5
22026 cat "conftest.$ac_ext" >&5
22027 ac_cv_type_ssize_t=no
22028 fi
22029 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22030 fi
22031 echo "$as_me:22031: result: $ac_cv_type_ssize_t" >&5
22032 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22033 if test "$ac_cv_type_ssize_t" = yes; then
22034   :
22035 else
22036
22037 cat >>confdefs.h <<EOF
22038 #define ssize_t int
22039 EOF
22040
22041 fi
22042
22043 echo "$as_me:22043: checking for type sigaction_t" >&5
22044 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22045 if test "${cf_cv_type_sigaction+set}" = set; then
22046   echo $ECHO_N "(cached) $ECHO_C" >&6
22047 else
22048
22049         cat >"conftest.$ac_ext" <<_ACEOF
22050 #line 22050 "configure"
22051 #include "confdefs.h"
22052
22053 #include <signal.h>
22054 int
22055 main (void)
22056 {
22057 sigaction_t x
22058   ;
22059   return 0;
22060 }
22061 _ACEOF
22062 rm -f "conftest.$ac_objext"
22063 if { (eval echo "$as_me:22063: \"$ac_compile\"") >&5
22064   (eval $ac_compile) 2>&5
22065   ac_status=$?
22066   echo "$as_me:22066: \$? = $ac_status" >&5
22067   (exit "$ac_status"); } &&
22068          { ac_try='test -s "conftest.$ac_objext"'
22069   { (eval echo "$as_me:22069: \"$ac_try\"") >&5
22070   (eval $ac_try) 2>&5
22071   ac_status=$?
22072   echo "$as_me:22072: \$? = $ac_status" >&5
22073   (exit "$ac_status"); }; }; then
22074   cf_cv_type_sigaction=yes
22075 else
22076   echo "$as_me: failed program was:" >&5
22077 cat "conftest.$ac_ext" >&5
22078 cf_cv_type_sigaction=no
22079 fi
22080 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22081 fi
22082
22083 echo "$as_me:22083: result: $cf_cv_type_sigaction" >&5
22084 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22085 test "$cf_cv_type_sigaction" = yes &&
22086 cat >>confdefs.h <<\EOF
22087 #define HAVE_TYPE_SIGACTION 1
22088 EOF
22089
22090 echo "$as_me:22090: checking declaration of size-change" >&5
22091 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22092 if test "${cf_cv_sizechange+set}" = set; then
22093   echo $ECHO_N "(cached) $ECHO_C" >&6
22094 else
22095
22096         cf_cv_sizechange=unknown
22097         cf_save_CPPFLAGS="$CPPFLAGS"
22098
22099 for cf_opts in "" "NEED_PTEM_H"
22100 do
22101
22102         CPPFLAGS="$cf_save_CPPFLAGS"
22103         if test -n "$cf_opts"
22104         then
22105
22106         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22107         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22108
22109         fi
22110         cat >"conftest.$ac_ext" <<_ACEOF
22111 #line 22111 "configure"
22112 #include "confdefs.h"
22113 #include <sys/types.h>
22114 #ifdef HAVE_TERMIOS_H
22115 #include <termios.h>
22116 #else
22117 #ifdef HAVE_TERMIO_H
22118 #include <termio.h>
22119 #endif
22120 #endif
22121
22122 #ifdef NEED_PTEM_H
22123 /* This is a workaround for SCO:  they neglected to define struct winsize in
22124  * termios.h -- it's only in termio.h and ptem.h
22125  */
22126 #include <sys/stream.h>
22127 #include <sys/ptem.h>
22128 #endif
22129
22130 #ifdef HAVE_SYS_IOCTL_H
22131 #include <sys/ioctl.h>
22132 #endif
22133
22134 int
22135 main (void)
22136 {
22137
22138 #ifdef TIOCGSIZE
22139         struct ttysize win;     /* SunOS 3.0... */
22140         int y = win.ts_lines = 2;
22141         int x = win.ts_cols = 1;
22142         (void)y;
22143         (void)x;
22144 #else
22145 #ifdef TIOCGWINSZ
22146         struct winsize win;     /* everything else */
22147         int y = win.ws_row = 2;
22148         int x = win.ws_col = 1;
22149         (void)y;
22150         (void)x;
22151 #else
22152         no TIOCGSIZE or TIOCGWINSZ
22153 #endif /* TIOCGWINSZ */
22154 #endif /* TIOCGSIZE */
22155
22156   ;
22157   return 0;
22158 }
22159 _ACEOF
22160 rm -f "conftest.$ac_objext"
22161 if { (eval echo "$as_me:22161: \"$ac_compile\"") >&5
22162   (eval $ac_compile) 2>&5
22163   ac_status=$?
22164   echo "$as_me:22164: \$? = $ac_status" >&5
22165   (exit "$ac_status"); } &&
22166          { ac_try='test -s "conftest.$ac_objext"'
22167   { (eval echo "$as_me:22167: \"$ac_try\"") >&5
22168   (eval $ac_try) 2>&5
22169   ac_status=$?
22170   echo "$as_me:22170: \$? = $ac_status" >&5
22171   (exit "$ac_status"); }; }; then
22172   cf_cv_sizechange=yes
22173 else
22174   echo "$as_me: failed program was:" >&5
22175 cat "conftest.$ac_ext" >&5
22176 cf_cv_sizechange=no
22177 fi
22178 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22179
22180         CPPFLAGS="$cf_save_CPPFLAGS"
22181         if test "$cf_cv_sizechange" = yes ; then
22182                 echo "size-change succeeded ($cf_opts)" >&5
22183                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22184                 break
22185         fi
22186 done
22187
22188 fi
22189 echo "$as_me:22189: result: $cf_cv_sizechange" >&5
22190 echo "${ECHO_T}$cf_cv_sizechange" >&6
22191 if test "$cf_cv_sizechange" != no ; then
22192
22193 cat >>confdefs.h <<\EOF
22194 #define HAVE_SIZECHANGE 1
22195 EOF
22196
22197         case "$cf_cv_sizechange" in
22198         (NEED*)
22199                 cat >>confdefs.h <<EOF
22200 #define $cf_cv_sizechange  1
22201 EOF
22202
22203                 ;;
22204         esac
22205 fi
22206
22207 echo "$as_me:22207: checking for memmove" >&5
22208 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22209 if test "${ac_cv_func_memmove+set}" = set; then
22210   echo $ECHO_N "(cached) $ECHO_C" >&6
22211 else
22212   cat >"conftest.$ac_ext" <<_ACEOF
22213 #line 22213 "configure"
22214 #include "confdefs.h"
22215 #define memmove autoconf_temporary
22216 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22217 #undef memmove
22218
22219 #ifdef __cplusplus
22220 extern "C"
22221 #endif
22222
22223 /* We use char because int might match the return type of a gcc2
22224    builtin and then its argument prototype would still apply.  */
22225 char memmove (void);
22226
22227 int
22228 main (void)
22229 {
22230
22231 /* The GNU C library defines stubs for functions which it implements
22232     to always fail with ENOSYS.  Some functions are actually named
22233     something starting with __ and the normal name is an alias.  */
22234 #if defined (__stub_memmove) || defined (__stub___memmove)
22235 #error found stub for memmove
22236 #endif
22237
22238         return memmove ();
22239   ;
22240   return 0;
22241 }
22242 _ACEOF
22243 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22244 if { (eval echo "$as_me:22244: \"$ac_link\"") >&5
22245   (eval $ac_link) 2>&5
22246   ac_status=$?
22247   echo "$as_me:22247: \$? = $ac_status" >&5
22248   (exit "$ac_status"); } &&
22249          { ac_try='test -s "conftest$ac_exeext"'
22250   { (eval echo "$as_me:22250: \"$ac_try\"") >&5
22251   (eval $ac_try) 2>&5
22252   ac_status=$?
22253   echo "$as_me:22253: \$? = $ac_status" >&5
22254   (exit "$ac_status"); }; }; then
22255   ac_cv_func_memmove=yes
22256 else
22257   echo "$as_me: failed program was:" >&5
22258 cat "conftest.$ac_ext" >&5
22259 ac_cv_func_memmove=no
22260 fi
22261 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22262 fi
22263 echo "$as_me:22263: result: $ac_cv_func_memmove" >&5
22264 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22265 if test "$ac_cv_func_memmove" = yes; then
22266   :
22267 else
22268
22269 echo "$as_me:22269: checking for bcopy" >&5
22270 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22271 if test "${ac_cv_func_bcopy+set}" = set; then
22272   echo $ECHO_N "(cached) $ECHO_C" >&6
22273 else
22274   cat >"conftest.$ac_ext" <<_ACEOF
22275 #line 22275 "configure"
22276 #include "confdefs.h"
22277 #define bcopy autoconf_temporary
22278 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22279 #undef bcopy
22280
22281 #ifdef __cplusplus
22282 extern "C"
22283 #endif
22284
22285 /* We use char because int might match the return type of a gcc2
22286    builtin and then its argument prototype would still apply.  */
22287 char bcopy (void);
22288
22289 int
22290 main (void)
22291 {
22292
22293 /* The GNU C library defines stubs for functions which it implements
22294     to always fail with ENOSYS.  Some functions are actually named
22295     something starting with __ and the normal name is an alias.  */
22296 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22297 #error found stub for bcopy
22298 #endif
22299
22300         return bcopy ();
22301   ;
22302   return 0;
22303 }
22304 _ACEOF
22305 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22306 if { (eval echo "$as_me:22306: \"$ac_link\"") >&5
22307   (eval $ac_link) 2>&5
22308   ac_status=$?
22309   echo "$as_me:22309: \$? = $ac_status" >&5
22310   (exit "$ac_status"); } &&
22311          { ac_try='test -s "conftest$ac_exeext"'
22312   { (eval echo "$as_me:22312: \"$ac_try\"") >&5
22313   (eval $ac_try) 2>&5
22314   ac_status=$?
22315   echo "$as_me:22315: \$? = $ac_status" >&5
22316   (exit "$ac_status"); }; }; then
22317   ac_cv_func_bcopy=yes
22318 else
22319   echo "$as_me: failed program was:" >&5
22320 cat "conftest.$ac_ext" >&5
22321 ac_cv_func_bcopy=no
22322 fi
22323 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22324 fi
22325 echo "$as_me:22325: result: $ac_cv_func_bcopy" >&5
22326 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22327 if test "$ac_cv_func_bcopy" = yes; then
22328
22329         echo "$as_me:22329: checking if bcopy does overlapping moves" >&5
22330 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22331 if test "${cf_cv_good_bcopy+set}" = set; then
22332   echo $ECHO_N "(cached) $ECHO_C" >&6
22333 else
22334
22335                 if test "$cross_compiling" = yes; then
22336   cf_cv_good_bcopy=unknown
22337 else
22338   cat >"conftest.$ac_ext" <<_ACEOF
22339 #line 22339 "configure"
22340 #include "confdefs.h"
22341
22342 int main(void) {
22343         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22344         char temp[40];
22345         bcopy(data, temp, sizeof(data));
22346         bcopy(temp+10, temp, 15);
22347         bcopy(temp+5, temp+15, 10);
22348         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22349 }
22350
22351 _ACEOF
22352 rm -f "conftest$ac_exeext"
22353 if { (eval echo "$as_me:22353: \"$ac_link\"") >&5
22354   (eval $ac_link) 2>&5
22355   ac_status=$?
22356   echo "$as_me:22356: \$? = $ac_status" >&5
22357   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22358   { (eval echo "$as_me:22358: \"$ac_try\"") >&5
22359   (eval $ac_try) 2>&5
22360   ac_status=$?
22361   echo "$as_me:22361: \$? = $ac_status" >&5
22362   (exit "$ac_status"); }; }; then
22363   cf_cv_good_bcopy=yes
22364 else
22365   echo "$as_me: program exited with status $ac_status" >&5
22366 echo "$as_me: failed program was:" >&5
22367 cat "conftest.$ac_ext" >&5
22368 cf_cv_good_bcopy=no
22369 fi
22370 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22371 fi
22372
22373 fi
22374 echo "$as_me:22374: result: $cf_cv_good_bcopy" >&5
22375 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22376
22377 else
22378   cf_cv_good_bcopy=no
22379 fi
22380
22381         if test "$cf_cv_good_bcopy" = yes ; then
22382
22383 cat >>confdefs.h <<\EOF
22384 #define USE_OK_BCOPY 1
22385 EOF
22386
22387         else
22388
22389 cat >>confdefs.h <<\EOF
22390 #define USE_MY_MEMMOVE 1
22391 EOF
22392
22393         fi
22394
22395 fi
22396
22397 tty >/dev/null 2>&1 || {
22398 for ac_func in posix_openpt
22399 do
22400 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22401 echo "$as_me:22401: checking for $ac_func" >&5
22402 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22403 if eval "test \"\${$as_ac_var+set}\" = set"; then
22404   echo $ECHO_N "(cached) $ECHO_C" >&6
22405 else
22406   cat >"conftest.$ac_ext" <<_ACEOF
22407 #line 22407 "configure"
22408 #include "confdefs.h"
22409 #define $ac_func autoconf_temporary
22410 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22411 #undef $ac_func
22412
22413 #ifdef __cplusplus
22414 extern "C"
22415 #endif
22416
22417 /* We use char because int might match the return type of a gcc2
22418    builtin and then its argument prototype would still apply.  */
22419 char $ac_func (void);
22420
22421 int
22422 main (void)
22423 {
22424
22425 /* The GNU C library defines stubs for functions which it implements
22426     to always fail with ENOSYS.  Some functions are actually named
22427     something starting with __ and the normal name is an alias.  */
22428 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22429 #error found stub for $ac_func
22430 #endif
22431
22432         return $ac_func ();
22433   ;
22434   return 0;
22435 }
22436 _ACEOF
22437 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22438 if { (eval echo "$as_me:22438: \"$ac_link\"") >&5
22439   (eval $ac_link) 2>&5
22440   ac_status=$?
22441   echo "$as_me:22441: \$? = $ac_status" >&5
22442   (exit "$ac_status"); } &&
22443          { ac_try='test -s "conftest$ac_exeext"'
22444   { (eval echo "$as_me:22444: \"$ac_try\"") >&5
22445   (eval $ac_try) 2>&5
22446   ac_status=$?
22447   echo "$as_me:22447: \$? = $ac_status" >&5
22448   (exit "$ac_status"); }; }; then
22449   eval "$as_ac_var=yes"
22450 else
22451   echo "$as_me: failed program was:" >&5
22452 cat "conftest.$ac_ext" >&5
22453 eval "$as_ac_var=no"
22454 fi
22455 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22456 fi
22457 echo "$as_me:22457: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22458 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22459 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22460   cat >>confdefs.h <<EOF
22461 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22462 EOF
22463
22464 fi
22465 done
22466  }
22467 echo "$as_me:22467: checking if poll really works" >&5
22468 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22469 if test "${cf_cv_working_poll+set}" = set; then
22470   echo $ECHO_N "(cached) $ECHO_C" >&6
22471 else
22472
22473 if test "$cross_compiling" = yes; then
22474   cf_cv_working_poll=unknown
22475 else
22476   cat >"conftest.$ac_ext" <<_ACEOF
22477 #line 22477 "configure"
22478 #include "confdefs.h"
22479
22480 #include <stdlib.h>
22481 #include <stdio.h>
22482 #include <unistd.h>
22483 #include <fcntl.h>
22484 #ifdef HAVE_POLL_H
22485 #include <poll.h>
22486 #else
22487 #include <sys/poll.h>
22488 #endif
22489 int main(void) {
22490         struct pollfd myfds;
22491         int ret;
22492
22493         /* check for Darwin bug with respect to "devices" */
22494         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22495         if (myfds.fd < 0)
22496                 myfds.fd = 0;
22497         myfds.events = POLLIN;
22498         myfds.revents = 0;
22499
22500         ret = poll(&myfds, 1, 100);
22501
22502         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22503                 ret = -1;
22504         } else {
22505                 int fd = 0;
22506                 if (!isatty(fd)) {
22507                         fd = open("/dev/tty", 2);       /* O_RDWR */
22508                 }
22509 #ifdef HAVE_POSIX_OPENPT
22510                 if (fd < 0) {
22511                         fd = posix_openpt(O_RDWR);
22512                 }
22513 #endif
22514
22515                 if (fd >= 0) {
22516                         /* also check with standard input */
22517                         myfds.fd = fd;
22518                         myfds.events = POLLIN;
22519                         myfds.revents = 0;
22520                         ret = poll(&myfds, 1, 100);
22521                 } else {
22522                         ret = -1;
22523                 }
22524         }
22525         ${cf_cv_main_return:-return}(ret < 0);
22526 }
22527 _ACEOF
22528 rm -f "conftest$ac_exeext"
22529 if { (eval echo "$as_me:22529: \"$ac_link\"") >&5
22530   (eval $ac_link) 2>&5
22531   ac_status=$?
22532   echo "$as_me:22532: \$? = $ac_status" >&5
22533   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22534   { (eval echo "$as_me:22534: \"$ac_try\"") >&5
22535   (eval $ac_try) 2>&5
22536   ac_status=$?
22537   echo "$as_me:22537: \$? = $ac_status" >&5
22538   (exit "$ac_status"); }; }; then
22539   cf_cv_working_poll=yes
22540 else
22541   echo "$as_me: program exited with status $ac_status" >&5
22542 echo "$as_me: failed program was:" >&5
22543 cat "conftest.$ac_ext" >&5
22544 cf_cv_working_poll=no
22545 fi
22546 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22547 fi
22548 fi
22549 echo "$as_me:22549: result: $cf_cv_working_poll" >&5
22550 echo "${ECHO_T}$cf_cv_working_poll" >&6
22551 test "$cf_cv_working_poll" = "yes" &&
22552 cat >>confdefs.h <<\EOF
22553 #define HAVE_WORKING_POLL 1
22554 EOF
22555
22556 echo "$as_me:22556: checking for va_copy" >&5
22557 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
22558 if test "${cf_cv_have_va_copy+set}" = set; then
22559   echo $ECHO_N "(cached) $ECHO_C" >&6
22560 else
22561
22562 cat >"conftest.$ac_ext" <<_ACEOF
22563 #line 22563 "configure"
22564 #include "confdefs.h"
22565
22566 #include <stdarg.h>
22567
22568 int
22569 main (void)
22570 {
22571
22572         static va_list dst;
22573         static va_list src;
22574         va_copy(dst, src)
22575   ;
22576   return 0;
22577 }
22578 _ACEOF
22579 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22580 if { (eval echo "$as_me:22580: \"$ac_link\"") >&5
22581   (eval $ac_link) 2>&5
22582   ac_status=$?
22583   echo "$as_me:22583: \$? = $ac_status" >&5
22584   (exit "$ac_status"); } &&
22585          { ac_try='test -s "conftest$ac_exeext"'
22586   { (eval echo "$as_me:22586: \"$ac_try\"") >&5
22587   (eval $ac_try) 2>&5
22588   ac_status=$?
22589   echo "$as_me:22589: \$? = $ac_status" >&5
22590   (exit "$ac_status"); }; }; then
22591   cf_cv_have_va_copy=yes
22592 else
22593   echo "$as_me: failed program was:" >&5
22594 cat "conftest.$ac_ext" >&5
22595 cf_cv_have_va_copy=no
22596 fi
22597 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22598 fi
22599 echo "$as_me:22599: result: $cf_cv_have_va_copy" >&5
22600 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
22601
22602 if test "$cf_cv_have_va_copy" = yes;
22603 then
22604
22605 cat >>confdefs.h <<\EOF
22606 #define HAVE_VA_COPY 1
22607 EOF
22608
22609 else # !cf_cv_have_va_copy
22610
22611 echo "$as_me:22611: checking for __va_copy" >&5
22612 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
22613 if test "${cf_cv_have___va_copy+set}" = set; then
22614   echo $ECHO_N "(cached) $ECHO_C" >&6
22615 else
22616
22617 cat >"conftest.$ac_ext" <<_ACEOF
22618 #line 22618 "configure"
22619 #include "confdefs.h"
22620
22621 #include <stdarg.h>
22622
22623 int
22624 main (void)
22625 {
22626
22627         static va_list dst;
22628         static va_list src;
22629         __va_copy(dst, src)
22630   ;
22631   return 0;
22632 }
22633 _ACEOF
22634 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22635 if { (eval echo "$as_me:22635: \"$ac_link\"") >&5
22636   (eval $ac_link) 2>&5
22637   ac_status=$?
22638   echo "$as_me:22638: \$? = $ac_status" >&5
22639   (exit "$ac_status"); } &&
22640          { ac_try='test -s "conftest$ac_exeext"'
22641   { (eval echo "$as_me:22641: \"$ac_try\"") >&5
22642   (eval $ac_try) 2>&5
22643   ac_status=$?
22644   echo "$as_me:22644: \$? = $ac_status" >&5
22645   (exit "$ac_status"); }; }; then
22646   cf_cv_have___va_copy=yes
22647 else
22648   echo "$as_me: failed program was:" >&5
22649 cat "conftest.$ac_ext" >&5
22650 cf_cv_have___va_copy=no
22651 fi
22652 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22653 fi
22654 echo "$as_me:22654: result: $cf_cv_have___va_copy" >&5
22655 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
22656
22657 if test "$cf_cv_have___va_copy" = yes
22658 then
22659
22660 cat >>confdefs.h <<\EOF
22661 #define HAVE___VA_COPY 1
22662 EOF
22663
22664 else # !cf_cv_have___va_copy
22665
22666 echo "$as_me:22666: checking for __builtin_va_copy" >&5
22667 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
22668 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
22669   echo $ECHO_N "(cached) $ECHO_C" >&6
22670 else
22671
22672 cat >"conftest.$ac_ext" <<_ACEOF
22673 #line 22673 "configure"
22674 #include "confdefs.h"
22675
22676 #include <stdarg.h>
22677
22678 int
22679 main (void)
22680 {
22681
22682         static va_list dst;
22683         static va_list src;
22684         __builtin_va_copy(dst, src)
22685   ;
22686   return 0;
22687 }
22688 _ACEOF
22689 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22690 if { (eval echo "$as_me:22690: \"$ac_link\"") >&5
22691   (eval $ac_link) 2>&5
22692   ac_status=$?
22693   echo "$as_me:22693: \$? = $ac_status" >&5
22694   (exit "$ac_status"); } &&
22695          { ac_try='test -s "conftest$ac_exeext"'
22696   { (eval echo "$as_me:22696: \"$ac_try\"") >&5
22697   (eval $ac_try) 2>&5
22698   ac_status=$?
22699   echo "$as_me:22699: \$? = $ac_status" >&5
22700   (exit "$ac_status"); }; }; then
22701   cf_cv_have___builtin_va_copy=yes
22702 else
22703   echo "$as_me: failed program was:" >&5
22704 cat "conftest.$ac_ext" >&5
22705 cf_cv_have___builtin_va_copy=no
22706 fi
22707 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22708 fi
22709 echo "$as_me:22709: result: $cf_cv_have___builtin_va_copy" >&5
22710 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
22711
22712 test "$cf_cv_have___builtin_va_copy" = yes &&
22713
22714 cat >>confdefs.h <<\EOF
22715 #define HAVE___BUILTIN_VA_COPY 1
22716 EOF
22717
22718 fi # cf_cv_have___va_copy
22719
22720 fi # cf_cv_have_va_copy
22721
22722 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
22723 (*yes*)
22724         ;;
22725
22726 (*)
22727         echo "$as_me:22727: checking if we can simply copy va_list" >&5
22728 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
22729 if test "${cf_cv_pointer_va_list+set}" = set; then
22730   echo $ECHO_N "(cached) $ECHO_C" >&6
22731 else
22732
22733 cat >"conftest.$ac_ext" <<_ACEOF
22734 #line 22734 "configure"
22735 #include "confdefs.h"
22736
22737 #include <stdarg.h>
22738
22739 int
22740 main (void)
22741 {
22742
22743         va_list dst;
22744         va_list src;
22745         dst = src
22746   ;
22747   return 0;
22748 }
22749 _ACEOF
22750 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22751 if { (eval echo "$as_me:22751: \"$ac_link\"") >&5
22752   (eval $ac_link) 2>&5
22753   ac_status=$?
22754   echo "$as_me:22754: \$? = $ac_status" >&5
22755   (exit "$ac_status"); } &&
22756          { ac_try='test -s "conftest$ac_exeext"'
22757   { (eval echo "$as_me:22757: \"$ac_try\"") >&5
22758   (eval $ac_try) 2>&5
22759   ac_status=$?
22760   echo "$as_me:22760: \$? = $ac_status" >&5
22761   (exit "$ac_status"); }; }; then
22762   cf_cv_pointer_va_list=yes
22763 else
22764   echo "$as_me: failed program was:" >&5
22765 cat "conftest.$ac_ext" >&5
22766 cf_cv_pointer_va_list=no
22767 fi
22768 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22769 fi
22770 echo "$as_me:22770: result: $cf_cv_pointer_va_list" >&5
22771 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
22772
22773         if test "$cf_cv_pointer_va_list" = no
22774         then
22775                 echo "$as_me:22775: checking if we can copy va_list indirectly" >&5
22776 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
22777 if test "${cf_cv_array_va_list+set}" = set; then
22778   echo $ECHO_N "(cached) $ECHO_C" >&6
22779 else
22780
22781 cat >"conftest.$ac_ext" <<_ACEOF
22782 #line 22782 "configure"
22783 #include "confdefs.h"
22784
22785 #include <stdarg.h>
22786
22787 int
22788 main (void)
22789 {
22790
22791         va_list dst;
22792         va_list src;
22793         *dst = *src
22794   ;
22795   return 0;
22796 }
22797 _ACEOF
22798 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22799 if { (eval echo "$as_me:22799: \"$ac_link\"") >&5
22800   (eval $ac_link) 2>&5
22801   ac_status=$?
22802   echo "$as_me:22802: \$? = $ac_status" >&5
22803   (exit "$ac_status"); } &&
22804          { ac_try='test -s "conftest$ac_exeext"'
22805   { (eval echo "$as_me:22805: \"$ac_try\"") >&5
22806   (eval $ac_try) 2>&5
22807   ac_status=$?
22808   echo "$as_me:22808: \$? = $ac_status" >&5
22809   (exit "$ac_status"); }; }; then
22810   cf_cv_array_va_list=yes
22811 else
22812   echo "$as_me: failed program was:" >&5
22813 cat "conftest.$ac_ext" >&5
22814 cf_cv_array_va_list=no
22815 fi
22816 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22817 fi
22818 echo "$as_me:22818: result: $cf_cv_array_va_list" >&5
22819 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22820                 test "$cf_cv_array_va_list" = yes &&
22821 cat >>confdefs.h <<\EOF
22822 #define ARRAY_VA_LIST 1
22823 EOF
22824
22825         fi
22826         ;;
22827 esac
22828
22829 echo "$as_me:22829: checking for pid_t" >&5
22830 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22831 if test "${ac_cv_type_pid_t+set}" = set; then
22832   echo $ECHO_N "(cached) $ECHO_C" >&6
22833 else
22834   cat >"conftest.$ac_ext" <<_ACEOF
22835 #line 22835 "configure"
22836 #include "confdefs.h"
22837 $ac_includes_default
22838 int
22839 main (void)
22840 {
22841 if ((pid_t *) 0)
22842   return 0;
22843 if (sizeof (pid_t))
22844   return 0;
22845   ;
22846   return 0;
22847 }
22848 _ACEOF
22849 rm -f "conftest.$ac_objext"
22850 if { (eval echo "$as_me:22850: \"$ac_compile\"") >&5
22851   (eval $ac_compile) 2>&5
22852   ac_status=$?
22853   echo "$as_me:22853: \$? = $ac_status" >&5
22854   (exit "$ac_status"); } &&
22855          { ac_try='test -s "conftest.$ac_objext"'
22856   { (eval echo "$as_me:22856: \"$ac_try\"") >&5
22857   (eval $ac_try) 2>&5
22858   ac_status=$?
22859   echo "$as_me:22859: \$? = $ac_status" >&5
22860   (exit "$ac_status"); }; }; then
22861   ac_cv_type_pid_t=yes
22862 else
22863   echo "$as_me: failed program was:" >&5
22864 cat "conftest.$ac_ext" >&5
22865 ac_cv_type_pid_t=no
22866 fi
22867 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22868 fi
22869 echo "$as_me:22869: result: $ac_cv_type_pid_t" >&5
22870 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22871 if test "$ac_cv_type_pid_t" = yes; then
22872   :
22873 else
22874
22875 cat >>confdefs.h <<EOF
22876 #define pid_t int
22877 EOF
22878
22879 fi
22880
22881 for ac_header in unistd.h vfork.h
22882 do
22883 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22884 echo "$as_me:22884: checking for $ac_header" >&5
22885 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22886 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22887   echo $ECHO_N "(cached) $ECHO_C" >&6
22888 else
22889   cat >"conftest.$ac_ext" <<_ACEOF
22890 #line 22890 "configure"
22891 #include "confdefs.h"
22892 #include <$ac_header>
22893 _ACEOF
22894 if { (eval echo "$as_me:22894: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22895   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22896   ac_status=$?
22897   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22898   rm -f conftest.er1
22899   cat conftest.err >&5
22900   echo "$as_me:22900: \$? = $ac_status" >&5
22901   (exit "$ac_status"); } >/dev/null; then
22902   if test -s conftest.err; then
22903     ac_cpp_err=$ac_c_preproc_warn_flag
22904   else
22905     ac_cpp_err=
22906   fi
22907 else
22908   ac_cpp_err=yes
22909 fi
22910 if test -z "$ac_cpp_err"; then
22911   eval "$as_ac_Header=yes"
22912 else
22913   echo "$as_me: failed program was:" >&5
22914   cat "conftest.$ac_ext" >&5
22915   eval "$as_ac_Header=no"
22916 fi
22917 rm -f conftest.err "conftest.$ac_ext"
22918 fi
22919 echo "$as_me:22919: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22920 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22921 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22922   cat >>confdefs.h <<EOF
22923 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22924 EOF
22925
22926 fi
22927 done
22928
22929 for ac_func in fork vfork
22930 do
22931 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22932 echo "$as_me:22932: checking for $ac_func" >&5
22933 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22934 if eval "test \"\${$as_ac_var+set}\" = set"; then
22935   echo $ECHO_N "(cached) $ECHO_C" >&6
22936 else
22937   cat >"conftest.$ac_ext" <<_ACEOF
22938 #line 22938 "configure"
22939 #include "confdefs.h"
22940 #define $ac_func autoconf_temporary
22941 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22942 #undef $ac_func
22943
22944 #ifdef __cplusplus
22945 extern "C"
22946 #endif
22947
22948 /* We use char because int might match the return type of a gcc2
22949    builtin and then its argument prototype would still apply.  */
22950 char $ac_func (void);
22951
22952 int
22953 main (void)
22954 {
22955
22956 /* The GNU C library defines stubs for functions which it implements
22957     to always fail with ENOSYS.  Some functions are actually named
22958     something starting with __ and the normal name is an alias.  */
22959 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22960 #error found stub for $ac_func
22961 #endif
22962
22963         return $ac_func ();
22964   ;
22965   return 0;
22966 }
22967 _ACEOF
22968 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22969 if { (eval echo "$as_me:22969: \"$ac_link\"") >&5
22970   (eval $ac_link) 2>&5
22971   ac_status=$?
22972   echo "$as_me:22972: \$? = $ac_status" >&5
22973   (exit "$ac_status"); } &&
22974          { ac_try='test -s "conftest$ac_exeext"'
22975   { (eval echo "$as_me:22975: \"$ac_try\"") >&5
22976   (eval $ac_try) 2>&5
22977   ac_status=$?
22978   echo "$as_me:22978: \$? = $ac_status" >&5
22979   (exit "$ac_status"); }; }; then
22980   eval "$as_ac_var=yes"
22981 else
22982   echo "$as_me: failed program was:" >&5
22983 cat "conftest.$ac_ext" >&5
22984 eval "$as_ac_var=no"
22985 fi
22986 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22987 fi
22988 echo "$as_me:22988: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22989 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22990 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22991   cat >>confdefs.h <<EOF
22992 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22993 EOF
22994
22995 fi
22996 done
22997
22998 ac_cv_func_fork_works=$ac_cv_func_fork
22999 if test "x$ac_cv_func_fork" = xyes; then
23000   echo "$as_me:23000: checking for working fork" >&5
23001 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23002 if test "${ac_cv_func_fork_works+set}" = set; then
23003   echo $ECHO_N "(cached) $ECHO_C" >&6
23004 else
23005   if test "$cross_compiling" = yes; then
23006   ac_cv_func_fork_works=cross
23007 else
23008   cat >"conftest.$ac_ext" <<_ACEOF
23009 /* By Rüdiger Kuhlmann. */
23010       #include <sys/types.h>
23011       #if HAVE_UNISTD_H
23012       # include <unistd.h>
23013       #endif
23014       /* Some systems only have a dummy stub for fork() */
23015       int main (void)
23016       {
23017         if (fork() < 0)
23018           $ac_main_return (1);
23019         $ac_main_return (0);
23020       }
23021 _ACEOF
23022 rm -f "conftest$ac_exeext"
23023 if { (eval echo "$as_me:23023: \"$ac_link\"") >&5
23024   (eval $ac_link) 2>&5
23025   ac_status=$?
23026   echo "$as_me:23026: \$? = $ac_status" >&5
23027   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23028   { (eval echo "$as_me:23028: \"$ac_try\"") >&5
23029   (eval $ac_try) 2>&5
23030   ac_status=$?
23031   echo "$as_me:23031: \$? = $ac_status" >&5
23032   (exit "$ac_status"); }; }; then
23033   ac_cv_func_fork_works=yes
23034 else
23035   echo "$as_me: program exited with status $ac_status" >&5
23036 echo "$as_me: failed program was:" >&5
23037 cat "conftest.$ac_ext" >&5
23038 ac_cv_func_fork_works=no
23039 fi
23040 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23041 fi
23042 fi
23043 echo "$as_me:23043: result: $ac_cv_func_fork_works" >&5
23044 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23045
23046 fi
23047 if test "x$ac_cv_func_fork_works" = xcross; then
23048   case $host in
23049     *-*-amigaos* | *-*-msdosdjgpp*)
23050       # Override, as these systems have only a dummy fork() stub
23051       ac_cv_func_fork_works=no
23052       ;;
23053     *)
23054       ac_cv_func_fork_works=yes
23055       ;;
23056   esac
23057   { echo "$as_me:23057: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23058 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23059 fi
23060 ac_cv_func_vfork_works=$ac_cv_func_vfork
23061 if test "x$ac_cv_func_vfork" = xyes; then
23062   echo "$as_me:23062: checking for working vfork" >&5
23063 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23064 if test "${ac_cv_func_vfork_works+set}" = set; then
23065   echo $ECHO_N "(cached) $ECHO_C" >&6
23066 else
23067   if test "$cross_compiling" = yes; then
23068   ac_cv_func_vfork_works=cross
23069 else
23070   cat >"conftest.$ac_ext" <<_ACEOF
23071 #line 23071 "configure"
23072 #include "confdefs.h"
23073 /* Thanks to Paul Eggert for this test.  */
23074 #include <stdio.h>
23075 #include <sys/types.h>
23076 #include <sys/stat.h>
23077 #if HAVE_UNISTD_H
23078 # include <unistd.h>
23079 #endif
23080 #if HAVE_VFORK_H
23081 # include <vfork.h>
23082 #endif
23083 /* On some sparc systems, changes by the child to local and incoming
23084    argument registers are propagated back to the parent.  The compiler
23085    is told about this with #include <vfork.h>, but some compilers
23086    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23087    static variable whose address is put into a register that is
23088    clobbered by the vfork.  */
23089 static
23090 #ifdef __cplusplus
23091 sparc_address_test (int arg)
23092 # else
23093 sparc_address_test (arg) int arg;
23094 #endif
23095 {
23096   static pid_t child;
23097   if (!child) {
23098     child = vfork ();
23099     if (child < 0) {
23100       perror ("vfork");
23101       _exit(2);
23102     }
23103     if (!child) {
23104       arg = getpid();
23105       write(-1, "", 0);
23106       _exit (arg);
23107     }
23108   }
23109 }
23110
23111 int
23112 main (void)
23113 {
23114   pid_t parent = getpid ();
23115   pid_t child;
23116
23117   sparc_address_test ();
23118
23119   child = vfork ();
23120
23121   if (child == 0) {
23122     /* Here is another test for sparc vfork register problems.  This
23123        test uses lots of local variables, at least as many local
23124        variables as main has allocated so far including compiler
23125        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23126        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23127        reuse the register of parent for one of the local variables,
23128        since it will think that parent can't possibly be used any more
23129        in this routine.  Assigning to the local variable will thus
23130        munge parent in the parent process.  */
23131     pid_t
23132       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23133       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23134     /* Convince the compiler that p..p7 are live; otherwise, it might
23135        use the same hardware register for all 8 local variables.  */
23136     if (p != p1 || p != p2 || p != p3 || p != p4
23137         || p != p5 || p != p6 || p != p7)
23138       _exit(1);
23139
23140     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23141        from child file descriptors.  If the child closes a descriptor
23142        before it execs or exits, this munges the parent's descriptor
23143        as well.  Test for this by closing stdout in the child.  */
23144     _exit(close(fileno(stdout)) != 0);
23145   } else {
23146     int status;
23147     struct stat st;
23148
23149     while (wait(&status) != child)
23150       ;
23151     $ac_main_return(
23152          /* Was there some problem with vforking?  */
23153          child < 0
23154
23155          /* Did the child fail?  (This shouldn't happen.)  */
23156          || status
23157
23158          /* Did the vfork/compiler bug occur?  */
23159          || parent != getpid()
23160
23161          /* Did the file descriptor bug occur?  */
23162          || fstat(fileno(stdout), &st) != 0
23163          );
23164   }
23165 }
23166 _ACEOF
23167 rm -f "conftest$ac_exeext"
23168 if { (eval echo "$as_me:23168: \"$ac_link\"") >&5
23169   (eval $ac_link) 2>&5
23170   ac_status=$?
23171   echo "$as_me:23171: \$? = $ac_status" >&5
23172   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23173   { (eval echo "$as_me:23173: \"$ac_try\"") >&5
23174   (eval $ac_try) 2>&5
23175   ac_status=$?
23176   echo "$as_me:23176: \$? = $ac_status" >&5
23177   (exit "$ac_status"); }; }; then
23178   ac_cv_func_vfork_works=yes
23179 else
23180   echo "$as_me: program exited with status $ac_status" >&5
23181 echo "$as_me: failed program was:" >&5
23182 cat "conftest.$ac_ext" >&5
23183 ac_cv_func_vfork_works=no
23184 fi
23185 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23186 fi
23187 fi
23188 echo "$as_me:23188: result: $ac_cv_func_vfork_works" >&5
23189 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23190
23191 fi;
23192 if test "x$ac_cv_func_fork_works" = xcross; then
23193   ac_cv_func_vfork_works=ac_cv_func_vfork
23194   { echo "$as_me:23194: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23195 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23196 fi
23197
23198 if test "x$ac_cv_func_vfork_works" = xyes; then
23199
23200 cat >>confdefs.h <<\EOF
23201 #define HAVE_WORKING_VFORK 1
23202 EOF
23203
23204 else
23205
23206 cat >>confdefs.h <<\EOF
23207 #define vfork fork
23208 EOF
23209
23210 fi
23211 if test "x$ac_cv_func_fork_works" = xyes; then
23212
23213 cat >>confdefs.h <<\EOF
23214 #define HAVE_WORKING_FORK 1
23215 EOF
23216
23217 fi
23218
23219 echo "$as_me:23219: checking if fopen accepts explicit binary mode" >&5
23220 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23221 if test "${cf_cv_fopen_bin_r+set}" = set; then
23222   echo $ECHO_N "(cached) $ECHO_C" >&6
23223 else
23224
23225         if test "$cross_compiling" = yes; then
23226   cf_cv_fopen_bin_r=unknown
23227 else
23228   cat >"conftest.$ac_ext" <<_ACEOF
23229 #line 23229 "configure"
23230 #include "confdefs.h"
23231
23232 #include <stdio.h>
23233 int main(void) {
23234         FILE *fp = fopen("conftest.tmp", "wb");
23235         int rc = 0;
23236         if (fp != 0) {
23237                 int p, q;
23238                 for (p = 0; p < 256; ++p) {
23239                         fputc(p, fp);
23240                 }
23241                 fclose(fp);
23242                 fp = fopen("conftest.tmp", "rb");
23243                 if (fp != 0) {
23244                         for (p = 0; p < 256; ++p) {
23245                                 q = fgetc(fp);
23246                                 if (q != p) {
23247                                         rc = 1;
23248                                         break;
23249                                 }
23250                         }
23251                 } else {
23252                         rc = 1;
23253                 }
23254         } else {
23255                 rc = 1;
23256         }
23257         ${cf_cv_main_return:-return} (rc);
23258 }
23259
23260 _ACEOF
23261 rm -f "conftest$ac_exeext"
23262 if { (eval echo "$as_me:23262: \"$ac_link\"") >&5
23263   (eval $ac_link) 2>&5
23264   ac_status=$?
23265   echo "$as_me:23265: \$? = $ac_status" >&5
23266   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23267   { (eval echo "$as_me:23267: \"$ac_try\"") >&5
23268   (eval $ac_try) 2>&5
23269   ac_status=$?
23270   echo "$as_me:23270: \$? = $ac_status" >&5
23271   (exit "$ac_status"); }; }; then
23272   cf_cv_fopen_bin_r=yes
23273 else
23274   echo "$as_me: program exited with status $ac_status" >&5
23275 echo "$as_me: failed program was:" >&5
23276 cat "conftest.$ac_ext" >&5
23277 cf_cv_fopen_bin_r=no
23278 fi
23279 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23280 fi
23281
23282 fi
23283 echo "$as_me:23283: result: $cf_cv_fopen_bin_r" >&5
23284 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23285 test "x$cf_cv_fopen_bin_r" != xno &&
23286 cat >>confdefs.h <<\EOF
23287 #define USE_FOPEN_BIN_R 1
23288 EOF
23289
23290 # special check for test/ditto.c
23291
23292 echo "$as_me:23292: checking for openpty in -lutil" >&5
23293 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23294 if test "${ac_cv_lib_util_openpty+set}" = set; then
23295   echo $ECHO_N "(cached) $ECHO_C" >&6
23296 else
23297   ac_check_lib_save_LIBS=$LIBS
23298 LIBS="-lutil  $LIBS"
23299 cat >"conftest.$ac_ext" <<_ACEOF
23300 #line 23300 "configure"
23301 #include "confdefs.h"
23302
23303 /* Override any gcc2 internal prototype to avoid an error.  */
23304 #ifdef __cplusplus
23305 extern "C"
23306 #endif
23307 /* We use char because int might match the return type of a gcc2
23308    builtin and then its argument prototype would still apply.  */
23309 char openpty ();
23310 int
23311 main (void)
23312 {
23313 openpty ();
23314   ;
23315   return 0;
23316 }
23317 _ACEOF
23318 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23319 if { (eval echo "$as_me:23319: \"$ac_link\"") >&5
23320   (eval $ac_link) 2>&5
23321   ac_status=$?
23322   echo "$as_me:23322: \$? = $ac_status" >&5
23323   (exit "$ac_status"); } &&
23324          { ac_try='test -s "conftest$ac_exeext"'
23325   { (eval echo "$as_me:23325: \"$ac_try\"") >&5
23326   (eval $ac_try) 2>&5
23327   ac_status=$?
23328   echo "$as_me:23328: \$? = $ac_status" >&5
23329   (exit "$ac_status"); }; }; then
23330   ac_cv_lib_util_openpty=yes
23331 else
23332   echo "$as_me: failed program was:" >&5
23333 cat "conftest.$ac_ext" >&5
23334 ac_cv_lib_util_openpty=no
23335 fi
23336 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23337 LIBS=$ac_check_lib_save_LIBS
23338 fi
23339 echo "$as_me:23339: result: $ac_cv_lib_util_openpty" >&5
23340 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23341 if test "$ac_cv_lib_util_openpty" = yes; then
23342   cf_cv_lib_util=yes
23343 else
23344   cf_cv_lib_util=no
23345 fi
23346
23347 echo "$as_me:23347: checking for openpty header" >&5
23348 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23349 if test "${cf_cv_func_openpty+set}" = set; then
23350   echo $ECHO_N "(cached) $ECHO_C" >&6
23351 else
23352
23353         cf_save_LIBS="$LIBS"
23354         test "$cf_cv_lib_util" = yes && {
23355 cf_add_libs="$LIBS"
23356 # reverse order
23357 cf_add_0lib=
23358 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23359 # filter duplicates
23360 for cf_add_1lib in $cf_add_0lib; do
23361         for cf_add_2lib in $cf_add_libs; do
23362                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23363                         cf_add_1lib=
23364                         break
23365                 fi
23366         done
23367         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23368 done
23369 LIBS="$cf_add_libs"
23370  }
23371         for cf_header in pty.h libutil.h util.h
23372         do
23373         cat >"conftest.$ac_ext" <<_ACEOF
23374 #line 23374 "configure"
23375 #include "confdefs.h"
23376
23377 #include <$cf_header>
23378
23379 int
23380 main (void)
23381 {
23382
23383         int x = openpty((int *)0, (int *)0, (char *)0,
23384                                    (struct termios *)0, (struct winsize *)0);
23385
23386   ;
23387   return 0;
23388 }
23389 _ACEOF
23390 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23391 if { (eval echo "$as_me:23391: \"$ac_link\"") >&5
23392   (eval $ac_link) 2>&5
23393   ac_status=$?
23394   echo "$as_me:23394: \$? = $ac_status" >&5
23395   (exit "$ac_status"); } &&
23396          { ac_try='test -s "conftest$ac_exeext"'
23397   { (eval echo "$as_me:23397: \"$ac_try\"") >&5
23398   (eval $ac_try) 2>&5
23399   ac_status=$?
23400   echo "$as_me:23400: \$? = $ac_status" >&5
23401   (exit "$ac_status"); }; }; then
23402
23403                 cf_cv_func_openpty=$cf_header
23404                 break
23405
23406 else
23407   echo "$as_me: failed program was:" >&5
23408 cat "conftest.$ac_ext" >&5
23409
23410                 cf_cv_func_openpty=no
23411
23412 fi
23413 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23414         done
23415         LIBS="$cf_save_LIBS"
23416
23417 fi
23418 echo "$as_me:23418: result: $cf_cv_func_openpty" >&5
23419 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23420
23421 if test "$cf_cv_func_openpty" != no ; then
23422
23423 cat >>confdefs.h <<EOF
23424 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23425 EOF
23426
23427 cat >>confdefs.h <<\EOF
23428 #define USE_XTERM_PTY 1
23429 EOF
23430
23431         if test "x$cf_cv_lib_util" = xyes ; then
23432
23433 cf_add_libs="$TEST_LIBS"
23434 # reverse order
23435 cf_add_0lib=
23436 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23437 # filter duplicates
23438 for cf_add_1lib in $cf_add_0lib; do
23439         for cf_add_2lib in $cf_add_libs; do
23440                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23441                         cf_add_1lib=
23442                         break
23443                 fi
23444         done
23445         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23446 done
23447 TEST_LIBS="$cf_add_libs"
23448
23449         fi
23450 fi
23451
23452 if test "$with_hashed_db" != no ; then
23453
23454 cat >>confdefs.h <<\EOF
23455 #define USE_HASHED_DB 1
23456 EOF
23457
23458 case $with_hashed_db in
23459 (yes|*able*)
23460         ;;
23461 (*)
23462         if test -d "$with_hashed_db" ; then
23463
23464 if test -n "$with_hashed_db/include" ; then
23465   for cf_add_incdir in $with_hashed_db/include
23466   do
23467         while test "$cf_add_incdir" != /usr/include
23468         do
23469           if test -d "$cf_add_incdir"
23470           then
23471                 cf_have_incdir=no
23472                 if test -n "$CFLAGS$CPPFLAGS" ; then
23473                   # a loop is needed to ensure we can add subdirs of existing dirs
23474                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23475                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23476                           cf_have_incdir=yes; break
23477                         fi
23478                   done
23479                 fi
23480
23481                 if test "$cf_have_incdir" = no ; then
23482                   if test "$cf_add_incdir" = /usr/local/include ; then
23483                         if test "$GCC" = yes
23484                         then
23485                           cf_save_CPPFLAGS=$CPPFLAGS
23486
23487         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23488         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23489
23490                           cat >"conftest.$ac_ext" <<_ACEOF
23491 #line 23491 "configure"
23492 #include "confdefs.h"
23493 #include <stdio.h>
23494 int
23495 main (void)
23496 {
23497 printf("Hello")
23498   ;
23499   return 0;
23500 }
23501 _ACEOF
23502 rm -f "conftest.$ac_objext"
23503 if { (eval echo "$as_me:23503: \"$ac_compile\"") >&5
23504   (eval $ac_compile) 2>&5
23505   ac_status=$?
23506   echo "$as_me:23506: \$? = $ac_status" >&5
23507   (exit "$ac_status"); } &&
23508          { ac_try='test -s "conftest.$ac_objext"'
23509   { (eval echo "$as_me:23509: \"$ac_try\"") >&5
23510   (eval $ac_try) 2>&5
23511   ac_status=$?
23512   echo "$as_me:23512: \$? = $ac_status" >&5
23513   (exit "$ac_status"); }; }; then
23514   :
23515 else
23516   echo "$as_me: failed program was:" >&5
23517 cat "conftest.$ac_ext" >&5
23518 cf_have_incdir=yes
23519 fi
23520 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23521                           CPPFLAGS=$cf_save_CPPFLAGS
23522                         fi
23523                   fi
23524                 fi
23525
23526                 if test "$cf_have_incdir" = no ; then
23527                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23528
23529 echo "${as_me:-configure}:23529: testing adding $cf_add_incdir to include-path ..." 1>&5
23530
23531                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23532
23533                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23534                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23535                   cf_add_incdir="$cf_top_incdir"
23536                 else
23537                   break
23538                 fi
23539           else
23540                 break
23541           fi
23542         done
23543   done
23544 fi
23545
23546 if test -n "$with_hashed_db/lib" ; then
23547         for cf_add_libdir in $with_hashed_db/lib
23548         do
23549                 if test "$cf_add_libdir" = /usr/lib ; then
23550                         :
23551                 elif test -d "$cf_add_libdir"
23552                 then
23553                         cf_have_libdir=no
23554                         if test -n "$LDFLAGS$LIBS" ; then
23555                                 # a loop is needed to ensure we can add subdirs of existing dirs
23556                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23557                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23558                                                 cf_have_libdir=yes; break
23559                                         fi
23560                                 done
23561                         fi
23562                         if test "$cf_have_libdir" = no ; then
23563                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23564
23565 echo "${as_me:-configure}:23565: testing adding $cf_add_libdir to library-path ..." 1>&5
23566
23567                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23568                         fi
23569                 fi
23570         done
23571 fi
23572
23573         else
23574                 case "$with_hashed_db" in
23575                 (./*|../*|/*)
23576                         { echo "$as_me:23576: WARNING: no such directory $with_hashed_db" >&5
23577 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
23578                         ;;
23579                 (*)
23580
23581 cf_search=
23582
23583 test "x$prefix" != "xNONE" && \
23584 test -d "$prefix" && \
23585  {
23586         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
23587         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
23588         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
23589         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
23590         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
23591         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
23592 }
23593
23594 for cf_subdir_prefix in \
23595         /usr \
23596         /usr/local \
23597         /usr/pkg \
23598         /opt \
23599         /opt/local \
23600         $HOME
23601 do
23602
23603 test "x$cf_subdir_prefix" != "x$prefix" && \
23604 test -d "$cf_subdir_prefix" && \
23605 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23606         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
23607         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
23608         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
23609         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
23610         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
23611         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"
23612 }
23613
23614 done
23615
23616         for cf_item in $cf_search
23617         do
23618                 case "$cf_item" in
23619                 (*/$with_hashed_db)
23620
23621 if test -n "$cf_item" ; then
23622   for cf_add_incdir in $cf_item
23623   do
23624         while test "$cf_add_incdir" != /usr/include
23625         do
23626           if test -d "$cf_add_incdir"
23627           then
23628                 cf_have_incdir=no
23629                 if test -n "$CFLAGS$CPPFLAGS" ; then
23630                   # a loop is needed to ensure we can add subdirs of existing dirs
23631                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23632                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23633                           cf_have_incdir=yes; break
23634                         fi
23635                   done
23636                 fi
23637
23638                 if test "$cf_have_incdir" = no ; then
23639                   if test "$cf_add_incdir" = /usr/local/include ; then
23640                         if test "$GCC" = yes
23641                         then
23642                           cf_save_CPPFLAGS=$CPPFLAGS
23643
23644         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23645         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23646
23647                           cat >"conftest.$ac_ext" <<_ACEOF
23648 #line 23648 "configure"
23649 #include "confdefs.h"
23650 #include <stdio.h>
23651 int
23652 main (void)
23653 {
23654 printf("Hello")
23655   ;
23656   return 0;
23657 }
23658 _ACEOF
23659 rm -f "conftest.$ac_objext"
23660 if { (eval echo "$as_me:23660: \"$ac_compile\"") >&5
23661   (eval $ac_compile) 2>&5
23662   ac_status=$?
23663   echo "$as_me:23663: \$? = $ac_status" >&5
23664   (exit "$ac_status"); } &&
23665          { ac_try='test -s "conftest.$ac_objext"'
23666   { (eval echo "$as_me:23666: \"$ac_try\"") >&5
23667   (eval $ac_try) 2>&5
23668   ac_status=$?
23669   echo "$as_me:23669: \$? = $ac_status" >&5
23670   (exit "$ac_status"); }; }; then
23671   :
23672 else
23673   echo "$as_me: failed program was:" >&5
23674 cat "conftest.$ac_ext" >&5
23675 cf_have_incdir=yes
23676 fi
23677 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23678                           CPPFLAGS=$cf_save_CPPFLAGS
23679                         fi
23680                   fi
23681                 fi
23682
23683                 if test "$cf_have_incdir" = no ; then
23684                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23685
23686 echo "${as_me:-configure}:23686: testing adding $cf_add_incdir to include-path ..." 1>&5
23687
23688                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23689
23690                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23691                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23692                   cf_add_incdir="$cf_top_incdir"
23693                 else
23694                   break
23695                 fi
23696           else
23697                 break
23698           fi
23699         done
23700   done
23701 fi
23702
23703                         ;;
23704                 esac
23705         done
23706
23707 cf_search=
23708
23709 test "x$prefix" != "xNONE" && \
23710 test -d "$prefix" && \
23711  {
23712         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
23713         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
23714         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
23715         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
23716         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
23717         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
23718 }
23719
23720 for cf_subdir_prefix in \
23721         /usr \
23722         /usr/local \
23723         /usr/pkg \
23724         /opt \
23725         /opt/local \
23726         $HOME
23727 do
23728
23729 test "x$cf_subdir_prefix" != "x$prefix" && \
23730 test -d "$cf_subdir_prefix" && \
23731 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23732         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
23733         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
23734         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
23735         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
23736         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
23737         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"
23738 }
23739
23740 done
23741
23742         for cf_item in $cf_search
23743         do
23744                 case "$cf_item" in
23745                 (*/$with_hashed_db)
23746
23747 if test -n "$cf_item" ; then
23748         for cf_add_libdir in $cf_item
23749         do
23750                 if test "$cf_add_libdir" = /usr/lib ; then
23751                         :
23752                 elif test -d "$cf_add_libdir"
23753                 then
23754                         cf_have_libdir=no
23755                         if test -n "$LDFLAGS$LIBS" ; then
23756                                 # a loop is needed to ensure we can add subdirs of existing dirs
23757                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23758                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23759                                                 cf_have_libdir=yes; break
23760                                         fi
23761                                 done
23762                         fi
23763                         if test "$cf_have_libdir" = no ; then
23764                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23765
23766 echo "${as_me:-configure}:23766: testing adding $cf_add_libdir to library-path ..." 1>&5
23767
23768                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23769                         fi
23770                 fi
23771         done
23772 fi
23773
23774                         ;;
23775                 esac
23776         done
23777
23778                         ;;
23779                 esac
23780         fi
23781 esac
23782
23783 echo "$as_me:23783: checking for db.h" >&5
23784 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
23785 if test "${ac_cv_header_db_h+set}" = set; then
23786   echo $ECHO_N "(cached) $ECHO_C" >&6
23787 else
23788   cat >"conftest.$ac_ext" <<_ACEOF
23789 #line 23789 "configure"
23790 #include "confdefs.h"
23791 #include <db.h>
23792 _ACEOF
23793 if { (eval echo "$as_me:23793: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23794   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23795   ac_status=$?
23796   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23797   rm -f conftest.er1
23798   cat conftest.err >&5
23799   echo "$as_me:23799: \$? = $ac_status" >&5
23800   (exit "$ac_status"); } >/dev/null; then
23801   if test -s conftest.err; then
23802     ac_cpp_err=$ac_c_preproc_warn_flag
23803   else
23804     ac_cpp_err=
23805   fi
23806 else
23807   ac_cpp_err=yes
23808 fi
23809 if test -z "$ac_cpp_err"; then
23810   ac_cv_header_db_h=yes
23811 else
23812   echo "$as_me: failed program was:" >&5
23813   cat "conftest.$ac_ext" >&5
23814   ac_cv_header_db_h=no
23815 fi
23816 rm -f conftest.err "conftest.$ac_ext"
23817 fi
23818 echo "$as_me:23818: result: $ac_cv_header_db_h" >&5
23819 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23820 if test "$ac_cv_header_db_h" = yes; then
23821
23822 echo "$as_me:23822: checking for version of db" >&5
23823 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
23824 if test "${cf_cv_hashed_db_version+set}" = set; then
23825   echo $ECHO_N "(cached) $ECHO_C" >&6
23826 else
23827
23828 cf_cv_hashed_db_version=unknown
23829
23830 for cf_db_version in 1 2 3 4 5 6
23831 do
23832
23833 echo "${as_me:-configure}:23833: testing checking for db version $cf_db_version ..." 1>&5
23834
23835         cat >"conftest.$ac_ext" <<_ACEOF
23836 #line 23836 "configure"
23837 #include "confdefs.h"
23838
23839 $ac_includes_default
23840 #include <db.h>
23841
23842 #ifdef DB_VERSION_MAJOR
23843         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
23844 #if $cf_db_version == DB_VERSION_MAJOR
23845         /* ok */
23846 #else
23847         make an error
23848 #endif
23849 #else
23850 #if $cf_db_version == 1
23851         /* ok: assuming this is DB 1.8.5 */
23852 #else
23853         make an error
23854 #endif
23855 #endif
23856
23857 int
23858 main (void)
23859 {
23860 DBT *foo = 0
23861   ;
23862   return 0;
23863 }
23864 _ACEOF
23865 rm -f "conftest.$ac_objext"
23866 if { (eval echo "$as_me:23866: \"$ac_compile\"") >&5
23867   (eval $ac_compile) 2>&5
23868   ac_status=$?
23869   echo "$as_me:23869: \$? = $ac_status" >&5
23870   (exit "$ac_status"); } &&
23871          { ac_try='test -s "conftest.$ac_objext"'
23872   { (eval echo "$as_me:23872: \"$ac_try\"") >&5
23873   (eval $ac_try) 2>&5
23874   ac_status=$?
23875   echo "$as_me:23875: \$? = $ac_status" >&5
23876   (exit "$ac_status"); }; }; then
23877
23878         cf_cv_hashed_db_version=$cf_db_version
23879         break
23880
23881 else
23882   echo "$as_me: failed program was:" >&5
23883 cat "conftest.$ac_ext" >&5
23884 fi
23885 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23886 done
23887
23888 fi
23889 echo "$as_me:23889: result: $cf_cv_hashed_db_version" >&5
23890 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
23891
23892 if test "$cf_cv_hashed_db_version" = unknown ; then
23893         { { echo "$as_me:23893: error: Cannot determine version of db" >&5
23894 echo "$as_me: error: Cannot determine version of db" >&2;}
23895    { (exit 1); exit 1; }; }
23896 else
23897
23898 echo "$as_me:23898: checking for db libraries" >&5
23899 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
23900 if test "${cf_cv_hashed_db_libs+set}" = set; then
23901   echo $ECHO_N "(cached) $ECHO_C" >&6
23902 else
23903
23904 cf_cv_hashed_db_libs=unknown
23905 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
23906 do
23907         cf_save_libs="$LIBS"
23908         if test -n "$cf_db_libs"; then
23909
23910 cf_add_libs="$LIBS"
23911 # reverse order
23912 cf_add_0lib=
23913 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23914 # filter duplicates
23915 for cf_add_1lib in $cf_add_0lib; do
23916         for cf_add_2lib in $cf_add_libs; do
23917                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23918                         cf_add_1lib=
23919                         break
23920                 fi
23921         done
23922         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23923 done
23924 LIBS="$cf_add_libs"
23925
23926         fi
23927
23928 echo "${as_me:-configure}:23928: testing checking for library $cf_db_libs ..." 1>&5
23929
23930         cat >"conftest.$ac_ext" <<_ACEOF
23931 #line 23931 "configure"
23932 #include "confdefs.h"
23933
23934 $ac_includes_default
23935 #include <db.h>
23936
23937 int
23938 main (void)
23939 {
23940
23941         char *path = "/tmp/foo";
23942 #ifdef DB_VERSION_MAJOR
23943 #if DB_VERSION_MAJOR >= 4
23944         DB *result = 0;
23945         db_create(&result, NULL, 0);
23946         result->open(result,
23947                 NULL,
23948                 path,
23949                 path,
23950                 DB_HASH,
23951                 DB_CREATE,
23952                 0644);
23953 #elif DB_VERSION_MAJOR >= 3
23954         DB *result = 0;
23955         db_create(&result, NULL, 0);
23956         result->open(result,
23957                 path,
23958                 path,
23959                 DB_HASH,
23960                 DB_CREATE,
23961                 0644);
23962 #elif DB_VERSION_MAJOR >= 2
23963         DB *result = 0;
23964         db_open(path,
23965                 DB_HASH,
23966                 DB_CREATE,
23967                 0644,
23968                 (DB_ENV *) 0,
23969                 (DB_INFO *) 0,
23970                 &result);
23971 #endif /* DB_VERSION_MAJOR */
23972 #else
23973         DB *result = dbopen(path,
23974                      2,
23975                      0644,
23976                      DB_HASH,
23977                      0);
23978 #endif
23979         ${cf_cv_main_return:-return}(result != 0)
23980
23981   ;
23982   return 0;
23983 }
23984 _ACEOF
23985 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23986 if { (eval echo "$as_me:23986: \"$ac_link\"") >&5
23987   (eval $ac_link) 2>&5
23988   ac_status=$?
23989   echo "$as_me:23989: \$? = $ac_status" >&5
23990   (exit "$ac_status"); } &&
23991          { ac_try='test -s "conftest$ac_exeext"'
23992   { (eval echo "$as_me:23992: \"$ac_try\"") >&5
23993   (eval $ac_try) 2>&5
23994   ac_status=$?
23995   echo "$as_me:23995: \$? = $ac_status" >&5
23996   (exit "$ac_status"); }; }; then
23997
23998         if test -n "$cf_db_libs" ; then
23999                 cf_cv_hashed_db_libs=$cf_db_libs
24000         else
24001                 cf_cv_hashed_db_libs=default
24002         fi
24003         LIBS="$cf_save_libs"
24004         break
24005
24006 else
24007   echo "$as_me: failed program was:" >&5
24008 cat "conftest.$ac_ext" >&5
24009 fi
24010 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24011         LIBS="$cf_save_libs"
24012 done
24013
24014 fi
24015 echo "$as_me:24015: result: $cf_cv_hashed_db_libs" >&5
24016 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24017
24018         if test "$cf_cv_hashed_db_libs" = unknown ; then
24019                 { { echo "$as_me:24019: error: Cannot determine library for db" >&5
24020 echo "$as_me: error: Cannot determine library for db" >&2;}
24021    { (exit 1); exit 1; }; }
24022         elif test "$cf_cv_hashed_db_libs" != default ; then
24023
24024 cf_add_libs="$LIBS"
24025 # reverse order
24026 cf_add_0lib=
24027 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24028 # filter duplicates
24029 for cf_add_1lib in $cf_add_0lib; do
24030         for cf_add_2lib in $cf_add_libs; do
24031                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24032                         cf_add_1lib=
24033                         break
24034                 fi
24035         done
24036         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24037 done
24038 LIBS="$cf_add_libs"
24039
24040         fi
24041 fi
24042
24043 else
24044
24045         { { echo "$as_me:24045: error: Cannot find db.h" >&5
24046 echo "$as_me: error: Cannot find db.h" >&2;}
24047    { (exit 1); exit 1; }; }
24048
24049 fi
24050
24051 fi
24052
24053 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24054         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24055         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24056 fi
24057
24058 # Just in case, check if the C compiler has a bool type.
24059
24060 echo "$as_me:24060: checking if we should include stdbool.h" >&5
24061 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24062
24063 if test "${cf_cv_header_stdbool_h+set}" = set; then
24064   echo $ECHO_N "(cached) $ECHO_C" >&6
24065 else
24066
24067         cat >"conftest.$ac_ext" <<_ACEOF
24068 #line 24068 "configure"
24069 #include "confdefs.h"
24070
24071 int
24072 main (void)
24073 {
24074 bool foo = false
24075   ;
24076   return 0;
24077 }
24078 _ACEOF
24079 rm -f "conftest.$ac_objext"
24080 if { (eval echo "$as_me:24080: \"$ac_compile\"") >&5
24081   (eval $ac_compile) 2>&5
24082   ac_status=$?
24083   echo "$as_me:24083: \$? = $ac_status" >&5
24084   (exit "$ac_status"); } &&
24085          { ac_try='test -s "conftest.$ac_objext"'
24086   { (eval echo "$as_me:24086: \"$ac_try\"") >&5
24087   (eval $ac_try) 2>&5
24088   ac_status=$?
24089   echo "$as_me:24089: \$? = $ac_status" >&5
24090   (exit "$ac_status"); }; }; then
24091   cf_cv_header_stdbool_h=0
24092 else
24093   echo "$as_me: failed program was:" >&5
24094 cat "conftest.$ac_ext" >&5
24095 cat >"conftest.$ac_ext" <<_ACEOF
24096 #line 24096 "configure"
24097 #include "confdefs.h"
24098
24099 #ifndef __BEOS__
24100 #include <stdbool.h>
24101 #endif
24102
24103 int
24104 main (void)
24105 {
24106 bool foo = false
24107   ;
24108   return 0;
24109 }
24110 _ACEOF
24111 rm -f "conftest.$ac_objext"
24112 if { (eval echo "$as_me:24112: \"$ac_compile\"") >&5
24113   (eval $ac_compile) 2>&5
24114   ac_status=$?
24115   echo "$as_me:24115: \$? = $ac_status" >&5
24116   (exit "$ac_status"); } &&
24117          { ac_try='test -s "conftest.$ac_objext"'
24118   { (eval echo "$as_me:24118: \"$ac_try\"") >&5
24119   (eval $ac_try) 2>&5
24120   ac_status=$?
24121   echo "$as_me:24121: \$? = $ac_status" >&5
24122   (exit "$ac_status"); }; }; then
24123   cf_cv_header_stdbool_h=1
24124 else
24125   echo "$as_me: failed program was:" >&5
24126 cat "conftest.$ac_ext" >&5
24127 cf_cv_header_stdbool_h=0
24128 fi
24129 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24130 fi
24131 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24132 fi
24133
24134 if test "$cf_cv_header_stdbool_h" = 1
24135 then    echo "$as_me:24135: result: yes" >&5
24136 echo "${ECHO_T}yes" >&6
24137 else    echo "$as_me:24137: result: no" >&5
24138 echo "${ECHO_T}no" >&6
24139 fi
24140
24141 echo "$as_me:24141: checking for builtin bool type" >&5
24142 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24143
24144 if test "${cf_cv_cc_bool_type+set}" = set; then
24145   echo $ECHO_N "(cached) $ECHO_C" >&6
24146 else
24147
24148         cat >"conftest.$ac_ext" <<_ACEOF
24149 #line 24149 "configure"
24150 #include "confdefs.h"
24151
24152 #include <stdio.h>
24153 #include <sys/types.h>
24154
24155 int
24156 main (void)
24157 {
24158 bool x = false
24159   ;
24160   return 0;
24161 }
24162 _ACEOF
24163 rm -f "conftest.$ac_objext"
24164 if { (eval echo "$as_me:24164: \"$ac_compile\"") >&5
24165   (eval $ac_compile) 2>&5
24166   ac_status=$?
24167   echo "$as_me:24167: \$? = $ac_status" >&5
24168   (exit "$ac_status"); } &&
24169          { ac_try='test -s "conftest.$ac_objext"'
24170   { (eval echo "$as_me:24170: \"$ac_try\"") >&5
24171   (eval $ac_try) 2>&5
24172   ac_status=$?
24173   echo "$as_me:24173: \$? = $ac_status" >&5
24174   (exit "$ac_status"); }; }; then
24175   cf_cv_cc_bool_type=1
24176 else
24177   echo "$as_me: failed program was:" >&5
24178 cat "conftest.$ac_ext" >&5
24179 cf_cv_cc_bool_type=0
24180 fi
24181 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24182
24183 fi
24184
24185 if test "$cf_cv_cc_bool_type" = 1
24186 then    echo "$as_me:24186: result: yes" >&5
24187 echo "${ECHO_T}yes" >&6
24188 else    echo "$as_me:24188: result: no" >&5
24189 echo "${ECHO_T}no" >&6
24190 fi
24191
24192 # Check for C++ compiler characteristics (and ensure that it's there!)
24193 if test -n "$CXX" ; then
24194         ac_ext=cc
24195 ac_cpp='$CXXCPP $CPPFLAGS'
24196 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24197 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24198 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24199 ac_main_return="return"
24200
24201 if test -n "$GXX" ; then
24202
24203         cf_save="$LIBS"
24204         LIBS="$LIBS $CXXLIBS"
24205         echo "$as_me:24205: checking if we already have C++ library" >&5
24206 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24207         cat >"conftest.$ac_ext" <<_ACEOF
24208 #line 24208 "configure"
24209 #include "confdefs.h"
24210
24211                         #include <iostream>
24212 int
24213 main (void)
24214 {
24215
24216                         std::cout << "Hello World!" << std::endl;
24217   ;
24218   return 0;
24219 }
24220 _ACEOF
24221 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24222 if { (eval echo "$as_me:24222: \"$ac_link\"") >&5
24223   (eval $ac_link) 2>&5
24224   ac_status=$?
24225   echo "$as_me:24225: \$? = $ac_status" >&5
24226   (exit "$ac_status"); } &&
24227          { ac_try='test -s "conftest$ac_exeext"'
24228   { (eval echo "$as_me:24228: \"$ac_try\"") >&5
24229   (eval $ac_try) 2>&5
24230   ac_status=$?
24231   echo "$as_me:24231: \$? = $ac_status" >&5
24232   (exit "$ac_status"); }; }; then
24233   cf_have_libstdcpp=yes
24234 else
24235   echo "$as_me: failed program was:" >&5
24236 cat "conftest.$ac_ext" >&5
24237 cf_have_libstdcpp=no
24238 fi
24239 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24240         echo "$as_me:24240: result: $cf_have_libstdcpp" >&5
24241 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24242         LIBS="$cf_save"
24243
24244         if test "$cf_have_libstdcpp" != yes
24245         then
24246                 case "$cf_cv_system_name" in
24247                 (os2*)
24248                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24249                                 cf_stdcpp_libname=stdcpp
24250                         else
24251                                 cf_stdcpp_libname=stdc++
24252                         fi
24253                         ;;
24254                 (*)
24255                         cf_stdcpp_libname=stdc++
24256                         ;;
24257                 esac
24258
24259                 echo "$as_me:24259: checking for library $cf_stdcpp_libname" >&5
24260 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24261 if test "${cf_cv_libstdcpp+set}" = set; then
24262   echo $ECHO_N "(cached) $ECHO_C" >&6
24263 else
24264
24265                         cf_save="$LIBS"
24266                         LIBS="$LIBS $CXXLIBS"
24267
24268 cf_add_libs="$LIBS"
24269 # reverse order
24270 cf_add_0lib=
24271 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24272 # filter duplicates
24273 for cf_add_1lib in $cf_add_0lib; do
24274         for cf_add_2lib in $cf_add_libs; do
24275                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24276                         cf_add_1lib=
24277                         break
24278                 fi
24279         done
24280         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24281 done
24282 LIBS="$cf_add_libs"
24283
24284                 cat >"conftest.$ac_ext" <<_ACEOF
24285 #line 24285 "configure"
24286 #include "confdefs.h"
24287
24288                                 #include <iostream>
24289 int
24290 main (void)
24291 {
24292
24293                                 std::cout << "Hello World!" << std::endl;
24294   ;
24295   return 0;
24296 }
24297 _ACEOF
24298 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24299 if { (eval echo "$as_me:24299: \"$ac_link\"") >&5
24300   (eval $ac_link) 2>&5
24301   ac_status=$?
24302   echo "$as_me:24302: \$? = $ac_status" >&5
24303   (exit "$ac_status"); } &&
24304          { ac_try='test -s "conftest$ac_exeext"'
24305   { (eval echo "$as_me:24305: \"$ac_try\"") >&5
24306   (eval $ac_try) 2>&5
24307   ac_status=$?
24308   echo "$as_me:24308: \$? = $ac_status" >&5
24309   (exit "$ac_status"); }; }; then
24310   cf_cv_libstdcpp=yes
24311 else
24312   echo "$as_me: failed program was:" >&5
24313 cat "conftest.$ac_ext" >&5
24314 cf_cv_libstdcpp=no
24315 fi
24316 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24317                         LIBS="$cf_save"
24318
24319 fi
24320 echo "$as_me:24320: result: $cf_cv_libstdcpp" >&5
24321 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24322                 test "$cf_cv_libstdcpp" = yes && {
24323 cf_add_libs="$CXXLIBS"
24324 # reverse order
24325 cf_add_0lib=
24326 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24327 # filter duplicates
24328 for cf_add_1lib in $cf_add_0lib; do
24329         for cf_add_2lib in $cf_add_libs; do
24330                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24331                         cf_add_1lib=
24332                         break
24333                 fi
24334         done
24335         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24336 done
24337 CXXLIBS="$cf_add_libs"
24338  }
24339         fi
24340 fi
24341
24342         echo "$as_me:24342: checking whether $CXX understands -c and -o together" >&5
24343 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24344 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24345   echo $ECHO_N "(cached) $ECHO_C" >&6
24346 else
24347
24348 cat > conftest.$ac_ext <<CF_EOF
24349 int main(void)
24350 {
24351         ${cf_cv_main_return:-return}(0);
24352 }
24353 CF_EOF
24354 # We do the test twice because some compilers refuse to overwrite an
24355 # existing .o file with -o, though they will create one.
24356 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24357 if { (eval echo "$as_me:24357: \"$ac_try\"") >&5
24358   (eval $ac_try) 2>&5
24359   ac_status=$?
24360   echo "$as_me:24360: \$? = $ac_status" >&5
24361   (exit "$ac_status"); } &&
24362   test -f conftest2.$ac_objext && { (eval echo "$as_me:24362: \"$ac_try\"") >&5
24363   (eval $ac_try) 2>&5
24364   ac_status=$?
24365   echo "$as_me:24365: \$? = $ac_status" >&5
24366   (exit "$ac_status"); };
24367 then
24368   eval cf_cv_prog_CXX_c_o=yes
24369 else
24370   eval cf_cv_prog_CXX_c_o=no
24371 fi
24372 rm -rf ./conftest*
24373
24374 fi
24375 if test "$cf_cv_prog_CXX_c_o" = yes; then
24376   echo "$as_me:24376: result: yes" >&5
24377 echo "${ECHO_T}yes" >&6
24378 else
24379   echo "$as_me:24379: result: no" >&5
24380 echo "${ECHO_T}no" >&6
24381 fi
24382
24383         case "$GXX_VERSION" in
24384         (1.*|2.[0-6]*|[1-9][0-9].*)
24385                 cf_cxx_library=yes
24386                 ;;
24387         (*-2.7*|2.7*)
24388
24389 cf_cxx_library=unknown
24390 case "$cf_cv_system_name" in
24391 (os2*)
24392         cf_gpp_libname=gpp
24393         ;;
24394 (*)
24395         cf_gpp_libname=g++
24396         ;;
24397 esac
24398 if test "$GXX" = yes; then
24399         echo "$as_me:24399: checking for lib$cf_gpp_libname" >&5
24400 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24401         cf_save="$LIBS"
24402
24403 cf_add_libs="$LIBS"
24404 # reverse order
24405 cf_add_0lib=
24406 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24407 # filter duplicates
24408 for cf_add_1lib in $cf_add_0lib; do
24409         for cf_add_2lib in $cf_add_libs; do
24410                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24411                         cf_add_1lib=
24412                         break
24413                 fi
24414         done
24415         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24416 done
24417 LIBS="$cf_add_libs"
24418
24419         cat >"conftest.$ac_ext" <<_ACEOF
24420 #line 24420 "configure"
24421 #include "confdefs.h"
24422
24423 #include <$cf_gpp_libname/builtin.h>
24424
24425 int
24426 main (void)
24427 {
24428 two_arg_error_handler_t foo2 = lib_error_handler
24429   ;
24430   return 0;
24431 }
24432 _ACEOF
24433 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24434 if { (eval echo "$as_me:24434: \"$ac_link\"") >&5
24435   (eval $ac_link) 2>&5
24436   ac_status=$?
24437   echo "$as_me:24437: \$? = $ac_status" >&5
24438   (exit "$ac_status"); } &&
24439          { ac_try='test -s "conftest$ac_exeext"'
24440   { (eval echo "$as_me:24440: \"$ac_try\"") >&5
24441   (eval $ac_try) 2>&5
24442   ac_status=$?
24443   echo "$as_me:24443: \$? = $ac_status" >&5
24444   (exit "$ac_status"); }; }; then
24445   cf_cxx_library=yes
24446
24447 cf_add_libs="$CXXLIBS"
24448 # reverse order
24449 cf_add_0lib=
24450 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24451 # filter duplicates
24452 for cf_add_1lib in $cf_add_0lib; do
24453         for cf_add_2lib in $cf_add_libs; do
24454                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24455                         cf_add_1lib=
24456                         break
24457                 fi
24458         done
24459         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24460 done
24461 CXXLIBS="$cf_add_libs"
24462
24463          if test "$cf_gpp_libname" = cpp ; then
24464
24465 cat >>confdefs.h <<\EOF
24466 #define HAVE_GPP_BUILTIN_H 1
24467 EOF
24468
24469          else
24470
24471 cat >>confdefs.h <<\EOF
24472 #define HAVE_GXX_BUILTIN_H 1
24473 EOF
24474
24475          fi
24476 else
24477   echo "$as_me: failed program was:" >&5
24478 cat "conftest.$ac_ext" >&5
24479 cat >"conftest.$ac_ext" <<_ACEOF
24480 #line 24480 "configure"
24481 #include "confdefs.h"
24482
24483 #include <builtin.h>
24484
24485 int
24486 main (void)
24487 {
24488 two_arg_error_handler_t foo2 = lib_error_handler
24489   ;
24490   return 0;
24491 }
24492 _ACEOF
24493 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24494 if { (eval echo "$as_me:24494: \"$ac_link\"") >&5
24495   (eval $ac_link) 2>&5
24496   ac_status=$?
24497   echo "$as_me:24497: \$? = $ac_status" >&5
24498   (exit "$ac_status"); } &&
24499          { ac_try='test -s "conftest$ac_exeext"'
24500   { (eval echo "$as_me:24500: \"$ac_try\"") >&5
24501   (eval $ac_try) 2>&5
24502   ac_status=$?
24503   echo "$as_me:24503: \$? = $ac_status" >&5
24504   (exit "$ac_status"); }; }; then
24505   cf_cxx_library=yes
24506
24507 cf_add_libs="$CXXLIBS"
24508 # reverse order
24509 cf_add_0lib=
24510 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24511 # filter duplicates
24512 for cf_add_1lib in $cf_add_0lib; do
24513         for cf_add_2lib in $cf_add_libs; do
24514                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24515                         cf_add_1lib=
24516                         break
24517                 fi
24518         done
24519         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24520 done
24521 CXXLIBS="$cf_add_libs"
24522
24523 cat >>confdefs.h <<\EOF
24524 #define HAVE_BUILTIN_H 1
24525 EOF
24526
24527 else
24528   echo "$as_me: failed program was:" >&5
24529 cat "conftest.$ac_ext" >&5
24530 cf_cxx_library=no
24531 fi
24532 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24533 fi
24534 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24535         LIBS="$cf_save"
24536         echo "$as_me:24536: result: $cf_cxx_library" >&5
24537 echo "${ECHO_T}$cf_cxx_library" >&6
24538 fi
24539
24540                 ;;
24541         (*)
24542                 cf_cxx_library=no
24543                 ;;
24544         esac
24545
24546         ac_ext=cc
24547 ac_cpp='$CXXCPP $CPPFLAGS'
24548 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24549 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24550 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24551 ac_main_return="return"
24552 echo "$as_me:24552: checking how to run the C++ preprocessor" >&5
24553 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
24554 if test -z "$CXXCPP"; then
24555   if test "${ac_cv_prog_CXXCPP+set}" = set; then
24556   echo $ECHO_N "(cached) $ECHO_C" >&6
24557 else
24558       # Double quotes because CXXCPP needs to be expanded
24559     for CXXCPP in "$CXX -E" "/lib/cpp"
24560     do
24561       ac_preproc_ok=false
24562 for ac_cxx_preproc_warn_flag in '' yes
24563 do
24564   # Use a header file that comes with gcc, so configuring glibc
24565   # with a fresh cross-compiler works.
24566   # On the NeXT, cc -E runs the code through the compiler's parser,
24567   # not just through cpp. "Syntax error" is here to catch this case.
24568   cat >"conftest.$ac_ext" <<_ACEOF
24569 #line 24569 "configure"
24570 #include "confdefs.h"
24571 #include <assert.h>
24572                      Syntax error
24573 _ACEOF
24574 if { (eval echo "$as_me:24574: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24575   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24576   ac_status=$?
24577   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24578   rm -f conftest.er1
24579   cat conftest.err >&5
24580   echo "$as_me:24580: \$? = $ac_status" >&5
24581   (exit "$ac_status"); } >/dev/null; then
24582   if test -s conftest.err; then
24583     ac_cpp_err=$ac_cxx_preproc_warn_flag
24584   else
24585     ac_cpp_err=
24586   fi
24587 else
24588   ac_cpp_err=yes
24589 fi
24590 if test -z "$ac_cpp_err"; then
24591   :
24592 else
24593   echo "$as_me: failed program was:" >&5
24594   cat "conftest.$ac_ext" >&5
24595   # Broken: fails on valid input.
24596 continue
24597 fi
24598 rm -f conftest.err "conftest.$ac_ext"
24599
24600   # OK, works on sane cases.  Now check whether non-existent headers
24601   # can be detected and how.
24602   cat >"conftest.$ac_ext" <<_ACEOF
24603 #line 24603 "configure"
24604 #include "confdefs.h"
24605 #include <ac_nonexistent.h>
24606 _ACEOF
24607 if { (eval echo "$as_me:24607: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24608   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24609   ac_status=$?
24610   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24611   rm -f conftest.er1
24612   cat conftest.err >&5
24613   echo "$as_me:24613: \$? = $ac_status" >&5
24614   (exit "$ac_status"); } >/dev/null; then
24615   if test -s conftest.err; then
24616     ac_cpp_err=$ac_cxx_preproc_warn_flag
24617   else
24618     ac_cpp_err=
24619   fi
24620 else
24621   ac_cpp_err=yes
24622 fi
24623 if test -z "$ac_cpp_err"; then
24624   # Broken: success on invalid input.
24625 continue
24626 else
24627   echo "$as_me: failed program was:" >&5
24628   cat "conftest.$ac_ext" >&5
24629   # Passes both tests.
24630 ac_preproc_ok=:
24631 break
24632 fi
24633 rm -f conftest.err "conftest.$ac_ext"
24634
24635 done
24636 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24637 rm -f conftest.err "conftest.$ac_ext"
24638 if $ac_preproc_ok; then
24639   break
24640 fi
24641
24642     done
24643     ac_cv_prog_CXXCPP=$CXXCPP
24644
24645 fi
24646   CXXCPP=$ac_cv_prog_CXXCPP
24647 else
24648   ac_cv_prog_CXXCPP=$CXXCPP
24649 fi
24650 echo "$as_me:24650: result: $CXXCPP" >&5
24651 echo "${ECHO_T}$CXXCPP" >&6
24652 ac_preproc_ok=false
24653 for ac_cxx_preproc_warn_flag in '' yes
24654 do
24655   # Use a header file that comes with gcc, so configuring glibc
24656   # with a fresh cross-compiler works.
24657   # On the NeXT, cc -E runs the code through the compiler's parser,
24658   # not just through cpp. "Syntax error" is here to catch this case.
24659   cat >"conftest.$ac_ext" <<_ACEOF
24660 #line 24660 "configure"
24661 #include "confdefs.h"
24662 #include <assert.h>
24663                      Syntax error
24664 _ACEOF
24665 if { (eval echo "$as_me:24665: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24666   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24667   ac_status=$?
24668   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24669   rm -f conftest.er1
24670   cat conftest.err >&5
24671   echo "$as_me:24671: \$? = $ac_status" >&5
24672   (exit "$ac_status"); } >/dev/null; then
24673   if test -s conftest.err; then
24674     ac_cpp_err=$ac_cxx_preproc_warn_flag
24675   else
24676     ac_cpp_err=
24677   fi
24678 else
24679   ac_cpp_err=yes
24680 fi
24681 if test -z "$ac_cpp_err"; then
24682   :
24683 else
24684   echo "$as_me: failed program was:" >&5
24685   cat "conftest.$ac_ext" >&5
24686   # Broken: fails on valid input.
24687 continue
24688 fi
24689 rm -f conftest.err "conftest.$ac_ext"
24690
24691   # OK, works on sane cases.  Now check whether non-existent headers
24692   # can be detected and how.
24693   cat >"conftest.$ac_ext" <<_ACEOF
24694 #line 24694 "configure"
24695 #include "confdefs.h"
24696 #include <ac_nonexistent.h>
24697 _ACEOF
24698 if { (eval echo "$as_me:24698: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24699   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24700   ac_status=$?
24701   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24702   rm -f conftest.er1
24703   cat conftest.err >&5
24704   echo "$as_me:24704: \$? = $ac_status" >&5
24705   (exit "$ac_status"); } >/dev/null; then
24706   if test -s conftest.err; then
24707     ac_cpp_err=$ac_cxx_preproc_warn_flag
24708   else
24709     ac_cpp_err=
24710   fi
24711 else
24712   ac_cpp_err=yes
24713 fi
24714 if test -z "$ac_cpp_err"; then
24715   # Broken: success on invalid input.
24716 continue
24717 else
24718   echo "$as_me: failed program was:" >&5
24719   cat "conftest.$ac_ext" >&5
24720   # Passes both tests.
24721 ac_preproc_ok=:
24722 break
24723 fi
24724 rm -f conftest.err "conftest.$ac_ext"
24725
24726 done
24727 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24728 rm -f conftest.err "conftest.$ac_ext"
24729 if $ac_preproc_ok; then
24730   :
24731 else
24732   { { echo "$as_me:24732: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
24733 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
24734    { (exit 1); exit 1; }; }
24735 fi
24736
24737 ac_ext=cc
24738 ac_cpp='$CXXCPP $CPPFLAGS'
24739 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24740 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24741 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24742 ac_main_return="return"
24743
24744 for ac_header in typeinfo
24745 do
24746 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24747 echo "$as_me:24747: checking for $ac_header" >&5
24748 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24749 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24750   echo $ECHO_N "(cached) $ECHO_C" >&6
24751 else
24752   cat >"conftest.$ac_ext" <<_ACEOF
24753 #line 24753 "configure"
24754 #include "confdefs.h"
24755 #include <$ac_header>
24756 _ACEOF
24757 if { (eval echo "$as_me:24757: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24758   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24759   ac_status=$?
24760   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24761   rm -f conftest.er1
24762   cat conftest.err >&5
24763   echo "$as_me:24763: \$? = $ac_status" >&5
24764   (exit "$ac_status"); } >/dev/null; then
24765   if test -s conftest.err; then
24766     ac_cpp_err=$ac_cxx_preproc_warn_flag
24767   else
24768     ac_cpp_err=
24769   fi
24770 else
24771   ac_cpp_err=yes
24772 fi
24773 if test -z "$ac_cpp_err"; then
24774   eval "$as_ac_Header=yes"
24775 else
24776   echo "$as_me: failed program was:" >&5
24777   cat "conftest.$ac_ext" >&5
24778   eval "$as_ac_Header=no"
24779 fi
24780 rm -f conftest.err "conftest.$ac_ext"
24781 fi
24782 echo "$as_me:24782: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24783 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24784 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24785   cat >>confdefs.h <<EOF
24786 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24787 EOF
24788
24789 fi
24790 done
24791
24792 for ac_header in iostream
24793 do
24794 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24795 echo "$as_me:24795: checking for $ac_header" >&5
24796 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24797 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24798   echo $ECHO_N "(cached) $ECHO_C" >&6
24799 else
24800   cat >"conftest.$ac_ext" <<_ACEOF
24801 #line 24801 "configure"
24802 #include "confdefs.h"
24803 #include <$ac_header>
24804 _ACEOF
24805 if { (eval echo "$as_me:24805: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24806   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24807   ac_status=$?
24808   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24809   rm -f conftest.er1
24810   cat conftest.err >&5
24811   echo "$as_me:24811: \$? = $ac_status" >&5
24812   (exit "$ac_status"); } >/dev/null; then
24813   if test -s conftest.err; then
24814     ac_cpp_err=$ac_cxx_preproc_warn_flag
24815   else
24816     ac_cpp_err=
24817   fi
24818 else
24819   ac_cpp_err=yes
24820 fi
24821 if test -z "$ac_cpp_err"; then
24822   eval "$as_ac_Header=yes"
24823 else
24824   echo "$as_me: failed program was:" >&5
24825   cat "conftest.$ac_ext" >&5
24826   eval "$as_ac_Header=no"
24827 fi
24828 rm -f conftest.err "conftest.$ac_ext"
24829 fi
24830 echo "$as_me:24830: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24831 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24832 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24833   cat >>confdefs.h <<EOF
24834 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24835 EOF
24836
24837 fi
24838 done
24839
24840 if test x"$ac_cv_header_iostream" = xyes ; then
24841         echo "$as_me:24841: checking if iostream uses std-namespace" >&5
24842 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
24843         cat >"conftest.$ac_ext" <<_ACEOF
24844 #line 24844 "configure"
24845 #include "confdefs.h"
24846
24847 #include <iostream>
24848 using std::endl;
24849 using std::cerr;
24850 int
24851 main (void)
24852 {
24853
24854 cerr << "testing" << endl;
24855
24856   ;
24857   return 0;
24858 }
24859 _ACEOF
24860 rm -f "conftest.$ac_objext"
24861 if { (eval echo "$as_me:24861: \"$ac_compile\"") >&5
24862   (eval $ac_compile) 2>&5
24863   ac_status=$?
24864   echo "$as_me:24864: \$? = $ac_status" >&5
24865   (exit "$ac_status"); } &&
24866          { ac_try='test -s "conftest.$ac_objext"'
24867   { (eval echo "$as_me:24867: \"$ac_try\"") >&5
24868   (eval $ac_try) 2>&5
24869   ac_status=$?
24870   echo "$as_me:24870: \$? = $ac_status" >&5
24871   (exit "$ac_status"); }; }; then
24872   cf_iostream_namespace=yes
24873 else
24874   echo "$as_me: failed program was:" >&5
24875 cat "conftest.$ac_ext" >&5
24876 cf_iostream_namespace=no
24877 fi
24878 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24879         echo "$as_me:24879: result: $cf_iostream_namespace" >&5
24880 echo "${ECHO_T}$cf_iostream_namespace" >&6
24881         if test "$cf_iostream_namespace" = yes ; then
24882
24883 cat >>confdefs.h <<\EOF
24884 #define IOSTREAM_NAMESPACE 1
24885 EOF
24886
24887         fi
24888 fi
24889
24890 echo "$as_me:24890: checking if we should include stdbool.h" >&5
24891 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24892
24893 if test "${cf_cv_header_stdbool_h+set}" = set; then
24894   echo $ECHO_N "(cached) $ECHO_C" >&6
24895 else
24896
24897         cat >"conftest.$ac_ext" <<_ACEOF
24898 #line 24898 "configure"
24899 #include "confdefs.h"
24900
24901 int
24902 main (void)
24903 {
24904 bool foo = false
24905   ;
24906   return 0;
24907 }
24908 _ACEOF
24909 rm -f "conftest.$ac_objext"
24910 if { (eval echo "$as_me:24910: \"$ac_compile\"") >&5
24911   (eval $ac_compile) 2>&5
24912   ac_status=$?
24913   echo "$as_me:24913: \$? = $ac_status" >&5
24914   (exit "$ac_status"); } &&
24915          { ac_try='test -s "conftest.$ac_objext"'
24916   { (eval echo "$as_me:24916: \"$ac_try\"") >&5
24917   (eval $ac_try) 2>&5
24918   ac_status=$?
24919   echo "$as_me:24919: \$? = $ac_status" >&5
24920   (exit "$ac_status"); }; }; then
24921   cf_cv_header_stdbool_h=0
24922 else
24923   echo "$as_me: failed program was:" >&5
24924 cat "conftest.$ac_ext" >&5
24925 cat >"conftest.$ac_ext" <<_ACEOF
24926 #line 24926 "configure"
24927 #include "confdefs.h"
24928
24929 #ifndef __BEOS__
24930 #include <stdbool.h>
24931 #endif
24932
24933 int
24934 main (void)
24935 {
24936 bool foo = false
24937   ;
24938   return 0;
24939 }
24940 _ACEOF
24941 rm -f "conftest.$ac_objext"
24942 if { (eval echo "$as_me:24942: \"$ac_compile\"") >&5
24943   (eval $ac_compile) 2>&5
24944   ac_status=$?
24945   echo "$as_me:24945: \$? = $ac_status" >&5
24946   (exit "$ac_status"); } &&
24947          { ac_try='test -s "conftest.$ac_objext"'
24948   { (eval echo "$as_me:24948: \"$ac_try\"") >&5
24949   (eval $ac_try) 2>&5
24950   ac_status=$?
24951   echo "$as_me:24951: \$? = $ac_status" >&5
24952   (exit "$ac_status"); }; }; then
24953   cf_cv_header_stdbool_h=1
24954 else
24955   echo "$as_me: failed program was:" >&5
24956 cat "conftest.$ac_ext" >&5
24957 cf_cv_header_stdbool_h=0
24958 fi
24959 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24960 fi
24961 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24962 fi
24963
24964 if test "$cf_cv_header_stdbool_h" = 1
24965 then    echo "$as_me:24965: result: yes" >&5
24966 echo "${ECHO_T}yes" >&6
24967 else    echo "$as_me:24967: result: no" >&5
24968 echo "${ECHO_T}no" >&6
24969 fi
24970
24971 echo "$as_me:24971: checking for builtin bool type" >&5
24972 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24973
24974 if test "${cf_cv_builtin_bool+set}" = set; then
24975   echo $ECHO_N "(cached) $ECHO_C" >&6
24976 else
24977
24978         cat >"conftest.$ac_ext" <<_ACEOF
24979 #line 24979 "configure"
24980 #include "confdefs.h"
24981
24982 #include <stdio.h>
24983 #include <sys/types.h>
24984
24985 int
24986 main (void)
24987 {
24988 bool x = false
24989   ;
24990   return 0;
24991 }
24992 _ACEOF
24993 rm -f "conftest.$ac_objext"
24994 if { (eval echo "$as_me:24994: \"$ac_compile\"") >&5
24995   (eval $ac_compile) 2>&5
24996   ac_status=$?
24997   echo "$as_me:24997: \$? = $ac_status" >&5
24998   (exit "$ac_status"); } &&
24999          { ac_try='test -s "conftest.$ac_objext"'
25000   { (eval echo "$as_me:25000: \"$ac_try\"") >&5
25001   (eval $ac_try) 2>&5
25002   ac_status=$?
25003   echo "$as_me:25003: \$? = $ac_status" >&5
25004   (exit "$ac_status"); }; }; then
25005   cf_cv_builtin_bool=1
25006 else
25007   echo "$as_me: failed program was:" >&5
25008 cat "conftest.$ac_ext" >&5
25009 cf_cv_builtin_bool=0
25010 fi
25011 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25012
25013 fi
25014
25015 if test "$cf_cv_builtin_bool" = 1
25016 then    echo "$as_me:25016: result: yes" >&5
25017 echo "${ECHO_T}yes" >&6
25018 else    echo "$as_me:25018: result: no" >&5
25019 echo "${ECHO_T}no" >&6
25020 fi
25021
25022 echo "$as_me:25022: checking for bool" >&5
25023 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25024 if test "${ac_cv_type_bool+set}" = set; then
25025   echo $ECHO_N "(cached) $ECHO_C" >&6
25026 else
25027   cat >"conftest.$ac_ext" <<_ACEOF
25028 #line 25028 "configure"
25029 #include "confdefs.h"
25030
25031 #include <stdlib.h>
25032 #include <stdio.h>
25033
25034 #if defined(__cplusplus)
25035
25036 #ifdef HAVE_GXX_BUILTIN_H
25037 #include <g++/builtin.h>
25038 #elif HAVE_GPP_BUILTIN_H
25039 #include <gpp/builtin.h>
25040 #elif HAVE_BUILTIN_H
25041 #include <builtin.h>
25042 #endif
25043
25044 #else
25045
25046 #if $cf_cv_header_stdbool_h
25047 #include <stdbool.h>
25048 #endif
25049
25050 #endif
25051
25052 int
25053 main (void)
25054 {
25055 if ((bool *) 0)
25056   return 0;
25057 if (sizeof (bool))
25058   return 0;
25059   ;
25060   return 0;
25061 }
25062 _ACEOF
25063 rm -f "conftest.$ac_objext"
25064 if { (eval echo "$as_me:25064: \"$ac_compile\"") >&5
25065   (eval $ac_compile) 2>&5
25066   ac_status=$?
25067   echo "$as_me:25067: \$? = $ac_status" >&5
25068   (exit "$ac_status"); } &&
25069          { ac_try='test -s "conftest.$ac_objext"'
25070   { (eval echo "$as_me:25070: \"$ac_try\"") >&5
25071   (eval $ac_try) 2>&5
25072   ac_status=$?
25073   echo "$as_me:25073: \$? = $ac_status" >&5
25074   (exit "$ac_status"); }; }; then
25075   ac_cv_type_bool=yes
25076 else
25077   echo "$as_me: failed program was:" >&5
25078 cat "conftest.$ac_ext" >&5
25079 ac_cv_type_bool=no
25080 fi
25081 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25082 fi
25083 echo "$as_me:25083: result: $ac_cv_type_bool" >&5
25084 echo "${ECHO_T}$ac_cv_type_bool" >&6
25085
25086 echo "$as_me:25086: checking size of bool" >&5
25087 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25088 if test "${ac_cv_sizeof_bool+set}" = set; then
25089   echo $ECHO_N "(cached) $ECHO_C" >&6
25090 else
25091   if test "$ac_cv_type_bool" = yes; then
25092   if test "$cross_compiling" = yes; then
25093   # Depending upon the size, compute the lo and hi bounds.
25094 cat >"conftest.$ac_ext" <<_ACEOF
25095 #line 25095 "configure"
25096 #include "confdefs.h"
25097
25098 #include <stdlib.h>
25099 #include <stdio.h>
25100
25101 #if defined(__cplusplus)
25102
25103 #ifdef HAVE_GXX_BUILTIN_H
25104 #include <g++/builtin.h>
25105 #elif HAVE_GPP_BUILTIN_H
25106 #include <gpp/builtin.h>
25107 #elif HAVE_BUILTIN_H
25108 #include <builtin.h>
25109 #endif
25110
25111 #else
25112
25113 #if $cf_cv_header_stdbool_h
25114 #include <stdbool.h>
25115 #endif
25116
25117 #endif
25118
25119 int
25120 main (void)
25121 {
25122 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25123   ;
25124   return 0;
25125 }
25126 _ACEOF
25127 rm -f "conftest.$ac_objext"
25128 if { (eval echo "$as_me:25128: \"$ac_compile\"") >&5
25129   (eval $ac_compile) 2>&5
25130   ac_status=$?
25131   echo "$as_me:25131: \$? = $ac_status" >&5
25132   (exit "$ac_status"); } &&
25133          { ac_try='test -s "conftest.$ac_objext"'
25134   { (eval echo "$as_me:25134: \"$ac_try\"") >&5
25135   (eval $ac_try) 2>&5
25136   ac_status=$?
25137   echo "$as_me:25137: \$? = $ac_status" >&5
25138   (exit "$ac_status"); }; }; then
25139   ac_lo=0 ac_mid=0
25140   while :; do
25141     cat >"conftest.$ac_ext" <<_ACEOF
25142 #line 25142 "configure"
25143 #include "confdefs.h"
25144
25145 #include <stdlib.h>
25146 #include <stdio.h>
25147
25148 #if defined(__cplusplus)
25149
25150 #ifdef HAVE_GXX_BUILTIN_H
25151 #include <g++/builtin.h>
25152 #elif HAVE_GPP_BUILTIN_H
25153 #include <gpp/builtin.h>
25154 #elif HAVE_BUILTIN_H
25155 #include <builtin.h>
25156 #endif
25157
25158 #else
25159
25160 #if $cf_cv_header_stdbool_h
25161 #include <stdbool.h>
25162 #endif
25163
25164 #endif
25165
25166 int
25167 main (void)
25168 {
25169 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25170   ;
25171   return 0;
25172 }
25173 _ACEOF
25174 rm -f "conftest.$ac_objext"
25175 if { (eval echo "$as_me:25175: \"$ac_compile\"") >&5
25176   (eval $ac_compile) 2>&5
25177   ac_status=$?
25178   echo "$as_me:25178: \$? = $ac_status" >&5
25179   (exit "$ac_status"); } &&
25180          { ac_try='test -s "conftest.$ac_objext"'
25181   { (eval echo "$as_me:25181: \"$ac_try\"") >&5
25182   (eval $ac_try) 2>&5
25183   ac_status=$?
25184   echo "$as_me:25184: \$? = $ac_status" >&5
25185   (exit "$ac_status"); }; }; then
25186   ac_hi=$ac_mid; break
25187 else
25188   echo "$as_me: failed program was:" >&5
25189 cat "conftest.$ac_ext" >&5
25190 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25191 fi
25192 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25193   done
25194 else
25195   echo "$as_me: failed program was:" >&5
25196 cat "conftest.$ac_ext" >&5
25197 ac_hi=-1 ac_mid=-1
25198   while :; do
25199     cat >"conftest.$ac_ext" <<_ACEOF
25200 #line 25200 "configure"
25201 #include "confdefs.h"
25202
25203 #include <stdlib.h>
25204 #include <stdio.h>
25205
25206 #if defined(__cplusplus)
25207
25208 #ifdef HAVE_GXX_BUILTIN_H
25209 #include <g++/builtin.h>
25210 #elif HAVE_GPP_BUILTIN_H
25211 #include <gpp/builtin.h>
25212 #elif HAVE_BUILTIN_H
25213 #include <builtin.h>
25214 #endif
25215
25216 #else
25217
25218 #if $cf_cv_header_stdbool_h
25219 #include <stdbool.h>
25220 #endif
25221
25222 #endif
25223
25224 int
25225 main (void)
25226 {
25227 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25228   ;
25229   return 0;
25230 }
25231 _ACEOF
25232 rm -f "conftest.$ac_objext"
25233 if { (eval echo "$as_me:25233: \"$ac_compile\"") >&5
25234   (eval $ac_compile) 2>&5
25235   ac_status=$?
25236   echo "$as_me:25236: \$? = $ac_status" >&5
25237   (exit "$ac_status"); } &&
25238          { ac_try='test -s "conftest.$ac_objext"'
25239   { (eval echo "$as_me:25239: \"$ac_try\"") >&5
25240   (eval $ac_try) 2>&5
25241   ac_status=$?
25242   echo "$as_me:25242: \$? = $ac_status" >&5
25243   (exit "$ac_status"); }; }; then
25244   ac_lo=$ac_mid; break
25245 else
25246   echo "$as_me: failed program was:" >&5
25247 cat "conftest.$ac_ext" >&5
25248 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25249 fi
25250 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25251   done
25252 fi
25253 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25254 # Binary search between lo and hi bounds.
25255 while test "x$ac_lo" != "x$ac_hi"; do
25256   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25257   cat >"conftest.$ac_ext" <<_ACEOF
25258 #line 25258 "configure"
25259 #include "confdefs.h"
25260
25261 #include <stdlib.h>
25262 #include <stdio.h>
25263
25264 #if defined(__cplusplus)
25265
25266 #ifdef HAVE_GXX_BUILTIN_H
25267 #include <g++/builtin.h>
25268 #elif HAVE_GPP_BUILTIN_H
25269 #include <gpp/builtin.h>
25270 #elif HAVE_BUILTIN_H
25271 #include <builtin.h>
25272 #endif
25273
25274 #else
25275
25276 #if $cf_cv_header_stdbool_h
25277 #include <stdbool.h>
25278 #endif
25279
25280 #endif
25281
25282 int
25283 main (void)
25284 {
25285 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25286   ;
25287   return 0;
25288 }
25289 _ACEOF
25290 rm -f "conftest.$ac_objext"
25291 if { (eval echo "$as_me:25291: \"$ac_compile\"") >&5
25292   (eval $ac_compile) 2>&5
25293   ac_status=$?
25294   echo "$as_me:25294: \$? = $ac_status" >&5
25295   (exit "$ac_status"); } &&
25296          { ac_try='test -s "conftest.$ac_objext"'
25297   { (eval echo "$as_me:25297: \"$ac_try\"") >&5
25298   (eval $ac_try) 2>&5
25299   ac_status=$?
25300   echo "$as_me:25300: \$? = $ac_status" >&5
25301   (exit "$ac_status"); }; }; then
25302   ac_hi=$ac_mid
25303 else
25304   echo "$as_me: failed program was:" >&5
25305 cat "conftest.$ac_ext" >&5
25306 ac_lo=`expr "$ac_mid" + 1`
25307 fi
25308 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25309 done
25310 ac_cv_sizeof_bool=$ac_lo
25311 else
25312   if test "$cross_compiling" = yes; then
25313   { { echo "$as_me:25313: error: cannot run test program while cross compiling" >&5
25314 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25315    { (exit 1); exit 1; }; }
25316 else
25317   cat >"conftest.$ac_ext" <<_ACEOF
25318 #line 25318 "configure"
25319 #include "confdefs.h"
25320
25321 #include <stdlib.h>
25322 #include <stdio.h>
25323
25324 #if defined(__cplusplus)
25325
25326 #ifdef HAVE_GXX_BUILTIN_H
25327 #include <g++/builtin.h>
25328 #elif HAVE_GPP_BUILTIN_H
25329 #include <gpp/builtin.h>
25330 #elif HAVE_BUILTIN_H
25331 #include <builtin.h>
25332 #endif
25333
25334 #else
25335
25336 #if $cf_cv_header_stdbool_h
25337 #include <stdbool.h>
25338 #endif
25339
25340 #endif
25341
25342 int
25343 main (void)
25344 {
25345 FILE *f = fopen ("conftest.val", "w");
25346 if (!f)
25347   $ac_main_return (1);
25348 fprintf (f, "%d", (sizeof (bool)));
25349 fclose (f);
25350   ;
25351   return 0;
25352 }
25353 _ACEOF
25354 rm -f "conftest$ac_exeext"
25355 if { (eval echo "$as_me:25355: \"$ac_link\"") >&5
25356   (eval $ac_link) 2>&5
25357   ac_status=$?
25358   echo "$as_me:25358: \$? = $ac_status" >&5
25359   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25360   { (eval echo "$as_me:25360: \"$ac_try\"") >&5
25361   (eval $ac_try) 2>&5
25362   ac_status=$?
25363   echo "$as_me:25363: \$? = $ac_status" >&5
25364   (exit "$ac_status"); }; }; then
25365   ac_cv_sizeof_bool=`cat conftest.val`
25366 else
25367   echo "$as_me: program exited with status $ac_status" >&5
25368 echo "$as_me: failed program was:" >&5
25369 cat "conftest.$ac_ext" >&5
25370 fi
25371 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25372 fi
25373 fi
25374 rm -f conftest.val
25375 else
25376   ac_cv_sizeof_bool=0
25377 fi
25378 fi
25379 echo "$as_me:25379: result: $ac_cv_sizeof_bool" >&5
25380 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25381 cat >>confdefs.h <<EOF
25382 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25383 EOF
25384
25385 echo "$as_me:25385: checking for type of bool" >&5
25386 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25387 if test "${cf_cv_type_of_bool+set}" = set; then
25388   echo $ECHO_N "(cached) $ECHO_C" >&6
25389 else
25390
25391         rm -f cf_test.out
25392         if test "$cross_compiling" = yes; then
25393
25394                 case x$ac_cv_sizeof_bool in
25395                 (x1) cf_cv_type_of_bool="unsigned char";;
25396                 (x2) cf_cv_type_of_bool="unsigned short";;
25397                 (x4) cf_cv_type_of_bool="unsigned int";;
25398                 (x8) cf_cv_type_of_bool="unsigned long";;
25399                 (*)  cf_cv_type_of_bool=unknown;;
25400                 esac
25401
25402 else
25403   cat >"conftest.$ac_ext" <<_ACEOF
25404 #line 25404 "configure"
25405 #include "confdefs.h"
25406
25407 #include <stdlib.h>
25408 #include <stdio.h>
25409
25410 #if defined(__cplusplus)
25411
25412 #ifdef HAVE_GXX_BUILTIN_H
25413 #include <g++/builtin.h>
25414 #elif HAVE_GPP_BUILTIN_H
25415 #include <gpp/builtin.h>
25416 #elif HAVE_BUILTIN_H
25417 #include <builtin.h>
25418 #endif
25419
25420 #else
25421
25422 #if $cf_cv_header_stdbool_h
25423 #include <stdbool.h>
25424 #endif
25425
25426 #endif
25427
25428 int main(void)
25429 {
25430         FILE *fp = fopen("cf_test.out", "w");
25431         if (fp != 0) {
25432                 bool x = true;
25433                 if ((bool)(-x) >= 0)
25434                         fputs("unsigned ", fp);
25435                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25436                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25437                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25438                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25439                 fclose(fp);
25440         }
25441         ${cf_cv_main_return:-return}(0);
25442 }
25443
25444 _ACEOF
25445 rm -f "conftest$ac_exeext"
25446 if { (eval echo "$as_me:25446: \"$ac_link\"") >&5
25447   (eval $ac_link) 2>&5
25448   ac_status=$?
25449   echo "$as_me:25449: \$? = $ac_status" >&5
25450   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25451   { (eval echo "$as_me:25451: \"$ac_try\"") >&5
25452   (eval $ac_try) 2>&5
25453   ac_status=$?
25454   echo "$as_me:25454: \$? = $ac_status" >&5
25455   (exit "$ac_status"); }; }; then
25456   cf_cv_type_of_bool=`cat cf_test.out`
25457                  if test -z "$cf_cv_type_of_bool"; then
25458                    cf_cv_type_of_bool=unknown
25459                  fi
25460 else
25461   echo "$as_me: program exited with status $ac_status" >&5
25462 echo "$as_me: failed program was:" >&5
25463 cat "conftest.$ac_ext" >&5
25464 cf_cv_type_of_bool=unknown
25465 fi
25466 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25467 fi
25468         rm -f cf_test.out
25469
25470 fi
25471 echo "$as_me:25471: result: $cf_cv_type_of_bool" >&5
25472 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25473
25474 if test "$cf_cv_type_of_bool" = unknown ; then
25475         case .$NCURSES_BOOL in
25476         (.auto|.) NCURSES_BOOL=unsigned;;
25477         esac
25478         { echo "$as_me:25478: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25479 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25480         cf_cv_type_of_bool=$NCURSES_BOOL
25481 fi
25482
25483 echo "$as_me:25483: checking for special defines needed for etip.h" >&5
25484 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25485 cf_save_CXXFLAGS="$CXXFLAGS"
25486 cf_result="none"
25487
25488 # etip.h includes ncurses.h which includes ncurses_dll.h
25489 # But ncurses_dll.h is generated - fix here.
25490 test -d include || mkdir include
25491 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
25492
25493 for cf_math in "" MATH_H
25494 do
25495 for cf_excp in "" MATH_EXCEPTION
25496 do
25497         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25498         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25499         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25500 cat >"conftest.$ac_ext" <<_ACEOF
25501 #line 25501 "configure"
25502 #include "confdefs.h"
25503
25504 #include <etip.h.in>
25505
25506 int
25507 main (void)
25508 {
25509
25510   ;
25511   return 0;
25512 }
25513 _ACEOF
25514 rm -f "conftest.$ac_objext"
25515 if { (eval echo "$as_me:25515: \"$ac_compile\"") >&5
25516   (eval $ac_compile) 2>&5
25517   ac_status=$?
25518   echo "$as_me:25518: \$? = $ac_status" >&5
25519   (exit "$ac_status"); } &&
25520          { ac_try='test -s "conftest.$ac_objext"'
25521   { (eval echo "$as_me:25521: \"$ac_try\"") >&5
25522   (eval $ac_try) 2>&5
25523   ac_status=$?
25524   echo "$as_me:25524: \$? = $ac_status" >&5
25525   (exit "$ac_status"); }; }; then
25526
25527         test -n "$cf_math" && cat >>confdefs.h <<EOF
25528 #define ETIP_NEEDS_${cf_math} 1
25529 EOF
25530
25531         test -n "$cf_excp" && cat >>confdefs.h <<EOF
25532 #define ETIP_NEEDS_${cf_excp} 1
25533 EOF
25534
25535         cf_result="$cf_math $cf_excp"
25536         break 2
25537
25538 else
25539   echo "$as_me: failed program was:" >&5
25540 cat "conftest.$ac_ext" >&5
25541 fi
25542 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25543 done
25544 done
25545 echo "$as_me:25545: result: $cf_result" >&5
25546 echo "${ECHO_T}$cf_result" >&6
25547 CXXFLAGS="$cf_save_CXXFLAGS"
25548
25549 if test -n "$CXX"; then
25550 echo "$as_me:25550: checking if $CXX accepts parameter initialization" >&5
25551 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
25552 if test "${cf_cv_cpp_param_init+set}" = set; then
25553   echo $ECHO_N "(cached) $ECHO_C" >&6
25554 else
25555
25556         ac_ext=cc
25557 ac_cpp='$CXXCPP $CPPFLAGS'
25558 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25559 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25560 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25561 ac_main_return="return"
25562
25563         if test "$cross_compiling" = yes; then
25564   cf_cv_cpp_param_init=unknown
25565 else
25566   cat >"conftest.$ac_ext" <<_ACEOF
25567 #line 25567 "configure"
25568 #include "confdefs.h"
25569
25570 class TEST {
25571 private:
25572         int value;
25573 public:
25574         TEST(int x = 1);
25575         ~TEST();
25576 };
25577
25578 TEST::TEST(int x = 1)   // some compilers do not like second initializer
25579 {
25580         value = x;
25581 }
25582 int main(void) { }
25583
25584 _ACEOF
25585 rm -f "conftest$ac_exeext"
25586 if { (eval echo "$as_me:25586: \"$ac_link\"") >&5
25587   (eval $ac_link) 2>&5
25588   ac_status=$?
25589   echo "$as_me:25589: \$? = $ac_status" >&5
25590   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25591   { (eval echo "$as_me:25591: \"$ac_try\"") >&5
25592   (eval $ac_try) 2>&5
25593   ac_status=$?
25594   echo "$as_me:25594: \$? = $ac_status" >&5
25595   (exit "$ac_status"); }; }; then
25596   cf_cv_cpp_param_init=yes
25597 else
25598   echo "$as_me: program exited with status $ac_status" >&5
25599 echo "$as_me: failed program was:" >&5
25600 cat "conftest.$ac_ext" >&5
25601 cf_cv_cpp_param_init=no
25602 fi
25603 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25604 fi
25605         ac_ext=cc
25606 ac_cpp='$CXXCPP $CPPFLAGS'
25607 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25608 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25609 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25610 ac_main_return="return"
25611
25612 fi
25613 echo "$as_me:25613: result: $cf_cv_cpp_param_init" >&5
25614 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
25615 fi
25616 test "$cf_cv_cpp_param_init" = yes &&
25617 cat >>confdefs.h <<\EOF
25618 #define CPP_HAS_PARAM_INIT 1
25619 EOF
25620
25621 if test -n "$CXX"; then
25622
25623 echo "$as_me:25623: checking if $CXX accepts static_cast" >&5
25624 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
25625 if test "${cf_cv_cpp_static_cast+set}" = set; then
25626   echo $ECHO_N "(cached) $ECHO_C" >&6
25627 else
25628
25629         ac_ext=cc
25630 ac_cpp='$CXXCPP $CPPFLAGS'
25631 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25632 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25633 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25634 ac_main_return="return"
25635
25636         cat >"conftest.$ac_ext" <<_ACEOF
25637 #line 25637 "configure"
25638 #include "confdefs.h"
25639
25640 class NCursesPanel
25641 {
25642 public:
25643   NCursesPanel(int nlines,
25644                int ncols,
25645                int begin_y = 0,
25646                int begin_x = 0)
25647   {
25648   }
25649   NCursesPanel();
25650   ~NCursesPanel();
25651 };
25652
25653 template<class T> class NCursesUserPanel : public NCursesPanel
25654 {
25655 public:
25656   NCursesUserPanel (int nlines,
25657                     int ncols,
25658                     int begin_y = 0,
25659                     int begin_x = 0,
25660                     const T* p_UserData = static_cast<T*>(0))
25661     : NCursesPanel (nlines, ncols, begin_y, begin_x)
25662   {
25663   };
25664   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
25665   {
25666   };
25667
25668   virtual ~NCursesUserPanel() {};
25669 };
25670
25671 int
25672 main (void)
25673 {
25674
25675         const char* p_UserData = static_cast<char*>(0)
25676   ;
25677   return 0;
25678 }
25679 _ACEOF
25680 rm -f "conftest.$ac_objext"
25681 if { (eval echo "$as_me:25681: \"$ac_compile\"") >&5
25682   (eval $ac_compile) 2>&5
25683   ac_status=$?
25684   echo "$as_me:25684: \$? = $ac_status" >&5
25685   (exit "$ac_status"); } &&
25686          { ac_try='test -s "conftest.$ac_objext"'
25687   { (eval echo "$as_me:25687: \"$ac_try\"") >&5
25688   (eval $ac_try) 2>&5
25689   ac_status=$?
25690   echo "$as_me:25690: \$? = $ac_status" >&5
25691   (exit "$ac_status"); }; }; then
25692   cf_cv_cpp_static_cast=yes
25693 else
25694   echo "$as_me: failed program was:" >&5
25695 cat "conftest.$ac_ext" >&5
25696 cf_cv_cpp_static_cast=no
25697 fi
25698 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25699
25700         ac_ext=cc
25701 ac_cpp='$CXXCPP $CPPFLAGS'
25702 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25703 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25704 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25705 ac_main_return="return"
25706
25707 fi
25708 echo "$as_me:25708: result: $cf_cv_cpp_static_cast" >&5
25709 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
25710
25711 fi
25712
25713 test "$cf_cv_cpp_static_cast" = yes &&
25714 cat >>confdefs.h <<\EOF
25715 #define CPP_HAS_STATIC_CAST 1
25716 EOF
25717
25718         CXX_AR='$(AR)'
25719         CXX_ARFLAGS='$(ARFLAGS)'
25720         case "$cf_cv_system_name" in
25721         (irix*)
25722             if test "$GXX" != yes ; then
25723                 CXX_AR='$(CXX)'
25724                 CXX_ARFLAGS='-ar -o'
25725             fi
25726             ;;
25727         (sco3.2v5*)
25728             CXXLDFLAGS="-u main"
25729             ;;
25730         (solaris2*)
25731             if test "$GXX" != yes ; then
25732                 CXX_AR='$(CXX)'
25733                 CXX_ARFLAGS='-xar -o'
25734             fi
25735             ;;
25736         esac
25737
25738 else
25739         cf_cxx_library=no
25740         cf_cv_builtin_bool=1
25741
25742         # Just because we are not configuring against C++ right now does not
25743         # mean that a user will not want to use C++.  Some distributors disable
25744         # the C++ portion of this configuration as a shortcut (or just to avoid
25745         # compiling the demo in the c++ directory).  So we need a reasonable
25746         # default for the 'bool' type.
25747         #
25748         # Caveat: since the storage of the bool type is not standardized, it
25749         # may change.
25750
25751         if test "$NCURSES_BOOL" != auto ; then
25752                 cf_cv_type_of_bool=$NCURSES_BOOL
25753                 cf_cv_header_stdbool_h=0
25754         else
25755                 if test "$cf_cv_header_stdbool_h" = 1 ; then
25756
25757 echo "$as_me:25757: checking for bool" >&5
25758 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25759 if test "${ac_cv_type_bool+set}" = set; then
25760   echo $ECHO_N "(cached) $ECHO_C" >&6
25761 else
25762   cat >"conftest.$ac_ext" <<_ACEOF
25763 #line 25763 "configure"
25764 #include "confdefs.h"
25765
25766 #include <stdlib.h>
25767 #include <stdio.h>
25768
25769 #if defined(__cplusplus)
25770
25771 #ifdef HAVE_GXX_BUILTIN_H
25772 #include <g++/builtin.h>
25773 #elif HAVE_GPP_BUILTIN_H
25774 #include <gpp/builtin.h>
25775 #elif HAVE_BUILTIN_H
25776 #include <builtin.h>
25777 #endif
25778
25779 #else
25780
25781 #if $cf_cv_header_stdbool_h
25782 #include <stdbool.h>
25783 #endif
25784
25785 #endif
25786
25787 int
25788 main (void)
25789 {
25790 if ((bool *) 0)
25791   return 0;
25792 if (sizeof (bool))
25793   return 0;
25794   ;
25795   return 0;
25796 }
25797 _ACEOF
25798 rm -f "conftest.$ac_objext"
25799 if { (eval echo "$as_me:25799: \"$ac_compile\"") >&5
25800   (eval $ac_compile) 2>&5
25801   ac_status=$?
25802   echo "$as_me:25802: \$? = $ac_status" >&5
25803   (exit "$ac_status"); } &&
25804          { ac_try='test -s "conftest.$ac_objext"'
25805   { (eval echo "$as_me:25805: \"$ac_try\"") >&5
25806   (eval $ac_try) 2>&5
25807   ac_status=$?
25808   echo "$as_me:25808: \$? = $ac_status" >&5
25809   (exit "$ac_status"); }; }; then
25810   ac_cv_type_bool=yes
25811 else
25812   echo "$as_me: failed program was:" >&5
25813 cat "conftest.$ac_ext" >&5
25814 ac_cv_type_bool=no
25815 fi
25816 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25817 fi
25818 echo "$as_me:25818: result: $ac_cv_type_bool" >&5
25819 echo "${ECHO_T}$ac_cv_type_bool" >&6
25820
25821 echo "$as_me:25821: checking size of bool" >&5
25822 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25823 if test "${ac_cv_sizeof_bool+set}" = set; then
25824   echo $ECHO_N "(cached) $ECHO_C" >&6
25825 else
25826   if test "$ac_cv_type_bool" = yes; then
25827   if test "$cross_compiling" = yes; then
25828   # Depending upon the size, compute the lo and hi bounds.
25829 cat >"conftest.$ac_ext" <<_ACEOF
25830 #line 25830 "configure"
25831 #include "confdefs.h"
25832
25833 #include <stdlib.h>
25834 #include <stdio.h>
25835
25836 #if defined(__cplusplus)
25837
25838 #ifdef HAVE_GXX_BUILTIN_H
25839 #include <g++/builtin.h>
25840 #elif HAVE_GPP_BUILTIN_H
25841 #include <gpp/builtin.h>
25842 #elif HAVE_BUILTIN_H
25843 #include <builtin.h>
25844 #endif
25845
25846 #else
25847
25848 #if $cf_cv_header_stdbool_h
25849 #include <stdbool.h>
25850 #endif
25851
25852 #endif
25853
25854 int
25855 main (void)
25856 {
25857 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25858   ;
25859   return 0;
25860 }
25861 _ACEOF
25862 rm -f "conftest.$ac_objext"
25863 if { (eval echo "$as_me:25863: \"$ac_compile\"") >&5
25864   (eval $ac_compile) 2>&5
25865   ac_status=$?
25866   echo "$as_me:25866: \$? = $ac_status" >&5
25867   (exit "$ac_status"); } &&
25868          { ac_try='test -s "conftest.$ac_objext"'
25869   { (eval echo "$as_me:25869: \"$ac_try\"") >&5
25870   (eval $ac_try) 2>&5
25871   ac_status=$?
25872   echo "$as_me:25872: \$? = $ac_status" >&5
25873   (exit "$ac_status"); }; }; then
25874   ac_lo=0 ac_mid=0
25875   while :; do
25876     cat >"conftest.$ac_ext" <<_ACEOF
25877 #line 25877 "configure"
25878 #include "confdefs.h"
25879
25880 #include <stdlib.h>
25881 #include <stdio.h>
25882
25883 #if defined(__cplusplus)
25884
25885 #ifdef HAVE_GXX_BUILTIN_H
25886 #include <g++/builtin.h>
25887 #elif HAVE_GPP_BUILTIN_H
25888 #include <gpp/builtin.h>
25889 #elif HAVE_BUILTIN_H
25890 #include <builtin.h>
25891 #endif
25892
25893 #else
25894
25895 #if $cf_cv_header_stdbool_h
25896 #include <stdbool.h>
25897 #endif
25898
25899 #endif
25900
25901 int
25902 main (void)
25903 {
25904 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25905   ;
25906   return 0;
25907 }
25908 _ACEOF
25909 rm -f "conftest.$ac_objext"
25910 if { (eval echo "$as_me:25910: \"$ac_compile\"") >&5
25911   (eval $ac_compile) 2>&5
25912   ac_status=$?
25913   echo "$as_me:25913: \$? = $ac_status" >&5
25914   (exit "$ac_status"); } &&
25915          { ac_try='test -s "conftest.$ac_objext"'
25916   { (eval echo "$as_me:25916: \"$ac_try\"") >&5
25917   (eval $ac_try) 2>&5
25918   ac_status=$?
25919   echo "$as_me:25919: \$? = $ac_status" >&5
25920   (exit "$ac_status"); }; }; then
25921   ac_hi=$ac_mid; break
25922 else
25923   echo "$as_me: failed program was:" >&5
25924 cat "conftest.$ac_ext" >&5
25925 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25926 fi
25927 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25928   done
25929 else
25930   echo "$as_me: failed program was:" >&5
25931 cat "conftest.$ac_ext" >&5
25932 ac_hi=-1 ac_mid=-1
25933   while :; do
25934     cat >"conftest.$ac_ext" <<_ACEOF
25935 #line 25935 "configure"
25936 #include "confdefs.h"
25937
25938 #include <stdlib.h>
25939 #include <stdio.h>
25940
25941 #if defined(__cplusplus)
25942
25943 #ifdef HAVE_GXX_BUILTIN_H
25944 #include <g++/builtin.h>
25945 #elif HAVE_GPP_BUILTIN_H
25946 #include <gpp/builtin.h>
25947 #elif HAVE_BUILTIN_H
25948 #include <builtin.h>
25949 #endif
25950
25951 #else
25952
25953 #if $cf_cv_header_stdbool_h
25954 #include <stdbool.h>
25955 #endif
25956
25957 #endif
25958
25959 int
25960 main (void)
25961 {
25962 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25963   ;
25964   return 0;
25965 }
25966 _ACEOF
25967 rm -f "conftest.$ac_objext"
25968 if { (eval echo "$as_me:25968: \"$ac_compile\"") >&5
25969   (eval $ac_compile) 2>&5
25970   ac_status=$?
25971   echo "$as_me:25971: \$? = $ac_status" >&5
25972   (exit "$ac_status"); } &&
25973          { ac_try='test -s "conftest.$ac_objext"'
25974   { (eval echo "$as_me:25974: \"$ac_try\"") >&5
25975   (eval $ac_try) 2>&5
25976   ac_status=$?
25977   echo "$as_me:25977: \$? = $ac_status" >&5
25978   (exit "$ac_status"); }; }; then
25979   ac_lo=$ac_mid; break
25980 else
25981   echo "$as_me: failed program was:" >&5
25982 cat "conftest.$ac_ext" >&5
25983 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25984 fi
25985 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25986   done
25987 fi
25988 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25989 # Binary search between lo and hi bounds.
25990 while test "x$ac_lo" != "x$ac_hi"; do
25991   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25992   cat >"conftest.$ac_ext" <<_ACEOF
25993 #line 25993 "configure"
25994 #include "confdefs.h"
25995
25996 #include <stdlib.h>
25997 #include <stdio.h>
25998
25999 #if defined(__cplusplus)
26000
26001 #ifdef HAVE_GXX_BUILTIN_H
26002 #include <g++/builtin.h>
26003 #elif HAVE_GPP_BUILTIN_H
26004 #include <gpp/builtin.h>
26005 #elif HAVE_BUILTIN_H
26006 #include <builtin.h>
26007 #endif
26008
26009 #else
26010
26011 #if $cf_cv_header_stdbool_h
26012 #include <stdbool.h>
26013 #endif
26014
26015 #endif
26016
26017 int
26018 main (void)
26019 {
26020 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26021   ;
26022   return 0;
26023 }
26024 _ACEOF
26025 rm -f "conftest.$ac_objext"
26026 if { (eval echo "$as_me:26026: \"$ac_compile\"") >&5
26027   (eval $ac_compile) 2>&5
26028   ac_status=$?
26029   echo "$as_me:26029: \$? = $ac_status" >&5
26030   (exit "$ac_status"); } &&
26031          { ac_try='test -s "conftest.$ac_objext"'
26032   { (eval echo "$as_me:26032: \"$ac_try\"") >&5
26033   (eval $ac_try) 2>&5
26034   ac_status=$?
26035   echo "$as_me:26035: \$? = $ac_status" >&5
26036   (exit "$ac_status"); }; }; then
26037   ac_hi=$ac_mid
26038 else
26039   echo "$as_me: failed program was:" >&5
26040 cat "conftest.$ac_ext" >&5
26041 ac_lo=`expr "$ac_mid" + 1`
26042 fi
26043 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26044 done
26045 ac_cv_sizeof_bool=$ac_lo
26046 else
26047   if test "$cross_compiling" = yes; then
26048   { { echo "$as_me:26048: error: cannot run test program while cross compiling" >&5
26049 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26050    { (exit 1); exit 1; }; }
26051 else
26052   cat >"conftest.$ac_ext" <<_ACEOF
26053 #line 26053 "configure"
26054 #include "confdefs.h"
26055
26056 #include <stdlib.h>
26057 #include <stdio.h>
26058
26059 #if defined(__cplusplus)
26060
26061 #ifdef HAVE_GXX_BUILTIN_H
26062 #include <g++/builtin.h>
26063 #elif HAVE_GPP_BUILTIN_H
26064 #include <gpp/builtin.h>
26065 #elif HAVE_BUILTIN_H
26066 #include <builtin.h>
26067 #endif
26068
26069 #else
26070
26071 #if $cf_cv_header_stdbool_h
26072 #include <stdbool.h>
26073 #endif
26074
26075 #endif
26076
26077 int
26078 main (void)
26079 {
26080 FILE *f = fopen ("conftest.val", "w");
26081 if (!f)
26082   $ac_main_return (1);
26083 fprintf (f, "%d", (sizeof (bool)));
26084 fclose (f);
26085   ;
26086   return 0;
26087 }
26088 _ACEOF
26089 rm -f "conftest$ac_exeext"
26090 if { (eval echo "$as_me:26090: \"$ac_link\"") >&5
26091   (eval $ac_link) 2>&5
26092   ac_status=$?
26093   echo "$as_me:26093: \$? = $ac_status" >&5
26094   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26095   { (eval echo "$as_me:26095: \"$ac_try\"") >&5
26096   (eval $ac_try) 2>&5
26097   ac_status=$?
26098   echo "$as_me:26098: \$? = $ac_status" >&5
26099   (exit "$ac_status"); }; }; then
26100   ac_cv_sizeof_bool=`cat conftest.val`
26101 else
26102   echo "$as_me: program exited with status $ac_status" >&5
26103 echo "$as_me: failed program was:" >&5
26104 cat "conftest.$ac_ext" >&5
26105 fi
26106 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26107 fi
26108 fi
26109 rm -f conftest.val
26110 else
26111   ac_cv_sizeof_bool=0
26112 fi
26113 fi
26114 echo "$as_me:26114: result: $ac_cv_sizeof_bool" >&5
26115 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26116 cat >>confdefs.h <<EOF
26117 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26118 EOF
26119
26120 echo "$as_me:26120: checking for type of bool" >&5
26121 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26122 if test "${cf_cv_type_of_bool+set}" = set; then
26123   echo $ECHO_N "(cached) $ECHO_C" >&6
26124 else
26125
26126         rm -f cf_test.out
26127         if test "$cross_compiling" = yes; then
26128
26129                 case x$ac_cv_sizeof_bool in
26130                 (x1) cf_cv_type_of_bool="unsigned char";;
26131                 (x2) cf_cv_type_of_bool="unsigned short";;
26132                 (x4) cf_cv_type_of_bool="unsigned int";;
26133                 (x8) cf_cv_type_of_bool="unsigned long";;
26134                 (*)  cf_cv_type_of_bool=unknown;;
26135                 esac
26136
26137 else
26138   cat >"conftest.$ac_ext" <<_ACEOF
26139 #line 26139 "configure"
26140 #include "confdefs.h"
26141
26142 #include <stdlib.h>
26143 #include <stdio.h>
26144
26145 #if defined(__cplusplus)
26146
26147 #ifdef HAVE_GXX_BUILTIN_H
26148 #include <g++/builtin.h>
26149 #elif HAVE_GPP_BUILTIN_H
26150 #include <gpp/builtin.h>
26151 #elif HAVE_BUILTIN_H
26152 #include <builtin.h>
26153 #endif
26154
26155 #else
26156
26157 #if $cf_cv_header_stdbool_h
26158 #include <stdbool.h>
26159 #endif
26160
26161 #endif
26162
26163 int main(void)
26164 {
26165         FILE *fp = fopen("cf_test.out", "w");
26166         if (fp != 0) {
26167                 bool x = true;
26168                 if ((bool)(-x) >= 0)
26169                         fputs("unsigned ", fp);
26170                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26171                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26172                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26173                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26174                 fclose(fp);
26175         }
26176         ${cf_cv_main_return:-return}(0);
26177 }
26178
26179 _ACEOF
26180 rm -f "conftest$ac_exeext"
26181 if { (eval echo "$as_me:26181: \"$ac_link\"") >&5
26182   (eval $ac_link) 2>&5
26183   ac_status=$?
26184   echo "$as_me:26184: \$? = $ac_status" >&5
26185   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26186   { (eval echo "$as_me:26186: \"$ac_try\"") >&5
26187   (eval $ac_try) 2>&5
26188   ac_status=$?
26189   echo "$as_me:26189: \$? = $ac_status" >&5
26190   (exit "$ac_status"); }; }; then
26191   cf_cv_type_of_bool=`cat cf_test.out`
26192                  if test -z "$cf_cv_type_of_bool"; then
26193                    cf_cv_type_of_bool=unknown
26194                  fi
26195 else
26196   echo "$as_me: program exited with status $ac_status" >&5
26197 echo "$as_me: failed program was:" >&5
26198 cat "conftest.$ac_ext" >&5
26199 cf_cv_type_of_bool=unknown
26200 fi
26201 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26202 fi
26203         rm -f cf_test.out
26204
26205 fi
26206 echo "$as_me:26206: result: $cf_cv_type_of_bool" >&5
26207 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26208
26209 if test "$cf_cv_type_of_bool" = unknown ; then
26210         case .$NCURSES_BOOL in
26211         (.auto|.) NCURSES_BOOL=unsigned;;
26212         esac
26213         { echo "$as_me:26213: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26214 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26215         cf_cv_type_of_bool=$NCURSES_BOOL
26216 fi
26217
26218                 else
26219                         echo "$as_me:26219: checking for fallback type of bool" >&5
26220 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26221                         case "$host_cpu" in
26222                         (i?86)  cf_cv_type_of_bool=char ;;
26223                         (*)     cf_cv_type_of_bool=int  ;;
26224                         esac
26225                         echo "$as_me:26225: result: $cf_cv_type_of_bool" >&5
26226 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26227                 fi
26228         fi
26229 fi
26230
26231 # If the C compiler did not declare bool, and we did not determine that the C++
26232 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26233 # ncurses library use the same type as C++ bool.  Note that this allows one to
26234 # specify the type of bool in a configure-script option and postpone
26235 # integration with the C++ compiler provided that the types are compatible.
26236 USE_CXX_BOOL=1
26237 if test "$cf_cv_cc_bool_type" = 1
26238 then
26239         # oops: C has a bool.  Unlikely, but C++ could differ.
26240         USE_CXX_BOOL=0
26241 elif test "$cf_cv_builtin_bool" = 0
26242 then
26243         # C++ has no bool
26244         USE_CXX_BOOL=0
26245 else
26246         # this is the normal case
26247         USE_CXX_BOOL='defined(__cplusplus)'
26248 fi
26249
26250 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26251
26252         if test "$cf_with_ada" != "no" ; then
26253                 if test "$with_libtool" != "no"; then
26254                         { echo "$as_me:26254: WARNING: libtool does not support Ada - disabling feature" >&5
26255 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26256                         cf_with_ada=no
26257                 fi
26258         fi
26259
26260         if test "$cf_with_ada" != "no" ; then
26261
26262 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26263 do
26264
26265 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26266
26267         unset ac_cv_path_cf_TEMP_gnat
26268         unset cf_TEMP_gnat
26269         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26270 set dummy $cf_prog_gnat; ac_word=$2
26271 echo "$as_me:26271: checking for $ac_word" >&5
26272 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26273 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26274   echo $ECHO_N "(cached) $ECHO_C" >&6
26275 else
26276   case $cf_TEMP_gnat in
26277   [\\/]* | ?:[\\/]*)
26278   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26279   ;;
26280   *)
26281   ac_save_IFS=$IFS; IFS=$ac_path_separator
26282 ac_dummy="$PATH"
26283 for ac_dir in $ac_dummy; do
26284   IFS=$ac_save_IFS
26285   test -z "$ac_dir" && ac_dir=.
26286   if $as_executable_p "$ac_dir/$ac_word"; then
26287    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26288    echo "$as_me:26288: found $ac_dir/$ac_word" >&5
26289    break
26290 fi
26291 done
26292
26293   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26294   ;;
26295 esac
26296 fi
26297 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26298
26299 if test -n "$cf_TEMP_gnat"; then
26300   echo "$as_me:26300: result: $cf_TEMP_gnat" >&5
26301 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26302 else
26303   echo "$as_me:26303: result: no" >&5
26304 echo "${ECHO_T}no" >&6
26305 fi
26306
26307         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
26308
26309         if test "x$cf_TEMP_gnat" != xno; then
26310                 unset cf_cv_gnat_version
26311                 unset cf_TEMP_gnat
26312
26313 echo "$as_me:26313: checking for $cf_prog_gnat version" >&5
26314 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26315 if test "${cf_cv_gnat_version+set}" = set; then
26316   echo $ECHO_N "(cached) $ECHO_C" >&6
26317 else
26318
26319 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26320         grep '[0-9].[0-9][0-9]*' |\
26321         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26322
26323 fi
26324 echo "$as_me:26324: result: $cf_cv_gnat_version" >&5
26325 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26326 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26327 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26328
26329         fi
26330         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
26331
26332         unset cf_TEMP_gnat
26333         unset cf_cv_gnat_version
26334         unset ac_cv_path_cf_TEMP_gnat
26335 done
26336
26337 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26338         cf_ada_make=
26339         cf_cv_prog_gnat_correct=no
26340 else
26341         cf_ada_make=gnatmake
26342         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26343                 # gprconfig is newer than gnatmake; we can continue...
26344                 cf_ada_config="##"
26345         else
26346                 rm -rf ./conftest* ./*~conftest*
26347                 if mkdir conftest.src
26348                 then
26349                         cf_ada_config=""
26350                         cd conftest.src
26351                         for cf_gprconfig in Ada C
26352                         do
26353                                 echo "$as_me:26353: checking for gprconfig name for $cf_gprconfig" >&5
26354 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26355                                 if test "$cf_gprconfig" = C
26356                                 then
26357                                         for cf_gprconfig_param in \
26358                                                 "$cf_gprconfig,,,,GNATGCC" \
26359                                                 "$cf_gprconfig,,,,GCC" \
26360                                                 "$cf_gprconfig"
26361                                         do
26362                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26363                                                 test -n "$cf_gprconfig_value" && break
26364                                         done
26365                                 else
26366                                         cf_gprconfig_param=$cf_gprconfig
26367                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26368                                 fi
26369                                 if test -n "$cf_gprconfig_value"
26370                                 then
26371                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
26372                                         echo "$as_me:26372: result: $cf_gprconfig_value" >&5
26373 echo "${ECHO_T}$cf_gprconfig_value" >&6
26374                                 else
26375                                         echo "$as_me:26375: result: missing" >&5
26376 echo "${ECHO_T}missing" >&6
26377                                         cf_ada_config="#"
26378                                         break
26379                                 fi
26380                         done
26381                         cd ..
26382                         rm -rf ./conftest* ./*~conftest*
26383                 fi
26384         fi
26385         if test "x$cf_ada_config" != "x#"
26386         then
26387
26388 echo "$as_me:26388: checking for gnat version" >&5
26389 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26390 if test "${cf_cv_gnat_version+set}" = set; then
26391   echo $ECHO_N "(cached) $ECHO_C" >&6
26392 else
26393
26394 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26395         grep '[0-9].[0-9][0-9]*' |\
26396         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26397
26398 fi
26399 echo "$as_me:26399: result: $cf_cv_gnat_version" >&5
26400 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26401 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26402
26403 case "$cf_cv_gnat_version" in
26404 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26405         cf_cv_prog_gnat_correct=yes
26406         ;;
26407 (*)
26408         { echo "$as_me:26408: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26409 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26410         cf_cv_prog_gnat_correct=no
26411         ;;
26412 esac
26413
26414                 # Extract the first word of "m4", so it can be a program name with args.
26415 set dummy m4; ac_word=$2
26416 echo "$as_me:26416: checking for $ac_word" >&5
26417 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26418 if test "${ac_cv_prog_M4_exists+set}" = set; then
26419   echo $ECHO_N "(cached) $ECHO_C" >&6
26420 else
26421   if test -n "$M4_exists"; then
26422   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26423 else
26424   ac_save_IFS=$IFS; IFS=$ac_path_separator
26425 ac_dummy="$PATH"
26426 for ac_dir in $ac_dummy; do
26427   IFS=$ac_save_IFS
26428   test -z "$ac_dir" && ac_dir=.
26429   $as_executable_p "$ac_dir/$ac_word" || continue
26430 ac_cv_prog_M4_exists="yes"
26431 echo "$as_me:26431: found $ac_dir/$ac_word" >&5
26432 break
26433 done
26434
26435   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26436 fi
26437 fi
26438 M4_exists=$ac_cv_prog_M4_exists
26439 if test -n "$M4_exists"; then
26440   echo "$as_me:26440: result: $M4_exists" >&5
26441 echo "${ECHO_T}$M4_exists" >&6
26442 else
26443   echo "$as_me:26443: result: no" >&5
26444 echo "${ECHO_T}no" >&6
26445 fi
26446
26447                 if test "$ac_cv_prog_M4_exists" = no; then
26448                         cf_cv_prog_gnat_correct=no
26449                         { echo "$as_me:26449: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26450 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26451                 fi
26452                 if test "$cf_cv_prog_gnat_correct" = yes; then
26453                         echo "$as_me:26453: checking if GNAT works" >&5
26454 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26455
26456 rm -rf ./conftest* ./*~conftest*
26457 cat >>conftest.ads <<CF_EOF
26458 procedure conftest;
26459 CF_EOF
26460 cat >>conftest.adb <<CF_EOF
26461 with Text_IO;
26462 with GNAT.OS_Lib;
26463 procedure conftest is
26464 begin
26465    Text_IO.Put ("Hello World");
26466    Text_IO.New_Line;
26467    GNAT.OS_Lib.OS_Exit (0);
26468 end conftest;
26469 CF_EOF
26470 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26471    if ( ./conftest 1>&5 2>&1 ) ; then
26472       cf_cv_prog_gnat_correct=yes
26473    else
26474       cf_cv_prog_gnat_correct=no
26475    fi
26476 else
26477    cf_cv_prog_gnat_correct=no
26478 fi
26479 rm -rf ./conftest* ./*~conftest*
26480
26481                         echo "$as_me:26481: result: $cf_cv_prog_gnat_correct" >&5
26482 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26483                 fi
26484         else
26485                 cf_cv_prog_gnat_correct=no
26486         fi
26487 fi
26488
26489                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26490
26491         ADAFLAGS="$ADAFLAGS -gnatpn"
26492
26493         echo "$as_me:26493: checking optimization options for ADAFLAGS" >&5
26494 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26495         case "$CFLAGS" in
26496         (*-g*)
26497
26498         ADAFLAGS="$ADAFLAGS -g"
26499
26500                 ;;
26501         esac
26502         case "$CFLAGS" in
26503         (*-O*)
26504                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26505
26506         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26507
26508                 ;;
26509         esac
26510         echo "$as_me:26510: result: $ADAFLAGS" >&5
26511 echo "${ECHO_T}$ADAFLAGS" >&6
26512
26513 echo "$as_me:26513: checking if GNATPREP supports -T option" >&5
26514 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26515 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
26516   echo $ECHO_N "(cached) $ECHO_C" >&6
26517 else
26518
26519 cf_cv_gnatprep_opt_t=no
26520 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
26521
26522 fi
26523 echo "$as_me:26523: result: $cf_cv_gnatprep_opt_t" >&5
26524 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
26525 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
26526
26527 echo "$as_me:26527: checking if GNAT supports generics" >&5
26528 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
26529 case "$cf_cv_gnat_version" in
26530 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26531         cf_gnat_generics=yes
26532         ;;
26533 (*)
26534         cf_gnat_generics=no
26535         ;;
26536 esac
26537 echo "$as_me:26537: result: $cf_gnat_generics" >&5
26538 echo "${ECHO_T}$cf_gnat_generics" >&6
26539
26540 if test "$cf_gnat_generics" = yes
26541 then
26542         cf_compile_generics=generics
26543         cf_generic_objects="\${GENOBJS}"
26544 else
26545         cf_compile_generics=
26546         cf_generic_objects=
26547 fi
26548
26549 echo "$as_me:26549: checking if GNAT supports SIGINT" >&5
26550 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
26551 if test "${cf_cv_gnat_sigint+set}" = set; then
26552   echo $ECHO_N "(cached) $ECHO_C" >&6
26553 else
26554
26555 rm -rf ./conftest* ./*~conftest*
26556 cat >>conftest.ads <<CF_EOF
26557 with Ada.Interrupts.Names;
26558
26559 package ConfTest is
26560
26561    pragma Warnings (Off);  --  the next pragma exists since 3.11p
26562    pragma Unreserve_All_Interrupts;
26563    pragma Warnings (On);
26564
26565    protected Process is
26566       procedure Stop;
26567       function Continue return Boolean;
26568       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
26569    private
26570       Done : Boolean := False;
26571    end Process;
26572
26573 end ConfTest;
26574 CF_EOF
26575 cat >>conftest.adb <<CF_EOF
26576 package body ConfTest is
26577    protected body Process is
26578       procedure Stop is
26579       begin
26580          Done := True;
26581       end Stop;
26582       function Continue return Boolean is
26583       begin
26584          return not Done;
26585       end Continue;
26586    end Process;
26587 end ConfTest;
26588 CF_EOF
26589 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26590       cf_cv_gnat_sigint=yes
26591 else
26592    cf_cv_gnat_sigint=no
26593 fi
26594 rm -rf ./conftest* ./*~conftest*
26595
26596 fi
26597 echo "$as_me:26597: result: $cf_cv_gnat_sigint" >&5
26598 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
26599
26600 if test "$cf_cv_gnat_sigint" = yes ; then
26601         USE_GNAT_SIGINT=""
26602 else
26603         USE_GNAT_SIGINT="#"
26604 fi
26605
26606 cf_gnat_libraries=no
26607 cf_gnat_projects=no
26608
26609 if test "$enable_gnat_projects" != no ; then
26610 echo "$as_me:26610: checking if GNAT supports project files" >&5
26611 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
26612 case "$cf_cv_gnat_version" in
26613 (3.[0-9]*)
26614         ;;
26615 (*)
26616         case "$cf_cv_system_name" in
26617         (cygwin*|msys*)
26618                 ;;
26619         (*)
26620                 rm -rf ./conftest* ./*~conftest*
26621                 if mkdir conftest.src conftest.bin conftest.lib
26622                 then
26623                         cd conftest.src
26624                         rm -rf ./conftest* ./*~conftest*
26625                         cat >>library.gpr <<CF_EOF
26626 project Library is
26627   Kind := External ("LIB_KIND");
26628   for Library_Name use "ConfTest";
26629   for Object_Dir use ".";
26630   for Library_ALI_Dir use External("LIBRARY_DIR");
26631   for Library_Version use External ("SONAME");
26632   for Library_Kind use Kind;
26633   for Library_Dir use External("BUILD_DIR");
26634   Source_Dir := External ("SOURCE_DIR");
26635   for Source_Dirs use (Source_Dir);
26636 end Library;
26637 CF_EOF
26638                         cat >>confpackage.ads <<CF_EOF
26639 package ConfPackage is
26640    procedure conftest;
26641 end ConfPackage;
26642 CF_EOF
26643                         cat >>confpackage.adb <<CF_EOF
26644 with Text_IO;
26645 package body ConfPackage is
26646    procedure conftest is
26647    begin
26648       Text_IO.Put ("Hello World");
26649       Text_IO.New_Line;
26650    end conftest;
26651 end ConfPackage;
26652 CF_EOF
26653                         if ( "$cf_ada_make" $ADAFLAGS \
26654                                         -Plibrary.gpr \
26655                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
26656                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
26657                                         -XSOURCE_DIR="`pwd`" \
26658                                         -XSONAME=libConfTest.so.1 \
26659                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
26660                                 cf_gnat_projects=yes
26661                         fi
26662                         cd ..
26663                 fi
26664                 if test -f conftest.lib/confpackage.ali
26665                 then
26666                         cf_gnat_libraries=yes
26667                 fi
26668                 rm -rf ./conftest* ./*~conftest*
26669                 ;;
26670         esac
26671         ;;
26672 esac
26673 echo "$as_me:26673: result: $cf_gnat_projects" >&5
26674 echo "${ECHO_T}$cf_gnat_projects" >&6
26675 fi # enable_gnat_projects
26676
26677 if test "$cf_gnat_projects" = yes
26678 then
26679         echo "$as_me:26679: checking if GNAT supports libraries" >&5
26680 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
26681         echo "$as_me:26681: result: $cf_gnat_libraries" >&5
26682 echo "${ECHO_T}$cf_gnat_libraries" >&6
26683 fi
26684
26685 USE_OLD_MAKERULES=""
26686 USE_GNAT_PROJECTS="#"
26687 USE_GNAT_MAKE_GPR="#"
26688 USE_GNAT_GPRBUILD="#"
26689
26690 if test "$cf_gnat_projects" = yes
26691 then
26692         USE_OLD_MAKERULES="#"
26693         USE_GNAT_PROJECTS=""
26694         if test "$cf_cv_VERSION_GPRBUILD" != no
26695         then
26696                 USE_GNAT_GPRBUILD=""
26697         elif test "$cf_cv_VERSION_GNATMAKE" != no
26698         then
26699                 USE_GNAT_MAKE_GPR=""
26700         else
26701                 { echo "$as_me:26701: WARNING: use old makefile rules since tools are missing" >&5
26702 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
26703         fi
26704 fi
26705
26706 if test "$cf_gnat_libraries" = yes
26707 then
26708         USE_GNAT_LIBRARIES=""
26709 else
26710         USE_GNAT_LIBRARIES="#"
26711 fi
26712
26713 echo "$as_me:26713: checking for ada-compiler" >&5
26714 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
26715
26716 # Check whether --with-ada-compiler or --without-ada-compiler was given.
26717 if test "${with_ada_compiler+set}" = set; then
26718   withval="$with_ada_compiler"
26719   cf_ada_compiler=$withval
26720 else
26721   cf_ada_compiler=gnatmake
26722 fi;
26723
26724 echo "$as_me:26724: result: $cf_ada_compiler" >&5
26725 echo "${ECHO_T}$cf_ada_compiler" >&6
26726
26727                         cf_ada_package=terminal_interface
26728
26729 echo "$as_me:26729: checking for ada-include" >&5
26730 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
26731
26732 # Check whether --with-ada-include or --without-ada-include was given.
26733 if test "${with_ada_include+set}" = set; then
26734   withval="$with_ada_include"
26735
26736 else
26737   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
26738 fi; if test -n "$prefix/share/ada/adainclude" ; then
26739
26740 if test "x$prefix" != xNONE; then
26741         cf_path_syntax="$prefix"
26742 else
26743         cf_path_syntax="$ac_default_prefix"
26744 fi
26745
26746 case ".$withval" in
26747 (.\$\(*\)*|.\'*\'*)
26748         ;;
26749 (..|./*|.\\*)
26750         ;;
26751 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26752         ;;
26753 (.\$\{*prefix\}*|.\$\{*dir\}*)
26754         eval withval="$withval"
26755         case ".$withval" in
26756         (.NONE/*)
26757                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26758                 ;;
26759         esac
26760         ;;
26761 (.no|.NONE/*)
26762         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26763         ;;
26764 (*)
26765         { { echo "$as_me:26765: error: expected a pathname, not \"$withval\"" >&5
26766 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26767    { (exit 1); exit 1; }; }
26768         ;;
26769 esac
26770
26771 fi
26772 eval ADA_INCLUDE="$withval"
26773
26774 echo "$as_me:26774: result: $ADA_INCLUDE" >&5
26775 echo "${ECHO_T}$ADA_INCLUDE" >&6
26776
26777 echo "$as_me:26777: checking for ada-objects" >&5
26778 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
26779
26780 # Check whether --with-ada-objects or --without-ada-objects was given.
26781 if test "${with_ada_objects+set}" = set; then
26782   withval="$with_ada_objects"
26783
26784 else
26785   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
26786 fi; if test -n "$prefix/lib/ada/adalib" ; then
26787
26788 if test "x$prefix" != xNONE; then
26789         cf_path_syntax="$prefix"
26790 else
26791         cf_path_syntax="$ac_default_prefix"
26792 fi
26793
26794 case ".$withval" in
26795 (.\$\(*\)*|.\'*\'*)
26796         ;;
26797 (..|./*|.\\*)
26798         ;;
26799 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26800         ;;
26801 (.\$\{*prefix\}*|.\$\{*dir\}*)
26802         eval withval="$withval"
26803         case ".$withval" in
26804         (.NONE/*)
26805                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26806                 ;;
26807         esac
26808         ;;
26809 (.no|.NONE/*)
26810         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26811         ;;
26812 (*)
26813         { { echo "$as_me:26813: error: expected a pathname, not \"$withval\"" >&5
26814 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26815    { (exit 1); exit 1; }; }
26816         ;;
26817 esac
26818
26819 fi
26820 eval ADA_OBJECTS="$withval"
26821
26822 echo "$as_me:26822: result: $ADA_OBJECTS" >&5
26823 echo "${ECHO_T}$ADA_OBJECTS" >&6
26824
26825 echo "$as_me:26825: checking if an Ada95 shared-library should be built" >&5
26826 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
26827
26828 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
26829 if test "${with_ada_sharedlib+set}" = set; then
26830   withval="$with_ada_sharedlib"
26831   with_ada_sharedlib=$withval
26832 else
26833   with_ada_sharedlib=no
26834 fi;
26835 echo "$as_me:26835: result: $with_ada_sharedlib" >&5
26836 echo "${ECHO_T}$with_ada_sharedlib" >&6
26837
26838 if test "x$with_ada_sharedlib" != xno
26839 then
26840         if test "x$cf_gnat_projects" != xyes
26841         then
26842                 { echo "$as_me:26842: WARNING: disabling shared-library since GNAT projects are not supported" >&5
26843 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
26844                 with_ada_sharedlib=no
26845         fi
26846 fi
26847
26848 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
26849 MAKE_ADA_SHAREDLIB="#"
26850
26851 if test "x$with_ada_sharedlib" != xno
26852 then
26853         MAKE_ADA_SHAREDLIB=
26854         if test "x$with_ada_sharedlib" != xyes
26855         then
26856                 ADA_SHAREDLIB="$with_ada_sharedlib"
26857         fi
26858 fi
26859
26860                         # allow the Ada binding to be renamed
26861
26862 echo "$as_me:26862: checking for ada-libname" >&5
26863 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
26864
26865 # Check whether --with-ada-libname or --without-ada-libname was given.
26866 if test "${with_ada_libname+set}" = set; then
26867   withval="$with_ada_libname"
26868   ADA_LIBNAME=$withval
26869 else
26870   ADA_LIBNAME=AdaCurses
26871 fi;
26872 case "x$ADA_LIBNAME" in
26873 (x|xyes|xno)
26874         ADA_LIBNAME=AdaCurses
26875         ;;
26876 esac
26877
26878 echo "$as_me:26878: result: $ADA_LIBNAME" >&5
26879 echo "${ECHO_T}$ADA_LIBNAME" >&6
26880
26881                 fi
26882         fi
26883 else
26884         cf_with_ada=no
26885 fi
26886
26887 # do this "late" to avoid conflict with header-checks
26888 if test "x$with_widec" = xyes ; then
26889         echo "$as_me:26889: checking for wchar_t" >&5
26890 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
26891 if test "${ac_cv_type_wchar_t+set}" = set; then
26892   echo $ECHO_N "(cached) $ECHO_C" >&6
26893 else
26894   cat >"conftest.$ac_ext" <<_ACEOF
26895 #line 26895 "configure"
26896 #include "confdefs.h"
26897 $ac_includes_default
26898 int
26899 main (void)
26900 {
26901 if ((wchar_t *) 0)
26902   return 0;
26903 if (sizeof (wchar_t))
26904   return 0;
26905   ;
26906   return 0;
26907 }
26908 _ACEOF
26909 rm -f "conftest.$ac_objext"
26910 if { (eval echo "$as_me:26910: \"$ac_compile\"") >&5
26911   (eval $ac_compile) 2>&5
26912   ac_status=$?
26913   echo "$as_me:26913: \$? = $ac_status" >&5
26914   (exit "$ac_status"); } &&
26915          { ac_try='test -s "conftest.$ac_objext"'
26916   { (eval echo "$as_me:26916: \"$ac_try\"") >&5
26917   (eval $ac_try) 2>&5
26918   ac_status=$?
26919   echo "$as_me:26919: \$? = $ac_status" >&5
26920   (exit "$ac_status"); }; }; then
26921   ac_cv_type_wchar_t=yes
26922 else
26923   echo "$as_me: failed program was:" >&5
26924 cat "conftest.$ac_ext" >&5
26925 ac_cv_type_wchar_t=no
26926 fi
26927 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26928 fi
26929 echo "$as_me:26929: result: $ac_cv_type_wchar_t" >&5
26930 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
26931
26932 echo "$as_me:26932: checking size of wchar_t" >&5
26933 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
26934 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
26935   echo $ECHO_N "(cached) $ECHO_C" >&6
26936 else
26937   if test "$ac_cv_type_wchar_t" = yes; then
26938   if test "$cross_compiling" = yes; then
26939   # Depending upon the size, compute the lo and hi bounds.
26940 cat >"conftest.$ac_ext" <<_ACEOF
26941 #line 26941 "configure"
26942 #include "confdefs.h"
26943 $ac_includes_default
26944 int
26945 main (void)
26946 {
26947 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
26948   ;
26949   return 0;
26950 }
26951 _ACEOF
26952 rm -f "conftest.$ac_objext"
26953 if { (eval echo "$as_me:26953: \"$ac_compile\"") >&5
26954   (eval $ac_compile) 2>&5
26955   ac_status=$?
26956   echo "$as_me:26956: \$? = $ac_status" >&5
26957   (exit "$ac_status"); } &&
26958          { ac_try='test -s "conftest.$ac_objext"'
26959   { (eval echo "$as_me:26959: \"$ac_try\"") >&5
26960   (eval $ac_try) 2>&5
26961   ac_status=$?
26962   echo "$as_me:26962: \$? = $ac_status" >&5
26963   (exit "$ac_status"); }; }; then
26964   ac_lo=0 ac_mid=0
26965   while :; do
26966     cat >"conftest.$ac_ext" <<_ACEOF
26967 #line 26967 "configure"
26968 #include "confdefs.h"
26969 $ac_includes_default
26970 int
26971 main (void)
26972 {
26973 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
26974   ;
26975   return 0;
26976 }
26977 _ACEOF
26978 rm -f "conftest.$ac_objext"
26979 if { (eval echo "$as_me:26979: \"$ac_compile\"") >&5
26980   (eval $ac_compile) 2>&5
26981   ac_status=$?
26982   echo "$as_me:26982: \$? = $ac_status" >&5
26983   (exit "$ac_status"); } &&
26984          { ac_try='test -s "conftest.$ac_objext"'
26985   { (eval echo "$as_me:26985: \"$ac_try\"") >&5
26986   (eval $ac_try) 2>&5
26987   ac_status=$?
26988   echo "$as_me:26988: \$? = $ac_status" >&5
26989   (exit "$ac_status"); }; }; then
26990   ac_hi=$ac_mid; break
26991 else
26992   echo "$as_me: failed program was:" >&5
26993 cat "conftest.$ac_ext" >&5
26994 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26995 fi
26996 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26997   done
26998 else
26999   echo "$as_me: failed program was:" >&5
27000 cat "conftest.$ac_ext" >&5
27001 ac_hi=-1 ac_mid=-1
27002   while :; do
27003     cat >"conftest.$ac_ext" <<_ACEOF
27004 #line 27004 "configure"
27005 #include "confdefs.h"
27006 $ac_includes_default
27007 int
27008 main (void)
27009 {
27010 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27011   ;
27012   return 0;
27013 }
27014 _ACEOF
27015 rm -f "conftest.$ac_objext"
27016 if { (eval echo "$as_me:27016: \"$ac_compile\"") >&5
27017   (eval $ac_compile) 2>&5
27018   ac_status=$?
27019   echo "$as_me:27019: \$? = $ac_status" >&5
27020   (exit "$ac_status"); } &&
27021          { ac_try='test -s "conftest.$ac_objext"'
27022   { (eval echo "$as_me:27022: \"$ac_try\"") >&5
27023   (eval $ac_try) 2>&5
27024   ac_status=$?
27025   echo "$as_me:27025: \$? = $ac_status" >&5
27026   (exit "$ac_status"); }; }; then
27027   ac_lo=$ac_mid; break
27028 else
27029   echo "$as_me: failed program was:" >&5
27030 cat "conftest.$ac_ext" >&5
27031 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27032 fi
27033 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27034   done
27035 fi
27036 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27037 # Binary search between lo and hi bounds.
27038 while test "x$ac_lo" != "x$ac_hi"; do
27039   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27040   cat >"conftest.$ac_ext" <<_ACEOF
27041 #line 27041 "configure"
27042 #include "confdefs.h"
27043 $ac_includes_default
27044 int
27045 main (void)
27046 {
27047 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27048   ;
27049   return 0;
27050 }
27051 _ACEOF
27052 rm -f "conftest.$ac_objext"
27053 if { (eval echo "$as_me:27053: \"$ac_compile\"") >&5
27054   (eval $ac_compile) 2>&5
27055   ac_status=$?
27056   echo "$as_me:27056: \$? = $ac_status" >&5
27057   (exit "$ac_status"); } &&
27058          { ac_try='test -s "conftest.$ac_objext"'
27059   { (eval echo "$as_me:27059: \"$ac_try\"") >&5
27060   (eval $ac_try) 2>&5
27061   ac_status=$?
27062   echo "$as_me:27062: \$? = $ac_status" >&5
27063   (exit "$ac_status"); }; }; then
27064   ac_hi=$ac_mid
27065 else
27066   echo "$as_me: failed program was:" >&5
27067 cat "conftest.$ac_ext" >&5
27068 ac_lo=`expr "$ac_mid" + 1`
27069 fi
27070 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27071 done
27072 ac_cv_sizeof_wchar_t=$ac_lo
27073 else
27074   if test "$cross_compiling" = yes; then
27075   { { echo "$as_me:27075: error: cannot run test program while cross compiling" >&5
27076 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27077    { (exit 1); exit 1; }; }
27078 else
27079   cat >"conftest.$ac_ext" <<_ACEOF
27080 #line 27080 "configure"
27081 #include "confdefs.h"
27082 $ac_includes_default
27083 int
27084 main (void)
27085 {
27086 FILE *f = fopen ("conftest.val", "w");
27087 if (!f)
27088   $ac_main_return (1);
27089 fprintf (f, "%d", (sizeof (wchar_t)));
27090 fclose (f);
27091   ;
27092   return 0;
27093 }
27094 _ACEOF
27095 rm -f "conftest$ac_exeext"
27096 if { (eval echo "$as_me:27096: \"$ac_link\"") >&5
27097   (eval $ac_link) 2>&5
27098   ac_status=$?
27099   echo "$as_me:27099: \$? = $ac_status" >&5
27100   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27101   { (eval echo "$as_me:27101: \"$ac_try\"") >&5
27102   (eval $ac_try) 2>&5
27103   ac_status=$?
27104   echo "$as_me:27104: \$? = $ac_status" >&5
27105   (exit "$ac_status"); }; }; then
27106   ac_cv_sizeof_wchar_t=`cat conftest.val`
27107 else
27108   echo "$as_me: program exited with status $ac_status" >&5
27109 echo "$as_me: failed program was:" >&5
27110 cat "conftest.$ac_ext" >&5
27111 fi
27112 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27113 fi
27114 fi
27115 rm -f conftest.val
27116 else
27117   ac_cv_sizeof_wchar_t=0
27118 fi
27119 fi
27120 echo "$as_me:27120: result: $ac_cv_sizeof_wchar_t" >&5
27121 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27122 cat >>confdefs.h <<EOF
27123 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27124 EOF
27125
27126         # cross-compiling to mingw can run into the problem that attempting to
27127         # link with the regex library fails, causing the test to not set this to
27128         # a number.  "recent" autoconf does not address this problem either -TD
27129         if test -z "$ac_cv_sizeof_wchar_t"
27130         then
27131                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27132
27133 echo "${as_me:-configure}:27133: testing test failed (assume 2) ..." 1>&5
27134
27135                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27136                 mv confdefs.tmp confdefs.h
27137                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27138         fi
27139 fi
27140
27141 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27142 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27143 ###
27144 ### ticlib modules may be a separate library, otherwise contained in termlib.
27145 ### termlib modules may be a separate library, otherwise contained in ncurses.
27146 ###
27147 ### The of "+" or " " between the tokens controls the way the script
27148 ### chooses to split module lists into libraries.
27149 ###
27150 ### (see CF_LIB_RULES).
27151 echo "$as_me:27151: checking for library subsets" >&5
27152 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27153 LIB_SUBSETS=
27154
27155 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27156         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27157         if test "$with_ticlib" != no ; then
27158                 LIB_SUBSETS="${LIB_SUBSETS} "
27159         else
27160                 LIB_SUBSETS="${LIB_SUBSETS}+"
27161         fi
27162 fi
27163
27164 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27165 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27166
27167 if test "$with_termlib" != no ; then
27168         LIB_SUBSETS="${LIB_SUBSETS} "
27169 else
27170         LIB_SUBSETS="${LIB_SUBSETS}+"
27171 fi
27172
27173 LIB_SUBSETS="${LIB_SUBSETS}base"
27174
27175 # Most term-driver calls are to tinfo, but some like init_pair are to the
27176 # base library (so it resides in base).
27177 if test "$with_term_driver" != no ; then
27178         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27179         case "$cf_cv_system_name" in
27180         (*mingw32*|*mingw64*)
27181                 if test "x$with_exp_win32" = xyes ; then
27182                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27183                 else
27184                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27185                 fi
27186                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27187                 ;;
27188         (*)
27189                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27190                 ;;
27191         esac
27192 elif test "x$with_exp_win32" = xyes ; then
27193         case "$cf_cv_system_name" in
27194         (*mingw32*|*mingw64*)
27195                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27196                 ;;
27197         (*)
27198                 ;;
27199         esac
27200 fi
27201
27202 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27203 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27204
27205 echo "$as_me:27205: result: $LIB_SUBSETS" >&5
27206 echo "${ECHO_T}$LIB_SUBSETS" >&6
27207
27208 ### Construct the list of include-directories to be generated
27209
27210 if test "$srcdir" != "."; then
27211         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27212 fi
27213 CPPFLAGS="-I../include $CPPFLAGS"
27214 if test "$srcdir" != "."; then
27215         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27216 fi
27217 CPPFLAGS="-I. $CPPFLAGS"
27218
27219 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27220 if test "$srcdir" != "."; then
27221         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27222 fi
27223 if test "$GCC" != yes; then
27224         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27225 elif test "$includedir" != "/usr/include"; then
27226         if test "$includedir" = '${prefix}/include' ; then
27227                 if test x$prefix != x/usr ; then
27228                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27229                 fi
27230         else
27231                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27232         fi
27233 fi
27234
27235 ### Build up pieces for makefile rules
27236 echo "$as_me:27236: checking default library suffix" >&5
27237 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27238
27239         case $DFT_LWR_MODEL in
27240         (libtool) DFT_ARG_SUFFIX=''   ;;
27241         (normal)  DFT_ARG_SUFFIX=''   ;;
27242         (debug)   DFT_ARG_SUFFIX='_g' ;;
27243         (profile) DFT_ARG_SUFFIX='_p' ;;
27244         (shared)  DFT_ARG_SUFFIX=''   ;;
27245         esac
27246         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27247 echo "$as_me:27247: result: $DFT_ARG_SUFFIX" >&5
27248 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27249
27250 echo "$as_me:27250: checking default library-dependency suffix" >&5
27251 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27252
27253         case X$DFT_LWR_MODEL in
27254         (Xlibtool)
27255                 DFT_LIB_SUFFIX='.la'
27256                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27257                 ;;
27258         (Xdebug)
27259                 case "$cf_cv_system_name" in
27260                 (*-msvc*)
27261                         DFT_LIB_SUFFIX='_g.lib'
27262                         ;;
27263                 (*)
27264                         DFT_LIB_SUFFIX='_g.a'
27265                         ;;
27266                 esac
27267                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27268                 ;;
27269         (Xprofile)
27270                 case "$cf_cv_system_name" in
27271                 (*-msvc*)
27272                         DFT_LIB_SUFFIX='_p.lib'
27273                         ;;
27274                 (*)
27275                         DFT_LIB_SUFFIX='_p.a'
27276                         ;;
27277                 esac
27278                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27279                 ;;
27280         (Xshared)
27281                 case "$cf_cv_system_name" in
27282                 (aix[5-7]*)
27283                         DFT_LIB_SUFFIX='.so'
27284                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27285                         ;;
27286                 (*-msvc*)
27287                         DFT_LIB_SUFFIX='.dll'
27288                         DFT_DEP_SUFFIX='.dll.lib'
27289                         ;;
27290                 (cygwin*|msys*|mingw*)
27291                         DFT_LIB_SUFFIX='.dll'
27292                         DFT_DEP_SUFFIX='.dll.a'
27293                         ;;
27294                 (darwin*)
27295                         DFT_LIB_SUFFIX='.dylib'
27296                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27297                         ;;
27298                 (hpux*)
27299                         case "$target" in
27300                         (ia64*)
27301                                 DFT_LIB_SUFFIX='.so'
27302                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27303                                 ;;
27304                         (*)
27305                                 DFT_LIB_SUFFIX='.sl'
27306                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27307                                 ;;
27308                         esac
27309                         ;;
27310                 (*)
27311                         DFT_LIB_SUFFIX='.so'
27312                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27313                         ;;
27314                 esac
27315                 ;;
27316         (*)
27317                 case "$target" in
27318                 (*-msvc*)
27319                         DFT_LIB_SUFFIX='.lib'
27320                         ;;
27321                 (*)
27322                         DFT_LIB_SUFFIX='.a'
27323                         ;;
27324                 esac
27325                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27326                 ;;
27327         esac
27328         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27329         then
27330                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27331                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27332         fi
27333 echo "$as_me:27333: result: $DFT_DEP_SUFFIX" >&5
27334 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27335
27336 echo "$as_me:27336: checking default object directory" >&5
27337 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27338
27339         case $DFT_LWR_MODEL in
27340         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27341         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27342         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27343         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27344         (shared)
27345                 case "$cf_cv_system_name" in
27346                 (cygwin|msys)
27347                         DFT_OBJ_SUBDIR='objects' ;;
27348                 (*)
27349                         DFT_OBJ_SUBDIR='obj_s' ;;
27350                 esac
27351         esac
27352 echo "$as_me:27352: result: $DFT_OBJ_SUBDIR" >&5
27353 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27354
27355 if test "x$cf_with_cxx" = xyes ; then
27356 echo "$as_me:27356: checking c++ library-dependency suffix" >&5
27357 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27358 if test "$with_libtool" != "no"; then
27359         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27360         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27361 elif test "$with_shared_cxx" != "no"; then
27362         # also for g++ users...
27363         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27364 else
27365         # we normally make a static library because C/C++ library rules differ
27366
27367         case Xnormal in
27368         (Xlibtool)
27369                 CXX_LIB_SUFFIX='.la'
27370                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27371                 ;;
27372         (Xdebug)
27373                 case "$cf_cv_system_name" in
27374                 (*-msvc*)
27375                         CXX_LIB_SUFFIX='_g.lib'
27376                         ;;
27377                 (*)
27378                         CXX_LIB_SUFFIX='_g.a'
27379                         ;;
27380                 esac
27381                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27382                 ;;
27383         (Xprofile)
27384                 case "$cf_cv_system_name" in
27385                 (*-msvc*)
27386                         CXX_LIB_SUFFIX='_p.lib'
27387                         ;;
27388                 (*)
27389                         CXX_LIB_SUFFIX='_p.a'
27390                         ;;
27391                 esac
27392                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27393                 ;;
27394         (Xshared)
27395                 case "$cf_cv_system_name" in
27396                 (aix[5-7]*)
27397                         CXX_LIB_SUFFIX='.so'
27398                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27399                         ;;
27400                 (*-msvc*)
27401                         CXX_LIB_SUFFIX='.dll'
27402                         CXX_DEP_SUFFIX='.dll.lib'
27403                         ;;
27404                 (cygwin*|msys*|mingw*)
27405                         CXX_LIB_SUFFIX='.dll'
27406                         CXX_DEP_SUFFIX='.dll.a'
27407                         ;;
27408                 (darwin*)
27409                         CXX_LIB_SUFFIX='.dylib'
27410                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27411                         ;;
27412                 (hpux*)
27413                         case "$target" in
27414                         (ia64*)
27415                                 CXX_LIB_SUFFIX='.so'
27416                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27417                                 ;;
27418                         (*)
27419                                 CXX_LIB_SUFFIX='.sl'
27420                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27421                                 ;;
27422                         esac
27423                         ;;
27424                 (*)
27425                         CXX_LIB_SUFFIX='.so'
27426                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27427                         ;;
27428                 esac
27429                 ;;
27430         (*)
27431                 case "$target" in
27432                 (*-msvc*)
27433                         CXX_LIB_SUFFIX='.lib'
27434                         ;;
27435                 (*)
27436                         CXX_LIB_SUFFIX='.a'
27437                         ;;
27438                 esac
27439                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27440                 ;;
27441         esac
27442         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27443         then
27444                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27445                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27446         fi
27447
27448 fi
27449 echo "$as_me:27449: result: $CXX_LIB_SUFFIX" >&5
27450 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27451
27452 fi
27453
27454 # do not want -ldl in build except as needed for -lncurses dependency
27455 if test "x$with_dlsym" = xyes ; then
27456 if test "$DFT_LWR_MODEL" = shared || \
27457    test "$DFT_LWR_MODEL" = libtool ; then
27458
27459 # remove dl library from $LIBS
27460 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27461
27462 fi
27463 fi
27464 ### Set up low-level terminfo dependencies for makefiles.
27465
27466 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27467 # do not need libdl
27468 TICS_LIST=
27469 if test "x$with_dlsym" = xyes ; then
27470
27471 # remove dl library from $SHLIB_LIST
27472 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27473
27474 fi
27475
27476 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27477 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27478 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27479 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27480 then
27481         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27482 fi
27483
27484 if test "$with_ticlib" != no ; then
27485
27486         if test "x$with_ticlib" != xyes ; then
27487                 TICS_NAME=$with_ticlib
27488                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27489                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27490                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27491                 TICS_LIB_SUFFIX="${with_ticlib}"
27492         else
27493                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27494                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27495                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27496                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27497         fi
27498         TICS_LDFLAGS="-L${LIB_DIR}"
27499         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27500 else
27501         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27502         TICS_LDFLAGS="-L${LIB_DIR}"
27503         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27504 fi
27505
27506 if test "$with_termlib" != no ; then
27507
27508         if test "x$with_termlib" != xyes ; then
27509                 TINFO_NAME=$with_termlib
27510                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27511                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27512                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27513                 TINFO_LIB_SUFFIX="${with_termlib}"
27514         else
27515                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27516                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
27517                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
27518                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
27519         fi
27520
27521         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27522         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27523         if test "$DFT_LWR_MODEL" = "libtool"; then
27524                 TEST_ARGS="${TEST_DEPS}"
27525                 TEST_ARG2="${TEST_DEP2}"
27526                 TINFO_LDFLAGS="-L${LIB_DIR}"
27527                 TINFO_LIBS="$TEST_ARGS"
27528                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
27529                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
27530         else
27531                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
27532                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
27533                 if test "x$with_term_driver" != xno ; then
27534                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27535                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
27536                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27537                 else
27538                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27539                         TINFO_LIBS="$TEST_ARGS"
27540                 fi
27541                 TINFO_LDFLAGS="-L${LIB_DIR}"
27542                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27543         fi
27544 else
27545         # the next lines are needed for linking libtic over libncurses
27546         TINFO_NAME=${LIB_NAME}
27547         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27548         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
27549         if test "x$with_tic_depends" = xyes ; then
27550                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27551         else
27552                 TICS_LIST="$SHLIB_LIST"
27553         fi
27554
27555         TINFO_LDFLAGS="-L${LIB_DIR}"
27556         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27557 fi
27558
27559 if test "$DFT_LWR_MODEL" = shared ; then
27560         case "$cf_cv_system_name" in
27561         (cygwin*|msys*)
27562                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
27563                 TINFO_SUFFIX=.dll
27564                 ;;
27565         esac
27566 fi
27567
27568 if test "x$with_dlsym" = xyes ; then
27569
27570 # remove dl library from $TICS_LIST
27571 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
27572
27573 fi
27574
27575 if test "$DFT_LWR_MODEL" = "libtool"; then
27576         OBJEXT=lo
27577 fi
27578
27579 # needed for Ada95
27580 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
27581
27582 case "$DFT_LWR_MODEL" in
27583 (normal|debug|profile)
27584
27585 if test "$GCC" = yes ; then
27586         case "$cf_cv_system_name" in
27587         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
27588                 LDFLAGS_STATIC=
27589                 LDFLAGS_SHARED=
27590                 ;;
27591         (*)     # normally, except when broken
27592                 LDFLAGS_STATIC=-static
27593                 LDFLAGS_SHARED=-dynamic
27594                 ;;
27595         esac
27596 else
27597         case "$cf_cv_system_name" in
27598         (aix[4-7]*)     # from ld manpage
27599                 LDFLAGS_STATIC=-bstatic
27600                 LDFLAGS_SHARED=-bdynamic
27601                 ;;
27602         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
27603                 # We could also use just "archive" and "shared".
27604                 LDFLAGS_STATIC=-Wl,-a,archive_shared
27605                 LDFLAGS_SHARED=-Wl,-a,shared_archive
27606                 ;;
27607         (irix*)         # from ld manpage IRIX64
27608                 LDFLAGS_STATIC=-Bstatic
27609                 LDFLAGS_SHARED=-Bdynamic
27610                 ;;
27611         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
27612                 # alternative "-oldstyle_liblookup" (not in cc manpage)
27613                 LDFLAGS_STATIC=-noso
27614                 LDFLAGS_SHARED=-so_archive
27615                 ;;
27616         (solaris2*)
27617                 LDFLAGS_STATIC=-Bstatic
27618                 LDFLAGS_SHARED=-Bdynamic
27619                 ;;
27620         esac
27621 fi
27622
27623 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
27624 then
27625         echo "$as_me:27625: checking if linker supports switching between static/dynamic" >&5
27626 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
27627
27628         rm -f libconftest.a
27629         cat >conftest.$ac_ext <<EOF
27630 #line 27630 "configure"
27631 #include <stdio.h>
27632 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
27633 EOF
27634         if { (eval echo "$as_me:27634: \"$ac_compile\"") >&5
27635   (eval $ac_compile) 2>&5
27636   ac_status=$?
27637   echo "$as_me:27637: \$? = $ac_status" >&5
27638   (exit "$ac_status"); } ; then
27639                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
27640                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
27641         fi
27642         rm -f conftest.*
27643
27644         cf_save_LIBS="$LIBS"
27645
27646         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
27647         cat >"conftest.$ac_ext" <<_ACEOF
27648 #line 27648 "configure"
27649 #include "confdefs.h"
27650
27651 #line 27651 "configure"
27652 #include <stdio.h>
27653 int cf_ldflags_static(FILE *fp);
27654
27655 int
27656 main (void)
27657 {
27658
27659         return cf_ldflags_static(stdin);
27660
27661   ;
27662   return 0;
27663 }
27664 _ACEOF
27665 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27666 if { (eval echo "$as_me:27666: \"$ac_link\"") >&5
27667   (eval $ac_link) 2>&5
27668   ac_status=$?
27669   echo "$as_me:27669: \$? = $ac_status" >&5
27670   (exit "$ac_status"); } &&
27671          { ac_try='test -s "conftest$ac_exeext"'
27672   { (eval echo "$as_me:27672: \"$ac_try\"") >&5
27673   (eval $ac_try) 2>&5
27674   ac_status=$?
27675   echo "$as_me:27675: \$? = $ac_status" >&5
27676   (exit "$ac_status"); }; }; then
27677
27678         # some linkers simply ignore the -dynamic
27679         case x`file "conftest$ac_exeext" 2>/dev/null` in
27680         (*static*)
27681                 cf_ldflags_static=no
27682                 ;;
27683         (*)
27684                 cf_ldflags_static=yes
27685                 ;;
27686         esac
27687
27688 else
27689   echo "$as_me: failed program was:" >&5
27690 cat "conftest.$ac_ext" >&5
27691 cf_ldflags_static=no
27692 fi
27693 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27694
27695         rm -f libconftest.*
27696         LIBS="$cf_save_LIBS"
27697
27698         echo "$as_me:27698: result: $cf_ldflags_static" >&5
27699 echo "${ECHO_T}$cf_ldflags_static" >&6
27700
27701         if test "$cf_ldflags_static" != yes
27702         then
27703                 LDFLAGS_STATIC=
27704                 LDFLAGS_SHARED=
27705         fi
27706 else
27707         LDFLAGS_STATIC=
27708         LDFLAGS_SHARED=
27709 fi
27710
27711         ;;
27712 esac
27713
27714 echo "$as_me:27714: checking where we will install curses.h" >&5
27715 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
27716
27717 includesubdir=
27718 if test "$with_overwrite" = no && \
27719  { test "x$includedir" = 'x${prefix}/include' || \
27720    test "x$includedir" = "x${prefix}/include"; }
27721 then
27722         includesubdir="/ncurses${USE_LIB_SUFFIX}"
27723 fi
27724 echo "$as_me:27724: result: ${includedir}${includesubdir}" >&5
27725 echo "${ECHO_T}${includedir}${includesubdir}" >&6
27726
27727 ### Resolve a conflict between normal and wide-curses by forcing applications
27728 ### that will need libutf8 to add it to their configure script.
27729 if test "$with_overwrite" != no ; then
27730 if test "$NCURSES_LIBUTF8" = 1 ; then
27731         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
27732         { echo "$as_me:27732: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
27733 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
27734 fi
27735 fi
27736 WITH_OVERWRITE=$with_overwrite
27737
27738 ### At least on MinGW a shared library build without libtool
27739 ### requires adding the additional libs to the link list.
27740 case "$cf_cv_system_name" in
27741 (*mingw32*|*mingw64*)
27742         if test "$DFT_LWR_MODEL" != "libtool"; then
27743            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
27744         fi
27745         ;;
27746 *)      ;;
27747 esac
27748
27749 # used to separate tack out of the tree
27750 NCURSES_TREE=
27751
27752 ### predefined stuff for the test programs
27753
27754 cat >>confdefs.h <<\EOF
27755 #define HAVE_SLK_COLOR 1
27756 EOF
27757
27758 # pkgsrc uses these
27759
27760 echo "$as_me:27760: checking for desired basename for form library" >&5
27761 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
27762
27763 # Check whether --with-form-libname or --without-form-libname was given.
27764 if test "${with_form_libname+set}" = set; then
27765   withval="$with_form_libname"
27766   with_lib_basename=$withval
27767 else
27768   with_lib_basename=form
27769 fi;
27770 FORM_NAME="$with_lib_basename"
27771
27772 case "x$FORM_NAME" in
27773 (x|xno|xnone|xyes)
27774         FORM_NAME=form
27775         ;;
27776 (*)
27777         ;;
27778 esac
27779
27780 echo "$as_me:27780: result: $FORM_NAME" >&5
27781 echo "${ECHO_T}$FORM_NAME" >&6
27782
27783 echo "$as_me:27783: checking for desired basename for menu library" >&5
27784 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
27785
27786 # Check whether --with-menu-libname or --without-menu-libname was given.
27787 if test "${with_menu_libname+set}" = set; then
27788   withval="$with_menu_libname"
27789   with_lib_basename=$withval
27790 else
27791   with_lib_basename=menu
27792 fi;
27793 MENU_NAME="$with_lib_basename"
27794
27795 case "x$MENU_NAME" in
27796 (x|xno|xnone|xyes)
27797         MENU_NAME=menu
27798         ;;
27799 (*)
27800         ;;
27801 esac
27802
27803 echo "$as_me:27803: result: $MENU_NAME" >&5
27804 echo "${ECHO_T}$MENU_NAME" >&6
27805
27806 echo "$as_me:27806: checking for desired basename for panel library" >&5
27807 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
27808
27809 # Check whether --with-panel-libname or --without-panel-libname was given.
27810 if test "${with_panel_libname+set}" = set; then
27811   withval="$with_panel_libname"
27812   with_lib_basename=$withval
27813 else
27814   with_lib_basename=panel
27815 fi;
27816 PANEL_NAME="$with_lib_basename"
27817
27818 case "x$PANEL_NAME" in
27819 (x|xno|xnone|xyes)
27820         PANEL_NAME=panel
27821         ;;
27822 (*)
27823         ;;
27824 esac
27825
27826 echo "$as_me:27826: result: $PANEL_NAME" >&5
27827 echo "${ECHO_T}$PANEL_NAME" >&6
27828
27829 echo "$as_me:27829: checking for desired basename for cxx library" >&5
27830 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
27831
27832 # Check whether --with-cxx-libname or --without-cxx-libname was given.
27833 if test "${with_cxx_libname+set}" = set; then
27834   withval="$with_cxx_libname"
27835   with_lib_basename=$withval
27836 else
27837   with_lib_basename=ncurses++
27838 fi;
27839 CXX_NAME="$with_lib_basename"
27840
27841 case "x$CXX_NAME" in
27842 (x|xno|xnone|xyes)
27843         CXX_NAME=ncurses++
27844         ;;
27845 (*)
27846         ;;
27847 esac
27848
27849 echo "$as_me:27849: result: $CXX_NAME" >&5
27850 echo "${ECHO_T}$CXX_NAME" >&6
27851
27852 ### Construct the list of subdirectories for which we'll customize makefiles
27853 ### with the appropriate compile-rules.
27854
27855 echo "$as_me:27855: checking for src modules" >&5
27856 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
27857
27858 # dependencies and linker-arguments for test-programs
27859 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
27860 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
27861 if test "$DFT_LWR_MODEL" = "libtool"; then
27862         TEST_ARGS="${TEST_DEPS}"
27863         TEST_ARG2="${TEST_DEP2}"
27864 else
27865         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27866         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
27867 fi
27868
27869 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
27870 cf_cv_src_modules=
27871 for cf_dir in $modules_to_build
27872 do
27873         if test -f "$srcdir/$cf_dir/modules" ; then
27874
27875                 # We may/may not have tack in the distribution, though the
27876                 # makefile is.
27877                 if test "$cf_dir" = tack ; then
27878                         if test "x$cf_with_tack" != "xyes"; then
27879                                 continue
27880                         fi
27881                 fi
27882
27883                 if test -z "$cf_cv_src_modules"; then
27884                         cf_cv_src_modules=$cf_dir
27885                 else
27886                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
27887                 fi
27888
27889                 # Make the ncurses_cfg.h file record the library interface files as
27890                 # well.  These are header files that are the same name as their
27891                 # directory.  Ncurses is the only library that does not follow
27892                 # that pattern.
27893                 if test "$cf_dir" = tack ; then
27894                         continue
27895                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
27896
27897 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27898
27899                         cat >>confdefs.h <<EOF
27900 #define HAVE_${cf_have_include}_H 1
27901 EOF
27902
27903                         cat >>confdefs.h <<EOF
27904 #define HAVE_LIB${cf_have_include} 1
27905 EOF
27906
27907 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27908
27909 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
27910
27911                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
27912                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
27913                         if test "$DFT_LWR_MODEL" = "libtool"; then
27914                                 TEST_ARGS="${TEST_DEPS}"
27915                                 TEST_ARG2="${TEST_DEP2}"
27916                         else
27917                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
27918                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
27919                         fi
27920                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
27921                 fi
27922         fi
27923 done
27924 echo "$as_me:27924: result: $cf_cv_src_modules" >&5
27925 echo "${ECHO_T}$cf_cv_src_modules" >&6
27926
27927 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
27928 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
27929
27930 SRC_SUBDIRS=
27931 if test "x$cf_with_manpages" != xno ; then
27932         SRC_SUBDIRS="$SRC_SUBDIRS man"
27933 fi
27934 SRC_SUBDIRS="$SRC_SUBDIRS include"
27935 for cf_dir in $cf_cv_src_modules
27936 do
27937         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
27938 done
27939 if test "x$cf_with_tests" != "xno" ; then
27940         SRC_SUBDIRS="$SRC_SUBDIRS test"
27941 fi
27942 # always make this, to install the ncurses-config script
27943 SRC_SUBDIRS="$SRC_SUBDIRS misc"
27944 if test "$cf_with_cxx_binding" != no; then
27945         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
27946         SRC_SUBDIRS="$SRC_SUBDIRS c++"
27947 fi
27948
27949 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
27950 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
27951
27952 ADA_SUBDIRS=
27953 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
27954         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
27955         ADA_SUBDIRS="gen src"
27956         if test "x$cf_with_tests" != "xno" ; then
27957                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
27958         fi
27959 fi
27960
27961 SUB_MAKEFILES=
27962 for cf_dir in $SRC_SUBDIRS
27963 do
27964         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
27965 done
27966
27967 if test -n "$ADA_SUBDIRS"; then
27968         for cf_dir in $ADA_SUBDIRS
27969         do
27970                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
27971         done
27972
27973 fi
27974
27975 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
27976    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
27977    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
27978    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
27979 fi
27980
27981 DIRS_TO_MAKE="lib"
27982 for cf_item in $cf_list_models
27983 do
27984
27985         case $cf_item in
27986         (libtool) cf_subdir='obj_lo'  ;;
27987         (normal)  cf_subdir='objects' ;;
27988         (debug)   cf_subdir='obj_g' ;;
27989         (profile) cf_subdir='obj_p' ;;
27990         (shared)
27991                 case "$cf_cv_system_name" in
27992                 (cygwin|msys)
27993                         cf_subdir='objects' ;;
27994                 (*)
27995                         cf_subdir='obj_s' ;;
27996                 esac
27997         esac
27998
27999         for cf_item2 in $DIRS_TO_MAKE
28000         do
28001                 test "$cf_item2" = "$cf_subdir" && break
28002         done
28003         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28004 done
28005 for cf_dir in $DIRS_TO_MAKE
28006 do
28007         test ! -d "$cf_dir" && mkdir "$cf_dir"
28008 done
28009
28010 # symbols that differ when compiling Ada95 by itself.
28011 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28012
28013 # values to use as strings
28014
28015 cat >>confdefs.h <<EOF
28016 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28017 EOF
28018
28019 cat >>confdefs.h <<EOF
28020 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28021 EOF
28022
28023 ### Define substitutions for header files to avoid name-pollution
28024
28025 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28026         HAVE_TCGETATTR=1
28027 else
28028         HAVE_TCGETATTR=0
28029 fi
28030
28031 if test "x$ac_cv_header_stdint_h" = xyes ; then
28032         HAVE_STDINT_H=1
28033 else
28034         HAVE_STDINT_H=0
28035 fi
28036
28037 if test "x$ac_cv_header_termio_h" = xyes ; then
28038         HAVE_TERMIO_H=1
28039 else
28040         HAVE_TERMIO_H=0
28041 fi
28042
28043 if test "x$ac_cv_header_termios_h" = xyes ; then
28044         HAVE_TERMIOS_H=1
28045 else
28046         HAVE_TERMIOS_H=0
28047 fi
28048
28049 ################################################################################
28050 test "x$use_database" = xyes && \
28051 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28052
28053 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28054 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28055
28056 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28057 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28058 fi
28059
28060 if test "x$cf_with_tests" != xno ; then
28061         MAKE_TESTS=
28062 else
28063         MAKE_TESTS="#"
28064 fi
28065
28066 ADAHTML_DIR=../../doc/html/ada
28067
28068 # workaround for OS/2 (20151017)
28069 case "$cf_cv_system_name" in
28070 (os2*)
28071         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28072         ;;
28073 (*)
28074         LIBTOOL_OPTS_CXX=
28075         ;;
28076 esac
28077
28078 # workaround for g++ versus Solaris (20131116)
28079 case "$cf_cv_system_name" in
28080 (solaris2*)
28081         case "x$CPPFLAGS" in
28082         (*-D_XOPEN_SOURCE_EXTENDED*)
28083                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28084
28085 echo "${as_me:-configure}:28085: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28086
28087                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28088                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28089                 ;;
28090         esac
28091         ;;
28092 esac
28093
28094 # Help to automatically enable the extended curses features when using either
28095 # the *-config or the ".pc" files by adding defines.
28096 echo "$as_me:28096: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28097 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28098 PKG_CFLAGS=
28099 for cf_loop1 in $CPPFLAGS_after_XOPEN
28100 do
28101         cf_found=no
28102         for cf_loop2 in $CPPFLAGS_before_XOPEN
28103         do
28104                 if test "x$cf_loop1" = "x$cf_loop2"
28105                 then
28106                         cf_found=yes
28107                         break
28108                 fi
28109         done
28110         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28111 done
28112 echo "$as_me:28112: result: $PKG_CFLAGS" >&5
28113 echo "${ECHO_T}$PKG_CFLAGS" >&6
28114
28115 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28116 case "x$NCURSES_OSPEED" in
28117 (*short*)
28118         cf_compatible=1
28119         ;;
28120 (*)
28121         cf_compatible=0
28122         ;;
28123 esac
28124
28125 cat >>confdefs.h <<EOF
28126 #define NCURSES_OSPEED_COMPAT $cf_compatible
28127 EOF
28128
28129 case "x$cf_cv_typeof_chtype" in
28130 (xshort|xint|xlong)
28131         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28132         ;;
28133 esac
28134
28135 case "x$cf_cv_typeof_mmask_t" in
28136 (xshort|xint|xlong)
28137         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28138         ;;
28139 esac
28140
28141 # substitute into misc/Makefile to suppress
28142 # (un)install.data from the
28143 # (un)install rules.
28144 if test "x$cf_with_db_install" = "xno"; then
28145         MISC_INSTALL_DATA=
28146         MISC_UNINSTALL_DATA=
28147 else
28148         MISC_INSTALL_DATA=install.data
28149         MISC_UNINSTALL_DATA=uninstall.data
28150 fi
28151
28152 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28153         MAKE_DATABASE="#"
28154 else
28155         MAKE_DATABASE="$MAKE_TERMINFO"
28156 fi
28157
28158 if test -n "$PACKAGE"
28159 then
28160         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28161         export PACKAGE
28162         echo "package: $PACKAGE"
28163 fi
28164
28165 UNALTERED_SYMS=
28166 cf_filter_syms=no
28167
28168 if test -n "$RESULTING_SYMS"
28169 then
28170         cf_filter_syms=$cf_dft_filter_syms
28171         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28172
28173 echo "${as_me:-configure}:28173: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28174
28175 fi
28176
28177 if test "x$WILDCARD_SYMS" = xno
28178 then
28179         cf_filter_syms=yes
28180 fi
28181
28182 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28183
28184 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28185 if test "$cf_filter_syms" = yes
28186 then
28187         RESULTING_SYMS=resulting.map
28188 fi
28189
28190 if test "x$cross_compiling" = xyes ; then
28191         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28192         CHECK_BUILD="#"
28193 else
28194         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28195         CHECK_BUILD=
28196 fi
28197
28198 # This is used for the *-config script and *.pc data files.
28199
28200 echo "$as_me:28200: checking for linker search path" >&5
28201 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28202 if test "${cf_cv_ld_searchpath+set}" = set; then
28203   echo $ECHO_N "(cached) $ECHO_C" >&6
28204 else
28205
28206 if test "$cross_compiling" != yes ; then
28207
28208 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28209 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28210
28211 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28212 # update the cache, which makes it run faster.
28213 test -z "$cf_pathlist" && \
28214         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28215
28216 test -z "$cf_pathlist" &&
28217         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28218
28219 # This works with OpenBSD 6.5, which lists only filenames
28220 test -z "$cf_pathlist" &&
28221         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28222
28223 if test -z "$cf_pathlist"
28224 then
28225         # dyld default path with MacOS
28226         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28227         then
28228                 # do this to bypass check
28229                 cf_cv_ld_searchpath='$HOME/lib'
28230                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28231         fi
28232 fi
28233
28234 if test -z "$cf_pathlist"
28235 then
28236         # Solaris is "SunOS"
28237         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28238         then
28239                 case x`(isainfo -b)` in
28240                 (x64)
28241                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28242                         ;;
28243                 (x32)
28244                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28245                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28246                         ;;
28247                 (*)
28248                         { echo "$as_me:28248: WARNING: problem with Solaris architecture" >&5
28249 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28250                         ;;
28251                 esac
28252         fi
28253 fi
28254
28255 if test -z "$cf_pathlist"
28256 then
28257         # HP-UX
28258         if test x"`uname -s`" = xHP-UX
28259         then
28260                 case x`getconf LONG_BIT` in
28261                 (x64)
28262                         cf_pathlist="/usr/lib/hpux64"
28263                         ;;
28264                 (x*)
28265                         cf_pathlist="/usr/lib/hpux32"
28266                         ;;
28267                 esac
28268         fi
28269 fi
28270
28271 fi
28272
28273 # If nothing else, assume it is conventional
28274 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28275
28276 # Finally, check that this is only directories
28277 for cf_path in $0 $cf_pathlist
28278 do
28279         if test -d "$cf_path"; then
28280                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28281                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28282         fi
28283 done
28284
28285 # Ensure that it is nonempty
28286 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28287
28288 fi
28289 echo "$as_me:28289: result: $cf_cv_ld_searchpath" >&5
28290 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28291
28292 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28293
28294 cat >>confdefs.h <<\EOF
28295 #define HAVE_CURSES_DATA_BOOLNAMES 1
28296 EOF
28297
28298 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"
28299 ac_config_commands="$ac_config_commands default"
28300 cat >confcache <<\_ACEOF
28301 # This file is a shell script that caches the results of configure
28302 # tests run on this system so they can be shared between configure
28303 # scripts and configure runs, see configure's option --config-cache.
28304 # It is not useful on other systems.  If it contains results you don't
28305 # want to keep, you may remove or edit it.
28306 #
28307 # config.status only pays attention to the cache file if you give it
28308 # the --recheck option to rerun configure.
28309 #
28310 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28311 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28312 # following values.
28313
28314 _ACEOF
28315
28316 # The following way of writing the cache mishandles newlines in values,
28317 # but we know of no workaround that is simple, portable, and efficient.
28318 # So, don't put newlines in cache variables' values.
28319 # Ultrix sh set writes to stderr and can't be redirected directly,
28320 # and sets the high bit in the cache file unless we assign to the vars.
28321 {
28322   (set) 2>&1 |
28323     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28324     *ac_space=\ *)
28325       # `set' does not quote correctly, so add quotes (double-quote
28326       # substitution turns \\\\ into \\, and sed turns \\ into \).
28327       sed -n \
28328         "s/'/'\\\\''/g;
28329           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28330       ;;
28331     *)
28332       # `set' quotes correctly as required by POSIX, so do not add quotes.
28333       sed -n \
28334         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28335       ;;
28336     esac;
28337 } |
28338   sed '
28339      t clear
28340      : clear
28341      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28342      t end
28343      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28344      : end' >>confcache
28345 if cmp -s $cache_file confcache; then :; else
28346   if test -w $cache_file; then
28347     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28348     cat confcache >$cache_file
28349   else
28350     echo "not updating unwritable cache $cache_file"
28351   fi
28352 fi
28353 rm -f confcache
28354
28355 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28356 # Let make expand exec_prefix.
28357 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28358
28359 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28360 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28361 # trailing colons and then remove the whole line if VPATH becomes empty
28362 # (actually we leave an empty line to preserve line numbers).
28363 if test "x$srcdir" = x.; then
28364   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28365 s/:*\$(srcdir):*/:/;
28366 s/:*\${srcdir}:*/:/;
28367 s/:*@srcdir@:*/:/;
28368 s/^\([^=]*=[    ]*\):*/\1/;
28369 s/:*$//;
28370 s/^[^=]*=[      ]*$//;
28371 }'
28372 fi
28373
28374 DEFS=-DHAVE_CONFIG_H
28375
28376 : "${CONFIG_STATUS=./config.status}"
28377 ac_clean_files_save=$ac_clean_files
28378 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28379 { echo "$as_me:28379: creating $CONFIG_STATUS" >&5
28380 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28381 cat >"$CONFIG_STATUS" <<_ACEOF
28382 #! $SHELL
28383 # Generated automatically by configure.
28384 # Run this file to recreate the current configuration.
28385 # Compiler output produced by configure, useful for debugging
28386 # configure, is in config.log if it exists.
28387
28388 debug=false
28389 SHELL=\${CONFIG_SHELL-$SHELL}
28390 ac_cs_invocation="\$0 \$@"
28391
28392 CLICOLOR_FORCE= GREP_OPTIONS=
28393 unset CLICOLOR_FORCE GREP_OPTIONS
28394 _ACEOF
28395
28396 cat >>"$CONFIG_STATUS" <<\_ACEOF
28397 # Be Bourne compatible
28398 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28399   emulate sh
28400   NULLCMD=:
28401 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28402   set -o posix
28403 fi
28404
28405 # Name of the executable.
28406 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28407
28408 if expr a : '\(a\)' >/dev/null 2>&1; then
28409   as_expr=expr
28410 else
28411   as_expr=false
28412 fi
28413
28414 rm -f conf$$ conf$$.exe conf$$.file
28415 echo >conf$$.file
28416 if ln -s conf$$.file conf$$ 2>/dev/null; then
28417   # We could just check for DJGPP; but this test a) works b) is more generic
28418   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28419   if test -f conf$$.exe; then
28420     # Don't use ln at all; we don't have any links
28421     as_ln_s='cp -p'
28422   else
28423     as_ln_s='ln -s'
28424   fi
28425 elif ln conf$$.file conf$$ 2>/dev/null; then
28426   as_ln_s=ln
28427 else
28428   as_ln_s='cp -p'
28429 fi
28430 rm -f conf$$ conf$$.exe conf$$.file
28431
28432 as_executable_p="test -f"
28433
28434 # Support unset when possible.
28435 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28436   as_unset="unset"
28437 else
28438   as_unset="false"
28439 fi
28440
28441 # NLS nuisances.
28442 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28443 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28444 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28445 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28446 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28447 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28448 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28449 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28450
28451 # IFS
28452 # We need space, tab and new line, in precisely that order.
28453 as_nl='
28454 '
28455 IFS="   $as_nl"
28456
28457 # CDPATH.
28458 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28459
28460 exec 6>&1
28461
28462 _ACEOF
28463
28464 # Files that config.status was made for.
28465 if test -n "$ac_config_files"; then
28466   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
28467 fi
28468
28469 if test -n "$ac_config_headers"; then
28470   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
28471 fi
28472
28473 if test -n "$ac_config_links"; then
28474   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
28475 fi
28476
28477 if test -n "$ac_config_commands"; then
28478   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
28479 fi
28480
28481 cat >>"$CONFIG_STATUS" <<\EOF
28482
28483 ac_cs_usage="\
28484 \`$as_me' instantiates files from templates according to the
28485 current configuration.
28486
28487 Usage: $0 [OPTIONS] [FILE]...
28488
28489   -h, --help       print this help, then exit
28490   -V, --version    print version number, then exit
28491   -d, --debug      don't remove temporary files
28492       --recheck    update $as_me by reconfiguring in the same conditions
28493   --file=FILE[:TEMPLATE]
28494                    instantiate the configuration file FILE
28495   --header=FILE[:TEMPLATE]
28496                    instantiate the configuration header FILE
28497
28498 Configuration files:
28499 $config_files
28500
28501 Configuration headers:
28502 $config_headers
28503
28504 Configuration commands:
28505 $config_commands
28506
28507 Report bugs to <dickey@invisible-island.net>."
28508 EOF
28509
28510 cat >>"$CONFIG_STATUS" <<EOF
28511 ac_cs_version="\\
28512 config.status
28513 configured by $0, generated by GNU Autoconf 2.52.20210105,
28514   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28515
28516 Copyright 2003-2020,2021        Thomas E. Dickey
28517 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
28518 Free Software Foundation, Inc.
28519 This config.status script is free software; the Free Software Foundation
28520 gives unlimited permission to copy, distribute and modify it."
28521 srcdir="$srcdir"
28522 INSTALL="$INSTALL"
28523 EOF
28524
28525 cat >>"$CONFIG_STATUS" <<\EOF
28526 # If no file are specified by the user, then we need to provide default
28527 # value.  By we need to know if files were specified by the user.
28528 ac_need_defaults=:
28529 while test $# != 0
28530 do
28531   case $1 in
28532   --*=*)
28533     ac_option=`expr "x$1" : 'x\([^=]*\)='`
28534     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
28535     shift
28536     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
28537     shift
28538     ;;
28539   -*);;
28540   *) # This is not an option, so the user has probably given explicit
28541      # arguments.
28542      ac_need_defaults=false;;
28543   esac
28544
28545   case $1 in
28546   # Handling of the options.
28547 EOF
28548 cat >>"$CONFIG_STATUS" <<EOF
28549   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28550     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
28551     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
28552 EOF
28553 cat >>"$CONFIG_STATUS" <<\EOF
28554   --version | --vers* | -V )
28555     echo "$ac_cs_version"; exit 0 ;;
28556   --he | --h)
28557     # Conflict between --help and --header
28558     { { echo "$as_me:28558: error: ambiguous option: $1
28559 Try \`$0 --help' for more information." >&5
28560 echo "$as_me: error: ambiguous option: $1
28561 Try \`$0 --help' for more information." >&2;}
28562    { (exit 1); exit 1; }; };;
28563   --help | --hel | -h )
28564     echo "$ac_cs_usage"; exit 0 ;;
28565   --debug | --d* | -d )
28566     debug=: ;;
28567   --file | --fil | --fi | --f )
28568     shift
28569     CONFIG_FILES="$CONFIG_FILES $1"
28570     ac_need_defaults=false;;
28571   --header | --heade | --head | --hea )
28572     shift
28573     CONFIG_HEADERS="$CONFIG_HEADERS $1"
28574     ac_need_defaults=false;;
28575
28576   # This is an error.
28577   -*) { { echo "$as_me:28577: error: unrecognized option: $1
28578 Try \`$0 --help' for more information." >&5
28579 echo "$as_me: error: unrecognized option: $1
28580 Try \`$0 --help' for more information." >&2;}
28581    { (exit 1); exit 1; }; } ;;
28582
28583   *) ac_config_targets="$ac_config_targets $1" ;;
28584
28585   esac
28586   shift
28587 done
28588
28589 exec 5>>config.log
28590 cat >&5 << _ACEOF
28591
28592 ## ----------------------- ##
28593 ## Running config.status.  ##
28594 ## ----------------------- ##
28595
28596 This file was extended by $as_me 2.52.20210105, executed with
28597   CONFIG_FILES    = $CONFIG_FILES
28598   CONFIG_HEADERS  = $CONFIG_HEADERS
28599   CONFIG_LINKS    = $CONFIG_LINKS
28600   CONFIG_COMMANDS = $CONFIG_COMMANDS
28601   > "$ac_cs_invocation"
28602 on `(hostname || uname -n) 2>/dev/null | sed 1q`
28603
28604 _ACEOF
28605 EOF
28606
28607 cat >>"$CONFIG_STATUS" <<EOF
28608 #
28609 # INIT-COMMANDS section.
28610 #
28611
28612 ### Special initialization commands, used to pass information from the
28613 ### configuration-run into config.status
28614
28615 ALTERNATE_SYMS="$ALTERNATE_SYMS"
28616 AWK="$AWK"
28617 CXX_NAME="$CXX_NAME"
28618 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
28619 DFT_LWR_MODEL="$DFT_LWR_MODEL"
28620 ECHO_LD="$ECHO_LD"
28621 EXTRA_SUFFIX="$EXTRA_SUFFIX"
28622 FORM_NAME="$FORM_NAME"
28623 LDCONFIG="$LDCONFIG"
28624 LIBTOOL_VERSION="$LIBTOOL_VERSION"
28625 LIB_NAME="$LIB_NAME"
28626 LIB_PREFIX="$LIB_PREFIX"
28627 LIB_SUBSETS="$LIB_SUBSETS"
28628 LIB_SUFFIX="$LIB_SUFFIX"
28629 LIB_TRACING="$LIB_TRACING"
28630 LN_S="$LN_S"
28631 MAKE_TERMINFO="$MAKE_TERMINFO"
28632 MENU_NAME="$MENU_NAME"
28633 NCURSES_MAJOR="$NCURSES_MAJOR"
28634 NCURSES_MINOR="$NCURSES_MINOR"
28635 NCURSES_OSPEED="$NCURSES_OSPEED"
28636 NCURSES_PATCH="$NCURSES_PATCH"
28637 PANEL_NAME="$PANEL_NAME"
28638 SRC_SUBDIRS="$SRC_SUBDIRS"
28639 TERMINFO="$TERMINFO"
28640 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
28641 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
28642 TICS_NAME="$TICS_NAME"
28643 TICS_SUFFIX="$TICS_SUFFIX"
28644 TIC_PATH="$TIC_PATH"
28645 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
28646 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
28647 TINFO_NAME="$TINFO_NAME"
28648 TINFO_SUFFIX="$TINFO_SUFFIX"
28649 UNALTERED_SYMS="$UNALTERED_SYMS"
28650 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
28651 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
28652 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
28653 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
28654 WILDCARD_SYMS="$WILDCARD_SYMS"
28655 WITH_CURSES_H="$with_curses_h"
28656 WITH_ECHO="${enable_echo:=yes}"
28657 WITH_OVERWRITE="$with_overwrite"
28658 cf_LIST_MODELS="$cf_list_models"
28659 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
28660 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
28661 cf_cv_abi_version="$cf_cv_abi_version"
28662 cf_cv_do_relink="$cf_cv_do_relink"
28663 cf_cv_do_reranlib="$cf_cv_do_reranlib"
28664 cf_cv_do_symlinks="$cf_cv_do_symlinks"
28665 cf_cv_enable_lp64="$cf_cv_enable_lp64"
28666 cf_cv_enable_opaque="$cf_cv_enable_opaque"
28667 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
28668 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
28669 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
28670 cf_cv_rel_version="$cf_cv_rel_version"
28671 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
28672 cf_cv_shared_soname='$cf_cv_shared_soname'
28673 cf_cv_shlib_version="$cf_cv_shlib_version"
28674 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
28675 cf_cv_system_name="$cf_cv_system_name"
28676 cf_cv_term_driver="$with_term_driver"
28677 cf_with_ada="$cf_with_ada"
28678 cf_with_cxx_binding="$cf_with_cxx_binding"
28679 cf_with_db_install="$cf_with_db_install"
28680 cf_with_manpages="$cf_with_manpages"
28681 cf_with_tests="$cf_with_tests"
28682 host="$host"
28683 target="$target"
28684 with_shared_cxx="$with_shared_cxx"
28685
28686 EOF
28687
28688 cat >>"$CONFIG_STATUS" <<\EOF
28689 for ac_config_target in $ac_config_targets
28690 do
28691   case "$ac_config_target" in
28692   # Handling of arguments.
28693   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
28694   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
28695   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
28696   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
28697   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
28698   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
28699   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
28700   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
28701   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
28702   *) { { echo "$as_me:28702: error: invalid argument: $ac_config_target" >&5
28703 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
28704    { (exit 1); exit 1; }; };;
28705   esac
28706 done
28707
28708 # If the user did not use the arguments to specify the items to instantiate,
28709 # then the envvar interface is used.  Set only those that are not.
28710 # We use the long form for the default assignment because of an extremely
28711 # bizarre bug on SunOS 4.1.3.
28712 if "$ac_need_defaults"; then
28713   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28714   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28715   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
28716 fi
28717
28718 # Create a temporary directory, and hook for its removal unless debugging.
28719 $debug ||
28720 {
28721   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
28722   trap '{ (exit 1); exit 1; }' 1 2 13 15
28723 }
28724
28725 # Create a (secure) tmp directory for tmp files.
28726 : ${TMPDIR=/tmp}
28727 {
28728   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
28729   test -n "$tmp" && test -d "$tmp"
28730 }  ||
28731 {
28732   tmp=$TMPDIR/cs$$-$RANDOM
28733   (umask 077 && mkdir $tmp)
28734 } ||
28735 {
28736    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
28737    { (exit 1); exit 1; }
28738 }
28739
28740 EOF
28741
28742 cat >>"$CONFIG_STATUS" <<EOF
28743
28744 #
28745 # CONFIG_FILES section.
28746 #
28747
28748 # No need to generate the scripts if there are no CONFIG_FILES.
28749 # This happens for instance when ./config.status config.h
28750 if test -n "\$CONFIG_FILES"; then
28751   # Protect against being on the right side of a sed subst in config.status.
28752   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
28753    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
28754 s,@SHELL@,$SHELL,;t t
28755 s,@exec_prefix@,$exec_prefix,;t t
28756 s,@prefix@,$prefix,;t t
28757 s,@program_transform_name@,$program_transform_name,;t t
28758 s,@bindir@,$bindir,;t t
28759 s,@sbindir@,$sbindir,;t t
28760 s,@libexecdir@,$libexecdir,;t t
28761 s,@datarootdir@,$datarootdir,;t t
28762 s,@datadir@,$datadir,;t t
28763 s,@sysconfdir@,$sysconfdir,;t t
28764 s,@sharedstatedir@,$sharedstatedir,;t t
28765 s,@localstatedir@,$localstatedir,;t t
28766 s,@runstatedir@,$runstatedir,;t t
28767 s,@libdir@,$libdir,;t t
28768 s,@includedir@,$includedir,;t t
28769 s,@oldincludedir@,$oldincludedir,;t t
28770 s,@infodir@,$infodir,;t t
28771 s,@mandir@,$mandir,;t t
28772 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
28773 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
28774 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
28775 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
28776 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
28777 s,@build_alias@,$build_alias,;t t
28778 s,@host_alias@,$host_alias,;t t
28779 s,@target_alias@,$target_alias,;t t
28780 s,@ECHO_C@,$ECHO_C,;t t
28781 s,@ECHO_N@,$ECHO_N,;t t
28782 s,@ECHO_T@,$ECHO_T,;t t
28783 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
28784 s,@DEFS@,$DEFS,;t t
28785 s,@LIBS@,$LIBS,;t t
28786 s,@top_builddir@,$top_builddir,;t t
28787 s,@GREP@,$GREP,;t t
28788 s,@EGREP@,$EGREP,;t t
28789 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
28790 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
28791 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
28792 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
28793 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
28794 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
28795 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
28796 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
28797 s,@VERSION@,$VERSION,;t t
28798 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
28799 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
28800 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
28801 s,@PACKAGE@,$PACKAGE,;t t
28802 s,@build@,$build,;t t
28803 s,@build_cpu@,$build_cpu,;t t
28804 s,@build_vendor@,$build_vendor,;t t
28805 s,@build_os@,$build_os,;t t
28806 s,@host@,$host,;t t
28807 s,@host_cpu@,$host_cpu,;t t
28808 s,@host_vendor@,$host_vendor,;t t
28809 s,@host_os@,$host_os,;t t
28810 s,@target@,$target,;t t
28811 s,@target_cpu@,$target_cpu,;t t
28812 s,@target_vendor@,$target_vendor,;t t
28813 s,@target_os@,$target_os,;t t
28814 s,@FGREP@,$FGREP,;t t
28815 s,@CC@,$CC,;t t
28816 s,@CFLAGS@,$CFLAGS,;t t
28817 s,@LDFLAGS@,$LDFLAGS,;t t
28818 s,@CPPFLAGS@,$CPPFLAGS,;t t
28819 s,@ac_ct_CC@,$ac_ct_CC,;t t
28820 s,@EXEEXT@,$EXEEXT,;t t
28821 s,@OBJEXT@,$OBJEXT,;t t
28822 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
28823 s,@CPP@,$CPP,;t t
28824 s,@LDCONFIG@,$LDCONFIG,;t t
28825 s,@CXX@,$CXX,;t t
28826 s,@CXXFLAGS@,$CXXFLAGS,;t t
28827 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
28828 s,@AWK@,$AWK,;t t
28829 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
28830 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
28831 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
28832 s,@LINT@,$LINT,;t t
28833 s,@LINT_OPTS@,$LINT_OPTS,;t t
28834 s,@LN_S@,$LN_S,;t t
28835 s,@cf_config_suffix@,$cf_config_suffix,;t t
28836 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
28837 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
28838 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
28839 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
28840 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
28841 s,@SET_MAKE@,$SET_MAKE,;t t
28842 s,@CTAGS@,$CTAGS,;t t
28843 s,@ETAGS@,$ETAGS,;t t
28844 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
28845 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
28846 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
28847 s,@RANLIB@,$RANLIB,;t t
28848 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
28849 s,@LD@,$LD,;t t
28850 s,@ac_ct_LD@,$ac_ct_LD,;t t
28851 s,@AR@,$AR,;t t
28852 s,@ac_ct_AR@,$ac_ct_AR,;t t
28853 s,@NM@,$NM,;t t
28854 s,@ac_ct_NM@,$ac_ct_NM,;t t
28855 s,@ARFLAGS@,$ARFLAGS,;t t
28856 s,@DESTDIR@,$DESTDIR,;t t
28857 s,@BUILD_CC@,$BUILD_CC,;t t
28858 s,@BUILD_CPP@,$BUILD_CPP,;t t
28859 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
28860 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
28861 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
28862 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
28863 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
28864 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
28865 s,@cf_list_models@,$cf_list_models,;t t
28866 s,@ABI_VERSION@,$ABI_VERSION,;t t
28867 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
28868 s,@LIBTOOL@,$LIBTOOL,;t t
28869 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
28870 s,@LT_UNDEF@,$LT_UNDEF,;t t
28871 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
28872 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
28873 s,@LIB_CREATE@,$LIB_CREATE,;t t
28874 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
28875 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
28876 s,@LIB_PREP@,$LIB_PREP,;t t
28877 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
28878 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
28879 s,@LIB_LINK@,$LIB_LINK,;t t
28880 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
28881 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
28882 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
28883 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
28884 s,@TICS_NAME@,$TICS_NAME,;t t
28885 s,@TINFO_NAME@,$TINFO_NAME,;t t
28886 s,@LIB_NAME@,$LIB_NAME,;t t
28887 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
28888 s,@CC_G_OPT@,$CC_G_OPT,;t t
28889 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
28890 s,@LD_MODEL@,$LD_MODEL,;t t
28891 s,@shlibdir@,$shlibdir,;t t
28892 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
28893 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
28894 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
28895 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
28896 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
28897 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
28898 s,@LINK_PROGS@,$LINK_PROGS,;t t
28899 s,@LINK_TESTS@,$LINK_TESTS,;t t
28900 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
28901 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
28902 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
28903 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
28904 s,@RPATH_LIST@,$RPATH_LIST,;t t
28905 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
28906 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
28907 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
28908 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
28909 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
28910 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
28911 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
28912 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
28913 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
28914 s,@TIC@,$TIC,;t t
28915 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
28916 s,@INFOCMP@,$INFOCMP,;t t
28917 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
28918 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
28919 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
28920 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
28921 s,@XTERM_KBS@,$XTERM_KBS,;t t
28922 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
28923 s,@TERMINFO@,$TERMINFO,;t t
28924 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
28925 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
28926 s,@TERMPATH@,$TERMPATH,;t t
28927 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
28928 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
28929 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
28930 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
28931 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
28932 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
28933 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
28934 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
28935 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
28936 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
28937 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
28938 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
28939 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
28940 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
28941 s,@RGB_PATH@,$RGB_PATH,;t t
28942 s,@no_x11_rgb@,$no_x11_rgb,;t t
28943 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
28944 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
28945 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
28946 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
28947 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
28948 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
28949 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
28950 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
28951 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
28952 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
28953 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
28954 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
28955 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
28956 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
28957 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
28958 s,@PTHREAD@,$PTHREAD,;t t
28959 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
28960 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
28961 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
28962 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
28963 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
28964 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
28965 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
28966 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
28967 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
28968 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
28969 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
28970 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
28971 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
28972 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
28973 s,@ECHO_LT@,$ECHO_LT,;t t
28974 s,@ECHO_LD@,$ECHO_LD,;t t
28975 s,@RULE_CC@,$RULE_CC,;t t
28976 s,@SHOW_CC@,$SHOW_CC,;t t
28977 s,@ECHO_CC@,$ECHO_CC,;t t
28978 s,@ECHO_LINK@,$ECHO_LINK,;t t
28979 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
28980 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
28981 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
28982 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
28983 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
28984 s,@ADAFLAGS@,$ADAFLAGS,;t t
28985 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
28986 s,@ADA_TRACE@,$ADA_TRACE,;t t
28987 s,@MATH_LIB@,$MATH_LIB,;t t
28988 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
28989 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
28990 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
28991 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
28992 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
28993 s,@TEST_LIBS@,$TEST_LIBS,;t t
28994 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
28995 s,@CXXCPP@,$CXXCPP,;t t
28996 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
28997 s,@CXX_AR@,$CXX_AR,;t t
28998 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
28999 s,@CXXLIBS@,$CXXLIBS,;t t
29000 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29001 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29002 s,@M4_exists@,$M4_exists,;t t
29003 s,@cf_ada_make@,$cf_ada_make,;t t
29004 s,@cf_ada_config@,$cf_ada_config,;t t
29005 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29006 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29007 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29008 s,@cf_compile_generics@,$cf_compile_generics,;t t
29009 s,@cf_generic_objects@,$cf_generic_objects,;t t
29010 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29011 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29012 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29013 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29014 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29015 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29016 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29017 s,@cf_ada_package@,$cf_ada_package,;t t
29018 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29019 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29020 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29021 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29022 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29023 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29024 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29025 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29026 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29027 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29028 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29029 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29030 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29031 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29032 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29033 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29034 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29035 s,@TICS_LIBS@,$TICS_LIBS,;t t
29036 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29037 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29038 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29039 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29040 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29041 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29042 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29043 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29044 s,@includesubdir@,$includesubdir,;t t
29045 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29046 s,@TICS_LIST@,$TICS_LIST,;t t
29047 s,@TINFO_LIST@,$TINFO_LIST,;t t
29048 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29049 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29050 s,@FORM_NAME@,$FORM_NAME,;t t
29051 s,@MENU_NAME@,$MENU_NAME,;t t
29052 s,@PANEL_NAME@,$PANEL_NAME,;t t
29053 s,@CXX_NAME@,$CXX_NAME,;t t
29054 s,@TEST_ARGS@,$TEST_ARGS,;t t
29055 s,@TEST_DEPS@,$TEST_DEPS,;t t
29056 s,@TEST_ARG2@,$TEST_ARG2,;t t
29057 s,@TEST_DEP2@,$TEST_DEP2,;t t
29058 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29059 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29060 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29061 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29062 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29063 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29064 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29065 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29066 s,@cross_compiling@,$cross_compiling,;t t
29067 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29068 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29069 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29070 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29071 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29072 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29073 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29074 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29075 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29076 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29077 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29078 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29079 CEOF
29080
29081 EOF
29082
29083   cat >>"$CONFIG_STATUS" <<\EOF
29084   # Split the substitutions into bite-sized pieces for seds with
29085   # small command number limits, like on Digital OSF/1 and HP-UX.
29086   ac_max_sed_lines=48
29087   ac_sed_frag=1 # Number of current file.
29088   ac_beg=1 # First line for current file.
29089   ac_end=$ac_max_sed_lines # Line after last line for current file.
29090   ac_more_lines=:
29091   ac_sed_cmds=
29092   while "$ac_more_lines"; do
29093     if test "$ac_beg" -gt 1; then
29094       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29095     else
29096       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29097     fi
29098     if test ! -s $tmp/subs.frag; then
29099       ac_more_lines=false
29100     else
29101       # The purpose of the label and of the branching condition is to
29102       # speed up the sed processing (if there are no `@' at all, there
29103       # is no need to browse any of the substitutions).
29104       # These are the two extra sed commands mentioned above.
29105       (echo ':t
29106   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29107       # It is possible to make a multiline substitution using escaped newlines.
29108       # Ensure that we do not split the substitution between script fragments.
29109       ac_BEG=$ac_end
29110       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29111       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29112       if test -s $tmp/subs.next; then
29113         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29114         if test ! -s $tmp/subs.edit; then
29115           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29116           if test ! -s $tmp/subs.edit; then
29117             if test "$ac_beg" -gt 1; then
29118               ac_end=`expr "$ac_end" - 1`
29119               continue
29120             fi
29121           fi
29122         fi
29123       fi
29124
29125       if test -z "$ac_sed_cmds"; then
29126         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29127       else
29128         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29129       fi
29130       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29131       ac_beg=$ac_end
29132       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29133     fi
29134   done
29135   if test -z "$ac_sed_cmds"; then
29136     ac_sed_cmds=cat
29137   fi
29138 fi # test -n "$CONFIG_FILES"
29139
29140 EOF
29141 cat >>"$CONFIG_STATUS" <<\EOF
29142 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29143   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29144   case "$ac_file" in
29145   - | *:- | *:-:* ) # input from stdin
29146         cat >$tmp/stdin
29147         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29148         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29149   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29150         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29151   * )   ac_file_in=$ac_file.in ;;
29152   esac
29153
29154   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29155   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29156          X"$ac_file" : 'X\(//\)[^/]' \| \
29157          X"$ac_file" : 'X\(//\)$' \| \
29158          X"$ac_file" : 'X\(/\)' \| \
29159          .     : '\(.\)' 2>/dev/null ||
29160 echo X"$ac_file" |
29161     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29162           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29163           /^X\(\/\/\)$/{ s//\1/; q; }
29164           /^X\(\/\).*/{ s//\1/; q; }
29165           s/.*/./; q'`
29166   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29167     { case "$ac_dir" in
29168   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29169   *)                      as_incr_dir=.;;
29170 esac
29171 as_dummy="$ac_dir"
29172 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29173   case $as_mkdir_dir in
29174     # Skip DOS drivespec
29175     ?:) as_incr_dir=$as_mkdir_dir ;;
29176     *)
29177       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29178       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29179     ;;
29180   esac
29181 done; }
29182
29183     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29184     # A "../" for each directory in $ac_dir_suffix.
29185     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29186   else
29187     ac_dir_suffix= ac_dots=
29188   fi
29189
29190   case "$srcdir" in
29191   .)  ac_srcdir=.
29192       if test -z "$ac_dots"; then
29193          ac_top_srcdir=.
29194       else
29195          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29196       fi ;;
29197   [\\/]* | ?:[\\/]* )
29198       ac_srcdir="$srcdir$ac_dir_suffix";
29199       ac_top_srcdir="$srcdir" ;;
29200   *) # Relative path.
29201     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29202     ac_top_srcdir="$ac_dots$srcdir" ;;
29203   esac
29204
29205   case $INSTALL in
29206   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29207   *) ac_INSTALL=$ac_dots$INSTALL ;;
29208   esac
29209
29210   if test x"$ac_file" != x-; then
29211     { echo "$as_me:29211: creating $ac_file" >&5
29212 echo "$as_me: creating $ac_file" >&6;}
29213     rm -f "$ac_file"
29214   fi
29215   # Let's still pretend it is `configure' which instantiates (i.e., don't
29216   # use $as_me), people would be surprised to read:
29217   #    /* config.h.  Generated automatically by config.status.  */
29218   configure_input="Generated automatically from `echo $ac_file_in |
29219                                                  sed 's,.*/,,'` by configure."
29220
29221   # First look for the input files in the build tree, otherwise in the
29222   # src tree.
29223   ac_file_inputs=`IFS=:
29224     for f in $ac_file_in; do
29225       case $f in
29226       -) echo $tmp/stdin ;;
29227       [\\/$]*)
29228          # Absolute (can't be DOS-style, as IFS=:)
29229          test -f "$f" || { { echo "$as_me:29229: error: cannot find input file: $f" >&5
29230 echo "$as_me: error: cannot find input file: $f" >&2;}
29231    { (exit 1); exit 1; }; }
29232          echo $f;;
29233       *) # Relative
29234          if test -f "$f"; then
29235            # Build tree
29236            echo $f
29237          elif test -f "$srcdir/$f"; then
29238            # Source tree
29239            echo "$srcdir/$f"
29240          else
29241            # /dev/null tree
29242            { { echo "$as_me:29242: error: cannot find input file: $f" >&5
29243 echo "$as_me: error: cannot find input file: $f" >&2;}
29244    { (exit 1); exit 1; }; }
29245          fi;;
29246       esac
29247     done` || { (exit 1); exit 1; }
29248 EOF
29249 cat >>"$CONFIG_STATUS" <<\EOF
29250   ac_warn_datarootdir=no
29251   if test x"$ac_file" != x-; then
29252     for ac_item in $ac_file_inputs
29253     do
29254       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29255       if test -n "$ac_seen"; then
29256         ac_used=`grep '@datarootdir@' "$ac_item"`
29257         if test -z "$ac_used"; then
29258           { echo "$as_me:29258: WARNING: datarootdir was used implicitly but not set:
29259 $ac_seen" >&5
29260 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29261 $ac_seen" >&2;}
29262           ac_warn_datarootdir=yes
29263         fi
29264       fi
29265       ac_seen=`grep '${datarootdir}' "$ac_item"`
29266       if test -n "$ac_seen"; then
29267         { echo "$as_me:29267: WARNING: datarootdir was used explicitly but not set:
29268 $ac_seen" >&5
29269 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29270 $ac_seen" >&2;}
29271         ac_warn_datarootdir=yes
29272       fi
29273     done
29274   fi
29275
29276 if test "x$ac_warn_datarootdir" = xyes; then
29277   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29278 fi
29279
29280 EOF
29281 cat >>"$CONFIG_STATUS" <<EOF
29282   sed "$ac_vpsub
29283 $extrasub
29284 EOF
29285 cat >>"$CONFIG_STATUS" <<\EOF
29286 :t
29287 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29288 s,@configure_input@,$configure_input,;t t
29289 s,@srcdir@,$ac_srcdir,;t t
29290 s,@top_srcdir@,$ac_top_srcdir,;t t
29291 s,@INSTALL@,$ac_INSTALL,;t t
29292 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29293   rm -f $tmp/stdin
29294   if test x"$ac_file" != x-; then
29295     cp "$tmp/out" "$ac_file"
29296
29297     for ac_name in prefix exec_prefix datarootdir
29298     do
29299         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
29300         if test -n "$ac_seen"; then
29301             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
29302             if test -z "$ac_init"; then
29303               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29304               { echo "$as_me:29304: WARNING: Variable $ac_name is used but was not set:
29305 $ac_seen" >&5
29306 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29307 $ac_seen" >&2;}
29308             fi
29309         fi
29310     done
29311     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
29312     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
29313     if test -s $tmp/out; then
29314       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29315       { echo "$as_me:29315: WARNING: Some variables may not be substituted:
29316 $ac_seen" >&5
29317 echo "$as_me: WARNING: Some variables may not be substituted:
29318 $ac_seen" >&2;}
29319     fi
29320   else
29321     cat $tmp/out
29322   fi
29323   rm -f $tmp/out
29324
29325 done
29326 EOF
29327 cat >>"$CONFIG_STATUS" <<\EOF
29328
29329 #
29330 # CONFIG_HEADER section.
29331 #
29332
29333 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29334 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29335 #
29336 # ac_d sets the value in "#define NAME VALUE" lines.
29337 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29338 ac_dB='[        ].*$,\1#\2'
29339 ac_dC=' '
29340 ac_dD=',;t'
29341 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29342 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29343 ac_iB='\([      ]\),\1#\2define\3'
29344 ac_iC=' '
29345 ac_iD='\4,;t'
29346 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29347 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29348 ac_uB='$,\1#\2define\3'
29349 ac_uC=' '
29350 ac_uD=',;t'
29351
29352 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29353   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29354   case "$ac_file" in
29355   - | *:- | *:-:* ) # input from stdin
29356         cat >$tmp/stdin
29357         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29358         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29359   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29360         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29361   * )   ac_file_in=$ac_file.in ;;
29362   esac
29363
29364   test x"$ac_file" != x- && { echo "$as_me:29364: creating $ac_file" >&5
29365 echo "$as_me: creating $ac_file" >&6;}
29366
29367   # First look for the input files in the build tree, otherwise in the
29368   # src tree.
29369   ac_file_inputs=`IFS=:
29370     for f in $ac_file_in; do
29371       case $f in
29372       -) echo $tmp/stdin ;;
29373       [\\/$]*)
29374          # Absolute (can't be DOS-style, as IFS=:)
29375          test -f "$f" || { { echo "$as_me:29375: error: cannot find input file: $f" >&5
29376 echo "$as_me: error: cannot find input file: $f" >&2;}
29377    { (exit 1); exit 1; }; }
29378          echo $f;;
29379       *) # Relative
29380          if test -f "$f"; then
29381            # Build tree
29382            echo $f
29383          elif test -f "$srcdir/$f"; then
29384            # Source tree
29385            echo "$srcdir/$f"
29386          else
29387            # /dev/null tree
29388            { { echo "$as_me:29388: error: cannot find input file: $f" >&5
29389 echo "$as_me: error: cannot find input file: $f" >&2;}
29390    { (exit 1); exit 1; }; }
29391          fi;;
29392       esac
29393     done` || { (exit 1); exit 1; }
29394   # Remove the trailing spaces.
29395   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29396
29397 EOF
29398
29399 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29400 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29401 # be either 'cat' or 'sort'.
29402 cat confdefs.h | uniq >conftest.vals
29403
29404 # Break up conftest.vals because some shells have a limit on
29405 # the size of here documents, and old seds have small limits too.
29406
29407 rm -f conftest.tail
29408 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
29409 while grep . conftest.vals >/dev/null
29410 do
29411   # Write chunks of a limited-size here document to conftest.frag.
29412   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
29413   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
29414   echo 'CEOF' >> "$CONFIG_STATUS"
29415   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
29416   rm -f conftest.vals
29417   mv conftest.tail conftest.vals
29418 done
29419 rm -f conftest.vals
29420
29421 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29422 # marker @DEFS@.
29423 echo '  cat >> conftest.edit <<CEOF
29424 /@DEFS@/r conftest.frag
29425 /@DEFS@/d
29426 CEOF
29427 sed -f conftest.edit $tmp/in > $tmp/out
29428 rm -f $tmp/in
29429 mv $tmp/out $tmp/in
29430 rm -f conftest.edit conftest.frag
29431 ' >> "$CONFIG_STATUS"
29432
29433 cat >>"$CONFIG_STATUS" <<\EOF
29434   # Let's still pretend it is `configure' which instantiates (i.e., don't
29435   # use $as_me), people would be surprised to read:
29436   #    /* config.h.  Generated automatically by config.status.  */
29437   if test x"$ac_file" = x-; then
29438     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29439   else
29440     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29441   fi
29442   cat $tmp/in >>$tmp/config.h
29443   rm -f $tmp/in
29444   if test x"$ac_file" != x-; then
29445     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
29446       { echo "$as_me:29446: $ac_file is unchanged" >&5
29447 echo "$as_me: $ac_file is unchanged" >&6;}
29448     else
29449       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29450          X"$ac_file" : 'X\(//\)[^/]' \| \
29451          X"$ac_file" : 'X\(//\)$' \| \
29452          X"$ac_file" : 'X\(/\)' \| \
29453          .     : '\(.\)' 2>/dev/null ||
29454 echo X"$ac_file" |
29455     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29456           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29457           /^X\(\/\/\)$/{ s//\1/; q; }
29458           /^X\(\/\).*/{ s//\1/; q; }
29459           s/.*/./; q'`
29460       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29461         { case "$ac_dir" in
29462   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29463   *)                      as_incr_dir=.;;
29464 esac
29465 as_dummy="$ac_dir"
29466 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29467   case $as_mkdir_dir in
29468     # Skip DOS drivespec
29469     ?:) as_incr_dir=$as_mkdir_dir ;;
29470     *)
29471       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29472       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29473     ;;
29474   esac
29475 done; }
29476
29477       fi
29478       rm -f "$ac_file"
29479       mv "$tmp/config.h" "$ac_file"
29480     fi
29481   else
29482     cat $tmp/config.h
29483     rm -f $tmp/config.h
29484   fi
29485 done
29486 EOF
29487 cat >>"$CONFIG_STATUS" <<\EOF
29488 #
29489 # CONFIG_COMMANDS section.
29490 #
29491 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29492   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29493   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29494
29495   case "$ac_dest" in
29496     default )
29497 if test "x$cf_with_tests" != xno ; then
29498
29499 for cf_dir in test
29500 do
29501         if test ! -d "$srcdir/$cf_dir" ; then
29502                 continue
29503         elif test -f "$srcdir/$cf_dir/programs" ; then
29504                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
29505         fi
29506 done
29507
29508 fi
29509
29510 cf_prefix=$LIB_PREFIX
29511
29512 case "$cf_cv_shlib_version" in
29513 (cygdll|msysdll|mingw|msvcdll)
29514         TINFO_NAME=$TINFO_ARG_SUFFIX
29515         TINFO_SUFFIX=.dll
29516         ;;
29517 esac
29518
29519 if test -n "$TINFO_SUFFIX" ; then
29520         case "$TINFO_SUFFIX" in
29521         (tw*)
29522                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
29523                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
29524                 ;;
29525         (t*)
29526                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
29527                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
29528                 ;;
29529         (w*)
29530                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
29531                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
29532                 ;;
29533         esac
29534 fi
29535
29536 for cf_dir in $SRC_SUBDIRS
29537 do
29538         if test ! -d "$srcdir/$cf_dir" ; then
29539                 continue
29540         elif test -f "$srcdir/$cf_dir/modules" ; then
29541
29542                 SHARED_LIB=
29543                 Libs_To_Make=
29544                 cf_awk_program=
29545                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
29546                 then
29547                         cf_awk_program="$cf_awk_program\
29548 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
29549 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
29550 "
29551                 fi
29552
29553                 if test "x$WILDCARD_SYMS" = xno
29554                 then
29555                         cf_awk_program="$cf_awk_program\
29556 /[      ]_\\*;/ { skip=1; next; }\
29557 "
29558                 fi
29559
29560                 if test "x$cf_awk_program" != "x"
29561                 then
29562                         cat >>$cf_dir/Makefile <<CF_EOF
29563
29564 # Generated by CF_LIB_RULES
29565 resulting.map: $UNALTERED_SYMS
29566         $AWK 'BEGIN { skip = 1; last=""; } \
29567 $cf_awk_program \
29568 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
29569  skip = 0; last = \$\$0; } \
29570 END { print last; }' < "$UNALTERED_SYMS" >\$@
29571
29572 distclean::
29573         rm -f resulting.map
29574 CF_EOF
29575                 fi
29576
29577                 for cf_item in $cf_LIST_MODELS
29578                 do
29579
29580         case X$cf_item in
29581         (Xlibtool)
29582                 cf_suffix='.la'
29583                 cf_depsuf=$cf_suffix
29584                 ;;
29585         (Xdebug)
29586                 case "$cf_cv_system_name" in
29587                 (*-msvc*)
29588                         cf_suffix='_g.lib'
29589                         ;;
29590                 (*)
29591                         cf_suffix='_g.a'
29592                         ;;
29593                 esac
29594                 cf_depsuf=$cf_suffix
29595                 ;;
29596         (Xprofile)
29597                 case "$cf_cv_system_name" in
29598                 (*-msvc*)
29599                         cf_suffix='_p.lib'
29600                         ;;
29601                 (*)
29602                         cf_suffix='_p.a'
29603                         ;;
29604                 esac
29605                 cf_depsuf=$cf_suffix
29606                 ;;
29607         (Xshared)
29608                 case "$cf_cv_system_name" in
29609                 (aix[5-7]*)
29610                         cf_suffix='.so'
29611                         cf_depsuf=$cf_suffix
29612                         ;;
29613                 (*-msvc*)
29614                         cf_suffix='.dll'
29615                         cf_depsuf='.dll.lib'
29616                         ;;
29617                 (cygwin*|msys*|mingw*)
29618                         cf_suffix='.dll'
29619                         cf_depsuf='.dll.a'
29620                         ;;
29621                 (darwin*)
29622                         cf_suffix='.dylib'
29623                         cf_depsuf=$cf_suffix
29624                         ;;
29625                 (hpux*)
29626                         case "$target" in
29627                         (ia64*)
29628                                 cf_suffix='.so'
29629                                 cf_depsuf=$cf_suffix
29630                                 ;;
29631                         (*)
29632                                 cf_suffix='.sl'
29633                                 cf_depsuf=$cf_suffix
29634                                 ;;
29635                         esac
29636                         ;;
29637                 (*)
29638                         cf_suffix='.so'
29639                         cf_depsuf=$cf_suffix
29640                         ;;
29641                 esac
29642                 ;;
29643         (*)
29644                 case "$target" in
29645                 (*-msvc*)
29646                         cf_suffix='.lib'
29647                         ;;
29648                 (*)
29649                         cf_suffix='.a'
29650                         ;;
29651                 esac
29652                 cf_depsuf=$cf_suffix
29653                 ;;
29654         esac
29655         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29656         then
29657                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29658                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29659         fi
29660
29661                         if test "$cf_dir" = "c++"
29662                         then
29663
29664 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29665
29666 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29667
29668                         else
29669
29670 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29671
29672 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29673
29674                         fi
29675                         test -z "$cf_libname" && cf_libname="$cf_dir"
29676                         if test "$cf_item" = shared ; then
29677                                 if test -n "${LIB_SUFFIX}"
29678                                 then
29679                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29680                                 else
29681                                         cf_shared_suffix="$cf_suffix"
29682                                 fi
29683                                 if test "$cf_cv_do_symlinks" = yes ; then
29684                                         cf_version_name=
29685
29686                                         case "$cf_cv_shlib_version" in
29687                                         (rel)
29688                                                 cf_version_name=REL_VERSION
29689                                                 ;;
29690                                         (abi)
29691                                                 cf_version_name=ABI_VERSION
29692                                                 ;;
29693                                         esac
29694
29695                                         if test -n "$cf_version_name"
29696                                         then
29697                                                 case "$cf_cv_system_name" in
29698                                                 (darwin*)
29699                                                         # "w", etc?
29700                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
29701                                                         ;;
29702                                                 (*)
29703                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
29704                                                         ;;
29705                                                 esac
29706                                         fi
29707                                         if test -n "${USE_LIB_SUFFIX}"
29708                                         then
29709                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29710                                         else
29711                                                 cf_shared_suffix="$cf_suffix"
29712                                         fi
29713                                 fi
29714                                 # cygwin needs import library, and has unique naming convention
29715                                 # use autodetected ${cf_prefix} for import lib and static lib, but
29716                                 # use 'cyg' prefix for shared lib.
29717                                 case "$cf_cv_shlib_version" in
29718                                 (cygdll)
29719                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29720                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
29721                                         ;;
29722                                 (msysdll)
29723                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29724                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
29725                                         ;;
29726                                 (mingw)
29727                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29728                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
29729                                         ;;
29730                                 (msvcdll)
29731                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29732                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
29733                                         ;;
29734                                 (*)
29735                                         cf_add_lib=
29736                                         ;;
29737                                 esac
29738                                 if test -n "$cf_add_lib"
29739                                 then
29740                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29741                                         continue
29742                                 fi
29743                         fi
29744                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
29745                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29746                 done
29747
29748                 if test "$cf_dir" = ncurses ; then
29749                         cf_subsets="$LIB_SUBSETS"
29750                         cf_r_parts="$cf_subsets"
29751                         cf_liblist="$Libs_To_Make"
29752
29753                         while test -n "$cf_r_parts"
29754                         do
29755                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
29756                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
29757                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
29758                                         cf_add_lib=
29759                                         case "$cf_l_parts" in
29760                                         (*termlib*)
29761                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
29762                                                 ;;
29763                                         (*ticlib*)
29764                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
29765                                                 ;;
29766                                         (*)
29767                                                 break
29768                                                 ;;
29769                                         esac
29770                                         if test -n "$cf_add_lib"; then
29771                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
29772                                         fi
29773                                 else
29774                                         break
29775                                 fi
29776                         done
29777                 else
29778                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
29779                 fi
29780
29781                 if test "$cf_dir" = c++; then
29782                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
29783                                 cf_list=
29784                                 for cf_item in $Libs_To_Make
29785                                 do
29786                                         case "$cf_item" in
29787                                         (*.a)
29788                                                 ;;
29789                                         (*)
29790                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
29791                                                 ;;
29792                                         esac
29793                                         for cf_test in $cf_list
29794                                         do
29795                                                 if test "$cf_test" = "$cf_item"
29796                                                 then
29797                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
29798                                                         cf_item=
29799                                                         break
29800                                                 fi
29801                                         done
29802                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
29803                                 done
29804                                 Libs_To_Make="$cf_list"
29805                         fi
29806                 fi
29807
29808                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
29809                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
29810                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
29811                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
29812
29813                 $AWK -f "$srcdir/mk-0th.awk" \
29814                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
29815                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
29816
29817                 for cf_subset in $cf_subsets
29818                 do
29819                         cf_subdirs=
29820                         for cf_item in $cf_LIST_MODELS
29821                         do
29822
29823                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
29824
29825 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29826
29827                         CXX_MODEL=$cf_ITEM
29828                         if test "$CXX_MODEL" = SHARED; then
29829                                 case "$cf_cv_shlib_version" in
29830                                 (cygdll|msysdll|mingw|msvcdll)
29831                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
29832
29833 echo "${as_me:-configure}:29833: testing overriding CXX_MODEL to SHARED ..." 1>&5
29834
29835                                         with_shared_cxx=yes
29836                                         ;;
29837                                 (*)
29838                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
29839                                         ;;
29840                                 esac
29841                         fi
29842
29843         case X$cf_item in
29844         (Xlibtool)
29845                 cf_suffix='.la'
29846                 cf_depsuf=$cf_suffix
29847                 ;;
29848         (Xdebug)
29849                 case "$cf_cv_system_name" in
29850                 (*-msvc*)
29851                         cf_suffix='_g.lib'
29852                         ;;
29853                 (*)
29854                         cf_suffix='_g.a'
29855                         ;;
29856                 esac
29857                 cf_depsuf=$cf_suffix
29858                 ;;
29859         (Xprofile)
29860                 case "$cf_cv_system_name" in
29861                 (*-msvc*)
29862                         cf_suffix='_p.lib'
29863                         ;;
29864                 (*)
29865                         cf_suffix='_p.a'
29866                         ;;
29867                 esac
29868                 cf_depsuf=$cf_suffix
29869                 ;;
29870         (Xshared)
29871                 case "$cf_cv_system_name" in
29872                 (aix[5-7]*)
29873                         cf_suffix='.so'
29874                         cf_depsuf=$cf_suffix
29875                         ;;
29876                 (*-msvc*)
29877                         cf_suffix='.dll'
29878                         cf_depsuf='.dll.lib'
29879                         ;;
29880                 (cygwin*|msys*|mingw*)
29881                         cf_suffix='.dll'
29882                         cf_depsuf='.dll.a'
29883                         ;;
29884                 (darwin*)
29885                         cf_suffix='.dylib'
29886                         cf_depsuf=$cf_suffix
29887                         ;;
29888                 (hpux*)
29889                         case "$target" in
29890                         (ia64*)
29891                                 cf_suffix='.so'
29892                                 cf_depsuf=$cf_suffix
29893                                 ;;
29894                         (*)
29895                                 cf_suffix='.sl'
29896                                 cf_depsuf=$cf_suffix
29897                                 ;;
29898                         esac
29899                         ;;
29900                 (*)
29901                         cf_suffix='.so'
29902                         cf_depsuf=$cf_suffix
29903                         ;;
29904                 esac
29905                 ;;
29906         (*)
29907                 case "$target" in
29908                 (*-msvc*)
29909                         cf_suffix='.lib'
29910                         ;;
29911                 (*)
29912                         cf_suffix='.a'
29913                         ;;
29914                 esac
29915                 cf_depsuf=$cf_suffix
29916                 ;;
29917         esac
29918         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29919         then
29920                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29921                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29922         fi
29923
29924         case $cf_item in
29925         (libtool) cf_subdir='obj_lo'  ;;
29926         (normal)  cf_subdir='objects' ;;
29927         (debug)   cf_subdir='obj_g' ;;
29928         (profile) cf_subdir='obj_p' ;;
29929         (shared)
29930                 case "$cf_cv_system_name" in
29931                 (cygwin|msys)
29932                         cf_subdir='objects' ;;
29933                 (*)
29934                         cf_subdir='obj_s' ;;
29935                 esac
29936         esac
29937
29938                         # Test for case where we build libtinfo with a different name.
29939                         cf_libname=$cf_dir
29940                         if test "$cf_dir" = ncurses ; then
29941                                 case "$cf_subset" in
29942                                 (*base*)
29943                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
29944                                         ;;
29945                                 (*termlib*)
29946                                         cf_libname=$TINFO_LIB_SUFFIX
29947                                         ;;
29948                                 (ticlib*)
29949                                         cf_libname=$TICS_LIB_SUFFIX
29950                                         ;;
29951                                 esac
29952                         elif test "$cf_dir" = c++ ; then
29953
29954 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29955
29956 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29957
29958                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
29959                         else
29960
29961 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29962
29963 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29964
29965                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
29966                         fi
29967                         if test -n "${USE_ARG_SUFFIX}" ; then
29968                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
29969                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
29970                         fi
29971
29972                         # These dependencies really are for development, not
29973                         # builds, but they are useful in porting, too.
29974                         cf_depend="../include/ncurses_cfg.h"
29975                         if test "$srcdir" = "."; then
29976                                 cf_reldir="."
29977                         else
29978                                 cf_reldir="\${srcdir}"
29979                         fi
29980
29981                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
29982                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
29983                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
29984                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
29985                         fi
29986
29987                         cf_dir_suffix=
29988                         old_cf_suffix="$cf_suffix"
29989                         if test "$cf_cv_shlib_version_infix" = yes ; then
29990                         if test -n "$USE_LIB_SUFFIX" ; then
29991                                 case "$USE_LIB_SUFFIX" in
29992                                 (tw*)
29993                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
29994                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
29995                                         cf_dir_suffix=tw$EXTRA_SUFFIX
29996                                         ;;
29997                                 (t*)
29998                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
29999                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30000                                         cf_dir_suffix=t$EXTRA_SUFFIX
30001                                         ;;
30002                                 (w*)
30003                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30004                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30005                                         cf_dir_suffix=w$EXTRA_SUFFIX
30006                                         ;;
30007                                 (*)
30008                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30009                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30010                                         cf_dir_suffix=$EXTRA_SUFFIX
30011                                         ;;
30012                                 esac
30013                         fi
30014                         fi
30015
30016                         $AWK -f "$srcdir/mk-1st.awk" \
30017                                 name=${cf_libname}${cf_dir_suffix} \
30018                                 traces=$LIB_TRACING \
30019                                 MODEL=$cf_ITEM \
30020                                 CXX_MODEL=$CXX_MODEL \
30021                                 model=$cf_subdir \
30022                                 prefix=$cf_prefix \
30023                                 suffix=$cf_suffix \
30024                                 subset=$cf_subset \
30025                                 driver=$cf_cv_term_driver \
30026                                 SymLink="$LN_S" \
30027                                 TermlibRoot=$TINFO_NAME \
30028                                 TermlibSuffix=$TINFO_SUFFIX \
30029                                 ShlibVer=$cf_cv_shlib_version \
30030                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30031                                 ReLink=${cf_cv_do_relink:-no} \
30032                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30033                                 DoLinks=$cf_cv_do_symlinks \
30034                                 rmSoLocs=$cf_cv_rm_so_locs \
30035                                 ldconfig="$LDCONFIG" \
30036                                 overwrite=$WITH_OVERWRITE \
30037                                 depend="$cf_depend" \
30038                                 host="$host" \
30039                                 libtool_version="$LIBTOOL_VERSION" \
30040                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30041
30042                         cf_suffix="$old_cf_suffix"
30043
30044                         for cf_subdir2 in $cf_subdirs lib
30045                         do
30046                                 test "$cf_subdir" = "$cf_subdir2" && break
30047                         done
30048                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30049                         $AWK -f "$srcdir/mk-2nd.awk" \
30050                                 name=$cf_dir \
30051                                 traces=$LIB_TRACING \
30052                                 MODEL=$cf_ITEM \
30053                                 model=$cf_subdir \
30054                                 subset=$cf_subset \
30055                                 srcdir=$srcdir \
30056                                 echo=$WITH_ECHO \
30057                                 crenames=$cf_cv_prog_CC_c_o \
30058                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30059                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30060                         cf_subdirs="$cf_subdirs $cf_subdir"
30061                         done
30062                 done
30063         fi
30064
30065         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30066 done
30067
30068 for cf_dir in $SRC_SUBDIRS
30069 do
30070         if test ! -d "$srcdir/$cf_dir" ; then
30071                 continue
30072         fi
30073
30074         if test -f "$cf_dir/Makefile" ; then
30075                 case "$cf_dir" in
30076                 (Ada95)
30077                         echo 'libs \' >> Makefile
30078                         echo 'install.libs \' >> Makefile
30079                         echo 'uninstall.libs ::' >> Makefile
30080                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30081                         ;;
30082                 esac
30083         fi
30084
30085         if test -f "$srcdir/$cf_dir/modules" ; then
30086                 echo >> Makefile
30087                 if test -f "$srcdir/$cf_dir/headers" ; then
30088 cat >> Makefile <<CF_EOF
30089 install.includes \\
30090 uninstall.includes \\
30091 CF_EOF
30092                 fi
30093
30094 echo 'lint \' >> Makefile
30095
30096 cat >> Makefile <<CF_EOF
30097 libs \\
30098 lintlib \\
30099 install.libs \\
30100 uninstall.libs \\
30101 install.$cf_dir \\
30102 uninstall.$cf_dir ::
30103         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30104 CF_EOF
30105         elif test -f "$srcdir/$cf_dir/headers" ; then
30106 cat >> Makefile <<CF_EOF
30107
30108 libs \\
30109 install.libs \\
30110 uninstall.libs \\
30111 install.includes \\
30112 uninstall.includes ::
30113         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30114 CF_EOF
30115 fi
30116 done
30117
30118 if test "x$cf_with_db_install" = xyes; then
30119 cat >> Makefile <<CF_EOF
30120
30121 install.libs uninstall.libs \\
30122 install.data uninstall.data ::
30123 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30124 CF_EOF
30125 else
30126 cat >> Makefile <<CF_EOF
30127
30128 install.libs uninstall.libs ::
30129         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30130 CF_EOF
30131 fi
30132
30133 if test "x$cf_with_manpages" = xyes; then
30134 cat >> Makefile <<CF_EOF
30135
30136 install.man \\
30137 uninstall.man ::
30138         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30139 CF_EOF
30140 fi
30141
30142 cat >> Makefile <<CF_EOF
30143
30144 distclean ::
30145         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30146         rm -f headers.sh headers.sed mk_shared_lib.sh
30147         rm -f edit_man.* man_alias.*
30148         rm -rf \${DIRS_TO_MAKE}
30149 CF_EOF
30150
30151 # Special case: tack's manpage lives in its own directory.
30152 if test "x$cf_with_manpages" = xyes; then
30153 if test "x$cf_with_tack" = "xyes"; then
30154 cat >> Makefile <<CF_EOF
30155
30156 install.man \\
30157 uninstall.man ::
30158         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30159 CF_EOF
30160 fi
30161 fi
30162
30163 rm -f headers.sed headers.sh
30164
30165 echo creating headers.sh
30166 cat >headers.sh <<CF_EOF
30167 #! $SHELL
30168 # This shell script is generated by the 'configure' script.  It is invoked in a
30169 # subdirectory of the build tree.  It generates a sed-script in the parent
30170 # directory that is used to adjust includes for header files that reside in a
30171 # subdirectory of /usr/include, etc.
30172 PRG=""
30173 while test \$# != 3
30174 do
30175 PRG="\$PRG \$1"; shift
30176 done
30177 DST=\$1
30178 REF=\$2
30179 SRC=\$3
30180 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30181 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30182 echo installing \$SRC in \$DST
30183 CF_EOF
30184
30185 if test "$WITH_CURSES_H" = yes; then
30186         cat >>headers.sh <<CF_EOF
30187 case \$DST in
30188 (/*/include/*)
30189         END=\`basename \$DST\`
30190         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30191         do
30192                 NAME=\`basename \$i\`
30193                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30194         done
30195         ;;
30196 (*)
30197         echo "" >> \$TMPSED
30198         ;;
30199 esac
30200 CF_EOF
30201
30202 else
30203         cat >>headers.sh <<CF_EOF
30204 case \$DST in
30205 (/*/include/*)
30206         END=\`basename \$DST\`
30207         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30208         do
30209                 NAME=\`basename \$i\`
30210                 if test "\$NAME" = "curses.h"
30211                 then
30212                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30213                         NAME=ncurses.h
30214                 fi
30215                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30216         done
30217         ;;
30218 (*)
30219         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30220         ;;
30221 esac
30222 CF_EOF
30223 fi
30224 cat >>headers.sh <<CF_EOF
30225 rm -f \$TMPSRC
30226 sed -f \$TMPSED \$SRC > \$TMPSRC
30227 NAME=\`basename \$SRC\`
30228 CF_EOF
30229 if test "$WITH_CURSES_H" != yes; then
30230         cat >>headers.sh <<CF_EOF
30231 test "\$NAME" = "curses.h" && NAME=ncurses.h
30232 CF_EOF
30233 fi
30234 cat >>headers.sh <<CF_EOF
30235 # Just in case someone gzip'd manpages, remove the conflicting copy.
30236 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30237
30238 eval \$PRG \$TMPSRC \$DST/\$NAME
30239 rm -f \$TMPSRC \$TMPSED
30240 CF_EOF
30241
30242 chmod 0755 headers.sh
30243
30244 for cf_dir in $SRC_SUBDIRS
30245 do
30246         if test ! -d "$srcdir/$cf_dir" ; then
30247                 continue
30248         fi
30249
30250         if test -f "$srcdir/$cf_dir/headers" ; then
30251                 $AWK -f "$srcdir/mk-hdr.awk" \
30252                         subset="$LIB_SUBSETS" \
30253                         compat="$WITH_CURSES_H" \
30254                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
30255         fi
30256
30257         if test -f "$srcdir/$cf_dir/modules" ; then
30258                 if test "$cf_dir" != "c++" ; then
30259                         cat >>$cf_dir/Makefile <<"CF_EOF"
30260 depend : ${AUTO_SRC}
30261         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30262
30263 # DO NOT DELETE THIS LINE -- make depend depends on it.
30264 CF_EOF
30265                 fi
30266         fi
30267 done
30268
30269 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30270 if test -z "$USE_OLD_MAKERULES" ; then
30271         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
30272 fi
30273 fi
30274  ;;
30275   esac
30276 done
30277 EOF
30278
30279 cat >>"$CONFIG_STATUS" <<\EOF
30280
30281 { (exit 0); exit 0; }
30282 EOF
30283 chmod +x "$CONFIG_STATUS"
30284 ac_clean_files=$ac_clean_files_save
30285
30286 # configure is writing to config.log, and then calls config.status.
30287 # config.status does its own redirection, appending to config.log.
30288 # Unfortunately, on DOS this fails, as config.log is still kept open
30289 # by configure, so config.status won't be able to write to it; its
30290 # output is simply discarded.  So we exec the FD to /dev/null,
30291 # effectively closing config.log, so it can be properly (re)opened and
30292 # appended to by config.status.  When coming back to configure, we
30293 # need to make the FD available again.
30294 if test "$no_create" != yes; then
30295   ac_cs_success=:
30296   exec 5>/dev/null
30297   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
30298   exec 5>>config.log
30299   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30300   # would make configure fail if this is the last instruction.
30301   "$ac_cs_success" || { (exit 1); exit 1; }
30302 fi
30303 ${MAKE:-make} preinstall